@nice2dev/ui-designers 1.0.20 → 1.0.22
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/index.cjs +831 -234
- package/dist/index.d.ts +16 -2
- package/dist/index.mjs +39528 -34680
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
|
+
import { NiceComponentTutorial } from '@nice2dev/ui';
|
|
2
3
|
import { NiceStandardProps } from '@nice2dev/ui';
|
|
3
4
|
import { NiceThemeBuilder } from '@nice2dev/ui';
|
|
4
5
|
import { NiceThemeBuilderProps } from '@nice2dev/ui';
|
|
@@ -6,6 +7,7 @@ import { NiceThemeBuilderSection } from '@nice2dev/ui';
|
|
|
6
7
|
import { NiceThemeDesigner } from '@nice2dev/ui';
|
|
7
8
|
import { NiceThemeDesignerProps } from '@nice2dev/ui';
|
|
8
9
|
import { NiceThemeDesignerSection } from '@nice2dev/ui';
|
|
10
|
+
import { NiceViewDefinitionV2 } from '@nice2dev/ui';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* Action node
|
|
@@ -214,7 +216,7 @@ declare interface NiceControlRegistryEntry {
|
|
|
214
216
|
defaultProps: Record<string, unknown>;
|
|
215
217
|
}
|
|
216
218
|
|
|
217
|
-
export declare function NiceDashboardDesigner({ initialSchema, widgets, onChange, onExport, onPreview, className, style, }: NiceDashboardDesignerProps): JSX.Element;
|
|
219
|
+
export declare function NiceDashboardDesigner({ initialSchema, widgets, onChange, onExport, onPreview, tutorial, className, style, }: NiceDashboardDesignerProps): JSX.Element;
|
|
218
220
|
|
|
219
221
|
export declare interface NiceDashboardDesignerProps {
|
|
220
222
|
/** Initial dashboard schema */
|
|
@@ -238,6 +240,8 @@ export declare interface NiceDashboardDesignerProps {
|
|
|
238
240
|
className?: string;
|
|
239
241
|
/** Style */
|
|
240
242
|
style?: default_2.CSSProperties;
|
|
243
|
+
/** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
|
|
244
|
+
tutorial?: NiceComponentTutorial;
|
|
241
245
|
}
|
|
242
246
|
|
|
243
247
|
/** Describes one configurable property in the {@link NiceControlConfigurator}. */
|
|
@@ -294,6 +298,8 @@ export declare interface NiceViewBuilderProps extends NiceStandardProps {
|
|
|
294
298
|
onChange?: (view: NiceViewDefinition) => void;
|
|
295
299
|
/** Called when user clicks Save */
|
|
296
300
|
onSave?: (view: NiceViewDefinition) => void;
|
|
301
|
+
/** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
|
|
302
|
+
tutorial?: NiceComponentTutorial;
|
|
297
303
|
}
|
|
298
304
|
|
|
299
305
|
/** A single cell (control instance) in a {@link NiceViewRowDefinition}. */
|
|
@@ -331,7 +337,7 @@ declare interface NiceViewRowDefinition {
|
|
|
331
337
|
height?: string;
|
|
332
338
|
}
|
|
333
339
|
|
|
334
|
-
export declare function NiceWorkflowDesigner({ initialWorkflow, nodes, edges, onChange, onNodeSelect, className, style, readOnly, height, }: NiceWorkflowDesignerProps): JSX.Element;
|
|
340
|
+
export declare function NiceWorkflowDesigner({ initialWorkflow, nodes, edges, onChange, onNodeSelect, tutorial, className, style, readOnly, height, }: NiceWorkflowDesignerProps): JSX.Element;
|
|
335
341
|
|
|
336
342
|
export declare interface NiceWorkflowDesignerProps {
|
|
337
343
|
/** Initial workflow schema */
|
|
@@ -363,6 +369,8 @@ export declare interface NiceWorkflowDesignerProps {
|
|
|
363
369
|
readOnly?: boolean;
|
|
364
370
|
/** Height */
|
|
365
371
|
height?: string | number;
|
|
372
|
+
/** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
|
|
373
|
+
tutorial?: NiceComponentTutorial;
|
|
366
374
|
}
|
|
367
375
|
|
|
368
376
|
export declare const NODE_TEMPLATES: NodeTemplate[];
|
|
@@ -416,6 +424,9 @@ export declare type TriggerType = 'manual' | 'schedule' | 'webhook' | 'event' |
|
|
|
416
424
|
|
|
417
425
|
export declare function useWorkflowDesigner(): WorkflowDesignerContextValue;
|
|
418
426
|
|
|
427
|
+
/** Convert a {@link NiceViewDefinitionV2} back to a legacy {@link NiceViewDefinition} (best-effort). */
|
|
428
|
+
export declare function v2ToViewDefinition(view: NiceViewDefinitionV2): NiceViewDefinition;
|
|
429
|
+
|
|
419
430
|
/**
|
|
420
431
|
* Validate dashboard schema
|
|
421
432
|
*/
|
|
@@ -434,6 +445,9 @@ export declare function validateWorkflow(workflow: WorkflowSchema): {
|
|
|
434
445
|
*/
|
|
435
446
|
declare type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'date' | 'any';
|
|
436
447
|
|
|
448
|
+
/** Convert a legacy {@link NiceViewDefinition} to a {@link NiceViewDefinitionV2}. */
|
|
449
|
+
export declare function viewDefinitionToV2(def: NiceViewDefinition): NiceViewDefinitionV2;
|
|
450
|
+
|
|
437
451
|
/**
|
|
438
452
|
* Widget data source configuration
|
|
439
453
|
*/
|