@crystaldesign/diva-backoffice 26.3.0-beta.24 → 26.3.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.
@@ -7644,7 +7644,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
7644
7644
  type: 'input',
7645
7645
  required: true
7646
7646
  }, {
7647
- name: t('backoffice.table.productgroupusermappings.columns.emails'),
7647
+ name: 'emails',
7648
7648
  label: t('backoffice.table.productgroupusermappings.columns.emails'),
7649
7649
  type: 'array',
7650
7650
  items: [{
@@ -8862,6 +8862,23 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
8862
8862
  label: t('backoffice.form.organizationdetails.items.nein'),
8863
8863
  value: false
8864
8864
  }]
8865
+ }, {
8866
+ name: ['settings', 'enableInsights'],
8867
+ label: t('backoffice.form.organizationdetails.items.settings.enableInsights'),
8868
+ tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
8869
+ permission: 'backoffice_admin_organizations',
8870
+ type: 'radio',
8871
+ optionType: 'button',
8872
+ options: [{
8873
+ label: t('backoffice.form.organizationdetails.items.vererbt'),
8874
+ value: undefined
8875
+ }, {
8876
+ label: t('backoffice.form.organizationdetails.items.ja'),
8877
+ value: true
8878
+ }, {
8879
+ label: t('backoffice.form.organizationdetails.items.nein'),
8880
+ value: false
8881
+ }]
8865
8882
  }, {
8866
8883
  name: ['settings', 'pricePreview'],
8867
8884
  label: t('backoffice.form.organizationdetails.items.settings.pricePreview'),
@@ -9840,10 +9857,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
9840
9857
  }];
9841
9858
  var translationItems = [];
