@nano-lib/util 1.1.5 → 1.1.6

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/lib/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { parseTime, getTimeDistance, getDayRange } from './utils/date';
4
4
  import { addClass, removeClass, hasClass, toggleClass, noContextmenu, useRafThrottle } from './utils/element';
5
5
  import { encodeURIToParams, paramsToQueryString, queryStringToParams, errorCodeToString, YNToString, HNToString, valueToLabel, chargeToLabel, cascaderToLabel, multipleSelectToLabel, phoneToAsterisk, idNumberToAsterisk, firstLetterToUpperCase, firstLetterToLowerCase } from './utils/to';
6
6
  import { validHttp, validExternal, validString, validNumberStr, validEmptyObject, validURL, validPassword, validEmail, validIdNumber, validPhone, validTel } from './utils/valid';
7
- export { default as Request } from './utils/request/request';
7
+ export { default as Request } from './utils/request/index';
8
8
  export { default as NetworkManager } from './utils/request/network';
9
9
  export { default as TokenManager } from './utils/request/token';
10
10
  export { default as getRequestBaseUrl } from './utils/baseUrl';
@@ -1,4 +1,4 @@
1
- import { AnyObj } from '../../types';
1
+ import { AnyObj } from '.';
2
2
  import { AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';
3
3
  export interface RequestOptions {
4
4
  showLoading?: boolean;
@@ -1,4 +1,4 @@
1
- import { CustomInternalAxiosRequestConfig } from './types';
1
+ import { CustomInternalAxiosRequestConfig } from '../../types/request';
2
2
  export default class CancelManager {
3
3
  private pendingMap;
4
4
  private generateRequestKey;
@@ -1,5 +1,5 @@
1
1
  import { AxiosError } from 'axios';
2
- import { ToastInstanceType } from './types';
2
+ import { ToastInstanceType } from '../../types/request';
3
3
  export default class ErrorManager {
4
4
  private toastInstance;
5
5
  constructor(toastInstance: ToastInstanceType);
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { RequestConstructorOptions, RequestOptions, RequestParams } from './types';
2
+ import { RequestConstructorOptions, RequestOptions, RequestParams } from '../../types/request';
3
3
  export default class Request {
4
4
  private axiosInstance;
5
5
  private errorInstance;
@@ -1,4 +1,4 @@
1
- import { NetworkStatus, PendingRequest, ToastInstanceType } from './types';
1
+ import { NetworkStatus, PendingRequest, ToastInstanceType } from '../../types/request';
2
2
  export default class NetworkManager {
3
3
  private toastInstance;
4
4
  private status;
@@ -1,4 +1,4 @@
1
- import { PromiseResponse, TokenInfo } from './types';
1
+ import { PromiseResponse, TokenInfo } from '../../types/request';
2
2
  export default class TokenManager {
3
3
  private TOKEN_KEY;
4
4
  private REFRESH_TOKEN_KEY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nano-lib/util",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Custom utility functions for the nano library",
5
5
  "author": "xylo",
6
6
  "license": "MIT",