@crystaldesign/diva-backoffice 25.1.0-beta.23 → 25.1.0-beta.25

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.
@@ -30325,13 +30325,17 @@ function TablePackages () {
30325
30325
  }
30326
30326
  }, {
30327
30327
  icon: /*#__PURE__*/jsx(DownloadOutlined, {}),
30328
+ disabled: function disabled(_ref3) {
30329
+ var selectedNodes = _ref3.selectedNodes;
30330
+ return !selectedNodes[0].data.isPublished;
30331
+ },
30328
30332
  action: function () {
30329
- var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
30333
+ var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref4) {
30330
30334
  var selectedNodes, url, alertTimeout;
30331
30335
  return _regeneratorRuntime.wrap(function _callee$(_context) {
30332
30336
  while (1) switch (_context.prev = _context.next) {
30333
30337
  case 0:
30334
- selectedNodes = _ref3.selectedNodes;
30338
+ selectedNodes = _ref4.selectedNodes;
30335
30339
  url = apiConfig.enricherService + '/packages/' + selectedNodes[0].data._id + '/catalog'; // Show modal if download takes more than 3 seconds
30336
30340
  alertTimeout = setTimeout(function () {
30337
30341
  setFileIsLoading(true);
@@ -30379,8 +30383,8 @@ function TablePackages () {
30379
30383
  colDef: [{
30380
30384
  field: 'isPublished',
30381
30385
  //the cell should refresh on changes of this fields
30382
- valueGetter: function valueGetter(_ref4) {
30383
- var data = _ref4.data;
30386
+ valueGetter: function valueGetter(_ref5) {
30387
+ var data = _ref5.data;
30384
30388
  return {
30385
30389
  isPublished: data === null || data === void 0 ? void 0 : data.isPublished,
30386
30390
  name: data === null || data === void 0 ? void 0 : data.name,
@@ -30405,8 +30409,8 @@ function TablePackages () {
30405
30409
  headerName: 'backoffice.idmEnricher.packages.label.catalogId',
30406
30410
  field: 'basedCatalogId',
30407
30411
  cellDataType: 'lookup',
30408
- editable: function editable(_ref5) {
30409
- var data = _ref5.data;
30412
+ editable: function editable(_ref6) {
30413
+ var data = _ref6.data;
30410
30414
  return !data.basedCatalogId && !data.basedPackageId;
30411
30415
  },
30412
30416
  customParams: {
@@ -30423,8 +30427,8 @@ function TablePackages () {
30423
30427
  headerName: 'backoffice.idmEnricher.packages.label.packageId',
30424
30428
  field: 'basedPackageId',
30425
30429
  cellDataType: 'lookup',
30426
- editable: function editable(_ref6) {
30427
- var data = _ref6.data;
30430
+ editable: function editable(_ref7) {
30431
+ var data = _ref7.data;
30428
30432
  return !data.basedCatalogId && !data.basedPackageId;
30429
30433
  },
30430
30434
  customParams: {
@@ -33153,6 +33157,16 @@ function useModule (currentModules) {
33153
33157
  to: 'catalogs/idmeditor/catalogs/' + catalogId + '/decisions' + (searchParams ? '?' + searchParams.toString() : ''),
33154
33158
  children: t('backoffice.menu.items.label.IDMCatalogEditorTableDecisions')
33155
33159
  })
33160
+ }, {
33161
+ key: 'detailinfos',
33162
+ style: {
33163
+ margin: 0
33164
+ },
33165
+ icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
33166
+ label: /*#__PURE__*/jsx(Link, {
33167
+ to: 'catalogs/idmeditor/catalogs/' + catalogId + '/detailinfos' + (searchParams ? '?' + searchParams.toString() : ''),
33168
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableDetailInfos')
33169
+ })
33156
33170
  }];
33157
33171
  }, [catalogId]);
33158
33172
  if (!catalogId) throw new Error('catalogId is required');
@@ -34577,6 +34591,290 @@ function TableDecisions () {
34577
34591
  });
34578
34592
  }
34579
34593
 
34594
+ function TableDetailInfos () {
34595
+ var _useTranslation = useTranslation(),
34596
+ t = _useTranslation.t;
34597
+ var root = useStore();
34598
+ var _useModule = useModule(['detailinfos']),
34599
+ catalogId = _useModule.catalogId,
34600
+ organizationId = _useModule.organizationId,
34601
+ updateNavigation = _useModule.updateNavigation,
34602
+ apiConfig = _useModule.apiConfig;
34603
+ var layerId = [{
34604
+ name: t('backoffice.idmCatalog.detailinfos.label.layer.l10'),
34605
+ value: 10
34606
+ }, {
34607
+ name: t('backoffice.idmCatalog.detailinfos.label.layer.l20'),
34608
+ value: 20
34609
+ }, {
34610
+ name: t('backoffice.idmCatalog.detailinfos.label.layer.l30'),
34611
+ value: 30
34612
+ }, {
34613
+ name: t('backoffice.idmCatalog.detailinfos.label.layer.l40'),
34614
+ value: 40
34615
+ }, {
34616
+ name: t('backoffice.idmCatalog.detailinfos.label.layer.l50'),
34617
+ value: 50
34618
+ }, {
34619
+ name: t('backoffice.idmCatalog.detailinfos.label.layer.l60'),
34620
+ value: 60
34621
+ }];
34622
+ var infoType = [{
34623
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i1'),
34624
+ value: 1
34625
+ }, {
34626
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i2'),
34627
+ value: 2
34628
+ }, {
34629
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i3'),
34630
+ value: 3
34631
+ }, {
34632
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i4'),
34633
+ value: 4
34634
+ }, {
34635
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i5'),
34636
+ value: 5
34637
+ }, {
34638
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i6'),
34639
+ value: 6
34640
+ }, {
34641
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i7'),
34642
+ value: 7
34643
+ }, {
34644
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i8'),
34645
+ value: 8
34646
+ }, {
34647
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i9'),
34648
+ value: 9
34649
+ }, {
34650
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i10'),
34651
+ value: 10
34652
+ }, {
34653
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i11'),
34654
+ value: 11
34655
+ }, {
34656
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i12'),
34657
+ value: 12
34658
+ }, {
34659
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i13'),
34660
+ value: 13
34661
+ }, {
34662
+ name: t('backoffice.idmCatalog.detailinfos.label.infotype.i14'),
34663
+ value: 14
34664
+ }];
34665
+ var _React$useState = React.useState(),
34666
+ _React$useState2 = _slicedToArray(_React$useState, 2),
34667
+ selectedDetailInfo = _React$useState2[0],
34668
+ setSelectedDetailInfo = _React$useState2[1];
34669
+ useEffect(function () {
34670
+ root.contentStore.bottomToolBar.tools = [];
34671
+ return function () {
34672
+ root.contentStore.bottomToolBar.tools = [];
34673
+ };
34674
+ }, [selectedDetailInfo]);
34675
+ var applicationData = useMemo(function () {
34676
+ return {
34677
+ catalogId: catalogId,
34678
+ organizationId: organizationId
34679
+ };
34680
+ }, [catalogId]);
34681
+ return /*#__PURE__*/jsxs(Fragment, {
34682
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
34683
+ title: /*#__PURE__*/jsxs("div", {
34684
+ children: [t('backoffice.menu.items.label.IDMCatalogEditorTableDetailInfos'), /*#__PURE__*/jsx(Space$1, {
34685
+ style: {
34686
+ "float": 'right'
34687
+ },
34688
+ children: /*#__PURE__*/jsx(CatalogSelector, {
34689
+ organizationId: organizationId,
34690
+ selectedCatalog: catalogId,
34691
+ setSelectedCatalog: function setSelectedCatalog(id) {
34692
+ return updateNavigation(id);
34693
+ },
34694
+ idmService: apiConfig.idmService
34695
+ })
34696
+ })]
34697
+ })
34698
+ }), /*#__PURE__*/jsx(Spreadsheet, {
34699
+ gridId: 'crud-grid_series',
34700
+ applicationData: applicationData,
34701
+ hooks: {
34702
+ onCellSelectionChanged: function onCellSelectionChanged(event) {
34703
+ if (event.selection.length == 1) {
34704
+ setSelectedDetailInfo(event.selection[0].node.data);
34705
+ } else {
34706
+ setSelectedDetailInfo(null);
34707
+ }
34708
+ }
34709
+ },
34710
+ configuration: {
34711
+ type: 'dotnetSSM',
34712
+ apiInterface: {
34713
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/detailinfos',
34714
+ create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/detailinfos',
34715
+ restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/detailinfos/${_id}',
34716
+ "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/detailinfos/${_id}',
34717
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/detailinfos/${_id}'
34718
+ },
34719
+ dateFormat: 'LL',
34720
+ colDef: [{
34721
+ field: 'detailInfoNo',
34722
+ headerName: 'backoffice.idmCatalog.detailinfos.label.detailInfoNo',
34723
+ required: true,
34724
+ cellDataType: 'number'
34725
+ }, {
34726
+ headerName: 'backoffice.idmCatalog.detailinfos.label.externalName',
34727
+ marryChildren: true,
34728
+ children: [{
34729
+ field: 'externalName.DE',
34730
+ headerName: 'backoffice.idmEnricher.general.label.DE',
34731
+ isDictionary: true,
34732
+ required: true
34733
+ }, {
34734
+ field: 'externalName.EN',
34735
+ headerName: 'backoffice.idmEnricher.general.label.EN',
34736
+ isDictionary: true
34737
+ }, {
34738
+ field: 'externalName.FR',
34739
+ headerName: 'backoffice.idmEnricher.general.label.FR',
34740
+ isDictionary: true
34741
+ }, {
34742
+ field: 'externalName.IT',
34743
+ headerName: 'backoffice.idmEnricher.general.label.IT',
34744
+ isDictionary: true
34745
+ }]
34746
+ }, {
34747
+ headerName: 'backoffice.idmCatalog.detailinfos.label.internalName',
34748
+ marryChildren: true,
34749
+ children: [{
34750
+ field: 'internalName.DE',
34751
+ headerName: 'backoffice.idmEnricher.general.label.DE',
34752
+ isDictionary: true,
34753
+ required: true
34754
+ }, {
34755
+ field: 'internalName.EN',
34756
+ headerName: 'backoffice.idmEnricher.general.label.EN',
34757
+ isDictionary: true
34758
+ }, {
34759
+ field: 'internalName.FR',
34760
+ headerName: 'backoffice.idmEnricher.general.label.FR',
34761
+ isDictionary: true
34762
+ }, {
34763
+ field: 'internalName.IT',
34764
+ headerName: 'backoffice.idmEnricher.general.label.IT',
34765
+ isDictionary: true
34766
+ }]
34767
+ }, {
34768
+ headerName: 'backoffice.idmCatalog.detailinfos.label.toolTip',
34769
+ marryChildren: true,
34770
+ children: [{
34771
+ field: 'toolTip.DE',
34772
+ headerName: 'backoffice.idmEnricher.general.label.DE',
34773
+ isDictionary: true,
34774
+ required: true
34775
+ }, {
34776
+ field: 'toolTip.EN',
34777
+ headerName: 'backoffice.idmEnricher.general.label.EN',
34778
+ isDictionary: true
34779
+ }, {
34780
+ field: 'toolTip.FR',
34781
+ headerName: 'backoffice.idmEnricher.general.label.FR',
34782
+ isDictionary: true
34783
+ }, {
34784
+ field: 'toolTip.IT',
34785
+ headerName: 'backoffice.idmEnricher.general.label.IT',
34786
+ isDictionary: true
34787
+ }]
34788
+ }, {
34789
+ field: 'url',
34790
+ headerName: 'backoffice.idmCatalog.detailinfos.label.url',
34791
+ required: true
34792
+ }, {
34793
+ field: 'classification',
34794
+ headerName: 'backoffice.idmCatalog.detailinfos.label.classification',
34795
+ required: true
34796
+ }, {
34797
+ field: 'mediaType',
34798
+ headerName: 'backoffice.idmCatalog.detailinfos.label.mediaType'
34799
+ }, {
34800
+ field: 'functionType',
34801
+ headerName: 'backoffice.idmCatalog.detailinfos.label.functionType'
34802
+ }, {
34803
+ field: 'infoType',
34804
+ headerName: 'backoffice.idmCatalog.detailinfos.label.infoType',
34805
+ required: true,
34806
+ cellDataType: 'enum',
34807
+ customParams: {
34808
+ enumData: infoType,
34809
+ displayLabelTemplate: '${name} (${value})'
34810
+ }
34811
+ }, {
34812
+ field: 'layer',
34813
+ headerName: 'backoffice.idmCatalog.detailinfos.label.layer',
34814
+ cellDataType: 'enum',
34815
+ customParams: {
34816
+ enumData: layerId,
34817
+ displayLabelTemplate: '${name} (${value})'
34818
+ }
34819
+ }, {
34820
+ field: 'isoLanguageId',
34821
+ headerName: 'backoffice.idmCatalog.detailinfos.label.isoLanguageId',
34822
+ required: true
34823
+ }, {
34824
+ field: 'hashValue',
34825
+ headerName: 'backoffice.idmCatalog.detailinfos.label.hashValue',
34826
+ required: true
34827
+ }, {
34828
+ field: 'error',
34829
+ headerName: 'backoffice.idmCatalog.detailinfos.label.error'
34830
+ }, {
34831
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
34832
+ field: 'lastUpdatedDate',
34833
+ cellDataType: 'dateString',
34834
+ editable: false
34835
+ }, {
34836
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
34837
+ field: 'createdDate',
34838
+ cellDataType: 'dateString',
34839
+ editable: false
34840
+ }, {
34841
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
34842
+ field: 'createdByDisplayText',
34843
+ editable: false
34844
+ }, {
34845
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
34846
+ field: 'lastUpdatedByDisplayText',
34847
+ editable: false
34848
+ }, {
34849
+ headerName: 'backoffice.idmCatalog.general.label._id',
34850
+ field: '_id',
34851
+ editable: false
34852
+ }, {
34853
+ headerName: 'backoffice.idmCatalog.detailinfos.label.mediaItemId',
34854
+ field: 'mediaItemId'
34855
+ }, {
34856
+ headerName: 'backoffice.idmCatalog.detailinfos.label.mediaItemRefId',
34857
+ field: 'mediaItemRefId'
34858
+ }, {
34859
+ field: 'organizationId',
34860
+ editable: false,
34861
+ hide: true,
34862
+ lockVisible: true,
34863
+ suppressColumnsToolPanel: true,
34864
+ defaultValue: '${organizationId}'
34865
+ }, {
34866
+ field: 'catalogId',
34867
+ editable: false,
34868
+ hide: true,
34869
+ lockVisible: true,
34870
+ suppressColumnsToolPanel: true,
34871
+ defaultValue: '${catalogId}'
34872
+ }]
34873
+ }
34874
+ })]
34875
+ });
34876
+ }
34877
+
34580
34878
  function IDMCatalogEditor (_ref) {
34581
34879
  _objectDestructuringEmpty(_ref);
34582
34880
  return /*#__PURE__*/jsx("div", {
@@ -34612,6 +34910,9 @@ function Content$1() {
34612
34910
  }), /*#__PURE__*/jsx(Route, {
34613
34911
  path: ":catalogId/decisions",
34614
34912
  element: /*#__PURE__*/jsx(TableDecisions, {})
34913
+ }), /*#__PURE__*/jsx(Route, {
34914
+ path: ":catalogId/detailinfos",
34915
+ element: /*#__PURE__*/jsx(TableDetailInfos, {})
34615
34916
  })]
34616
34917
  });
34617
34918
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCatalogEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAQxD,UAAU,KAAK;IACb,aAAa,EAAE,6BAA6B,CAAC;IAC7C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,KAAK,qBAMjC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCatalogEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AASxD,UAAU,KAAK;IACb,aAAa,EAAE,6BAA6B,CAAC;IAC7C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,KAAK,qBAMjC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export default function (): React.JSX.Element;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/modules/TableDetailInfos/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AASlD,MAAM,CAAC,OAAO,gCA4Rb"}
@@ -1 +1 @@
1
- {"version":3,"file":"useModule.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCatalogEditor/useModule.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,WAAW,cAAc,EAAE,MAAM,EAAE;uCA2E5B,MAAM,YAAW,MAAM,EAAE;;;;EAmC7C"}
1
+ {"version":3,"file":"useModule.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCatalogEditor/useModule.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,WAAW,cAAc,EAAE,MAAM,EAAE;uCAqF5B,MAAM,YAAW,MAAM,EAAE;;;;EAmC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAYlD,MAAM,CAAC,OAAO,gCAkMb"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAYlD,MAAM,CAAC,OAAO,gCAmMb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "25.1.0-beta.23",
3
+ "version": "25.1.0-beta.25",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^6.5.0",
@@ -15,13 +15,13 @@
15
15
  "dependencies": {
16
16
  "@ant-design/icons": "5.4.0",
17
17
  "@babel/runtime": "7.24.7",
18
- "@crystaldesign/content-box": "25.1.0-beta.23",
19
- "@crystaldesign/content-item": "25.1.0-beta.23",
20
- "@crystaldesign/diva-core": "25.1.0-beta.23",
21
- "@crystaldesign/diva-utils": "25.1.0-beta.23",
22
- "@crystaldesign/media-upload": "25.1.0-beta.23",
23
- "@crystaldesign/rtf-editor": "25.1.0-beta.23",
24
- "@crystaldesign/spreadsheet": "25.1.0-beta.23",
18
+ "@crystaldesign/content-box": "25.1.0-beta.25",
19
+ "@crystaldesign/content-item": "25.1.0-beta.25",
20
+ "@crystaldesign/diva-core": "25.1.0-beta.25",
21
+ "@crystaldesign/diva-utils": "25.1.0-beta.25",
22
+ "@crystaldesign/media-upload": "25.1.0-beta.25",
23
+ "@crystaldesign/rtf-editor": "25.1.0-beta.25",
24
+ "@crystaldesign/spreadsheet": "25.1.0-beta.25",
25
25
  "@google/model-viewer": "3.5.0",
26
26
  "ag-charts-community": "^10.1.0",
27
27
  "ag-charts-react": "^10.1.0",
@@ -51,5 +51,5 @@
51
51
  },
52
52
  "module": "build/esm/index.js",
53
53
  "types": "./build/types/backoffice/src/index.d.ts",
54
- "gitHead": "ff53b26885fd17451da28ade846ddad8256aae00"
54
+ "gitHead": "aac019858b678b047ba22d1bf366245413eef5f8"
55
55
  }