@openremote/or-asset-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.
@@ -0,0 +1,254 @@
1
+
2
+ import type { getIncludedProperties, getIncludedAttributes, OrAssetViewerComputeGridEvent, OrAssetViewerRequestSaveEvent, OrAssetViewerSaveEvent, OrAssetViewerRequestEditToggleEvent, OrAssetViewerEditToggleEvent, OrAssetViewerLoadUserEvent, OrAssetViewerLoadAlarmEvent, getPanel, getAttributeTemplate, getPropertyTemplate, getField, saveAsset, DEFAULT_ASSET_PROPERTIES, DEFAULT_VIEWER_CONFIG, OrAssetViewer } from "./lib/index.d.ts";
3
+ import type { OrAddAttributePanelAttributeChangedEvent, OrAddAttributePanel } from "./lib/or-add-attribute-panel.d.ts";
4
+ import type { OrEditAssetModifiedEvent, OrEditAssetPanel } from "./lib/or-edit-asset-panel.d.ts";
5
+
6
+ /**
7
+ * This type can be used to create scoped tags for your components.
8
+ *
9
+ * Usage:
10
+ *
11
+ * ```ts
12
+ * import type { ScopedElements } from "path/to/library/jsx-integration";
13
+ *
14
+ * declare module "my-library" {
15
+ * namespace JSX {
16
+ * interface IntrinsicElements
17
+ * extends ScopedElements<'test-', ''> {}
18
+ * }
19
+ * }
20
+ * ```
21
+ *
22
+ * @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.
23
+ */
24
+ export type ScopedElements<
25
+ Prefix extends string = "",
26
+ Suffix extends string = ""
27
+ > = {
28
+ [Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
29
+ };
30
+
31
+ type BaseProps<T extends HTMLElement> = {
32
+
33
+ /** Content added between the opening and closing tags of the element */
34
+ children?: any;
35
+ /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
36
+ class?: string;
37
+ /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
38
+ className?: string;
39
+ /** 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. */
40
+ classList?: Record<string, boolean | undefined>;
41
+ /** Specifies the text direction of the element. */
42
+ dir?: "ltr" | "rtl";
43
+ /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
44
+ exportparts?: string;
45
+ /** For <label> and <output>, lets you associate the label with some control. */
46
+ htmlFor?: string;
47
+ /** Specifies whether the element should be hidden. */
48
+ hidden?: boolean | string;
49
+ /** A unique identifier for the element. */
50
+ id?: string;
51
+ /** Keys tell React which array item each component corresponds to */
52
+ key?: string | number;
53
+ /** Specifies the language of the element. */
54
+ lang?: string;
55
+ /** 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. */
56
+ part?: string;
57
+ /** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
58
+ ref?: T | ((e: T) => void);
59
+ /** Adds a reference for a custom element slot */
60
+ slot?: string;
61
+ /** Prop for setting inline styles */
62
+ style?: Record<string, string | number>;
63
+ /** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
64
+ tabIndex?: number;
65
+ /** Specifies the tooltip text for the element. */
66
+ title?: string;
67
+ /** Passing 'no' excludes the element content from being translated. */
68
+ translate?: "yes" | "no";
69
+ /** The popover global attribute is used to designate an element as a popover element. */
70
+ popover?: "auto" | "hint" | "manual";
71
+ /** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
72
+ popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
73
+ /** Specifies the action to be performed on a popover element being controlled by a control element. */
74
+ popovertargetaction?: "show" | "hide" | "toggle";
75
+
76
+ } ;
77
+
78
+ type BaseEvents = {
79
+
80
+
81
+ };
82
+
83
+
84
+
85
+ export type OrAssetViewerProps = {
86
+ /** */
87
+ "asset"?: OrAssetViewer['asset'];
88
+ /** */
89
+ "assetId"?: OrAssetViewer['assetId'];
90
+ /** */
91
+ "config"?: OrAssetViewer['config'];
92
+ /** */
93
+ "editMode"?: OrAssetViewer['editMode'];
94
+ /** */
95
+ "readonly"?: OrAssetViewer['readonly'];
96
+ /** When language is changed, we clear the cached templates,
97
+ so can be rendered differently according to the selected language. */
98
+ "langChangedCallback"?: OrAssetViewer['langChangedCallback'];
99
+
100
+ /** */
101
+ "onedit"?: (e: CustomEvent<OrAssetViewerEditToggleEvent>) => void;
102
+ /** */
103
+ "onsaveResult"?: (e: CustomEvent<OrAssetViewerSaveEvent>) => void;
104
+ }
105
+
106
+
107
+ export type OrAddAttributePanelProps = {
108
+ /** */
109
+ "isCustom"?: OrAddAttributePanel['isCustom'];
110
+ /** */
111
+ "isArray"?: OrAddAttributePanel['isArray'];
112
+ /** */
113
+ "arrayDimensions"?: OrAddAttributePanel['arrayDimensions'];
114
+
115
+ /** */
116
+ "onundefined"?: (e: CustomEvent<OrAddAttributePanelAttributeChangedEvent>) => void;
117
+ }
118
+
119
+
120
+ export type OrEditAssetPanelProps = {
121
+
122
+ /** */
123
+ "onundefined"?: (e: CustomEvent<OrEditAssetModifiedEvent>) => void;
124
+ }
125
+
126
+ export type CustomElements = {
127
+
128
+
129
+ /**
130
+ *
131
+ *
132
+ * ## Attributes & Properties
133
+ *
134
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
135
+ *
136
+ * - `asset`: undefined
137
+ * - `assetId`: undefined
138
+ * - `config`: undefined
139
+ * - `editMode`: undefined
140
+ * - `readonly`: undefined
141
+ * - `langChangedCallback`: When language is changed, we clear the cached templates,
142
+ * so can be rendered differently according to the selected language. (property only)
143
+ *
144
+ * ## Events
145
+ *
146
+ * Events that will be emitted by the component.
147
+ *
148
+ * - `edit`: undefined
149
+ * - `saveResult`: undefined
150
+ *
151
+ * ## Methods
152
+ *
153
+ * Methods that can be called to access component functionality.
154
+ *
155
+ * - `isModified() => void`: undefined
156
+ * - `loadAssetInfo(asset: Asset) => Promise<AssetInfo>`: undefined
157
+ * - `save() => void`: undefined
158
+ * - `_onEvent(event: SharedEvent) => void`: undefined
159
+ */
160
+ "or-asset-viewer": Partial<OrAssetViewerProps & BaseProps<OrAssetViewer> & BaseEvents>;
161
+
162
+
163
+ /**
164
+ *
165
+ *
166
+ * ## Attributes & Properties
167
+ *
168
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
169
+ *
170
+ * - `isCustom`: undefined
171
+ * - `isArray`: undefined
172
+ * - `arrayDimensions`: undefined
173
+ *
174
+ * ## Events
175
+ *
176
+ * Events that will be emitted by the component.
177
+ *
178
+ * - `undefined`: undefined
179
+ */
180
+ "or-add-attribute-panel": Partial<OrAddAttributePanelProps & BaseProps<OrAddAttributePanel> & BaseEvents>;
181
+
182
+
183
+ /**
184
+ *
185
+ *
186
+ * ## Events
187
+ *
188
+ * Events that will be emitted by the component.
189
+ *
190
+ * - `undefined`: undefined
191
+ *
192
+ * ## Methods
193
+ *
194
+ * Methods that can be called to access component functionality.
195
+ *
196
+ * - `attributeUpdated(attributeName: string) => void`: undefined
197
+ * - `validate() => ValidatorResult[]`: undefined
198
+ */
199
+ "or-edit-asset-panel": Partial<OrEditAssetPanelProps & BaseProps<OrEditAssetPanel> & BaseEvents>;
200
+ }
201
+
202
+ export type CustomCssProperties = {
203
+
204
+ }
205
+
206
+
207
+ declare module 'react' {
208
+ namespace JSX {
209
+ interface IntrinsicElements extends CustomElements {}
210
+ }
211
+ export interface CSSProperties extends CustomCssProperties {}
212
+ }
213
+
214
+ declare module 'preact' {
215
+ namespace JSX {
216
+ interface IntrinsicElements extends CustomElements {}
217
+ }
218
+ export interface CSSProperties extends CustomCssProperties {}
219
+ }
220
+
221
+ declare module '@builder.io/qwik' {
222
+ namespace JSX {
223
+ interface IntrinsicElements extends CustomElements {}
224
+ }
225
+ export interface CSSProperties extends CustomCssProperties {}
226
+ }
227
+
228
+ declare module '@stencil/core' {
229
+ namespace JSX {
230
+ interface IntrinsicElements extends CustomElements {}
231
+ }
232
+ export interface CSSProperties extends CustomCssProperties {}
233
+ }
234
+
235
+ declare module 'hono/jsx' {
236
+ namespace JSX {
237
+ interface IntrinsicElements extends CustomElements {}
238
+ }
239
+ export interface CSSProperties extends CustomCssProperties {}
240
+ }
241
+
242
+ declare module 'react-native' {
243
+ namespace JSX {
244
+ interface IntrinsicElements extends CustomElements {}
245
+ }
246
+ export interface CSSProperties extends CustomCssProperties {}
247
+ }
248
+
249
+ declare global {
250
+ namespace JSX {
251
+ interface IntrinsicElements extends CustomElements {}
252
+ }
253
+ export interface CSSProperties extends CustomCssProperties {}
254
+ }
@@ -506,7 +506,10 @@
506
506
  {
507
507
  "kind": "method",
508
508
  "name": "isModified",
509
- "privacy": "public"
509
+ "privacy": "public",
510
+ "type": {
511
+ "text": "isModified() => void"
512
+ }
510
513
  },
511
514
  {
512
515
  "kind": "field",
@@ -528,7 +531,10 @@
528
531
  "text": "Asset"
529
532
  }
530
533
  }
