@openremote/or-attribute-picker 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,332 @@
1
+
2
+ import type { OrAssetAttributePickerPickedEvent, OrAssetAttributePicker } from "./lib/asset-attribute-picker.d.ts";
3
+ import type { OrAssetTypeAttributePickerPickedEvent, OrAssetTypeAttributePicker } from "./lib/assettype-attribute-picker.d.ts";
4
+ import type { AssettypeList } from "./lib/assettype-list.d.ts";
5
+ import type { OrAttributePickerPickedEvent, OrAttributePicker, * } from "./lib/index.d.ts";
6
+
7
+ /**
8
+ * This type can be used to create scoped tags for your components.
9
+ *
10
+ * Usage:
11
+ *
12
+ * ```ts
13
+ * import type { ScopedElements } from "path/to/library/jsx-integration";
14
+ *
15
+ * declare module "my-library" {
16
+ * namespace JSX {
17
+ * interface IntrinsicElements
18
+ * extends ScopedElements<'test-', ''> {}
19
+ * }
20
+ * }
21
+ * ```
22
+ *
23
+ * @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.
24
+ */
25
+ export type ScopedElements<
26
+ Prefix extends string = "",
27
+ Suffix extends string = ""
28
+ > = {
29
+ [Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
30
+ };
31
+
32
+ type BaseProps<T extends HTMLElement> = {
33
+
34
+ /** Content added between the opening and closing tags of the element */
35
+ children?: any;
36
+ /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
37
+ class?: string;
38
+ /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
39
+ className?: string;
40
+ /** 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. */
41
+ classList?: Record<string, boolean | undefined>;
42
+ /** Specifies the text direction of the element. */
43
+ dir?: "ltr" | "rtl";
44
+ /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
45
+ exportparts?: string;
46
+ /** For <label> and <output>, lets you associate the label with some control. */
47
+ htmlFor?: string;
48
+ /** Specifies whether the element should be hidden. */
49
+ hidden?: boolean | string;
50
+ /** A unique identifier for the element. */
51
+ id?: string;
52
+ /** Keys tell React which array item each component corresponds to */
53
+ key?: string | number;
54
+ /** Specifies the language of the element. */
55
+ lang?: string;
56
+ /** 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. */
57
+ part?: string;
58
+ /** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
59
+ ref?: T | ((e: T) => void);
60
+ /** Adds a reference for a custom element slot */
61
+ slot?: string;
62
+ /** Prop for setting inline styles */
63
+ style?: Record<string, string | number>;
64
+ /** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
65
+ tabIndex?: number;
66
+ /** Specifies the tooltip text for the element. */
67
+ title?: string;
68
+ /** Passing 'no' excludes the element content from being translated. */
69
+ translate?: "yes" | "no";
70
+ /** The popover global attribute is used to designate an element as a popover element. */
71
+ popover?: "auto" | "hint" | "manual";
72
+ /** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
73
+ popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
74
+ /** Specifies the action to be performed on a popover element being controlled by a control element. */
75
+ popovertargetaction?: "show" | "hide" | "toggle";
76
+
77
+ } ;
78
+
79
+ type BaseEvents = {
80
+
81
+
82
+ };
83
+
84
+
85
+
86
+ export type OrAssetAttributePickerProps = {
87
+ /** Callback method for consumers to filter the attribute list shown. Returning true will make the attribute visible, returning false hides it. */
88
+ "attributeFilter"?: OrAssetAttributePicker['attributeFilter'];
89
+ /** Whether selecting multiple attributes is allowed or not. */
90
+ "multiSelect"?: OrAssetAttributePicker['multiSelect'];
91
+ /** Whether only attributes with the 'STORE_DATAPOINT' meta item should be shown. */
92
+ "showOnlyDatapointAttrs"?: OrAssetAttributePicker['showOnlyDatapointAttrs'];
93
+ /** Whether only attributes with the 'RULE_STATE' meta item should be shown. */
94
+ "showOnlyRuleStateAttrs"?: OrAssetAttributePicker['showOnlyRuleStateAttrs'];
95
+ /** */
96
+ "selectedAssets"?: OrAssetAttributePicker['selectedAssets'];
97
+ /** */
98
+ "selectedAttributes"?: OrAssetAttributePicker['selectedAttributes'];
99
+
100
+ /** */
101
+ "onundefined"?: (e: CustomEvent<OrAssetAttributePickerPickedEvent>) => void;
102
+ }
103
+
104
+
105
+ export type OrAssetTypeAttributePickerProps = {
106
+ /** -Callback method for consumers to filter the asset type list shown. Returning true will make the asset type visible, returning false hides it. */
107
+ "assetTypeFilter"?: OrAssetTypeAttributePicker['assetTypeFilter'];
108
+ /** Callback method for consumers to filter the attribute list shown. Returning true will make the attribute visible, returning false hides it. */
109
+ "attributeFilter"?: OrAssetTypeAttributePicker['attributeFilter'];
110
+ /** Whether selecting multiple attributes is allowed or not. */
111
+ "multiSelect"?: OrAssetTypeAttributePicker['multiSelect'];
112
+ /** Whether only attributes with the 'STORE_DATAPOINT' meta item should be shown. */
113
+ "showOnlyDatapointAttrs"?: OrAssetTypeAttributePicker['showOnlyDatapointAttrs'];
114
+ /** Whether only attributes with the 'RULE_STATE' meta item should be shown. */
115
+ "showOnlyRuleStateAttrs"?: OrAssetTypeAttributePicker['showOnlyRuleStateAttrs'];
116
+ /** */
117
+ "selectedAttributes"?: OrAssetTypeAttributePicker['selectedAttributes'];
118
+
119
+ /** */
120
+ "onundefined"?: (e: CustomEvent<OrAssetTypeAttributePickerPickedEvent>) => void;
121
+ }
122
+
123
+
124
+ export type AssettypeListProps = {
125
+
126
+
127
+ }
128
+
129
+
130
+ export type OrAttributePickerProps = {
131
+ /** Callback method for consumers to filter the attribute list shown. Returning true will make the attribute visible, returning false hides it. */
132
+ "attributeFilter"?: OrAttributePicker['attributeFilter'];
133
+ /** Whether selecting multiple attributes is allowed or not. */
134
+ "multiSelect"?: OrAttributePicker['multiSelect'];
135
+ /** Whether only attributes with the 'STORE_DATAPOINT' meta item should be shown. */
136
+ "showOnlyDatapointAttrs"?: OrAttributePicker['showOnlyDatapointAttrs'];
137
+ /** Whether only attributes with the 'RULE_STATE' meta item should be shown. */
138
+ "showOnlyRuleStateAttrs"?: OrAttributePicker['showOnlyRuleStateAttrs'];
139
+ /** */
140
+ "selectedAssets"?: OrAttributePicker['selectedAssets'];
141
+ /** */
142
+ "selectedAttributes"?: OrAttributePicker['selectedAttributes'];
143
+
144
+ /** */
145
+ "onundefined"?: (e: CustomEvent<OrAssetAttributePickerPickedEvent>) => void;
146
+ }
147
+
148
+ export type CustomElements = {
149
+
150
+
151
+ /**
152
+ * The "Attribute Picker" component using the OrAssetTree component for selecting assets and its attributes.
153
+ *
154
+ * ## Attributes & Properties
155
+ *
156
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
157
+ *
158
+ * - `attributeFilter`: Callback method for consumers to filter the attribute list shown. Returning true will make the attribute visible, returning false hides it.
159
+ * - `multiSelect`: Whether selecting multiple attributes is allowed or not.
160
+ * - `showOnlyDatapointAttrs`: Whether only attributes with the 'STORE_DATAPOINT' meta item should be shown.
161
+ * - `showOnlyRuleStateAttrs`: Whether only attributes with the 'RULE_STATE' meta item should be shown.
162
+ * - `selectedAssets`: undefined (property only)
163
+ * - `selectedAttributes`: undefined (property only)
164
+ *
165
+ * ## Events
166
+ *
167
+ * Events that will be emitted by the component.
168
+ *
169
+ * - `undefined`: undefined
170
+ *
171
+ * ## Methods
172
+ *
173
+ * Methods that can be called to access component functionality.
174
+ *
175
+ * - `setAttributeFilter(attributeFilter: ((attribute: Attribute<any>) => boolean) | undefined) => this`: undefined
176
+ * - `setSelectedAssets(selectedAssets: string[]) => this`: undefined
177
+ * - `setSelectedAttributes(selectedAttributes: AttributeRef[]) => this`: undefined
178
+ * - `setShowOnlyDatapointAttrs(showOnlyDatapointAttrs: boolean | undefined) => this`: undefined
179
+ * - `setShowOnlyRuleStateAttrs(showOnlyRuleStateAttrs: boolean | undefined) => this`: undefined
180
+ * - `setMultiSelect(multiSelect: boolean | undefined) => this`: undefined
181
+ * - `setOpen(isOpen: boolean) => this`: undefined
182
+ * - `setHeading(heading: TemplateResult | string | undefined) => this`: undefined
183
+ * - `setContent(_content: TemplateResult | (() => TemplateResult) | undefined) => this`: undefined
184
+ * - `setActions(_actions: DialogAction[] | undefined) => this`: undefined
185
+ * - `setDismissAction(_action: DialogActionBase | null | undefined) => this`: undefined
186
+ * - `setStyles(_styles: string | TemplateResult | undefined) => this`: undefined
187
+ * - `setAvatar(_avatar: boolean | undefined) => this`: undefined
188
+ */
189
+ "or-asset-attribute-picker": Partial<OrAssetAttributePickerProps & BaseProps<OrAssetAttributePicker> & BaseEvents>;
190
+
191
+
192
+ /**
193
+ * The "Attribute Picker" component using the OrAssetTree component for selecting assets and its attributes.
194
+ *
195
+ * ## Attributes & Properties
196
+ *
197
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
198
+ *
199
+ * - `assetTypeFilter`: -Callback method for consumers to filter the asset type list shown. Returning true will make the asset type visible, returning false hides it.
200
+ * - `attributeFilter`: Callback method for consumers to filter the attribute list shown. Returning true will make the attribute visible, returning false hides it.
201
+ * - `multiSelect`: Whether selecting multiple attributes is allowed or not.
202
+ * - `showOnlyDatapointAttrs`: Whether only attributes with the 'STORE_DATAPOINT' meta item should be shown.
203
+ * - `showOnlyRuleStateAttrs`: Whether only attributes with the 'RULE_STATE' meta item should be shown.
204
+ * - `selectedAttributes`: undefined (property only)
205
+ *
206
+ * ## Events
207
+ *
208
+ * Events that will be emitted by the component.
209
+ *
210
+ * - `undefined`: undefined
211
+ *
212
+ * ## Methods
213
+ *
214
+ * Methods that can be called to access component functionality.
215
+ *
216
+ * - `setSelectedAttributes(selectedAttributes: Map<string, AttributeDescriptor[]>) => void`: undefined
217
+ * - `setShowOnlyDatapointAttrs(showOnlyDatapointAttrs: boolean | undefined) => this`: undefined
218
+ * - `setShowOnlyRuleStateAttrs(showOnlyRuleStateAttrs: boolean | undefined) => this`: undefined
219
+ * - `setMultiSelect(multiSelect: boolean | undefined) => this`: undefined
220
+ * - `setOpen(isOpen: boolean) => this`: undefined
221
+ * - `setHeading(heading: TemplateResult | string | undefined) => this`: undefined
222
+ * - `setContent(_content: TemplateResult | (() => TemplateResult) | undefined) => this`: undefined
223
+ * - `setActions(_actions: DialogAction[] | undefined) => this`: undefined
224
+ * - `setDismissAction(_action: DialogActionBase | null | undefined) => this`: undefined
225
+ * - `setStyles(_styles: string | TemplateResult | undefined) => this`: undefined
226
+ * - `setAvatar(_avatar: boolean | undefined) => this`: undefined
227
+ */
228
+ "or-assettype-attribute-picker": Partial<OrAssetTypeAttributePickerProps & BaseProps<OrAssetTypeAttributePicker> & BaseEvents>;
229
+
230
+
231
+ /**
232
+ *
233
+ */
234
+ "asset-type-list": Partial<AssettypeListProps & BaseProps<AssettypeList> & BaseEvents>;
235
+
236
+
237
+ /**
238
+ * @deprecated Replaced this class with {@link OrAssetAttributePicker}.
239
+ *
240
+ * Dialog to pick attributes of supplied asset(s).
241
+ *
242
+ * ## Attributes & Properties
243
+ *
244
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
245
+ *
246
+ * - `attributeFilter`: Callback method for consumers to filter the attribute list shown. Returning true will make the attribute visible, returning false hides it.
247
+ * - `multiSelect`: Whether selecting multiple attributes is allowed or not.
248
+ * - `showOnlyDatapointAttrs`: Whether only attributes with the 'STORE_DATAPOINT' meta item should be shown.
249
+ * - `showOnlyRuleStateAttrs`: Whether only attributes with the 'RULE_STATE' meta item should be shown.
250
+ * - `selectedAssets`: undefined (property only)
251
+ * - `selectedAttributes`: undefined (property only)
252
+ *
253
+ * ## Events
254
+ *
255
+ * Events that will be emitted by the component.
256
+ *
257
+ * - `undefined`: undefined
258
+ *
259
+ * ## Methods
260
+ *
261
+ * Methods that can be called to access component functionality.
262
+ *
263
+ * - `setAttributeFilter(attributeFilter: ((attribute: Attribute<any>) => boolean) | undefined) => this`: undefined
264
+ * - `setSelectedAssets(selectedAssets: string[]) => this`: undefined
265
+ * - `setSelectedAttributes(selectedAttributes: AttributeRef[]) => this`: undefined
266
+ * - `setShowOnlyDatapointAttrs(showOnlyDatapointAttrs: boolean | undefined) => this`: undefined
267
+ * - `setShowOnlyRuleStateAttrs(showOnlyRuleStateAttrs: boolean | undefined) => this`: undefined
268
+ * - `setMultiSelect(multiSelect: boolean | undefined) => this`: undefined
269
+ * - `setOpen(isOpen: boolean) => this`: undefined
270
+ * - `setHeading(heading: TemplateResult | string | undefined) => this`: undefined
271
+ * - `setContent(_content: TemplateResult | (() => TemplateResult) | undefined) => this`: undefined
272
+ * - `setActions(_actions: DialogAction[] | undefined) => this`: undefined
273
+ * - `setDismissAction(_action: DialogActionBase | null | undefined) => this`: undefined
274
+ * - `setStyles(_styles: string | TemplateResult | undefined) => this`: undefined
275
+ * - `setAvatar(_avatar: boolean | undefined) => this`: undefined
276
+ */
277
+ "or-attribute-picker": Partial<OrAttributePickerProps & BaseProps<OrAttributePicker> & BaseEvents>;
278
+ }
279
+
280
+ export type CustomCssProperties = {
281
+
282
+ }
283
+
284
+
285
+ declare module 'react' {
286
+ namespace JSX {
287
+ interface IntrinsicElements extends CustomElements {}
288
+ }
289
+ export interface CSSProperties extends CustomCssProperties {}
290
+ }
291
+
292
+ declare module 'preact' {
293
+ namespace JSX {
294
+ interface IntrinsicElements extends CustomElements {}
295
+ }
296
+ export interface CSSProperties extends CustomCssProperties {}
297
+ }
298
+
299
+ declare module '@builder.io/qwik' {
300
+ namespace JSX {
301
+ interface IntrinsicElements extends CustomElements {}
302
+ }
303
+ export interface CSSProperties extends CustomCssProperties {}
304
+ }
305
+
306
+ declare module '@stencil/core' {
307
+ namespace JSX {
308
+ interface IntrinsicElements extends CustomElements {}
309
+ }
310
+ export interface CSSProperties extends CustomCssProperties {}
311
+ }
312
+
313
+ declare module 'hono/jsx' {
314
+ namespace JSX {
315
+ interface IntrinsicElements extends CustomElements {}
316
+ }
317
+ export interface CSSProperties extends CustomCssProperties {}
318
+ }
319
+
320
+ declare module 'react-native' {
321
+ namespace JSX {
322
+ interface IntrinsicElements extends CustomElements {}
323
+ }
324
+ export interface CSSProperties extends CustomCssProperties {}
325
+ }
326
+
327
+ declare global {
328
+ namespace JSX {
329
+ interface IntrinsicElements extends CustomElements {}
330
+ }
331
+ export interface CSSProperties extends CustomCssProperties {}
332
+ }