@sonic-equipment/ui 224.0.0 → 225.0.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/exports.d.ts
CHANGED
|
@@ -466,6 +466,7 @@ export * from './shared/utils/scrolling';
|
|
|
466
466
|
export * from './shared/utils/string';
|
|
467
467
|
export * from './shared/utils/time';
|
|
468
468
|
export * from './shared/utils/types';
|
|
469
|
+
export * from './shared/utils/url';
|
|
469
470
|
export * from './shared/utils/uuid';
|
|
470
471
|
export * from './sidebar/sidebar';
|
|
471
472
|
export * from './sidebar/sidebar-provider';
|
package/dist/index.js
CHANGED
|
@@ -463,6 +463,7 @@ export { scrollIntoViewRef, scrollToTop } from './shared/utils/scrolling.js';
|
|
|
463
463
|
export { camelCase } from './shared/utils/string.js';
|
|
464
464
|
export { TIME } from './shared/utils/time.js';
|
|
465
465
|
export { has, hasNo, isObject } from './shared/utils/types.js';
|
|
466
|
+
export { join } from './shared/utils/url.js';
|
|
466
467
|
export { createUUID, isUUID } from './shared/utils/uuid.js';
|
|
467
468
|
export { Sidebar } from './sidebar/sidebar.js';
|
|
468
469
|
export { SidebarDetectBreakpoint, SidebarProvider } from './sidebar/sidebar-provider.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function join(..._paths) {
|
|
2
|
+
const paths = _paths.map(path => path.trim()).filter(Boolean);
|
|
3
|
+
let result = '';
|
|
4
|
+
for (const path of paths) {
|
|
5
|
+
if (result) {
|
|
6
|
+
result += `${result.endsWith('/') ? '' : '/'}${path.replaceAll(/^\/+|\/+$/g, '')}`;
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
result =
|
|
10
|
+
path.length > 1 && path.endsWith('/')
|
|
11
|
+
? path.replaceAll(/\/+$/g, '')
|
|
12
|
+
: path;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (paths.at(-1)?.endsWith('/') && !result.endsWith('/'))
|
|
16
|
+
result += '/';
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { join };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|