@crystaldesign/diva-backoffice 24.8.0-beta.11 → 24.8.0-beta.14
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
|
@@ -2302,7 +2302,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2302
2302
|
}, {
|
|
2303
2303
|
actionType: 'Modal',
|
|
2304
2304
|
title: t('backoffice.table.allusers.modal.title.aktivateuser'),
|
|
2305
|
-
text: t('backoffice.table.allusers.modal.
|
|
2305
|
+
text: t('backoffice.table.allusers.modal.text'),
|
|
2306
2306
|
label: t('backoffice.table.allusers.modal.label.aktivate'),
|
|
2307
2307
|
type: 'Form',
|
|
2308
2308
|
id: 'FormActivateUser',
|
|
@@ -11237,7 +11237,8 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11237
11237
|
_this2 = this;
|
|
11238
11238
|
if (!skipFill) {
|
|
11239
11239
|
this._selectedMenuKeys = this.fillSelectedUntilFistLeaf(element.menu, this._selectedMenuKeys, element.pos, key);
|
|
11240
|
-
this.
|
|
11240
|
+
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
11241
|
+
this.root.navigate('/' + path);
|
|
11241
11242
|
}
|
|
11242
11243
|
this._menuElement1 = _objectSpread$E(_objectSpread$E({}, this.menuElement1), {}, {
|
|
11243
11244
|
selected: this._selectedMenuKeys[0]
|
|
@@ -11357,45 +11358,65 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11357
11358
|
}
|
|
11358
11359
|
return path.join('/') + (searchParams.size ? '?' + searchParams.toString() : '');
|
|
11359
11360
|
}
|
|
11361
|
+
|
|
11362
|
+
/**
|
|
11363
|
+
* Get the keys of the menu items that are selected by the given path.
|
|
11364
|
+
* @param menu the menu to search in
|
|
11365
|
+
* @param path the path to the selected menu item
|
|
11366
|
+
*/
|
|
11360
11367
|
}, {
|
|
11361
11368
|
key: "keysFormPath",
|
|
11362
11369
|
value: function keysFormPath(menu, path) {
|
|
11363
11370
|
var selectedkeys = [];
|
|
11364
11371
|
var currentMenu = menu;
|
|
11365
11372
|
var pathParts = path.split('/').slice(1);
|
|
11366
|
-
var
|
|
11367
|
-
|
|
11368
|
-
var
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
i = _i;
|
|
11373
|
-
return 1; // break
|
|
11373
|
+
var currentKeys = [];
|
|
11374
|
+
for (var i = 0; i < pathParts.length; i++) {
|
|
11375
|
+
var _currentKeys, _currentMenuItem$item3, _currentMenuItem$subM3;
|
|
11376
|
+
var found = this.flatFindMenuItem(currentMenu, pathParts[i]);
|
|
11377
|
+
if (!found) {
|
|
11378
|
+
break;
|
|
11374
11379
|
}
|
|
11375
|
-
|
|
11376
|
-
|
|
11380
|
+
(_currentKeys = currentKeys).push.apply(_currentKeys, _toConsumableArray(found.ids));
|
|
11381
|
+
var currentMenuItem = found.item;
|
|
11382
|
+
if ((_currentMenuItem$item3 = currentMenuItem.items) !== null && _currentMenuItem$item3 !== void 0 && _currentMenuItem$item3.length) {
|
|
11383
|
+
currentMenu = currentMenuItem.items;
|
|
11384
|
+
} else if ((_currentMenuItem$subM3 = currentMenuItem.subMenu) !== null && _currentMenuItem$subM3 !== void 0 && _currentMenuItem$subM3.length) {
|
|
11377
11385
|
currentMenu = currentMenuItem.subMenu;
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
var _currentMenuItem$item4;
|
|
11381
|
-
currentMenuItem = currentMenuItem.items.find(function (element) {
|
|
11382
|
-
return element.path === pathParts[++_i];
|
|
11383
|
-
});
|
|
11384
|
-
if (!currentMenuItem) {
|
|
11385
|
-
break;
|
|
11386
|
-
}
|
|
11387
|
-
keys.unshift(currentMenuItem.id);
|
|
11388
|
-
}
|
|
11386
|
+
selectedkeys.push(currentKeys);
|
|
11387
|
+
currentKeys = [];
|
|
11389
11388
|
}
|
|
11390
|
-
selectedkeys.push(keys);
|
|
11391
|
-
i = _i;
|
|
11392
|
-
};
|
|
11393
|
-
for (var i = 0; i < pathParts.length; i++) {
|
|
11394
|
-
if (_loop3(i)) break;
|
|
11395
11389
|
}
|
|
11390
|
+
if (currentKeys.length) selectedkeys.push(currentKeys);
|
|
11396
11391
|
return selectedkeys;
|
|
11397
11392
|
}
|
|
11398
11393
|
|
|
11394
|
+
/**
|
|
11395
|
+
* Recursivly search for a menu item with the given path part.
|
|
11396
|
+
* If it is a sub menu, it is possible that the parent menu is not reflected in the path, so we have to deep search.
|
|
11397
|
+
*/
|
|
11398
|
+
}, {
|
|
11399
|
+
key: "flatFindMenuItem",
|
|
11400
|
+
value: function flatFindMenuItem(menu, pathPart) {
|
|
11401
|
+
var ids = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
11402
|
+
for (var i = 0; i < menu.length; i++) {
|
|
11403
|
+
var item = menu[i];
|
|
11404
|
+
if (item.path === pathPart) {
|
|
11405
|
+
return {
|
|
11406
|
+
ids: [item.id].concat(_toConsumableArray(ids)),
|
|
11407
|
+
item: item
|
|
11408
|
+
};
|
|
11409
|
+
}
|
|
11410
|
+
if (item.items) {
|
|
11411
|
+
var found = this.flatFindMenuItem(item.items, pathPart, [item.id].concat(_toConsumableArray(ids)));
|
|
11412
|
+
if (found) {
|
|
11413
|
+
return found;
|
|
11414
|
+
}
|
|
11415
|
+
}
|
|
11416
|
+
}
|
|
11417
|
+
return null;
|
|
11418
|
+
}
|
|
11419
|
+
|
|
11399
11420
|
/**
|
|
11400
11421
|
* Get the menu items to be displayed in the menu, in the correct format for the antd menu.
|
|
11401
11422
|
*
|
|
@@ -12648,8 +12669,8 @@ var _default$1 = /*#__PURE__*/function () {
|
|
|
12648
12669
|
var storeContext = /*#__PURE__*/createContext(null);
|
|
12649
12670
|
var StoreProvider = function StoreProvider(_ref) {
|
|
12650
12671
|
var children = _ref.children,
|
|
12651
|
-
settings = _ref.settings
|
|
12652
|
-
|
|
12672
|
+
settings = _ref.settings;
|
|
12673
|
+
_ref.isVisible;
|
|
12653
12674
|
var _useDivaCore = useDivaCore(),
|
|
12654
12675
|
_useDivaCore$state = _useDivaCore.state,
|
|
12655
12676
|
jwt = _useDivaCore$state.jwt,
|
|
@@ -12674,7 +12695,6 @@ var StoreProvider = function StoreProvider(_ref) {
|
|
|
12674
12695
|
_useState2 = _slicedToArray(_useState, 1),
|
|
12675
12696
|
store = _useState2[0];
|
|
12676
12697
|
useEffect(function () {
|
|
12677
|
-
if (!isVisible) return;
|
|
12678
12698
|
store.updateNavigationState({
|
|
12679
12699
|
searchParams: searchParams,
|
|
12680
12700
|
path: location.pathname
|
|
@@ -12682,7 +12702,7 @@ var StoreProvider = function StoreProvider(_ref) {
|
|
|
12682
12702
|
store.dataStore.setUserData(jwt, nToken, user);
|
|
12683
12703
|
store.dataStore.setOrganizationData(organization);
|
|
12684
12704
|
store.configurationStore.setConfiguration(settings, apiConfig, t, i18n.language);
|
|
12685
|
-
}, [jwt, nToken, user, organization, settings, apiConfig, i18n.language
|
|
12705
|
+
}, [jwt, nToken, user, organization, settings, apiConfig, i18n.language]);
|
|
12686
12706
|
useEffect(function () {
|
|
12687
12707
|
store.updateHandlers(handler);
|
|
12688
12708
|
}, [handler]);
|
|
@@ -28827,12 +28847,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
28827
28847
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28828
28848
|
var LOG = getLogger('Backoffice', 'Index');
|
|
28829
28849
|
var Main = function Main(props) {
|
|
28830
|
-
var _useDivaCore = useDivaCore();
|
|
28831
|
-
_useDivaCore.handler;
|
|
28832
28850
|
useEffect(function () {
|
|
28833
28851
|
LOG.debug('Initial render of backoffice');
|
|
28834
|
-
// UtilStore.setArViewerSettings(handler);
|
|
28835
28852
|
}, []);
|
|
28853
|
+
if (!props.isVisible) return null;
|
|
28836
28854
|
return /*#__PURE__*/jsx(BrowserRouter, {
|
|
28837
28855
|
basename: "/backoffice",
|
|
28838
28856
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
@@ -38,7 +38,17 @@ export default class {
|
|
|
38
38
|
*/
|
|
39
39
|
private fillSelectedUntilFistLeaf;
|
|
40
40
|
private getPath;
|
|
41
|
+
/**
|
|
42
|
+
* Get the keys of the menu items that are selected by the given path.
|
|
43
|
+
* @param menu the menu to search in
|
|
44
|
+
* @param path the path to the selected menu item
|
|
45
|
+
*/
|
|
41
46
|
private keysFormPath;
|
|
47
|
+
/**
|
|
48
|
+
* Recursivly search for a menu item with the given path part.
|
|
49
|
+
* If it is a sub menu, it is possible that the parent menu is not reflected in the path, so we have to deep search.
|
|
50
|
+
*/
|
|
51
|
+
private flatFindMenuItem;
|
|
42
52
|
/**
|
|
43
53
|
* Get the menu items to be displayed in the menu, in the correct format for the antd menu.
|
|
44
54
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentStore.d.ts","sourceRoot":"","sources":["../../../../../src/store/ContentStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA6B,MAAM,6BAA6B,CAAC;AAIlF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,OAAO;IASA,OAAO,CAAC,IAAI;IARxB,OAAO,CAAC,MAAM,CAC8F;IAC5G,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,aAAa,CAAC,CAAc;IACpC,OAAO,CAAC,aAAa,CAAC,CAAc;IACpC,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GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;IAc1E,uBAAuB,CAAC,GAAG,EAAE,MAAM;IAInC,IAAI,sBAAsB,IAAI;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAEpE;IAED,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW;IAKxC,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;QAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,CAAC,EAAE,IAAI;IA8BjG,uBAAuB,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM;IAWjD;;;;;;;;;OASG;IACH,OAAO,CAAC,yBAAyB;IAejC,OAAO,CAAC,OAAO;IAiCf;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAwBpB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAgBxB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAyBnB;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;CAa/B;AAED,eAAO,MAAM,IAAI,EAAE,QAAQ,EAkd1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/store/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA+B,MAAM,0BAA0B,CAAC;AACvF,OAAO,KAA6C,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,SAAS,MAAM,aAAa,CAAC;AAIpC,eAAO,MAAM,aAAa;cAKd,MAAM,YAAY;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/store/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA+B,MAAM,0BAA0B,CAAC;AACvF,OAAO,KAA6C,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,SAAS,MAAM,aAAa,CAAC;AAIpC,eAAO,MAAM,aAAa;cAKd,MAAM,YAAY;iBAyB7B,CAAC;AAEF,eAAO,MAAM,QAAQ,iBAMpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "24.8.0-beta.
|
|
3
|
+
"version": "24.8.0-beta.14",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^5.15.0",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@ant-design/icons": "5.0.1",
|
|
17
17
|
"@babel/runtime": "7.18.0",
|
|
18
|
-
"@crystaldesign/spreadsheet": "24.8.0-beta.
|
|
18
|
+
"@crystaldesign/spreadsheet": "24.8.0-beta.14",
|
|
19
19
|
"@google/model-viewer": "3.4.0",
|
|
20
20
|
"@tinymce/tinymce-react": "^3.13.0",
|
|
21
21
|
"ag-charts-community": "^9.3.1",
|
|
@@ -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": "a79985d30a408d24d698c83dcf858b57333e66dd"
|
|
55
55
|
}
|