# Global

##

### Members

####
appConfigPath :string

The path to your configuration file for MetacatUI. This can be any web-accessible location. This variable must be defined in index.html.

##### Type:

- string

Since:
  - 2.12.0
Source:
  - docs/other/addtlDocs.jsdoc, line 5

### Type Definitions

####
AdditionalField

An additional field object contains the properties an additional query field to add that are required to render it correctly. An additional query field is one that does not actually exist in the query service index.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`name` | string | A unique ID to represent this field. It must not match the name of any other query fields.
`fields` | Array.<string> | The list of real query fields that this abstracted field will represent. It must exactly match the names of the query fields that actually exist.
`label` | string | A user-facing label to display.
`description` | string | A description for this field.
`category` | string | The name of the category under which to place this field. It must match one of the category names for an existing query field.

Since:
  - 2.15.0
Source:
  - src/js/views/searchSelect/QueryFieldSelectView.js, line 60

####
AdditionalField

An additional field object contains the properties for an additional query field to add to the QueryFieldSelectView that are required to render it correctly. An additional query field is one that does not actually exist in the query service index.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`name` | string | A unique ID to represent this field. It must not match the name of any other query fields.
`fields` | Array.<string> | The list of real query fields that this abstracted field will represent. It must exactly match the names of the query fields that actually exist.
`label` | string | A user-facing label to display.
`description` | string | A description for this field.
`category` | string | The name of the category under which to place this field. It must match one of the category names for an existing query field.

Source:
  - src/js/views/filters/FilterEditorView.js, line 179

####
CategoryMap

An object that defines a single category for each field. In addition to a label and icon property, each CategoryMap should have a queryTypes property OR a a queryFields property, not both.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`label` | string | A human readable label to use as a general category for groups of query fields
`icon` | string | The name of a Font Awesome 3.2.1 icon to represent the field type
`queryTypes` | Array.<string> | An array of the possible query field types, as named in the type attribute, that belong in the given category. If a queryType array is provided, the queryFields array will be ignored.
`queryFields` | Array.<string> | As an alternative to grouping fields by type, they may also be grouped by field name. Use this property instead of queryTypes to list fields by their name attribute.
`default` | boolean | Set to true for one category. Any fields that don't match another category will be placed here.

Source:
  - src/js/models/queryFields/QueryField.js, line 280

####
ContentTemplate

A ContentTemplate object specifies a single template designed to render information about the Feature.

##### Type:

- Object

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | string | <optional> | An identifier for this template.
`options` | Array.<string> | <optional> | The list of keys (option names) that are allowed for the given template. Only options with these keys will be passed to the underscore.js template, regardless of what is configured in the MapConfig#FeatureTemplate. When no options are specified, then the entire Feature model will be passed to the template as JSON.
`template` | string |  | The path to the HTML template. This will be used with require() to load the template as needed.

Since:
  - 2.19.0
Source:
  - src/js/views/maps/FeatureInfoView.js, line 64

####
ContextDefinition

Defines how to render a citation style for only it's in-text or full citation format.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`template` | Underscore.Template | The Underscore.js template to use. HTML files are converted to Underscore.js templates.
`archivedTemplate` | Underscore.Template | The Underscore.js template to use when the object is archived.
`render` | string | The name of the method in this view to use to render the citation. This method will be passed the template (or archived template if the object is archived), as well as the template options.

Since:
  - 2.23.0
Source:
  - src/js/views/CitationView.js, line 80

