@syncfusion/ej2-multicolumn-combobox 26.2.12 → 27.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +261 -0
- package/dist/ej2-multicolumn-combobox.umd.min.js +2 -2
- package/dist/ej2-multicolumn-combobox.umd.min.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es2015.js +94 -43
- package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es5.js +94 -40
- package/dist/es6/ej2-multicolumn-combobox.es5.js.map +1 -1
- package/dist/global/ej2-multicolumn-combobox.min.js +2 -2
- package/dist/global/ej2-multicolumn-combobox.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/multicolumn-combobox/multi-column-combo-box-model.d.ts +1 -1
- package/src/multicolumn-combobox/multi-column-combo-box.d.ts +4 -2
- package/src/multicolumn-combobox/multi-column-combo-box.js +94 -41
- package/styles/bootstrap-dark-lite.css +267 -0
- package/styles/bootstrap-dark-lite.scss +10 -0
- package/styles/bootstrap-dark.css +77 -108
- package/styles/bootstrap-dark.scss +1 -0
- package/styles/bootstrap-lite.css +267 -0
- package/styles/bootstrap-lite.scss +10 -0
- package/styles/bootstrap.css +77 -108
- package/styles/bootstrap.scss +1 -0
- package/styles/bootstrap4-lite.css +309 -0
- package/styles/bootstrap4-lite.scss +10 -0
- package/styles/bootstrap4.css +78 -131
- package/styles/bootstrap4.scss +1 -0
- package/styles/bootstrap5-dark-lite.css +317 -0
- package/styles/bootstrap5-dark-lite.scss +10 -0
- package/styles/bootstrap5-dark.css +78 -127
- package/styles/bootstrap5-dark.scss +1 -0
- package/styles/bootstrap5-lite.css +317 -0
- package/styles/bootstrap5-lite.scss +10 -0
- package/styles/bootstrap5.3-lite.css +321 -0
- package/styles/bootstrap5.3-lite.scss +10 -0
- package/styles/bootstrap5.3.css +372 -0
- package/styles/bootstrap5.3.scss +11 -0
- package/styles/bootstrap5.css +78 -127
- package/styles/bootstrap5.scss +1 -0
- package/styles/fabric-dark-lite.css +243 -0
- package/styles/fabric-dark-lite.scss +10 -0
- package/styles/fabric-dark.css +78 -108
- package/styles/fabric-dark.scss +1 -0
- package/styles/fabric-lite.css +243 -0
- package/styles/fabric-lite.scss +10 -0
- package/styles/fabric.css +78 -101
- package/styles/fabric.scss +1 -0
- package/styles/fluent-dark-lite.css +310 -0
- package/styles/fluent-dark-lite.scss +10 -0
- package/styles/fluent-dark.css +78 -114
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent-lite.css +310 -0
- package/styles/fluent-lite.scss +10 -0
- package/styles/fluent.css +78 -114
- package/styles/fluent.scss +1 -0
- package/styles/fluent2-lite.css +314 -0
- package/styles/fluent2-lite.scss +10 -0
- package/styles/fluent2.css +78 -111
- package/styles/fluent2.scss +1 -0
- package/styles/highcontrast-light-lite.css +264 -0
- package/styles/highcontrast-light-lite.scss +10 -0
- package/styles/highcontrast-light.css +78 -98
- package/styles/highcontrast-light.scss +1 -0
- package/styles/highcontrast-lite.css +268 -0
- package/styles/highcontrast-lite.scss +10 -0
- package/styles/highcontrast.css +82 -98
- package/styles/highcontrast.scss +1 -0
- package/styles/material-dark-lite.css +292 -0
- package/styles/material-dark-lite.scss +10 -0
- package/styles/material-dark.css +78 -92
- package/styles/material-dark.scss +1 -0
- package/styles/material-lite.css +296 -0
- package/styles/material-lite.scss +10 -0
- package/styles/material.css +78 -113
- package/styles/material.scss +1 -0
- package/styles/material3-dark-lite.css +306 -0
- package/styles/material3-dark-lite.scss +10 -0
- package/styles/material3-dark.css +77 -116
- package/styles/material3-dark.scss +1 -0
- package/styles/material3-lite.css +308 -0
- package/styles/material3-lite.scss +10 -0
- package/styles/material3.css +77 -116
- package/styles/material3.scss +1 -0
- package/styles/multicolumn-combobox/_bds-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bigger.scss +37 -0
- package/styles/multicolumn-combobox/_bootstrap-dark-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bootstrap-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bootstrap4-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bootstrap5-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bootstrap5.3-definition.scss +15 -14
- package/styles/multicolumn-combobox/_fabric-dark-definition.scss +1 -0
- package/styles/multicolumn-combobox/_fabric-definition.scss +1 -0
- package/styles/multicolumn-combobox/_fluent-definition.scss +1 -0
- package/styles/multicolumn-combobox/_fluent2-definition.scss +1 -0
- package/styles/multicolumn-combobox/_fusionnew-definition.scss +1 -0
- package/styles/multicolumn-combobox/_highcontrast-definition.scss +1 -0
- package/styles/multicolumn-combobox/_highcontrast-light-definition.scss +1 -0
- package/styles/multicolumn-combobox/_layout.scss +34 -33
- package/styles/multicolumn-combobox/_material-dark-definition.scss +1 -0
- package/styles/multicolumn-combobox/_material-definition.scss +1 -0
- package/styles/multicolumn-combobox/_material3-definition.scss +1 -0
- package/styles/multicolumn-combobox/_tailwind-definition.scss +1 -0
- package/styles/multicolumn-combobox/_theme.scss +3 -0
- package/styles/multicolumn-combobox/bootstrap-dark.css +77 -108
- package/styles/multicolumn-combobox/bootstrap-dark.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap.css +77 -108
- package/styles/multicolumn-combobox/bootstrap.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap4.css +78 -131
- package/styles/multicolumn-combobox/bootstrap4.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap5-dark.css +78 -127
- package/styles/multicolumn-combobox/bootstrap5-dark.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap5.3.css +372 -0
- package/styles/multicolumn-combobox/bootstrap5.3.scss +11 -0
- package/styles/multicolumn-combobox/bootstrap5.css +78 -127
- package/styles/multicolumn-combobox/bootstrap5.scss +1 -0
- package/styles/multicolumn-combobox/fabric-dark.css +78 -108
- package/styles/multicolumn-combobox/fabric-dark.scss +1 -0
- package/styles/multicolumn-combobox/fabric.css +78 -101
- package/styles/multicolumn-combobox/fabric.scss +1 -0
- package/styles/multicolumn-combobox/fluent-dark.css +78 -114
- package/styles/multicolumn-combobox/fluent-dark.scss +1 -0
- package/styles/multicolumn-combobox/fluent.css +78 -114
- package/styles/multicolumn-combobox/fluent.scss +1 -0
- package/styles/multicolumn-combobox/fluent2.css +78 -111
- package/styles/multicolumn-combobox/fluent2.scss +1 -0
- package/styles/multicolumn-combobox/highcontrast-light.css +78 -98
- package/styles/multicolumn-combobox/highcontrast-light.scss +1 -0
- package/styles/multicolumn-combobox/highcontrast.css +82 -98
- package/styles/multicolumn-combobox/highcontrast.scss +1 -0
- package/styles/multicolumn-combobox/material-dark.css +78 -92
- package/styles/multicolumn-combobox/material-dark.scss +1 -0
- package/styles/multicolumn-combobox/material.css +78 -113
- package/styles/multicolumn-combobox/material.scss +1 -0
- package/styles/multicolumn-combobox/material3-dark.css +77 -116
- package/styles/multicolumn-combobox/material3-dark.scss +1 -0
- package/styles/multicolumn-combobox/material3.css +77 -116
- package/styles/multicolumn-combobox/material3.scss +1 -0
- package/styles/multicolumn-combobox/tailwind-dark.css +78 -111
- package/styles/multicolumn-combobox/tailwind-dark.scss +1 -0
- package/styles/multicolumn-combobox/tailwind.css +78 -111
- package/styles/multicolumn-combobox/tailwind.scss +1 -0
- package/styles/tailwind-dark-lite.css +297 -0
- package/styles/tailwind-dark-lite.scss +10 -0
- package/styles/tailwind-dark.css +78 -111
- package/styles/tailwind-dark.scss +1 -0
- package/styles/tailwind-lite.css +297 -0
- package/styles/tailwind-lite.scss +10 -0
- package/styles/tailwind.css +78 -111
- package/styles/tailwind.scss +1 -0
- package/tslint.json +111 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2021": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"eslint:recommended",
|
|
8
|
+
"plugin:@typescript-eslint/recommended",
|
|
9
|
+
"plugin:jsdoc/recommended",
|
|
10
|
+
"plugin:security/recommended"
|
|
11
|
+
],
|
|
12
|
+
"parser": "@typescript-eslint/parser",
|
|
13
|
+
"parserOptions": {
|
|
14
|
+
"ecmaFeatures": { "js": true },
|
|
15
|
+
"ecmaVersion": 2018,
|
|
16
|
+
"project": "./tsconfig.json",
|
|
17
|
+
"sourceType": "module"
|
|
18
|
+
},
|
|
19
|
+
"ignorePatterns": ["*.d.ts", "*.js"],
|
|
20
|
+
"plugins": [
|
|
21
|
+
"@typescript-eslint",
|
|
22
|
+
"@typescript-eslint/tslint",
|
|
23
|
+
"eslint-plugin-security",
|
|
24
|
+
"jsdoc"
|
|
25
|
+
],
|
|
26
|
+
"rules": {
|
|
27
|
+
"use-isnan": "error",
|
|
28
|
+
"security/detect-unsafe-regex":"error",
|
|
29
|
+
"security/detect-buffer-noassert":"error",
|
|
30
|
+
"security/detect-child-process":"error",
|
|
31
|
+
"security/detect-disable-mustache-escape":"error",
|
|
32
|
+
"security/detect-eval-with-expression":"error",
|
|
33
|
+
"security/detect-no-csrf-before-method-override":"error",
|
|
34
|
+
"security/detect-non-literal-fs-filename":"error",
|
|
35
|
+
"security/detect-non-literal-regexp":"error",
|
|
36
|
+
"security/detect-non-literal-require":"error",
|
|
37
|
+
"security/detect-object-injection":"error",
|
|
38
|
+
"security/detect-possible-timing-attacks":"error",
|
|
39
|
+
"security/detect-pseudoRandomBytes":"error",
|
|
40
|
+
"security/detect-new-buffer":"error",
|
|
41
|
+
"security/detect-bidi-characters":"error",
|
|
42
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
43
|
+
"@typescript-eslint/ban-types": ["warn", {
|
|
44
|
+
"types": {
|
|
45
|
+
"Object": false,
|
|
46
|
+
"object": false,
|
|
47
|
+
"{}": false,
|
|
48
|
+
"Function": false
|
|
49
|
+
}
|
|
50
|
+
}],
|
|
51
|
+
"jsdoc/check-tag-names": 0,
|
|
52
|
+
"@typescript-eslint/tslint/config": [
|
|
53
|
+
"error",
|
|
54
|
+
{
|
|
55
|
+
"rules": {
|
|
56
|
+
"ban": true,
|
|
57
|
+
"chai-vague-errors": true,
|
|
58
|
+
"max-func-body-length": [
|
|
59
|
+
true,
|
|
60
|
+
120,
|
|
61
|
+
{
|
|
62
|
+
"ignore-parameters-to-function-regex": "describe"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"missing-jsdoc": true,
|
|
66
|
+
"no-backbone-get-set-outside-model": false,
|
|
67
|
+
"no-cookies": false,
|
|
68
|
+
"no-delete-expression": false,
|
|
69
|
+
"no-disable-auto-sanitization": true,
|
|
70
|
+
"no-duplicate-case": true,
|
|
71
|
+
"no-duplicate-parameter-names": true,
|
|
72
|
+
"no-empty-interfaces": false,
|
|
73
|
+
"no-exec-script": true,
|
|
74
|
+
"no-function-expression": false,
|
|
75
|
+
"no-multiple-var-decl": false,
|
|
76
|
+
"no-string-based-set-immediate": false,
|
|
77
|
+
"no-string-based-set-interval": false,
|
|
78
|
+
"no-unnecessary-bind": false,
|
|
79
|
+
"no-unused-imports": true,
|
|
80
|
+
"no-with-statement": false,
|
|
81
|
+
"prefer-array-literal": false,
|
|
82
|
+
"typedef": [
|
|
83
|
+
true,
|
|
84
|
+
"call-signature",
|
|
85
|
+
"parameter",
|
|
86
|
+
"property-declaration",
|
|
87
|
+
"variable-declaration",
|
|
88
|
+
"arrow-parameter",
|
|
89
|
+
"member-variable-declaration"
|
|
90
|
+
],
|
|
91
|
+
"use-named-parameter": false,
|
|
92
|
+
"valid-typeof": true,
|
|
93
|
+
"whitespace": [
|
|
94
|
+
true,
|
|
95
|
+
"check-branch",
|
|
96
|
+
"check-decl",
|
|
97
|
+
"check-operator",
|
|
98
|
+
"check-separator",
|
|
99
|
+
"check-type"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"no-control-regex": "error",
|
|
105
|
+
"no-constant-condition": "error",
|
|
106
|
+
"no-invalid-regexp": "error",
|
|
107
|
+
"curly": "error",
|
|
108
|
+
"eol-last": [
|
|
109
|
+
"error",
|
|
110
|
+
"always"
|
|
111
|
+
],
|
|
112
|
+
"guard-for-in": "error",
|
|
113
|
+
"no-labels": "error",
|
|
114
|
+
"max-len": [
|
|
115
|
+
"error",
|
|
116
|
+
{
|
|
117
|
+
"code": 140,
|
|
118
|
+
"tabWidth": 4,
|
|
119
|
+
"ignoreComments": true,
|
|
120
|
+
"ignoreStrings": true,
|
|
121
|
+
"ignoreTemplateLiterals": true,
|
|
122
|
+
"ignoreRegExpLiterals": true
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"no-console": [
|
|
126
|
+
"error",
|
|
127
|
+
{
|
|
128
|
+
"allow": [
|
|
129
|
+
"warn",
|
|
130
|
+
"dir",
|
|
131
|
+
"timeLog",
|
|
132
|
+
"assert",
|
|
133
|
+
"clear",
|
|
134
|
+
"count",
|
|
135
|
+
"countReset",
|
|
136
|
+
"group",
|
|
137
|
+
"groupEnd",
|
|
138
|
+
"table",
|
|
139
|
+
"dirxml",
|
|
140
|
+
"error",
|
|
141
|
+
"groupCollapsed",
|
|
142
|
+
"Console",
|
|
143
|
+
"profile",
|
|
144
|
+
"profileEnd",
|
|
145
|
+
"timeStamp",
|
|
146
|
+
"context"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"no-redeclare": [
|
|
151
|
+
"error",
|
|
152
|
+
{
|
|
153
|
+
"builtinGlobals": true
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"@typescript-eslint/no-parameter-properties": "error",
|
|
157
|
+
"@typescript-eslint/indent": [
|
|
158
|
+
"error",
|
|
159
|
+
4,
|
|
160
|
+
{
|
|
161
|
+
"CallExpression": {
|
|
162
|
+
"arguments": "first"
|
|
163
|
+
},
|
|
164
|
+
"FunctionDeclaration": {
|
|
165
|
+
"parameters": "first"
|
|
166
|
+
},
|
|
167
|
+
"FunctionExpression": {
|
|
168
|
+
"parameters": "first"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"no-debugger": "error",
|
|
173
|
+
"no-eval": "error",
|
|
174
|
+
"no-extra-semi": "error",
|
|
175
|
+
"no-throw-literal": "error",
|
|
176
|
+
"no-fallthrough": "error",
|
|
177
|
+
"comma-dangle": [
|
|
178
|
+
"error",
|
|
179
|
+
"never"
|
|
180
|
+
],
|
|
181
|
+
"no-trailing-spaces": "error",
|
|
182
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
183
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
184
|
+
"one-var": [
|
|
185
|
+
"error",
|
|
186
|
+
"never"
|
|
187
|
+
],
|
|
188
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
189
|
+
"no-cond-assign": [
|
|
190
|
+
"error",
|
|
191
|
+
"always"
|
|
192
|
+
],
|
|
193
|
+
"@typescript-eslint/consistent-type-assertions": "off",
|
|
194
|
+
"jsdoc/check-alignment": "error",
|
|
195
|
+
"no-empty": "error",
|
|
196
|
+
"quotes": [
|
|
197
|
+
"error",
|
|
198
|
+
"single"
|
|
199
|
+
],
|
|
200
|
+
"semi": [
|
|
201
|
+
"error",
|
|
202
|
+
"always"
|
|
203
|
+
],
|
|
204
|
+
"eqeqeq": [
|
|
205
|
+
"error",
|
|
206
|
+
"smart"
|
|
207
|
+
],
|
|
208
|
+
"valid-typeof": [
|
|
209
|
+
"error",
|
|
210
|
+
{
|
|
211
|
+
"requireStringLiterals": true
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"camelcase": [
|
|
215
|
+
"error",
|
|
216
|
+
{
|
|
217
|
+
"properties": "always",
|
|
218
|
+
"ignoreDestructuring": true,
|
|
219
|
+
"ignoreImports": true
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"no-irregular-whitespace": [
|
|
223
|
+
"error",
|
|
224
|
+
{
|
|
225
|
+
"skipStrings": true,
|
|
226
|
+
"skipComments": true,
|
|
227
|
+
"skipRegExps": true,
|
|
228
|
+
"skipTemplates": true
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"valid-jsdoc": [
|
|
232
|
+
"error",
|
|
233
|
+
{
|
|
234
|
+
"prefer": {
|
|
235
|
+
"arg": "param",
|
|
236
|
+
"argument": "param",
|
|
237
|
+
"class": "constructor",
|
|
238
|
+
"return": "returns",
|
|
239
|
+
"virtual": "abstract"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"no-var": "error",
|
|
244
|
+
"radix": "error"
|
|
245
|
+
},
|
|
246
|
+
"reportUnusedDisableDirectives": true,
|
|
247
|
+
"overrides": [
|
|
248
|
+
{
|
|
249
|
+
"files": [
|
|
250
|
+
"node_modules",
|
|
251
|
+
"dist",
|
|
252
|
+
"public",
|
|
253
|
+
"coverage",
|
|
254
|
+
"test-report"
|
|
255
|
+
],
|
|
256
|
+
"rules": {
|
|
257
|
+
"no-unused-expressions": "off"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-multicolumn-combobox.umd.min.js
|
|
3
|
-
* version :
|
|
3
|
+
* version : 27.1.50
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-grids")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-inputs","@syncfusion/ej2-data","@syncfusion/ej2-popups","@syncfusion/ej2-grids"],e):e((t=t||self).ej={},t.ej2Base,t.ej2Inputs,t.ej2Data,t.ej2Popups,t.ej2Grids)}(this,function(s,g,l,f,i,e){"use strict";o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}))(t,e)};var o,t=function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(n<3?r(s):3<n?r(e,i,s):r(e,i))||s);return 3<n&&s&&Object.defineProperty(e,i,s),s},a="e-icon-anim",n="e-nodata",p="e-disabled",u="e-input-focus",d="e-multicolumn-list",h="e-multicolumn-grid",c=(y.prototype.InjectModules=function(){e.Grid.Inject(e.VirtualScroll,e.Group,e.Edit,e.Sort)},y);function y(){}(b=s.FilterType||(s.FilterType={})).StartsWith="StartsWith",b.EndsWith="EndsWith",b.Contains="Contains",(b=s.SortOrder||(s.SortOrder={})).None="None",b.Ascending="Ascending",b.Descending="Descending",(b=s.SortType||(s.SortType={})).OneColumn="OneColumn",b.MultipleColumns="MultipleColumns",(b=s.WrapMode||(s.WrapMode={})).Both="Both",b.Content="Content",b.Header="Header";m=g.ChildProperty,t(v,m),r([g.Property()],v.prototype,"text",void 0),r([g.Property()],v.prototype,"value",void 0),r([g.Property()],v.prototype,"groupBy",void 0);var m,b=v;function v(){return null!==m&&m.apply(this,arguments)||this}O=g.ChildProperty,t(S,O),r([g.Property("")],S.prototype,"field",void 0),r([g.Property("")],S.prototype,"header",void 0),r([g.Property("")],S.prototype,"width",void 0),r([g.Property("")],S.prototype,"textAlign",void 0),r([g.Property(null)],S.prototype,"format",void 0),r([g.Property(!1)],S.prototype,"displayAsCheckBox",void 0),r([g.Property(null)],S.prototype,"template",void 0),r([g.Property(null)],S.prototype,"headerTemplate",void 0),r([g.Property(null)],S.prototype,"customAttributes",void 0);var O,w=S;function S(){return null!==O&&O.apply(this,arguments)||this}E=g.ChildProperty,t(j,E),r([g.Property(!1)],j.prototype,"enableAltRow",void 0),r([g.Property(null)],j.prototype,"rowHeight",void 0),r([g.Property("Default")],j.prototype,"gridLines",void 0),r([g.Property(!1)],j.prototype,"allowTextWrap",void 0),r([g.Property(s.WrapMode.Both)],j.prototype,"textWrapMode",void 0);var E,C=j;function j(){return null!==E&&E.apply(this,arguments)||this}x=g.Component,t(P,x),P.prototype.preRender=function(){this.element.id||(this.element.id=g.getUniqueID("e-"+this.getModuleName())),this.keyConfigs={escape:"escape",altUp:"alt+uparrow",altDown:"alt+downarrow",tab:"tab",shiftTab:"shift+tab",end:"end",enter:"enter",home:"home",moveDown:"downarrow",moveUp:"uparrow"},this.matchedRowEle=this.matchedContent=null,this.persistData()},P.prototype.getDirective=function(){return"EJS-MULTICOLUMNCOMBOBOX"},P.prototype.getModuleName=function(){return"multicolumncombobox"},P.prototype.getPersistData=function(){return this.addOnPersist(["value"])},P.prototype.persistData=function(){var t;this.enablePersistence&&(this.element.id=this.element.id+"_wrapper",t=window.localStorage.getItem(this.getModuleName()+this.element.id),g.isNullOrUndefined(t)||""===t||this.setProperties(JSON.parse(t),!0))},P.prototype.render=function(){this.renderGrid(),this.renderInput(),this.popupDiv=this.createElement("div",{className:"e-popup-content"}),this.popupDiv.appendChild(this.gridEle),this.setHTMLAttributes(),this.renderPopup(),this.wireEvents()},P.prototype.renderGrid=function(){var i=this,t=this.getGridColumns(),t=(this.gridObj=new e.Grid({dataSource:this.dataSource,columns:t,allowSorting:this.allowSorting,enableStickyHeader:!0,gridLines:this.gridSettings.gridLines,rowHeight:this.gridSettings.rowHeight,enableAltRow:this.gridSettings.enableAltRow,enableVirtualization:this.enableVirtualization,enableRtl:this.enableRtl,editSettings:{allowAdding:!1},query:this.query,allowTextWrap:this.gridSettings.allowTextWrap,textWrapSettings:{wrapMode:this.gridSettings.textWrapMode},height:this.popupHeight,allowMultiSorting:"multiplecolumns"===this.sortType.toString().toLowerCase()&&this.allowSorting,rowTemplate:this.itemTemplate,dataBound:function(){i.onDataBound()},actionFailure:function(t){i.onActionFailure(t)},actionBegin:function(t){i.trigger("actionBegin",t)},actionComplete:function(t){i.trigger("actionComplete",t),"sorting"===t.requestType&&i.updateRowSelection(t);var e=t.rows;i.isDataFiltered&&0<e.length&&""!==i.inputEle.value&&"sorting"!==t.requestType&&i.gridObj.getRows()[0].classList.add("e-row-focus"),i.popupObj.refreshPosition()},keyPressed:function(t){"Enter"===t.key&&(t.cancel=!0,i.isPopupOpen)&&(i.selectedGridRow(i.gridObj.getRows()[i.gridObj.selectedRowIndex],t,!0),i.hidePopup(t),i.focusIn(t)),i.fields.groupBy&&(t.cancel=!0,i.gridKeyActionHandler(t,!0))}}),this.gridEle=this.createElement("div",{id:g.getUniqueID("grid"),className:h}),this.updateGroupByField(),this.sortOrder.toString().toLowerCase());this.gridObj.columns[0].isPrimaryKey=!0,"none"!==t&&(this.gridObj.sortSettings={columns:[{field:this.fields.text,direction:"ascending"===t?s.SortOrder.Ascending:s.SortOrder.Descending}]}),this.gridObj.appendTo(this.gridEle)},P.prototype.isRowMatching=function(t,e,i){t=Object.values(t).map(String);return t.includes(e)&&t.includes(i)},P.prototype.updateRowSelection=function(t){var i=this;t&&t.rows.forEach(function(t){var e=t.data,t=t.index;i.selectDataRow(e,t)})},P.prototype.selectDataRow=function(t,e){this.isRowMatching(t,this.value?this.value.toString():"",this.text?this.text.toString():"")&&(this.gridObj.selectRow(e),t=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.index=e,this.isProtectedOnChange=t)},P.prototype.findIndex=function(t,i){return t.findIndex(function(e){return Object.keys(i).every(function(t){return e[t]===i[t]})})},P.prototype.getGridColumns=function(){var i=this;return this.columns.map(function(t){var e;return t.displayAsCheckBox&&!t.format&&(e="boolean"),{field:t.field,headerText:t.header,width:t.width,textAlign:""===t.textAlign&&i.enableRtl?"Right":t.textAlign,format:t.format,displayAsCheckBox:t.displayAsCheckBox,template:t.template,headerTemplate:t.headerTemplate,customAttributes:t.customAttributes,type:e}})},P.prototype.updateGroupByField=function(){var t;""===this.fields.groupBy||g.isNullOrUndefined(this.fields.groupBy)||("multiplecolumns"!==this.sortType.toString().toLowerCase()&&this.gridEle.classList.add("e-multicolumn-group"),t=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.gridObj.allowGrouping=!0,this.gridObj.groupSettings={showDropArea:!1,columns:[this.fields.groupBy],captionTemplate:this.groupTemplate&&""!==this.fields.groupBy&&!g.isNullOrUndefined(this.fields.groupBy)?this.groupTemplate:"${key}"},this.isVue&&(this.gridObj.isVue=this.isVue),this.isProtectedOnChange=t)},P.prototype.onDataBound=function(){var t=this.dataSource.length,e=this.popupDiv.querySelector("."+h);t<=0&&e?(this.l10nUpdate(),this.popupDiv.removeChild(this.gridEle),g.addClass([this.popupDiv],[n])):this.popupDiv.classList.contains(n)&&1<=t&&(g.removeClass([this.popupDiv],[n]),e=this.popupDiv.querySelector(".e-no-records"))&&this.popupDiv.removeChild(e),this.isInitialRender&&(t=(this.popupDiv.classList.contains(n)?this.popupDiv:this.popupDiv.querySelector(".e-gridcontent tr")).getBoundingClientRect().height,this.popupRowHeight=t,this.popupObj.hide(),this.popupEle.style.visibility="unset",this.isInitialRender=!1)},P.prototype.onActionFailure=function(t){this.trigger("actionFailure",t),this.l10nUpdate(!0),g.addClass([this.popupDiv],[n])},P.prototype.renderInput=function(){"INPUT"===this.element.tagName?(this.inputEle=this.element,g.isNullOrUndefined(this.inputEle.getAttribute("role"))&&this.inputEle.setAttribute("role","combobox"),g.isNullOrUndefined(this.inputEle.getAttribute("type"))&&this.inputEle.setAttribute("type","text"),this.inputEle.setAttribute("aria-expanded","false"),this.inputEle.setAttribute("aria-readOnly",this.readonly.toString()),this.inputEle.setAttribute("aria-disabled",this.disabled.toString()),this.inputEle.setAttribute("autocomplete","off"),this.inputEle.setAttribute("autocapitalize","off"),this.inputEle.setAttribute("spellcheck","false"),this.inputEle.setAttribute("tabindex","0")):(this.inputEle=this.createElement("input",{attrs:{role:"textbox",type:"text"}}),this.element.parentElement.insertBefore(this.inputEle,this.element)),this.inputObj=l.Input.createInput({element:this.inputEle,buttons:["e-input-group-icon e-multicolumn-list-icon e-icons"],floatLabelType:this.floatLabelType,properties:{enabled:!this.disabled,readonly:this.readonly,placeholder:this.placeholder,enableRtl:this.enableRtl,showClearButton:this.showClearButton,cssClass:this.cssClass}},this.createElement),this.inputWrapper=this.inputObj.container,this.inputWrapper.classList.add(d),this.inputWrapper.setAttribute("spellcheck","false"),this.element.tagName===this.getDirective()&&this.element.appendChild(this.inputWrapper),this.setElementWidth(this.width),g.isNullOrUndefined(this.value)&&g.isNullOrUndefined(this.text)&&g.isNullOrUndefined(this.index)||this.initValue(null,null,!0)},P.prototype.setElementWidth=function(t){var e=this.inputWrapper;g.isNullOrUndefined(t)||("number"==typeof t?e.style.width=g.formatUnit(t):"string"==typeof t&&(e.style.width=t.match(/px|%|em/)?t:g.formatUnit(t)))},P.prototype.setHTMLAttributes=function(){if(Object.keys(this.htmlAttributes).length)for(var t=0,e=Object.keys(this.htmlAttributes);t<e.length;t++){var i=e[t];"class"===i?this.inputWrapper.classList.add(this.htmlAttributes[""+i]):"disabled"===i?(this.setProperties({enabled:!1},!0),this.setEnable()):"readonly"===i?(this.setProperties({readonly:!0},!0),this.dataBind()):"style"===i?this.inputWrapper.setAttribute("style",this.htmlAttributes[""+i]):-1<["title","id","placeholder","role","autocomplete","autocapitalize","spellcheck","minlength","maxlength"].indexOf(i)&&"placeholder"===i?l.Input.setPlaceholder(this.htmlAttributes[""+i],this.inputEle):this.inputEle.setAttribute(i,this.htmlAttributes[""+i])}},P.prototype.setEnable=function(){l.Input.setEnabled(!this.disabled,this.inputEle),this.disabled?(this.isPopupOpen&&this.hidePopup(),g.addClass([this.inputWrapper],p),this.inputWrapper&&this.inputWrapper.classList.contains(u)&&g.removeClass([this.inputWrapper],[u]),this.inputEle.setAttribute("aria-disabled","true"),this.inputWrapper.setAttribute("aria-disabled","true")):(g.removeClass([this.inputWrapper],p),this.inputEle.setAttribute("aria-disabled","false"),this.inputWrapper.setAttribute("aria-disabled","false"))},P.prototype.initValue=function(i,o,r){function n(t){t=d.updateCurrentValues(s,t),a=t.currentValue,p=t.currentText,l=t.currentIndex}var s,a,p,l,u,d=this,h=this.gridObj.getSelectedRecords()[0],c=this.gridObj.getSelectedRows()[0],t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=this.value&&this.value.toString(),this.isProtectedOnChange=t;!i&&(!g.isNullOrUndefined(this.value)||!g.isNullOrUndefined(this.text))||i&&void 0!==o?(u=i?o?this.value:this.text:g.isNullOrUndefined(this.value)?this.text:this.value,!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof f.DataManager?this.dataSource.executeQuery(new f.Query).then(function(t){var t=t.result,e=t.filter(function(t){return t[i?o?d.fields.value:d.fields.text:g.isNullOrUndefined(d.value)?d.fields.text:d.fields.value].toString()===u});0<e.length&&(s=e[0],n(t),d.updateChangeEvent(s,h,c,a,p,l,i,r),d.gridObj.selectRow(d.index))}):!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array&&(s=this.dataSource.filter(function(t){return t[i?o?d.fields.value:d.fields.text:g.isNullOrUndefined(d.value)?d.fields.text:d.fields.value].toString()===u})[0],n(this.dataSource))):g.isNullOrUndefined(this.index)||(!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof f.DataManager?this.dataSource.executeQuery(new f.Query).then(function(t){t=t.result;s=t[d.index],n(t),d.updateChangeEvent(s,h,c,a,p,l,i,r),d.gridObj.selectRow(d.index)}):!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array&&(s=this.dataSource[this.index],n(this.dataSource))),this.dataSource instanceof f.DataManager||this.updateChangeEvent(s,h,c,a,p,l,i,r)},P.prototype.updateChangeEvent=function(t,e,i,o,r,n,s,a){t={value:t?t[this.fields.value].toString():null,itemData:{text:r,value:o},item:this.getDataByValue(this.value),previousItemData:e,previousItemElement:i,itemElement:this.inputWrapper,event:null,isInteracted:!s};this.updateValues(o,r,n,t,a)},P.prototype.updateCurrentValues=function(t,e){return g.isNullOrUndefined(t)?{currentValue:null,currentText:null,currentIndex:null}:(l.Input.setValue(t[this.fields.text].toString(),this.inputEle,this.floatLabelType,this.showClearButton),{currentValue:t[this.fields.value].toString(),currentText:t[this.fields.text].toString(),currentIndex:e.indexOf(t)})},P.prototype.renderPopup=function(){this.popupEle=this.createElement("div",{id:this.element.id+"_options",className:d+" e-popup "+(null!==this.cssClass?this.cssClass:"")}),g.attributes(this.popupEle,{"aria-label":this.element.id,role:"dialog"}),document.body.appendChild(this.popupEle),this.createPopup(this.popupEle),g.prepend([this.popupDiv],this.popupEle),this.footerTemplate&&this.setFooterTemplate();var t,e=this.getSize(!1);this.popupEle.style.maxHeight=e,this.footerTemplate&&(this.footer=this.footer||this.popupEle.querySelector(".e-popup-footer"),t=Math.round(this.footer.getBoundingClientRect().height),e=g.formatUnit(parseInt(e,10)-t+"px")),this.popupDiv.style.maxHeight=e,this.updateGridHeight(),this.popupEle.style.visibility="hidden",this.isInitialRender=!0},P.prototype.updateGridHeight=function(t,e,i){e=t?(t=(t=this.gridObj.getContent().querySelector(".e-content")).offsetHeight-t.clientHeight,i=i*this.popupRowHeight,""===this.fields.groupBy||g.isNullOrUndefined(this.fields.groupBy)||(i+=this.popupRowHeight),e&&i<this.prevGridHeight?i+t+"px":this.prevGridHeight+"px"):(this.prevGridHeight=this.popupDiv.getBoundingClientRect().height-this.popupDiv.querySelector(".e-gridheader").getBoundingClientRect().height,this.prevGridHeight+"px"),i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.height=e,this.isProtectedOnChange=i},P.prototype.createPopup=function(t){var e=this;this.popupObj=new i.Popup(t,{width:this.getSize(!0),targetType:"relative",collision:{X:"flip",Y:"flip"},relateTo:this.inputWrapper,enableRtl:this.enableRtl,position:{X:"left",Y:"bottom"},targetExitViewport:function(){g.Browser.isDevice||e.hidePopup()},open:function(){e.inputEle.focus(),e.updateClearIconState()}})},P.prototype.setFooterTemplate=function(){this.footer?this.isReact&&"function"==typeof this.footerTemplate?this.clearTemplate(["footerTemplate"]):this.footer.innerHTML="":(this.footer=this.createElement("div"),g.addClass([this.footer],"e-popup-footer"));var t=this.getTemplateFunction(this.footerTemplate)({count:this.dataSource.length},this,"footerTemplate",this.element.id+"footerTemplate",this.isStringTemplate,void 0,this.footer);t&&(t=Array.prototype.slice.call(t),g.append(t,this.footer)),g.append([this.footer],this.popupEle)},P.prototype.l10nUpdate=function(t){var e,i,o;this.noRecord?this.noRecord.innerHTML="":this.noRecord=this.createElement("div"),"No records found"!==this.noRecordsTemplate||"Request Failed"!==this.actionFailureTemplate?(o=t?this.actionFailureTemplate:this.noRecordsTemplate,e=t?this.element.id+"_actionFailure":this.element.id+"_noRecords",i=t?"actionFailureTemplate":"noRecordsTemplate",(o=this.getTemplateFunction(o)({},this,i,e,this.isStringTemplate,void 0,this.noRecord))&&(o=Array.prototype.slice.call(o),g.append(o,this.noRecord))):(this.l10n=new g.L10n("multicolumncombobox",{noRecordsTemplate:"No records found",actionFailureTemplate:"Request Failed"},this.locale),this.noRecord.innerHTML=t?this.l10n.getConstant("actionFailureTemplate"):this.l10n.getConstant("noRecordsTemplate")),g.addClass([this.noRecord],"e-no-records"),g.prepend([this.noRecord],this.popupDiv),this.popupObj.refreshPosition()},P.prototype.getTemplateFunction=function(e){if("string"!=typeof e)return g.compile(e);var i="";try{var t=g.select(e),i=t?"SCRIPT"===t.tagName?t.innerHTML:t.outerHTML:e}catch(t){i=e}return g.compile(i)},P.prototype.getSize=function(t){var e=t?this.popupWidth:this.popupHeight,i=g.formatUnit(e);return-1<i.indexOf("%")?i=((t?this.inputWrapper.offsetWidth:document.documentElement.clientHeight)*parseFloat(i)/100).toString()+"px":"string"==typeof e&&(i=e.match(/px|em/)?e:i),i},P.prototype.selectedGridRow=function(t,i,o){var r=this,e={isInteracted:!!i,item:this.gridObj.getSelectedRecords()[0],itemElement:t,itemData:this.gridObj.getSelectedRecords()[0],event:i,cancel:!1},n=this.gridObj.getSelectedRecords()[0],s=n?n[this.fields.text].toString():"",a=n?n[this.fields.value].toString():"",p={isInteracted:!!i,item:n,itemElement:t,itemData:{text:s,value:a},event:i,cancel:!1,value:a,previousItemData:{text:this.text,value:this.value},previousItemElement:this.previousItemElement};this.trigger("select",e,function(t){var e;!t.cancel&&t.itemData&&(t=t.itemData,e="Enter"===i.key||"Tab"===i.key||i.shiftKey&&"Tab"===i.key||i.altKey&&"ArrowUp"===i.key,o&&!e||r.updateValues(t[r.fields.value],t[r.fields.text],r.gridObj.selectedRowIndex,p),l.Input.setValue(t[r.fields.text],r.inputEle,r.floatLabelType,r.showClearButton),o&&!e||r.hidePopup(i))})},P.prototype.updateValues=function(t,e,i,o,r){this.previousItemElement=o.itemElement;var n=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.text=e||this.text,this.value=t||this.value,this.index=g.isNullOrUndefined(i)?this.index:i,this.isProtectedOnChange=n,r||this.triggerChangeEvent(o)},P.prototype.triggerChangeEvent=function(t){this.trigger("change",t,function(t){t.cancel})},P.prototype.inputHandler=function(t){var o,r,n,s=this;this.showPopup(null,!0),this.updateClearIconState(),this.allowFiltering&&(o=t.target.value.toLowerCase(),n={preventDefaultAction:r=!1,text:o,updateData:function(t,e,i){n.cancel||(r=!0,s.filterAction(t,o,e,i))},event:t,cancel:!1},this.trigger("filtering",n,function(t){t.cancel||t.preventDefaultAction||r||s.filterAction(s.dataSource,o,s.query,s.fields)})),this.updateInputValue(t.target.value)},P.prototype.updateInputValue=function(e){var i,t,o=this;this.dataSource instanceof f.DataManager?(t=new f.Query,this.dataSource.executeQuery(t).then(function(t){t=t.result;i=t.filter(function(t){return t[o.fields.text].toString().toLowerCase().startsWith(e.toLowerCase())}),o.selectFilteredRows(i)})):Array.isArray(this.dataSource)&&(i=this.dataSource.filter(function(t){return t[o.fields.text].toString().toLowerCase().startsWith(e.toLowerCase())}),this.selectFilteredRows(i))},P.prototype.selectFilteredRows=function(t){0<t.length?this.matchedContent=t[0]:this.matchedContent=null,this.matchedContent?(t=this.findIndex(this.gridObj.currentViewData,this.matchedContent),this.matchedRowEle=this.gridObj.getRowByIndex(t)):this.matchedRowEle=null},P.prototype.filterAction=function(t,i,e,o){var r,n,s,a=this;g.isNullOrUndefined(e)&&g.isNullOrUndefined(o)?this.updateGridDataSource(t):e?new f.DataManager(t).executeQuery(e).then(function(t){r=t.result,a.updateGridDataSource(r)}):(n=this.filterType.toString().toLowerCase(),e=e||new f.Query,t instanceof f.DataManager?t.executeQuery(e).then(function(t){var t=t.result,e=t.length;s=t.filter(function(t){return a.filterData(t,n,i,o)}),a.updateGridDataSource(s,e)}):Array.isArray(t)&&(s=t.filter(function(t){return a.filterData(t,n,i,o)}),this.updateGridDataSource(s)))},P.prototype.filterData=function(t,e,i,o){var r=t[(o||this.fields).text].toString().toLowerCase();switch(e){case"startswith":return r.startsWith(i);case"endswith":return r.endsWith(i);case"contains":return r.includes(i);default:return!1}},P.prototype.updateGridDataSource=function(t,e){var i=!0;0<t.length?(i=(this.dataSource instanceof f.DataManager?e:this.dataSource.length)!==t.length,g.removeClass([this.popupDiv],[n]),(e=this.popupDiv.querySelector(".e-no-records"))&&this.popupDiv.removeChild(e),this.gridObj.dataSource=t,this.isDataFiltered=!0):(this.l10nUpdate(),g.addClass([this.popupDiv],[n])),this.updateGridHeight(!0,i,t.length)},P.prototype.wireEvents=function(){g.isNullOrUndefined(this.inputObj.buttons[0])||(g.EventHandler.add(this.inputObj.buttons[0],"mousedown",this.preventBlur,this),g.EventHandler.add(this.inputObj.buttons[0],"mousedown",this.dropDownClick,this)),g.EventHandler.add(document,"mousedown",this.onDocumentClick,this),g.EventHandler.add(this.gridEle,"click",this.onMouseClick,this),g.EventHandler.add(this.inputEle,"input",this.inputHandler,this),g.EventHandler.add(this.inputEle,"focus",this.focusIn,this),this.showClearButton&&g.EventHandler.add(this.inputObj.clearButton,"mousedown",this.clearText,this),g.EventHandler.add(window,"resize",this.windowResize,this),this.keyboardModule=new g.KeyboardEvents(this.inputWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.keyboardModule=new g.KeyboardEvents(this.gridEle,{keyAction:this.gridKeyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},P.prototype.unWireEvents=function(){g.isNullOrUndefined(this.inputObj.buttons[0])||(g.EventHandler.remove(this.inputObj.buttons[0],"mousedown",this.preventBlur),g.EventHandler.remove(this.inputObj.buttons[0],"mousedown",this.dropDownClick)),g.EventHandler.remove(document,"mousedown",this.onDocumentClick),g.EventHandler.remove(this.inputEle,"input",this.inputHandler),g.EventHandler.remove(this.inputWrapper,"focus",this.focusIn),g.EventHandler.remove(window,"resize",this.windowResize),g.EventHandler.remove(this.gridEle,"click",this.onMouseClick),this.showClearButton&&g.EventHandler.remove(this.inputObj.clearButton,"mousedown",this.clearText),this.keyboardModule&&this.keyboardModule.destroy()},P.prototype.preventBlur=function(t){t.preventDefault()},P.prototype.dropDownClick=function(t){var e;this.disabled||this.readonly||((e=this.gridEle.querySelector(".e-row-focus"))&&e.classList.remove("e-row-focus"),this.isPopupOpen?this.hidePopup(t):this.showPopup(t))},P.prototype.onMouseClick=function(t){var e=t.target,e=g.closest(e,".e-row"),i=this.gridObj.selectedRowIndex;e&&(0<=i?this.selectedGridRow(e,t):(this.gridObj.selectedRowIndex=this.gridObj.getRows().indexOf(e),this.gridObj.selectRow(this.gridObj.selectedRowIndex),this.hidePopup(t)))},P.prototype.onDocumentClick=function(t){var e;this.disabled||this.readonly||!this.isPopupOpen?t.target.closest(".e-multicolumn-list")||this.focusOut():(e=t.target).classList.contains("e-multicolumn-list-icon")||g.closest(e,".e-popup")?t.preventDefault():e.classList.contains("e-multicolumncombobox")||e.classList.contains("e-clear-icon")||this.updateValuesOnInput(t)},P.prototype.updateValuesOnInput=function(t,e,i){var o,r=this,n=t||e;this.hidePopup(n),this.matchedRowEle&&!i?(o=this.isProtectedOnChange,this.isProtectedOnChange=!0,setTimeout(function(){r.inputEle.value=r.matchedContent[r.fields.text].toString(),r.value=r.matchedContent[r.fields.value].toString();var t=r.findIndex(r.gridObj.currentViewData,r.matchedContent);r.index=t,r.text=r.matchedContent[r.fields.text].toString(),r.gridObj.selectRow(t),r.selectedGridRow(r.gridObj.getRowByIndex(t),n),r.previousItemElement=r.gridObj.getSelectedRows()[0]},100),this.isProtectedOnChange=o):this.isDataFiltered&&(this.inputEle.value="",t={value:null,itemData:{text:null,value:null},item:null,previousItemData:{text:this.text,value:this.value},previousItemElement:this.previousItemElement,itemElement:null,event:n,isInteracted:!0,cancel:!1},o=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.text=this.value=this.index=null,this.gridObj.refreshColumns(),this.isProtectedOnChange=o,this.triggerChangeEvent(t),this.isDataFiltered=!1,this.matchedContent=this.matchedRowEle=null)},P.prototype.clearText=function(t){this.isDataFiltered=!0,this.updateValuesOnInput(t,null,!0)},P.prototype.windowResize=function(){this.popupObj&&(this.popupObj.setProperties({width:this.getSize(!0)}),this.popupObj.refreshPosition())},P.prototype.setCssClass=function(t,e){var i=this.popupObj?[this.inputWrapper,this.popupObj.element]:[this.inputWrapper];g.isNullOrUndefined(e)||""===e||g.removeClass(i,e.split(" ")),g.isNullOrUndefined(t)||""===t||g.addClass(i,t.split(" "))},P.prototype.keyActionHandler=function(t){switch(t.action){case"escape":case"altUp":case"shiftTab":case"tab":this.isPopupOpen?this.hidePopup(t):this.focusOut();break;case"altDown":this.isPopupOpen||(this.showPopup(t),this.updateSelectedItem(t,!1));break;case"moveDown":case"moveUp":this.updateSelectedItem(t,!0,!0);break;case"enter":this.updateValuesOnInput(null,t),this.focusIn(t);break;case"home":case"end":this.updateSelectedItem(t)}},P.prototype.gridKeyActionHandler=function(t,e){switch(e&&("ArrowDown"===t.key?t.action="moveDown":"ArrowUp"===t.key?t.action="moveUp":"End"===t.key?t.action="end":"Home"===t.key?t.action="home":"Tab"===t.key?t.action="tab":"Escape"===t.key&&(t.action="escape"),t.shiftKey&&"Tab"===t.key&&(t.action="shiftTab"),t.altKey)&&"ArrowUp"===t.key&&(t.action="altUp"),t.action){case"escape":case"tab":case"shiftTab":case"altUp":this.isPopupOpen&&(t.preventDefault(),"escape"!==t.action&&this.updateSelectedItem(t),this.hidePopup(t));break;case"moveDown":case"moveUp":case"home":case"end":this.updateSelectedItem(t)}},P.prototype.updateSelectedItem=function(t,e,i){var o;void 0===e&&(e=!0),this.isPopupOpen&&(-1===(o=this.fields.groupBy?this.gridObj.selectedRowIndex||0:this.gridObj.selectedRowIndex)&&("moveDown"===t.action||"moveUp"===t.action)||"home"===t.action?o=0:o>=this.gridObj.getRows().length&&"moveDown"===t.action||"end"===t.action?o=this.gridObj.getRows().length-1:"moveDown"===t.action&&0<=o&&o<=this.gridObj.getRows().length&&(this.fields.groupBy||i)?o+=1:("moveUp"===t.action&&0<o&&this.fields.groupBy||i)&&--o,this.gridObj.selectRow(o),this.gridObj.selectedRowIndex=o,(i=this.gridEle.querySelector(".e-row-focus"))&&i.classList.remove("e-row-focus"),e)&&this.selectedGridRow(this.gridObj.getRows()[o],t,!0)},P.prototype.updateClearIconState=function(){var t=this.inputWrapper.querySelector(".e-clear-icon");t&&(t.style.display=""===this.inputEle.value?"none":"flex")},P.prototype.focusIn=function(t){this.disabled||this.readonly||(g.addClass([this.inputWrapper],[u]),this.inputEle.focus(),this.updateClearIconState(),this.trigger("focus",t),"Never"!==this.floatLabelType&&l.Input.calculateWidth(this.inputEle,this.inputWrapper))},P.prototype.focusOut=function(t){this.disabled||this.readonly||(this.isPopupOpen&&this.hidePopup(t),g.removeClass([this.inputWrapper],[u]),(t=this.inputWrapper.querySelector(".e-clear-icon"))&&(t.style.display="none"),"Never"!==this.floatLabelType&&l.Input.calculateWidth(this.inputEle,this.inputWrapper))},P.prototype.showPopup=function(o,r){var n=this,t={popup:this.popupObj,event:o,cancel:!1,animation:{name:"FadeIn",duration:100}};this.trigger("open",t,function(t){var e,i;t.cancel||n.isPopupOpen||(n.isPopupOpen=!0,n.popupObj.refreshPosition(),g.addClass([n.inputWrapper],[a]),g.attributes(n.inputEle,{"aria-expanded":"true","aria-owns":n.element.id+"_popup","aria-controls":n.element.id}),r||((n.value||n.text||n.index)&&n.gridObj.currentViewData.forEach(function(t,e){n.selectDataRow(t,e)}),n.focusIn(o)),(e=n.gridObj.getContent())&&((i=e.querySelector(".e-rowcell.e-active"))?n.inputEle.setAttribute("aria-activedescendant",i.parentElement.getAttribute("data-uid")):e.querySelector(".e-row")&&n.inputEle.setAttribute("aria-activedescendant",e.querySelector(".e-row").getAttribute("data-uid"))),n.popupObj.show(new g.Animation(t.animation),n.popupEle))})},P.prototype.hidePopup=function(e){var i=this,t={popup:this.popupObj,event:e||null,cancel:!1,animation:{name:"FadeOut",duration:100}};this.trigger("close",t,function(t){t.cancel||(i.isPopupOpen=!1,g.removeClass([i.inputWrapper],[a]),g.attributes(i.inputEle,{"aria-expanded":"false"}),i.popupObj.hide(new g.Animation(t.animation)),i.inputEle.value=i.text?i.text.toString():"",e&&((t=e.target)&&(t.classList.contains("e-multicolumn-list-icon")||t.classList.contains("e-rowcell"))?(i.value||i.gridObj.refreshColumns(),setTimeout(function(){i.focusIn(e)})):i.focusOut()),i.inputEle.removeAttribute("aria-owns"),i.inputEle.removeAttribute("aria-activedescendant"))}),setTimeout(function(){i.gridObj&&(i.gridObj.dataSource=i.dataSource,i.updateGridHeight(!0,!1))},100)},P.prototype.addItems=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.editSettings.allowAdding=!0,this.gridObj.dataBind(),this.isProtectedOnChange=i,this.gridObj.addRecord(t,e)},P.prototype.getItems=function(){return this.gridObj.getDataRows()},P.prototype.getDataByValue=function(e){var i=this;return!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array?this.dataSource.filter(function(t){return t[i.fields.value].toString()===e})[0]:(!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof f.DataManager&&this.dataSource.executeQuery(new f.Query).then(function(t){return t.result.filter(function(t){return t[i.fields.value].toString()===e})[0]}),null)},P.prototype.destroy=function(){if(this.unWireEvents(),this.gridObj&&(this.gridObj.destroy(),g.detach(this.gridObj.element)),this.inputEle){for(var t=["placeholder","aria-expanded","spellcheck","aria-label","role","type","aria-owns","aria-controls","aria-readonly","autocomplete","autocapitalize","spellcheck","aria-activedescendant"],e=0;e<t.length;e++)this.inputEle.removeAttribute(t[e]);this.inputEle.classList.remove("e-input"),l.Input.setValue("",this.inputEle,this.floatLabelType,this.showClearButton)}this.popupEle&&(this.popupEle.removeAttribute("aria-label"),this.popupEle.removeAttribute("role")),this.popupObj&&(this.popupObj.destroy(),g.detach(this.popupObj.element)),this.element.tagName!==this.getDirective()&&this.inputWrapper.parentElement.insertBefore(this.element,this.inputWrapper),this.inputObj&&(g.detach(this.inputObj.container),this.inputObj=null),l.Input.destroy({element:this.inputEle,floatLabelType:this.floatLabelType,properties:this.properties}),g.detach(this.inputWrapper),g.detach(this.popupDiv),this.inputEle=null,this.previousItemElement=null,this.inputWrapper.innerHTML="",this.inputWrapper=null,this.popupDiv=null,this.popupObj=null,this.gridObj=null,this.gridEle=null,this.popupEle=null,this.footer=null,this.noRecord=null,x.prototype.destroy.call(this)},P.prototype.onPropertyChanged=function(t,e){for(var i=0,o=Object.keys(t);i<o.length;i++){var r,n=o[i];switch(n){case"width":case"popupWidth":"width"===n&&this.setElementWidth(t.width),this.popupObj&&(this.popupObj.element.style.width=this.getSize(!0));break;case"popupHeight":this.popupObj&&(r=this.getSize(!1),this.popupObj.element.style.maxHeight=r,this.popupDiv.style.maxHeight=r,this.gridObj.height=r);break;case"placeholder":l.Input.setPlaceholder(t.placeholder,this.inputEle);break;case"readonly":l.Input.setReadonly(this.readonly,this.inputEle);break;case"disabled":l.Input.setEnabled(!this.disabled,this.inputEle),this.setEnable();break;case"cssClass":this.setCssClass(t.cssClass,e.cssClass);break;case"floatLabelType":l.Input.removeFloating(this.inputObj),l.Input.addFloating(this.inputEle,this.floatLabelType,this.placeholder);break;case"showClearButton":l.Input.setClearButton(t.showClearButton,this.inputEle,this.inputObj);break;case"value":this.initValue(!0,!0);break;case"text":this.initValue(!0,!1);break;case"index":this.initValue();break;case"sortOrder":this.gridObj&&(this.gridObj.sortSettings.columns=[{field:this.fields.text,direction:t.sortOrder===s.SortOrder.Ascending?s.SortOrder.Ascending:s.SortOrder.Descending}]);break;case"htmlAttributes":this.setHTMLAttributes();break;case"noRecordsTemplate":this.l10nUpdate();break;case"actionFailureTemplate":this.l10nUpdate(!0);break;case"footerTemplate":this.setFooterTemplate();break;case"itemTemplate":this.gridObj&&(this.gridObj.rowTemplate=t.itemTemplate);break;case"groupTemplate":this.groupTemplate=t.groupTemplate,this.updateGroupByField();break;case"enableRtl":this.gridObj&&this.popupObj&&(this.gridObj.enableRtl=t.enableRtl,l.Input.setEnableRtl(t.enableRtl,[this.inputWrapper]),this.popupObj.enableRtl=t.enableRtl);break;case"dataSource":this.gridObj&&(this.gridObj.dataSource=t.dataSource);break;case"query":this.gridObj&&(this.gridObj.query=t.query);break;case"gridSettings":this.gridObj&&(this.gridObj.gridLines=t.gridSettings.gridLines,this.gridObj.rowHeight=t.gridSettings.rowHeight,this.gridObj.enableAltRow=t.gridSettings.enableAltRow,g.isNullOrUndefined(t.gridSettings.allowTextWrap)||(this.gridObj.allowTextWrap=t.gridSettings.allowTextWrap),g.isNullOrUndefined(t.gridSettings.textWrapMode)||(this.gridObj.textWrapSettings.wrapMode=t.gridSettings.textWrapMode));break;case"fields":this.fields=t.fields,this.updateGroupByField();break;case"filterType":this.filterType=t.filterType;break;case"enableVirtualization":this.gridObj&&(this.enableVirtualization=this.gridObj.enableVirtualization=t.enableVirtualization);break;case"sortType":this.sortType=t.sortType;break;case"allowFiltering":this.allowFiltering=t.allowFiltering;break;case"allowSorting":this.gridObj&&(this.allowSorting=this.gridObj.allowSorting=t.allowSorting);break;case"columns":this.gridObj&&(r=this.getGridColumns(),this.gridObj.columns=r)}}},r([g.Property([])],P.prototype,"dataSource",void 0),r([g.Property(null)],P.prototype,"text",void 0),r([g.Property(null)],P.prototype,"value",void 0),r([g.Property(null)],P.prototype,"index",void 0),r([g.Property("100%")],P.prototype,"width",void 0),r([g.Property("300px")],P.prototype,"popupHeight",void 0),r([g.Property("100%")],P.prototype,"popupWidth",void 0),r([g.Property(null)],P.prototype,"placeholder",void 0),r([g.Property(!0)],P.prototype,"allowFiltering",void 0),r([g.Property(!0)],P.prototype,"allowSorting",void 0),r([g.Property(!1)],P.prototype,"showClearButton",void 0),r([g.Property("")],P.prototype,"cssClass",void 0),r([g.Complex({text:null,value:null,groupBy:null},b)],P.prototype,"fields",void 0),r([g.Collection([],w)],P.prototype,"columns",void 0),r([g.Complex({},C)],P.prototype,"gridSettings",void 0),r([g.Property(s.FilterType.StartsWith)],P.prototype,"filterType",void 0),r([g.Property("Never")],P.prototype,"floatLabelType",void 0),r([g.Property(s.SortOrder.None)],P.prototype,"sortOrder",void 0),r([g.Property(s.SortType.OneColumn)],P.prototype,"sortType",void 0),r([g.Property(!1)],P.prototype,"enableVirtualization",void 0),r([g.Property(!1)],P.prototype,"disabled",void 0),r([g.Property(!1)],P.prototype,"readonly",void 0),r([g.Property(!1)],P.prototype,"enablePersistence",void 0),r([g.Property()],P.prototype,"query",void 0),r([g.Property(null)],P.prototype,"itemTemplate",void 0),r([g.Property(null)],P.prototype,"footerTemplate",void 0),r([g.Property(null)],P.prototype,"groupTemplate",void 0),r([g.Property("Request Failed")],P.prototype,"actionFailureTemplate",void 0),r([g.Property("No records found")],P.prototype,"noRecordsTemplate",void 0),r([g.Property({})],P.prototype,"htmlAttributes",void 0),r([g.Event()],P.prototype,"created",void 0),r([g.Event()],P.prototype,"open",void 0),r([g.Event()],P.prototype,"close",void 0),r([g.Event()],P.prototype,"actionFailure",void 0),r([g.Event()],P.prototype,"actionBegin",void 0),r([g.Event()],P.prototype,"actionComplete",void 0),r([g.Event()],P.prototype,"filtering",void 0),r([g.Event()],P.prototype,"select",void 0),r([g.Event()],P.prototype,"change",void 0);var x,t=r([g.NotifyPropertyChanges],P);function P(t,e){t=x.call(this,t,e)||this;return t.gridInject=new c,t.gridInject.InjectModules(),t}Object.defineProperty(s,"Edit",{enumerable:!0,get:function(){return e.Edit}}),Object.defineProperty(s,"Group",{enumerable:!0,get:function(){return e.Group}}),Object.defineProperty(s,"Sort",{enumerable:!0,get:function(){return e.Sort}}),Object.defineProperty(s,"VirtualScroll",{enumerable:!0,get:function(){return e.VirtualScroll}}),s.Column=w,s.FieldSettings=b,s.GridSettings=C,s.MultiColumnComboBox=t,s.MultiColumnGrid=c,Object.defineProperty(s,"__esModule",{value:!0})});
|
|
10
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-grids")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-inputs","@syncfusion/ej2-data","@syncfusion/ej2-popups","@syncfusion/ej2-grids"],e):e((t=t||self).ej={},t.ej2Base,t.ej2Inputs,t.ej2Data,t.ej2Popups,t.ej2Grids)}(this,function(s,g,p,f,i,e){"use strict";o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}))(t,e)};var o,t=function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(n<3?r(s):3<n?r(e,i,s):r(e,i))||s);return 3<n&&s&&Object.defineProperty(e,i,s),s},a="e-icon-anim",n="e-nodata",l="e-disabled",u="e-input-focus",d="e-multicolumn-list",h="e-multicolumn-grid",c=(y.prototype.InjectModules=function(){e.Grid.Inject(e.VirtualScroll,e.Group,e.Edit,e.Sort)},y);function y(){}(b=s.FilterType||(s.FilterType={})).StartsWith="StartsWith",b.EndsWith="EndsWith",b.Contains="Contains",(b=s.SortOrder||(s.SortOrder={})).None="None",b.Ascending="Ascending",b.Descending="Descending",(b=s.SortType||(s.SortType={})).OneColumn="OneColumn",b.MultipleColumns="MultipleColumns",(b=s.WrapMode||(s.WrapMode={})).Both="Both",b.Content="Content",b.Header="Header";m=g.ChildProperty,t(v,m),r([g.Property()],v.prototype,"text",void 0),r([g.Property()],v.prototype,"value",void 0),r([g.Property()],v.prototype,"groupBy",void 0);var m,b=v;function v(){return null!==m&&m.apply(this,arguments)||this}O=g.ChildProperty,t(S,O),r([g.Property("")],S.prototype,"field",void 0),r([g.Property("")],S.prototype,"header",void 0),r([g.Property("")],S.prototype,"width",void 0),r([g.Property("")],S.prototype,"textAlign",void 0),r([g.Property(null)],S.prototype,"format",void 0),r([g.Property(!1)],S.prototype,"displayAsCheckBox",void 0),r([g.Property(null)],S.prototype,"template",void 0),r([g.Property(null)],S.prototype,"headerTemplate",void 0),r([g.Property(null)],S.prototype,"customAttributes",void 0);var O,w=S;function S(){return null!==O&&O.apply(this,arguments)||this}E=g.ChildProperty,t(j,E),r([g.Property(!1)],j.prototype,"enableAltRow",void 0),r([g.Property(null)],j.prototype,"rowHeight",void 0),r([g.Property("Default")],j.prototype,"gridLines",void 0),r([g.Property(!1)],j.prototype,"allowTextWrap",void 0),r([g.Property(s.WrapMode.Both)],j.prototype,"textWrapMode",void 0);var E,C=j;function j(){return null!==E&&E.apply(this,arguments)||this}x=g.Component,t(P,x),P.prototype.preRender=function(){this.element.id||(this.element.id=g.getUniqueID("e-"+this.getModuleName())),this.keyConfigs={escape:"escape",altUp:"alt+uparrow",altDown:"alt+downarrow",tab:"tab",shiftTab:"shift+tab",end:"end",enter:"enter",home:"home",moveDown:"downarrow",moveUp:"uparrow"},this.matchedRowEle=this.matchedContent=null,this.persistData()},P.prototype.getDirective=function(){return"EJS-MULTICOLUMNCOMBOBOX"},P.prototype.getModuleName=function(){return"multicolumncombobox"},P.prototype.getPersistData=function(){return this.addOnPersist(["value"])},P.prototype.persistData=function(){var t;this.enablePersistence&&(this.element.id=this.element.id+"_wrapper",t=window.localStorage.getItem(this.getModuleName()+this.element.id),g.isNullOrUndefined(t)||""===t||this.setProperties(JSON.parse(t),!0))},P.prototype.render=function(){this.renderGrid(),this.renderInput(),this.popupDiv=this.createElement("div",{className:"e-popup-content"}),this.popupDiv.appendChild(this.gridEle),this.setHTMLAttributes(),this.renderPopup(),this.wireEvents()},P.prototype.renderGrid=function(){var i=this,t=this.getGridColumns(),t=(this.gridObj=new e.Grid({dataSource:this.dataSource,columns:t,allowSorting:this.allowSorting,enableStickyHeader:!0,gridLines:this.gridSettings.gridLines,rowHeight:this.gridSettings.rowHeight,enableAltRow:this.gridSettings.enableAltRow,enableVirtualization:this.enableVirtualization,enableRtl:this.enableRtl,editSettings:{allowAdding:!1},query:this.query,allowTextWrap:this.gridSettings.allowTextWrap,textWrapSettings:{wrapMode:this.gridSettings.textWrapMode},height:this.popupHeight,allowMultiSorting:"multiplecolumns"===this.sortType.toString().toLowerCase()&&this.allowSorting,rowTemplate:this.itemTemplate,dataBound:function(){i.onDataBound()},actionFailure:function(t){i.onActionFailure(t)},actionBegin:function(t){i.trigger("actionBegin",t)},actionComplete:function(t){i.trigger("actionComplete",t),"sorting"===t.requestType&&i.updateRowSelection(t);var e=t.rows;i.isDataFiltered&&0<e.length&&""!==i.inputEle.value&&"sorting"!==t.requestType&&i.gridObj.getRows()[0].classList.add("e-row-focus"),i.popupObj.refreshPosition()},keyPressed:function(t){"Enter"===t.key&&(t.cancel=!0,i.isPopupOpen)&&(i.selectedGridRow(i.gridObj.getRows()[i.gridObj.selectedRowIndex],t,!0),i.hidePopup(t),i.focusIn(t)),i.fields.groupBy&&(t.cancel=!0,i.gridKeyActionHandler(t,!0))}}),this.gridEle=this.createElement("div",{id:g.getUniqueID("grid"),className:h}),this.updateGroupByField(),this.sortOrder.toString().toLowerCase());this.gridObj.columns[0].isPrimaryKey=!0,"none"!==t&&(this.gridObj.sortSettings={columns:[{field:this.fields.text,direction:"ascending"===t?s.SortOrder.Ascending:s.SortOrder.Descending}]}),this.gridObj.appendTo(this.gridEle)},P.prototype.isRowMatching=function(t,e,i){t=Object.values(t).map(String);return t.includes(e)&&t.includes(i)},P.prototype.updateRowSelection=function(t){var i=this;t&&t.rows.forEach(function(t){var e=t.data,t=t.index;i.selectDataRow(e,t)})},P.prototype.selectDataRow=function(t,e){this.isRowMatching(t,this.value?this.value.toString():"",this.text?this.text.toString():"")&&(this.gridObj.selectRow(e),t=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.index=e,this.isProtectedOnChange=t)},P.prototype.findIndex=function(t,i){return t.findIndex(function(e){return Object.keys(i).every(function(t){return e[t]===i[t]})})},P.prototype.getGridColumns=function(){var i=this;return this.columns.map(function(t){var e;return t.displayAsCheckBox&&!t.format&&(e="boolean"),{field:t.field,headerText:t.header,width:t.width,textAlign:""===t.textAlign&&i.enableRtl?"Right":t.textAlign,format:t.format,displayAsCheckBox:t.displayAsCheckBox,template:t.template,headerTemplate:t.headerTemplate,customAttributes:t.customAttributes,type:e}})},P.prototype.updateGroupByField=function(){var t;""===this.fields.groupBy||g.isNullOrUndefined(this.fields.groupBy)||("multiplecolumns"!==this.sortType.toString().toLowerCase()&&this.gridEle.classList.add("e-multicolumn-group"),t=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.gridObj.allowGrouping=!0,this.gridObj.groupSettings={showDropArea:!1,columns:[this.fields.groupBy],captionTemplate:this.groupTemplate&&""!==this.fields.groupBy&&!g.isNullOrUndefined(this.fields.groupBy)?this.groupTemplate:"${key}"},this.isVue&&(this.gridObj.isVue=this.isVue),this.isProtectedOnChange=t)},P.prototype.onDataBound=function(){var t=this.dataSource.length,e=this.popupDiv.querySelector("."+h);t<=0&&e?(this.l10nUpdate(),this.popupDiv.removeChild(this.gridEle),g.addClass([this.popupDiv],[n])):this.popupDiv.classList.contains(n)&&1<=t&&(g.removeClass([this.popupDiv],[n]),e=this.popupDiv.querySelector(".e-no-records"))&&this.popupDiv.removeChild(e),this.isInitialRender&&(t=this.popupDiv.classList.contains(n)?this.popupDiv.getBoundingClientRect().height:this.popupDiv.querySelector(".e-gridcontent tr")?this.popupDiv.querySelector(".e-gridcontent tr").getBoundingClientRect().height:0,this.popupRowHeight=t,this.popupObj.hide(),this.popupEle.style.visibility="unset",this.isInitialRender=!1)},P.prototype.onActionFailure=function(t){this.trigger("actionFailure",t),this.l10nUpdate(!0),g.addClass([this.popupDiv],[n])},P.prototype.renderInput=function(){"INPUT"===this.element.tagName?(this.inputEle=this.element,g.isNullOrUndefined(this.inputEle.getAttribute("role"))&&this.inputEle.setAttribute("role","combobox"),g.isNullOrUndefined(this.inputEle.getAttribute("type"))&&this.inputEle.setAttribute("type","text"),this.inputEle.setAttribute("aria-expanded","false"),this.inputEle.setAttribute("aria-readOnly",this.readonly.toString()),this.inputEle.setAttribute("aria-disabled",this.disabled.toString()),this.inputEle.setAttribute("autocomplete","off"),this.inputEle.setAttribute("autocapitalize","off"),this.inputEle.setAttribute("spellcheck","false"),this.inputEle.setAttribute("tabindex","0")):(this.inputEle=this.createElement("input",{attrs:{role:"textbox",type:"text"}}),this.element.parentElement.insertBefore(this.inputEle,this.element)),this.inputObj=p.Input.createInput({element:this.inputEle,buttons:["e-input-group-icon e-multicolumn-list-icon e-icons"],floatLabelType:this.floatLabelType,properties:{enabled:!this.disabled,readonly:this.readonly,placeholder:this.placeholder,enableRtl:this.enableRtl,showClearButton:this.showClearButton,cssClass:this.cssClass}},this.createElement),this.inputWrapper=this.inputObj.container,this.inputWrapper.classList.add(d),this.inputWrapper.setAttribute("spellcheck","false"),this.element.tagName===this.getDirective()&&this.element.appendChild(this.inputWrapper),this.setElementWidth(this.width),g.isNullOrUndefined(this.value)&&g.isNullOrUndefined(this.text)&&g.isNullOrUndefined(this.index)||this.initValue(null,null,!0)},P.prototype.setElementWidth=function(t){var e=this.inputWrapper;g.isNullOrUndefined(t)||("number"==typeof t?e.style.width=g.formatUnit(t):"string"==typeof t&&(e.style.width=t.match(/px|%|em/)?t:g.formatUnit(t)))},P.prototype.setHTMLAttributes=function(){if(Object.keys(this.htmlAttributes).length)for(var t=0,e=Object.keys(this.htmlAttributes);t<e.length;t++){var i=e[t];"class"===i?this.inputWrapper.classList.add(this.htmlAttributes[""+i]):"disabled"===i?(this.setProperties({enabled:!1},!0),this.setEnable()):"readonly"===i?(this.setProperties({readonly:!0},!0),this.dataBind()):"style"===i?this.inputWrapper.setAttribute("style",this.htmlAttributes[""+i]):-1<["title","id","placeholder","role","autocomplete","autocapitalize","spellcheck","minlength","maxlength"].indexOf(i)&&"placeholder"===i?p.Input.setPlaceholder(this.htmlAttributes[""+i],this.inputEle):this.inputEle.setAttribute(i,this.htmlAttributes[""+i])}},P.prototype.setEnable=function(){p.Input.setEnabled(!this.disabled,this.inputEle),this.disabled?(this.isPopupOpen&&this.hidePopup(),g.addClass([this.inputWrapper],l),this.inputWrapper&&this.inputWrapper.classList.contains(u)&&g.removeClass([this.inputWrapper],[u]),this.inputEle.setAttribute("aria-disabled","true"),this.inputWrapper.setAttribute("aria-disabled","true")):(g.removeClass([this.inputWrapper],l),this.inputEle.setAttribute("aria-disabled","false"),this.inputWrapper.setAttribute("aria-disabled","false"))},P.prototype.initValue=function(r,i,n){function s(t){t=d.updateCurrentValues(a,t),l=t.currentValue,p=t.currentText,u=t.currentIndex}var a,l,p,u,o,d=this,h=this.gridObj.getSelectedRecords()[0],c=this.gridObj.getSelectedRows()[0],t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=this.value&&this.value.toString(),this.isProtectedOnChange=t;!r&&(!g.isNullOrUndefined(this.value)||!g.isNullOrUndefined(this.text))||r&&void 0!==i?(o=r?i?this.value:this.text:g.isNullOrUndefined(this.value)?this.text:this.value,!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof f.DataManager?this.dataSource.executeQuery(new f.Query).then(function(t){var t=t.result,e=t.filter(function(t){return t[r?i?d.fields.value:d.fields.text:g.isNullOrUndefined(d.value)?d.fields.text:d.fields.value].toString()===o});0<e.length&&(a=e[0],s(t),d.updateChangeEvent(a,h,c,l,p,u,r,n),d.gridObj.selectRow(d.index))}):!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array&&(a=this.dataSource.filter(function(t){return t[r?i?d.fields.value:d.fields.text:g.isNullOrUndefined(d.value)?d.fields.text:d.fields.value].toString()===o})[0],s(this.dataSource))):g.isNullOrUndefined(this.index)||(!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof f.DataManager?this.dataSource.executeQuery(new f.Query).then(function(t){t=t.result;a=t[d.index],s(t),d.updateChangeEvent(a,h,c,l,p,u,r,n),d.gridObj.selectRow(d.index)}):!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array&&(this.fields.groupBy?setTimeout(function(){var t=d.gridObj.getRows();if(t&&0<t.length)for(var e=d.gridObj.getRowInfo(t[d.index]).rowData,i=d.fields.value,o=0;o<t.length;o++)if(e&&e[parseInt(i.toString(),10)]===d.dataSource[parseInt(o.toString(),10)][parseInt(i.toString(),10)]){a=e,s(d.dataSource),d.updateChangeEvent(a,h,c,l,p,u,r,n),d.gridObj.selectRow(d.index);break}}):(a=this.dataSource[this.index],s(this.dataSource)))),this.dataSource instanceof f.DataManager||this.updateChangeEvent(a,h,c,l,p,u,r,n)},P.prototype.updateChangeEvent=function(t,e,i,o,r,n,s,a){t={value:t?t[this.fields.value].toString():null,itemData:{text:r,value:o},item:this.getDataByValue(this.value),previousItemData:e,previousItemElement:i,itemElement:this.inputWrapper,event:null,isInteracted:!s};this.updateValues(o,r,n,t,a)},P.prototype.updateCurrentValues=function(t,e){return g.isNullOrUndefined(t)?{currentValue:null,currentText:null,currentIndex:null}:(p.Input.setValue(t[this.fields.text].toString(),this.inputEle,this.floatLabelType,this.showClearButton),{currentValue:t[this.fields.value].toString(),currentText:t[this.fields.text].toString(),currentIndex:e.indexOf(t)})},P.prototype.renderPopup=function(){this.popupEle=this.createElement("div",{id:this.element.id+"_options",className:d+" e-popup "+(null!==this.cssClass?this.cssClass:"")}),g.attributes(this.popupEle,{"aria-label":this.element.id,role:"dialog"}),document.body.appendChild(this.popupEle),this.createPopup(this.popupEle),g.prepend([this.popupDiv],this.popupEle),this.footerTemplate&&this.setFooterTemplate();var t,e=this.getSize(!1);this.popupEle.style.maxHeight=e,this.footerTemplate&&(this.footer=this.footer||this.popupEle.querySelector(".e-popup-footer"),t=Math.round(this.footer.getBoundingClientRect().height),e=g.formatUnit(parseInt(e,10)-t+"px")),this.popupDiv.style.maxHeight=e,this.updateGridHeight(),this.popupEle.style.visibility="hidden",this.isInitialRender=!0},P.prototype.updateGridHeight=function(t,e,i){e=t?(t=(t=this.gridObj.getContent().querySelector(".e-content")).offsetHeight-t.clientHeight,i=i*this.popupRowHeight,""===this.fields.groupBy||g.isNullOrUndefined(this.fields.groupBy)||(i+=this.popupRowHeight),e&&i<this.prevGridHeight?i+t+"px":this.prevGridHeight+"px"):(this.prevGridHeight=this.popupDiv.getBoundingClientRect().height-this.popupDiv.querySelector(".e-gridheader").getBoundingClientRect().height,this.prevGridHeight+"px"),i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.height=e,this.isProtectedOnChange=i},P.prototype.createPopup=function(t){var e=this;this.popupObj=new i.Popup(t,{width:this.getSize(!0),targetType:"relative",collision:{X:"flip",Y:"flip"},relateTo:this.inputWrapper,enableRtl:this.enableRtl,position:{X:"left",Y:"bottom"},targetExitViewport:function(){g.Browser.isDevice||e.hidePopup()},open:function(){e.inputEle.focus(),e.updateClearIconState()}})},P.prototype.setFooterTemplate=function(){this.footer?this.isReact&&"function"==typeof this.footerTemplate?this.clearTemplate(["footerTemplate"]):this.footer.innerHTML="":(this.footer=this.createElement("div"),g.addClass([this.footer],"e-popup-footer"));var t=this.getTemplateFunction(this.footerTemplate)({count:this.dataSource.length},this,"footerTemplate",this.element.id+"footerTemplate",this.isStringTemplate,void 0,this.footer);t&&(t=Array.prototype.slice.call(t),g.append(t,this.footer)),g.append([this.footer],this.popupEle)},P.prototype.l10nUpdate=function(t){var e,i,o;this.noRecord?this.noRecord.innerHTML="":this.noRecord=this.createElement("div"),"No records found"!==this.noRecordsTemplate||"Request Failed"!==this.actionFailureTemplate?(o=t?this.actionFailureTemplate:this.noRecordsTemplate,e=t?this.element.id+"_actionFailure":this.element.id+"_noRecords",i=t?"actionFailureTemplate":"noRecordsTemplate",(o=this.getTemplateFunction(o)({},this,i,e,this.isStringTemplate,void 0,this.noRecord))&&(o=Array.prototype.slice.call(o),g.append(o,this.noRecord))):(this.l10n=new g.L10n("multicolumncombobox",{noRecordsTemplate:"No records found",actionFailureTemplate:"Request Failed"},this.locale),this.noRecord.innerHTML=t?this.l10n.getConstant("actionFailureTemplate"):this.l10n.getConstant("noRecordsTemplate")),g.addClass([this.noRecord],"e-no-records"),g.prepend([this.noRecord],this.popupDiv),this.popupObj.refreshPosition()},P.prototype.getTemplateFunction=function(e){if("string"!=typeof e)return g.compile(e);var i="";try{var t=g.select(e),i=t?"SCRIPT"===t.tagName?t.innerHTML:t.outerHTML:e}catch(t){i=e}return g.compile(i)},P.prototype.getSize=function(t){var e=t?this.popupWidth:this.popupHeight,i=g.formatUnit(e);return-1<i.indexOf("%")?i=((t?this.inputWrapper.offsetWidth:document.documentElement.clientHeight)*parseFloat(i)/100).toString()+"px":"string"==typeof e&&(i=e.match(/px|em/)?e:i),i},P.prototype.selectedGridRow=function(t,i,o){var r=this,e={isInteracted:!!i,item:this.gridObj.getSelectedRecords()[0],itemElement:t,itemData:this.gridObj.getSelectedRecords()[0],event:i,cancel:!1},n=this.gridObj.getSelectedRecords()[0],s=n?n[this.fields.text].toString():"",a=n?n[this.fields.value].toString():"",l={isInteracted:!!i,item:n,itemElement:t,itemData:{text:s,value:a},event:i,cancel:!1,value:a,previousItemData:{text:this.text,value:this.value},previousItemElement:this.previousItemElement};this.trigger("select",e,function(t){var e;!t.cancel&&t.itemData&&(t=t.itemData,e="Enter"===i.key||"Tab"===i.key||i.shiftKey&&"Tab"===i.key||i.altKey&&"ArrowUp"===i.key,o&&!e||r.updateValues(t[r.fields.value],t[r.fields.text],r.gridObj.selectedRowIndex,l),p.Input.setValue(t[r.fields.text],r.inputEle,r.floatLabelType,r.showClearButton),o&&!e||r.hidePopup(i))})},P.prototype.updateValues=function(t,e,i,o,r){this.previousItemElement=o.itemElement;var n=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.text=e||this.text,this.value=t||this.value,this.index=g.isNullOrUndefined(i)?this.index:i,this.isProtectedOnChange=n,r||this.triggerChangeEvent(o)},P.prototype.triggerChangeEvent=function(t){this.trigger("change",t,function(t){t.cancel})},P.prototype.inputHandler=function(t){var o,r,n,s=this;this.showPopup(null,!0),this.updateClearIconState(),this.allowFiltering&&(o=t.target.value.toLowerCase(),n={preventDefaultAction:r=!1,text:o,updateData:function(t,e,i){n.cancel||(r=!0,s.filterAction(t,o,e,i))},event:t,cancel:!1},this.trigger("filtering",n,function(t){t.cancel||t.preventDefaultAction||r||s.filterAction(s.dataSource,o,s.query,s.fields)})),this.updateInputValue(t.target.value)},P.prototype.updateInputValue=function(e){var i,t,o=this;this.dataSource instanceof f.DataManager?(t=new f.Query,this.dataSource.executeQuery(t).then(function(t){t=t.result;i=t.filter(function(t){return t[o.fields.text].toString().toLowerCase().startsWith(e.toLowerCase())}),o.selectFilteredRows(i)})):Array.isArray(this.dataSource)&&(i=this.dataSource.filter(function(t){return t[o.fields.text].toString().toLowerCase().startsWith(e.toLowerCase())}),this.selectFilteredRows(i))},P.prototype.selectFilteredRows=function(t){0<t.length?this.matchedContent=t[0]:this.matchedContent=null,this.matchedContent?(t=this.findIndex(this.gridObj.currentViewData,this.matchedContent),this.matchedRowEle=this.gridObj.getRowByIndex(t)):this.matchedRowEle=null},P.prototype.filterAction=function(t,e,i,o){var r,n=this;g.isNullOrUndefined(i)&&g.isNullOrUndefined(o)?this.updateGridDataSource(t):i?t instanceof f.DataManager?this.filteringHandler(t,e,i,o):new f.DataManager(t).executeQuery(i).then(function(t){t=t.result;n.updateGridDataSource(t)}):(i=i||new f.Query,t instanceof f.DataManager?this.filteringHandler(t,e,i,o):Array.isArray(t)&&(r=this.filterType.toString().toLowerCase(),i=t.filter(function(t){return n.filterData(t,r,e,o)}),this.updateGridDataSource(i)))},P.prototype.filteringHandler=function(t,i,e,o){var r,n=this,s=this.filterType.toString().toLowerCase();t.executeQuery(e).then(function(t){var t=t.result,e=t.length;r=t.filter(function(t){return n.filterData(t,s,i,o)}),n.updateGridDataSource(r,e)})},P.prototype.filterData=function(t,e,i,o){var r=t[(o||this.fields).text].toString().toLowerCase();switch(e){case"startswith":return r.startsWith(i);case"endswith":return r.endsWith(i);case"contains":return r.includes(i);default:return!1}},P.prototype.updateGridDataSource=function(t,e){var i=!0;0<t.length?(i=(this.dataSource instanceof f.DataManager?e:this.dataSource.length)!==t.length,g.removeClass([this.popupDiv],[n]),(e=this.popupDiv.querySelector(".e-no-records"))&&this.popupDiv.removeChild(e),this.gridObj.dataSource=t,this.isDataFiltered=!0):(this.l10nUpdate(),g.addClass([this.popupDiv],[n])),this.updateGridHeight(!0,i,t.length)},P.prototype.wireEvents=function(){g.isNullOrUndefined(this.inputObj.buttons[0])||(g.EventHandler.add(this.inputObj.buttons[0],"mousedown",this.preventBlur,this),g.EventHandler.add(this.inputObj.buttons[0],"mousedown",this.dropDownClick,this)),g.EventHandler.add(document,"mousedown",this.onDocumentClick,this),g.EventHandler.add(this.gridEle,"click",this.onMouseClick,this),g.EventHandler.add(this.inputEle,"input",this.inputHandler,this),g.EventHandler.add(this.inputEle,"focus",this.focusIn,this),this.showClearButton&&g.EventHandler.add(this.inputObj.clearButton,"mousedown",this.clearText,this),g.EventHandler.add(window,"resize",this.windowResize,this),this.keyboardModule=new g.KeyboardEvents(this.inputWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.keyboardModule=new g.KeyboardEvents(this.gridEle,{keyAction:this.gridKeyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},P.prototype.unWireEvents=function(){g.isNullOrUndefined(this.inputObj.buttons[0])||(g.EventHandler.remove(this.inputObj.buttons[0],"mousedown",this.preventBlur),g.EventHandler.remove(this.inputObj.buttons[0],"mousedown",this.dropDownClick)),g.EventHandler.remove(document,"mousedown",this.onDocumentClick),g.EventHandler.remove(this.inputEle,"input",this.inputHandler),g.EventHandler.remove(this.inputWrapper,"focus",this.focusIn),g.EventHandler.remove(window,"resize",this.windowResize),g.EventHandler.remove(this.gridEle,"click",this.onMouseClick),this.showClearButton&&g.EventHandler.remove(this.inputObj.clearButton,"mousedown",this.clearText),this.keyboardModule&&this.keyboardModule.destroy()},P.prototype.preventBlur=function(t){t.preventDefault()},P.prototype.dropDownClick=function(t){var e;this.disabled||this.readonly||((e=this.gridEle.querySelector(".e-row-focus"))&&e.classList.remove("e-row-focus"),this.isPopupOpen?this.hidePopup(t):this.showPopup(t))},P.prototype.onMouseClick=function(t){var e=t.target,e=g.closest(e,".e-row"),i=this.gridObj.selectedRowIndex;e&&(0<=i?this.selectedGridRow(e,t):(this.gridObj.selectedRowIndex=this.gridObj.getRows().indexOf(e),this.gridObj.selectRow(this.gridObj.selectedRowIndex),this.hidePopup(t)))},P.prototype.onDocumentClick=function(t){var e;this.disabled||this.readonly||!this.isPopupOpen?t.target.closest(".e-multicolumn-list")||this.focusOut():(e=t.target).classList.contains("e-multicolumn-list-icon")||g.closest(e,".e-popup")?t.preventDefault():e.classList.contains("e-multicolumncombobox")||e.classList.contains("e-clear-icon")||this.updateValuesOnInput(t)},P.prototype.updateValuesOnInput=function(t,e,i){var o,r=this,n=(void 0===i&&(i=!1),t||e);this.hidePopup(n),this.matchedRowEle&&!i?(o=this.isProtectedOnChange,this.isProtectedOnChange=!0,setTimeout(function(){r.inputEle.value=r.matchedContent[r.fields.text].toString(),r.value=r.matchedContent[r.fields.value].toString();var t=r.findIndex(r.gridObj.currentViewData,r.matchedContent);r.index=t,r.text=r.matchedContent[r.fields.text].toString(),r.gridObj.selectRow(t),r.selectedGridRow(r.gridObj.getRowByIndex(t),n),r.previousItemElement=r.gridObj.getSelectedRows()[0]},100),this.isProtectedOnChange=o):this.isDataFiltered&&(this.inputEle.value="",t={value:null,itemData:{text:null,value:null},item:null,previousItemData:{text:this.text,value:this.value},previousItemElement:this.previousItemElement,itemElement:null,event:n,isInteracted:!0,cancel:!1},o=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.text=this.value=this.index=null,this.gridObj.refreshColumns(),this.isProtectedOnChange=o,this.triggerChangeEvent(t),this.isDataFiltered=!1,this.matchedContent=this.matchedRowEle=null)},P.prototype.clearText=function(t){this.isDataFiltered=!0,this.updateValuesOnInput(t,null,!0)},P.prototype.windowResize=function(){this.popupObj&&(this.popupObj.setProperties({width:this.getSize(!0)}),this.popupObj.refreshPosition())},P.prototype.setCssClass=function(t,e){var i=this.popupObj?[this.inputWrapper,this.popupObj.element]:[this.inputWrapper];g.isNullOrUndefined(e)||""===e||g.removeClass(i,e.split(" ")),g.isNullOrUndefined(t)||""===t||g.addClass(i,t.split(" "))},P.prototype.keyActionHandler=function(t){switch(t.action){case"escape":case"altUp":case"shiftTab":case"tab":this.isPopupOpen?this.hidePopup(t):this.focusOut();break;case"altDown":this.isPopupOpen||(this.showPopup(t),this.updateSelectedItem(t,!1));break;case"moveDown":case"moveUp":this.updateSelectedItem(t,!0,!0);break;case"enter":this.updateValuesOnInput(null,t),this.focusIn(t);break;case"home":case"end":this.updateSelectedItem(t)}},P.prototype.gridKeyActionHandler=function(t,e){switch(e&&("ArrowDown"===t.key?t.action="moveDown":"ArrowUp"===t.key?t.action="moveUp":"End"===t.key?t.action="end":"Home"===t.key?t.action="home":"Tab"===t.key?t.action="tab":"Escape"===t.key&&(t.action="escape"),t.shiftKey&&"Tab"===t.key&&(t.action="shiftTab"),t.altKey)&&"ArrowUp"===t.key&&(t.action="altUp"),t.action){case"escape":case"tab":case"shiftTab":case"altUp":this.isPopupOpen&&(t.preventDefault(),"escape"!==t.action&&this.updateSelectedItem(t),this.hidePopup(t));break;case"moveDown":case"moveUp":case"home":case"end":this.updateSelectedItem(t)}},P.prototype.updateSelectedItem=function(t,e,i){var o;void 0===e&&(e=!0),this.isPopupOpen&&(-1===(o=this.fields.groupBy?this.gridObj.selectedRowIndex||0:this.gridObj.selectedRowIndex)&&("moveDown"===t.action||"moveUp"===t.action)||"home"===t.action?o=0:o>=this.gridObj.getRows().length&&"moveDown"===t.action||"end"===t.action?o=this.gridObj.getRows().length-1:"moveDown"===t.action&&0<=o&&o<=this.gridObj.getRows().length&&(this.fields.groupBy||i)?o+=1:("moveUp"===t.action&&0<o&&this.fields.groupBy||i)&&--o,this.gridObj.selectRow(o),this.gridObj.selectedRowIndex=o,(i=this.gridEle.querySelector(".e-row-focus"))&&i.classList.remove("e-row-focus"),e)&&this.selectedGridRow(this.gridObj.getRows()[parseInt(o.toString(),10)],t,!0)},P.prototype.updateClearIconState=function(){var t=this.inputWrapper.querySelector(".e-clear-icon");t&&(t.style.display=""===this.inputEle.value?"none":"flex")},P.prototype.focusIn=function(t){this.disabled||this.readonly||(g.addClass([this.inputWrapper],[u]),this.inputEle.focus(),this.updateClearIconState(),this.trigger("focus",t),"Never"!==this.floatLabelType&&p.Input.calculateWidth(this.inputEle,this.inputWrapper))},P.prototype.focusOut=function(t){this.disabled||this.readonly||(this.isPopupOpen&&this.hidePopup(t),this.inputWrapper&&(g.removeClass([this.inputWrapper],[u]),(t=this.inputWrapper.querySelector(".e-clear-icon"))&&(t.style.display="none"),"Never"!==this.floatLabelType)&&p.Input.calculateWidth(this.inputEle,this.inputWrapper))},P.prototype.showPopup=function(r,n){var s=this,t={popup:this.popupObj,event:r,cancel:!1,animation:{name:"FadeIn",duration:100}};this.trigger("open",t,function(t){var i,e,o;t.cancel||s.isPopupOpen||(s.isPopupOpen=!0,s.popupObj.refreshPosition(),g.addClass([s.inputWrapper],[a]),g.attributes(s.inputEle,{"aria-expanded":"true","aria-owns":s.element.id+"_popup","aria-controls":s.element.id}),n||((s.value||s.text||s.index)&&s.gridObj.getRowsObject().forEach(function(t,e){s.fields.groupBy&&g.isNullOrUndefined(t.data.items)&&(g.isNullOrUndefined(i)?i=0:i+=1),s.selectDataRow(t.data,s.fields.groupBy?i:e)}),s.focusIn(r)),(e=s.gridObj.getContent())&&((o=e.querySelector(".e-rowcell.e-active"))?s.inputEle.setAttribute("aria-activedescendant",o.parentElement.getAttribute("data-uid")):e.querySelector(".e-row")&&s.inputEle.setAttribute("aria-activedescendant",e.querySelector(".e-row").getAttribute("data-uid"))),s.popupObj.show(new g.Animation(t.animation),s.popupEle))})},P.prototype.hidePopup=function(e){var i=this,t={popup:this.popupObj,event:e||null,cancel:!1,animation:{name:"FadeOut",duration:100}};this.trigger("close",t,function(t){t.cancel||(i.isPopupOpen=!1,g.removeClass([i.inputWrapper],[a]),g.attributes(i.inputEle,{"aria-expanded":"false"}),i.popupObj.hide(new g.Animation(t.animation)),i.inputEle.value=i.text?i.text.toString():"",e&&((t=e.target)&&(t.classList.contains("e-multicolumn-list-icon")||t.classList.contains("e-rowcell"))?(i.value||i.gridObj.refreshColumns(),setTimeout(function(){i.focusIn(e)})):i.focusOut()),i.inputEle.removeAttribute("aria-owns"),i.inputEle.removeAttribute("aria-activedescendant"))}),setTimeout(function(){i.gridObj&&(i.gridObj.dataSource=i.dataSource,i.updateGridHeight(!0,!1))},100)},P.prototype.addItems=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.editSettings.allowAdding=!0,this.gridObj.dataBind(),this.isProtectedOnChange=i,this.gridObj.addRecord(t,e)},P.prototype.getItems=function(){return this.gridObj.getDataRows()},P.prototype.getDataByValue=function(e){var i=this;return!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array?this.dataSource.filter(function(t){return t[i.fields.value].toString()===e})[0]:(!g.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof f.DataManager&&this.dataSource.executeQuery(new f.Query).then(function(t){return t.result.filter(function(t){return t[i.fields.value].toString()===e})[0]}),null)},P.prototype.destroy=function(){if(this.unWireEvents(),this.gridObj&&(this.gridObj.destroy(),g.detach(this.gridObj.element)),this.inputEle){for(var t=["placeholder","aria-expanded","spellcheck","aria-label","role","type","aria-owns","aria-controls","aria-readonly","autocomplete","autocapitalize","spellcheck","aria-activedescendant"],e=0;e<t.length;e++)this.inputEle.removeAttribute(t[e]);this.inputEle.classList.remove("e-input"),p.Input.setValue("",this.inputEle,this.floatLabelType,this.showClearButton)}this.popupEle&&(this.popupEle.removeAttribute("aria-label"),this.popupEle.removeAttribute("role")),this.popupObj&&(this.popupObj.destroy(),g.detach(this.popupObj.element)),this.element.tagName!==this.getDirective()&&this.inputWrapper.parentElement.insertBefore(this.element,this.inputWrapper),this.inputObj&&(g.detach(this.inputObj.container),this.inputObj=null),p.Input.destroy({element:this.inputEle,floatLabelType:this.floatLabelType,properties:this.properties}),g.detach(this.inputWrapper),g.detach(this.popupDiv),this.inputEle=null,this.previousItemElement=null,this.inputWrapper.innerHTML="",this.inputWrapper=null,this.popupDiv=null,this.popupObj=null,this.gridObj=null,this.gridEle=null,this.popupEle=null,this.footer=null,this.noRecord=null,x.prototype.destroy.call(this)},P.prototype.onPropertyChanged=function(t,e){for(var i=0,o=Object.keys(t);i<o.length;i++){var r,n=o[i];switch(n){case"width":case"popupWidth":"width"===n&&this.setElementWidth(t.width),this.popupObj&&(this.popupObj.element.style.width=this.getSize(!0));break;case"popupHeight":this.popupObj&&(r=this.getSize(!1),this.popupObj.element.style.maxHeight=r,this.popupDiv.style.maxHeight=r,this.gridObj.height=r);break;case"placeholder":p.Input.setPlaceholder(t.placeholder,this.inputEle);break;case"readonly":p.Input.setReadonly(this.readonly,this.inputEle);break;case"disabled":p.Input.setEnabled(!this.disabled,this.inputEle),this.setEnable();break;case"cssClass":this.setCssClass(t.cssClass,e.cssClass);break;case"floatLabelType":p.Input.removeFloating(this.inputObj),p.Input.addFloating(this.inputEle,this.floatLabelType,this.placeholder);break;case"showClearButton":p.Input.setClearButton(t.showClearButton,this.inputEle,this.inputObj);break;case"value":this.initValue(!0,!0);break;case"text":this.initValue(!0,!1);break;case"index":this.initValue(!0);break;case"sortOrder":this.gridObj&&(this.gridObj.sortSettings.columns=[{field:this.fields.text,direction:t.sortOrder===s.SortOrder.Ascending?s.SortOrder.Ascending:s.SortOrder.Descending}]);break;case"htmlAttributes":this.setHTMLAttributes();break;case"noRecordsTemplate":this.l10nUpdate();break;case"actionFailureTemplate":this.l10nUpdate(!0);break;case"footerTemplate":this.setFooterTemplate();break;case"itemTemplate":this.gridObj&&(this.gridObj.rowTemplate=t.itemTemplate);break;case"groupTemplate":this.groupTemplate=t.groupTemplate,this.updateGroupByField();break;case"enableRtl":this.gridObj&&this.popupObj&&(this.gridObj.enableRtl=t.enableRtl,p.Input.setEnableRtl(t.enableRtl,[this.inputWrapper]),this.popupObj.enableRtl=t.enableRtl);break;case"dataSource":this.gridObj&&(this.gridObj.dataSource=t.dataSource);break;case"query":this.gridObj&&(this.gridObj.query=t.query);break;case"gridSettings":this.gridObj&&(this.gridObj.gridLines=t.gridSettings.gridLines,this.gridObj.rowHeight=t.gridSettings.rowHeight,this.gridObj.enableAltRow=t.gridSettings.enableAltRow,g.isNullOrUndefined(t.gridSettings.allowTextWrap)||(this.gridObj.allowTextWrap=t.gridSettings.allowTextWrap),g.isNullOrUndefined(t.gridSettings.textWrapMode)||(this.gridObj.textWrapSettings.wrapMode=t.gridSettings.textWrapMode));break;case"fields":this.fields=t.fields,this.updateGroupByField();break;case"filterType":this.filterType=t.filterType;break;case"enableVirtualization":this.gridObj&&(this.enableVirtualization=this.gridObj.enableVirtualization=t.enableVirtualization);break;case"sortType":this.gridObj&&(this.sortType=t.sortType,this.gridObj.allowMultiSorting="multiplecolumns"===this.sortType.toString().toLowerCase()&&this.allowSorting);break;case"allowFiltering":this.allowFiltering=t.allowFiltering;break;case"allowSorting":this.gridObj&&(this.allowSorting=this.gridObj.allowSorting=t.allowSorting);break;case"columns":this.gridObj&&(r=this.getGridColumns(),this.gridObj.columns=r)}}},r([g.Property([])],P.prototype,"dataSource",void 0),r([g.Property(null)],P.prototype,"text",void 0),r([g.Property(null)],P.prototype,"value",void 0),r([g.Property(null)],P.prototype,"index",void 0),r([g.Property("100%")],P.prototype,"width",void 0),r([g.Property("300px")],P.prototype,"popupHeight",void 0),r([g.Property("100%")],P.prototype,"popupWidth",void 0),r([g.Property(null)],P.prototype,"placeholder",void 0),r([g.Property(!0)],P.prototype,"allowFiltering",void 0),r([g.Property(!0)],P.prototype,"allowSorting",void 0),r([g.Property(!1)],P.prototype,"showClearButton",void 0),r([g.Property("")],P.prototype,"cssClass",void 0),r([g.Complex({text:null,value:null,groupBy:null},b)],P.prototype,"fields",void 0),r([g.Collection([],w)],P.prototype,"columns",void 0),r([g.Complex({},C)],P.prototype,"gridSettings",void 0),r([g.Property(s.FilterType.StartsWith)],P.prototype,"filterType",void 0),r([g.Property("Never")],P.prototype,"floatLabelType",void 0),r([g.Property(s.SortOrder.None)],P.prototype,"sortOrder",void 0),r([g.Property(s.SortType.OneColumn)],P.prototype,"sortType",void 0),r([g.Property(!1)],P.prototype,"enableVirtualization",void 0),r([g.Property(!1)],P.prototype,"disabled",void 0),r([g.Property(!1)],P.prototype,"readonly",void 0),r([g.Property(!1)],P.prototype,"enablePersistence",void 0),r([g.Property()],P.prototype,"query",void 0),r([g.Property(null)],P.prototype,"itemTemplate",void 0),r([g.Property(null)],P.prototype,"footerTemplate",void 0),r([g.Property(null)],P.prototype,"groupTemplate",void 0),r([g.Property("Request Failed")],P.prototype,"actionFailureTemplate",void 0),r([g.Property("No records found")],P.prototype,"noRecordsTemplate",void 0),r([g.Property({})],P.prototype,"htmlAttributes",void 0),r([g.Event()],P.prototype,"created",void 0),r([g.Event()],P.prototype,"open",void 0),r([g.Event()],P.prototype,"close",void 0),r([g.Event()],P.prototype,"actionFailure",void 0),r([g.Event()],P.prototype,"actionBegin",void 0),r([g.Event()],P.prototype,"actionComplete",void 0),r([g.Event()],P.prototype,"filtering",void 0),r([g.Event()],P.prototype,"select",void 0),r([g.Event()],P.prototype,"change",void 0);var x,t=r([g.NotifyPropertyChanges],P);function P(t,e){t=x.call(this,t,e)||this;return t.gridInject=new c,t.gridInject.InjectModules(),t}Object.defineProperty(s,"Edit",{enumerable:!0,get:function(){return e.Edit}}),Object.defineProperty(s,"Group",{enumerable:!0,get:function(){return e.Group}}),Object.defineProperty(s,"Sort",{enumerable:!0,get:function(){return e.Sort}}),Object.defineProperty(s,"VirtualScroll",{enumerable:!0,get:function(){return e.VirtualScroll}}),s.Column=w,s.FieldSettings=b,s.GridSettings=C,s.MultiColumnComboBox=t,s.MultiColumnGrid=c,Object.defineProperty(s,"__esModule",{value:!0})});
|
|
11
11
|
//# sourceMappingURL=ej2-multicolumn-combobox.umd.min.js.map
|