@athoscommerce/snap-preact 1.2.3-beta.1 → 1.2.3-beta.2
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/dist/cjs/components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.d.ts.map +1 -1
- package/dist/cjs/components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.js +6 -10
- package/dist/cjs/components/src/components/Templates/AutocompleteModal/AutocompleteModal.d.ts.map +1 -1
- package/dist/cjs/components/src/components/Templates/AutocompleteModal/AutocompleteModal.js +4 -8
- package/dist/cjs/components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.d.ts.map +1 -1
- package/dist/cjs/components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.js +5 -9
- package/dist/cjs/components/src/hooks/useAcRenderedInput.js +1 -1
- package/dist/esm/components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.d.ts.map +1 -1
- package/dist/esm/components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.js +4 -8
- package/dist/esm/components/src/components/Templates/AutocompleteModal/AutocompleteModal.d.ts.map +1 -1
- package/dist/esm/components/src/components/Templates/AutocompleteModal/AutocompleteModal.js +4 -8
- package/dist/esm/components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.d.ts.map +1 -1
- package/dist/esm/components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.js +4 -8
- package/dist/esm/components/src/hooks/useAcRenderedInput.js +1 -1
- package/package.json +12 -12
package/dist/cjs/components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteFixed.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AA+CjG,eAAO,MAAM,iBAAiB,gBAAyB,sBAAsB;;
|
|
1
|
+
{"version":3,"file":"AutocompleteFixed.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AA+CjG,eAAO,MAAM,iBAAiB,gBAAyB,sBAAsB;;CAsN3E,CAAC;AAEH,UAAU,WAAW;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAQD,MAAM,MAAM,sBAAsB,GAAG;IACpC,UAAU,EAAE,sBAAsB,CAAC;IACnC,eAAe,CAAC,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAAC;CAC7C,GAAG,oCAAoC,GACvC,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAEzC,MAAM,MAAM,oCAAoC,GAAG;IAClD,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;CAC9C,GAAG,uBAAuB,CAAC"}
|
|
@@ -73,7 +73,10 @@ exports.AutocompleteFixed = (0, mobx_react_lite_1.observer)(function (properties
|
|
|
73
73
|
};
|
|
74
74
|
var props = (0, utilities_1.mergeProps)('autocompleteFixed', globalTheme, defaultProps, properties);
|
|
75
75
|
var _a = (0, hooks_1.useState)(false), active = _a[0], setActive = _a[1];
|
|
76
|
-
|
|
76
|
+
// Use an empty inputName so the rendered SearchInput does not participate in form
|
|
77
|
+
// serialization. The original input retains its name (e.g. 'q') so that native form
|
|
78
|
+
// submission still produces the expected ?q= query parameter.
|
|
79
|
+
var inputName = '';
|
|
77
80
|
var input = props.input;
|
|
78
81
|
var buttonSelector = props.buttonSelector;
|
|
79
82
|
var inputPlaceholderText = undefined;
|
|
@@ -81,13 +84,6 @@ exports.AutocompleteFixed = (0, mobx_react_lite_1.observer)(function (properties
|
|
|
81
84
|
if (typeof input === 'string') {
|
|
82
85
|
input = document.querySelector(input);
|
|
83
86
|
}
|
|
84
|
-
var existingInputName = input === null || input === void 0 ? void 0 : input.getAttribute('name');
|
|
85
|
-
if (existingInputName) {
|
|
86
|
-
setInputName(existingInputName);
|
|
87
|
-
if (props.renderInput) {
|
|
88
|
-
input.setAttribute('name', '');
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
87
|
inputPlaceholderText = input === null || input === void 0 ? void 0 : input.getAttribute('placeholder');
|
|
92
88
|
}
|
|
93
89
|
if (!buttonSelector && input) {
|
|
@@ -171,12 +167,12 @@ exports.AutocompleteFixed = (0, mobx_react_lite_1.observer)(function (properties
|
|
|
171
167
|
};
|
|
172
168
|
}
|
|
173
169
|
};
|
|
174
|
-
var
|
|
170
|
+
var _b = (0, hooks_1.useState)({
|
|
175
171
|
top: 0,
|
|
176
172
|
left: 0,
|
|
177
173
|
width: 0,
|
|
178
174
|
height: 0,
|
|
179
|
-
}), inputBounds =
|
|
175
|
+
}), inputBounds = _b[0], setInputBounds = _b[1];
|
|
180
176
|
var checkForInputChange = function () {
|
|
181
177
|
var currentInputBounds = getInputBounds(input);
|
|
182
178
|
if (inputBounds.height !== currentInputBounds.height ||
|
package/dist/cjs/components/src/components/Templates/AutocompleteModal/AutocompleteModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteModal.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteModal/AutocompleteModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AA8DjG,eAAO,MAAM,iBAAiB,gBAAyB,sBAAsB;;
|
|
1
|
+
{"version":3,"file":"AutocompleteModal.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteModal/AutocompleteModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AA8DjG,eAAO,MAAM,iBAAiB,gBAAyB,sBAAsB;;CAiK3E,CAAC;AAQH,MAAM,MAAM,sBAAsB,GAAG;IACpC,UAAU,EAAE,sBAAsB,CAAC;IACnC,eAAe,CAAC,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAAC;CAC7C,GAAG,oCAAoC,GACvC,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAEzC,MAAM,MAAM,oCAAoC,GAAG;IAClD,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,uBAAuB,CAAC"}
|
|
@@ -91,20 +91,16 @@ exports.AutocompleteModal = (0, mobx_react_lite_1.observer)(function (properties
|
|
|
91
91
|
};
|
|
92
92
|
var props = (0, utilities_1.mergeProps)('autocompleteModal', globalTheme, defaultProps, properties);
|
|
93
93
|
var _a = (0, hooks_1.useState)(false), active = _a[0], setActive = _a[1];
|
|
94
|
-
|
|
94
|
+
// Use an empty inputName so the rendered SearchInput does not participate in form
|
|
95
|
+
// serialization. The original input retains its name (e.g. 'q') so that native form
|
|
96
|
+
// submission still produces the expected ?q= query parameter.
|
|
97
|
+
var inputName = '';
|
|
95
98
|
var input = props.input;
|
|
96
99
|
var buttonSelector = props.buttonSelector;
|
|
97
100
|
if (input) {
|
|
98
101
|
if (typeof input === 'string') {
|
|
99
102
|
input = document.querySelector(input);
|
|
100
103
|
}
|
|
101
|
-
var existingInputName = input === null || input === void 0 ? void 0 : input.getAttribute('name');
|
|
102
|
-
if (existingInputName) {
|
|
103
|
-
setInputName(existingInputName);
|
|
104
|
-
if (props.renderInput) {
|
|
105
|
-
input.setAttribute('name', '');
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
104
|
}
|
|
109
105
|
if (!buttonSelector && input) {
|
|
110
106
|
buttonSelector = input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteSlideout.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAA2B,MAAM,0BAA0B,CAAC;AAsBvF,eAAO,MAAM,oBAAoB,gBAAyB,yBAAyB;;
|
|
1
|
+
{"version":3,"file":"AutocompleteSlideout.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAA2B,MAAM,0BAA0B,CAAC;AAsBvF,eAAO,MAAM,oBAAoB,gBAAyB,yBAAyB;;CAyJjF,CAAC;AAOH,MAAM,MAAM,yBAAyB,GAAG;IACvC,UAAU,EAAE,sBAAsB,CAAC;IACnC,eAAe,CAAC,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAAC;CAC7C,GAAG,uCAAuC,GAC1C,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAEzC,MAAM,MAAM,uCAAuC,GAAG;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,uBAAuB,CAAC"}
|
package/dist/cjs/components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.js
CHANGED
|
@@ -51,20 +51,16 @@ exports.AutocompleteSlideout = (0, mobx_react_lite_1.observer)(function (propert
|
|
|
51
51
|
renderInput: true,
|
|
52
52
|
};
|
|
53
53
|
var props = (0, utilities_1.mergeProps)('autocompleteSlideout', globalTheme, defaultProps, properties);
|
|
54
|
-
|
|
54
|
+
// Use an empty inputName so the rendered SearchInput does not participate in form
|
|
55
|
+
// serialization. The original input retains its name (e.g. 'q') so that native form
|
|
56
|
+
// submission still produces the expected ?q= query parameter.
|
|
57
|
+
var inputName = '';
|
|
55
58
|
var input = props.input;
|
|
56
59
|
var buttonSelector = props.buttonSelector;
|
|
57
60
|
if (input) {
|
|
58
61
|
if (typeof input === 'string') {
|
|
59
62
|
input = document.querySelector(input);
|
|
60
63
|
}
|
|
61
|
-
var existingInputName = input === null || input === void 0 ? void 0 : input.getAttribute('name');
|
|
62
|
-
if (existingInputName) {
|
|
63
|
-
setInputName(existingInputName);
|
|
64
|
-
if (props.renderInput) {
|
|
65
|
-
input.setAttribute('name', '');
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
64
|
}
|
|
69
65
|
if (!buttonSelector && input) {
|
|
70
66
|
buttonSelector = input;
|
|
@@ -112,7 +108,7 @@ exports.AutocompleteSlideout = (0, mobx_react_lite_1.observer)(function (propert
|
|
|
112
108
|
treePath: "".concat(treePath, " slideout"), theme: props === null || props === void 0 ? void 0 : props.theme }),
|
|
113
109
|
};
|
|
114
110
|
var styling = (0, utilities_1.mergeStyles)(props, defaultStyles);
|
|
115
|
-
var
|
|
111
|
+
var _a = (0, hooks_1.useState)(false), active = _a[0], setActive = _a[1];
|
|
116
112
|
var _input;
|
|
117
113
|
if (input) {
|
|
118
114
|
(0, hooks_1.useEffect)(function () {
|
|
@@ -55,7 +55,7 @@ function useAcRenderedInput(_a) {
|
|
|
55
55
|
case 0:
|
|
56
56
|
if (!!renderedInputInitialized) return [3 /*break*/, 2];
|
|
57
57
|
setInput(renderedInputRef.current);
|
|
58
|
-
controller.config.selector =
|
|
58
|
+
controller.config.selector = "".concat(controller.config.selector, ", .autocomplete__search-input input");
|
|
59
59
|
return [4 /*yield*/, controller.bind()];
|
|
60
60
|
case 1:
|
|
61
61
|
_b.sent();
|
package/dist/esm/components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteFixed.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AA+CjG,eAAO,MAAM,iBAAiB,gBAAyB,sBAAsB;;
|
|
1
|
+
{"version":3,"file":"AutocompleteFixed.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteFixed/AutocompleteFixed.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AA+CjG,eAAO,MAAM,iBAAiB,gBAAyB,sBAAsB;;CAsN3E,CAAC;AAEH,UAAU,WAAW;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAQD,MAAM,MAAM,sBAAsB,GAAG;IACpC,UAAU,EAAE,sBAAsB,CAAC;IACnC,eAAe,CAAC,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAAC;CAC7C,GAAG,oCAAoC,GACvC,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAEzC,MAAM,MAAM,oCAAoC,GAAG;IAClD,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;CAC9C,GAAG,uBAAuB,CAAC"}
|
|
@@ -55,7 +55,10 @@ export const AutocompleteFixed = observer((properties) => {
|
|
|
55
55
|
};
|
|
56
56
|
const props = mergeProps('autocompleteFixed', globalTheme, defaultProps, properties);
|
|
57
57
|
const [active, setActive] = useState(false);
|
|
58
|
-
|
|
58
|
+
// Use an empty inputName so the rendered SearchInput does not participate in form
|
|
59
|
+
// serialization. The original input retains its name (e.g. 'q') so that native form
|
|
60
|
+
// submission still produces the expected ?q= query parameter.
|
|
61
|
+
const inputName = '';
|
|
59
62
|
let input = props.input;
|
|
60
63
|
let buttonSelector = props.buttonSelector;
|
|
61
64
|
let inputPlaceholderText = undefined;
|
|
@@ -63,13 +66,6 @@ export const AutocompleteFixed = observer((properties) => {
|
|
|
63
66
|
if (typeof input === 'string') {
|
|
64
67
|
input = document.querySelector(input);
|
|
65
68
|
}
|
|
66
|
-
const existingInputName = input?.getAttribute('name');
|
|
67
|
-
if (existingInputName) {
|
|
68
|
-
setInputName(existingInputName);
|
|
69
|
-
if (props.renderInput) {
|
|
70
|
-
input.setAttribute('name', '');
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
69
|
inputPlaceholderText = input?.getAttribute('placeholder');
|
|
74
70
|
}
|
|
75
71
|
if (!buttonSelector && input) {
|
package/dist/esm/components/src/components/Templates/AutocompleteModal/AutocompleteModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteModal.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteModal/AutocompleteModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AA8DjG,eAAO,MAAM,iBAAiB,gBAAyB,sBAAsB;;
|
|
1
|
+
{"version":3,"file":"AutocompleteModal.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteModal/AutocompleteModal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AA8DjG,eAAO,MAAM,iBAAiB,gBAAyB,sBAAsB;;CAiK3E,CAAC;AAQH,MAAM,MAAM,sBAAsB,GAAG;IACpC,UAAU,EAAE,sBAAsB,CAAC;IACnC,eAAe,CAAC,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAAC;CAC7C,GAAG,oCAAoC,GACvC,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAEzC,MAAM,MAAM,oCAAoC,GAAG;IAClD,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,uBAAuB,CAAC"}
|
|
@@ -71,20 +71,16 @@ export const AutocompleteModal = observer((properties) => {
|
|
|
71
71
|
};
|
|
72
72
|
const props = mergeProps('autocompleteModal', globalTheme, defaultProps, properties);
|
|
73
73
|
const [active, setActive] = useState(false);
|
|
74
|
-
|
|
74
|
+
// Use an empty inputName so the rendered SearchInput does not participate in form
|
|
75
|
+
// serialization. The original input retains its name (e.g. 'q') so that native form
|
|
76
|
+
// submission still produces the expected ?q= query parameter.
|
|
77
|
+
const inputName = '';
|
|
75
78
|
let input = props.input;
|
|
76
79
|
let buttonSelector = props.buttonSelector;
|
|
77
80
|
if (input) {
|
|
78
81
|
if (typeof input === 'string') {
|
|
79
82
|
input = document.querySelector(input);
|
|
80
83
|
}
|
|
81
|
-
const existingInputName = input?.getAttribute('name');
|
|
82
|
-
if (existingInputName) {
|
|
83
|
-
setInputName(existingInputName);
|
|
84
|
-
if (props.renderInput) {
|
|
85
|
-
input.setAttribute('name', '');
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
84
|
}
|
|
89
85
|
if (!buttonSelector && input) {
|
|
90
86
|
buttonSelector = input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteSlideout.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAA2B,MAAM,0BAA0B,CAAC;AAsBvF,eAAO,MAAM,oBAAoB,gBAAyB,yBAAyB;;
|
|
1
|
+
{"version":3,"file":"AutocompleteSlideout.d.ts","sourceRoot":"","sources":["../../../../../../../components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EAAE,cAAc,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAsB,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAA2B,MAAM,0BAA0B,CAAC;AAsBvF,eAAO,MAAM,oBAAoB,gBAAyB,yBAAyB;;CAyJjF,CAAC;AAOH,MAAM,MAAM,yBAAyB,GAAG;IACvC,UAAU,EAAE,sBAAsB,CAAC;IACnC,eAAe,CAAC,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAAC;CAC7C,GAAG,uCAAuC,GAC1C,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAEzC,MAAM,MAAM,uCAAuC,GAAG;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,uBAAuB,CAAC"}
|
package/dist/esm/components/src/components/Templates/AutocompleteSlideout/AutocompleteSlideout.js
CHANGED
|
@@ -34,20 +34,16 @@ export const AutocompleteSlideout = observer((properties) => {
|
|
|
34
34
|
renderInput: true,
|
|
35
35
|
};
|
|
36
36
|
const props = mergeProps('autocompleteSlideout', globalTheme, defaultProps, properties);
|
|
37
|
-
|
|
37
|
+
// Use an empty inputName so the rendered SearchInput does not participate in form
|
|
38
|
+
// serialization. The original input retains its name (e.g. 'q') so that native form
|
|
39
|
+
// submission still produces the expected ?q= query parameter.
|
|
40
|
+
const inputName = '';
|
|
38
41
|
let input = props.input;
|
|
39
42
|
let buttonSelector = props.buttonSelector;
|
|
40
43
|
if (input) {
|
|
41
44
|
if (typeof input === 'string') {
|
|
42
45
|
input = document.querySelector(input);
|
|
43
46
|
}
|
|
44
|
-
const existingInputName = input?.getAttribute('name');
|
|
45
|
-
if (existingInputName) {
|
|
46
|
-
setInputName(existingInputName);
|
|
47
|
-
if (props.renderInput) {
|
|
48
|
-
input.setAttribute('name', '');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
47
|
}
|
|
52
48
|
if (!buttonSelector && input) {
|
|
53
49
|
buttonSelector = input;
|
|
@@ -10,7 +10,7 @@ export function useAcRenderedInput({ input, controller, renderInput, buttonSelec
|
|
|
10
10
|
setTimeout(async () => {
|
|
11
11
|
if (!renderedInputInitialized) {
|
|
12
12
|
setInput(renderedInputRef.current);
|
|
13
|
-
controller.config.selector =
|
|
13
|
+
controller.config.selector = `${controller.config.selector}, .autocomplete__search-input input`;
|
|
14
14
|
await controller.bind();
|
|
15
15
|
renderedInputRef?.current?.focus();
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@athoscommerce/snap-preact",
|
|
3
|
-
"version": "1.2.3-beta.
|
|
3
|
+
"version": "1.2.3-beta.2+2c4c9a7f8",
|
|
4
4
|
"description": "Snap Preact",
|
|
5
5
|
"main": "dist/cjs/src/index.js",
|
|
6
6
|
"module": "dist/esm/src/index.js",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"storybook": "storybook dev -c ./components/.storybook -p 6006"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@athoscommerce/snap-client": "1.2.3-beta.
|
|
30
|
-
"@athoscommerce/snap-controller": "1.2.3-beta.
|
|
31
|
-
"@athoscommerce/snap-event-manager": "1.2.3-beta.
|
|
32
|
-
"@athoscommerce/snap-logger": "1.2.3-beta.
|
|
33
|
-
"@athoscommerce/snap-platforms": "1.2.3-beta.
|
|
34
|
-
"@athoscommerce/snap-profiler": "1.2.3-beta.
|
|
35
|
-
"@athoscommerce/snap-store-mobx": "1.2.3-beta.
|
|
36
|
-
"@athoscommerce/snap-toolbox": "1.2.3-beta.
|
|
37
|
-
"@athoscommerce/snap-tracker": "1.2.3-beta.
|
|
38
|
-
"@athoscommerce/snap-url-manager": "1.2.3-beta.
|
|
29
|
+
"@athoscommerce/snap-client": "1.2.3-beta.2+2c4c9a7f8",
|
|
30
|
+
"@athoscommerce/snap-controller": "1.2.3-beta.2+2c4c9a7f8",
|
|
31
|
+
"@athoscommerce/snap-event-manager": "1.2.3-beta.2+2c4c9a7f8",
|
|
32
|
+
"@athoscommerce/snap-logger": "1.2.3-beta.2+2c4c9a7f8",
|
|
33
|
+
"@athoscommerce/snap-platforms": "1.2.3-beta.2+2c4c9a7f8",
|
|
34
|
+
"@athoscommerce/snap-profiler": "1.2.3-beta.2+2c4c9a7f8",
|
|
35
|
+
"@athoscommerce/snap-store-mobx": "1.2.3-beta.2+2c4c9a7f8",
|
|
36
|
+
"@athoscommerce/snap-toolbox": "1.2.3-beta.2+2c4c9a7f8",
|
|
37
|
+
"@athoscommerce/snap-tracker": "1.2.3-beta.2+2c4c9a7f8",
|
|
38
|
+
"@athoscommerce/snap-url-manager": "1.2.3-beta.2+2c4c9a7f8",
|
|
39
39
|
"@emotion/react": "11.13.0",
|
|
40
40
|
"classnames": "^2.3.2",
|
|
41
41
|
"color": "^4.2.3",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"require": "./dist/cjs/toolbox/src/index.js"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "2c4c9a7f897641582adeeb5c5b57993143387548"
|
|
101
101
|
}
|