531
- ]
534
+ ],
535
+ "type": {
536
+ "text": "loadAssetInfo(asset: Asset) => Promise<AssetInfo>"
537
+ }
532
538
  },
533
539
  {
534
540
  "kind": "method",
@@ -578,7 +584,10 @@
578
584
  },
579
585
  {
580
586
  "kind": "method",
581
- "name": "save"
587
+ "name": "save",
588
+ "type": {
589
+ "text": "save() => void"
590
+ }
582
591
  },
583
592
  {
584
593
  "kind": "method",
@@ -603,7 +612,10 @@
603
612
  "text": "SharedEvent"
604
613
  }
605
614
  }
606
- ]
615
+ ],
616
+ "type": {
617
+ "text": "_onEvent(event: SharedEvent) => void"
618
+ }
607
619
  },
608
620
  {
609
621
  "kind": "method",
@@ -690,7 +702,9 @@
690
702
  "package": "lit"
691
703
  },
692
704
  "tagName": "or-asset-viewer",
693
- "customElement": true
705
+ "customElement": true,
706
+ "modulePath": "src/index.ts",
707
+ "definitionPath": "src/index.ts"
694
708
  }
695
709
  ],
696
710
  "exports": [
@@ -1062,7 +1076,9 @@
1062
1076
  "package": "lit"
1063
1077
  },
