@crystaldesign/diva-backoffice 26.3.0-beta.24 → 26.3.0-beta.27
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
|
@@ -7644,7 +7644,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
7644
7644
|
type: 'input',
|
|
7645
7645
|
required: true
|
|
7646
7646
|
}, {
|
|
7647
|
-
name:
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
},
|
|
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:
|
|
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
|
});
|
|
@@ -46487,7 +46517,7 @@ var SendToPIM = function SendToPIM(_ref) {
|
|
|
46487
46517
|
var sendToPimUrl = root.configurationStore.sendToPimUrl;
|
|
46488
46518
|
var handleTrigger = /*#__PURE__*/function () {
|
|
46489
46519
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
46490
|
-
var
|
|
46520
|
+
var url, response, text, errMessage, json, _err$message;
|
|
46491
46521
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
46492
46522
|
while (1) switch (_context.prev = _context.next) {
|
|
46493
46523
|
case 0:
|
|
@@ -46502,14 +46532,9 @@ var SendToPIM = function SendToPIM(_ref) {
|
|
|
46502
46532
|
setError(undefined);
|
|
46503
46533
|
setSuccess(undefined);
|
|
46504
46534
|
_context.prev = 6;
|
|
46505
|
-
organizationId = root.dataStore.organizationId;
|
|
46506
|
-
_context.next = 10;
|
|
46507
|
-
return root.dataStore.getApi2SessionGuid(organizationId, sendToPimUrl.trim());
|
|
46508
|
-
case 10:
|
|
46509
|
-
_context.sent;
|
|
46510
46535
|
url = new URL(sendToPimUrl.trim());
|
|
46511
46536
|
url.searchParams.set('function', API_FUNCTION);
|
|
46512
|
-
_context.next =
|
|
46537
|
+
_context.next = 11;
|
|
46513
46538
|
return fetch(url.toString(), {
|
|
46514
46539
|
method: 'POST',
|
|
46515
46540
|
headers: {
|
|
@@ -46518,11 +46543,11 @@ var SendToPIM = function SendToPIM(_ref) {
|
|
|
46518
46543
|
},
|
|
46519
46544
|
body: JSON.stringify({})
|
|
46520
46545
|
});
|
|
46521
|
-
case
|
|
46546
|
+
case 11:
|
|
46522
46547
|
response = _context.sent;
|
|
46523
|
-
_context.next =
|
|
46548
|
+
_context.next = 14;
|
|
46524
46549
|
return response.text();
|
|
46525
|
-
case
|
|
46550
|
+
case 14:
|
|
46526
46551
|
text = _context.sent;
|
|
46527
46552
|
try {
|
|
46528
46553
|
json = JSON.parse(text);
|
|
@@ -46531,27 +46556,27 @@ var SendToPIM = function SendToPIM(_ref) {
|
|
|
46531
46556
|
errMessage = text || "HTTP ".concat(response.status);
|
|
46532
46557
|
}
|
|
46533
46558
|
if (!errMessage) {
|
|
46534
|
-
_context.next =
|
|
46559
|
+
_context.next = 18;
|
|
46535
46560
|
break;
|
|
46536
46561
|
}
|
|
46537
46562
|
throw new Error(errMessage);
|
|
46538
|
-
case
|
|
46563
|
+
case 18:
|
|
46539
46564
|
setSuccess(t('backoffice.sendtopim.success'));
|
|
46540
|
-
_context.next =
|
|
46565
|
+
_context.next = 24;
|
|
46541
46566
|
break;
|
|
46542
|
-
case
|
|
46543
|
-
_context.prev =
|
|
46567
|
+
case 21:
|
|
46568
|
+
_context.prev = 21;
|
|
46544
46569
|
_context.t0 = _context["catch"](6);
|
|
46545
46570
|
setError((_err$message = _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) !== null && _err$message !== void 0 ? _err$message : t('backoffice.sendtopim.error'));
|
|
46546
|
-
case
|
|
46547
|
-
_context.prev =
|
|
46571
|
+
case 24:
|
|
46572
|
+
_context.prev = 24;
|
|
46548
46573
|
setLoading(false);
|
|
46549
|
-
return _context.finish(
|
|
46550
|
-
case
|
|
46574
|
+
return _context.finish(24);
|
|
46575
|
+
case 27:
|
|
46551
46576
|
case "end":
|
|
46552
46577
|
return _context.stop();
|
|
46553
46578
|
}
|
|
46554
|
-
}, _callee, null, [[6,
|
|
46579
|
+
}, _callee, null, [[6, 21, 24, 27]]);
|
|
46555
46580
|
}));
|
|
46556
46581
|
return function handleTrigger() {
|
|
46557
46582
|
return _ref2.apply(this, arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/Form/Fields/FormList/index.tsx"],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C;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/SendToPIM/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAQxC,UAAU,KAAK;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;kCAE0B,KAAK;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/SendToPIM/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAQxC,UAAU,KAAK;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;kCAE0B,KAAK;;;AAmFhC,wBAAmC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "26.3.0-beta.
|
|
3
|
+
"version": "26.3.0-beta.27",
|
|
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.
|
|
19
|
-
"@crystaldesign/content-item": "26.3.0-beta.
|
|
20
|
-
"@crystaldesign/diva-core": "26.3.0-beta.
|
|
21
|
-
"@crystaldesign/diva-utils": "26.3.0-beta.
|
|
22
|
-
"@crystaldesign/media-upload": "26.3.0-beta.
|
|
23
|
-
"@crystaldesign/rtf-editor": "26.3.0-beta.
|
|
24
|
-
"@crystaldesign/spreadsheet": "26.3.0-beta.
|
|
18
|
+
"@crystaldesign/content-box": "26.3.0-beta.27",
|
|
19
|
+
"@crystaldesign/content-item": "26.3.0-beta.27",
|
|
20
|
+
"@crystaldesign/diva-core": "26.3.0-beta.27",
|
|
21
|
+
"@crystaldesign/diva-utils": "26.3.0-beta.27",
|
|
22
|
+
"@crystaldesign/media-upload": "26.3.0-beta.27",
|
|
23
|
+
"@crystaldesign/rtf-editor": "26.3.0-beta.27",
|
|
24
|
+
"@crystaldesign/spreadsheet": "26.3.0-beta.27",
|
|
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": "adbc53c438cea26660fd8c6c5aa4c90659cb778a"
|
|
55
55
|
}
|