@nuralyui/document 0.0.4 → 0.0.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/bundle.js +234 -0
- package/document.component.d.ts +19 -9
- package/document.component.js +103 -193
- package/document.component.js.map +1 -1
- package/document.types.d.ts +68 -0
- package/document.types.js +7 -0
- package/document.types.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +16 -2
- package/react.d.ts +6 -304
- package/react.js +8 -5
- package/react.js.map +1 -1
- package/demo/document-demo.d.ts +0 -12
- package/demo/document-demo.d.ts.map +0 -1
- package/demo/document-demo.js +0 -40
- package/demo/document-demo.js.map +0 -1
- package/document.component.d.ts.map +0 -1
- package/document.style.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/react.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.component.js","sourceRoot":"","sources":["../../../src/components/document/document.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"document.component.js","sourceRoot":"","sources":["../../../src/components/document/document.component.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, LitElement } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { NuralyUIBaseMixin } from '@nuralyui/common/mixins';\nimport styles from \"./document.style.js\";\nimport { DocumentType } from \"./document.types.js\";\n\n@customElement('nr-document')\nexport class NrDocumentElement extends NuralyUIBaseMixin(LitElement) {\n static override styles = styles;\n\n @property({ type: String })\n src!: string;\n\n @property({ type: String })\n type: DocumentType = DocumentType.PDF;\n\n @property({ type: String })\n width = 'auto';\n\n @property({ type: String })\n height = '500px';\n\n @property({ type: Boolean })\n previewable = false;\n\n @property({ type: Boolean, reflect: true })\n block = false;\n\n @state()\n private showPreview = false;\n\n @state()\n private hasError = false;\n\n private readonly defaultFallback = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjEyMCIgaGVpZ2h0PSIxMjAiIGZpbGw9IiNFRkYxRjMiLz48cGF0aCBkPSJNNTkuNCA2Mi44VjgwLjRINDguMlY0MS42SDYzLjRDNjcuMSA0MS42IDcwLjEgNDIuNiA3Mi40IDQ0LjdDNzQuNyA0Ni44IDc1LjggNDkuNiA3NS44IDUzQzc1LjggNTYuNSA3NC43IDU5LjIgNzIuNCA2MS4zQzcwLjIgNjMuNCA2Ny4yIDY0LjQgNjMuNCA2NC40SDU5LjRWNjIuOFpNNTkuNCA1NC42SDYzLjRDNjUgNTQuNiA2Ni4zIDU0LjEgNjcuMiA1M0M2OC4xIDUxLjkgNjguNiA1MC42IDY4LjYgNDlDNjguNiA0Ny41IDY4LjEgNDYuMiA2Ny4yIDQ1LjFDNjYuMyA0NCA2NSA0My40IDYzLjQgNDMuNEg1OS40VjU0LjZaIiBmaWxsPSIjNjg3Nzg3Ii8+PC9zdmc+';\n\n private handleError() {\n this.hasError = true;\n this.dispatchEvent(new CustomEvent('nr-document-error', {\n bubbles: true,\n composed: true,\n detail: { error: `Error loading document: ${this.src}`, src: this.src, type: this.type }\n }));\n }\n\n private handleLoad() {\n this.dispatchEvent(new CustomEvent('nr-document-load', {\n bubbles: true,\n composed: true,\n detail: { src: this.src, type: this.type }\n }));\n }\n\n private showPreviewModal() {\n if (this.previewable && !this.hasError) {\n this.showPreview = true;\n this.dispatchEvent(new CustomEvent('nr-document-preview-open', {\n bubbles: true,\n composed: true,\n detail: { src: this.src, type: this.type }\n }));\n }\n }\n\n private closePreviewModal() {\n this.showPreview = false;\n this.dispatchEvent(new CustomEvent('nr-document-preview-close', {\n bubbles: true,\n composed: true,\n detail: { src: this.src, type: this.type }\n }));\n }\n\n override render() {\n const containerClasses = {\n 'document-container': true,\n 'document--error': this.hasError\n };\n\n const containerStyles: Record<string, string> = {\n width: typeof this.width === 'number' ? `${this.width}px` : this.width,\n height: typeof this.height === 'number' ? `${this.height}px` : this.height,\n };\n\n if (this.hasError) {\n return html`\n <div class=${classMap(containerClasses)} style=${styleMap(containerStyles)}>\n <div class=\"error-message\">\n <img class=\"error-icon\" src=${this.defaultFallback} alt=\"Document error\" />\n <p>Unable to load document</p>\n </div>\n </div>\n `;\n }\n\n return html`\n <div class=${classMap(containerClasses)} style=${styleMap(containerStyles)}>\n <iframe\n class=\"document-iframe\"\n src=${this.src}\n @error=${this.handleError}\n @load=${this.handleLoad}\n title=\"Document viewer\"\n ></iframe>\n ${this.previewable ? html`\n <button class=\"preview-button\" @click=${this.showPreviewModal}>\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"currentColor\">\n <path d=\"M5.5 5.5A.5.5 0 0 1 6 6v3a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v3a.5.5 0 0 0 1 0V6z\"/>\n <path d=\"M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zM1 2a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2z\"/>\n </svg>\n Fullscreen\n </button>\n ` : ''}\n ${this.showPreview ? html`\n <div class=\"preview-modal\">\n <div class=\"preview-header\">\n <button class=\"preview-close\" @click=${this.closePreviewModal} aria-label=\"Close preview\">×</button>\n </div>\n <iframe src=${this.src} title=\"Document viewer fullscreen\"></iframe>\n </div>\n ` : ''}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nr-document': NrDocumentElement;\n }\n}\n"]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Document viewer type
|
|
8
|
+
*/
|
|
9
|
+
export declare const enum DocumentType {
|
|
10
|
+
/** PDF document */
|
|
11
|
+
PDF = "pdf",
|
|
12
|
+
/** Image document */
|
|
13
|
+
Image = "image",
|
|
14
|
+
/** Other/unknown type */
|
|
15
|
+
Other = "other"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Document fit mode
|
|
19
|
+
*/
|
|
20
|
+
export declare const enum DocumentFit {
|
|
21
|
+
/** Fit to width */
|
|
22
|
+
Width = "width",
|
|
23
|
+
/** Fit to height */
|
|
24
|
+
Height = "height",
|
|
25
|
+
/** Fit to page */
|
|
26
|
+
Page = "page",
|
|
27
|
+
/** Auto fit */
|
|
28
|
+
Auto = "auto"
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Document configuration interface
|
|
32
|
+
*/
|
|
33
|
+
export interface DocumentConfig {
|
|
34
|
+
/** Document source URL */
|
|
35
|
+
src: string;
|
|
36
|
+
/** Document type */
|
|
37
|
+
type?: DocumentType;
|
|
38
|
+
/** Fallback document URL or image */
|
|
39
|
+
fallback?: string;
|
|
40
|
+
/** Document width */
|
|
41
|
+
width?: string | number;
|
|
42
|
+
/** Document height */
|
|
43
|
+
height?: string | number;
|
|
44
|
+
/** Whether document is previewable (fullscreen) */
|
|
45
|
+
previewable?: boolean;
|
|
46
|
+
/** Fit mode for document display */
|
|
47
|
+
fit?: DocumentFit;
|
|
48
|
+
/** Custom CSS class */
|
|
49
|
+
customClass?: string;
|
|
50
|
+
/** Callback when document loads */
|
|
51
|
+
onLoad?: () => void;
|
|
52
|
+
/** Callback when document fails to load */
|
|
53
|
+
onError?: (error: Error) => void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Document event detail
|
|
57
|
+
*/
|
|
58
|
+
export interface DocumentEventDetail {
|
|
59
|
+
/** Original event */
|
|
60
|
+
originalEvent?: Event;
|
|
61
|
+
/** Error message if applicable */
|
|
62
|
+
error?: string;
|
|
63
|
+
/** Document source */
|
|
64
|
+
src?: string;
|
|
65
|
+
/** Document type */
|
|
66
|
+
type?: DocumentType;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=document.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.types.js","sourceRoot":"","sources":["../../../src/components/document/document.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * Document viewer type\n */\nexport const enum DocumentType {\n /** PDF document */\n PDF = 'pdf',\n /** Image document */\n Image = 'image',\n /** Other/unknown type */\n Other = 'other',\n}\n\n/**\n * Document fit mode\n */\nexport const enum DocumentFit {\n /** Fit to width */\n Width = 'width',\n /** Fit to height */\n Height = 'height',\n /** Fit to page */\n Page = 'page',\n /** Auto fit */\n Auto = 'auto',\n}\n\n/**\n * Document configuration interface\n */\nexport interface DocumentConfig {\n /** Document source URL */\n src: string;\n \n /** Document type */\n type?: DocumentType;\n \n /** Fallback document URL or image */\n fallback?: string;\n \n /** Document width */\n width?: string | number;\n \n /** Document height */\n height?: string | number;\n \n /** Whether document is previewable (fullscreen) */\n previewable?: boolean;\n \n /** Fit mode for document display */\n fit?: DocumentFit;\n \n /** Custom CSS class */\n customClass?: string;\n \n /** Callback when document loads */\n onLoad?: () => void;\n \n /** Callback when document fails to load */\n onError?: (error: Error) => void;\n}\n\n/**\n * Document event detail\n */\nexport interface DocumentEventDetail {\n /** Original event */\n originalEvent?: Event;\n \n /** Error message if applicable */\n error?: string;\n \n /** Document source */\n src?: string;\n \n /** Document type */\n type?: DocumentType;\n}\n"]}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/document/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/document/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './document.component.js';\nexport * from './document.types.js';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuralyui/document",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -8,5 +8,19 @@
|
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
9
|
},
|
|
10
10
|
"author": "Labidi Aymen",
|
|
11
|
-
"license": "ISC"
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./index.js"
|
|
15
|
+
},
|
|
16
|
+
"./bundle": {
|
|
17
|
+
"import": "./bundle.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bundle.js",
|
|
22
|
+
"*.js",
|
|
23
|
+
"*.d.ts",
|
|
24
|
+
"*.js.map"
|
|
25
|
+
]
|
|
12
26
|
}
|
package/react.d.ts
CHANGED
|
@@ -1,306 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
hidden: boolean;
|
|
8
|
-
innerText: string;
|
|
9
|
-
lang: string;
|
|
10
|
-
readonly offsetHeight: number;
|
|
11
|
-
readonly offsetLeft: number;
|
|
12
|
-
readonly offsetParent: Element | null;
|
|
13
|
-
readonly offsetTop: number;
|
|
14
|
-
readonly offsetWidth: number;
|
|
15
|
-
outerText: string;
|
|
16
|
-
spellcheck: boolean;
|
|
17
|
-
title: string;
|
|
18
|
-
translate: boolean;
|
|
19
|
-
attachInternals(): ElementInternals;
|
|
20
|
-
click(): void;
|
|
21
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
22
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
23
|
-
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
24
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
25
|
-
readonly attributes: NamedNodeMap;
|
|
26
|
-
readonly classList: DOMTokenList;
|
|
27
|
-
className: string;
|
|
28
|
-
readonly clientHeight: number;
|
|
29
|
-
readonly clientLeft: number;
|
|
30
|
-
readonly clientTop: number;
|
|
31
|
-
readonly clientWidth: number;
|
|
32
|
-
id: string;
|
|
33
|
-
readonly localName: string;
|
|
34
|
-
readonly namespaceURI: string | null;
|
|
35
|
-
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
36
|
-
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
37
|
-
outerHTML: string;
|
|
38
|
-
readonly ownerDocument: Document;
|
|
39
|
-
readonly part: DOMTokenList;
|
|
40
|
-
readonly prefix: string | null;
|
|
41
|
-
readonly scrollHeight: number;
|
|
42
|
-
scrollLeft: number;
|
|
43
|
-
scrollTop: number;
|
|
44
|
-
readonly scrollWidth: number;
|
|
45
|
-
readonly shadowRoot: ShadowRoot | null;
|
|
46
|
-
slot: string;
|
|
47
|
-
readonly tagName: string;
|
|
48
|
-
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
49
|
-
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
|
|
50
|
-
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
|
|
51
|
-
closest<E extends Element = Element>(selectors: string): E | null;
|
|
52
|
-
getAttribute(qualifiedName: string): string | null;
|
|
53
|
-
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
54
|
-
getAttributeNames(): string[];
|
|
55
|
-
getAttributeNode(qualifiedName: string): Attr | null;
|
|
56
|
-
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
57
|
-
getBoundingClientRect(): DOMRect;
|
|
58
|
-
getClientRects(): DOMRectList;
|
|
59
|
-
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
60
|
-
getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
|
|
61
|
-
getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
|
|
62
|
-
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
63
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
64
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
65
|
-
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
66
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
67
|
-
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
68
|
-
hasAttributes(): boolean;
|
|
69
|
-
hasPointerCapture(pointerId: number): boolean;
|
|
70
|
-
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
71
|
-
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
72
|
-
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
73
|
-
matches(selectors: string): boolean;
|
|
74
|
-
releasePointerCapture(pointerId: number): void;
|
|
75
|
-
removeAttribute(qualifiedName: string): void;
|
|
76
|
-
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
77
|
-
removeAttributeNode(attr: Attr): Attr;
|
|
78
|
-
requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
|
|
79
|
-
requestPointerLock(): void;
|
|
80
|
-
scroll(options?: ScrollToOptions | undefined): void;
|
|
81
|
-
scroll(x: number, y: number): void;
|
|
82
|
-
scrollBy(options?: ScrollToOptions | undefined): void;
|
|
83
|
-
scrollBy(x: number, y: number): void;
|
|
84
|
-
scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
|
|
85
|
-
scrollTo(options?: ScrollToOptions | undefined): void;
|
|
86
|
-
scrollTo(x: number, y: number): void;
|
|
87
|
-
setAttribute(qualifiedName: string, value: string): void;
|
|
88
|
-
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
89
|
-
setAttributeNode(attr: Attr): Attr | null;
|
|
90
|
-
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
91
|
-
setPointerCapture(pointerId: number): void;
|
|
92
|
-
toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
|
|
93
|
-
webkitMatchesSelector(selectors: string): boolean;
|
|
94
|
-
readonly baseURI: string;
|
|
95
|
-
readonly childNodes: NodeListOf<ChildNode>;
|
|
96
|
-
readonly firstChild: ChildNode | null;
|
|
97
|
-
readonly isConnected: boolean;
|
|
98
|
-
readonly lastChild: ChildNode | null;
|
|
99
|
-
readonly nextSibling: ChildNode | null;
|
|
100
|
-
readonly nodeName: string;
|
|
101
|
-
readonly nodeType: number;
|
|
102
|
-
nodeValue: string | null;
|
|
103
|
-
readonly parentElement: HTMLElement | null;
|
|
104
|
-
readonly parentNode: ParentNode | null;
|
|
105
|
-
readonly previousSibling: ChildNode | null;
|
|
106
|
-
textContent: string | null;
|
|
107
|
-
appendChild<T extends Node>(node: T): T;
|
|
108
|
-
cloneNode(deep?: boolean | undefined): Node;
|
|
109
|
-
compareDocumentPosition(other: Node): number;
|
|
110
|
-
contains(other: Node | null): boolean;
|
|
111
|
-
getRootNode(options?: GetRootNodeOptions | undefined): Node;
|
|
112
|
-
hasChildNodes(): boolean;
|
|
113
|
-
insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
|
|
114
|
-
isDefaultNamespace(namespace: string | null): boolean;
|
|
115
|
-
isEqualNode(otherNode: Node | null): boolean;
|
|
116
|
-
isSameNode(otherNode: Node | null): boolean;
|
|
117
|
-
lookupNamespaceURI(prefix: string | null): string | null;
|
|
118
|
-
lookupPrefix(namespace: string | null): string | null;
|
|
119
|
-
normalize(): void;
|
|
120
|
-
removeChild<T_2 extends Node>(child: T_2): T_2;
|
|
121
|
-
replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
|
|
122
|
-
readonly ATTRIBUTE_NODE: number;
|
|
123
|
-
readonly CDATA_SECTION_NODE: number;
|
|
124
|
-
readonly COMMENT_NODE: number;
|
|
125
|
-
readonly DOCUMENT_FRAGMENT_NODE: number;
|
|
126
|
-
readonly DOCUMENT_NODE: number;
|
|
127
|
-
readonly DOCUMENT_POSITION_CONTAINED_BY: number;
|
|
128
|
-
readonly DOCUMENT_POSITION_CONTAINS: number;
|
|
129
|
-
readonly DOCUMENT_POSITION_DISCONNECTED: number;
|
|
130
|
-
readonly DOCUMENT_POSITION_FOLLOWING: number;
|
|
131
|
-
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
132
|
-
readonly DOCUMENT_POSITION_PRECEDING: number;
|
|
133
|
-
readonly DOCUMENT_TYPE_NODE: number;
|
|
134
|
-
readonly ELEMENT_NODE: number;
|
|
135
|
-
readonly ENTITY_NODE: number;
|
|
136
|
-
readonly ENTITY_REFERENCE_NODE: number;
|
|
137
|
-
readonly NOTATION_NODE: number;
|
|
138
|
-
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
139
|
-
readonly TEXT_NODE: number;
|
|
140
|
-
dispatchEvent(event: Event): boolean;
|
|
141
|
-
ariaAtomic: string | null;
|
|
142
|
-
ariaAutoComplete: string | null;
|
|
143
|
-
ariaBusy: string | null;
|
|
144
|
-
ariaChecked: string | null;
|
|
145
|
-
ariaColCount: string | null;
|
|
146
|
-
ariaColIndex: string | null;
|
|
147
|
-
ariaColSpan: string | null;
|
|
148
|
-
ariaCurrent: string | null;
|
|
149
|
-
ariaDisabled: string | null;
|
|
150
|
-
ariaExpanded: string | null;
|
|
151
|
-
ariaHasPopup: string | null;
|
|
152
|
-
ariaHidden: string | null;
|
|
153
|
-
ariaKeyShortcuts: string | null;
|
|
154
|
-
ariaLabel: string | null;
|
|
155
|
-
ariaLevel: string | null;
|
|
156
|
-
ariaLive: string | null;
|
|
157
|
-
ariaModal: string | null;
|
|
158
|
-
ariaMultiLine: string | null;
|
|
159
|
-
ariaMultiSelectable: string | null;
|
|
160
|
-
ariaOrientation: string | null;
|
|
161
|
-
ariaPlaceholder: string | null;
|
|
162
|
-
ariaPosInSet: string | null;
|
|
163
|
-
ariaPressed: string | null;
|
|
164
|
-
ariaReadOnly: string | null;
|
|
165
|
-
ariaRequired: string | null;
|
|
166
|
-
ariaRoleDescription: string | null;
|
|
167
|
-
ariaRowCount: string | null;
|
|
168
|
-
ariaRowIndex: string | null;
|
|
169
|
-
ariaRowSpan: string | null;
|
|
170
|
-
ariaSelected: string | null;
|
|
171
|
-
ariaSetSize: string | null;
|
|
172
|
-
ariaSort: string | null;
|
|
173
|
-
ariaValueMax: string | null;
|
|
174
|
-
ariaValueMin: string | null;
|
|
175
|
-
ariaValueNow: string | null;
|
|
176
|
-
ariaValueText: string | null;
|
|
177
|
-
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
|
|
178
|
-
getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
|
|
179
|
-
after(...nodes: (string | Node)[]): void;
|
|
180
|
-
before(...nodes: (string | Node)[]): void;
|
|
181
|
-
remove(): void;
|
|
182
|
-
replaceWith(...nodes: (string | Node)[]): void;
|
|
183
|
-
innerHTML: string;
|
|
184
|
-
readonly nextElementSibling: Element | null;
|
|
185
|
-
readonly previousElementSibling: Element | null;
|
|
186
|
-
readonly childElementCount: number;
|
|
187
|
-
readonly children: HTMLCollection;
|
|
188
|
-
readonly firstElementChild: Element | null;
|
|
189
|
-
readonly lastElementChild: Element | null;
|
|
190
|
-
append(...nodes: (string | Node)[]): void;
|
|
191
|
-
prepend(...nodes: (string | Node)[]): void;
|
|
192
|
-
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
|
|
193
|
-
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
|
|
194
|
-
querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
|
|
195
|
-
querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
|
|
196
|
-
querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
|
|
197
|
-
querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
|
|
198
|
-
replaceChildren(...nodes: (string | Node)[]): void;
|
|
199
|
-
readonly assignedSlot: HTMLSlotElement | null;
|
|
200
|
-
oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
201
|
-
oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
202
|
-
onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
203
|
-
readonly style: CSSStyleDeclaration;
|
|
204
|
-
contentEditable: string;
|
|
205
|
-
enterKeyHint: string;
|
|
206
|
-
inputMode: string;
|
|
207
|
-
readonly isContentEditable: boolean;
|
|
208
|
-
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
209
|
-
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
210
|
-
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
211
|
-
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
212
|
-
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
213
|
-
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
214
|
-
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
215
|
-
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
216
|
-
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
217
|
-
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
218
|
-
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
219
|
-
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
220
|
-
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
221
|
-
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
222
|
-
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
223
|
-
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
224
|
-
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
225
|
-
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
226
|
-
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
227
|
-
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
228
|
-
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
229
|
-
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
230
|
-
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
231
|
-
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
232
|
-
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
233
|
-
onerror: OnErrorEventHandler;
|
|
234
|
-
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
235
|
-
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
236
|
-
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
237
|
-
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
238
|
-
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
239
|
-
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
240
|
-
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
241
|
-
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
242
|
-
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
243
|
-
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
244
|
-
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
245
|
-
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
246
|
-
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
247
|
-
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
248
|
-
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
249
|
-
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
250
|
-
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
251
|
-
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
252
|
-
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
253
|
-
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
254
|
-
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
255
|
-
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
256
|
-
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
257
|
-
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
258
|
-
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
259
|
-
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
260
|
-
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
261
|
-
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
262
|
-
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
263
|
-
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
264
|
-
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
265
|
-
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
|
|
266
|
-
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
267
|
-
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
|
-
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
269
|
-
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
270
|
-
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
271
|
-
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
272
|
-
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
-
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
274
|
-
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
275
|
-
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
-
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
277
|
-
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
-
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
279
|
-
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
280
|
-
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
281
|
-
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
282
|
-
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
283
|
-
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
284
|
-
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
285
|
-
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
286
|
-
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
287
|
-
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
288
|
-
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
289
|
-
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
290
|
-
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
291
|
-
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
292
|
-
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
293
|
-
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
294
|
-
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
|
-
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
-
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
297
|
-
autofocus: boolean;
|
|
298
|
-
readonly dataset: DOMStringMap;
|
|
299
|
-
nonce?: string | undefined;
|
|
300
|
-
tabIndex: number;
|
|
301
|
-
blur(): void;
|
|
302
|
-
focus(options?: FocusOptions | undefined): void;
|
|
303
|
-
}, {
|
|
304
|
-
documentChange: string;
|
|
1
|
+
import { NrDocumentElement } from './document.component.js';
|
|
2
|
+
export declare const NrDocument: import("@lit-labs/react").ReactWebComponent<NrDocumentElement, {
|
|
3
|
+
onLoad: string;
|
|
4
|
+
onError: string;
|
|
5
|
+
onPreviewOpen: string;
|
|
6
|
+
onPreviewClose: string;
|
|
305
7
|
}>;
|
|
306
8
|
//# sourceMappingURL=react.d.ts.map
|
package/react.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { createComponent } from '@lit-labs/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { NrDocumentElement } from './document.component.js';
|
|
4
|
+
export const NrDocument = createComponent({
|
|
5
|
+
tagName: 'nr-document',
|
|
6
|
+
elementClass: NrDocumentElement,
|
|
7
7
|
react: React,
|
|
8
8
|
events: {
|
|
9
|
-
|
|
9
|
+
onLoad: 'nr-document-load',
|
|
10
|
+
onError: 'nr-document-error',
|
|
11
|
+
onPreviewOpen: 'nr-document-preview-open',
|
|
12
|
+
onPreviewClose: 'nr-document-preview-close',
|
|
10
13
|
},
|
|
11
14
|
});
|
|
12
15
|
//# sourceMappingURL=react.js.map
|
package/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/document/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/document/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,iBAAiB;IAC/B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,mBAAmB;QAC5B,aAAa,EAAE,0BAA0B;QACzC,cAAc,EAAE,2BAA2B;KAC5C;CACF,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit-labs/react';\nimport * as React from 'react';\nimport { NrDocumentElement } from './document.component.js';\n\nexport const NrDocument = createComponent({\n tagName: 'nr-document',\n elementClass: NrDocumentElement,\n react: React,\n events: {\n onLoad: 'nr-document-load',\n onError: 'nr-document-error',\n onPreviewOpen: 'nr-document-preview-open',\n onPreviewClose: 'nr-document-preview-close',\n },\n});\n"]}
|
package/demo/document-demo.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Google Laabidi Aymen
|
|
4
|
-
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/
|
|
6
|
-
import { LitElement } from 'lit';
|
|
7
|
-
import '../document.component.js';
|
|
8
|
-
export declare class HyDatePickerDemoElement extends LitElement {
|
|
9
|
-
selectedLanguage: string;
|
|
10
|
-
render(): import("lit").TemplateResult<1>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=document-demo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-demo.d.ts","sourceRoot":"","sources":["../../../../src/components/document/demo/document-demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,0BAA0B,CAAC;AAElC,qBACa,uBAAwB,SAAQ,UAAU;IAErD,gBAAgB,SAAQ;IAEf,MAAM;CAYhB"}
|
package/demo/document-demo.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Google Laabidi Aymen
|
|
4
|
-
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/
|
|
6
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
-
};
|
|
12
|
-
import { LitElement, html } from 'lit';
|
|
13
|
-
import { customElement, state } from 'lit/decorators.js';
|
|
14
|
-
import '../document.component.js';
|
|
15
|
-
let HyDatePickerDemoElement = class HyDatePickerDemoElement extends LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.selectedLanguage = 'en';
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return html `
|
|
22
|
-
<hy-document-viewer
|
|
23
|
-
previewable="true"
|
|
24
|
-
id="url-viewer"
|
|
25
|
-
src="http://localhost:7004/api/v1/storage/preview/my-folder%2FRNE%20Public.pdf"
|
|
26
|
-
width="100%"
|
|
27
|
-
height="500px"
|
|
28
|
-
previewable
|
|
29
|
-
></hy-document-viewer>
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
__decorate([
|
|
34
|
-
state()
|
|
35
|
-
], HyDatePickerDemoElement.prototype, "selectedLanguage", void 0);
|
|
36
|
-
HyDatePickerDemoElement = __decorate([
|
|
37
|
-
customElement('hy-document-demo')
|
|
38
|
-
], HyDatePickerDemoElement);
|
|
39
|
-
export { HyDatePickerDemoElement };
|
|
40
|
-
//# sourceMappingURL=document-demo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-demo.js","sourceRoot":"","sources":["../../../../src/components/document/demo/document-demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,0BAA0B,CAAC;AAGlC,IAAa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,UAAU;IAAvD;;QAEE,qBAAgB,GAAG,IAAI,CAAC;IAc1B,CAAC;IAZU,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;;;;KASV,CAAC;IACJ,CAAC;CACF,CAAA;AAdC;IADC,KAAK,EAAE;iEACgB;AAFb,uBAAuB;IADnC,aAAa,CAAC,kBAAkB,CAAC;GACrB,uBAAuB,CAgBnC;SAhBY,uBAAuB","sourcesContent":["/**\n * @license\n * Copyright 2023 Google Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport '../document.component.js';\n\n@customElement('hy-document-demo')\nexport class HyDatePickerDemoElement extends LitElement {\n @state()\n selectedLanguage = 'en';\n\n override render() {\n return html`\n <hy-document-viewer \n previewable=\"true\"\n id=\"url-viewer\"\n src=\"http://localhost:7004/api/v1/storage/preview/my-folder%2FRNE%20Public.pdf\"\n width=\"100%\"\n height=\"500px\"\n previewable\n ></hy-document-viewer>\n `;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document.component.d.ts","sourceRoot":"","sources":["../../../src/components/document/document.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBACa,WAAY,SAAQ,UAAU;IAEzC,GAAG,EAAG,MAAM,CAAC;IAGb,KAAK,SAAU;IAGf,MAAM,SAAU;IAGhB,QAAQ,OAAQ;IAGhB,WAAW,UAAS;IAGpB,OAAO,CAAC,YAAY,CAAS;IAE7B,eAAe,SAAw0B;IAEv1B,OAAgB,MAAM,0BAgGpB;IAEO,MAAM;IA6Cf,YAAY,CAAC,CAAC,EAAE,KAAK;IA0BrB,eAAe;IAMf,gBAAgB;IAOP,oBAAoB;CAO9B"}
|
package/document.style.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document.style.d.ts","sourceRoot":"","sources":["../../../src/components/document/document.style.ts"],"names":[],"mappings":";AAEA,wBAsIE"}
|
package/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/document/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
|
package/react.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/components/document/react.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrB,CAAC"}
|