smoothly 1.114.0 → 1.115.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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-app_98.cjs.entry.js +9 -6
- package/dist/cjs/smoothly-app_98.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/app/index.js +2 -2
- package/dist/collection/components/app/index.js.map +1 -1
- package/dist/collection/components/app/room/index.js +12 -8
- package/dist/collection/components/app/room/index.js.map +1 -1
- package/dist/components/{p-qxJgmVrq.js → p-CCExK0R5.js} +2 -2
- package/dist/components/p-CCExK0R5.js.map +1 -0
- package/dist/components/{p-CClpvMw2.js → p-DHj4bfJ8.js} +2 -2
- package/dist/components/{p-CClpvMw2.js.map → p-DHj4bfJ8.js.map} +1 -1
- package/dist/components/smoothly-app-demo.js +1 -1
- package/dist/components/smoothly-app-room.js +1 -1
- package/dist/components/smoothly-app.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-app_98.entry.js +9 -6
- package/dist/esm/smoothly-app_98.entry.js.map +1 -1
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/p-b7ac3c88.entry.js +2 -0
- package/dist/smoothly/p-b7ac3c88.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/app/index.d.ts +1 -0
- package/dist/types/components/app/room/index.d.ts +3 -1
- package/dist/types/components.d.ts +5 -5
- package/package.json +1 -1
- package/dist/components/p-qxJgmVrq.js.map +0 -1
- package/dist/smoothly/p-e7c5888e.entry.js +0 -2
- package/dist/smoothly/p-e7c5888e.entry.js.map +0 -1
|
@@ -77,7 +77,7 @@ const SmoothlyApp = class {
|
|
|
77
77
|
this.menuOpen = false;
|
|
78
78
|
}
|
|
79
79
|
if (!event.detail.history) {
|
|
80
|
-
const path =
|
|
80
|
+
const path = event.detail.path;
|
|
81
81
|
const location = new URL(window.location.pathname == path ? window.location.href : window.location.origin);
|
|
82
82
|
location.pathname = path;
|
|
83
83
|
location.search = event.detail.query ? `?${event.detail.query}` : "";
|
|
@@ -96,7 +96,7 @@ const SmoothlyApp = class {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
99
|
+
return (h(Host, { key: '746fa3adf359072b95f0b00ecea914189bdfead2', class: { "smoothly-mobile-mode": this.mobileMode } }, h("smoothly-notifier", { key: 'ddf542afef536ab6141394b658e82686bd414e69' }, h("header", { key: '511a856fb813b5476a705c993734380ad94194cf', color: this.color }, h("h1", { key: '9c3e79f9fcd3ef587183e3b83d646753a0f8dd7c' }, h("a", { key: '9be4ba4d2ffaeaca1cb00752b5fcba0b1b64c261', href: "" }, this.label)), h("slot", { key: '92573b6cffad97e2afbfb6b6a7d5d1fb8f0ec59e', name: "header" }), h("nav", { key: '4a7c5cbbb39a82b845775d6dd0015a47ab72757d', ref: e => (this.navElement = e) }, h("ul", { key: 'a8035a4e9143d4cd49ac4edfbb837785a8a58cd8' }, h("div", { key: '2c4de281ad7f522c2c09acfcad890eadabc30c40', class: "nav-start-container" }, h("slot", { key: '05e3f3a40f45d9505a463a29c90bbfcc2a3ff330', name: "nav-start" })), h("slot", { key: '695fd5bef476d1c00e5654803c03e94c8218943a' }), h("div", { key: '382c0271207f040374c3f69aa2946d0938bbb1c1', class: "nav-end-container" }, h("slot", { key: '02fe44b3c557b7a930f24fdc465d8824eccbbbef', name: "nav-end" })))), h("smoothly-burger", { key: 'fad0b5d8e2841ed284af04d9b0554e91ddf98575', ref: e => (this.burgerElement = e), open: this.menuOpen, onSmoothlyNavStatus: e => (e.stopPropagation(), (this.menuOpen = e.detail)) })), h("main", { key: '5c6464b6db6e0eba2acbaf5efd549cebe08c1a95', ref: e => (this.mainElement = e) }))));
|
|
100
100
|
}
|
|
101
101
|
static get watchers() { return {
|
|
102
102
|
"selected": [{
|
|
@@ -1550,9 +1550,11 @@ const SmoothlyAppRoom = class {
|
|
|
1550
1550
|
this.selected && this.smoothlyUrlChange.emit(window.location.href);
|
|
1551
1551
|
}
|
|
1552
1552
|
componentWillLoad() {
|
|
1553
|
-
|
|
1553
|
+
const stringOrPatternPaths = Array.isArray(this.path) ? this.path : [this.path];
|
|
1554
|
+
this.paths = stringOrPatternPaths.map(path => (typeof path == "string" ? new URLPattern({ pathname: path }) : path));
|
|
1555
|
+
this.selected = this.paths.some(pattern => pattern.test(window.location.href));
|
|
1554
1556
|
this.smoothlyRoomLoad.emit({ selected: this.selected });
|
|
1555
|
-
this.selected && window.history.replaceState({ smoothlyPath: this.
|
|
1557
|
+
this.selected && window.history.replaceState({ smoothlyPath: this.paths[0].pathname }, "", window.location.href);
|
|
1556
1558
|
}
|
|
1557
1559
|
async setMobileMode(mobile) {
|
|
1558
1560
|
this.mobileMode = mobile;
|
|
@@ -1563,7 +1565,7 @@ const SmoothlyAppRoom = class {
|
|
|
1563
1565
|
async setSelected(selected, options) {
|
|
1564
1566
|
this.selected = selected;
|
|
1565
1567
|
if (selected) {
|
|
1566
|
-
this.smoothlyRoomSelect.emit({ history: !!(options === null || options === void 0 ? void 0 : options.history), query: this.query });
|
|
1568
|
+
this.smoothlyRoomSelect.emit({ history: !!(options === null || options === void 0 ? void 0 : options.history), path: this.paths[0].pathname, query: this.query });
|
|
1567
1569
|
}
|
|
1568
1570
|
}
|
|
1569
1571
|
async setQuery(event) {
|
|
@@ -1580,7 +1582,8 @@ const SmoothlyAppRoom = class {
|
|
|
1580
1582
|
}
|
|
1581
1583
|
}
|
|
1582
1584
|
render() {
|
|
1583
|
-
|
|
1585
|
+
var _a;
|
|
1586
|
+
return (h(Host, { key: '416a7250b9c2f2a42060522a0c305d3e10c530e2', class: { "smoothly-mobile-mode": this.mobileMode } }, h("li", { key: '13946e4e07e65dd755e6752c7c24b0e9f70a6519' }, h("a", { key: 'be5cc463ec7a2adeb513da59cb925de5f470242f', href: (_a = this.paths[0]) === null || _a === void 0 ? void 0 : _a.pathname, onClick: e => this.clickHandler(e) }, this.icon && h("smoothly-icon", { key: '9b76338e6f64f0331f00d85cbc164da9951051e6', name: this.icon }), this.label && h("span", { key: '1e12b7e8e3b35920f3f5c162e41208e4a87a5033', class: "label" }, this.label))), h("div", { key: '1e3e09244c7e623768dfee215c9a63a801fdf663', ref: e => (this.contentElement = e) }, this.content && h("smoothly-lazy", { key: '1f5938ff9fd197cf96761e5ee6868b45213c18a7', content: this.content }), h("slot", { key: 'f68188a185d5b6792b6dd7b3c971e69145fcb554' }))));
|
|
1584
1587
|
}
|
|
1585
1588
|
};
|
|
1586
1589
|
SmoothlyAppRoom.style = styleCss$1j();
|