wafields 0.43.0 → 0.45.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/common/index.d.ts +1 -0
- package/dist/common/text/LinkedText.d.ts +19 -0
- package/dist/common/text/LinkedText.stories.d.ts +17 -0
- package/dist/common/text/index.d.ts +2 -0
- package/dist/main/index.d.ts +1 -0
- package/dist/main/location/LocationTag.d.ts +3 -1
- package/dist/main/rss/RssItem.d.ts +10 -0
- package/dist/main/rss/RssItem.stories.d.ts +7 -0
- package/dist/main/rss/RssList.d.ts +10 -0
- package/dist/main/rss/RssList.stories.d.ts +7 -0
- package/dist/main/rss/index.d.ts +4 -0
- package/dist/wafields.cjs.js +41 -41
- package/dist/wafields.css +1 -1
- package/dist/wafields.es.js +4452 -4329
- package/package.json +1 -1
package/dist/common/index.d.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EntityType } from 'wenum';
|
|
3
|
+
export interface PidLink {
|
|
4
|
+
pid: string;
|
|
5
|
+
startPos: number;
|
|
6
|
+
}
|
|
7
|
+
interface RenderLinkParams {
|
|
8
|
+
key: string;
|
|
9
|
+
pid: string;
|
|
10
|
+
entityType: EntityType;
|
|
11
|
+
text: string;
|
|
12
|
+
}
|
|
13
|
+
interface LinkedTextProps {
|
|
14
|
+
content: string;
|
|
15
|
+
pidLinks?: PidLink[] | null;
|
|
16
|
+
renderLink: (params: RenderLinkParams) => ReactNode | undefined;
|
|
17
|
+
}
|
|
18
|
+
export default function LinkedText({ content, pidLinks, renderLink }: LinkedTextProps): ReactNode;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as LinkedText } from './LinkedText';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof LinkedText;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const PlainText: Story;
|
|
14
|
+
export declare const SingleLink: Story;
|
|
15
|
+
export declare const MultipleLinks: Story;
|
|
16
|
+
export declare const UnresolvedEntityFallsBackToText: Story;
|
|
17
|
+
export declare const RenderLinkReturnsUndefined: Story;
|
package/dist/main/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ interface LocationTagProps {
|
|
|
4
4
|
address: string;
|
|
5
5
|
locationType?: LocationType;
|
|
6
6
|
onClick?: ZeroFuncType;
|
|
7
|
+
isVertical?: boolean;
|
|
8
|
+
svgSize?: number;
|
|
7
9
|
}
|
|
8
|
-
declare function LocationTag({ address, locationType, onClick }: LocationTagProps): import("react").JSX.Element;
|
|
10
|
+
declare function LocationTag({ address, locationType, onClick, isVertical, svgSize }: LocationTagProps): import("react").JSX.Element;
|
|
9
11
|
export default LocationTag;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface RssItemProps {
|
|
2
|
+
title: string;
|
|
3
|
+
link: string;
|
|
4
|
+
pubDate: string;
|
|
5
|
+
sourceName: string;
|
|
6
|
+
sourceUrl?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function RssItem({ title, link, pubDate, sourceName, sourceUrl, className }: RssItemProps): import("react").JSX.Element;
|
|
10
|
+
export default RssItem;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as RssItem } from './RssItem';
|
|
3
|
+
declare const meta: Meta<typeof RssItem>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithoutSourceLink: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RssItemProps } from './RssItem';
|
|
2
|
+
export type RssItemData = Omit<RssItemProps, 'className'>;
|
|
3
|
+
interface RssListProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
itemClassName?: string;
|
|
6
|
+
items: RssItemData[];
|
|
7
|
+
emptyLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function RssList({ className, itemClassName, items, emptyLabel }: RssListProps): import("react").JSX.Element;
|
|
10
|
+
export default RssList;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as RssList } from './RssList';
|
|
3
|
+
declare const meta: Meta<typeof RssList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Empty: Story;
|