21 /******/ })(); |
21 /******/ })(); |
22 /******/ |
22 /******/ |
23 /************************************************************************/ |
23 /************************************************************************/ |
24 var __webpack_exports__ = {}; |
24 var __webpack_exports__ = {}; |
25 |
25 |
26 ;// CONCATENATED MODULE: external "@wordpress/interactivity" |
26 ;// external "@wordpress/interactivity" |
27 var x = (y) => { |
27 var x = (y) => { |
28 var x = {}; __webpack_require__.d(x, y); return x |
28 var x = {}; __webpack_require__.d(x, y); return x |
29 } |
29 } |
30 var y = (x) => (() => (x)) |
30 var y = (x) => (() => (x)) |
31 const interactivity_namespaceObject = x({ ["getContext"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getContext), ["getElement"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getElement), ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) }); |
31 const interactivity_namespaceObject = x({ ["getContext"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getContext), ["getElement"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getElement), ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store), ["withSyncEvent"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.withSyncEvent) }); |
32 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/view.js |
32 ;// ./node_modules/@wordpress/block-library/build-module/search/view.js |
33 /** |
33 /** |
34 * WordPress dependencies |
34 * WordPress dependencies |
35 */ |
35 */ |
36 |
36 |
37 const { |
37 const { |
65 } = (0,interactivity_namespaceObject.getContext)(); |
65 } = (0,interactivity_namespaceObject.getContext)(); |
66 return isSearchInputVisible ? '0' : '-1'; |
66 return isSearchInputVisible ? '0' : '-1'; |
67 } |
67 } |
68 }, |
68 }, |
69 actions: { |
69 actions: { |
70 openSearchInput(event) { |
70 openSearchInput: (0,interactivity_namespaceObject.withSyncEvent)(event => { |
71 const ctx = (0,interactivity_namespaceObject.getContext)(); |
71 const ctx = (0,interactivity_namespaceObject.getContext)(); |
72 const { |
72 const { |
73 ref |
73 ref |
74 } = (0,interactivity_namespaceObject.getElement)(); |
74 } = (0,interactivity_namespaceObject.getElement)(); |
75 if (!ctx.isSearchInputVisible) { |
75 if (!ctx.isSearchInputVisible) { |
76 event.preventDefault(); |
76 event.preventDefault(); |
77 ctx.isSearchInputVisible = true; |
77 ctx.isSearchInputVisible = true; |
78 ref.parentElement.querySelector('input').focus(); |
78 ref.parentElement.querySelector('input').focus(); |
79 } |
79 } |
80 }, |
80 }), |
81 closeSearchInput() { |
81 closeSearchInput() { |
82 const ctx = (0,interactivity_namespaceObject.getContext)(); |
82 const ctx = (0,interactivity_namespaceObject.getContext)(); |
83 ctx.isSearchInputVisible = false; |
83 ctx.isSearchInputVisible = false; |
84 }, |
84 }, |
85 handleSearchKeydown(event) { |
85 handleSearchKeydown(event) { |