1.0.0-beta.124 • Published 6 days ago

@metaliq/navigation v1.0.0-beta.124

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

MetaliQ Core Policy: Navigation

pnpm install @metaliq/navigation

The MetaliQ Navigation policy is one of the core policies provided in the @metaliq organisation on NPM, and is sourced from the MetaliQ mono-repository on GitHub.

It provides an abstraction for the mechanism of navigation within an application space, and is designed to be flexible and extendable enough to support various navigation needs.

Data and Navigation Terms

Most apps have a logical data model, based upon the business domain and the functionality of the app itself. In Metaliq, this application data model is defined as a TypeScript type, and is generally structured in a pragmatic, information-centric manner that does not necessarily map directly to an application's navigation structure.

For this reason the navigation model in a MetaliQ app is usually defined as a separate structuxre, which is also a TypeScript type. The type structure can be nested, to enable navigation to scale both up and down. The "leaf" nodes represent pages within the navigational system, and are defined with the specific data type that is provided to that page.

Note: recurrent navigational structures (such as trees) are not supported by this policy at this time.

A MetaliQ MetaModel extends this core navigation model, including things such as; terminology labels - which can be used for menus, page headers and so on; validation elements - such as data-driven hide/show or enable/disabling of navigation options; and presentation views, used to display the target content for each node in the structure.

On start-up, this navigational structure is initialised into a Meta graph.

The navigation policy provides further MetaModel terms, including route, which takes a Route object that associates the "page" with a URL pattern with type-safe parameter parsing, browser history integration and deep-linking.

The navigation policy also provides terms to support the navigation flow such as onEnter, onLeave, each of which is a MetaFn for the specified type. These functions provide a granular way for applications to provision data loading, integration tasks and so on.

There is also the term onNavigate. Unlike the onEnter and onLeave terms, which are specified at the navigation leaf level, onNavigate is set on the navigation parent. It provides the general mechanism that should be used for navigating around the application, and any navigation parent (which is any level within the navigation hierarchy that needs to maintain a current selection) should have an onNavigate term. This policy provides the standard setNavSelection

Additional terms can be supplied by specialised navigation models, such as sequential (for a wizard-like flow with additional inline validation and terminology for previous and next actions) or adventure (allowing movement along any of a node's connected edges).

Navigation View Components

A navigation component is defined as a MetaView for the data type of the whole navigation structure. In some cases it can be helpful to build views that target a specific structure, particularly where different levels of sub-navigation across nested hierarchies should be precisely configured, such as in a specialised dashboard.

But in many cases, it makes sense to use a generic navigation component that dynamically adapts to the structure with which it is provided. Examples of these are included with the navigation policy, such as a sidebar navigator which adapts to a mobile friendly version, and a wizard-style user experience.

To make your own navigation components, follow the approaches in these samples to consume and provide interaction with the navigation policy model.

1.0.0-beta.124

6 days ago

1.0.0-beta.123

29 days ago

1.0.0-beta.122

2 months ago

1.0.0-beta.121

2 months ago

1.0.0-beta.120

2 months ago

1.0.0-beta.119

2 months ago

1.0.0-beta.118

2 months ago

1.0.0-beta.117

2 months ago

1.0.0-beta.115

2 months ago

1.0.0-beta.116

2 months ago

1.0.0-beta.114

2 months ago

1.0.0-beta.113

2 months ago

1.0.0-beta.112

2 months ago

1.0.0-beta.111

2 months ago

1.0.0-beta.110

3 months ago

1.0.0-beta.109

3 months ago

1.0.0-beta.108

3 months ago

1.0.0-beta.107

3 months ago

1.0.0-beta.106

3 months ago

1.0.0-beta.104

3 months ago

1.0.0-beta.105

3 months ago

1.0.0-beta.103

3 months ago

1.0.0-beta.102

4 months ago

1.0.0-beta.101

4 months ago

1.0.0-beta.100

4 months ago

1.0.0-beta.99

4 months ago

1.0.0-beta.98

5 months ago

1.0.0-beta.96

5 months ago

1.0.0-beta.95

6 months ago

1.0.0-beta.93

6 months ago

1.0.0-beta.94

6 months ago

1.0.0-beta.91

8 months ago

1.0.0-beta.92

8 months ago

1.0.0-beta.89

8 months ago

1.0.0-beta.86

10 months ago

1.0.0-beta.87

9 months ago

1.0.0-beta.84

11 months ago

1.0.0-beta.85

10 months ago

1.0.0-beta.82

11 months ago

1.0.0-beta.80

11 months ago

1.0.0-beta.81

11 months ago

1.0.0-beta.70

1 year ago

1.0.0-beta.69

1 year ago

1.0.0-beta.77

12 months ago

1.0.0-beta.78

12 months ago

1.0.0-beta.75

1 year ago

1.0.0-beta.76

12 months ago

1.0.0-beta.73

1 year ago

1.0.0-beta.74

1 year ago

1.0.0-beta.71

1 year ago

1.0.0-beta.72

1 year ago

1.0.0-beta.79

12 months ago

1.0.0-beta.66

1 year ago

1.0.0-beta.67

1 year ago

1.0.0-beta.64

1 year ago

1.0.0-beta.65

1 year ago

1.0.0-beta.60

1 year ago

1.0.0-beta.61

1 year ago

1.0.0-beta.68

1 year ago

1.0.0-beta.55

1 year ago

1.0.0-beta.56

1 year ago

1.0.0-beta.53

1 year ago

1.0.0-beta.54

1 year ago

1.0.0-beta.51

1 year ago

1.0.0-beta.52

1 year ago

1.0.0-beta.57

1 year ago

1.0.0-beta.44

1 year ago

1.0.0-beta.42

1 year ago

1.0.0-beta.43

1 year ago

1.0.0-beta.40

1 year ago

1.0.0-beta.41

1 year ago

1.0.0-beta.48

1 year ago

1.0.0-beta.49

1 year ago

1.0.0-beta.46

1 year ago

1.0.0-beta.47

1 year ago

1.0.0-beta.50

1 year ago

1.0.0-beta.28

1 year ago

1.0.0-beta.29

1 year ago

1.0.0-beta.27

2 years ago

1.0.0-beta.31

1 year ago

1.0.0-beta.32

1 year ago

1.0.0-beta.30

1 year ago

1.0.0-beta.22

2 years ago

1.0.0-beta.23

2 years ago

1.0.0-beta.20

2 years ago

1.0.0-beta.21

2 years ago

1.0.0-beta.26

2 years ago

1.0.0-beta.24

2 years ago

1.0.0-beta.25

2 years ago

1.0.0-beta.19

2 years ago

1.0.0-beta.17

2 years ago

1.0.0-beta.18

2 years ago

1.0.0-beta.15

2 years ago

1.0.0-beta.16

2 years ago

1.0.0-beta.14

2 years ago

1.0.0-beta.13

2 years ago

1.0.0-beta.12

2 years ago

1.0.0-beta.11

2 years ago

1.0.0-beta.10

2 years ago

1.0.0-beta.9

2 years ago

1.0.0-beta.8

2 years ago

1.0.0-beta.7

2 years ago

1.0.0-beta.6

2 years ago

1.0.0-beta.3

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.1

2 years ago