intelliwaketssveltekitv25 0.1.157 → 0.1.159

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.
@@ -22,7 +22,7 @@ export declare const KEY_STRING_ESCAPE = "Escape";
22
22
  export declare const IsMetaKey: (e: KeyboardEvent) => boolean;
23
23
  export declare const CaptureGPS: (options?: PositionOptions) => Promise<GeolocationPosition | null>;
24
24
  export declare const DownloadBase64Data: (fileName: string, base64: string) => void;
25
- export declare const CopyRefToClipboard: (ref: HTMLElement, tryFormatted?: boolean) => boolean;
25
+ export declare function CopyRefToClipboard(ref: HTMLElement | null | undefined, tryFormatted?: boolean): boolean;
26
26
  export declare const TableIDToExcel: (tableID: string, fileName?: string, appendDateTime?: boolean) => void;
27
27
  export declare const DoIDsMatch: (a: any, b: any) => boolean;
28
28
  export declare const IsProd: () => boolean;
package/dist/Functions.js CHANGED
@@ -66,7 +66,9 @@ export const DownloadBase64Data = (fileName, base64) => {
66
66
  document.body.appendChild(link);
67
67
  link.click();
68
68
  };
69
- export const CopyRefToClipboard = (ref, tryFormatted = true) => {
69
+ export function CopyRefToClipboard(ref, tryFormatted = true) {
70
+ if (!ref)
71
+ return false;
70
72
  if (ref && document.createRange && window.getSelection) {
71
73
  const range = document.createRange();
72
74
  const sel = window.getSelection();
@@ -159,7 +161,7 @@ export const CopyRefToClipboard = (ref, tryFormatted = true) => {
159
161
  }
160
162
  }
161
163
  return false;
162
- };
164
+ }
163
165
  export const TableIDToExcel = (tableID, fileName, appendDateTime = true) => {
164
166
  const downloadName = `${fileName ?? tableID}${appendDateTime ? `-${YYYY_MM_DD_HH_mm_ss('now')}.xls` : ''}`;
165
167
  // const dataType = 'application/vnd.ms-excel'
@@ -21,7 +21,7 @@
21
21
 
22
22
  </script>
23
23
 
24
- {#if readonly}
24
+ {#if readonly || otherProps.hidden}
25
25
  <DisplayHTML {value} hidden={!!otherProps.hidden} />
26
26
  {:else}
27
27
  <textarea {...otherProps} bind:value={value} use:useActions={use}></textarea>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "0.1.157",
3
+ "version": "0.1.159",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",