@nullplatform/ui-plugin-sdk 0.6.1 → 0.7.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/dist/bridge.d.ts +3 -0
- package/dist/bridge.js +6 -0
- package/dist/catalog.d.ts +9 -1
- package/dist/components.generated.d.ts +269 -0
- package/dist/components.generated.js +31 -1
- package/dist/context.d.ts +1 -0
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.js +1 -0
- package/dist/contract/manifest.d.ts +2 -0
- package/dist/contract/manifest.js +43 -0
- package/dist/contract/topics.d.ts +40 -0
- package/dist/contract/topics.js +128 -0
- package/dist/contract-cjs/index.js +12 -1
- package/dist/contract-cjs/manifest.js +43 -0
- package/dist/contract-cjs/topics.js +140 -0
- package/dist/contracts.generated.d.ts +370 -0
- package/dist/contracts.generated.js +211 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/protocol.d.ts +21 -0
- package/dist/topics.d.ts +75 -0
- package/dist/topics.js +146 -0
- package/dist/worker.js +4 -0
- package/package.json +2 -2
|
@@ -4,6 +4,7 @@ exports.ManifestError = exports.PROTOCOL_VERSION = void 0;
|
|
|
4
4
|
exports.isSectionSlot = isSectionSlot;
|
|
5
5
|
exports.validateManifest = validateManifest;
|
|
6
6
|
const when_1 = require("./when");
|
|
7
|
+
const topics_1 = require("./topics");
|
|
7
8
|
exports.PROTOCOL_VERSION = 1;
|
|
8
9
|
class ManifestError extends Error {
|
|
9
10
|
constructor(message) {
|
|
@@ -102,6 +103,9 @@ function validateManifest(input) {
|
|
|
102
103
|
return { host, method: readMethod(p.method, where), path: readPath(p.path, where) };
|
|
103
104
|
});
|
|
104
105
|
}
|
|
106
|
+
if (rawPermissions.topics !== undefined) {
|
|
107
|
+
permissions.topics = readTopicPermissions(rawPermissions.topics, m.id);
|
|
108
|
+
}
|
|
105
109
|
return {
|
|
106
110
|
protocol: exports.PROTOCOL_VERSION,
|
|
107
111
|
id: m.id,
|
|
@@ -112,3 +116,42 @@ function validateManifest(input) {
|
|
|
112
116
|
contributes,
|
|
113
117
|
};
|
|
114
118
|
}
|
|
119
|
+
function readTopicPermissions(raw, pluginId) {
|
|
120
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
121
|
+
throw new ManifestError('permissions.topics must be an object');
|
|
122
|
+
const t = raw;
|
|
123
|
+
const topics = {};
|
|
124
|
+
if (t.consume !== undefined) {
|
|
125
|
+
if (!Array.isArray(t.consume))
|
|
126
|
+
throw new ManifestError('permissions.topics.consume must be an array');
|
|
127
|
+
topics.consume = t.consume.map((item, index) => {
|
|
128
|
+
const where = `permissions.topics.consume[${index}]`;
|
|
129
|
+
const c = (item ?? {});
|
|
130
|
+
if (!(0, topics_1.isTopicName)(c.topic))
|
|
131
|
+
throw new ManifestError(`${where}.topic must look like np.<name>@<major> or <plugin>/<name>@<major>`);
|
|
132
|
+
if (c.fields === undefined) {
|
|
133
|
+
// Host topics carry page data: a plugin names what it reads instead of getting everything.
|
|
134
|
+
if ((0, topics_1.isHostTopic)(c.topic))
|
|
135
|
+
throw new ManifestError(`${where}.fields is required for host topics`);
|
|
136
|
+
return { topic: c.topic };
|
|
137
|
+
}
|
|
138
|
+
if (!Array.isArray(c.fields) || c.fields.length === 0 || !c.fields.every(topics_1.isFieldPath)) {
|
|
139
|
+
throw new ManifestError(`${where}.fields must be a non-empty list of dot paths`);
|
|
140
|
+
}
|
|
141
|
+
return { topic: c.topic, fields: [...c.fields] };
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
if (t.provide !== undefined) {
|
|
145
|
+
if (!Array.isArray(t.provide))
|
|
146
|
+
throw new ManifestError('permissions.topics.provide must be an array');
|
|
147
|
+
topics.provide = t.provide.map((item, index) => {
|
|
148
|
+
const where = `permissions.topics.provide[${index}]`;
|
|
149
|
+
const p = (item ?? {});
|
|
150
|
+
if (!(0, topics_1.isTopicName)(p.topic) || (0, topics_1.topicOwner)(p.topic) !== pluginId) {
|
|
151
|
+
throw new ManifestError(`${where}.topic must be one of this plugin's topics: ${pluginId}/<name>@<major>`);
|
|
152
|
+
}
|
|
153
|
+
return { topic: p.topic };
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return topics;
|
|
157
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Topics: named values shared on a page, brokered by the host. A topic keeps only its latest value.
|
|
4
|
+
*
|
|
5
|
+
* - `np.<name>@<major>` topics belong to the host (the page publishes them, e.g. `np.service.draft@1`).
|
|
6
|
+
* - `<pluginId>/<name>@<major>` topics belong to that plugin; only it can set them.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.TOPIC_VALUE_MAX_CHARS = void 0;
|
|
10
|
+
exports.isTopicName = isTopicName;
|
|
11
|
+
exports.isHostTopic = isHostTopic;
|
|
12
|
+
exports.topicOwner = topicOwner;
|
|
13
|
+
exports.isFieldPath = isFieldPath;
|
|
14
|
+
exports.consumeGrant = consumeGrant;
|
|
15
|
+
exports.canProvideTopic = canProvideTopic;
|
|
16
|
+
exports.projectFields = projectFields;
|
|
17
|
+
exports.redactBySchema = redactBySchema;
|
|
18
|
+
exports.assertTopicValue = assertTopicValue;
|
|
19
|
+
const HOST_TOPIC = /^np(\.[a-z][a-z0-9]*)+@[1-9][0-9]*$/;
|
|
20
|
+
const PLUGIN_TOPIC = /^[a-z0-9][a-z0-9-]{1,63}\/[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)*@[1-9][0-9]*$/;
|
|
21
|
+
const FIELD_PATH = /^[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)*$/;
|
|
22
|
+
/** Largest value a topic accepts, measured as JSON. */
|
|
23
|
+
exports.TOPIC_VALUE_MAX_CHARS = 64 * 1024;
|
|
24
|
+
function isTopicName(topic) {
|
|
25
|
+
return typeof topic === 'string' && (HOST_TOPIC.test(topic) || PLUGIN_TOPIC.test(topic));
|
|
26
|
+
}
|
|
27
|
+
function isHostTopic(topic) {
|
|
28
|
+
return HOST_TOPIC.test(topic);
|
|
29
|
+
}
|
|
30
|
+
/** The plugin id that owns a plugin topic, or undefined for host topics. */
|
|
31
|
+
function topicOwner(topic) {
|
|
32
|
+
return PLUGIN_TOPIC.test(topic) ? topic.slice(0, topic.indexOf('/')) : undefined;
|
|
33
|
+
}
|
|
34
|
+
function isFieldPath(path) {
|
|
35
|
+
return typeof path === 'string' && FIELD_PATH.test(path) && !path.split('.').some((part) => ['__proto__', 'constructor', 'prototype'].includes(part));
|
|
36
|
+
}
|
|
37
|
+
/** The consume grant for a topic, if the plugin declared one. A plugin can always read the topics it provides. */
|
|
38
|
+
function consumeGrant(permissions, topic) {
|
|
39
|
+
const declared = permissions?.consume?.find((item) => item.topic === topic);
|
|
40
|
+
if (declared)
|
|
41
|
+
return declared;
|
|
42
|
+
if (permissions?.provide?.some((item) => item.topic === topic))
|
|
43
|
+
return { topic };
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
function canProvideTopic(permissions, pluginId, topic) {
|
|
47
|
+
return topicOwner(topic) === pluginId && Boolean(permissions?.provide?.some((item) => item.topic === topic));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Keeps only the given dot paths of `value`. Without `fields`, returns the value whole.
|
|
51
|
+
* A path that crosses an array keeps that array's elements projected to the rest of the path.
|
|
52
|
+
*/
|
|
53
|
+
function projectFields(value, fields) {
|
|
54
|
+
if (!fields)
|
|
55
|
+
return value;
|
|
56
|
+
if (value === null || typeof value !== 'object')
|
|
57
|
+
return undefined;
|
|
58
|
+
const out = {};
|
|
59
|
+
for (const field of fields)
|
|
60
|
+
copyPath(value, out, field.split('.'));
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
63
|
+
function copyPath(source, target, path) {
|
|
64
|
+
if (source === null || typeof source !== 'object' || Array.isArray(source))
|
|
65
|
+
return;
|
|
66
|
+
const [head, ...rest] = path;
|
|
67
|
+
if (!Object.prototype.hasOwnProperty.call(source, head))
|
|
68
|
+
return;
|
|
69
|
+
const child = source[head];
|
|
70
|
+
if (rest.length === 0) {
|
|
71
|
+
target[head] = child;
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (Array.isArray(child)) {
|
|
75
|
+
const existing = Array.isArray(target[head]) ? target[head] : child.map(() => ({}));
|
|
76
|
+
child.forEach((item, index) => copyPath(item, existing[index], rest));
|
|
77
|
+
target[head] = existing;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const next = (target[head] && typeof target[head] === 'object' ? target[head] : {});
|
|
81
|
+
copyPath(child, next, rest);
|
|
82
|
+
if (Object.keys(next).length > 0)
|
|
83
|
+
target[head] = next;
|
|
84
|
+
}
|
|
85
|
+
/** Same marks nullplatform uses to mask service attributes: `secret: true` or `export.secret`. */
|
|
86
|
+
function isSecret(schema) {
|
|
87
|
+
const exported = schema.export;
|
|
88
|
+
return schema.secret === true || (Boolean(exported) && typeof exported === 'object' && exported.secret === true);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Removes every value the JSON schema marks as secret, at any depth: object properties, array items,
|
|
92
|
+
* `additionalProperties` and the branches of `allOf` / `anyOf` / `oneOf`. Returns a new value.
|
|
93
|
+
*/
|
|
94
|
+
function redactBySchema(value, schema) {
|
|
95
|
+
if (!schema || typeof schema !== 'object')
|
|
96
|
+
return value;
|
|
97
|
+
const node = schema;
|
|
98
|
+
if (isSecret(node))
|
|
99
|
+
return undefined;
|
|
100
|
+
if (Array.isArray(value)) {
|
|
101
|
+
const items = node.items;
|
|
102
|
+
return items && typeof items === 'object' && !Array.isArray(items) ? value.map((item) => redactBySchema(item, items)) : value;
|
|
103
|
+
}
|
|
104
|
+
if (value === null || typeof value !== 'object')
|
|
105
|
+
return value;
|
|
106
|
+
let result = { ...value };
|
|
107
|
+
const properties = (node.properties ?? {});
|
|
108
|
+
const additional = node.additionalProperties;
|
|
109
|
+
for (const key of Object.keys(result)) {
|
|
110
|
+
const child = properties[key] ?? (additional && typeof additional === 'object' ? additional : undefined);
|
|
111
|
+
if (!child)
|
|
112
|
+
continue;
|
|
113
|
+
const redacted = redactBySchema(result[key], child);
|
|
114
|
+
if (redacted === undefined)
|
|
115
|
+
delete result[key];
|
|
116
|
+
else
|
|
117
|
+
result[key] = redacted;
|
|
118
|
+
}
|
|
119
|
+
for (const combinator of ['allOf', 'anyOf', 'oneOf']) {
|
|
120
|
+
const branches = node[combinator];
|
|
121
|
+
if (Array.isArray(branches))
|
|
122
|
+
for (const branch of branches)
|
|
123
|
+
result = redactBySchema(result, branch);
|
|
124
|
+
}
|
|
125
|
+
return result;
|
|
126
|
+
}
|
|
127
|
+
/** Throws unless `value` is plain JSON within the size limit. */
|
|
128
|
+
function assertTopicValue(value) {
|
|
129
|
+
let json;
|
|
130
|
+
try {
|
|
131
|
+
json = JSON.stringify(value);
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
throw new Error('Topic values must be plain JSON');
|
|
135
|
+
}
|
|
136
|
+
if (json === undefined)
|
|
137
|
+
throw new Error('Topic values must be plain JSON');
|
|
138
|
+
if (json.length > exports.TOPIC_VALUE_MAX_CHARS)
|
|
139
|
+
throw new Error(`Topic value exceeds ${exports.TOPIC_VALUE_MAX_CHARS} characters`);
|
|
140
|
+
}
|
|
@@ -99,4 +99,374 @@ export declare const UI_COMPONENTS_CONTRACTS: readonly [{
|
|
|
99
99
|
readonly defaults: {
|
|
100
100
|
readonly thickness: 3.6;
|
|
101
101
|
};
|
|
102
|
+
}, {
|
|
103
|
+
readonly tag: "np-detail-view";
|
|
104
|
+
readonly component: "DetailView";
|
|
105
|
+
readonly properties: {
|
|
106
|
+
readonly spacing: "number";
|
|
107
|
+
readonly padding: "number";
|
|
108
|
+
readonly disableDividers: "boolean";
|
|
109
|
+
readonly loading: "boolean";
|
|
110
|
+
readonly loadingSections: "number";
|
|
111
|
+
};
|
|
112
|
+
readonly events: {};
|
|
113
|
+
readonly children: true;
|
|
114
|
+
}, {
|
|
115
|
+
readonly tag: "np-detail-header";
|
|
116
|
+
readonly component: "DetailHeader";
|
|
117
|
+
readonly properties: {
|
|
118
|
+
readonly title: "string";
|
|
119
|
+
};
|
|
120
|
+
readonly events: {};
|
|
121
|
+
readonly slots: readonly ["actions"];
|
|
122
|
+
readonly children: true;
|
|
123
|
+
}, {
|
|
124
|
+
readonly tag: "np-detail-section";
|
|
125
|
+
readonly component: "DetailSection";
|
|
126
|
+
readonly properties: {
|
|
127
|
+
readonly label: "string";
|
|
128
|
+
readonly spacing: "number";
|
|
129
|
+
};
|
|
130
|
+
readonly events: {};
|
|
131
|
+
readonly children: true;
|
|
132
|
+
}, {
|
|
133
|
+
readonly tag: "np-detail-columns";
|
|
134
|
+
readonly component: "DetailColumns";
|
|
135
|
+
readonly properties: {
|
|
136
|
+
readonly spacing: "number";
|
|
137
|
+
};
|
|
138
|
+
readonly events: {};
|
|
139
|
+
readonly children: true;
|
|
140
|
+
}, {
|
|
141
|
+
readonly tag: "np-detail-column";
|
|
142
|
+
readonly component: "DetailColumn";
|
|
143
|
+
readonly properties: {
|
|
144
|
+
readonly minWidth: "number";
|
|
145
|
+
readonly spacing: "number";
|
|
146
|
+
};
|
|
147
|
+
readonly events: {};
|
|
148
|
+
readonly children: true;
|
|
149
|
+
}, {
|
|
150
|
+
readonly tag: "np-detail-row";
|
|
151
|
+
readonly component: "DetailRow";
|
|
152
|
+
readonly properties: {
|
|
153
|
+
readonly label: "string";
|
|
154
|
+
readonly labelMinWidth: "number";
|
|
155
|
+
readonly valueColor: "string";
|
|
156
|
+
readonly labelColor: "string";
|
|
157
|
+
readonly hideColon: "boolean";
|
|
158
|
+
};
|
|
159
|
+
readonly events: {};
|
|
160
|
+
readonly slots: readonly ["icon"];
|
|
161
|
+
readonly cssValues: readonly ["valueColor", "labelColor"];
|
|
162
|
+
readonly children: true;
|
|
163
|
+
}, {
|
|
164
|
+
readonly tag: "np-filter-dropdown";
|
|
165
|
+
readonly component: "FilterDropdown";
|
|
166
|
+
readonly properties: {
|
|
167
|
+
readonly label: "string";
|
|
168
|
+
readonly placeholder: "string";
|
|
169
|
+
readonly elements: "array";
|
|
170
|
+
readonly selected: "string";
|
|
171
|
+
readonly loading: "boolean";
|
|
172
|
+
readonly disabled: "boolean";
|
|
173
|
+
readonly disableSort: "boolean";
|
|
174
|
+
readonly disableClear: "boolean";
|
|
175
|
+
};
|
|
176
|
+
readonly events: {
|
|
177
|
+
readonly change: "onChange";
|
|
178
|
+
};
|
|
179
|
+
}, {
|
|
180
|
+
readonly tag: "np-filter-dropdown-multiple";
|
|
181
|
+
readonly component: "FilterDropdownMultiple";
|
|
182
|
+
readonly properties: {
|
|
183
|
+
readonly label: "string";
|
|
184
|
+
readonly elements: "array";
|
|
185
|
+
readonly selected: "array";
|
|
186
|
+
readonly loading: "boolean";
|
|
187
|
+
readonly disabled: "boolean";
|
|
188
|
+
readonly showActions: "boolean";
|
|
189
|
+
};
|
|
190
|
+
readonly events: {
|
|
191
|
+
readonly change: "onChange";
|
|
192
|
+
};
|
|
193
|
+
}, {
|
|
194
|
+
readonly tag: "np-filter-name";
|
|
195
|
+
readonly component: "FilterName";
|
|
196
|
+
readonly properties: {
|
|
197
|
+
readonly filterName: "string";
|
|
198
|
+
readonly placeholder: "string";
|
|
199
|
+
readonly loading: "boolean";
|
|
200
|
+
};
|
|
201
|
+
readonly events: {
|
|
202
|
+
readonly change: "onFilterName";
|
|
203
|
+
};
|
|
204
|
+
}, {
|
|
205
|
+
readonly tag: "np-list-item-icon";
|
|
206
|
+
readonly component: "ListItemIcon";
|
|
207
|
+
readonly properties: {};
|
|
208
|
+
readonly events: {};
|
|
209
|
+
readonly children: true;
|
|
210
|
+
}, {
|
|
211
|
+
readonly tag: "np-list-item-avatar";
|
|
212
|
+
readonly component: "ListItemAvatar";
|
|
213
|
+
readonly properties: {};
|
|
214
|
+
readonly events: {};
|
|
215
|
+
readonly children: true;
|
|
216
|
+
}, {
|
|
217
|
+
readonly tag: "np-list-subheader";
|
|
218
|
+
readonly component: "ListSubheader";
|
|
219
|
+
readonly properties: {
|
|
220
|
+
readonly color: "string";
|
|
221
|
+
readonly disableGutters: "boolean";
|
|
222
|
+
readonly disableSticky: "boolean";
|
|
223
|
+
readonly inset: "boolean";
|
|
224
|
+
};
|
|
225
|
+
readonly events: {};
|
|
226
|
+
readonly values: {
|
|
227
|
+
readonly color: readonly ["default", "primary", "inherit"];
|
|
228
|
+
};
|
|
229
|
+
readonly children: true;
|
|
230
|
+
}, {
|
|
231
|
+
readonly tag: "np-relative-date";
|
|
232
|
+
readonly component: "RelativeDate";
|
|
233
|
+
readonly properties: {
|
|
234
|
+
readonly date: "string";
|
|
235
|
+
readonly icon: "string";
|
|
236
|
+
readonly label: "string";
|
|
237
|
+
readonly hideLabel: "boolean";
|
|
238
|
+
readonly options: "object";
|
|
239
|
+
readonly showTooltip: "boolean";
|
|
240
|
+
readonly emptyText: "string";
|
|
241
|
+
readonly live: "boolean";
|
|
242
|
+
};
|
|
243
|
+
readonly events: {};
|
|
244
|
+
}, {
|
|
245
|
+
readonly tag: "np-duration";
|
|
246
|
+
readonly component: "Duration";
|
|
247
|
+
readonly properties: {
|
|
248
|
+
readonly ms: "number";
|
|
249
|
+
readonly from: "string";
|
|
250
|
+
readonly to: "string";
|
|
251
|
+
readonly running: "boolean";
|
|
252
|
+
readonly icon: "string";
|
|
253
|
+
readonly label: "string";
|
|
254
|
+
readonly hideLabel: "boolean";
|
|
255
|
+
readonly emptyText: "string";
|
|
256
|
+
};
|
|
257
|
+
readonly events: {};
|
|
258
|
+
}, {
|
|
259
|
+
readonly tag: "np-timeline-cell";
|
|
260
|
+
readonly component: "TimelineCell";
|
|
261
|
+
readonly properties: {
|
|
262
|
+
readonly createdAt: "string";
|
|
263
|
+
readonly updatedAt: "string";
|
|
264
|
+
readonly duration: "number";
|
|
265
|
+
readonly createdLabel: "string";
|
|
266
|
+
readonly updatedLabel: "string";
|
|
267
|
+
readonly durationLabel: "string";
|
|
268
|
+
readonly options: "object";
|
|
269
|
+
readonly hideLabels: "boolean";
|
|
270
|
+
readonly running: "boolean";
|
|
271
|
+
readonly spacing: "number";
|
|
272
|
+
};
|
|
273
|
+
readonly events: {};
|
|
274
|
+
readonly children: true;
|
|
275
|
+
}, {
|
|
276
|
+
readonly tag: "np-text-max-line";
|
|
277
|
+
readonly component: "TextMaxLine";
|
|
278
|
+
readonly properties: {
|
|
279
|
+
readonly variant: "string";
|
|
280
|
+
readonly line: "number";
|
|
281
|
+
readonly persistent: "boolean";
|
|
282
|
+
};
|
|
283
|
+
readonly events: {};
|
|
284
|
+
readonly values: {
|
|
285
|
+
readonly variant: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "caption", "overline", "button"];
|
|
286
|
+
};
|
|
287
|
+
readonly children: true;
|
|
288
|
+
}, {
|
|
289
|
+
readonly tag: "np-group-heading";
|
|
290
|
+
readonly component: "GroupHeading";
|
|
291
|
+
readonly properties: {
|
|
292
|
+
readonly label: "string";
|
|
293
|
+
readonly description: "string";
|
|
294
|
+
readonly required: "boolean";
|
|
295
|
+
};
|
|
296
|
+
readonly events: {};
|
|
297
|
+
}, {
|
|
298
|
+
readonly tag: "np-dimensions-byline";
|
|
299
|
+
readonly component: "DimensionsByline";
|
|
300
|
+
readonly properties: {
|
|
301
|
+
readonly dimensions: "object";
|
|
302
|
+
readonly catalog: "array";
|
|
303
|
+
readonly disabled: "boolean";
|
|
304
|
+
readonly showUnsetAxes: "boolean";
|
|
305
|
+
readonly unsetValueLabel: "string";
|
|
306
|
+
};
|
|
307
|
+
readonly events: {};
|
|
308
|
+
}, {
|
|
309
|
+
readonly tag: "np-container";
|
|
310
|
+
readonly component: "Container";
|
|
311
|
+
readonly properties: {
|
|
312
|
+
readonly maxWidth: "string";
|
|
313
|
+
readonly fixed: "boolean";
|
|
314
|
+
readonly disableGutters: "boolean";
|
|
315
|
+
};
|
|
316
|
+
readonly events: {};
|
|
317
|
+
readonly values: {
|
|
318
|
+
readonly maxWidth: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
319
|
+
};
|
|
320
|
+
readonly children: true;
|
|
321
|
+
}, {
|
|
322
|
+
readonly tag: "np-scrollbar";
|
|
323
|
+
readonly component: "Scrollbar";
|
|
324
|
+
readonly properties: {
|
|
325
|
+
readonly fade: "boolean";
|
|
326
|
+
};
|
|
327
|
+
readonly events: {};
|
|
328
|
+
readonly children: true;
|
|
329
|
+
}, {
|
|
330
|
+
readonly tag: "np-grouped-filter-dropdown";
|
|
331
|
+
readonly component: "GroupedFilterDropdown";
|
|
332
|
+
readonly properties: {
|
|
333
|
+
readonly label: "string";
|
|
334
|
+
readonly elements: "array";
|
|
335
|
+
readonly selected: "object";
|
|
336
|
+
readonly loading: "boolean";
|
|
337
|
+
readonly disabled: "boolean";
|
|
338
|
+
readonly shouldFitFont: "boolean";
|
|
339
|
+
};
|
|
340
|
+
readonly events: {
|
|
341
|
+
readonly change: "onChange";
|
|
342
|
+
readonly open: "onOpen";
|
|
343
|
+
};
|
|
344
|
+
}, {
|
|
345
|
+
readonly tag: "np-copy-to-clipboard-button";
|
|
346
|
+
readonly component: "CopyToClipboardButton";
|
|
347
|
+
readonly properties: {
|
|
348
|
+
readonly text: "string";
|
|
349
|
+
readonly tooltipCopy: "string";
|
|
350
|
+
readonly tooltipCopied: "string";
|
|
351
|
+
readonly icon: "string";
|
|
352
|
+
readonly iconSize: "number";
|
|
353
|
+
};
|
|
354
|
+
readonly events: {
|
|
355
|
+
readonly copy: "onCopy";
|
|
356
|
+
};
|
|
357
|
+
}, {
|
|
358
|
+
readonly tag: "np-countdown-button";
|
|
359
|
+
readonly component: "CountdownButton";
|
|
360
|
+
readonly properties: {
|
|
361
|
+
readonly label: "string";
|
|
362
|
+
readonly cooldownTime: "number";
|
|
363
|
+
readonly fullWidth: "boolean";
|
|
364
|
+
};
|
|
365
|
+
readonly events: {
|
|
366
|
+
readonly press: "onClick";
|
|
367
|
+
};
|
|
368
|
+
readonly slots: readonly ["startIcon"];
|
|
369
|
+
}, {
|
|
370
|
+
readonly tag: "np-label";
|
|
371
|
+
readonly component: "Label";
|
|
372
|
+
readonly properties: {
|
|
373
|
+
readonly color: "string";
|
|
374
|
+
readonly variant: "string";
|
|
375
|
+
};
|
|
376
|
+
readonly events: {};
|
|
377
|
+
readonly slots: readonly ["startIcon", "endIcon"];
|
|
378
|
+
readonly values: {
|
|
379
|
+
readonly color: readonly ["default", "primary", "secondary", "info", "success", "warning", "error"];
|
|
380
|
+
readonly variant: readonly ["filled", "outlined", "ghost", "soft"];
|
|
381
|
+
};
|
|
382
|
+
readonly children: true;
|
|
383
|
+
}, {
|
|
384
|
+
readonly tag: "np-avatar";
|
|
385
|
+
readonly component: "Avatar";
|
|
386
|
+
readonly properties: {
|
|
387
|
+
readonly name: "string";
|
|
388
|
+
readonly color: "string";
|
|
389
|
+
readonly size: "string";
|
|
390
|
+
readonly variant: "string";
|
|
391
|
+
};
|
|
392
|
+
readonly events: {};
|
|
393
|
+
readonly values: {
|
|
394
|
+
readonly color: readonly ["default", "primary", "secondary", "info", "success", "warning", "error"];
|
|
395
|
+
readonly size: readonly ["small", "medium", "large"];
|
|
396
|
+
readonly variant: readonly ["circular", "rounded", "square"];
|
|
397
|
+
};
|
|
398
|
+
readonly children: true;
|
|
399
|
+
}, {
|
|
400
|
+
readonly tag: "np-icon-picker";
|
|
401
|
+
readonly component: "IconPicker";
|
|
402
|
+
readonly properties: {
|
|
403
|
+
readonly value: "string";
|
|
404
|
+
readonly prefix: "string";
|
|
405
|
+
readonly minChars: "number";
|
|
406
|
+
readonly debounceMs: "number";
|
|
407
|
+
readonly placeholder: "string";
|
|
408
|
+
readonly loadingText: "string";
|
|
409
|
+
readonly noResultsText: "string";
|
|
410
|
+
readonly errorText: "string";
|
|
411
|
+
readonly helperText: "string";
|
|
412
|
+
readonly error: "boolean";
|
|
413
|
+
readonly label: "string";
|
|
414
|
+
readonly size: "string";
|
|
415
|
+
readonly disabled: "boolean";
|
|
416
|
+
readonly iconWidth: "number";
|
|
417
|
+
};
|
|
418
|
+
readonly events: {
|
|
419
|
+
readonly change: "onChange";
|
|
420
|
+
};
|
|
421
|
+
readonly values: {
|
|
422
|
+
readonly size: readonly ["small", "medium"];
|
|
423
|
+
};
|
|
424
|
+
}, {
|
|
425
|
+
readonly tag: "np-tab-bar";
|
|
426
|
+
readonly component: "TabBar";
|
|
427
|
+
readonly properties: {
|
|
428
|
+
readonly items: "array";
|
|
429
|
+
readonly value: "string";
|
|
430
|
+
readonly variant: "string";
|
|
431
|
+
};
|
|
432
|
+
readonly events: {
|
|
433
|
+
readonly change: "onChange";
|
|
434
|
+
};
|
|
435
|
+
readonly values: {
|
|
436
|
+
readonly variant: readonly ["standard", "scrollable", "fullWidth"];
|
|
437
|
+
};
|
|
438
|
+
readonly children: true;
|
|
439
|
+
}, {
|
|
440
|
+
readonly tag: "np-breadcrumb-trail";
|
|
441
|
+
readonly component: "BreadcrumbTrail";
|
|
442
|
+
readonly properties: {
|
|
443
|
+
readonly items: "array";
|
|
444
|
+
readonly maxItems: "number";
|
|
445
|
+
};
|
|
446
|
+
readonly events: {
|
|
447
|
+
readonly select: "onSelect";
|
|
448
|
+
};
|
|
449
|
+
}, {
|
|
450
|
+
readonly tag: "np-chip-list";
|
|
451
|
+
readonly component: "ChipList";
|
|
452
|
+
readonly properties: {
|
|
453
|
+
readonly items: "array";
|
|
454
|
+
readonly variant: "string";
|
|
455
|
+
readonly loading: "boolean";
|
|
456
|
+
readonly maxItemsToShow: "number";
|
|
457
|
+
readonly disableListItem: "boolean";
|
|
458
|
+
};
|
|
459
|
+
readonly events: {};
|
|
460
|
+
readonly values: {
|
|
461
|
+
readonly variant: readonly ["filled", "outlined", "soft"];
|
|
462
|
+
readonly "items[].color": readonly ["default", "primary", "secondary", "error", "info", "success", "warning"];
|
|
463
|
+
};
|
|
464
|
+
}, {
|
|
465
|
+
readonly tag: "np-activity-timeline";
|
|
466
|
+
readonly component: "ActivityTimeline";
|
|
467
|
+
readonly properties: {
|
|
468
|
+
readonly items: "array";
|
|
469
|
+
};
|
|
470
|
+
readonly events: {};
|
|
471
|
+
readonly imageValues: readonly ["items[].avatar"];
|
|
102
472
|
}];
|