@crystaldesign/diva-backoffice 24.9.0-beta.17 → 24.9.0-beta.18

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.
@@ -71,7 +71,7 @@ import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
71
71
  import JSONEditor from 'jsoneditor';
72
72
  import 'jsoneditor/dist/jsoneditor.css';
73
73
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
74
- import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, PushpinOutlined, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
74
+ import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, PushpinOutlined, PushpinFilled, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
75
75
  import { Editor } from '@tinymce/tinymce-react';
76
76
  import { stringify } from 'csv';
77
77
  import InfiniteScroll from 'react-infinite-scroll-component';
@@ -113,6 +113,7 @@ import Descriptions$1 from 'antd/es/descriptions';
113
113
  import Space$1 from 'antd/es/space';
114
114
  import { Spreadsheet } from '@crystaldesign/spreadsheet';
115
115
  import EditOutlined from '@ant-design/icons/lib/icons/EditOutlined';
116
+ import UploadOutlined$1 from '@ant-design/icons/lib/icons/UploadOutlined';
116
117
  import Switch$1 from 'antd/es/switch';
117
118
  import Layout$1 from 'antd/es/layout';
118
119
  import Menu from 'antd/es/menu';
@@ -27224,6 +27225,42 @@ function TablePackages () {
27224
27225
  action: function action(_ref) {
27225
27226
  var selectedNodes = _ref.selectedNodes;
27226
27227
  updateNavigation(selectedNodes[0].data._id, 'renaming');
27228
+ },
27229
+ disabled: function disabled(_ref2) {
27230
+ var selectedNodes = _ref2.selectedNodes;
27231
+ return !selectedNodes[0].data.basedCatalogId && !selectedNodes[0].data.basedPackageId;
27232
+ }
27233
+ }, {
27234
+ icon: /*#__PURE__*/jsx(UploadOutlined$1, {}),
27235
+ name: t('backoffice.idmEnricher.packages.label.publish'),
27236
+ action: function () {
27237
+ var _action = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
27238
+ var selectedNodes, context;
27239
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
27240
+ while (1) switch (_context.prev = _context.next) {
27241
+ case 0:
27242
+ selectedNodes = _ref3.selectedNodes, context = _ref3.context;
27243
+ _context.next = 3;
27244
+ return context === null || context === void 0 ? void 0 : context.updateServerData(selectedNodes[0].data, {
27245
+ update: apiConfig.enricherService + '/packages/${_id}/publish',
27246
+ usePut: true
27247
+ });
27248
+ case 3:
27249
+ context === null || context === void 0 || context.reset();
27250
+ case 4:
27251
+ case "end":
27252
+ return _context.stop();
27253
+ }
27254
+ }, _callee);
27255
+ }));
27256
+ function action(_x) {
27257
+ return _action.apply(this, arguments);
27258
+ }
27259
+ return action;
27260
+ }(),
27261
+ disabled: function disabled(_ref4) {
27262
+ var selectedNodes = _ref4.selectedNodes;
27263
+ return !selectedNodes[0].data.basedCatalogId && !selectedNodes[0].data.basedPackageId;
27227
27264
  }
27228
27265
  }],
