@dvrd/dvr-controls 1.0.31 → 1.0.33

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": "@dvrd/dvr-controls",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "Custom web controls",
5
5
  "main": "index.ts",
6
6
  "files": [
@@ -49,6 +49,7 @@
49
49
  opacity: 0;
50
50
  transition: visibility .2s ease-in-out, opacity .2s ease-in-out;
51
51
  font-size: 12px;
52
+ user-select: none;
52
53
  }
53
54
 
54
55
  .active-indicator {
@@ -117,6 +118,7 @@
117
118
  color: #686869;
118
119
  transition: color .2s ease-in-out;
119
120
  white-space: nowrap;
121
+ user-select: none;
120
122
 
121
123
  &.active {
122
124
  font-weight: 600;
@@ -12,6 +12,7 @@ import {voidFunction} from "./controlUtil";
12
12
  type ResponseHandler = (response: Response, config: FetchOptions) => void;
13
13
 
14
14
  export interface FetchOptions {
15
+ onAbort?: VoidFunction;
15
16
  baseUrl?: string | null;
16
17
  url: string;
17
18
  method?: FetchMethod;
@@ -79,7 +80,7 @@ export function sendFetch(config: FetchOptions, legacySupport: boolean = false):
79
80
  fetch(baseUrl + url, options).then((response: Response) => {
80
81
  _handleResponse(response, config);
81
82
  }).catch((reason: any) => {
82
- if (reason.code === DOMException.ABORT_ERR) return; // Request aborted
83
+ if (reason.code === DOMException.ABORT_ERR) return config.onAbort?.(); // Request aborted
83
84
  else if (config.errorCallback)
84
85
  config.errorCallback(reason);
85
86
  else if (defaultErrorHandler)