\\n
\\n
\\n <\" + displayFieldTag + \" ref=\\\"eInput\\\" class=\\\"ag-input-field-input\\\">\" + displayFieldTag + \">\\n
\\n
\", className) || this;\n _this.inputType = inputType;\n _this.displayFieldTag = displayFieldTag;\n return _this;\n }\n AgAbstractInputField.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n this.setInputType();\n this.eLabel.classList.add(this.className + \"-label\");\n this.eWrapper.classList.add(this.className + \"-input-wrapper\");\n this.eInput.classList.add(this.className + \"-input\");\n this.addCssClass('ag-input-field');\n this.eInput.id = this.eInput.id || \"ag-\" + this.getCompId() + \"-input\";\n var _a = this.config, width = _a.width, value = _a.value;\n if (width != null) {\n this.setWidth(width);\n }\n if (value != null) {\n this.setValue(value);\n }\n this.addInputListeners();\n };\n AgAbstractInputField.prototype.refreshLabel = function () {\n if (exists(this.getLabel())) {\n setAriaLabelledBy(this.eInput, this.getLabelId());\n }\n else {\n this.eInput.removeAttribute('aria-labelledby');\n }\n _super.prototype.refreshLabel.call(this);\n };\n AgAbstractInputField.prototype.addInputListeners = function () {\n var _this = this;\n this.addManagedListener(this.eInput, 'input', function (e) { return _this.setValue(e.target.value); });\n };\n AgAbstractInputField.prototype.setInputType = function () {\n if (this.displayFieldTag === 'input') {\n this.eInput.setAttribute('type', this.inputType);\n }\n };\n AgAbstractInputField.prototype.getInputElement = function () {\n return this.eInput;\n };\n AgAbstractInputField.prototype.setInputWidth = function (width) {\n setElementWidth(this.eWrapper, width);\n return this;\n };\n AgAbstractInputField.prototype.setInputName = function (name) {\n this.getInputElement().setAttribute('name', name);\n return this;\n };\n AgAbstractInputField.prototype.getFocusableElement = function () {\n return this.eInput;\n };\n AgAbstractInputField.prototype.setMaxLength = function (length) {\n var eInput = this.eInput;\n eInput.maxLength = length;\n return this;\n };\n AgAbstractInputField.prototype.setInputPlaceholder = function (placeholder) {\n addOrRemoveAttribute(this.eInput, 'placeholder', placeholder);\n return this;\n };\n AgAbstractInputField.prototype.setInputAriaLabel = function (label) {\n setAriaLabel(this.eInput, label);\n return this;\n };\n AgAbstractInputField.prototype.setDisabled = function (disabled) {\n setDisabled(this.eInput, disabled);\n return _super.prototype.setDisabled.call(this, disabled);\n };\n __decorate$2h([\n RefSelector('eLabel')\n ], AgAbstractInputField.prototype, \"eLabel\", void 0);\n __decorate$2h([\n RefSelector('eWrapper')\n ], AgAbstractInputField.prototype, \"eWrapper\", void 0);\n __decorate$2h([\n RefSelector('eInput')\n ], AgAbstractInputField.prototype, \"eInput\", void 0);\n return AgAbstractInputField;\n}(AgAbstractField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v29.0.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2A = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$2g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar ConditionPosition;\n(function (ConditionPosition) {\n ConditionPosition[ConditionPosition[\"One\"] = 0] = \"One\";\n ConditionPosition[ConditionPosition[\"Two\"] = 1] = \"Two\";\n})(ConditionPosition || (ConditionPosition = {}));\n/**\n * Every filter with a dropdown where the user can specify a comparing type against the filter values.\n *\n * @param M type of filter-model managed by the concrete sub-class that extends this type\n * @param V type of value managed by the concrete sub-class that extends this type\n * @param E type of UI element used for collecting user-input\n */\nvar SimpleFilter = /** @class */ (function (_super) {\n __extends$2A(SimpleFilter, _super);\n function SimpleFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SimpleFilter.prototype.getNumberOfInputs = function (type) {\n var customOpts = this.optionsFactory.getCustomOption(type);\n if (customOpts) {\n var numberOfInputs = customOpts.numberOfInputs;\n return numberOfInputs != null ? numberOfInputs : 1;\n }\n var zeroInputTypes = [\n SimpleFilter.EMPTY, SimpleFilter.NOT_BLANK, SimpleFilter.BLANK,\n ];\n if (type && zeroInputTypes.indexOf(type) >= 0) {\n return 0;\n }\n else if (type === SimpleFilter.IN_RANGE) {\n return 2;\n }\n return 1;\n };\n // floating filter calls this when user applies filter from floating filter\n SimpleFilter.prototype.onFloatingFilterChanged = function (type, value) {\n this.setTypeFromFloatingFilter(type);\n this.setValueFromFloatingFilter(value);\n this.onUiChanged(true);\n };\n SimpleFilter.prototype.setTypeFromFloatingFilter = function (type) {\n this.eType1.setValue(type);\n this.eType2.setValue(this.optionsFactory.getDefaultOption());\n (this.isDefaultOperator('AND') ? this.eJoinOperatorAnd : this.eJoinOperatorOr).setValue(true);\n };\n SimpleFilter.prototype.getModelFromUi = function () {\n if (!this.isConditionUiComplete(ConditionPosition.One)) {\n return null;\n }\n if (this.isAllowTwoConditions() && this.isConditionUiComplete(ConditionPosition.Two)) {\n return {\n filterType: this.getFilterType(),\n operator: this.getJoinOperator(),\n condition1: this.createCondition(ConditionPosition.One),\n condition2: this.createCondition(ConditionPosition.Two)\n };\n }\n return this.createCondition(ConditionPosition.One);\n };\n SimpleFilter.prototype.getConditionTypes = function () {\n return [\n this.eType1.getValue(),\n this.eType2.getValue(),\n ];\n };\n SimpleFilter.prototype.getJoinOperator = function () {\n return this.eJoinOperatorOr.getValue() === true ? 'OR' : 'AND';\n };\n SimpleFilter.prototype.areModelsEqual = function (a, b) {\n // both are missing\n if (!a && !b) {\n return true;\n }\n // one is missing, other present\n if ((!a && b) || (a && !b)) {\n return false;\n }\n // one is combined, the other is not\n var aIsSimple = !a.operator;\n var bIsSimple = !b.operator;\n var oneSimpleOneCombined = (!aIsSimple && bIsSimple) || (aIsSimple && !bIsSimple);\n if (oneSimpleOneCombined) {\n return false;\n }\n var res;\n // otherwise both present, so compare\n if (aIsSimple) {\n var aSimple = a;\n var bSimple = b;\n res = this.areSimpleModelsEqual(aSimple, bSimple);\n }\n else {\n var aCombined = a;\n var bCombined = b;\n res = aCombined.operator === bCombined.operator\n && this.areSimpleModelsEqual(aCombined.condition1, bCombined.condition1)\n && this.areSimpleModelsEqual(aCombined.condition2, bCombined.condition2);\n }\n return res;\n };\n SimpleFilter.prototype.setModelIntoUi = function (model) {\n var isCombined = model.operator;\n if (isCombined) {\n var combinedModel = model;\n var orChecked = combinedModel.operator === 'OR';\n this.eJoinOperatorAnd.setValue(!orChecked);\n this.eJoinOperatorOr.setValue(orChecked);\n this.eType1.setValue(combinedModel.condition1.type);\n this.eType2.setValue(combinedModel.condition2.type);\n this.setConditionIntoUi(combinedModel.condition1, ConditionPosition.One);\n this.setConditionIntoUi(combinedModel.condition2, ConditionPosition.Two);\n }\n else {\n var simpleModel = model;\n this.eJoinOperatorAnd.setValue(this.isDefaultOperator('AND'));\n this.eJoinOperatorOr.setValue(this.isDefaultOperator('OR'));\n this.eType1.setValue(simpleModel.type);\n this.eType2.setValue(this.optionsFactory.getDefaultOption());\n this.setConditionIntoUi(simpleModel, ConditionPosition.One);\n this.setConditionIntoUi(null, ConditionPosition.Two);\n }\n return AgPromise.resolve();\n };\n SimpleFilter.prototype.doesFilterPass = function (params) {\n var _this = this;\n var model = this.getModel();\n if (model == null) {\n return true;\n }\n var operator = model.operator;\n var models = [];\n if (operator) {\n var combinedModel = model;\n models.push(combinedModel.condition1, combinedModel.condition2);\n }\n else {\n models.push(model);\n }\n var combineFunction = operator && operator === 'OR' ? 'some' : 'every';\n return models[combineFunction](function (m) { return _this.individualConditionPasses(params, m); });\n };\n SimpleFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.optionsFactory = new OptionsFactory();\n this.optionsFactory.init(params, this.getDefaultFilterOptions());\n this.allowTwoConditions = !params.suppressAndOrCondition;\n this.alwaysShowBothConditions = !!params.alwaysShowBothConditions;\n this.defaultJoinOperator = this.getDefaultJoinOperator(params.defaultJoinOperator);\n this.filterPlaceholder = params.filterPlaceholder;\n this.putOptionsIntoDropdown();\n this.addChangedListeners();\n };\n SimpleFilter.prototype.getDefaultJoinOperator = function (defaultJoinOperator) {\n return includes(['AND', 'OR'], defaultJoinOperator) ? defaultJoinOperator : 'AND';\n };\n SimpleFilter.prototype.putOptionsIntoDropdown = function () {\n var _this = this;\n var filterOptions = this.optionsFactory.getFilterOptions();\n var eTypes = [this.eType1, this.eType2];\n // Add specified options to all condition drop-downs.\n filterOptions.forEach(function (option) {\n var listOption = typeof option === 'string' ?\n _this.createBoilerplateListOption(option) :\n _this.createCustomListOption(option);\n eTypes.forEach(function (eType) { return eType.addOption(listOption); });\n });\n // Make drop-downs read-only if there is only one option.\n eTypes.forEach(function (eType) { return eType.setDisabled(filterOptions.length <= 1); });\n };\n SimpleFilter.prototype.createBoilerplateListOption = function (option) {\n return { value: option, text: this.translate(option) };\n };\n SimpleFilter.prototype.createCustomListOption = function (option) {\n var displayKey = option.displayKey;\n var customOption = this.optionsFactory.getCustomOption(option.displayKey);\n return {\n value: displayKey,\n text: customOption ?\n this.localeService.getLocaleTextFunc()(customOption.displayKey, customOption.displayName) :\n this.translate(displayKey),\n };\n };\n SimpleFilter.prototype.isAllowTwoConditions = function () {\n return this.allowTwoConditions;\n };\n SimpleFilter.prototype.createBodyTemplate = function () {\n return /* html */ \"\\n \\n <\" + agElementTag + \" class=\\\"ag-filter-from ag-filter-filter\\\" ref=\\\"eValue-index0-\" + pos + \"\\\">\" + agElementTag + \">\\n <\" + agElementTag + \" class=\\\"ag-filter-to ag-filter-filter\\\" ref=\\\"eValue-index1-\" + pos + \"\\\">\" + agElementTag + \">\\n
\";\n };\n NumberFilter.prototype.getValues = function (position) {\n var _this = this;\n var result = [];\n this.forEachInput(function (element, index, elPosition, numberOfInputs) {\n if (position === elPosition && index < numberOfInputs) {\n result.push(_this.stringToFloat(element.getValue()));\n }\n });\n return result;\n };\n NumberFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {\n return aSimple.filter === bSimple.filter\n && aSimple.filterTo === bSimple.filterTo\n && aSimple.type === bSimple.type;\n };\n NumberFilter.prototype.getFilterType = function () {\n return 'number';\n };\n NumberFilter.prototype.stringToFloat = function (value) {\n if (typeof value === 'number') {\n return value;\n }\n var filterText = makeNull(value);\n if (filterText != null && filterText.trim() === '') {\n filterText = null;\n }\n if (this.numberFilterParams.numberParser) {\n return this.numberFilterParams.numberParser(filterText);\n }\n return filterText == null || filterText.trim() === '-' ? null : parseFloat(filterText);\n };\n NumberFilter.prototype.createCondition = function (position) {\n var type = this.getConditionTypes()[position];\n var model = {\n filterType: this.getFilterType(),\n type: type\n };\n var values = this.getValues(position);\n if (values.length > 0) {\n model.filter = values[0];\n }\n if (values.length > 1) {\n model.filterTo = values[1];\n }\n return model;\n };\n NumberFilter.prototype.getInputs = function () {\n return [\n [this.eValueFrom1, this.eValueTo1],\n [this.eValueFrom2, this.eValueTo2],\n ];\n };\n NumberFilter.prototype.getAllowedCharPattern = function () {\n var allowedCharPattern = (this.numberFilterParams || {}).allowedCharPattern;\n if (allowedCharPattern) {\n return allowedCharPattern;\n }\n if (!isBrowserChrome() && !isBrowserEdge()) {\n // only Chrome and Edge support the HTML5 number field, so for other browsers we provide an equivalent\n // constraint instead\n return '\\\\d\\\\-\\\\.';\n }\n return null;\n };\n NumberFilter.DEFAULT_FILTER_OPTIONS = [\n ScalarFilter.EQUALS,\n ScalarFilter.NOT_EQUAL,\n ScalarFilter.LESS_THAN,\n ScalarFilter.LESS_THAN_OR_EQUAL,\n ScalarFilter.GREATER_THAN,\n ScalarFilter.GREATER_THAN_OR_EQUAL,\n ScalarFilter.IN_RANGE,\n ScalarFilter.BLANK,\n ScalarFilter.NOT_BLANK,\n ];\n __decorate$2c([\n RefSelector('eValue-index0-1')\n ], NumberFilter.prototype, \"eValueFrom1\", void 0);\n __decorate$2c([\n RefSelector('eValue-index1-1')\n ], NumberFilter.prototype, \"eValueTo1\", void 0);\n __decorate$2c([\n RefSelector('eValue-index0-2')\n ], NumberFilter.prototype, \"eValueFrom2\", void 0);\n __decorate$2c([\n RefSelector('eValue-index1-2')\n ], NumberFilter.prototype, \"eValueTo2\", void 0);\n return NumberFilter;\n}(ScalarFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v29.0.0\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2t = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$c = (undefined && undefined.__assign) || function () {\n __assign$c = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$c.apply(this, arguments);\n};\nvar __decorate$2b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar TextFilter = /** @class */ (function (_super) {\n __extends$2t(TextFilter, _super);\n function TextFilter() {\n return _super.call(this, 'textFilter') || this;\n }\n TextFilter.trimInput = function (value) {\n var trimmedInput = value && value.trim();\n // trim the input, unless it is all whitespace (this is consistent with Excel behaviour)\n return trimmedInput === '' ? value : trimmedInput;\n };\n TextFilter.prototype.getDefaultDebounceMs = function () {\n return 500;\n };\n TextFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.textFilterParams = params;\n this.matcher = this.getTextMatcher();\n this.formatter = this.textFilterParams.textFormatter ||\n (this.textFilterParams.caseSensitive ? TextFilter.DEFAULT_FORMATTER : TextFilter.DEFAULT_LOWERCASE_FORMATTER);\n };\n TextFilter.prototype.getTextMatcher = function () {\n var legacyComparator = this.textFilterParams.textCustomComparator;\n if (legacyComparator) {\n _.doOnce(function () { return console.warn('AG Grid - textCustomComparator is deprecated, use textMatcher instead.'); }, 'textCustomComparator.deprecated');\n return function (_a) {\n var filterOption = _a.filterOption, value = _a.value, filterText = _a.filterText;\n return legacyComparator(filterOption, value, filterText);\n };\n }\n return this.textFilterParams.textMatcher || TextFilter.DEFAULT_MATCHER;\n };\n TextFilter.prototype.createCondition = function (position) {\n var type = this.getConditionTypes()[position];\n var model = {\n filterType: this.getFilterType(),\n type: type,\n };\n var values = this.getValues(position);\n if (values.length > 0) {\n model.filter = values[0];\n }\n if (values.length > 1) {\n model.filterTo = values[1];\n }\n return model;\n };\n TextFilter.prototype.getFilterType = function () {\n return 'text';\n };\n TextFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {\n return aSimple.filter === bSimple.filter &&\n aSimple.filterTo === bSimple.filterTo &&\n aSimple.type === bSimple.type;\n };\n TextFilter.prototype.getInputs = function () {\n return [\n [this.eValueFrom1, this.eValueTo1],\n [this.eValueFrom2, this.eValueTo2],\n ];\n };\n TextFilter.prototype.getValues = function (position) {\n var _this = this;\n var result = [];\n this.forEachInput(function (element, index, elPosition, numberOfInputs) {\n if (position === elPosition && index < numberOfInputs) {\n var value = makeNull(element.getValue());\n var cleanValue = (_this.textFilterParams.trimInput ? TextFilter.trimInput(value) : value) || null;\n result.push(cleanValue);\n element.setValue(cleanValue, true); // ensure clean value is visible\n }\n });\n return result;\n };\n TextFilter.prototype.getDefaultFilterOptions = function () {\n return TextFilter.DEFAULT_FILTER_OPTIONS;\n };\n TextFilter.prototype.createValueTemplate = function (position) {\n var pos = position === ConditionPosition.One ? '1' : '2';\n return /* html */ \"\\n