Repository navigation
Home
Welcome to the wiki of Selldone® Core (@selldone/core-js), the foundation TypeScript library of Selldone Business OS. It contains the typed models (shops, products, orders, customers, vendors…), enums and catalogs (currencies, languages, product types, route names…), helpers (prices, dates, URLs, local storage…) and the API base classes that every Selldone SDK, component and app shares. If you build a storefront, a dashboard or your own Selldone API client, this is the package that gives you correct types and ready-made utilities.
- New to Selldone Core? Read Getting Started.
- Looking for a type such as
ProductorBasket? See Models and Types. - Need a currency, a language or a route name? See Enums.
- Want to format a price or a date? See Helpers and Utilities.
- Building an API client or wondering what
SetupService,CDNorGAPIdo? See Server and APIs.
import { SelldoneCore, CurrencyHelper } from "@selldone/core-js";
import { Currency } from "@selldone/core-js/enums/payment/Currency";
SelldoneCore.Setup(); // reads meta tags, prepares window.CDN, window.GAPI, window.$selldone…
Currency.EUR.unicode; // "€"
CurrencyHelper.ConvertToString(100.5, "EUR", "de-DE"); // "100,50 €"
window.$selldone.gapi.fetchCountries().then((countries) => console.log(countries.length));| Page | What you'll learn |
|---|---|
| Getting Started | Install, required meta tags, SelldoneCore.Setup(), import paths. |
| Models and Types | How models are organized, class/namespace pattern, the most-used models, shared types. |
| Enums | Currencies, languages, product and order types, statuses, route names and other catalogs. |
| Helpers and Utilities |
helper/, utils/, prototypes/ and TimeSeries, with examples. |
| Server and APIs |
SetupService, CDN, URLS, GAPI, APIAbstract (cache, cancellation) and Gapi. |
| FAQ | Common questions and troubleshooting. |
| Folder | Contents |
|---|---|
models/ |
About 100 typed models: shop, product, variant, category, basket, bill, customer, user, vendor, coupon, offer, cashback, lottery, gift card, article, community… |
enums/ |
153 currencies, 99 languages, product and order types, transaction statuses, permissions, business models, route names… |
helper/ |
PriceHelper, CurrencyHelper, DateConverter, NumberHelper, ShopURLs, StorefrontLocalStorages, LRUCache, CSV formats, SEO, maps, colors… |
server/ |
SetupService, APIAbstract, CDN, URLS, GAPI. |
gapi/ |
Gapi client available as window.$selldone.gapi. |
utils/ |
Cookie, console.style, Slugify, debounceSearch, file, scroll, theme and image helpers, service worker. |
prototypes/ |
Array, String, Number and Element extensions. |
timeserie/ |
TimeSeries for analytics dashboards. |
types/ |
Shared type definitions. |
Selldone Core is the base layer of the Selldone front-end stack. The Storefront SDK, Backoffice SDK, Vendor SDK and Community SDK extend its APIAbstract class and return its models. Components, the Page Builder and the Storefront render those models with its helpers.
-
storefront-sdk — Customer-facing API client (
window.$storefront) (wiki). -
backoffice-sdk — Admin API client (
window.$backoffice) (wiki). - vendor-sdk — Marketplace vendor panel API client.
- community-sdk — Community API client.
- components — Vue 3 commerce components (wiki).
- storefront — Production Vue 3 storefront (wiki).
- translate — Translations for the i18n keys used by Core enums.
