mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-11 10:47:27 +03:00
16 lines
659 B
TypeScript
16 lines
659 B
TypeScript
import { useTimeoutToggle } from '@shlinkio/shlink-frontend-kit';
|
|
import type Bottle from 'bottlejs';
|
|
import { csvToJson, jsonToCsv } from '../helpers/csvjson';
|
|
import { LocalStorage } from './LocalStorage';
|
|
import { TagColorsStorage } from './TagColorsStorage';
|
|
|
|
export const provideServices = (bottle: Bottle) => {
|
|
bottle.constant('localStorage', window.localStorage);
|
|
bottle.service('Storage', LocalStorage, 'localStorage');
|
|
bottle.service('TagColorsStorage', TagColorsStorage, 'Storage');
|
|
|
|
bottle.constant('csvToJson', csvToJson);
|
|
bottle.constant('jsonToCsv', jsonToCsv);
|
|
|
|
bottle.serviceFactory('useTimeoutToggle', () => useTimeoutToggle);
|
|
};
|