@tmlmobilidade/utils 20250711.18.0 → 20250711.1327.21

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/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './src/generate-random-token.js';
7
7
  export * from './src/generic/index.js';
8
8
  export * from './src/geo/index.js';
9
9
  export * from './src/http.js';
10
+ export * from './src/navigation/index.js';
10
11
  export * from './src/permissions.js';
11
12
  export * from './src/singleton-proxy.js';
12
13
  export * from './src/strings/index.js';
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ export * from './src/generate-random-token.js';
7
7
  export * from './src/generic/index.js';
8
8
  export * from './src/geo/index.js';
9
9
  export * from './src/http.js';
10
+ export * from './src/navigation/index.js';
10
11
  export * from './src/permissions.js';
11
12
  export * from './src/singleton-proxy.js';
12
13
  export * from './src/strings/index.js';
@@ -0,0 +1 @@
1
+ export * from './keep-url-params.js';
@@ -0,0 +1 @@
1
+ export * from './keep-url-params.js';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Utility function to keep URL parameters when navigating to a new destination.
3
+ * This function appends the provided search parameters to the destination URL.
4
+ * @param destination The base URL to which the search parameters will be appended.
5
+ * @param searchParams The search parameters to append. You can get this with `window.location.search`.
6
+ * @returns A new URL string that combines the destination and the search parameters.
7
+ */
8
+ export declare function keepUrlParams(destination: string, searchParams: string): string;
@@ -0,0 +1,11 @@
1
+ /* * */
2
+ /**
3
+ * Utility function to keep URL parameters when navigating to a new destination.
4
+ * This function appends the provided search parameters to the destination URL.
5
+ * @param destination The base URL to which the search parameters will be appended.
6
+ * @param searchParams The search parameters to append. You can get this with `window.location.search`.
7
+ * @returns A new URL string that combines the destination and the search parameters.
8
+ */
9
+ export function keepUrlParams(destination, searchParams) {
10
+ return `${destination}${searchParams}`;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/utils",
3
- "version": "20250711.18.0",
3
+ "version": "20250711.1327.21",
4
4
  "author": "João de Vasconcelos & Jusi Monteiro",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "homepage": "https://github.com/tmlmobilidade/services#readme",