jamespot-front-business 1.1.35 → 1.1.37

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/types.d.ts CHANGED
@@ -2,12 +2,13 @@ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
2
2
  import { EntityState, Action, Dispatch as Dispatch$1, PayloadAction } from '@reduxjs/toolkit';
3
3
  import * as _reduxjs_toolkit_dist_tsHelpers from '@reduxjs/toolkit/dist/tsHelpers';
4
4
  import * as jamespot_user_api from 'jamespot-user-api';
5
- import { ApplicationType, WidgetsRootState, JamespotUserApi, AudienceAutocomplete, StudioApplicationBase, Taxonomy, ReservationList, BookableAssetList, AssetReservationConfiguration, BookmarkRawList, FaqHookProperties, FaqAccess, ExtendedFaqCategory, FaqList, JLandMap, AdminLicensesNotAssigned, Model as Model$1, NetworkType, WedocFileType, jUserLittle, PagingResults, TVChannelList, TinyMCECommonOptions, jUserList, WidgetKeys, WidgetWrapperProps, WidgetTypeKeys, WidgetDefinitionProps, WidgetsState, CombinedWidgetContent, WidgetVector, WidgetStateProps } from 'jamespot-user-api';
5
+ import { ApplicationType, WidgetsRootState, JamespotUserApi, AudienceAutocomplete, StudioApplicationBase, Taxonomy, ReservationList, BookableAssetList, AssetReservationConfiguration, BookmarkRawList, FaqHookProperties, FaqAccess, ExtendedFaqCategory, FaqList, JLandMap, AdminLicensesNotAssigned, Model as Model$1, NetworkType, WedocFileType, jUserLittle, PagingResults, TVChannelList, TinyMCECommonOptions, jUserList, WidgetKeys, WidgetWrapperProps, WidgetTypeKeys, WidgetDefinitionProps, CombinedWidgetContent, WidgetsState, WidgetVector, WidgetStateProps } from 'jamespot-user-api';
6
6
  import * as redux from 'redux';
7
7
  import { Dispatch } from 'redux';
8
8
  import React from 'react';
9
9
  import { MapCreationFront as MapCreationFront$1 } from 'src/types';
10
10
  import { Loading as Loading$1 } from 'src/types/utils';
11
+ import { jCommentList } from 'jamespot-user-api/lib/src/types/comment';
11
12
 
