mountain-ui 1.0.135 → 1.0.137
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/package.json +1 -1
- package/src/lib/components/User/UserDropdown.svelte +2 -2
- package/src/lib/registry/navigationRegistry/components/Navbar.svelte +1 -0
- package/src/lib/registry/navigationRegistry/registry.svelte.js +3 -2
- package/src/lib/registry/projectRegistry/createProject.js +18 -0
- package/src/routes/exemple/[project_normalized_name]/+layout.svelte +0 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mountain-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.137",
|
|
5
5
|
"description": "A comprehensive UI component library for ERP systems with field types, entities, and registry management built with Svelte",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "index.js",
|
|
@@ -6,9 +6,10 @@ function createNavigationRegistry() {
|
|
|
6
6
|
const tinyWidth = 50
|
|
7
7
|
const bigWidth = 255
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
const navbarState = writable({
|
|
10
|
-
isOpen:
|
|
11
|
-
width:
|
|
11
|
+
isOpen:false,
|
|
12
|
+
width:0,
|
|
12
13
|
})
|
|
13
14
|
|
|
14
15
|
const all = derived(store, ($navigation_element) => Object.values($navigation_element));
|
|
@@ -6,6 +6,7 @@ import { projectRegistry } from "./registry.svelte";
|
|
|
6
6
|
import { navigationRegistry } from "../navigationRegistry/registry.svelte";
|
|
7
7
|
import { registerNavigation } from "../navigationRegistry/registerNavigation";
|
|
8
8
|
import { registerWidgetTypes } from "../widgetTypeRegistry/registerWidgetTypes";
|
|
9
|
+
import { get } from "svelte/store";
|
|
9
10
|
|
|
10
11
|
export function createProject(config = {}) {
|
|
11
12
|
const project = {
|
|
@@ -107,6 +108,23 @@ export function createProject(config = {}) {
|
|
|
107
108
|
await registerNavigation()
|
|
108
109
|
|
|
109
110
|
navigationRegistry.enableNavbar()
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
const isOpen = localStorage.getItem('navbar_mountain_ui_is_open') === 'true';
|
|
114
|
+
|
|
115
|
+
if (isOpen) {
|
|
116
|
+
navigationRegistry.toggleNavbar();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
const navigation = navigationRegistry.selectNavbarState()
|
|
121
|
+
|
|
122
|
+
console.log(get(navigation));
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
navigation.subscribe((val)=>{
|
|
126
|
+
localStorage.setItem('navbar_mountain_ui_is_open', val.isOpen)
|
|
127
|
+
})
|
|
110
128
|
};
|
|
111
129
|
|
|
112
130
|
project.getPercent = () => {
|