@datapos/datapos-shared
v0.3.260
Published
A TypeScript library containing common declarations and utilities used across other Data Positioning repositories.
Downloads
12,907
Readme
Data Positioning Shared Library
A TypeScript library containing common declarations and utilities used across other Data Positioning repositories.
Requirements
Ensure your environment meets the following prerequisites before using this library:
- Node.js version
>=22.0.0, - npm version
>=11.0.0, - A Unix-like shell (for command shortcuts, e.g.,
bash,zsh, or Git Bash on Windows), - Access to the npm registry and GitHub for publishing and syncing.
Installation
Install as a production dependency:
npm install @datapos/datapos-sharedCreate .npmrc with access token. Access token needs to disable 2FA and allow all access.
registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=<ACCESS TOKEN>Declarations
This package provides constants, errors, types/interfaces and utilities used by Data Positioning modules.
Modules
The Data Positioning solution consists of the following modules. All modules, except App, extend the base type Module.
| Type | Dynamic | Notes | | --------- | :-----: | --------------------------------------------------------------- | | App | | Implements the data positioning web application. | | Engine | ✔ | Implements the data positioning engine. | | Connector | ✔ | Implements a connector which handles one or more connections. | | Context | ✔ | Implements a context which defines one or more models. | | Presenter | ✔ | Implements a presenter which renders one or more presentations. | | Tool | ✔ | Implements... |
Components
Each module implements a set of components. All module component types extend the base component types.
| Types | Notes | | ------------------------------- | ------------------------------------------------------------ | | Component | The Component type serves as a base type for all components. | | ComponentRef | | | ComponentStatus | | | ComponentStatusId | | | ComponentTypeId | | | StatusColorId | |
Connector Module Components
| Item | Notes | | --------------------------------------- | ----------------------------------------------------------------- | | Connector Types | Connector types. The Connector type extends the Component type. | | Connection Types | Connection types. The Connection type extends the Component type. |
Context Module Components
| Item | Notes | | ---------------------------------------- | ------------------------------------------------------------------- | | Context Types | Context types. The Context type extends the Component type. | | Data View Types | DataView types. The DataView type extends the Component type. | | Dimension Types | Dimension types. The Dimension type extends the Component type. | | Engine Types | Engine types. | | Event Query Types | Event Query types. The Event Query type extends the Component type. |
Engine Module Components
| Item | Notes | | ---------------------------------- | ------------- | | Engine Types | Engine types. |
Presenter Module Components
| Item | Notes | | ------------------------------------------- | --------------------------------------------------------------------- | | Presenter Types | Presenter types. The Presenter type extends the Component type. | | Presentation Types | Presentation types. The Presentation type extends the Component type. |
Composables
Constants
Errors
Utilities
Usage
Import the library in your TypeScript project:
import { type ConnectorConfig, getComponentStatus } from '@datapos/datapos-shared';
// Example type usage.
let connectorConfig: ConnectorConfig;
// Example function usage.
getComponentStatus('alpha');Repository Common Management Commands
The table below lists the repository management commands available in this project.
For detailed implementation, see the scripts section in the package.json file.
| Name | Key Code | Notes |
| ------------------ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
| build | alt+ctrl+shift+b | Build the package using Vite. Output to '/dist' directory. |
| bump:version | alt+ctrl+shift+v | Increment patch version number by 1. |
| check | alt+ctrl+shift+c | Identify outdated dependencies using npm outdated and npm-check-updates with option to install latest versions. Also runs retire scanner. |
| document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See LICENSES.json. |
| format | alt+ctrl+shift+f | Use prettierto enforce formatting style rules. |
| lint | alt+ctrl+shift+l | Use eslintto check the code for potential errors and enforces coding style rules. |
| publish:toNPM | alt+ctrl+shift+p | Publish the package to npm. |
| release | alt+ctrl+shift+r | Bump version, build library, synchronise with GitHub and publish to npm. |
| send:deployNotice | alt+ctrl+shift+n | ❌ Not implemented. |
| sync:withGitHub | alt+ctrl+shift+s | Synchronise local repository with the main GitHub repository. |
| test | alt+ctrl+shift+t | ❌ Not implemented. |
| update:dataPosDeps | alt+ctrl+shift+u | Install the latest version of all Data Positioning dependencies. |
Compliance
The following badge reflects FOSSA's assessment of this repository's open-source license compliance.
License
MIT © 2026 Data Positioning Pty Ltd
