jamespot-user-api 1.0.96 → 1.0.97

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.
Files changed (63) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminStoreApi.html +1 -1
  3. package/documentation/classes/JApplicationApi.html +8 -8
  4. package/documentation/classes/JArticleApi.html +1 -1
  5. package/documentation/classes/JAssetReservation.html +1 -1
  6. package/documentation/classes/JAudienceApi.html +1 -1
  7. package/documentation/classes/JBaseApi.html +1 -1
  8. package/documentation/classes/JBookmarkApi.html +1 -1
  9. package/documentation/classes/JCommunityApi.html +1 -1
  10. package/documentation/classes/JConceptApi.html +2 -2
  11. package/documentation/classes/JDiapazoneApi.html +1 -1
  12. package/documentation/classes/JFileApi.html +1 -1
  13. package/documentation/classes/JFilebankApi.html +1 -1
  14. package/documentation/classes/JGroupApi.html +1 -1
  15. package/documentation/classes/JLandApi.html +1 -1
  16. package/documentation/classes/JLicenseApi.html +4 -4
  17. package/documentation/classes/JMessengerApi.html +1 -1
  18. package/documentation/classes/JSearchApi.html +6 -6
  19. package/documentation/classes/JShareApi.html +1 -1
  20. package/documentation/classes/JUserApi.html +4 -4
  21. package/documentation/classes/JWedocApi.html +1 -1
  22. package/documentation/classes/JamespotUserApi.html +1 -1
  23. package/documentation/classes/Network.html +1 -1
  24. package/documentation/classes/WindowBrowser.html +1 -1
  25. package/documentation/classes/WindowMock.html +2 -2
  26. package/documentation/enums/StudioApplicationStatus.html +1 -1
  27. package/documentation/index.html +1 -1
  28. package/documentation/interfaces/ApiError.html +1 -1
  29. package/documentation/interfaces/ApiWrapper.html +1 -1
  30. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  31. package/documentation/interfaces/BaseMessage.html +1 -1
  32. package/documentation/interfaces/Category.html +1 -1
  33. package/documentation/interfaces/CreateGroup.html +1 -1
  34. package/documentation/interfaces/FileBankProps.html +1 -1
  35. package/documentation/interfaces/FolderProps.html +1 -1
  36. package/documentation/interfaces/ListFilterSpec.html +1 -1
  37. package/documentation/interfaces/OF.html +1 -1
  38. package/documentation/interfaces/ObjectListProps.html +1 -1
  39. package/documentation/interfaces/PagingResults.html +1 -1
  40. package/documentation/interfaces/Result.html +1 -1
  41. package/documentation/interfaces/RootFolderProps.html +1 -1
  42. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  43. package/documentation/interfaces/SearchConfig.html +1 -1
  44. package/documentation/interfaces/SearchFacetModel.html +1 -1
  45. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  46. package/documentation/interfaces/SearchQuery.html +1 -1
  47. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  48. package/documentation/interfaces/SearchQueryOption.html +1 -1
  49. package/documentation/interfaces/SearchQueryResult.html +1 -1
  50. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  51. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  52. package/documentation/interfaces/SearchResultProps.html +1 -1
  53. package/documentation/interfaces/SpotProps.html +1 -1
  54. package/documentation/interfaces/Taxonomy.html +1 -1
  55. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  56. package/documentation/interfaces/WindowInterface.html +1 -1
  57. package/documentation/modules.html +1 -1
  58. package/lib/jamespot-user-api.js +1 -1
  59. package/lib/jamespot-user-api.js.map +1 -1
  60. package/lib/src/types/index.d.ts +1 -0
  61. package/lib/src/types/widgets.d.ts +143 -0
  62. package/lib/src/util/network.d.ts +1 -1
  63. package/package.json +1 -1
