jqwidgets-ng 19.2.2 → 20.0.0
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/esm2020/jqxinput/angular_jqxinput.mjs +25 -3
- package/fesm2015/jqwidgets-ng-jqxinput.mjs +25 -3
- package/fesm2020/jqwidgets-ng-jqxinput.mjs +25 -3
- package/jqwidgets/jqx-all.js +13 -13
- package/jqwidgets/jqxangular.js +1 -1
- package/jqwidgets/jqxbarcode.js +1 -1
- package/jqwidgets/jqxbargauge.js +2 -2
- package/jqwidgets/jqxbulletchart.js +1 -1
- package/jqwidgets/jqxbuttongroup.js +1 -1
- package/jqwidgets/jqxbuttons.js +2 -2
- package/jqwidgets/jqxcalendar.js +1 -1
- package/jqwidgets/jqxchart.annotations.js +1 -1
- package/jqwidgets/jqxchart.api.js +1 -1
- package/jqwidgets/jqxchart.core.js +1 -1
- package/jqwidgets/jqxchart.js +1 -1
- package/jqwidgets/jqxchart.rangeselector.js +1 -1
- package/jqwidgets/jqxchart.waterfall.js +1 -1
- package/jqwidgets/jqxcheckbox.js +1 -1
- package/jqwidgets/jqxcheckboxgroup.js +1 -1
- package/jqwidgets/jqxcolorpicker.js +1 -1
- package/jqwidgets/jqxcombobox.js +1 -1
- package/jqwidgets/jqxcomplexinput.js +1 -1
- package/jqwidgets/jqxcore.js +1 -1
- package/jqwidgets/jqxdata.export.js +1 -1
- package/jqwidgets/jqxdata.js +1 -1
- package/jqwidgets/jqxdatatable.js +2 -2
- package/jqwidgets/jqxdate.js +1 -1
- package/jqwidgets/jqxdatetimeinput.js +1 -1
- package/jqwidgets/jqxdocking.js +1 -1
- package/jqwidgets/jqxdockinglayout.js +1 -1
- package/jqwidgets/jqxdockpanel.js +1 -1
- package/jqwidgets/jqxdragdrop.js +1 -1
- package/jqwidgets/jqxdraw.js +1 -1
- package/jqwidgets/jqxdropdownbutton.js +1 -1
- package/jqwidgets/jqxdropdownlist.js +2 -2
- package/jqwidgets/jqxeditor.js +1 -1
- package/jqwidgets/jqxexpander.js +1 -1
- package/jqwidgets/jqxfileupload.js +1 -1
- package/jqwidgets/jqxform.js +1 -1
- package/jqwidgets/jqxformattedinput.js +1 -1
- package/jqwidgets/jqxgantt.js +1 -1
- package/jqwidgets/jqxgauge.js +1 -1
- package/jqwidgets/jqxgrid.aggregates.js +1 -1
- package/jqwidgets/jqxgrid.columnsreorder.js +1 -1
- package/jqwidgets/jqxgrid.columnsresize.js +1 -1
- package/jqwidgets/jqxgrid.edit.js +1 -1
- package/jqwidgets/jqxgrid.export.js +1 -1
- package/jqwidgets/jqxgrid.filter.js +2 -2
- package/jqwidgets/jqxgrid.grouping.js +1 -1
- package/jqwidgets/jqxgrid.js +2 -2
- package/jqwidgets/jqxgrid.pager.js +1 -1
- package/jqwidgets/jqxgrid.selection.js +2 -2
- package/jqwidgets/jqxgrid.sort.js +1 -1
- package/jqwidgets/jqxgrid.storage.js +1 -1
- package/jqwidgets/jqxheatmap.js +1 -1
- package/jqwidgets/jqxinput.js +2 -2
- package/jqwidgets/jqxkanban.js +2 -2
- package/jqwidgets/jqxknob.js +1 -1
- package/jqwidgets/jqxknockout.js +1 -1
- package/jqwidgets/jqxlayout.js +1 -1
- package/jqwidgets/jqxlistbox.js +1 -1
- package/jqwidgets/jqxlistmenu.js +1 -1
- package/jqwidgets/jqxloader.js +1 -1
- package/jqwidgets/jqxmaskedinput.js +1 -1
- package/jqwidgets/jqxmenu.js +1 -1
- package/jqwidgets/jqxnavbar.js +1 -1
- package/jqwidgets/jqxnavigationbar.js +1 -1
- package/jqwidgets/jqxnotification.js +1 -1
- package/jqwidgets/jqxnumberinput.js +1 -1
- package/jqwidgets/jqxpanel.js +1 -1
- package/jqwidgets/jqxpasswordinput.js +1 -1
- package/jqwidgets/jqxpivot.js +1 -1
- package/jqwidgets/jqxpivotdesigner.js +2 -2
- package/jqwidgets/jqxpivotgrid.js +1 -1
- package/jqwidgets/jqxpopover.js +1 -1
- package/jqwidgets/jqxprogressbar.js +1 -1
- package/jqwidgets/jqxqrcode.js +1 -1
- package/jqwidgets/jqxradiobutton.js +1 -1
- package/jqwidgets/jqxradiobuttongroup.js +2 -2
- package/jqwidgets/jqxrangeselector.js +1 -1
- package/jqwidgets/jqxrating.js +1 -1
- package/jqwidgets/jqxresponsivepanel.js +1 -1
- package/jqwidgets/jqxribbon.js +1 -1
- package/jqwidgets/jqxscheduler.api.js +1 -1
- package/jqwidgets/jqxscheduler.js +1 -1
- package/jqwidgets/jqxscrollbar.js +1 -1
- package/jqwidgets/jqxscrollview.js +1 -1
- package/jqwidgets/jqxslider.js +1 -1
- package/jqwidgets/jqxsortable.js +1 -1
- package/jqwidgets/jqxsplitter.js +1 -1
- package/jqwidgets/jqxswitchbutton.js +1 -1
- package/jqwidgets/jqxtabs.js +2 -2
- package/jqwidgets/jqxtagcloud.js +1 -1
- package/jqwidgets/jqxtextarea.js +1 -1
- package/jqwidgets/jqxtimeline.js +1 -1
- package/jqwidgets/jqxtimepicker.js +1 -1
- package/jqwidgets/jqxtoolbar.js +1 -1
- package/jqwidgets/jqxtooltip.js +1 -1
- package/jqwidgets/jqxtouch.js +1 -1
- package/jqwidgets/jqxtree.js +1 -1
- package/jqwidgets/jqxtreegrid.js +1 -1
- package/jqwidgets/jqxtreemap.js +1 -1
- package/jqwidgets/jqxvalidator.js +1 -1
- package/jqwidgets/jqxwindow.js +1 -1
- package/jqwidgets/modules/jqxbarcode.js +48 -36
- package/jqwidgets/modules/jqxbargauge.js +67 -39
- package/jqwidgets/modules/jqxbulletchart.js +85 -41
- package/jqwidgets/modules/jqxbuttongroup.js +73 -39
- package/jqwidgets/modules/jqxbuttons.js +54 -36
- package/jqwidgets/modules/jqxcalendar.js +96 -43
- package/jqwidgets/modules/jqxchart.js +189 -53
- package/jqwidgets/modules/jqxcheckbox.js +92 -42
- package/jqwidgets/modules/jqxcheckboxgroup.js +92 -42
- package/jqwidgets/modules/jqxcolorpicker.js +111 -45
- package/jqwidgets/modules/jqxcombobox.js +149 -51
- package/jqwidgets/modules/jqxcomplexinput.js +73 -39
- package/jqwidgets/modules/jqxdatatable.js +343 -84
- package/jqwidgets/modules/jqxdatetimeinput.js +266 -69
- package/jqwidgets/modules/jqxdocking.js +92 -42
- package/jqwidgets/modules/jqxdockinglayout.js +167 -53
- package/jqwidgets/modules/jqxdockpanel.js +73 -39
- package/jqwidgets/modules/jqxdragdrop.js +90 -40
- package/jqwidgets/modules/jqxdraw.js +47 -35
- package/jqwidgets/modules/jqxdropdownbutton.js +73 -39
- package/jqwidgets/modules/jqxdropdownlist.js +248 -67
- package/jqwidgets/modules/jqxeditor.js +360 -83
- package/jqwidgets/modules/jqxexpander.js +113 -47
- package/jqwidgets/modules/jqxfileupload.js +67 -39
- package/jqwidgets/modules/jqxform.js +325 -80
- package/jqwidgets/modules/jqxformattedinput.js +251 -70
- package/jqwidgets/modules/jqxgantt.js +50 -38
- package/jqwidgets/modules/jqxgauge.js +110 -44
- package/jqwidgets/modules/jqxgrid.js +4452 -3974
- package/jqwidgets/modules/jqxheatmap.js +67 -39
- package/jqwidgets/modules/jqxinput.js +1263 -989
- package/jqwidgets/modules/jqxkanban.js +1557 -1273
- package/jqwidgets/modules/jqxknob.js +91 -41
- package/jqwidgets/modules/jqxlayout.js +167 -53
- package/jqwidgets/modules/jqxlineargauge.js +110 -44
- package/jqwidgets/modules/jqxlinkbutton.js +54 -36
- package/jqwidgets/modules/jqxlistbox.js +171 -54
- package/jqwidgets/modules/jqxlistmenu.js +307 -78
- package/jqwidgets/modules/jqxloader.js +48 -36
- package/jqwidgets/modules/jqxmaskedinput.js +48 -36
- package/jqwidgets/modules/jqxmenu.js +150 -52
- package/jqwidgets/modules/jqxnavbar.js +113 -47
- package/jqwidgets/modules/jqxnavigationbar.js +188 -58
- package/jqwidgets/modules/jqxnotification.js +129 -47
- package/jqwidgets/modules/jqxnumberinput.js +187 -57
- package/jqwidgets/modules/jqxpanel.js +110 -44
- package/jqwidgets/modules/jqxpasswordinput.js +128 -46
- package/jqwidgets/modules/jqxpivotdesigner.js +382 -89
- package/jqwidgets/modules/jqxpivotgrid.js +382 -89
- package/jqwidgets/modules/jqxpopover.js +73 -39
- package/jqwidgets/modules/jqxprogressbar.js +48 -36
- package/jqwidgets/modules/jqxqrcode.js +106 -46
- package/jqwidgets/modules/jqxradiobutongroup.js +93 -43
- package/jqwidgets/modules/jqxradiobutton.js +73 -39
- package/jqwidgets/modules/jqxrangeselector.js +85 -41
- package/jqwidgets/modules/jqxrating.js +73 -39
- package/jqwidgets/modules/jqxrepeatbutton.js +54 -36
- package/jqwidgets/modules/jqxresponsivepanel.js +67 -39
- package/jqwidgets/modules/jqxribbon.js +92 -42
- package/jqwidgets/modules/jqxscheduler.js +1572 -971
- package/jqwidgets/modules/jqxscrollbar.js +10627 -91161
- package/jqwidgets/modules/jqxscrollview.js +72 -38
- package/jqwidgets/modules/jqxslider.js +72 -38
- package/jqwidgets/modules/jqxsortable.js +72 -38
- package/jqwidgets/modules/jqxsplitlayout.js +2022 -2082
- package/jqwidgets/modules/jqxsplitter.js +72 -38
- package/jqwidgets/modules/jqxswitchbutton.js +109 -43
- package/jqwidgets/modules/jqxtabs.js +169 -55
- package/jqwidgets/modules/jqxtagcloud.js +128 -46
- package/jqwidgets/modules/jqxtextarea.js +128 -46
- package/jqwidgets/modules/jqxtimeline.js +48 -36
- package/jqwidgets/modules/jqxtimepicker.js +65 -37
- package/jqwidgets/modules/jqxtogglebutton.js +54 -36
- package/jqwidgets/modules/jqxtoolbar.js +1507 -1032
- package/jqwidgets/modules/jqxtooltip.js +47 -35
- package/jqwidgets/modules/jqxtree.js +6451 -187
- package/jqwidgets/modules/jqxtreegrid.js +361 -86
- package/jqwidgets/modules/jqxtreemap.js +84 -40
- package/jqwidgets/modules/jqxvalidator.js +109 -43
- package/jqwidgets/modules/jqxwindow.js +73 -39
- package/jqwidgets/styles/gantt/jqx.gantt.css +98 -98
- package/jqwidgets/styles/jqx.base.css +20 -20
- package/jqwidgets.d.ts +2 -0
- package/jqxinput/angular_jqxinput.d.ts +5 -1
- package/package.json +1 -1
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
/* Release Date:
|
|
3
|
-
Copyright (c) 2011-2024 jQWidgets.
|
|
4
|
-
License: https://jqwidgets.com/license/ */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/******/ (() => { // webpackBootstrap
|
|
8
|
-
var __webpack_exports__ = {};
|
|
9
|
-
|
|
10
|
-
/* Release Date: 28-May-2024
|
|
11
|
-
Copyright (c) 2011-2024 jQWidgets.
|
|
12
|
-
License: https://jqwidgets.com/license/ */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/******/ (() => { // webpackBootstrap
|
|
16
|
-
var __webpack_exports__ = {};
|
|
17
|
-
|
|
18
|
-
/* Release Date: 28-May-2024
|
|
2
|
+
/* Release Date: Sep-17-2024
|
|
19
3
|
Copyright (c) 2011-2024 jQWidgets.
|
|
20
4
|
License: https://jqwidgets.com/license/ */
|
|
21
5
|
|
|
@@ -24,7 +8,7 @@ License: https://jqwidgets.com/license/ */
|
|
|
24
8
|
/******/ var __webpack_modules__ = ({
|
|
25
9
|
|
|
26
10
|
/***/ 5459:
|
|
27
|
-
/***/ ((module, exports,
|
|
11
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
28
12
|
|
|
29
13
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disable */
|
|
30
14
|
/* eslint-disable */
|
|
@@ -8204,7 +8188,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
8204
8188
|
// file names, and JQXLite is normally delivered in a lowercase file name.
|
|
8205
8189
|
// Do this after creating the global so that if an AMD module wants to call
|
|
8206
8190
|
// noConflict to hide this version of JQXLite, it will work.
|
|
8207
|
-
if (
|
|
8191
|
+
if ( true && __webpack_require__.amdO.JQXLite) {
|
|
8208
8192
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return JQXLite; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
8209
8193
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
8210
8194
|
}
|
|
@@ -11379,6 +11363,22 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
11379
11363
|
}
|
|
11380
11364
|
})(jqxBaseFramework);
|
|
11381
11365
|
})();
|
|
11366
|
+
|
|
11367
|
+
|
|
11368
|
+
|
|
11369
|
+
|
|
11370
|
+
|
|
11371
|
+
|
|
11372
|
+
|
|
11373
|
+
|
|
11374
|
+
|
|
11375
|
+
|
|
11376
|
+
|
|
11377
|
+
|
|
11378
|
+
|
|
11379
|
+
|
|
11380
|
+
|
|
11381
|
+
|
|
11382
11382
|
|
|
11383
11383
|
|
|
11384
11384
|
/***/ }),
|
|
@@ -17847,6 +17847,22 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
17847
17847
|
})(jqxBaseFramework);
|
|
17848
17848
|
})();
|
|
17849
17849
|
|
|
17850
|
+
|
|
17851
|
+
|
|
17852
|
+
|
|
17853
|
+
|
|
17854
|
+
|
|
17855
|
+
|
|
17856
|
+
|
|
17857
|
+
|
|
17858
|
+
|
|
17859
|
+
|
|
17860
|
+
|
|
17861
|
+
|
|
17862
|
+
|
|
17863
|
+
|
|
17864
|
+
|
|
17865
|
+
|
|
17850
17866
|
|
|
17851
17867
|
|
|
17852
17868
|
/***/ }),
|
|
@@ -17856,1170 +17872,1416 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
17856
17872
|
|
|
17857
17873
|
/* tslint:disable */
|
|
17858
17874
|
/* eslint-disable */
|
|
17859
|
-
(function(){
|
|
17860
|
-
|
|
17861
|
-
|
|
17862
|
-
|
|
17875
|
+
(function () {
|
|
17876
|
+
if (typeof document === 'undefined') {
|
|
17877
|
+
return;
|
|
17878
|
+
}
|
|
17863
17879
|
|
|
17864
|
-
(function ($) {
|
|
17865
|
-
|
|
17866
|
-
|
|
17880
|
+
(function ($) {
|
|
17881
|
+
'use strict';
|
|
17882
|
+
$.jqx.jqxWidget('jqxInput', '', {});
|
|
17867
17883
|
|
|
17868
|
-
|
|
17869
|
-
|
|
17870
|
-
|
|
17871
|
-
|
|
17872
|
-
|
|
17873
|
-
|
|
17874
|
-
|
|
17875
|
-
|
|
17876
|
-
|
|
17877
|
-
|
|
17878
|
-
|
|
17879
|
-
|
|
17880
|
-
|
|
17881
|
-
|
|
17882
|
-
|
|
17883
|
-
|
|
17884
|
-
|
|
17885
|
-
|
|
17886
|
-
|
|
17887
|
-
|
|
17888
|
-
|
|
17889
|
-
|
|
17890
|
-
|
|
17891
|
-
|
|
17892
|
-
|
|
17893
|
-
|
|
17894
|
-
|
|
17895
|
-
|
|
17896
|
-
|
|
17897
|
-
|
|
17898
|
-
|
|
17884
|
+
$.extend($.jqx._jqxInput.prototype, {
|
|
17885
|
+
defineInstance: function () {
|
|
17886
|
+
var that = this;
|
|
17887
|
+
var settings = {
|
|
17888
|
+
disabled: false,
|
|
17889
|
+
filter: that._filter,
|
|
17890
|
+
sort: that._sort,
|
|
17891
|
+
highlight: that._highlight,
|
|
17892
|
+
dropDownWidth: null,
|
|
17893
|
+
renderer: that._renderer,
|
|
17894
|
+
opened: false,
|
|
17895
|
+
$popup: document.createElement('ul'),
|
|
17896
|
+
source: [],
|
|
17897
|
+
roundedCorners: true,
|
|
17898
|
+
searchMode: 'default',
|
|
17899
|
+
placeHolder: '',
|
|
17900
|
+
width: null,
|
|
17901
|
+
height: null,
|
|
17902
|
+
value: '',
|
|
17903
|
+
rtl: false,
|
|
17904
|
+
enableBrowserBoundsDetection: true,
|
|
17905
|
+
hint: true,
|
|
17906
|
+
displayMember: '',
|
|
17907
|
+
valueMember: '',
|
|
17908
|
+
inlineAutoComplete: false,
|
|
17909
|
+
events: ['select', 'open', 'close', 'change'],
|
|
17910
|
+
popupZIndex: 1000,
|
|
17911
|
+
items: 8,
|
|
17912
|
+
minLength: 1,
|
|
17913
|
+
maxLength: null,
|
|
17914
|
+
aiKey: ''
|
|
17915
|
+
};
|
|
17916
|
+
if (this === $.jqx._jqxInput.prototype) {
|
|
17917
|
+
return settings;
|
|
17918
|
+
}
|
|
17919
|
+
$.extend(true, this, settings);
|
|
17899
17920
|
return settings;
|
|
17900
|
-
}
|
|
17901
|
-
$.extend(true, this, settings);
|
|
17902
|
-
return settings;
|
|
17903
|
-
},
|
|
17921
|
+
},
|
|
17904
17922
|
|
|
17905
|
-
|
|
17906
|
-
|
|
17907
|
-
|
|
17908
|
-
|
|
17909
|
-
|
|
17910
|
-
|
|
17911
|
-
|
|
17912
|
-
|
|
17923
|
+
createInstance: function () {
|
|
17924
|
+
var that = this;
|
|
17925
|
+
if (that.host.css('display') === 'none' || document.body.contains(that.element) === false) {
|
|
17926
|
+
that._initiallyHidden = true;
|
|
17927
|
+
}
|
|
17928
|
+
that._popupHelper = $(that.$popup);
|
|
17929
|
+
that.render();
|
|
17930
|
+
},
|
|
17913
17931
|
|
|
17914
|
-
|
|
17915
|
-
|
|
17932
|
+
getAISuggestions: function (callback) {
|
|
17933
|
+
var that = this;
|
|
17934
|
+
var response = '';
|
|
17935
|
+
if (!that.aiKey) {
|
|
17936
|
+
callback('');
|
|
17937
|
+
}
|
|
17938
|
+
|
|
17939
|
+
function buildPrompt(textBefore, textAfter) {
|
|
17940
|
+
var systemMessageBuilder = [];
|
|
17941
|
+
systemMessageBuilder.push("Predict what text the user in the given ROLE would insert after the cursor position indicated by ^^^. Auto-correct the text.\n");
|
|
17942
|
+
systemMessageBuilder.push("RULES:\n");
|
|
17943
|
+
systemMessageBuilder.push("1. Reply with OK:, then in square brackets the predicted text, then END_INSERTION, and no other output.\n");
|
|
17944
|
+
systemMessageBuilder.push("2. When a specific value or quantity cannot be inferred and would need to be provided, use the word NEED_INFO.\n");
|
|
17945
|
+
systemMessageBuilder.push("3. If there isn't enough information to predict any words that the user would type next, just reply with the word NO_PREDICTION.\n");
|
|
17946
|
+
systemMessageBuilder.push("4. NEVER invent new information. If you can't be sure what the user is about to type, ALWAYS stop the prediction with END_INSERTION.\n");
|
|
17947
|
+
|
|
17948
|
+
/*
|
|
17949
|
+
if (that.userPhrases.length) {
|
|
17950
|
+
systemMessageBuilder.push("\nAlways try to use variations on the following phrases as part of the predictions:\n");
|
|
17951
|
+
for (let i = 0; i < that.userPhrases.length; i++) {
|
|
17952
|
+
systemMessageBuilder.push("- {0}\n", that.userPhrases[i]);
|
|
17953
|
+
}
|
|
17954
|
+
}*/
|
|
17916
17955
|
|
|
17917
|
-
|
|
17956
|
+
systemMessageBuilder.push("\n\nROLE: " + "User" + " USER_TEXT: " + textBefore + textAfter + "^^^");
|
|
17918
17957
|
|
|
17919
|
-
|
|
17920
|
-
|
|
17921
|
-
|
|
17922
|
-
|
|
17923
|
-
|
|
17924
|
-
if (index === 0) {
|
|
17925
|
-
classToAdd += ' jqx-rc-l';
|
|
17926
|
-
}
|
|
17927
|
-
if (index === children.length - 1) {
|
|
17928
|
-
classToAdd += ' jqx-rc-r';
|
|
17929
|
-
}
|
|
17930
|
-
if (this !== that.element) {
|
|
17931
|
-
classToAdd += ' jqx-fill-state-normal';
|
|
17932
|
-
}
|
|
17933
|
-
this.className += ' ' + that.toThemeProperty(classToAdd);
|
|
17934
|
-
});
|
|
17958
|
+
return systemMessageBuilder.join('\n');
|
|
17959
|
+
}
|
|
17960
|
+
|
|
17961
|
+
function fetchAIResponse(prompt, callback) {
|
|
17962
|
+
var apiKey = that.aiKey; // Replace this with your OpenAI API key (don't expose it on public websites)
|
|
17935
17963
|
|
|
17936
|
-
|
|
17937
|
-
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
var data = this.host.data();
|
|
17964
|
+
var headers = {
|
|
17965
|
+
'Content-Type': 'application/json',
|
|
17966
|
+
'Authorization': 'Bearer ' + apiKey
|
|
17967
|
+
};
|
|
17941
17968
|
|
|
17942
|
-
|
|
17943
|
-
|
|
17969
|
+
var body = JSON.stringify({
|
|
17970
|
+
model: "gpt-3.5-turbo", // or "gpt-4" if you have access
|
|
17971
|
+
messages: [{ role: "user", content: prompt }], // The conversation format
|
|
17972
|
+
// stop_frequences: ["END_INSERTION", "NEED_INFO"],
|
|
17973
|
+
max_tokens: 200 // You can adjust token length based on your needs,
|
|
17974
|
+
});
|
|
17944
17975
|
|
|
17945
|
-
|
|
17946
|
-
|
|
17947
|
-
|
|
17976
|
+
var xhr = new XMLHttpRequest();
|
|
17977
|
+
xhr.open('POST', 'https://api.openai.com/v1/chat/completions', true);
|
|
17978
|
+
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
17979
|
+
xhr.setRequestHeader('Authorization', 'Bearer ' + apiKey);
|
|
17980
|
+
|
|
17981
|
+
xhr.onreadystatechange = function () {
|
|
17982
|
+
if (xhr.readyState === 4) {
|
|
17983
|
+
if (xhr.status === 200) {
|
|
17984
|
+
var response = JSON.parse(xhr.responseText);
|
|
17985
|
+
// Make sure there are choices and content in the response
|
|
17986
|
+
if (response.choices && response.choices.length > 0 && response.choices[0].message.content) {
|
|
17987
|
+
var content = response.choices[0].message.content;
|
|
17988
|
+
|
|
17989
|
+
if (content.length > 5 && content.startsWith("OK")) {
|
|
17990
|
+
content = content.substring(4);
|
|
17991
|
+
content = content.replace('END_INSERTION', '');
|
|
17992
|
+
|
|
17993
|
+
var matches = content.match(/\[(.*?)\]/g);
|
|
17994
|
+
|
|
17995
|
+
// Remove the brackets from the extracted text
|
|
17996
|
+
if (matches) {
|
|
17997
|
+
// Use map to strip out brackets
|
|
17998
|
+
var extractedText = matches.map(function (match) {
|
|
17999
|
+
return match.replace(/^\[|\]$/g, '');
|
|
18000
|
+
});
|
|
18001
|
+
|
|
18002
|
+
content = extractedText[0]
|
|
18003
|
+
}
|
|
17948
18004
|
|
|
17949
|
-
|
|
17950
|
-
|
|
18005
|
+
content = content.replace('[', '');
|
|
18006
|
+
content = content.replace(']', '');
|
|
18007
|
+
}
|
|
17951
18008
|
|
|
17952
|
-
|
|
17953
|
-
|
|
17954
|
-
|
|
18009
|
+
if (content.indexOf('NO_PREDICTION') >= 0) {
|
|
18010
|
+
content = '';
|
|
18011
|
+
}
|
|
17955
18012
|
|
|
17956
|
-
|
|
17957
|
-
|
|
18013
|
+
callback(null, content);
|
|
18014
|
+
}
|
|
18015
|
+
else {
|
|
18016
|
+
callback('Error: No valid response from AI', null);
|
|
18017
|
+
}
|
|
18018
|
+
} else {
|
|
18019
|
+
callback('Error fetching AI response: ' + xhr.statusText, null);
|
|
18020
|
+
}
|
|
18021
|
+
}
|
|
18022
|
+
};
|
|
17958
18023
|
|
|
17959
|
-
|
|
17960
|
-
if (this.element.className.indexOf('underlined') >= 0) {
|
|
17961
|
-
group.addClass('underlined');
|
|
18024
|
+
xhr.send(body);
|
|
17962
18025
|
}
|
|
17963
18026
|
|
|
17964
|
-
that.input
|
|
17965
|
-
|
|
17966
|
-
|
|
17967
|
-
|
|
17968
|
-
|
|
18027
|
+
var textBefore = that.input.value.substring(0, that.input.selectionStart);
|
|
18028
|
+
var textAfter = that.input.value.substring(that.input.selectionStart + 1);
|
|
18029
|
+
var text = textBefore + textAfter;
|
|
18030
|
+
if (text.endsWith(' ')) {
|
|
18031
|
+
var prompt = buildPrompt(textBefore, textAfter);
|
|
18032
|
+
fetchAIResponse(prompt.toString(), function (error, aiResponse) {
|
|
18033
|
+
if (error) {
|
|
18034
|
+
callback('');
|
|
18035
|
+
} else {
|
|
18036
|
+
callback(aiResponse);
|
|
18037
|
+
}
|
|
17969
18038
|
}
|
|
17970
|
-
|
|
18039
|
+
);
|
|
17971
18040
|
}
|
|
17972
|
-
|
|
17973
|
-
this.bar = bar;
|
|
17974
|
-
this.element.style.cssText = '';
|
|
17975
|
-
this.host = group;
|
|
17976
|
-
this.element = group[0];
|
|
17977
|
-
this.host.data(data);
|
|
18041
|
+
},
|
|
17978
18042
|
|
|
18043
|
+
render: function () {
|
|
17979
18044
|
var that = this;
|
|
17980
18045
|
|
|
17981
|
-
|
|
17982
|
-
that.bar.addClass(that.toThemeProperty("jqx-" + that.template));
|
|
17983
|
-
that.label.addClass(that.toThemeProperty("jqx-" + that.template));
|
|
17984
|
-
}
|
|
18046
|
+
this.input = this.element;
|
|
17985
18047
|
|
|
17986
|
-
if (
|
|
17987
|
-
|
|
17988
|
-
|
|
17989
|
-
|
|
17990
|
-
|
|
17991
|
-
|
|
17992
|
-
|
|
17993
|
-
|
|
17994
|
-
|
|
17995
|
-
|
|
17996
|
-
|
|
17997
|
-
|
|
17998
|
-
|
|
17999
|
-
var type = this.type;
|
|
18000
|
-
if (type == null || type === 'text' || type === 'textarea') {
|
|
18001
|
-
input = $(this);
|
|
18002
|
-
hasTextInput = true;
|
|
18003
|
-
return false;
|
|
18048
|
+
if (that.isMaterialized() && this.input instanceof HTMLInputElement) {
|
|
18049
|
+
var children = this.host.children();
|
|
18050
|
+
$.each(children, function (index) {
|
|
18051
|
+
var classToAdd = 'jqx-input-group-addon';
|
|
18052
|
+
$(this).removeClass(that.toThemeProperty('jqx-rc-all'));
|
|
18053
|
+
if (index === 0) {
|
|
18054
|
+
classToAdd += ' jqx-rc-l';
|
|
18055
|
+
}
|
|
18056
|
+
if (index === children.length - 1) {
|
|
18057
|
+
classToAdd += ' jqx-rc-r';
|
|
18058
|
+
}
|
|
18059
|
+
if (this !== that.element) {
|
|
18060
|
+
classToAdd += ' jqx-fill-state-normal';
|
|
18004
18061
|
}
|
|
18062
|
+
this.className += ' ' + that.toThemeProperty(classToAdd);
|
|
18005
18063
|
});
|
|
18006
|
-
|
|
18007
|
-
|
|
18008
|
-
|
|
18009
|
-
|
|
18010
|
-
|
|
18011
|
-
|
|
18012
|
-
|
|
18013
|
-
|
|
18014
|
-
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
var children = this.baseHost.children();
|
|
18020
|
-
$.each(children, function (index) {
|
|
18021
|
-
var classToAdd = 'jqx-input-group-addon';
|
|
18022
|
-
$(this).removeClass(that.toThemeProperty('jqx-rc-all'));
|
|
18023
|
-
if (index === 0) {
|
|
18024
|
-
classToAdd += ' jqx-rc-l';
|
|
18025
|
-
}
|
|
18026
|
-
if (index === children.length - 1) {
|
|
18027
|
-
classToAdd += ' jqx-rc-r';
|
|
18028
|
-
}
|
|
18029
|
-
if (this !== that.element) {
|
|
18030
|
-
classToAdd += ' jqx-fill-state-normal';
|
|
18031
|
-
}
|
|
18032
|
-
this.className += ' ' + that.toThemeProperty(classToAdd);
|
|
18033
|
-
});
|
|
18064
|
+
|
|
18065
|
+
var group = $("<div></div>");
|
|
18066
|
+
group.addClass(that.toThemeProperty('jqx-input-group'));
|
|
18067
|
+
this.host.after(group);
|
|
18068
|
+
var input = this.element;
|
|
18069
|
+
var data = this.host.data();
|
|
18070
|
+
|
|
18071
|
+
|
|
18072
|
+
group.append(input);
|
|
18073
|
+
var label = $("<label></label");
|
|
18074
|
+
|
|
18075
|
+
if (this.hint) {
|
|
18076
|
+
label[0].innerHTML = this.placeHolder;
|
|
18034
18077
|
}
|
|
18035
|
-
}
|
|
18036
18078
|
|
|
18037
|
-
|
|
18038
|
-
|
|
18039
|
-
that.element.className += ' ' + that.toThemeProperty('jqx-rtl');
|
|
18040
|
-
}
|
|
18041
|
-
that.element.setAttribute('role', 'textbox');
|
|
18042
|
-
$.jqx.aria(this, 'aria-autocomplete', 'both');
|
|
18043
|
-
$.jqx.aria(this, 'aria-disabled', this.disabled);
|
|
18044
|
-
$.jqx.aria(this, 'aria-readonly', false);
|
|
18045
|
-
$.jqx.aria(this, 'aria-multiline', false);
|
|
18046
|
-
if (this.source && this.source.length) {
|
|
18047
|
-
$.jqx.aria(this, 'aria-haspopup', true);
|
|
18048
|
-
}
|
|
18049
|
-
if (this.value !== '') {
|
|
18050
|
-
this.input.value = this.value;
|
|
18051
|
-
}
|
|
18079
|
+
label.addClass(that.toThemeProperty('jqx-input-label'));
|
|
18080
|
+
group.append(label);
|
|
18052
18081
|
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18082
|
+
var autoCompleteLabel = $("<label class='jqx-input-inline'></label");
|
|
18083
|
+
autoCompleteLabel[0].style.display = 'none';
|
|
18084
|
+
this._inlineLabel = autoCompleteLabel[0];
|
|
18056
18085
|
|
|
18057
|
-
|
|
18058
|
-
var that = this;
|
|
18086
|
+
group.append(autoCompleteLabel);
|
|
18059
18087
|
|
|
18060
|
-
var mapItem = function (item) {
|
|
18061
|
-
if (item === undefined) {
|
|
18062
|
-
return null;
|
|
18063
|
-
}
|
|
18064
18088
|
|
|
18065
|
-
|
|
18066
|
-
|
|
18067
|
-
|
|
18089
|
+
var bar = $("<span></span>");
|
|
18090
|
+
group.append(bar);
|
|
18091
|
+
bar.addClass(that.toThemeProperty('jqx-input-bar'));
|
|
18092
|
+
|
|
18093
|
+
group[0].id = this.element.id;
|
|
18094
|
+
this.element.removeAttribute('id');
|
|
18068
18095
|
|
|
18069
|
-
|
|
18070
|
-
|
|
18071
|
-
|
|
18096
|
+
group[0].style.cssText = this.element.style.cssText;
|
|
18097
|
+
if (this.element.className.indexOf('underlined') >= 0) {
|
|
18098
|
+
group.addClass('underlined');
|
|
18099
|
+
}
|
|
18072
18100
|
|
|
18073
|
-
|
|
18074
|
-
|
|
18075
|
-
|
|
18101
|
+
that.input = that.element;
|
|
18102
|
+
if (!(this.input instanceof HTMLInputElement)) {
|
|
18103
|
+
this.input = this.host.find('input');
|
|
18104
|
+
if (this.input.length > 0) {
|
|
18105
|
+
this.input = this.input[0];
|
|
18076
18106
|
}
|
|
18107
|
+
$(this.input).addClass(this.toThemeProperty("jqx-input-widget"));
|
|
18077
18108
|
}
|
|
18109
|
+
this.label = label;
|
|
18110
|
+
this.bar = bar;
|
|
18111
|
+
this.element.style.cssText = '';
|
|
18112
|
+
this.host = group;
|
|
18113
|
+
this.element = group[0];
|
|
18114
|
+
this.host.data(data);
|
|
18115
|
+
|
|
18116
|
+
var that = this;
|
|
18078
18117
|
|
|
18079
|
-
if (that.
|
|
18080
|
-
|
|
18118
|
+
if (that.template) {
|
|
18119
|
+
that.bar.addClass(that.toThemeProperty("jqx-" + that.template));
|
|
18120
|
+
that.label.addClass(that.toThemeProperty("jqx-" + that.template));
|
|
18081
18121
|
}
|
|
18082
18122
|
|
|
18083
|
-
if (
|
|
18084
|
-
|
|
18123
|
+
if (children.length > 0) {
|
|
18124
|
+
that._hasAddons = true;
|
|
18085
18125
|
}
|
|
18086
|
-
|
|
18087
|
-
|
|
18126
|
+
}
|
|
18127
|
+
else if (this.element.nodeName.toLowerCase() === 'textarea') {
|
|
18128
|
+
this.element.style.overflow = 'auto';
|
|
18129
|
+
} else
|
|
18130
|
+
if (this.element.nodeName.toLowerCase() === 'div') {
|
|
18131
|
+
this.baseHost = this.element;
|
|
18132
|
+
var input = that.element.getElementsByTagName('input');
|
|
18133
|
+
var hasTextInput = false;
|
|
18134
|
+
|
|
18135
|
+
$.each(input, function () {
|
|
18136
|
+
var type = this.type;
|
|
18137
|
+
if (type == null || type === 'text' || type === 'textarea') {
|
|
18138
|
+
input = $(this);
|
|
18139
|
+
hasTextInput = true;
|
|
18140
|
+
return false;
|
|
18141
|
+
}
|
|
18142
|
+
});
|
|
18143
|
+
if (!hasTextInput) {
|
|
18144
|
+
throw new Error('jqxInput: Missing Text Input in the Input Group');
|
|
18145
|
+
}
|
|
18146
|
+
|
|
18147
|
+
if (input.length > 0) {
|
|
18148
|
+
this.baseHost = $(this.element);
|
|
18149
|
+
that.baseElement = that.element;
|
|
18150
|
+
var data = this.host.data();
|
|
18151
|
+
this.host = input;
|
|
18152
|
+
this.element = input[0];
|
|
18153
|
+
that.input = input[0];
|
|
18154
|
+
this.host.data(data);
|
|
18155
|
+
that.baseElement.className += ' ' + that.toThemeProperty('jqx-widget jqx-rc-all jqx-input-group');
|
|
18156
|
+
var children = this.baseHost.children();
|
|
18157
|
+
$.each(children, function (index) {
|
|
18158
|
+
var classToAdd = 'jqx-input-group-addon';
|
|
18159
|
+
$(this).removeClass(that.toThemeProperty('jqx-rc-all'));
|
|
18160
|
+
if (index === 0) {
|
|
18161
|
+
classToAdd += ' jqx-rc-l';
|
|
18162
|
+
}
|
|
18163
|
+
if (index === children.length - 1) {
|
|
18164
|
+
classToAdd += ' jqx-rc-r';
|
|
18165
|
+
}
|
|
18166
|
+
if (this !== that.element) {
|
|
18167
|
+
classToAdd += ' jqx-fill-state-normal';
|
|
18168
|
+
}
|
|
18169
|
+
this.className += ' ' + that.toThemeProperty(classToAdd);
|
|
18170
|
+
});
|
|
18171
|
+
}
|
|
18088
18172
|
}
|
|
18089
18173
|
|
|
18090
|
-
|
|
18174
|
+
this.addHandlers();
|
|
18175
|
+
if (this.rtl) {
|
|
18176
|
+
that.element.className += ' ' + that.toThemeProperty('jqx-rtl');
|
|
18091
18177
|
}
|
|
18092
18178
|
|
|
18093
|
-
|
|
18094
|
-
|
|
18179
|
+
that.input.setAttribute('autocomplete', 'off');
|
|
18180
|
+
that.input.setAttribute('autocorrect', 'off');
|
|
18181
|
+
that.input.setAttribute('spellcheck', false);
|
|
18095
18182
|
|
|
18096
|
-
|
|
18097
|
-
|
|
18098
|
-
|
|
18099
|
-
|
|
18183
|
+
that.element.setAttribute('role', 'textbox');
|
|
18184
|
+
$.jqx.aria(this, 'aria-autocomplete', 'both');
|
|
18185
|
+
$.jqx.aria(this, 'aria-disabled', this.disabled);
|
|
18186
|
+
$.jqx.aria(this, 'aria-readonly', false);
|
|
18187
|
+
$.jqx.aria(this, 'aria-multiline', false);
|
|
18188
|
+
if (this.source && this.source.length) {
|
|
18189
|
+
$.jqx.aria(this, 'aria-haspopup', true);
|
|
18100
18190
|
}
|
|
18101
|
-
|
|
18102
|
-
|
|
18103
|
-
|
|
18104
|
-
if (this.source && this.source._source) {
|
|
18105
|
-
this.adapter = this.source;
|
|
18106
|
-
if (this.adapter._source.localdata != null) {
|
|
18107
|
-
this.adapter.unbindBindingUpdate(this.element.id);
|
|
18108
|
-
this.adapter.bindBindingUpdate(this.element.id, function () {
|
|
18109
|
-
that.source = mapItems(that.adapter.records);
|
|
18110
|
-
});
|
|
18191
|
+
if (this.value !== '') {
|
|
18192
|
+
this.input.value = this.value;
|
|
18111
18193
|
}
|
|
18112
|
-
|
|
18113
|
-
|
|
18114
|
-
|
|
18115
|
-
|
|
18194
|
+
|
|
18195
|
+
this._oldsource = this.source;
|
|
18196
|
+
this._updateSource();
|
|
18197
|
+
},
|
|
18198
|
+
|
|
18199
|
+
_updateSource: function () {
|
|
18200
|
+
var that = this;
|
|
18201
|
+
|
|
18202
|
+
var mapItem = function (item) {
|
|
18203
|
+
if (item === undefined) {
|
|
18204
|
+
return null;
|
|
18116
18205
|
}
|
|
18117
|
-
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
}
|
|
18121
|
-
this.adapter._options.data = postdata;
|
|
18206
|
+
|
|
18207
|
+
if (typeof item === 'string' || item instanceof String) {
|
|
18208
|
+
return { label: item, value: item };
|
|
18122
18209
|
}
|
|
18123
|
-
this.adapter.unbindDownloadComplete(this.element.id);
|
|
18124
|
-
this.adapter.bindDownloadComplete(this.element.id, function () {
|
|
18125
|
-
that.source = mapItems(that.adapter.records);
|
|
18126
|
-
});
|
|
18127
|
-
}
|
|
18128
|
-
this.source.dataBind();
|
|
18129
|
-
return;
|
|
18130
|
-
}
|
|
18131
18210
|
|
|
18132
|
-
|
|
18133
|
-
|
|
18134
|
-
|
|
18135
|
-
},
|
|
18211
|
+
if (typeof item !== 'string' && item instanceof String === false) {
|
|
18212
|
+
var label = '';
|
|
18213
|
+
var value = '';
|
|
18136
18214
|
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
|
|
18140
|
-
|
|
18215
|
+
if (that.displayMember !== '' && that.displayMember !== undefined) {
|
|
18216
|
+
if (item[that.displayMember]) {
|
|
18217
|
+
label = item[that.displayMember];
|
|
18218
|
+
}
|
|
18219
|
+
}
|
|
18141
18220
|
|
|
18142
|
-
|
|
18143
|
-
|
|
18144
|
-
|
|
18145
|
-
if (this.roundedCorners) {
|
|
18146
|
-
hostClass += ' jqx-rc-all';
|
|
18147
|
-
popupClass += ' jqx-rc-all';
|
|
18148
|
-
}
|
|
18149
|
-
if (this.disabled) {
|
|
18150
|
-
hostClass += ' jqx-fill-state-disabled';
|
|
18151
|
-
} else {
|
|
18152
|
-
this.host.removeClass(this.toThemeProperty('jqx-fill-state-disabled'));
|
|
18153
|
-
}
|
|
18154
|
-
this.host[func](this.toThemeProperty(hostClass));
|
|
18155
|
-
this._popupHelper[func](this.toThemeProperty(popupClass));
|
|
18156
|
-
},
|
|
18221
|
+
if (that.valueMember !== '' && that.valueMember !== undefined) {
|
|
18222
|
+
value = item[that.valueMember];
|
|
18223
|
+
}
|
|
18157
18224
|
|
|
18158
|
-
|
|
18159
|
-
|
|
18160
|
-
|
|
18225
|
+
if (label === '') {
|
|
18226
|
+
label = item.label;
|
|
18227
|
+
}
|
|
18228
|
+
if (value === '') {
|
|
18229
|
+
value = item.value;
|
|
18230
|
+
}
|
|
18161
18231
|
|
|
18162
|
-
|
|
18163
|
-
|
|
18164
|
-
|
|
18232
|
+
return { label: label, value: value };
|
|
18233
|
+
}
|
|
18234
|
+
|
|
18235
|
+
return item;
|
|
18236
|
+
};
|
|
18237
|
+
|
|
18238
|
+
var mapItems = function (source) {
|
|
18239
|
+
var items = [];
|
|
18240
|
+
for (var i = 0; i < source.length; i++) {
|
|
18241
|
+
items[i] = mapItem(source[i]);
|
|
18242
|
+
}
|
|
18243
|
+
return items;
|
|
18244
|
+
};
|
|
18165
18245
|
|
|
18166
|
-
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
|
|
18246
|
+
if (this.source && this.source._source) {
|
|
18247
|
+
this.adapter = this.source;
|
|
18248
|
+
if (this.adapter._source.localdata != null) {
|
|
18249
|
+
this.adapter.unbindBindingUpdate(this.element.id);
|
|
18250
|
+
this.adapter.bindBindingUpdate(this.element.id, function () {
|
|
18251
|
+
that.source = mapItems(that.adapter.records);
|
|
18252
|
+
});
|
|
18253
|
+
}
|
|
18254
|
+
else {
|
|
18255
|
+
var postdata = {};
|
|
18256
|
+
if (this.adapter._options.data) {
|
|
18257
|
+
$.extend(that.adapter._options.data, postdata);
|
|
18258
|
+
}
|
|
18259
|
+
else {
|
|
18260
|
+
if (this.source._source.data) {
|
|
18261
|
+
$.extend(postdata, this.source._source.data);
|
|
18262
|
+
}
|
|
18263
|
+
this.adapter._options.data = postdata;
|
|
18264
|
+
}
|
|
18265
|
+
this.adapter.unbindDownloadComplete(this.element.id);
|
|
18266
|
+
this.adapter.bindDownloadComplete(this.element.id, function () {
|
|
18267
|
+
that.source = mapItems(that.adapter.records);
|
|
18268
|
+
});
|
|
18269
|
+
}
|
|
18270
|
+
this.source.dataBind();
|
|
18271
|
+
return;
|
|
18170
18272
|
}
|
|
18171
|
-
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
range.moveEnd('character', textbox[0].value.length);
|
|
18175
|
-
range.moveStart('character', 0);
|
|
18176
|
-
range.select();
|
|
18273
|
+
|
|
18274
|
+
if (!$.isFunction(this.source)) {
|
|
18275
|
+
this.source = mapItems(this.source);
|
|
18177
18276
|
}
|
|
18178
|
-
},
|
|
18179
|
-
},
|
|
18277
|
+
},
|
|
18180
18278
|
|
|
18181
|
-
|
|
18182
|
-
|
|
18183
|
-
|
|
18279
|
+
_refreshClasses: function (add) {
|
|
18280
|
+
var func = add ? 'addClass' : 'removeClass',
|
|
18281
|
+
hostClass = 'jqx-widget-content jqx-input-widget jqx-input jqx-widget',
|
|
18282
|
+
popupClass = 'jqx-popup jqx-input-popup jqx-menu jqx-menu-vertical jqx-menu-dropdown jqx-widget jqx-widget-content';
|
|
18184
18283
|
|
|
18185
|
-
|
|
18186
|
-
|
|
18187
|
-
|
|
18284
|
+
if ($.jqx.browser.msie) {
|
|
18285
|
+
popupClass += ' jqx-noshadow';
|
|
18286
|
+
}
|
|
18287
|
+
if (this.roundedCorners) {
|
|
18288
|
+
hostClass += ' jqx-rc-all';
|
|
18289
|
+
popupClass += ' jqx-rc-all';
|
|
18290
|
+
}
|
|
18291
|
+
if (this.disabled) {
|
|
18292
|
+
hostClass += ' jqx-fill-state-disabled';
|
|
18293
|
+
} else {
|
|
18294
|
+
this.host.removeClass(this.toThemeProperty('jqx-fill-state-disabled'));
|
|
18295
|
+
}
|
|
18296
|
+
this.host[func](this.toThemeProperty(hostClass));
|
|
18297
|
+
this._popupHelper[func](this.toThemeProperty(popupClass));
|
|
18298
|
+
},
|
|
18188
18299
|
|
|
18189
|
-
|
|
18190
|
-
|
|
18300
|
+
selectAll: function () {
|
|
18301
|
+
var that = this;
|
|
18302
|
+
var textbox = this.host;
|
|
18191
18303
|
|
|
18192
|
-
|
|
18193
|
-
|
|
18194
|
-
|
|
18195
|
-
},
|
|
18304
|
+
if (textbox[0] instanceof HTMLInputElement === false) {
|
|
18305
|
+
textbox = $(that.input);
|
|
18306
|
+
}
|
|
18196
18307
|
|
|
18197
|
-
|
|
18198
|
-
|
|
18199
|
-
|
|
18308
|
+
setTimeout(function () {
|
|
18309
|
+
if ('selectionStart' in textbox[0]) {
|
|
18310
|
+
textbox[0].focus();
|
|
18311
|
+
textbox[0].setSelectionRange(0, textbox[0].value.length);
|
|
18312
|
+
}
|
|
18313
|
+
else {
|
|
18314
|
+
var range = textbox[0].createTextRange();
|
|
18315
|
+
range.collapse(true);
|
|
18316
|
+
range.moveEnd('character', textbox[0].value.length);
|
|
18317
|
+
range.moveStart('character', 0);
|
|
18318
|
+
range.select();
|
|
18319
|
+
}
|
|
18320
|
+
}, 10);
|
|
18321
|
+
},
|
|
18200
18322
|
|
|
18201
|
-
|
|
18202
|
-
|
|
18203
|
-
|
|
18323
|
+
selectLast: function () {
|
|
18324
|
+
var that = this;
|
|
18325
|
+
var textbox = this.host;
|
|
18204
18326
|
|
|
18205
|
-
|
|
18206
|
-
|
|
18207
|
-
textbox[0].focus();
|
|
18208
|
-
textbox[0].setSelectionRange(index, index);
|
|
18209
|
-
}
|
|
18210
|
-
else {
|
|
18211
|
-
var range = textbox[0].createTextRange();
|
|
18212
|
-
range.collapse(true);
|
|
18213
|
-
range.moveEnd('character', index);
|
|
18214
|
-
range.moveStart('character', index);
|
|
18215
|
-
range.select();
|
|
18327
|
+
if (textbox[0] instanceof HTMLInputElement === false) {
|
|
18328
|
+
textbox = $(that.input);
|
|
18216
18329
|
}
|
|
18217
|
-
}, 10);
|
|
18218
|
-
},
|
|
18219
18330
|
|
|
18220
|
-
|
|
18221
|
-
|
|
18331
|
+
this.selectStart(textbox[0].value.length);
|
|
18332
|
+
},
|
|
18333
|
+
|
|
18334
|
+
selectFirst: function () {
|
|
18335
|
+
//var textbox = this.host;
|
|
18336
|
+
this.selectStart(0);
|
|
18337
|
+
},
|
|
18338
|
+
|
|
18339
|
+
selectStart: function (index) {
|
|
18222
18340
|
var that = this;
|
|
18223
|
-
|
|
18224
|
-
setTimeout(function () {
|
|
18225
|
-
that.element.focus();
|
|
18226
|
-
}, 25);
|
|
18341
|
+
var textbox = this.host;
|
|
18227
18342
|
|
|
18228
|
-
|
|
18229
|
-
|
|
18230
|
-
|
|
18231
|
-
},
|
|
18343
|
+
if (textbox[0] instanceof HTMLInputElement === false) {
|
|
18344
|
+
textbox = $(that.input);
|
|
18345
|
+
}
|
|
18232
18346
|
|
|
18233
|
-
|
|
18234
|
-
|
|
18235
|
-
|
|
18236
|
-
|
|
18237
|
-
|
|
18347
|
+
setTimeout(function () {
|
|
18348
|
+
if ('selectionStart' in textbox[0]) {
|
|
18349
|
+
textbox[0].focus();
|
|
18350
|
+
textbox[0].setSelectionRange(index, index);
|
|
18351
|
+
}
|
|
18352
|
+
else {
|
|
18353
|
+
var range = textbox[0].createTextRange();
|
|
18354
|
+
range.collapse(true);
|
|
18355
|
+
range.moveEnd('character', index);
|
|
18356
|
+
range.moveStart('character', index);
|
|
18357
|
+
range.select();
|
|
18358
|
+
}
|
|
18359
|
+
}, 10);
|
|
18360
|
+
},
|
|
18238
18361
|
|
|
18239
|
-
|
|
18240
|
-
|
|
18241
|
-
|
|
18362
|
+
focus: function () {
|
|
18363
|
+
try {
|
|
18364
|
+
var that = this;
|
|
18365
|
+
that.element.focus();
|
|
18366
|
+
setTimeout(function () {
|
|
18367
|
+
that.element.focus();
|
|
18368
|
+
}, 25);
|
|
18242
18369
|
|
|
18243
|
-
if (!this.baseHost) {
|
|
18244
|
-
if (this.width != null && this.width.toString().indexOf("px") != -1) {
|
|
18245
|
-
this.element.style.width = parseInt(this.width) + 'px';
|
|
18246
|
-
}
|
|
18247
|
-
else if (this.width != undefined && !isNaN(this.width)) {
|
|
18248
|
-
this.element.style.width = this.width + 'px';
|
|
18249
18370
|
}
|
|
18250
|
-
|
|
18251
|
-
this.element.style.width = this.width;
|
|
18371
|
+
catch (error) {
|
|
18252
18372
|
}
|
|
18373
|
+
},
|
|
18253
18374
|
|
|
18254
|
-
|
|
18255
|
-
|
|
18256
|
-
|
|
18257
|
-
|
|
18258
|
-
|
|
18259
|
-
}
|
|
18260
|
-
else {
|
|
18261
|
-
this.element.style.height = this.height;
|
|
18262
|
-
}
|
|
18263
|
-
if (this._hasAddons) {
|
|
18264
|
-
this._addonsWidth = 35;
|
|
18265
|
-
this.input.style.width = 'calc(100% - ' + this._addonsWidth + 'px)';
|
|
18266
|
-
}
|
|
18267
|
-
} else {
|
|
18268
|
-
if (this.width != null && this.width.toString().indexOf("px") != -1) {
|
|
18269
|
-
this.baseElement.style.width = parseInt(this.width) + 'px';
|
|
18270
|
-
}
|
|
18271
|
-
else if (this.width != undefined && !isNaN(this.width)) {
|
|
18272
|
-
this.baseElement.style.width = this.width + 'px';
|
|
18273
|
-
}
|
|
18375
|
+
resize: function (width, height) {
|
|
18376
|
+
this.width = width;
|
|
18377
|
+
this.height = height;
|
|
18378
|
+
this.refresh();
|
|
18379
|
+
},
|
|
18274
18380
|
|
|
18275
|
-
|
|
18276
|
-
|
|
18277
|
-
|
|
18278
|
-
|
|
18279
|
-
|
|
18280
|
-
|
|
18281
|
-
|
|
18282
|
-
|
|
18283
|
-
|
|
18284
|
-
|
|
18285
|
-
|
|
18286
|
-
|
|
18287
|
-
|
|
18381
|
+
refresh: function () {
|
|
18382
|
+
this._refreshClasses(false);
|
|
18383
|
+
this._refreshClasses(true);
|
|
18384
|
+
|
|
18385
|
+
if (!this.baseHost) {
|
|
18386
|
+
if (this.width != null && this.width.toString().indexOf("px") != -1) {
|
|
18387
|
+
this.element.style.width = parseInt(this.width) + 'px';
|
|
18388
|
+
}
|
|
18389
|
+
else if (this.width != undefined && !isNaN(this.width)) {
|
|
18390
|
+
this.element.style.width = this.width + 'px';
|
|
18391
|
+
}
|
|
18392
|
+
else {
|
|
18393
|
+
this.element.style.width = this.width;
|
|
18394
|
+
}
|
|
18395
|
+
|
|
18396
|
+
if (this.height != null && this.height.toString().indexOf("px") != -1) {
|
|
18397
|
+
this.element.style.height = parseInt(this.height) + 'px';;
|
|
18398
|
+
}
|
|
18399
|
+
else if (this.height != undefined && !isNaN(this.height)) {
|
|
18400
|
+
this.element.style.height = this.height + 'px';
|
|
18401
|
+
}
|
|
18402
|
+
else {
|
|
18403
|
+
this.element.style.height = this.height;
|
|
18404
|
+
}
|
|
18405
|
+
if (this._hasAddons) {
|
|
18406
|
+
this._addonsWidth = 35;
|
|
18407
|
+
this.input.style.width = 'calc(100% - ' + this._addonsWidth + 'px)';
|
|
18288
18408
|
}
|
|
18289
|
-
});
|
|
18290
|
-
that._addonsWidth = totalWidth;
|
|
18291
|
-
if (IE8) {
|
|
18292
|
-
var height = Math.max(0, that.baseElement.offsetHeight - 2);
|
|
18293
|
-
that.element.style.width = Math.max(0, (that.baseElement.offsetWidth - totalWidth - 1)) + 'px';
|
|
18294
|
-
that.element.style.minHeight = height + 'px';
|
|
18295
|
-
that.element.style.lineHeight = height + 'px';
|
|
18296
18409
|
} else {
|
|
18297
|
-
|
|
18298
|
-
|
|
18299
|
-
|
|
18300
|
-
if (
|
|
18301
|
-
|
|
18302
|
-
}
|
|
18303
|
-
|
|
18304
|
-
|
|
18305
|
-
|
|
18306
|
-
|
|
18307
|
-
|
|
18308
|
-
|
|
18309
|
-
|
|
18310
|
-
|
|
18410
|
+
if (this.width != null && this.width.toString().indexOf("px") != -1) {
|
|
18411
|
+
this.baseElement.style.width = parseInt(this.width) + 'px';
|
|
18412
|
+
}
|
|
18413
|
+
else if (this.width != undefined && !isNaN(this.width)) {
|
|
18414
|
+
this.baseElement.style.width = this.width + 'px';
|
|
18415
|
+
}
|
|
18416
|
+
|
|
18417
|
+
if (this.height != null && this.height.toString().indexOf("px") != -1) {
|
|
18418
|
+
this.baseElement.style.height = parseInt(this.height) + 'px';
|
|
18419
|
+
}
|
|
18420
|
+
else if (this.height != undefined && !isNaN(this.height)) {
|
|
18421
|
+
this.baseElement.style.height = this.height + 'px';
|
|
18422
|
+
};
|
|
18423
|
+
var that = this,
|
|
18424
|
+
IE8 = $.jqx.browser.msie && $.jqx.browser.version < 9,
|
|
18425
|
+
totalWidth = 0;
|
|
18426
|
+
$.each(this.baseHost.children(), function () {
|
|
18427
|
+
this.style.height = '100%';
|
|
18428
|
+
if (this !== that.element) {
|
|
18429
|
+
totalWidth += $(this).outerWidth();
|
|
18311
18430
|
}
|
|
18312
|
-
|
|
18431
|
+
});
|
|
18432
|
+
that._addonsWidth = totalWidth;
|
|
18433
|
+
if (IE8) {
|
|
18434
|
+
var height = Math.max(0, that.baseElement.offsetHeight - 2);
|
|
18435
|
+
that.element.style.width = Math.max(0, (that.baseElement.offsetWidth - totalWidth - 1)) + 'px';
|
|
18436
|
+
that.element.style.minHeight = height + 'px';
|
|
18437
|
+
that.element.style.lineHeight = height + 'px';
|
|
18438
|
+
} else {
|
|
18439
|
+
that.element.style.width = 'calc(100% - ' + totalWidth + 'px)';
|
|
18313
18440
|
}
|
|
18314
|
-
|
|
18315
|
-
|
|
18441
|
+
$.jqx.utilities.resize(that.baseHost, function () {
|
|
18442
|
+
if (IE8 && typeof that.width === 'string' && that.width.indexOf('%') !== -1 && !that._initiallyHidden) {
|
|
18443
|
+
that.element.style.width = (that.baseElement.offsetWidth - that._addonsWidth - 1) + 'px';
|
|
18444
|
+
} else if (that._initiallyHidden) {
|
|
18445
|
+
that._addonsWidth = that._getAddonsWidth();
|
|
18446
|
+
if (!IE8) {
|
|
18447
|
+
that.element.style.width = 'calc(100% - ' + that._addonsWidth + 'px)';
|
|
18448
|
+
} else {
|
|
18449
|
+
that.element.style.width = (that.baseElement.offsetWidth - that._addonsWidth - 1) + 'px';
|
|
18450
|
+
var height = that.baseElement.offsetHeight - 2;
|
|
18451
|
+
that.element.style.minHeight = height + 'px';
|
|
18452
|
+
that.element.style.lineHeight = height + 'px';
|
|
18453
|
+
}
|
|
18454
|
+
that._initiallyHidden = false;
|
|
18455
|
+
}
|
|
18456
|
+
});
|
|
18457
|
+
}
|
|
18316
18458
|
|
|
18317
|
-
|
|
18318
|
-
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
|
|
18322
|
-
|
|
18323
|
-
|
|
18459
|
+
if (this.disabled) {
|
|
18460
|
+
this.element.setAttribute('disabled', true);
|
|
18461
|
+
} else {
|
|
18462
|
+
this.element.removeAttribute('disabled');
|
|
18463
|
+
}
|
|
18464
|
+
if (this.maxLength) {
|
|
18465
|
+
this.element.setAttribute('maxlength', this.maxLength);
|
|
18324
18466
|
|
|
18325
|
-
|
|
18326
|
-
|
|
18467
|
+
if (this.input) {
|
|
18468
|
+
this.input.setAttribute('maxlength', this.maxLength);
|
|
18469
|
+
}
|
|
18327
18470
|
}
|
|
18328
|
-
}
|
|
18329
18471
|
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
|
|
18333
|
-
|
|
18472
|
+
if (!this.element.getAttribute('placeholder')) {
|
|
18473
|
+
this._refreshPlaceHolder();
|
|
18474
|
+
}
|
|
18475
|
+
},
|
|
18334
18476
|
|
|
18335
|
-
|
|
18336
|
-
|
|
18477
|
+
_refreshPlaceHolder: function () {
|
|
18478
|
+
var that = this;
|
|
18337
18479
|
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
that.input.value
|
|
18480
|
+
if (!that.isMaterialized() || !that.hint) {
|
|
18481
|
+
|
|
18482
|
+
if ('placeholder' in this.input && !($.jqx.browser.msie && $.jqx.browser.version < 9)) {
|
|
18483
|
+
that.input.setAttribute('placeHolder', that.placeHolder);
|
|
18484
|
+
} else {
|
|
18485
|
+
if (that.input.value === '') {
|
|
18486
|
+
that.input.value = that.placeHolder;
|
|
18487
|
+
}
|
|
18344
18488
|
}
|
|
18345
18489
|
}
|
|
18346
|
-
}
|
|
18347
18490
|
|
|
18348
|
-
|
|
18349
|
-
|
|
18350
|
-
|
|
18491
|
+
if (!that.hint) {
|
|
18492
|
+
return;
|
|
18493
|
+
}
|
|
18351
18494
|
|
|
18352
|
-
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18357
|
-
|
|
18495
|
+
if (that.input.value !== "") {
|
|
18496
|
+
that.element.setAttribute("hint", true);
|
|
18497
|
+
}
|
|
18498
|
+
else {
|
|
18499
|
+
that.element.removeAttribute("hint");
|
|
18500
|
+
}
|
|
18358
18501
|
|
|
18359
|
-
|
|
18360
|
-
|
|
18361
|
-
|
|
18362
|
-
},
|
|
18502
|
+
if (that.label) {
|
|
18503
|
+
that.label.innerHTML = that.placeHolder;
|
|
18504
|
+
}
|
|
18363
18505
|
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
} else {
|
|
18369
|
-
this.host.remove();
|
|
18370
|
-
}
|
|
18371
|
-
if (this.$popup) {
|
|
18372
|
-
this._popupHelper.remove();
|
|
18373
|
-
}
|
|
18374
|
-
},
|
|
18506
|
+
if (this._inlineLabel && that.inlineAutoComplete) {
|
|
18507
|
+
this._inlineLabel.style.display = 'none';
|
|
18508
|
+
that.host.css('overflow', 'visible');
|
|
18509
|
+
}
|
|
18375
18510
|
|
|
18376
|
-
|
|
18377
|
-
if (value.width && value.height && Object.keys(value).length === 2) {
|
|
18378
|
-
object.refresh();
|
|
18379
|
-
}
|
|
18380
|
-
},
|
|
18511
|
+
},
|
|
18381
18512
|
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
if (
|
|
18385
|
-
|
|
18386
|
-
if ($.jqx.browser.msie && $.jqx.browser.version < 9) {
|
|
18387
|
-
object.element.style.width = (object.baseElement.offsetWidth - object._addonsWidth - 1) + 'px';
|
|
18388
|
-
}
|
|
18513
|
+
destroy: function () {
|
|
18514
|
+
this.removeHandlers();
|
|
18515
|
+
if (this.baseHost) {
|
|
18516
|
+
this.baseHost.remove();
|
|
18389
18517
|
} else {
|
|
18390
|
-
|
|
18518
|
+
this.host.remove();
|
|
18391
18519
|
}
|
|
18392
|
-
|
|
18393
|
-
|
|
18520
|
+
if (this.$popup) {
|
|
18521
|
+
this._popupHelper.remove();
|
|
18522
|
+
}
|
|
18523
|
+
},
|
|
18394
18524
|
|
|
18395
|
-
|
|
18396
|
-
if (
|
|
18397
|
-
object.
|
|
18525
|
+
propertiesChangedHandler: function (object, key, value) {
|
|
18526
|
+
if (value.width && value.height && Object.keys(value).length === 2) {
|
|
18527
|
+
object.refresh();
|
|
18398
18528
|
}
|
|
18399
|
-
|
|
18400
|
-
return;
|
|
18401
|
-
}
|
|
18529
|
+
},
|
|
18402
18530
|
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18531
|
+
propertyChangedHandler: function (object, key, oldvalue, value) {
|
|
18532
|
+
if (key === 'width' && value !== oldvalue) {
|
|
18533
|
+
if (object.baseHost) {
|
|
18534
|
+
object.baseElement.style.width = object._toPx(value);
|
|
18535
|
+
if ($.jqx.browser.msie && $.jqx.browser.version < 9) {
|
|
18536
|
+
object.element.style.width = (object.baseElement.offsetWidth - object._addonsWidth - 1) + 'px';
|
|
18537
|
+
}
|
|
18538
|
+
} else {
|
|
18539
|
+
object.element.style.width = object._toPx(value);
|
|
18540
|
+
}
|
|
18541
|
+
return;
|
|
18542
|
+
}
|
|
18406
18543
|
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18544
|
+
if (key === 'placeHolder') {
|
|
18545
|
+
if ((!('placeholder' in object.element) || ($.jqx.browser.msie && $.jqx.browser.version < 9)) && object.input.value === oldvalue) {
|
|
18546
|
+
object.input.value = '';
|
|
18547
|
+
}
|
|
18548
|
+
object._refreshPlaceHolder();
|
|
18549
|
+
return;
|
|
18550
|
+
}
|
|
18410
18551
|
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
object.open();
|
|
18414
|
-
} else {
|
|
18415
|
-
object.close();
|
|
18552
|
+
if (object.batchUpdate && object.batchUpdate.width && object.batchUpdate.height && Object.keys(object.batchUpdate).length === 2) {
|
|
18553
|
+
return;
|
|
18416
18554
|
}
|
|
18417
|
-
return;
|
|
18418
|
-
}
|
|
18419
|
-
if (key === 'source') {
|
|
18420
|
-
object._oldsource = value;
|
|
18421
|
-
object._updateSource();
|
|
18422
|
-
}
|
|
18423
|
-
if (key === 'displayMember' || key === 'valueMember') {
|
|
18424
|
-
object.source = object._oldsource;
|
|
18425
|
-
object._updateSource();
|
|
18426
|
-
}
|
|
18427
|
-
if (key === 'disabled') {
|
|
18428
|
-
$.jqx.aria(object, 'aria-disabled', object.disabled);
|
|
18429
|
-
}
|
|
18430
18555
|
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
}
|
|
18556
|
+
if (key === 'theme') {
|
|
18557
|
+
$.jqx.utilities.setTheme(oldvalue, value, object.host);
|
|
18558
|
+
}
|
|
18435
18559
|
|
|
18436
|
-
|
|
18437
|
-
|
|
18560
|
+
if (key === 'opened') {
|
|
18561
|
+
if (value) {
|
|
18562
|
+
object.open();
|
|
18563
|
+
} else {
|
|
18564
|
+
object.close();
|
|
18565
|
+
}
|
|
18566
|
+
return;
|
|
18567
|
+
}
|
|
18568
|
+
if (key === 'source') {
|
|
18569
|
+
object._oldsource = value;
|
|
18570
|
+
object._updateSource();
|
|
18571
|
+
}
|
|
18572
|
+
if (key === 'displayMember' || key === 'valueMember') {
|
|
18573
|
+
object.source = object._oldsource;
|
|
18574
|
+
object._updateSource();
|
|
18575
|
+
}
|
|
18576
|
+
if (key === 'disabled') {
|
|
18577
|
+
$.jqx.aria(object, 'aria-disabled', object.disabled);
|
|
18578
|
+
}
|
|
18438
18579
|
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18445
|
-
|
|
18446
|
-
|
|
18447
|
-
|
|
18448
|
-
|
|
18449
|
-
|
|
18450
|
-
|
|
18451
|
-
|
|
18580
|
+
if (key === 'value') {
|
|
18581
|
+
object.input.value = value;
|
|
18582
|
+
object._refreshPlaceHolder();
|
|
18583
|
+
}
|
|
18584
|
+
|
|
18585
|
+
object.refresh();
|
|
18586
|
+
},
|
|
18587
|
+
|
|
18588
|
+
select: function (event, ui, changeType) {
|
|
18589
|
+
var that = this;
|
|
18590
|
+
var selectedItem = this._find('jqx-fill-state-pressed', this._popupHelper);
|
|
18591
|
+
|
|
18592
|
+
if (this.inlineAutoComplete) {
|
|
18593
|
+
selectedItem = this.element.querySelector('.jqx-input-inline');
|
|
18594
|
+
selectedItem.style.display = 'none';
|
|
18595
|
+
that.host.css('overflow', 'visible');
|
|
18596
|
+
}
|
|
18597
|
+
|
|
18598
|
+
var val = selectedItem.getAttribute('data-value');
|
|
18599
|
+
var label = selectedItem.getAttribute('data-name');
|
|
18600
|
+
this.input.value = this.renderer(label, this.input.value);
|
|
18601
|
+
this.selectedItem = { 'label': label, 'value': val };
|
|
18602
|
+
this.element.setAttribute('data-value', val);
|
|
18603
|
+
this.element.setAttribute('data-label', label);
|
|
18604
|
+
this._raiseEvent('0', { 'item': { 'label': label, 'value': val }, 'label': label, 'value': val });
|
|
18605
|
+
this._raiseEvent('3', { type: changeType, 'item': { 'label': label, 'value': val }, 'label': label, 'value': val });
|
|
18606
|
+
this.value = label;
|
|
18607
|
+
return this.close();
|
|
18608
|
+
},
|
|
18452
18609
|
|
|
18453
|
-
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
|
|
18610
|
+
val: function (value) {
|
|
18611
|
+
if (arguments.length === 0 || (value != null && typeof (value) === 'object' && !value.label && !value.value)) {
|
|
18612
|
+
if (this.displayMember !== '' && this.valueMember !== '' && this.selectedItem) {
|
|
18613
|
+
if (this.input.value === '') {
|
|
18614
|
+
return '';
|
|
18615
|
+
}
|
|
18616
|
+
return this.selectedItem;
|
|
18458
18617
|
}
|
|
18459
|
-
return this.selectedItem;
|
|
18460
|
-
}
|
|
18461
18618
|
|
|
18462
|
-
|
|
18463
|
-
|
|
18619
|
+
return this.input.value;
|
|
18620
|
+
}
|
|
18464
18621
|
|
|
18465
|
-
|
|
18466
|
-
|
|
18467
|
-
|
|
18468
|
-
|
|
18469
|
-
|
|
18470
|
-
this.input.value = value.label;
|
|
18471
|
-
if (this.input) {
|
|
18622
|
+
if (value && value.label) {
|
|
18623
|
+
this.selectedItem = { 'label': value.label, 'value': value.value };
|
|
18624
|
+
this.element.setAttribute('data-value', value.value);
|
|
18625
|
+
this.element.setAttribute('data-label', value.label);
|
|
18626
|
+
this.value = value;
|
|
18472
18627
|
this.input.value = value.label;
|
|
18628
|
+
if (this.input) {
|
|
18629
|
+
this.input.value = value.label;
|
|
18630
|
+
}
|
|
18631
|
+
return this.input.value;
|
|
18473
18632
|
}
|
|
18474
|
-
return this.input.value;
|
|
18475
|
-
}
|
|
18476
18633
|
|
|
18477
|
-
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
this.element.setAttribute('data-value', value);
|
|
18481
|
-
this.element.setAttribute('data-label', value);
|
|
18482
|
-
if (value && value.label) {
|
|
18483
|
-
this._raiseEvent('3', { type: null, 'item': { 'label': value.label, 'value': value.value }, 'label': value.label, 'value': value.value });
|
|
18484
|
-
}
|
|
18485
|
-
else {
|
|
18486
|
-
this._raiseEvent('3', { type: null, 'item': { 'label': value, 'value': value }, 'label': value, 'value': value });
|
|
18487
|
-
}
|
|
18488
|
-
this._refreshPlaceHolder();
|
|
18489
|
-
return this.input.value;
|
|
18490
|
-
},
|
|
18634
|
+
this.value = value;
|
|
18635
|
+
this.input.value = value;
|
|
18491
18636
|
|
|
18492
|
-
|
|
18493
|
-
|
|
18494
|
-
|
|
18495
|
-
|
|
18637
|
+
this.element.setAttribute('data-value', value);
|
|
18638
|
+
this.element.setAttribute('data-label', value);
|
|
18639
|
+
if (value && value.label) {
|
|
18640
|
+
this._raiseEvent('3', { type: null, 'item': { 'label': value.label, 'value': value.value }, 'label': value.label, 'value': value.value });
|
|
18641
|
+
}
|
|
18642
|
+
else {
|
|
18643
|
+
this._raiseEvent('3', { type: null, 'item': { 'label': value, 'value': value }, 'label': value, 'value': value });
|
|
18644
|
+
}
|
|
18645
|
+
this._refreshPlaceHolder();
|
|
18646
|
+
return this.input.value;
|
|
18647
|
+
},
|
|
18496
18648
|
|
|
18497
|
-
|
|
18498
|
-
|
|
18649
|
+
_raiseEvent: function (id, arg) {
|
|
18650
|
+
if (arg === undefined) {
|
|
18651
|
+
arg = { owner: null };
|
|
18652
|
+
}
|
|
18499
18653
|
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
event.args = arg;
|
|
18503
|
-
if (event.preventDefault) {
|
|
18504
|
-
event.preventDefault();
|
|
18505
|
-
}
|
|
18654
|
+
var evt = this.events[id];
|
|
18655
|
+
arg.owner = this;
|
|
18506
18656
|
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18657
|
+
var event = new $.Event(evt);
|
|
18658
|
+
event.owner = this;
|
|
18659
|
+
event.args = arg;
|
|
18660
|
+
if (event.preventDefault) {
|
|
18661
|
+
event.preventDefault();
|
|
18662
|
+
}
|
|
18510
18663
|
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18664
|
+
var result = this.host.trigger(event);
|
|
18665
|
+
return result;
|
|
18666
|
+
},
|
|
18514
18667
|
|
|
18515
|
-
|
|
18516
|
-
|
|
18517
|
-
|
|
18518
|
-
}
|
|
18668
|
+
_renderer: function (item) {
|
|
18669
|
+
return item;
|
|
18670
|
+
},
|
|
18519
18671
|
|
|
18520
|
-
|
|
18521
|
-
|
|
18522
|
-
|
|
18672
|
+
open: function () {
|
|
18673
|
+
if ($.jqx.isHidden(this.host)) {
|
|
18674
|
+
return;
|
|
18675
|
+
}
|
|
18523
18676
|
|
|
18524
|
-
|
|
18525
|
-
|
|
18526
|
-
|
|
18527
|
-
$.jqx.aria(this, 'aria-owns', popupId);
|
|
18528
|
-
document.body.appendChild(this.$popup);
|
|
18529
|
-
}
|
|
18677
|
+
var position = $.extend({}, this.host.coord(true), {
|
|
18678
|
+
height: this.element.offsetHeight
|
|
18679
|
+
});
|
|
18530
18680
|
|
|
18531
|
-
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
|
|
18535
|
-
|
|
18681
|
+
if (this.$popup.parentNode !== document.body) {
|
|
18682
|
+
var popupId = this.element.id + '_popup';
|
|
18683
|
+
this.$popup.id = popupId;
|
|
18684
|
+
$.jqx.aria(this, 'aria-owns', popupId);
|
|
18685
|
+
document.body.appendChild(this.$popup);
|
|
18686
|
+
}
|
|
18536
18687
|
|
|
18537
|
-
|
|
18538
|
-
|
|
18539
|
-
|
|
18540
|
-
|
|
18541
|
-
|
|
18542
|
-
this.$popup.style.height = this._toPx(height);
|
|
18688
|
+
this.$popup.style.position = 'absolute';
|
|
18689
|
+
this.$popup.style.zIndex = this.popupZIndex;
|
|
18690
|
+
this.$popup.style.top = this._toPx(position.top + position.height);
|
|
18691
|
+
this.$popup.style.left = this._toPx(position.left);
|
|
18692
|
+
this.$popup.style.display = 'block';
|
|
18543
18693
|
|
|
18544
|
-
|
|
18545
|
-
var
|
|
18546
|
-
|
|
18547
|
-
|
|
18694
|
+
var height = 0;
|
|
18695
|
+
var children = this._popupHelper.children();
|
|
18696
|
+
$.each(children, function () {
|
|
18697
|
+
height += $(this).outerHeight() + 1;
|
|
18698
|
+
});
|
|
18699
|
+
this.$popup.style.height = this._toPx(height);
|
|
18548
18700
|
|
|
18549
|
-
if (
|
|
18550
|
-
var
|
|
18551
|
-
|
|
18552
|
-
|
|
18701
|
+
if (this.enableBrowserBoundsDetection) {
|
|
18702
|
+
var viewHeight = $(window).height() + $(window).scrollTop();
|
|
18703
|
+
var offset = $(this.$popup).offset();
|
|
18704
|
+
var dpHeight = $(this.$popup).outerHeight();
|
|
18705
|
+
|
|
18706
|
+
if (offset.top + dpHeight > viewHeight) {
|
|
18707
|
+
var newPosition = position.top + position.height - dpHeight - this.host.height();
|
|
18708
|
+
if (newPosition < 0) {
|
|
18709
|
+
newPosition = 0;
|
|
18710
|
+
}
|
|
18711
|
+
this.$popup.style.top = newPosition + 'px';
|
|
18553
18712
|
}
|
|
18554
|
-
this.$popup.style.top = newPosition + 'px';
|
|
18555
18713
|
}
|
|
18556
|
-
}
|
|
18557
18714
|
|
|
18558
|
-
|
|
18559
|
-
|
|
18560
|
-
|
|
18561
|
-
|
|
18562
|
-
|
|
18563
|
-
|
|
18564
|
-
close: function () {
|
|
18565
|
-
if (!this.opened) {
|
|
18566
|
-
return;
|
|
18567
|
-
}
|
|
18715
|
+
this.opened = true;
|
|
18716
|
+
this._raiseEvent('1', { popup: this.$popup });
|
|
18717
|
+
$.jqx.aria(this, 'aria-expanded', true);
|
|
18718
|
+
return this;
|
|
18719
|
+
},
|
|
18568
18720
|
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
this._refreshPlaceHolder();
|
|
18574
|
-
return this;
|
|
18575
|
-
},
|
|
18721
|
+
close: function () {
|
|
18722
|
+
if (this._inlineLabel) {
|
|
18723
|
+
this._inlineLabel.style.display = 'none';
|
|
18724
|
+
}
|
|
18576
18725
|
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18726
|
+
if (!this.opened) {
|
|
18727
|
+
return;
|
|
18728
|
+
}
|
|
18580
18729
|
|
|
18581
|
-
|
|
18582
|
-
|
|
18583
|
-
|
|
18730
|
+
this.$popup.style.display = 'none';
|
|
18731
|
+
this.opened = false;
|
|
18732
|
+
this._raiseEvent('2', { popup: this.$popup });
|
|
18733
|
+
$.jqx.aria(this, 'aria-expanded', false);
|
|
18734
|
+
this._refreshPlaceHolder();
|
|
18735
|
+
return this;
|
|
18736
|
+
},
|
|
18584
18737
|
|
|
18585
|
-
|
|
18586
|
-
items
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
items = this.source;
|
|
18590
|
-
}
|
|
18738
|
+
suggest: function () {
|
|
18739
|
+
var items;
|
|
18740
|
+
var that = this;
|
|
18741
|
+
this.query = this.input.value;
|
|
18591
18742
|
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18743
|
+
if (that.inlineAutoComplete && that.aiKey) {
|
|
18744
|
+
this.load([]);
|
|
18745
|
+
return;
|
|
18746
|
+
}
|
|
18747
|
+
if (!this.query || this.query.length < this.minLength) {
|
|
18748
|
+
if (this._inlineLabel) {
|
|
18749
|
+
this._inlineLabel.style.display = 'none';
|
|
18750
|
+
}
|
|
18595
18751
|
|
|
18596
|
-
|
|
18597
|
-
|
|
18752
|
+
return this.opened ? this.close() : this;
|
|
18753
|
+
}
|
|
18598
18754
|
|
|
18599
|
-
|
|
18600
|
-
|
|
18601
|
-
|
|
18755
|
+
if ($.isFunction(this.source)) {
|
|
18756
|
+
items = this.source(this.query, $.proxy(this.load, this));
|
|
18757
|
+
}
|
|
18758
|
+
else {
|
|
18759
|
+
items = this.source;
|
|
18760
|
+
}
|
|
18602
18761
|
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
if (that.filter(item)) {
|
|
18606
|
-
items.push(item);
|
|
18762
|
+
if (items) {
|
|
18763
|
+
return this.load(items);
|
|
18607
18764
|
}
|
|
18608
|
-
}
|
|
18609
18765
|
|
|
18610
|
-
|
|
18766
|
+
return this;
|
|
18767
|
+
},
|
|
18611
18768
|
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18769
|
+
load: function (originalItems) {
|
|
18770
|
+
var that = this,
|
|
18771
|
+
items = [];
|
|
18772
|
+
|
|
18773
|
+
var searchMode = this.searchMode;
|
|
18774
|
+
if (this.inlineAutoComplete) {
|
|
18775
|
+
this.searchMode = 'startswith';
|
|
18618
18776
|
}
|
|
18619
|
-
}
|
|
18620
18777
|
|
|
18621
|
-
|
|
18622
|
-
|
|
18778
|
+
for (var i = 0; i < originalItems.length; i++) {
|
|
18779
|
+
var item = originalItems[i];
|
|
18780
|
+
if (that.filter(item)) {
|
|
18781
|
+
items.push(item);
|
|
18782
|
+
}
|
|
18783
|
+
}
|
|
18623
18784
|
|
|
18624
|
-
|
|
18625
|
-
var value = this.query;
|
|
18626
|
-
var itemValue = item;
|
|
18627
|
-
if (item.label != null) {
|
|
18628
|
-
itemValue = item.label;
|
|
18629
|
-
}
|
|
18630
|
-
else if (this.displayMember) {
|
|
18631
|
-
itemValue = item[this.displayMember];
|
|
18632
|
-
}
|
|
18785
|
+
items = this.sort(items);
|
|
18633
18786
|
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18639
|
-
case 'contains':
|
|
18640
|
-
return $.jqx.string.contains(itemValue, value);
|
|
18641
|
-
case 'equals':
|
|
18642
|
-
return $.jqx.string.equals(itemValue, value);
|
|
18643
|
-
case 'equalsignorecase':
|
|
18644
|
-
return $.jqx.string.equalsIgnoreCase(itemValue, value);
|
|
18645
|
-
case 'startswith':
|
|
18646
|
-
return $.jqx.string.startsWith(itemValue, value);
|
|
18647
|
-
case 'startswithignorecase':
|
|
18648
|
-
return $.jqx.string.startsWithIgnoreCase(itemValue, value);
|
|
18649
|
-
case 'endswith':
|
|
18650
|
-
return $.jqx.string.endsWith(itemValue, value);
|
|
18651
|
-
case 'endswithignorecase':
|
|
18652
|
-
return $.jqx.string.endsWithIgnoreCase(itemValue, value);
|
|
18653
|
-
}
|
|
18654
|
-
},
|
|
18787
|
+
if (!items.length) {
|
|
18788
|
+
if (this.inlineAutoComplete) {
|
|
18789
|
+
var labelElement = this.element.querySelector('.jqx-input-inline');
|
|
18790
|
+
labelElement.style.display = 'none';
|
|
18791
|
+
that.host.css('overflow', 'visible');
|
|
18655
18792
|
|
|
18656
|
-
|
|
18657
|
-
|
|
18793
|
+
if (that._writeTimer) {
|
|
18794
|
+
clearTimeout(that._writeTimer);
|
|
18795
|
+
}
|
|
18796
|
+
that._writeTimer = setTimeout(function () {
|
|
18797
|
+
that.getAISuggestions(function (suggestion) {
|
|
18798
|
+
if (suggestion) {
|
|
18799
|
+
suggestion = that.input.value + suggestion;
|
|
18800
|
+
labelElement.textContent = suggestion;
|
|
18801
|
+
labelElement.setAttribute('data-value', suggestion);
|
|
18802
|
+
labelElement.setAttribute('data-name', suggestion);
|
|
18803
|
+
labelElement.style.opacity = 0.5;
|
|
18804
|
+
labelElement.style.position = 'absolute';
|
|
18805
|
+
labelElement.style.zIndex = 5;
|
|
18806
|
+
labelElement.style.display = '';
|
|
18807
|
+
labelElement.style.left = '6px';
|
|
18808
|
+
labelElement.style.lineHeight = that.height + 'px';
|
|
18809
|
+
that.host.css('overflow', 'hidden');
|
|
18810
|
+
that.searchMode = searchMode;
|
|
18811
|
+
}
|
|
18812
|
+
});
|
|
18813
|
+
}, 500);
|
|
18814
|
+
}
|
|
18658
18815
|
|
|
18659
|
-
|
|
18660
|
-
|
|
18816
|
+
if (this.opened) {
|
|
18817
|
+
return this.close();
|
|
18818
|
+
}
|
|
18819
|
+
else {
|
|
18820
|
+
return this;
|
|
18821
|
+
}
|
|
18822
|
+
}
|
|
18823
|
+
|
|
18824
|
+
if (this.inlineAutoComplete) {
|
|
18825
|
+
var item = items.length ? items[0] : '';
|
|
18826
|
+
var label = typeof item === 'string' ? item : item.label;
|
|
18827
|
+
var value = typeof item === 'string' ? item : item.value;
|
|
18828
|
+
var labelElement = this.element.querySelector('.jqx-input-inline');
|
|
18829
|
+
labelElement.textContent = label;
|
|
18830
|
+
labelElement.setAttribute('data-value', value);
|
|
18831
|
+
labelElement.setAttribute('data-name', label);
|
|
18832
|
+
labelElement.style.opacity = 0.5;
|
|
18833
|
+
labelElement.style.position = 'absolute';
|
|
18834
|
+
labelElement.style.zIndex = 5;
|
|
18835
|
+
labelElement.style.display = '';
|
|
18836
|
+
labelElement.style.left = '6px';
|
|
18837
|
+
labelElement.style.lineHeight = that.height + 'px';
|
|
18838
|
+
this.searchMode = searchMode;
|
|
18839
|
+
that.host.css('overflow', 'hidden');
|
|
18840
|
+
|
|
18841
|
+
this.getAISuggestions(function (suggestion) {
|
|
18842
|
+
if (suggestion) {
|
|
18843
|
+
labelElement.textContent = suggestion;
|
|
18844
|
+
}
|
|
18845
|
+
});
|
|
18846
|
+
return;
|
|
18847
|
+
}
|
|
18848
|
+
return this._render(items.slice(0, this.items)).open();
|
|
18849
|
+
},
|
|
18661
18850
|
|
|
18851
|
+
_filter: function (item) {
|
|
18852
|
+
var value = this.query;
|
|
18662
18853
|
var itemValue = item;
|
|
18663
|
-
if (item.label) {
|
|
18854
|
+
if (item.label != null) {
|
|
18664
18855
|
itemValue = item.label;
|
|
18665
18856
|
}
|
|
18666
18857
|
else if (this.displayMember) {
|
|
18667
18858
|
itemValue = item[this.displayMember];
|
|
18668
18859
|
}
|
|
18669
18860
|
|
|
18670
|
-
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
|
|
18674
|
-
|
|
18861
|
+
switch (this.searchMode) {
|
|
18862
|
+
case 'none':
|
|
18863
|
+
break;
|
|
18864
|
+
default: // ('containsignorecase')
|
|
18865
|
+
return $.jqx.string.containsIgnoreCase(itemValue, value);
|
|
18866
|
+
case 'contains':
|
|
18867
|
+
return $.jqx.string.contains(itemValue, value);
|
|
18868
|
+
case 'equals':
|
|
18869
|
+
return $.jqx.string.equals(itemValue, value);
|
|
18870
|
+
case 'equalsignorecase':
|
|
18871
|
+
return $.jqx.string.equalsIgnoreCase(itemValue, value);
|
|
18872
|
+
case 'startswith':
|
|
18873
|
+
return $.jqx.string.startsWith(itemValue, value);
|
|
18874
|
+
case 'startswithignorecase':
|
|
18875
|
+
return $.jqx.string.startsWithIgnoreCase(itemValue, value);
|
|
18876
|
+
case 'endswith':
|
|
18877
|
+
return $.jqx.string.endsWith(itemValue, value);
|
|
18878
|
+
case 'endswithignorecase':
|
|
18879
|
+
return $.jqx.string.endsWithIgnoreCase(itemValue, value);
|
|
18675
18880
|
}
|
|
18676
|
-
|
|
18677
|
-
|
|
18881
|
+
},
|
|
18882
|
+
|
|
18883
|
+
_sort: function (items) {
|
|
18884
|
+
var bw = [], cs = [], cis = [];
|
|
18885
|
+
|
|
18886
|
+
for (var i = 0; i < items.length; i++) {
|
|
18887
|
+
var item = items[i];
|
|
18888
|
+
|
|
18889
|
+
var itemValue = item;
|
|
18890
|
+
if (item.label) {
|
|
18891
|
+
itemValue = item.label;
|
|
18892
|
+
}
|
|
18893
|
+
else if (this.displayMember) {
|
|
18894
|
+
itemValue = item[this.displayMember];
|
|
18895
|
+
}
|
|
18896
|
+
|
|
18897
|
+
if (itemValue.toString().toLowerCase().indexOf(this.query.toString().toLowerCase()) === 0) {
|
|
18898
|
+
bw.push(item);
|
|
18899
|
+
}
|
|
18900
|
+
else if (itemValue.toString().indexOf(this.query) >= 0) {
|
|
18901
|
+
cs.push(item);
|
|
18902
|
+
}
|
|
18903
|
+
else if (itemValue.toString().toLowerCase().indexOf(this.query.toString().toLowerCase()) >= 0) {
|
|
18904
|
+
cis.push(item);
|
|
18905
|
+
}
|
|
18678
18906
|
}
|
|
18679
|
-
}
|
|
18680
18907
|
|
|
18681
|
-
|
|
18682
|
-
|
|
18908
|
+
return bw.concat(cs, cis);
|
|
18909
|
+
},
|
|
18683
18910
|
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18911
|
+
_highlight: function (item) {
|
|
18912
|
+
var query = this.query;
|
|
18913
|
+
query = query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
|
18687
18914
|
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18915
|
+
var regex = new RegExp('(' + query + ')', 'ig');
|
|
18916
|
+
return item.replace(regex, function ($1, match) {
|
|
18917
|
+
return '<b>' + match + '</b>';
|
|
18918
|
+
});
|
|
18919
|
+
},
|
|
18693
18920
|
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18921
|
+
escapeHTML: function (value) {
|
|
18922
|
+
var entityMap = {
|
|
18923
|
+
'&': '&', '<': '<', '>': '>', '"': '"', '\'': ''', '/': '/', '`': '`', '=': '='
|
|
18924
|
+
};
|
|
18698
18925
|
|
|
18699
|
-
|
|
18700
|
-
|
|
18926
|
+
return String(value).replace(/[&<>"'`=\/]/g, function (s) { return entityMap[s] });
|
|
18927
|
+
},
|
|
18701
18928
|
|
|
18702
|
-
|
|
18703
|
-
|
|
18704
|
-
|
|
18705
|
-
|
|
18929
|
+
sanitizeHTML: function (value) {
|
|
18930
|
+
var that = this;
|
|
18931
|
+
var regExp = new RegExp('<\s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)[^>]*>(.*?)<\s*/\s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)>', 'ig');
|
|
18932
|
+
var result = String(value).replace(regExp, function (s) { return that.escapeHTML(s) });
|
|
18706
18933
|
|
|
18707
|
-
|
|
18708
|
-
|
|
18934
|
+
return result;
|
|
18935
|
+
},
|
|
18709
18936
|
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18937
|
+
escape_HTML: function (html_str) {
|
|
18938
|
+
if (html_str && html_str.indexOf && (html_str.indexOf('onclick') >= 0 || html_str.indexOf('onload') >= 0 || html_str.indexOf('onerror') >= 0)) {
|
|
18939
|
+
return this.escapeHTML(html_str)
|
|
18940
|
+
}
|
|
18714
18941
|
|
|
18715
|
-
|
|
18942
|
+
var sanitized = this.sanitizeHTML(html_str);
|
|
18716
18943
|
|
|
18717
|
-
|
|
18718
|
-
|
|
18944
|
+
return sanitized;
|
|
18945
|
+
},
|
|
18719
18946
|
|
|
18720
|
-
|
|
18721
|
-
|
|
18722
|
-
|
|
18947
|
+
_render: function (originalItems) {
|
|
18948
|
+
var that = this,
|
|
18949
|
+
popupChildren = that._popupHelper.children();
|
|
18723
18950
|
|
|
18724
|
-
|
|
18725
|
-
|
|
18726
|
-
|
|
18951
|
+
if (popupChildren.length > 0) {
|
|
18952
|
+
for (var j = 0; j < popupChildren.length; j++) {
|
|
18953
|
+
$(popupChildren[j]).remove();
|
|
18954
|
+
}
|
|
18727
18955
|
}
|
|
18728
|
-
}
|
|
18729
18956
|
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
|
|
18733
|
-
|
|
18734
|
-
|
|
18735
|
-
|
|
18736
|
-
|
|
18737
|
-
|
|
18738
|
-
|
|
18957
|
+
var mapItem = function (item, index) {
|
|
18958
|
+
var itemValue = item,
|
|
18959
|
+
i = document.createElement('li'),
|
|
18960
|
+
a = document.createElement('a'),
|
|
18961
|
+
dataName, dataValue;
|
|
18962
|
+
a.setAttribute('href', '#');
|
|
18963
|
+
i.appendChild(a);
|
|
18964
|
+
if (item.value !== undefined && item.value !== null) {
|
|
18965
|
+
if (item.label !== undefined && item.label !== null) {
|
|
18966
|
+
dataName = item.label;
|
|
18967
|
+
dataValue = that.escape_HTML(item.value);
|
|
18968
|
+
} else {
|
|
18969
|
+
dataName = item.value;
|
|
18970
|
+
dataValue = that.escape_HTML(item.value);
|
|
18971
|
+
}
|
|
18972
|
+
} else if (item.label !== undefined && item.label !== null) {
|
|
18739
18973
|
dataName = item.label;
|
|
18740
|
-
dataValue =
|
|
18974
|
+
dataValue = item.label;
|
|
18975
|
+
} else if (that.displayMember !== undefined && that.displayMember !== '') {
|
|
18976
|
+
dataName = item[that.displayMember];
|
|
18977
|
+
dataValue = item[that.valueMember];
|
|
18741
18978
|
} else {
|
|
18742
|
-
dataName = item
|
|
18743
|
-
dataValue =
|
|
18744
|
-
}
|
|
18745
|
-
|
|
18746
|
-
dataName
|
|
18747
|
-
dataValue = item.label;
|
|
18748
|
-
} else if (that.displayMember !== undefined && that.displayMember !== '') {
|
|
18749
|
-
dataName = item[that.displayMember];
|
|
18750
|
-
dataValue = item[that.valueMember];
|
|
18751
|
-
} else {
|
|
18752
|
-
dataName = item;
|
|
18753
|
-
dataValue = item;
|
|
18754
|
-
}
|
|
18755
|
-
i.setAttribute('data-value', dataValue);
|
|
18756
|
-
i.setAttribute('data-name', dataName);
|
|
18979
|
+
dataName = item;
|
|
18980
|
+
dataValue = item;
|
|
18981
|
+
}
|
|
18982
|
+
i.setAttribute('data-value', dataValue);
|
|
18983
|
+
i.setAttribute('data-name', dataName);
|
|
18757
18984
|
|
|
18758
|
-
|
|
18759
|
-
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
|
|
18985
|
+
if (item.label) {
|
|
18986
|
+
itemValue = item.label;
|
|
18987
|
+
}
|
|
18988
|
+
else if (that.displayMember) {
|
|
18989
|
+
itemValue = item[that.displayMember];
|
|
18990
|
+
}
|
|
18764
18991
|
|
|
18765
|
-
|
|
18766
|
-
|
|
18767
|
-
|
|
18768
|
-
|
|
18769
|
-
|
|
18770
|
-
|
|
18771
|
-
|
|
18992
|
+
a.innerHTML = that.highlight(itemValue);
|
|
18993
|
+
var plusClass = '';
|
|
18994
|
+
if (that.rtl) {
|
|
18995
|
+
plusClass = ' jqx-rtl';
|
|
18996
|
+
}
|
|
18997
|
+
if (index === 0) {
|
|
18998
|
+
plusClass += ' jqx-fill-state-pressed';
|
|
18999
|
+
}
|
|
19000
|
+
i.className = that.toThemeProperty('jqx-item jqx-menu-item jqx-rc-all' + plusClass);
|
|
19001
|
+
that.$popup.appendChild(i);
|
|
19002
|
+
|
|
19003
|
+
that.addHandler(i, 'mouseenter', function (event) { that.mouseenter(event); });
|
|
19004
|
+
};
|
|
19005
|
+
|
|
19006
|
+
var mapItems = function (source) {
|
|
19007
|
+
for (var i = 0; i < source.length; i++) {
|
|
19008
|
+
mapItem(source[i], i);
|
|
19009
|
+
}
|
|
19010
|
+
};
|
|
19011
|
+
|
|
19012
|
+
mapItems(originalItems);
|
|
19013
|
+
|
|
19014
|
+
if (!this.dropDownWidth) {
|
|
19015
|
+
this.$popup.style.width = that._toPx(that.element.offsetWidth - 6);
|
|
19016
|
+
} else {
|
|
19017
|
+
this.$popup.style.width = that._toPx(that.dropDownWidth);
|
|
18772
19018
|
}
|
|
18773
|
-
i.className = that.toThemeProperty('jqx-item jqx-menu-item jqx-rc-all' + plusClass);
|
|
18774
|
-
that.$popup.appendChild(i);
|
|
18775
19019
|
|
|
18776
|
-
|
|
18777
|
-
}
|
|
19020
|
+
return this;
|
|
19021
|
+
},
|
|
18778
19022
|
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
19023
|
+
next: function () {
|
|
19024
|
+
var active = this._find('jqx-fill-state-pressed', this._popupHelper),
|
|
19025
|
+
next = active.nextSibling;
|
|
19026
|
+
$(active).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
19027
|
+
if (!next) {
|
|
19028
|
+
next = this.$popup.firstChild;
|
|
18782
19029
|
}
|
|
18783
|
-
};
|
|
18784
19030
|
|
|
18785
|
-
|
|
19031
|
+
next.className += ' ' + this.toThemeProperty('jqx-fill-state-pressed');
|
|
19032
|
+
},
|
|
18786
19033
|
|
|
18787
|
-
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
this
|
|
18791
|
-
|
|
19034
|
+
prev: function () {
|
|
19035
|
+
var active = this._find('jqx-fill-state-pressed', this._popupHelper),
|
|
19036
|
+
prev = active.previousSibling;
|
|
19037
|
+
$(active).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
19038
|
+
if (!prev) {
|
|
19039
|
+
prev = this.$popup.lastChild;
|
|
19040
|
+
}
|
|
18792
19041
|
|
|
18793
|
-
|
|
18794
|
-
|
|
19042
|
+
prev.className += ' ' + this.toThemeProperty('jqx-fill-state-pressed');
|
|
19043
|
+
},
|
|
18795
19044
|
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
|
|
19045
|
+
addHandlers: function () {
|
|
19046
|
+
var that = this,
|
|
19047
|
+
eventNamespace = '.jqxInput' + that.element.id;
|
|
19048
|
+
that.addHandler(that.host, 'focus' + eventNamespace, function () { that.onFocus(); });
|
|
19049
|
+
that.addHandler(that.host, 'blur' + eventNamespace, function () { that.onBlur(); });
|
|
19050
|
+
if (that.isMaterialized() && this.input instanceof HTMLInputElement) {
|
|
19051
|
+
that.addHandler(that.input, 'blur' + eventNamespace, function () { that.onBlur(); });
|
|
19052
|
+
}
|
|
18803
19053
|
|
|
18804
|
-
|
|
18805
|
-
|
|
19054
|
+
that.addHandler(that.host, 'change' + eventNamespace, function (event) {
|
|
19055
|
+
if (that.opened && !event.args) {
|
|
19056
|
+
event.stopPropagation();
|
|
19057
|
+
event.preventDefault();
|
|
19058
|
+
event.stopImmediatePropagation();
|
|
18806
19059
|
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
|
|
18813
|
-
}
|
|
19060
|
+
return;
|
|
19061
|
+
}
|
|
19062
|
+
if (!event.args) {
|
|
19063
|
+
event.stopPropagation();
|
|
19064
|
+
event.preventDefault();
|
|
19065
|
+
event.stopImmediatePropagation();
|
|
18814
19066
|
|
|
18815
|
-
|
|
18816
|
-
|
|
19067
|
+
var item = that.val(),
|
|
19068
|
+
label, val;
|
|
19069
|
+
if (item && item.label) {
|
|
19070
|
+
label = item.label;
|
|
19071
|
+
val = item.val;
|
|
19072
|
+
}
|
|
19073
|
+
else {
|
|
19074
|
+
label = item;
|
|
19075
|
+
val = item;
|
|
19076
|
+
}
|
|
19077
|
+
that._raiseEvent('3', { type: 'keyboard', 'item': { 'label': label, 'value': val }, 'label': label, 'value': val });
|
|
19078
|
+
that.value = label;
|
|
19079
|
+
that._refreshPlaceHolder();
|
|
19080
|
+
}
|
|
19081
|
+
});
|
|
18817
19082
|
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
if (that.isMaterialized() && this.input instanceof HTMLInputElement) {
|
|
18824
|
-
that.addHandler(that.input, 'blur' + eventNamespace, function () { that.onBlur(); });
|
|
18825
|
-
}
|
|
19083
|
+
that.addHandler(that.host, 'keypress' + eventNamespace, function (event) { that.keypress(event); });
|
|
19084
|
+
that.addHandler(that.host, 'keyup' + eventNamespace, function (event) { that.keyup(event); });
|
|
19085
|
+
that.addHandler(that.host, 'keydown' + eventNamespace, function (event) { that.keydown(event); });
|
|
19086
|
+
that.addHandler(that.$popup, 'pointerdown' + eventNamespace, function (event) { that.click(event); });
|
|
19087
|
+
},
|
|
18826
19088
|
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
|
|
19089
|
+
removeHandlers: function () {
|
|
19090
|
+
var that = this,
|
|
19091
|
+
eventNamespace = '.jqxInput' + that.element.id;
|
|
19092
|
+
that.removeHandler(that.host, 'change' + eventNamespace);
|
|
19093
|
+
that.removeHandler(that.host, 'focus' + eventNamespace);
|
|
19094
|
+
that.removeHandler(that.host, 'blur' + eventNamespace);
|
|
19095
|
+
that.removeHandler(that.host, 'keypress' + eventNamespace);
|
|
19096
|
+
that.removeHandler(that.host, 'keyup' + eventNamespace);
|
|
19097
|
+
that.removeHandler(that.host, 'keydown' + eventNamespace);
|
|
19098
|
+
that.removeHandler(that.$popup, 'pointerdown' + eventNamespace);
|
|
19099
|
+
},
|
|
18832
19100
|
|
|
19101
|
+
move: function (e) {
|
|
19102
|
+
if (!this.opened) {
|
|
18833
19103
|
return;
|
|
18834
19104
|
}
|
|
18835
|
-
if (!event.args) {
|
|
18836
|
-
event.stopPropagation();
|
|
18837
|
-
event.preventDefault();
|
|
18838
|
-
event.stopImmediatePropagation();
|
|
18839
19105
|
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18850
|
-
|
|
18851
|
-
|
|
18852
|
-
|
|
19106
|
+
switch (e.keyCode) {
|
|
19107
|
+
case 9: // tab
|
|
19108
|
+
case 13: // enter
|
|
19109
|
+
case 27: // escape
|
|
19110
|
+
e.preventDefault();
|
|
19111
|
+
break;
|
|
19112
|
+
|
|
19113
|
+
case 38: // up arrow
|
|
19114
|
+
if (!e.shiftKey) {
|
|
19115
|
+
e.preventDefault();
|
|
19116
|
+
this.prev();
|
|
19117
|
+
}
|
|
19118
|
+
break;
|
|
19119
|
+
|
|
19120
|
+
case 40: // down arrow
|
|
19121
|
+
if (!e.shiftKey) {
|
|
19122
|
+
e.preventDefault();
|
|
19123
|
+
this.next();
|
|
19124
|
+
}
|
|
19125
|
+
break;
|
|
18853
19126
|
}
|
|
18854
|
-
});
|
|
18855
19127
|
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
that.addHandler(that.host, 'keydown' + eventNamespace, function (event) { that.keydown(event); });
|
|
18859
|
-
that.addHandler(that.$popup, 'pointerdown' + eventNamespace, function (event) { that.click(event); });
|
|
18860
|
-
},
|
|
19128
|
+
e.stopPropagation();
|
|
19129
|
+
},
|
|
18861
19130
|
|
|
18862
|
-
|
|
18863
|
-
|
|
18864
|
-
|
|
18865
|
-
that.removeHandler(that.host, 'change' + eventNamespace);
|
|
18866
|
-
that.removeHandler(that.host, 'focus' + eventNamespace);
|
|
18867
|
-
that.removeHandler(that.host, 'blur' + eventNamespace);
|
|
18868
|
-
that.removeHandler(that.host, 'keypress' + eventNamespace);
|
|
18869
|
-
that.removeHandler(that.host, 'keyup' + eventNamespace);
|
|
18870
|
-
that.removeHandler(that.host, 'keydown' + eventNamespace);
|
|
18871
|
-
that.removeHandler(that.$popup, 'pointerdown' + eventNamespace);
|
|
18872
|
-
},
|
|
19131
|
+
keydown: function (e) {
|
|
19132
|
+
var arr = [40, 38, 9, 13, 27];
|
|
19133
|
+
this.suppressKeyPressRepeat = arr.indexOf(e.keyCode) !== -1;
|
|
18873
19134
|
|
|
18874
|
-
|
|
18875
|
-
|
|
18876
|
-
|
|
18877
|
-
|
|
19135
|
+
if (e.key === 'Tab') {
|
|
19136
|
+
if (!this.opened) {
|
|
19137
|
+
if (this.inlineAutoComplete) {
|
|
19138
|
+
this.select(e, this, 'keyboard');
|
|
19139
|
+
}
|
|
19140
|
+
return;
|
|
19141
|
+
}
|
|
19142
|
+
}
|
|
19143
|
+
this.move(e);
|
|
19144
|
+
},
|
|
18878
19145
|
|
|
18879
|
-
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18884
|
-
|
|
19146
|
+
keypress: function (e) {
|
|
19147
|
+
if (this.suppressKeyPressRepeat) {
|
|
19148
|
+
return;
|
|
19149
|
+
}
|
|
19150
|
+
this.move(e);
|
|
19151
|
+
},
|
|
18885
19152
|
|
|
18886
|
-
|
|
18887
|
-
|
|
19153
|
+
keyup: function (e) {
|
|
19154
|
+
switch (e.keyCode) {
|
|
19155
|
+
case 40: // down arrow
|
|
19156
|
+
case 38: // up arrow
|
|
19157
|
+
case 16: // shift
|
|
19158
|
+
case 17: // ctrl
|
|
19159
|
+
case 18: // alt
|
|
19160
|
+
e.stopPropagation();
|
|
18888
19161
|
e.preventDefault();
|
|
18889
|
-
|
|
18890
|
-
}
|
|
18891
|
-
break;
|
|
19162
|
+
break;
|
|
18892
19163
|
|
|
18893
|
-
|
|
18894
|
-
|
|
19164
|
+
case 9: // tab
|
|
19165
|
+
case 13: // enter
|
|
19166
|
+
if (!this.opened) {
|
|
19167
|
+
if (this.inlineAutoComplete) {
|
|
19168
|
+
this.select(e, this, 'keyboard');
|
|
19169
|
+
e.stopPropagation();
|
|
19170
|
+
e.preventDefault();
|
|
19171
|
+
}
|
|
19172
|
+
return;
|
|
19173
|
+
}
|
|
19174
|
+
this.select(e, this, 'keyboard');
|
|
19175
|
+
e.stopPropagation();
|
|
18895
19176
|
e.preventDefault();
|
|
18896
|
-
|
|
18897
|
-
}
|
|
18898
|
-
break;
|
|
18899
|
-
}
|
|
19177
|
+
break;
|
|
18900
19178
|
|
|
18901
|
-
|
|
18902
|
-
|
|
19179
|
+
case 27: // escape
|
|
19180
|
+
if (!this.opened) {
|
|
19181
|
+
return;
|
|
19182
|
+
}
|
|
19183
|
+
this.close();
|
|
19184
|
+
e.stopPropagation();
|
|
19185
|
+
e.preventDefault();
|
|
19186
|
+
break;
|
|
18903
19187
|
|
|
18904
|
-
|
|
18905
|
-
|
|
18906
|
-
|
|
18907
|
-
|
|
18908
|
-
|
|
19188
|
+
default:
|
|
19189
|
+
{
|
|
19190
|
+
var me = this;
|
|
19191
|
+
if (this.timer) {
|
|
19192
|
+
clearTimeout(this.timer);
|
|
19193
|
+
}
|
|
18909
19194
|
|
|
18910
|
-
|
|
18911
|
-
|
|
18912
|
-
|
|
18913
|
-
|
|
18914
|
-
|
|
18915
|
-
|
|
19195
|
+
if (this.inlineAutoComplete) {
|
|
19196
|
+
me.suggest();
|
|
19197
|
+
return;
|
|
19198
|
+
}
|
|
19199
|
+
this.timer = setTimeout(function () {
|
|
19200
|
+
me.suggest();
|
|
19201
|
+
}, 300);
|
|
19202
|
+
}
|
|
19203
|
+
}
|
|
18916
19204
|
|
|
18917
|
-
|
|
18918
|
-
switch (e.keyCode) {
|
|
18919
|
-
case 40: // down arrow
|
|
18920
|
-
case 38: // up arrow
|
|
18921
|
-
case 16: // shift
|
|
18922
|
-
case 17: // ctrl
|
|
18923
|
-
case 18: // alt
|
|
18924
|
-
e.stopPropagation();
|
|
18925
|
-
e.preventDefault();
|
|
18926
|
-
break;
|
|
18927
|
-
|
|
18928
|
-
case 9: // tab
|
|
18929
|
-
case 13: // enter
|
|
18930
|
-
if (!this.opened) {
|
|
18931
|
-
return;
|
|
18932
|
-
}
|
|
18933
|
-
this.select(e, this, 'keyboard');
|
|
18934
|
-
e.stopPropagation();
|
|
18935
|
-
e.preventDefault();
|
|
18936
|
-
break;
|
|
19205
|
+
},
|
|
18937
19206
|
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
19207
|
+
clear: function () {
|
|
19208
|
+
this.val('');
|
|
19209
|
+
},
|
|
19210
|
+
|
|
19211
|
+
onBlur: function () {
|
|
19212
|
+
var that = this;
|
|
19213
|
+
setTimeout(function () { that.close(); }, 150);
|
|
19214
|
+
that.host.removeClass(that.toThemeProperty('jqx-fill-state-focus'));
|
|
19215
|
+
that._refreshPlaceHolder();
|
|
19216
|
+
},
|
|
19217
|
+
|
|
19218
|
+
onFocus: function () {
|
|
19219
|
+
var that = this;
|
|
19220
|
+
that.element.className += ' ' + that.toThemeProperty('jqx-fill-state-focus');
|
|
19221
|
+
that._refreshPlaceHolder();
|
|
19222
|
+
},
|
|
19223
|
+
|
|
19224
|
+
click: function (e) {
|
|
19225
|
+
e.stopPropagation();
|
|
19226
|
+
e.preventDefault();
|
|
19227
|
+
this.select(e, this, 'mouse');
|
|
19228
|
+
},
|
|
19229
|
+
|
|
19230
|
+
mouseenter: function (e) {
|
|
19231
|
+
$(this._find('jqx-fill-state-pressed', this._popupHelper)).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
19232
|
+
e.currentTarget.className += ' ' + this.toThemeProperty('jqx-fill-state-pressed');
|
|
19233
|
+
},
|
|
19234
|
+
|
|
19235
|
+
_toPx: function (value) {
|
|
19236
|
+
if (typeof value === 'number') {
|
|
19237
|
+
return value + 'px';
|
|
19238
|
+
} else {
|
|
19239
|
+
return value;
|
|
19240
|
+
}
|
|
19241
|
+
},
|
|
19242
|
+
|
|
19243
|
+
_find: function (className, parentElement) {
|
|
19244
|
+
var children = parentElement.children();
|
|
19245
|
+
for (var i = 0; i < children.length; i++) {
|
|
19246
|
+
var child = children[i];
|
|
19247
|
+
if (child.className.indexOf(className) !== -1) {
|
|
19248
|
+
return child;
|
|
18941
19249
|
}
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
e.preventDefault();
|
|
18945
|
-
break;
|
|
19250
|
+
}
|
|
19251
|
+
},
|
|
18946
19252
|
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
}, 300);
|
|
19253
|
+
_getAddonsWidth: function () {
|
|
19254
|
+
var that = this,
|
|
19255
|
+
children = that.baseHost.children(),
|
|
19256
|
+
result = 0;
|
|
19257
|
+
|
|
19258
|
+
for (var i = 0; i < children.length; i++) {
|
|
19259
|
+
if (children[i] !== that.element) {
|
|
19260
|
+
result += $(children[i]).outerWidth();
|
|
18956
19261
|
}
|
|
19262
|
+
}
|
|
19263
|
+
|
|
19264
|
+
return result;
|
|
18957
19265
|
}
|
|
19266
|
+
});
|
|
19267
|
+
})(jqxBaseFramework); //ignore jslint
|
|
19268
|
+
})();
|
|
19269
|
+
|
|
19270
|
+
|
|
19271
|
+
|
|
19272
|
+
|
|
18958
19273
|
|
|
18959
|
-
},
|
|
18960
19274
|
|
|
18961
|
-
clear: function () {
|
|
18962
|
-
this.val('');
|
|
18963
|
-
},
|
|
18964
19275
|
|
|
18965
|
-
onBlur: function () {
|
|
18966
|
-
var that = this;
|
|
18967
|
-
setTimeout(function () { that.close(); }, 150);
|
|
18968
|
-
that.host.removeClass(that.toThemeProperty('jqx-fill-state-focus'));
|
|
18969
|
-
that._refreshPlaceHolder();
|
|
18970
|
-
},
|
|
18971
19276
|
|
|
18972
|
-
onFocus: function () {
|
|
18973
|
-
var that = this;
|
|
18974
|
-
that.element.className += ' ' + that.toThemeProperty('jqx-fill-state-focus');
|
|
18975
|
-
that._refreshPlaceHolder();
|
|
18976
|
-
},
|
|
18977
19277
|
|
|
18978
|
-
click: function (e) {
|
|
18979
|
-
e.stopPropagation();
|
|
18980
|
-
e.preventDefault();
|
|
18981
|
-
this.select(e, this, 'mouse');
|
|
18982
|
-
},
|
|
18983
19278
|
|
|
18984
|
-
mouseenter: function (e) {
|
|
18985
|
-
$(this._find('jqx-fill-state-pressed', this._popupHelper)).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
18986
|
-
e.currentTarget.className += ' ' + this.toThemeProperty('jqx-fill-state-pressed');
|
|
18987
|
-
},
|
|
18988
19279
|
|
|
18989
|
-
_toPx: function (value) {
|
|
18990
|
-
if (typeof value === 'number') {
|
|
18991
|
-
return value + 'px';
|
|
18992
|
-
} else {
|
|
18993
|
-
return value;
|
|
18994
|
-
}
|
|
18995
|
-
},
|
|
18996
19280
|
|
|
18997
|
-
_find: function (className, parentElement) {
|
|
18998
|
-
var children = parentElement.children();
|
|
18999
|
-
for (var i = 0; i < children.length; i++) {
|
|
19000
|
-
var child = children[i];
|
|
19001
|
-
if (child.className.indexOf(className) !== -1) {
|
|
19002
|
-
return child;
|
|
19003
|
-
}
|
|
19004
|
-
}
|
|
19005
|
-
},
|
|
19006
19281
|
|
|
19007
|
-
_getAddonsWidth: function () {
|
|
19008
|
-
var that = this,
|
|
19009
|
-
children = that.baseHost.children(),
|
|
19010
|
-
result = 0;
|
|
19011
19282
|
|
|
19012
|
-
for (var i = 0; i < children.length; i++) {
|
|
19013
|
-
if (children[i] !== that.element) {
|
|
19014
|
-
result += $(children[i]).outerWidth();
|
|
19015
|
-
}
|
|
19016
|
-
}
|
|
19017
19283
|
|
|
19018
|
-
|
|
19019
|
-
}
|
|
19020
|
-
});
|
|
19021
|
-
})(jqxBaseFramework); //ignore jslint
|
|
19022
|
-
})();
|
|
19284
|
+
|
|
19023
19285
|
|
|
19024
19286
|
/***/ }),
|
|
19025
19287
|
|
|
@@ -20573,7 +20835,23 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
20573
20835
|
|
|
20574
20836
|
} );
|
|
20575
20837
|
} )( jqxBaseFramework );
|
|
20576
|
-
})();
|
|
20838
|
+
})();
|
|
20839
|
+
|
|
20840
|
+
|
|
20841
|
+
|
|
20842
|
+
|
|
20843
|
+
|
|
20844
|
+
|
|
20845
|
+
|
|
20846
|
+
|
|
20847
|
+
|
|
20848
|
+
|
|
20849
|
+
|
|
20850
|
+
|
|
20851
|
+
|
|
20852
|
+
|
|
20853
|
+
|
|
20854
|
+
|
|
20577
20855
|
|
|
20578
20856
|
/***/ })
|
|
20579
20857
|
|
|
@@ -20583,7 +20861,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
20583
20861
|
/******/ var __webpack_module_cache__ = {};
|
|
20584
20862
|
/******/
|
|
20585
20863
|
/******/ // The require function
|
|
20586
|
-
/******/ function
|
|
20864
|
+
/******/ function __webpack_require__(moduleId) {
|
|
20587
20865
|
/******/ // Check if module is in cache
|
|
20588
20866
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
20589
20867
|
/******/ if (cachedModule !== undefined) {
|
|
@@ -20597,7 +20875,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
20597
20875
|
/******/ };
|
|
20598
20876
|
/******/
|
|
20599
20877
|
/******/ // Execute the module function
|
|
20600
|
-
/******/ __webpack_modules__[moduleId](module, module.exports,
|
|
20878
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
20601
20879
|
/******/
|
|
20602
20880
|
/******/ // Return the exports of the module
|
|
20603
20881
|
/******/ return module.exports;
|
|
@@ -20606,17 +20884,17 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
20606
20884
|
/************************************************************************/
|
|
20607
20885
|
/******/ /* webpack/runtime/amd options */
|
|
20608
20886
|
/******/ (() => {
|
|
20609
|
-
/******/
|
|
20887
|
+
/******/ __webpack_require__.amdO = {};
|
|
20610
20888
|
/******/ })();
|
|
20611
20889
|
/******/
|
|
20612
20890
|
/******/ /* webpack/runtime/compat get default export */
|
|
20613
20891
|
/******/ (() => {
|
|
20614
20892
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
20615
|
-
/******/
|
|
20893
|
+
/******/ __webpack_require__.n = (module) => {
|
|
20616
20894
|
/******/ var getter = module && module.__esModule ?
|
|
20617
20895
|
/******/ () => (module['default']) :
|
|
20618
20896
|
/******/ () => (module);
|
|
20619
|
-
/******/
|
|
20897
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
20620
20898
|
/******/ return getter;
|
|
20621
20899
|
/******/ };
|
|
20622
20900
|
/******/ })();
|
|
@@ -20624,9 +20902,9 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
20624
20902
|
/******/ /* webpack/runtime/define property getters */
|
|
20625
20903
|
/******/ (() => {
|
|
20626
20904
|
/******/ // define getter functions for harmony exports
|
|
20627
|
-
/******/
|
|
20905
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
20628
20906
|
/******/ for(var key in definition) {
|
|
20629
|
-
/******/ if(
|
|
20907
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
20630
20908
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
20631
20909
|
/******/ }
|
|
20632
20910
|
/******/ }
|
|
@@ -20635,7 +20913,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
20635
20913
|
/******/
|
|
20636
20914
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
20637
20915
|
/******/ (() => {
|
|
20638
|
-
/******/
|
|
20916
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
20639
20917
|
/******/ })();
|
|
20640
20918
|
/******/
|
|
20641
20919
|
/************************************************************************/
|
|
@@ -20643,23 +20921,19 @@ var __webpack_exports__ = {};
|
|
|
20643
20921
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
20644
20922
|
(() => {
|
|
20645
20923
|
"use strict";
|
|
20646
|
-
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0__ =
|
|
20647
|
-
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/
|
|
20648
|
-
/* harmony import */ var _jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_1__ =
|
|
20649
|
-
/* harmony import */ var _jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/
|
|
20650
|
-
/* harmony import */ var _jqxinput__WEBPACK_IMPORTED_MODULE_2__ =
|
|
20651
|
-
/* harmony import */ var _jqxinput__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/
|
|
20652
|
-
/* harmony import */ var _jqxknob__WEBPACK_IMPORTED_MODULE_3__ =
|
|
20653
|
-
/* harmony import */ var _jqxknob__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/
|
|
20924
|
+
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5459);
|
|
20925
|
+
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jqxcore__WEBPACK_IMPORTED_MODULE_0__);
|
|
20926
|
+
/* harmony import */ var _jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4993);
|
|
20927
|
+
/* harmony import */ var _jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_1__);
|
|
20928
|
+
/* harmony import */ var _jqxinput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5875);
|
|
20929
|
+
/* harmony import */ var _jqxinput__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jqxinput__WEBPACK_IMPORTED_MODULE_2__);
|
|
20930
|
+
/* harmony import */ var _jqxknob__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(887);
|
|
20931
|
+
/* harmony import */ var _jqxknob__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jqxknob__WEBPACK_IMPORTED_MODULE_3__);
|
|
20654
20932
|
|
|
20655
20933
|
|
|
20656
20934
|
|
|
20657
20935
|
|
|
20658
20936
|
})();
|
|
20659
20937
|
|
|
20660
|
-
/******/ })()
|
|
20661
|
-
;
|
|
20662
|
-
/******/ })()
|
|
20663
|
-
;
|
|
20664
20938
|
/******/ })()
|
|
20665
20939
|
;
|