@plumtreesystems/utils
Plum tree systems utils
Instalation
Add module
yarn add @plumtreesystems/utils
Add types definition to tsconfig.json file if necessary
"typeRoots": [
"./node_modules/@plumtreesystems/utils/dist/esm/@types"
],
For Jest to understand modules add to jest.config.js file
transformIgnorePatterns: ['/node_modules/(?!@plumtreesystems)'],
Utils
Browser detector
Initiated BrowserDetector class.
import BrowserDetector from '@plumtreesystems/utils';
Currency prefix
CurrencyPrefix uninitiated class.
import CurrencyPrefix from '@plumtreesystems/utils';
new CurrencyPrefix(countryOptions);
Params:
countryOptions: Object<{key: value}>
Date manager
DateManager uninitiated class.
import DateManager from '@plumtreesystems/utils';
new DateManager(dateFormat, timeFormat);
Params:
dateFormat: string = 'YYYY-MM-DD'timeFormat: string = 'HH:mm'
File downloader
Function for file downloading
import fileDownload from '@plumtreesystems/utils';
File helper
FilesHelper initiated class.
import { FilesHelper, AssetCategoryType, AssetStatsType, AssetType } from '@plumtreesystems/utils';
Hydra
Uninitiated Hydra pagination object and types.
import { Hydra, HydraObjectType, HydraPaginationType, HydraViewObjectType, PageFilterType } from '@plumtreesystems/utils';
new Hydra(hydraObject);
Params:
hydraObject: HydraObjectType
Image tools
ImageTools initiated class.
import ImageTools from '@plumtreesystems/utils';
Impersonator
Impersonator initiated class. Handle impersonation token actions with local storage.
import Impersonator from '@plumtreesystems/utils';
Local storage manager
LocalStorageManager uninitiated class.
import LocalStorageManager from '@plumtreesystems/utils';
new LocalStorageManager(storeVersion, excludedModules);
Params:
storeVersion: stringexcludedModules: string[]
Mocked date manager
MockedDateManager uninitiated class.
import MockedDateManager from '@plumtreesystems/utils';
new MockedDateManager(currentDate);
Params:
currentDate: string = '2020-08-08 08:00'
Object processor
ObjectProcessor initiated class.
import ObjectProcessor from '@plumtreesystems/utils';
Pagination helper
PaginationHelper initiated class.
import PaginationHelper from '@plumtreesystems/utils';
Request cache
RequestCache initiated class and types.
import { RequestCache, RequestCacheFormatType, SetCachedRequestParametersType } from '@plumtreesystems/utils';
Response error processor
ResponseErrorsProcessor uninitiated class, errorsFormatter function and error types.
import { ResponseErrorsProcessor, errorsFormatter, ErrorType, ErrorsObjectType } from '@plumtreesystems/utils';
new ResponseErrorsProcessor(registerError)
Params:
registerError: (e: any) => any
Scroll to top
scrollToTop function.
import scrollToTop from '@plumtreesystems/utils';
Types overwrite
OverwriteType type to overwrite existing types.
import OverwriteType from '@plumtreesystems/utils';
Url tools
UrlTools initiated class.
import UrlTools from '@plumtreesystems/utils/src/url-tools';
Vuex module decorators
CustomAction function witch overrides default action parameters.
import { CustomAction } from '@plumtreesystems/utils';
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.3.4 | ^2.6.14 | MIT | |
| 1.3.3 | ^2.6.14 | MIT | |
| 1.3.2 | ^2.6.14 | MIT | |
| 1.3.1 | ^2.6.14 | MIT | |
| 1.3.0 | ^2.6.14 | MIT | |
| 1.2.8 | ^2.6.14 | MIT | |
| 1.2.7 | ^2.6.14 | MIT | |
| 1.2.6 | ^2.6.14 | MIT | |
| 1.2.5 | ^2.6.14 | MIT | |
| 1.2.4 | ^2.6.14 | MIT | |
| 1.2.3 | ^2.6.14 | MIT | |
| 1.2.2 | ^2.6.14 | MIT | |
| 1.2.1 | ^2.6.14 | MIT | |
| 1.2.0 | ^2.6.14 | MIT | |
| 1.1.7 | ^2.6.14 | MIT | |
| 1.1.6 | ^2.6.14 | MIT | |
| 1.1.5 | ^2.6.14 | MIT | |
| 1.1.4 | ^2.6.14 | MIT | |
| 1.1.3 | ^2.6.14 | MIT | |
| 1.1.2 | ^2.6.14 | MIT | |
| 1.1.1 | ^2.6.14 | MIT | |
| 1.1.0 | ^2.6.14 | MIT | |
| 1.0.65 | ^2.6.14 | MIT | |
| 1.0.64 | ^2.6.14 | MIT | |
| 1.0.63 | ^2.6.14 | MIT | |
| 1.0.62 | ^2.6.14 | MIT | |
| 1.0.61 | ^2.6.14 | MIT | |
| 1.0.60 | ^2.6.14 | MIT | |
| 1.0.59 | ^2.6.14 | MIT | |
| 1.0.58 | ^2.6.14 | MIT |
Showing the latest 30 of 83. See every release on npm