From 92036f75ef7c1dc1e7a8e24120b7e19cc5fa33ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Goran=20Jovanovi=C4=87?= Date: Thu, 5 Oct 2023 00:59:47 +0200 Subject: [PATCH] Fix showcase app router problem --- packages/angular/package.json | 4 +- .../angular/projects/anywhere-ui/package.json | 4 +- packages/core/package-lock.json | 176 +++++++++--------- packages/core/package.json | 16 +- packages/core/src/app/App.js | 39 +++- .../app-showcase/doc/app-doc/app-doc.tsx | 2 +- .../doc/app-docapitable/app-docapitable.tsx | 14 +- .../app-docsection-nav/app-docsection-nav.tsx | 29 ++- .../app-docsectiontext/app-docsectiontext.tsx | 10 +- packages/core/src/doc/docs.json | 6 +- packages/core/src/index.html | 32 ++-- packages/react/package.json | 4 +- packages/vue/package.json | 4 +- 13 files changed, 203 insertions(+), 137 deletions(-) diff --git a/packages/angular/package.json b/packages/angular/package.json index fe705b1..ce4c5f9 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -1,6 +1,6 @@ { "name": "@anywhere-ui/angular", - "version": "0.4.0+17", + "version": "0.4.0+18", "license": "MIT", "keywords": [ "anywhere-ui", @@ -66,5 +66,5 @@ "tslint": "~6.1.3", "typescript": "4.9.5" }, - "buildnum": "17" + "buildnum": "18" } \ No newline at end of file diff --git a/packages/angular/projects/anywhere-ui/package.json b/packages/angular/projects/anywhere-ui/package.json index 7d64944..6a0a456 100644 --- a/packages/angular/projects/anywhere-ui/package.json +++ b/packages/angular/projects/anywhere-ui/package.json @@ -1,6 +1,6 @@ { "name": "@anywhere-ui/angular", - "version": "0.4.0+17", + "version": "0.4.0+18", "license": "MIT", "keywords": [ "anywhere-ui", @@ -33,5 +33,5 @@ "@anywhere-ui/core": "^0.3.0", "@anywhere-ui/flex": "^1.0.2" }, - "buildnum": "17" + "buildnum": "18" } \ No newline at end of file diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index 2943192..c19e149 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -1,30 +1,30 @@ { "name": "@anywhere-ui/core", - "version": "0.4.0+16", + "version": "0.4.0+17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@anywhere-ui/core", - "version": "0.4.0+16", + "version": "0.4.0+17", "license": "MIT", "dependencies": { "@anywhere-ui/flex": "^1.0.2", "@docsearch/js": "^3.5.2", - "@types/node": "^20.6.2", + "@types/node": "^20.8.2", "build": "^0.1.4", "run": "^1.4.0" }, "devDependencies": { "@iconify/iconify": "^3.1.1", "@stencil/angular-output-target": "0.8.2", - "@stencil/core": "^4.3.0", + "@stencil/core": "^4.4.0", "@stencil/react-output-target": "^0.5.3", - "@stencil/sass": "^3.0.5", + "@stencil/sass": "^3.0.6", "@stencil/vue-output-target": "^0.8.6", "@types/clusterize.js": "^0.18.1", "@types/jest": "^29.5.5", - "@types/lodash": "^4.14.198", + "@types/lodash": "^4.14.199", "@types/puppeteer": "^5.4.7", "clusterize.js": "^1.0.0", "concurrently": "^8.2.1", @@ -35,11 +35,11 @@ "jest-cli": "29.7.0", "lodash": "^4.17.21", "prismjs": "^1.29.0", - "puppeteer": "^21.3.0", + "puppeteer": "^21.3.6", "rebase": "^0.3.0", "replace": "^1.2.2", "rollup-plugin-node-polyfills": "^0.2.1", - "sass": "^1.67.0" + "sass": "^1.68.0" } }, "node_modules/@algolia/autocomplete-core": { @@ -1343,9 +1343,9 @@ } }, "node_modules/@stencil/core": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.3.0.tgz", - "integrity": "sha512-WYjftKg5fuqO7mf3nTl1aCRurkeMmfEF38WcBG4VLF6UPQ+MA76/koedGR2LGhATGByx+pbxR4iRxAr2Bspc9A==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.4.0.tgz", + "integrity": "sha512-YlLyCqGBsMEuZb3XTO/STT0TX9eSwjoVhCJgtjVfQOF+ebIMVlojTh40CmDveWiWbth687cbr6S2heeussV8Sg==", "dev": true, "bin": { "stencil": "bin/stencil" @@ -1365,9 +1365,9 @@ } }, "node_modules/@stencil/sass": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.5.tgz", - "integrity": "sha512-9nyllMXOEvHywo6fP2iwXgnq32A+OOUE36Aq7iUjzwT3wdr04qsvupO1JNIyRvmvCDF15hOKXztrZH1/wDu2Zg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.6.tgz", + "integrity": "sha512-d+k8qCvDgzI/vIV7M5QavIS6b75X4yn+YQH80KA/L0oL/hKD8KeF3wMOd7P1nDhGLIGRNw5tBDbe0GeIsGVU7A==", "dev": true, "engines": { "node": ">=12.0.0", @@ -1483,15 +1483,15 @@ } }, "node_modules/@types/lodash": { - "version": "4.14.198", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.198.tgz", - "integrity": "sha512-trNJ/vtMZYMLhfN45uLq4ShQSw0/S7xCTLLVM+WM1rmFpba/VS42jVUgaO3w/NOLiWR/09lnYk0yMaA/atdIsg==", + "version": "4.14.199", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz", + "integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==", "dev": true }, "node_modules/@types/node": { - "version": "20.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", - "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==" + "version": "20.8.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", + "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==" }, "node_modules/@types/puppeteer": { "version": "5.4.7", @@ -1529,9 +1529,9 @@ "dev": true }, "node_modules/@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.1.tgz", + "integrity": "sha512-CHzgNU3qYBnp/O4S3yv2tXPlvMTq0YWSTVg2/JYLqWZGHwwgJGAwd00poay/11asPq8wLFwHzubyInqHIFmmiw==", "dev": true, "optional": true, "dependencies": { @@ -2065,9 +2065,9 @@ } }, "node_modules/chromium-bidi": { - "version": "0.4.27", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.27.tgz", - "integrity": "sha512-8Irq0FbKYN8Xmj8M62kta6wk5MyDKeYIFtNavxQ2M3xf2v5MCC4ntf+FxitQu1iHaQvGU6t5O+Nrep0RNNS0EQ==", + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.28.tgz", + "integrity": "sha512-2HZ74QlAApJrEwcGlU/sUu0s4VS+FI3CJ09Toc9aE9VemMyhHZXeaROQgJKNRaYMUTUx6qIv1cLBs3F+vfgjSw==", "dev": true, "dependencies": { "mitt": "3.0.1", @@ -2405,9 +2405,9 @@ } }, "node_modules/data-uri-to-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz", - "integrity": "sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", + "integrity": "sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==", "dev": true, "engines": { "node": ">= 14" @@ -2906,13 +2906,13 @@ } }, "node_modules/get-uri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.1.tgz", - "integrity": "sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", + "integrity": "sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==", "dev": true, "dependencies": { "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^5.0.1", + "data-uri-to-buffer": "^6.0.0", "debug": "^4.3.4", "fs-extra": "^8.1.0" }, @@ -5016,32 +5016,32 @@ } }, "node_modules/puppeteer": { - "version": "21.3.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.3.0.tgz", - "integrity": "sha512-+PLO2dLos4Kh+97yUrWD8t+hpN9Eq84vH3AQi7Qtc6VV1ucRSimhPr94etgJS6rZDorbviWlm+3i6XvFSJNhsg==", + "version": "21.3.6", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.3.6.tgz", + "integrity": "sha512-ulK9+KLvdaVsG0EKbKyw/DCXCz88rsnrvIJg9tY8AmkGR01AxI4ZJTH9BJl1OE7cLfh2vxjBvY+xfvJod6rfgw==", "dev": true, "hasInstallScript": true, "dependencies": { "@puppeteer/browsers": "1.7.1", "cosmiconfig": "8.3.6", - "puppeteer-core": "21.3.0" + "puppeteer-core": "21.3.6" }, "engines": { "node": ">=16.3.0" } }, "node_modules/puppeteer-core": { - "version": "21.3.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.3.0.tgz", - "integrity": "sha512-3+KR7blDHZEGYhe/9Xpj7vl13MAXKhnnSfajEs6hlTY4FtPMfa/fXMuxZtWbQO0/s0B5QASmVmtO7wZScJ4Cgw==", + "version": "21.3.6", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.3.6.tgz", + "integrity": "sha512-ZH6tjTdRXwW2fx5W3jBbG+yUVQdDfZW1kjfwvWwMzsnKEli5ZwV70Zp97GOebHQHrK8zM3vX5VqI9sd48c9PnQ==", "dev": true, "dependencies": { "@puppeteer/browsers": "1.7.1", - "chromium-bidi": "0.4.27", + "chromium-bidi": "0.4.28", "cross-fetch": "4.0.0", "debug": "4.3.4", "devtools-protocol": "0.0.1179426", - "ws": "8.14.1" + "ws": "8.14.2" }, "engines": { "node": ">=16.3.0" @@ -5467,9 +5467,9 @@ } }, "node_modules/sass": { - "version": "1.67.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.67.0.tgz", - "integrity": "sha512-SVrO9ZeX/QQyEGtuZYCVxoeAL5vGlYjJ9p4i4HFuekWl8y/LtJ7tJc10Z+ck1c8xOuoBm2MYzcLfTAffD0pl/A==", + "version": "1.68.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", + "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -6228,9 +6228,9 @@ } }, "node_modules/ws": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", - "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "dev": true, "engines": { "node": ">=10.0.0" @@ -7350,9 +7350,9 @@ "requires": {} }, "@stencil/core": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.3.0.tgz", - "integrity": "sha512-WYjftKg5fuqO7mf3nTl1aCRurkeMmfEF38WcBG4VLF6UPQ+MA76/koedGR2LGhATGByx+pbxR4iRxAr2Bspc9A==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.4.0.tgz", + "integrity": "sha512-YlLyCqGBsMEuZb3XTO/STT0TX9eSwjoVhCJgtjVfQOF+ebIMVlojTh40CmDveWiWbth687cbr6S2heeussV8Sg==", "dev": true }, "@stencil/react-output-target": { @@ -7363,9 +7363,9 @@ "requires": {} }, "@stencil/sass": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.5.tgz", - "integrity": "sha512-9nyllMXOEvHywo6fP2iwXgnq32A+OOUE36Aq7iUjzwT3wdr04qsvupO1JNIyRvmvCDF15hOKXztrZH1/wDu2Zg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.6.tgz", + "integrity": "sha512-d+k8qCvDgzI/vIV7M5QavIS6b75X4yn+YQH80KA/L0oL/hKD8KeF3wMOd7P1nDhGLIGRNw5tBDbe0GeIsGVU7A==", "dev": true, "requires": {} }, @@ -7473,15 +7473,15 @@ } }, "@types/lodash": { - "version": "4.14.198", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.198.tgz", - "integrity": "sha512-trNJ/vtMZYMLhfN45uLq4ShQSw0/S7xCTLLVM+WM1rmFpba/VS42jVUgaO3w/NOLiWR/09lnYk0yMaA/atdIsg==", + "version": "4.14.199", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz", + "integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==", "dev": true }, "@types/node": { - "version": "20.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", - "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==" + "version": "20.8.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", + "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==" }, "@types/puppeteer": { "version": "5.4.7", @@ -7519,9 +7519,9 @@ "dev": true }, "@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.1.tgz", + "integrity": "sha512-CHzgNU3qYBnp/O4S3yv2tXPlvMTq0YWSTVg2/JYLqWZGHwwgJGAwd00poay/11asPq8wLFwHzubyInqHIFmmiw==", "dev": true, "optional": true, "requires": { @@ -7891,9 +7891,9 @@ } }, "chromium-bidi": { - "version": "0.4.27", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.27.tgz", - "integrity": "sha512-8Irq0FbKYN8Xmj8M62kta6wk5MyDKeYIFtNavxQ2M3xf2v5MCC4ntf+FxitQu1iHaQvGU6t5O+Nrep0RNNS0EQ==", + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.28.tgz", + "integrity": "sha512-2HZ74QlAApJrEwcGlU/sUu0s4VS+FI3CJ09Toc9aE9VemMyhHZXeaROQgJKNRaYMUTUx6qIv1cLBs3F+vfgjSw==", "dev": true, "requires": { "mitt": "3.0.1", @@ -8154,9 +8154,9 @@ } }, "data-uri-to-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz", - "integrity": "sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", + "integrity": "sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==", "dev": true }, "date-fns": { @@ -8520,13 +8520,13 @@ "dev": true }, "get-uri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.1.tgz", - "integrity": "sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", + "integrity": "sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==", "dev": true, "requires": { "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^5.0.1", + "data-uri-to-buffer": "^6.0.0", "debug": "^4.3.4", "fs-extra": "^8.1.0" }, @@ -10170,28 +10170,28 @@ } }, "puppeteer": { - "version": "21.3.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.3.0.tgz", - "integrity": "sha512-+PLO2dLos4Kh+97yUrWD8t+hpN9Eq84vH3AQi7Qtc6VV1ucRSimhPr94etgJS6rZDorbviWlm+3i6XvFSJNhsg==", + "version": "21.3.6", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.3.6.tgz", + "integrity": "sha512-ulK9+KLvdaVsG0EKbKyw/DCXCz88rsnrvIJg9tY8AmkGR01AxI4ZJTH9BJl1OE7cLfh2vxjBvY+xfvJod6rfgw==", "dev": true, "requires": { "@puppeteer/browsers": "1.7.1", "cosmiconfig": "8.3.6", - "puppeteer-core": "21.3.0" + "puppeteer-core": "21.3.6" } }, "puppeteer-core": { - "version": "21.3.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.3.0.tgz", - "integrity": "sha512-3+KR7blDHZEGYhe/9Xpj7vl13MAXKhnnSfajEs6hlTY4FtPMfa/fXMuxZtWbQO0/s0B5QASmVmtO7wZScJ4Cgw==", + "version": "21.3.6", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.3.6.tgz", + "integrity": "sha512-ZH6tjTdRXwW2fx5W3jBbG+yUVQdDfZW1kjfwvWwMzsnKEli5ZwV70Zp97GOebHQHrK8zM3vX5VqI9sd48c9PnQ==", "dev": true, "requires": { "@puppeteer/browsers": "1.7.1", - "chromium-bidi": "0.4.27", + "chromium-bidi": "0.4.28", "cross-fetch": "4.0.0", "debug": "4.3.4", "devtools-protocol": "0.0.1179426", - "ws": "8.14.1" + "ws": "8.14.2" } }, "pure-rand": { @@ -10517,9 +10517,9 @@ "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==" }, "sass": { - "version": "1.67.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.67.0.tgz", - "integrity": "sha512-SVrO9ZeX/QQyEGtuZYCVxoeAL5vGlYjJ9p4i4HFuekWl8y/LtJ7tJc10Z+ck1c8xOuoBm2MYzcLfTAffD0pl/A==", + "version": "1.68.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", + "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", @@ -11119,9 +11119,9 @@ } }, "ws": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", - "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "dev": true, "requires": {} }, diff --git a/packages/core/package.json b/packages/core/package.json index 2f5cbde..6781390 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@anywhere-ui/core", - "version": "0.4.0+17", + "version": "0.4.0+18", "description": "Base components for AnywhereUI", "main": "dist/index.cjs.js", "module": "dist/index.js", @@ -54,13 +54,13 @@ "devDependencies": { "@iconify/iconify": "^3.1.1", "@stencil/angular-output-target": "0.8.2", - "@stencil/core": "^4.3.0", + "@stencil/core": "^4.4.0", "@stencil/react-output-target": "^0.5.3", - "@stencil/sass": "^3.0.5", + "@stencil/sass": "^3.0.6", "@stencil/vue-output-target": "^0.8.6", "@types/clusterize.js": "^0.18.1", "@types/jest": "^29.5.5", - "@types/lodash": "^4.14.198", + "@types/lodash": "^4.14.199", "@types/puppeteer": "^5.4.7", "clusterize.js": "^1.0.0", "concurrently": "^8.2.1", @@ -71,19 +71,19 @@ "jest-cli": "29.7.0", "lodash": "^4.17.21", "prismjs": "^1.29.0", - "puppeteer": "^21.3.0", + "puppeteer": "^21.3.6", "rebase": "^0.3.0", "replace": "^1.2.2", "rollup-plugin-node-polyfills": "^0.2.1", - "sass": "^1.67.0" + "sass": "^1.68.0" }, "license": "MIT", "dependencies": { "@anywhere-ui/flex": "^1.0.2", "@docsearch/js": "^3.5.2", - "@types/node": "^20.6.2", + "@types/node": "^20.8.2", "build": "^0.1.4", "run": "^1.4.0" }, - "buildnum": "17" + "buildnum": "18" } \ No newline at end of file diff --git a/packages/core/src/app/App.js b/packages/core/src/app/App.js index 107a834..3302f09 100644 --- a/packages/core/src/app/App.js +++ b/packages/core/src/app/App.js @@ -75,17 +75,34 @@ const onMenuButtonClick = () => { // Function to update the active state of menu items based on the current path const updateMenuActiveState = (currentPath) => { const menuItems = document.querySelectorAll("[data-link]"); - menuItems.forEach((item) => { + menuItems.forEach(function (item) { item.classList.remove("active"); - const itemHref = item.getAttribute("href"); - if (currentPath === "" && itemHref === "/") { - item.classList.add("active"); - } else if (currentPath === itemHref) { + if (location.hash === "") { + menuItems[0].classList.add("active"); + } else if ( + item.href.indexOf(removeSecondPartOfUrl(location.hash.replace("#", ""))) > + -1 + ) { item.classList.add("active"); } }); }; +const removeSecondPartOfUrl = (inputUrl) => { + // Split the URL by "/" + var parts = inputUrl.split("/"); + + // Check if there are at least two parts (i.e., /checkbox/label format) + if (parts.length >= 2) { + // Remove the second part (label) by taking the first part (checkbox) + var newUrl = "/" + parts[1]; + return newUrl; + } else { + // If there's only one part or no parts, return the original URL + return inputUrl; + } +}; + // The main router function to handle URL routing and view updates const router = async () => { const routes = [ @@ -157,7 +174,9 @@ const router = async () => { const potentialMatches = routes.map((route) => { return { route: route, - result: currentPath.match(pathToRegex(route.path)), + result: removeSecondPartOfUrl(location.hash.replace("#", "")).match( + pathToRegex(route.path) + ), }; }); @@ -168,7 +187,7 @@ const router = async () => { if (!match) { match = { route: routes[0], - result: [currentPath], + result: [location.pathname], }; } @@ -236,8 +255,10 @@ document.addEventListener("DOMContentLoaded", () => { document.body.addEventListener("click", (e) => { if (e.target.matches("[data-link]")) { e.preventDefault(); - const currentPath = e.target.getAttribute("href"); - if (currentPath === location.pathname) return; + // const currentPath = e.target.getAttribute("href"); + const currentPath = e.target.href.substring(e.target.href.indexOf("#")); + const path = location.hash; + if (currentPath === path) return; navigateTo(currentPath); updateMenuActiveState(currentPath); } diff --git a/packages/core/src/components/app-showcase/doc/app-doc/app-doc.tsx b/packages/core/src/components/app-showcase/doc/app-doc/app-doc.tsx index 27b488a..8993fb3 100644 --- a/packages/core/src/components/app-showcase/doc/app-doc/app-doc.tsx +++ b/packages/core/src/components/app-showcase/doc/app-doc/app-doc.tsx @@ -19,7 +19,7 @@ export class AppDoc { componentWillLoad() { const currentURL = window.location.href; - if (currentURL.includes("#api")) { + if (currentURL.includes("/api")) { this.activeTab = 1; } else { this.activeTab = 0; diff --git a/packages/core/src/components/app-showcase/doc/app-docapitable/app-docapitable.tsx b/packages/core/src/components/app-showcase/doc/app-docapitable/app-docapitable.tsx index 38f8d68..657dfce 100644 --- a/packages/core/src/components/app-showcase/doc/app-docapitable/app-docapitable.tsx +++ b/packages/core/src/components/app-showcase/doc/app-docapitable/app-docapitable.tsx @@ -42,7 +42,19 @@ export class AppDocApiTable { if (typeof window !== "undefined") { const parentElement = (event.currentTarget as HTMLElement) .parentElement as HTMLElement; - window.location.hash = this.anyId + "." + param; + + const hashParts = window.location.hash.split("/"); + + if (hashParts[2]) { + hashParts.splice(2); // Remove all segments after "/#/checkbox/" + hashParts.push(this.anyId); // Add the new "this.anyId" segment + window.location.hash = hashParts.join("/") + "." + param; + } else { + window.location.hash = + window.location.hash + "/" + hashParts.push(this.anyId) + "." + param; // Add the new "this.anyId" segment + } + + // window.location.hash = this.anyId + "." + param; setTimeout(() => { parentElement.scrollIntoView({ block: "nearest", behavior: "smooth" }); diff --git a/packages/core/src/components/app-showcase/doc/app-docsection-nav/app-docsection-nav.tsx b/packages/core/src/components/app-showcase/doc/app-docsection-nav/app-docsection-nav.tsx index 3aa4f49..bc2daae 100644 --- a/packages/core/src/components/app-showcase/doc/app-docsection-nav/app-docsection-nav.tsx +++ b/packages/core/src/components/app-showcase/doc/app-docsection-nav/app-docsection-nav.tsx @@ -39,9 +39,26 @@ export class AppDocSectionNav { this.scrollToLabelById(this.activeId); } + removeFirstPartOfHash(hash) { + // Split the URL by "/" + var parts = hash.split("/"); + + // Check if there are at least two parts (i.e., /checkbox/label format) + if (parts.length >= 2) { + // Remove the second part (label) by taking the first part (checkbox) + var newUrl = parts[2]; + return newUrl; + } else { + // If there's only one part or no parts, return the original URL + return hash; + } + } + getCurrentHash() { if (typeof window !== "undefined") { - const hash = window.location.hash.substring(1); + const hash = this.removeFirstPartOfHash( + window.location.hash.substring(1) + ); return ObjectUtils.isNotEmpty(hash) ? hash : ""; } return ""; @@ -114,7 +131,15 @@ export class AppDocSectionNav { const label = document.getElementById(id); if (label) { const parentElement = label.parentElement; - window.location.hash = id; + const hashParts = window.location.hash.split("/"); + + if (hashParts[2]) { + hashParts.splice(2); // Remove all segments after "/#/checkbox/" + hashParts.push(id); // Add the new "id" segment + window.location.hash = hashParts.join("/"); + } else { + window.location.hash = window.location.hash + "/" + id; + } if (parentElement) { parentElement.scrollIntoView({ block: "start", behavior: "smooth" }); diff --git a/packages/core/src/components/app-showcase/doc/app-docsectiontext/app-docsectiontext.tsx b/packages/core/src/components/app-showcase/doc/app-docsectiontext/app-docsectiontext.tsx index afa0e17..c4a7a23 100644 --- a/packages/core/src/components/app-showcase/doc/app-docsectiontext/app-docsectiontext.tsx +++ b/packages/core/src/components/app-showcase/doc/app-docsectiontext/app-docsectiontext.tsx @@ -22,7 +22,15 @@ export class AppDocSectionText { if (typeof window !== "undefined") { // const hash = window.location.hash.substring(1); const id = this.textId || this.parentId; - window.location.hash = id; + const hashParts = window.location.hash.split("/"); + + if (hashParts[2]) { + hashParts.splice(2); // Remove all segments after "/#/checkbox/" + hashParts.push(id); // Add the new "id" segment + window.location.hash = hashParts.join("/"); + } else { + window.location.hash = window.location.hash + "/" + id; + } const parentElement = (event.target as HTMLElement).closest( ".doc-section-label" diff --git a/packages/core/src/doc/docs.json b/packages/core/src/doc/docs.json index 9269cca..1da180e 100644 --- a/packages/core/src/doc/docs.json +++ b/packages/core/src/doc/docs.json @@ -1,9 +1,9 @@ { - "timestamp": "2023-09-30T19:15:05", + "timestamp": "2023-10-04T22:58:31", "compiler": { "name": "@stencil/core", - "version": "4.3.0", - "typescriptVersion": "5.1.6" + "version": "4.4.0", + "typescriptVersion": "5.2.2" }, "components": [ { diff --git a/packages/core/src/index.html b/packages/core/src/index.html index 1fe43b7..3f32bff 100644 --- a/packages/core/src/index.html +++ b/packages/core/src/index.html @@ -63,39 +63,39 @@
@@ -111,7 +111,7 @@