@xoong/ui 0.0.41 → 0.0.42

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/router.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoong/ui",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "description": "xoong admin set: xoong.css tokens, <xo-table>, <xo-form>, <xo-dialog>, toast, confirm and a declarative History-API router. Depends on @xoong/core, @xoong/data and @xoong/forms.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -20,9 +20,9 @@
20
20
  "sideEffects": true,
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@xoong/core": "0.0.41",
24
- "@xoong/data": "0.0.41",
25
- "@xoong/forms": "0.0.41"
23
+ "@xoong/core": "0.0.42",
24
+ "@xoong/data": "0.0.42",
25
+ "@xoong/forms": "0.0.42"
26
26
  },
27
27
  "files": [
28
28
  "src"
@@ -42,7 +42,7 @@
42
42
  "bugs": {
43
43
  "url": "https://github.com/fpt-duongtx/xoong/issues"
44
44
  },
45
- "homepage": "https://github.com/fpt-duongtx/xoong#readme",
45
+ "homepage": "https://fpt-duongtx.github.io/xoong/",
46
46
  "types": "./src/index.d.ts",
47
47
  "publishConfig": {
48
48
  "access": "public"
package/src/router.js CHANGED
@@ -143,7 +143,9 @@ class XoRouter extends XoElement {
143
143
  const own = dirty.map((f) => f.getAttribute('xo-guard')).find((m) => m && m !== 'off');
144
144
  return ask(own ?? text('xoong.guard.leave', 'You have unsaved changes. Leave this page?'), { kind: 'leave', forms: dirty });
145
145
  });
146
- // url-params of a view: write the query string through the router, without rendering the route again
146
+ // url-params of a view: write the query string through the router, without rendering the route again.
147
+ // Nothing to subscribe to: Back/Forward is the router's (vetoes, guards): it sees the new query, renders the route again and the
148
+ // new view reads the URL. A view listening to popstate itself would change before a vetoed Back is undone.
147
149
  setUrlSync({ read: () => new URLSearchParams(window.location.search), write: (params, mode) => this.#writeQuery(params, mode), subscribe: () => () => {} });
148
150
  this.#go(this.#read(), 'replace', 'start').catch((e) => this.#report(e));
149
151
  }