9842
9859
  var _getItemsByContent = function getItemsByContent(c, path) {
9843
- var content = Array.isArray(c) ? c : [c];
9860
+ var isArray = Array.isArray(c);
9861
+ var content = isArray ? c : [c];
9844
9862
  for (var i = 0; i < content.length; i++) {
9845
9863
  var item = content[i];
9846
- var p = [].concat(_toConsumableArray(path), [i]);
9864
+ var p = isArray ? [].concat(_toConsumableArray(path), [i]) : path;
9847
9865
  switch (item.type) {
9848
9866
  case 'Title':
9849
9867
  translationItems.push({
@@ -10154,10 +10172,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
10154
10172
  }];
10155
10173
  var translationItems = [];
10156
10174
  var _getItemsByContent2 = function getItemsByContent(c, path) {
10157
- var content = Array.isArray(c) ? c : [c];
10175
+ var isArray = Array.isArray(c);
10176
+ var content = isArray ? c : [c];
10158
10177
  for (var i = 0; i < content.length; i++) {
10159
10178
  var item = content[i];
10160
- var p = [].concat(_toConsumableArray(path), [i]);
10179
+ var p = isArray ? [].concat(_toConsumableArray(path), [i]) : path;
10161
10180
  switch (item.type) {
10162
10181
  case 'Title':
10163
10182
  translationItems.push({
@@ -18679,7 +18698,12 @@ var FormList$2 = function FormList(_ref) {
18679
18698
  var data = (_state$getData = state.getData(absoluteName, state.data)) === null || _state$getData === void 0 ? void 0 : _state$getData[index];
18680
18699
  state.keepRemovedMediaItem(data, item.items);
18681
18700
  r(index);
18682
- state.onInputChanged();
18701
+ // Defer onInputChanged so form.getFieldsValue() sees the updated Form.List state.
18702
+ // Otherwise React's batching can cause getFieldsValue() to return stale data and
18703
+ // the merge + setFieldsValue cycle would restore the removed item.
18704
+ queueMicrotask(function () {
18705
+ return state.onInputChanged();
18706
+ });
18683
18707
  };
18684
18708
  var add = function add(a) {
18685
18709
  a();
@@ -18687,7 +18711,7 @@ var FormList$2 = function FormList(_ref) {
18687
18711
  return /*#__PURE__*/jsxs(Fragment, {
18688
18712
  children: [/*#__PURE__*/jsx(Divider, {
18689
18713
  orientation: "horizontal",
18690
- children: Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name)
18714
+ children: item.label ? t(item.label) : Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name)
18691
18715
  }), /*#__PURE__*/jsx(Form$2.List, {
18692
18716
  name: absoluteName,
18693
18717
  initialValue: (_item$initialValue = item.initialValue) !== null && _item$initialValue !== void 0 ? _item$initialValue : value,
@@ -21451,7 +21475,7 @@ function _arrayLikeToArray$h(r, a) { (null == a || a > r.length) && (a = r.lengt
21451
21475
  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; }
21452
21476
  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; }
21453
21477
  function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
21454
- var _isReadonly, _state$hiddenRequired;
21478
+ var _isReadonly, _state$hiddenRequired, _state$data$_id, _state$data;
21455
21479
  if (hidden) return /*#__PURE__*/jsx(Fragment, {});
21456
21480
  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;
21457
21481
  switch (item.type) {
@@ -21571,13 +21595,15 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
21571
21595
  children: item.label
21572
21596
  });
21573
21597
  case 'richText':
21574
- // Use key to force re-mount when value changes (needed for RichTextEditor's useRef)
21575
21598
  var richTextValue = state.getData(absoluteName, state.data);
21599
+ // Use stable key (entity id + field name) so we don't remount on every keystroke.
21600
+ // Remount only when switching to a different record; key=value caused cursor to jump to start.
21601
+ 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));
21576
21602
  return /*#__PURE__*/jsx(RichTextEditor$1, {
21577
21603
  initValue: richTextValue,
21578
21604
  name: absoluteName,
21579
21605
  onChange: _onChange
21580
- }, richTextValue || 'empty');
21606
+ }, richTextKey);
21581
21607
  case 'number':
21582
21608
  return /*#__PURE__*/jsx(InputNumber, {
21583
21609
  disabled: disabled,
@@ -21629,9 +21655,13 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
21629
21655
  absoluteName: absoluteName
21630
21656
  });
21631
21657
  case 'object':
21658
+ var objectValue = state.getData(absoluteName, state.data);
21632
21659
  return /*#__PURE__*/jsx(JsonEditor$2, {
21633
21660
  setCanSave: setCanSave,
21634
- data: state.data,
21661
+ data: objectValue,
21662
+ onChange: function onChange(e) {
21663
+ return _onChange(absoluteName, e);
21664
+ },
21635
21665
  height: item.height,
21636
21666
  savable: true
21637
21667
  });
@@ -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.3.0-beta.24",
3
+ "version": "26.3.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": "6.1.0",
17
17
  "@babel/runtime": "7.24.7",
18
- "@crystaldesign/content-box": "26.3.0-beta.24",
19
- "@crystaldesign/content-item": "26.3.0-beta.24",
20
- "@crystaldesign/diva-core": "26.3.0-beta.24",
21
- "@crystaldesign/diva-utils": "26.3.0-beta.24",
22
- "@crystaldesign/media-upload": "26.3.0-beta.24",
23
- "@crystaldesign/rtf-editor": "26.3.0-beta.24",
24
- "@crystaldesign/spreadsheet": "26.3.0-beta.24",
18
+ "@crystaldesign/content-box": "26.3.0-beta.25",
19
+ "@crystaldesign/content-item": "26.3.0-beta.25",
20
+ "@crystaldesign/diva-core": "26.3.0-beta.25",
21
+ "@crystaldesign/diva-utils": "26.3.0-beta.25",
22
+ "@crystaldesign/media-upload": "26.3.0-beta.25",
23
+ "@crystaldesign/rtf-editor": "26.3.0-beta.25",
24
+ "@crystaldesign/spreadsheet": "26.3.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": "5b9c46401b8d0e4f34565145d812c0d6dfdc667d"
54
+ "gitHead": "4bb777ad88a30fb03e66104cf88bc7ca8a706f81"
55
55
  }