* Fix a bug where updating the social menu links would cause the main navigation to get its toggle-expanded buttons duplicated.
* Persist any existing submenu expanded states on the updated menu.
* Improve naming of `customize-preview-menu-refreshed` event param from `wpNavArgs` to `wpNavMenuArgs` (old name is retained and marked as deprecated).
Fixes#33177.
Built from https://develop.svn.wordpress.org/trunk@33491
git-svn-id: http://core.svn.wordpress.org/trunk@33458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Follow the same pattern of namespace instantiation that `WidgetCustomizerPreview` uses
* Remove use of `self` for global delegation
* Use `api` for `wp.customize` and import only top-level globals
* Bind `this` where appropriate and disambiguate scope
See #32911.
Built from https://develop.svn.wordpress.org/trunk@33347
git-svn-id: http://core.svn.wordpress.org/trunk@33319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* In `init`, settings should be fresh and set to default values before extending
* When looping via `_.each`, pass `this` as 3rd arg to bind context
* Settings should be encapsulated in the module, instead of being exposed as static class props
* `currentRefreshMenuInstanceDebouncedCalls` should be encapsulated and renamed, instead of being the longest symbol in the entire codebase
See #32911.
Built from https://develop.svn.wordpress.org/trunk@33345
git-svn-id: http://core.svn.wordpress.org/trunk@33317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Addresses regression introduced in [33138], where deleted menu items would not be removed from the preview, and changes to a location's assigned menu would likewise not preview. Also makes the binding of the setting change events more robust.
Fixes#33010.
Built from https://develop.svn.wordpress.org/trunk@33328
git-svn-id: http://core.svn.wordpress.org/trunk@33300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Also includes these related changes:
* Export `oldContainer` and `newContainer` among the `customize-preview-menu-refreshed` event params for themes to be able to more easily re-initialize the DOM elements.
* Improve performance for partial refresh by only sending settings related to the menu being previewed.
* Fix previewing of menu assigned to Custom Menu by exporting a menu `term_id` as opposed to an object, as the former is more stable for comparing in in args hashes.
* Do full refresh of preview when nav menu unassigned so that the layout can be updated.
* Harden conditions for when partial refresh is eligible for a `wp_nav_menu()` instance.
Fixes#32841.
Built from https://develop.svn.wordpress.org/trunk@33138
git-svn-id: http://core.svn.wordpress.org/trunk@33109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Defer the preview starting to listen to setting changes until after the Customizer has synced settings into the preview. This ensures that any differences between the JS and PHP representations of the settings won't cause an infinite refresh.
See #32911.
Fixes#32894.
Built from https://develop.svn.wordpress.org/trunk@33134
git-svn-id: http://core.svn.wordpress.org/trunk@33105 1a063a9b-81f0-0310-95a4-ce76da25c4cd