@bdlite/domains 1.1.27 → 1.1.29

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.
@@ -0,0 +1,6 @@
1
+ import { createSubChannelKit } from '@bdlite/observable/es/create-observable-kit'
2
+ import { CHANNEL_NAME } from '../constants'
3
+
4
+ const { subscribe } = createSubChannelKit({ channelName: CHANNEL_NAME }, { relay: 1 })
5
+
6
+ export const subscribeLayout = subscribe
@@ -0,0 +1,6 @@
1
+ import { createSubChannelKit } from '@bdlite/observable/es/create-observable-kit'
2
+ import { MENU_ITEM_CHANNEL_NAME } from '../constants'
3
+
4
+ const { subscribe } = createSubChannelKit({ channelName: MENU_ITEM_CHANNEL_NAME }, { relay: 1 })
5
+
6
+ export const subscribeMenuItem = subscribe
@@ -0,0 +1,6 @@
1
+ import { createSubChannelKit } from '@bdlite/observable/es/create-observable-kit'
2
+ import { MENU_CHANNEL_NAME } from '../constants'
3
+
4
+ const { subscribe } = createSubChannelKit({ channelName: MENU_CHANNEL_NAME }, { relay: 1 })
5
+
6
+ export const subscribeMenu = subscribe
@@ -9,4 +9,15 @@ export const LAYOUT_MODE = {
9
9
  BOTH: 'both',
10
10
  }
11
11
  export const DEFAULT_LAYOUT_MODE = LAYOUT_MODE.HEADER
12
- export const DEFAULT_LAYOUT_DATA = { systemName: '', showFooter: false, layoutMode: DEFAULT_LAYOUT_MODE }
12
+
13
+ export const LAYOUT_THEME = {
14
+ DARK: 'dark',
15
+ LIGHT: 'light',
16
+ }
17
+ export const DEFAULT_LAYOUT_THEME = LAYOUT_THEME.DARK
18
+
19
+ export const DEFAULT_LAYOUT_DATA = {
20
+ systemName: '', showFooter: false,
21
+ theme: DEFAULT_LAYOUT_THEME,
22
+ layoutMode: DEFAULT_LAYOUT_MODE,
23
+ }
package/es/layout/menu.js CHANGED
@@ -2,7 +2,8 @@ import { isObject } from '@bdlite/strategy'
2
2
  import { createObservableKit } from '@bdlite/observable/es/create-observable-kit'
3
3
  import { MENU_CHANNEL_NAME } from './constants'
4
4
 
5
- const { getData, subscribe, publish } = createObservableKit({ menu: [] }, null, { channelName: MENU_CHANNEL_NAME })
5
+ const initialData = { menu: [], globalOpenTarget: '', isPreviewMode: false }
6
+ const { getData, subscribe, publish } = createObservableKit(initialData, null, { channelName: MENU_CHANNEL_NAME })
6
7
 
7
8
  export const subscribeMenu = subscribe
8
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bdlite/domains",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "description": "A domains entity collection library driven by @bdlite/observable",
5
5
  "keywords": [
6
6
  "DDD",
@@ -25,7 +25,7 @@
25
25
  "@bdlite/strategy": "^1.1.25"
26
26
  },
27
27
  "dependencies": {
28
- "@bdlite/helpers": "^1.1.24",
28
+ "@bdlite/helpers": "^1.1.26",
29
29
  "@bdlite/observable": "^1.1.25",
30
30
  "@bdlite/strategy": "^1.1.25"
31
31
  },
@@ -1,11 +0,0 @@
1
- import { createSubChannelKit } from '@bdlite/observable/es/create-observable-kit'
2
- import { CHANNEL_NAME, MENU_CHANNEL_NAME, MENU_ITEM_CHANNEL_NAME } from './constants'
3
-
4
- const obOptions = { relay: 1 }
5
- const layoutChannel = createSubChannelKit({ channelName: CHANNEL_NAME }, obOptions)
6
- const menuChannel = createSubChannelKit({ channelName: MENU_CHANNEL_NAME }, obOptions)
7
- const menuItemChannel = createSubChannelKit({ channelName: MENU_ITEM_CHANNEL_NAME }, obOptions)
8
-
9
- export const subscribeLayout = layoutChannel.subscribe
10
- export const subscribeMenu = menuChannel.subscribe
11
- export const subscribeMenuItem = menuItemChannel.subscribe