UNPKG

@hxui/angular

Version:

This README includes the steps that are necessary to import the HxUi-angular into a project or to contribute with development.

420 lines (419 loc) 24.8 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ import { Injectable } from '@angular/core'; export class SelectizeConfig { constructor() { /** * The string to separate items by. When typing an item in a multi-selection control * allowing creation, then the delimiter, the item is added. If you paste * delimiter-separated items in such control, the items are added at once. * The delimiter is also used in the getValue API call on a text <input> tag to * separate the multiple values. * * Default: ',' */ this.delimiter = ','; /** * Allows the user to create new items that aren't in the initial list of options. * This setting can be any of the following: true, false (disabled), or a function * to process input. The function can take one of two forms: synchronous * (with signature function(input){} or asynchronous * (with signature function(input, callback). In the synchronous case, the function * should return an object for the options * (eg, with defaults: return { 'value': value, 'text': text };). * The asynchronous version should invoke the callback with the result in the same * format as the object above (eg, callback( { 'value': value, 'text': text});) * * Default: false */ this.create = false; /** * If true, when user exits the field (clicks outside of input), a new option * is created and selected (if create setting is enabled). * * Default: false */ this.createOnBlur = false; /** * Specifies a RegExp or a string containing a regular expression that the current * search filter must match to be allowed to be created. May also be a predicate * function that takes the filter text and returns whether it is allowed. * * Default: null */ this.createFilter = null; /** * Toggles match highlighting within the dropdown menu. * * Default: true */ this.highlight = true; /** * If false, items created by the user will not show up as available options once * they are unselected. * * Default: false */ this.persist = true; /** * Show the dropdown immediately when the control receives focus. * * Default: true */ this.openOnFocus = true; /** * The max number of items to render at once in the dropdown list of options. * * Default: 1000 */ this.maxOptions = 1000; /** * The max number of items the user can select. 1 makes the control mono-selection, * null allows an unlimited number of items. * * Default: 1 */ this.maxItems = 1; /** * If true, the items that are currently selected will not be shown in the dropdown * list of available options. * * Default: false */ this.hideSelected = false; /** * If true, the dropdown will be closed after a selection is made. * * Default: false */ this.closeAfterSelect = false; /** * If true, Selectize will treat any options with a "" value like normal. * This defaults to false to accomodate the common <select> practice of * having the first empty option to act as a placeholder. * * Default: false */ this.allowEmptyOption = false; /** * The animation duration (in milliseconds) of the scroll animation * triggered when going [up] and [down] in the options dropdown. * * Default: 60 */ this.scrollDuration = 60; /** * The number of milliseconds to wait before requesting options from the * server or null. If null, throttling is disabled. Useful when loading * options dynamically while the user types a search / filter expression. * * Default: 300 */ this.loadThrottle = 300; /** * The class name added to the wrapper element while awaiting the * fulfillment of load requests. * * Default: 'loading' */ this.loadingClass = 'loading'; /** * The placeholder of the control (displayed when nothing is selected / typed). * Defaults to input element's placeholder, unless this one is specified. * * Default: null */ this.placeholder = null; /** * If true, the load function will be called upon control * initialization (with an empty search). * * Default: false */ this.preload = false; /** * The element the dropdown menu is appended to. This should be 'body' or null. * If null, the dropdown will be appended as a child of the Selectize control. * * Default: null */ this.dropdownParent = null; /** * If true, the "Add..." option is the default selection in the dropdown. * * Default: false */ this.addPrecedence = false; /** * If true, the tab key will choose the currently selected item. * * Default: false */ this.selectOnTab = false; /** * Enable or disable international character support. * * Default: true */ this.diacritics = true; /** * The property name of the label in the options array * * Default: 'label' */ this.labelField = 'label'; /** * The property name of the value in the options array * * Default: 'value' */ this.valueField = 'value'; /** * An array of property names to analyze when filtering options. */ this.searchField = ['label']; /** * Default override item render function */ this.render = { item: (item, escape) => { const /** @type {?} */ multi = `<span class="hx-badge is-medium"> <span class="hx-badge-content">` + escape(item.label) + `</span> </span>`; const /** @type {?} */ single = `<div class="item">` + escape(item.label) + `</div>`; return (!this.maxItems) ? multi : single; } }; /** * Selectize plugins to use */ this.plugins = { 'remove_button': { label: '', title: 'Remove', className: 'hx-delete', append: true } }; } } SelectizeConfig.decorators = [ { type: Injectable }, ]; function SelectizeConfig_tsickle_Closure_declarations() { /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */ SelectizeConfig.decorators; /** * @nocollapse * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>} */ SelectizeConfig.ctorParameters; /** * The string to separate items by. When typing an item in a multi-selection control * allowing creation, then the delimiter, the item is added. If you paste * delimiter-separated items in such control, the items are added at once. * The delimiter is also used in the getValue API call on a text <input> tag to * separate the multiple values. * * Default: ',' * @type {?} */ SelectizeConfig.prototype.delimiter; /** * Allows the user to create new items that aren't in the initial list of options. * This setting can be any of the following: true, false (disabled), or a function * to process input. The function can take one of two forms: synchronous * (with signature function(input){} or asynchronous * (with signature function(input, callback). In the synchronous case, the function * should return an object for the options * (eg, with defaults: return { 'value': value, 'text': text };). * The asynchronous version should invoke the callback with the result in the same * format as the object above (eg, callback( { 'value': value, 'text': text});) * * Default: false * @type {?} */ SelectizeConfig.prototype.create; /** * If true, when user exits the field (clicks outside of input), a new option * is created and selected (if create setting is enabled). * * Default: false * @type {?} */ SelectizeConfig.prototype.createOnBlur; /** * Specifies a RegExp or a string containing a regular expression that the current * search filter must match to be allowed to be created. May also be a predicate * function that takes the filter text and returns whether it is allowed. * * Default: null * @type {?} */ SelectizeConfig.prototype.createFilter; /** * Toggles match highlighting within the dropdown menu. * * Default: true * @type {?} */ SelectizeConfig.prototype.highlight; /** * If false, items created by the user will not show up as available options once * they are unselected. * * Default: false * @type {?} */ SelectizeConfig.prototype.persist; /** * Show the dropdown immediately when the control receives focus. * * Default: true * @type {?} */ SelectizeConfig.prototype.openOnFocus; /** * The max number of items to render at once in the dropdown list of options. * * Default: 1000 * @type {?} */ SelectizeConfig.prototype.maxOptions; /** * The max number of items the user can select. 1 makes the control mono-selection, * null allows an unlimited number of items. * * Default: 1 * @type {?} */ SelectizeConfig.prototype.maxItems; /** * If true, the items that are currently selected will not be shown in the dropdown * list of available options. * * Default: false * @type {?} */ SelectizeConfig.prototype.hideSelected; /** * If true, the dropdown will be closed after a selection is made. * * Default: false * @type {?} */ SelectizeConfig.prototype.closeAfterSelect; /** * If true, Selectize will treat any options with a "" value like normal. * This defaults to false to accomodate the common <select> practice of * having the first empty option to act as a placeholder. * * Default: false * @type {?} */ SelectizeConfig.prototype.allowEmptyOption; /** * The animation duration (in milliseconds) of the scroll animation * triggered when going [up] and [down] in the options dropdown. * * Default: 60 * @type {?} */ SelectizeConfig.prototype.scrollDuration; /** * The number of milliseconds to wait before requesting options from the * server or null. If null, throttling is disabled. Useful when loading * options dynamically while the user types a search / filter expression. * * Default: 300 * @type {?} */ SelectizeConfig.prototype.loadThrottle; /** * The class name added to the wrapper element while awaiting the * fulfillment of load requests. * * Default: 'loading' * @type {?} */ SelectizeConfig.prototype.loadingClass; /** * The placeholder of the control (displayed when nothing is selected / typed). * Defaults to input element's placeholder, unless this one is specified. * * Default: null * @type {?} */ SelectizeConfig.prototype.placeholder; /** * If true, the load function will be called upon control * initialization (with an empty search). * * Default: false * @type {?} */ SelectizeConfig.prototype.preload; /** * The element the dropdown menu is appended to. This should be 'body' or null. * If null, the dropdown will be appended as a child of the Selectize control. * * Default: null * @type {?} */ SelectizeConfig.prototype.dropdownParent; /** * If true, the "Add..." option is the default selection in the dropdown. * * Default: false * @type {?} */ SelectizeConfig.prototype.addPrecedence; /** * If true, the tab key will choose the currently selected item. * * Default: false * @type {?} */ SelectizeConfig.prototype.selectOnTab; /** * Enable or disable international character support. * * Default: true * @type {?} */ SelectizeConfig.prototype.diacritics; /** * The property name of the label in the options array * * Default: 'label' * @type {?} */ SelectizeConfig.prototype.labelField; /** * The property name of the value in the options array * * Default: 'value' * @type {?} */ SelectizeConfig.prototype.valueField; /** * An array of property names to analyze when filtering options. * @type {?} */ SelectizeConfig.prototype.searchField; /** * Default override item render function * @type {?} */ SelectizeConfig.prototype.render; /** * Selectize plugins to use * @type {?} */ SelectizeConfig.prototype.plugins; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0aXplLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BoeHVpL2FuZ3VsYXIvIiwic291cmNlcyI6WyJsaWIvc2VsZWN0aXplL3NlbGVjdGl6ZS5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQU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