@@ -0,0 +1,143 @@
1
+ export declare type WidgetWrapperProps<T = WidgetTypes> = {
2
+ title: string;
3
+ widget: T;
4
+ position?: WidgetVector;
5
+ };
6
+ export declare type WidgetWrapperExtendedProps = {
7
+ isMandatory?: boolean;
8
+ isMainTitle?: boolean;
9
+ isCover?: boolean;
10
+ doSomethingAfterIsMounted?: boolean;
11
+ };
12
+ export declare type WidgetDefaultProps = {
13
+ width?: number | undefined;
14
+ inplace: boolean;
15
+ isComponentVisible?: boolean;
16
+ mode: WidgetDisplayMode;
17
+ isMounted?: () => void;
18
+ onClick?: () => void;
19
+ onChange: (content: CombinedWidgetContent) => void;
20
+ onStateChange?: (state: WidgetStateProps) => void;
21
+ };
22
+ export declare const widgetRefNames: readonly ["widget-article-button", "widget-article-gallery", "widget-article-title", "widget-article-text", "widget-article-attachment", "widget-article-image"];
23
+ export declare type WidgetType<T = CombinedWidgetContent> = {
24
+ name: typeof widgetRefNames[number];
25
+ uniqid: string;
26
+ content: T;
27
+ };
28
+ export declare type WidgetArticleButtonType = WidgetType<WidgetButtonContent> & {
29
+ name: 'widget-article-button';
30
+ };
31
+ export declare type WidgetArticleGalleryType = WidgetType<WidgetArticleGalleryContent> & {
32
+ name: 'widget-article-gallery';
33
+ };
34
+ export declare type WidgetArticleTitleType = WidgetType<WidgetTitleContent> & {
35
+ name: 'widget-article-title';
36
+ };
37
+ export declare type WidgetArticleTextType = WidgetType<WidgetTextContent> & {
38
+ name: 'widget-article-text';
39
+ };
40
+ export declare type WidgetArticleImageType = WidgetType<WidgetImageContent> & {
41
+ name: 'widget-article-image';
42
+ };
43
+ export declare type WidgetArticleAttachmentType = WidgetType<WidgetArticleAttachmentContent> & {
44
+ name: 'widget-article-attachment';
45
+ };
46
+ export declare type WidgetTypes = WidgetArticleButtonType | WidgetArticleGalleryType | WidgetArticleTitleType | WidgetArticleTextType | WidgetArticleAttachmentType | WidgetArticleImageType;
47
+ export declare type CSSTextAlignType = 'left' | 'right' | 'center' | 'justify';
48
+ export declare type CSSBackgroundPosition = 'top' | 'bottom' | 'center' | 'left' | 'right';
49
+ export declare type CSSBackgroundSize = 'auto' | 'contain' | 'cover';
50
+ export declare type VariantSizeType = 'sm' | 'md' | 'lg';
51
+ export declare type VariantType = 'contained' | 'outlined';
52
+ export declare type WidgetArticleGalleryContent = {
53
+ gap?: string;
54
+ horizontalNumber?: string;
55
+ widgets?: WidgetWrapperProps<WidgetArticleImageType>[];
56
+ galleryDisplay?: 'portrait' | 'landscape';
57
+ };
58
+ export declare type WidgetTitleContent = {
59
+ widgets?: WidgetWrapperProps[];
60
+ text?: string;
61
+ textAlign?: CSSTextAlignType;
62
+ heading?: string;
63
+ color?: string;
64
+ backgroundColor?: string;
65
+ };
66
+ export declare type WidgetTextContent = {
67
+ text?: string;
68
+ color?: string;
69
+ fontSize?: string;
70
+ lineHeight?: string;
71
+ linkColor?: string;
72
+ };
73
+ export declare type WidgetButtonContent = {
74
+ text?: string;
75
+ color?: string;
76
+ backgroundColor?: string;
77
+ borderRadius?: string;
78
+ fontSize?: string;
79
+ buttonSize?: VariantSizeType;
80
+ variant?: VariantType;
81
+ };
82
+ export declare type WidgetImageContent = {
83
+ file?: WidgetFileType;
84
+ useFilter?: boolean;
85
+ displayAs?: 'image' | 'background';
86
+ backgroundPosition?: CSSBackgroundPosition;
87
+ backgroundSize?: CSSBackgroundSize;
88
+ borderRadius?: string;
89
+ widgets?: WidgetWrapperProps[];
90
+ };
91
+ export declare type WidgetArticleAttachmentContent = {
92
+ files?: WidgetFileType[];
93
+ fileDisplay?: 'list' | 'gallery';
94
+ };
95
+ export declare type CombinedWidgetContent = {
96
+ widgets?: WidgetWrapperProps[];
97
+ } & (WidgetTextContent | WidgetImageContent | WidgetTitleContent | WidgetButtonContent | WidgetArticleGalleryContent | WidgetArticleAttachmentContent);
98
+ export declare type WidgetContentKeys = keyof CombinedWidgetContent;
99
+ export declare type WidgetStateProps = {
100
+ busy?: boolean | undefined;
101
+ loading?: boolean | undefined;
102
+ initialized?: boolean | undefined;
103
+ mounted?: boolean | undefined;
104
+ };
105
+ export declare type WidgetDefinitionProps = {
106
+ label: string;
107
+ description: string;
108
+ name: typeof widgetRefNames[number];
109
+ img: string;
110
+ available: boolean;
111
+ panel: {
112
+ useWrapper: boolean;
113
+ useEditor: boolean;
114
+ useWidgets: boolean;
115
+ };
116
+ };
117
+ export declare type WidgetVector = {
118
+ x: number;
119
+ y: number;
120
+ };
121
+ export declare type WidgetFileType = {
122
+ id: number;
123
+ filename: string;
124
+ mimetype: string;
125
+ dimension: {
126
+ width: number;
127
+ height: number;
128
+ };
129
+ };
130
+ export declare type WidgetDisplayMode = 'edit' | 'view';
131
+ export declare type WidgetModalProps = {
132
+ title?: string;
133
+ view?: any;
134
+ };
135
+ export declare type WidgetsRootState = {
136
+ widgets: WidgetsState;
137
+ };
138
+ export declare type WidgetsState = {
139
+ token?: string | undefined;
140
+ ids: Record<string, WidgetWrapperProps>;
141
+ states: Record<string, WidgetStateProps>;
142
+ modal: WidgetModalProps | undefined;
143
+ };
@@ -17,7 +17,7 @@ export declare class Network {
17
17
  getHostname(): Promise<string>;
18
18
  fetch({ o, f, ...body }: OF, signal?: AbortSignal | null): FetchReturnType;
19
19
  post<T, U = string[]>(body: OF, signal?: AbortSignal): Promise<ApiWrapper<T, U>>;
20
- postFile(body: FormData): Promise<FileResponse>;
20
+ postFile(body: FormData, token?: string): Promise<FileResponse>;
21
21
  postCSRF<T, U = string[]>(body: OF): Promise<ApiWrapper<T, U>>;
22
22
  maybePostCSRF<T, U = string[]>(body: MaybeWithCsrf<OF>): Promise<ApiWrapper<T, U>>;
23
23
  postToken<T, U = string[]>(body: OF): Promise<ApiWrapper<T, U>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-user-api",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "scripts": {
5
5
  "build": "npx webpack --env NODE_ENV=production",
6
6
  "build-dev-vm": "npx webpack --env NODE_ENV=development --env NODE_BUILD=VM",