jamespot-user-api 1.0.100 → 1.0.102
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/documentation/assets/search.js +1 -1
- package/documentation/classes/AdminStoreApi.html +1 -1
- package/documentation/classes/JApplicationApi.html +8 -8
- package/documentation/classes/JArticleApi.html +1 -1
- package/documentation/classes/JAssetReservation.html +1 -1
- package/documentation/classes/JAudienceApi.html +1 -1
- package/documentation/classes/JBaseApi.html +1 -1
- package/documentation/classes/JBookmarkApi.html +1 -1
- package/documentation/classes/JCommunityApi.html +1 -1
- package/documentation/classes/JDiapazoneApi.html +1 -1
- package/documentation/classes/JFileApi.html +5 -5
- package/documentation/classes/JFilebankApi.html +1 -1
- package/documentation/classes/JGroupApi.html +7 -7
- package/documentation/classes/JLandApi.html +1 -1
- package/documentation/classes/JLicenseApi.html +4 -4
- package/documentation/classes/JMessengerApi.html +1 -1
- package/documentation/classes/JSearchApi.html +6 -6
- package/documentation/classes/JShareApi.html +1 -1
- package/documentation/classes/JTaxonomyApi.html +2 -2
- package/documentation/classes/JUserApi.html +4 -4
- package/documentation/classes/JWedocApi.html +1 -1
- package/documentation/classes/JamespotUserApi.html +1 -1
- package/documentation/classes/Network.html +1 -1
- package/documentation/classes/WindowBrowser.html +1 -1
- package/documentation/enums/StudioApplicationStatus.html +1 -1
- package/documentation/index.html +1 -1
- package/documentation/interfaces/AccessRightObject.html +1 -1
- package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
- package/documentation/interfaces/ApiError.html +1 -1
- package/documentation/interfaces/ApiWrapper.html +1 -1
- package/documentation/interfaces/BaseAutocomplete.html +1 -1
- package/documentation/interfaces/BaseMessage.html +1 -1
- package/documentation/interfaces/Category.html +1 -1
- package/documentation/interfaces/FileBankProps.html +1 -1
- package/documentation/interfaces/FolderProps.html +1 -1
- package/documentation/interfaces/ListFilterSpec.html +1 -1
- package/documentation/interfaces/OF.html +1 -1
- package/documentation/interfaces/ObjectListProps.html +1 -1
- package/documentation/interfaces/PagingResults.html +1 -1
- package/documentation/interfaces/RootFolderProps.html +1 -1
- package/documentation/interfaces/SearchCategoryModel.html +1 -1
- package/documentation/interfaces/SearchCategoryValue.html +1 -1
- package/documentation/interfaces/SearchConfig.html +1 -1
- package/documentation/interfaces/SearchFacetModel.html +1 -1
- package/documentation/interfaces/SearchFacetValueModel.html +1 -1
- package/documentation/interfaces/SearchQuery.html +1 -1
- package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
- package/documentation/interfaces/SearchQueryOption.html +1 -1
- package/documentation/interfaces/SearchQueryResult.html +1 -1
- package/documentation/interfaces/SearchQuerySortModel.html +1 -1
- package/documentation/interfaces/SearchResultCatProps.html +1 -1
- package/documentation/interfaces/SearchResultPropsApp.html +1 -1
- package/documentation/interfaces/SearchResultPropsObject.html +1 -1
- package/documentation/interfaces/SpotProps.html +1 -1
- package/documentation/interfaces/Taxonomy.html +1 -1
- package/documentation/interfaces/TaxonomyCreate.html +1 -1
- package/documentation/interfaces/WindowInterface.html +1 -1
- package/documentation/modules.html +3 -3
- package/lib/jamespot-user-api.js +1 -1
- package/lib/jamespot-user-api.js.map +1 -1
- package/lib/src/apis/article/article.d.ts +1 -0
- package/lib/src/apis/jamespotUserApi.d.ts +2 -0
- package/lib/src/apis/mediaLibrary/mediaLibrary.d.ts +5 -0
- package/lib/src/apis/mediaLibrary/mediaLibrary.mock.d.ts +2 -0
- package/lib/src/apis/mediaLibrary/mediaLibrary.test.d.ts +1 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/types/index.d.ts +1 -0
- package/lib/src/types/mediaLibrary.d.ts +14 -0
- package/lib/src/types/utils.d.ts +3 -0
- package/lib/src/types/widgets.d.ts +90 -31
- package/lib/src/util/file.d.ts +7 -0
- package/lib/src/util/file.test.d.ts +1 -0
- package/package.json +1 -1
- package/phpunitMock/objectListMediaLibraryGetUnclassifiedFiles-default.json +13 -0
|
@@ -1,61 +1,92 @@
|
|
|
1
|
-
|
|
1
|
+
import { AudienceAutocomplete } from './autocomplete';
|
|
2
|
+
import { jArticleLittle } from './utils';
|
|
3
|
+
export declare type WidgetLayer = {
|
|
4
|
+
uniqid: string;
|
|
2
5
|
title: string;
|
|
3
|
-
|
|
6
|
+
locked: boolean;
|
|
7
|
+
visible: boolean;
|
|
8
|
+
widgets: WidgetWrapperProps[];
|
|
4
9
|
position?: WidgetVector;
|
|
5
10
|
};
|
|
6
|
-
export declare type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
isCover?: boolean;
|
|
10
|
-
doSomethingAfterIsMounted?: boolean;
|
|
11
|
+
export declare type WidgetWrapperProps<T = CombinedWidgetType> = {
|
|
12
|
+
title: string;
|
|
13
|
+
widget: WidgetExtendedType & T;
|
|
11
14
|
};
|
|
12
15
|
export declare type WidgetDefaultProps = {
|
|
13
16
|
width?: number | undefined;
|
|
14
17
|
inplace: boolean;
|
|
15
18
|
isComponentVisible?: boolean;
|
|
16
19
|
mode: WidgetDisplayMode;
|
|
17
|
-
isMounted?: () => void;
|
|
18
20
|
onClick?: () => void;
|
|
19
|
-
onChange: (content: CombinedWidgetContent) => void;
|
|
21
|
+
onChange: (content: CombinedWidgetContent, override?: boolean) => void;
|
|
20
22
|
onStateChange?: (state: WidgetStateProps) => void;
|
|
21
23
|
};
|
|
22
|
-
export declare
|
|
23
|
-
export declare type
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export declare type CombinedWidgetType = WidgetTypeKeys[keyof WidgetTypeKeys];
|
|
25
|
+
export declare type WidgetTypeKeys = {
|
|
26
|
+
'widget-article-button': WidgetArticleButtonType;
|
|
27
|
+
'widget-article-gallery': WidgetArticleGalleryType;
|
|
28
|
+
'widget-article-title': WidgetArticleTitleType;
|
|
29
|
+
'widget-article-text': WidgetArticleTextType;
|
|
30
|
+
'widget-article-image': WidgetArticleImageType;
|
|
31
|
+
'widget-article-attachment': WidgetArticleAttachmentType;
|
|
32
|
+
};
|
|
33
|
+
export declare type WidgetContentKeys = {
|
|
34
|
+
'widget-article-button': WidgetArticleButtonContent;
|
|
35
|
+
'widget-article-gallery': WidgetArticleGalleryContent;
|
|
36
|
+
'widget-article-title': WidgetArticleTitleContent;
|
|
37
|
+
'widget-article-text': WidgetArticleTextContent;
|
|
38
|
+
'widget-article-image': WidgetArticleImageContent;
|
|
39
|
+
'widget-article-attachment': WidgetArticleAttachmentContent;
|
|
40
|
+
};
|
|
41
|
+
export declare type WidgetKeys = keyof WidgetTypeKeys;
|
|
42
|
+
export declare type WidgetExtendedType = {
|
|
43
|
+
layers?: string[];
|
|
44
|
+
};
|
|
45
|
+
export declare type WidgetArticleButtonType = {
|
|
29
46
|
name: 'widget-article-button';
|
|
47
|
+
uniqid: string;
|
|
48
|
+
content: WidgetArticleButtonContent;
|
|
30
49
|
};
|
|
31
|
-
export declare type WidgetArticleGalleryType =
|
|
50
|
+
export declare type WidgetArticleGalleryType = {
|
|
32
51
|
name: 'widget-article-gallery';
|
|
52
|
+
uniqid: string;
|
|
53
|
+
content: WidgetArticleGalleryContent;
|
|
33
54
|
};
|
|
34
|
-
export declare type WidgetArticleTitleType =
|
|
55
|
+
export declare type WidgetArticleTitleType = {
|
|
35
56
|
name: 'widget-article-title';
|
|
57
|
+
uniqid: string;
|
|
58
|
+
content: WidgetArticleTitleContent;
|
|
36
59
|
};
|
|
37
|
-
export declare type WidgetArticleTextType =
|
|
60
|
+
export declare type WidgetArticleTextType = {
|
|
38
61
|
name: 'widget-article-text';
|
|
62
|
+
uniqid: string;
|
|
63
|
+
content: WidgetArticleTextContent;
|
|
39
64
|
};
|
|
40
|
-
export declare type WidgetArticleImageType =
|
|
65
|
+
export declare type WidgetArticleImageType = {
|
|
41
66
|
name: 'widget-article-image';
|
|
67
|
+
uniqid: string;
|
|
68
|
+
content: WidgetArticleImageContent;
|
|
42
69
|
};
|
|
43
|
-
export declare type WidgetArticleAttachmentType =
|
|
70
|
+
export declare type WidgetArticleAttachmentType = {
|
|
44
71
|
name: 'widget-article-attachment';
|
|
72
|
+
uniqid: string;
|
|
73
|
+
content: WidgetArticleAttachmentContent;
|
|
45
74
|
};
|
|
46
|
-
export declare type WidgetTypes = WidgetArticleButtonType | WidgetArticleGalleryType | WidgetArticleTitleType | WidgetArticleTextType | WidgetArticleAttachmentType | WidgetArticleImageType;
|
|
47
75
|
export declare type CSSTextAlignType = 'left' | 'right' | 'center' | 'justify';
|
|
48
76
|
export declare type CSSBackgroundPosition = 'top' | 'bottom' | 'center' | 'left' | 'right';
|
|
49
77
|
export declare type CSSBackgroundSize = 'auto' | 'contain' | 'cover';
|
|
50
78
|
export declare type VariantSizeType = 'sm' | 'md' | 'lg';
|
|
51
79
|
export declare type VariantType = 'contained' | 'outlined';
|
|
80
|
+
export declare type OpeningType = 'link' | 'anchor' | 'popup';
|
|
52
81
|
export declare type WidgetArticleGalleryContent = {
|
|
53
82
|
gap?: string;
|
|
54
|
-
|
|
55
|
-
|
|
83
|
+
columnCount?: string;
|
|
84
|
+
files?: WidgetFileType[];
|
|
56
85
|
galleryDisplay?: 'portrait' | 'landscape';
|
|
86
|
+
heightMode?: 'auto' | 'custom';
|
|
87
|
+
heightModeValue?: string;
|
|
57
88
|
};
|
|
58
|
-
export declare type
|
|
89
|
+
export declare type WidgetArticleTitleContent = {
|
|
59
90
|
widgets?: WidgetWrapperProps[];
|
|
60
91
|
text?: string;
|
|
61
92
|
textAlign?: CSSTextAlignType;
|
|
@@ -63,14 +94,25 @@ export declare type WidgetTitleContent = {
|
|
|
63
94
|
color?: string;
|
|
64
95
|
backgroundColor?: string;
|
|
65
96
|
};
|
|
66
|
-
export declare type
|
|
97
|
+
export declare type WidgetArticleTextContent = {
|
|
67
98
|
text?: string;
|
|
68
99
|
color?: string;
|
|
69
100
|
fontSize?: string;
|
|
70
101
|
lineHeight?: string;
|
|
71
102
|
linkColor?: string;
|
|
72
103
|
};
|
|
73
|
-
export declare type
|
|
104
|
+
export declare type OpeningTypeLink = {
|
|
105
|
+
url: string;
|
|
106
|
+
target: string;
|
|
107
|
+
};
|
|
108
|
+
export declare type OpeningTypeAnchor = {
|
|
109
|
+
uniqid: string;
|
|
110
|
+
};
|
|
111
|
+
export declare type OpeningTypePopup = {
|
|
112
|
+
title: string;
|
|
113
|
+
widgets: WidgetWrapperProps[];
|
|
114
|
+
};
|
|
115
|
+
export declare type WidgetArticleButtonContent = {
|
|
74
116
|
text?: string;
|
|
75
117
|
color?: string;
|
|
76
118
|
backgroundColor?: string;
|
|
@@ -78,8 +120,12 @@ export declare type WidgetButtonContent = {
|
|
|
78
120
|
fontSize?: string;
|
|
79
121
|
buttonSize?: VariantSizeType;
|
|
80
122
|
variant?: VariantType;
|
|
123
|
+
openingType?: OpeningType;
|
|
124
|
+
openingTypeLink?: OpeningTypeLink;
|
|
125
|
+
openingTypeAnchor?: OpeningTypeAnchor;
|
|
126
|
+
openingTypePopup?: OpeningTypePopup;
|
|
81
127
|
};
|
|
82
|
-
export declare type
|
|
128
|
+
export declare type WidgetArticleImageContent = {
|
|
83
129
|
file?: WidgetFileType;
|
|
84
130
|
useFilter?: boolean;
|
|
85
131
|
displayAs?: 'image' | 'background';
|
|
@@ -94,18 +140,18 @@ export declare type WidgetArticleAttachmentContent = {
|
|
|
94
140
|
};
|
|
95
141
|
export declare type CombinedWidgetContent = {
|
|
96
142
|
widgets?: WidgetWrapperProps[];
|
|
97
|
-
} & (
|
|
98
|
-
export declare type WidgetContentKeys = keyof CombinedWidgetContent;
|
|
143
|
+
} & (WidgetArticleTextContent | WidgetArticleImageContent | WidgetArticleTitleContent | WidgetArticleButtonContent | WidgetArticleGalleryContent | WidgetArticleAttachmentContent);
|
|
99
144
|
export declare type WidgetStateProps = {
|
|
100
145
|
busy?: boolean | undefined;
|
|
101
146
|
loading?: boolean | undefined;
|
|
102
147
|
initialized?: boolean | undefined;
|
|
103
148
|
mounted?: boolean | undefined;
|
|
149
|
+
hover?: boolean | undefined;
|
|
104
150
|
};
|
|
105
151
|
export declare type WidgetDefinitionProps = {
|
|
106
152
|
label: string;
|
|
107
153
|
description: string;
|
|
108
|
-
name:
|
|
154
|
+
name: WidgetKeys;
|
|
109
155
|
img: string;
|
|
110
156
|
available: boolean;
|
|
111
157
|
panel: {
|
|
@@ -121,6 +167,7 @@ export declare type WidgetVector = {
|
|
|
121
167
|
export declare type WidgetFileType = {
|
|
122
168
|
id: number;
|
|
123
169
|
filename: string;
|
|
170
|
+
name?: string;
|
|
124
171
|
mimetype: string;
|
|
125
172
|
dimension: {
|
|
126
173
|
width: number;
|
|
@@ -138,6 +185,18 @@ export declare type WidgetsRootState = {
|
|
|
138
185
|
export declare type WidgetsState = {
|
|
139
186
|
token?: string | undefined;
|
|
140
187
|
ids: Record<string, WidgetWrapperProps>;
|
|
188
|
+
layers: Record<string, WidgetLayer>;
|
|
141
189
|
states: Record<string, WidgetStateProps>;
|
|
142
190
|
modal: WidgetModalProps | undefined;
|
|
191
|
+
editableMap: Record<string, {
|
|
192
|
+
index: number;
|
|
193
|
+
uniqid: string;
|
|
194
|
+
}>;
|
|
195
|
+
currentEditableIndex: number;
|
|
196
|
+
currentEditableWidgetId: string | undefined;
|
|
197
|
+
};
|
|
198
|
+
export declare type ArticleWidgetType = jArticleLittle & {
|
|
199
|
+
articleWidgets: WidgetWrapperProps[];
|
|
200
|
+
articleWidgetsCover: number | undefined;
|
|
201
|
+
_audience: AudienceAutocomplete[];
|
|
143
202
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FileResponse, WidgetFileType } from '../types';
|
|
2
|
+
export declare const allowedFileExtensions: string[];
|
|
3
|
+
export declare const mimetypeMap: Record<string, string>;
|
|
4
|
+
export declare function getExtensionFromName(name: string | undefined): string | undefined;
|
|
5
|
+
export declare function getFileFamily(mime: string): string | undefined;
|
|
6
|
+
export declare function getMimetypeFromExtension(ext: string | undefined): string;
|
|
7
|
+
export declare function apiFileToWidgetFile(fileResponse: FileResponse): WidgetFileType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED