phoenix_live_view 1.2.0-rc.3 → 1.2.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.
@@ -4992,6 +4992,9 @@ var View = class _View {
4992
4992
  });
4993
4993
  }
4994
4994
  onJoinError(resp) {
4995
+ if (resp.events) {
4996
+ this.liveSocket.dispatchEvents(resp.events);
4997
+ }
4995
4998
  if (resp.reason === "reload") {
4996
4999
  this.log("error", () => [
4997
5000
  `failed mount with ${resp.status}. Falling back to page reload`,
@@ -6057,7 +6060,7 @@ var LiveSocket = class {
6057
6060
  * Returns the version of the LiveView client.
6058
6061
  */
6059
6062
  version() {
6060
- return "1.2.0-rc.3";
6063
+ return "1.2.0";
6061
6064
  }
6062
6065
  /**
6063
6066
  * Returns true if profiling is enabled. See {@link enableProfiling} and {@link disableProfiling}.
@@ -6081,7 +6084,7 @@ var LiveSocket = class {
6081
6084
  * Enables debugging.
6082
6085
  *
6083
6086
  * When debugging is enabled, the LiveView client will log debug information to the console.
6084
- * See [Debugging client events](https://hexdocs.pm/phoenix_live_view/js-interop.html#debugging-client-events) for more information.
6087
+ * See [Debugging client events](https://phoenix-live-view.hexdocs.pm/js-interop.html#debugging-client-events) for more information.
6085
6088
  */
6086
6089
  enableDebug() {
6087
6090
  this.sessionStorage.setItem(PHX_LV_DEBUG, "true");
@@ -6110,7 +6113,7 @@ var LiveSocket = class {
6110
6113
  * Enables latency simulation.
6111
6114
  *
6112
6115
  * When latency simulation is enabled, the LiveView client will add a delay to requests and responses from the server.
6113
- * See [Simulating Latency](https://hexdocs.pm/phoenix_live_view/js-interop.html#simulating-latency) for more information.
6116
+ * See [Simulating Latency](https://phoenix-live-view.hexdocs.pm/js-interop.html#simulating-latency) for more information.
6114
6117
  */
6115
6118
  enableLatencySim(upperBoundMs) {
6116
6119
  this.enableDebug();
@@ -6185,7 +6188,7 @@ var LiveSocket = class {
6185
6188
  /**
6186
6189
  * Executes an encoded JS command, targeting the given element.
6187
6190
  *
6188
- * See [`Phoenix.LiveView.JS`](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.JS.html) for more information.
6191
+ * See [`Phoenix.LiveView.JS`](https://phoenix-live-view.hexdocs.pm/Phoenix.LiveView.JS.html) for more information.
6189
6192
  */
6190
6193
  execJS(el, encodedJS, eventType = null) {
6191
6194
  const e = new CustomEvent("phx:exec", { detail: { sourceElement: el } });
@@ -6195,7 +6198,7 @@ var LiveSocket = class {
6195
6198
  * Returns an object with methods to manipulate the DOM and execute JavaScript.
6196
6199
  * The applied changes integrate with server DOM patching.
6197
6200
  *
6198
- * See [JavaScript interoperability](https://hexdocs.pm/phoenix_live_view/js-interop.html) for more information.
6201
+ * See [JavaScript interoperability](https://phoenix-live-view.hexdocs.pm/js-interop.html) for more information.
6199
6202
  */
6200
6203
  js() {
6201
6204
  return js_commands_default(this, "js");