@crystaldesign/diva-backoffice 26.2.0-rc.2 → 26.2.0-rc.20

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.
@@ -7625,7 +7625,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
7625
7625
  type: 'input',
7626
7626
  required: true
7627
7627
  }, {
7628
- name: t('backoffice.table.productgroupusermappings.columns.emails'),
7628
+ name: 'emails',
7629
7629
  label: t('backoffice.table.productgroupusermappings.columns.emails'),
7630
7630
  type: 'array',
7631
7631
  items: [{
@@ -8836,6 +8836,23 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
8836
8836
  label: t('backoffice.form.organizationdetails.items.nein'),
8837
8837
  value: false
8838
8838
  }]
8839
+ }, {
8840
+ name: ['settings', 'enableInsights'],
8841
+ label: t('backoffice.form.organizationdetails.items.settings.enableInsights'),
8842
+ tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
8843
+ permission: 'backoffice_admin_organizations',
8844
+ type: 'radio',
8845
+ optionType: 'button',
8846
+ options: [{
8847
+ label: t('backoffice.form.organizationdetails.items.vererbt'),
8848
+ value: undefined
8849
+ }, {
8850
+ label: t('backoffice.form.organizationdetails.items.ja'),
8851
+ value: true
8852
+ }, {
8853
+ label: t('backoffice.form.organizationdetails.items.nein'),
8854
+ value: false
8855
+ }]
8839
8856
  }, {
8840
8857
  name: ['settings', 'pricePreview'],
8841
8858
  label: t('backoffice.form.organizationdetails.items.settings.pricePreview'),
@@ -9814,10 +9831,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9814
9831
  }];
9815
9832
  var translationItems = [];
