Changeset 3139847
- Timestamp:
- 08/22/2024 03:12:13 PM (16 months ago)
- Location:
- atlas-search
- Files:
-
- 64 added
- 10 deleted
- 28 edited
- 1 copied
-
tags/0.2.55 (copied) (copied from atlas-search/trunk)
-
tags/0.2.55/README.txt (modified) (2 diffs)
-
tags/0.2.55/atlas-search.php (modified) (2 diffs)
-
tags/0.2.55/build/dropdown-facet (added)
-
tags/0.2.55/build/dropdown-facet/block.json (added)
-
tags/0.2.55/build/dropdown-facet/index.asset.php (added)
-
tags/0.2.55/build/dropdown-facet/index.js (added)
-
tags/0.2.55/build/dropdown-facet/render.php (added)
-
tags/0.2.55/build/dropdown-facet/style-index-rtl.css (added)
-
tags/0.2.55/build/dropdown-facet/style-index.css (added)
-
tags/0.2.55/build/dropdown-facet/view.asset.php (added)
-
tags/0.2.55/build/dropdown-facet/view.js (added)
-
tags/0.2.55/build/search-facet/block.json (modified) (1 diff)
-
tags/0.2.55/build/search-facet/render.php (modified) (2 diffs)
-
tags/0.2.55/build/search-facet/view.asset.php (modified) (1 diff)
-
tags/0.2.55/build/search-facet/view.js (modified) (1 diff)
-
tags/0.2.55/build/todo-list (deleted)
-
tags/0.2.55/helper/admin-notice.php (modified) (1 diff)
-
tags/0.2.55/includes/smart-search-settings/build/asset-manifest.json (modified) (2 diffs)
-
tags/0.2.55/includes/smart-search-settings/build/index.html (modified) (1 diff)
-
tags/0.2.55/includes/smart-search-settings/build/static/js/main.8b10e547.js (deleted)
-
tags/0.2.55/includes/smart-search-settings/build/static/js/main.8b10e547.js.LICENSE.txt (deleted)
-
tags/0.2.55/includes/smart-search-settings/build/static/js/main.8b10e547.js.map (deleted)
-
tags/0.2.55/includes/smart-search-settings/build/static/js/main.cfff4ada.js (added)
-
tags/0.2.55/includes/smart-search-settings/build/static/js/main.cfff4ada.js.LICENSE.txt (added)
-
tags/0.2.55/includes/smart-search-settings/build/static/js/main.cfff4ada.js.map (added)
-
tags/0.2.55/src/blocks/blocks-callbacks.php (modified) (2 diffs)
-
tags/0.2.55/src/blocks/config.js (added)
-
tags/0.2.55/src/blocks/dropdown-facet (added)
-
tags/0.2.55/src/blocks/dropdown-facet/__mocks__ (added)
-
tags/0.2.55/src/blocks/dropdown-facet/__mocks__/@wordpress (added)
-
tags/0.2.55/src/blocks/dropdown-facet/__mocks__/@wordpress/block-editor.js (added)
-
tags/0.2.55/src/blocks/dropdown-facet/__mocks__/@wordpress/components.js (added)
-
tags/0.2.55/src/blocks/dropdown-facet/block.json (added)
-
tags/0.2.55/src/blocks/dropdown-facet/edit.js (added)
-
tags/0.2.55/src/blocks/dropdown-facet/edit.test.js (added)
-
tags/0.2.55/src/blocks/dropdown-facet/icon.js (added)
-
tags/0.2.55/src/blocks/dropdown-facet/index.js (added)
-
tags/0.2.55/src/blocks/dropdown-facet/render.php (added)
-
tags/0.2.55/src/blocks/dropdown-facet/save.js (added)
-
tags/0.2.55/src/blocks/dropdown-facet/style.scss (added)
-
tags/0.2.55/src/blocks/dropdown-facet/view.js (added)
-
tags/0.2.55/src/blocks/search-facet/block.json (modified) (1 diff)
-
tags/0.2.55/src/blocks/search-facet/render.php (modified) (2 diffs)
-
tags/0.2.55/src/blocks/search-facet/view.js (modified) (1 diff)
-
tags/0.2.55/src/blocks/stores (added)
-
tags/0.2.55/src/blocks/stores/facets.store.js (added)
-
tags/0.2.55/src/blocks/stores/facets.store.test.js (added)
-
tags/0.2.55/src/blocks/todo-list (deleted)
-
tags/0.2.55/src/blocks/utils/getFiltersFromURL.js (added)
-
tags/0.2.55/src/blocks/utils/getFiltersFromURL.test.js (added)
-
tags/0.2.55/src/support/woocommerce/fields.php (modified) (1 diff)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/atlas-search.php (modified) (2 diffs)
-
trunk/build/dropdown-facet (added)
-
trunk/build/dropdown-facet/block.json (added)
-
trunk/build/dropdown-facet/index.asset.php (added)
-
trunk/build/dropdown-facet/index.js (added)
-
trunk/build/dropdown-facet/render.php (added)
-
trunk/build/dropdown-facet/style-index-rtl.css (added)
-
trunk/build/dropdown-facet/style-index.css (added)
-
trunk/build/dropdown-facet/view.asset.php (added)
-
trunk/build/dropdown-facet/view.js (added)
-
trunk/build/search-facet/block.json (modified) (1 diff)
-
trunk/build/search-facet/render.php (modified) (2 diffs)
-
trunk/build/search-facet/view.asset.php (modified) (1 diff)
-
trunk/build/search-facet/view.js (modified) (1 diff)
-
trunk/build/todo-list (deleted)
-
trunk/helper/admin-notice.php (modified) (1 diff)
-
trunk/includes/smart-search-settings/build/asset-manifest.json (modified) (2 diffs)
-
trunk/includes/smart-search-settings/build/index.html (modified) (1 diff)
-
trunk/includes/smart-search-settings/build/static/js/main.8b10e547.js (deleted)
-
trunk/includes/smart-search-settings/build/static/js/main.8b10e547.js.LICENSE.txt (deleted)
-
trunk/includes/smart-search-settings/build/static/js/main.8b10e547.js.map (deleted)
-
trunk/includes/smart-search-settings/build/static/js/main.cfff4ada.js (added)
-
trunk/includes/smart-search-settings/build/static/js/main.cfff4ada.js.LICENSE.txt (added)
-
trunk/includes/smart-search-settings/build/static/js/main.cfff4ada.js.map (added)
-
trunk/src/blocks/blocks-callbacks.php (modified) (2 diffs)
-
trunk/src/blocks/config.js (added)
-
trunk/src/blocks/dropdown-facet (added)
-
trunk/src/blocks/dropdown-facet/__mocks__ (added)
-
trunk/src/blocks/dropdown-facet/__mocks__/@wordpress (added)
-
trunk/src/blocks/dropdown-facet/__mocks__/@wordpress/block-editor.js (added)
-
trunk/src/blocks/dropdown-facet/__mocks__/@wordpress/components.js (added)
-
trunk/src/blocks/dropdown-facet/block.json (added)
-
trunk/src/blocks/dropdown-facet/edit.js (added)
-
trunk/src/blocks/dropdown-facet/edit.test.js (added)
-
trunk/src/blocks/dropdown-facet/icon.js (added)
-
trunk/src/blocks/dropdown-facet/index.js (added)
-
trunk/src/blocks/dropdown-facet/render.php (added)
-
trunk/src/blocks/dropdown-facet/save.js (added)
-
trunk/src/blocks/dropdown-facet/style.scss (added)
-
trunk/src/blocks/dropdown-facet/view.js (added)
-
trunk/src/blocks/search-facet/block.json (modified) (1 diff)
-
trunk/src/blocks/search-facet/render.php (modified) (2 diffs)
-
trunk/src/blocks/search-facet/view.js (modified) (1 diff)
-
trunk/src/blocks/stores (added)
-
trunk/src/blocks/stores/facets.store.js (added)
-
trunk/src/blocks/stores/facets.store.test.js (added)
-
trunk/src/blocks/todo-list (deleted)
-
trunk/src/blocks/utils/getFiltersFromURL.js (added)
-
trunk/src/blocks/utils/getFiltersFromURL.test.js (added)
-
trunk/src/support/woocommerce/fields.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
atlas-search/tags/0.2.55/README.txt
r3135416 r3139847 3 3 Tested up to: 6.6 4 4 Requires PHP: 7.4 5 Stable tag: 0.2.5 45 Stable tag: 0.2.55 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 48 48 49 49 == Changelog == 50 = 0.2.55 = 51 * **Fixed:** Multisite session issues. 52 * **Fixed:** WooCommerce loading issues. 53 * **Added:** Scaffolding Facets code. 54 50 55 = 0.2.54 = 51 56 * **Added:** Experimental WooCommerce Support. -
atlas-search/tags/0.2.55/atlas-search.php
r3135416 r3139847 16 16 * Plugin URI: https://developers.wpengine.com/ 17 17 * Description: Searching WordPress data with WP Engine Smart Search. 18 * Version: 0.2.5 418 * Version: 0.2.55 19 19 * Author: WP Engine 20 20 * Author URI: https://wpengine.com/ … … 41 41 * Rename this for your plugin and update it as you release new versions. 42 42 */ 43 define( 'WPE_SMART_SEARCH_VERSION', '0.2.5 4' );43 define( 'WPE_SMART_SEARCH_VERSION', '0.2.55' ); 44 44 45 45 /** -
atlas-search/tags/0.2.55/build/search-facet/block.json
r3135416 r3139847 11 11 "supports": { 12 12 "html": false, 13 "interactivity": true, 13 "interactivity": { 14 "clientNavigation": true 15 }, 14 16 "align": [ 15 17 "wide", -
atlas-search/tags/0.2.55/build/search-facet/render.php
r3135416 r3139847 44 44 ) 45 45 ); 46 47 // Add initial state. This would be empty initially but other blocks can update this by merging the states together. 48 wp_interactivity_state( 49 'wpengine-smart-search-facets__store', 50 array( 51 'filters' => array( 52 'category_name' => 'uncategorized', 53 ), 54 ) 55 ); 56 46 57 ?> 47 58 48 59 <div <?php echo wp_kses_data( $wrapper_attributes ); ?> 49 60 data-wp-interactive='{ "namespace": "wpengine-smart-search-facets__store" }'> 50 <form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">61 <form role="search" method="get" data-wp-on--submit="actions.performSearch"> 51 62 <?php if ( $attributes['hasLabel'] ) : ?> 52 63 <label for="<?php echo esc_attr( $input_id ); ?>" class="wpengine-smart-search-facet__label"> … … 61 72 <div class="wpengine-smart-search-facet__fields"> 62 73 <input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wpengine-smart-search-facet__field" 63 placeholder="<?php echo esc_attr( $attributes['placeholder'] ); ?>" name="s" /> 64 <button data-wp-on--click="actions.logClick" type="submit" class="wpengine-smart-search-facet__button" 74 placeholder="<?php echo esc_attr( $attributes['placeholder'] ); ?>" name="s" 75 data-wp-bind--value="state.searchValue" data-wp-on--input="actions.setSearchValue" /> 76 <button type="submit" class="wpengine-smart-search-facet__button" onclick="" 65 77 aria-label="<?php echo esc_attr__( 'Search', 'wpengine-smart-search' ); ?>"> 66 78 Search -
atlas-search/tags/0.2.55/build/search-facet/view.asset.php
r3135416 r3139847 1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => ' b439cf5fb84b00f0a7f0', 'type' => 'module');1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => 'ddbb6b7c32812b5c62f7', 'type' => 'module'); -
atlas-search/tags/0.2.55/build/search-facet/view.js
r3135416 r3139847 1 import*as e from"@wordpress/interactivity";var r={d:(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};var o,t;(0,(o={store:()=>e.store},t={},r.d(t,o),t).store)("wpengine-smart-search-facets__store",{actions:{logClick:()=>{console.log("Search click!")}}});1 import*as e from"@wordpress/interactivity";var t={d:(e,r)=>{for(var a in r)t.o(r,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const r=(o={getElement:()=>e.getElement,store:()=>e.store},s={},t.d(s,o),s),a="wpengine-smart-search-facets__store",{state:n}=(0,r.store)(a,{state:{get allFilters(){return JSON.stringify(n.filters)}},actions:{updateFilter(e){let{filterName:t,value:r}=e;n.filters[t]=r},setSearchValue(){const{ref:e}=(0,r.getElement)(),{value:t}=e;n.searchValue=t},*performSearch(e){e.preventDefault();const t={...n.filters,s:n.searchValue};yield(async e=>{const t=`${window.location.origin}/`,r=new URL(t);Object.keys(e).forEach((t=>{void 0!==e[t]&&null!==e[t]&&r.searchParams.set(t,e[t])})),window.location.assign(r.toString())})(t)}}});var o,s;const{actions:i}=(0,r.store)(a,{actions:{initSearchFacet:function(){const e=function(){const e={};return new URLSearchParams(window.location.search).forEach(((t,r)=>{e[r]=t})),e}();for(const t in e)if(e[t]){const r=e[t];i.updateFilter({filterName:t,value:r})}}}});i.initSearchFacet(); -
atlas-search/tags/0.2.55/helper/admin-notice.php
r2944647 r3139847 144 144 require_once ABSPATH . 'wp-includes/pluggable.php'; 145 145 } 146 147 if ( is_multisite() ) { 148 ms_cookie_constants(); 149 } 150 146 151 wp_cookie_constants(); 147 152 -
atlas-search/tags/0.2.55/includes/smart-search-settings/build/asset-manifest.json
r3135416 r3139847 2 2 "files": { 3 3 "main.css": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/css/main.751d9a0b.css", 4 "main.js": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main. 8b10e547.js",4 "main.js": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main.cfff4ada.js", 5 5 "static/media/wpengine-logo.svg": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/media/wpengine-logo.40f3a1215fbea4708a6a4bff9624fece.svg", 6 6 "static/media/content-copy.svg": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/media/content-copy.e50f17791e757794684afc63d5d4cb00.svg", … … 18 18 "index.html": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/index.html", 19 19 "main.751d9a0b.css.map": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/css/main.751d9a0b.css.map", 20 "main. 8b10e547.js.map": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main.8b10e547.js.map"20 "main.cfff4ada.js.map": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main.cfff4ada.js.map" 21 21 }, 22 22 "entrypoints": [ 23 23 "static/css/main.751d9a0b.css", 24 "static/js/main. 8b10e547.js"24 "static/js/main.cfff4ada.js" 25 25 ] 26 26 } -
atlas-search/tags/0.2.55/includes/smart-search-settings/build/index.html
r3135416 r3139847 1 <head><script defer="defer" src="/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main. 8b10e547.js"></script><link href="/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/css/main.751d9a0b.css" rel="stylesheet"></head>1 <head><script defer="defer" src="/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main.cfff4ada.js"></script><link href="/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/css/main.751d9a0b.css" rel="stylesheet"></head> -
atlas-search/tags/0.2.55/src/blocks/blocks-callbacks.php
r3135416 r3139847 7 7 */ 8 8 class WPE_Atlas_Search_Facets_Callbacks { 9 9 10 private $loader; 10 11 public const SMART_SEARCH_BLOCKS_SUPPORT_ENABLED_OPTION = 'smart_search_blocks_support_enabled'; … … 23 24 return; 24 25 } 26 25 27 $blocks = array( 26 28 'search-facet', 29 'dropdown-facet', 27 30 ); 31 28 32 foreach ( $blocks as $block ) { 29 33 // Go up two levels to the plugin root. -
atlas-search/tags/0.2.55/src/blocks/search-facet/block.json
r3135416 r3139847 11 11 "supports": { 12 12 "html": false, 13 "interactivity": true,13 "interactivity": { "clientNavigation": true }, 14 14 "align": ["wide", "full"], 15 15 "anchor": true, -
atlas-search/tags/0.2.55/src/blocks/search-facet/render.php
r3135416 r3139847 44 44 ) 45 45 ); 46 47 // Add initial state. This would be empty initially but other blocks can update this by merging the states together. 48 wp_interactivity_state( 49 'wpengine-smart-search-facets__store', 50 array( 51 'filters' => array( 52 'category_name' => 'uncategorized', 53 ), 54 ) 55 ); 56 46 57 ?> 47 58 48 59 <div <?php echo wp_kses_data( $wrapper_attributes ); ?> 49 60 data-wp-interactive='{ "namespace": "wpengine-smart-search-facets__store" }'> 50 <form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">61 <form role="search" method="get" data-wp-on--submit="actions.performSearch"> 51 62 <?php if ( $attributes['hasLabel'] ) : ?> 52 63 <label for="<?php echo esc_attr( $input_id ); ?>" class="wpengine-smart-search-facet__label"> … … 61 72 <div class="wpengine-smart-search-facet__fields"> 62 73 <input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wpengine-smart-search-facet__field" 63 placeholder="<?php echo esc_attr( $attributes['placeholder'] ); ?>" name="s" /> 64 <button data-wp-on--click="actions.logClick" type="submit" class="wpengine-smart-search-facet__button" 74 placeholder="<?php echo esc_attr( $attributes['placeholder'] ); ?>" name="s" 75 data-wp-bind--value="state.searchValue" data-wp-on--input="actions.setSearchValue" /> 76 <button type="submit" class="wpengine-smart-search-facet__button" onclick="" 65 77 aria-label="<?php echo esc_attr__( 'Search', 'wpengine-smart-search' ); ?>"> 66 78 Search -
atlas-search/tags/0.2.55/src/blocks/search-facet/view.js
r3135416 r3139847 21 21 */ 22 22 import { store } from '@wordpress/interactivity'; 23 import '../stores/facets.store'; 24 import { config } from '../config'; 25 import { getFiltersFromURL } from '../utils/getFiltersFromURL'; 23 26 24 store('wpengine-smart-search-facets__store', {27 const { actions } = store(config.facetsStoreName, { 25 28 actions: { 26 logClick: () => { 27 console.log('Search click!'); 29 initSearchFacet: function () { 30 const filters = getFiltersFromURL(); 31 32 for (const key in filters) { 33 if (filters[key]) { 34 const value = filters[key]; 35 actions.updateFilter({ filterName: key, value }); 36 } 37 } 28 38 }, 29 39 }, 30 40 }); 41 actions.initSearchFacet(); -
atlas-search/tags/0.2.55/src/support/woocommerce/fields.php
r3135416 r3139847 10 10 const SMART_SEARCH_WOOCOMMERCE_SUPPORT_ENABLED_OPTION = 'smart_search_woocommerce_support_enabled'; 11 11 12 13 if ( ! class_exists( 'WooCommerce' ) ) {14 return;15 }16 12 17 13 add_action( -
atlas-search/trunk/README.txt
r3135416 r3139847 3 3 Tested up to: 6.6 4 4 Requires PHP: 7.4 5 Stable tag: 0.2.5 45 Stable tag: 0.2.55 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 48 48 49 49 == Changelog == 50 = 0.2.55 = 51 * **Fixed:** Multisite session issues. 52 * **Fixed:** WooCommerce loading issues. 53 * **Added:** Scaffolding Facets code. 54 50 55 = 0.2.54 = 51 56 * **Added:** Experimental WooCommerce Support. -
atlas-search/trunk/atlas-search.php
r3135416 r3139847 16 16 * Plugin URI: https://developers.wpengine.com/ 17 17 * Description: Searching WordPress data with WP Engine Smart Search. 18 * Version: 0.2.5 418 * Version: 0.2.55 19 19 * Author: WP Engine 20 20 * Author URI: https://wpengine.com/ … … 41 41 * Rename this for your plugin and update it as you release new versions. 42 42 */ 43 define( 'WPE_SMART_SEARCH_VERSION', '0.2.5 4' );43 define( 'WPE_SMART_SEARCH_VERSION', '0.2.55' ); 44 44 45 45 /** -
atlas-search/trunk/build/search-facet/block.json
r3135416 r3139847 11 11 "supports": { 12 12 "html": false, 13 "interactivity": true, 13 "interactivity": { 14 "clientNavigation": true 15 }, 14 16 "align": [ 15 17 "wide", -
atlas-search/trunk/build/search-facet/render.php
r3135416 r3139847 44 44 ) 45 45 ); 46 47 // Add initial state. This would be empty initially but other blocks can update this by merging the states together. 48 wp_interactivity_state( 49 'wpengine-smart-search-facets__store', 50 array( 51 'filters' => array( 52 'category_name' => 'uncategorized', 53 ), 54 ) 55 ); 56 46 57 ?> 47 58 48 59 <div <?php echo wp_kses_data( $wrapper_attributes ); ?> 49 60 data-wp-interactive='{ "namespace": "wpengine-smart-search-facets__store" }'> 50 <form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">61 <form role="search" method="get" data-wp-on--submit="actions.performSearch"> 51 62 <?php if ( $attributes['hasLabel'] ) : ?> 52 63 <label for="<?php echo esc_attr( $input_id ); ?>" class="wpengine-smart-search-facet__label"> … … 61 72 <div class="wpengine-smart-search-facet__fields"> 62 73 <input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wpengine-smart-search-facet__field" 63 placeholder="<?php echo esc_attr( $attributes['placeholder'] ); ?>" name="s" /> 64 <button data-wp-on--click="actions.logClick" type="submit" class="wpengine-smart-search-facet__button" 74 placeholder="<?php echo esc_attr( $attributes['placeholder'] ); ?>" name="s" 75 data-wp-bind--value="state.searchValue" data-wp-on--input="actions.setSearchValue" /> 76 <button type="submit" class="wpengine-smart-search-facet__button" onclick="" 65 77 aria-label="<?php echo esc_attr__( 'Search', 'wpengine-smart-search' ); ?>"> 66 78 Search -
atlas-search/trunk/build/search-facet/view.asset.php
r3135416 r3139847 1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => ' b439cf5fb84b00f0a7f0', 'type' => 'module');1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => 'ddbb6b7c32812b5c62f7', 'type' => 'module'); -
atlas-search/trunk/build/search-facet/view.js
r3135416 r3139847 1 import*as e from"@wordpress/interactivity";var r={d:(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};var o,t;(0,(o={store:()=>e.store},t={},r.d(t,o),t).store)("wpengine-smart-search-facets__store",{actions:{logClick:()=>{console.log("Search click!")}}});1 import*as e from"@wordpress/interactivity";var t={d:(e,r)=>{for(var a in r)t.o(r,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const r=(o={getElement:()=>e.getElement,store:()=>e.store},s={},t.d(s,o),s),a="wpengine-smart-search-facets__store",{state:n}=(0,r.store)(a,{state:{get allFilters(){return JSON.stringify(n.filters)}},actions:{updateFilter(e){let{filterName:t,value:r}=e;n.filters[t]=r},setSearchValue(){const{ref:e}=(0,r.getElement)(),{value:t}=e;n.searchValue=t},*performSearch(e){e.preventDefault();const t={...n.filters,s:n.searchValue};yield(async e=>{const t=`${window.location.origin}/`,r=new URL(t);Object.keys(e).forEach((t=>{void 0!==e[t]&&null!==e[t]&&r.searchParams.set(t,e[t])})),window.location.assign(r.toString())})(t)}}});var o,s;const{actions:i}=(0,r.store)(a,{actions:{initSearchFacet:function(){const e=function(){const e={};return new URLSearchParams(window.location.search).forEach(((t,r)=>{e[r]=t})),e}();for(const t in e)if(e[t]){const r=e[t];i.updateFilter({filterName:t,value:r})}}}});i.initSearchFacet(); -
atlas-search/trunk/helper/admin-notice.php
r2944647 r3139847 144 144 require_once ABSPATH . 'wp-includes/pluggable.php'; 145 145 } 146 147 if ( is_multisite() ) { 148 ms_cookie_constants(); 149 } 150 146 151 wp_cookie_constants(); 147 152 -
atlas-search/trunk/includes/smart-search-settings/build/asset-manifest.json
r3135416 r3139847 2 2 "files": { 3 3 "main.css": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/css/main.751d9a0b.css", 4 "main.js": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main. 8b10e547.js",4 "main.js": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main.cfff4ada.js", 5 5 "static/media/wpengine-logo.svg": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/media/wpengine-logo.40f3a1215fbea4708a6a4bff9624fece.svg", 6 6 "static/media/content-copy.svg": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/media/content-copy.e50f17791e757794684afc63d5d4cb00.svg", … … 18 18 "index.html": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/index.html", 19 19 "main.751d9a0b.css.map": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/css/main.751d9a0b.css.map", 20 "main. 8b10e547.js.map": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main.8b10e547.js.map"20 "main.cfff4ada.js.map": "/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main.cfff4ada.js.map" 21 21 }, 22 22 "entrypoints": [ 23 23 "static/css/main.751d9a0b.css", 24 "static/js/main. 8b10e547.js"24 "static/js/main.cfff4ada.js" 25 25 ] 26 26 } -
atlas-search/trunk/includes/smart-search-settings/build/index.html
r3135416 r3139847 1 <head><script defer="defer" src="/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main. 8b10e547.js"></script><link href="/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/css/main.751d9a0b.css" rel="stylesheet"></head>1 <head><script defer="defer" src="/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/js/main.cfff4ada.js"></script><link href="/wp-content/plugins/atlas-search/includes/smart-search-settings/build/static/css/main.751d9a0b.css" rel="stylesheet"></head> -
atlas-search/trunk/src/blocks/blocks-callbacks.php
r3135416 r3139847 7 7 */ 8 8 class WPE_Atlas_Search_Facets_Callbacks { 9 9 10 private $loader; 10 11 public const SMART_SEARCH_BLOCKS_SUPPORT_ENABLED_OPTION = 'smart_search_blocks_support_enabled'; … … 23 24 return; 24 25 } 26 25 27 $blocks = array( 26 28 'search-facet', 29 'dropdown-facet', 27 30 ); 31 28 32 foreach ( $blocks as $block ) { 29 33 // Go up two levels to the plugin root. -
atlas-search/trunk/src/blocks/search-facet/block.json
r3135416 r3139847 11 11 "supports": { 12 12 "html": false, 13 "interactivity": true,13 "interactivity": { "clientNavigation": true }, 14 14 "align": ["wide", "full"], 15 15 "anchor": true, -
atlas-search/trunk/src/blocks/search-facet/render.php
r3135416 r3139847 44 44 ) 45 45 ); 46 47 // Add initial state. This would be empty initially but other blocks can update this by merging the states together. 48 wp_interactivity_state( 49 'wpengine-smart-search-facets__store', 50 array( 51 'filters' => array( 52 'category_name' => 'uncategorized', 53 ), 54 ) 55 ); 56 46 57 ?> 47 58 48 59 <div <?php echo wp_kses_data( $wrapper_attributes ); ?> 49 60 data-wp-interactive='{ "namespace": "wpengine-smart-search-facets__store" }'> 50 <form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">61 <form role="search" method="get" data-wp-on--submit="actions.performSearch"> 51 62 <?php if ( $attributes['hasLabel'] ) : ?> 52 63 <label for="<?php echo esc_attr( $input_id ); ?>" class="wpengine-smart-search-facet__label"> … … 61 72 <div class="wpengine-smart-search-facet__fields"> 62 73 <input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wpengine-smart-search-facet__field" 63 placeholder="<?php echo esc_attr( $attributes['placeholder'] ); ?>" name="s" /> 64 <button data-wp-on--click="actions.logClick" type="submit" class="wpengine-smart-search-facet__button" 74 placeholder="<?php echo esc_attr( $attributes['placeholder'] ); ?>" name="s" 75 data-wp-bind--value="state.searchValue" data-wp-on--input="actions.setSearchValue" /> 76 <button type="submit" class="wpengine-smart-search-facet__button" onclick="" 65 77 aria-label="<?php echo esc_attr__( 'Search', 'wpengine-smart-search' ); ?>"> 66 78 Search -
atlas-search/trunk/src/blocks/search-facet/view.js
r3135416 r3139847 21 21 */ 22 22 import { store } from '@wordpress/interactivity'; 23 import '../stores/facets.store'; 24 import { config } from '../config'; 25 import { getFiltersFromURL } from '../utils/getFiltersFromURL'; 23 26 24 store('wpengine-smart-search-facets__store', {27 const { actions } = store(config.facetsStoreName, { 25 28 actions: { 26 logClick: () => { 27 console.log('Search click!'); 29 initSearchFacet: function () { 30 const filters = getFiltersFromURL(); 31 32 for (const key in filters) { 33 if (filters[key]) { 34 const value = filters[key]; 35 actions.updateFilter({ filterName: key, value }); 36 } 37 } 28 38 }, 29 39 }, 30 40 }); 41 actions.initSearchFacet(); -
atlas-search/trunk/src/support/woocommerce/fields.php
r3135416 r3139847 10 10 const SMART_SEARCH_WOOCOMMERCE_SUPPORT_ENABLED_OPTION = 'smart_search_woocommerce_support_enabled'; 11 11 12 13 if ( ! class_exists( 'WooCommerce' ) ) {14 return;15 }16 12 17 13 add_action(
Note: See TracChangeset
for help on using the changeset viewer.