@redneckz/wildless-cms-uni-blocks 0.2.26 → 0.2.29
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/package.json +2 -2
- package/dist/Blocks.d.ts +0 -9
- package/dist/Blocks.js +0 -19
- package/dist/Blocks.js.map +0 -1
- package/dist/ContentPage.d.ts +0 -19
- package/dist/ContentPage.js +0 -30
- package/dist/ContentPage.js.map +0 -1
- package/dist/ContentPageContext.d.ts +0 -17
- package/dist/ContentPageContext.js +0 -2
- package/dist/ContentPageContext.js.map +0 -1
- package/dist/ContentPageHead.d.ts +0 -6
- package/dist/ContentPageHead.js +0 -11
- package/dist/ContentPageHead.js.map +0 -1
- package/dist/Header.d.ts +0 -15
- package/dist/Header.js +0 -31
- package/dist/Header.js.map +0 -1
- package/dist/Icons.d.ts +0 -5
- package/dist/Icons.js +0 -12
- package/dist/Icons.js.map +0 -1
- package/dist/Img.d.ts +0 -7
- package/dist/Img.js +0 -11
- package/dist/Img.js.map +0 -1
- package/dist/LikeControl.d.ts +0 -6
- package/dist/LikeControl.js +0 -10
- package/dist/LikeControl.js.map +0 -1
- package/dist/Placeholder.d.ts +0 -6
- package/dist/Placeholder.js +0 -8
- package/dist/Placeholder.js.map +0 -1
- package/dist/ProductBlock.d.ts +0 -22
- package/dist/ProductBlock.js +0 -17
- package/dist/ProductBlock.js.map +0 -1
- package/dist/ProductColumnBlock.d.ts +0 -13
- package/dist/ProductColumnBlock.js +0 -11
- package/dist/ProductColumnBlock.js.map +0 -1
- package/dist/RichText.d.ts +0 -8
- package/dist/RichText.js +0 -10
- package/dist/RichText.js.map +0 -1
- package/dist/Text.d.ts +0 -8
- package/dist/Text.js +0 -8
- package/dist/Text.js.map +0 -1
- package/dist/TextWithImage.d.ts +0 -9
- package/dist/TextWithImage.js +0 -9
- package/dist/TextWithImage.js.map +0 -1
- package/dist/api/LikeAPI.d.ts +0 -9
- package/dist/api/LikeAPI.js +0 -119
- package/dist/api/LikeAPI.js.map +0 -1
- package/dist/content-page-repository/ContentPageRepository.d.ts +0 -6
- package/dist/content-page-repository/ContentPageRepository.js +0 -35
- package/dist/content-page-repository/ContentPageRepository.js.map +0 -1
- package/dist/content-page-repository/TransformationOptions.d.ts +0 -4
- package/dist/content-page-repository/TransformationOptions.js +0 -2
- package/dist/content-page-repository/TransformationOptions.js.map +0 -1
- package/dist/content-page-repository/index.d.ts +0 -1
- package/dist/content-page-repository/index.js +0 -5
- package/dist/content-page-repository/index.js.map +0 -1
- package/dist/content-page-repository/mapJSON.d.ts +0 -1
- package/dist/content-page-repository/mapJSON.js +0 -24
- package/dist/content-page-repository/mapJSON.js.map +0 -1
- package/dist/content-page-repository/transformContentPage.d.ts +0 -3
- package/dist/content-page-repository/transformContentPage.js +0 -27
- package/dist/content-page-repository/transformContentPage.js.map +0 -1
- package/dist/content-page-repository/transformMarkdown.d.ts +0 -1
- package/dist/content-page-repository/transformMarkdown.js +0 -16
- package/dist/content-page-repository/transformMarkdown.js.map +0 -1
- package/dist/content-page-repository/transformPicture.d.ts +0 -3
- package/dist/content-page-repository/transformPicture.js +0 -45
- package/dist/content-page-repository/transformPicture.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -11
- package/dist/index.js.map +0 -1
- package/dist/types.d.ts +0 -42
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/ui-kit/BlockItem.d.ts +0 -7
- package/dist/ui-kit/BlockItem.js +0 -8
- package/dist/ui-kit/BlockItem.js.map +0 -1
- package/dist/ui-kit/Button.d.ts +0 -5
- package/dist/ui-kit/Button.js +0 -2
- package/dist/ui-kit/Button.js.map +0 -1
- package/dist/ui-kit/HeaderItem.d.ts +0 -3
- package/dist/ui-kit/HeaderItem.js +0 -10
- package/dist/ui-kit/HeaderItem.js.map +0 -1
- package/dist/ui-kit/LikeButton.d.ts +0 -5
- package/dist/ui-kit/LikeButton.js +0 -15
- package/dist/ui-kit/LikeButton.js.map +0 -1
- package/dist/ui-kit/Link.d.ts +0 -5
- package/dist/ui-kit/Link.js +0 -2
- package/dist/ui-kit/Link.js.map +0 -1
- package/dist/ui-kit/Logo.d.ts +0 -5
- package/dist/ui-kit/Logo.js +0 -16
- package/dist/ui-kit/Logo.js.map +0 -1
- package/dist/ui-kit/PrimaryButton.d.ts +0 -5
- package/dist/ui-kit/PrimaryButton.js +0 -8
- package/dist/ui-kit/PrimaryButton.js.map +0 -1
- package/dist/ui-kit/SVG.d.ts +0 -12
- package/dist/ui-kit/SVG.js +0 -8
- package/dist/ui-kit/SVG.js.map +0 -1
- package/dist/ui-kit/TopItem.d.ts +0 -9
- package/dist/ui-kit/TopItem.js +0 -10
- package/dist/ui-kit/TopItem.js.map +0 -1
- package/dist/useLink.d.ts +0 -8
- package/dist/useLink.js +0 -20
- package/dist/useLink.js.map +0 -1
- package/lib/Blocks.d.ts +0 -9
- package/lib/Blocks.js +0 -17
- package/lib/Blocks.js.map +0 -1
- package/lib/ContentPage.d.ts +0 -19
- package/lib/ContentPage.js +0 -28
- package/lib/ContentPage.js.map +0 -1
- package/lib/ContentPageContext.d.ts +0 -17
- package/lib/ContentPageContext.js +0 -2
- package/lib/ContentPageContext.js.map +0 -1
- package/lib/ContentPageHead.d.ts +0 -6
- package/lib/ContentPageHead.js +0 -9
- package/lib/ContentPageHead.js.map +0 -1
- package/lib/Header.d.ts +0 -15
- package/lib/Header.js +0 -29
- package/lib/Header.js.map +0 -1
- package/lib/Icons.d.ts +0 -5
- package/lib/Icons.js +0 -10
- package/lib/Icons.js.map +0 -1
- package/lib/Img.d.ts +0 -7
- package/lib/Img.js +0 -8
- package/lib/Img.js.map +0 -1
- package/lib/LikeControl.d.ts +0 -6
- package/lib/LikeControl.js +0 -8
- package/lib/LikeControl.js.map +0 -1
- package/lib/Placeholder.d.ts +0 -6
- package/lib/Placeholder.js +0 -6
- package/lib/Placeholder.js.map +0 -1
- package/lib/ProductBlock.d.ts +0 -22
- package/lib/ProductBlock.js +0 -15
- package/lib/ProductBlock.js.map +0 -1
- package/lib/ProductColumnBlock.d.ts +0 -13
- package/lib/ProductColumnBlock.js +0 -9
- package/lib/ProductColumnBlock.js.map +0 -1
- package/lib/RichText.d.ts +0 -8
- package/lib/RichText.js +0 -8
- package/lib/RichText.js.map +0 -1
- package/lib/Text.d.ts +0 -8
- package/lib/Text.js +0 -6
- package/lib/Text.js.map +0 -1
- package/lib/TextWithImage.d.ts +0 -9
- package/lib/TextWithImage.js +0 -7
- package/lib/TextWithImage.js.map +0 -1
- package/lib/api/LikeAPI.d.ts +0 -9
- package/lib/api/LikeAPI.js +0 -116
- package/lib/api/LikeAPI.js.map +0 -1
- package/lib/common.css +0 -1
- package/lib/content-page-repository/ContentPageRepository.d.ts +0 -6
- package/lib/content-page-repository/ContentPageRepository.js +0 -29
- package/lib/content-page-repository/ContentPageRepository.js.map +0 -1
- package/lib/content-page-repository/TransformationOptions.d.ts +0 -4
- package/lib/content-page-repository/TransformationOptions.js +0 -2
- package/lib/content-page-repository/TransformationOptions.js.map +0 -1
- package/lib/content-page-repository/index.d.ts +0 -1
- package/lib/content-page-repository/index.js +0 -2
- package/lib/content-page-repository/index.js.map +0 -1
- package/lib/content-page-repository/mapJSON.d.ts +0 -1
- package/lib/content-page-repository/mapJSON.js +0 -21
- package/lib/content-page-repository/mapJSON.js.map +0 -1
- package/lib/content-page-repository/transformContentPage.d.ts +0 -3
- package/lib/content-page-repository/transformContentPage.js +0 -21
- package/lib/content-page-repository/transformContentPage.js.map +0 -1
- package/lib/content-page-repository/transformMarkdown.d.ts +0 -1
- package/lib/content-page-repository/transformMarkdown.js +0 -10
- package/lib/content-page-repository/transformMarkdown.js.map +0 -1
- package/lib/content-page-repository/transformPicture.d.ts +0 -3
- package/lib/content-page-repository/transformPicture.js +0 -39
- package/lib/content-page-repository/transformPicture.js.map +0 -1
- package/lib/index.d.ts +0 -6
- package/lib/index.js +0 -5
- package/lib/index.js.map +0 -1
- package/lib/types.d.ts +0 -42
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
- package/lib/ui-kit/BlockItem.d.ts +0 -7
- package/lib/ui-kit/BlockItem.js +0 -6
- package/lib/ui-kit/BlockItem.js.map +0 -1
- package/lib/ui-kit/Button.d.ts +0 -5
- package/lib/ui-kit/Button.js +0 -2
- package/lib/ui-kit/Button.js.map +0 -1
- package/lib/ui-kit/HeaderItem.d.ts +0 -3
- package/lib/ui-kit/HeaderItem.js +0 -8
- package/lib/ui-kit/HeaderItem.js.map +0 -1
- package/lib/ui-kit/LikeButton.d.ts +0 -5
- package/lib/ui-kit/LikeButton.js +0 -13
- package/lib/ui-kit/LikeButton.js.map +0 -1
- package/lib/ui-kit/Link.d.ts +0 -5
- package/lib/ui-kit/Link.js +0 -2
- package/lib/ui-kit/Link.js.map +0 -1
- package/lib/ui-kit/Logo.d.ts +0 -5
- package/lib/ui-kit/Logo.js +0 -14
- package/lib/ui-kit/Logo.js.map +0 -1
- package/lib/ui-kit/PrimaryButton.d.ts +0 -5
- package/lib/ui-kit/PrimaryButton.js +0 -6
- package/lib/ui-kit/PrimaryButton.js.map +0 -1
- package/lib/ui-kit/SVG.d.ts +0 -12
- package/lib/ui-kit/SVG.js +0 -6
- package/lib/ui-kit/SVG.js.map +0 -1
- package/lib/ui-kit/TopItem.d.ts +0 -9
- package/lib/ui-kit/TopItem.js +0 -8
- package/lib/ui-kit/TopItem.js.map +0 -1
- package/lib/useLink.d.ts +0 -8
- package/lib/useLink.js +0 -17
- package/lib/useLink.js.map +0 -1
package/package.json
CHANGED
package/dist/Blocks.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const Blocks: {
|
|
2
|
-
Header: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Header").HeaderProps, any>, context?: any) => any;
|
|
3
|
-
ProductColumnBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductColumnBlock").ProductColumnBlockProps, any>, context?: any) => any;
|
|
4
|
-
Text: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Text").TextProps, any>, context?: any) => any;
|
|
5
|
-
TextWithImage: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./TextWithImage").TextWithImageProps, any>, context?: any) => any;
|
|
6
|
-
RichText: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./RichText").RichTextProps, any>, context?: any) => any;
|
|
7
|
-
Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Placeholder").PlaceholderProps, any>, context?: any) => any;
|
|
8
|
-
ProductBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductBlock").ProductBlockProps, any>, context?: any) => any;
|
|
9
|
-
};
|
package/dist/Blocks.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Blocks = void 0;
|
|
3
|
-
const Header_1 = require("./Header");
|
|
4
|
-
const Placeholder_1 = require("./Placeholder");
|
|
5
|
-
const ProductColumnBlock_1 = require("./ProductColumnBlock");
|
|
6
|
-
const RichText_1 = require("./RichText");
|
|
7
|
-
const Text_1 = require("./Text");
|
|
8
|
-
const TextWithImage_1 = require("./TextWithImage");
|
|
9
|
-
const ProductBlock_1 = require("./ProductBlock");
|
|
10
|
-
exports.Blocks = {
|
|
11
|
-
Header: Header_1.Header,
|
|
12
|
-
ProductColumnBlock: ProductColumnBlock_1.ProductColumnBlock,
|
|
13
|
-
Text: Text_1.Text,
|
|
14
|
-
TextWithImage: TextWithImage_1.TextWithImage,
|
|
15
|
-
RichText: RichText_1.RichText,
|
|
16
|
-
Placeholder: Placeholder_1.Placeholder,
|
|
17
|
-
ProductBlock: ProductBlock_1.ProductBlock,
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=Blocks.js.map
|
package/dist/Blocks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../src/Blocks.ts"],"names":[],"mappings":";;AAAA,qCAAkC;AAClC,+CAA4C;AAC5C,6DAA0D;AAC1D,yCAAsC;AACtC,iCAA8B;AAC9B,mDAAgD;AAChD,iDAA8C;AAEjC,QAAA,MAAM,GAAG;IACpB,MAAM,EAAN,eAAM;IACN,kBAAkB,EAAlB,uCAAkB;IAClB,IAAI,EAAJ,WAAI;IACJ,aAAa,EAAb,6BAAa;IACb,QAAQ,EAAR,mBAAQ;IACR,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,2BAAY;CACb,CAAC"}
|
package/dist/ContentPage.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ContentPageContext } from './ContentPageContext';
|
|
2
|
-
import type { BlockDef, ContentPageDef } from './types';
|
|
3
|
-
interface BlockDecoratorProps<VNode> {
|
|
4
|
-
blockClassName: string;
|
|
5
|
-
block: BlockDef;
|
|
6
|
-
render: (props: {
|
|
7
|
-
blockClassName: string;
|
|
8
|
-
block: BlockDef;
|
|
9
|
-
}) => VNode;
|
|
10
|
-
}
|
|
11
|
-
export declare type BlockDecorator<VNode = any> = (props: BlockDecoratorProps<VNode>) => any;
|
|
12
|
-
export interface ContentPageProps {
|
|
13
|
-
className?: string;
|
|
14
|
-
data: ContentPageDef;
|
|
15
|
-
context: ContentPageContext;
|
|
16
|
-
blockDecorator?: BlockDecorator;
|
|
17
|
-
}
|
|
18
|
-
export declare const ContentPage: (props: import("@redneckz/uni-jsx").PropsWithChildren<ContentPageProps, any>, context?: any) => any;
|
|
19
|
-
export {};
|
package/dist/ContentPage.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.ContentPage = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const Blocks_1 = require("./Blocks");
|
|
6
|
-
const LikeControl_1 = require("./LikeControl");
|
|
7
|
-
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
8
|
-
exports.ContentPage = (0, uni_jsx_1.JSX)(({ className, data: { style: pageStyle, blocks, likeControl }, context, blockDecorator = defaultBlockDecorator, }) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("div", { className: `grid grid-cols-12 ${style2className(pageStyle)} ${className}`, children: blocks && blocks.map(renderBlock) }), likeControl && ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-end sticky bottom-0 pointer-events-none", children: (0, jsx_runtime_1.jsx)(LikeControl_1.LikeControl, { className: "rounded-tl-lg pointer-events-auto", context: context }) }))] }));
|
|
10
|
-
function renderBlock(block, i) {
|
|
11
|
-
const { type } = block;
|
|
12
|
-
if (!(type in Blocks_1.Blocks)) {
|
|
13
|
-
console.warn(`No block with "${type}" is registered`);
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const BlockComponent = Blocks_1.Blocks[type];
|
|
17
|
-
return blockDecorator({
|
|
18
|
-
blockClassName: style2className(block.style),
|
|
19
|
-
block,
|
|
20
|
-
render: (props) => {
|
|
21
|
-
const { content, blocks } = props.block;
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)(BlockComponent, { className: props.blockClassName, context: context, ...content, children: blocks && blocks.map(renderBlock) }, `${type}-${i}`));
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
function style2className(style) {
|
|
28
|
-
return style ? style.join(' ') : '';
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=ContentPage.js.map
|
package/dist/ContentPage.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPage.js","sourceRoot":"","sources":["../src/ContentPage.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,qCAAkC;AAClC,+CAA4C;AAmB5C,MAAM,qBAAqB,GAAmB,CAAC,EAAE,cAAc,EAAE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AG,CAAC,WAAW,CAAC,IAL7B,GAAG,IAAI,IAAI,CAAC,EAAE,CAMJ,CAClB,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CACF,CAAC;AAEF,SAAS,eAAe,CAAC,KAAkC;IACzD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface Router {
|
|
2
|
-
pathname: string;
|
|
3
|
-
query: Record<string, string | string[] | undefined>;
|
|
4
|
-
href?: string;
|
|
5
|
-
basePath?: string;
|
|
6
|
-
push: (url: string) => void;
|
|
7
|
-
}
|
|
8
|
-
export interface LikeService {
|
|
9
|
-
likeCount: number;
|
|
10
|
-
like: () => void;
|
|
11
|
-
dislike: () => void;
|
|
12
|
-
}
|
|
13
|
-
export interface ContentPageContext {
|
|
14
|
-
useRouter: () => Router;
|
|
15
|
-
useLikeService: () => LikeService;
|
|
16
|
-
handlerDecorator?: <F extends Function>(handler: F) => F;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageContext.js","sourceRoot":"","sources":["../src/ContentPageContext.tsx"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ContentPageMeta } from './types';
|
|
2
|
-
export interface ContentPageHeadProps {
|
|
3
|
-
HeadComponent: Function;
|
|
4
|
-
data: ContentPageMeta;
|
|
5
|
-
}
|
|
6
|
-
export declare const ContentPageHead: (props: import("@redneckz/uni-jsx").PropsWithChildren<ContentPageHeadProps, any>, context?: any) => any;
|
package/dist/ContentPageHead.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.ContentPageHead = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.ContentPageHead = (0, uni_jsx_1.JSX)(({ HeadComponent, data, children }) => {
|
|
6
|
-
const { title, description, keywords, robots, og } = data;
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)(HeadComponent, { children: [(0, jsx_runtime_1.jsx)("title", { children: title }), (0, jsx_runtime_1.jsx)("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description && (0, jsx_runtime_1.jsx)("meta", { name: "description", content: description }), keywords && (0, jsx_runtime_1.jsx)("meta", { name: "keywords", content: keywords.join(',') }), robots && (0, jsx_runtime_1.jsx)("meta", { name: "robots", content: robots.join(',') }), og
|
|
8
|
-
? Object.entries(og).map(([key, value]) => ((0, jsx_runtime_1.jsx)("meta", { name: `og:${key}`, content: value }, key)))
|
|
9
|
-
: null, children] }));
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=ContentPageHead.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageHead.js","sourceRoot":"","sources":["../src/ContentPageHead.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAQ3B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAuB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7F,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC;IAC1D,OAAO,CACL,wBAAC,aAAa,eACZ,4CAAQ,KAAK,GAAS,EACtB,iCAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,qCAAqC,GAAG,EACrE,WAAW,IAAI,iCAAM,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,WAAW,GAAI,EAChE,QAAQ,IAAI,iCAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,EACjE,MAAM,IAAI,iCAAM,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,EAC3D,EAAE;gBACD,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACvC,iCAAgB,IAAI,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAAtC,GAAG,CAAuC,CACtD,CAAC;gBACJ,CAAC,CAAC,IAAI,EACP,QAAQ,IACK,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/dist/Header.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { LinkContent } from './ui-kit/Link';
|
|
2
|
-
import type { ContentPageContext } from './ContentPageContext';
|
|
3
|
-
declare type HeaderMenuItem = LinkContent;
|
|
4
|
-
interface TopMenuItem extends HeaderMenuItem {
|
|
5
|
-
items?: HeaderMenuItem[];
|
|
6
|
-
}
|
|
7
|
-
export interface HeaderContent {
|
|
8
|
-
topItems?: TopMenuItem[];
|
|
9
|
-
}
|
|
10
|
-
export interface HeaderProps extends HeaderContent {
|
|
11
|
-
className?: string;
|
|
12
|
-
context: ContentPageContext;
|
|
13
|
-
}
|
|
14
|
-
export declare const Header: (props: import("@redneckz/uni-jsx").PropsWithChildren<HeaderProps, any>, context?: any) => any;
|
|
15
|
-
export {};
|
package/dist/Header.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Header = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const HeaderItem_1 = require("./ui-kit/HeaderItem");
|
|
6
|
-
const Logo_1 = require("./ui-kit/Logo");
|
|
7
|
-
const TopItem_1 = require("./ui-kit/TopItem");
|
|
8
|
-
const useLink_1 = require("./useLink");
|
|
9
|
-
exports.Header = (0, uni_jsx_1.JSX)(({ className, context, topItems }) => {
|
|
10
|
-
const router = context.useRouter();
|
|
11
|
-
const activeTopItem = topItems?.find(isTopItemActive(router));
|
|
12
|
-
const activeSubItem = activeTopItem?.items?.find(isSubItemActive(router));
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `py-8 px-20 bg-white rounded-bl-3xl rounded-br-3xl ${className || ''}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)(Logo_1.Logo, { className: "mr-8" }), topItems?.map((_) => ((0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { active: _ === activeTopItem, ...(0, useLink_1.useLink)(context, _) }, _.href)))] }), activeTopItem?.items && ((0, jsx_runtime_1.jsx)("div", { className: "mt-10", children: activeTopItem.items.map((_) => ((0, jsx_runtime_1.jsx)(HeaderItem_1.HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...(0, useLink_1.useLink)(context, _) }, _.href))) }))] }));
|
|
14
|
-
});
|
|
15
|
-
const isURL = (href) => href?.includes('//');
|
|
16
|
-
const withoutQuery = (href) => (href || '').replace(/\/?\?.+/, '');
|
|
17
|
-
function isTopItemActive({ href, pathname }) {
|
|
18
|
-
return (item) => {
|
|
19
|
-
const itemHref = withoutQuery(item.href);
|
|
20
|
-
if (isURL(itemHref)) {
|
|
21
|
-
return Boolean(href && href.startsWith(itemHref));
|
|
22
|
-
}
|
|
23
|
-
return Boolean(item.href && pathname.startsWith(itemHref));
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function isSubItemActive({ href, pathname }) {
|
|
27
|
-
return (item) => {
|
|
28
|
-
return withoutQuery(item.href) === (isURL(item.href) ? withoutQuery(href) : pathname);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=Header.js.map
|
package/dist/Header.js.map
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,CAAC,CAAC;AAEH,MAAM,KAAK,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AAEtD,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAE5E,SAAS,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAU;IACjD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE;YACnB,OAAO,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;SACnD;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAU;IACjD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxF,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/Icons.d.ts
DELETED
package/dist/Icons.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Icons = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const SafeIcon = ((0, jsx_runtime_1.jsxs)("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.172 10.255c0-.695.564-1.259 1.259-1.259h.264a1.795 1.795 0 0 1 0 3.59h-.264v.037h.515a.63.63 0 1 1 0 1.259h-.515v.148a.63.63 0 1 1-1.258 0v-.172a.63.63 0 0 1 0-1.21v-2.393Zm1.259 1.073h.264a.537.537 0 0 0 0-1.073h-.264v1.073Z", fill: "#42AB44" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.602 15.918a4.09 4.09 0 1 0 0-8.18 4.09 4.09 0 0 0 0 8.18Zm0 1.259a5.348 5.348 0 1 0 0-10.697 5.348 5.348 0 0 0 0 10.697Z", fill: "#42AB44" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.215 4.018a.63.63 0 0 0-.629-.63h-.565a2.517 2.517 0 0 0-2.517 2.518V17.75a2.517 2.517 0 0 0 2.517 2.517h14.234a2.517 2.517 0 0 0 2.517-2.517V5.906a2.517 2.517 0 0 0-2.517-2.517H11.927a.63.63 0 0 0 0 1.258H21.256c.695 0 1.258.564 1.258 1.259V17.75c0 .695-.563 1.258-1.258 1.258H7.021a1.258 1.258 0 0 1-1.259-1.258V5.906c0-.695.564-1.259 1.259-1.259h.565a.63.63 0 0 0 .63-.63Z", fill: "#000" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.554 4.591a.63.63 0 0 0-.63.63v13.214c0 .347.282.629.63.629h4.442a.63.63 0 1 1 0 1.258H2.554a1.888 1.888 0 0 1-1.888-1.887V5.22c0-1.043.845-1.888 1.888-1.888h.29a.63.63 0 1 1 0 1.258h-.29Z", fill: "#000" })] }));
|
|
5
|
-
const CalendarIcon = ((0, jsx_runtime_1.jsxs)("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "9.853", cy: "9.854", r: "1.104", stroke: "#42AB44", strokeWidth: "1.333" }), (0, jsx_runtime_1.jsx)("path", { d: "M15.916 14.812a1.104 1.104 0 1 1-2.208 0 1.104 1.104 0 0 1 2.208 0Z", stroke: "#42AB44", strokeWidth: "1.333" }), (0, jsx_runtime_1.jsx)("path", { d: "m15.036 9.5-5.409 5.667", stroke: "#42AB44", strokeWidth: "1.333", strokeLinecap: "round" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m14.52 2.195 7.875 7.874c.26.26.26.683 0 .943l-11.3 11.3a.667.667 0 0 1-.942 0L2.28 14.436a.667.667 0 0 1 0-.943l1.681-1.681a.667.667 0 1 0-.943-.943L1.336 12.55a2 2 0 0 0 0 2.829l7.874 7.874a2 2 0 0 0 2.829 0l11.3-11.3a2 2 0 0 0 0-2.828l-7.875-7.874a2 2 0 0 0-2.829 0L9.617 4.27a.667.667 0 1 0 .943.943l3.018-3.018c.26-.26.683-.26.943 0Z", fill: "#000" }), (0, jsx_runtime_1.jsx)("path", { d: "M3.334 4.253h2.333M2.666 8.586h2M4.666 6.586h2.333", stroke: "#000", strokeWidth: "1.333", strokeLinecap: "round" })] }));
|
|
6
|
-
const MoneyIcon = ((0, jsx_runtime_1.jsxs)("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 25 23", children: [(0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.737 1c.377 0 .684.298.684.667V3c0 1.105-.92 2-2.053 2H7.184a.676.676 0 0 1-.684-.667c0-.368.306-.666.684-.666h7.184A.676.676 0 0 0 15.052 3V1.667c0-.369.307-.667.685-.667Z", fill: "#000" }), (0, jsx_runtime_1.jsx)("path", { d: "M5.474 8.334A.676.676 0 0 1 4.79 9a.676.676 0 0 1-.685-.666c0-.369.307-.667.685-.667.378 0 .684.298.684.667ZM5.474 11.667a.676.676 0 0 1-.684.666.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.378 0 .684.299.684.667ZM5.474 15a.676.676 0 0 1-.684.667.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.378 0 .684.299.684.667ZM8.896 8.334A.676.676 0 0 1 8.212 9a.676.676 0 0 1-.685-.666c0-.369.307-.667.685-.667.377 0 .684.298.684.667ZM8.896 11.667a.676.676 0 0 1-.684.666.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.377 0 .684.299.684.667ZM8.896 15a.676.676 0 0 1-.684.667.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.377 0 .684.299.684.667ZM12.316 8.334a.676.676 0 0 1-.684.666.676.676 0 0 1-.685-.666c0-.369.307-.667.685-.667.377 0 .684.298.684.667ZM12.316 11.667a.676.676 0 0 1-.684.666.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.377 0 .684.299.684.667ZM12.316 15a.676.676 0 0 1-.684.667.676.676 0 0 1-.685-.666c0-.368.307-.667.685-.667.377 0 .684.299.684.667ZM15.738 8.334a.676.676 0 0 1-.685.666.676.676 0 0 1-.684-.666c0-.369.306-.667.684-.667.378 0 .684.298.684.667Z", fill: "#000" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.92 1.667A.676.676 0 0 0 4.238 1a.676.676 0 0 0-.684.667V3a.676.676 0 0 1-.685.667h-.815c-1.134 0-2.053.895-2.053 2v12c0 1.104.919 2 2.053 2h9.578a.676.676 0 0 0 .684-.667.676.676 0 0 0-.684-.667H2.053a.676.676 0 0 1-.685-.666v-12c0-.369.307-.667.685-.667h.815c1.134 0 2.053-.895 2.053-2V1.667Zm13.553 6c0 .368.306.666.684.666a.676.676 0 0 0 .684-.666V4.333a.676.676 0 0 0-.684-.666.676.676 0 0 0-.684.666v3.334Z", fill: "#000" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m19.16 9.71 3.9.948c.538.127.941.592.941 1.153v3.177a.676.676 0 0 1-.684.667.676.676 0 0 1-.684-.667v-3.06l-3.79-.922-3.79.922v4.302c0 1.516.822 2.945 2.206 3.786h.001l1.585.967 1.216-.7a.694.694 0 0 1 .937.236.657.657 0 0 1-.241.913l-1.25.719a1.293 1.293 0 0 1-1.336-.006l-1.636-.998c-1.77-1.075-2.85-2.925-2.85-4.917v-4.42c0-.56.403-1.025.941-1.152l3.9-.949c.206-.056.428-.056.634 0Z", fill: "#42AB44" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m19.106 12.373 1.783.5a.94.94 0 0 1 .69.91v2.357l-.002.018c-.033.616-.12 1.159-.384 1.659-.267.505-.677.898-1.228 1.292l-.01.007-.58.386a.94.94 0 0 1-1.076-.008l-.75-.527c-.916-.643-1.444-1.72-1.444-2.845v-2.34a.94.94 0 0 1 .69-.908l1.783-.5a.905.905 0 0 1 .528 0Zm-.264 1.314-1.368.384v2.051c0 .733.345 1.391.875 1.763l.5.352.316-.209c.46-.33.682-.577.811-.821.131-.248.203-.563.234-1.103v-2.033l-1.368-.384Z", fill: "#42AB44" })] }));
|
|
7
|
-
exports.Icons = {
|
|
8
|
-
SafeIcon,
|
|
9
|
-
CalendarIcon,
|
|
10
|
-
MoneyIcon,
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=Icons.js.map
|
package/dist/Icons.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.js","sourceRoot":"","sources":["../src/Icons.tsx"],"names":[],"mappings":";;;AAAA,MAAM,QAAQ,GAAG,CACf,iCAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,aACrE,iCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,uOAAuO,EACzO,IAAI,EAAC,SAAS,GACd,EACF,iCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,E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AC,MAAM,GACX,EACF,iCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,gaAAga,EACla,IAAI,EAAC,MAAM,GACX,EACF,iCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,mYAAmY,EACrY,IAAI,EAAC,SAAS,GACd,EACF,iCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,2ZAA2Z,EAC7Z,IAAI,EAAC,SAAS,GACd,IACE,CACP,CAAC;AAEW,QAAA,KAAK,GAAG;IACnB,QAAQ;IACR,YAAY;IACZ,SAAS;CACV,CAAC"}
|
package/dist/Img.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Picture, ImgSource } from './types';
|
|
2
|
-
export interface TextWithImageProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
image: Picture;
|
|
5
|
-
}
|
|
6
|
-
export declare const Img: (props: import("@redneckz/uni-jsx").PropsWithChildren<TextWithImageProps, any>, context?: any) => any;
|
|
7
|
-
export declare function formatToMimeType(format: ImgSource['format']): string | undefined;
|
package/dist/Img.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.formatToMimeType = exports.Img = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.Img = (0, uni_jsx_1.JSX)(({ className, image }) => ((0, jsx_runtime_1.jsxs)("picture", { className: className || '', children: [image.sources &&
|
|
6
|
-
image.sources.map(({ src, format }) => ((0, jsx_runtime_1.jsx)("source", { srcSet: src, type: formatToMimeType(format) }, src))), (0, jsx_runtime_1.jsx)("img", { src: image.src, alt: image.alt, title: image.title })] })));
|
|
7
|
-
function formatToMimeType(format) {
|
|
8
|
-
return format ? `image/${String(format)}` : undefined;
|
|
9
|
-
}
|
|
10
|
-
exports.formatToMimeType = formatToMimeType;
|
|
11
|
-
//# sourceMappingURL=Img.js.map
|
package/dist/Img.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Img.js","sourceRoot":"","sources":["../src/Img.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAQ3B,QAAA,GAAG,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACnE,qCAAS,SAAS,EAAE,SAAS,IAAI,EAAE,aAChC,KAAK,CAAC,OAAO;YACZ,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CACrC,mCAAkB,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,IAAhD,GAAG,CAAiD,CAClE,CAAC,EACJ,gCAAK,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,IACnD,CACX,CAAC,CAAC;AAEH,SAAgB,gBAAgB,CAAC,MAA2B;IAC1D,OAAO,MAAM,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC;AAFD,4CAEC"}
|
package/dist/LikeControl.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ContentPageContext } from './ContentPageContext';
|
|
2
|
-
export interface LikeControlProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
context: ContentPageContext;
|
|
5
|
-
}
|
|
6
|
-
export declare const LikeControl: (props: import("@redneckz/uni-jsx").PropsWithChildren<LikeControlProps, any>, context?: any) => any;
|
package/dist/LikeControl.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.LikeControl = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const LikeButton_1 = require("./ui-kit/LikeButton");
|
|
6
|
-
exports.LikeControl = (0, uni_jsx_1.JSX)(({ className, context }) => {
|
|
7
|
-
const likeService = context.useLikeService();
|
|
8
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `border-second-light border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, children: [(0, jsx_runtime_1.jsx)(LikeButton_1.LikeButton, { onClick: likeService.like }), (0, jsx_runtime_1.jsx)(LikeButton_1.LikeButton, { onClick: likeService.dislike, className: "rotate-180" }), (0, jsx_runtime_1.jsx)("span", { className: "select-none", children: likeService.likeCount })] }));
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=LikeControl.js.map
|
package/dist/LikeControl.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LikeControl.js","sourceRoot":"","sources":["../src/LikeControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,oDAAiD;AAOpC,QAAA,WAAW,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC1E,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAE7C,OAAO,CACL,iCACE,SAAS,EAAE,qHACT,SAAS,IAAI,EACf,EAAE,aAEF,uBAAC,uBAAU,IAAC,OAAO,EAAE,WAAW,CAAC,IAAI,GAAI,EACzC,uBAAC,uBAAU,IAAC,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,SAAS,EAAC,YAAY,GAAG,EACnE,iCAAM,SAAS,EAAC,aAAa,YAAE,WAAW,CAAC,SAAS,GAAQ,IACxD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/dist/Placeholder.d.ts
DELETED
package/dist/Placeholder.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Placeholder = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.Placeholder = (0, uni_jsx_1.JSX)(({ className, children }) => {
|
|
6
|
-
return (0, jsx_runtime_1.jsx)("div", { className: className || '', children: children });
|
|
7
|
-
});
|
|
8
|
-
//# sourceMappingURL=Placeholder.js.map
|
package/dist/Placeholder.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../src/Placeholder.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAQ3B,QAAA,WAAW,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3E,OAAO,gCAAK,SAAS,EAAE,SAAS,IAAI,EAAE,YAAG,QAAQ,GAAO,CAAC;AAC3D,CAAC,CAAC,CAAC"}
|
package/dist/ProductBlock.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ContentPageContext } from './ContentPageContext';
|
|
2
|
-
import { Icons } from './Icons';
|
|
3
|
-
import { Picture } from './types';
|
|
4
|
-
import type { LinkContent } from './ui-kit/Link';
|
|
5
|
-
export interface Benefit {
|
|
6
|
-
label: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
icon?: keyof typeof Icons;
|
|
9
|
-
}
|
|
10
|
-
export interface ProductBlockContent {
|
|
11
|
-
title?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
image?: Picture;
|
|
14
|
-
benefits?: Benefit[];
|
|
15
|
-
items?: string[];
|
|
16
|
-
button?: LinkContent;
|
|
17
|
-
}
|
|
18
|
-
export interface ProductBlockProps extends ProductBlockContent {
|
|
19
|
-
className?: string;
|
|
20
|
-
context: ContentPageContext;
|
|
21
|
-
}
|
|
22
|
-
export declare const ProductBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<ProductBlockProps, any>, context?: any) => any;
|
package/dist/ProductBlock.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.ProductBlock = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const Icons_1 = require("./Icons");
|
|
6
|
-
const Img_1 = require("./Img");
|
|
7
|
-
const BlockItem_1 = require("./ui-kit/BlockItem");
|
|
8
|
-
const PrimaryButton_1 = require("./ui-kit/PrimaryButton");
|
|
9
|
-
const useLink_1 = require("./useLink");
|
|
10
|
-
exports.ProductBlock = (0, uni_jsx_1.JSX)((props) => {
|
|
11
|
-
const { className, context, title, description, benefits, button, image, items } = props;
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)("section", { className: `font-sans bg-white rounded-[40px] h-[470px] flex justify-between relative overflow-hidden ${className}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: ['flex', 'flex-col', 'p-11', image && 'pr-0'].filter(Boolean).join(' '), children: [title && (0, jsx_runtime_1.jsx)("h1", { className: "font-medium text-title2 m-0 mb-4 whitespace-pre-wrap", children: title }), description && ((0, jsx_runtime_1.jsx)("div", { className: "font-normal text-base text-second-primary mb-7", children: description })), benefits?.length ? (0, jsx_runtime_1.jsx)("div", { className: "flex gap-6", children: benefits.map(renderBenefit) }) : null, items?.length ? ((0, jsx_runtime_1.jsx)("section", { className: "flex flex-col", role: "list", children: items.map((_) => ((0, jsx_runtime_1.jsx)(BlockItem_1.BlockItem, { className: "mt-6", text: _ }, _))) })) : null, button?.text ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-auto", children: (0, jsx_runtime_1.jsx)(PrimaryButton_1.PrimaryButton, { ...(0, useLink_1.useLink)(context, button) }) })) : null] }), image && (0, jsx_runtime_1.jsx)("div", { className: "h-full flex", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: image, className: "flex" }) })] }));
|
|
13
|
-
});
|
|
14
|
-
function renderBenefit(benefit, index) {
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex gap-4 items-center", children: [benefit.icon && ((0, jsx_runtime_1.jsx)("div", { className: "h-11 w-11 min-w-11 min-h-11 bg-second-light rounded-full p-[10px] box-border", children: Icons_1.Icons[benefit.icon] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1 flex-col", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-medium text-xl m-0", children: benefit.label }), benefit.description && ((0, jsx_runtime_1.jsx)("div", { className: "font-normal text-sm text-second-primary", children: benefit.description }))] })] }, index));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=ProductBlock.js.map
|
package/dist/ProductBlock.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlock.js","sourceRoot":"","sources":["../src/ProductBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,mCAAgC;AAChC,+BAA4B;AAE5B,kDAA+C;AAE/C,0DAAuD;AACvD,uCAAoC;AAsBvB,QAAA,YAAY,GAAG,IAAA,aAAG,EAAoB,CAAC,KAAK,EAAE,EAAE;IAC3D,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAEzF,OAAO,CACL,qCACE,SAAS,EAAE,6FAA6F,SAAS,EAAE,aAEnH,iCAAK,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAA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E,OAAO,CAAC,KAAK,GAAM,EAC3D,OAAO,CAAC,WAAW,IAAI,CACtB,gCAAK,SAAS,EAAC,yCAAyC,YAAE,OAAO,CAAC,WAAW,GAAO,CACrF,IACG,KAXE,KAAK,CAYT,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ContentPageContext } from './ContentPageContext';
|
|
2
|
-
import type { LinkContent } from './ui-kit/Link';
|
|
3
|
-
export interface ProductColumnBlockContent {
|
|
4
|
-
title?: string;
|
|
5
|
-
items?: string[];
|
|
6
|
-
button?: LinkContent;
|
|
7
|
-
promo?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface ProductColumnBlockProps extends ProductColumnBlockContent {
|
|
10
|
-
className?: string;
|
|
11
|
-
context: ContentPageContext;
|
|
12
|
-
}
|
|
13
|
-
export declare const ProductColumnBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<ProductColumnBlockProps, any>, context?: any) => any;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.ProductColumnBlock = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const BlockItem_1 = require("./ui-kit/BlockItem");
|
|
6
|
-
const PrimaryButton_1 = require("./ui-kit/PrimaryButton");
|
|
7
|
-
const useLink_1 = require("./useLink");
|
|
8
|
-
exports.ProductColumnBlock = (0, uni_jsx_1.JSX)(({ className, context, title, items, button, promo }) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `relative p-8 bg-white text-black font-sans rounded-[40px] ${className || ''}`, children: [(0, jsx_runtime_1.jsx)("p", { className: "text-title font-medium m-0", children: title }), items?.length ? ((0, jsx_runtime_1.jsx)("section", { className: "flex flex-col", role: "list", children: items.map((_) => ((0, jsx_runtime_1.jsx)(BlockItem_1.BlockItem, { className: "mt-6", text: _ }, _))) })) : null, button?.text ? (0, jsx_runtime_1.jsx)(PrimaryButton_1.PrimaryButton, { className: "mt-12", ...(0, useLink_1.useLink)(context, button) }) : null, promo && ((0, jsx_runtime_1.jsx)("div", { className: "absolute right-0 bottom-0 bg-promo font-normal px-12 py-3 text-xl rounded-tl-[74px] rounded-br-[40px]", children: "\u0410\u043A\u0446\u0438\u044F" }))] }));
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=ProductColumnBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProductColumnBlock.js","sourceRoot":"","sources":["../src/ProductColumnBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,kDAA+C;AAE/C,0DAAuD;AACvD,uCAAoC;AAcvB,QAAA,kBAAkB,GAAG,IAAA,aAAG,EACnC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IACtD,OAAO,CACL,iCACE,SAAS,EAAE,6DAA6D,SAAS,IAAI,EAAE,EAAE,aAEzF,8BAAG,SAAS,EAAC,4BAA4B,YAAE,KAAK,GAAK,EACpD,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,oCAAS,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,YAC3C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAChB,uBAAC,qBAAS,IAAS,SAAS,EAAC,MAAM,EAAC,IAAI,EAAE,CAAC,IAA3B,CAAC,CAA8B,CAChD,CAAC,GACM,CACX,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,uBAAC,6BAAa,IAAC,SAAS,EAAC,OAAO,KAAK,IAAA,iBAAO,EAAC,OAAO,EAAE,MAAM,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,EACvF,KAAK,IAAI,CACR,gCAAK,SAAS,EAAC,uGAAuG,+CAEhH,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/dist/RichText.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface RichTextContent {
|
|
2
|
-
__html?: string;
|
|
3
|
-
__md?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface RichTextProps extends RichTextContent {
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const RichText: (props: import("@redneckz/uni-jsx").PropsWithChildren<RichTextProps, any>, context?: any) => any;
|
package/dist/RichText.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.RichText = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.RichText = (0, uni_jsx_1.JSX)(({ className, __html, __md }) => {
|
|
6
|
-
const html = __html || __md;
|
|
7
|
-
const props = Object.assign({ className: className || '' }, html ? { dangerouslySetInnerHTML: { __html: html } } : {});
|
|
8
|
-
return (0, jsx_runtime_1.jsx)("div", { ...props });
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=RichText.js.map
|
package/dist/RichText.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.js","sourceRoot":"","sources":["../src/RichText.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAW3B,QAAA,QAAQ,GAAG,IAAA,aAAG,EAAgB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,IAAI,GAAG,MAAM,IAAI,IAAI,CAAC;IAC5B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CACzB,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE,EAAE,EAC9B,IAAI,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAC1D,CAAC;IACF,OAAO,mCAAS,KAAK,GAAI,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
package/dist/Text.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface TextContent {
|
|
2
|
-
primary?: string;
|
|
3
|
-
secondary?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface TextProps extends TextContent {
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const Text: (props: import("@redneckz/uni-jsx").PropsWithChildren<TextProps, any>, context?: any) => any;
|
package/dist/Text.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Text = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.Text = (0, uni_jsx_1.JSX)(({ className, primary, secondary, children }) => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: className || '', children: [primary && (0, jsx_runtime_1.jsx)("p", { className: "font-bold text-slate-700 leading-snug", children: primary }), secondary && (0, jsx_runtime_1.jsx)("p", { className: "mt-2 text-sm text-slate-600", children: secondary }), children] }));
|
|
7
|
-
});
|
|
8
|
-
//# sourceMappingURL=Text.js.map
|
package/dist/Text.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAW3B,QAAA,IAAI,GAAG,IAAA,aAAG,EAAY,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IACjF,OAAO,CACL,iCAAK,SAAS,EAAE,SAAS,IAAI,EAAE,aAC5B,OAAO,IAAI,8BAAG,SAAS,EAAC,uCAAuC,YAAE,OAAO,GAAK,EAC7E,SAAS,IAAI,8BAAG,SAAS,EAAC,6BAA6B,YAAE,SAAS,GAAK,EACvE,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/dist/TextWithImage.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Picture } from './types';
|
|
2
|
-
export interface TextWithImageContent {
|
|
3
|
-
primary?: string;
|
|
4
|
-
image?: Picture;
|
|
5
|
-
}
|
|
6
|
-
export interface TextWithImageProps extends TextWithImageContent {
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const TextWithImage: (props: import("@redneckz/uni-jsx").PropsWithChildren<TextWithImageProps, any>, context?: any) => any;
|
package/dist/TextWithImage.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.TextWithImage = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const Img_1 = require("./Img");
|
|
6
|
-
exports.TextWithImage = (0, uni_jsx_1.JSX)(({ className, primary, image }) => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: className || '', children: [primary && (0, jsx_runtime_1.jsx)("p", { className: "font-bold text-slate-700 leading-snug", children: primary }), image && (0, jsx_runtime_1.jsx)(Img_1.Img, { image: image })] }));
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=TextWithImage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextWithImage.js","sourceRoot":"","sources":["../src/TextWithImage.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+BAA4B;AAYf,QAAA,aAAa,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IACrF,OAAO,CACL,iCAAK,SAAS,EAAE,SAAS,IAAI,EAAE,aAC5B,OAAO,IAAI,8BAAG,SAAS,EAAC,uCAAuC,YAAE,OAAO,GAAK,EAC7E,KAAK,IAAI,uBAAC,SAAG,IAAC,KAAK,EAAE,KAAK,GAAI,IAC3B,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/dist/api/LikeAPI.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface LikeData {
|
|
2
|
-
node_id: string;
|
|
3
|
-
value: number;
|
|
4
|
-
}
|
|
5
|
-
export declare function LikeAPI(projectId: string, baseURL: string): {
|
|
6
|
-
getLikeCount: (...nodeIds: string[]) => Promise<LikeData[]>;
|
|
7
|
-
like: (nodeId: string) => Promise<number>;
|
|
8
|
-
dislike: (nodeId: string) => Promise<number>;
|
|
9
|
-
};
|
package/dist/api/LikeAPI.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.LikeAPI = void 0;
|
|
3
|
-
const AUTH_PREFIX = 'guest';
|
|
4
|
-
const STORAGE_KEY = 'likesToken';
|
|
5
|
-
function LikeAPI(projectId, baseURL) {
|
|
6
|
-
async function getLikeCount(...nodeIds) {
|
|
7
|
-
if (!nodeIds.length) {
|
|
8
|
-
return [];
|
|
9
|
-
}
|
|
10
|
-
const { token: Authorization } = await auth();
|
|
11
|
-
try {
|
|
12
|
-
const response = await fetch(`/assist/v1/public/projects/${projectId}/nodes/likes`, {
|
|
13
|
-
method: 'POST',
|
|
14
|
-
mode: 'cors',
|
|
15
|
-
headers: { 'Content-Type': 'application/json', Authorization },
|
|
16
|
-
body: JSON.stringify({
|
|
17
|
-
node_ids: nodeIds,
|
|
18
|
-
}),
|
|
19
|
-
});
|
|
20
|
-
const { likes } = await response.json();
|
|
21
|
-
return likes || [];
|
|
22
|
-
}
|
|
23
|
-
catch (e) {
|
|
24
|
-
console.error(e);
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
async function like(nodeId) {
|
|
29
|
-
if (!nodeId) {
|
|
30
|
-
return 0;
|
|
31
|
-
}
|
|
32
|
-
const { token: Authorization, name } = await auth();
|
|
33
|
-
try {
|
|
34
|
-
const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/like`, {
|
|
35
|
-
method: 'POST',
|
|
36
|
-
mode: 'cors',
|
|
37
|
-
headers: {
|
|
38
|
-
'Content-Type': 'application/json',
|
|
39
|
-
Authorization,
|
|
40
|
-
UserID: name,
|
|
41
|
-
},
|
|
42
|
-
body: JSON.stringify({
|
|
43
|
-
node_id: nodeId,
|
|
44
|
-
user_name: name,
|
|
45
|
-
}),
|
|
46
|
-
});
|
|
47
|
-
const { likes } = await response.json();
|
|
48
|
-
return likes || 0;
|
|
49
|
-
}
|
|
50
|
-
catch (e) {
|
|
51
|
-
console.error(e);
|
|
52
|
-
return 0;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
async function dislike(nodeId) {
|
|
56
|
-
if (!nodeId) {
|
|
57
|
-
return 0;
|
|
58
|
-
}
|
|
59
|
-
const { token: Authorization, name } = await auth();
|
|
60
|
-
try {
|
|
61
|
-
const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/unlike`, {
|
|
62
|
-
method: 'POST',
|
|
63
|
-
mode: 'cors',
|
|
64
|
-
headers: {
|
|
65
|
-
'Content-Type': 'application/json',
|
|
66
|
-
Authorization,
|
|
67
|
-
UserID: name,
|
|
68
|
-
},
|
|
69
|
-
body: JSON.stringify({
|
|
70
|
-
node_id: nodeId,
|
|
71
|
-
user_name: name,
|
|
72
|
-
}),
|
|
73
|
-
});
|
|
74
|
-
const { likes } = await response.json();
|
|
75
|
-
return likes || 0;
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
console.error(e);
|
|
79
|
-
return 0;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
async function auth() {
|
|
83
|
-
try {
|
|
84
|
-
const userData = JSON.parse(globalThis.localStorage.getItem(STORAGE_KEY) || '');
|
|
85
|
-
if (userData?.token) {
|
|
86
|
-
return userData;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
catch (e) {
|
|
90
|
-
// do nothing
|
|
91
|
-
}
|
|
92
|
-
try {
|
|
93
|
-
const response = await fetch(`${baseURL}/assist/v1/public/auth`, {
|
|
94
|
-
method: 'POST',
|
|
95
|
-
mode: 'cors',
|
|
96
|
-
headers: {
|
|
97
|
-
'Content-Type': 'application/json',
|
|
98
|
-
},
|
|
99
|
-
body: JSON.stringify({
|
|
100
|
-
prefix: AUTH_PREFIX,
|
|
101
|
-
}),
|
|
102
|
-
});
|
|
103
|
-
const { token, name } = await response.json();
|
|
104
|
-
globalThis.localStorage.setItem(STORAGE_KEY, JSON.stringify({ token, name }));
|
|
105
|
-
return { token, name };
|
|
106
|
-
}
|
|
107
|
-
catch (e) {
|
|
108
|
-
console.error(e);
|
|
109
|
-
return {};
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return {
|
|
113
|
-
getLikeCount,
|
|
114
|
-
like,
|
|
115
|
-
dislike,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
exports.LikeAPI = LikeAPI;
|
|
119
|
-
//# sourceMappingURL=LikeAPI.js.map
|