jamespot-front-business 1.1.91 → 1.1.93
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 +23 -9
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +23 -9
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +384 -347
- package/package.json +2 -2
package/dist/esm.js
CHANGED
|
@@ -1387,9 +1387,17 @@ const toggleExtraBotActivation = createAsyncThunk('extraBot/toggleActivation', (
|
|
|
1387
1387
|
try {
|
|
1388
1388
|
const enabled = !extraBot.enabled;
|
|
1389
1389
|
const res = (yield extra.jApi.article.update(Object.assign(Object.assign({}, extraBot), { enabled }), { format: Format.VIEW })).result;
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1390
|
+
if (res.enabled !== extraBot.enabled) {
|
|
1391
|
+
dispatch(Toast.actions.success({
|
|
1392
|
+
label: enabled ? 'APP_ExtraBot_Toast_ActivationSuccess' : 'APP_ExtraBot_Toast_DeactivationSuccess',
|
|
1393
|
+
}));
|
|
1394
|
+
dispatch(fetchExtraBotListAll());
|
|
1395
|
+
}
|
|
1396
|
+
else {
|
|
1397
|
+
dispatch(Toast.actions.error({
|
|
1398
|
+
label: 'APP_ExtraBot_Toast_FailedToChangeActivation',
|
|
1399
|
+
}));
|
|
1400
|
+
}
|
|
1393
1401
|
return res;
|
|
1394
1402
|
}
|
|
1395
1403
|
catch (err) {
|
|
@@ -1406,8 +1414,9 @@ const saveExtraBot = createAsyncThunk('extraBot/save', ({ extraBot }, { extra, r
|
|
|
1406
1414
|
let user;
|
|
1407
1415
|
delete data.avatar;
|
|
1408
1416
|
if (extraBot.uri) {
|
|
1409
|
-
res = (yield extra.jApi.article.update(data, {
|
|
1410
|
-
.
|
|
1417
|
+
res = (yield extra.jApi.article.update(data, {
|
|
1418
|
+
format: Format.VIEW,
|
|
1419
|
+
})).result;
|
|
1411
1420
|
user = (yield extra.jApi.extraBot.updateBot(res.uri)).result;
|
|
1412
1421
|
}
|
|
1413
1422
|
else {
|
|
@@ -4418,7 +4427,9 @@ function renderWidget(fieldType, fieldProperties) {
|
|
|
4418
4427
|
</options>
|
|
4419
4428
|
${hasDefaultValue || userCanModifyByComment
|
|
4420
4429
|
? `<params>
|
|
4421
|
-
${hasDefaultValue
|
|
4430
|
+
${hasDefaultValue
|
|
4431
|
+
? `<param key="defaultValue" value="${optionEditor.value.defaultSelectOptionValue.value}"/>`
|
|
4432
|
+
: ''}
|
|
4422
4433
|
${userCanModifyByComment ? `<param key="explain" value="1"/>` : ''}
|
|
4423
4434
|
</params>`
|
|
4424
4435
|
: ''}
|
|
@@ -4509,7 +4520,7 @@ function renderWidget(fieldType, fieldProperties) {
|
|
|
4509
4520
|
function renderProperty(properties, propertyToFind) {
|
|
4510
4521
|
const labelProperty = properties === null || properties === void 0 ? void 0 : properties.find((property) => property.propertyType === propertyToFind);
|
|
4511
4522
|
if (labelProperty) {
|
|
4512
|
-
const value = labelProperty.value.replaceAll("
|
|
4523
|
+
const value = labelProperty.value.replaceAll('"', '"');
|
|
4513
4524
|
return `${propertyToFind.toLowerCase()}="${value}"`;
|
|
4514
4525
|
}
|
|
4515
4526
|
return '';
|
|
@@ -4615,7 +4626,7 @@ function renderDisplays(studioApp) {
|
|
|
4615
4626
|
const viewField = Object.entries(viewContent)
|
|
4616
4627
|
.filter((a) => a[1].isUsed)
|
|
4617
4628
|
.sort((a, b) => a[1].pos - b[1].pos);
|
|
4618
|
-
toRet += `<display view="${internal2XmlView[viewName]}" mode="${viewName === 'view' ? 'view' : 'form'}">
|
|
4629
|
+
toRet += `<display view="${internal2XmlView[viewName]}${viewName === 'view' && studioApp.manifest.displayContentLegacyTable ? 'Disabled' : ''}" mode="${viewName === 'view' ? 'view' : 'form'}">
|
|
4619
4630
|
${viewField.map(([fieldId, view]) => renderDisplayAttr(fieldId, view)).join('')}
|
|
4620
4631
|
</display>`;
|
|
4621
4632
|
}
|
|
@@ -4757,6 +4768,7 @@ const installedToV2ViewNames = {
|
|
|
4757
4768
|
create: 'create',
|
|
4758
4769
|
edit: 'edit',
|
|
4759
4770
|
display: 'view',
|
|
4771
|
+
displayDisabled: 'view',
|
|
4760
4772
|
};
|
|
4761
4773
|
const specialAttrName = ['title', 'alertAuthor', 'sendAlert'];
|
|
4762
4774
|
const ignoredFields = ['edito'];
|
|
@@ -5298,12 +5310,13 @@ function getDateCreationToView(isUsed = true) {
|
|
|
5298
5310
|
}
|
|
5299
5311
|
|
|
5300
5312
|
function InstalledAppStudioAdapter(serverApp, serverApps, state) {
|
|
5301
|
-
var _a, _b, _c, _d;
|
|
5313
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5302
5314
|
const { version, dateCreation } = serverApp.manifest;
|
|
5303
5315
|
const appTypeServer = serverApp.typeModel;
|
|
5304
5316
|
const views = Object.assign({}, ...viewsList.map((view) => ({
|
|
5305
5317
|
[view]: {},
|
|
5306
5318
|
})));
|
|
5319
|
+
const typedApp = serverApp;
|
|
5307
5320
|
const studioApp = {
|
|
5308
5321
|
idApp: serverApp.idApp,
|
|
5309
5322
|
status: _formatStatus(serverApp),
|
|
@@ -5323,6 +5336,7 @@ function InstalledAppStudioAdapter(serverApp, serverApps, state) {
|
|
|
5323
5336
|
viewSolr: serverApp.view ? STUDIO_VIEW.SOLR : STUDIO_VIEW.NOT_SOLR,
|
|
5324
5337
|
typeLabel: appTypeServer.typeLabel,
|
|
5325
5338
|
articlesCount: (_d = serverApp.articlesCount) !== null && _d !== void 0 ? _d : 0,
|
|
5339
|
+
displayContentLegacyTable: !!((_f = (_e = typedApp === null || typedApp === void 0 ? void 0 : typedApp.typeModel) === null || _e === void 0 ? void 0 : _e.displays) === null || _f === void 0 ? void 0 : _f['displayDisabled']),
|
|
5326
5340
|
},
|
|
5327
5341
|
fields: [],
|
|
5328
5342
|
views,
|