1.1.7 • Published 1 month ago

@zanichelli/zanichelli-appswitcher v1.1.7

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
1 month ago

Zanichelli AppSwitcher Component

Use this component to allow a user to easily navigate between Zanichelli's web applications.

Installation

Download the package by running yarn add @zanichelli/zanichelli-appswitcher

or import it in your html using Unpkg:

<script type="module" src="https://unpkg.com/@zanichelli/zanichelli-appswitcher"></script>

Albe Web Components dependency

This component requires the Albe Web Components Library. To get Albe you can:

  • install it via NPM by running yarn add @zanichelli/albe-web-components
  • include it in your app inside a script tag:
<script type="module" src="https://unpkg.com/@zanichelli/albe-web-components/dist/web-components-library/web-components-library.esm.js"></script>

Remember to also include the stylesheet:

<link type="text/css" rel="stylesheet" href="https://unpkg.com/@zanichelli/albe-web-components/www/build/web-components-library.css" />

Using custom elements

import { defineCustomElements as defineAlbeComponents, applyPolyfills } from '@zanichelli/albe-web-components/loader';
import { defineCustomElements as defineZanichelliAppswitcher } from '@zanichelli/zanichelli-appswitcher/dist/wc/loader';

applyPolyfills().then(() => {
  defineAlbeComponents();
  defineZanichelliAppswitcher();
});

return <zanichelli-appswitcher></zanichelli-appswitcher>;

Using React Bindings

import { ZanichelliAppswitcher } from '@zanichelli/zanichelli-appswitcher/dist/react';

return <ZanichelliAppswitcher/>;

Development

  • Download the repo using git clone git@bitbucket.org:zanichelli/zanichelli-appswitcher.git
  • In the project's root folder, run yarn inst
  • cd into your web-component-library folder, then run yarn build and yarn start

If you need to work with a local copy of the Albe Web Components Library:

  • Download the Albe repo using git clone git@github.com:ZanichelliEditore/design-system.git
  • In the root folder of this new project, run yarn build and then yarn link
  • In your zanichelli-appswitcher project, uncomment the import in web-component-library/src/components/zanichelli-appswitcher/zanichelli-appswitcher.tsx

To use the cookie lastVisitedHosts locally

  • add in your own file /etc/hosts 127.0.0.1 app-switcher.zanichelli.it

Testing

You can launch the available tests using yarn test.


Props & Slots

This component accepts the following props:

  • current-host: custom host name to be registered if the default is misleading.
  • env-type: defines the usage environment to retrieve the config.json, available values local, staging, production, admin, localadmin
  • user-object: the user's data as retrieved from a valid Zanichelli IDP token
  • config-object: appswitcher configuration in JSON format (needed for the configurator app)
  • offcanvas-open: whether the offcanvas should start in an already opened state (needed for the configurator app)
  • offcanvas-type: what variant of z-offcanvas should be used (needed for the configurator app)
1.1.7

1 month ago

1.1.6

2 months ago

1.1.5

3 months ago

1.1.4-RC

5 months ago

1.1.2-RC4

10 months ago

1.1.2-RC5

10 months ago

1.1.2-RC2

10 months ago

1.1.2-RC3

10 months ago

1.1.4

5 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.3-RC

10 months ago

1.1.2-RC

10 months ago

1.0.11-RC-lia2

1 year ago

1.0.11-RC-lia3

1 year ago

1.0.11-RC-lia4

1 year ago

1.0.11-RC-lia5

1 year ago

1.0.11-RC-lia

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3-RC3

1 year ago

1.0.3-rc-2

1 year ago

1.0.3-rc

1 year ago

1.0.2

1 year ago

1.0.2-rc

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.1.29-rc

1 year ago

0.1.28-RC

1 year ago

0.1.24

1 year ago

0.1.23

1 year ago

0.1.22-openTest

1 year ago

0.1.22

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.19

1 year ago

0.1.18-dstest

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago