jamespot-front-business 1.1.81 → 1.1.83
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 +392 -84
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +390 -85
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +1048 -121
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -53,6 +53,10 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
53
53
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
+
const isAbortError = (error) => {
|
|
57
|
+
return !!error && typeof error === 'object' && 'aborted' in error && !!error.aborted;
|
|
58
|
+
};
|
|
59
|
+
|
|
56
60
|
const toastAdapter = toolkit.createEntityAdapter({
|
|
57
61
|
selectId: (toast) => toast.id,
|
|
58
62
|
});
|
|
@@ -90,8 +94,234 @@ const Toast = {
|
|
|
90
94
|
selectors: selectors$3,
|
|
91
95
|
};
|
|
92
96
|
|
|
93
|
-
const
|
|
94
|
-
|
|
97
|
+
const formatDate$2 = (date) => date.toISOString().slice(0, 19).replace(/T/g, ' ');
|
|
98
|
+
const oneMonthAgo$2 = () => {
|
|
99
|
+
const date = new Date();
|
|
100
|
+
date.setMonth(date.getMonth() - 1);
|
|
101
|
+
return date;
|
|
102
|
+
};
|
|
103
|
+
const initialState$p = {
|
|
104
|
+
data: [],
|
|
105
|
+
loading: 'idle',
|
|
106
|
+
page: 1,
|
|
107
|
+
filters: [
|
|
108
|
+
{
|
|
109
|
+
name: 'dateCreation',
|
|
110
|
+
method: 'between',
|
|
111
|
+
value: {
|
|
112
|
+
start: formatDate$2(oneMonthAgo$2()),
|
|
113
|
+
end: formatDate$2(new Date()),
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
orders: [],
|
|
118
|
+
limit: 30,
|
|
119
|
+
nbResults: 0,
|
|
120
|
+
};
|
|
121
|
+
const fetchLogsNavigation = toolkit.createAsyncThunk('admin/fetchLogsNavigation', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
122
|
+
try {
|
|
123
|
+
const logs = (yield extra.jApi.admin.logs.getLogsNavigation(params)).result;
|
|
124
|
+
return logs;
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
if (!isAbortError(err)) {
|
|
128
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
129
|
+
}
|
|
130
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs navigation' });
|
|
131
|
+
}
|
|
132
|
+
}));
|
|
133
|
+
const adminLogsNavigationSlice = toolkit.createSlice({
|
|
134
|
+
name: 'logsNavigation',
|
|
135
|
+
initialState: initialState$p,
|
|
136
|
+
reducers: {
|
|
137
|
+
setNavigationOrder: (state, action) => {
|
|
138
|
+
state.orders = [...action.payload];
|
|
139
|
+
state.page = 1;
|
|
140
|
+
},
|
|
141
|
+
setNavigationFilter: (state, action) => {
|
|
142
|
+
state.filters = [...action.payload];
|
|
143
|
+
state.page = 1;
|
|
144
|
+
},
|
|
145
|
+
setNavigationPage: (state, action) => {
|
|
146
|
+
state.page = action.payload;
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
extraReducers: (builder) => {
|
|
150
|
+
builder.addCase(fetchLogsNavigation.pending, (state) => {
|
|
151
|
+
state.loading = 'pending';
|
|
152
|
+
});
|
|
153
|
+
builder.addCase(fetchLogsNavigation.fulfilled, (state, action) => {
|
|
154
|
+
var _a;
|
|
155
|
+
state.data = action.payload.data;
|
|
156
|
+
state.nbResults = action.payload.cnt;
|
|
157
|
+
state.limit = (_a = action.payload.limit) !== null && _a !== void 0 ? _a : 30;
|
|
158
|
+
state.page = action.payload.page;
|
|
159
|
+
state.loading = 'idle';
|
|
160
|
+
});
|
|
161
|
+
builder.addCase(fetchLogsNavigation.rejected, (state) => {
|
|
162
|
+
state.loading = 'idle';
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
const formatDate$1 = (date) => date.toISOString().slice(0, 19).replace(/T/g, ' ');
|
|
168
|
+
const oneMonthAgo$1 = () => {
|
|
169
|
+
const date = new Date();
|
|
170
|
+
date.setMonth(date.getMonth() - 1);
|
|
171
|
+
return date;
|
|
172
|
+
};
|
|
173
|
+
const initialState$o = {
|
|
174
|
+
data: [],
|
|
175
|
+
loading: 'idle',
|
|
176
|
+
page: 1,
|
|
177
|
+
filters: [
|
|
178
|
+
{
|
|
179
|
+
name: 'dateCreation',
|
|
180
|
+
method: 'between',
|
|
181
|
+
value: {
|
|
182
|
+
start: formatDate$1(oneMonthAgo$1()),
|
|
183
|
+
end: formatDate$1(new Date()),
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
orders: [],
|
|
188
|
+
limit: 30,
|
|
189
|
+
nbResults: 0,
|
|
190
|
+
};
|
|
191
|
+
const fetchLogsObjects = toolkit.createAsyncThunk('admin/fetchLogsObjects', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
192
|
+
try {
|
|
193
|
+
const logs = (yield extra.jApi.admin.logs.getLogsObjects(params)).result;
|
|
194
|
+
return logs;
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
if (!isAbortError(err)) {
|
|
198
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
199
|
+
}
|
|
200
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs Objects' });
|
|
201
|
+
}
|
|
202
|
+
}));
|
|
203
|
+
const adminLogsObjectsSlice = toolkit.createSlice({
|
|
204
|
+
name: 'logsObjects',
|
|
205
|
+
initialState: initialState$o,
|
|
206
|
+
reducers: {
|
|
207
|
+
setObjectsOrder: (state, action) => {
|
|
208
|
+
state.orders = [...action.payload];
|
|
209
|
+
state.page = 1;
|
|
210
|
+
},
|
|
211
|
+
setObjectsFilter: (state, action) => {
|
|
212
|
+
state.filters = [...action.payload];
|
|
213
|
+
state.page = 1;
|
|
214
|
+
},
|
|
215
|
+
setObjectsPage: (state, action) => {
|
|
216
|
+
state.page = action.payload;
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
extraReducers: (builder) => {
|
|
220
|
+
builder.addCase(fetchLogsObjects.pending, (state) => {
|
|
221
|
+
state.loading = 'pending';
|
|
222
|
+
});
|
|
223
|
+
builder.addCase(fetchLogsObjects.fulfilled, (state, action) => {
|
|
224
|
+
state.data = action.payload.data;
|
|
225
|
+
state.nbResults = action.payload.cnt;
|
|
226
|
+
state.limit = action.payload.limit || 30;
|
|
227
|
+
state.page = action.payload.page;
|
|
228
|
+
state.loading = 'idle';
|
|
229
|
+
});
|
|
230
|
+
builder.addCase(fetchLogsObjects.rejected, (state) => {
|
|
231
|
+
state.loading = 'idle';
|
|
232
|
+
});
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
const formatDate = (date) => date.toISOString().slice(0, 19).replace(/T/g, ' ');
|
|
237
|
+
const oneMonthAgo = () => {
|
|
238
|
+
const date = new Date();
|
|
239
|
+
date.setMonth(date.getMonth() - 1);
|
|
240
|
+
return date;
|
|
241
|
+
};
|
|
242
|
+
const initialState$n = {
|
|
243
|
+
data: [],
|
|
244
|
+
loading: 'idle',
|
|
245
|
+
page: 1,
|
|
246
|
+
filters: [
|
|
247
|
+
{
|
|
248
|
+
name: 'dateCreation',
|
|
249
|
+
method: 'between',
|
|
250
|
+
value: {
|
|
251
|
+
start: formatDate(oneMonthAgo()),
|
|
252
|
+
end: formatDate(new Date()),
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
orders: [],
|
|
257
|
+
limit: 30,
|
|
258
|
+
nbResults: 0,
|
|
259
|
+
};
|
|
260
|
+
const fetchLogsSearch = toolkit.createAsyncThunk('admin/fetchLogsSearch', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
261
|
+
try {
|
|
262
|
+
const logs = (yield extra.jApi.admin.logs.getLogsSearch(params)).result;
|
|
263
|
+
return logs;
|
|
264
|
+
}
|
|
265
|
+
catch (err) {
|
|
266
|
+
if (!isAbortError(err)) {
|
|
267
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
268
|
+
}
|
|
269
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs Search' });
|
|
270
|
+
}
|
|
271
|
+
}));
|
|
272
|
+
const adminLogsSearchSlice = toolkit.createSlice({
|
|
273
|
+
name: 'logsSearch',
|
|
274
|
+
initialState: initialState$n,
|
|
275
|
+
reducers: {
|
|
276
|
+
setSearchOrder: (state, action) => {
|
|
277
|
+
state.orders = [...action.payload];
|
|
278
|
+
state.page = 1;
|
|
279
|
+
},
|
|
280
|
+
setSearchFilter: (state, action) => {
|
|
281
|
+
state.filters = [...action.payload];
|
|
282
|
+
state.page = 1;
|
|
283
|
+
},
|
|
284
|
+
setSearchPage: (state, action) => {
|
|
285
|
+
state.page = action.payload;
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
extraReducers: (builder) => {
|
|
289
|
+
builder.addCase(fetchLogsSearch.pending, (state) => {
|
|
290
|
+
state.loading = 'pending';
|
|
291
|
+
});
|
|
292
|
+
builder.addCase(fetchLogsSearch.fulfilled, (state, action) => {
|
|
293
|
+
var _a;
|
|
294
|
+
state.data = action.payload.data;
|
|
295
|
+
state.nbResults = action.payload.cnt;
|
|
296
|
+
state.limit = (_a = action.payload.limit) !== null && _a !== void 0 ? _a : 30;
|
|
297
|
+
state.page = action.payload.page;
|
|
298
|
+
state.loading = 'idle';
|
|
299
|
+
});
|
|
300
|
+
builder.addCase(fetchLogsSearch.rejected, (state) => {
|
|
301
|
+
state.loading = 'idle';
|
|
302
|
+
});
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
const selectAdminLogsNavigation = (state) => state.adminLogs.logsNavigation;
|
|
307
|
+
const selectAdminLogsObjects = (state) => state.adminLogs.logsObjects;
|
|
308
|
+
const selectAdminLogsSearch = (state) => state.adminLogs.logsSearch;
|
|
309
|
+
const adminLogsSliceReducer = toolkit.combineReducers({
|
|
310
|
+
[adminLogsNavigationSlice.name]: adminLogsNavigationSlice.reducer,
|
|
311
|
+
[adminLogsObjectsSlice.name]: adminLogsObjectsSlice.reducer,
|
|
312
|
+
[adminLogsSearchSlice.name]: adminLogsSearchSlice.reducer,
|
|
313
|
+
});
|
|
314
|
+
const adminLogsSlice = {
|
|
315
|
+
name: 'adminLogs',
|
|
316
|
+
reducer: adminLogsSliceReducer,
|
|
317
|
+
};
|
|
318
|
+
const adminLogsReducer = adminLogsSlice.reducer;
|
|
319
|
+
const AdminLogs = {
|
|
320
|
+
slice: adminLogsSlice,
|
|
321
|
+
actions: Object.assign(Object.assign(Object.assign(Object.assign({}, adminLogsNavigationSlice.actions), adminLogsObjectsSlice.actions), adminLogsSearchSlice.actions), { fetchLogsNavigation,
|
|
322
|
+
fetchLogsObjects,
|
|
323
|
+
fetchLogsSearch }),
|
|
324
|
+
selectors: { selectAdminLogsNavigation, selectAdminLogsObjects, selectAdminLogsSearch },
|
|
95
325
|
};
|
|
96
326
|
|
|
97
327
|
const initialState$m = {
|
|
@@ -488,6 +718,17 @@ const fetchComments = toolkit.createAsyncThunk('commentList/fetchCommentList', (
|
|
|
488
718
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve comments' });
|
|
489
719
|
}
|
|
490
720
|
}));
|
|
721
|
+
const deleteComment = toolkit.createAsyncThunk('commentList/deleteComment', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
722
|
+
var _b;
|
|
723
|
+
try {
|
|
724
|
+
yield extra.jApi.article.deleteComment(params.idComment);
|
|
725
|
+
return true;
|
|
726
|
+
}
|
|
727
|
+
catch (error) {
|
|
728
|
+
dispatch(Toast.actions.error({ label: (_b = error.errorMsg) !== null && _b !== void 0 ? _b : 'GLOBAL_Technical_Error' }));
|
|
729
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot delete comment' });
|
|
730
|
+
}
|
|
731
|
+
}));
|
|
491
732
|
const CommentListSlice = toolkit.createSlice({
|
|
492
733
|
name: 'commentList',
|
|
493
734
|
initialState: initialState$i,
|
|
@@ -543,6 +784,22 @@ const CommentListSlice = toolkit.createSlice({
|
|
|
543
784
|
})
|
|
544
785
|
.addCase(fetchComments.rejected, (state) => {
|
|
545
786
|
state.loading = 'idle';
|
|
787
|
+
})
|
|
788
|
+
.addCase(deleteComment.pending, (state, action) => {
|
|
789
|
+
state.comments = state.comments.map((c) => {
|
|
790
|
+
if (c.idArticle !== action.meta.arg.idArticle) {
|
|
791
|
+
return c;
|
|
792
|
+
}
|
|
793
|
+
return Object.assign(Object.assign({}, c), { list: c.list.map((comment) => comment.id === action.meta.arg.idComment ? Object.assign(Object.assign({}, comment), { pending: true }) : comment) });
|
|
794
|
+
});
|
|
795
|
+
})
|
|
796
|
+
.addCase(deleteComment.rejected, (state, action) => {
|
|
797
|
+
state.comments = state.comments.map((c) => {
|
|
798
|
+
if (c.idArticle !== action.meta.arg.idArticle) {
|
|
799
|
+
return c;
|
|
800
|
+
}
|
|
801
|
+
return Object.assign(Object.assign({}, c), { list: c.list.map((comment) => comment.id === action.meta.arg.idComment ? Object.assign(Object.assign({}, comment), { pending: false }) : comment) });
|
|
802
|
+
});
|
|
546
803
|
});
|
|
547
804
|
},
|
|
548
805
|
});
|
|
@@ -604,13 +861,12 @@ const commentSlice = {
|
|
|
604
861
|
};
|
|
605
862
|
const selectCommentList = (state, idArticle, limit = 0) => {
|
|
606
863
|
const data = state.comment.commentList.comments.find((c) => c.idArticle === idArticle);
|
|
607
|
-
const
|
|
608
|
-
const list = [...dataList].sort((c1, c2) => c1.id - c2.id);
|
|
864
|
+
const list = data ? [...data.list].sort((c1, c2) => c1.id - c2.id) : [];
|
|
609
865
|
return limit !== 0 ? list.slice(-limit) : list;
|
|
610
866
|
};
|
|
611
867
|
const Comment = {
|
|
612
868
|
slice: commentSlice,
|
|
613
|
-
actions: Object.assign({ fetchComments }, CommentListSlice.actions),
|
|
869
|
+
actions: Object.assign({ fetchComments, deleteComment }, CommentListSlice.actions),
|
|
614
870
|
selectors: {
|
|
615
871
|
commentList: selectCommentList,
|
|
616
872
|
},
|
|
@@ -4047,13 +4303,43 @@ const specialAttrName = ['title', 'alertAuthor', 'sendAlert'];
|
|
|
4047
4303
|
const ignoredFields = ['edito'];
|
|
4048
4304
|
function updateViewsFromFields(clonedApp, appFields) {
|
|
4049
4305
|
return Object.assign({}, ...viewsList.map((view) => {
|
|
4306
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4050
4307
|
const viewItems = {};
|
|
4308
|
+
let viewMissingOptionalFields = [];
|
|
4309
|
+
if (((_a = MapExtraFieldsWithView[view]) === null || _a === void 0 ? void 0 : _a.optional) !== undefined) {
|
|
4310
|
+
viewMissingOptionalFields = viewMissingOptionalFields.concat((_c = (_b = MapExtraFieldsWithView[view]) === null || _b === void 0 ? void 0 : _b.optional) !== null && _c !== void 0 ? _c : []);
|
|
4311
|
+
}
|
|
4312
|
+
let viewMissingFixedFields = [];
|
|
4313
|
+
if (((_d = MapExtraFieldsWithView[view]) === null || _d === void 0 ? void 0 : _d.fixed) !== undefined) {
|
|
4314
|
+
viewMissingFixedFields = viewMissingFixedFields.concat((_f = (_e = MapExtraFieldsWithView[view]) === null || _e === void 0 ? void 0 : _e.fixed) !== null && _f !== void 0 ? _f : []);
|
|
4315
|
+
}
|
|
4051
4316
|
Object.entries(clonedApp.views[view]).forEach(([fieldId, field]) => {
|
|
4052
4317
|
if (field.isFixed) {
|
|
4053
4318
|
viewItems[fieldId] = field;
|
|
4319
|
+
viewMissingFixedFields.splice(viewMissingFixedFields.findIndex((fieldType) => fieldType === field.type), 1);
|
|
4054
4320
|
}
|
|
4055
4321
|
if (field.isOptional) {
|
|
4056
4322
|
viewItems[fieldId] = field;
|
|
4323
|
+
viewMissingOptionalFields.splice(viewMissingOptionalFields.findIndex((fieldType) => fieldType === field.type), 1);
|
|
4324
|
+
}
|
|
4325
|
+
});
|
|
4326
|
+
const missingFieldsSet = new Set(viewMissingFixedFields.concat(viewMissingOptionalFields));
|
|
4327
|
+
const fieldTypeHandlers = {
|
|
4328
|
+
[ExtraAppFieldsItemViews.CREATIONDATE]: () => getDateCreationToView(false),
|
|
4329
|
+
[ExtraAppFieldsItemViews.TITLE]: () => getTitleToView({ ref: 'title', fixedValue: undefined }),
|
|
4330
|
+
[ExtraAppFieldsItemViews.USER]: () => getUserToView(false),
|
|
4331
|
+
[ExtraAppFieldsItemViews.RECEIVEACOPY]: () => getAlertAuthorToView({ ref: 'alertAuthor', fixedValue: undefined }),
|
|
4332
|
+
[ExtraAppFieldsItemViews.SENDALERTTOSUBSCRIBERS]: () => getSendAlertToView({ ref: 'sendAlert', fixedValue: undefined }),
|
|
4333
|
+
[ExtraAppFieldsItemViews.PUBLISHTO]: () => getPublishToToView({ ref: 'publishTo', fixedValue: undefined }),
|
|
4334
|
+
};
|
|
4335
|
+
missingFieldsSet.forEach((fieldType) => {
|
|
4336
|
+
const handler = fieldTypeHandlers[fieldType];
|
|
4337
|
+
if (handler) {
|
|
4338
|
+
const [localFieldId, localField] = handler();
|
|
4339
|
+
viewItems[localFieldId] = localField;
|
|
4340
|
+
}
|
|
4341
|
+
else {
|
|
4342
|
+
console.error('ExtraAppFieldsItemViews does not have this field type: ' + fieldType);
|
|
4057
4343
|
}
|
|
4058
4344
|
});
|
|
4059
4345
|
appFields.forEach((field, idx) => {
|
|
@@ -4162,16 +4448,20 @@ function buildView(appS, registeredFields, displayName, displayValue, tables, st
|
|
|
4162
4448
|
if (fieldIdx === -1 && fixedInfo) {
|
|
4163
4449
|
switch (fixedInfo.ref) {
|
|
4164
4450
|
case 'title':
|
|
4165
|
-
|
|
4451
|
+
const [localFieldIdTitle, localFieldTitle] = getTitleToView(fixedInfo);
|
|
4452
|
+
appS.views[newName][localFieldIdTitle] = localFieldTitle;
|
|
4166
4453
|
break;
|
|
4167
4454
|
case 'alertAuthor':
|
|
4168
|
-
|
|
4455
|
+
const [localFieldIdAlertAuthor, localFieldAlertAuthor] = getAlertAuthorToView(fixedInfo);
|
|
4456
|
+
appS.views[newName][localFieldIdAlertAuthor] = localFieldAlertAuthor;
|
|
4169
4457
|
break;
|
|
4170
4458
|
case 'sendAlert':
|
|
4171
|
-
|
|
4459
|
+
const [localFieldIdSendAlert, localFieldSendAlert] = getSendAlertToView(fixedInfo);
|
|
4460
|
+
appS.views[newName][localFieldIdSendAlert] = localFieldSendAlert;
|
|
4172
4461
|
break;
|
|
4173
4462
|
case 'publishTo':
|
|
4174
|
-
|
|
4463
|
+
const [localFieldIdPublishTo, localFieldPublishTo] = getPublishToToView(fixedInfo);
|
|
4464
|
+
appS.views[newName][localFieldIdPublishTo] = localFieldPublishTo;
|
|
4175
4465
|
break;
|
|
4176
4466
|
default:
|
|
4177
4467
|
console.error('fixed field info with unsupported ref ', fixedInfo);
|
|
@@ -4204,15 +4494,18 @@ function buildFilterView(appS, registeredFields, attrExposed, tables, state) {
|
|
|
4204
4494
|
function addFieldToViewFromRef(appS, registeredFields, tables, viewName, fieldRef, index, state) {
|
|
4205
4495
|
switch (fieldRef) {
|
|
4206
4496
|
case 'title':
|
|
4207
|
-
|
|
4497
|
+
const [fieldIDTitle, fieldInfoTitle] = getTitleToView({ ref: 'title', fixedValue: undefined });
|
|
4498
|
+
appS['views'][viewName][fieldIDTitle] = fieldInfoTitle;
|
|
4208
4499
|
break;
|
|
4209
4500
|
case 'iduser':
|
|
4210
4501
|
case 'idUser':
|
|
4211
|
-
|
|
4502
|
+
const [fieldIDIdUser, fieldInfoIdUser] = getUserToView();
|
|
4503
|
+
appS['views'][viewName][fieldIDIdUser] = fieldInfoIdUser;
|
|
4212
4504
|
break;
|
|
4213
4505
|
case 'datecreation':
|
|
4214
4506
|
case 'dateCreation':
|
|
4215
|
-
|
|
4507
|
+
const [fieldIDDateCreation, fieldInfoDateCreation] = getDateCreationToView();
|
|
4508
|
+
appS['views'][viewName][fieldIDDateCreation] = fieldInfoDateCreation;
|
|
4216
4509
|
break;
|
|
4217
4510
|
default:
|
|
4218
4511
|
defaultFieldCreation(appS, registeredFields, tables, viewName, fieldRef, index, state);
|
|
@@ -4452,85 +4745,97 @@ function getFormItemType(installedField) {
|
|
|
4452
4745
|
':' +
|
|
4453
4746
|
JSON.stringify(installedField));
|
|
4454
4747
|
}
|
|
4455
|
-
function
|
|
4748
|
+
function getTitleToView(fixedInfo, isUsed = true) {
|
|
4456
4749
|
var _a;
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4750
|
+
return [
|
|
4751
|
+
'title',
|
|
4752
|
+
{
|
|
4753
|
+
type: ExtraAppFieldsItemViews.TITLE,
|
|
4754
|
+
properties: [],
|
|
4755
|
+
isUsed: isUsed,
|
|
4756
|
+
isOptional: false,
|
|
4757
|
+
isLockedValue: !!(fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue),
|
|
4758
|
+
isFixed: true,
|
|
4759
|
+
value: (_a = fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue) !== null && _a !== void 0 ? _a : null,
|
|
4760
|
+
pos: 0,
|
|
4761
|
+
},
|
|
4762
|
+
];
|
|
4468
4763
|
}
|
|
4469
|
-
function
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4764
|
+
function getAlertAuthorToView(fixedInfo, isUsed = true) {
|
|
4765
|
+
return [
|
|
4766
|
+
'alertAuthor',
|
|
4767
|
+
{
|
|
4768
|
+
type: ExtraAppFieldsItemViews.RECEIVEACOPY,
|
|
4769
|
+
properties: [],
|
|
4770
|
+
isUsed: isUsed,
|
|
4771
|
+
isOptional: true,
|
|
4772
|
+
isLockedValue: (fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue) !== undefined,
|
|
4773
|
+
isFixed: false,
|
|
4774
|
+
value: (fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue) !== undefined ? fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue : true,
|
|
4775
|
+
pos: 300,
|
|
4776
|
+
},
|
|
4777
|
+
];
|
|
4481
4778
|
}
|
|
4482
|
-
function
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4779
|
+
function getSendAlertToView(fixedInfo, isUsed = true) {
|
|
4780
|
+
return [
|
|
4781
|
+
'sendAlert',
|
|
4782
|
+
{
|
|
4783
|
+
type: ExtraAppFieldsItemViews.SENDALERTTOSUBSCRIBERS,
|
|
4784
|
+
properties: [],
|
|
4785
|
+
isUsed: isUsed,
|
|
4786
|
+
isOptional: true,
|
|
4787
|
+
isLockedValue: (fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue) !== undefined,
|
|
4788
|
+
isFixed: false,
|
|
4789
|
+
value: (fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue) !== undefined ? fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue : true,
|
|
4790
|
+
pos: 200,
|
|
4791
|
+
},
|
|
4792
|
+
];
|
|
4494
4793
|
}
|
|
4495
|
-
function
|
|
4794
|
+
function getPublishToToView(fixedInfo, isUsed = true) {
|
|
4496
4795
|
var _a;
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4796
|
+
return [
|
|
4797
|
+
'publishTo',
|
|
4798
|
+
{
|
|
4799
|
+
type: ExtraAppFieldsItemViews.PUBLISHTO,
|
|
4800
|
+
properties: [],
|
|
4801
|
+
isUsed: isUsed,
|
|
4802
|
+
isOptional: true,
|
|
4803
|
+
isLockedValue: !!(fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue),
|
|
4804
|
+
isFixed: false,
|
|
4805
|
+
value: (_a = fixedInfo === null || fixedInfo === void 0 ? void 0 : fixedInfo.fixedValue) !== null && _a !== void 0 ? _a : [],
|
|
4806
|
+
pos: 100,
|
|
4807
|
+
},
|
|
4808
|
+
];
|
|
4508
4809
|
}
|
|
4509
|
-
function
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4810
|
+
function getUserToView(isUsed = true) {
|
|
4811
|
+
return [
|
|
4812
|
+
'user',
|
|
4813
|
+
{
|
|
4814
|
+
type: ExtraAppFieldsItemViews.USER,
|
|
4815
|
+
properties: [],
|
|
4816
|
+
isUsed: isUsed,
|
|
4817
|
+
isOptional: false,
|
|
4818
|
+
isLockedValue: false,
|
|
4819
|
+
isFixed: true,
|
|
4820
|
+
value: null,
|
|
4821
|
+
pos: 1,
|
|
4822
|
+
},
|
|
4823
|
+
];
|
|
4521
4824
|
}
|
|
4522
|
-
function
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4825
|
+
function getDateCreationToView(isUsed = true) {
|
|
4826
|
+
return [
|
|
4827
|
+
'dateCreation',
|
|
4828
|
+
{
|
|
4829
|
+
type: ExtraAppFieldsItemViews.CREATIONDATE,
|
|
4830
|
+
properties: [],
|
|
4831
|
+
isUsed: isUsed,
|
|
4832
|
+
isOptional: true,
|
|
4833
|
+
isLockedValue: false,
|
|
4834
|
+
isFixed: false,
|
|
4835
|
+
value: null,
|
|
4836
|
+
pos: 100,
|
|
4837
|
+
},
|
|
4838
|
+
];
|
|
4534
4839
|
}
|
|
4535
4840
|
|
|
4536
4841
|
function InstalledAppStudioAdapter(serverApp, serverApps, state) {
|
|
@@ -5213,6 +5518,7 @@ const studio = {
|
|
|
5213
5518
|
|
|
5214
5519
|
exports.APP_STATUS_TYPE = APP_STATUS_TYPE;
|
|
5215
5520
|
exports.AUDIENCE = AUDIENCE;
|
|
5521
|
+
exports.AdminLogs = AdminLogs;
|
|
5216
5522
|
exports.Animations = Animations;
|
|
5217
5523
|
exports.AppColumnsDefaultTypes = AppColumnsDefaultTypes;
|
|
5218
5524
|
exports.AppFieldFormPropertyTypes = AppFieldFormPropertyTypes;
|
|
@@ -5251,6 +5557,8 @@ exports.WedocApp = WedocApp;
|
|
|
5251
5557
|
exports.Widget = Widget;
|
|
5252
5558
|
exports.WidgetEditor = WidgetEditor;
|
|
5253
5559
|
exports.actions = actions;
|
|
5560
|
+
exports.adminLogsReducer = adminLogsReducer;
|
|
5561
|
+
exports.adminLogsSlice = adminLogsSlice;
|
|
5254
5562
|
exports.animationsReducer = animationsReducer;
|
|
5255
5563
|
exports.animationsSlice = animationsSlice;
|
|
5256
5564
|
exports.fetchMediaLibraryConfig = fetchMediaLibraryConfig;
|