12
13
  declare type ApplicationRootState = {
13
14
  entities: {
@@ -101,6 +102,9 @@ interface StudioApplication {
101
102
  manifest: StudioAppManifest;
102
103
  inWorkVersion?: StudioApplication;
103
104
  fields: AppFieldsFormItem[];
105
+ views: AppViewsFields;
106
+ audience: StudioAudienceType;
107
+ installFor: AppInstallForType[];
104
108
  }
105
109
  interface StudioAppManifest {
106
110
  appShortName: string;
@@ -139,8 +143,22 @@ declare type AppFieldsFormItem = {
139
143
  id: string;
140
144
  type: AppFormItemTypes;
141
145
  properties?: AppFieldFormProperty[];
142
- mandatory: boolean;
143
- views: AppViews;
146
+ mandatory?: boolean;
147
+ views?: AppViews;
148
+ value?: any;
149
+ isActive?: boolean;
150
+ isFixed?: boolean;
151
+ isOptional?: boolean;
152
+ };
153
+ declare type AppViewFieldItem = {
154
+ type: AppFormItemTypes | ExtraAppFieldsItemViews;
155
+ properties: AppFieldFormProperty[];
156
+ isUsed: boolean;
157
+ isOptional: boolean;
158
+ isFixed: boolean;
159
+ isLockedValue: boolean;
160
+ value: any;
161
+ pos: number;
144
162
  };
145
163
  interface AppViews {
146
164
  create: boolean;
@@ -150,6 +168,17 @@ interface AppViews {
150
168
  filter: boolean;
151
169
  view: boolean;
152
170
  }
171
+ declare type AppViewsFields = {
172
+ create: AppViewFieldsItems;
173
+ popup: AppViewFieldsItems;
174
+ edit: AppViewFieldsItems;
175
+ list: AppViewFieldsItems;
176
+ filter: AppViewFieldsItems;
177
+ view: AppViewFieldsItems;
178
+ };
179
+ declare type AppViewFieldsItems = {
180
+ [id: string]: AppViewFieldItem;
181
+ };
153
182
  declare type ViewName = 'create' | 'popup' | 'edit' | 'list' | 'filter' | 'view';
154
183
  declare const viewsList: ViewName[];
155
184
  declare enum AppFormItemTypes {
@@ -173,6 +202,14 @@ declare enum AppFormItemTypes {
173
202
  USERLINK = "USERLINK",
174
203
  CONTENTLINK = "CONTENTLINK"
175
204
  }
205
+ declare enum ExtraAppFieldsItemViews {
206
+ TITLE = "TITLE",
207
+ USER = "USER",
208
+ PUBLISHTO = "PUBLISHTO",
209
+ SENDALERTTOSUBSCRIBERS = "SENDALERTTOSUBSCRIBERS",
210
+ RECEIVEACOPY = "RECEIVEACOPY",
211
+ CREATIONDATE = "CREATIONDATE"
212
+ }
176
213
  declare type CheckBoxOption = {
177
214
  label: string;
178
215
  value: any;
@@ -195,6 +232,17 @@ declare enum AppFieldFormPropertyTypes {
195
232
  }
196
233
  declare const AppFormUniqueList: AppFormItemTypes[];
197
234
  declare const AppFormBannedFromViews: Map<AppFormItemTypes, ViewName[]>;
235
+ declare type MappedExtraFieldsWithView = {
236
+ fixed: ExtraAppFieldsItemViews[];
237
+ optional: ExtraAppFieldsItemViews[];
238
+ };
239
+ declare const MapExtraFieldsWithView: {
240
+ [k: string]: MappedExtraFieldsWithView;
241
+ };
242
+ declare type AppFieldView = {
243
+ fieldIdRef: string;
244
+ value: any;
245
+ };
198
246
  interface AppTypeServerModel {
199
247
  typeName: string;
200
248
  typeLabel: string;
@@ -285,6 +333,20 @@ interface AppServerViewModel {
285
333
  format?: string;
286
334
  html?: string;
287
335
  }
336
+ declare type AppInstallForType = Partial<{
337
+ id: string;
338
+ uri: string;
339
+ shortUri: string;
340
+ title: string;
341
+ name: string;
342
+ mainType: string;
343
+ type: string;
344
+ label: string;
345
+ cssClass: string;
346
+ cssColor: string;
347
+ class: string;
348
+ Pseudo: string;
349
+ }>;
288
350
 
289
351
  declare type Loading = {
290
352
  loading: 'idle' | 'pending';
@@ -375,14 +437,6 @@ declare const AssetReservation: {
375
437
  };
376
438
  };
377
439
 
378
- declare type bookmarkEditState = Loading & {
379
- bookmark: BookmarkRawList | undefined;
380
- status: 'success' | 'error' | undefined;
381
- };
382
- interface bookmarkEditRootState {
383
- bookmarkEdit: bookmarkEditState;
384
- }
385
-
386
440
  declare type ToastType = 'success' | 'warning' | 'error';
387
441
  declare type ToastRootState = {
388
442
  toasts: EntityState<ToastEntity>;
@@ -446,6 +500,62 @@ declare const Toast: {
446
500
  selectors: _reduxjs_toolkit.EntitySelectors<ToastEntity, ToastRootState>;
447
501
  };
448
502
 
503
+ declare type CommentsList = {
504
+ idArticle: number;
505
+ list: jCommentList[];
506
+ };
507
+ declare type CommentListState = Loading & {
508
+ comments: Array<CommentsList>;
509
+ };
510
+ declare type CommentListRootState = {
511
+ commentList: CommentListState;
512
+ };
513
+
514
+ declare type CommentRootState = {
515
+ comment: CommentListRootState;
516
+ };
517
+ declare const Comment: {
518
+ slice: {
519
+ name: "comment";
520
+ reducer: redux.Reducer<redux.CombinedState<{
521
+ commentList: CommentListState;
522
+ }>, redux.AnyAction>;
523
+ };
524
+ actions: {
525
+ discardComments: _reduxjs_toolkit.ActionCreatorWithPayload<{
526
+ idArticle: number;
527
+ }, "commentList/discardComments">;
528
+ fetchComments: _reduxjs_toolkit.AsyncThunk<CommentsList, jamespot_user_api.GetCommentsParams, {
529
+ dispatch: any;
530
+ state: Partial<ApplicationRootState & AssetReservationRootState & EditorsRootState & JLandRootState & ModelRootState & ShareRootState & StudioRootState & ToastRootState & TVDisplayRootState & jamespot_user_api.WidgetsRootState & WedocAppRootState & UserCurrentRootState> & CommentRootState;
531
+ extra: {
532
+ jApi: jamespot_user_api.JamespotUserApi;
533
+ };
534
+ rejectValue: {
535
+ error: number;
536
+ errorMsg: string;
537
+ };
538
+ serializedErrorType?: unknown;
539
+ pendingMeta?: unknown;
540
+ fulfilledMeta?: unknown;
541
+ rejectedMeta?: unknown;
542
+ }>;
543
+ };
544
+ selectors: {
545
+ commentList: (state: CommentRootState, idArticle: number) => CommentsList | undefined;
546
+ };
547
+ getCommentRTHandlers: (dispatch: redux.Dispatch<any>, idArticle: number) => jamespot_user_api.RTMessageHandler<"JAMESPOT", "comment-create" | "comment-delete" | "comment-update">[];
548
+ getCommentsLikeRTHandlers: (dispatch: redux.Dispatch<any>, idComments: number[] | undefined, idArticle: number) => jamespot_user_api.RTMessageHandler<"CUSTOM-ACTION", "update" | "add" | "remove">[];
549
+ };
550
+
551
+ declare type bookmarkEditState = Loading & {
552
+ bookmark: BookmarkRawList | undefined;
553
+ status: 'success' | 'error' | undefined;
554
+ };
555
+ interface bookmarkEditRootState {
556
+ bookmarkEdit: bookmarkEditState;
557
+ }
558
+
449
559
  declare type bookmarkListState = Loading & {
450
560
  bookmarks: BookmarkRawList[];
451
561
  nbResults: number;
@@ -577,13 +687,13 @@ declare const Bookmark: {
577
687
  bookmarkEditBookmark: (state: BookmarkRootState) => jamespot_user_api.BookmarkRawList<jamespot_user_api.jObjectLittle | jamespot_user_api.jUserLittle> | undefined;
578
688
  };
579
689
  getRTHandlers: (dispatch: redux.Dispatch<any>) => ({
580
- namespace: "BOOKMARKS";
581
- function: "add" | "delete" | "update";
582
- handler: (message: jamespot_user_api.RTMessageObject<"BOOKMARKS", "update", jamespot_user_api.jObjectBase> | jamespot_user_api.RTMessageObject<"BOOKMARKS", "add", jamespot_user_api.jObjectBase> | jamespot_user_api.RTMessageObject<"BOOKMARKS", "delete", jamespot_user_api.jObjectBase>) => void;
583
- } | {
584
690
  namespace: "CUSTOM-ACTION";
585
- function: "add" | "update" | "remove";
586
- handler: (message: jamespot_user_api.RTMessageObject<"CUSTOM-ACTION", "update", jamespot_user_api.jObjectBase> | jamespot_user_api.RTMessageObject<"CUSTOM-ACTION", "add", jamespot_user_api.jObjectBase> | jamespot_user_api.RTMessageObject<"CUSTOM-ACTION", "remove", jamespot_user_api.jObjectBase>) => void;
691
+ function: "update" | "add" | "remove";
692
+ handler: (message: jamespot_user_api.RTMessageObject<"CUSTOM-ACTION", "update", {}> | jamespot_user_api.RTMessageObject<"CUSTOM-ACTION", "add", {}> | jamespot_user_api.RTMessageObject<"CUSTOM-ACTION", "remove", {}>) => void;
693
+ } | {
694
+ namespace: "BOOKMARKS";
695
+ function: "update" | "add" | "delete";
696
+ handler: (message: jamespot_user_api.RTMessageObject<"BOOKMARKS", "update", {}> | jamespot_user_api.RTMessageObject<"BOOKMARKS", "add", {}> | jamespot_user_api.RTMessageObject<"BOOKMARKS", "delete", {}>) => void;
587
697
  })[];
588
698
  };
589
699
 
@@ -629,11 +739,13 @@ declare const Faq: {
629
739
  } | undefined;
630
740
  appImageText: string | undefined;
631
741
  access: jamespot_user_api.FaqAccess;
742
+ _displayComment: "" | "1" | "0" | undefined;
632
743
  } | {
633
744
  _web: string;
634
745
  appImage?: never;
635
746
  appImageText?: never;
636
747
  access?: never;
748
+ _displayComment?: never;
637
749
  }, void, {
638
750
  state?: unknown;
639
751
  dispatch?: redux.Dispatch<redux.AnyAction>;
@@ -896,6 +1008,42 @@ declare const Network: {
896
1008
  };
897
1009
  };
898
1010
 
1011
+ declare type PlatformConfigState = {
1012
+ userHighlightFields?: string[];
1013
+ userAccountStatus: 0 | 1;
1014
+ };
1015
+ declare const PlatformConfigSlice: _reduxjs_toolkit.Slice<PlatformConfigState, {
1016
+ initPlatformConfig: (_: Draft<S>, { payload }: PayloadAction<PlatformConfigState>) => PlatformConfigState;
1017
+ }, "config">;
1018
+
1019
+ declare const PlatformSlice: {
1020
+ name: "platform";
1021
+ reducer: redux.Reducer<redux.CombinedState<{
1022
+ config: PlatformConfigState;
1023
+ }>, redux.AnyAction>;
1024
+ };
1025
+ declare type PlatformRootState = {
1026
+ [PlatformSlice.name]: {
1027
+ [PlatformConfigSlice.name]: PlatformConfigState;
1028
+ };
1029
+ };
1030
+ declare const Platform: {
1031
+ slice: {
1032
+ name: "platform";
1033
+ reducer: redux.Reducer<redux.CombinedState<{
1034
+ config: PlatformConfigState;
1035
+ }>, redux.AnyAction>;
1036
+ };
1037
+ actions: {
1038
+ initPlatformConfig: _reduxjs_toolkit.ActionCreatorWithPayload<PlatformConfigState, "config/initPlatformConfig">;
1039
+ };
1040
+ selectors: {
1041
+ selectPlatformConfig: (state: PlatformRootState) => PlatformConfigState;
1042
+ selectUserHighlightFields: (state: PlatformRootState) => string[] | undefined;
1043
+ selectUserAccountStatus: (state: PlatformRootState) => 0 | 1;
1044
+ };
1045
+ };
1046
+
899
1047
  declare type WedocAppState = {
900
1048
  entities: WedocFileType[];
901
1049
  nbEntities: number;
@@ -1167,6 +1315,14 @@ declare type WidgetModalProps = {
1167
1315
  title?: string;
1168
1316
  view?: any;
1169
1317
  };
1318
+ declare const updateWidgetContent: <T>(uniqid: string, content: Partial<T>, override?: boolean) => {
1319
+ payload: {
1320
+ uniqid: string;
1321
+ content: Partial<CombinedWidgetContent>;
1322
+ override?: boolean;
1323
+ };
1324
+ type: "widgets/updateWidget";
1325
+ };
1170
1326
  declare const Widget: {
1171
1327
  const: typeof WIDGETS;
1172
1328
  factory: typeof widgetFactory;
@@ -1181,7 +1337,7 @@ declare const Widget: {
1181
1337
  }>) => void;
1182
1338
  updateWidget: (state: Draft<S>, action: PayloadAction<{
1183
1339
  uniqid: string;
1184
- content: CombinedWidgetContent;
1340
+ content: Partial<CombinedWidgetContent>;
1185
1341
  override?: boolean;
1186
1342
  }>) => void;
1187
1343
  flushWidget: (state: Draft<S>, action: PayloadAction<{
@@ -1442,4 +1598,4 @@ declare const studio: {
1442
1598
  };
1443
1599
  };
1444
1600
 
1445
- export { APP_STATUS_TYPE, AUDIENCE, AppAttrSolrModel, AppAttrWidgetModel, AppFieldFormProperty, AppFieldFormPropertyTypes, AppFieldsFormItem, AppFormBannedFromViews, AppFormItemTypes, AppFormUniqueList, AppLabelContentType, AppLabelsType, AppServerDisplayModel, AppServerDisplaysModel, AppServerViewModel, AppStatusKeys, AppStatusType, AppTableAttributesModel, AppTableModel, AppTypeServerModel, AppViews, Application, ApplicationRootState, AssetReservation, AssetReservationRootState, Bookmark, BookmarkRootState, ChannelsListRootState, ChannelsListState, CheckBoxOption, EditorProps, EditorsRootState, EditorsState, Faq, FaqRootState, JLandMapFront, JLandRootState, MODE_EDIT, MODE_VIEW, MapCreationFront, Model, ModelRootState, Network, NetworkRootState, ReservationForm, RootDispatch, RootState, STUDIO_VIEW, Share, ShareRootState, StatusType, StudioAppBase, StudioAppManifest, StudioApplication, StudioAudienceType, StudioRootState, TVDisplay, TVDisplayRootState, ThunkApiConfig, TinyMCE, TinyMCERootState, Toast, ToastRootState, UserCurrent, UserCurrentRootState, ViewName, WedocApp, WedocAppRootState, WedocAppTabKeys, Widget, WidgetEditor, WidgetModalProps, actions, jland, slice, studio, viewsList };
1601
+ export { APP_STATUS_TYPE, AUDIENCE, AppAttrSolrModel, AppAttrWidgetModel, AppFieldFormProperty, AppFieldFormPropertyTypes, AppFieldView, AppFieldsFormItem, AppFormBannedFromViews, AppFormItemTypes, AppFormUniqueList, AppInstallForType, AppLabelContentType, AppLabelsType, AppServerDisplayModel, AppServerDisplaysModel, AppServerViewModel, AppStatusKeys, AppStatusType, AppTableAttributesModel, AppTableModel, AppTypeServerModel, AppViewFieldItem, AppViewFieldsItems, AppViews, AppViewsFields, Application, ApplicationRootState, AssetReservation, AssetReservationRootState, Bookmark, BookmarkRootState, ChannelsListRootState, ChannelsListState, CheckBoxOption, Comment, CommentRootState, EditorProps, EditorsRootState, EditorsState, ExtraAppFieldsItemViews, Faq, FaqRootState, JLandMapFront, JLandRootState, MODE_EDIT, MODE_VIEW, MapCreationFront, MapExtraFieldsWithView, Model, ModelRootState, Network, NetworkRootState, Platform, PlatformRootState, ReservationForm, RootDispatch, RootState, STUDIO_VIEW, Share, ShareRootState, StatusType, StudioAppBase, StudioAppManifest, StudioApplication, StudioAudienceType, StudioRootState, TVDisplay, TVDisplayRootState, ThunkApiConfig, TinyMCE, TinyMCERootState, Toast, ToastRootState, UserCurrent, UserCurrentRootState, ViewName, WedocApp, WedocAppRootState, WedocAppTabKeys, Widget, WidgetEditor, WidgetModalProps, actions, jland, slice, studio, updateWidgetContent, viewsList };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-front-business",
3
- "version": "1.1.35",
3
+ "version": "1.1.37",
4
4
  "description": "typescript utils",
5
5
  "main": "dist/cjs.js",
6
6
  "module": "dist/esm.js",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@reduxjs/toolkit": "1.9.0",
40
40
  "@types/uuid": "^9.0.8",
41
- "jamespot-user-api": "^1.0.138",
41
+ "jamespot-user-api": "^1.0.141",
42
42
  "react-redux": "7.2.9",
43
43
  "redux": "4.2.0",
44
44
  "uuid": "^9.0.1"