Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • view
    • Specifies the type of property and is represented in the type of property view used. The properties available are exposed under the globally scoped 'Property' object:
      • Property.Bool
        • Defines a checkbox.
        • Serializes to a boolean model property type.
      • Property.Color
        • Defines a colorpicker.
        • Serializes to a string model property type containing the color hashcode.
      • Property.DateFormat
        • Defines a control allowing to customize the format of a data.
        • Serializes to a string model property containing the date formatting string.
      • Property.Dictionary
        • Defines a dynamic key/value pair picker control.
        • Serializes to an object model property containing the chosen values.
      • Property.Facet
        • Defines a multi-facet selector control, which allows selecting one of the facets defined in the system.
        • Serializes to an array of strings model property, corresponding to the names of facets chosen.
        • Property specific options:
          • min
            • Defines how many facets minimum should the property allow to configure and serialize under one model property.
          • max
            • Defines how many facets maximum should the property allow to configure and serialize under one model property.
          • colorPicker
            • Whether the control should allow choosing a color for each facet, by integrating a colorpicker control.
          • typeRestriction
            • Restricts type of facets which should appear in the control.
          • aggregate
            • Whether to provide aggregation options for the facet.
          • aggregateFunctions
            • Which mathematical functions to allow aggregation over. By default, min, max, sum and avg (average) are exposed.
      • Property.Language
        • Defines a language control, which allows selecting a language from all languages list.
        • Serializes to a string model property containing the language identifier.
      • Property.MultilineText
        • Defines a multiline text input control.
        • Serializes to a string model property containing the text.
        • Property specific options:
          • maxLines
            • Defines how many lines of text should the control allow.
      • Property.Multiselect
        • Defines a radio control.
        • Serializes to a string model property containing the selected value.
        • Property specific options:
          • options
            • Defines the options for the radio control
            • Is an array of objects, each containing at least string properties label and value, as well as optionally boolean property default.
      • Property.Number
        • Defines a number input control.
        • Serializes to an integer model property containing the selected number.
        • Property specific options:
          • min
            • Defines the minimum number that can be selected
          • max
            • Defines the maximum number that can be selected
      • Property.Percentage
        • Defines a percentage slider control.
        • Serializes to an integer model property containing the selected percentage.
      • Property.Text
        • Defines a singleline text input control.
        • Serializes to a string model property contaning the text.
      • Property.Trend
        • Defines a trend entity picker control.
        • Serializes to a string containing the trend entity id.
      • Property.URL
        • Defines a URL input control.
        • Serializes to a string containing the URL.
        • Property specific options:
          • hideDocs
            • Hides the section explaning the usage of URLs within Squirro widgets
  • inputName
    • Specifies the name of model property to which the value should be serialized.
    • Can be accessed in the custom widget code by this.model.get(inputName).
  • infoText
    • Specifies the information text (title) that is displayed just above the property, providing additional instructions or description of the parameter to the user.

...

Expand
titleExample
Code Block
languagejs
// Use the base (empty) property page and extend it with new fields
return Pages.Base.extend({
	customNormal: [
		{
			view: Properties.Number,
			config: {
				inputName: 'myNumber',
				infoText: 'Select a number from 3 to 7',
					min: 3,
					max: 7,
				defaultValue: 5,
			},
		},
	],
});

...