jamespot-front-business 1.1.35 → 1.1.36
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 +127 -23
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +126 -24
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +74 -5
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -1405,12 +1405,12 @@ const widgetArticleAttachmentDefinition = {
|
|
|
1405
1405
|
label: 'WIDGET_Article_Attachment',
|
|
1406
1406
|
description: 'WIDGET_Article_Attachment_Description',
|
|
1407
1407
|
name: 'widget-article-attachment',
|
|
1408
|
-
img: '/img/
|
|
1408
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
|
|
1409
1409
|
available: true,
|
|
1410
1410
|
panel: {
|
|
1411
1411
|
useWrapper: true,
|
|
1412
1412
|
useEditor: true,
|
|
1413
|
-
useWidgets: false
|
|
1413
|
+
useWidgets: false,
|
|
1414
1414
|
},
|
|
1415
1415
|
};
|
|
1416
1416
|
const widgetArticleAttachmentContent = {
|
|
@@ -1421,12 +1421,12 @@ const widgetArticleGalleryDefinition = {
|
|
|
1421
1421
|
label: 'WIDGET_Article_Gallery',
|
|
1422
1422
|
description: 'WIDGET_Article_Gallery_Description',
|
|
1423
1423
|
name: 'widget-article-gallery',
|
|
1424
|
-
img: '/img/
|
|
1424
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
|
|
1425
1425
|
available: true,
|
|
1426
1426
|
panel: {
|
|
1427
1427
|
useWrapper: false,
|
|
1428
1428
|
useEditor: true,
|
|
1429
|
-
useWidgets: false
|
|
1429
|
+
useWidgets: false,
|
|
1430
1430
|
},
|
|
1431
1431
|
};
|
|
1432
1432
|
const widgetArticleGalleryContent = {
|
|
@@ -1439,39 +1439,34 @@ const widgetArticleImageDefinition = {
|
|
|
1439
1439
|
label: 'WIDGET_Article_Image',
|
|
1440
1440
|
description: 'WIDGET_Article_Image_Description',
|
|
1441
1441
|
name: 'widget-article-image',
|
|
1442
|
-
img: '/img/
|
|
1442
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_illustration.png',
|
|
1443
1443
|
available: true,
|
|
1444
1444
|
panel: {
|
|
1445
1445
|
useWrapper: false,
|
|
1446
1446
|
useEditor: true,
|
|
1447
|
-
useWidgets: false
|
|
1447
|
+
useWidgets: false,
|
|
1448
1448
|
},
|
|
1449
1449
|
};
|
|
1450
|
-
const widgetArticleImageContent = {
|
|
1451
|
-
displayAs: 'image',
|
|
1452
|
-
backgroundPosition: 'center',
|
|
1453
|
-
backgroundSize: 'cover',
|
|
1454
|
-
borderRadius: '8'
|
|
1455
|
-
};
|
|
1450
|
+
const widgetArticleImageContent = {};
|
|
1456
1451
|
|
|
1457
1452
|
const widgetArticleButtonDefinition = {
|
|
1458
1453
|
label: 'WIDGET_Button',
|
|
1459
1454
|
description: 'WIDGET_Button_Description',
|
|
1460
1455
|
name: 'widget-article-button',
|
|
1461
|
-
img: '/img/
|
|
1456
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
|
|
1462
1457
|
available: true,
|
|
1463
1458
|
panel: {
|
|
1464
1459
|
useWrapper: false,
|
|
1465
1460
|
useEditor: true,
|
|
1466
|
-
useWidgets: false
|
|
1461
|
+
useWidgets: false,
|
|
1467
1462
|
},
|
|
1468
1463
|
};
|
|
1469
1464
|
const widgetArticleButtonContent = {
|
|
1470
|
-
text: '
|
|
1465
|
+
text: '',
|
|
1471
1466
|
openingType: 'link',
|
|
1472
1467
|
openingTypeLink: {
|
|
1473
1468
|
url: '',
|
|
1474
|
-
target: '_blank'
|
|
1469
|
+
target: '_blank',
|
|
1475
1470
|
},
|
|
1476
1471
|
variant: 'contained',
|
|
1477
1472
|
fontSize: '14',
|
|
@@ -1485,36 +1480,56 @@ const widgetArticleTextDefinition = {
|
|
|
1485
1480
|
label: 'WIDGET_Text',
|
|
1486
1481
|
description: 'WIDGET_Text_Description',
|
|
1487
1482
|
name: 'widget-article-text',
|
|
1488
|
-
img: '/img/
|
|
1483
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
|
|
1489
1484
|
available: true,
|
|
1490
1485
|
panel: {
|
|
1491
1486
|
useWrapper: false,
|
|
1492
1487
|
useEditor: true,
|
|
1493
|
-
useWidgets: false
|
|
1488
|
+
useWidgets: false,
|
|
1494
1489
|
},
|
|
1495
1490
|
};
|
|
1496
1491
|
const widgetArticleTextContent = {
|
|
1497
1492
|
fontSize: '18',
|
|
1498
1493
|
lineHeight: '1.6',
|
|
1499
|
-
text: ''
|
|
1494
|
+
text: '',
|
|
1500
1495
|
};
|
|
1501
1496
|
|
|
1502
1497
|
const widgetArticleTitleDefinition = {
|
|
1503
1498
|
label: 'WIDGET_Title',
|
|
1504
1499
|
description: 'WIDGET_Title_Description',
|
|
1505
1500
|
name: 'widget-article-title',
|
|
1506
|
-
img: '/img/
|
|
1501
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
|
|
1507
1502
|
available: true,
|
|
1508
1503
|
panel: {
|
|
1509
1504
|
useWrapper: false,
|
|
1510
1505
|
useEditor: true,
|
|
1511
|
-
useWidgets: false
|
|
1506
|
+
useWidgets: false,
|
|
1512
1507
|
},
|
|
1513
1508
|
};
|
|
1514
1509
|
const widgetArticleTitleContent = {
|
|
1515
1510
|
text: '',
|
|
1516
1511
|
heading: 'h1',
|
|
1517
|
-
backgroundColor: 'transparent'
|
|
1512
|
+
backgroundColor: 'transparent',
|
|
1513
|
+
};
|
|
1514
|
+
|
|
1515
|
+
const widgetArticleSliderDefinition = {
|
|
1516
|
+
label: 'WIDGET_Slider',
|
|
1517
|
+
description: 'WIDGET_Slider_Description',
|
|
1518
|
+
name: 'widget-article-slider',
|
|
1519
|
+
img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
|
|
1520
|
+
available: true,
|
|
1521
|
+
panel: {
|
|
1522
|
+
useWrapper: false,
|
|
1523
|
+
useEditor: true,
|
|
1524
|
+
useWidgets: false,
|
|
1525
|
+
},
|
|
1526
|
+
};
|
|
1527
|
+
const widgetArticleSliderContent = {
|
|
1528
|
+
slides: [],
|
|
1529
|
+
maxWidth: 800,
|
|
1530
|
+
loop: false,
|
|
1531
|
+
useDots: true,
|
|
1532
|
+
startAt: 0,
|
|
1518
1533
|
};
|
|
1519
1534
|
|
|
1520
1535
|
function uniqid() {
|
|
@@ -1535,7 +1550,7 @@ function widget(name) {
|
|
|
1535
1550
|
return {
|
|
1536
1551
|
uniqid: uniqid(),
|
|
1537
1552
|
name,
|
|
1538
|
-
content: content(name)
|
|
1553
|
+
content: content(name),
|
|
1539
1554
|
};
|
|
1540
1555
|
}
|
|
1541
1556
|
function content(name) {
|
|
@@ -1543,6 +1558,8 @@ function content(name) {
|
|
|
1543
1558
|
default:
|
|
1544
1559
|
case 'widget-article-attachment':
|
|
1545
1560
|
return Object.assign({}, widgetArticleAttachmentContent);
|
|
1561
|
+
case 'widget-article-slider':
|
|
1562
|
+
return Object.assign({}, widgetArticleSliderContent);
|
|
1546
1563
|
case 'widget-article-gallery':
|
|
1547
1564
|
return Object.assign({}, widgetArticleGalleryContent);
|
|
1548
1565
|
case 'widget-article-button':
|
|
@@ -1581,6 +1598,8 @@ function widgetDefinition(name) {
|
|
|
1581
1598
|
return widgetArticleGalleryDefinition;
|
|
1582
1599
|
case 'widget-article-attachment':
|
|
1583
1600
|
return widgetArticleAttachmentDefinition;
|
|
1601
|
+
case 'widget-article-slider':
|
|
1602
|
+
return widgetArticleSliderDefinition;
|
|
1584
1603
|
case 'widget-article-text':
|
|
1585
1604
|
return widgetArticleTextDefinition;
|
|
1586
1605
|
case 'widget-article-title':
|
|
@@ -1729,6 +1748,7 @@ const selectWidgetContent = (state, uniqid) => { var _a; return (_a = state.widg
|
|
|
1729
1748
|
const selectWidgetState = (state, uniqid) => { var _a; return (_a = state.widgets.states[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
1730
1749
|
const selectWidget = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
|
|
1731
1750
|
const isActive = (state, uniqid) => state.widgets.currentEditableWidgetId === uniqid;
|
|
1751
|
+
const updateWidgetContent = (uniqid, content, override) => Widget.slice.actions.updateWidget({ uniqid, content, override: override !== null && override !== void 0 ? override : false });
|
|
1732
1752
|
const Widget = {
|
|
1733
1753
|
const: WIDGETS,
|
|
1734
1754
|
factory: widgetFactory,
|
|
@@ -1845,6 +1865,15 @@ exports.AppFormItemTypes = void 0;
|
|
|
1845
1865
|
AppFormItemTypes["USERLINK"] = "USERLINK";
|
|
1846
1866
|
AppFormItemTypes["CONTENTLINK"] = "CONTENTLINK";
|
|
1847
1867
|
})(exports.AppFormItemTypes || (exports.AppFormItemTypes = {}));
|
|
1868
|
+
exports.ExtraAppFieldsItemViews = void 0;
|
|
1869
|
+
(function (ExtraAppFieldsItemViews) {
|
|
1870
|
+
ExtraAppFieldsItemViews["TITLE"] = "TITLE";
|
|
1871
|
+
ExtraAppFieldsItemViews["USER"] = "USER";
|
|
1872
|
+
ExtraAppFieldsItemViews["PUBLISHTO"] = "PUBLISHTO";
|
|
1873
|
+
ExtraAppFieldsItemViews["SENDALERTTOSUBSCRIBERS"] = "SENDALERTTOSUBSCRIBERS";
|
|
1874
|
+
ExtraAppFieldsItemViews["RECEIVEACOPY"] = "RECEIVEACOPY";
|
|
1875
|
+
ExtraAppFieldsItemViews["CREATIONDATE"] = "CREATIONDATE";
|
|
1876
|
+
})(exports.ExtraAppFieldsItemViews || (exports.ExtraAppFieldsItemViews = {}));
|
|
1848
1877
|
exports.AppFieldFormPropertyTypes = void 0;
|
|
1849
1878
|
(function (AppFieldFormPropertyTypes) {
|
|
1850
1879
|
AppFieldFormPropertyTypes["LABEL"] = "label";
|
|
@@ -1858,15 +1887,51 @@ exports.AppFieldFormPropertyTypes = void 0;
|
|
|
1858
1887
|
const AppFormUniqueList = [exports.AppFormItemTypes.DESCRIPTION, exports.AppFormItemTypes.IMAGE];
|
|
1859
1888
|
const AppFormBannedFromViews = new Map();
|
|
1860
1889
|
AppFormBannedFromViews.set(exports.AppFormItemTypes.IMAGE, ['list', 'filter', 'view']);
|
|
1890
|
+
const MapExtraFieldsWithView = {
|
|
1891
|
+
create: {
|
|
1892
|
+
fixed: [exports.ExtraAppFieldsItemViews.TITLE],
|
|
1893
|
+
optional: [
|
|
1894
|
+
exports.ExtraAppFieldsItemViews.PUBLISHTO,
|
|
1895
|
+
exports.ExtraAppFieldsItemViews.SENDALERTTOSUBSCRIBERS,
|
|
1896
|
+
exports.ExtraAppFieldsItemViews.RECEIVEACOPY,
|
|
1897
|
+
],
|
|
1898
|
+
},
|
|
1899
|
+
popup: {
|
|
1900
|
+
fixed: [exports.ExtraAppFieldsItemViews.TITLE],
|
|
1901
|
+
optional: [exports.ExtraAppFieldsItemViews.PUBLISHTO],
|
|
1902
|
+
},
|
|
1903
|
+
edit: {
|
|
1904
|
+
fixed: [exports.ExtraAppFieldsItemViews.TITLE],
|
|
1905
|
+
optional: [exports.ExtraAppFieldsItemViews.PUBLISHTO],
|
|
1906
|
+
},
|
|
1907
|
+
list: {
|
|
1908
|
+
fixed: [exports.ExtraAppFieldsItemViews.TITLE, exports.ExtraAppFieldsItemViews.USER],
|
|
1909
|
+
optional: [exports.ExtraAppFieldsItemViews.CREATIONDATE],
|
|
1910
|
+
},
|
|
1911
|
+
filter: {
|
|
1912
|
+
fixed: [exports.ExtraAppFieldsItemViews.TITLE, exports.ExtraAppFieldsItemViews.USER],
|
|
1913
|
+
optional: [exports.ExtraAppFieldsItemViews.CREATIONDATE],
|
|
1914
|
+
},
|
|
1915
|
+
view: {
|
|
1916
|
+
fixed: [exports.ExtraAppFieldsItemViews.TITLE],
|
|
1917
|
+
optional: [],
|
|
1918
|
+
},
|
|
1919
|
+
};
|
|
1861
1920
|
|
|
1862
1921
|
function InstalledAppStudioAdapter(serverApp, serverApps) {
|
|
1863
1922
|
const { version, dateCreation } = serverApp.manifest;
|
|
1864
1923
|
const appTypeServer = serverApp.typeModel;
|
|
1924
|
+
const views = Object.assign({}, ...viewsList.map((view) => ({
|
|
1925
|
+
[view]: [],
|
|
1926
|
+
})));
|
|
1865
1927
|
const studioApp = {
|
|
1866
1928
|
idApp: serverApp.idApp,
|
|
1867
1929
|
status: _formatStatus(serverApp),
|
|
1868
1930
|
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 })),
|
|
1869
1931
|
fields: [],
|
|
1932
|
+
views,
|
|
1933
|
+
installFor: serverApp.accessRightObjectList,
|
|
1934
|
+
audience: serverApp.checkAccess === false ? AUDIENCE.ALL : AUDIENCE.CUSTOM,
|
|
1870
1935
|
};
|
|
1871
1936
|
const inWorkAppVersion = _findAssociatedDraft(serverApp.idApp, serverApps);
|
|
1872
1937
|
if (!inWorkAppVersion)
|
|
@@ -1886,6 +1951,9 @@ function DraftAppStudioAdapter(serverApp) {
|
|
|
1886
1951
|
status: _formatStatus(serverApp),
|
|
1887
1952
|
manifest: parsedJson.manifest,
|
|
1888
1953
|
fields: parsedJson.fields,
|
|
1954
|
+
views: parsedJson.views,
|
|
1955
|
+
audience: parsedJson.audience,
|
|
1956
|
+
installFor: parsedJson.installFor,
|
|
1889
1957
|
};
|
|
1890
1958
|
}
|
|
1891
1959
|
function _formatStatus(serverApp) {
|
|
@@ -2011,6 +2079,37 @@ function cloneStudioAppFromExistingApp(existingApp, author) {
|
|
|
2011
2079
|
|
|
2012
2080
|
function createNewStudioApp$1({ author, appName }) {
|
|
2013
2081
|
const newAppId = uuid.v4();
|
|
2082
|
+
const views = Object.assign({}, ...viewsList.map((view) => {
|
|
2083
|
+
var _a, _b;
|
|
2084
|
+
const viewItems = {};
|
|
2085
|
+
(_a = MapExtraFieldsWithView[view]) === null || _a === void 0 ? void 0 : _a.fixed.forEach((fixedField, idx) => {
|
|
2086
|
+
viewItems[uuid.v4()] = {
|
|
2087
|
+
type: fixedField,
|
|
2088
|
+
properties: [],
|
|
2089
|
+
isUsed: true,
|
|
2090
|
+
isOptional: false,
|
|
2091
|
+
isFixed: true,
|
|
2092
|
+
isLockedValue: false,
|
|
2093
|
+
value: null,
|
|
2094
|
+
pos: idx,
|
|
2095
|
+
};
|
|
2096
|
+
});
|
|
2097
|
+
(_b = MapExtraFieldsWithView[view]) === null || _b === void 0 ? void 0 : _b.optional.forEach((optionalField, idx) => {
|
|
2098
|
+
viewItems[uuid.v4()] = {
|
|
2099
|
+
type: optionalField,
|
|
2100
|
+
properties: [],
|
|
2101
|
+
isUsed: true,
|
|
2102
|
+
isOptional: true,
|
|
2103
|
+
isFixed: false,
|
|
2104
|
+
isLockedValue: false,
|
|
2105
|
+
value: optionalField === 'SENDALERTTOSUBSCRIBERS' || optionalField === 'RECEIVEACOPY' ? true : null,
|
|
2106
|
+
pos: (idx + 1) * 100,
|
|
2107
|
+
};
|
|
2108
|
+
});
|
|
2109
|
+
return {
|
|
2110
|
+
[view]: viewItems,
|
|
2111
|
+
};
|
|
2112
|
+
}));
|
|
2014
2113
|
return {
|
|
2015
2114
|
newAppId,
|
|
2016
2115
|
newStudioApp: {
|
|
@@ -2037,6 +2136,9 @@ function createNewStudioApp$1({ author, appName }) {
|
|
|
2037
2136
|
articlesCount: 0,
|
|
2038
2137
|
},
|
|
2039
2138
|
fields: [],
|
|
2139
|
+
views,
|
|
2140
|
+
audience: AUDIENCE.ALL,
|
|
2141
|
+
installFor: [],
|
|
2040
2142
|
},
|
|
2041
2143
|
};
|
|
2042
2144
|
}
|
|
@@ -2295,6 +2397,7 @@ exports.Bookmark = Bookmark;
|
|
|
2295
2397
|
exports.Faq = Faq;
|
|
2296
2398
|
exports.MODE_EDIT = MODE_EDIT;
|
|
2297
2399
|
exports.MODE_VIEW = MODE_VIEW;
|
|
2400
|
+
exports.MapExtraFieldsWithView = MapExtraFieldsWithView;
|
|
2298
2401
|
exports.Model = Model;
|
|
2299
2402
|
exports.Network = Network;
|
|
2300
2403
|
exports.STUDIO_VIEW = STUDIO_VIEW;
|
|
@@ -2310,5 +2413,6 @@ exports.actions = actions;
|
|
|
2310
2413
|
exports.jland = jland;
|
|
2311
2414
|
exports.slice = slice;
|
|
2312
2415
|
exports.studio = studio;
|
|
2416
|
+
exports.updateWidgetContent = updateWidgetContent;
|
|
2313
2417
|
exports.viewsList = viewsList;
|
|
2314
2418
|
//# sourceMappingURL=cjs.js.map
|