27229
27266
  configuration: {
@@ -27234,31 +27271,45 @@ function TablePackages () {
27234
27271
  "delete": apiConfig.enricherService + '/packages/${_id}',
27235
27272
  update: apiConfig.enricherService + '/packages/${_id}'
27236
27273
  },
27237
- dateFormat: 'LL',
27274
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
27238
27275
  floatingFilter: true,
27239
27276
  colDef: [{
27240
27277
  field: 'isPublished',
27278
+ headerName: t('backoffice.idmEnricher.packages.label.published'),
27241
27279
  valueGetter: function valueGetter(params) {
27242
- var _params$data;
27243
- return !!((_params$data = params.data) !== null && _params$data !== void 0 && _params$data.isPublished);
27244
- },
27245
- editable: function editable(params) {
27246
- var _params$data2;
27247
- return !((_params$data2 = params.data) !== null && _params$data2 !== void 0 && _params$data2.isPublished);
27280
+ var _params$data, _params$data2;
27281
+ var publishDate = (_params$data = params.data) !== null && _params$data !== void 0 && _params$data.publishDate ? new Date(params.data.publishDate) : undefined;
27282
+ var lastUpdatedDate = (_params$data2 = params.data) !== null && _params$data2 !== void 0 && _params$data2.lastUpdatedDate ? new Date(params.data.lastUpdatedDate) : undefined;
27283
+ if (!publishDate) return false;
27284
+ if (!lastUpdatedDate) return !!publishDate;
27285
+ if (publishDate < lastUpdatedDate) return undefined;
27286
+ return true;
27248
27287
  },
27288
+ editable: false,
27249
27289
  cellDataType: 'boolean',
27250
27290
  pinned: 'left',
27251
27291
  lockPinned: true,
27252
- doRefresh: true
27292
+ doRefresh: true,
27293
+ cellRendererParams: {
27294
+ disabled: true
27295
+ },
27296
+ tooltipValueGetter: function tooltipValueGetter(params) {
27297
+ return params.value == undefined ? t('backoffice.idmEnricher.packages.label.unpublishedChanges') : undefined;
27298
+ }
27253
27299
  }, {
27300
+ headerName: t('backoffice.idmEnricher.packages.label.name'),
27254
27301
  field: 'name',
27255
27302
  filter: 'text',
27256
27303
  required: true
27257
27304
  }, {
27305
+ headerName: t('backoffice.idmEnricher.packages.label.catalogId'),
27258
27306
  field: 'basedCatalogId',
27259
- headerName: 'basedCatalogId (TODO: onOff required)',
27260
27307
  filter: 'text',
27261
27308
  type: 'lookup',
27309
+ editable: function editable(_ref5) {
27310
+ var data = _ref5.data;
27311
+ return !data.isPublished;
27312
+ },
27262
27313
  cellRendererParams: {
27263
27314
  displayField: 'basedCatalogName',
27264
27315
  apiInterface: {
@@ -27271,40 +27322,63 @@ function TablePackages () {
27271
27322
  field: 'basedCatalogName',
27272
27323
  hide: true
27273
27324
  }, {
27325
+ headerName: t('backoffice.idmEnricher.packages.label.packageId'),
27274
27326
  field: 'basedPackageId',
27275
- headerName: 'basedPackageId (TODO: onOff required)',
27276
27327
  filter: 'text',
27277
27328
  type: 'lookup',
27329
+ editable: function editable(_ref6) {
27330
+ var data = _ref6.data;
27331
+ return !data.isPublished;
27332
+ },
27278
27333
  cellRendererParams: {
27279
27334
  displayField: 'basedPackageName',
27280
27335
  apiInterface: {
27281
27336
  read: apiConfig.enricherService + '/packages?organizationId=${organizationId}'
27282
27337
  },
27283
27338
  lookupValue: 'name',
27284
- lookupKey: '_id'
27339
+ lookupKey: '_id',
27340
+ filter: function filter(rowData, lookupData) {
27341
+ return rowData._id !== lookupData._id;
27342
+ }
27285
27343
  }
27286
27344
  }, {
27287
27345
  field: 'basedPackageName',
27288
27346
  hide: true
27289
27347
  }, {
27348
+ headerName: t('backoffice.idmEnricher.general.label.lastUpdatedDate'),
27290
27349
  field: 'lastUpdatedDate',
27291
27350
  filter: 'date',
27292
27351
  cellDataType: 'dateString',
27293
27352
  editable: false
27294
27353
  }, {
27354
+ headerName: t('backoffice.idmEnricher.general.label.createdDate'),
27295
27355
  field: 'createdDate',
27296
27356
  filter: 'date',
27297
27357
  cellDataType: 'dateString',
27298
27358
  editable: false
27299
27359
  }, {
27360
+ headerName: t('backoffice.idmEnricher.packages.label.publishDate'),
27361
+ field: 'publishDate',
27362
+ filter: 'date',
27363
+ cellDataType: 'dateString',
27364
+ editable: false
27365
+ }, {
27366
+ headerName: t('backoffice.idmEnricher.general.label.createdBy'),
27300
27367
  field: 'createdByDisplayText',
27301
27368
  filter: 'text',
27302
27369
  editable: false
27303
27370
  }, {
27371
+ headerName: t('backoffice.idmEnricher.general.label.lastUpdatedBy'),
27304
27372
  field: 'lastUpdatedByDisplayText',
27305
27373
  filter: 'text',
27306
27374
  editable: false
27307
27375
  }, {
27376
+ headerName: t('backoffice.idmEnricher.packages.label.publishedBy'),
27377
+ field: 'publishedByDisplayText',
27378
+ filter: 'text',
27379
+ editable: false
27380
+ }, {
27381
+ headerName: t('backoffice.idmEnricher.general.label._id'),
27308
27382
  field: '_id',
27309
27383
  filter: 'text',
27310
27384
  editable: false
@@ -27312,6 +27386,8 @@ function TablePackages () {
27312
27386
  field: 'organizationId',
27313
27387
  editable: false,
27314
27388
  hide: true,
27389
+ lockVisible: true,
27390
+ suppressColumnsToolPanel: true,
27315
27391
  defaultValue: '${organizationId}'
27316
27392
  }]
27317
27393
  }
@@ -29952,7 +30028,7 @@ styleInject(css_248z$3);
29952
30028
 
29953
30029
  var wrapper = "wrapper-wuBie";
29954
30030
  var select = "select-w181d";
29955
- var css_248z$2 = ".wrapper-wuBie {\n display: flex;\n gap: 16px;\n margin: 8px;\n justify-content: space-evenly;\n}\n\n.select-w181d {\n z-index: 10000;\n margin: 8px;\n flex-grow: 0.8;\n}\n.select-w181d div {\n border-color: grey !important;\n}\n.select-w181d div {\n box-shadow: none;\n box-shadow: initial;\n}\n";
30031
+ var css_248z$2 = ".wrapper-wuBie {\n display: flex;\n gap: 16px;\n margin: 8px;\n justify-content: space-evenly;\n}\n\n.select-w181d {\n z-index: 10000;\n margin: 8px;\n flex-grow: 0.8;\n max-width: 80%;\n}\n.select-w181d div {\n border-color: grey !important;\n}\n.select-w181d div {\n box-shadow: none;\n box-shadow: initial;\n}\n";
29956
30032
  styleInject(css_248z$2);
29957
30033
 
29958
30034
  var ArticleSelection = function ArticleSelection(_ref) {
@@ -30004,7 +30080,11 @@ var ArticleSelection = function ArticleSelection(_ref) {
30004
30080
  }, [articleList]);
30005
30081
  return /*#__PURE__*/jsxs("div", {
30006
30082
  className: wrapper,
30007
- children: [/*#__PURE__*/jsx(PushpinOutlined, {
30083
+ children: [!root.contentStore.toolPinned && /*#__PURE__*/jsx(PushpinOutlined, {
30084
+ onClick: function onClick() {
30085
+ return root.contentStore.toolPinned = !root.contentStore.toolPinned;
30086
+ }
30087
+ }), root.contentStore.toolPinned && /*#__PURE__*/jsx(PushpinFilled, {
30008
30088
  onClick: function onClick() {
30009
30089
  return root.contentStore.toolPinned = !root.contentStore.toolPinned;
30010
30090
  }
@@ -30122,9 +30202,15 @@ function useWysiwyg(_ref) {
30122
30202
  });
30123
30203
  }
30124
30204
  }, [doReset]);
30205
+ useEffect(function () {
30206
+ if (articleCodex) {
30207
+ setDoReset(true);
30208
+ setArticleCodex(undefined);
30209
+ }
30210
+ }, [tool.parameters.packageId]);
30125
30211
  var onEventCalled = /*#__PURE__*/function () {
30126
30212
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
30127
- var catalogData, articles, key, article;
30213
+ var _articles$, catalogData, articles, key, article;
30128
30214
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
30129
30215
  while (1) switch (_context2.prev = _context2.next) {
30130
30216
  case 0:
@@ -30140,6 +30226,7 @@ function useWysiwyg(_ref) {
30140
30226
  });
30141
30227
  }
30142
30228
  setArticleList(articles);
30229
+ if (articleCodex === undefined && articles !== null && articles !== void 0 && (_articles$ = articles[0]) !== null && _articles$ !== void 0 && _articles$.value) setArticleCodex(articles[0].value);
30143
30230
  }
30144
30231
  if (e.type === 'navigatedToOption') {
30145
30232
  setCurrentNav(e.data.optionCodex);
@@ -30202,7 +30289,7 @@ function useWysiwyg(_ref) {
30202
30289
  autoFocusForInput: true,
30203
30290
  hideWarningDuringUserInput: false,
30204
30291
  cssVariables: {
30205
- primaryColor: '#db3433',
30292
+ primaryColor: '#001529',
30206
30293
  secondaryColor: '#4a4543',
30207
30294
  thirdColor: '#F3F3F3'
30208
30295
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG/ArticleSelection/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AAI9D,KAAK,KAAK,GAAG;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,CAAC;;;;AA8DrC,wBAA0C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG/ArticleSelection/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AAI9D,KAAK,KAAK,GAAG;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,CAAC;;;;AA+DrC,wBAA0C"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWysiwyg.d.ts","sourceRoot":"","sources":["../../../../../../../../src/layout/Toolbar/Tools/WYSIWYG/useWysiwyg.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAI9E,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,EAAE,CAAC;IACvB,cAAc,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,E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 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/index.tsx"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO,0BAyHb"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/index.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,0BAoLb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "24.9.0-beta.17",
3
+ "version": "24.9.0-beta.18",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^5.15.0",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@ant-design/icons": "5.0.1",
17
17
  "@babel/runtime": "7.18.0",
18
- "@crystaldesign/spreadsheet": "24.9.0-beta.17",
18
+ "@crystaldesign/spreadsheet": "24.9.0-beta.18",
19
19
  "@google/model-viewer": "3.4.0",
20
20
  "@tinymce/tinymce-react": "^3.13.0",
21
21
  "ag-charts-community": "^9.3.1",
@@ -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": "c3bf605c86cf975cd3833d6a122548461ad465f9"
54
+ "gitHead": "c54161603be63af47810705fe69a517770e5de1f"
55
55
  }