Socket
Socket
Sign inDemoInstall

@sap-devx/controls-navigator

Package Overview
Dependencies
285
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @sap-devx/controls-navigator

Navigator control


Version published
Weekly downloads
3
decreased by-25%
Maintainers
3
Created
Weekly downloads
 

Changelog

Source

3.0.6 (2024-04-15)

Bug Fixes

  • test (6dcf582)

Readme

Source

CircleCI Coverage Status Language grade: JavaScript Commitizen friendly GitHub license REUSE status dependentbot

Navigator Control --- stepper style

alt text

Navigator Control --- tab style

alt text

Description

Navigator is a navigation control . It can display the groups in a way like wizard steps or tabs control

Anatomy

alt text

Control Properties

  • navigationType
    It can be two values:

    • “tab“ : It is a navigation control like tab control. Each group is linkable. It is default value.
    • “stepper”: it is like wizard stepper control that force a user to move linearly through your groups
  • prompt-index
    It is the current group index(zero based)

  • prompts
    It is the groups array, for example:

  [{name:”database”},{name:”authorization”}]
  • prompt-answers
    It is only for “stepper” navigation type. It is a group summarization, for example:
  {
    promptName:”group1”,
    answers:[
            {
              "label":"prop1",
              "value":"value1",
              "type":"warning",
            },
            {
              "label":"prop1",
              "value":"value1"
            }
      ]
  }
  • All-answers
    It is only for “tab” navigation type. It is initially all the groups summaries. For example:
  {
        "group1":[
            {
              "label":"prop1",
              "value":"value1"
            },
            {
              "label":"prop1",
              "value":"value1"
            }
          ],
          "group2":[
            {
              "label":"prop1",
              "value":"value1"
            }
          ]
  }

Control Event

  • on-goto-step
    When click a group title, this event is emitted .
    • For "tab" type, the event is emitted with group index parameter(zero based).
    • For "stepper" type, the event is emitted with number of steps to go back.

Usage

If writing a Vue application, simply add the following line to your <template> tag:

<NavigatorControl
  :prompt-index="promptIndex"
  :prompts="prompts"
  :all-answers=" allAnswers "
  :prompt-answers="{}"
  navigation-type="tab"
  @on-goto-step="gotoStep"
/>

The properties values looks like the following:

{
  promptIndex:0,
  prompts:[{name: "group1"},{name:"group2"}],
  allAnswers:{
    group1:[
      {label:"akey1", value: "aType"},
      {label:"akey2", value: "a", type: "warning"}
    ],
    group2:[
      {label:"bkey1", value: "bType"},
      {label:"", value: "b"}
    ]
  },
  promptAnswers:{},
  navigationType:"tab"
}

Import the control:

import NavigatorControl from "@sap-devx/controls-navigator";
const naviOptions = { vuetify };
app.use(NavigatorControl, naviOptions);

Import the css file:

import "@sap-devx/controls-navigator/dist/navigator-control.css";

Style overide

  • Override “group title” and “group avatar” styles

alt text

  • Override style for specific navigator type

    • For tab style
      alt text

    • For stepper style
      alt text

  • Override “group summary” styles

alt text

How to obtain support

To get more help, support and information please open a github issue.

Contributing

Contributing information can be found in the CONTRIBUTING.md file.

FAQs

Last updated on 17 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc