@mindfusion/diagramming-controls 1.3.0 → 1.4.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.
@@ -657,6 +657,7 @@ declare module "Diagramming.Controls/ShapePalette" {
657
657
  anchorPointsLabel: string;
658
658
  labelBrush: string;
659
659
  fillShapes(): void;
660
+ _draggedNode: any;
660
661
  }
661
662
  import { NodeListView } from "@mindfusion/diagramming";
662
663
  }
@@ -820,6 +821,179 @@ declare module "Diagramming.Controls/ShapeDesigner" {
820
821
  import { Theme } from "@mindfusion/diagramming";
821
822
  import { EventDispatcher } from "@mindfusion/controls";
822
823
  }
824
+ declare module "Diagramming.Controls/Palette" {
825
+ /**
826
+ * @class Represents a tool palette control that displays DiagramItem objects grouped
827
+ * into categories. Items from the palette can be added to a diagram by drag-and-drop.
828
+ * @augments Accordion
829
+ */
830
+ export class Palette extends Accordion {
831
+ /**
832
+ * Creates and initializes a new Palette from the specified element.
833
+ * This method is static and can be called without creating an instance of the class.
834
+ * @param {HTMLDivElement} element The DOM element that the Palette should be attached to.
835
+ * @returns {Palette} The newly created Palette object.
836
+ */
837
+ static create(element: HTMLDivElement): Palette;
838
+ /**
839
+ * Returns the specified Palette object. This member is static and can be
840
+ * invoked without creating an instance of the class.
841
+ * @param {String} id The id of the Palette's element.
842
+ * @returns {Palette} A Palette object with the specified id, if found; otherwise, null.
843
+ */
844
+ static find(id: string): Palette;
845
+ /**
846
+ * Initializes a new instance of the Palette class.
847
+ * @constructor
848
+ * @param {HTMLDivElement} element The DOM Element this Palette is associated with.
849
+ */
850
+ constructor(element: HTMLDivElement);
851
+ _measureUnit: number;
852
+ _columns: number;
853
+ _labelPosition: any;
854
+ _padding: number;
855
+ _iconSize: Size;
856
+ _newInstanceSize: Size;
857
+ _textColor: string;
858
+ _captionFont: Font;
859
+ _controls: Map<any, any>;
860
+ itemSelectedDelegate: (sender: any, args: any) => void;
861
+ updateSizeDelegate: (sender: any, args: any) => void;
862
+ set columns(arg: number);
863
+ /**
864
+ * Gets or sets the number of columns in palette's layout.
865
+ * @type {Number}
866
+ * @summary An integer value specifying the number of columns.
867
+ */
868
+ get columns(): number;
869
+ set labelPosition(arg: any);
870
+ /**
871
+ * Gets or sets a value indicating the position of labels relative to item icons.
872
+ * @type {LabelPosition}
873
+ * @summary A member of the LabelPosition enumeration.
874
+ */
875
+ get labelPosition(): any;
876
+ set iconSize(arg: Size);
877
+ /**
878
+ * Gets or sets the size of items displayed in the palette.
879
+ * @type {Size}
880
+ * @summary An instance of the Size class specifying item size.
881
+ */
882
+ get iconSize(): Size;
883
+ set newInstanceSize(arg: Size);
884
+ /**
885
+ * Gets or sets the default size of items created by drag-and-drop from this palette.
886
+ * @type {Size}
887
+ * @summary An instance of the Size class specifying item size.
888
+ */
889
+ get newInstanceSize(): Size;
890
+ set padding(arg: number);
891
+ /**
892
+ * Gets or sets the padding space between item's slot bounds and its contents.
893
+ * @type {Number}
894
+ * @summary A number that specifies the padding space size.
895
+ */
896
+ get padding(): number;
897
+ set measureUnit(arg: GraphicsUnit);
898
+ /**
899
+ * Gets or sets the unit of measure used to specify item sizes.
900
+ * @type {GraphicsUnit}
901
+ * @summary A GraphicsUnit instance.
902
+ */
903
+ get measureUnit(): GraphicsUnit;
904
+ set backColor(arg: string);
905
+ /**
906
+ * Gets or sets the background color of the control.
907
+ * @type {String}
908
+ * @summary A string specifying the color name or hexadecimal value.
909
+ */
910
+ get backColor(): string;
911
+ set textColor(arg: string);
912
+ /**
913
+ * Gets or sets the color used to paint item captions.
914
+ * @type {String}
915
+ * @summary A string specifying the color name or hexadecimal value.
916
+ */
917
+ get textColor(): string;
918
+ set captionFont(arg: Font);
919
+ /**
920
+ * Gets or sets the font used for item captions.
921
+ * @type {Font}
922
+ * @summary An instance of the Font class.
923
+ */
924
+ get captionFont(): Font;
925
+ set minVisibleFontSize(arg: number);
926
+ /**
927
+ * Gets or sets a threshold value that hides text if scaled font sizes become smaller.
928
+ * @type {Number}
929
+ * @summary A value specifying the smallest visible font size.
930
+ */
931
+ get minVisibleFontSize(): number;
932
+ onUpdateSize(control: any): void;
933
+ /**
934
+ * Adds a new category to the palette.
935
+ * @param {String} title The title text of the category.
936
+ * @param {String} [image] The URL of an image to be displayed in the category header.
937
+ */
938
+ addCategory(title: string, image?: string): AccordionItem;
939
+ /**
940
+ * Removes a category from the control.
941
+ * @param {String} title The title of the category to remove.
942
+ */
943
+ removeCategory(title: string): void;
944
+ /**
945
+ * Adds an item to the control.
946
+ * @param {DiagramItem} item The item to add.
947
+ * @param {String} category The category of the item.
948
+ * @param {String} [caption] The caption to display for the item.
949
+ */
950
+ addItem(item: any, category: string, caption?: string): void;
951
+ /**
952
+ * Removes an item from the control.
953
+ * @param {DiagramItem} item The item to remove.
954
+ */
955
+ removeItem(item: any): void;
956
+ /**
957
+ * Removes all items from the palette.
958
+ */
959
+ clearAll(): void;
960
+ set shapeLibraryLocation(arg: string);
961
+ /**
962
+ * Gets the location of a shape library file containing custom shape definitions.
963
+ * @type {String}
964
+ * @summary URL of a shape library file containing custom shape definitions.
965
+ */
966
+ get shapeLibraryLocation(): string;
967
+ _shapeLibraryLocation: any;
968
+ _backColor: any;
969
+ _minVisibleFontSize: any;
970
+ /**
971
+ * Raised when a node is selected, either programmatically or by the user.
972
+ * @event nodeSelected
973
+ * @type {EventDispatcher}
974
+ * @property {Palette} sender
975
+ * @property {NodeEventArgs} args
976
+ */
977
+ get nodeSelected(): EventDispatcher;
978
+ _nodeSelected: EventDispatcher;
979
+ /**
980
+ * Raised when a link is selected, either programmatically or by the user.
981
+ * @event linkSelected
982
+ * @type {EventDispatcher}
983
+ * @property {Palette} sender
984
+ * @property {LinkEventArgs} args
985
+ */
986
+ get linkSelected(): EventDispatcher;
987
+ _linkSelected: EventDispatcher;
988
+ onItemSelected(sender: any, args: any): void;
989
+ }
990
+ import { Accordion } from "@mindfusion/common-ui";
991
+ import { Size } from "@mindfusion/drawing";
992
+ import { Font } from "@mindfusion/drawing";
993
+ import { GraphicsUnit } from "@mindfusion/drawing";
994
+ import { AccordionItem } from "@mindfusion/common-ui";
995
+ import { EventDispatcher } from "@mindfusion/controls";
996
+ }
823
997
  declare module "@mindfusion/diagramming-controls" {
824
998
  export { TabAlignment } from "Diagramming.Controls/Enum";
825
999
  export { Events } from "Diagramming.Controls/Events";
@@ -827,4 +1001,5 @@ declare module "@mindfusion/diagramming-controls" {
827
1001
  export { TabbedDiagramView } from "Diagramming.Controls/TabbedDiagramView";
828
1002
  export { WebComponents } from "Diagramming.Controls/WebComponents";
829
1003
  export { ShapeDesigner } from "Diagramming.Controls/ShapeDesigner";
1004
+ export { Palette } from "Diagramming.Controls/Palette";
830
1005
  }
@@ -657,6 +657,7 @@ declare module "Diagramming.Controls/ShapePalette" {
657
657
  anchorPointsLabel: string;
658
658
  labelBrush: string;
659
659
  fillShapes(): void;
660
+ _draggedNode: any;
660
661
  }
661
662
  import { NodeListView } from "@mindfusion/diagramming";
662
663
  }
