bt-core-app 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@testing-library/vue": "^8.0.3",
42
+ "@types/localforage": "^0.0.34",
42
43
  "@types/luxon": "^3.4.2",
43
44
  "@vitejs/plugin-vue": "^5.0.4",
44
45
  "@vitest/ui": "^1.4.0",
@@ -1,19 +0,0 @@
1
- import { ShallowRef } from 'vue';
2
-
3
- export interface DoActionOptions {
4
- completionMsg?: string;
5
- confirmationMsg?: string;
6
- errorMsg?: string;
7
- loadingMsg?: string;
8
- requireConfirmation?: boolean;
9
- throwError?: boolean;
10
- }
11
- export declare function useActionsTracker(useOptions?: DoActionOptions): {
12
- actionErrorMsg: ShallowRef<string | undefined>;
13
- actionLoadingMsg: ShallowRef<string | undefined>;
14
- actionCompleteMsg: ShallowRef<string | undefined>;
15
- clearErrors: () => void;
16
- doAction: (action: any, options?: DoActionOptions) => Promise<any>;
17
- isLoading: import('vue').ComputedRef<boolean>;
18
- logError: (err?: string | Error) => void;
19
- };
@@ -1,79 +0,0 @@
1
- import { ShallowRef, ComputedRef } from 'vue';
2
- import { DoActionOptions } from '../composables/actions-tracker';
3
- import { BTApi, PathOptions } from '../composables/api';
4
- import { BTStoreDefinition } from '../composables/stores';
5
- import { BladeMode } from '../types';
6
-
7
- export type OnCanDoAsync = (item: any) => Promise<string | undefined>;
8
- export type OnDoAsync = (item: any) => Promise<string | undefined>;
9
- export type OnDoSuccessAsync = (item: any) => Promise<any>;
10
- export type OnGetAsync = (opt?: GetOptions) => Promise<any>;
11
- export type OnGetSuccessAsync = (item: any, opt?: GetOptions) => Promise<any>;
12
- export interface GetOptions extends PathOptions, DoActionOptions {
13
- /**returns an error msg if failed */
14
- onGetAsync?: OnGetAsync;
15
- /**called after get occurs successfully */
16
- onGetSuccessAsync?: OnGetSuccessAsync;
17
- store?: BTStoreDefinition;
18
- }
19
- export interface DeleteOptions extends PathOptions, DoActionOptions {
20
- /**Returns a string if cannot */
21
- onCanDeleteAsync?: OnCanDoAsync;
22
- /**Will override the default store delete action */
23
- onDeleteAsync?: OnDoAsync;
24
- /**Will open a dialog box requesting user confirmation for delete action */
25
- onDeleteSuccessAsync?: OnDoAsync;
26
- store?: BTStoreDefinition;
27
- }
28
- export interface RestoreOptions extends PathOptions, DoActionOptions {
29
- /**Returns a string if cannot */
30
- onCanRestoreAsync?: OnCanDoAsync;
31
- /**Will override the default store delete action */
32
- onRestoreAsync?: OnDoSuccessAsync;
33
- /**Called after restore succeeds */
34
- onRestoreSuccessAsync?: OnDoSuccessAsync;
35
- store?: BTStoreDefinition;
36
- }
37
- export interface SaveOptions extends PathOptions, DoActionOptions {
38
- /**will seek to post if 'new' otherwise will patch */
39
- mode?: BladeMode;
40
- /**called to check whether to proceed with save */
41
- onCanSaveAsync?: OnCanDoAsync;
42
- /**
43
- * retrieves item to save
44
- * called before seeing whether it can save
45
- */
46
- onGetSaveAsync?: OnDoSuccessAsync;
47
- /**Will override the default store post/patch action */
48
- onSaveAsync?: OnDoSuccessAsync;
49
- /**Called after save succeeds */
50
- onSaveSuccessAsync?: OnDoSuccessAsync;
51
- store?: BTStoreDefinition;
52
- }
53
- export interface ApiActionOptions extends PathOptions, DoActionOptions {
54
- api: BTApi;
55
- }
56
- export interface UseActionsOptions extends DoActionOptions {
57
- nav?: string;
58
- proxyID?: string;
59
- refresh?: boolean;
60
- store?: BTStoreDefinition;
61
- throwError?: boolean;
62
- url?: string;
63
- }
64
- export interface BTActions {
65
- apiGet: (doOptions: ApiActionOptions) => Promise<any>;
66
- apiPost: (doOptions: ApiActionOptions) => Promise<any>;
67
- actionLoadingMsg: ShallowRef<string | undefined>;
68
- actionErrorMsg: ShallowRef<string | undefined>;
69
- clearErrors: () => void;
70
- deleteItem: (doOptions: DeleteOptions) => Promise<any>;
71
- doAction: (action: any, options?: DoActionOptions) => Promise<any>;
72
- getAllItems: (doOptions: GetOptions) => Promise<any>;
73
- getItem: (doOptions: GetOptions) => Promise<any>;
74
- isLoading: ComputedRef<boolean>;
75
- logError: (err?: string | Error) => void;
76
- restoreItem: (doOptions: RestoreOptions) => Promise<any>;
77
- saveItem: (doOptions: SaveOptions) => Promise<any>;
78
- }
79
- export declare function useActions(options?: UseActionsOptions): BTActions;
@@ -1,86 +0,0 @@
1
- import { BTAuth } from './auth';
2
-
3
- export interface QueryParams {
4
- filterBy?: string;
5
- includeCount?: boolean;
6
- includeDetails?: boolean;
7
- includeInactive?: boolean;
8
- lastUpdate?: string;
9
- other?: any;
10
- properties?: string[] | string;
11
- query?: string;
12
- searchString?: string;
13
- sortOrder?: string;
14
- sortBy?: string;
15
- takeFrom?: number;
16
- takeAmount?: number;
17
- }
18
- export interface PathOptions {
19
- /**always added to end before query {url}/{additionalUrl}?{query} */
20
- additionalUrl?: string;
21
- /**application/json or other options */
22
- contentType?: string;
23
- /**that data to send in the body for POST, PATCH, and DELETE requests */
24
- data?: any;
25
- /** resulting url after building {nav | url}/{additionalUrl}?{params} */
26
- finalUrl?: string;
27
- /**override default headers */
28
- headers?: HeadersInit;
29
- /**id will be added as a url paramter (/{id}?) rather than as a query parameter */
30
- id?: string;
31
- /**where to find the url */
32
- nav?: string;
33
- /**headers will not be calculated. Only the given headers in these options will be used */
34
- overrideHeaders?: boolean;
35
- /**query parameters */
36
- params?: QueryParams;
37
- /**attaches a proxyID to the request */
38
- proxyID?: string;
39
- /**whether to refresh the store data and go straight to the server */
40
- refresh?: boolean;
41
- /**returns result as a json object. Defaults to true. */
42
- returnJson?: boolean;
43
- /**returns result as a string */
44
- returnText?: boolean;
45
- /**If false, returns response no matter the status code */
46
- throwError?: boolean;
47
- /**if exists then overrides default nav */
48
- url?: string;
49
- /**whether to preference using the local cache */
50
- useLocalCache?: boolean;
51
- }
52
- type FindPath = (navName?: string) => string | undefined;
53
- export interface UseApiOptions {
54
- auth?: BTAuth;
55
- /**overrides the default */
56
- buildHeaders?: (path: PathOptions) => HeadersInit;
57
- /**build a query. Overrides the default */
58
- buildQuery?: (params: any) => string;
59
- /**overrides the default */
60
- buildUrl?: (path: PathOptions) => string;
61
- /**defaults to 'application/json' */
62
- defaultContentType?: string;
63
- /**returns result as a json object. Defaults to true. */
64
- defaultReturnJson?: boolean;
65
- /**returns result as a string */
66
- defaultReturnText?: boolean;
67
- /**defaults to true. Will throw an error on fail */
68
- defaultThrowError?: boolean;
69
- /**defaults to a function that returns '' */
70
- findPath?: FindPath;
71
- /**if true and logged in then will set an authorization header with 'bearer [token]' */
72
- useBearerToken?: boolean;
73
- }
74
- export interface BTApi {
75
- buildHeaders: (options: PathOptions) => HeadersInit;
76
- buildQuery: (params: any) => string;
77
- buildUrl: (path: PathOptions) => string;
78
- deleteItem: (pathOptions: PathOptions) => Promise<string | undefined>;
79
- get: <T>(pathOptions: PathOptions) => Promise<T>;
80
- getAll: <T>(pathOptions: PathOptions) => Promise<T>;
81
- post: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
82
- patch: <T>(pathOptions: PathOptions) => Promise<T | undefined>;
83
- }
84
- export declare function useApi(): BTApi;
85
- export declare function createApi(options?: UseApiOptions): BTApi;
86
- export {};
@@ -1,70 +0,0 @@
1
- import { ComputedRef } from 'vue';
2
- import { BTDemo } from '../composables/demo';
3
- import { RemovableRef } from '@vueuse/core';
4
-
5
- export interface AuthItem {
6
- children?: AuthItem[];
7
- ignoreSuspension?: boolean;
8
- permissions?: string[];
9
- requiresAuth?: boolean;
10
- subscriptions?: string[];
11
- }
12
- export interface AuthSubscription {
13
- code: string;
14
- value: number;
15
- }
16
- export interface BaseAuthCredentials {
17
- expiresOn?: string;
18
- isGlobalAdmin?: boolean;
19
- isLoggedIn?: boolean;
20
- isSuspended?: boolean;
21
- permissions?: string;
22
- subscriptionCode?: string;
23
- timeZone?: string;
24
- token?: string;
25
- userID?: string;
26
- userPermissions?: string[];
27
- }
28
- export interface CreateAuthOptions {
29
- defaultTimeZone?: string;
30
- demo?: BTDemo;
31
- /**expiry token date format. Defaults to 'd/MM/yyyy h:mm:ss a' */
32
- expiryTokenFormat?: string;
33
- /**OVERRIDES CORE DEFAULT. retrieve the auth item */
34
- getAuthItem?: (navName?: string | AuthItem) => AuthItem | null;
35
- /**OVERRIDES DEFAULT. the url to start the OAuth 2.0 process */
36
- getAuthorizeUrl?: (redirectPath?: string, state?: string) => string;
37
- /**OVERRIDES DEFAULT. use the given code and generate the url to convert to an access token */
38
- getTokenUrl?: (code: string, redirect_uri: string, grant_type: string, client_id: string) => string;
39
- /**OVERRIDES DEFAULT. */
40
- getToken?: (code?: string, state?: string) => Promise<void>;
41
- oauthGrantType?: string;
42
- oauthClientID?: string;
43
- /**sets current credentials on top of default function
44
- * for processing the token payload and applying to state
45
- */
46
- processTokenPayload?: (state: RemovableRef<any>, payload: any) => void;
47
- /**suboptions */
48
- subscriptionOptions?: AuthSubscription[];
49
- }
50
- export interface BTAuth {
51
- authState: string;
52
- canEdit: (navName?: string) => boolean;
53
- canEditPermit: (permit: string) => boolean;
54
- canView: (navName?: string) => boolean;
55
- canViewPermit: (permit: string) => boolean;
56
- credentials: RemovableRef<any>;
57
- doShow: (subcodes?: string[], permissions?: string[], action?: 'view' | 'edit') => boolean;
58
- doShowByNav: (navName?: string | AuthItem, includeChildren?: boolean) => boolean;
59
- getAuthorizeUrl: (redirectPath?: string) => string;
60
- getTimeZone: () => string;
61
- getToken: (code?: string, state?: string) => Promise<void>;
62
- isLoggedIn: ComputedRef<boolean>;
63
- login: (redirectPath?: string) => void;
64
- logout: (navNameRedirect?: string) => void;
65
- setAuth: (jwtToken?: string) => void;
66
- timeZone: ComputedRef<string>;
67
- tryLogin: () => boolean | undefined;
68
- }
69
- export declare function useAuth(): BTAuth;
70
- export declare function createAuth(options: CreateAuthOptions): BTAuth;
@@ -1,38 +0,0 @@
1
- import { RemovableRef } from '@vueuse/core';
2
-
3
- interface CosmeticData {
4
- dark?: BaseCosmeticTheme;
5
- drawer?: boolean;
6
- drawerStick?: boolean;
7
- light?: BaseCosmeticTheme;
8
- theme?: string;
9
- }
10
- export interface BaseCosmeticTheme {
11
- primary: string;
12
- secondary: string;
13
- accent: string;
14
- error: string;
15
- info: string;
16
- success: string;
17
- warning: string;
18
- }
19
- export interface UseCosmeticsOptions<T extends BaseCosmeticTheme> {
20
- defaultDarkTheme?: T;
21
- defaultLightTheme?: T;
22
- defaultDrawer?: boolean;
23
- defaultDrawerStick?: boolean;
24
- defaultTheme?: string;
25
- }
26
- export interface BTCosmetics {
27
- state: RemovableRef<CosmeticData>;
28
- initiate: () => void;
29
- resetCosmetics: (toDefault: boolean) => void;
30
- setTemporaryColor: (color: string) => void;
31
- toggleDrawer: () => void;
32
- toggleDrawerStick: () => void;
33
- toggleLightDark: () => void;
34
- undoTemporaryColor: () => void;
35
- }
36
- export declare function useCosmetics(): BTCosmetics;
37
- export declare function createCosmetics<T extends BaseCosmeticTheme>(options: UseCosmeticsOptions<T>): void;
38
- export {};
@@ -1,20 +0,0 @@
1
- export interface CSVProps {
2
- canExportCSV?: boolean;
3
- }
4
- export declare const csvDefaults: {
5
- canExportCSV: boolean;
6
- };
7
- export interface UseCSVPropsReturn {
8
- exportToCSV: Function;
9
- }
10
- export interface CSVItem {
11
- header: string;
12
- itemText?: string;
13
- value: any;
14
- }
15
- declare global {
16
- interface Navigator {
17
- msSaveOrOpenBlob: (blob: Blob, fileName: string) => boolean;
18
- }
19
- }
20
- export declare function useCSV(): UseCSVPropsReturn;
@@ -1,15 +0,0 @@
1
- import { DateTime } from 'luxon';
2
-
3
- export interface BTDates {
4
- getToday: () => string;
5
- getTomorrow: () => string;
6
- tzDate: (val?: string, fromFormat?: string) => DateTime;
7
- tzString: (val?: string, format?: string, fromFormat?: string) => string;
8
- utcDate: (val?: string, fromFormat?: string) => DateTime;
9
- utcString: (val?: string, format?: string, fromFormat?: string) => string;
10
- }
11
- export interface CreateDatesOptions {
12
- getTimeZone: () => string;
13
- }
14
- export declare function useDates(): BTDates;
15
- export declare function createDates(options: CreateDatesOptions): BTDates;
@@ -1,9 +0,0 @@
1
- import { Ref } from 'vue';
2
-
3
- export interface BTDemo {
4
- endDemo: () => void;
5
- isDemoing: Ref<boolean>;
6
- startDemo: () => void;
7
- }
8
- export declare function useDemo(): BTDemo;
9
- export declare function createDemo(): BTDemo;
@@ -1,75 +0,0 @@
1
- import { ListProps } from '../composables/list';
2
-
3
- export interface ConfirmDialogProps {
4
- cancelText?: string;
5
- cancelValue?: any;
6
- confirmText?: string;
7
- confirmValue?: any;
8
- msg?: string;
9
- maxWidth?: number;
10
- minWidth?: number;
11
- title?: string;
12
- }
13
- export interface SelectDateProps {
14
- cancelText?: string;
15
- cancelValue?: any;
16
- confirmText?: string;
17
- dateFrom?: string;
18
- dateRules?: Function | unknown[];
19
- format?: string;
20
- fromNow?: boolean;
21
- height?: string;
22
- msg?: string;
23
- maxWidth?: number;
24
- minWidth?: number;
25
- range?: boolean;
26
- required?: boolean;
27
- requireTime?: boolean;
28
- title?: string;
29
- useTime?: boolean;
30
- }
31
- export interface SelectDialogProps extends ListProps {
32
- cancelText?: string;
33
- cancelValue?: any;
34
- canUnselect?: boolean;
35
- confirmText?: string;
36
- height?: string;
37
- itemSubtext?: string;
38
- itemText?: string;
39
- itemValue?: string;
40
- msg?: string;
41
- maxWidth?: number;
42
- minWidth?: number;
43
- multiple?: boolean;
44
- nav?: string;
45
- onFilter?: Function;
46
- required?: boolean;
47
- subtextFilter?: string;
48
- subtextFunction?: Function;
49
- textFilter?: string;
50
- textFunction?: Function;
51
- title?: string;
52
- }
53
- export interface TextDialogProps extends ListProps {
54
- cancelText?: string;
55
- confirmText?: string;
56
- height?: string;
57
- label?: string;
58
- msg?: string;
59
- maxWidth?: number;
60
- minWidth?: number;
61
- required?: boolean;
62
- title?: string;
63
- value?: any;
64
- }
65
- export declare function useRequireConfirmation(action: any, props: ConfirmDialogProps, requireConfirm: boolean): void;
66
- export declare function useConfirmAsync(text: string): Promise<boolean>;
67
- /**
68
- * Returns undefined if cancelled
69
- * [] if multiple
70
- * Null | Obj if single
71
- * @param opts
72
- */
73
- export declare function useSelectDialog(opts?: SelectDialogProps): Promise<any>;
74
- export declare function useSelectDate(opts?: SelectDateProps): Promise<any>;
75
- export declare function useTextDialog(opts?: TextDialogProps): Promise<any>;
@@ -1,11 +0,0 @@
1
- import { BTDemo } from '../composables/demo';
2
- import { RouteLocationNormalized } from 'vue-router';
3
-
4
- export interface UseDocumentMetaOptions {
5
- demo?: BTDemo;
6
- }
7
- export interface BTDocumentMeta {
8
- updateMeta: (to: RouteLocationNormalized) => void;
9
- }
10
- /**routes with meta object */
11
- export declare function useDocumentMeta(options?: UseDocumentMetaOptions): BTDocumentMeta;
@@ -1,56 +0,0 @@
1
- import { Position } from '@vueuse/core';
2
- import { ComponentPublicInstance, MaybeRefOrGetter, Ref } from 'vue';
3
-
4
- export interface UseDraggableOptions {
5
- /**
6
- * Only start the dragging when click on the element directly
7
- *
8
- * @default false
9
- */
10
- preventDefault?: MaybeRefOrGetter<boolean>;
11
- stopPropagation?: MaybeRefOrGetter<boolean>;
12
- /**
13
- * Whether dispatch events in capturing phase
14
- *
15
- * @default true
16
- */
17
- capture?: boolean;
18
- /**
19
- * Element to attach `pointermove` and `pointerup` events to.
20
- *
21
- * @default window
22
- */
23
- draggingElement?: MaybeRefOrGetter<HTMLElement | SVGElement | Window | Document | null | undefined>;
24
- /**
25
- * Element for calculating bounds (If not set, it will use the event's target).
26
- *
27
- * @default undefined
28
- */
29
- /**
30
- * Handle that triggers the drag event
31
- *
32
- * @default target
33
- */
34
- handle?: MaybeRefOrGetter<HTMLElement | SVGElement | null | undefined>;
35
- /**
36
- * Initial position of the element.
37
- *
38
- * @default { x: 0, y: 0 }
39
- */
40
- initialValue?: MaybeRefOrGetter<Position>;
41
- onStart?: (position: Position, event: PointerEvent) => void | false;
42
- onMove?: (position: Position, event: PointerEvent) => void;
43
- onEnd?: (position: Position, event: PointerEvent) => void;
44
- /**
45
- * Axis to drag on.
46
- *
47
- * @default 'both'
48
- */
49
- axis?: 'x' | 'y' | 'both';
50
- }
51
- export declare function useDraggable(target: MaybeRefOrGetter<ComponentPublicInstance | null>, //HTMLElement | SVGElement | null | undefined>,
52
- handle: MaybeRefOrGetter<ComponentPublicInstance | null>, options?: UseDraggableOptions): {
53
- draggingIsOn: Ref<boolean>;
54
- turnDraggableOff: () => void;
55
- turnDraggableOn: () => void;
56
- };
@@ -1,11 +0,0 @@
1
- import { BTDates } from './dates';
2
-
3
- export interface BTFilters {
4
- findFilter: (mFilter: string | undefined) => Function;
5
- }
6
- export interface UseFiltersOptions {
7
- dates: BTDates;
8
- }
9
- export declare function useFilters(): BTFilters;
10
- export declare function createFilters(options: UseFiltersOptions): BTFilters;
11
- export type Textfilter = 'toLocationLine' | 'toLocationLineNoCommas' | 'toLongDate' | 'toLongDateAndTime' | 'toPercent' | 'toPrettyCSV' | 'toShortDate' | 'toShortDateAndTime' | 'toTime' | 'toTimeOfDay' | 'toCompanyNameAndLocationLine' | 'toCurrency' | 'toDayDate' | 'toDayMonth' | 'toDayOfWeek' | 'toDayShortDate' | 'toDayShortDateAndTime' | 'toDisplayNumber' | 'toDisplayNumberOver' | 'toDisplayNumberSigned' | 'toFormat';
@@ -1,7 +0,0 @@
1
- export declare function useLocalDb(): LocalForage;
2
- export declare function useLocalCache(): {
3
- clearAsync: (storeName: string) => Promise<void>;
4
- getAsync: <T>(key: string) => Promise<T | null>;
5
- removeAsync: (key: string) => Promise<void>;
6
- saveAsync: <T_1>(data: T_1, key: string) => Promise<void>;
7
- };
@@ -1,100 +0,0 @@
1
- export declare function appendUrl(originalVal?: string, additionalVal?: string): string;
2
- export declare function extensionExists(elementId?: string): boolean;
3
- interface GeoCoordinate {
4
- lat: number;
5
- lng: number;
6
- }
7
- /**
8
- * get area around a certain location with a space of the given size
9
- * @param location
10
- * @param radius
11
- * @returns
12
- */
13
- export declare function getAreaAround(location: GeoCoordinate, radius: number): {
14
- lat: number;
15
- lng: number;
16
- }[];
17
- /**get square area using the location as the far right line */
18
- export declare function getAreaToLeft(location: GeoCoordinate, radius: number): {
19
- lat: number;
20
- lng: number;
21
- }[];
22
- /**get square area using the location as the far left line */
23
- export declare function getAreaToRight(location: GeoCoordinate, radius: number): {
24
- lat: number;
25
- lng: number;
26
- }[];
27
- /**
28
- *
29
- * @param value converts location to a single string and standardizes state and road names, etc.
30
- * @returns
31
- */
32
- export declare function getGoogleMapsLocationLine(value: any): any;
33
- export declare function getLocationLine(value: any, forGoogle?: boolean): any;
34
- export declare function checkImage(url?: string, goodCallback?: any, badCallback?: any): void;
35
- export declare function getImageData(url?: string, throwErrorOnFail?: boolean): Promise<unknown>;
36
- /**
37
- *
38
- * @param val Converts string from camel case to every word being capitalized and spaces between
39
- * @returns
40
- */
41
- export declare function fromCamelCase(val?: string): string | undefined;
42
- /**
43
- * Converts props to camel casing
44
- * @param value
45
- * @returns
46
- */
47
- export declare function toCamelCase(value: any): any;
48
- export declare function capitalizeWords(val?: string): string | undefined;
49
- export declare const weekdayPairs: {
50
- value: number;
51
- short: string;
52
- values: (string | null | undefined)[];
53
- }[];
54
- /**returns the sort value of the weekday csv string
55
- * returns minimum if csv list
56
- */
57
- export declare function weekdayValue(wkDay?: string): number;
58
- /**returns the sort value of the weekday csv string
59
- * returns minimum if csv list
60
- */
61
- export declare function weekdayShortName(wkDay?: string): string | undefined;
62
- /**whether the csv string contains the weekday
63
- * returns true if either prop is undefined
64
- */
65
- export declare function containsWeekday(weekdays?: string, wkDay?: string): boolean;
66
- /**adds and sorts the weekday string */
67
- export declare function addWeekday(weekdays?: string, day?: string): string | undefined;
68
- export declare function removeWeekday(weekdays?: string, day?: string): string | undefined;
69
- export declare function isArrayOfLength(val: any, l: number): boolean;
70
- export declare function isLengthyArray(val: any, greaterThan?: number): boolean;
71
- export declare function isMinDate(d?: string): boolean;
72
- export declare function getMinDate(): number;
73
- export declare function getMinDateString(): string;
74
- /**
75
- * rounds the given value to a certain number of decimal places
76
- * @param v
77
- * @param dPlaces
78
- * @returns
79
- */
80
- export declare function roundTo(val: number, dPlaces: number): number;
81
- export declare function toggleCSV(value?: string, tag?: string): string | null;
82
- export declare function csvContains(value?: string, tag?: string): boolean;
83
- /**copies object and all descendant properties */
84
- export declare function copyDeep(aObject: any): any;
85
- /**copies object and returns copied object with descendant properties placed in alphabetical order */
86
- export declare function copyItemByAlphabet(aObject: any): any;
87
- /**whether string is contained somewhere in this value */
88
- export declare function containsSearch(value?: string, str?: string): boolean;
89
- /**must be an object. Returns a flat map of all items in the prop selector */
90
- export declare function deepSelect(obj: any, propSelector?: Function): any[];
91
- export declare function DataURIToBlob(dataURI: any): Blob;
92
- export declare function extractErrorDescription(error: any): string;
93
- export declare function getRandomColor(): string;
94
- /**tests for whether string is contains in any of the given props of the given value */
95
- export declare function hasSearch(value: any, str?: string, props?: string[]): boolean;
96
- export declare function toCompareString(str?: string): string | null;
97
- export declare function twiddleThumbs(mSec?: number): Promise<void>;
98
- export declare function nestedValue(obj: any, path?: string): any;
99
- export declare function validEmail(email?: string): boolean;
100
- export {};
@@ -1 +0,0 @@
1
- export declare function useId(pattern?: string): string;