@newskit-render/standalone-components 1.13.0 → 1.14.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/cjs/article-recommendations/provider/recommendationsProvider.js +1 -1
- package/dist/cjs/article-recommendations/types/index.d.ts +15 -15
- package/dist/cjs/help-chat/types.d.ts +1 -1
- package/dist/cjs/help-hub/components/SearchBar/components/Highlight.d.ts +1 -1
- package/dist/cjs/help-hub/components/SearchBar/types.d.ts +1 -1
- package/dist/cjs/help-hub/components/Templates/types.d.ts +1 -1
- package/dist/cjs/help-hub/context/types.d.ts +1 -1
- package/dist/cjs/help-hub/provider/articleProvider.js +1 -1
- package/dist/cjs/help-hub/provider/landingPageProvider.js +1 -1
- package/dist/cjs/help-hub/provider/resultsProvider.js +1 -1
- package/dist/cjs/help-hub/provider/types.d.ts +1 -1
- package/dist/cjs/help-hub/types/index.d.ts +2 -2
- package/dist/cjs/rss-console/components/Templates/types.d.ts +1 -1
- package/dist/cjs/rss-console/context/types.d.ts +1 -1
- package/dist/esm/article-recommendations/provider/recommendationsProvider.js +1 -1
- package/dist/esm/article-recommendations/types/index.d.ts +15 -15
- package/dist/esm/help-chat/types.d.ts +1 -1
- package/dist/esm/help-hub/components/SearchBar/components/Highlight.d.ts +1 -1
- package/dist/esm/help-hub/components/SearchBar/types.d.ts +1 -1
- package/dist/esm/help-hub/components/Templates/types.d.ts +1 -1
- package/dist/esm/help-hub/context/types.d.ts +1 -1
- package/dist/esm/help-hub/provider/articleProvider.js +1 -1
- package/dist/esm/help-hub/provider/landingPageProvider.js +1 -1
- package/dist/esm/help-hub/provider/resultsProvider.js +1 -1
- package/dist/esm/help-hub/provider/types.d.ts +1 -1
- package/dist/esm/help-hub/types/index.d.ts +2 -2
- package/dist/esm/rss-console/components/Templates/types.d.ts +1 -1
- package/dist/esm/rss-console/context/types.d.ts +1 -1
- package/package.json +5 -5
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Publisher } from '@newskit-render/api';
|
|
2
2
|
import { MQ } from 'newskit';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
export
|
|
4
|
+
export type Article = {
|
|
5
5
|
href: string;
|
|
6
6
|
title: string;
|
|
7
7
|
text?: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type ArticleGridProps = {
|
|
10
10
|
overrides?: {
|
|
11
11
|
rowGap?: MQ<string>;
|
|
12
12
|
columnGap?: MQ<string>;
|
|
@@ -15,22 +15,22 @@ export declare type ArticleGridProps = {
|
|
|
15
15
|
size?: 'large' | 'small';
|
|
16
16
|
articles: Article[];
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type ArticleRecommendationProps = {
|
|
19
19
|
article: Article;
|
|
20
20
|
size: 'large' | 'small';
|
|
21
21
|
overrides?: ArticleRecommendationOverrides;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type Config = {
|
|
24
24
|
newskitApiEnvUrl: string;
|
|
25
25
|
newskitApiXApiKey: string;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type ProviderArgs = {
|
|
28
28
|
userId?: string;
|
|
29
29
|
publisher: Publisher;
|
|
30
30
|
articleId: string;
|
|
31
31
|
config?: Config;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type ArticleRecommendationOverrides = {
|
|
34
34
|
spaceStack?: MQ<string>;
|
|
35
35
|
card?: {
|
|
36
36
|
overrides?: {
|
|
@@ -60,29 +60,29 @@ export declare type ArticleRecommendationOverrides = {
|
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
export
|
|
64
|
-
export
|
|
65
|
-
export
|
|
63
|
+
export type ArticleTemplate = Record<string, Article[]>;
|
|
64
|
+
export type ArticleTypeName = 'recommendedArticles' | 'adlibraryMPU';
|
|
65
|
+
export type ArticleTypes = Record<ArticleTypeName, {
|
|
66
66
|
totalArticlesCount: number;
|
|
67
67
|
}>;
|
|
68
|
-
export
|
|
68
|
+
export type DpaTemplate = ArticleTypes & {
|
|
69
69
|
templateId: string;
|
|
70
70
|
columnCount: MQ<string>;
|
|
71
71
|
size: 'small' | 'large';
|
|
72
72
|
};
|
|
73
|
-
export
|
|
73
|
+
export type DpaTemplateWithArticles = {
|
|
74
74
|
templateId: string;
|
|
75
75
|
columnCount: MQ<string>;
|
|
76
76
|
size: 'small' | 'large';
|
|
77
77
|
} & Record<string, Article[]>;
|
|
78
|
-
export
|
|
78
|
+
export type ArticleRecommendationsProviderBaseContextType = {
|
|
79
79
|
dpaTemplates: DpaTemplate[];
|
|
80
80
|
};
|
|
81
|
-
export
|
|
81
|
+
export type ArticleRecommendationsProviderContextTypeWithArticles = {
|
|
82
82
|
dpaTemplates: DpaTemplateWithArticles[];
|
|
83
83
|
};
|
|
84
|
-
export
|
|
85
|
-
export
|
|
84
|
+
export type ArticleRecommendationsProviderContextType = ArticleRecommendationsProviderBaseContextType | ArticleRecommendationsProviderContextTypeWithArticles;
|
|
85
|
+
export type ArticleRecommendationsProviderProps = {
|
|
86
86
|
articleId: string;
|
|
87
87
|
context?: ArticleRecommendationsProviderBaseContextType;
|
|
88
88
|
children: ReactNode;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ContextOptions, PagesNameMap } from '../../context';
|
|
3
3
|
import { MQ, UncompiledTheme } from 'newskit';
|
|
4
4
|
import { ThemeDropdownObject } from '@newskit-render/shared-components';
|
|
5
|
-
export
|
|
5
|
+
export type LayoutTemplateProps = {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
topSpaceStack?: MQ<string>;
|
|
8
8
|
customTheme?: UncompiledTheme;
|
|
@@ -53,5 +53,5 @@ export interface ArticlePageContextOptions extends BaseContextOptions {
|
|
|
53
53
|
title: string;
|
|
54
54
|
content: string;
|
|
55
55
|
}
|
|
56
|
-
export
|
|
56
|
+
export type ContextOptions = LandingPageContextOptions | ResultsPageContextOptions | ArticlePageContextOptions;
|
|
57
57
|
export {};
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Hit as AlgoliaHit } from '@algolia/client-search';
|
|
2
|
-
export
|
|
2
|
+
export type Hit = AlgoliaHit<{
|
|
3
3
|
title: string;
|
|
4
4
|
objectID: string;
|
|
5
5
|
content: string;
|
|
6
6
|
}>;
|
|
7
|
-
export
|
|
7
|
+
export type AlgoliaCredentials = {
|
|
8
8
|
appId: string;
|
|
9
9
|
apiKey: string;
|
|
10
10
|
indexName: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ContextOptions, PagesNameMap } from '../../context';
|
|
3
3
|
import { MQ, UncompiledTheme } from 'newskit';
|
|
4
4
|
import { ThemeDropdownObject } from '@newskit-render/shared-components';
|
|
5
|
-
export
|
|
5
|
+
export type LayoutTemplateProps = {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
topSpaceStack?: MQ<string>;
|
|
8
8
|
customTheme?: UncompiledTheme;
|
|
@@ -24,4 +24,4 @@ export interface FeedDetailsPageContextOptions extends BaseContextOptions {
|
|
|
24
24
|
}
|
|
25
25
|
export interface CreateFeedPageContextOptions extends BaseContextOptions {
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type ContextOptions = FeedsListPageContextOptions | FeedDetailsPageContextOptions | CreateFeedPageContextOptions;
|
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Publisher } from '@newskit-render/api';
|
|
2
2
|
import { MQ } from 'newskit';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
export
|
|
4
|
+
export type Article = {
|
|
5
5
|
href: string;
|
|
6
6
|
title: string;
|
|
7
7
|
text?: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type ArticleGridProps = {
|
|
10
10
|
overrides?: {
|
|
11
11
|
rowGap?: MQ<string>;
|
|
12
12
|
columnGap?: MQ<string>;
|
|
@@ -15,22 +15,22 @@ export declare type ArticleGridProps = {
|
|
|
15
15
|
size?: 'large' | 'small';
|
|
16
16
|
articles: Article[];
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type ArticleRecommendationProps = {
|
|
19
19
|
article: Article;
|
|
20
20
|
size: 'large' | 'small';
|
|
21
21
|
overrides?: ArticleRecommendationOverrides;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type Config = {
|
|
24
24
|
newskitApiEnvUrl: string;
|
|
25
25
|
newskitApiXApiKey: string;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type ProviderArgs = {
|
|
28
28
|
userId?: string;
|
|
29
29
|
publisher: Publisher;
|
|
30
30
|
articleId: string;
|
|
31
31
|
config?: Config;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type ArticleRecommendationOverrides = {
|
|
34
34
|
spaceStack?: MQ<string>;
|
|
35
35
|
card?: {
|
|
36
36
|
overrides?: {
|
|
@@ -60,29 +60,29 @@ export declare type ArticleRecommendationOverrides = {
|
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
-
export
|
|
64
|
-
export
|
|
65
|
-
export
|
|
63
|
+
export type ArticleTemplate = Record<string, Article[]>;
|
|
64
|
+
export type ArticleTypeName = 'recommendedArticles' | 'adlibraryMPU';
|
|
65
|
+
export type ArticleTypes = Record<ArticleTypeName, {
|
|
66
66
|
totalArticlesCount: number;
|
|
67
67
|
}>;
|
|
68
|
-
export
|
|
68
|
+
export type DpaTemplate = ArticleTypes & {
|
|
69
69
|
templateId: string;
|
|
70
70
|
columnCount: MQ<string>;
|
|
71
71
|
size: 'small' | 'large';
|
|
72
72
|
};
|
|
73
|
-
export
|
|
73
|
+
export type DpaTemplateWithArticles = {
|
|
74
74
|
templateId: string;
|
|
75
75
|
columnCount: MQ<string>;
|
|
76
76
|
size: 'small' | 'large';
|
|
77
77
|
} & Record<string, Article[]>;
|
|
78
|
-
export
|
|
78
|
+
export type ArticleRecommendationsProviderBaseContextType = {
|
|
79
79
|
dpaTemplates: DpaTemplate[];
|
|
80
80
|
};
|
|
81
|
-
export
|
|
81
|
+
export type ArticleRecommendationsProviderContextTypeWithArticles = {
|
|
82
82
|
dpaTemplates: DpaTemplateWithArticles[];
|
|
83
83
|
};
|
|
84
|
-
export
|
|
85
|
-
export
|
|
84
|
+
export type ArticleRecommendationsProviderContextType = ArticleRecommendationsProviderBaseContextType | ArticleRecommendationsProviderContextTypeWithArticles;
|
|
85
|
+
export type ArticleRecommendationsProviderProps = {
|
|
86
86
|
articleId: string;
|
|
87
87
|
context?: ArticleRecommendationsProviderBaseContextType;
|
|
88
88
|
children: ReactNode;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ContextOptions, PagesNameMap } from '../../context';
|
|
3
3
|
import { MQ, UncompiledTheme } from 'newskit';
|
|
4
4
|
import { ThemeDropdownObject } from '@newskit-render/shared-components';
|
|
5
|
-
export
|
|
5
|
+
export type LayoutTemplateProps = {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
topSpaceStack?: MQ<string>;
|
|
8
8
|
customTheme?: UncompiledTheme;
|
|
@@ -53,5 +53,5 @@ export interface ArticlePageContextOptions extends BaseContextOptions {
|
|
|
53
53
|
title: string;
|
|
54
54
|
content: string;
|
|
55
55
|
}
|
|
56
|
-
export
|
|
56
|
+
export type ContextOptions = LandingPageContextOptions | ResultsPageContextOptions | ArticlePageContextOptions;
|
|
57
57
|
export {};
|
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Hit as AlgoliaHit } from '@algolia/client-search';
|
|
2
|
-
export
|
|
2
|
+
export type Hit = AlgoliaHit<{
|
|
3
3
|
title: string;
|
|
4
4
|
objectID: string;
|
|
5
5
|
content: string;
|
|
6
6
|
}>;
|
|
7
|
-
export
|
|
7
|
+
export type AlgoliaCredentials = {
|
|
8
8
|
appId: string;
|
|
9
9
|
apiKey: string;
|
|
10
10
|
indexName: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ContextOptions, PagesNameMap } from '../../context';
|
|
3
3
|
import { MQ, UncompiledTheme } from 'newskit';
|
|
4
4
|
import { ThemeDropdownObject } from '@newskit-render/shared-components';
|
|
5
|
-
export
|
|
5
|
+
export type LayoutTemplateProps = {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
topSpaceStack?: MQ<string>;
|
|
8
8
|
customTheme?: UncompiledTheme;
|
|
@@ -24,4 +24,4 @@ export interface FeedDetailsPageContextOptions extends BaseContextOptions {
|
|
|
24
24
|
}
|
|
25
25
|
export interface CreateFeedPageContextOptions extends BaseContextOptions {
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type ContextOptions = FeedsListPageContextOptions | FeedDetailsPageContextOptions | CreateFeedPageContextOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/standalone-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Newskit Render Standalone Components",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@emotion-icons/material-outlined": "3.14.0",
|
|
35
35
|
"@emotion/react": "11.10.4",
|
|
36
36
|
"@emotion/styled": "11.10.4",
|
|
37
|
-
"@newskit-render/api": "^1.
|
|
38
|
-
"@newskit-render/shared-components": "^1.
|
|
37
|
+
"@newskit-render/api": "^1.5.0",
|
|
38
|
+
"@newskit-render/shared-components": "^1.22.0",
|
|
39
39
|
"algoliasearch": "4.13.1",
|
|
40
40
|
"cross-fetch": "3.1.5",
|
|
41
41
|
"graphql": "15.6.0",
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"jest-junit": "12.0.0",
|
|
70
70
|
"jest-watch-typeahead": "0.6.3",
|
|
71
71
|
"lint-staged": "12.1.7",
|
|
72
|
-
"next": "
|
|
72
|
+
"next": "13.0.5",
|
|
73
73
|
"prettier": "2.2.1",
|
|
74
74
|
"react": "18.2.0",
|
|
75
75
|
"react-dom": "18.2.0",
|
|
76
76
|
"ts-jest": "27.1.3",
|
|
77
|
-
"typescript": "4.
|
|
77
|
+
"typescript": "4.9.3"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"next": ">= 12.1.0 <= 12.3.0",
|