@crystaldesign/diva-backoffice 26.2.0-rc.2 → 26.2.0-rc.4
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.
package/build/esm/index.js
CHANGED
|
@@ -9814,10 +9814,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9814
9814
|
}];
|
|
9815
9815
|
var translationItems = [];
|
|
9816
9816
|
var _getItemsByContent = function getItemsByContent(c, path) {
|
|
9817
|
-
var
|
|
9817
|
+
var isArray = Array.isArray(c);
|
|
9818
|
+
var content = isArray ? c : [c];
|
|
9818
9819
|
for (var i = 0; i < content.length; i++) {
|
|
9819
9820
|
var item = content[i];
|
|
9820
|
-
var p = [].concat(_toConsumableArray(path), [i]);
|
|
9821
|
+
var p = isArray ? [].concat(_toConsumableArray(path), [i]) : path;
|
|
9821
9822
|
switch (item.type) {
|
|
9822
9823
|
case 'Title':
|
|
9823
9824
|
translationItems.push({
|
|
@@ -10128,10 +10129,11 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
10128
10129
|
}];
|
|
10129
10130
|
var translationItems = [];
|
|
10130
10131
|
var _getItemsByContent2 = function getItemsByContent(c, path) {
|
|
10131
|
-
var
|
|
10132
|
+
var isArray = Array.isArray(c);
|
|
10133
|
+
var content = isArray ? c : [c];
|
|
10132
10134
|
for (var i = 0; i < content.length; i++) {
|
|
10133
10135
|
var item = content[i];
|
|
10134
|
-
var p = [].concat(_toConsumableArray(path), [i]);
|
|
10136
|
+
var p = isArray ? [].concat(_toConsumableArray(path), [i]) : path;
|
|
10135
10137
|
switch (item.type) {
|
|
10136
10138
|
case 'Title':
|
|
10137
10139
|
translationItems.push({
|
|
@@ -18633,7 +18635,12 @@ var FormList$2 = function FormList(_ref) {
|
|
|
18633
18635
|
var data = (_state$getData = state.getData(absoluteName, state.data)) === null || _state$getData === void 0 ? void 0 : _state$getData[index];
|
|
18634
18636
|
state.keepRemovedMediaItem(data, item.items);
|
|
18635
18637
|
r(index);
|
|
18636
|
-
|
|
18638
|
+
// Defer onInputChanged so form.getFieldsValue() sees the updated Form.List state.
|
|
18639
|
+
// Otherwise React's batching can cause getFieldsValue() to return stale data and
|
|
18640
|
+
// the merge + setFieldsValue cycle would restore the removed item.
|
|
18641
|
+
queueMicrotask(function () {
|
|
18642
|
+
return state.onInputChanged();
|
|
18643
|
+
});
|
|
18637
18644
|
};
|
|
18638
18645
|
var add = function add(a) {
|
|
18639
18646
|
a();
|
|
@@ -21405,7 +21412,7 @@ function _arrayLikeToArray$h(r, a) { (null == a || a > r.length) && (a = r.lengt
|
|
|
21405
21412
|
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
21413
|
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
21414
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
21408
|
-
var _isReadonly, _state$hiddenRequired;
|
|
21415
|
+
var _isReadonly, _state$hiddenRequired, _state$data$_id, _state$data;
|
|
21409
21416
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
21410
21417
|
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
21418
|
switch (item.type) {
|
|
@@ -21525,13 +21532,15 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
21525
21532
|
children: item.label
|
|
21526
21533
|
});
|
|
21527
21534
|
case 'richText':
|
|
21528
|
-
// Use key to force re-mount when value changes (needed for RichTextEditor's useRef)
|
|
21529
21535
|
var richTextValue = state.getData(absoluteName, state.data);
|
|
21536
|
+
// Use stable key (entity id + field name) so we don't remount on every keystroke.
|
|
21537
|
+
// Remount only when switching to a different record; key=value caused cursor to jump to start.
|
|
21538
|
+
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
21539
|
return /*#__PURE__*/jsx(RichTextEditor$1, {
|
|
21531
21540
|
initValue: richTextValue,
|
|
21532
21541
|
name: absoluteName,
|
|
21533
21542
|
onChange: _onChange
|
|
21534
|
-
},
|
|
21543
|
+
}, richTextKey);
|
|
21535
21544
|
case 'number':
|
|
21536
21545
|
return /*#__PURE__*/jsx(InputNumber, {
|
|
21537
21546
|
disabled: disabled,
|
|
@@ -21583,9 +21592,13 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
21583
21592
|
absoluteName: absoluteName
|
|
21584
21593
|
});
|
|
21585
21594
|
case 'object':
|
|
21595
|
+
var objectValue = state.getData(absoluteName, state.data);
|
|
21586
21596
|
return /*#__PURE__*/jsx(JsonEditor$2, {
|
|
21587
21597
|
setCanSave: setCanSave,
|
|
21588
|
-
data:
|
|
21598
|
+
data: objectValue,
|
|
21599
|
+
onChange: function onChange(e) {
|
|
21600
|
+
return _onChange(absoluteName, e);
|
|
21601
|
+
},
|
|
21589
21602
|
height: item.height,
|
|
21590
21603
|
savable: true
|
|
21591
21604
|
});
|
|
@@ -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;;;
|
|
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,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,GAAG,EACf,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAC1C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,EACjE,OAAO,EAAE,GAAG,EACZ,IAAI,CAAC,EAAE,SAAS,EAChB,IAAI,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,EACxB,MAAM,CAAC,EAAE,OAAO,EAEhB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,
|
|
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,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,GAAG,EACf,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAC1C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,EACjE,OAAO,EAAE,GAAG,EACZ,IAAI,CAAC,EAAE,SAAS,EAChB,IAAI,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,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.
|
|
3
|
+
"version": "26.2.0-rc.4",
|
|
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.
|
|
19
|
-
"@crystaldesign/content-item": "26.2.0-rc.
|
|
20
|
-
"@crystaldesign/diva-core": "26.2.0-rc.
|
|
21
|
-
"@crystaldesign/diva-utils": "26.2.0-rc.
|
|
22
|
-
"@crystaldesign/media-upload": "26.2.0-rc.
|
|
23
|
-
"@crystaldesign/rtf-editor": "26.2.0-rc.
|
|
24
|
-
"@crystaldesign/spreadsheet": "26.2.0-rc.
|
|
18
|
+
"@crystaldesign/content-box": "26.2.0-rc.4",
|
|
19
|
+
"@crystaldesign/content-item": "26.2.0-rc.4",
|
|
20
|
+
"@crystaldesign/diva-core": "26.2.0-rc.4",
|
|
21
|
+
"@crystaldesign/diva-utils": "26.2.0-rc.4",
|
|
22
|
+
"@crystaldesign/media-upload": "26.2.0-rc.4",
|
|
23
|
+
"@crystaldesign/rtf-editor": "26.2.0-rc.4",
|
|
24
|
+
"@crystaldesign/spreadsheet": "26.2.0-rc.4",
|
|
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": "
|
|
54
|
+
"gitHead": "1f6f93a7cfe5f1e83b250301e355ac610af27e15"
|
|
55
55
|
}
|