@crystaldesign/diva-backoffice 24.1.2-beta.0 → 24.1.2-beta.2

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.
@@ -250,7 +250,7 @@ function aplyMapping (_ref) {
250
250
  }
251
251
  for (var _i = 0; _i < mapping.map.length; _i++) {
252
252
  var _m = mapping.map[_i];
253
- if (!meetsCondition(_m)) return;
253
+ if (!meetsCondition(_m)) continue;
254
254
  if (_m.targetField == '$ROOT' && _m.sourceField) {
255
255
  returnValue = flatMapping[_m.sourceField];
256
256
  return;
@@ -21181,11 +21181,11 @@ function useCatalogEditor (id) {
21181
21181
  }));
21182
21182
  return _exportOptionTree.apply(this, arguments);
21183
21183
  }
21184
- function startImport(_x3, _x4, _x5) {
21184
+ function startImport(_x3, _x4, _x5, _x6) {
21185
21185
  return _startImport.apply(this, arguments);
21186
21186
  }
21187
21187
  function _startImport() {
21188
- _startImport = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(fileName, catalogId, deleteExistingOPVChilds) {
21188
+ _startImport = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(fileName, catalogId, deleteExistingOPVChilds, deleteDataNotExistingInExcel) {
21189
21189
  var formData;
21190
21190
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
21191
21191
  while (1) switch (_context3.prev = _context3.next) {
@@ -21195,7 +21195,8 @@ function useCatalogEditor (id) {
21195
21195
  formData.append('filename', fileName);
21196
21196
  formData.append('catalogGuid', catalogId);
21197
21197
  formData.append('deleteExistingOPVChilds', deleteExistingOPVChilds ? 'True' : 'False');
21198
- _context3.next = 7;
21198
+ formData.append('deleteDataNotExistingInExcel', deleteDataNotExistingInExcel ? 'True' : 'False');
21199
+ _context3.next = 8;
21199
21200
  return fetch("".concat(api2BaseUrl.replace('aspx', 'asmx'), "/ImportCatalogEditorExcel"), {
21200
21201
  method: 'POST',
21201
21202
  headers: {
@@ -21205,9 +21206,9 @@ function useCatalogEditor (id) {
21205
21206
  })["catch"](function (error) {
21206
21207
  return error;
21207
21208
  });
21208
- case 7:
21209
- return _context3.abrupt("return", true);
21210
21209
  case 8:
21210
+ return _context3.abrupt("return", true);
21211
+ case 9:
21211
21212
  case "end":
21212
21213
  return _context3.stop();
21213
21214
  }
@@ -21252,8 +21253,12 @@ function DragDropUpload(_ref) {
21252
21253
  setDeleteExistingOPVChilds = _useState6[1];
21253
21254
  var _useState7 = useState(false),
21254
21255
  _useState8 = _slicedToArray(_useState7, 2),
21255
- importStarted = _useState8[0],
21256
- setImportStarted = _useState8[1];
21256
+ deleteDataNotExistingInExcel = _useState8[0],
21257
+ setDeleteDataNotExistingInExcel = _useState8[1];
21258
+ var _useState9 = useState(false),
21259
+ _useState10 = _slicedToArray(_useState9, 2),
21260
+ importStarted = _useState10[0],
21261
+ setImportStarted = _useState10[1];
21257
21262
  var props = {
21258
21263
  name: 'file',
21259
21264
  multiple: false,
@@ -21297,7 +21302,7 @@ function DragDropUpload(_ref) {
21297
21302
  case 0:
21298
21303
  _context.prev = 0;
21299
21304
  _context.next = 3;
21300
- return startImport(fileName, catalogId, deleteExistingOPVChilds);
21305
+ return startImport(fileName, catalogId, deleteExistingOPVChilds, deleteDataNotExistingInExcel);
21301
21306
  case 3:
21302
21307
  result = _context.sent;
21303
21308
  if (result === true) {
@@ -21343,11 +21348,17 @@ function DragDropUpload(_ref) {
21343
21348
  children: t('backoffice.catalogeditor.classimport.acceptedfiles')
21344
21349
  })]
21345
21350
  })), /*#__PURE__*/jsx(Checkbox, {
21346
- value: deleteExistingOPVChilds,
21351
+ checked: deleteExistingOPVChilds,
21347
21352
  onChange: function onChange(e) {
21348
21353
  return setDeleteExistingOPVChilds(e.target.checked);
21349
21354
  },
21350
21355
  children: t('backoffice.catalogeditor.classexportdeleteopvchilds')
21356
+ }), /*#__PURE__*/jsx(Checkbox, {
21357
+ checked: deleteDataNotExistingInExcel,
21358
+ onChange: function onChange(e) {
21359
+ return setDeleteDataNotExistingInExcel(e.target.checked);
21360
+ },
21361
+ children: t('backoffice.catalogeditor.classexportdeletedatanotexistinginexcel')
21351
21362
  }), /*#__PURE__*/jsx(Button, {
21352
21363
  type: "primary",
21353
21364
  onClick: onClickImport,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/CatalogEditor/DragDropUpload/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE;IAAE,UAAU,EAAE,GAAG,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAE,eA4ExI"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/CatalogEditor/DragDropUpload/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE;IAAE,UAAU,EAAE,GAAG,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAE,eAgFxI"}
@@ -5,7 +5,7 @@ export default function (id: string): {
5
5
  onRedirect: () => void;
6
6
  organization: import("@crystaldesign/diva-core").OrganizationData;
7
7
  exportOptionTree: (catalogId?: string, onlyOptAndOpvs?: boolean) => Promise<boolean>;
8
- startImport: (fileName: string, catalogId: string, deleteExistingOPVChilds: string) => Promise<boolean>;
8
+ startImport: (fileName: string, catalogId: string, deleteExistingOPVChilds: boolean, deleteDataNotExistingInExcel: boolean) => Promise<boolean>;
9
9
  api2SessionGuid: string;
10
10
  api2BaseUrl: string;
11
11
  supplierGuid: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useCatalogEditor.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/CatalogEditor/useCatalogEditor.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,MAAM;;;;;;mCAmEW,MAAM,mBAAmB,OAAO;4BAqBvC,MAAM,aAAa,MAAM,2BAA2B,MAAM;;;;EA+BhG"}
1
+ {"version":3,"file":"useCatalogEditor.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/CatalogEditor/useCatalogEditor.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,MAAM;;;;;;mCAmEW,MAAM,mBAAmB,OAAO;4BAqBvC,MAAM,aAAa,MAAM,2BAA2B,OAAO,gCAAgC,OAAO;;;;EAgCxI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "24.1.2-beta.0",
3
+ "version": "24.1.2-beta.2",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^5.15.0",
@@ -50,5 +50,5 @@
50
50
  },
51
51
  "module": "build/esm/index.js",
52
52
  "types": "./build/types/backoffice/src/index.d.ts",
53
- "gitHead": "589e36d1e59d7a208c5bdc9e2be5cb1fd20a192f"
53
+ "gitHead": "0f974b740bfd3a8b3a97b631ce90e18235257484"
54
54
  }