1.39.4 • Published 1 month ago

@vizabi/shared-components v1.39.4

Weekly downloads
-
License
CC-BY-4.0
Repository
-
Last release
1 month ago

vizabi shared components

Contains handy but not necessary things for making data visualisations in vizabi framework Hosts the shared functionality as described below:

Components

Components are classes, which are instansiated in a tree structure

Helpers

Helpers are context dependant classes, that are kind of like components, but i can't formulate the difference really

Utils

Utils are handy functions that do not retain their own state Utils are shared between all components, services and helpers

Services

Services are singleton instances, that are available through the entire component tree

Init services in your root component (tool) constructor like so:

config.services = {
  locale: new LocaleService(),
  layout: new LayoutService(config)
};

//register locale service in the marker model
config.model.config.data.locale = config.services.locale;

Then, from any component you can have access to this.services.locale or this.services.layout.

Locale service

Loads the locale settings (see section "assets") asynchronously during setup, sets status to ready when done

const locale = this.services.locale;

locale.content //access locale settings directly locale.id //observable id of the current locale locale.isRTL //returns rtl setting from content

//formatters locale.getFormattedNumber(456454644) //"456M" locale.getFormattedDate(new Date()) //"2019" locale.getUIstring("buttons/apply") //"Apply"

//convenience method locale.auto(this.MDL.frame.interval);

Layout service

Assets

Locale settings, Currency signs, rtl languages, Translation strings

Live in assets/locale Accessible via locale service (see section "locale service")

Icons

Live in assets/icons/iconset.js

import { ICON_CLOSE as iconClose } from "../../icons/iconset";
divSelection
  .html(iconClose)
import { Icons } from "@vizabi/shared-components";
const {ICON_LOCK, ICON_UNLOCK} = Icons;
divSelection
  .html(iconset[locked ? "ICON_LOCK" : "ICON_UNLOCK"]);
1.39.4

1 month ago

1.39.2

3 months ago

1.39.1

3 months ago

1.39.0

3 months ago

1.38.2

4 months ago

1.37.0

4 months ago

1.38.0

4 months ago

1.38.1

4 months ago

1.36.2

5 months ago

1.36.1

5 months ago

1.35.3

5 months ago

1.36.0

5 months ago

1.35.2

5 months ago

1.35.1

5 months ago

1.33.1

10 months ago

1.35.0

5 months ago

1.34.0

8 months ago

1.34.1

8 months ago

1.33.0

11 months ago

1.32.5

12 months ago

1.32.2

12 months ago

1.32.3

12 months ago

1.28.3-index

1 year ago

1.29.1

1 year ago

1.32.0

12 months ago

1.32.1

12 months ago

1.30.0

1 year ago

1.30.1

1 year ago

1.28.3-index2

1 year ago

1.28.1

1 year ago

1.28.3

1 year ago

0.0.1

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.7

1 year ago

1.31.0

1 year ago

0.0.6

1 year ago

1.27.0

1 year ago

1.26.2

1 year ago

1.26.0

2 years ago

1.26.1

2 years ago

1.25.0

2 years ago

1.24.1

2 years ago

1.25.1

2 years ago

1.24.2

2 years ago

1.24.0

2 years ago

1.23.3

2 years ago

1.23.0

2 years ago

1.23.1

2 years ago

1.22.1

2 years ago

1.22.0

2 years ago

1.21.2

2 years ago

1.20.3

2 years ago

1.21.0

2 years ago

1.20.1

2 years ago

1.21.1

2 years ago

1.20.2

2 years ago

1.20.0

2 years ago

1.19.1

3 years ago

1.19.0

3 years ago

1.18.4

3 years ago

1.18.2

3 years ago

1.18.1

3 years ago

1.18.0

3 years ago

1.17.4

3 years ago

1.17.3

3 years ago

1.17.2

3 years ago