@startinblox/cqcm-map
v6.1.0
Published
CQCM Map
Keywords
Readme
CQCM Map
Getting started
Use in production
For production usage, map is served via a CDN like JSDelivr or self-hosted. The data source attribute MUST target the /enterprises/ endpoint of the source proxy server.
<script type="module" src="https://cdn.jsdelivr.net/npm/@startinblox/core@latest/dist/index.js" defer=""></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@startinblox/cqcm-map@latest" defer=""></script>
<!-- ... -->
<solid-cqcm-map data-src="https://your-proxy-server/enterprises/"></solid-cqcm-map>Development environment
To set up the local development environment with Storybook:
npm install
npm run storybookDevelopment workflow
Localization
This project utilizes @lit/localize for internationalization.
To change the locale at runtime within an application:
// With Orbit:
window.setLocale.map((setLocale) => setLocale("your-lang-code"));
// Without Orbit:
window.setLocale("your-lang-code");To retrieve the current locale:
// With Orbit:
window.getLocale.map((locale) => console.log(locale));
// Without Orbit:
console.log(window.getLocale("your-lang-code"));Testing
# Run all tests
npm run cy:run
# Open Cypress's interface
npm run cy:openBuilding for production
# Generate localization files
npm run locale:build
# Generate Storybook documentation
npm run build-storybook
# Build the component repository
npm run build