@openremote/or-data-viewer 1.11.0-snapshot.20251103144513 → 1.11.0
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/custom-elements-jsx.d.ts +179 -0
- package/custom-elements.json +19 -5
- package/dist/umd/index.orbundle.js +1 -1
- package/dist/umd/index.orbundle.js.map +1 -1
- package/package.json +11 -8
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
|
|
2
|
+
import type { OrDataViewerRenderCompleteEvent, OrDataViewerConfigInvalidEvent, OrDataViewer } from "./lib/index.d.ts";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This type can be used to create scoped tags for your components.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import type { ScopedElements } from "path/to/library/jsx-integration";
|
|
11
|
+
*
|
|
12
|
+
* declare module "my-library" {
|
|
13
|
+
* namespace JSX {
|
|
14
|
+
* interface IntrinsicElements
|
|
15
|
+
* extends ScopedElements<'test-', ''> {}
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @deprecated Runtime scoped elements result in duplicate types and can confusing for developers. It is recommended to use the `prefix` and `suffix` options to generate new types instead.
|
|
21
|
+
*/
|
|
22
|
+
export type ScopedElements<
|
|
23
|
+
Prefix extends string = "",
|
|
24
|
+
Suffix extends string = ""
|
|
25
|
+
> = {
|
|
26
|
+
[Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type BaseProps<T extends HTMLElement> = {
|
|
30
|
+
|
|
31
|
+
/** Content added between the opening and closing tags of the element */
|
|
32
|
+
children?: any;
|
|
33
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
34
|
+
class?: string;
|
|
35
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
|
|
38
|
+
classList?: Record<string, boolean | undefined>;
|
|
39
|
+
/** Specifies the text direction of the element. */
|
|
40
|
+
dir?: "ltr" | "rtl";
|
|
41
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
42
|
+
exportparts?: string;
|
|
43
|
+
/** For <label> and <output>, lets you associate the label with some control. */
|
|
44
|
+
htmlFor?: string;
|
|
45
|
+
/** Specifies whether the element should be hidden. */
|
|
46
|
+
hidden?: boolean | string;
|
|
47
|
+
/** A unique identifier for the element. */
|
|
48
|
+
id?: string;
|
|
49
|
+
/** Keys tell React which array item each component corresponds to */
|
|
50
|
+
key?: string | number;
|
|
51
|
+
/** Specifies the language of the element. */
|
|
52
|
+
lang?: string;
|
|
53
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
54
|
+
part?: string;
|
|
55
|
+
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
56
|
+
ref?: T | ((e: T) => void);
|
|
57
|
+
/** Adds a reference for a custom element slot */
|
|
58
|
+
slot?: string;
|
|
59
|
+
/** Prop for setting inline styles */
|
|
60
|
+
style?: Record<string, string | number>;
|
|
61
|
+
/** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
|
|
62
|
+
tabIndex?: number;
|
|
63
|
+
/** Specifies the tooltip text for the element. */
|
|
64
|
+
title?: string;
|
|
65
|
+
/** Passing 'no' excludes the element content from being translated. */
|
|
66
|
+
translate?: "yes" | "no";
|
|
67
|
+
/** The popover global attribute is used to designate an element as a popover element. */
|
|
68
|
+
popover?: "auto" | "hint" | "manual";
|
|
69
|
+
/** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
|
|
70
|
+
popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
|
|
71
|
+
/** Specifies the action to be performed on a popover element being controlled by a control element. */
|
|
72
|
+
popovertargetaction?: "show" | "hide" | "toggle";
|
|
73
|
+
|
|
74
|
+
} ;
|
|
75
|
+
|
|
76
|
+
type BaseEvents = {
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
export type OrDataViewerProps = {
|
|
84
|
+
/** */
|
|
85
|
+
"config"?: OrDataViewer['config'];
|
|
86
|
+
/** */
|
|
87
|
+
"_loading"?: OrDataViewer['_loading'];
|
|
88
|
+
/** */
|
|
89
|
+
"realm"?: OrDataViewer['realm'];
|
|
90
|
+
|
|
91
|
+
/** */
|
|
92
|
+
"onundefined"?: (e: CustomEvent<OrDataViewerConfigInvalidEvent>) => void;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type CustomElements = {
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
*
|
|
101
|
+
* ## Attributes & Properties
|
|
102
|
+
*
|
|
103
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
104
|
+
*
|
|
105
|
+
* - `config`: undefined
|
|
106
|
+
* - `_loading`: undefined
|
|
107
|
+
* - `realm`: undefined
|
|
108
|
+
*
|
|
109
|
+
* ## Events
|
|
110
|
+
*
|
|
111
|
+
* Events that will be emitted by the component.
|
|
112
|
+
*
|
|
113
|
+
* - `undefined`: undefined
|
|
114
|
+
*
|
|
115
|
+
* ## Methods
|
|
116
|
+
*
|
|
117
|
+
* Methods that can be called to access component functionality.
|
|
118
|
+
*
|
|
119
|
+
* - `generateGrid(shadowRoot: ShadowRoot | null) => void`: undefined
|
|
120
|
+
* - `refresh() => void`: undefined
|
|
121
|
+
* - `getPanel(name: string, panelConfig: PanelConfig) => TemplateResult`: undefined
|
|
122
|
+
* - `getPanelContent(panelName: string, panelConfig: PanelConfig) => TemplateResult | undefined`: undefined
|
|
123
|
+
*/
|
|
124
|
+
"or-data-viewer": Partial<OrDataViewerProps & BaseProps<OrDataViewer> & BaseEvents>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type CustomCssProperties = {
|
|
128
|
+
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
declare module 'react' {
|
|
133
|
+
namespace JSX {
|
|
134
|
+
interface IntrinsicElements extends CustomElements {}
|
|
135
|
+
}
|
|
136
|
+
export interface CSSProperties extends CustomCssProperties {}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare module 'preact' {
|
|
140
|
+
namespace JSX {
|
|
141
|
+
interface IntrinsicElements extends CustomElements {}
|
|
142
|
+
}
|
|
143
|
+
export interface CSSProperties extends CustomCssProperties {}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare module '@builder.io/qwik' {
|
|
147
|
+
namespace JSX {
|
|
148
|
+
interface IntrinsicElements extends CustomElements {}
|
|
149
|
+
}
|
|
150
|
+
export interface CSSProperties extends CustomCssProperties {}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare module '@stencil/core' {
|
|
154
|
+
namespace JSX {
|
|
155
|
+
interface IntrinsicElements extends CustomElements {}
|
|
156
|
+
}
|
|
157
|
+
export interface CSSProperties extends CustomCssProperties {}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare module 'hono/jsx' {
|
|
161
|
+
namespace JSX {
|
|
162
|
+
interface IntrinsicElements extends CustomElements {}
|
|
163
|
+
}
|
|
164
|
+
export interface CSSProperties extends CustomCssProperties {}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare module 'react-native' {
|
|
168
|
+
namespace JSX {
|
|
169
|
+
interface IntrinsicElements extends CustomElements {}
|
|
170
|
+
}
|
|
171
|
+
export interface CSSProperties extends CustomCssProperties {}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
declare global {
|
|
175
|
+
namespace JSX {
|
|
176
|
+
interface IntrinsicElements extends CustomElements {}
|
|
177
|
+
}
|
|
178
|
+
export interface CSSProperties extends CustomCssProperties {}
|
|
179
|
+
}
|
package/custom-elements.json
CHANGED
|
@@ -87,7 +87,10 @@
|
|
|
87
87
|
"text": "ShadowRoot | null"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
]
|
|
90
|
+
],
|
|
91
|
+
"type": {
|
|
92
|
+
"text": "generateGrid(shadowRoot: ShadowRoot | null) => void"
|
|
93
|
+
}
|
|
91
94
|
},
|
|
92
95
|
{
|
|
93
96
|
"kind": "field",
|
|
@@ -133,7 +136,10 @@
|
|
|
133
136
|
{
|
|
134
137
|
"kind": "method",
|
|
135
138
|
"name": "refresh",
|
|
136
|
-
"privacy": "public"
|
|
139
|
+
"privacy": "public",
|
|
140
|
+
"type": {
|
|
141
|
+
"text": "refresh() => void"
|
|
142
|
+
}
|
|
137
143
|
},
|
|
138
144
|
{
|
|
139
145
|
"kind": "method",
|
|
@@ -157,7 +163,10 @@
|
|
|
157
163
|
"text": "PanelConfig"
|
|
158
164
|
}
|
|
159
165
|
}
|
|
160
|
-
]
|
|
166
|
+
],
|
|
167
|
+
"type": {
|
|
168
|
+
"text": "getPanel(name: string, panelConfig: PanelConfig) => TemplateResult"
|
|
169
|
+
}
|
|
161
170
|
},
|
|
162
171
|
{
|
|
163
172
|
"kind": "method",
|
|
@@ -181,7 +190,10 @@
|
|
|
181
190
|
"text": "PanelConfig"
|
|
182
191
|
}
|
|
183
192
|
}
|
|
184
|
-
]
|
|
193
|
+
],
|
|
194
|
+
"type": {
|
|
195
|
+
"text": "getPanelContent(panelName: string, panelConfig: PanelConfig) => TemplateResult | undefined"
|
|
196
|
+
}
|
|
185
197
|
},
|
|
186
198
|
{
|
|
187
199
|
"kind": "method",
|
|
@@ -236,7 +248,9 @@
|
|
|
236
248
|
"package": "lit"
|
|
237
249
|
},
|
|
238
250
|
"tagName": "or-data-viewer",
|
|
239
|
-
"customElement": true
|
|
251
|
+
"customElement": true,
|
|
252
|
+
"modulePath": "src/index.ts",
|
|
253
|
+
"definitionPath": "src/index.ts"
|
|
240
254
|
}
|
|
241
255
|
],
|
|
242
256
|
"exports": [
|