@redneckz/wildless-cms-uni-blocks 0.14.769 → 0.14.771
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/bundle/bundle.umd.js +13 -24
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/utils/url.d.ts +2 -2
- package/dist/ui-kit/Button/SubmitButton.js +2 -1
- package/dist/ui-kit/Button/SubmitButton.js.map +1 -1
- package/dist/utils/url.d.ts +2 -2
- package/dist/utils/url.js +10 -2
- package/dist/utils/url.js.map +1 -1
- package/lib/ui-kit/Button/SubmitButton.js +2 -1
- package/lib/ui-kit/Button/SubmitButton.js.map +1 -1
- package/lib/utils/url.d.ts +2 -2
- package/lib/utils/url.js +9 -1
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +13 -24
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/utils/url.d.ts +2 -2
- package/mobile/dist/ui-kit/Button/SubmitButton.js +2 -1
- package/mobile/dist/ui-kit/Button/SubmitButton.js.map +1 -1
- package/mobile/dist/utils/url.d.ts +2 -2
- package/mobile/dist/utils/url.js +10 -2
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/ui-kit/Button/SubmitButton.js +2 -1
- package/mobile/lib/ui-kit/Button/SubmitButton.js.map +1 -1
- package/mobile/lib/utils/url.d.ts +2 -2
- package/mobile/lib/utils/url.js +9 -1
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/ui-kit/Button/SubmitButton.tsx +14 -6
- package/mobile/src/utils/url.ts +11 -2
- package/package.json +1 -1
- package/src/ui-kit/Button/SubmitButton.tsx +14 -6
- package/src/utils/url.ts +11 -2
- package/bundle/utils/joinPath.d.ts +0 -2
- package/dist/utils/joinPath.d.ts +0 -2
- package/dist/utils/joinPath.js +0 -24
- package/dist/utils/joinPath.js.map +0 -1
- package/lib/utils/joinPath.d.ts +0 -2
- package/lib/utils/joinPath.js +0 -20
- package/lib/utils/joinPath.js.map +0 -1
- package/mobile/bundle/utils/joinPath.d.ts +0 -2
- package/mobile/dist/utils/joinPath.d.ts +0 -2
- package/mobile/dist/utils/joinPath.js +0 -24
- package/mobile/dist/utils/joinPath.js.map +0 -1
- package/mobile/lib/utils/joinPath.d.ts +0 -2
- package/mobile/lib/utils/joinPath.js +0 -20
- package/mobile/lib/utils/joinPath.js.map +0 -1
- package/mobile/src/utils/joinPath.ts +0 -24
- package/src/utils/joinPath.ts +0 -24
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Target } from '../model/LinkProps';
|
|
2
|
-
export declare const isURL: (href: string | undefined
|
|
2
|
+
export declare const isURL: (href: string | undefined) => href is `${string}:${string}`;
|
|
3
3
|
export declare const isLocalURL: (href: string | undefined, target?: Target) => boolean;
|
|
4
4
|
export declare const isHash: (href: string | undefined) => href is `#${string}`;
|
|
5
5
|
export declare const withoutQuery: (href: string | undefined) => string;
|
|
6
|
-
export
|
|
6
|
+
export declare const joinPath: (...path: (string | undefined | null)[]) => string;
|
|
7
7
|
export declare const hasPrefix: (href?: string) => (prefix?: string) => boolean;
|
|
@@ -2,7 +2,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.SubmitButton = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const style_1 = require("../../utils/style");
|
|
5
6
|
const Loader_1 = require("../Loader/Loader");
|
|
6
7
|
const Button_1 = require("./Button");
|
|
7
|
-
exports.SubmitButton = (0, uni_jsx_1.JSX)(({ isLoading, disabled, children, ...rest }) => ((0, jsx_runtime_1.jsxs)(Button_1.Button, { type: "submit", disabled: isLoading || disabled, ...rest, children: [isLoading ? (0, jsx_runtime_1.jsx)(Loader_1.Loader, { blur: true, size: "small" }) : null, children] })));
|
|
8
|
+
exports.SubmitButton = (0, uni_jsx_1.JSX)(({ isLoading, disabled, children, className, ...rest }) => ((0, jsx_runtime_1.jsxs)(Button_1.Button, { type: "submit", className: (0, style_1.style)('relative', className), disabled: isLoading || disabled, ...rest, children: [isLoading ? (0, jsx_runtime_1.jsx)(Loader_1.Loader, { blur: true, size: "small" }) : null, children] })));
|
|
8
9
|
//# sourceMappingURL=SubmitButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/SubmitButton.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,qCAAoD;AAMvC,QAAA,YAAY,GAAG,IAAA,aAAG,
|
|
1
|
+
{"version":3,"file":"SubmitButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/SubmitButton.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,6CAA0C;AAC1C,qCAAoD;AAMvC,QAAA,YAAY,GAAG,IAAA,aAAG,EAC7B,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACzD,wBAAC,eAAM,IACL,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAA,aAAK,EAAC,UAAU,EAAE,SAAS,CAAC,EACvC,QAAQ,EAAE,SAAS,IAAI,QAAQ,KAC3B,IAAI,aAEP,SAAS,CAAC,CAAC,CAAC,uBAAC,eAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,EACtD,QAAQ,IACF,CACV,CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Target } from '../model/LinkProps';
|
|
2
|
-
export declare const isURL: (href: string | undefined
|
|
2
|
+
export declare const isURL: (href: string | undefined) => href is `${string}:${string}`;
|
|
3
3
|
export declare const isLocalURL: (href: string | undefined, target?: Target) => boolean;
|
|
4
4
|
export declare const isHash: (href: string | undefined) => href is `#${string}`;
|
|
5
5
|
export declare const withoutQuery: (href: string | undefined) => string;
|
|
6
|
-
export
|
|
6
|
+
export declare const joinPath: (...path: (string | undefined | null)[]) => string;
|
|
7
7
|
export declare const hasPrefix: (href?: string) => (prefix?: string) => boolean;
|
package/mobile/dist/utils/url.js
CHANGED
|
@@ -8,8 +8,16 @@ const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
|
8
8
|
exports.isHash = isHash;
|
|
9
9
|
const withoutQuery = (href) => (href ?? '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
10
10
|
exports.withoutQuery = withoutQuery;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const joinPath = (...path) => path
|
|
12
|
+
.filter(Boolean)
|
|
13
|
+
.join('/')
|
|
14
|
+
.replace(/\/+/g, '/')
|
|
15
|
+
.replace(/^(.+):\//, '$1://') // TODO Череда очень странных преобрвзований
|
|
16
|
+
.replace(/^file:/, 'file:/')
|
|
17
|
+
.replace(/\/(\?|&|#[^!])/g, '$1')
|
|
18
|
+
.replace(/\?/g, '&')
|
|
19
|
+
.replace('&', '?');
|
|
20
|
+
exports.joinPath = joinPath;
|
|
13
21
|
const hasPrefix = (href) => (prefix) => Boolean(href &&
|
|
14
22
|
prefix &&
|
|
15
23
|
href.startsWith(prefix) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":";;AAEO,MAAM,KAAK,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":";;AAEO,MAAM,KAAK,GAAG,CAAC,IAAwB,EAAiC,EAAE,CAC/E,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AADlB,QAAA,KAAK,SACa;AAExB,MAAM,UAAU,GAAG,CAAC,IAAwB,EAAE,MAAe,EAAE,EAAE,CACtE,OA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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { style } from '../../utils/style.js';
|
|
3
4
|
import { Loader } from '../Loader/Loader.js';
|
|
4
5
|
import { Button } from './Button.js';
|
|
5
|
-
export const SubmitButton = JSX(({ isLoading, disabled, children, ...rest }) => (_jsxs(Button, { type: "submit", disabled: isLoading || disabled, ...rest, children: [isLoading ? _jsx(Loader, { blur: true, size: "small" }) : null, children] })));
|
|
6
|
+
export const SubmitButton = JSX(({ isLoading, disabled, children, className, ...rest }) => (_jsxs(Button, { type: "submit", className: style('relative', className), disabled: isLoading || disabled, ...rest, children: [isLoading ? _jsx(Loader, { blur: true, size: "small" }) : null, children] })));
|
|
6
7
|
//# sourceMappingURL=SubmitButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/SubmitButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAC;AAMpD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"SubmitButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/SubmitButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAC;AAMpD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAC7B,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACzD,MAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,CAAC,EACvC,QAAQ,EAAE,SAAS,IAAI,QAAQ,KAC3B,IAAI,aAEP,SAAS,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,EACtD,QAAQ,IACF,CACV,CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Target } from '../model/LinkProps';
|
|
2
|
-
export declare const isURL: (href: string | undefined
|
|
2
|
+
export declare const isURL: (href: string | undefined) => href is `${string}:${string}`;
|
|
3
3
|
export declare const isLocalURL: (href: string | undefined, target?: Target) => boolean;
|
|
4
4
|
export declare const isHash: (href: string | undefined) => href is `#${string}`;
|
|
5
5
|
export declare const withoutQuery: (href: string | undefined) => string;
|
|
6
|
-
export
|
|
6
|
+
export declare const joinPath: (...path: (string | undefined | null)[]) => string;
|
|
7
7
|
export declare const hasPrefix: (href?: string) => (prefix?: string) => boolean;
|
package/mobile/lib/utils/url.js
CHANGED
|
@@ -2,7 +2,15 @@ export const isURL = (href) => Boolean(href?.includes(':'));
|
|
|
2
2
|
export const isLocalURL = (href, target) => Boolean(href && !isURL(href) && (!target || target === '_self'));
|
|
3
3
|
export const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
4
4
|
export const withoutQuery = (href) => (href ?? '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
5
|
-
export
|
|
5
|
+
export const joinPath = (...path) => path
|
|
6
|
+
.filter(Boolean)
|
|
7
|
+
.join('/')
|
|
8
|
+
.replace(/\/+/g, '/')
|
|
9
|
+
.replace(/^(.+):\//, '$1://') // TODO Череда очень странных преобрвзований
|
|
10
|
+
.replace(/^file:/, 'file:/')
|
|
11
|
+
.replace(/\/(\?|&|#[^!])/g, '$1')
|
|
12
|
+
.replace(/\?/g, '&')
|
|
13
|
+
.replace('&', '?');
|
|
6
14
|
export const hasPrefix = (href) => (prefix) => Boolean(href &&
|
|
7
15
|
prefix &&
|
|
8
16
|
href.startsWith(prefix) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAwB,EAAiC,EAAE,CAC/E,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAwB,EAAE,MAAe,EAAE,EAAE,CACtE,OAAO,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC;AAEnE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAwB,EAAwB,EAAE,CACvE,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAwB,EAAU,EAAE,CAC/D,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAmC,EAAU,EAAE,CACzE,IAAI;KACD,MAAM,CAAC,OAAO,CAAC;KACf,IAAI,CAAC,GAAG,CAAC;KACT,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;KACpB,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,4CAA4C;KACzE,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAC3B,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC;KAChC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;KACnB,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAEvB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,CAAC,MAAe,EAAE,EAAE,CAC9D,OAAO,CACL,IAAI;IACF,MAAM;IACN,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IACvB,CAAC,MAAM,KAAK,GAAG,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CACrE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { style } from '../../utils/style';
|
|
2
3
|
import { Loader } from '../Loader/Loader';
|
|
3
4
|
import { Button, type ButtonProps } from './Button';
|
|
4
5
|
|
|
@@ -6,9 +7,16 @@ export interface SubmitButtonProps extends ButtonProps {
|
|
|
6
7
|
isLoading?: boolean;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const SubmitButton = JSX<SubmitButtonProps>(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
export const SubmitButton = JSX<SubmitButtonProps>(
|
|
11
|
+
({ isLoading, disabled, children, className, ...rest }) => (
|
|
12
|
+
<Button
|
|
13
|
+
type="submit"
|
|
14
|
+
className={style('relative', className)}
|
|
15
|
+
disabled={isLoading || disabled}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
{isLoading ? <Loader blur={true} size="small" /> : null}
|
|
19
|
+
{children}
|
|
20
|
+
</Button>
|
|
21
|
+
),
|
|
22
|
+
);
|
package/mobile/src/utils/url.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Target } from '../model/LinkProps';
|
|
2
2
|
|
|
3
|
-
export const isURL = (href: string | undefined
|
|
3
|
+
export const isURL = (href: string | undefined): href is `${string}:${string}` =>
|
|
4
4
|
Boolean(href?.includes(':'));
|
|
5
5
|
|
|
6
6
|
export const isLocalURL = (href: string | undefined, target?: Target) =>
|
|
@@ -12,7 +12,16 @@ export const isHash = (href: string | undefined): href is `#${string}` =>
|
|
|
12
12
|
export const withoutQuery = (href: string | undefined): string =>
|
|
13
13
|
(href ?? '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export const joinPath = (...path: (string | undefined | null)[]): string =>
|
|
16
|
+
path
|
|
17
|
+
.filter(Boolean)
|
|
18
|
+
.join('/')
|
|
19
|
+
.replace(/\/+/g, '/')
|
|
20
|
+
.replace(/^(.+):\//, '$1://') // TODO Череда очень странных преобрвзований
|
|
21
|
+
.replace(/^file:/, 'file:/')
|
|
22
|
+
.replace(/\/(\?|&|#[^!])/g, '$1')
|
|
23
|
+
.replace(/\?/g, '&')
|
|
24
|
+
.replace('&', '?');
|
|
16
25
|
|
|
17
26
|
export const hasPrefix = (href?: string) => (prefix?: string) =>
|
|
18
27
|
Boolean(
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { style } from '../../utils/style';
|
|
2
3
|
import { Loader } from '../Loader/Loader';
|
|
3
4
|
import { Button, type ButtonProps } from './Button';
|
|
4
5
|
|
|
@@ -6,9 +7,16 @@ export interface SubmitButtonProps extends ButtonProps {
|
|
|
6
7
|
isLoading?: boolean;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const SubmitButton = JSX<SubmitButtonProps>(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
export const SubmitButton = JSX<SubmitButtonProps>(
|
|
11
|
+
({ isLoading, disabled, children, className, ...rest }) => (
|
|
12
|
+
<Button
|
|
13
|
+
type="submit"
|
|
14
|
+
className={style('relative', className)}
|
|
15
|
+
disabled={isLoading || disabled}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
{isLoading ? <Loader blur={true} size="small" /> : null}
|
|
19
|
+
{children}
|
|
20
|
+
</Button>
|
|
21
|
+
),
|
|
22
|
+
);
|
package/src/utils/url.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Target } from '../model/LinkProps';
|
|
2
2
|
|
|
3
|
-
export const isURL = (href: string | undefined
|
|
3
|
+
export const isURL = (href: string | undefined): href is `${string}:${string}` =>
|
|
4
4
|
Boolean(href?.includes(':'));
|
|
5
5
|
|
|
6
6
|
export const isLocalURL = (href: string | undefined, target?: Target) =>
|
|
@@ -12,7 +12,16 @@ export const isHash = (href: string | undefined): href is `#${string}` =>
|
|
|
12
12
|
export const withoutQuery = (href: string | undefined): string =>
|
|
13
13
|
(href ?? '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export const joinPath = (...path: (string | undefined | null)[]): string =>
|
|
16
|
+
path
|
|
17
|
+
.filter(Boolean)
|
|
18
|
+
.join('/')
|
|
19
|
+
.replace(/\/+/g, '/')
|
|
20
|
+
.replace(/^(.+):\//, '$1://') // TODO Череда очень странных преобрвзований
|
|
21
|
+
.replace(/^file:/, 'file:/')
|
|
22
|
+
.replace(/\/(\?|&|#[^!])/g, '$1')
|
|
23
|
+
.replace(/\?/g, '&')
|
|
24
|
+
.replace('&', '?');
|
|
16
25
|
|
|
17
26
|
export const hasPrefix = (href?: string) => (prefix?: string) =>
|
|
18
27
|
Boolean(
|
package/dist/utils/joinPath.d.ts
DELETED
package/dist/utils/joinPath.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.joinSearchParams = exports.joinPath = void 0;
|
|
3
|
-
const PLACEHOLDER = 'http://_';
|
|
4
|
-
const joinPath = (...path) => {
|
|
5
|
-
const urls = path.filter(Boolean).map((_) => new URL(_, PLACEHOLDER));
|
|
6
|
-
const origin = urls.find((_) => _.origin !== PLACEHOLDER)?.origin;
|
|
7
|
-
const pathname = cleanPath(urls.map((_) => _.pathname));
|
|
8
|
-
const query = (0, exports.joinSearchParams)(...urls.map((_) => _.searchParams)).toString();
|
|
9
|
-
const hash = urls.find((_) => _.hash)?.hash;
|
|
10
|
-
return [origin, pathname, query ? `?${query}` : '', hash].filter(Boolean).join('');
|
|
11
|
-
};
|
|
12
|
-
exports.joinPath = joinPath;
|
|
13
|
-
const joinSearchParams = (...list) => {
|
|
14
|
-
const result = new URLSearchParams();
|
|
15
|
-
for (const searchParams of list) {
|
|
16
|
-
for (const [k, v] of searchParams) {
|
|
17
|
-
result.set(k, v);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
exports.joinSearchParams = joinSearchParams;
|
|
23
|
-
const cleanPath = (pathParts) => pathParts.join('/').replace(/\/+/g, '/');
|
|
24
|
-
//# sourceMappingURL=joinPath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"joinPath.js","sourceRoot":"","sources":["../../src/utils/joinPath.ts"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,UAAU,CAAC;AAExB,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAmC,EAAU,EAAE;IACzE,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAChF,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAA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ts
DELETED
package/lib/utils/joinPath.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const PLACEHOLDER = 'http://_';
|
|
2
|
-
export const joinPath = (...path) => {
|
|
3
|
-
const urls = path.filter(Boolean).map((_) => new URL(_, PLACEHOLDER));
|
|
4
|
-
const origin = urls.find((_) => _.origin !== PLACEHOLDER)?.origin;
|
|
5
|
-
const pathname = cleanPath(urls.map((_) => _.pathname));
|
|
6
|
-
const query = joinSearchParams(...urls.map((_) => _.searchParams)).toString();
|
|
7
|
-
const hash = urls.find((_) => _.hash)?.hash;
|
|
8
|
-
return [origin, pathname, query ? `?${query}` : '', hash].filter(Boolean).join('');
|
|
9
|
-
};
|
|
10
|
-
export const joinSearchParams = (...list) => {
|
|
11
|
-
const result = new URLSearchParams();
|
|
12
|
-
for (const searchParams of list) {
|
|
13
|
-
for (const [k, v] of searchParams) {
|
|
14
|
-
result.set(k, v);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return result;
|
|
18
|
-
};
|
|
19
|
-
const cleanPath = (pathParts) => pathParts.join('/').replace(/\/+/g, '/');
|
|
20
|
-
//# sourceMappingURL=joinPath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"joinPath.js","sourceRoot":"","sources":["../../src/utils/joinPath.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,UAAU,CAAC;AAE/B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAmC,EAAU,EAAE;IACzE,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAChF,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,EAAE,MAAM,CAAC;IA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 'http://_';
|
|
4
|
-
const joinPath = (...path) => {
|
|
5
|
-
const urls = path.filter(Boolean).map((_) => new URL(_, PLACEHOLDER));
|
|
6
|
-
const origin = urls.find((_) => _.origin !== PLACEHOLDER)?.origin;
|
|
7
|
-
const pathname = cleanPath(urls.map((_) => _.pathname));
|
|
8
|
-
const query = (0, exports.joinSearchParams)(...urls.map((_) => _.searchParams)).toString();
|
|
9
|
-
const hash = urls.find((_) => _.hash)?.hash;
|
|
10
|
-
return [origin, pathname, query ? `?${query}` : '', hash].filter(Boolean).join('');
|
|
11
|
-
};
|
|
12
|
-
exports.joinPath = joinPath;
|
|
13
|
-
const joinSearchParams = (...list) => {
|
|
14
|
-
const result = new URLSearchParams();
|
|
15
|
-
for (const searchParams of list) {
|
|
16
|
-
for (const [k, v] of searchParams) {
|
|
17
|
-
result.set(k, v);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
exports.joinSearchParams = joinSearchParams;
|
|
23
|
-
const cleanPath = (pathParts) => pathParts.join('/').replace(/\/+/g, '/');
|
|
24
|
-
//# sourceMappingURL=joinPath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"joinPath.js","sourceRoot":"","sources":["../../src/utils/joinPath.ts"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,UAAU,CAAC;AAExB,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAmC,EAAU,EAAE;IACzE,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAChF,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,EAAE,MAAM,CAAC;IAClE,MAAM,QAAQ,GAAG,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ter(Boolean).map((_) => new URL(_, PLACEHOLDER));
|
|
4
|
-
const origin = urls.find((_) => _.origin !== PLACEHOLDER)?.origin;
|
|
5
|
-
const pathname = cleanPath(urls.map((_) => _.pathname));
|
|
6
|
-
const query = joinSearchParams(...urls.map((_) => _.searchParams)).toString();
|
|
7
|
-
const hash = urls.find((_) => _.hash)?.hash;
|
|
8
|
-
return [origin, pathname, query ? `?${query}` : '', hash].filter(Boolean).join('');
|
|
9
|
-
};
|
|
10
|
-
export const joinSearchParams = (...list) => {
|
|
11
|
-
const result = new URLSearchParams();
|
|
12
|
-
for (const searchParams of list) {
|
|
13
|
-
for (const [k, v] of searchParams) {
|
|
14
|
-
result.set(k, v);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return result;
|
|
18
|
-
};
|
|
19
|
-
const cleanPath = (pathParts) => pathParts.join('/').replace(/\/+/g, '/');
|
|
20
|
-
//# sourceMappingURL=joinPath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"joinPath.js","sourceRoot":"","sources":["../../src/utils/joinPath.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,UAAU,CAAC;AAE/B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAmC,EAAU,EAAE;IACzE,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAChF,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,EAAE,MAAM,CAAC;IAClE,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,gBAAgB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC9E,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IAE5C,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAG,IAAuB,EAAmB,EAAE;IAC9E,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,KAAK,MAAM,YAAY,IAAI,IAAI,EAAE;QAC/B,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,EAAE;YACjC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SAClB;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,SAAmB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const PLACEHOLDER = 'http://_';
|
|
2
|
-
|
|
3
|
-
export const joinPath = (...path: (string | undefined | null)[]): string => {
|
|
4
|
-
const urls = path.filter(Boolean).map((_) => new URL(_ as string, PLACEHOLDER));
|
|
5
|
-
const origin = urls.find((_) => _.origin !== PLACEHOLDER)?.origin;
|
|
6
|
-
const pathname = cleanPath(urls.map((_) => _.pathname));
|
|
7
|
-
const query = joinSearchParams(...urls.map((_) => _.searchParams)).toString();
|
|
8
|
-
const hash = urls.find((_) => _.hash)?.hash;
|
|
9
|
-
|
|
10
|
-
return [origin, pathname, query ? `?${query}` : '', hash].filter(Boolean).join('');
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const joinSearchParams = (...list: URLSearchParams[]): URLSearchParams => {
|
|
14
|
-
const result = new URLSearchParams();
|
|
15
|
-
for (const searchParams of list) {
|
|
16
|
-
for (const [k, v] of searchParams) {
|
|
17
|
-
result.set(k, v);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return result;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const cleanPath = (pathParts: string[]) => pathParts.join('/').replace(/\/+/g, '/');
|
package/src/utils/joinPath.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const PLACEHOLDER = 'http://_';
|
|
2
|
-
|
|
3
|
-
export const joinPath = (...path: (string | undefined | null)[]): string => {
|
|
4
|
-
const urls = path.filter(Boolean).map((_) => new URL(_ as string, PLACEHOLDER));
|
|
5
|
-
const origin = urls.find((_) => _.origin !== PLACEHOLDER)?.origin;
|
|
6
|
-
const pathname = cleanPath(urls.map((_) => _.pathname));
|
|
7
|
-
const query = joinSearchParams(...urls.map((_) => _.searchParams)).toString();
|
|
8
|
-
const hash = urls.find((_) => _.hash)?.hash;
|
|
9
|
-
|
|
10
|
-
return [origin, pathname, query ? `?${query}` : '', hash].filter(Boolean).join('');
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const joinSearchParams = (...list: URLSearchParams[]): URLSearchParams => {
|
|
14
|
-
const result = new URLSearchParams();
|
|
15
|
-
for (const searchParams of list) {
|
|
16
|
-
for (const [k, v] of searchParams) {
|
|
17
|
-
result.set(k, v);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return result;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const cleanPath = (pathParts: string[]) => pathParts.join('/').replace(/\/+/g, '/');
|