* Copyright (C) 1998-2021 by Northwoods Software Corporation. All Rights Reserved.
*/
/*
* This is an extension and not part of the main GoJS library.
* Note that the API for this class may change with any version, even point releases.
* If you intend to use an extension in production, you should copy the code to your own source directory.
* Extensions can be found in the GoJS kit under the extensions or extensionsTS folders.
* See the Extensions intro page (https://gojs.net/latest/intro/extensions.html) for more information.
*/
importgofrom'gojs';
/**
* This class implements an inspector for GoJS model data objects.
* The constructor takes three arguments:
* - `divid` ***string*** a string referencing the HTML ID of the to-be inspector's div
* - `diagram` ***Diagram*** a reference to a GoJS Diagram
* - `options` ***Object*** an optional JS Object describing options for the inspector
*
* Options:
* - `inspectSelection` ***boolean*** see {@link #inspectSelection}
* - `includesOwnProperties` ***boolean*** see {@link #includesOwnProperties}
* - `properties` ***Object*** see {@link #properties}
* - `propertyModified` ***function(propertyName, newValue, inspector)*** see {@link #propertyModified}
* - `multipleSelection` ***boolean*** see {@link #multipleSelection}
* - `showUnionProperties` ***boolean*** see {@link #showUnionProperties}
* - `showLimit` ***number*** see {@link #showLimit}
*
* Options for properties:
* - `show` ***boolean | function*** a boolean value to show or hide the property from the inspector, or a predicate function to show conditionally.
* - `readOnly` ***boolean | function*** whether or not the property is read-only
* - `type` ***string*** a string describing the data type. Supported values: "string|number|boolean|color|arrayofnumber|point|rect|size|spot|margin|select"
* - `defaultValue` ***any*** a default value for the property. Defaults to the empty string.
* - `choices` ***Array | function*** when type === "select", the Array of choices to use or a function that returns the Array of choices.
*
* Example usage of Inspector:
* ```js
* var inspector = new Inspector("myInspector", myDiagram,