jamespot-front-business 1.1.39 → 1.1.41

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.js CHANGED
@@ -11,26 +11,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
 
12
12
  var jamespot__default = /*#__PURE__*/_interopDefaultLegacy(jamespot);
13
13
 
14
- const adapter$1 = toolkit.createEntityAdapter({
15
- selectId: (app) => app.name,
16
- sortComparer: (a, b) => a.label.localeCompare(b.label),
17
- });
18
- const slice$3 = toolkit.createSlice({
19
- name: 'applications',
20
- initialState: adapter$1.getInitialState(),
21
- reducers: {
22
- addOne: adapter$1.addOne,
23
- addMany: adapter$1.addMany,
24
- setAll: adapter$1.setAll,
25
- },
26
- });
27
- const selectors$2 = adapter$1.getSelectors((state) => state.entities.applications);
28
- const Application = {
29
- slice: slice$3,
30
- actions: Object.assign({}, slice$3.actions),
31
- selectors: selectors$2,
32
- };
33
-
34
14
  /******************************************************************************
35
15
  Copyright (c) Microsoft Corporation.
36
16
 
@@ -68,6 +48,195 @@ function __awaiter(thisArg, _arguments, P, generator) {
68
48
  });
69
49
  }
70
50
 
51
+ const toastAdapter = toolkit.createEntityAdapter({
52
+ selectId: (toast) => toast.id,
53
+ });
54
+ const slice$3 = toolkit.createSlice({
55
+ name: 'toasts',
56
+ initialState: toastAdapter.getInitialState(),
57
+ reducers: {
58
+ addOne: toastAdapter.addOne,
59
+ removeOne: toastAdapter.removeOne,
60
+ },
61
+ });
62
+ const randomId = () => Math.random().toString(16).slice(2);
63
+ const addMessage = (_a, type, timeout) => {
64
+ var { id = randomId() } = _a, toast = __rest(_a, ["id"]);
65
+ if (type === void 0) { type = 'success'; }
66
+ if (timeout === void 0) { timeout = 3000; }
67
+ return (dispatch) => {
68
+ dispatch(slice$3.actions.addOne(Object.assign(Object.assign({ id }, toast), { timeout, type })));
69
+ setTimeout(() => {
70
+ dispatch(slice$3.actions.removeOne(id));
71
+ }, timeout);
72
+ return id;
73
+ };
74
+ };
75
+ const actions = {
76
+ addMessage,
77
+ success: (toast, timeout) => addMessage(toast, 'success', timeout),
78
+ warning: (toast, timeout) => addMessage(toast, 'warning', timeout),
79
+ error: (toast, timeout) => addMessage(toast, 'error', timeout),
80
+ };
81
+ const selectors$2 = toastAdapter.getSelectors((state) => state.toasts);
82
+ const Toast = {
83
+ slice: slice$3,
84
+ actions: Object.assign(Object.assign({}, actions), slice$3.actions),
85
+ selectors: selectors$2,
86
+ };
87
+
88
+ const getAnimationsRTHandlers = function (dispatch) {
89
+ const addAnimationHandler = function (message) {
90
+ if (message.namespace === 'ANIMATIONS' &&
91
+ message.function === 'add') {
92
+ dispatch(fetchCurrentAnimation());
93
+ dispatch(fetchCurrentAnimationApp());
94
+ }
95
+ };
96
+ const deleteAnimationHandler = function (message) {
97
+ if (message.namespace === 'ANIMATIONS' &&
98
+ message.function === 'delete') {
99
+ dispatch(fetchCurrentAnimation());
100
+ dispatch(fetchCurrentAnimationApp());
101
+ }
102
+ };
103
+ const toggleIsActiveAnimationHandler = function (message) {
104
+ if (message.namespace === 'ANIMATIONS' &&
105
+ message.function === 'toggle') {
106
+ dispatch(fetchCurrentAnimation());
107
+ }
108
+ };
109
+ return [
110
+ {
111
+ namespace: 'ANIMATIONS',
112
+ function: 'add',
113
+ handler: addAnimationHandler,
114
+ },
115
+ {
116
+ namespace: 'ANIMATIONS',
117
+ function: 'delete',
118
+ handler: deleteAnimationHandler,
119
+ },
120
+ {
121
+ namespace: 'ANIMATIONS',
122
+ function: 'toggle',
123
+ handler: toggleIsActiveAnimationHandler,
124
+ },
125
+ ];
126
+ };
127
+
128
+ const initialState$k = {
129
+ animationConfiguration: null,
130
+ isActiveForCurrentUser: false,
131
+ isInitialized: false,
132
+ isToggleLoading: false,
133
+ };
134
+ const animationsSlice = toolkit.createSlice({
135
+ name: 'animations',
136
+ initialState: initialState$k,
137
+ reducers: {},
138
+ extraReducers: (builder) => {
139
+ builder.addCase(fetchCurrentAnimation.fulfilled, (state, action) => {
140
+ state.isActiveForCurrentUser = action.payload.isActiveForCurrentUser;
141
+ state.animationConfiguration = action.payload.animationConfiguration;
142
+ state.isInitialized = action.payload.isInitialized;
143
+ });
144
+ builder.addCase(fetchCurrentAnimationApp.fulfilled, (state, action) => {
145
+ state.animationConfigurationApp = action.payload;
146
+ });
147
+ builder.addCase(toggleAnimationIsActive.pending, (state) => {
148
+ state.isToggleLoading = true;
149
+ });
150
+ builder.addCase(toggleAnimationIsActive.fulfilled, (state) => {
151
+ state.isToggleLoading = false;
152
+ });
153
+ builder.addCase(toggleAnimationIsActive.rejected, (state) => {
154
+ state.isToggleLoading = false;
155
+ });
156
+ },
157
+ });
158
+ const fetchCurrentAnimation = toolkit.createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
159
+ try {
160
+ const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
161
+ const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
162
+ return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
163
+ }
164
+ catch (_) {
165
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
166
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
167
+ }
168
+ }));
169
+ const fetchCurrentAnimationApp = toolkit.createAsyncThunk('animations/fetchCurrentAnimationApp', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
170
+ try {
171
+ return (yield extra.jApi.animations.GetCurrentAnimationApp()).result;
172
+ }
173
+ catch (_) {
174
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
175
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
176
+ }
177
+ }));
178
+ const deleteCurrentAnimation = toolkit.createAsyncThunk('animations/deleteCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
179
+ try {
180
+ yield extra.jApi.animations.DeleteAnimation();
181
+ return;
182
+ }
183
+ catch (_) {
184
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
185
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot delete animation' });
186
+ }
187
+ }));
188
+ const saveCurrentAnimation = toolkit.createAsyncThunk('animations/saveCurrentAnimation', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
189
+ try {
190
+ yield extra.jApi.animations.SaveAnimationConfiguration(params);
191
+ return;
192
+ }
193
+ catch (_) {
194
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
195
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
196
+ }
197
+ }));
198
+ const toggleAnimationIsActive = toolkit.createAsyncThunk('animations/toggleAnimationIsActive', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
199
+ try {
200
+ yield extra.jApi.animations.ToggleAnimationActive();
201
+ return;
202
+ }
203
+ catch (_) {
204
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
205
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
206
+ }
207
+ }));
208
+ const selectCurrentAnimation = (state) => state.animations.animationConfiguration;
209
+ const isActiveAnimation = (state) => state.animations.isActiveForCurrentUser;
210
+ const isToggleLoading = (state) => state.animations.isToggleLoading;
211
+ const selectAnimationConfigurationApp = (state) => state.animations.animationConfigurationApp;
212
+ const animationsReducer = animationsSlice.reducer;
213
+ const Animations = {
214
+ slice: animationsSlice,
215
+ actions: { saveCurrentAnimation, fetchCurrentAnimation, deleteCurrentAnimation, toggleAnimationIsActive, fetchCurrentAnimationApp },
216
+ selectors: { selectCurrentAnimation, isActiveAnimation, isToggleLoading, selectAnimationConfigurationApp },
217
+ getAnimationsRTHandlers
218
+ };
219
+
220
+ const adapter$1 = toolkit.createEntityAdapter({
221
+ selectId: (app) => app.name,
222
+ sortComparer: (a, b) => a.label.localeCompare(b.label),
223
+ });
224
+ const slice$2 = toolkit.createSlice({
225
+ name: 'applications',
226
+ initialState: adapter$1.getInitialState(),
227
+ reducers: {
228
+ addOne: adapter$1.addOne,
229
+ addMany: adapter$1.addMany,
230
+ setAll: adapter$1.setAll,
231
+ },
232
+ });
233
+ const selectors$1 = adapter$1.getSelectors((state) => state.entities.applications);
234
+ const Application = {
235
+ slice: slice$2,
236
+ actions: Object.assign({}, slice$2.actions),
237
+ selectors: selectors$1,
238
+ };
239
+
71
240
  const initialState$j = {
72
241
  entities: [],
73
242
  loading: 'idle',
@@ -203,43 +372,6 @@ const AssetReservation = {
203
372
  },
204
373
  };
205
374
 
206
- const toastAdapter = toolkit.createEntityAdapter({
207
- selectId: (toast) => toast.id,
208
- });
209
- const slice$2 = toolkit.createSlice({
210
- name: 'toasts',
211
- initialState: toastAdapter.getInitialState(),
212
- reducers: {
213
- addOne: toastAdapter.addOne,
214
- removeOne: toastAdapter.removeOne,
215
- },
216
- });
217
- const randomId = () => Math.random().toString(16).slice(2);
218
- const addMessage = (_a, type, timeout) => {
219
- var { id = randomId() } = _a, toast = __rest(_a, ["id"]);
220
- if (type === void 0) { type = 'success'; }
221
- if (timeout === void 0) { timeout = 3000; }
222
- return (dispatch) => {
223
- dispatch(slice$2.actions.addOne(Object.assign(Object.assign({ id }, toast), { timeout, type })));
224
- setTimeout(() => {
225
- dispatch(slice$2.actions.removeOne(id));
226
- }, timeout);
227
- return id;
228
- };
229
- };
230
- const actions = {
231
- addMessage,
232
- success: (toast, timeout) => addMessage(toast, 'success', timeout),
233
- warning: (toast, timeout) => addMessage(toast, 'warning', timeout),
234
- error: (toast, timeout) => addMessage(toast, 'error', timeout),
235
- };
236
- const selectors$1 = toastAdapter.getSelectors((state) => state.toasts);
237
- const Toast = {
238
- slice: slice$2,
239
- actions: Object.assign(Object.assign({}, actions), slice$2.actions),
240
- selectors: selectors$1,
241
- };
242
-
243
375
  const initialState$g = {
244
376
  loading: 'idle',
245
377
  comments: [],
@@ -1664,6 +1796,22 @@ const widgetArticleTitleContent = {
1664
1796
  backgroundColor: 'transparent',
1665
1797
  };
1666
1798
 
1799
+ const widgetApiDefinition = {
1800
+ label: 'WIDGET_Api',
1801
+ description: 'WIDGET_Api_Description',
1802
+ name: 'widget-api',
1803
+ img: '/img/fast-intranet/widget-text.png',
1804
+ available: true,
1805
+ panel: {
1806
+ useWrapper: false,
1807
+ useEditor: true,
1808
+ useWidgets: false,
1809
+ },
1810
+ };
1811
+ const widgetApiContent = {
1812
+ url: '',
1813
+ };
1814
+
1667
1815
  const widgetArticleSliderDefinition = {
1668
1816
  label: 'WIDGET_Slider',
1669
1817
  description: 'WIDGET_Slider_Description',
@@ -1710,6 +1858,8 @@ function content(name) {
1710
1858
  default:
1711
1859
  case 'widget-article-attachment':
1712
1860
  return Object.assign({}, widgetArticleAttachmentContent);
1861
+ case 'widget-api':
1862
+ return Object.assign({}, widgetApiContent);
1713
1863
  case 'widget-article-slider':
1714
1864
  return Object.assign({}, widgetArticleSliderContent);
1715
1865
  case 'widget-article-gallery':
@@ -1758,6 +1908,8 @@ function widgetDefinition(name) {
1758
1908
  return widgetArticleTitleDefinition;
1759
1909
  case 'widget-article-image':
1760
1910
  return widgetArticleImageDefinition;
1911
+ case 'widget-api':
1912
+ return widgetApiDefinition;
1761
1913
  case 'widget-article-button':
1762
1914
  return widgetArticleButtonDefinition;
1763
1915
  }
@@ -2077,6 +2229,20 @@ const AppColumnsDefaultTypes = [
2077
2229
  exports.AppFormItemTypes.DESCRIPTION,
2078
2230
  ];
2079
2231
  const AppFormPrimaryList = [exports.AppFormItemTypes.DESCRIPTION];
2232
+ const AppFormFixedList$1 = [
2233
+ exports.ExtraAppFieldsItemViews.TITLE,
2234
+ exports.ExtraAppFieldsItemViews.PUBLISHTO,
2235
+ exports.ExtraAppFieldsItemViews.SENDALERTTOSUBSCRIBERS,
2236
+ exports.ExtraAppFieldsItemViews.RECEIVEACOPY,
2237
+ exports.ExtraAppFieldsItemViews.USER,
2238
+ exports.ExtraAppFieldsItemViews.CREATIONDATE,
2239
+ ];
2240
+ const AppFormNoAsFieldList = [
2241
+ exports.ExtraAppFieldsItemViews.USER,
2242
+ exports.ExtraAppFieldsItemViews.TITLE,
2243
+ ];
2244
+ const AppFormFieldOnlyInView = [exports.AppFormItemTypes.CODEHTML];
2245
+ const AppFormNonPrimaryList = AppFormNoAsFieldList.concat(AppFormFieldOnlyInView).concat(AppFormPrimaryList);
2080
2246
 
2081
2247
  var StatusType;
2082
2248
  (function (StatusType) {
@@ -2261,7 +2427,7 @@ function migrateJson(v1Json) {
2261
2427
  : { propertyOptions: _renderSelectOptions((_g = v1FormItemProperties.options) !== null && _g !== void 0 ? _g : []) } }, baseProperty));
2262
2428
  }
2263
2429
  if (v1FormItemProperties.code) {
2264
- v2Properties.push(Object.assign({ propertyType: exports.AppFieldFormPropertyTypes.RICHTEXT, value: v1FormItemProperties.code.html || v1FormItemProperties.code.text || '' }, baseProperty));
2430
+ v2Properties.push(Object.assign({ propertyType: exports.AppFieldFormPropertyTypes.RICHTEXT, value: { html: v1FormItemProperties.code.html, text: v1FormItemProperties.code.text } }, baseProperty));
2265
2431
  }
2266
2432
  if (Object.prototype.hasOwnProperty.call(v1FormItemProperties, 'digits')) {
2267
2433
  v2Properties.push(Object.assign({ propertyType: exports.AppFieldFormPropertyTypes.CHECKBOX, value: v1FormItemProperties.digits || false, checkBoxOptions: [{ label: 'APPSTUDIO_FormEditProps_Digits', value: v1FormItemProperties.digits }] }, baseProperty));
@@ -2341,6 +2507,7 @@ function migrateJson(v1Json) {
2341
2507
  }
2342
2508
 
2343
2509
  function InstalledAppStudioAdapter(serverApp, serverApps) {
2510
+ var _a, _b, _c, _d;
2344
2511
  const { version, dateCreation } = serverApp.manifest;
2345
2512
  const appTypeServer = serverApp.typeModel;
2346
2513
  const views = Object.assign({}, ...viewsList.map((view) => ({
@@ -2350,7 +2517,7 @@ function InstalledAppStudioAdapter(serverApp, serverApps) {
2350
2517
  idApp: serverApp.idApp,
2351
2518
  status: _formatStatus(serverApp),
2352
2519
  studioVersion: 2,
2353
- manifest: Object.assign({ appShortName: serverApp.name, appName: serverApp.label, description: serverApp.description, author: serverApp.author, cssColor: appTypeServer.cssColor, cssClass: { label: appTypeServer.cssClass, value: appTypeServer.cssClass }, version: version, dateCreation: dateCreation, checkAccess: serverApp.checkAccess, attrExposed: serverApp.attrExposed, viewSolr: serverApp.view, typeLabel: appTypeServer.typeLabel }, (serverApp.articlesCount && { articlesCount: serverApp.articlesCount })),
2520
+ manifest: Object.assign({ appShortName: serverApp.name, appName: serverApp.label, description: serverApp.description, author: serverApp.author, cssColor: (_a = appTypeServer.cssColor) !== null && _a !== void 0 ? _a : '#392994', cssClass: { label: (_b = appTypeServer.cssClass) !== null && _b !== void 0 ? _b : 'star', value: (_c = appTypeServer.cssClass) !== null && _c !== void 0 ? _c : 'star' }, version: version, dateCreation: dateCreation, checkAccess: serverApp.checkAccess, attrExposed: serverApp.attrExposed, viewSolr: serverApp.view, typeLabel: (_d = appTypeServer.typeLabel) !== null && _d !== void 0 ? _d : {} }, (serverApp.articlesCount && { articlesCount: serverApp.articlesCount })),
2354
2521
  fields: [],
2355
2522
  views,
2356
2523
  installFor: serverApp.accessRightObjectList,
@@ -2419,19 +2586,19 @@ function appToXml(studioApp) {
2419
2586
  const { manifest, views, audience, installFor } = studioApp;
2420
2587
  return `<?xml version='1.0' encoding='utf-8'?>
2421
2588
  <Application>
2422
- ${createAppManifest(manifest, views, audience, installFor)}
2589
+ ${createAppManifest(manifest, views, audience, installFor, studioApp.idApp)}
2423
2590
  <Types>
2424
2591
  <objecttype
2425
2592
  label="${manifest.typeLabel}"
2426
2593
  labelPlural="${manifest.typeLabel}"
2427
2594
  labelLinkSingular="${manifest.typeLabel}"
2428
2595
  labelLinkPlural="${manifest.typeLabel}"
2429
- name="${manifest.appShortName}"
2596
+ name="${studioApp.idApp}"
2430
2597
  classImpl="JPBEContent"
2431
2598
  classCodeLocation="jamespot/jpro/objs/JPBEContent.php"
2432
2599
  cssClass="${manifest.cssClass.value}"
2433
2600
  cssColor="${manifest.cssColor}"
2434
- searchtab="${manifest.appShortName}"
2601
+ searchtab="${studioApp.idApp}"
2435
2602
  searchtablabel="${manifest.typeLabel}"
2436
2603
  buttonlabel="${manifest.typeLabel}"
2437
2604
  extends="article">
@@ -2442,14 +2609,14 @@ function appToXml(studioApp) {
2442
2609
  </Types>
2443
2610
  </Application>`;
2444
2611
  }
2445
- function createAppManifest(manifest, views, audience, installFor) {
2612
+ function createAppManifest(manifest, views, audience, installFor, idApp) {
2446
2613
  var _a;
2447
2614
  return `<Manifest>
2448
2615
  <ShowImport>true</ShowImport>
2449
- <AppShortName>${manifest.appShortName}</AppShortName>
2616
+ <AppShortName>${idApp}</AppShortName>
2450
2617
  <AppName>${manifest.appName}</AppName>
2451
2618
  <Description>${manifest.description}</Description>
2452
- <Version>${manifest.version}</Version>
2619
+ <Version>${manifest.version + 1}</Version>
2453
2620
  <ManifestVersion>1.0</ManifestVersion>
2454
2621
  <StudioVersion>2</StudioVersion>
2455
2622
  <DateCreation>${manifest.dateCreation.toString().split('T')[0]}</DateCreation>
@@ -2458,7 +2625,7 @@ function createAppManifest(manifest, views, audience, installFor) {
2458
2625
  <Categories>N.A.</Categories>
2459
2626
  <Editor>Jamespot</Editor>
2460
2627
  <EditorUrl>https://www.fr.jamespot.com/</EditorUrl>
2461
- <Type>${manifest.appShortName}</Type>
2628
+ <Type>${idApp}</Type>
2462
2629
  ${renderAppView(manifest.viewSolr, views.list)}
2463
2630
  ${renderAppSearch(views.filter)}
2464
2631
  ${renderAudience(audience, installFor)}
@@ -2466,7 +2633,7 @@ function createAppManifest(manifest, views, audience, installFor) {
2466
2633
  </Manifest>`;
2467
2634
  }
2468
2635
  function renderAppView(viewSolr, listView) {
2469
- if (viewSolr === 'solr') {
2636
+ if (viewSolr === STUDIO_VIEW.SOLR) {
2470
2637
  let xml = '<AppView>solr</AppView>';
2471
2638
  const formItemIdInList = [];
2472
2639
  Object.entries(listView).forEach(([fieldId, field]) => {
@@ -2487,10 +2654,20 @@ function renderAppSearch(searchView) {
2487
2654
  }
2488
2655
  function getAttrNameFormItem(field, fieldId) {
2489
2656
  function fieldType() {
2657
+ if (field.type === exports.ExtraAppFieldsItemViews.TITLE)
2658
+ return 'title';
2659
+ if (field.type === exports.ExtraAppFieldsItemViews.SENDALERTTOSUBSCRIBERS)
2660
+ return 'sendAlert';
2661
+ if (field.type === exports.ExtraAppFieldsItemViews.RECEIVEACOPY)
2662
+ return 'alertAuthor';
2663
+ if (field.type === exports.ExtraAppFieldsItemViews.PUBLISHTO)
2664
+ return 'publishTo';
2490
2665
  if (field.type === exports.ExtraAppFieldsItemViews.USER)
2491
2666
  return 'idUser';
2492
2667
  if (field.type === exports.ExtraAppFieldsItemViews.CREATIONDATE)
2493
2668
  return 'dateCreation';
2669
+ if (field.type === exports.AppFormItemTypes.DESCRIPTION)
2670
+ return 'description';
2494
2671
  return field.type;
2495
2672
  }
2496
2673
  return (AppColumnsDefaultTypes.includes(field.type) ? fieldType() : uuid2Alpha(fieldId)).toLowerCase();
@@ -2515,7 +2692,7 @@ function renderCustomFields(fields) {
2515
2692
  const filteredCustomFields = customFields === null || customFields === void 0 ? void 0 : customFields.filter((field) => field.type !== exports.AppFormItemTypes.IMAGE);
2516
2693
  if (filteredCustomFields.length === 0)
2517
2694
  return '';
2518
- const articlesTablesItems = filteredCustomFields.filter((f) => f.type !== exports.AppFormItemTypes.TAGS);
2695
+ const articlesTablesItems = filteredCustomFields.filter((f) => f.type !== exports.AppFormItemTypes.TAGS && !AppFormNonPrimaryList.includes(f.type));
2519
2696
  const linksTableItems = filteredCustomFields.filter((f) => f.type === exports.AppFormItemTypes.TAGS);
2520
2697
  return `<custom>
2521
2698
  ${articlesTablesItems.length > 0
@@ -2524,7 +2701,7 @@ function renderCustomFields(fields) {
2524
2701
  </articlemstable>`
2525
2702
  : ''}
2526
2703
  ${linksTableItems.length > 0
2527
- ? `<linkstable>
2704
+ ? `<linkstable tablename="tag_links" sqlNameColumn="name" sqlSrcIdColumn="srcId" sqlSrcTypeColumn="srcType" sqlTargetIdColumn="targetId" sqlTargetTypeColumn="targetType">
2528
2705
  ${linksTableItems.map((field) => formItem2xml(field)).join('')}
2529
2706
  </linkstable>`
2530
2707
  : ''}</custom>`;
@@ -2542,7 +2719,7 @@ function formItem2xml(field) {
2542
2719
  solr.indexed="true"
2543
2720
  solr.stored="true"
2544
2721
  solr.searchable="true"
2545
- solr.multiValued="${field.type === exports.AppFormItemTypes.TAGS || (field.type === exports.AppFormItemTypes.CHECKBOX && true) || false}"
2722
+ solr.multiValued="${field.type === exports.AppFormItemTypes.TAGS || field.type === exports.AppFormItemTypes.CHECKBOX ? true : false}"
2546
2723
  teaser="true"
2547
2724
  display="true"
2548
2725
  >
@@ -2588,14 +2765,16 @@ function renderWidget(fieldType, fieldProperties) {
2588
2765
  </widget>`;
2589
2766
  }
2590
2767
  case exports.AppFormItemTypes.RADIO: {
2591
- const optionEditor = fieldProperties === null || fieldProperties === void 0 ? void 0 : fieldProperties.find((property) => property.propertyType === exports.AppFieldFormPropertyTypes.CHECKBOX);
2768
+ const optionEditor = fieldProperties === null || fieldProperties === void 0 ? void 0 : fieldProperties.find((property) => property.propertyType === exports.AppFieldFormPropertyTypes.OPTIONS_EDITOR);
2592
2769
  if (!optionEditor)
2593
2770
  return '';
2594
2771
  const options = optionEditor.value.propertyOptions;
2595
2772
  return `<widget form="radio">
2773
+ <options>
2596
2774
  ${options
2597
2775
  .map((option) => `<option value="${option.value}" label="${option.title}"></option>`)
2598
2776
  .join('')}
2777
+ </options>
2599
2778
  </widget>`;
2600
2779
  }
2601
2780
  case exports.AppFormItemTypes.TOGGLE:
@@ -2617,14 +2796,14 @@ function renderWidget(fieldType, fieldProperties) {
2617
2796
  </widget>`;
2618
2797
  }
2619
2798
  case exports.AppFormItemTypes.CHECKBOX: {
2620
- const optionEditor = fieldProperties === null || fieldProperties === void 0 ? void 0 : fieldProperties.find((property) => property.propertyType === exports.AppFieldFormPropertyTypes.CHECKBOX);
2799
+ const optionEditor = fieldProperties === null || fieldProperties === void 0 ? void 0 : fieldProperties.find((property) => property.propertyType === exports.AppFieldFormPropertyTypes.OPTIONS_EDITOR);
2621
2800
  if (!optionEditor)
2622
2801
  return '';
2623
2802
  const options = optionEditor.value.propertyOptions;
2624
2803
  return `<widget form="checkbox" multiple="1">
2625
2804
  <options>
2626
2805
  ${options
2627
- .map((option) => `<option value="${option.value}" label="${option.label}"></option>`)
2806
+ .map((option) => `<option value="${option.value}" label="${option.title}"></option>`)
2628
2807
  .join('')}
2629
2808
  </options>
2630
2809
  </widget>`;
@@ -2632,7 +2811,7 @@ function renderWidget(fieldType, fieldProperties) {
2632
2811
  case exports.AppFormItemTypes.ADDFILEATTACHMENT:
2633
2812
  return `<widget form="file" type="fileArticle" multiple="1"></widget>`;
2634
2813
  case exports.AppFormItemTypes.URL:
2635
- return `<widget form="url"`;
2814
+ return `<widget form="url"></widget>`;
2636
2815
  case exports.AppFormItemTypes.EMAIL:
2637
2816
  return `<widget form="email"></widget>`;
2638
2817
  case exports.ExtraAppFieldsItemViews.USER:
@@ -2645,7 +2824,7 @@ function renderWidget(fieldType, fieldProperties) {
2645
2824
  <param key="namespace" value="jamespot"></param>
2646
2825
  <param key="types" value="user"></param>
2647
2826
  <param key="views" value="user"></param>
2648
- <param key="jcomplete-url" value="/?action=ajax&amp;group=autocomplete&amp;export function=user"></param>
2827
+ <param key="jcomplete-url" value="/?action=ajax&amp;group=autocomplete&amp;function=user"></param>
2649
2828
  </params>
2650
2829
  </widget>`;
2651
2830
  case exports.AppFormItemTypes.CONTENTLINK: {
@@ -2659,7 +2838,7 @@ function renderWidget(fieldType, fieldProperties) {
2659
2838
  <param key="namespace" value="jamespot"></param>
2660
2839
  <param key="types" value="${type}"></param>
2661
2840
  <param key="views" value="article"></param>
2662
- <param key="jcomplete-url" value="/?action=ajax&amp;group=autocomplete&amp;export function=article&amp;types=[]=${type}"></param>
2841
+ <param key="jcomplete-url" value="/?action=ajax&amp;group=autocomplete&amp;function=article&amp;types=[]=${type}"></param>
2663
2842
  </params>
2664
2843
  </widget>`;
2665
2844
  }
@@ -2779,7 +2958,7 @@ function renderDisplays(studioApp) {
2779
2958
  }
2780
2959
  });
2781
2960
  if (toRet.length > 0) {
2782
- toRet = `<displays type="${studioApp.manifest.appShortName}">${toRet}</displays>`;
2961
+ toRet = `<displays type="${studioApp.idApp}">${toRet}</displays>`;
2783
2962
  }
2784
2963
  return toRet;
2785
2964
  }
@@ -2797,6 +2976,8 @@ function getDisplayName(fieldId, view) {
2797
2976
  return 'idUser';
2798
2977
  case exports.ExtraAppFieldsItemViews.CREATIONDATE:
2799
2978
  return 'dateCreation';
2979
+ case exports.AppFormItemTypes.DESCRIPTION:
2980
+ return 'description';
2800
2981
  default:
2801
2982
  return uuid2Alpha(fieldId);
2802
2983
  }
@@ -2869,14 +3050,7 @@ function renderDisplayAttr(fieldId, view) {
2869
3050
  else {
2870
3051
  switch (view.type) {
2871
3052
  case exports.AppFormItemTypes.CODEHTML: {
2872
- const content = {
2873
- ref: attrName,
2874
- fixedValue: {
2875
- html: view.value.html,
2876
- text: view.value.text,
2877
- },
2878
- };
2879
- xml += `<html><![CDATA[ <!-- <JAMESPOT.STUDIO.CODEHTML>${JSON.stringify(content)}</JAMESPOT.STUDIO.CODEHTML><JAMESPOT.STUDIO.FIELD_POS></JAMESPOT.STUDIO.FIELD_POS>-->]]></html>`;
3053
+ xml += `<html><![CDATA[ <!-- <JAMESPOT.STUDIO.CODEHTML>${view.value}</JAMESPOT.STUDIO.CODEHTML><JAMESPOT.STUDIO.FIELD_POS>${view.pos}</JAMESPOT.STUDIO.FIELD_POS>-->${view.value}]]></html>`;
2880
3054
  break;
2881
3055
  }
2882
3056
  case exports.AppFormItemTypes.IMAGE:
@@ -2936,7 +3110,7 @@ const saveCurrentStudioApp = toolkit.createAsyncThunk('studio/saveCurrentStudioA
2936
3110
  return rejectWithValue(error);
2937
3111
  }
2938
3112
  }));
2939
- const installStudioApp = toolkit.createAsyncThunk('studio/installApp', (_, { extra, rejectWithValue, getState, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
3113
+ const installStudioApp = toolkit.createAsyncThunk('studio/installApp', ({ callback }, { extra, rejectWithValue, getState, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
2940
3114
  const jApi = extra.jApi;
2941
3115
  const error = { error: 1, errorMsg: 'Error saving application' };
2942
3116
  const currentStudioApp = getState().studio.currentStudioApp.currentStudioApp;
@@ -2946,7 +3120,9 @@ const installStudioApp = toolkit.createAsyncThunk('studio/installApp', (_, { ext
2946
3120
  const xml = appToXml(currentStudioApp);
2947
3121
  try {
2948
3122
  yield jApi.application.install(xml);
2949
- dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Edition_Saved' }));
3123
+ dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Installed' }));
3124
+ if (callback)
3125
+ callback();
2950
3126
  return;
2951
3127
  }
2952
3128
  catch (_) {
@@ -3075,7 +3251,7 @@ function createNewStudioApp$1({ author, appName }) {
3075
3251
  },
3076
3252
  version: 0.1,
3077
3253
  dateCreation: new Date().toISOString(),
3078
- viewSolr: 'solr',
3254
+ viewSolr: STUDIO_VIEW.SOLR,
3079
3255
  checkAccess: false,
3080
3256
  accessRightList: '',
3081
3257
  attrExposed: [],
@@ -3113,7 +3289,7 @@ const fetchStudioAppsList = toolkit.createAsyncThunk('studio/appsList', (_, { ex
3113
3289
  throw rejectWithValue({ error: 1, errorMsg: 'Error retrieving applications' });
3114
3290
  }
3115
3291
  }));
3116
- const createNewStudioApp = toolkit.createAsyncThunk('studio/createApp', ({ appName }, { extra, dispatch, rejectWithValue, getState }) => __awaiter(void 0, void 0, void 0, function* () {
3292
+ const createNewStudioApp = toolkit.createAsyncThunk('studio/createApp', ({ appName, callback }, { extra, dispatch, rejectWithValue, getState }) => __awaiter(void 0, void 0, void 0, function* () {
3117
3293
  var _a;
3118
3294
  const jApi = extra.jApi;
3119
3295
  const author = (_a = getState().userCurrent) === null || _a === void 0 ? void 0 : _a.uri;
@@ -3122,6 +3298,8 @@ const createNewStudioApp = toolkit.createAsyncThunk('studio/createApp', ({ appNa
3122
3298
  yield jApi.application.save(newAppId, JSON.stringify(newStudioApp), 'saved');
3123
3299
  dispatch(Toast.actions.success({ label: 'APPSTUDIO_StudioApp_Created' }));
3124
3300
  dispatch(CurrentStudioAppSlice.actions.setCurrentApp(newStudioApp));
3301
+ if (callback)
3302
+ callback();
3125
3303
  return newStudioApp;
3126
3304
  }
3127
3305
  catch (_) {
@@ -3215,7 +3393,10 @@ const StudioAppsListSlice = toolkit.createSlice({
3215
3393
  state.deleteStudioAppStatus = 'idle';
3216
3394
  }
3217
3395
  state.studioAppsList = state.studioAppsList.reduce((acc, app) => {
3218
- const { idApp, status } = action.meta.arg;
3396
+ const { idApp } = action.meta.arg;
3397
+ let { status } = action.meta.arg;
3398
+ if (status === APP_STATUS_TYPE.INSTALLED)
3399
+ status = APP_STATUS_TYPE.SUSPENDED;
3219
3400
  if (app.idApp === idApp && app.status === status)
3220
3401
  return acc;
3221
3402
  if (app.inWorkVersion &&
@@ -3336,8 +3517,13 @@ const studio = {
3336
3517
 
3337
3518
  exports.APP_STATUS_TYPE = APP_STATUS_TYPE;
3338
3519
  exports.AUDIENCE = AUDIENCE;
3520
+ exports.Animations = Animations;
3339
3521
  exports.AppColumnsDefaultTypes = AppColumnsDefaultTypes;
3340
3522
  exports.AppFormBannedFromViews = AppFormBannedFromViews$1;
3523
+ exports.AppFormFieldOnlyInView = AppFormFieldOnlyInView;
3524
+ exports.AppFormFixedList = AppFormFixedList$1;
3525
+ exports.AppFormNoAsFieldList = AppFormNoAsFieldList;
3526
+ exports.AppFormNonPrimaryList = AppFormNonPrimaryList;
3341
3527
  exports.AppFormPrimaryList = AppFormPrimaryList;
3342
3528
  exports.AppFormUniqueList = AppFormUniqueList;
3343
3529
  exports.Application = Application;
@@ -3361,9 +3547,16 @@ exports.WedocApp = WedocApp;
3361
3547
  exports.Widget = Widget;
3362
3548
  exports.WidgetEditor = WidgetEditor;
3363
3549
  exports.actions = actions;
3550
+ exports.animationsReducer = animationsReducer;
3551
+ exports.animationsSlice = animationsSlice;
3552
+ exports.deleteCurrentAnimation = deleteCurrentAnimation;
3553
+ exports.fetchCurrentAnimation = fetchCurrentAnimation;
3554
+ exports.fetchCurrentAnimationApp = fetchCurrentAnimationApp;
3364
3555
  exports.jland = jland;
3556
+ exports.saveCurrentAnimation = saveCurrentAnimation;
3365
3557
  exports.slice = slice;
3366
3558
  exports.studio = studio;
3559
+ exports.toggleAnimationIsActive = toggleAnimationIsActive;
3367
3560
  exports.updateWidgetContent = updateWidgetContent;
3368
3561
  exports.viewsList = viewsList;
3369
3562
  //# sourceMappingURL=cjs.js.map