@humandialog/forms.svelte 1.7.23 → 1.7.24

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/utils.d.ts +3 -3
  3. package/utils.js +7 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "1.7.23",
3
+ "version": "1.7.24",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",
package/utils.d.ts CHANGED
@@ -38,13 +38,13 @@ export function randomString(len: any): string;
38
38
  export function isOnNavigationPage(navKind: any): boolean;
39
39
  export function pushNavigationPage(navKind: any): void;
40
40
  export function popNavigationPage(): void;
41
- export function navGetMode(): number;
42
- export function navIsVisible(): boolean | undefined;
41
+ export function navGetMode(): 1 | 0;
42
+ export function navIsVisible(): boolean;
43
43
  export function navGetKey(): any;
44
44
  export function navShow(key: any): void;
45
45
  export function navHide(): void;
46
46
  export function navToggle(key: any): void;
47
- export function navPrevVisibleKey(): string | undefined;
47
+ export function navPrevVisibleKey(): string;
48
48
  export function navAutoHide(): void;
49
49
  export function isValidEmail(e: any): boolean;
50
50
  export function setSelectionAtEnd(element: any): void;
package/utils.js CHANGED
@@ -947,16 +947,14 @@ export function popNavigationPage()
947
947
  export const NAV_MODE_SIDEBAR = 0
948
948
  export const NAV_MODE_FULL_PAGE = 1
949
949
 
950
- let navMode = isDeviceSmallerThan("sm") ? NAV_MODE_FULL_PAGE : NAV_MODE_SIDEBAR
951
-
952
950
  export function navGetMode()
953
951
  {
954
- return navMode;
952
+ return isDeviceSmallerThan("sm") ? NAV_MODE_FULL_PAGE : NAV_MODE_SIDEBAR;
955
953
  }
956
954
 
957
955
  export function navIsVisible()
958
956
  {
959
- switch(navMode)
957
+ switch(navGetMode())
960
958
  {
961
959
  case NAV_MODE_SIDEBAR:
962
960
  return get(main_sidebar_visible_store) != '*'
@@ -968,7 +966,7 @@ export function navIsVisible()
968
966
 
969
967
  export function navGetKey()
970
968
  {
971
- switch(navMode)
969
+ switch(navGetMode())
972
970
  {
973
971
  case NAV_MODE_SIDEBAR:
974
972
  return get(main_sidebar_visible_store)
@@ -987,7 +985,7 @@ export function navGetKey()
987
985
 
988
986
  export function navShow(key)
989
987
  {
990
- switch(navMode)
988
+ switch(navGetMode())
991
989
  {
992
990
  case NAV_MODE_SIDEBAR:
993
991
  show_sidebar(key)
@@ -1001,7 +999,7 @@ export function navShow(key)
1001
999
 
1002
1000
  export function navHide()
1003
1001
  {
1004
- switch(navMode)
1002
+ switch(navGetMode())
1005
1003
  {
1006
1004
  case NAV_MODE_SIDEBAR:
1007
1005
  hide_sidebar()
@@ -1030,7 +1028,7 @@ export function navToggle(key)
1030
1028
 
1031
1029
  export function navPrevVisibleKey()
1032
1030
  {
1033
- switch(navMode)
1031
+ switch(navGetMode())
1034
1032
  {
1035
1033
  case NAV_MODE_SIDEBAR:
1036
1034
  if(!previously_visible_sidebar)
@@ -1053,7 +1051,7 @@ export function navPrevVisibleKey()
1053
1051
 
1054
1052
  export function navAutoHide()
1055
1053
  {
1056
- switch(navMode)
1054
+ switch(navGetMode())
1057
1055
  {
1058
1056
  case NAV_MODE_SIDEBAR:
1059
1057
  auto_hide_sidebar()