@metadev/daga-react 0.0.1
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/Changelog.md +212 -0
- package/LICENSE.md +13 -0
- package/README.md +67 -0
- package/index.d.ts +16 -0
- package/index.js +4 -0
- package/index.mjs +9977 -0
- package/lib/collapse-button/CollapseButtonComponent.d.ts +16 -0
- package/lib/contexts/CanvasContext.d.ts +4 -0
- package/lib/contexts/ConfigContext.d.ts +4 -0
- package/lib/daga-react.d.ts +2 -0
- package/lib/diagram/DagaDiagram.d.ts +12 -0
- package/lib/diagram-buttons/DiagramButtonsComponent.d.ts +14 -0
- package/lib/errors/DagaErrorsComponent.d.ts +4 -0
- package/lib/models/ReactPropertyEditor.d.ts +14 -0
- package/lib/palette/PaletteComponent.d.ts +13 -0
- package/lib/property-editor/PropertyEditor.d.ts +12 -0
- package/lib/property-editor/object-editor/DagaObjectEditorComponent.d.ts +8 -0
- package/lib/property-editor/property-settings/DagaPropertySettingsComponent.d.ts +8 -0
- package/package.json +38 -0
- package/style.css +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React, Ref } from 'react';
|
|
2
|
+
import { Side } from '../../../../daga/src/index.ts';
|
|
3
|
+
|
|
4
|
+
interface CollapseButtonComponentProps {
|
|
5
|
+
collapsableSelector: string | Ref<HTMLElement>;
|
|
6
|
+
collapsableAdditionalSelector: string;
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
direction: Side;
|
|
10
|
+
rule: string;
|
|
11
|
+
collapsedValue: string;
|
|
12
|
+
visibleValue: string;
|
|
13
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const CollapseButtonComponent: React.FC<CollapseButtonComponentProps>;
|
|
16
|
+
export { CollapseButtonComponent };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DiagramConfig, DagaModel, DiagramEvent, Canvas } from '../../../../daga/src/index.ts';
|
|
3
|
+
|
|
4
|
+
interface DagaDiagramProps {
|
|
5
|
+
config: DiagramConfig;
|
|
6
|
+
model?: DagaModel;
|
|
7
|
+
onCanvasCreated?: (canvas: Canvas) => void;
|
|
8
|
+
onDiagramEvent?: (event: DiagramEvent) => void;
|
|
9
|
+
onModelChange?: (model: DagaModel) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const DagaDiagram: React.FC<DagaDiagramProps>;
|
|
12
|
+
export { DagaDiagram };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Corner, Side } from '../../../../daga/src/index.ts';
|
|
3
|
+
|
|
4
|
+
interface DiagramButtonsComponentProps {
|
|
5
|
+
location: Corner;
|
|
6
|
+
direction: Side;
|
|
7
|
+
enableAction: boolean;
|
|
8
|
+
enableFilter: boolean;
|
|
9
|
+
enableLayout: boolean;
|
|
10
|
+
enableSelection: boolean;
|
|
11
|
+
enableZoom: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const DiagramButtonsComponent: React.FC<DiagramButtonsComponentProps>;
|
|
14
|
+
export { DiagramButtonsComponent };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PropertyEditor, ValueSet } from '../../../../daga/src/index.ts';
|
|
2
|
+
|
|
3
|
+
export declare class ReactPropertyEditor implements PropertyEditor {
|
|
4
|
+
private _title?;
|
|
5
|
+
private _valueSet?;
|
|
6
|
+
private onTitleChange;
|
|
7
|
+
private onValueSetChange;
|
|
8
|
+
constructor(onTitleChange: (title: string | undefined) => void, onValueSetChange: (valueSet: ValueSet | undefined) => void);
|
|
9
|
+
get title(): string | undefined;
|
|
10
|
+
set title(title: string | undefined);
|
|
11
|
+
get valueSet(): ValueSet | undefined;
|
|
12
|
+
set valueSet(valueSet: ValueSet | undefined);
|
|
13
|
+
highlightProperty(...propertyNames: string[]): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Corner, PaletteSectionConfig, Side } from '../../../../daga/src/index.ts';
|
|
3
|
+
|
|
4
|
+
interface PaletteComponentProps {
|
|
5
|
+
palettes: PaletteSectionConfig[];
|
|
6
|
+
currentPalette?: PaletteSectionConfig;
|
|
7
|
+
currentCategory?: string;
|
|
8
|
+
location: Corner;
|
|
9
|
+
direction: Side;
|
|
10
|
+
width: string;
|
|
11
|
+
}
|
|
12
|
+
declare const PaletteComponent: React.FC<PaletteComponentProps>;
|
|
13
|
+
export { PaletteComponent };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Corner, Property, Side, ValueSet } from '../../../../daga/src/index.ts';
|
|
2
|
+
|
|
3
|
+
interface DagaPropertyEditorComponentProps {
|
|
4
|
+
location: Corner;
|
|
5
|
+
direction: Side;
|
|
6
|
+
width: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
valueSet?: ValueSet;
|
|
9
|
+
onValueChange: (property: Property, value: unknown) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const DagaPropertyEditorComponent: React.FC<DagaPropertyEditorComponentProps>;
|
|
12
|
+
export { DagaPropertyEditorComponent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Property, ValueSet } from '../../../../../daga/src/index.ts';
|
|
2
|
+
|
|
3
|
+
interface DagaObjectEditorComponentProps {
|
|
4
|
+
valueSet: ValueSet;
|
|
5
|
+
onValueChange: (property: Property, value: unknown) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const DagaObjectEditorComponent: React.FC<DagaObjectEditorComponentProps>;
|
|
8
|
+
export { DagaObjectEditorComponent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValueSet } from '../../../../../daga/src/index.ts';
|
|
2
|
+
|
|
3
|
+
interface DagaPropertySettingsComponentProps {
|
|
4
|
+
valueSet?: ValueSet;
|
|
5
|
+
depth: number;
|
|
6
|
+
}
|
|
7
|
+
declare const DagaPropertySettingsComponent: React.FC<DagaPropertySettingsComponentProps>;
|
|
8
|
+
export { DagaPropertySettingsComponent };
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@metadev/daga-react",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "./index.js",
|
|
5
|
+
"module": "./index.mjs",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
7
|
+
"homepage": "https://metadev.pro/products/daga/",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"diagramming",
|
|
10
|
+
"models",
|
|
11
|
+
"dsl",
|
|
12
|
+
"mde",
|
|
13
|
+
"nocode",
|
|
14
|
+
"lowcode",
|
|
15
|
+
"visual-editor",
|
|
16
|
+
"daga",
|
|
17
|
+
"react"
|
|
18
|
+
],
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"author": "https://metadev.pro",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./index.mjs",
|
|
24
|
+
"require": "./index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"lib/",
|
|
29
|
+
"Changelog.md",
|
|
30
|
+
"index.d.ts",
|
|
31
|
+
"index.js",
|
|
32
|
+
"index.mjs",
|
|
33
|
+
"package.json",
|
|
34
|
+
"LICENSE.md",
|
|
35
|
+
"README.md",
|
|
36
|
+
"style.css"
|
|
37
|
+
]
|
|
38
|
+
}
|