1064
1078
  "tagName": "or-add-attribute-panel",
1065
- "customElement": true
1079
+ "customElement": true,
1080
+ "modulePath": "src/or-add-attribute-panel.ts",
1081
+ "definitionPath": "src/or-add-attribute-panel.ts"
1066
1082
  }
1067
1083
  ],
1068
1084
  "exports": [
@@ -1169,7 +1185,10 @@
1169
1185
  "text": "string"
1170
1186
  }
1171
1187
  }
1172
- ]
1188
+ ],
1189
+ "type": {
1190
+ "text": "attributeUpdated(attributeName: string) => void"
1191
+ }
1173
1192
  },
1174
1193
  {
1175
1194
  "kind": "method",
@@ -1208,6 +1227,9 @@
1208
1227
  "type": {
1209
1228
  "text": "ValidatorResult[]"
1210
1229
  }
1230
+ },
1231
+ "type": {
1232
+ "text": "validate() => ValidatorResult[]"
1211
1233
  }
1212
1234
  },
1213
1235
  {
@@ -1314,7 +1336,9 @@
1314
1336
  "package": "lit"
1315
1337
  },
1316
1338
  "tagName": "or-edit-asset-panel",
1317
- "customElement": true
1339
+ "customElement": true,
1340
+ "modulePath": "src/or-edit-asset-panel.ts",
1341
+ "definitionPath": "src/or-edit-asset-panel.ts"
1318
1342
  }
1319
1343
  ],
1320
1344
  "exports": [