##### Example

    {
     inText: {
       template: _.template(InTextAPATemplate),
       archivedTemplate: _.template(InTextAPAArchivedTemplate),
       render: "renderAPAInText",
    }

####
CustomEMLMethod

In the editor, sometimes it is useful to have guided questions for the Methods section in addition to the generic numbered method steps. These custom methods are defined here as an array of literal objects that define each custom Methods question. Custom methods are serialized to the EML as regular method steps, but with an unchangeable title, defined here, in order to identify them.

##### Type:

- object

##### Properties:

Name | Type | Description
--- | --- | ---
`titleOptions` | Array.<string> | One or more titles that may exist in an EML Method Step that identify that Method Step as a custom method type. THe first title in the array is serialized to the EML XML.
`id` | string | A unique identifier for this custom method type.
`required` | boolean | If true, this custom method will be a required field for submission in the EML editor.

Since:
  - 2.19.0
Source:
  - src/js/models/AppModel.js, line 493

##### Example

    [{
                        "titleOptions": ["Ethical Research Procedures"],
                        "id": "ethical-research-procedures",
                        "required": false
                      }]

####
DetailSectionOption

Configuration for a Layer Detail section to show within this Layer Details view.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`label` | string | The name to display for this section
`view` | Backbone.View | Any view that will render content for the Layer Detail section. This view will be passed the MapAsset model. The view should display information about the MapAsset and/or allow some aspect of the MapAsset's appearance to be edited - e.g. a LayerInfoView or a LayerOpacityView.
`collapsible` | boolean | Whether or not this section should be expandable and collapsible.
`showTitle` | boolean | Whether or not to show the title/label for this section.
`hideIfError` | boolean | Set to true to hide this section when there is an error loading the layer. Example: we should hide the opacity slider for layers that are not visible on the map

Source:
  - src/js/views/maps/LayerDetailsView.js, line 95

####
MapIconString

A string that represents an icon. Can be either the name of the Font Awesome 3.2 icon OR an SVG string for an icon with all the following properties: 1) Uses viewBox attribute and not width/height; 2) Sets fill or stroke to "currentColor" in the svg element, no styles included elsewhere, 3) Has the required xmlns attribute

##### Type:

- string

Source:
  - src/js/views/maps/ToolbarView.js, line 113
See:
  - https://fontawesome.com/v3.2/icons/

##### Examples

    '<svg viewBox="0 0 400 110" fill="currentColor"><path d="M0 0h300v100H0z"/></svg>'

    'map-marker'

####
MetricOption

A metric option is an object with properties that define how to display a metric in the modal.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`name` | string | The name of the metric, as it will be displayed in the modal.
`icon` | string | The font awesome icon class for the metric
`metricValue` | string | The name of the property in the metrics model that contains the value for this metric. This will be displayed in the title of the modal.
`render` | string | The name of the method within this view that will render the metric. This method will be called after the basic modal template has been rendered.

Source:
  - src/js/views/MetricModalView.js, line 56

####
OperatorOption

An operator option is an object that lists the properties of one of the operators that will be displayed to the user in the Query Rule "operator" dropdown list. The operator properties are used to pre-select the correct operator based on attributes in the associated Filter model, as well as to update the Filter model when a user selects a new operator. Operators can set the exclude and matchSubstring properties of the model, and sometimes the values as well. Either the types property OR the fields property must be set, not both.

##### Type:

- Object

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`label` | string |  | The label to display to the user
`icon` | string |  | An icon that represents the operator
`matchSubstring` | boolean |  | Whether the matchSubstring attribute is true or false in the filter model that matches this operator
`exclude` | boolean |  | Whether the exclude attribute is true or false in the filter model that matches this operator
`hasMax` | boolean |  | Whether the filter model that matches this operator must have a max attribute
`hasMin` | boolean |  | Whether the filter model that matches this operator must have a min attribute
`values` | Array.<string> |  | For this operator to work as desired, the values that should be set in the filter (e.g. ["true"] for the operator "is true")
`types` | Array.<string> | <optional> | The node names of the filters that this operator is used for (e.g. "filter", "booleanFilter")
`fields` | Array.<string> | <optional> | The query field names of the filters that this operator is used for. If this is used for a special field, then list the special field name (id), and not the real query field names. If this fields property is set, then the types property will be ignored. (i.e. fields is more specific than types.)

Source:
  - src/js/views/queryBuilder/QueryRuleView.js, line 173

####
SearchSortOptions

A list of sort order options to display in this view.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`value` | string | The sort value that will be sent directly to the search index in the query string.
`label` | string | The name of the sort option that will be shown to the user.

Since:
  - 2.22.0
Source:
  - src/js/views/search/SorterView.js, line 23

####
SectionElement

A reference to all of the elements required to make up a toolbar section: the section content and the section link (i.e. tab); as well as the status of the section: active or in active.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`contentEl` | HTMLElement | The element that contains the toolbar section's content (the content rendered by the associated view)
`linkEl` | HTMLElement | The element that acts as a link to show the section's content, and open/close the toolbar.
`isActive` | Boolean | True if this is the active section, false otherwise.

Source:
  - src/js/views/maps/ToolbarView.js, line 280

####
SectionOption

Options/settings that are used to create a toolbar section and its associated link/tab.

##### Type:

- Object

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`label` | string |  | The name of this section to show to the user.
`icon` | MapIconString |  | The icon to show in the link (tab) for this section
`view` | Backbone.View | <optional> | The view that renders the content of the toolbar section.
`viewOptions` | object | <optional> | Any additional options to pass to the content view. By default, the label, icon, and Map model will be passed to the view as 'label', 'icon', and 'model', respectively. To pass a specific attribute from the Map model, use a string with the syntax 'model.desiredAttribute'. For example, 'model.layers' will be converted to view.model.get('layers')
`action` | function | <optional> | A function to call when the link/tab is clicked. This can be provided instead of a view and viewOptions, in which case no toolbar section will be created. The function will be passed the view and the Map model as arguments.

Source:
  - src/js/views/maps/ToolbarView.js, line 130

####
SpecialField

A special field is one that does not exist in the query service index (i.e. Solr). It can be a combination of fields that are presented to the user as a single field, but which are added to the model as multiple fields. It can also be a duplicate of a field that does exist, but presented with a different label (and even with different operator options or value input if needed).

##### Type:

- Object

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | string |  | A unique ID to represent this field. It must not match the name of any other query fields.
`fields` | Array.<string> |  | The list of real query fields that this abstracted field should represent. The query fields listed must exactly match the names of the query fields that are retrieved from the query service.
`label` | string |  | A user-facing label to display.
`description` | string |  | A description for this field.
`category` | string |  | The name of the category under which to place this field. It must match one of the category names for an existing query field set in QueryField#categoriesMap.
`values` | Array.<string> | <optional> | An optional list of filter values. If set, this is used to determine whether a pre-existing Query Rule should be displayed as one of these special fields, or as a field from the query API. Setting values means that the values set on the Query Rule model must exactly match the values set.

Since:
  - 2.15.0
Source:
  - src/js/models/AppModel.js, line 1557

####
StyleDefinition

Defines how to render a citation style for both it's in-text and full contexts.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`full` | CitationView#ContextDefinition | The full citation format.
`inText` | CitationView#ContextDefinition | The in-text citation format.

Since:
  - 2.23.0
Source:
  - src/js/views/CitationView.js, line 102

####
UIBuilderOption

A single type of custom search filter that a user can select. An option represents a specific Filter model type and uses that associated Filter View.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`label` | string | The user-facing label to show for this option
`modelType` | string | The name of the filter model type that that this UI builder should create. Only one is allowed. The model must be one of the six filters that are allowed in a Portal "UIFilterGroupType". See https://github.com/DataONEorg/collections-portals-schemas/blob/master/schemas/portals.xsd.
`iconFileName` | string | The file name, including extension, of the SVG icon used to represent this option
`description` | string | A very brief, user-facing description of how this filter works
`filterTypes` | Array.<string> | An array of one or more filter types that are allowed for this interface. If none are provided then any filter type is allowed. Filter types are one of the four keys defined in
`blockedFields` | Array.<string> | An array of one or more search fields for which this interface should be blocked QueryField#filterTypesMap, and correspond to one of the four filter types that are allowed in a Collection definition. See https://github.com/DataONEorg/collections-portals-schemas/blob/master/schemas/collections.xsd. This property is used to help users match custom search filter UIs to appropriate query fields.
`modelFunction` | function | A function that takes an optional object with model properties and returns an instance of a model to use for this UI builder
`uiFunction` | function | A function that takes the model as an argument and returns the filter UI builder view for this option

Source:
  - src/js/views/filters/FilterEditorView.js, line 217

####
ValueInputOption

The third input in each Query Rule is where the user enters a value, minimum, or maximum for the filter model. Different types of values are appropriate for different solr query fields, and so we display different interfaces depending on the type and category of the selected query fields. A Value Input Option object defines a of interface to show for a given type and category.

##### Type:

- Object

##### Properties:

Name | Type | Description
--- | --- | ---
`filterTypes` | Array.<string> | An array of one or more filter types that are allowed for this interface. If none are provided then any filter type is allowed. Filter types are one of the four keys defined in QueryField#filterTypesMap.
`categories` | Array.<string> | An array of one or more categories that are allowed for this interface. These strings must exactly match the categories provided in QueryField.categoriesMap(). If none are provided then any category is allowed.
`queryFields` | Array.<string> | Specific names of fields that are allowed in this interface. If none are provided, then any query fields are allowed that match the other properties. If this value select should be used for a special field, then use the name (id) of the special field, not the actual query fields that it represents.
`label` | string | If the interface does not include a label (e.g. number filter), include a string to display here.
`uiFunction` | function | A function that returns the UI view to use with all appropriate options set. The function will be called with this view as the context.

Source:
  - src/js/views/queryBuilder/QueryRuleView.js, line 360