@redvars/peacock 3.5.1 → 3.6.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/{BaseButton-DuASuVth.js → BaseButton-BNFAYn-S.js} +2 -2
- package/dist/{BaseButton-DuASuVth.js.map → BaseButton-BNFAYn-S.js.map} +1 -1
- package/dist/BaseInput-14YmcfK7.js +27 -0
- package/dist/BaseInput-14YmcfK7.js.map +1 -0
- package/dist/banner.js +2 -3
- package/dist/banner.js.map +1 -1
- package/dist/{button-DouvOfEU.js → button-colors-Ccys3hvS.js} +5 -294
- package/dist/button-colors-Ccys3hvS.js.map +1 -0
- package/dist/button-group.js +226 -6
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +294 -8
- package/dist/button.js.map +1 -1
- package/dist/calendar-column-view.js +634 -0
- package/dist/calendar-column-view.js.map +1 -0
- package/dist/calendar-event-BrQ_SEKD.js +199 -0
- package/dist/calendar-event-BrQ_SEKD.js.map +1 -0
- package/dist/calendar-month-view.js +376 -0
- package/dist/calendar-month-view.js.map +1 -0
- package/dist/calendar.js +339 -0
- package/dist/calendar.js.map +1 -0
- package/dist/canvas.js +361 -0
- package/dist/canvas.js.map +1 -0
- package/dist/cb-compound-expression.js +125 -0
- package/dist/cb-compound-expression.js.map +1 -0
- package/dist/cb-divider.js +150 -0
- package/dist/cb-divider.js.map +1 -0
- package/dist/cb-expression.js +75 -0
- package/dist/cb-expression.js.map +1 -0
- package/dist/cb-predicate.js +137 -0
- package/dist/cb-predicate.js.map +1 -0
- package/dist/code-editor.js +2 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/condition-builder.js +58 -0
- package/dist/condition-builder.js.map +1 -0
- package/dist/custom-elements-jsdocs.json +7976 -4294
- package/dist/custom-elements.json +14358 -7589
- package/dist/dropdown-button.js +216 -0
- package/dist/dropdown-button.js.map +1 -0
- package/dist/event-manager-D-QCmUgR.js +113 -0
- package/dist/event-manager-D-QCmUgR.js.map +1 -0
- package/dist/fab.js +1 -1
- package/dist/flow-designer-dZnLJOQT.js +1656 -0
- package/dist/flow-designer-dZnLJOQT.js.map +1 -0
- package/dist/flow-designer-node-XMe-jlKg.js +548 -0
- package/dist/flow-designer-node-XMe-jlKg.js.map +1 -0
- package/dist/flow-designer-node.js +4 -0
- package/dist/flow-designer-node.js.map +1 -0
- package/dist/flow-designer.js +16 -0
- package/dist/flow-designer.js.map +1 -0
- package/dist/html-editor.js +358 -0
- package/dist/html-editor.js.map +1 -0
- package/dist/icon-button-CK1ZuE-2.js +247 -0
- package/dist/icon-button-CK1ZuE-2.js.map +1 -0
- package/dist/index.js +29 -6
- package/dist/index.js.map +1 -1
- package/dist/{is-dark-mode-DicqGkCJ.js → is-dark-mode-DOcaw4Yq.js} +2 -27
- package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -0
- package/dist/modal.js +418 -0
- package/dist/modal.js.map +1 -0
- package/dist/{navigation-rail-Lxetd5-Z.js → navigation-rail-DyO0oAZU.js} +306 -2197
- package/dist/navigation-rail-DyO0oAZU.js.map +1 -0
- package/dist/notification-manager.js +268 -0
- package/dist/notification-manager.js.map +1 -0
- package/dist/peacock-loader.js +84 -8
- package/dist/peacock-loader.js.map +1 -1
- package/dist/popover-NC7b1lTq.js +1971 -0
- package/dist/popover-NC7b1lTq.js.map +1 -0
- package/dist/popover-content.js +125 -0
- package/dist/popover-content.js.map +1 -0
- package/dist/popover.js +4 -0
- package/dist/popover.js.map +1 -0
- package/dist/split-button.js +388 -0
- package/dist/split-button.js.map +1 -0
- package/dist/src/__controllers/floating-controller.d.ts +35 -0
- package/dist/src/calendar/base-event.d.ts +10 -0
- package/dist/src/calendar/calendar-column-view.d.ts +41 -0
- package/dist/src/calendar/calendar-event.d.ts +7 -0
- package/dist/src/calendar/calendar-month-view.d.ts +31 -0
- package/dist/src/calendar/calendar.d.ts +65 -0
- package/dist/src/calendar/event-manager.d.ts +17 -0
- package/dist/src/calendar/index.d.ts +4 -0
- package/dist/src/calendar/types.d.ts +13 -0
- package/dist/src/calendar/utils.d.ts +31 -0
- package/dist/src/canvas/canvas.d.ts +92 -0
- package/dist/src/canvas/index.d.ts +2 -0
- package/dist/src/condition-builder/cb-compound-expression.d.ts +31 -0
- package/dist/src/condition-builder/cb-divider.d.ts +26 -0
- package/dist/src/condition-builder/cb-expression.d.ts +31 -0
- package/dist/src/condition-builder/cb-predicate.d.ts +30 -0
- package/dist/src/condition-builder/condition-builder.d.ts +27 -0
- package/dist/src/condition-builder/index.d.ts +5 -0
- package/dist/src/dropdown-button/dropdown-button.d.ts +68 -0
- package/dist/src/dropdown-button/index.d.ts +1 -0
- package/dist/src/flow-designer/commands.d.ts +66 -0
- package/dist/src/flow-designer/flow-designer-node.d.ts +46 -0
- package/dist/src/flow-designer/flow-designer.d.ts +133 -0
- package/dist/src/flow-designer/index.d.ts +7 -0
- package/dist/src/flow-designer/layout.d.ts +30 -0
- package/dist/src/flow-designer/types.d.ts +142 -0
- package/dist/src/flow-designer/validation.d.ts +43 -0
- package/dist/src/flow-designer/workflow-utils.d.ts +40 -0
- package/dist/src/html-editor/html-editor.d.ts +56 -0
- package/dist/src/html-editor/index.d.ts +2 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/menu/menu/menu.d.ts +5 -7
- package/dist/src/menu/menu-item/menu-item.d.ts +14 -13
- package/dist/src/modal/index.d.ts +1 -0
- package/dist/src/modal/modal.d.ts +63 -0
- package/dist/src/notification-manager/index.d.ts +1 -0
- package/dist/src/notification-manager/notification-manager.d.ts +44 -0
- package/dist/src/popover/index.d.ts +2 -0
- package/dist/src/popover/popover-content.d.ts +29 -0
- package/dist/src/popover/popover.d.ts +62 -0
- package/dist/src/split-button/index.d.ts +1 -0
- package/dist/src/split-button/split-button.d.ts +72 -0
- package/dist/src/tooltip/tooltip.d.ts +2 -15
- package/dist/test/flow-designer.test.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/readme.md +2 -2
- package/src/__controllers/floating-controller.ts +237 -0
- package/src/banner/banner.scss +2 -3
- package/src/button/button/button.ts +1 -0
- package/src/calendar/base-event.ts +49 -0
- package/src/calendar/calendar-column-view.scss +326 -0
- package/src/calendar/calendar-column-view.ts +392 -0
- package/src/calendar/calendar-event.ts +20 -0
- package/src/calendar/calendar-month-view.scss +192 -0
- package/src/calendar/calendar-month-view.ts +244 -0
- package/src/calendar/calendar.scss +71 -0
- package/src/calendar/calendar.ts +298 -0
- package/src/calendar/event-manager.ts +117 -0
- package/src/calendar/index.ts +4 -0
- package/src/calendar/types.ts +14 -0
- package/src/calendar/utils.ts +180 -0
- package/src/canvas/canvas.scss +60 -0
- package/src/canvas/canvas.ts +391 -0
- package/src/canvas/index.ts +2 -0
- package/src/condition-builder/cb-compound-expression.scss +37 -0
- package/src/condition-builder/cb-compound-expression.ts +80 -0
- package/src/condition-builder/cb-divider.scss +93 -0
- package/src/condition-builder/cb-divider.ts +56 -0
- package/src/condition-builder/cb-expression.scss +14 -0
- package/src/condition-builder/cb-expression.ts +49 -0
- package/src/condition-builder/cb-predicate.scss +35 -0
- package/src/condition-builder/cb-predicate.ts +102 -0
- package/src/condition-builder/condition-builder.scss +13 -0
- package/src/condition-builder/condition-builder.ts +38 -0
- package/src/condition-builder/index.ts +5 -0
- package/src/dropdown-button/demo/index.html +110 -0
- package/src/dropdown-button/dropdown-button.scss +22 -0
- package/src/dropdown-button/dropdown-button.ts +206 -0
- package/src/dropdown-button/index.ts +1 -0
- package/src/flow-designer/DEMO.md +239 -0
- package/src/flow-designer/commands.ts +278 -0
- package/src/flow-designer/flow-designer-node.ts +172 -0
- package/src/flow-designer/flow-designer.scss +457 -0
- package/src/flow-designer/flow-designer.ts +611 -0
- package/src/flow-designer/index.ts +41 -0
- package/src/flow-designer/layout.ts +357 -0
- package/src/flow-designer/types.ts +166 -0
- package/src/flow-designer/validation.ts +284 -0
- package/src/flow-designer/workflow-utils.ts +282 -0
- package/src/html-editor/html-editor.scss +146 -0
- package/src/html-editor/html-editor.ts +276 -0
- package/src/html-editor/index.ts +3 -0
- package/src/index.ts +25 -0
- package/src/menu/menu/menu.scss +2 -2
- package/src/menu/menu/menu.ts +91 -101
- package/src/menu/menu-item/menu-item.scss +4 -0
- package/src/menu/menu-item/menu-item.ts +82 -78
- package/src/modal/index.ts +1 -0
- package/src/modal/modal.scss +206 -0
- package/src/modal/modal.ts +201 -0
- package/src/notification-manager/index.ts +1 -0
- package/src/notification-manager/notification-manager.scss +113 -0
- package/src/notification-manager/notification-manager.ts +199 -0
- package/src/peacock-loader.ts +71 -0
- package/src/popover/index.ts +2 -0
- package/src/popover/popover-content.scss +69 -0
- package/src/popover/popover-content.ts +51 -0
- package/src/popover/popover.scss +7 -0
- package/src/popover/popover.ts +170 -0
- package/src/split-button/index.ts +1 -0
- package/src/split-button/split-button-colors.scss +56 -0
- package/src/split-button/split-button-sizes.scss +28 -0
- package/src/split-button/split-button.scss +79 -0
- package/src/split-button/split-button.ts +236 -0
- package/src/table/table.ts +2 -2
- package/src/tooltip/tooltip.scss +4 -3
- package/src/tooltip/tooltip.ts +46 -104
- package/dist/button-DouvOfEU.js.map +0 -1
- package/dist/button-group-CEdMwvJJ.js +0 -464
- package/dist/button-group-CEdMwvJJ.js.map +0 -1
- package/dist/is-dark-mode-DicqGkCJ.js.map +0 -1
- package/dist/navigation-rail-Lxetd5-Z.js.map +0 -1
- package/dist/src/menu/menu/MenuSurfaceController.d.ts +0 -18
- package/src/menu/menu/MenuSurfaceController.ts +0 -61
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Data Types for Flow Designer
|
|
3
|
+
* Defines the structure for low-code business process workflows
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Supported node types in a workflow
|
|
7
|
+
*/
|
|
8
|
+
export type NodeType = 'trigger' | 'action' | 'decision' | 'loop_start' | 'loop_end' | 'fork' | 'join';
|
|
9
|
+
/**
|
|
10
|
+
* Payload for workflow-changed event
|
|
11
|
+
*/
|
|
12
|
+
export interface WorkflowChangeEvent {
|
|
13
|
+
type: 'node-added' | 'node-deleted' | 'node-edited' | 'node-moved' | 'undo' | 'redo';
|
|
14
|
+
nodeId?: string;
|
|
15
|
+
workflow: Workflow;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Core workflow node structure
|
|
19
|
+
*/
|
|
20
|
+
export interface WorkflowNode {
|
|
21
|
+
id: string;
|
|
22
|
+
type: NodeType;
|
|
23
|
+
label: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
icon?: string;
|
|
26
|
+
/**
|
|
27
|
+
* For sequential nodes in parallel execution (fork tasks)
|
|
28
|
+
*/
|
|
29
|
+
tasks?: WorkflowNode[];
|
|
30
|
+
/**
|
|
31
|
+
* For conditional branching (decision nodes)
|
|
32
|
+
* Keys are branch conditions like "yes", "no"
|
|
33
|
+
*/
|
|
34
|
+
branches?: Record<string, WorkflowNode[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Child nodes for sequential flow
|
|
37
|
+
*/
|
|
38
|
+
children?: WorkflowNode[];
|
|
39
|
+
/**
|
|
40
|
+
* For loop_end: points to the loop_start node id to repeat
|
|
41
|
+
*/
|
|
42
|
+
target_id?: string;
|
|
43
|
+
/**
|
|
44
|
+
* For fork: join node that collects parallel paths
|
|
45
|
+
*/
|
|
46
|
+
join?: WorkflowNode;
|
|
47
|
+
/**
|
|
48
|
+
* Custom metadata - can store domain-specific data
|
|
49
|
+
*/
|
|
50
|
+
metadata?: Record<string, any>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Complete workflow definition
|
|
54
|
+
*/
|
|
55
|
+
export interface Workflow {
|
|
56
|
+
workflow_id: string;
|
|
57
|
+
nodes: WorkflowNode;
|
|
58
|
+
metadata?: Record<string, any>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Layout engine output - node with calculated position
|
|
62
|
+
*/
|
|
63
|
+
export interface PositionedNode {
|
|
64
|
+
node: WorkflowNode;
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
lane: string;
|
|
70
|
+
depth: number;
|
|
71
|
+
branchPath?: string;
|
|
72
|
+
parentId?: string;
|
|
73
|
+
connectorPoints?: {
|
|
74
|
+
from: {
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
};
|
|
78
|
+
to: {
|
|
79
|
+
x: number;
|
|
80
|
+
y: number;
|
|
81
|
+
};
|
|
82
|
+
type: 'straight' | 'curved' | 'branch' | 'fork' | 'join';
|
|
83
|
+
}[];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Validation error result
|
|
87
|
+
*/
|
|
88
|
+
export interface ValidationError {
|
|
89
|
+
nodeId: string;
|
|
90
|
+
type: 'circular_loop' | 'orphaned_node' | 'invalid_branch' | 'missing_target' | 'invalid_fork_join';
|
|
91
|
+
message: string;
|
|
92
|
+
severity: 'error' | 'warning';
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* State for a single undo/redo operation
|
|
96
|
+
*/
|
|
97
|
+
export interface HistoryEntry {
|
|
98
|
+
command: WorkflowCommand;
|
|
99
|
+
workflow: Workflow;
|
|
100
|
+
timestamp: number;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Command interface for undo/redo pattern
|
|
104
|
+
*/
|
|
105
|
+
export interface WorkflowCommand {
|
|
106
|
+
execute(workflow: Workflow): Workflow;
|
|
107
|
+
undo(workflow: Workflow): Workflow;
|
|
108
|
+
description: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Swimlane configuration
|
|
112
|
+
*/
|
|
113
|
+
export interface SwimlaneConfig {
|
|
114
|
+
id: string;
|
|
115
|
+
name: string;
|
|
116
|
+
nodes: PositionedNode[];
|
|
117
|
+
isParallel: boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Editor state
|
|
121
|
+
*/
|
|
122
|
+
export interface EditorState {
|
|
123
|
+
selectedNodeId: string | null;
|
|
124
|
+
isEditing: boolean;
|
|
125
|
+
editingNode: Partial<WorkflowNode> | null;
|
|
126
|
+
hoveredNodeId: string | null;
|
|
127
|
+
isDragging: boolean;
|
|
128
|
+
draggedNodeId: string | null;
|
|
129
|
+
zoom: number;
|
|
130
|
+
panX: number;
|
|
131
|
+
panY: number;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Node template configuration for slots
|
|
135
|
+
*/
|
|
136
|
+
export interface NodeTemplate {
|
|
137
|
+
type: NodeType;
|
|
138
|
+
defaultIcon?: string;
|
|
139
|
+
defaultHeight?: number;
|
|
140
|
+
allowedChildren?: NodeType[];
|
|
141
|
+
allowedBranches?: string[];
|
|
142
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Workflow, ValidationError } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Workflow validation - checks for common errors and inconsistencies
|
|
4
|
+
*/
|
|
5
|
+
export declare class WorkflowValidator {
|
|
6
|
+
/**
|
|
7
|
+
* Validate entire workflow
|
|
8
|
+
*/
|
|
9
|
+
static validate(workflow: Workflow): ValidationError[];
|
|
10
|
+
/**
|
|
11
|
+
* Detect circular loop references
|
|
12
|
+
* A loop_end cannot point to a node that is its own descendant (after the loop_start)
|
|
13
|
+
*/
|
|
14
|
+
private static _checkCircularLoops;
|
|
15
|
+
/**
|
|
16
|
+
* Check for orphaned nodes (not reachable from root)
|
|
17
|
+
*/
|
|
18
|
+
private static _checkOrphanedNodes;
|
|
19
|
+
/**
|
|
20
|
+
* Check that decision nodes have valid branches
|
|
21
|
+
*/
|
|
22
|
+
private static _checkValidBranches;
|
|
23
|
+
/**
|
|
24
|
+
* Check that loop_end nodes reference valid loop_start nodes
|
|
25
|
+
*/
|
|
26
|
+
private static _checkMissingTargets;
|
|
27
|
+
/**
|
|
28
|
+
* Check that fork nodes have corresponding join nodes
|
|
29
|
+
*/
|
|
30
|
+
private static _checkForkJoinPairs;
|
|
31
|
+
/**
|
|
32
|
+
* Check if workflow would create a valid execution path
|
|
33
|
+
*/
|
|
34
|
+
static isExecutable(workflow: Workflow): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Get validation warnings only
|
|
37
|
+
*/
|
|
38
|
+
static getWarnings(workflow: Workflow): ValidationError[];
|
|
39
|
+
/**
|
|
40
|
+
* Get validation errors only
|
|
41
|
+
*/
|
|
42
|
+
static getErrors(workflow: Workflow): ValidationError[];
|
|
43
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Workflow, WorkflowNode } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Workflow utility functions for tree traversal and manipulation
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Deep clone a workflow to ensure immutability
|
|
7
|
+
*/
|
|
8
|
+
export declare function cloneWorkflow(workflow: Workflow): Workflow;
|
|
9
|
+
/**
|
|
10
|
+
* Deep clone a workflow node
|
|
11
|
+
*/
|
|
12
|
+
export declare function cloneNode(node: WorkflowNode): WorkflowNode;
|
|
13
|
+
/**
|
|
14
|
+
* Find a node by ID anywhere in the workflow tree
|
|
15
|
+
*/
|
|
16
|
+
export declare function findNodeById(node: WorkflowNode, id: string): WorkflowNode | null;
|
|
17
|
+
/**
|
|
18
|
+
* Remove a node by ID from the workflow tree
|
|
19
|
+
*/
|
|
20
|
+
export declare function removeNodeById(node: WorkflowNode, id: string): WorkflowNode;
|
|
21
|
+
/**
|
|
22
|
+
* Insert a node into the workflow tree at a specific location
|
|
23
|
+
*/
|
|
24
|
+
export declare function insertNodeIntoWorkflow(parent: WorkflowNode, nodeToInsert: WorkflowNode, connectionType?: 'child' | 'branch' | 'task', branchKey?: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Collect all nodes in the workflow (depth-first)
|
|
27
|
+
*/
|
|
28
|
+
export declare function getAllNodes(node: WorkflowNode): WorkflowNode[];
|
|
29
|
+
/**
|
|
30
|
+
* Get all parent node IDs for a given node (path from root to node)
|
|
31
|
+
*/
|
|
32
|
+
export declare function getNodePath(rootNode: WorkflowNode, targetId: string): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Check if a node is a descendant of another node
|
|
35
|
+
*/
|
|
36
|
+
export declare function isDescendant(rootNode: WorkflowNode, potentialParentId: string, nodeId: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Replace a node in the tree
|
|
39
|
+
*/
|
|
40
|
+
export declare function replaceNode(node: WorkflowNode, targetId: string, replacement: WorkflowNode): WorkflowNode;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import BaseInput from '../input/BaseInput.js';
|
|
2
|
+
/**
|
|
3
|
+
* @label HTML Editor
|
|
4
|
+
* @tag wc-html-editor
|
|
5
|
+
* @rawTag html-editor
|
|
6
|
+
*
|
|
7
|
+
* @summary A WYSIWYG HTML editor component with a Material 3 styled toolbar.
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>The HTML Editor provides a rich-text editing experience using the browser's built-in
|
|
10
|
+
* <code>contenteditable</code> API. It wraps the editable area in a Material 3 styled
|
|
11
|
+
* <code>wc-field</code> and exposes a toolbar with common formatting actions.</p>
|
|
12
|
+
*
|
|
13
|
+
* <p>Get and set the HTML content via the <code>value</code> property. The component
|
|
14
|
+
* dispatches a <code>change</code> event whenever the content is modified.</p>
|
|
15
|
+
*
|
|
16
|
+
* @cssprop --html-editor-min-height - Minimum height of the editable area. Defaults to 8rem.
|
|
17
|
+
* @cssprop --html-editor-toolbar-background - Background color of the toolbar.
|
|
18
|
+
* @cssprop --html-editor-toolbar-border-color - Border color between toolbar and editing area.
|
|
19
|
+
*
|
|
20
|
+
* @fires {Event} change - Fired whenever the editable content changes.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```html
|
|
24
|
+
* <wc-html-editor label="Description" value="<p>Hello <strong>world</strong></p>"></wc-html-editor>
|
|
25
|
+
* ```
|
|
26
|
+
* @tags input editor
|
|
27
|
+
*/
|
|
28
|
+
export declare class HtmlEditor extends BaseInput {
|
|
29
|
+
static styles: import("lit").CSSResultGroup[];
|
|
30
|
+
/** Current HTML value of the editor. */
|
|
31
|
+
value: string;
|
|
32
|
+
/** Label displayed above the editor. */
|
|
33
|
+
label: string;
|
|
34
|
+
/** Placeholder text shown when the editor is empty. */
|
|
35
|
+
placeholder: string;
|
|
36
|
+
/** Visual style of the wrapping field. */
|
|
37
|
+
variant: 'filled' | 'outlined' | 'default';
|
|
38
|
+
/** Helper text displayed below the editor. */
|
|
39
|
+
helperText: string;
|
|
40
|
+
/** Whether to show an error state. */
|
|
41
|
+
error: boolean;
|
|
42
|
+
/** Error message text. */
|
|
43
|
+
errorText: string;
|
|
44
|
+
private _focused;
|
|
45
|
+
private _editorEl;
|
|
46
|
+
protected firstUpdated(): void;
|
|
47
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
48
|
+
private _execCmd;
|
|
49
|
+
private _handleInput;
|
|
50
|
+
private _handleFocus;
|
|
51
|
+
private _handleBlur;
|
|
52
|
+
private _insertLink;
|
|
53
|
+
private _toolbarButton;
|
|
54
|
+
private _renderToolbar;
|
|
55
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
56
|
+
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export { Elevation } from './elevation/index.js';
|
|
|
7
7
|
export { Button, ButtonGroup, IconButton } from './button/index.js';
|
|
8
8
|
export { Fab } from './fab/index.js';
|
|
9
9
|
export { SegmentedButton, SegmentedButtonGroup } from './segmented-button/index.js';
|
|
10
|
+
export { SplitButton } from './split-button/index.js';
|
|
11
|
+
export { DropdownButton } from './dropdown-button/index.js';
|
|
10
12
|
export { FocusRing } from './focus-ring/index.js';
|
|
11
13
|
export { Ripple } from './ripple/index.js';
|
|
12
14
|
export { Accordion } from './accordion/index.js';
|
|
@@ -30,10 +32,12 @@ export { Container } from './container/index.js';
|
|
|
30
32
|
export { NumberCounter } from './number-counter/index.js';
|
|
31
33
|
export { EmptyState } from './empty-state/index.js';
|
|
32
34
|
export { Tooltip } from './popover/index.js';
|
|
35
|
+
export { Popover, PopoverContent } from './popover/index.js';
|
|
33
36
|
export { Breadcrumb, BreadcrumbItem } from './breadcrumb/index.js';
|
|
34
37
|
export { Menu, MenuItem, SubMenu } from './menu/index.js';
|
|
35
38
|
export { CodeHighlighter } from './code-highlighter/index.js';
|
|
36
39
|
export { CodeEditor } from './code-editor/index.js';
|
|
40
|
+
export { HtmlEditor } from './html-editor/index.js';
|
|
37
41
|
export { Image } from './image/index.js';
|
|
38
42
|
export { Tab, TabGroup, TabPanel, Tabs } from './tabs/index.js';
|
|
39
43
|
export { Slider } from './slider/index.js';
|
|
@@ -46,8 +50,10 @@ export { SidebarMenu, SidebarMenuItem, SidebarSubMenu } from './sidebar-menu/ind
|
|
|
46
50
|
export { Card } from './card/index.js';
|
|
47
51
|
export { Banner } from './banner/index.js';
|
|
48
52
|
export { Notification } from './notification/index.js';
|
|
53
|
+
export { NotificationManager } from './notification-manager/index.js';
|
|
49
54
|
export { Snackbar } from './snackbar/index.js';
|
|
50
55
|
export { Radio } from './radio/index.js';
|
|
56
|
+
export { Modal } from './modal/index.js';
|
|
51
57
|
export { BottomSheet } from './bottom-sheet/index.js';
|
|
52
58
|
export { SideSheet } from './side-sheet/index.js';
|
|
53
59
|
export { Select } from './select/index.js';
|
|
@@ -56,3 +62,10 @@ export { SelectOptionElement } from './select/index.js';
|
|
|
56
62
|
export { Search } from './search/index.js';
|
|
57
63
|
export { Toolbar } from './toolbar/index.js';
|
|
58
64
|
export { NavigationRail, NavigationRailItem } from './navigation-rail/index.js';
|
|
65
|
+
export { Calendar, CalendarColumnView, CalendarMonthView } from './calendar/index.js';
|
|
66
|
+
export type { CalendarViewType, EventType } from './calendar/index.js';
|
|
67
|
+
export { Canvas } from './canvas/index.js';
|
|
68
|
+
export type { CanvasShape } from './canvas/index.js';
|
|
69
|
+
export { FlowDesigner, FlowDesignerNode } from './flow-designer/index.js';
|
|
70
|
+
export type { Workflow, WorkflowNode, WorkflowCommand, PositionedNode, ValidationError, HistoryEntry, EditorState, NodeType, WorkflowChangeEvent, SwimlaneConfig, NodeTemplate, } from './flow-designer/index.js';
|
|
71
|
+
export { ConditionBuilder, CbPredicate, CbCompoundExpression, CbExpression, CbDivider } from './condition-builder/index.js';
|
|
@@ -43,7 +43,7 @@ export declare class Menu extends LitElement {
|
|
|
43
43
|
private activeIndex;
|
|
44
44
|
private readonly menuListElement;
|
|
45
45
|
anchorElement: HTMLElement | null;
|
|
46
|
-
private readonly
|
|
46
|
+
private readonly _floatingController;
|
|
47
47
|
private _lastFocusedElement;
|
|
48
48
|
private _closeReason;
|
|
49
49
|
connectedCallback(): void;
|
|
@@ -60,13 +60,11 @@ export declare class Menu extends LitElement {
|
|
|
60
60
|
private _setBoundaryActive;
|
|
61
61
|
private _getActiveItem;
|
|
62
62
|
private _getFirstEnabledItem;
|
|
63
|
-
private
|
|
64
|
-
private
|
|
65
|
-
private
|
|
63
|
+
private _isEventFromThisMenu;
|
|
64
|
+
private _ownedItemFromEvent;
|
|
65
|
+
private _setActiveItem;
|
|
66
|
+
private _onClick;
|
|
66
67
|
private _onKeyDown;
|
|
67
|
-
private _onWindowClick;
|
|
68
|
-
private _isWithinMenuTree;
|
|
69
|
-
private _onFocusOut;
|
|
70
68
|
private _onSlotChange;
|
|
71
69
|
private _applyPositioning;
|
|
72
70
|
protected updated(changedProperties: Map<string, unknown>): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
declare const MenuItem_base: typeof LitElement & import("../../__mixins/MixinConstructor.js").MixinConstructor<import("@/__mixins/BaseHyperlinkMixin.js").BaseHyperlinkInterface> & import("../../__mixins/MixinConstructor.js").MixinConstructor<import("@/__mixins/BaseButtonMixin.js").BaseButtonInterface>;
|
|
2
3
|
/**
|
|
3
4
|
* @label Menu Item
|
|
4
5
|
* @tag wc-menu-item
|
|
@@ -12,28 +13,28 @@ import { LitElement } from 'lit';
|
|
|
12
13
|
* <wc-menu-item>Menu Item</wc-menu-item>
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
export declare class MenuItem extends
|
|
16
|
-
disabled: boolean;
|
|
16
|
+
export declare class MenuItem extends MenuItem_base {
|
|
17
17
|
value: string;
|
|
18
18
|
selected: boolean;
|
|
19
19
|
keepOpen: boolean;
|
|
20
20
|
hasSubmenu: boolean;
|
|
21
21
|
submenuOpen: boolean;
|
|
22
|
-
href?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Sets or retrieves the window or frame at which to target content.
|
|
25
|
-
*/
|
|
26
|
-
target: string;
|
|
27
22
|
variant: 'standard' | 'vibrant';
|
|
28
23
|
static styles: import("lit").CSSResultGroup[];
|
|
24
|
+
readonly itemElement: HTMLElement | null;
|
|
25
|
+
/**
|
|
26
|
+
* States
|
|
27
|
+
*/
|
|
28
|
+
isPressed: boolean;
|
|
29
29
|
connectedCallback(): void;
|
|
30
30
|
disconnectedCallback(): void;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
focus(): void;
|
|
32
|
+
blur(): void;
|
|
33
|
+
__dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void;
|
|
34
|
+
__dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
|
|
35
|
+
__handleKeyDown: (event: KeyboardEvent) => void;
|
|
36
|
+
__handlePress: (event: KeyboardEvent | MouseEvent) => void;
|
|
37
37
|
render(): import("lit-html").TemplateResult<1>;
|
|
38
38
|
renderContent(): import("lit-html").TemplateResult<1>;
|
|
39
39
|
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Modal } from './modal.js';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'fullscreen';
|
|
3
|
+
/**
|
|
4
|
+
* @label Modal
|
|
5
|
+
* @tag wc-modal
|
|
6
|
+
* @rawTag modal-wc
|
|
7
|
+
* @summary A Material Design 3 dialog/modal for displaying content in a layer above the page, with optional header, body, and footer slots.
|
|
8
|
+
*
|
|
9
|
+
* @cssprop --modal-container-color - Background color of the dialog container.
|
|
10
|
+
* @cssprop --modal-scrim-color - Color of the scrim backdrop.
|
|
11
|
+
* @cssprop --modal-shape - Corner radius of the dialog container.
|
|
12
|
+
* @cssprop --modal-min-width - Minimum width of the dialog.
|
|
13
|
+
* @cssprop --modal-max-width - Maximum width of the dialog.
|
|
14
|
+
* @cssprop --modal-max-height - Maximum height of the dialog.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <wc-modal open heading="Confirm Action">
|
|
19
|
+
* <p>Are you sure you want to continue?</p>
|
|
20
|
+
* <div slot="footer">
|
|
21
|
+
* <wc-button variant="text">Cancel</wc-button>
|
|
22
|
+
* <wc-button>Confirm</wc-button>
|
|
23
|
+
* </div>
|
|
24
|
+
* </wc-modal>
|
|
25
|
+
* ```
|
|
26
|
+
* @tags overlay, dialog, feedback
|
|
27
|
+
*/
|
|
28
|
+
export declare class Modal extends LitElement {
|
|
29
|
+
static styles: import("lit").CSSResultGroup[];
|
|
30
|
+
/** Whether the modal is open. */
|
|
31
|
+
open: boolean;
|
|
32
|
+
/** Heading text shown in the modal header. */
|
|
33
|
+
heading: string;
|
|
34
|
+
/** Optional subheading / label text shown above the heading. */
|
|
35
|
+
subheading: string;
|
|
36
|
+
/**
|
|
37
|
+
* Size of the modal dialog.
|
|
38
|
+
* - `"xs"`: Extra-small.
|
|
39
|
+
* - `"sm"`: Small.
|
|
40
|
+
* - `"md"`: Medium (default).
|
|
41
|
+
* - `"lg"`: Large.
|
|
42
|
+
* - `"fullscreen"`: Full-screen dialog.
|
|
43
|
+
*/
|
|
44
|
+
size: ModalSize;
|
|
45
|
+
/** When true, hides the close button in the header. */
|
|
46
|
+
hideClose: boolean;
|
|
47
|
+
/** When true, renders a loading overlay inside the modal. */
|
|
48
|
+
showLoader: boolean;
|
|
49
|
+
/** When true, clicking the scrim will not close the modal. */
|
|
50
|
+
noScrimClose: boolean;
|
|
51
|
+
private _visible;
|
|
52
|
+
show(): void;
|
|
53
|
+
hide(): void;
|
|
54
|
+
private _close;
|
|
55
|
+
private _handleScrimClick;
|
|
56
|
+
private _handleCloseClick;
|
|
57
|
+
private readonly _handleKeydown;
|
|
58
|
+
protected updated(changedProperties: Map<string, unknown>): void;
|
|
59
|
+
disconnectedCallback(): void;
|
|
60
|
+
private _handleAnimationEnd;
|
|
61
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
62
|
+
}
|
|
63
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NotificationManager } from './notification-manager.js';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Notification Manager
|
|
4
|
+
* @tag wc-notification-manager
|
|
5
|
+
* @rawTag notification-manager
|
|
6
|
+
* @summary The Notification Manager handles the organization and display of notifications within the application.
|
|
7
|
+
*
|
|
8
|
+
* @fires {CustomEvent} notification-manager-action - Fired when the action button of a managed notification is clicked. Detail: `{ id: string }`.
|
|
9
|
+
* @fires {CustomEvent} notification-manager-dismiss - Fired when a managed notification is dismissed. Detail: `{ id: string }`.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <wc-notification-manager position="bottom-right"></wc-notification-manager>
|
|
14
|
+
* <script>
|
|
15
|
+
* window.dispatchEvent(new CustomEvent('notification', {
|
|
16
|
+
* detail: { title: 'Record saved', variant: 'success', dismissible: true }
|
|
17
|
+
* }));
|
|
18
|
+
* </script>
|
|
19
|
+
* ```
|
|
20
|
+
* @tags display, feedback
|
|
21
|
+
*/
|
|
22
|
+
export declare class NotificationManager extends LitElement {
|
|
23
|
+
static styles: import("lit").CSSResultGroup[];
|
|
24
|
+
/**
|
|
25
|
+
* Name of this manager instance. Only notifications whose `target` matches
|
|
26
|
+
* this name (or whose `target` is absent and this manager's `name` is
|
|
27
|
+
* `'global'`) will be handled.
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Screen position where notifications are stacked.
|
|
32
|
+
*/
|
|
33
|
+
position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
34
|
+
private notifications;
|
|
35
|
+
private readonly handleWindowNotification;
|
|
36
|
+
private readonly handleWindowDismiss;
|
|
37
|
+
connectedCallback(): void;
|
|
38
|
+
disconnectedCallback(): void;
|
|
39
|
+
private _hideNotification;
|
|
40
|
+
private _handleDismiss;
|
|
41
|
+
private _handleAction;
|
|
42
|
+
private renderNotification;
|
|
43
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Popover Content
|
|
4
|
+
* @tag wc-popover-content
|
|
5
|
+
* @rawTag popover-content
|
|
6
|
+
* @summary Content container for the wc-popover component.
|
|
7
|
+
* @childComponent true
|
|
8
|
+
* @tags display
|
|
9
|
+
*
|
|
10
|
+
* @cssprop --popover-content-background - Background color of the popover content. Defaults to `var(--color-surface-container)`.
|
|
11
|
+
* @cssprop --popover-content-padding - Padding of the popover content. Defaults to `var(--spacing-200)`.
|
|
12
|
+
* @cssprop --popover-content-border-radius - Border radius of the popover content. Defaults to `var(--shape-corner-small)`.
|
|
13
|
+
* @cssprop --popover-content-min-width - Minimum width of the popover content. Defaults to `10rem`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <wc-popover-content>
|
|
18
|
+
* <p>Popover body text</p>
|
|
19
|
+
* </wc-popover-content>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class PopoverContent extends LitElement {
|
|
23
|
+
static styles: import("lit").CSSResultGroup[];
|
|
24
|
+
/**
|
|
25
|
+
* Whether the popover content is visible.
|
|
26
|
+
*/
|
|
27
|
+
open: boolean;
|
|
28
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import type { Placement } from '@floating-ui/dom';
|
|
3
|
+
/**
|
|
4
|
+
* @label Popover
|
|
5
|
+
* @tag wc-popover
|
|
6
|
+
* @rawTag popover
|
|
7
|
+
* @summary Displays additional information in a floating panel anchored to a trigger element.
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>The Popover component wraps a trigger element and a <code>wc-popover-content</code> child. It uses
|
|
10
|
+
* floating-ui to compute position, keeping the panel visible inside the viewport even on scroll.</p>
|
|
11
|
+
* @tags display
|
|
12
|
+
*
|
|
13
|
+
* @fires {CustomEvent} wc-popover--open - Fired when the popover opens.
|
|
14
|
+
* @fires {CustomEvent} wc-popover--close - Fired when the popover closes.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <wc-popover trigger="click">
|
|
19
|
+
* <wc-button>Open popover</wc-button>
|
|
20
|
+
* <wc-popover-content>
|
|
21
|
+
* <p>Popover body text goes here.</p>
|
|
22
|
+
* </wc-popover-content>
|
|
23
|
+
* </wc-popover>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class Popover extends LitElement {
|
|
27
|
+
static styles: import("lit").CSSResultGroup[];
|
|
28
|
+
/**
|
|
29
|
+
* Determines how the popover is triggered.
|
|
30
|
+
* Possible values are `"click"`, `"hover"`, `"manual"`.
|
|
31
|
+
*/
|
|
32
|
+
trigger: 'click' | 'hover' | 'manual';
|
|
33
|
+
/**
|
|
34
|
+
* Preferred placement of the popover relative to the trigger element.
|
|
35
|
+
* Accepts any floating-ui `Placement` string such as `"bottom"`, `"top-start"`, `"right"`, etc.
|
|
36
|
+
*/
|
|
37
|
+
placement: Placement;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the popover is open.
|
|
40
|
+
*/
|
|
41
|
+
open: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Distance in pixels between the trigger element and the popover panel.
|
|
44
|
+
*/
|
|
45
|
+
offset: number;
|
|
46
|
+
private _floating;
|
|
47
|
+
private _contentEl;
|
|
48
|
+
private _triggerEl;
|
|
49
|
+
private _setupFloating;
|
|
50
|
+
connectedCallback(): void;
|
|
51
|
+
firstUpdated(): void;
|
|
52
|
+
updated(changedProps: Map<string, unknown>): void;
|
|
53
|
+
/**
|
|
54
|
+
* Programmatically opens the popover.
|
|
55
|
+
*/
|
|
56
|
+
show(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Programmatically closes the popover.
|
|
59
|
+
*/
|
|
60
|
+
hide(): void;
|
|
61
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SplitButton } from './split-button.js';
|