@kodaris/krubble-app-components 1.0.6 → 1.0.8
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/dist/krubble-app.bundled.js +10 -15
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +2 -2
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +13 -18
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +2 -2
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/dist/scaffold.d.ts +0 -4
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +10 -15
- package/dist/scaffold.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KRContextMenu, KRDialog } from '@kodaris/krubble-components';
|
|
2
|
-
import {
|
|
2
|
+
import { KRHttp } from '@kodaris/krubble-http';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
@@ -1192,10 +1192,6 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
1192
1192
|
let KRScaffold = class KRScaffold extends i$1 {
|
|
1193
1193
|
constructor() {
|
|
1194
1194
|
super();
|
|
1195
|
-
/**
|
|
1196
|
-
* HTTP client for API calls
|
|
1197
|
-
*/
|
|
1198
|
-
this.http = KRClient.getInstance();
|
|
1199
1195
|
/**
|
|
1200
1196
|
* Default icon for nav items without an icon (shown at top level)
|
|
1201
1197
|
*/
|
|
@@ -1245,10 +1241,7 @@ let KRScaffold = class KRScaffold extends i$1 {
|
|
|
1245
1241
|
updated(changedProperties) {
|
|
1246
1242
|
super.updated(changedProperties);
|
|
1247
1243
|
if (changedProperties.has('nav') && this.nav.length > 0) {
|
|
1248
|
-
|
|
1249
|
-
if (this.activeNavItemId === null) {
|
|
1250
|
-
this.updateActiveNavItem();
|
|
1251
|
-
}
|
|
1244
|
+
this.updateActiveNavItem();
|
|
1252
1245
|
if (this.navExpanded && !this.navInitialized) {
|
|
1253
1246
|
this.navInitialized = true;
|
|
1254
1247
|
this.getComputedNav()
|
|
@@ -1558,13 +1551,14 @@ let KRScaffold = class KRScaffold extends i$1 {
|
|
|
1558
1551
|
const url = this.pref.uuid
|
|
1559
1552
|
? `/api/system/preference/json/scaffold/${this.pref.uuid}?global=true`
|
|
1560
1553
|
: `/api/system/preference/json/scaffold?global=true`;
|
|
1561
|
-
|
|
1554
|
+
KRHttp.fetch({
|
|
1562
1555
|
url,
|
|
1563
1556
|
method: this.pref.uuid ? 'PUT' : 'POST',
|
|
1564
1557
|
body: JSON.stringify({ nav: this.pref.nav }),
|
|
1565
1558
|
})
|
|
1566
|
-
.then((response) =>
|
|
1567
|
-
|
|
1559
|
+
.then((response) => response.json())
|
|
1560
|
+
.then((data) => {
|
|
1561
|
+
this.pref = data.data;
|
|
1568
1562
|
this.isEditing = false;
|
|
1569
1563
|
})
|
|
1570
1564
|
.catch((error) => {
|
|
@@ -1572,12 +1566,13 @@ let KRScaffold = class KRScaffold extends i$1 {
|
|
|
1572
1566
|
});
|
|
1573
1567
|
}
|
|
1574
1568
|
loadPref() {
|
|
1575
|
-
|
|
1569
|
+
KRHttp.fetch({
|
|
1576
1570
|
url: '/api/system/preference/json/scaffold?global=true',
|
|
1577
1571
|
method: 'GET',
|
|
1578
1572
|
})
|
|
1579
|
-
.then((response) =>
|
|
1580
|
-
|
|
1573
|
+
.then((response) => response.json())
|
|
1574
|
+
.then((data) => {
|
|
1575
|
+
const pref = data?.data?.[0];
|
|
1581
1576
|
if (pref) {
|
|
1582
1577
|
this.pref = pref;
|
|
1583
1578
|
}
|