mirror of
https://github.com/nasa/openmct.git
synced 2025-02-08 12:00:38 +00:00
[JSDoc] Add annotations
Bulk-add JSDoc annotations, WTD-1482.
This commit is contained in:
parent
14f97eae9c
commit
c08a460d30
@ -29,6 +29,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* The AboutController provides information to populate the
|
* The AboutController provides information to populate the
|
||||||
* About dialog.
|
* About dialog.
|
||||||
|
* @memberof platform/commonUI/about
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {object[]} versions an array of version extensions;
|
* @param {object[]} versions an array of version extensions;
|
||||||
* injected from `versions[]`
|
* injected from `versions[]`
|
||||||
@ -42,6 +43,7 @@ define(
|
|||||||
* as a line-item in the version information listing.
|
* as a line-item in the version information listing.
|
||||||
* @memberof AboutController#
|
* @memberof AboutController#
|
||||||
* @returns {object[]} version information
|
* @returns {object[]} version information
|
||||||
|
* @memberof platform/commonUI/about.AboutController#
|
||||||
*/
|
*/
|
||||||
versions: function () {
|
versions: function () {
|
||||||
return versions;
|
return versions;
|
||||||
@ -50,6 +52,7 @@ define(
|
|||||||
* Open a new window (or tab, depending on browser
|
* Open a new window (or tab, depending on browser
|
||||||
* configuration) containing open source licenses.
|
* configuration) containing open source licenses.
|
||||||
* @memberof AboutController#
|
* @memberof AboutController#
|
||||||
|
* @memberof platform/commonUI/about.AboutController#
|
||||||
*/
|
*/
|
||||||
openLicenses: function () {
|
openLicenses: function () {
|
||||||
// Open a new browser window at the licenses route
|
// Open a new browser window at the licenses route
|
||||||
|
@ -29,6 +29,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Provides extension-introduced licenses information to the
|
* Provides extension-introduced licenses information to the
|
||||||
* licenses route.
|
* licenses route.
|
||||||
|
* @memberof platform/commonUI/about
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function LicenseController(licenses) {
|
function LicenseController(licenses) {
|
||||||
@ -36,6 +37,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get license information.
|
* Get license information.
|
||||||
* @returns {Array} license extensions
|
* @returns {Array} license extensions
|
||||||
|
* @memberof platform/commonUI/about.LicenseController#
|
||||||
*/
|
*/
|
||||||
licenses: function () {
|
licenses: function () {
|
||||||
return licenses;
|
return licenses;
|
||||||
|
@ -29,6 +29,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* The LogoController provides functionality to the application
|
* The LogoController provides functionality to the application
|
||||||
* logo in the bottom-right of the user interface.
|
* logo in the bottom-right of the user interface.
|
||||||
|
* @memberof platform/commonUI/about
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {OverlayService} overlayService the overlay service
|
* @param {OverlayService} overlayService the overlay service
|
||||||
*/
|
*/
|
||||||
@ -37,6 +38,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Display the About dialog.
|
* Display the About dialog.
|
||||||
* @memberof LogoController#
|
* @memberof LogoController#
|
||||||
|
* @memberof platform/commonUI/about.LogoController#
|
||||||
*/
|
*/
|
||||||
showAboutDialog: function () {
|
showAboutDialog: function () {
|
||||||
overlayService.createOverlay("overlay-about");
|
overlayService.createOverlay("overlay-about");
|
||||||
|
@ -39,6 +39,7 @@ define(
|
|||||||
* which Angular templates first have access to the domain object
|
* which Angular templates first have access to the domain object
|
||||||
* hierarchy.
|
* hierarchy.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function BrowseController($scope, $route, $location, objectService, navigationService, urlService) {
|
function BrowseController($scope, $route, $location, objectService, navigationService, urlService) {
|
||||||
@ -157,3 +158,4 @@ define(
|
|||||||
return BrowseController;
|
return BrowseController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Controller for the `browse-object` representation of a domain
|
* Controller for the `browse-object` representation of a domain
|
||||||
* object (the right-hand side of Browse mode.)
|
* object (the right-hand side of Browse mode.)
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function BrowseObjectController($scope, $location, $route) {
|
function BrowseObjectController($scope, $location, $route) {
|
||||||
@ -71,3 +72,4 @@ define(
|
|||||||
return BrowseObjectController;
|
return BrowseObjectController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
* A left-click on the menu arrow should display a
|
* A left-click on the menu arrow should display a
|
||||||
* context menu. This controller launches the context
|
* context menu. This controller launches the context
|
||||||
* menu.
|
* menu.
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function MenuArrowController($scope) {
|
function MenuArrowController($scope) {
|
||||||
|
@ -34,6 +34,7 @@ define(
|
|||||||
* domain objects of a specific type. This is the action that
|
* domain objects of a specific type. This is the action that
|
||||||
* is performed when a user uses the Create menu.
|
* is performed when a user uses the Create menu.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {Type} type the type of domain object to create
|
* @param {Type} type the type of domain object to create
|
||||||
* @param {DomainObject} parent the domain object that should
|
* @param {DomainObject} parent the domain object that should
|
||||||
@ -95,6 +96,7 @@ define(
|
|||||||
* This will prompt for user input first.
|
* This will prompt for user input first.
|
||||||
* @method
|
* @method
|
||||||
* @memberof CreateAction
|
* @memberof CreateAction
|
||||||
|
* @memberof platform/commonUI/browse.CreateAction#
|
||||||
*/
|
*/
|
||||||
perform: perform,
|
perform: perform,
|
||||||
|
|
||||||
@ -107,6 +109,7 @@ define(
|
|||||||
* * `context`: The context in which this action will be performed.
|
* * `context`: The context in which this action will be performed.
|
||||||
*
|
*
|
||||||
* @return {object} metadata about the create action
|
* @return {object} metadata about the create action
|
||||||
|
* @memberof platform/commonUI/browse.CreateAction#
|
||||||
*/
|
*/
|
||||||
getMetadata: function () {
|
getMetadata: function () {
|
||||||
return {
|
return {
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
* The CreateActionProvider is an ActionProvider which introduces
|
* The CreateActionProvider is an ActionProvider which introduces
|
||||||
* a Create action for each creatable domain object type.
|
* a Create action for each creatable domain object type.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {TypeService} typeService the type service, used to discover
|
* @param {TypeService} typeService the type service, used to discover
|
||||||
* available types
|
* available types
|
||||||
@ -51,6 +52,7 @@ define(
|
|||||||
* @memberof CreateActionProvider
|
* @memberof CreateActionProvider
|
||||||
* @method
|
* @method
|
||||||
* @returns {CreateAction[]}
|
* @returns {CreateAction[]}
|
||||||
|
* @memberof platform/commonUI/browse.CreateActionProvider#
|
||||||
*/
|
*/
|
||||||
getActions: function (actionContext) {
|
getActions: function (actionContext) {
|
||||||
var context = actionContext || {},
|
var context = actionContext || {},
|
||||||
|
@ -34,6 +34,7 @@ define(
|
|||||||
* set of Create actions based on the currently-selected
|
* set of Create actions based on the currently-selected
|
||||||
* domain object.
|
* domain object.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function CreateMenuController($scope) {
|
function CreateMenuController($scope) {
|
||||||
|
@ -37,6 +37,7 @@ define(
|
|||||||
* @param {TypeImpl} type the type of domain object to be created
|
* @param {TypeImpl} type the type of domain object to be created
|
||||||
* @param {DomainObject} parent the domain object to serve as
|
* @param {DomainObject} parent the domain object to serve as
|
||||||
* the initial parent for the created object, in the dialog
|
* the initial parent for the created object, in the dialog
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof module:core/action/create-wizard
|
* @memberof module:core/action/create-wizard
|
||||||
*/
|
*/
|
||||||
@ -62,6 +63,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @return {FormModel} formModel the form model to
|
* @return {FormModel} formModel the form model to
|
||||||
* show in the create dialog
|
* show in the create dialog
|
||||||
|
* @memberof platform/commonUI/browse.CreateWizard#
|
||||||
*/
|
*/
|
||||||
getFormStructure: function () {
|
getFormStructure: function () {
|
||||||
var sections = [];
|
var sections = [];
|
||||||
@ -100,6 +102,7 @@ define(
|
|||||||
* in the structure.
|
* in the structure.
|
||||||
*
|
*
|
||||||
* @returns {object} the initial value of the form
|
* @returns {object} the initial value of the form
|
||||||
|
* @memberof platform/commonUI/browse.CreateWizard#
|
||||||
*/
|
*/
|
||||||
getInitialFormValue: function () {
|
getInitialFormValue: function () {
|
||||||
// Start with initial values for properties
|
// Start with initial values for properties
|
||||||
@ -116,6 +119,7 @@ define(
|
|||||||
* Based on a populated form, get the domain object which
|
* Based on a populated form, get the domain object which
|
||||||
* should be used as a parent for the newly-created object.
|
* should be used as a parent for the newly-created object.
|
||||||
* @return {DomainObject}
|
* @return {DomainObject}
|
||||||
|
* @memberof platform/commonUI/browse.CreateWizard#
|
||||||
*/
|
*/
|
||||||
getLocation: function (formValue) {
|
getLocation: function (formValue) {
|
||||||
return formValue.createParent || parent;
|
return formValue.createParent || parent;
|
||||||
@ -124,6 +128,7 @@ define(
|
|||||||
* Create the domain object model for a newly-created object,
|
* Create the domain object model for a newly-created object,
|
||||||
* based on user input read from a formModel.
|
* based on user input read from a formModel.
|
||||||
* @return {object} the domain object' model
|
* @return {object} the domain object' model
|
||||||
|
* @memberof platform/commonUI/browse.CreateWizard#
|
||||||
*/
|
*/
|
||||||
createModel: function (formValue) {
|
createModel: function (formValue) {
|
||||||
// Clone
|
// Clone
|
||||||
|
@ -39,6 +39,7 @@ define(
|
|||||||
* persisting new domain objects. Handles all actual object
|
* persisting new domain objects. Handles all actual object
|
||||||
* mutation and persistence associated with domain object
|
* mutation and persistence associated with domain object
|
||||||
* creation.
|
* creation.
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function CreationService(persistenceService, $q, $log) {
|
function CreationService(persistenceService, $q, $log) {
|
||||||
@ -131,6 +132,7 @@ define(
|
|||||||
* @param {DomainObject} parent the domain object which
|
* @param {DomainObject} parent the domain object which
|
||||||
* should contain the newly-created domain object
|
* should contain the newly-created domain object
|
||||||
* in its composition
|
* in its composition
|
||||||
|
* @memberof platform/commonUI/browse.CreationService#
|
||||||
*/
|
*/
|
||||||
createObject: createObject
|
createObject: createObject
|
||||||
};
|
};
|
||||||
@ -139,3 +141,4 @@ define(
|
|||||||
return CreationService;
|
return CreationService;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ define(
|
|||||||
* Controller for the "locator" control, which provides the
|
* Controller for the "locator" control, which provides the
|
||||||
* user with the ability to select a domain object as the
|
* user with the ability to select a domain object as the
|
||||||
* destination for a newly-created object in the Create menu.
|
* destination for a newly-created object in the Create menu.
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function LocatorController($scope) {
|
function LocatorController($scope) {
|
||||||
@ -79,3 +80,4 @@ define(
|
|||||||
return LocatorController;
|
return LocatorController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The navigate action navigates to a specific domain object.
|
* The navigate action navigates to a specific domain object.
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function NavigateAction(navigationService, $q, context) {
|
function NavigateAction(navigationService, $q, context) {
|
||||||
@ -46,6 +47,7 @@ define(
|
|||||||
* Navigate to the object described in the context.
|
* Navigate to the object described in the context.
|
||||||
* @returns {Promise} a promise that is resolved once the
|
* @returns {Promise} a promise that is resolved once the
|
||||||
* navigation has been updated
|
* navigation has been updated
|
||||||
|
* @memberof platform/commonUI/browse.NavigateAction#
|
||||||
*/
|
*/
|
||||||
perform: perform
|
perform: perform
|
||||||
};
|
};
|
||||||
|
@ -32,6 +32,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* The navigation service maintains the application's current
|
* The navigation service maintains the application's current
|
||||||
* navigation state, and allows listening for changes thereto.
|
* navigation state, and allows listening for changes thereto.
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function NavigationService() {
|
function NavigationService() {
|
||||||
@ -68,12 +69,14 @@ define(
|
|||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Get the current navigation state.
|
* Get the current navigation state.
|
||||||
|
* @memberof platform/commonUI/browse.NavigationService#
|
||||||
*/
|
*/
|
||||||
getNavigation: getNavigation,
|
getNavigation: getNavigation,
|
||||||
/**
|
/**
|
||||||
* Set the current navigation state. Thiswill invoke listeners.
|
* Set the current navigation state. Thiswill invoke listeners.
|
||||||
* @param {DomainObject} value the domain object to navigate
|
* @param {DomainObject} value the domain object to navigate
|
||||||
* to
|
* to
|
||||||
|
* @memberof platform/commonUI/browse.NavigationService#
|
||||||
*/
|
*/
|
||||||
setNavigation: setNavigation,
|
setNavigation: setNavigation,
|
||||||
/**
|
/**
|
||||||
@ -82,6 +85,7 @@ define(
|
|||||||
* this changes.
|
* this changes.
|
||||||
* @param {function} callback the callback to invoke when
|
* @param {function} callback the callback to invoke when
|
||||||
* navigation state changes
|
* navigation state changes
|
||||||
|
* @memberof platform/commonUI/browse.NavigationService#
|
||||||
*/
|
*/
|
||||||
addListener: addListener,
|
addListener: addListener,
|
||||||
/**
|
/**
|
||||||
@ -89,6 +93,7 @@ define(
|
|||||||
* @param {function} callback the callback which should
|
* @param {function} callback the callback which should
|
||||||
* no longer be invoked when navigation state
|
* no longer be invoked when navigation state
|
||||||
* changes
|
* changes
|
||||||
|
* @memberof platform/commonUI/browse.NavigationService#
|
||||||
*/
|
*/
|
||||||
removeListener: removeListener
|
removeListener: removeListener
|
||||||
};
|
};
|
||||||
|
@ -35,12 +35,14 @@ define(
|
|||||||
/**
|
/**
|
||||||
* The fullscreen action toggles between fullscreen display
|
* The fullscreen action toggles between fullscreen display
|
||||||
* and regular in-window display.
|
* and regular in-window display.
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function FullscreenAction(context) {
|
function FullscreenAction(context) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Toggle full screen state
|
* Toggle full screen state
|
||||||
|
* @memberof platform/commonUI/browse.FullscreenAction#
|
||||||
*/
|
*/
|
||||||
perform: function () {
|
perform: function () {
|
||||||
screenfull.toggle();
|
screenfull.toggle();
|
||||||
@ -48,6 +50,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get metadata about this action, including the
|
* Get metadata about this action, including the
|
||||||
* applicable glyph to display.
|
* applicable glyph to display.
|
||||||
|
* @memberof platform/commonUI/browse.FullscreenAction#
|
||||||
*/
|
*/
|
||||||
getMetadata: function () {
|
getMetadata: function () {
|
||||||
// We override getMetadata, because the glyph and
|
// We override getMetadata, because the glyph and
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* The new tab action allows a domain object to be opened
|
* The new tab action allows a domain object to be opened
|
||||||
* into a new browser tab.
|
* into a new browser tab.
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function NewTabAction(urlService, $window, context) {
|
function NewTabAction(urlService, $window, context) {
|
||||||
|
@ -29,6 +29,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Updates the title of the current window to reflect the name
|
* Updates the title of the current window to reflect the name
|
||||||
* of the currently navigated-to domain object.
|
* of the currently navigated-to domain object.
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function WindowTitler(navigationService, $rootScope, $document) {
|
function WindowTitler(navigationService, $rootScope, $document) {
|
||||||
|
@ -32,6 +32,7 @@ define(
|
|||||||
* The dialog service is responsible for handling window-modal
|
* The dialog service is responsible for handling window-modal
|
||||||
* communication with the user, such as displaying forms for user
|
* communication with the user, such as displaying forms for user
|
||||||
* input.
|
* input.
|
||||||
|
* @memberof platform/commonUI/dialog
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function DialogService(overlayService, $q, $log) {
|
function DialogService(overlayService, $q, $log) {
|
||||||
@ -142,6 +143,7 @@ define(
|
|||||||
* user has supplied; this may be rejected if
|
* user has supplied; this may be rejected if
|
||||||
* user input cannot be obtained (for instance,
|
* user input cannot be obtained (for instance,
|
||||||
* because the user cancelled the dialog)
|
* because the user cancelled the dialog)
|
||||||
|
* @memberof platform/commonUI/dialog.DialogService#
|
||||||
*/
|
*/
|
||||||
getUserInput: getUserInput,
|
getUserInput: getUserInput,
|
||||||
/**
|
/**
|
||||||
@ -149,6 +151,7 @@ define(
|
|||||||
* which will be shown as buttons.
|
* which will be shown as buttons.
|
||||||
*
|
*
|
||||||
* @param dialogModel a description of the dialog to show
|
* @param dialogModel a description of the dialog to show
|
||||||
|
* @memberof platform/commonUI/dialog.DialogService#
|
||||||
*/
|
*/
|
||||||
getUserChoice: getUserChoice
|
getUserChoice: getUserChoice
|
||||||
};
|
};
|
||||||
|
@ -43,6 +43,7 @@ define(
|
|||||||
* particularly where a multiple-overlay effect is not specifically
|
* particularly where a multiple-overlay effect is not specifically
|
||||||
* desired).
|
* desired).
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/dialog
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function OverlayService($document, $compile, $rootScope) {
|
function OverlayService($document, $compile, $rootScope) {
|
||||||
@ -89,6 +90,7 @@ define(
|
|||||||
* @param {object} overlayModel the model to pass to the
|
* @param {object} overlayModel the model to pass to the
|
||||||
* included overlay template (this will be passed
|
* included overlay template (this will be passed
|
||||||
* in via ng-model)
|
* in via ng-model)
|
||||||
|
* @memberof platform/commonUI/dialog.OverlayService#
|
||||||
*/
|
*/
|
||||||
createOverlay: createOverlay
|
createOverlay: createOverlay
|
||||||
};
|
};
|
||||||
|
@ -29,6 +29,8 @@ define(
|
|||||||
* The "Cancel" action; the action triggered by clicking Cancel from
|
* The "Cancel" action; the action triggered by clicking Cancel from
|
||||||
* Edit Mode. Exits the editing user interface and invokes object
|
* Edit Mode. Exits the editing user interface and invokes object
|
||||||
* capabilities to persist the changes that have been made.
|
* capabilities to persist the changes that have been made.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
function CancelAction($location, urlService, context) {
|
function CancelAction($location, urlService, context) {
|
||||||
var domainObject = context.domainObject;
|
var domainObject = context.domainObject;
|
||||||
@ -62,6 +64,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {Promise} a promise that will be fulfilled when
|
* @returns {Promise} a promise that will be fulfilled when
|
||||||
* cancellation has completed
|
* cancellation has completed
|
||||||
|
* @memberof platform/commonUI/edit.CancelAction#
|
||||||
*/
|
*/
|
||||||
perform: function () {
|
perform: function () {
|
||||||
return doCancel(getEditorCapability())
|
return doCancel(getEditorCapability())
|
||||||
|
@ -42,6 +42,7 @@ define(
|
|||||||
* mode (typically triggered by the Edit button.) This will
|
* mode (typically triggered by the Edit button.) This will
|
||||||
* show the user interface for editing (by way of a change in
|
* show the user interface for editing (by way of a change in
|
||||||
* route)
|
* route)
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditAction($location, navigationService, $log, context) {
|
function EditAction($location, navigationService, $log, context) {
|
||||||
@ -63,6 +64,7 @@ define(
|
|||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Enter edit mode.
|
* Enter edit mode.
|
||||||
|
* @memberof platform/commonUI/edit.EditAction#
|
||||||
*/
|
*/
|
||||||
perform: function () {
|
perform: function () {
|
||||||
navigationService.setNavigation(domainObject);
|
navigationService.setNavigation(domainObject);
|
||||||
|
@ -29,6 +29,8 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add one domain object to another's composition.
|
* Add one domain object to another's composition.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
function LinkAction(context) {
|
function LinkAction(context) {
|
||||||
var domainObject = (context || {}).domainObject,
|
var domainObject = (context || {}).domainObject,
|
||||||
@ -58,6 +60,7 @@ define(
|
|||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Perform this action.
|
* Perform this action.
|
||||||
|
* @memberof platform/commonUI/edit.LinkAction#
|
||||||
*/
|
*/
|
||||||
perform: function () {
|
perform: function () {
|
||||||
return selectedId && doLink();
|
return selectedId && doLink();
|
||||||
|
@ -38,6 +38,7 @@ define(
|
|||||||
* @param {DialogService} dialogService a service which will show the dialog
|
* @param {DialogService} dialogService a service which will show the dialog
|
||||||
* @param {DomainObject} object the object to be edited
|
* @param {DomainObject} object the object to be edited
|
||||||
* @param {ActionContext} context the context in which this action is performed
|
* @param {ActionContext} context the context in which this action is performed
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function PropertiesAction(dialogService, context) {
|
function PropertiesAction(dialogService, context) {
|
||||||
@ -77,6 +78,7 @@ define(
|
|||||||
* Perform this action.
|
* Perform this action.
|
||||||
* @return {Promise} a promise which will be
|
* @return {Promise} a promise which will be
|
||||||
* fulfilled when the action has completed.
|
* fulfilled when the action has completed.
|
||||||
|
* @memberof platform/commonUI/edit.PropertiesAction#
|
||||||
*/
|
*/
|
||||||
perform: function () {
|
perform: function () {
|
||||||
var type = object.getCapability('type');
|
var type = object.getCapability('type');
|
||||||
@ -106,3 +108,4 @@ define(
|
|||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ define(
|
|||||||
* @param {TypeImpl} type the type of domain object for which properties
|
* @param {TypeImpl} type the type of domain object for which properties
|
||||||
* will be specified
|
* will be specified
|
||||||
* @param {DomainObject} the object for which properties will be set
|
* @param {DomainObject} the object for which properties will be set
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof module:common/actions/properties-dialog
|
* @memberof module:common/actions/properties-dialog
|
||||||
*/
|
*/
|
||||||
@ -47,6 +48,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get sections provided by this dialog.
|
* Get sections provided by this dialog.
|
||||||
* @return {FormStructure} the structure of this form
|
* @return {FormStructure} the structure of this form
|
||||||
|
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||||
*/
|
*/
|
||||||
getFormStructure: function () {
|
getFormStructure: function () {
|
||||||
return {
|
return {
|
||||||
@ -66,6 +68,7 @@ define(
|
|||||||
* Get the initial state of the form shown by this dialog
|
* Get the initial state of the form shown by this dialog
|
||||||
* (based on the object model)
|
* (based on the object model)
|
||||||
* @returns {object} initial state of the form
|
* @returns {object} initial state of the form
|
||||||
|
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||||
*/
|
*/
|
||||||
getInitialFormValue: function () {
|
getInitialFormValue: function () {
|
||||||
// Start with initial values for properties
|
// Start with initial values for properties
|
||||||
@ -77,6 +80,7 @@ define(
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Update a domain object model based on the value of a form.
|
* Update a domain object model based on the value of a form.
|
||||||
|
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||||
*/
|
*/
|
||||||
updateModel: function (model, formValue) {
|
updateModel: function (model, formValue) {
|
||||||
// Update all properties
|
// Update all properties
|
||||||
|
@ -37,6 +37,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @param {DomainObject} object the object to be removed
|
* @param {DomainObject} object the object to be removed
|
||||||
* @param {ActionContext} context the context in which this action is performed
|
* @param {ActionContext} context the context in which this action is performed
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof module:editor/actions/remove-action
|
* @memberof module:editor/actions/remove-action
|
||||||
*/
|
*/
|
||||||
@ -47,6 +48,7 @@ define(
|
|||||||
* Check whether an object ID matches the ID of the object being
|
* Check whether an object ID matches the ID of the object being
|
||||||
* removed (used to filter a parent's composition to handle the
|
* removed (used to filter a parent's composition to handle the
|
||||||
* removal.)
|
* removal.)
|
||||||
|
* @memberof platform/commonUI/edit.RemoveAction#
|
||||||
*/
|
*/
|
||||||
function isNotObject(otherObjectId) {
|
function isNotObject(otherObjectId) {
|
||||||
return otherObjectId !== object.getId();
|
return otherObjectId !== object.getId();
|
||||||
@ -55,6 +57,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Mutate a parent object such that it no longer contains the object
|
* Mutate a parent object such that it no longer contains the object
|
||||||
* which is being removed.
|
* which is being removed.
|
||||||
|
* @memberof platform/commonUI/edit.RemoveAction#
|
||||||
*/
|
*/
|
||||||
function doMutate(model) {
|
function doMutate(model) {
|
||||||
model.composition = model.composition.filter(isNotObject);
|
model.composition = model.composition.filter(isNotObject);
|
||||||
@ -63,6 +66,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Invoke persistence on a domain object. This will be called upon
|
* Invoke persistence on a domain object. This will be called upon
|
||||||
* the removed object's parent (as its composition will have changed.)
|
* the removed object's parent (as its composition will have changed.)
|
||||||
|
* @memberof platform/commonUI/edit.RemoveAction#
|
||||||
*/
|
*/
|
||||||
function doPersist(domainObject) {
|
function doPersist(domainObject) {
|
||||||
var persistence = domainObject.getCapability('persistence');
|
var persistence = domainObject.getCapability('persistence');
|
||||||
@ -74,6 +78,7 @@ define(
|
|||||||
* capability.
|
* capability.
|
||||||
* @param {ContextCapability} contextCapability the "context" capability
|
* @param {ContextCapability} contextCapability the "context" capability
|
||||||
* of the domain object being removed.
|
* of the domain object being removed.
|
||||||
|
* @memberof platform/commonUI/edit.RemoveAction#
|
||||||
*/
|
*/
|
||||||
function removeFromContext(contextCapability) {
|
function removeFromContext(contextCapability) {
|
||||||
var parent = contextCapability.getParent();
|
var parent = contextCapability.getParent();
|
||||||
@ -89,6 +94,7 @@ define(
|
|||||||
* Perform this action.
|
* Perform this action.
|
||||||
* @return {module:core/promises.Promise} a promise which will be
|
* @return {module:core/promises.Promise} a promise which will be
|
||||||
* fulfilled when the action has completed.
|
* fulfilled when the action has completed.
|
||||||
|
* @memberof platform/commonUI/edit.RemoveAction#
|
||||||
*/
|
*/
|
||||||
perform: function () {
|
perform: function () {
|
||||||
return $q.when(object.getCapability('context'))
|
return $q.when(object.getCapability('context'))
|
||||||
|
@ -30,6 +30,8 @@ define(
|
|||||||
* The "Save" action; the action triggered by clicking Save from
|
* The "Save" action; the action triggered by clicking Save from
|
||||||
* Edit Mode. Exits the editing user interface and invokes object
|
* Edit Mode. Exits the editing user interface and invokes object
|
||||||
* capabilities to persist the changes that have been made.
|
* capabilities to persist the changes that have been made.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
function SaveAction($location, urlService, context) {
|
function SaveAction($location, urlService, context) {
|
||||||
var domainObject = context.domainObject;
|
var domainObject = context.domainObject;
|
||||||
@ -57,6 +59,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {Promise} a promise that will be fulfilled when
|
* @returns {Promise} a promise that will be fulfilled when
|
||||||
* cancellation has completed
|
* cancellation has completed
|
||||||
|
* @memberof platform/commonUI/edit.SaveAction#
|
||||||
*/
|
*/
|
||||||
perform: function () {
|
perform: function () {
|
||||||
return doSave().then(returnToBrowse);
|
return doSave().then(returnToBrowse);
|
||||||
|
@ -35,6 +35,8 @@ define(
|
|||||||
* Meant specifically for use by EditableDomainObject and the
|
* Meant specifically for use by EditableDomainObject and the
|
||||||
* associated cache; the constructor signature is particular
|
* associated cache; the constructor signature is particular
|
||||||
* to a pattern used there and may contain unused arguments.
|
* to a pattern used there and may contain unused arguments.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
return function EditableCompositionCapability(
|
return function EditableCompositionCapability(
|
||||||
contextCapability,
|
contextCapability,
|
||||||
|
@ -35,6 +35,8 @@ define(
|
|||||||
* Meant specifically for use by EditableDomainObject and the
|
* Meant specifically for use by EditableDomainObject and the
|
||||||
* associated cache; the constructor signature is particular
|
* associated cache; the constructor signature is particular
|
||||||
* to a pattern used there and may contain unused arguments.
|
* to a pattern used there and may contain unused arguments.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
return function EditableContextCapability(
|
return function EditableContextCapability(
|
||||||
contextCapability,
|
contextCapability,
|
||||||
|
@ -35,6 +35,8 @@ define(
|
|||||||
* Meant specifically for use by EditableDomainObject and the
|
* Meant specifically for use by EditableDomainObject and the
|
||||||
* associated cache; the constructor signature is particular
|
* associated cache; the constructor signature is particular
|
||||||
* to a pattern used there and may contain unused arguments.
|
* to a pattern used there and may contain unused arguments.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
return function EditableLookupCapability(
|
return function EditableLookupCapability(
|
||||||
contextCapability,
|
contextCapability,
|
||||||
|
@ -35,6 +35,8 @@ define(
|
|||||||
* Meant specifically for use by EditableDomainObject and the
|
* Meant specifically for use by EditableDomainObject and the
|
||||||
* associated cache; the constructor signature is particular
|
* associated cache; the constructor signature is particular
|
||||||
* to a pattern used there and may contain unused arguments.
|
* to a pattern used there and may contain unused arguments.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
function EditablePersistenceCapability(
|
function EditablePersistenceCapability(
|
||||||
persistenceCapability,
|
persistenceCapability,
|
||||||
|
@ -35,6 +35,8 @@ define(
|
|||||||
* Meant specifically for use by EditableDomainObject and the
|
* Meant specifically for use by EditableDomainObject and the
|
||||||
* associated cache; the constructor signature is particular
|
* associated cache; the constructor signature is particular
|
||||||
* to a pattern used there and may contain unused arguments.
|
* to a pattern used there and may contain unused arguments.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
return function EditableRelationshipCapability(
|
return function EditableRelationshipCapability(
|
||||||
relationshipCapability,
|
relationshipCapability,
|
||||||
|
@ -39,6 +39,8 @@ define(
|
|||||||
* Meant specifically for use by EditableDomainObject and the
|
* Meant specifically for use by EditableDomainObject and the
|
||||||
* associated cache; the constructor signature is particular
|
* associated cache; the constructor signature is particular
|
||||||
* to a pattern used there and may contain unused arguments.
|
* to a pattern used there and may contain unused arguments.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
return function EditorCapability(
|
return function EditorCapability(
|
||||||
persistenceCapability,
|
persistenceCapability,
|
||||||
@ -83,6 +85,7 @@ define(
|
|||||||
* object (and not other objects with associated changes)
|
* object (and not other objects with associated changes)
|
||||||
* @returns {Promise} a promise that will be fulfilled after
|
* @returns {Promise} a promise that will be fulfilled after
|
||||||
* persistence has completed.
|
* persistence has completed.
|
||||||
|
* @memberof platform/commonUI/edit.EditorCapability#
|
||||||
*/
|
*/
|
||||||
save: function (nonrecursive) {
|
save: function (nonrecursive) {
|
||||||
return nonrecursive ?
|
return nonrecursive ?
|
||||||
@ -95,6 +98,7 @@ define(
|
|||||||
* been retrieved and modified during the editing session)
|
* been retrieved and modified during the editing session)
|
||||||
* @returns {Promise} a promise that will be fulfilled after
|
* @returns {Promise} a promise that will be fulfilled after
|
||||||
* cancellation has completed.
|
* cancellation has completed.
|
||||||
|
* @memberof platform/commonUI/edit.EditorCapability#
|
||||||
*/
|
*/
|
||||||
cancel: function () {
|
cancel: function () {
|
||||||
return resolvePromise(undefined);
|
return resolvePromise(undefined);
|
||||||
@ -102,6 +106,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Check if there are any unsaved changes.
|
* Check if there are any unsaved changes.
|
||||||
* @returns {boolean} true if there are unsaved changes
|
* @returns {boolean} true if there are unsaved changes
|
||||||
|
* @memberof platform/commonUI/edit.EditorCapability#
|
||||||
*/
|
*/
|
||||||
dirty: function () {
|
dirty: function () {
|
||||||
return cache.dirty();
|
return cache.dirty();
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller which supplies action instances for Save/Cancel.
|
* Controller which supplies action instances for Save/Cancel.
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditActionController($scope) {
|
function EditActionController($scope) {
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
* Controller which is responsible for populating the scope for
|
* Controller which is responsible for populating the scope for
|
||||||
* Edit mode; introduces an editable version of the currently
|
* Edit mode; introduces an editable version of the currently
|
||||||
* navigated domain object into the scope.
|
* navigated domain object into the scope.
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditController($scope, $q, navigationService) {
|
function EditController($scope, $q, navigationService) {
|
||||||
@ -55,6 +56,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get the domain object which is navigated-to.
|
* Get the domain object which is navigated-to.
|
||||||
* @returns {DomainObject} the domain object that is navigated-to
|
* @returns {DomainObject} the domain object that is navigated-to
|
||||||
|
* @memberof platform/commonUI/edit.EditController#
|
||||||
*/
|
*/
|
||||||
navigatedObject: function () {
|
navigatedObject: function () {
|
||||||
return navigatedObject;
|
return navigatedObject;
|
||||||
@ -64,6 +66,7 @@ define(
|
|||||||
* away from Edit mode while unsaved changes are present.
|
* away from Edit mode while unsaved changes are present.
|
||||||
* @returns {string} the warning to show, or undefined if
|
* @returns {string} the warning to show, or undefined if
|
||||||
* there are no unsaved changes
|
* there are no unsaved changes
|
||||||
|
* @memberof platform/commonUI/edit.EditController#
|
||||||
*/
|
*/
|
||||||
getUnloadWarning: function () {
|
getUnloadWarning: function () {
|
||||||
var editorCapability = navigatedObject &&
|
var editorCapability = navigatedObject &&
|
||||||
|
@ -28,6 +28,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Supports the Library and Elements panes in Edit mode.
|
* Supports the Library and Elements panes in Edit mode.
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditPanesController($scope) {
|
function EditPanesController($scope) {
|
||||||
@ -56,6 +57,7 @@ define(
|
|||||||
* Get the root-level domain object, as reported by the
|
* Get the root-level domain object, as reported by the
|
||||||
* represented domain object.
|
* represented domain object.
|
||||||
* @returns {DomainObject} the root object
|
* @returns {DomainObject} the root object
|
||||||
|
* @memberof platform/commonUI/edit.EditPanesController#
|
||||||
*/
|
*/
|
||||||
getRoot: function () {
|
getRoot: function () {
|
||||||
return root;
|
return root;
|
||||||
|
@ -31,6 +31,7 @@ define(
|
|||||||
* to this attribute will be evaluated during page navigation events
|
* to this attribute will be evaluated during page navigation events
|
||||||
* and, if it returns a truthy value, will be used to populate a
|
* and, if it returns a truthy value, will be used to populate a
|
||||||
* prompt to the user to confirm this navigation.
|
* prompt to the user to confirm this navigation.
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param $window the window
|
* @param $window the window
|
||||||
*/
|
*/
|
||||||
|
@ -68,6 +68,8 @@ define(
|
|||||||
* which need to behave differently in edit mode,
|
* which need to behave differently in edit mode,
|
||||||
* and provides a "working copy" of the object's
|
* and provides a "working copy" of the object's
|
||||||
* model to allow changes to be easily cancelled.
|
* model to allow changes to be easily cancelled.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
*/
|
*/
|
||||||
function EditableDomainObject(domainObject, $q) {
|
function EditableDomainObject(domainObject, $q) {
|
||||||
// The cache will hold all domain objects reached from
|
// The cache will hold all domain objects reached from
|
||||||
|
@ -51,6 +51,7 @@ define(
|
|||||||
* an argument, and returns an editable domain object as its
|
* an argument, and returns an editable domain object as its
|
||||||
* result.
|
* result.
|
||||||
* @param $q Angular's $q, for promise handling
|
* @param $q Angular's $q, for promise handling
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof module:editor/object/editable-domain-object-cache
|
* @memberof module:editor/object/editable-domain-object-cache
|
||||||
*/
|
*/
|
||||||
@ -66,6 +67,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @param {DomainObject} domainObject the regular domain object
|
* @param {DomainObject} domainObject the regular domain object
|
||||||
* @returns {DomainObject} the domain object in an editable form
|
* @returns {DomainObject} the domain object in an editable form
|
||||||
|
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||||
*/
|
*/
|
||||||
getEditableObject: function (domainObject) {
|
getEditableObject: function (domainObject) {
|
||||||
var type = domainObject.getCapability('type');
|
var type = domainObject.getCapability('type');
|
||||||
@ -94,6 +96,7 @@ define(
|
|||||||
* Check if a domain object is (effectively) the top-level
|
* Check if a domain object is (effectively) the top-level
|
||||||
* object in this editable subgraph.
|
* object in this editable subgraph.
|
||||||
* @returns {boolean} true if it is the root
|
* @returns {boolean} true if it is the root
|
||||||
|
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||||
*/
|
*/
|
||||||
isRoot: function (domainObject) {
|
isRoot: function (domainObject) {
|
||||||
return domainObject === root;
|
return domainObject === root;
|
||||||
@ -104,6 +107,7 @@ define(
|
|||||||
* included in the bulk save invoked when editing completes.
|
* included in the bulk save invoked when editing completes.
|
||||||
*
|
*
|
||||||
* @param {DomainObject} domainObject the domain object
|
* @param {DomainObject} domainObject the domain object
|
||||||
|
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||||
*/
|
*/
|
||||||
markDirty: function (domainObject) {
|
markDirty: function (domainObject) {
|
||||||
dirty[domainObject.getId()] = domainObject;
|
dirty[domainObject.getId()] = domainObject;
|
||||||
@ -114,12 +118,14 @@ define(
|
|||||||
* save operation.)
|
* save operation.)
|
||||||
*
|
*
|
||||||
* @param {DomainObject} domainObject the domain object
|
* @param {DomainObject} domainObject the domain object
|
||||||
|
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||||
*/
|
*/
|
||||||
markClean: function (domainObject) {
|
markClean: function (domainObject) {
|
||||||
delete dirty[domainObject.getId()];
|
delete dirty[domainObject.getId()];
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Initiate a save on all objects that have been cached.
|
* Initiate a save on all objects that have been cached.
|
||||||
|
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||||
*/
|
*/
|
||||||
saveAll: function () {
|
saveAll: function () {
|
||||||
// Get a list of all dirty objects
|
// Get a list of all dirty objects
|
||||||
@ -140,6 +146,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Check if any objects have been marked dirty in this cache.
|
* Check if any objects have been marked dirty in this cache.
|
||||||
* @returns {boolean} true if objects are dirty
|
* @returns {boolean} true if objects are dirty
|
||||||
|
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||||
*/
|
*/
|
||||||
dirty: function () {
|
dirty: function () {
|
||||||
return Object.keys(dirty).length > 0;
|
return Object.keys(dirty).length > 0;
|
||||||
@ -150,3 +157,4 @@ define(
|
|||||||
return EditableDomainObjectCache;
|
return EditableDomainObjectCache;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ define(
|
|||||||
* made editable, to support a group that can be saved all-at-once.
|
* made editable, to support a group that can be saved all-at-once.
|
||||||
* This is useful in Edit mode, which is launched for a specific
|
* This is useful in Edit mode, which is launched for a specific
|
||||||
* object but may contain changes across many objects.
|
* object but may contain changes across many objects.
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditableModelCache() {
|
function EditableModelCache() {
|
||||||
@ -47,6 +48,7 @@ define(
|
|||||||
* Get this domain object's model from the cache (or
|
* Get this domain object's model from the cache (or
|
||||||
* place it in the cache if it isn't in the cache yet)
|
* place it in the cache if it isn't in the cache yet)
|
||||||
* @returns a clone of the domain object's model
|
* @returns a clone of the domain object's model
|
||||||
|
* @memberof platform/commonUI/edit.EditableModelCache#
|
||||||
*/
|
*/
|
||||||
getCachedModel: function (domainObject) {
|
getCachedModel: function (domainObject) {
|
||||||
var id = domainObject.getId();
|
var id = domainObject.getId();
|
||||||
|
@ -30,6 +30,7 @@ define(
|
|||||||
* Policy controlling when the `edit` and/or `properties` actions
|
* Policy controlling when the `edit` and/or `properties` actions
|
||||||
* can appear as applicable actions of the `view-control` category
|
* can appear as applicable actions of the `view-control` category
|
||||||
* (shown as buttons in the top-right of browse mode.)
|
* (shown as buttons in the top-right of browse mode.)
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditActionPolicy() {
|
function EditActionPolicy() {
|
||||||
@ -54,6 +55,7 @@ define(
|
|||||||
* @param {Action} action the action
|
* @param {Action} action the action
|
||||||
* @param context the context
|
* @param context the context
|
||||||
* @returns {boolean} true if not disallowed
|
* @returns {boolean} true if not disallowed
|
||||||
|
* @memberof platform/commonUI/edit.EditActionPolicy#
|
||||||
*/
|
*/
|
||||||
allow: function (action, context) {
|
allow: function (action, context) {
|
||||||
var key = action.getMetadata().key,
|
var key = action.getMetadata().key,
|
||||||
|
@ -28,6 +28,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Policy controlling which views should be visible in Edit mode.
|
* Policy controlling which views should be visible in Edit mode.
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditableViewPolicy() {
|
function EditableViewPolicy() {
|
||||||
@ -38,6 +39,7 @@ define(
|
|||||||
* @param {Action} action the action
|
* @param {Action} action the action
|
||||||
* @param domainObject the domain object which will be viewed
|
* @param domainObject the domain object which will be viewed
|
||||||
* @returns {boolean} true if not disallowed
|
* @returns {boolean} true if not disallowed
|
||||||
|
* @memberof platform/commonUI/edit.EditableViewPolicy#
|
||||||
*/
|
*/
|
||||||
allow: function (view, domainObject) {
|
allow: function (view, domainObject) {
|
||||||
// If a view is flagged as non-editable, only allow it
|
// If a view is flagged as non-editable, only allow it
|
||||||
|
@ -41,6 +41,7 @@ define(
|
|||||||
* and may be reused for different domain objects and/or
|
* and may be reused for different domain objects and/or
|
||||||
* representations resulting from changes there.
|
* representations resulting from changes there.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditRepresenter($q, $log, scope) {
|
function EditRepresenter($q, $log, scope) {
|
||||||
@ -113,10 +114,12 @@ define(
|
|||||||
* definition of the representation in use
|
* definition of the representation in use
|
||||||
* @param {DomainObject} domainObject the domain object
|
* @param {DomainObject} domainObject the domain object
|
||||||
* being represented
|
* being represented
|
||||||
|
* @memberof platform/commonUI/edit.EditRepresenter#
|
||||||
*/
|
*/
|
||||||
represent: represent,
|
represent: represent,
|
||||||
/**
|
/**
|
||||||
* Release any resources associated with this representer.
|
* Release any resources associated with this representer.
|
||||||
|
* @memberof platform/commonUI/edit.EditRepresenter#
|
||||||
*/
|
*/
|
||||||
destroy: destroy
|
destroy: destroy
|
||||||
};
|
};
|
||||||
|
@ -38,6 +38,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @param structure toolbar structure, as provided by view definition
|
* @param structure toolbar structure, as provided by view definition
|
||||||
* @param {Function} commit callback to invoke after changes
|
* @param {Function} commit callback to invoke after changes
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditToolbar(structure, commit) {
|
function EditToolbar(structure, commit) {
|
||||||
@ -221,6 +222,7 @@ define(
|
|||||||
* Set the current selection. Visisbility of sections
|
* Set the current selection. Visisbility of sections
|
||||||
* and items in the toolbar will be updated to match this.
|
* and items in the toolbar will be updated to match this.
|
||||||
* @param {Array} s the new selection
|
* @param {Array} s the new selection
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbar#
|
||||||
*/
|
*/
|
||||||
setSelection: function (s) {
|
setSelection: function (s) {
|
||||||
selection = s;
|
selection = s;
|
||||||
@ -231,6 +233,7 @@ define(
|
|||||||
* Get the structure of the toolbar, as appropriate to
|
* Get the structure of the toolbar, as appropriate to
|
||||||
* pass to `mct-toolbar`.
|
* pass to `mct-toolbar`.
|
||||||
* @returns the toolbar structure
|
* @returns the toolbar structure
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbar#
|
||||||
*/
|
*/
|
||||||
getStructure: function () {
|
getStructure: function () {
|
||||||
return toolbarStructure;
|
return toolbarStructure;
|
||||||
@ -239,6 +242,7 @@ define(
|
|||||||
* Get the current state of the toolbar, as appropriate
|
* Get the current state of the toolbar, as appropriate
|
||||||
* to two-way bind to the state handled by `mct-toolbar`.
|
* to two-way bind to the state handled by `mct-toolbar`.
|
||||||
* @returns {Array} state of the toolbar
|
* @returns {Array} state of the toolbar
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbar#
|
||||||
*/
|
*/
|
||||||
getState: function () {
|
getState: function () {
|
||||||
return toolbarState;
|
return toolbarState;
|
||||||
@ -248,6 +252,7 @@ define(
|
|||||||
* @param {number} index the index of the corresponding
|
* @param {number} index the index of the corresponding
|
||||||
* element in the state array
|
* element in the state array
|
||||||
* @param value the new value to convey to the selection
|
* @param value the new value to convey to the selection
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbar#
|
||||||
*/
|
*/
|
||||||
updateState: function (index, value) {
|
updateState: function (index, value) {
|
||||||
return updateProperties(properties[index], value);
|
return updateProperties(properties[index], value);
|
||||||
@ -259,3 +264,4 @@ define(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
* The EditToolbarRepresenter populates the toolbar in Edit mode
|
* The EditToolbarRepresenter populates the toolbar in Edit mode
|
||||||
* based on a view's definition.
|
* based on a view's definition.
|
||||||
* @param {Scope} scope the Angular scope of the representation
|
* @param {Scope} scope the Angular scope of the representation
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditToolbarRepresenter(scope, element, attrs) {
|
function EditToolbarRepresenter(scope, element, attrs) {
|
||||||
@ -136,10 +137,12 @@ define(
|
|||||||
* definition of the representation in use
|
* definition of the representation in use
|
||||||
* @param {DomainObject} domainObject the domain object
|
* @param {DomainObject} domainObject the domain object
|
||||||
* being represented
|
* being represented
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbarRepresenter#
|
||||||
*/
|
*/
|
||||||
represent: (attrs || {}).toolbar ? represent : noop,
|
represent: (attrs || {}).toolbar ? represent : noop,
|
||||||
/**
|
/**
|
||||||
* Release any resources associated with this representer.
|
* Release any resources associated with this representer.
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbarRepresenter#
|
||||||
*/
|
*/
|
||||||
destroy: (attrs || {}).toolbar ? destroy : noop
|
destroy: (attrs || {}).toolbar ? destroy : noop
|
||||||
};
|
};
|
||||||
|
@ -37,6 +37,7 @@ define(
|
|||||||
* * The selection, for single selected elements within the
|
* * The selection, for single selected elements within the
|
||||||
* view.
|
* view.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/edit
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function EditToolbarSelection() {
|
function EditToolbarSelection() {
|
||||||
@ -106,22 +107,26 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Check if an object is currently selected.
|
* Check if an object is currently selected.
|
||||||
* @returns true if selected, otherwise false
|
* @returns true if selected, otherwise false
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||||
*/
|
*/
|
||||||
selected: isSelected,
|
selected: isSelected,
|
||||||
/**
|
/**
|
||||||
* Select an object.
|
* Select an object.
|
||||||
* @param obj the object to select
|
* @param obj the object to select
|
||||||
* @returns {boolean} true if selection changed
|
* @returns {boolean} true if selection changed
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||||
*/
|
*/
|
||||||
select: select,
|
select: select,
|
||||||
/**
|
/**
|
||||||
* Clear the current selection.
|
* Clear the current selection.
|
||||||
* @returns {boolean} true if selection changed
|
* @returns {boolean} true if selection changed
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||||
*/
|
*/
|
||||||
deselect: deselect,
|
deselect: deselect,
|
||||||
/**
|
/**
|
||||||
* Get the currently-selected object.
|
* Get the currently-selected object.
|
||||||
* @returns the currently selected object
|
* @returns the currently selected object
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||||
*/
|
*/
|
||||||
get: get,
|
get: get,
|
||||||
/**
|
/**
|
||||||
@ -129,6 +134,7 @@ define(
|
|||||||
* the view itself.)
|
* the view itself.)
|
||||||
* @param [proxy] the view proxy (if setting)
|
* @param [proxy] the view proxy (if setting)
|
||||||
* @returns the current view proxy
|
* @returns the current view proxy
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||||
*/
|
*/
|
||||||
proxy: proxy,
|
proxy: proxy,
|
||||||
/**
|
/**
|
||||||
@ -136,6 +142,7 @@ define(
|
|||||||
* selection proxy. It is generally not advisable to
|
* selection proxy. It is generally not advisable to
|
||||||
* mutate this array directly.
|
* mutate this array directly.
|
||||||
* @returns {Array} all selections
|
* @returns {Array} all selections
|
||||||
|
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||||
*/
|
*/
|
||||||
all: all
|
all: all
|
||||||
};
|
};
|
||||||
|
@ -29,6 +29,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* The StyleSheetLoader adds links to style sheets exposed from
|
* The StyleSheetLoader adds links to style sheets exposed from
|
||||||
* various bundles as extensions of category `stylesheets`.
|
* various bundles as extensions of category `stylesheets`.
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {object[]} stylesheets stylesheet extension definitions
|
* @param {object[]} stylesheets stylesheet extension definitions
|
||||||
* @param $document Angular's jqLite-wrapped document element
|
* @param $document Angular's jqLite-wrapped document element
|
||||||
|
@ -42,6 +42,7 @@ define(
|
|||||||
* * `ungrouped`: All actions which did not have a defined
|
* * `ungrouped`: All actions which did not have a defined
|
||||||
* group.
|
* group.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ActionGroupController($scope) {
|
function ActionGroupController($scope) {
|
||||||
|
@ -29,6 +29,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Controller for the bottombar template. Exposes
|
* Controller for the bottombar template. Exposes
|
||||||
* available indicators (of extension category "indicators")
|
* available indicators (of extension category "indicators")
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function BottomBarController(indicators) {
|
function BottomBarController(indicators) {
|
||||||
@ -49,6 +50,7 @@ define(
|
|||||||
* Get all indicators to display.
|
* Get all indicators to display.
|
||||||
* @returns {Indicator[]} all indicators
|
* @returns {Indicator[]} all indicators
|
||||||
* to display in the bottom bar.
|
* to display in the bottom bar.
|
||||||
|
* @memberof platform/commonUI/general.BottomBarController#
|
||||||
*/
|
*/
|
||||||
getIndicators: function () {
|
getIndicators: function () {
|
||||||
return indicators;
|
return indicators;
|
||||||
|
@ -31,6 +31,7 @@ define(
|
|||||||
* menus) where clicking elsewhere in the document while the toggle
|
* menus) where clicking elsewhere in the document while the toggle
|
||||||
* is in an active state is intended to dismiss the toggle.
|
* is in an active state is intended to dismiss the toggle.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param $scope the scope in which this controller is active
|
* @param $scope the scope in which this controller is active
|
||||||
* @param $document the document element, injected by Angular
|
* @param $document the document element, injected by Angular
|
||||||
@ -72,6 +73,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get the current state of the toggle.
|
* Get the current state of the toggle.
|
||||||
* @return {boolean} true if active
|
* @return {boolean} true if active
|
||||||
|
* @memberof platform/commonUI/general.ClickAwayController#
|
||||||
*/
|
*/
|
||||||
isActive: function () {
|
isActive: function () {
|
||||||
return state;
|
return state;
|
||||||
@ -79,6 +81,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Set a new state for the toggle.
|
* Set a new state for the toggle.
|
||||||
* @return {boolean} true to activate
|
* @return {boolean} true to activate
|
||||||
|
* @memberof platform/commonUI/general.ClickAwayController#
|
||||||
*/
|
*/
|
||||||
setState: function (newState) {
|
setState: function (newState) {
|
||||||
if (state !== newState) {
|
if (state !== newState) {
|
||||||
@ -88,6 +91,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Toggle the current state; activate if it is inactive,
|
* Toggle the current state; activate if it is inactive,
|
||||||
* deactivate if it is active.
|
* deactivate if it is active.
|
||||||
|
* @memberof platform/commonUI/general.ClickAwayController#
|
||||||
*/
|
*/
|
||||||
toggle: function () {
|
toggle: function () {
|
||||||
changeState();
|
changeState();
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
* Controller for the context menu. Maintains an up-to-date
|
* Controller for the context menu. Maintains an up-to-date
|
||||||
* list of applicable actions (those from category "contextual")
|
* list of applicable actions (those from category "contextual")
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ContextMenuController($scope) {
|
function ContextMenuController($scope) {
|
||||||
|
@ -54,6 +54,7 @@ define(
|
|||||||
* parameter it received.) Getter-setter functions are never the
|
* parameter it received.) Getter-setter functions are never the
|
||||||
* target of a scope assignment and so avoid this problem.
|
* target of a scope assignment and so avoid this problem.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {Scope} $scope the controller's scope
|
* @param {Scope} $scope the controller's scope
|
||||||
*/
|
*/
|
||||||
|
@ -30,6 +30,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller for the domain object selector control.
|
* Controller for the domain object selector control.
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {ObjectService} objectService service from which to
|
* @param {ObjectService} objectService service from which to
|
||||||
* read domain objects
|
* read domain objects
|
||||||
@ -102,6 +103,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get the root object to show in the left-hand tree.
|
* Get the root object to show in the left-hand tree.
|
||||||
* @returns {DomainObject} the root object
|
* @returns {DomainObject} the root object
|
||||||
|
* @memberof platform/commonUI/general.SelectorController#
|
||||||
*/
|
*/
|
||||||
root: function () {
|
root: function () {
|
||||||
return rootObject;
|
return rootObject;
|
||||||
@ -109,6 +111,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Add a domain object to the list of selected objects.
|
* Add a domain object to the list of selected objects.
|
||||||
* @param {DomainObject} the domain object to select
|
* @param {DomainObject} the domain object to select
|
||||||
|
* @memberof platform/commonUI/general.SelectorController#
|
||||||
*/
|
*/
|
||||||
select: function (domainObject) {
|
select: function (domainObject) {
|
||||||
var id = domainObject && domainObject.getId(),
|
var id = domainObject && domainObject.getId(),
|
||||||
@ -122,6 +125,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Remove a domain object from the list of selected objects.
|
* Remove a domain object from the list of selected objects.
|
||||||
* @param {DomainObject} the domain object to select
|
* @param {DomainObject} the domain object to select
|
||||||
|
* @memberof platform/commonUI/general.SelectorController#
|
||||||
*/
|
*/
|
||||||
deselect: function (domainObject) {
|
deselect: function (domainObject) {
|
||||||
var id = domainObject && domainObject.getId(),
|
var id = domainObject && domainObject.getId(),
|
||||||
@ -140,6 +144,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get the currently-selected domain objects.
|
* Get the currently-selected domain objects.
|
||||||
* @returns {DomainObject[]} the current selection
|
* @returns {DomainObject[]} the current selection
|
||||||
|
* @memberof platform/commonUI/general.SelectorController#
|
||||||
*/
|
*/
|
||||||
selected: function () {
|
selected: function () {
|
||||||
return selectedObjects;
|
return selectedObjects;
|
||||||
|
@ -32,6 +32,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Controller for the splitter in Browse mode. Current implementation
|
* Controller for the splitter in Browse mode. Current implementation
|
||||||
* uses many hard-coded constants; this could be generalized.
|
* uses many hard-coded constants; this could be generalized.
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function SplitPaneController() {
|
function SplitPaneController() {
|
||||||
@ -44,6 +45,7 @@ define(
|
|||||||
* Get the current position of the splitter, in pixels
|
* Get the current position of the splitter, in pixels
|
||||||
* from the left edge.
|
* from the left edge.
|
||||||
* @returns {number} position of the splitter, in pixels
|
* @returns {number} position of the splitter, in pixels
|
||||||
|
* @memberof platform/commonUI/general.SplitPaneController#
|
||||||
*/
|
*/
|
||||||
state: function (defaultState) {
|
state: function (defaultState) {
|
||||||
// Set the state to the desired default, if we don't have a
|
// Set the state to the desired default, if we don't have a
|
||||||
@ -58,6 +60,7 @@ define(
|
|||||||
* Begin moving the splitter; this will note the splitter's
|
* Begin moving the splitter; this will note the splitter's
|
||||||
* current position, which is necessary for correct
|
* current position, which is necessary for correct
|
||||||
* interpretation of deltas provided by mct-drag.
|
* interpretation of deltas provided by mct-drag.
|
||||||
|
* @memberof platform/commonUI/general.SplitPaneController#
|
||||||
*/
|
*/
|
||||||
startMove: function () {
|
startMove: function () {
|
||||||
start = current;
|
start = current;
|
||||||
@ -68,6 +71,7 @@ define(
|
|||||||
* This movement is relative to the position of the
|
* This movement is relative to the position of the
|
||||||
* splitter when startMove was last invoked.
|
* splitter when startMove was last invoked.
|
||||||
* @param {number} delta number of pixels to move
|
* @param {number} delta number of pixels to move
|
||||||
|
* @memberof platform/commonUI/general.SplitPaneController#
|
||||||
*/
|
*/
|
||||||
move: function (delta, minimum, maximum) {
|
move: function (delta, minimum, maximum) {
|
||||||
// Ensure defaults for minimum/maximum
|
// Ensure defaults for minimum/maximum
|
||||||
|
@ -30,6 +30,7 @@ define(
|
|||||||
* A ToggleController is used to activate/deactivate things.
|
* A ToggleController is used to activate/deactivate things.
|
||||||
* A common usage is for "twistie"
|
* A common usage is for "twistie"
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ToggleController() {
|
function ToggleController() {
|
||||||
@ -39,6 +40,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get the current state of the toggle.
|
* Get the current state of the toggle.
|
||||||
* @return {boolean} true if active
|
* @return {boolean} true if active
|
||||||
|
* @memberof platform/commonUI/general.ToggleController#
|
||||||
*/
|
*/
|
||||||
isActive: function () {
|
isActive: function () {
|
||||||
return state;
|
return state;
|
||||||
@ -46,6 +48,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Set a new state for the toggle.
|
* Set a new state for the toggle.
|
||||||
* @return {boolean} true to activate
|
* @return {boolean} true to activate
|
||||||
|
* @memberof platform/commonUI/general.ToggleController#
|
||||||
*/
|
*/
|
||||||
setState: function (newState) {
|
setState: function (newState) {
|
||||||
state = newState;
|
state = newState;
|
||||||
@ -53,6 +56,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Toggle the current state; activate if it is inactive,
|
* Toggle the current state; activate if it is inactive,
|
||||||
* deactivate if it is active.
|
* deactivate if it is active.
|
||||||
|
* @memberof platform/commonUI/general.ToggleController#
|
||||||
*/
|
*/
|
||||||
toggle: function () {
|
toggle: function () {
|
||||||
state = !state;
|
state = !state;
|
||||||
|
@ -48,6 +48,7 @@ define(
|
|||||||
* node expansion when this tree node's _subtree_ will contain
|
* node expansion when this tree node's _subtree_ will contain
|
||||||
* the navigated object (recursively, this becomes an
|
* the navigated object (recursively, this becomes an
|
||||||
* expand-to-show-navigated-object behavior.)
|
* expand-to-show-navigated-object behavior.)
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function TreeNodeController($scope, $timeout, $rootScope) {
|
function TreeNodeController($scope, $timeout, $rootScope) {
|
||||||
@ -148,11 +149,13 @@ define(
|
|||||||
* This method should be called when a node is expanded
|
* This method should be called when a node is expanded
|
||||||
* to record that this has occurred, to support one-time
|
* to record that this has occurred, to support one-time
|
||||||
* lazy loading of the node's subtree.
|
* lazy loading of the node's subtree.
|
||||||
|
* @memberof platform/commonUI/general.TreeNodeController#
|
||||||
*/
|
*/
|
||||||
trackExpansion: trackExpansion,
|
trackExpansion: trackExpansion,
|
||||||
/**
|
/**
|
||||||
* Check if this not has ever been expanded.
|
* Check if this not has ever been expanded.
|
||||||
* @returns true if it has been expanded
|
* @returns true if it has been expanded
|
||||||
|
* @memberof platform/commonUI/general.TreeNodeController#
|
||||||
*/
|
*/
|
||||||
hasBeenExpanded: function () {
|
hasBeenExpanded: function () {
|
||||||
return hasBeenExpanded;
|
return hasBeenExpanded;
|
||||||
@ -163,6 +166,7 @@ define(
|
|||||||
* An object will be highlighted if it matches
|
* An object will be highlighted if it matches
|
||||||
* ngModel.selectedObject
|
* ngModel.selectedObject
|
||||||
* @returns true if this should be highlighted
|
* @returns true if this should be highlighted
|
||||||
|
* @memberof platform/commonUI/general.TreeNodeController#
|
||||||
*/
|
*/
|
||||||
isSelected: function () {
|
isSelected: function () {
|
||||||
return isSelected;
|
return isSelected;
|
||||||
|
@ -32,6 +32,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Controller for the view switcher; populates and maintains a list
|
* Controller for the view switcher; populates and maintains a list
|
||||||
* of applicable views for a represented domain object.
|
* of applicable views for a represented domain object.
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ViewSwitcherController($scope, $timeout) {
|
function ViewSwitcherController($scope, $timeout) {
|
||||||
@ -71,3 +72,4 @@ define(
|
|||||||
return ViewSwitcherController;
|
return ViewSwitcherController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ define(
|
|||||||
* plain string attribute, instead of as an Angular
|
* plain string attribute, instead of as an Angular
|
||||||
* expression.
|
* expression.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function MCTContainer(containers) {
|
function MCTContainer(containers) {
|
||||||
|
@ -44,6 +44,7 @@ define(
|
|||||||
* and vertical pixel offset of the current mouse position
|
* and vertical pixel offset of the current mouse position
|
||||||
* relative to the mouse position where dragging began.
|
* relative to the mouse position where dragging began.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -157,3 +158,4 @@ define(
|
|||||||
return MCTDrag;
|
return MCTDrag;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ define(
|
|||||||
* This is an Angular expression, and it will be re-evaluated after
|
* This is an Angular expression, and it will be re-evaluated after
|
||||||
* each interval.
|
* each interval.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -37,6 +37,7 @@ define(
|
|||||||
* This is exposed as two directives in `bundle.json`; the difference
|
* This is exposed as two directives in `bundle.json`; the difference
|
||||||
* is handled purely by parameterization.
|
* is handled purely by parameterization.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param $parse Angular's $parse
|
* @param $parse Angular's $parse
|
||||||
* @param {string} property property to manage within the HTML element
|
* @param {string} property property to manage within the HTML element
|
||||||
|
@ -91,6 +91,7 @@ define(
|
|||||||
* etc. can be set on that element to control the splitter's
|
* etc. can be set on that element to control the splitter's
|
||||||
* allowable positions.
|
* allowable positions.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function MCTSplitPane($parse, $log) {
|
function MCTSplitPane($parse, $log) {
|
||||||
@ -213,3 +214,4 @@ define(
|
|||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements `mct-splitter` directive.
|
* Implements `mct-splitter` directive.
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function MCTSplitter() {
|
function MCTSplitter() {
|
||||||
@ -88,3 +89,4 @@ define(
|
|||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ define(
|
|||||||
/**
|
/**
|
||||||
* The url service handles calls for url paths
|
* The url service handles calls for url paths
|
||||||
* using domain objects.
|
* using domain objects.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/commonUI/general
|
||||||
*/
|
*/
|
||||||
function UrlService($location) {
|
function UrlService($location) {
|
||||||
// Returns the url for the mode wanted
|
// Returns the url for the mode wanted
|
||||||
@ -73,6 +75,7 @@ define(
|
|||||||
* for the path
|
* for the path
|
||||||
* @param {DomainObject} value of the domain object
|
* @param {DomainObject} value of the domain object
|
||||||
* to get the path of
|
* to get the path of
|
||||||
|
* @memberof platform/commonUI/general.UrlService#
|
||||||
*/
|
*/
|
||||||
urlForNewTab: urlForNewTab,
|
urlForNewTab: urlForNewTab,
|
||||||
/**
|
/**
|
||||||
@ -83,6 +86,7 @@ define(
|
|||||||
* for the path
|
* for the path
|
||||||
* @param {DomainObject} value of the domain object
|
* @param {DomainObject} value of the domain object
|
||||||
* to get the path of
|
* to get the path of
|
||||||
|
* @memberof platform/commonUI/general.UrlService#
|
||||||
*/
|
*/
|
||||||
urlForLocation: urlForLocation
|
urlForLocation: urlForLocation
|
||||||
};
|
};
|
||||||
|
@ -30,6 +30,7 @@ define(
|
|||||||
* The `info` gesture displays domain object metadata in a
|
* The `info` gesture displays domain object metadata in a
|
||||||
* bubble on hover.
|
* bubble on hover.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/commonUI/inspect
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param $timeout Angular's `$timeout`
|
* @param $timeout Angular's `$timeout`
|
||||||
* @param {InfoService} infoService a service which shows info bubbles
|
* @param {InfoService} infoService a service which shows info bubbles
|
||||||
@ -103,6 +104,7 @@ define(
|
|||||||
* Detach any event handlers associated with this gesture.
|
* Detach any event handlers associated with this gesture.
|
||||||
* @memberof InfoGesture
|
* @memberof InfoGesture
|
||||||
* @method
|
* @method
|
||||||
|
* @memberof platform/commonUI/inspect.InfoGesture#
|
||||||
*/
|
*/
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
// Dismiss any active bubble...
|
// Dismiss any active bubble...
|
||||||
@ -119,3 +121,4 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays informative content ("info bubbles") for the user.
|
* Displays informative content ("info bubbles") for the user.
|
||||||
|
* @memberof platform/commonUI/inspect
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function InfoService($compile, $document, $window, $rootScope) {
|
function InfoService($compile, $document, $window, $rootScope) {
|
||||||
@ -85,6 +86,7 @@ define(
|
|||||||
* pixel coordinates.
|
* pixel coordinates.
|
||||||
* @returns {Function} a function that may be invoked to
|
* @returns {Function} a function that may be invoked to
|
||||||
* dismiss the info bubble
|
* dismiss the info bubble
|
||||||
|
* @memberof platform/commonUI/inspect.InfoService#
|
||||||
*/
|
*/
|
||||||
display: display
|
display: display
|
||||||
};
|
};
|
||||||
@ -93,3 +95,4 @@ define(
|
|||||||
return InfoService;
|
return InfoService;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ define(
|
|||||||
* which capabilities. This supports composition policy (rules
|
* which capabilities. This supports composition policy (rules
|
||||||
* for which objects can contain which other objects) which
|
* for which objects can contain which other objects) which
|
||||||
* sometimes is determined based on the presence of capabilities.
|
* sometimes is determined based on the presence of capabilities.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/containment
|
||||||
*/
|
*/
|
||||||
function CapabilityTable(typeService, capabilityService) {
|
function CapabilityTable(typeService, capabilityService) {
|
||||||
var table = {};
|
var table = {};
|
||||||
@ -64,6 +66,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Check if a type is expected to expose a specific
|
* Check if a type is expected to expose a specific
|
||||||
* capability.
|
* capability.
|
||||||
|
* @memberof platform/containment.CapabilityTable#
|
||||||
*/
|
*/
|
||||||
hasCapability: function (typeKey, capabilityKey) {
|
hasCapability: function (typeKey, capabilityKey) {
|
||||||
return (table[capabilityKey] || {})[typeKey];
|
return (table[capabilityKey] || {})[typeKey];
|
||||||
|
@ -34,6 +34,8 @@ define(
|
|||||||
* since it's delegated to a different policy category.
|
* since it's delegated to a different policy category.
|
||||||
* To avoid a circular dependency, the service is obtained via
|
* To avoid a circular dependency, the service is obtained via
|
||||||
* Angular's `$injector`.
|
* Angular's `$injector`.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/containment
|
||||||
*/
|
*/
|
||||||
function ComposeActionPolicy($injector) {
|
function ComposeActionPolicy($injector) {
|
||||||
var policyService;
|
var policyService;
|
||||||
@ -61,6 +63,7 @@ define(
|
|||||||
* Check whether or not a compose action should be allowed
|
* Check whether or not a compose action should be allowed
|
||||||
* in this context.
|
* in this context.
|
||||||
* @returns {boolean} true if it may be allowed
|
* @returns {boolean} true if it may be allowed
|
||||||
|
* @memberof platform/containment.ComposeActionPolicy#
|
||||||
*/
|
*/
|
||||||
allow: function (candidate, context) {
|
allow: function (candidate, context) {
|
||||||
if (candidate.getMetadata().key === 'compose') {
|
if (candidate.getMetadata().key === 'compose') {
|
||||||
|
@ -8,12 +8,15 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Policy allowing composition only for domain object types which
|
* Policy allowing composition only for domain object types which
|
||||||
* have a composition property.
|
* have a composition property.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/containment
|
||||||
*/
|
*/
|
||||||
function CompositionModelPolicy() {
|
function CompositionModelPolicy() {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Is the type identified by the candidate allowed to
|
* Is the type identified by the candidate allowed to
|
||||||
* contain the type described by the context?
|
* contain the type described by the context?
|
||||||
|
* @memberof platform/containment.CompositionModelPolicy#
|
||||||
*/
|
*/
|
||||||
allow: function (candidate, context) {
|
allow: function (candidate, context) {
|
||||||
return Array.isArray(
|
return Array.isArray(
|
||||||
|
@ -28,6 +28,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Disallow composition changes to objects which are not mutable.
|
* Disallow composition changes to objects which are not mutable.
|
||||||
|
* @memberof platform/containment
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function CompositionMutabilityPolicy() {
|
function CompositionMutabilityPolicy() {
|
||||||
@ -36,6 +37,7 @@ define(
|
|||||||
* Is the type identified by the candidate allowed to
|
* Is the type identified by the candidate allowed to
|
||||||
* contain the type described by the context?
|
* contain the type described by the context?
|
||||||
* @param {Type} candidate the type of domain object
|
* @param {Type} candidate the type of domain object
|
||||||
|
* @memberof platform/containment.CompositionMutabilityPolicy#
|
||||||
*/
|
*/
|
||||||
allow: function (candidate) {
|
allow: function (candidate) {
|
||||||
// Equate creatability with mutability; that is, users
|
// Equate creatability with mutability; that is, users
|
||||||
|
@ -28,6 +28,8 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines composition policy as driven by type metadata.
|
* Defines composition policy as driven by type metadata.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/containment
|
||||||
*/
|
*/
|
||||||
function CompositionPolicy($injector) {
|
function CompositionPolicy($injector) {
|
||||||
// We're really just wrapping the containment table and rephrasing
|
// We're really just wrapping the containment table and rephrasing
|
||||||
@ -45,6 +47,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Is the type identified by the candidate allowed to
|
* Is the type identified by the candidate allowed to
|
||||||
* contain the type described by the context?
|
* contain the type described by the context?
|
||||||
|
* @memberof platform/containment.CompositionPolicy#
|
||||||
*/
|
*/
|
||||||
allow: function (candidate, context) {
|
allow: function (candidate, context) {
|
||||||
return getTable().canContain(candidate, context);
|
return getTable().canContain(candidate, context);
|
||||||
|
@ -37,6 +37,8 @@ define(
|
|||||||
* start time (plug-in support means this cannot be determined
|
* start time (plug-in support means this cannot be determined
|
||||||
* prior to that, but we don't want to redo these calculations
|
* prior to that, but we don't want to redo these calculations
|
||||||
* every time policy is checked.)
|
* every time policy is checked.)
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/containment
|
||||||
*/
|
*/
|
||||||
function ContainmentTable(typeService, capabilityService) {
|
function ContainmentTable(typeService, capabilityService) {
|
||||||
var types = typeService.listTypes(),
|
var types = typeService.listTypes(),
|
||||||
@ -103,6 +105,7 @@ define(
|
|||||||
* Check if domain objects of one type can contain domain
|
* Check if domain objects of one type can contain domain
|
||||||
* objects of another type.
|
* objects of another type.
|
||||||
* @returns {boolean} true if allowable
|
* @returns {boolean} true if allowable
|
||||||
|
* @memberof platform/containment.ContainmentTable#
|
||||||
*/
|
*/
|
||||||
canContain: function (containerType, containedType) {
|
canContain: function (containerType, containedType) {
|
||||||
var set = table[containerType.getKey()] || {};
|
var set = table[containerType.getKey()] || {};
|
||||||
|
@ -31,6 +31,7 @@ define(
|
|||||||
* actions for a given context, results from all
|
* actions for a given context, results from all
|
||||||
* services will be assembled and concatenated.
|
* services will be assembled and concatenated.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {ActionProvider[]} actionProviders an array
|
* @param {ActionProvider[]} actionProviders an array
|
||||||
* of action services
|
* of action services
|
||||||
@ -65,6 +66,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @memberof ActionAggregator
|
* @memberof ActionAggregator
|
||||||
|
* @memberof platform/core.ActionAggregator#
|
||||||
*/
|
*/
|
||||||
getActions: getActions
|
getActions: getActions
|
||||||
};
|
};
|
||||||
|
@ -45,6 +45,7 @@ define(
|
|||||||
* which the action will be performed (also, the
|
* which the action will be performed (also, the
|
||||||
* action which exposes the capability.)
|
* action which exposes the capability.)
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ActionCapability($q, actionService, domainObject) {
|
function ActionCapability($q, actionService, domainObject) {
|
||||||
@ -92,6 +93,7 @@ define(
|
|||||||
* @returns {Promise} the result of the action that was
|
* @returns {Promise} the result of the action that was
|
||||||
* performed, or undefined if no matching action
|
* performed, or undefined if no matching action
|
||||||
* was found.
|
* was found.
|
||||||
|
* @memberof platform/core.ActionCapability#
|
||||||
*/
|
*/
|
||||||
perform: performAction,
|
perform: performAction,
|
||||||
/**
|
/**
|
||||||
@ -107,6 +109,7 @@ define(
|
|||||||
* be taken as the "key" field to match against
|
* be taken as the "key" field to match against
|
||||||
* specific actions.
|
* specific actions.
|
||||||
* @returns {Action[]} an array of matching actions
|
* @returns {Action[]} an array of matching actions
|
||||||
|
* @memberof platform/core.ActionCapability#
|
||||||
*/
|
*/
|
||||||
getActions: getActions
|
getActions: getActions
|
||||||
};
|
};
|
||||||
|
@ -35,6 +35,7 @@ define(
|
|||||||
* of actions exposed via extension (specifically, the "actions"
|
* of actions exposed via extension (specifically, the "actions"
|
||||||
* category of extension.)
|
* category of extension.)
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ActionProvider(actions) {
|
function ActionProvider(actions) {
|
||||||
@ -145,6 +146,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @memberof ActionProvider
|
* @memberof ActionProvider
|
||||||
|
* @memberof platform/core.ActionProvider#
|
||||||
*/
|
*/
|
||||||
getActions: getActions
|
getActions: getActions
|
||||||
};
|
};
|
||||||
|
@ -34,6 +34,7 @@ define(
|
|||||||
* the actions it exposes always emit a log message when they are
|
* the actions it exposes always emit a log message when they are
|
||||||
* performed.
|
* performed.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function LoggingActionDecorator($log, actionService) {
|
function LoggingActionDecorator($log, actionService) {
|
||||||
@ -77,6 +78,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @memberof LoggingActionDecorator
|
* @memberof LoggingActionDecorator
|
||||||
|
* @memberof platform/core.LoggingActionDecorator#
|
||||||
*/
|
*/
|
||||||
getActions: function () {
|
getActions: function () {
|
||||||
return actionService.getActions.apply(
|
return actionService.getActions.apply(
|
||||||
|
@ -37,6 +37,7 @@ define(
|
|||||||
* require consulting the object service (e.g. to trigger a database
|
* require consulting the object service (e.g. to trigger a database
|
||||||
* query to retrieve the nested object models.)
|
* query to retrieve the nested object models.)
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function CompositionCapability($injector, domainObject) {
|
function CompositionCapability($injector, domainObject) {
|
||||||
@ -94,6 +95,7 @@ define(
|
|||||||
* Request the composition of this object.
|
* Request the composition of this object.
|
||||||
* @returns {Promise.<DomainObject[]>} a list of all domain
|
* @returns {Promise.<DomainObject[]>} a list of all domain
|
||||||
* objects which compose this domain object.
|
* objects which compose this domain object.
|
||||||
|
* @memberof platform/core.CompositionCapability#
|
||||||
*/
|
*/
|
||||||
invoke: promiseComposition
|
invoke: promiseComposition
|
||||||
};
|
};
|
||||||
|
@ -36,6 +36,7 @@ define(
|
|||||||
* those whose `composition` capability was used to access this
|
* those whose `composition` capability was used to access this
|
||||||
* object.)
|
* object.)
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ContextCapability(parentObject, domainObject) {
|
function ContextCapability(parentObject, domainObject) {
|
||||||
@ -50,6 +51,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {DomainObject} the immediate parent of this
|
* @returns {DomainObject} the immediate parent of this
|
||||||
* domain object.
|
* domain object.
|
||||||
|
* @memberof platform/core.ContextCapability#
|
||||||
*/
|
*/
|
||||||
getParent: function () {
|
getParent: function () {
|
||||||
return parentObject;
|
return parentObject;
|
||||||
@ -72,6 +74,7 @@ define(
|
|||||||
* @returns {DomainObject[]} the full composition ancestry
|
* @returns {DomainObject[]} the full composition ancestry
|
||||||
* of the domain object which exposed this
|
* of the domain object which exposed this
|
||||||
* capability.
|
* capability.
|
||||||
|
* @memberof platform/core.ContextCapability#
|
||||||
*/
|
*/
|
||||||
getPath: function () {
|
getPath: function () {
|
||||||
var parentPath = [],
|
var parentPath = [],
|
||||||
@ -95,6 +98,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {DomainObject} the deepest ancestor of the domain
|
* @returns {DomainObject} the deepest ancestor of the domain
|
||||||
* object which exposed this capability.
|
* object which exposed this capability.
|
||||||
|
* @memberof platform/core.ContextCapability#
|
||||||
*/
|
*/
|
||||||
getRoot: function () {
|
getRoot: function () {
|
||||||
var parentContext = parentObject &&
|
var parentContext = parentObject &&
|
||||||
|
@ -42,6 +42,7 @@ define(
|
|||||||
* @param {DomainObject} parentObject the domain object from which
|
* @param {DomainObject} parentObject the domain object from which
|
||||||
* the wrapped object was retrieved
|
* the wrapped object was retrieved
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function ContextualDomainObject(domainObject, parentObject) {
|
function ContextualDomainObject(domainObject, parentObject) {
|
||||||
|
@ -37,6 +37,7 @@ define(
|
|||||||
* of constructor functions for capabilities, as
|
* of constructor functions for capabilities, as
|
||||||
* exposed by extensions defined at the bundle level.
|
* exposed by extensions defined at the bundle level.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function CoreCapabilityProvider(capabilities, $log) {
|
function CoreCapabilityProvider(capabilities, $log) {
|
||||||
@ -84,6 +85,7 @@ define(
|
|||||||
* @returns {Object.<string,function|Capability>} all
|
* @returns {Object.<string,function|Capability>} all
|
||||||
* capabilities known to be valid for this model, as
|
* capabilities known to be valid for this model, as
|
||||||
* key-value pairs
|
* key-value pairs
|
||||||
|
* @memberof platform/core.CoreCapabilityProvider#
|
||||||
*/
|
*/
|
||||||
getCapabilities: getCapabilities
|
getCapabilities: getCapabilities
|
||||||
};
|
};
|
||||||
@ -92,3 +94,4 @@ define(
|
|||||||
return CoreCapabilityProvider;
|
return CoreCapabilityProvider;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ define(
|
|||||||
* capabilities to be delegated.
|
* capabilities to be delegated.
|
||||||
*
|
*
|
||||||
* @param domainObject
|
* @param domainObject
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function DelegationCapability($q, domainObject) {
|
function DelegationCapability($q, domainObject) {
|
||||||
@ -96,6 +97,7 @@ define(
|
|||||||
* @param {string} the name of the delegated capability
|
* @param {string} the name of the delegated capability
|
||||||
* @returns {DomainObject[]} the domain objects to which
|
* @returns {DomainObject[]} the domain objects to which
|
||||||
* responsibility for this capability is delegated.
|
* responsibility for this capability is delegated.
|
||||||
|
* @memberof platform/core.DelegationCapability#
|
||||||
*/
|
*/
|
||||||
invoke: getDelegates,
|
invoke: getDelegates,
|
||||||
/**
|
/**
|
||||||
@ -105,6 +107,7 @@ define(
|
|||||||
* @param {string} the name of the delegated capability
|
* @param {string} the name of the delegated capability
|
||||||
* @returns {DomainObject[]} the domain objects to which
|
* @returns {DomainObject[]} the domain objects to which
|
||||||
* responsibility for this capability is delegated.
|
* responsibility for this capability is delegated.
|
||||||
|
* @memberof platform/core.DelegationCapability#
|
||||||
*/
|
*/
|
||||||
getDelegates: getDelegates,
|
getDelegates: getDelegates,
|
||||||
doesDelegateCapability: doesDelegate
|
doesDelegateCapability: doesDelegate
|
||||||
|
@ -11,6 +11,8 @@ define(
|
|||||||
* @property {string} name the human-readable name of this property
|
* @property {string} name the human-readable name of this property
|
||||||
* @property {string} value the human-readable value of this property,
|
* @property {string} value the human-readable value of this property,
|
||||||
* for this specific domain object
|
* for this specific domain object
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/core
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
var TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
||||||
@ -82,6 +84,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Get metadata about this object.
|
* Get metadata about this object.
|
||||||
* @returns {MetadataProperty[]} metadata about this object
|
* @returns {MetadataProperty[]} metadata about this object
|
||||||
|
* @memberof platform/core.MetadataCapability#
|
||||||
*/
|
*/
|
||||||
invoke: getMetadata
|
invoke: getMetadata
|
||||||
};
|
};
|
||||||
@ -90,3 +93,4 @@ define(
|
|||||||
return MetadataCapability;
|
return MetadataCapability;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @param {DomainObject} domainObject the domain object
|
* @param {DomainObject} domainObject the domain object
|
||||||
* which will expose this capability
|
* which will expose this capability
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function MutationCapability(topic, now, domainObject) {
|
function MutationCapability(topic, now, domainObject) {
|
||||||
@ -118,6 +119,7 @@ define(
|
|||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Alias of `mutate`, used to support useCapability.
|
* Alias of `mutate`, used to support useCapability.
|
||||||
|
* @memberof platform/core.MutationCapability#
|
||||||
*/
|
*/
|
||||||
invoke: mutate,
|
invoke: mutate,
|
||||||
/**
|
/**
|
||||||
@ -146,6 +148,7 @@ define(
|
|||||||
* used)
|
* used)
|
||||||
* @returns {Promise.<boolean>} a promise for the result
|
* @returns {Promise.<boolean>} a promise for the result
|
||||||
* of the mutation; true if changes were made.
|
* of the mutation; true if changes were made.
|
||||||
|
* @memberof platform/core.MutationCapability#
|
||||||
*/
|
*/
|
||||||
mutate: mutate,
|
mutate: mutate,
|
||||||
/**
|
/**
|
||||||
@ -155,6 +158,7 @@ define(
|
|||||||
* invoke the function returned by this method.
|
* invoke the function returned by this method.
|
||||||
* @param {Function} listener function to call on mutation
|
* @param {Function} listener function to call on mutation
|
||||||
* @returns {Function} a function to stop listening
|
* @returns {Function} a function to stop listening
|
||||||
|
* @memberof platform/core.MutationCapability#
|
||||||
*/
|
*/
|
||||||
listen: listen
|
listen: listen
|
||||||
};
|
};
|
||||||
@ -163,3 +167,4 @@ define(
|
|||||||
return MutationCapability;
|
return MutationCapability;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ define(
|
|||||||
* @param {DomainObject} the domain object which shall expose
|
* @param {DomainObject} the domain object which shall expose
|
||||||
* this capability
|
* this capability
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function PersistenceCapability(persistenceService, SPACE, domainObject) {
|
function PersistenceCapability(persistenceService, SPACE, domainObject) {
|
||||||
@ -80,6 +81,7 @@ define(
|
|||||||
* @returns {Promise} a promise which will be resolved
|
* @returns {Promise} a promise which will be resolved
|
||||||
* if persistence is successful, and rejected
|
* if persistence is successful, and rejected
|
||||||
* if not.
|
* if not.
|
||||||
|
* @memberof platform/core.PersistenceCapability#
|
||||||
*/
|
*/
|
||||||
persist: function () {
|
persist: function () {
|
||||||
updatePersistenceTimestamp();
|
updatePersistenceTimestamp();
|
||||||
@ -94,6 +96,7 @@ define(
|
|||||||
* persistence.
|
* persistence.
|
||||||
* @returns {Promise} a promise which will be resolved
|
* @returns {Promise} a promise which will be resolved
|
||||||
* when the update is complete
|
* when the update is complete
|
||||||
|
* @memberof platform/core.PersistenceCapability#
|
||||||
*/
|
*/
|
||||||
refresh: function () {
|
refresh: function () {
|
||||||
var model = domainObject.getModel();
|
var model = domainObject.getModel();
|
||||||
@ -114,6 +117,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {string} the name of the space which should
|
* @returns {string} the name of the space which should
|
||||||
* be used to persist this object
|
* be used to persist this object
|
||||||
|
* @memberof platform/core.PersistenceCapability#
|
||||||
*/
|
*/
|
||||||
getSpace: function () {
|
getSpace: function () {
|
||||||
return SPACE;
|
return SPACE;
|
||||||
|
@ -38,6 +38,7 @@ define(
|
|||||||
* which are not intended to appear in the tree, but are instead
|
* which are not intended to appear in the tree, but are instead
|
||||||
* intended only for special, limited usage.
|
* intended only for special, limited usage.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function RelationshipCapability($injector, domainObject) {
|
function RelationshipCapability($injector, domainObject) {
|
||||||
@ -109,6 +110,7 @@ define(
|
|||||||
* List all types of relationships exposed by this
|
* List all types of relationships exposed by this
|
||||||
* object.
|
* object.
|
||||||
* @returns {string[]} a list of all relationship types
|
* @returns {string[]} a list of all relationship types
|
||||||
|
* @memberof platform/core.RelationshipCapability#
|
||||||
*/
|
*/
|
||||||
listRelationships: listRelationships,
|
listRelationships: listRelationships,
|
||||||
/**
|
/**
|
||||||
@ -118,6 +120,7 @@ define(
|
|||||||
* @param {string} key the type of relationship
|
* @param {string} key the type of relationship
|
||||||
* @returns {Promise.<DomainObject[]>} a promise for related
|
* @returns {Promise.<DomainObject[]>} a promise for related
|
||||||
* domain objects
|
* domain objects
|
||||||
|
* @memberof platform/core.RelationshipCapability#
|
||||||
*/
|
*/
|
||||||
getRelatedObjects: promiseRelationships
|
getRelatedObjects: promiseRelationships
|
||||||
};
|
};
|
||||||
|
@ -30,6 +30,7 @@ define(
|
|||||||
* The caching model decorator maintains a cache of loaded domain
|
* The caching model decorator maintains a cache of loaded domain
|
||||||
* object models, and ensures that duplicate models for the same
|
* object models, and ensures that duplicate models for the same
|
||||||
* object are not provided.
|
* object are not provided.
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function CachingModelDecorator(modelService) {
|
function CachingModelDecorator(modelService) {
|
||||||
@ -114,6 +115,7 @@ define(
|
|||||||
* containing key-value pairs, where keys are
|
* containing key-value pairs, where keys are
|
||||||
* ids and values are models
|
* ids and values are models
|
||||||
* @method
|
* @method
|
||||||
|
* @memberof platform/core.CachingModelDecorator#
|
||||||
*/
|
*/
|
||||||
getModels: function (ids) {
|
getModels: function (ids) {
|
||||||
var neededIds = ids.filter(notCached);
|
var neededIds = ids.filter(notCached);
|
||||||
|
@ -30,6 +30,8 @@ define(
|
|||||||
* Adds placeholder domain object models for any models which
|
* Adds placeholder domain object models for any models which
|
||||||
* fail to load from the underlying model service.
|
* fail to load from the underlying model service.
|
||||||
* @implements {ModelService}
|
* @implements {ModelService}
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/core
|
||||||
*/
|
*/
|
||||||
function MissingModelDecorator(modelService) {
|
function MissingModelDecorator(modelService) {
|
||||||
function missingModel(id) {
|
function missingModel(id) {
|
||||||
@ -57,3 +59,4 @@ define(
|
|||||||
return MissingModelDecorator;
|
return MissingModelDecorator;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
* Allows multiple services which provide models for domain objects
|
* Allows multiple services which provide models for domain objects
|
||||||
* to be treated as one.
|
* to be treated as one.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {ModelProvider[]} providers the model providers to be
|
* @param {ModelProvider[]} providers the model providers to be
|
||||||
* aggregated
|
* aggregated
|
||||||
@ -77,6 +78,7 @@ define(
|
|||||||
* containing key-value pairs,
|
* containing key-value pairs,
|
||||||
* where keys are object identifiers and values
|
* where keys are object identifiers and values
|
||||||
* are object models.
|
* are object models.
|
||||||
|
* @memberof platform/core.ModelAggregator#
|
||||||
*/
|
*/
|
||||||
getModels: function (ids) {
|
getModels: function (ids) {
|
||||||
return $q.all(providers.map(function (provider) {
|
return $q.all(providers.map(function (provider) {
|
||||||
|
@ -33,6 +33,7 @@ define(
|
|||||||
* A model service which reads domain object models from an external
|
* A model service which reads domain object models from an external
|
||||||
* persistence service.
|
* persistence service.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {PersistenceService} persistenceService the service in which
|
* @param {PersistenceService} persistenceService the service in which
|
||||||
* domain object models are persisted.
|
* domain object models are persisted.
|
||||||
@ -83,6 +84,7 @@ define(
|
|||||||
* containing key-value pairs,
|
* containing key-value pairs,
|
||||||
* where keys are object identifiers and values
|
* where keys are object identifiers and values
|
||||||
* are object models.
|
* are object models.
|
||||||
|
* @memberof platform/core.PersistedModelProvider#
|
||||||
*/
|
*/
|
||||||
getModels: promiseModels
|
getModels: promiseModels
|
||||||
};
|
};
|
||||||
|
@ -39,6 +39,7 @@ define(
|
|||||||
* exposes them all as composition of the root object ROOT,
|
* exposes them all as composition of the root object ROOT,
|
||||||
* whose model is also provided by this service.
|
* whose model is also provided by this service.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function RootModelProvider(roots, $q, $log) {
|
function RootModelProvider(roots, $q, $log) {
|
||||||
@ -68,6 +69,7 @@ define(
|
|||||||
* containing key-value pairs,
|
* containing key-value pairs,
|
||||||
* where keys are object identifiers and values
|
* where keys are object identifiers and values
|
||||||
* are object models.
|
* are object models.
|
||||||
|
* @memberof platform/core.RootModelProvider#
|
||||||
*/
|
*/
|
||||||
getModels: function (ids) {
|
getModels: function (ids) {
|
||||||
return baseProvider.getModels(ids).then(addRoot);
|
return baseProvider.getModels(ids).then(addRoot);
|
||||||
|
@ -31,6 +31,7 @@ define(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads static models, provided as declared extensions of bundles.
|
* Loads static models, provided as declared extensions of bundles.
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function StaticModelProvider(models, $q, $log) {
|
function StaticModelProvider(models, $q, $log) {
|
||||||
@ -69,6 +70,7 @@ define(
|
|||||||
* ids and values are models
|
* ids and values are models
|
||||||
* @method
|
* @method
|
||||||
* @memberof StaticModelProvider#
|
* @memberof StaticModelProvider#
|
||||||
|
* @memberof platform/core.StaticModelProvider#
|
||||||
*/
|
*/
|
||||||
getModels: function (ids) {
|
getModels: function (ids) {
|
||||||
var result = {};
|
var result = {};
|
||||||
|
@ -37,6 +37,7 @@ define(
|
|||||||
* @param {object} model the "JSONifiable" state of the object
|
* @param {object} model the "JSONifiable" state of the object
|
||||||
* @param {Object.<string, Capability>|function} capabilities all
|
* @param {Object.<string, Capability>|function} capabilities all
|
||||||
* capabilities to be exposed by this object
|
* capabilities to be exposed by this object
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function DomainObject(id, model, capabilities) {
|
function DomainObject(id, model, capabilities) {
|
||||||
@ -45,6 +46,7 @@ define(
|
|||||||
* Get the unique identifier for this domain object.
|
* Get the unique identifier for this domain object.
|
||||||
* @return {string} the domain object's unique identifier
|
* @return {string} the domain object's unique identifier
|
||||||
* @memberof DomainObject#
|
* @memberof DomainObject#
|
||||||
|
* @memberof platform/core.DomainObject#
|
||||||
*/
|
*/
|
||||||
getId: function () {
|
getId: function () {
|
||||||
return id;
|
return id;
|
||||||
@ -59,6 +61,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @return {object} the domain object's persistent state
|
* @return {object} the domain object's persistent state
|
||||||
* @memberof DomainObject#
|
* @memberof DomainObject#
|
||||||
|
* @memberof platform/core.DomainObject#
|
||||||
*/
|
*/
|
||||||
getModel: function () {
|
getModel: function () {
|
||||||
return model;
|
return model;
|
||||||
@ -73,6 +76,7 @@ define(
|
|||||||
* @return {Capability} the named capability, or undefined
|
* @return {Capability} the named capability, or undefined
|
||||||
* if not present.
|
* if not present.
|
||||||
* @memberof DomainObject#
|
* @memberof DomainObject#
|
||||||
|
* @memberof platform/core.DomainObject#
|
||||||
*/
|
*/
|
||||||
getCapability: function (name) {
|
getCapability: function (name) {
|
||||||
var capability = capabilities[name];
|
var capability = capabilities[name];
|
||||||
@ -87,6 +91,7 @@ define(
|
|||||||
* @param {string} name the name of the capability to
|
* @param {string} name the name of the capability to
|
||||||
* check for
|
* check for
|
||||||
* @returns {boolean} true if provided
|
* @returns {boolean} true if provided
|
||||||
|
* @memberof platform/core.DomainObject#
|
||||||
*/
|
*/
|
||||||
hasCapability: function hasCapability(name) {
|
hasCapability: function hasCapability(name) {
|
||||||
return this.getCapability(name) !== undefined;
|
return this.getCapability(name) !== undefined;
|
||||||
@ -110,6 +115,7 @@ define(
|
|||||||
* @param {...*} [arguments] to pass to the invocation
|
* @param {...*} [arguments] to pass to the invocation
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
* @memberof DomainObject#
|
* @memberof DomainObject#
|
||||||
|
* @memberof platform/core.DomainObject#
|
||||||
*/
|
*/
|
||||||
useCapability: function (name) {
|
useCapability: function (name) {
|
||||||
// Get tail of args to pass to invoke
|
// Get tail of args to pass to invoke
|
||||||
|
@ -38,6 +38,7 @@ define(
|
|||||||
* which provides capabilities (dynamic behavior)
|
* which provides capabilities (dynamic behavior)
|
||||||
* for domain objects.
|
* for domain objects.
|
||||||
* @param $q Angular's $q, for promise consolidation
|
* @param $q Angular's $q, for promise consolidation
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function DomainObjectProvider(modelService, capabilityService, $q) {
|
function DomainObjectProvider(modelService, capabilityService, $q) {
|
||||||
@ -97,6 +98,7 @@ define(
|
|||||||
* are string identifiers for domain objects, and
|
* are string identifiers for domain objects, and
|
||||||
* values are the corresponding domain objects themselves.
|
* values are the corresponding domain objects themselves.
|
||||||
* @memberof module:core/object/object-provider.ObjectProvider#
|
* @memberof module:core/object/object-provider.ObjectProvider#
|
||||||
|
* @memberof platform/core.DomainObjectProvider#
|
||||||
*/
|
*/
|
||||||
getObjects: getObjects
|
getObjects: getObjects
|
||||||
};
|
};
|
||||||
|
@ -31,12 +31,15 @@ define(
|
|||||||
* `Date.now()` which can be injected to support testability.
|
* `Date.now()` which can be injected to support testability.
|
||||||
*
|
*
|
||||||
* @returns {Function} a function which returns current system time
|
* @returns {Function} a function which returns current system time
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/core
|
||||||
*/
|
*/
|
||||||
function Now() {
|
function Now() {
|
||||||
/**
|
/**
|
||||||
* Get the current time.
|
* Get the current time.
|
||||||
* @returns {number} current time, in milliseconds since
|
* @returns {number} current time, in milliseconds since
|
||||||
* 1970-01-01 00:00:00Z
|
* 1970-01-01 00:00:00Z
|
||||||
|
* @memberof platform/core.Now#
|
||||||
*/
|
*/
|
||||||
return function () {
|
return function () {
|
||||||
return Date.now();
|
return Date.now();
|
||||||
|
@ -42,6 +42,8 @@ define(
|
|||||||
* resolve to the returned value of `fn` whenever that is invoked.
|
* resolve to the returned value of `fn` whenever that is invoked.
|
||||||
*
|
*
|
||||||
* @returns {Function}
|
* @returns {Function}
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/core
|
||||||
*/
|
*/
|
||||||
function Throttle($timeout) {
|
function Throttle($timeout) {
|
||||||
/**
|
/**
|
||||||
@ -52,6 +54,7 @@ define(
|
|||||||
* @param {boolean} apply true if a `$apply` call should be
|
* @param {boolean} apply true if a `$apply` call should be
|
||||||
* invoked after this function executes; defaults to
|
* invoked after this function executes; defaults to
|
||||||
* `false`.
|
* `false`.
|
||||||
|
* @memberof platform/core.Throttle#
|
||||||
*/
|
*/
|
||||||
return function (fn, delay, apply) {
|
return function (fn, delay, apply) {
|
||||||
var activeTimeout;
|
var activeTimeout;
|
||||||
@ -82,3 +85,4 @@ define(
|
|||||||
return Throttle;
|
return Throttle;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ define(
|
|||||||
* arguments) are private; each call returns a new instance.
|
* arguments) are private; each call returns a new instance.
|
||||||
*
|
*
|
||||||
* @returns {Function}
|
* @returns {Function}
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/core
|
||||||
*/
|
*/
|
||||||
function Topic() {
|
function Topic() {
|
||||||
var topics = {};
|
var topics = {};
|
||||||
@ -71,6 +73,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Use and (if necessary) create a new topic.
|
* Use and (if necessary) create a new topic.
|
||||||
* @param {string} [key] name of the topic to use
|
* @param {string} [key] name of the topic to use
|
||||||
|
* @memberof platform/core.Topic#
|
||||||
*/
|
*/
|
||||||
return function (key) {
|
return function (key) {
|
||||||
if (arguments.length < 1) {
|
if (arguments.length < 1) {
|
||||||
@ -85,3 +88,4 @@ define(
|
|||||||
return Topic;
|
return Topic;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ define(
|
|||||||
* @param b the second object to be merged
|
* @param b the second object to be merged
|
||||||
* @param merger the merger, as described above
|
* @param merger the merger, as described above
|
||||||
* @returns {*} the result of merging `a` and `b`
|
* @returns {*} the result of merging `a` and `b`
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/core
|
||||||
*/
|
*/
|
||||||
function mergeModels(a, b, merger) {
|
function mergeModels(a, b, merger) {
|
||||||
var mergeFunction;
|
var mergeFunction;
|
||||||
|
@ -34,6 +34,7 @@ define(
|
|||||||
* type directly available when working with that object, by way
|
* type directly available when working with that object, by way
|
||||||
* of a `domainObject.getCapability('type')` invocation.
|
* of a `domainObject.getCapability('type')` invocation.
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {TypeService} typeService the service which
|
* @param {TypeService} typeService the service which
|
||||||
* provides type information
|
* provides type information
|
||||||
|
@ -42,6 +42,8 @@ define(
|
|||||||
* key-value pairs describing a type and its
|
* key-value pairs describing a type and its
|
||||||
* relationship to other types.
|
* relationship to other types.
|
||||||
* @memberof module:core/type/type-impl
|
* @memberof module:core/type/type-impl
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/core
|
||||||
*/
|
*/
|
||||||
function TypeImpl(typeDef) {
|
function TypeImpl(typeDef) {
|
||||||
var inheritList = typeDef.inherits || [],
|
var inheritList = typeDef.inherits || [],
|
||||||
@ -60,6 +62,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {string} the key which identifies this type
|
* @returns {string} the key which identifies this type
|
||||||
* @memberof module:core/type/type-impl.TypeImpl#
|
* @memberof module:core/type/type-impl.TypeImpl#
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
getKey: function () {
|
getKey: function () {
|
||||||
return typeDef.key;
|
return typeDef.key;
|
||||||
@ -71,6 +74,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {string} the human-readable name of this type
|
* @returns {string} the human-readable name of this type
|
||||||
* @memberof module:core/type/type-impl.TypeImpl#
|
* @memberof module:core/type/type-impl.TypeImpl#
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
getName: function () {
|
getName: function () {
|
||||||
return typeDef.name;
|
return typeDef.name;
|
||||||
@ -82,6 +86,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {string} the human-readable description of this type
|
* @returns {string} the human-readable description of this type
|
||||||
* @memberof module:core/type/type-impl.TypeImpl#
|
* @memberof module:core/type/type-impl.TypeImpl#
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
getDescription: function () {
|
getDescription: function () {
|
||||||
return typeDef.description;
|
return typeDef.description;
|
||||||
@ -94,6 +99,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {string} the glyph to be displayed
|
* @returns {string} the glyph to be displayed
|
||||||
* @memberof module:core/type/type-impl.TypeImpl#
|
* @memberof module:core/type/type-impl.TypeImpl#
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
getGlyph: function () {
|
getGlyph: function () {
|
||||||
return typeDef.glyph;
|
return typeDef.glyph;
|
||||||
@ -105,6 +111,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @return {Array<TypeProperty>} properties associated with
|
* @return {Array<TypeProperty>} properties associated with
|
||||||
* objects of this type
|
* objects of this type
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
getProperties: function () {
|
getProperties: function () {
|
||||||
return (typeDef.properties || []).map(TypeProperty);
|
return (typeDef.properties || []).map(TypeProperty);
|
||||||
@ -114,6 +121,7 @@ define(
|
|||||||
* this type.
|
* this type.
|
||||||
*
|
*
|
||||||
* @return {object} initial domain object model
|
* @return {object} initial domain object model
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
getInitialModel: function () {
|
getInitialModel: function () {
|
||||||
return typeDef.model || {};
|
return typeDef.model || {};
|
||||||
@ -126,6 +134,7 @@ define(
|
|||||||
*
|
*
|
||||||
* @returns {object} the raw definition for this type
|
* @returns {object} the raw definition for this type
|
||||||
* @memberof module:core/type/type-impl.TypeImpl#
|
* @memberof module:core/type/type-impl.TypeImpl#
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
getDefinition: function () {
|
getDefinition: function () {
|
||||||
return typeDef;
|
return typeDef;
|
||||||
@ -141,6 +150,7 @@ define(
|
|||||||
* object, which this
|
* object, which this
|
||||||
* @returns {boolean} true
|
* @returns {boolean} true
|
||||||
* @memberof module:core/type/type-impl.TypeImpl#
|
* @memberof module:core/type/type-impl.TypeImpl#
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
instanceOf: function instanceOf(key) {
|
instanceOf: function instanceOf(key) {
|
||||||
|
|
||||||
@ -162,6 +172,7 @@ define(
|
|||||||
* the type definition's "feature" field.
|
* the type definition's "feature" field.
|
||||||
* @param {string} feature a string identifying the feature
|
* @param {string} feature a string identifying the feature
|
||||||
* @returns {boolean} true if the feature is supported
|
* @returns {boolean} true if the feature is supported
|
||||||
|
* @memberof platform/core.TypeImpl#
|
||||||
*/
|
*/
|
||||||
hasFeature: function (feature) {
|
hasFeature: function (feature) {
|
||||||
return featureSet[feature] || false;
|
return featureSet[feature] || false;
|
||||||
|
@ -36,6 +36,7 @@ define(
|
|||||||
* Instantiate a property associated with domain objects of a
|
* Instantiate a property associated with domain objects of a
|
||||||
* given type. This provides an interface by which
|
* given type. This provides an interface by which
|
||||||
*
|
*
|
||||||
|
* @memberof platform/core
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof module:core/type/type-property
|
* @memberof module:core/type/type-property
|
||||||
*/
|
*/
|
||||||
@ -114,6 +115,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Retrieve the value associated with this property
|
* Retrieve the value associated with this property
|
||||||
* from a given model.
|
* from a given model.
|
||||||
|
* @memberof platform/core.TypeProperty#
|
||||||
*/
|
*/
|
||||||
getValue: function (model) {
|
getValue: function (model) {
|
||||||
var property = propertyDefinition.property ||
|
var property = propertyDefinition.property ||
|
||||||
@ -133,6 +135,7 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Set a value associated with this property in
|
* Set a value associated with this property in
|
||||||
* an object's model.
|
* an object's model.
|
||||||
|
* @memberof platform/core.TypeProperty#
|
||||||
*/
|
*/
|
||||||
setValue: function setValue(model, value) {
|
setValue: function setValue(model, value) {
|
||||||
var property = propertyDefinition.property ||
|
var property = propertyDefinition.property ||
|
||||||
@ -153,6 +156,7 @@ define(
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Get the raw definition for this property.
|
* Get the raw definition for this property.
|
||||||
|
* @memberof platform/core.TypeProperty#
|
||||||
*/
|
*/
|
||||||
getDefinition: function () {
|
getDefinition: function () {
|
||||||
return propertyDefinition;
|
return propertyDefinition;
|
||||||
|
@ -62,6 +62,8 @@ define(
|
|||||||
/**
|
/**
|
||||||
* Look up an appropriate conversion between form values and model
|
* Look up an appropriate conversion between form values and model
|
||||||
* values, e.g. to numeric values.
|
* values, e.g. to numeric values.
|
||||||
|
* @constructor
|
||||||
|
* @memberof platform/core
|
||||||
*/
|
*/
|
||||||
function TypePropertyConversion(name) {
|
function TypePropertyConversion(name) {
|
||||||
if (name &&
|
if (name &&
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user