@@ -820,6 +821,179 @@ declare module "Diagramming.Controls/ShapeDesigner" {
820
821
  import { Theme } from "@mindfusion/diagramming";
821
822
  import { EventDispatcher } from "@mindfusion/controls";
822
823
  }
824
+ declare module "Diagramming.Controls/Palette" {
825
+ /**
826
+ * @class Represents a tool palette control that displays DiagramItem objects grouped
827
+ * into categories. Items from the palette can be added to a diagram by drag-and-drop.
828
+ * @augments Accordion
829
+ */
830
+ export class Palette extends Accordion {
831
+ /**
832
+ * Creates and initializes a new Palette from the specified element.
833
+ * This method is static and can be called without creating an instance of the class.
834
+ * @param {HTMLDivElement} element The DOM element that the Palette should be attached to.
835
+ * @returns {Palette} The newly created Palette object.
836
+ */
837
+ static create(element: HTMLDivElement): Palette;
838
+ /**
839
+ * Returns the specified Palette object. This member is static and can be
840
+ * invoked without creating an instance of the class.
841
+ * @param {String} id The id of the Palette's element.
842
+ * @returns {Palette} A Palette object with the specified id, if found; otherwise, null.
843
+ */
844
+ static find(id: string): Palette;
845
+ /**
846
+ * Initializes a new instance of the Palette class.
847
+ * @constructor
848
+ * @param {HTMLDivElement} element The DOM Element this Palette is associated with.
849
+ */
850
+ constructor(element: HTMLDivElement);
851
+ _measureUnit: number;
852
+ _columns: number;
853
+ _labelPosition: any;
854
+ _padding: number;
855
+ _iconSize: Size;
856
+ _newInstanceSize: Size;
857
+ _textColor: string;
858
+ _captionFont: Font;
859
+ _controls: Map<any, any>;
860
+ itemSelectedDelegate: (sender: any, args: any) => void;
861
+ updateSizeDelegate: (sender: any, args: any) => void;
862
+ set columns(arg: number);
863
+ /**
864
+ * Gets or sets the number of columns in palette's layout.
865
+ * @type {Number}
866
+ * @summary An integer value specifying the number of columns.
867
+ */
868
+ get columns(): number;
869
+ set labelPosition(arg: any);
870
+ /**
871
+ * Gets or sets a value indicating the position of labels relative to item icons.
872
+ * @type {LabelPosition}
873
+ * @summary A member of the LabelPosition enumeration.
874
+ */
875
+ get labelPosition(): any;
876
+ set iconSize(arg: Size);
877
+ /**
878
+ * Gets or sets the size of items displayed in the palette.
879
+ * @type {Size}
880
+ * @summary An instance of the Size class specifying item size.
881
+ */
882
+ get iconSize(): Size;
883
+ set newInstanceSize(arg: Size);
884
+ /**
885
+ * Gets or sets the default size of items created by drag-and-drop from this palette.
886
+ * @type {Size}
887
+ * @summary An instance of the Size class specifying item size.
888
+ */
889
+ get newInstanceSize(): Size;
890
+ set padding(arg: number);
891
+ /**
892
+ * Gets or sets the padding space between item's slot bounds and its contents.
893
+ * @type {Number}
894
+ * @summary A number that specifies the padding space size.
895
+ */
896
+ get padding(): number;
897
+ set measureUnit(arg: GraphicsUnit);
898
+ /**
899
+ * Gets or sets the unit of measure used to specify item sizes.
900
+ * @type {GraphicsUnit}
901
+ * @summary A GraphicsUnit instance.
902
+ */
903
+ get measureUnit(): GraphicsUnit;
904
+ set backColor(arg: string);
905
+ /**
906
+ * Gets or sets the background color of the control.
907
+ * @type {String}
908
+ * @summary A string specifying the color name or hexadecimal value.
909
+ */
910
+ get backColor(): string;
911
+ set textColor(arg: string);
912
+ /**
913
+ * Gets or sets the color used to paint item captions.
914
+ * @type {String}
915
+ * @summary A string specifying the color name or hexadecimal value.
916
+ */
917
+ get textColor(): string;
918
+ set captionFont(arg: Font);
919
+ /**
920
+ * Gets or sets the font used for item captions.
921
+ * @type {Font}
922
+ * @summary An instance of the Font class.
923
+ */
924
+ get captionFont(): Font;
925
+ set minVisibleFontSize(arg: number);
926
+ /**
927
+ * Gets or sets a threshold value that hides text if scaled font sizes become smaller.
928
+ * @type {Number}
929
+ * @summary A value specifying the smallest visible font size.
930
+ */
931
+ get minVisibleFontSize(): number;
932
+ onUpdateSize(control: any): void;
933
+ /**
934
+ * Adds a new category to the palette.
935
+ * @param {String} title The title text of the category.
936
+ * @param {String} [image] The URL of an image to be displayed in the category header.
937
+ */
938
+ addCategory(title: string, image?: string): AccordionItem;
939
+ /**
940
+ * Removes a category from the control.
941
+ * @param {String} title The title of the category to remove.
942
+ */
943
+ removeCategory(title: string): void;
944
+ /**
945
+ * Adds an item to the control.
946
+ * @param {DiagramItem} item The item to add.
947
+ * @param {String} category The category of the item.
948
+ * @param {String} [caption] The caption to display for the item.
949
+ */
950
+ addItem(item: any, category: string, caption?: string): void;
951
+ /**
952
+ * Removes an item from the control.
953
+ * @param {DiagramItem} item The item to remove.
954
+ */
955
+ removeItem(item: any): void;
956
+ /**
957
+ * Removes all items from the palette.
958
+ */
959
+ clearAll(): void;
960
+ set shapeLibraryLocation(arg: string);
961
+ /**
962
+ * Gets the location of a shape library file containing custom shape definitions.
963
+ * @type {String}
964
+ * @summary URL of a shape library file containing custom shape definitions.
965
+ */
966
+ get shapeLibraryLocation(): string;
967
+ _shapeLibraryLocation: any;
968
+ _backColor: any;
969
+ _minVisibleFontSize: any;
970
+ /**
971
+ * Raised when a node is selected, either programmatically or by the user.
972
+ * @event nodeSelected
973
+ * @type {EventDispatcher}
974
+ * @property {Palette} sender
975
+ * @property {NodeEventArgs} args
976
+ */
977
+ get nodeSelected(): EventDispatcher;
978
+ _nodeSelected: EventDispatcher;
979
+ /**
980
+ * Raised when a link is selected, either programmatically or by the user.
981
+ * @event linkSelected
982
+ * @type {EventDispatcher}
983
+ * @property {Palette} sender
984
+ * @property {LinkEventArgs} args
985
+ */
986
+ get linkSelected(): EventDispatcher;
987
+ _linkSelected: EventDispatcher;
988
+ onItemSelected(sender: any, args: any): void;
989
+ }
990
+ import { Accordion } from "@mindfusion/common-ui";
991
+ import { Size } from "@mindfusion/drawing";
992
+ import { Font } from "@mindfusion/drawing";
993
+ import { GraphicsUnit } from "@mindfusion/drawing";
994
+ import { AccordionItem } from "@mindfusion/common-ui";
995
+ import { EventDispatcher } from "@mindfusion/controls";
996
+ }
823
997
  declare module "@mindfusion/diagramming-controls" {
824
998
  export { TabAlignment } from "Diagramming.Controls/Enum";
825
999
  export { Events } from "Diagramming.Controls/Events";
@@ -827,4 +1001,5 @@ declare module "@mindfusion/diagramming-controls" {
827
1001
  export { TabbedDiagramView } from "Diagramming.Controls/TabbedDiagramView";
828
1002
  export { WebComponents } from "Diagramming.Controls/WebComponents";
829
1003
  export { ShapeDesigner } from "Diagramming.Controls/ShapeDesigner";
1004
+ export { Palette } from "Diagramming.Controls/Palette";
830
1005
  }