9816
9833
  var _getItemsByContent = function getItemsByContent(c, path) {
9817
- var content = Array.isArray(c) ? c : [c];
9834
+ var isArray = Array.isArray(c);
9835
+ var content = isArray ? c : [c];
9818
9836
  for (var i = 0; i < content.length; i++) {
9819
9837
  var item = content[i];
9820
- var p = [].concat(_toConsumableArray(path), [i]);
9838
+ var p = isArray ? [].concat(_toConsumableArray(path), [i]) : path;
9821
9839
  switch (item.type) {
9822
9840
  case 'Title':
9823
9841
  translationItems.push({
@@ -10128,10 +10146,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
10128
10146
  }];
10129
10147
  var translationItems = [];
10130
10148
  var _getItemsByContent2 = function getItemsByContent(c, path) {
10131
- var content = Array.isArray(c) ? c : [c];
10149
+ var isArray = Array.isArray(c);
10150
+ var content = isArray ? c : [c];
10132
10151
  for (var i = 0; i < content.length; i++) {
10133
10152
  var item = content[i];
10134
- var p = [].concat(_toConsumableArray(path), [i]);
10153
+ var p = isArray ? [].concat(_toConsumableArray(path), [i]) : path;
10135
10154
  switch (item.type) {
10136
10155
  case 'Title':
10137
10156
  translationItems.push({
@@ -18633,7 +18652,12 @@ var FormList$2 = function FormList(_ref) {
18633
18652
  var data = (_state$getData = state.getData(absoluteName, state.data)) === null || _state$getData === void 0 ? void 0 : _state$getData[index];
18634
18653
  state.keepRemovedMediaItem(data, item.items);
18635
18654
  r(index);
18636
- state.onInputChanged();
18655
+ // Defer onInputChanged so form.getFieldsValue() sees the updated Form.List state.
18656
+ // Otherwise React's batching can cause getFieldsValue() to return stale data and
18657
+ // the merge + setFieldsValue cycle would restore the removed item.
18658
+ queueMicrotask(function () {
18659
+ return state.onInputChanged();
18660
+ });
18637
18661
  };
18638
18662
  var add = function add(a) {
18639
18663
  a();
@@ -18641,7 +18665,7 @@ var FormList$2 = function FormList(_ref) {
18641
18665
  return /*#__PURE__*/jsxs(Fragment, {
18642
18666
  children: [/*#__PURE__*/jsx(Divider, {
18643
18667
  orientation: "horizontal",
18644
- children: Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name)
18668
+ children: item.label ? t(item.label) : Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name)
18645
18669
  }), /*#__PURE__*/jsx(Form$2.List, {
18646
18670
  name: absoluteName,
18647
18671
  initialValue: (_item$initialValue = item.initialValue) !== null && _item$initialValue !== void 0 ? _item$initialValue : value,
@@ -21405,7 +21429,7 @@ function _arrayLikeToArray$h(r, a) { (null == a || a > r.length) && (a = r.lengt
21405
21429
  function ownKeys$X(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21406
21430
  function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$X(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$X(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21407
21431
  function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
21408
- var _isReadonly, _state$hiddenRequired;
21432
+ var _isReadonly, _state$hiddenRequired, _state$data$_id, _state$data;
21409
21433
  if (hidden) return /*#__PURE__*/jsx(Fragment, {});
21410
21434
  var disabled = (_isReadonly = isReadonly(item, state.data)) !== null && _isReadonly !== void 0 ? _isReadonly : (_state$hiddenRequired = state.hiddenRequiredDisabled[typeof absoluteName == 'string' ? absoluteName : absoluteName.join('.')]) === null || _state$hiddenRequired === void 0 ? void 0 : _state$hiddenRequired.disabled;
21411
21435
  switch (item.type) {
@@ -21525,13 +21549,15 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
21525
21549
  children: item.label
21526
21550
  });
21527
21551
  case 'richText':
21528
- // Use key to force re-mount when value changes (needed for RichTextEditor's useRef)
21529
21552
  var richTextValue = state.getData(absoluteName, state.data);
21553
+ // Use stable key (entity id + field name) so we don't remount on every keystroke.
21554
+ // Remount only when switching to a different record; key=value caused cursor to jump to start.
21555
+ var richTextKey = "".concat((_state$data$_id = (_state$data = state.data) === null || _state$data === void 0 ? void 0 : _state$data._id) !== null && _state$data$_id !== void 0 ? _state$data$_id : 'new', "-").concat(JSON.stringify(absoluteName));
21530
21556
  return /*#__PURE__*/jsx(RichTextEditor$1, {
21531
21557
  initValue: richTextValue,
21532
21558
  name: absoluteName,
21533
21559
  onChange: _onChange
21534
- }, richTextValue || 'empty');
21560
+ }, richTextKey);
21535
21561
  case 'number':
21536
21562
  return /*#__PURE__*/jsx(InputNumber, {
21537
21563
  disabled: disabled,
@@ -21583,9 +21609,13 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
21583
21609
  absoluteName: absoluteName
21584
21610
  });
21585
21611
  case 'object':
21612
+ var objectValue = state.getData(absoluteName, state.data);
21586
21613
  return /*#__PURE__*/jsx(JsonEditor$2, {
21587
21614
  setCanSave: setCanSave,
21588
- data: state.data,
21615
+ data: objectValue,
21616
+ onChange: function onChange(e) {
21617
+ return _onChange(absoluteName, e);
21618
+ },
21589
21619
  height: item.height,
21590
21620
  savable: true
21591
21621
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/Form/Fields/FormList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAQ,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAgB,YAAY,EAAW,MAAM,MAAM,CAAC;AAI3D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,SAAS,MAAM,6BAA6B,CAAC;+GAcjD;IACD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,GAAG,CAAC;IAChB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3C,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC5C;;;AA2ED,wBAAkC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/Form/Fields/FormList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAQ,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAgB,YAAY,EAAW,MAAM,MAAM,CAAC;AAI3D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,SAAS,MAAM,6BAA6B,CAAC;+GAcjD;IACD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,GAAG,CAAC;IAChB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC3C,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC5C;;;AA8ED,wBAAkC"}
@@ -1 +1 @@
1
- {"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Form/elements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAW,YAAY,EAAwB,MAAM,MAAM,CAAC;AACnE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAkB1C,wBAAgB,UAAU,CACxB,I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AC,EACxB,MAAM,CAAC,EAAE,OAAO,EAEhB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,qBAqP3C;AAQD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,uBAY/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "26.2.0-rc.2",
3
+ "version": "26.2.0-rc.20",
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": "6.1.0",
17
17
  "@babel/runtime": "7.24.7",
18
- "@crystaldesign/content-box": "26.2.0-rc.2",
19
- "@crystaldesign/content-item": "26.2.0-rc.2",
20
- "@crystaldesign/diva-core": "26.2.0-rc.2",
21
- "@crystaldesign/diva-utils": "26.2.0-rc.2",
22
- "@crystaldesign/media-upload": "26.2.0-rc.2",
23
- "@crystaldesign/rtf-editor": "26.2.0-rc.2",
24
- "@crystaldesign/spreadsheet": "26.2.0-rc.2",
18
+ "@crystaldesign/content-box": "26.2.0-rc.20",
19
+ "@crystaldesign/content-item": "26.2.0-rc.20",
20
+ "@crystaldesign/diva-core": "26.2.0-rc.20",
21
+ "@crystaldesign/diva-utils": "26.2.0-rc.20",
22
+ "@crystaldesign/media-upload": "26.2.0-rc.20",
23
+ "@crystaldesign/rtf-editor": "26.2.0-rc.20",
24
+ "@crystaldesign/spreadsheet": "26.2.0-rc.20",
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": "41a3d4d179117c6cb9df46ff4c4646c1e907dae6"
54
+ "gitHead": "9cee02cbbfc466d8b2df847653bb0e2e43cfd3a7"
55
55
  }