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/esm.js CHANGED
@@ -1397,12 +1397,12 @@ const widgetArticleAttachmentDefinition = {
1397
1397
  label: 'WIDGET_Article_Attachment',
1398
1398
  description: 'WIDGET_Article_Attachment_Description',
1399
1399
  name: 'widget-article-attachment',
1400
- img: '/img/fast-intranet/widget-file.png',
1400
+ img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
1401
1401
  available: true,
1402
1402
  panel: {
1403
1403
  useWrapper: true,
1404
1404
  useEditor: true,
1405
- useWidgets: false
1405
+ useWidgets: false,
1406
1406
  },
1407
1407
  };
1408
1408
  const widgetArticleAttachmentContent = {
@@ -1413,12 +1413,12 @@ const widgetArticleGalleryDefinition = {
1413
1413
  label: 'WIDGET_Article_Gallery',
1414
1414
  description: 'WIDGET_Article_Gallery_Description',
1415
1415
  name: 'widget-article-gallery',
1416
- img: '/img/fast-intranet/widget-slider.png',
1416
+ img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
1417
1417
  available: true,
1418
1418
  panel: {
1419
1419
  useWrapper: false,
1420
1420
  useEditor: true,
1421
- useWidgets: false
1421
+ useWidgets: false,
1422
1422
  },
1423
1423
  };
1424
1424
  const widgetArticleGalleryContent = {
@@ -1431,39 +1431,34 @@ const widgetArticleImageDefinition = {
1431
1431
  label: 'WIDGET_Article_Image',
1432
1432
  description: 'WIDGET_Article_Image_Description',
1433
1433
  name: 'widget-article-image',
1434
- img: '/img/fast-intranet/widget-image.png',
1434
+ img: '/img/article-widget-thumbnail/widget_thumbnail_illustration.png',
1435
1435
  available: true,
1436
1436
  panel: {
1437
1437
  useWrapper: false,
1438
1438
  useEditor: true,
1439
- useWidgets: false
1439
+ useWidgets: false,
1440
1440
  },
1441
1441
  };
1442
- const widgetArticleImageContent = {
1443
- displayAs: 'image',
1444
- backgroundPosition: 'center',
1445
- backgroundSize: 'cover',
1446
- borderRadius: '8'
1447
- };
1442
+ const widgetArticleImageContent = {};
1448
1443
 
1449
1444
  const widgetArticleButtonDefinition = {
1450
1445
  label: 'WIDGET_Button',
1451
1446
  description: 'WIDGET_Button_Description',
1452
1447
  name: 'widget-article-button',
1453
- img: '/img/fast-intranet/widget-button.png',
1448
+ img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
1454
1449
  available: true,
1455
1450
  panel: {
1456
1451
  useWrapper: false,
1457
1452
  useEditor: true,
1458
- useWidgets: false
1453
+ useWidgets: false,
1459
1454
  },
1460
1455
  };
1461
1456
  const widgetArticleButtonContent = {
1462
- text: 'This is a button',
1457
+ text: '',
1463
1458
  openingType: 'link',
1464
1459
  openingTypeLink: {
1465
1460
  url: '',
1466
- target: '_blank'
1461
+ target: '_blank',
1467
1462
  },
1468
1463
  variant: 'contained',
1469
1464
  fontSize: '14',
@@ -1477,36 +1472,56 @@ const widgetArticleTextDefinition = {
1477
1472
  label: 'WIDGET_Text',
1478
1473
  description: 'WIDGET_Text_Description',
1479
1474
  name: 'widget-article-text',
1480
- img: '/img/fast-intranet/widget-text.png',
1475
+ img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
1481
1476
  available: true,
1482
1477
  panel: {
1483
1478
  useWrapper: false,
1484
1479
  useEditor: true,
1485
- useWidgets: false
1480
+ useWidgets: false,
1486
1481
  },
1487
1482
  };
1488
1483
  const widgetArticleTextContent = {
1489
1484
  fontSize: '18',
1490
1485
  lineHeight: '1.6',
1491
- text: ''
1486
+ text: '',
1492
1487
  };
1493
1488
 
1494
1489
  const widgetArticleTitleDefinition = {
1495
1490
  label: 'WIDGET_Title',
1496
1491
  description: 'WIDGET_Title_Description',
1497
1492
  name: 'widget-article-title',
1498
- img: '/img/fast-intranet/widget-text.png',
1493
+ img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
1499
1494
  available: true,
1500
1495
  panel: {
1501
1496
  useWrapper: false,
1502
1497
  useEditor: true,
1503
- useWidgets: false
1498
+ useWidgets: false,
1504
1499
  },
1505
1500
  };
1506
1501
  const widgetArticleTitleContent = {
1507
1502
  text: '',
1508
1503
  heading: 'h1',
1509
- backgroundColor: 'transparent'
1504
+ backgroundColor: 'transparent',
1505
+ };
1506
+
1507
+ const widgetArticleSliderDefinition = {
1508
+ label: 'WIDGET_Slider',
1509
+ description: 'WIDGET_Slider_Description',
1510
+ name: 'widget-article-slider',
1511
+ img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
1512
+ available: true,
1513
+ panel: {
1514
+ useWrapper: false,
1515
+ useEditor: true,
1516
+ useWidgets: false,
1517
+ },
1518
+ };
1519
+ const widgetArticleSliderContent = {
1520
+ slides: [],
1521
+ maxWidth: 800,
1522
+ loop: false,
1523
+ useDots: true,
1524
+ startAt: 0,
1510
1525
  };
1511
1526
 
1512
1527
  function uniqid() {
@@ -1527,7 +1542,7 @@ function widget(name) {
1527
1542
  return {
1528
1543
  uniqid: uniqid(),
1529
1544
  name,
1530
- content: content(name)
1545
+ content: content(name),
1531
1546
  };
1532
1547
  }
1533
1548
  function content(name) {
@@ -1535,6 +1550,8 @@ function content(name) {
1535
1550
  default:
1536
1551
  case 'widget-article-attachment':
1537
1552
  return Object.assign({}, widgetArticleAttachmentContent);
1553
+ case 'widget-article-slider':
1554
+ return Object.assign({}, widgetArticleSliderContent);
1538
1555
  case 'widget-article-gallery':
1539
1556
  return Object.assign({}, widgetArticleGalleryContent);
1540
1557
  case 'widget-article-button':
@@ -1573,6 +1590,8 @@ function widgetDefinition(name) {
1573
1590
  return widgetArticleGalleryDefinition;
1574
1591
  case 'widget-article-attachment':
1575
1592
  return widgetArticleAttachmentDefinition;
1593
+ case 'widget-article-slider':
1594
+ return widgetArticleSliderDefinition;
1576
1595
  case 'widget-article-text':
1577
1596
  return widgetArticleTextDefinition;
1578
1597
  case 'widget-article-title':
@@ -1721,6 +1740,7 @@ const selectWidgetContent = (state, uniqid) => { var _a; return (_a = state.widg
1721
1740
  const selectWidgetState = (state, uniqid) => { var _a; return (_a = state.widgets.states[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
1722
1741
  const selectWidget = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
1723
1742
  const isActive = (state, uniqid) => state.widgets.currentEditableWidgetId === uniqid;
1743
+ const updateWidgetContent = (uniqid, content, override) => Widget.slice.actions.updateWidget({ uniqid, content, override: override !== null && override !== void 0 ? override : false });
1724
1744
  const Widget = {
1725
1745
  const: WIDGETS,
1726
1746
  factory: widgetFactory,
@@ -1837,6 +1857,15 @@ var AppFormItemTypes;
1837
1857
  AppFormItemTypes["USERLINK"] = "USERLINK";
1838
1858
  AppFormItemTypes["CONTENTLINK"] = "CONTENTLINK";
1839
1859
  })(AppFormItemTypes || (AppFormItemTypes = {}));
1860
+ var ExtraAppFieldsItemViews;
1861
+ (function (ExtraAppFieldsItemViews) {
1862
+ ExtraAppFieldsItemViews["TITLE"] = "TITLE";
1863
+ ExtraAppFieldsItemViews["USER"] = "USER";
1864
+ ExtraAppFieldsItemViews["PUBLISHTO"] = "PUBLISHTO";
1865
+ ExtraAppFieldsItemViews["SENDALERTTOSUBSCRIBERS"] = "SENDALERTTOSUBSCRIBERS";
1866
+ ExtraAppFieldsItemViews["RECEIVEACOPY"] = "RECEIVEACOPY";
1867
+ ExtraAppFieldsItemViews["CREATIONDATE"] = "CREATIONDATE";
1868
+ })(ExtraAppFieldsItemViews || (ExtraAppFieldsItemViews = {}));
1840
1869
  var AppFieldFormPropertyTypes;
1841
1870
  (function (AppFieldFormPropertyTypes) {
1842
1871
  AppFieldFormPropertyTypes["LABEL"] = "label";
@@ -1850,15 +1879,51 @@ var AppFieldFormPropertyTypes;
1850
1879
  const AppFormUniqueList = [AppFormItemTypes.DESCRIPTION, AppFormItemTypes.IMAGE];
1851
1880
  const AppFormBannedFromViews = new Map();
1852
1881
  AppFormBannedFromViews.set(AppFormItemTypes.IMAGE, ['list', 'filter', 'view']);
1882
+ const MapExtraFieldsWithView = {
1883
+ create: {
1884
+ fixed: [ExtraAppFieldsItemViews.TITLE],
1885
+ optional: [
1886
+ ExtraAppFieldsItemViews.PUBLISHTO,
1887
+ ExtraAppFieldsItemViews.SENDALERTTOSUBSCRIBERS,
1888
+ ExtraAppFieldsItemViews.RECEIVEACOPY,
1889
+ ],
1890
+ },
1891
+ popup: {
1892
+ fixed: [ExtraAppFieldsItemViews.TITLE],
1893
+ optional: [ExtraAppFieldsItemViews.PUBLISHTO],
1894
+ },
1895
+ edit: {
1896
+ fixed: [ExtraAppFieldsItemViews.TITLE],
1897
+ optional: [ExtraAppFieldsItemViews.PUBLISHTO],
1898
+ },
1899
+ list: {
1900
+ fixed: [ExtraAppFieldsItemViews.TITLE, ExtraAppFieldsItemViews.USER],
1901
+ optional: [ExtraAppFieldsItemViews.CREATIONDATE],
1902
+ },
1903
+ filter: {
1904
+ fixed: [ExtraAppFieldsItemViews.TITLE, ExtraAppFieldsItemViews.USER],
1905
+ optional: [ExtraAppFieldsItemViews.CREATIONDATE],
1906
+ },
1907
+ view: {
1908
+ fixed: [ExtraAppFieldsItemViews.TITLE],
1909
+ optional: [],
1910
+ },
1911
+ };
1853
1912
 
1854
1913
  function InstalledAppStudioAdapter(serverApp, serverApps) {
1855
1914
  const { version, dateCreation } = serverApp.manifest;
1856
1915
  const appTypeServer = serverApp.typeModel;
1916
+ const views = Object.assign({}, ...viewsList.map((view) => ({
1917
+ [view]: [],
1918
+ })));
1857
1919
  const studioApp = {
1858
1920
  idApp: serverApp.idApp,
1859
1921
  status: _formatStatus(serverApp),
1860
1922
  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 })),
1861
1923
  fields: [],
1924
+ views,
1925
+ installFor: serverApp.accessRightObjectList,
1926
+ audience: serverApp.checkAccess === false ? AUDIENCE.ALL : AUDIENCE.CUSTOM,
1862
1927
  };
1863
1928
  const inWorkAppVersion = _findAssociatedDraft(serverApp.idApp, serverApps);
1864
1929
  if (!inWorkAppVersion)
@@ -1878,6 +1943,9 @@ function DraftAppStudioAdapter(serverApp) {
1878
1943
  status: _formatStatus(serverApp),
1879
1944
  manifest: parsedJson.manifest,
1880
1945
  fields: parsedJson.fields,
1946
+ views: parsedJson.views,
1947
+ audience: parsedJson.audience,
1948
+ installFor: parsedJson.installFor,
1881
1949
  };
1882
1950
  }
1883
1951
  function _formatStatus(serverApp) {
@@ -2003,6 +2071,37 @@ function cloneStudioAppFromExistingApp(existingApp, author) {
2003
2071
 
2004
2072
  function createNewStudioApp$1({ author, appName }) {
2005
2073
  const newAppId = v4();
2074
+ const views = Object.assign({}, ...viewsList.map((view) => {
2075
+ var _a, _b;
2076
+ const viewItems = {};
2077
+ (_a = MapExtraFieldsWithView[view]) === null || _a === void 0 ? void 0 : _a.fixed.forEach((fixedField, idx) => {
2078
+ viewItems[v4()] = {
2079
+ type: fixedField,
2080
+ properties: [],
2081
+ isUsed: true,
2082
+ isOptional: false,
2083
+ isFixed: true,
2084
+ isLockedValue: false,
2085
+ value: null,
2086
+ pos: idx,
2087
+ };
2088
+ });
2089
+ (_b = MapExtraFieldsWithView[view]) === null || _b === void 0 ? void 0 : _b.optional.forEach((optionalField, idx) => {
2090
+ viewItems[v4()] = {
2091
+ type: optionalField,
2092
+ properties: [],
2093
+ isUsed: true,
2094
+ isOptional: true,
2095
+ isFixed: false,
2096
+ isLockedValue: false,
2097
+ value: optionalField === 'SENDALERTTOSUBSCRIBERS' || optionalField === 'RECEIVEACOPY' ? true : null,
2098
+ pos: (idx + 1) * 100,
2099
+ };
2100
+ });
2101
+ return {
2102
+ [view]: viewItems,
2103
+ };
2104
+ }));
2006
2105
  return {
2007
2106
  newAppId,
2008
2107
  newStudioApp: {
@@ -2029,6 +2128,9 @@ function createNewStudioApp$1({ author, appName }) {
2029
2128
  articlesCount: 0,
2030
2129
  },
2031
2130
  fields: [],
2131
+ views,
2132
+ audience: AUDIENCE.ALL,
2133
+ installFor: [],
2032
2134
  },
2033
2135
  };
2034
2136
  }
@@ -2277,5 +2379,5 @@ const studio = {
2277
2379
  },
2278
2380
  };
2279
2381
 
2280
- export { APP_STATUS_TYPE, AUDIENCE, AppFieldFormPropertyTypes, AppFormBannedFromViews, AppFormItemTypes, AppFormUniqueList, Application, AssetReservation, Bookmark, Faq, MODE_EDIT, MODE_VIEW, Model, Network, STUDIO_VIEW, Share, StatusType, TVDisplay, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, jland, slice, studio, viewsList };
2382
+ export { APP_STATUS_TYPE, AUDIENCE, AppFieldFormPropertyTypes, AppFormBannedFromViews, AppFormItemTypes, AppFormUniqueList, Application, AssetReservation, Bookmark, ExtraAppFieldsItemViews, Faq, MODE_EDIT, MODE_VIEW, MapExtraFieldsWithView, Model, Network, STUDIO_VIEW, Share, StatusType, TVDisplay, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, jland, slice, studio, updateWidgetContent, viewsList };
2281
2383
  //# sourceMappingURL=esm.js.map