jqwidgets-ng 19.2.2 → 19.2.3
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 +31 -1
- package/jqwidgets/modules/jqxbargauge.js +47 -17
- package/jqwidgets/modules/jqxbulletchart.js +31 -1
- package/jqwidgets/modules/jqxbuttongroup.js +52 -16
- package/jqwidgets/modules/jqxbuttons.js +50 -14
- package/jqwidgets/modules/jqxcalendar.js +56 -20
- package/jqwidgets/modules/jqxchart.js +31 -1
- package/jqwidgets/modules/jqxcheckbox.js +54 -18
- package/jqwidgets/modules/jqxcheckboxgroup.js +54 -18
- package/jqwidgets/modules/jqxcolorpicker.js +56 -20
- package/jqwidgets/modules/jqxcombobox.js +61 -25
- package/jqwidgets/modules/jqxcomplexinput.js +52 -16
- package/jqwidgets/modules/jqxdatatable.js +90 -50
- package/jqwidgets/modules/jqxdatetimeinput.js +75 -39
- package/jqwidgets/modules/jqxdocking.js +54 -18
- package/jqwidgets/modules/jqxdockinglayout.js +62 -26
- package/jqwidgets/modules/jqxdockpanel.js +52 -16
- package/jqwidgets/modules/jqxdragdrop.js +54 -18
- package/jqwidgets/modules/jqxdraw.js +31 -1
- package/jqwidgets/modules/jqxdropdownbutton.js +52 -16
- package/jqwidgets/modules/jqxdropdownlist.js +73 -37
- package/jqwidgets/modules/jqxeditor.js +85 -49
- package/jqwidgets/modules/jqxexpander.js +58 -22
- package/jqwidgets/modules/jqxfileupload.js +31 -1
- package/jqwidgets/modules/jqxform.js +83 -47
- package/jqwidgets/modules/jqxformattedinput.js +75 -39
- package/jqwidgets/modules/jqxgantt.js +31 -1
- package/jqwidgets/modules/jqxgauge.js +56 -20
- package/jqwidgets/modules/jqxgrid.js +3988 -3932
- package/jqwidgets/modules/jqxheatmap.js +31 -1
- package/jqwidgets/modules/jqxinput.js +1232 -972
- package/jqwidgets/modules/jqxkanban.js +1300 -1241
- package/jqwidgets/modules/jqxknob.js +54 -18
- package/jqwidgets/modules/jqxlayout.js +62 -26
- package/jqwidgets/modules/jqxlineargauge.js +56 -20
- package/jqwidgets/modules/jqxlinkbutton.js +50 -14
- package/jqwidgets/modules/jqxlistbox.js +64 -28
- package/jqwidgets/modules/jqxlistmenu.js +81 -45
- package/jqwidgets/modules/jqxloader.js +31 -1
- package/jqwidgets/modules/jqxmaskedinput.js +31 -1
- package/jqwidgets/modules/jqxmenu.js +62 -26
- package/jqwidgets/modules/jqxnavbar.js +58 -22
- package/jqwidgets/modules/jqxnavigationbar.js +66 -30
- package/jqwidgets/modules/jqxnotification.js +58 -22
- package/jqwidgets/modules/jqxnumberinput.js +65 -29
- package/jqwidgets/modules/jqxpanel.js +56 -20
- package/jqwidgets/modules/jqxpasswordinput.js +58 -22
- package/jqwidgets/modules/jqxpivotdesigner.js +90 -54
- package/jqwidgets/modules/jqxpivotgrid.js +90 -54
- package/jqwidgets/modules/jqxpopover.js +52 -16
- package/jqwidgets/modules/jqxprogressbar.js +31 -1
- package/jqwidgets/modules/jqxqrcode.js +31 -1
- package/jqwidgets/modules/jqxradiobutongroup.js +55 -19
- package/jqwidgets/modules/jqxradiobutton.js +52 -16
- package/jqwidgets/modules/jqxrangeselector.js +31 -1
- package/jqwidgets/modules/jqxrating.js +52 -16
- package/jqwidgets/modules/jqxrepeatbutton.js +50 -14
- package/jqwidgets/modules/jqxresponsivepanel.js +31 -1
- package/jqwidgets/modules/jqxribbon.js +54 -18
- package/jqwidgets/modules/jqxscheduler.js +1291 -1005
- package/jqwidgets/modules/jqxscrollbar.js +10618 -91150
- package/jqwidgets/modules/jqxscrollview.js +52 -16
- package/jqwidgets/modules/jqxslider.js +52 -16
- package/jqwidgets/modules/jqxsortable.js +52 -16
- package/jqwidgets/modules/jqxsplitlayout.js +2033 -2075
- package/jqwidgets/modules/jqxsplitter.js +52 -16
- package/jqwidgets/modules/jqxswitchbutton.js +56 -20
- package/jqwidgets/modules/jqxtabs.js +65 -29
- package/jqwidgets/modules/jqxtagcloud.js +58 -22
- package/jqwidgets/modules/jqxtextarea.js +58 -22
- package/jqwidgets/modules/jqxtimeline.js +31 -1
- package/jqwidgets/modules/jqxtimepicker.js +31 -1
- package/jqwidgets/modules/jqxtogglebutton.js +50 -14
- package/jqwidgets/modules/jqxtoolbar.js +1262 -996
- package/jqwidgets/modules/jqxtooltip.js +31 -1
- package/jqwidgets/modules/jqxtree.js +6381 -195
- package/jqwidgets/modules/jqxtreegrid.js +92 -52
- package/jqwidgets/modules/jqxtreemap.js +31 -1
- package/jqwidgets/modules/jqxvalidator.js +56 -20
- package/jqwidgets/modules/jqxwindow.js +52 -16
- 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
|
@@ -4,6 +4,46 @@ Copyright (c) 2011-2024 jQWidgets.
|
|
|
4
4
|
License: https://jqwidgets.com/license/ */
|
|
5
5
|
|
|
6
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
|
|
19
|
+
Copyright (c) 2011-2024 jQWidgets.
|
|
20
|
+
License: https://jqwidgets.com/license/ */
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/******/ (() => { // webpackBootstrap
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
|
|
26
|
+
/* Release Date: 28-May-2024
|
|
27
|
+
Copyright (c) 2011-2024 jQWidgets.
|
|
28
|
+
License: https://jqwidgets.com/license/ */
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/******/ (() => { // webpackBootstrap
|
|
32
|
+
var __webpack_exports__ = {};
|
|
33
|
+
|
|
34
|
+
/* Release Date: 28-May-2024
|
|
35
|
+
Copyright (c) 2011-2024 jQWidgets.
|
|
36
|
+
License: https://jqwidgets.com/license/ */
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/******/ (() => { // webpackBootstrap
|
|
40
|
+
var __webpack_exports__ = {};
|
|
41
|
+
|
|
42
|
+
/* Release Date: 28-May-2024
|
|
43
|
+
Copyright (c) 2011-2024 jQWidgets.
|
|
44
|
+
License: https://jqwidgets.com/license/ */
|
|
45
|
+
|
|
46
|
+
|
|
7
47
|
/******/ (() => { // webpackBootstrap
|
|
8
48
|
/******/ var __webpack_modules__ = ({
|
|
9
49
|
|
|
@@ -2211,6 +2251,12 @@ document.Globalize = Globalize;
|
|
|
2211
2251
|
that.element.disabled = true;
|
|
2212
2252
|
that.element.setAttribute('disabled', 'true');
|
|
2213
2253
|
}
|
|
2254
|
+
|
|
2255
|
+
if (that.textPosition){
|
|
2256
|
+
$.jqx.utilities.resize(this.host, function () {
|
|
2257
|
+
that._positionTextAndImage();
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2214
2260
|
}, // createInstance
|
|
2215
2261
|
|
|
2216
2262
|
resize: function (width, height) {
|
|
@@ -12080,7 +12126,7 @@ document.Globalize = Globalize;
|
|
|
12080
12126
|
/***/ }),
|
|
12081
12127
|
|
|
12082
12128
|
/***/ 5459:
|
|
12083
|
-
/***/ ((module, exports,
|
|
12129
|
+
/***/ ((module, exports, __nested_webpack_require_483589__) => {
|
|
12084
12130
|
|
|
12085
12131
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disable */
|
|
12086
12132
|
/* eslint-disable */
|
|
@@ -20260,7 +20306,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* tslint:disabl
|
|
|
20260
20306
|
// file names, and JQXLite is normally delivered in a lowercase file name.
|
|
20261
20307
|
// Do this after creating the global so that if an AMD module wants to call
|
|
20262
20308
|
// noConflict to hide this version of JQXLite, it will work.
|
|
20263
|
-
if (
|
|
20309
|
+
if ( true && __nested_webpack_require_483589__.amdO.JQXLite) {
|
|
20264
20310
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return JQXLite; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
20265
20311
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
20266
20312
|
}
|
|
@@ -43644,7 +43690,7 @@ if (!Array.prototype.filter) {
|
|
|
43644
43690
|
}
|
|
43645
43691
|
else self.focus();
|
|
43646
43692
|
|
|
43647
|
-
|
|
43693
|
+
// event.stopPropagation();
|
|
43648
43694
|
}
|
|
43649
43695
|
}
|
|
43650
43696
|
}
|
|
@@ -45065,1169 +45111,1399 @@ if (!Array.prototype.filter) {
|
|
|
45065
45111
|
|
|
45066
45112
|
/* tslint:disable */
|
|
45067
45113
|
/* eslint-disable */
|
|
45068
|
-
(function(){
|
|
45069
|
-
|
|
45070
|
-
|
|
45071
|
-
|
|
45114
|
+
(function () {
|
|
45115
|
+
if (typeof document === 'undefined') {
|
|
45116
|
+
return;
|
|
45117
|
+
}
|
|
45072
45118
|
|
|
45073
|
-
(function ($) {
|
|
45074
|
-
|
|
45075
|
-
|
|
45119
|
+
(function ($) {
|
|
45120
|
+
'use strict';
|
|
45121
|
+
$.jqx.jqxWidget('jqxInput', '', {});
|
|
45076
45122
|
|
|
45077
|
-
|
|
45078
|
-
|
|
45079
|
-
|
|
45080
|
-
|
|
45081
|
-
|
|
45082
|
-
|
|
45083
|
-
|
|
45084
|
-
|
|
45085
|
-
|
|
45086
|
-
|
|
45087
|
-
|
|
45088
|
-
|
|
45089
|
-
|
|
45090
|
-
|
|
45091
|
-
|
|
45092
|
-
|
|
45093
|
-
|
|
45094
|
-
|
|
45095
|
-
|
|
45096
|
-
|
|
45097
|
-
|
|
45098
|
-
|
|
45099
|
-
|
|
45100
|
-
|
|
45101
|
-
|
|
45102
|
-
|
|
45103
|
-
|
|
45104
|
-
|
|
45105
|
-
|
|
45106
|
-
|
|
45107
|
-
|
|
45123
|
+
$.extend($.jqx._jqxInput.prototype, {
|
|
45124
|
+
defineInstance: function () {
|
|
45125
|
+
var that = this;
|
|
45126
|
+
var settings = {
|
|
45127
|
+
disabled: false,
|
|
45128
|
+
filter: that._filter,
|
|
45129
|
+
sort: that._sort,
|
|
45130
|
+
highlight: that._highlight,
|
|
45131
|
+
dropDownWidth: null,
|
|
45132
|
+
renderer: that._renderer,
|
|
45133
|
+
opened: false,
|
|
45134
|
+
$popup: document.createElement('ul'),
|
|
45135
|
+
source: [],
|
|
45136
|
+
roundedCorners: true,
|
|
45137
|
+
searchMode: 'default',
|
|
45138
|
+
placeHolder: '',
|
|
45139
|
+
width: null,
|
|
45140
|
+
height: null,
|
|
45141
|
+
value: '',
|
|
45142
|
+
rtl: false,
|
|
45143
|
+
enableBrowserBoundsDetection: true,
|
|
45144
|
+
hint: true,
|
|
45145
|
+
displayMember: '',
|
|
45146
|
+
valueMember: '',
|
|
45147
|
+
inlineAutoComplete: false,
|
|
45148
|
+
events: ['select', 'open', 'close', 'change'],
|
|
45149
|
+
popupZIndex: 1000,
|
|
45150
|
+
items: 8,
|
|
45151
|
+
minLength: 1,
|
|
45152
|
+
maxLength: null,
|
|
45153
|
+
aiKey: ''
|
|
45154
|
+
};
|
|
45155
|
+
if (this === $.jqx._jqxInput.prototype) {
|
|
45156
|
+
return settings;
|
|
45157
|
+
}
|
|
45158
|
+
$.extend(true, this, settings);
|
|
45108
45159
|
return settings;
|
|
45109
|
-
}
|
|
45110
|
-
$.extend(true, this, settings);
|
|
45111
|
-
return settings;
|
|
45112
|
-
},
|
|
45113
|
-
|
|
45114
|
-
createInstance: function () {
|
|
45115
|
-
var that = this;
|
|
45116
|
-
if (that.host.css('display') === 'none' || document.body.contains(that.element) === false) {
|
|
45117
|
-
that._initiallyHidden = true;
|
|
45118
|
-
}
|
|
45119
|
-
that._popupHelper = $(that.$popup);
|
|
45120
|
-
that.render();
|
|
45121
|
-
},
|
|
45160
|
+
},
|
|
45122
45161
|
|
|
45123
|
-
|
|
45124
|
-
|
|
45162
|
+
createInstance: function () {
|
|
45163
|
+
var that = this;
|
|
45164
|
+
if (that.host.css('display') === 'none' || document.body.contains(that.element) === false) {
|
|
45165
|
+
that._initiallyHidden = true;
|
|
45166
|
+
}
|
|
45167
|
+
that._popupHelper = $(that.$popup);
|
|
45168
|
+
that.render();
|
|
45169
|
+
},
|
|
45125
45170
|
|
|
45126
|
-
|
|
45171
|
+
getAISuggestions: function (callback) {
|
|
45172
|
+
var that = this;
|
|
45173
|
+
var response = '';
|
|
45174
|
+
if (!that.aiKey) {
|
|
45175
|
+
callback('');
|
|
45176
|
+
}
|
|
45127
45177
|
|
|
45128
|
-
|
|
45129
|
-
|
|
45130
|
-
|
|
45131
|
-
|
|
45132
|
-
|
|
45133
|
-
|
|
45134
|
-
|
|
45135
|
-
|
|
45136
|
-
if (index === children.length - 1) {
|
|
45137
|
-
classToAdd += ' jqx-rc-r';
|
|
45138
|
-
}
|
|
45139
|
-
if (this !== that.element) {
|
|
45140
|
-
classToAdd += ' jqx-fill-state-normal';
|
|
45141
|
-
}
|
|
45142
|
-
this.className += ' ' + that.toThemeProperty(classToAdd);
|
|
45143
|
-
});
|
|
45178
|
+
function buildPrompt(textBefore, textAfter) {
|
|
45179
|
+
var systemMessageBuilder = [];
|
|
45180
|
+
systemMessageBuilder.push("Predict what text the user in the given ROLE would insert after the cursor position indicated by ^^^. Auto-correct the text.\n");
|
|
45181
|
+
systemMessageBuilder.push("RULES:\n");
|
|
45182
|
+
systemMessageBuilder.push("1. Reply with OK:, then in square brackets the predicted text, then END_INSERTION, and no other output.\n");
|
|
45183
|
+
systemMessageBuilder.push("2. When a specific value or quantity cannot be inferred and would need to be provided, use the word NEED_INFO.\n");
|
|
45184
|
+
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");
|
|
45185
|
+
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");
|
|
45144
45186
|
|
|
45145
|
-
|
|
45146
|
-
|
|
45147
|
-
|
|
45148
|
-
|
|
45149
|
-
|
|
45187
|
+
/*
|
|
45188
|
+
if (that.userPhrases.length) {
|
|
45189
|
+
systemMessageBuilder.push("\nAlways try to use variations on the following phrases as part of the predictions:\n");
|
|
45190
|
+
for (let i = 0; i < that.userPhrases.length; i++) {
|
|
45191
|
+
systemMessageBuilder.push("- {0}\n", that.userPhrases[i]);
|
|
45192
|
+
}
|
|
45193
|
+
}*/
|
|
45150
45194
|
|
|
45151
|
-
|
|
45152
|
-
var label = $("<label></label");
|
|
45195
|
+
systemMessageBuilder.push("\n\nROLE: " + "User" + " USER_TEXT: " + textBefore + textAfter + "^^^");
|
|
45153
45196
|
|
|
45154
|
-
|
|
45155
|
-
label[0].innerHTML = this.placeHolder;
|
|
45197
|
+
return systemMessageBuilder.join('\n');
|
|
45156
45198
|
}
|
|
45157
45199
|
|
|
45158
|
-
|
|
45159
|
-
|
|
45200
|
+
function fetchAIResponse(prompt, callback) {
|
|
45201
|
+
var apiKey = that.aiKey; // Replace this with your OpenAI API key (don't expose it on public websites)
|
|
45160
45202
|
|
|
45161
|
-
|
|
45162
|
-
|
|
45163
|
-
|
|
45203
|
+
var headers = {
|
|
45204
|
+
'Content-Type': 'application/json',
|
|
45205
|
+
'Authorization': 'Bearer ' + apiKey
|
|
45206
|
+
};
|
|
45164
45207
|
|
|
45165
|
-
|
|
45166
|
-
|
|
45208
|
+
var body = JSON.stringify({
|
|
45209
|
+
model: "gpt-3.5-turbo", // or "gpt-4" if you have access
|
|
45210
|
+
messages: [{ role: "user", content: prompt }], // The conversation format
|
|
45211
|
+
// stop_frequences: ["END_INSERTION", "NEED_INFO"],
|
|
45212
|
+
max_tokens: 200 // You can adjust token length based on your needs,
|
|
45213
|
+
});
|
|
45167
45214
|
|
|
45168
|
-
|
|
45169
|
-
|
|
45170
|
-
|
|
45215
|
+
var xhr = new XMLHttpRequest();
|
|
45216
|
+
xhr.open('POST', 'https://api.openai.com/v1/chat/completions', true);
|
|
45217
|
+
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
45218
|
+
xhr.setRequestHeader('Authorization', 'Bearer ' + apiKey);
|
|
45219
|
+
|
|
45220
|
+
xhr.onreadystatechange = function () {
|
|
45221
|
+
if (xhr.readyState === 4) {
|
|
45222
|
+
if (xhr.status === 200) {
|
|
45223
|
+
var response = JSON.parse(xhr.responseText);
|
|
45224
|
+
// Make sure there are choices and content in the response
|
|
45225
|
+
if (response.choices && response.choices.length > 0 && response.choices[0].message.content) {
|
|
45226
|
+
var content = response.choices[0].message.content;
|
|
45227
|
+
|
|
45228
|
+
if (content.length > 5 && content.startsWith("OK")) {
|
|
45229
|
+
content = content.substring(4);
|
|
45230
|
+
content = content.replace('END_INSERTION', '');
|
|
45231
|
+
|
|
45232
|
+
var matches = content.match(/\[(.*?)\]/g);
|
|
45233
|
+
|
|
45234
|
+
// Remove the brackets from the extracted text
|
|
45235
|
+
if (matches) {
|
|
45236
|
+
// Use map to strip out brackets
|
|
45237
|
+
var extractedText = matches.map(function (match) {
|
|
45238
|
+
return match.replace(/^\[|\]$/g, '');
|
|
45239
|
+
});
|
|
45240
|
+
|
|
45241
|
+
content = extractedText[0]
|
|
45242
|
+
}
|
|
45243
|
+
|
|
45244
|
+
content = content.replace('[', '');
|
|
45245
|
+
content = content.replace(']', '');
|
|
45246
|
+
}
|
|
45247
|
+
|
|
45248
|
+
if (content.indexOf('NO_PREDICTION') >= 0) {
|
|
45249
|
+
content = '';
|
|
45250
|
+
}
|
|
45251
|
+
|
|
45252
|
+
callback(null, content);
|
|
45253
|
+
}
|
|
45254
|
+
else {
|
|
45255
|
+
callback('Error: No valid response from AI', null);
|
|
45256
|
+
}
|
|
45257
|
+
} else {
|
|
45258
|
+
callback('Error fetching AI response: ' + xhr.statusText, null);
|
|
45259
|
+
}
|
|
45260
|
+
}
|
|
45261
|
+
};
|
|
45262
|
+
|
|
45263
|
+
xhr.send(body);
|
|
45171
45264
|
}
|
|
45172
45265
|
|
|
45173
|
-
that.input
|
|
45174
|
-
|
|
45175
|
-
|
|
45176
|
-
|
|
45177
|
-
|
|
45266
|
+
var textBefore = that.input.value.substring(0, that.input.selectionStart);
|
|
45267
|
+
var textAfter = that.input.value.substring(that.input.selectionStart + 1);
|
|
45268
|
+
var text = textBefore + textAfter;
|
|
45269
|
+
if (text.endsWith(' ')) {
|
|
45270
|
+
var prompt = buildPrompt(textBefore, textAfter);
|
|
45271
|
+
fetchAIResponse(prompt.toString(), function (error, aiResponse) {
|
|
45272
|
+
if (error) {
|
|
45273
|
+
callback('');
|
|
45274
|
+
} else {
|
|
45275
|
+
callback(aiResponse);
|
|
45276
|
+
}
|
|
45178
45277
|
}
|
|
45179
|
-
|
|
45278
|
+
);
|
|
45180
45279
|
}
|
|
45181
|
-
|
|
45182
|
-
this.bar = bar;
|
|
45183
|
-
this.element.style.cssText = '';
|
|
45184
|
-
this.host = group;
|
|
45185
|
-
this.element = group[0];
|
|
45186
|
-
this.host.data(data);
|
|
45280
|
+
},
|
|
45187
45281
|
|
|
45282
|
+
render: function () {
|
|
45188
45283
|
var that = this;
|
|
45189
45284
|
|
|
45190
|
-
|
|
45191
|
-
that.bar.addClass(that.toThemeProperty("jqx-" + that.template));
|
|
45192
|
-
that.label.addClass(that.toThemeProperty("jqx-" + that.template));
|
|
45193
|
-
}
|
|
45285
|
+
this.input = this.element;
|
|
45194
45286
|
|
|
45195
|
-
if (
|
|
45196
|
-
|
|
45197
|
-
|
|
45198
|
-
|
|
45199
|
-
|
|
45200
|
-
|
|
45201
|
-
|
|
45202
|
-
|
|
45203
|
-
|
|
45204
|
-
|
|
45205
|
-
|
|
45206
|
-
|
|
45207
|
-
|
|
45208
|
-
var type = this.type;
|
|
45209
|
-
if (type == null || type === 'text' || type === 'textarea') {
|
|
45210
|
-
input = $(this);
|
|
45211
|
-
hasTextInput = true;
|
|
45212
|
-
return false;
|
|
45287
|
+
if (that.isMaterialized() && this.input instanceof HTMLInputElement) {
|
|
45288
|
+
var children = this.host.children();
|
|
45289
|
+
$.each(children, function (index) {
|
|
45290
|
+
var classToAdd = 'jqx-input-group-addon';
|
|
45291
|
+
$(this).removeClass(that.toThemeProperty('jqx-rc-all'));
|
|
45292
|
+
if (index === 0) {
|
|
45293
|
+
classToAdd += ' jqx-rc-l';
|
|
45294
|
+
}
|
|
45295
|
+
if (index === children.length - 1) {
|
|
45296
|
+
classToAdd += ' jqx-rc-r';
|
|
45297
|
+
}
|
|
45298
|
+
if (this !== that.element) {
|
|
45299
|
+
classToAdd += ' jqx-fill-state-normal';
|
|
45213
45300
|
}
|
|
45301
|
+
this.className += ' ' + that.toThemeProperty(classToAdd);
|
|
45214
45302
|
});
|
|
45215
|
-
|
|
45216
|
-
|
|
45217
|
-
|
|
45218
|
-
|
|
45219
|
-
|
|
45220
|
-
|
|
45221
|
-
|
|
45222
|
-
|
|
45223
|
-
|
|
45224
|
-
|
|
45225
|
-
|
|
45226
|
-
|
|
45227
|
-
|
|
45228
|
-
var children = this.baseHost.children();
|
|
45229
|
-
$.each(children, function (index) {
|
|
45230
|
-
var classToAdd = 'jqx-input-group-addon';
|
|
45231
|
-
$(this).removeClass(that.toThemeProperty('jqx-rc-all'));
|
|
45232
|
-
if (index === 0) {
|
|
45233
|
-
classToAdd += ' jqx-rc-l';
|
|
45234
|
-
}
|
|
45235
|
-
if (index === children.length - 1) {
|
|
45236
|
-
classToAdd += ' jqx-rc-r';
|
|
45237
|
-
}
|
|
45238
|
-
if (this !== that.element) {
|
|
45239
|
-
classToAdd += ' jqx-fill-state-normal';
|
|
45240
|
-
}
|
|
45241
|
-
this.className += ' ' + that.toThemeProperty(classToAdd);
|
|
45242
|
-
});
|
|
45303
|
+
|
|
45304
|
+
var group = $("<div></div>");
|
|
45305
|
+
group.addClass(that.toThemeProperty('jqx-input-group'));
|
|
45306
|
+
this.host.after(group);
|
|
45307
|
+
var input = this.element;
|
|
45308
|
+
var data = this.host.data();
|
|
45309
|
+
|
|
45310
|
+
|
|
45311
|
+
group.append(input);
|
|
45312
|
+
var label = $("<label></label");
|
|
45313
|
+
|
|
45314
|
+
if (this.hint) {
|
|
45315
|
+
label[0].innerHTML = this.placeHolder;
|
|
45243
45316
|
}
|
|
45244
|
-
}
|
|
45245
45317
|
|
|
45246
|
-
|
|
45247
|
-
|
|
45248
|
-
that.element.className += ' ' + that.toThemeProperty('jqx-rtl');
|
|
45249
|
-
}
|
|
45250
|
-
that.element.setAttribute('role', 'textbox');
|
|
45251
|
-
$.jqx.aria(this, 'aria-autocomplete', 'both');
|
|
45252
|
-
$.jqx.aria(this, 'aria-disabled', this.disabled);
|
|
45253
|
-
$.jqx.aria(this, 'aria-readonly', false);
|
|
45254
|
-
$.jqx.aria(this, 'aria-multiline', false);
|
|
45255
|
-
if (this.source && this.source.length) {
|
|
45256
|
-
$.jqx.aria(this, 'aria-haspopup', true);
|
|
45257
|
-
}
|
|
45258
|
-
if (this.value !== '') {
|
|
45259
|
-
this.input.value = this.value;
|
|
45260
|
-
}
|
|
45318
|
+
label.addClass(that.toThemeProperty('jqx-input-label'));
|
|
45319
|
+
group.append(label);
|
|
45261
45320
|
|
|
45262
|
-
|
|
45263
|
-
|
|
45264
|
-
|
|
45321
|
+
var autoCompleteLabel = $("<label class='jqx-input-inline'></label");
|
|
45322
|
+
autoCompleteLabel[0].style.display = 'none';
|
|
45323
|
+
this._inlineLabel = autoCompleteLabel[0];
|
|
45265
45324
|
|
|
45266
|
-
|
|
45267
|
-
var that = this;
|
|
45325
|
+
group.append(autoCompleteLabel);
|
|
45268
45326
|
|
|
45269
|
-
var mapItem = function (item) {
|
|
45270
|
-
if (item === undefined) {
|
|
45271
|
-
return null;
|
|
45272
|
-
}
|
|
45273
45327
|
|
|
45274
|
-
|
|
45275
|
-
|
|
45276
|
-
|
|
45328
|
+
var bar = $("<span></span>");
|
|
45329
|
+
group.append(bar);
|
|
45330
|
+
bar.addClass(that.toThemeProperty('jqx-input-bar'));
|
|
45277
45331
|
|
|
45278
|
-
|
|
45279
|
-
|
|
45280
|
-
|
|
45332
|
+
group[0].id = this.element.id;
|
|
45333
|
+
this.element.removeAttribute('id');
|
|
45334
|
+
|
|
45335
|
+
group[0].style.cssText = this.element.style.cssText;
|
|
45336
|
+
if (this.element.className.indexOf('underlined') >= 0) {
|
|
45337
|
+
group.addClass('underlined');
|
|
45338
|
+
}
|
|
45281
45339
|
|
|
45282
|
-
|
|
45283
|
-
|
|
45284
|
-
|
|
45340
|
+
that.input = that.element;
|
|
45341
|
+
if (!(this.input instanceof HTMLInputElement)) {
|
|
45342
|
+
this.input = this.host.find('input');
|
|
45343
|
+
if (this.input.length > 0) {
|
|
45344
|
+
this.input = this.input[0];
|
|
45285
45345
|
}
|
|
45346
|
+
$(this.input).addClass(this.toThemeProperty("jqx-input-widget"));
|
|
45286
45347
|
}
|
|
45348
|
+
this.label = label;
|
|
45349
|
+
this.bar = bar;
|
|
45350
|
+
this.element.style.cssText = '';
|
|
45351
|
+
this.host = group;
|
|
45352
|
+
this.element = group[0];
|
|
45353
|
+
this.host.data(data);
|
|
45287
45354
|
|
|
45288
|
-
|
|
45289
|
-
|
|
45355
|
+
var that = this;
|
|
45356
|
+
|
|
45357
|
+
if (that.template) {
|
|
45358
|
+
that.bar.addClass(that.toThemeProperty("jqx-" + that.template));
|
|
45359
|
+
that.label.addClass(that.toThemeProperty("jqx-" + that.template));
|
|
45290
45360
|
}
|
|
45291
45361
|
|
|
45292
|
-
if (
|
|
45293
|
-
|
|
45362
|
+
if (children.length > 0) {
|
|
45363
|
+
that._hasAddons = true;
|
|
45294
45364
|
}
|
|
45295
|
-
|
|
45296
|
-
|
|
45365
|
+
}
|
|
45366
|
+
else if (this.element.nodeName.toLowerCase() === 'textarea') {
|
|
45367
|
+
this.element.style.overflow = 'auto';
|
|
45368
|
+
} else
|
|
45369
|
+
if (this.element.nodeName.toLowerCase() === 'div') {
|
|
45370
|
+
this.baseHost = this.element;
|
|
45371
|
+
var input = that.element.getElementsByTagName('input');
|
|
45372
|
+
var hasTextInput = false;
|
|
45373
|
+
|
|
45374
|
+
$.each(input, function () {
|
|
45375
|
+
var type = this.type;
|
|
45376
|
+
if (type == null || type === 'text' || type === 'textarea') {
|
|
45377
|
+
input = $(this);
|
|
45378
|
+
hasTextInput = true;
|
|
45379
|
+
return false;
|
|
45380
|
+
}
|
|
45381
|
+
});
|
|
45382
|
+
if (!hasTextInput) {
|
|
45383
|
+
throw new Error('jqxInput: Missing Text Input in the Input Group');
|
|
45384
|
+
}
|
|
45385
|
+
|
|
45386
|
+
if (input.length > 0) {
|
|
45387
|
+
this.baseHost = $(this.element);
|
|
45388
|
+
that.baseElement = that.element;
|
|
45389
|
+
var data = this.host.data();
|
|
45390
|
+
this.host = input;
|
|
45391
|
+
this.element = input[0];
|
|
45392
|
+
that.input = input[0];
|
|
45393
|
+
this.host.data(data);
|
|
45394
|
+
that.baseElement.className += ' ' + that.toThemeProperty('jqx-widget jqx-rc-all jqx-input-group');
|
|
45395
|
+
var children = this.baseHost.children();
|
|
45396
|
+
$.each(children, function (index) {
|
|
45397
|
+
var classToAdd = 'jqx-input-group-addon';
|
|
45398
|
+
$(this).removeClass(that.toThemeProperty('jqx-rc-all'));
|
|
45399
|
+
if (index === 0) {
|
|
45400
|
+
classToAdd += ' jqx-rc-l';
|
|
45401
|
+
}
|
|
45402
|
+
if (index === children.length - 1) {
|
|
45403
|
+
classToAdd += ' jqx-rc-r';
|
|
45404
|
+
}
|
|
45405
|
+
if (this !== that.element) {
|
|
45406
|
+
classToAdd += ' jqx-fill-state-normal';
|
|
45407
|
+
}
|
|
45408
|
+
this.className += ' ' + that.toThemeProperty(classToAdd);
|
|
45409
|
+
});
|
|
45410
|
+
}
|
|
45297
45411
|
}
|
|
45298
45412
|
|
|
45299
|
-
|
|
45413
|
+
this.addHandlers();
|
|
45414
|
+
if (this.rtl) {
|
|
45415
|
+
that.element.className += ' ' + that.toThemeProperty('jqx-rtl');
|
|
45300
45416
|
}
|
|
45301
45417
|
|
|
45302
|
-
|
|
45303
|
-
|
|
45418
|
+
that.input.setAttribute('autocomplete', 'off');
|
|
45419
|
+
that.input.setAttribute('autocorrect', 'off');
|
|
45420
|
+
that.input.setAttribute('spellcheck', false);
|
|
45304
45421
|
|
|
45305
|
-
|
|
45306
|
-
|
|
45307
|
-
|
|
45308
|
-
|
|
45422
|
+
that.element.setAttribute('role', 'textbox');
|
|
45423
|
+
$.jqx.aria(this, 'aria-autocomplete', 'both');
|
|
45424
|
+
$.jqx.aria(this, 'aria-disabled', this.disabled);
|
|
45425
|
+
$.jqx.aria(this, 'aria-readonly', false);
|
|
45426
|
+
$.jqx.aria(this, 'aria-multiline', false);
|
|
45427
|
+
if (this.source && this.source.length) {
|
|
45428
|
+
$.jqx.aria(this, 'aria-haspopup', true);
|
|
45309
45429
|
}
|
|
45310
|
-
|
|
45311
|
-
|
|
45312
|
-
|
|
45313
|
-
if (this.source && this.source._source) {
|
|
45314
|
-
this.adapter = this.source;
|
|
45315
|
-
if (this.adapter._source.localdata != null) {
|
|
45316
|
-
this.adapter.unbindBindingUpdate(this.element.id);
|
|
45317
|
-
this.adapter.bindBindingUpdate(this.element.id, function () {
|
|
45318
|
-
that.source = mapItems(that.adapter.records);
|
|
45319
|
-
});
|
|
45430
|
+
if (this.value !== '') {
|
|
45431
|
+
this.input.value = this.value;
|
|
45320
45432
|
}
|
|
45321
|
-
|
|
45322
|
-
|
|
45323
|
-
|
|
45324
|
-
|
|
45433
|
+
|
|
45434
|
+
this._oldsource = this.source;
|
|
45435
|
+
this._updateSource();
|
|
45436
|
+
},
|
|
45437
|
+
|
|
45438
|
+
_updateSource: function () {
|
|
45439
|
+
var that = this;
|
|
45440
|
+
|
|
45441
|
+
var mapItem = function (item) {
|
|
45442
|
+
if (item === undefined) {
|
|
45443
|
+
return null;
|
|
45325
45444
|
}
|
|
45326
|
-
|
|
45327
|
-
|
|
45328
|
-
|
|
45329
|
-
}
|
|
45330
|
-
this.adapter._options.data = postdata;
|
|
45445
|
+
|
|
45446
|
+
if (typeof item === 'string' || item instanceof String) {
|
|
45447
|
+
return { label: item, value: item };
|
|
45331
45448
|
}
|
|
45332
|
-
this.adapter.unbindDownloadComplete(this.element.id);
|
|
45333
|
-
this.adapter.bindDownloadComplete(this.element.id, function () {
|
|
45334
|
-
that.source = mapItems(that.adapter.records);
|
|
45335
|
-
});
|
|
45336
|
-
}
|
|
45337
|
-
this.source.dataBind();
|
|
45338
|
-
return;
|
|
45339
|
-
}
|
|
45340
45449
|
|
|
45341
|
-
|
|
45342
|
-
|
|
45343
|
-
|
|
45344
|
-
},
|
|
45450
|
+
if (typeof item !== 'string' && item instanceof String === false) {
|
|
45451
|
+
var label = '';
|
|
45452
|
+
var value = '';
|
|
45345
45453
|
|
|
45346
|
-
|
|
45347
|
-
|
|
45348
|
-
|
|
45349
|
-
|
|
45454
|
+
if (that.displayMember !== '' && that.displayMember !== undefined) {
|
|
45455
|
+
if (item[that.displayMember]) {
|
|
45456
|
+
label = item[that.displayMember];
|
|
45457
|
+
}
|
|
45458
|
+
}
|
|
45350
45459
|
|
|
45351
|
-
|
|
45352
|
-
|
|
45353
|
-
|
|
45354
|
-
if (this.roundedCorners) {
|
|
45355
|
-
hostClass += ' jqx-rc-all';
|
|
45356
|
-
popupClass += ' jqx-rc-all';
|
|
45357
|
-
}
|
|
45358
|
-
if (this.disabled) {
|
|
45359
|
-
hostClass += ' jqx-fill-state-disabled';
|
|
45360
|
-
} else {
|
|
45361
|
-
this.host.removeClass(this.toThemeProperty('jqx-fill-state-disabled'));
|
|
45362
|
-
}
|
|
45363
|
-
this.host[func](this.toThemeProperty(hostClass));
|
|
45364
|
-
this._popupHelper[func](this.toThemeProperty(popupClass));
|
|
45365
|
-
},
|
|
45460
|
+
if (that.valueMember !== '' && that.valueMember !== undefined) {
|
|
45461
|
+
value = item[that.valueMember];
|
|
45462
|
+
}
|
|
45366
45463
|
|
|
45367
|
-
|
|
45368
|
-
|
|
45369
|
-
|
|
45464
|
+
if (label === '') {
|
|
45465
|
+
label = item.label;
|
|
45466
|
+
}
|
|
45467
|
+
if (value === '') {
|
|
45468
|
+
value = item.value;
|
|
45469
|
+
}
|
|
45370
45470
|
|
|
45371
|
-
|
|
45372
|
-
|
|
45373
|
-
}
|
|
45471
|
+
return { label: label, value: value };
|
|
45472
|
+
}
|
|
45374
45473
|
|
|
45375
|
-
|
|
45376
|
-
|
|
45377
|
-
|
|
45378
|
-
|
|
45474
|
+
return item;
|
|
45475
|
+
};
|
|
45476
|
+
|
|
45477
|
+
var mapItems = function (source) {
|
|
45478
|
+
var items = [];
|
|
45479
|
+
for (var i = 0; i < source.length; i++) {
|
|
45480
|
+
items[i] = mapItem(source[i]);
|
|
45481
|
+
}
|
|
45482
|
+
return items;
|
|
45483
|
+
};
|
|
45484
|
+
|
|
45485
|
+
if (this.source && this.source._source) {
|
|
45486
|
+
this.adapter = this.source;
|
|
45487
|
+
if (this.adapter._source.localdata != null) {
|
|
45488
|
+
this.adapter.unbindBindingUpdate(this.element.id);
|
|
45489
|
+
this.adapter.bindBindingUpdate(this.element.id, function () {
|
|
45490
|
+
that.source = mapItems(that.adapter.records);
|
|
45491
|
+
});
|
|
45492
|
+
}
|
|
45493
|
+
else {
|
|
45494
|
+
var postdata = {};
|
|
45495
|
+
if (this.adapter._options.data) {
|
|
45496
|
+
$.extend(that.adapter._options.data, postdata);
|
|
45497
|
+
}
|
|
45498
|
+
else {
|
|
45499
|
+
if (this.source._source.data) {
|
|
45500
|
+
$.extend(postdata, this.source._source.data);
|
|
45501
|
+
}
|
|
45502
|
+
this.adapter._options.data = postdata;
|
|
45503
|
+
}
|
|
45504
|
+
this.adapter.unbindDownloadComplete(this.element.id);
|
|
45505
|
+
this.adapter.bindDownloadComplete(this.element.id, function () {
|
|
45506
|
+
that.source = mapItems(that.adapter.records);
|
|
45507
|
+
});
|
|
45508
|
+
}
|
|
45509
|
+
this.source.dataBind();
|
|
45510
|
+
return;
|
|
45379
45511
|
}
|
|
45380
|
-
|
|
45381
|
-
|
|
45382
|
-
|
|
45383
|
-
range.moveEnd('character', textbox[0].value.length);
|
|
45384
|
-
range.moveStart('character', 0);
|
|
45385
|
-
range.select();
|
|
45512
|
+
|
|
45513
|
+
if (!$.isFunction(this.source)) {
|
|
45514
|
+
this.source = mapItems(this.source);
|
|
45386
45515
|
}
|
|
45387
|
-
},
|
|
45388
|
-
},
|
|
45516
|
+
},
|
|
45389
45517
|
|
|
45390
|
-
|
|
45391
|
-
|
|
45392
|
-
|
|
45518
|
+
_refreshClasses: function (add) {
|
|
45519
|
+
var func = add ? 'addClass' : 'removeClass',
|
|
45520
|
+
hostClass = 'jqx-widget-content jqx-input-widget jqx-input jqx-widget',
|
|
45521
|
+
popupClass = 'jqx-popup jqx-input-popup jqx-menu jqx-menu-vertical jqx-menu-dropdown jqx-widget jqx-widget-content';
|
|
45393
45522
|
|
|
45394
|
-
|
|
45395
|
-
|
|
45396
|
-
|
|
45523
|
+
if ($.jqx.browser.msie) {
|
|
45524
|
+
popupClass += ' jqx-noshadow';
|
|
45525
|
+
}
|
|
45526
|
+
if (this.roundedCorners) {
|
|
45527
|
+
hostClass += ' jqx-rc-all';
|
|
45528
|
+
popupClass += ' jqx-rc-all';
|
|
45529
|
+
}
|
|
45530
|
+
if (this.disabled) {
|
|
45531
|
+
hostClass += ' jqx-fill-state-disabled';
|
|
45532
|
+
} else {
|
|
45533
|
+
this.host.removeClass(this.toThemeProperty('jqx-fill-state-disabled'));
|
|
45534
|
+
}
|
|
45535
|
+
this.host[func](this.toThemeProperty(hostClass));
|
|
45536
|
+
this._popupHelper[func](this.toThemeProperty(popupClass));
|
|
45537
|
+
},
|
|
45397
45538
|
|
|
45398
|
-
|
|
45399
|
-
|
|
45539
|
+
selectAll: function () {
|
|
45540
|
+
var that = this;
|
|
45541
|
+
var textbox = this.host;
|
|
45400
45542
|
|
|
45401
|
-
|
|
45402
|
-
|
|
45403
|
-
|
|
45404
|
-
},
|
|
45543
|
+
if (textbox[0] instanceof HTMLInputElement === false) {
|
|
45544
|
+
textbox = $(that.input);
|
|
45545
|
+
}
|
|
45405
45546
|
|
|
45406
|
-
|
|
45407
|
-
|
|
45408
|
-
|
|
45547
|
+
setTimeout(function () {
|
|
45548
|
+
if ('selectionStart' in textbox[0]) {
|
|
45549
|
+
textbox[0].focus();
|
|
45550
|
+
textbox[0].setSelectionRange(0, textbox[0].value.length);
|
|
45551
|
+
}
|
|
45552
|
+
else {
|
|
45553
|
+
var range = textbox[0].createTextRange();
|
|
45554
|
+
range.collapse(true);
|
|
45555
|
+
range.moveEnd('character', textbox[0].value.length);
|
|
45556
|
+
range.moveStart('character', 0);
|
|
45557
|
+
range.select();
|
|
45558
|
+
}
|
|
45559
|
+
}, 10);
|
|
45560
|
+
},
|
|
45409
45561
|
|
|
45410
|
-
|
|
45411
|
-
|
|
45412
|
-
|
|
45562
|
+
selectLast: function () {
|
|
45563
|
+
var that = this;
|
|
45564
|
+
var textbox = this.host;
|
|
45413
45565
|
|
|
45414
|
-
|
|
45415
|
-
|
|
45416
|
-
textbox[0].focus();
|
|
45417
|
-
textbox[0].setSelectionRange(index, index);
|
|
45566
|
+
if (textbox[0] instanceof HTMLInputElement === false) {
|
|
45567
|
+
textbox = $(that.input);
|
|
45418
45568
|
}
|
|
45419
|
-
else {
|
|
45420
|
-
var range = textbox[0].createTextRange();
|
|
45421
|
-
range.collapse(true);
|
|
45422
|
-
range.moveEnd('character', index);
|
|
45423
|
-
range.moveStart('character', index);
|
|
45424
|
-
range.select();
|
|
45425
|
-
}
|
|
45426
|
-
}, 10);
|
|
45427
|
-
},
|
|
45428
45569
|
|
|
45429
|
-
|
|
45430
|
-
|
|
45570
|
+
this.selectStart(textbox[0].value.length);
|
|
45571
|
+
},
|
|
45572
|
+
|
|
45573
|
+
selectFirst: function () {
|
|
45574
|
+
//var textbox = this.host;
|
|
45575
|
+
this.selectStart(0);
|
|
45576
|
+
},
|
|
45577
|
+
|
|
45578
|
+
selectStart: function (index) {
|
|
45431
45579
|
var that = this;
|
|
45432
|
-
|
|
45433
|
-
setTimeout(function () {
|
|
45434
|
-
that.element.focus();
|
|
45435
|
-
}, 25);
|
|
45580
|
+
var textbox = this.host;
|
|
45436
45581
|
|
|
45437
|
-
|
|
45438
|
-
|
|
45439
|
-
|
|
45440
|
-
},
|
|
45582
|
+
if (textbox[0] instanceof HTMLInputElement === false) {
|
|
45583
|
+
textbox = $(that.input);
|
|
45584
|
+
}
|
|
45441
45585
|
|
|
45442
|
-
|
|
45443
|
-
|
|
45444
|
-
|
|
45445
|
-
|
|
45446
|
-
|
|
45586
|
+
setTimeout(function () {
|
|
45587
|
+
if ('selectionStart' in textbox[0]) {
|
|
45588
|
+
textbox[0].focus();
|
|
45589
|
+
textbox[0].setSelectionRange(index, index);
|
|
45590
|
+
}
|
|
45591
|
+
else {
|
|
45592
|
+
var range = textbox[0].createTextRange();
|
|
45593
|
+
range.collapse(true);
|
|
45594
|
+
range.moveEnd('character', index);
|
|
45595
|
+
range.moveStart('character', index);
|
|
45596
|
+
range.select();
|
|
45597
|
+
}
|
|
45598
|
+
}, 10);
|
|
45599
|
+
},
|
|
45447
45600
|
|
|
45448
|
-
|
|
45449
|
-
|
|
45450
|
-
|
|
45601
|
+
focus: function () {
|
|
45602
|
+
try {
|
|
45603
|
+
var that = this;
|
|
45604
|
+
that.element.focus();
|
|
45605
|
+
setTimeout(function () {
|
|
45606
|
+
that.element.focus();
|
|
45607
|
+
}, 25);
|
|
45451
45608
|
|
|
45452
|
-
if (!this.baseHost) {
|
|
45453
|
-
if (this.width != null && this.width.toString().indexOf("px") != -1) {
|
|
45454
|
-
this.element.style.width = parseInt(this.width) + 'px';
|
|
45455
|
-
}
|
|
45456
|
-
else if (this.width != undefined && !isNaN(this.width)) {
|
|
45457
|
-
this.element.style.width = this.width + 'px';
|
|
45458
45609
|
}
|
|
45459
|
-
|
|
45460
|
-
this.element.style.width = this.width;
|
|
45610
|
+
catch (error) {
|
|
45461
45611
|
}
|
|
45612
|
+
},
|
|
45462
45613
|
|
|
45463
|
-
|
|
45464
|
-
|
|
45465
|
-
|
|
45466
|
-
|
|
45467
|
-
|
|
45468
|
-
}
|
|
45469
|
-
else {
|
|
45470
|
-
this.element.style.height = this.height;
|
|
45471
|
-
}
|
|
45472
|
-
if (this._hasAddons) {
|
|
45473
|
-
this._addonsWidth = 35;
|
|
45474
|
-
this.input.style.width = 'calc(100% - ' + this._addonsWidth + 'px)';
|
|
45475
|
-
}
|
|
45476
|
-
} else {
|
|
45477
|
-
if (this.width != null && this.width.toString().indexOf("px") != -1) {
|
|
45478
|
-
this.baseElement.style.width = parseInt(this.width) + 'px';
|
|
45479
|
-
}
|
|
45480
|
-
else if (this.width != undefined && !isNaN(this.width)) {
|
|
45481
|
-
this.baseElement.style.width = this.width + 'px';
|
|
45482
|
-
}
|
|
45614
|
+
resize: function (width, height) {
|
|
45615
|
+
this.width = width;
|
|
45616
|
+
this.height = height;
|
|
45617
|
+
this.refresh();
|
|
45618
|
+
},
|
|
45483
45619
|
|
|
45484
|
-
|
|
45485
|
-
|
|
45486
|
-
|
|
45487
|
-
|
|
45488
|
-
|
|
45489
|
-
|
|
45490
|
-
|
|
45491
|
-
|
|
45492
|
-
|
|
45493
|
-
|
|
45494
|
-
|
|
45495
|
-
|
|
45496
|
-
|
|
45620
|
+
refresh: function () {
|
|
45621
|
+
this._refreshClasses(false);
|
|
45622
|
+
this._refreshClasses(true);
|
|
45623
|
+
|
|
45624
|
+
if (!this.baseHost) {
|
|
45625
|
+
if (this.width != null && this.width.toString().indexOf("px") != -1) {
|
|
45626
|
+
this.element.style.width = parseInt(this.width) + 'px';
|
|
45627
|
+
}
|
|
45628
|
+
else if (this.width != undefined && !isNaN(this.width)) {
|
|
45629
|
+
this.element.style.width = this.width + 'px';
|
|
45630
|
+
}
|
|
45631
|
+
else {
|
|
45632
|
+
this.element.style.width = this.width;
|
|
45633
|
+
}
|
|
45634
|
+
|
|
45635
|
+
if (this.height != null && this.height.toString().indexOf("px") != -1) {
|
|
45636
|
+
this.element.style.height = parseInt(this.height) + 'px';;
|
|
45637
|
+
}
|
|
45638
|
+
else if (this.height != undefined && !isNaN(this.height)) {
|
|
45639
|
+
this.element.style.height = this.height + 'px';
|
|
45640
|
+
}
|
|
45641
|
+
else {
|
|
45642
|
+
this.element.style.height = this.height;
|
|
45643
|
+
}
|
|
45644
|
+
if (this._hasAddons) {
|
|
45645
|
+
this._addonsWidth = 35;
|
|
45646
|
+
this.input.style.width = 'calc(100% - ' + this._addonsWidth + 'px)';
|
|
45497
45647
|
}
|
|
45498
|
-
});
|
|
45499
|
-
that._addonsWidth = totalWidth;
|
|
45500
|
-
if (IE8) {
|
|
45501
|
-
var height = Math.max(0, that.baseElement.offsetHeight - 2);
|
|
45502
|
-
that.element.style.width = Math.max(0, (that.baseElement.offsetWidth - totalWidth - 1)) + 'px';
|
|
45503
|
-
that.element.style.minHeight = height + 'px';
|
|
45504
|
-
that.element.style.lineHeight = height + 'px';
|
|
45505
45648
|
} else {
|
|
45506
|
-
|
|
45507
|
-
|
|
45508
|
-
|
|
45509
|
-
if (
|
|
45510
|
-
|
|
45511
|
-
}
|
|
45512
|
-
|
|
45513
|
-
|
|
45514
|
-
|
|
45515
|
-
|
|
45516
|
-
|
|
45517
|
-
|
|
45518
|
-
|
|
45519
|
-
|
|
45649
|
+
if (this.width != null && this.width.toString().indexOf("px") != -1) {
|
|
45650
|
+
this.baseElement.style.width = parseInt(this.width) + 'px';
|
|
45651
|
+
}
|
|
45652
|
+
else if (this.width != undefined && !isNaN(this.width)) {
|
|
45653
|
+
this.baseElement.style.width = this.width + 'px';
|
|
45654
|
+
}
|
|
45655
|
+
|
|
45656
|
+
if (this.height != null && this.height.toString().indexOf("px") != -1) {
|
|
45657
|
+
this.baseElement.style.height = parseInt(this.height) + 'px';
|
|
45658
|
+
}
|
|
45659
|
+
else if (this.height != undefined && !isNaN(this.height)) {
|
|
45660
|
+
this.baseElement.style.height = this.height + 'px';
|
|
45661
|
+
};
|
|
45662
|
+
var that = this,
|
|
45663
|
+
IE8 = $.jqx.browser.msie && $.jqx.browser.version < 9,
|
|
45664
|
+
totalWidth = 0;
|
|
45665
|
+
$.each(this.baseHost.children(), function () {
|
|
45666
|
+
this.style.height = '100%';
|
|
45667
|
+
if (this !== that.element) {
|
|
45668
|
+
totalWidth += $(this).outerWidth();
|
|
45520
45669
|
}
|
|
45521
|
-
|
|
45670
|
+
});
|
|
45671
|
+
that._addonsWidth = totalWidth;
|
|
45672
|
+
if (IE8) {
|
|
45673
|
+
var height = Math.max(0, that.baseElement.offsetHeight - 2);
|
|
45674
|
+
that.element.style.width = Math.max(0, (that.baseElement.offsetWidth - totalWidth - 1)) + 'px';
|
|
45675
|
+
that.element.style.minHeight = height + 'px';
|
|
45676
|
+
that.element.style.lineHeight = height + 'px';
|
|
45677
|
+
} else {
|
|
45678
|
+
that.element.style.width = 'calc(100% - ' + totalWidth + 'px)';
|
|
45522
45679
|
}
|
|
45523
|
-
|
|
45524
|
-
|
|
45680
|
+
$.jqx.utilities.resize(that.baseHost, function () {
|
|
45681
|
+
if (IE8 && typeof that.width === 'string' && that.width.indexOf('%') !== -1 && !that._initiallyHidden) {
|
|
45682
|
+
that.element.style.width = (that.baseElement.offsetWidth - that._addonsWidth - 1) + 'px';
|
|
45683
|
+
} else if (that._initiallyHidden) {
|
|
45684
|
+
that._addonsWidth = that._getAddonsWidth();
|
|
45685
|
+
if (!IE8) {
|
|
45686
|
+
that.element.style.width = 'calc(100% - ' + that._addonsWidth + 'px)';
|
|
45687
|
+
} else {
|
|
45688
|
+
that.element.style.width = (that.baseElement.offsetWidth - that._addonsWidth - 1) + 'px';
|
|
45689
|
+
var height = that.baseElement.offsetHeight - 2;
|
|
45690
|
+
that.element.style.minHeight = height + 'px';
|
|
45691
|
+
that.element.style.lineHeight = height + 'px';
|
|
45692
|
+
}
|
|
45693
|
+
that._initiallyHidden = false;
|
|
45694
|
+
}
|
|
45695
|
+
});
|
|
45696
|
+
}
|
|
45525
45697
|
|
|
45526
|
-
|
|
45527
|
-
|
|
45528
|
-
|
|
45529
|
-
|
|
45530
|
-
|
|
45531
|
-
|
|
45532
|
-
|
|
45698
|
+
if (this.disabled) {
|
|
45699
|
+
this.element.setAttribute('disabled', true);
|
|
45700
|
+
} else {
|
|
45701
|
+
this.element.removeAttribute('disabled');
|
|
45702
|
+
}
|
|
45703
|
+
if (this.maxLength) {
|
|
45704
|
+
this.element.setAttribute('maxlength', this.maxLength);
|
|
45533
45705
|
|
|
45534
|
-
|
|
45535
|
-
|
|
45706
|
+
if (this.input) {
|
|
45707
|
+
this.input.setAttribute('maxlength', this.maxLength);
|
|
45708
|
+
}
|
|
45536
45709
|
}
|
|
45537
|
-
}
|
|
45538
45710
|
|
|
45539
|
-
|
|
45540
|
-
|
|
45541
|
-
|
|
45542
|
-
|
|
45711
|
+
if (!this.element.getAttribute('placeholder')) {
|
|
45712
|
+
this._refreshPlaceHolder();
|
|
45713
|
+
}
|
|
45714
|
+
},
|
|
45543
45715
|
|
|
45544
|
-
|
|
45545
|
-
|
|
45716
|
+
_refreshPlaceHolder: function () {
|
|
45717
|
+
var that = this;
|
|
45546
45718
|
|
|
45547
|
-
|
|
45548
|
-
|
|
45549
|
-
|
|
45550
|
-
|
|
45551
|
-
|
|
45552
|
-
that.input.value
|
|
45719
|
+
if (!that.isMaterialized() || !that.hint) {
|
|
45720
|
+
|
|
45721
|
+
if ('placeholder' in this.input && !($.jqx.browser.msie && $.jqx.browser.version < 9)) {
|
|
45722
|
+
that.input.setAttribute('placeHolder', that.placeHolder);
|
|
45723
|
+
} else {
|
|
45724
|
+
if (that.input.value === '') {
|
|
45725
|
+
that.input.value = that.placeHolder;
|
|
45726
|
+
}
|
|
45553
45727
|
}
|
|
45554
45728
|
}
|
|
45555
|
-
}
|
|
45556
45729
|
|
|
45557
|
-
|
|
45558
|
-
|
|
45559
|
-
|
|
45730
|
+
if (!that.hint) {
|
|
45731
|
+
return;
|
|
45732
|
+
}
|
|
45560
45733
|
|
|
45561
|
-
|
|
45562
|
-
|
|
45563
|
-
|
|
45564
|
-
|
|
45565
|
-
|
|
45566
|
-
|
|
45734
|
+
if (that.input.value !== "") {
|
|
45735
|
+
that.element.setAttribute("hint", true);
|
|
45736
|
+
}
|
|
45737
|
+
else {
|
|
45738
|
+
that.element.removeAttribute("hint");
|
|
45739
|
+
}
|
|
45567
45740
|
|
|
45568
|
-
|
|
45569
|
-
|
|
45570
|
-
|
|
45571
|
-
},
|
|
45741
|
+
if (that.label) {
|
|
45742
|
+
that.label.innerHTML = that.placeHolder;
|
|
45743
|
+
}
|
|
45572
45744
|
|
|
45573
|
-
|
|
45574
|
-
|
|
45575
|
-
|
|
45576
|
-
|
|
45577
|
-
} else {
|
|
45578
|
-
this.host.remove();
|
|
45579
|
-
}
|
|
45580
|
-
if (this.$popup) {
|
|
45581
|
-
this._popupHelper.remove();
|
|
45582
|
-
}
|
|
45583
|
-
},
|
|
45745
|
+
if (this._inlineLabel && that.inlineAutoComplete) {
|
|
45746
|
+
this._inlineLabel.style.display = 'none';
|
|
45747
|
+
that.host.css('overflow', 'visible');
|
|
45748
|
+
}
|
|
45584
45749
|
|
|
45585
|
-
|
|
45586
|
-
if (value.width && value.height && Object.keys(value).length === 2) {
|
|
45587
|
-
object.refresh();
|
|
45588
|
-
}
|
|
45589
|
-
},
|
|
45750
|
+
},
|
|
45590
45751
|
|
|
45591
|
-
|
|
45592
|
-
|
|
45593
|
-
if (
|
|
45594
|
-
|
|
45595
|
-
if ($.jqx.browser.msie && $.jqx.browser.version < 9) {
|
|
45596
|
-
object.element.style.width = (object.baseElement.offsetWidth - object._addonsWidth - 1) + 'px';
|
|
45597
|
-
}
|
|
45752
|
+
destroy: function () {
|
|
45753
|
+
this.removeHandlers();
|
|
45754
|
+
if (this.baseHost) {
|
|
45755
|
+
this.baseHost.remove();
|
|
45598
45756
|
} else {
|
|
45599
|
-
|
|
45757
|
+
this.host.remove();
|
|
45600
45758
|
}
|
|
45601
|
-
|
|
45602
|
-
|
|
45759
|
+
if (this.$popup) {
|
|
45760
|
+
this._popupHelper.remove();
|
|
45761
|
+
}
|
|
45762
|
+
},
|
|
45603
45763
|
|
|
45604
|
-
|
|
45605
|
-
if (
|
|
45606
|
-
object.
|
|
45764
|
+
propertiesChangedHandler: function (object, key, value) {
|
|
45765
|
+
if (value.width && value.height && Object.keys(value).length === 2) {
|
|
45766
|
+
object.refresh();
|
|
45607
45767
|
}
|
|
45608
|
-
|
|
45609
|
-
return;
|
|
45610
|
-
}
|
|
45768
|
+
},
|
|
45611
45769
|
|
|
45612
|
-
|
|
45613
|
-
|
|
45614
|
-
|
|
45770
|
+
propertyChangedHandler: function (object, key, oldvalue, value) {
|
|
45771
|
+
if (key === 'width' && value !== oldvalue) {
|
|
45772
|
+
if (object.baseHost) {
|
|
45773
|
+
object.baseElement.style.width = object._toPx(value);
|
|
45774
|
+
if ($.jqx.browser.msie && $.jqx.browser.version < 9) {
|
|
45775
|
+
object.element.style.width = (object.baseElement.offsetWidth - object._addonsWidth - 1) + 'px';
|
|
45776
|
+
}
|
|
45777
|
+
} else {
|
|
45778
|
+
object.element.style.width = object._toPx(value);
|
|
45779
|
+
}
|
|
45780
|
+
return;
|
|
45781
|
+
}
|
|
45615
45782
|
|
|
45616
|
-
|
|
45617
|
-
|
|
45618
|
-
|
|
45783
|
+
if (key === 'placeHolder') {
|
|
45784
|
+
if ((!('placeholder' in object.element) || ($.jqx.browser.msie && $.jqx.browser.version < 9)) && object.input.value === oldvalue) {
|
|
45785
|
+
object.input.value = '';
|
|
45786
|
+
}
|
|
45787
|
+
object._refreshPlaceHolder();
|
|
45788
|
+
return;
|
|
45789
|
+
}
|
|
45619
45790
|
|
|
45620
|
-
|
|
45621
|
-
|
|
45622
|
-
object.open();
|
|
45623
|
-
} else {
|
|
45624
|
-
object.close();
|
|
45791
|
+
if (object.batchUpdate && object.batchUpdate.width && object.batchUpdate.height && Object.keys(object.batchUpdate).length === 2) {
|
|
45792
|
+
return;
|
|
45625
45793
|
}
|
|
45626
|
-
return;
|
|
45627
|
-
}
|
|
45628
|
-
if (key === 'source') {
|
|
45629
|
-
object._oldsource = value;
|
|
45630
|
-
object._updateSource();
|
|
45631
|
-
}
|
|
45632
|
-
if (key === 'displayMember' || key === 'valueMember') {
|
|
45633
|
-
object.source = object._oldsource;
|
|
45634
|
-
object._updateSource();
|
|
45635
|
-
}
|
|
45636
|
-
if (key === 'disabled') {
|
|
45637
|
-
$.jqx.aria(object, 'aria-disabled', object.disabled);
|
|
45638
|
-
}
|
|
45639
45794
|
|
|
45640
|
-
|
|
45641
|
-
|
|
45642
|
-
|
|
45643
|
-
}
|
|
45795
|
+
if (key === 'theme') {
|
|
45796
|
+
$.jqx.utilities.setTheme(oldvalue, value, object.host);
|
|
45797
|
+
}
|
|
45644
45798
|
|
|
45645
|
-
|
|
45646
|
-
|
|
45799
|
+
if (key === 'opened') {
|
|
45800
|
+
if (value) {
|
|
45801
|
+
object.open();
|
|
45802
|
+
} else {
|
|
45803
|
+
object.close();
|
|
45804
|
+
}
|
|
45805
|
+
return;
|
|
45806
|
+
}
|
|
45807
|
+
if (key === 'source') {
|
|
45808
|
+
object._oldsource = value;
|
|
45809
|
+
object._updateSource();
|
|
45810
|
+
}
|
|
45811
|
+
if (key === 'displayMember' || key === 'valueMember') {
|
|
45812
|
+
object.source = object._oldsource;
|
|
45813
|
+
object._updateSource();
|
|
45814
|
+
}
|
|
45815
|
+
if (key === 'disabled') {
|
|
45816
|
+
$.jqx.aria(object, 'aria-disabled', object.disabled);
|
|
45817
|
+
}
|
|
45647
45818
|
|
|
45648
|
-
|
|
45649
|
-
|
|
45650
|
-
|
|
45651
|
-
|
|
45652
|
-
this.input.value = this.renderer(label, this.input.value);
|
|
45653
|
-
this.selectedItem = { 'label': label, 'value': val };
|
|
45654
|
-
this.element.setAttribute('data-value', val);
|
|
45655
|
-
this.element.setAttribute('data-label', label);
|
|
45656
|
-
this._raiseEvent('0', { 'item': { 'label': label, 'value': val }, 'label': label, 'value': val });
|
|
45657
|
-
this._raiseEvent('3', { type: changeType, 'item': { 'label': label, 'value': val }, 'label': label, 'value': val });
|
|
45658
|
-
this.value = label;
|
|
45659
|
-
return this.close();
|
|
45660
|
-
},
|
|
45819
|
+
if (key === 'value') {
|
|
45820
|
+
object.input.value = value;
|
|
45821
|
+
object._refreshPlaceHolder();
|
|
45822
|
+
}
|
|
45661
45823
|
|
|
45662
|
-
|
|
45663
|
-
|
|
45664
|
-
|
|
45665
|
-
|
|
45666
|
-
|
|
45824
|
+
object.refresh();
|
|
45825
|
+
},
|
|
45826
|
+
|
|
45827
|
+
select: function (event, ui, changeType) {
|
|
45828
|
+
var that = this;
|
|
45829
|
+
var selectedItem = this._find('jqx-fill-state-pressed', this._popupHelper);
|
|
45830
|
+
|
|
45831
|
+
if (this.inlineAutoComplete) {
|
|
45832
|
+
selectedItem = this.element.querySelector('.jqx-input-inline');
|
|
45833
|
+
selectedItem.style.display = 'none';
|
|
45834
|
+
that.host.css('overflow', 'visible');
|
|
45835
|
+
}
|
|
45836
|
+
|
|
45837
|
+
var val = selectedItem.getAttribute('data-value');
|
|
45838
|
+
var label = selectedItem.getAttribute('data-name');
|
|
45839
|
+
this.input.value = this.renderer(label, this.input.value);
|
|
45840
|
+
this.selectedItem = { 'label': label, 'value': val };
|
|
45841
|
+
this.element.setAttribute('data-value', val);
|
|
45842
|
+
this.element.setAttribute('data-label', label);
|
|
45843
|
+
this._raiseEvent('0', { 'item': { 'label': label, 'value': val }, 'label': label, 'value': val });
|
|
45844
|
+
this._raiseEvent('3', { type: changeType, 'item': { 'label': label, 'value': val }, 'label': label, 'value': val });
|
|
45845
|
+
this.value = label;
|
|
45846
|
+
return this.close();
|
|
45847
|
+
},
|
|
45848
|
+
|
|
45849
|
+
val: function (value) {
|
|
45850
|
+
if (arguments.length === 0 || (value != null && typeof (value) === 'object' && !value.label && !value.value)) {
|
|
45851
|
+
if (this.displayMember !== '' && this.valueMember !== '' && this.selectedItem) {
|
|
45852
|
+
if (this.input.value === '') {
|
|
45853
|
+
return '';
|
|
45854
|
+
}
|
|
45855
|
+
return this.selectedItem;
|
|
45667
45856
|
}
|
|
45668
|
-
return this.selectedItem;
|
|
45669
|
-
}
|
|
45670
45857
|
|
|
45671
|
-
|
|
45672
|
-
|
|
45858
|
+
return this.input.value;
|
|
45859
|
+
}
|
|
45673
45860
|
|
|
45674
|
-
|
|
45675
|
-
|
|
45676
|
-
|
|
45677
|
-
|
|
45678
|
-
|
|
45679
|
-
this.input.value = value.label;
|
|
45680
|
-
if (this.input) {
|
|
45861
|
+
if (value && value.label) {
|
|
45862
|
+
this.selectedItem = { 'label': value.label, 'value': value.value };
|
|
45863
|
+
this.element.setAttribute('data-value', value.value);
|
|
45864
|
+
this.element.setAttribute('data-label', value.label);
|
|
45865
|
+
this.value = value;
|
|
45681
45866
|
this.input.value = value.label;
|
|
45867
|
+
if (this.input) {
|
|
45868
|
+
this.input.value = value.label;
|
|
45869
|
+
}
|
|
45870
|
+
return this.input.value;
|
|
45682
45871
|
}
|
|
45683
|
-
return this.input.value;
|
|
45684
|
-
}
|
|
45685
45872
|
|
|
45686
|
-
|
|
45687
|
-
|
|
45873
|
+
this.value = value;
|
|
45874
|
+
this.input.value = value;
|
|
45688
45875
|
|
|
45689
|
-
|
|
45690
|
-
|
|
45691
|
-
|
|
45692
|
-
|
|
45693
|
-
|
|
45694
|
-
|
|
45695
|
-
|
|
45696
|
-
|
|
45697
|
-
|
|
45698
|
-
|
|
45699
|
-
|
|
45876
|
+
this.element.setAttribute('data-value', value);
|
|
45877
|
+
this.element.setAttribute('data-label', value);
|
|
45878
|
+
if (value && value.label) {
|
|
45879
|
+
this._raiseEvent('3', { type: null, 'item': { 'label': value.label, 'value': value.value }, 'label': value.label, 'value': value.value });
|
|
45880
|
+
}
|
|
45881
|
+
else {
|
|
45882
|
+
this._raiseEvent('3', { type: null, 'item': { 'label': value, 'value': value }, 'label': value, 'value': value });
|
|
45883
|
+
}
|
|
45884
|
+
this._refreshPlaceHolder();
|
|
45885
|
+
return this.input.value;
|
|
45886
|
+
},
|
|
45700
45887
|
|
|
45701
|
-
|
|
45702
|
-
|
|
45703
|
-
|
|
45704
|
-
|
|
45888
|
+
_raiseEvent: function (id, arg) {
|
|
45889
|
+
if (arg === undefined) {
|
|
45890
|
+
arg = { owner: null };
|
|
45891
|
+
}
|
|
45705
45892
|
|
|
45706
|
-
|
|
45707
|
-
|
|
45893
|
+
var evt = this.events[id];
|
|
45894
|
+
arg.owner = this;
|
|
45708
45895
|
|
|
45709
|
-
|
|
45710
|
-
|
|
45711
|
-
|
|
45712
|
-
|
|
45713
|
-
|
|
45714
|
-
|
|
45896
|
+
var event = new $.Event(evt);
|
|
45897
|
+
event.owner = this;
|
|
45898
|
+
event.args = arg;
|
|
45899
|
+
if (event.preventDefault) {
|
|
45900
|
+
event.preventDefault();
|
|
45901
|
+
}
|
|
45715
45902
|
|
|
45716
|
-
|
|
45717
|
-
|
|
45718
|
-
|
|
45903
|
+
var result = this.host.trigger(event);
|
|
45904
|
+
return result;
|
|
45905
|
+
},
|
|
45719
45906
|
|
|
45720
|
-
|
|
45721
|
-
|
|
45722
|
-
|
|
45907
|
+
_renderer: function (item) {
|
|
45908
|
+
return item;
|
|
45909
|
+
},
|
|
45723
45910
|
|
|
45724
|
-
|
|
45725
|
-
|
|
45726
|
-
|
|
45727
|
-
|
|
45911
|
+
open: function () {
|
|
45912
|
+
if ($.jqx.isHidden(this.host)) {
|
|
45913
|
+
return;
|
|
45914
|
+
}
|
|
45728
45915
|
|
|
45729
|
-
|
|
45730
|
-
|
|
45731
|
-
|
|
45916
|
+
var position = $.extend({}, this.host.coord(true), {
|
|
45917
|
+
height: this.element.offsetHeight
|
|
45918
|
+
});
|
|
45732
45919
|
|
|
45733
|
-
|
|
45734
|
-
|
|
45735
|
-
|
|
45736
|
-
|
|
45737
|
-
|
|
45738
|
-
|
|
45920
|
+
if (this.$popup.parentNode !== document.body) {
|
|
45921
|
+
var popupId = this.element.id + '_popup';
|
|
45922
|
+
this.$popup.id = popupId;
|
|
45923
|
+
$.jqx.aria(this, 'aria-owns', popupId);
|
|
45924
|
+
document.body.appendChild(this.$popup);
|
|
45925
|
+
}
|
|
45739
45926
|
|
|
45740
|
-
|
|
45741
|
-
|
|
45742
|
-
|
|
45743
|
-
|
|
45744
|
-
|
|
45927
|
+
this.$popup.style.position = 'absolute';
|
|
45928
|
+
this.$popup.style.zIndex = this.popupZIndex;
|
|
45929
|
+
this.$popup.style.top = this._toPx(position.top + position.height);
|
|
45930
|
+
this.$popup.style.left = this._toPx(position.left);
|
|
45931
|
+
this.$popup.style.display = 'block';
|
|
45745
45932
|
|
|
45746
|
-
|
|
45747
|
-
|
|
45748
|
-
|
|
45749
|
-
|
|
45750
|
-
|
|
45751
|
-
|
|
45933
|
+
var height = 0;
|
|
45934
|
+
var children = this._popupHelper.children();
|
|
45935
|
+
$.each(children, function () {
|
|
45936
|
+
height += $(this).outerHeight() + 1;
|
|
45937
|
+
});
|
|
45938
|
+
this.$popup.style.height = this._toPx(height);
|
|
45752
45939
|
|
|
45753
|
-
|
|
45754
|
-
|
|
45755
|
-
|
|
45756
|
-
|
|
45940
|
+
if (this.enableBrowserBoundsDetection) {
|
|
45941
|
+
var viewHeight = $(window).height() + $(window).scrollTop();
|
|
45942
|
+
var offset = $(this.$popup).offset();
|
|
45943
|
+
var dpHeight = $(this.$popup).outerHeight();
|
|
45757
45944
|
|
|
45758
|
-
|
|
45759
|
-
|
|
45760
|
-
|
|
45761
|
-
|
|
45945
|
+
if (offset.top + dpHeight > viewHeight) {
|
|
45946
|
+
var newPosition = position.top + position.height - dpHeight - this.host.height();
|
|
45947
|
+
if (newPosition < 0) {
|
|
45948
|
+
newPosition = 0;
|
|
45949
|
+
}
|
|
45950
|
+
this.$popup.style.top = newPosition + 'px';
|
|
45762
45951
|
}
|
|
45763
|
-
this.$popup.style.top = newPosition + 'px';
|
|
45764
45952
|
}
|
|
45765
|
-
}
|
|
45766
45953
|
|
|
45767
|
-
|
|
45768
|
-
|
|
45769
|
-
|
|
45770
|
-
|
|
45771
|
-
|
|
45772
|
-
|
|
45773
|
-
close: function () {
|
|
45774
|
-
if (!this.opened) {
|
|
45775
|
-
return;
|
|
45776
|
-
}
|
|
45954
|
+
this.opened = true;
|
|
45955
|
+
this._raiseEvent('1', { popup: this.$popup });
|
|
45956
|
+
$.jqx.aria(this, 'aria-expanded', true);
|
|
45957
|
+
return this;
|
|
45958
|
+
},
|
|
45777
45959
|
|
|
45778
|
-
|
|
45779
|
-
|
|
45780
|
-
|
|
45781
|
-
|
|
45782
|
-
this._refreshPlaceHolder();
|
|
45783
|
-
return this;
|
|
45784
|
-
},
|
|
45960
|
+
close: function () {
|
|
45961
|
+
if (this._inlineLabel) {
|
|
45962
|
+
this._inlineLabel.style.display = 'none';
|
|
45963
|
+
}
|
|
45785
45964
|
|
|
45786
|
-
|
|
45787
|
-
|
|
45788
|
-
|
|
45965
|
+
if (!this.opened) {
|
|
45966
|
+
return;
|
|
45967
|
+
}
|
|
45789
45968
|
|
|
45790
|
-
|
|
45791
|
-
|
|
45792
|
-
|
|
45969
|
+
this.$popup.style.display = 'none';
|
|
45970
|
+
this.opened = false;
|
|
45971
|
+
this._raiseEvent('2', { popup: this.$popup });
|
|
45972
|
+
$.jqx.aria(this, 'aria-expanded', false);
|
|
45973
|
+
this._refreshPlaceHolder();
|
|
45974
|
+
return this;
|
|
45975
|
+
},
|
|
45793
45976
|
|
|
45794
|
-
|
|
45795
|
-
items
|
|
45796
|
-
|
|
45797
|
-
|
|
45798
|
-
items = this.source;
|
|
45799
|
-
}
|
|
45977
|
+
suggest: function () {
|
|
45978
|
+
var items;
|
|
45979
|
+
var that = this;
|
|
45980
|
+
this.query = this.input.value;
|
|
45800
45981
|
|
|
45801
|
-
|
|
45802
|
-
|
|
45803
|
-
|
|
45982
|
+
if (that.inlineAutoComplete && that.aiKey) {
|
|
45983
|
+
this.load([]);
|
|
45984
|
+
return;
|
|
45985
|
+
}
|
|
45986
|
+
if (!this.query || this.query.length < this.minLength) {
|
|
45987
|
+
if (this._inlineLabel) {
|
|
45988
|
+
this._inlineLabel.style.display = 'none';
|
|
45989
|
+
}
|
|
45804
45990
|
|
|
45805
|
-
|
|
45806
|
-
|
|
45991
|
+
return this.opened ? this.close() : this;
|
|
45992
|
+
}
|
|
45807
45993
|
|
|
45808
|
-
|
|
45809
|
-
|
|
45810
|
-
|
|
45994
|
+
if ($.isFunction(this.source)) {
|
|
45995
|
+
items = this.source(this.query, $.proxy(this.load, this));
|
|
45996
|
+
}
|
|
45997
|
+
else {
|
|
45998
|
+
items = this.source;
|
|
45999
|
+
}
|
|
45811
46000
|
|
|
45812
|
-
|
|
45813
|
-
|
|
45814
|
-
if (that.filter(item)) {
|
|
45815
|
-
items.push(item);
|
|
46001
|
+
if (items) {
|
|
46002
|
+
return this.load(items);
|
|
45816
46003
|
}
|
|
45817
|
-
}
|
|
45818
46004
|
|
|
45819
|
-
|
|
46005
|
+
return this;
|
|
46006
|
+
},
|
|
46007
|
+
|
|
46008
|
+
load: function (originalItems) {
|
|
46009
|
+
var that = this,
|
|
46010
|
+
items = [];
|
|
45820
46011
|
|
|
45821
|
-
|
|
45822
|
-
if (this.
|
|
45823
|
-
|
|
46012
|
+
var searchMode = this.searchMode;
|
|
46013
|
+
if (this.inlineAutoComplete) {
|
|
46014
|
+
this.searchMode = 'startswith';
|
|
45824
46015
|
}
|
|
45825
|
-
|
|
45826
|
-
|
|
46016
|
+
|
|
46017
|
+
for (var i = 0; i < originalItems.length; i++) {
|
|
46018
|
+
var item = originalItems[i];
|
|
46019
|
+
if (that.filter(item)) {
|
|
46020
|
+
items.push(item);
|
|
46021
|
+
}
|
|
45827
46022
|
}
|
|
45828
|
-
}
|
|
45829
46023
|
|
|
45830
|
-
|
|
45831
|
-
},
|
|
46024
|
+
items = this.sort(items);
|
|
45832
46025
|
|
|
45833
|
-
|
|
45834
|
-
|
|
45835
|
-
|
|
45836
|
-
|
|
45837
|
-
|
|
45838
|
-
}
|
|
45839
|
-
else if (this.displayMember) {
|
|
45840
|
-
itemValue = item[this.displayMember];
|
|
45841
|
-
}
|
|
46026
|
+
if (!items.length) {
|
|
46027
|
+
if (this.inlineAutoComplete) {
|
|
46028
|
+
var labelElement = this.element.querySelector('.jqx-input-inline');
|
|
46029
|
+
labelElement.style.display = 'none';
|
|
46030
|
+
that.host.css('overflow', 'visible');
|
|
45842
46031
|
|
|
45843
|
-
|
|
45844
|
-
|
|
45845
|
-
|
|
45846
|
-
|
|
45847
|
-
|
|
45848
|
-
|
|
45849
|
-
|
|
45850
|
-
|
|
45851
|
-
|
|
45852
|
-
|
|
45853
|
-
|
|
45854
|
-
|
|
45855
|
-
|
|
45856
|
-
|
|
45857
|
-
|
|
45858
|
-
|
|
45859
|
-
|
|
45860
|
-
|
|
45861
|
-
|
|
45862
|
-
|
|
45863
|
-
|
|
45864
|
-
|
|
45865
|
-
_sort: function (items) {
|
|
45866
|
-
var bw = [], cs = [], cis = [];
|
|
46032
|
+
if (that._writeTimer) {
|
|
46033
|
+
clearTimeout(that._writeTimer);
|
|
46034
|
+
}
|
|
46035
|
+
that._writeTimer = setTimeout(function () {
|
|
46036
|
+
that.getAISuggestions(function (suggestion) {
|
|
46037
|
+
if (suggestion) {
|
|
46038
|
+
suggestion = that.input.value + suggestion;
|
|
46039
|
+
labelElement.textContent = suggestion;
|
|
46040
|
+
labelElement.setAttribute('data-value', suggestion);
|
|
46041
|
+
labelElement.setAttribute('data-name', suggestion);
|
|
46042
|
+
labelElement.style.opacity = 0.5;
|
|
46043
|
+
labelElement.style.position = 'absolute';
|
|
46044
|
+
labelElement.style.zIndex = 5;
|
|
46045
|
+
labelElement.style.display = '';
|
|
46046
|
+
labelElement.style.left = '6px';
|
|
46047
|
+
labelElement.style.lineHeight = that.height + 'px';
|
|
46048
|
+
that.host.css('overflow', 'hidden');
|
|
46049
|
+
that.searchMode = searchMode;
|
|
46050
|
+
}
|
|
46051
|
+
});
|
|
46052
|
+
}, 500);
|
|
46053
|
+
}
|
|
45867
46054
|
|
|
45868
|
-
|
|
45869
|
-
|
|
46055
|
+
if (this.opened) {
|
|
46056
|
+
return this.close();
|
|
46057
|
+
}
|
|
46058
|
+
else {
|
|
46059
|
+
return this;
|
|
46060
|
+
}
|
|
46061
|
+
}
|
|
46062
|
+
|
|
46063
|
+
if (this.inlineAutoComplete) {
|
|
46064
|
+
var item = items.length ? items[0] : '';
|
|
46065
|
+
var label = typeof item === 'string' ? item : item.label;
|
|
46066
|
+
var value = typeof item === 'string' ? item : item.value;
|
|
46067
|
+
var labelElement = this.element.querySelector('.jqx-input-inline');
|
|
46068
|
+
labelElement.textContent = label;
|
|
46069
|
+
labelElement.setAttribute('data-value', value);
|
|
46070
|
+
labelElement.setAttribute('data-name', label);
|
|
46071
|
+
labelElement.style.opacity = 0.5;
|
|
46072
|
+
labelElement.style.position = 'absolute';
|
|
46073
|
+
labelElement.style.zIndex = 5;
|
|
46074
|
+
labelElement.style.display = '';
|
|
46075
|
+
labelElement.style.left = '6px';
|
|
46076
|
+
labelElement.style.lineHeight = that.height + 'px';
|
|
46077
|
+
this.searchMode = searchMode;
|
|
46078
|
+
that.host.css('overflow', 'hidden');
|
|
46079
|
+
|
|
46080
|
+
this.getAISuggestions(function (suggestion) {
|
|
46081
|
+
if (suggestion) {
|
|
46082
|
+
labelElement.textContent = suggestion;
|
|
46083
|
+
}
|
|
46084
|
+
});
|
|
46085
|
+
return;
|
|
46086
|
+
}
|
|
46087
|
+
return this._render(items.slice(0, this.items)).open();
|
|
46088
|
+
},
|
|
45870
46089
|
|
|
46090
|
+
_filter: function (item) {
|
|
46091
|
+
var value = this.query;
|
|
45871
46092
|
var itemValue = item;
|
|
45872
|
-
if (item.label) {
|
|
46093
|
+
if (item.label != null) {
|
|
45873
46094
|
itemValue = item.label;
|
|
45874
46095
|
}
|
|
45875
46096
|
else if (this.displayMember) {
|
|
45876
46097
|
itemValue = item[this.displayMember];
|
|
45877
46098
|
}
|
|
45878
46099
|
|
|
45879
|
-
|
|
45880
|
-
|
|
45881
|
-
|
|
45882
|
-
|
|
45883
|
-
|
|
45884
|
-
|
|
45885
|
-
|
|
45886
|
-
|
|
46100
|
+
switch (this.searchMode) {
|
|
46101
|
+
case 'none':
|
|
46102
|
+
break;
|
|
46103
|
+
default: // ('containsignorecase')
|
|
46104
|
+
return $.jqx.string.containsIgnoreCase(itemValue, value);
|
|
46105
|
+
case 'contains':
|
|
46106
|
+
return $.jqx.string.contains(itemValue, value);
|
|
46107
|
+
case 'equals':
|
|
46108
|
+
return $.jqx.string.equals(itemValue, value);
|
|
46109
|
+
case 'equalsignorecase':
|
|
46110
|
+
return $.jqx.string.equalsIgnoreCase(itemValue, value);
|
|
46111
|
+
case 'startswith':
|
|
46112
|
+
return $.jqx.string.startsWith(itemValue, value);
|
|
46113
|
+
case 'startswithignorecase':
|
|
46114
|
+
return $.jqx.string.startsWithIgnoreCase(itemValue, value);
|
|
46115
|
+
case 'endswith':
|
|
46116
|
+
return $.jqx.string.endsWith(itemValue, value);
|
|
46117
|
+
case 'endswithignorecase':
|
|
46118
|
+
return $.jqx.string.endsWithIgnoreCase(itemValue, value);
|
|
45887
46119
|
}
|
|
45888
|
-
}
|
|
46120
|
+
},
|
|
45889
46121
|
|
|
45890
|
-
|
|
45891
|
-
|
|
46122
|
+
_sort: function (items) {
|
|
46123
|
+
var bw = [], cs = [], cis = [];
|
|
45892
46124
|
|
|
45893
|
-
|
|
45894
|
-
|
|
45895
|
-
query = query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
|
46125
|
+
for (var i = 0; i < items.length; i++) {
|
|
46126
|
+
var item = items[i];
|
|
45896
46127
|
|
|
45897
|
-
|
|
45898
|
-
|
|
45899
|
-
|
|
45900
|
-
|
|
45901
|
-
|
|
46128
|
+
var itemValue = item;
|
|
46129
|
+
if (item.label) {
|
|
46130
|
+
itemValue = item.label;
|
|
46131
|
+
}
|
|
46132
|
+
else if (this.displayMember) {
|
|
46133
|
+
itemValue = item[this.displayMember];
|
|
46134
|
+
}
|
|
45902
46135
|
|
|
45903
|
-
|
|
45904
|
-
|
|
45905
|
-
|
|
45906
|
-
|
|
46136
|
+
if (itemValue.toString().toLowerCase().indexOf(this.query.toString().toLowerCase()) === 0) {
|
|
46137
|
+
bw.push(item);
|
|
46138
|
+
}
|
|
46139
|
+
else if (itemValue.toString().indexOf(this.query) >= 0) {
|
|
46140
|
+
cs.push(item);
|
|
46141
|
+
}
|
|
46142
|
+
else if (itemValue.toString().toLowerCase().indexOf(this.query.toString().toLowerCase()) >= 0) {
|
|
46143
|
+
cis.push(item);
|
|
46144
|
+
}
|
|
46145
|
+
}
|
|
45907
46146
|
|
|
45908
|
-
|
|
45909
|
-
|
|
46147
|
+
return bw.concat(cs, cis);
|
|
46148
|
+
},
|
|
45910
46149
|
|
|
45911
|
-
|
|
45912
|
-
|
|
45913
|
-
|
|
45914
|
-
var result = String(value).replace(regExp, function (s) { return that.escapeHTML(s) });
|
|
46150
|
+
_highlight: function (item) {
|
|
46151
|
+
var query = this.query;
|
|
46152
|
+
query = query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
|
45915
46153
|
|
|
45916
|
-
|
|
45917
|
-
|
|
46154
|
+
var regex = new RegExp('(' + query + ')', 'ig');
|
|
46155
|
+
return item.replace(regex, function ($1, match) {
|
|
46156
|
+
return '<b>' + match + '</b>';
|
|
46157
|
+
});
|
|
46158
|
+
},
|
|
45918
46159
|
|
|
45919
|
-
|
|
45920
|
-
|
|
45921
|
-
|
|
45922
|
-
|
|
46160
|
+
escapeHTML: function (value) {
|
|
46161
|
+
var entityMap = {
|
|
46162
|
+
'&': '&', '<': '<', '>': '>', '"': '"', '\'': ''', '/': '/', '`': '`', '=': '='
|
|
46163
|
+
};
|
|
45923
46164
|
|
|
45924
|
-
|
|
46165
|
+
return String(value).replace(/[&<>"'`=\/]/g, function (s) { return entityMap[s] });
|
|
46166
|
+
},
|
|
45925
46167
|
|
|
45926
|
-
|
|
45927
|
-
|
|
46168
|
+
sanitizeHTML: function (value) {
|
|
46169
|
+
var that = this;
|
|
46170
|
+
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');
|
|
46171
|
+
var result = String(value).replace(regExp, function (s) { return that.escapeHTML(s) });
|
|
45928
46172
|
|
|
45929
|
-
|
|
45930
|
-
|
|
45931
|
-
popupChildren = that._popupHelper.children();
|
|
46173
|
+
return result;
|
|
46174
|
+
},
|
|
45932
46175
|
|
|
45933
|
-
|
|
45934
|
-
|
|
45935
|
-
|
|
46176
|
+
escape_HTML: function (html_str) {
|
|
46177
|
+
if (html_str && html_str.indexOf && (html_str.indexOf('onclick') >= 0 || html_str.indexOf('onload') >= 0 || html_str.indexOf('onerror') >= 0)) {
|
|
46178
|
+
return this.escapeHTML(html_str)
|
|
45936
46179
|
}
|
|
45937
|
-
}
|
|
45938
46180
|
|
|
45939
|
-
|
|
45940
|
-
var itemValue = item,
|
|
45941
|
-
i = document.createElement('li'),
|
|
45942
|
-
a = document.createElement('a'),
|
|
45943
|
-
dataName, dataValue;
|
|
45944
|
-
a.setAttribute('href', '#');
|
|
45945
|
-
i.appendChild(a);
|
|
45946
|
-
if (item.value !== undefined && item.value !== null) {
|
|
45947
|
-
if (item.label !== undefined && item.label !== null) {
|
|
45948
|
-
dataName = item.label;
|
|
45949
|
-
dataValue = that.escape_HTML(item.value);
|
|
45950
|
-
} else {
|
|
45951
|
-
dataName = item.value;
|
|
45952
|
-
dataValue = that.escape_HTML(item.value);
|
|
45953
|
-
}
|
|
45954
|
-
} else if (item.label !== undefined && item.label !== null) {
|
|
45955
|
-
dataName = item.label;
|
|
45956
|
-
dataValue = item.label;
|
|
45957
|
-
} else if (that.displayMember !== undefined && that.displayMember !== '') {
|
|
45958
|
-
dataName = item[that.displayMember];
|
|
45959
|
-
dataValue = item[that.valueMember];
|
|
45960
|
-
} else {
|
|
45961
|
-
dataName = item;
|
|
45962
|
-
dataValue = item;
|
|
45963
|
-
}
|
|
45964
|
-
i.setAttribute('data-value', dataValue);
|
|
45965
|
-
i.setAttribute('data-name', dataName);
|
|
46181
|
+
var sanitized = this.sanitizeHTML(html_str);
|
|
45966
46182
|
|
|
45967
|
-
|
|
45968
|
-
|
|
45969
|
-
}
|
|
45970
|
-
else if (that.displayMember) {
|
|
45971
|
-
itemValue = item[that.displayMember];
|
|
45972
|
-
}
|
|
46183
|
+
return sanitized;
|
|
46184
|
+
},
|
|
45973
46185
|
|
|
45974
|
-
|
|
45975
|
-
var
|
|
45976
|
-
|
|
45977
|
-
|
|
45978
|
-
|
|
45979
|
-
|
|
45980
|
-
|
|
46186
|
+
_render: function (originalItems) {
|
|
46187
|
+
var that = this,
|
|
46188
|
+
popupChildren = that._popupHelper.children();
|
|
46189
|
+
|
|
46190
|
+
if (popupChildren.length > 0) {
|
|
46191
|
+
for (var j = 0; j < popupChildren.length; j++) {
|
|
46192
|
+
$(popupChildren[j]).remove();
|
|
46193
|
+
}
|
|
45981
46194
|
}
|
|
45982
|
-
i.className = that.toThemeProperty('jqx-item jqx-menu-item jqx-rc-all' + plusClass);
|
|
45983
|
-
that.$popup.appendChild(i);
|
|
45984
46195
|
|
|
45985
|
-
|
|
45986
|
-
|
|
46196
|
+
var mapItem = function (item, index) {
|
|
46197
|
+
var itemValue = item,
|
|
46198
|
+
i = document.createElement('li'),
|
|
46199
|
+
a = document.createElement('a'),
|
|
46200
|
+
dataName, dataValue;
|
|
46201
|
+
a.setAttribute('href', '#');
|
|
46202
|
+
i.appendChild(a);
|
|
46203
|
+
if (item.value !== undefined && item.value !== null) {
|
|
46204
|
+
if (item.label !== undefined && item.label !== null) {
|
|
46205
|
+
dataName = item.label;
|
|
46206
|
+
dataValue = that.escape_HTML(item.value);
|
|
46207
|
+
} else {
|
|
46208
|
+
dataName = item.value;
|
|
46209
|
+
dataValue = that.escape_HTML(item.value);
|
|
46210
|
+
}
|
|
46211
|
+
} else if (item.label !== undefined && item.label !== null) {
|
|
46212
|
+
dataName = item.label;
|
|
46213
|
+
dataValue = item.label;
|
|
46214
|
+
} else if (that.displayMember !== undefined && that.displayMember !== '') {
|
|
46215
|
+
dataName = item[that.displayMember];
|
|
46216
|
+
dataValue = item[that.valueMember];
|
|
46217
|
+
} else {
|
|
46218
|
+
dataName = item;
|
|
46219
|
+
dataValue = item;
|
|
46220
|
+
}
|
|
46221
|
+
i.setAttribute('data-value', dataValue);
|
|
46222
|
+
i.setAttribute('data-name', dataName);
|
|
45987
46223
|
|
|
45988
|
-
|
|
45989
|
-
|
|
45990
|
-
|
|
45991
|
-
|
|
45992
|
-
|
|
46224
|
+
if (item.label) {
|
|
46225
|
+
itemValue = item.label;
|
|
46226
|
+
}
|
|
46227
|
+
else if (that.displayMember) {
|
|
46228
|
+
itemValue = item[that.displayMember];
|
|
46229
|
+
}
|
|
45993
46230
|
|
|
45994
|
-
|
|
46231
|
+
a.innerHTML = that.highlight(itemValue);
|
|
46232
|
+
var plusClass = '';
|
|
46233
|
+
if (that.rtl) {
|
|
46234
|
+
plusClass = ' jqx-rtl';
|
|
46235
|
+
}
|
|
46236
|
+
if (index === 0) {
|
|
46237
|
+
plusClass += ' jqx-fill-state-pressed';
|
|
46238
|
+
}
|
|
46239
|
+
i.className = that.toThemeProperty('jqx-item jqx-menu-item jqx-rc-all' + plusClass);
|
|
46240
|
+
that.$popup.appendChild(i);
|
|
45995
46241
|
|
|
45996
|
-
|
|
45997
|
-
|
|
45998
|
-
} else {
|
|
45999
|
-
this.$popup.style.width = that._toPx(that.dropDownWidth);
|
|
46000
|
-
}
|
|
46242
|
+
that.addHandler(i, 'mouseenter', function (event) { that.mouseenter(event); });
|
|
46243
|
+
};
|
|
46001
46244
|
|
|
46002
|
-
|
|
46003
|
-
|
|
46245
|
+
var mapItems = function (source) {
|
|
46246
|
+
for (var i = 0; i < source.length; i++) {
|
|
46247
|
+
mapItem(source[i], i);
|
|
46248
|
+
}
|
|
46249
|
+
};
|
|
46004
46250
|
|
|
46005
|
-
|
|
46006
|
-
var active = this._find('jqx-fill-state-pressed', this._popupHelper),
|
|
46007
|
-
next = active.nextSibling;
|
|
46008
|
-
$(active).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
46009
|
-
if (!next) {
|
|
46010
|
-
next = this.$popup.firstChild;
|
|
46011
|
-
}
|
|
46251
|
+
mapItems(originalItems);
|
|
46012
46252
|
|
|
46013
|
-
|
|
46014
|
-
|
|
46253
|
+
if (!this.dropDownWidth) {
|
|
46254
|
+
this.$popup.style.width = that._toPx(that.element.offsetWidth - 6);
|
|
46255
|
+
} else {
|
|
46256
|
+
this.$popup.style.width = that._toPx(that.dropDownWidth);
|
|
46257
|
+
}
|
|
46015
46258
|
|
|
46016
|
-
|
|
46017
|
-
|
|
46018
|
-
prev = active.previousSibling;
|
|
46019
|
-
$(active).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
46020
|
-
if (!prev) {
|
|
46021
|
-
prev = this.$popup.lastChild;
|
|
46022
|
-
}
|
|
46259
|
+
return this;
|
|
46260
|
+
},
|
|
46023
46261
|
|
|
46024
|
-
|
|
46025
|
-
|
|
46262
|
+
next: function () {
|
|
46263
|
+
var active = this._find('jqx-fill-state-pressed', this._popupHelper),
|
|
46264
|
+
next = active.nextSibling;
|
|
46265
|
+
$(active).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
46266
|
+
if (!next) {
|
|
46267
|
+
next = this.$popup.firstChild;
|
|
46268
|
+
}
|
|
46026
46269
|
|
|
46027
|
-
|
|
46028
|
-
|
|
46029
|
-
eventNamespace = '.jqxInput' + that.element.id;
|
|
46030
|
-
that.addHandler(that.host, 'focus' + eventNamespace, function () { that.onFocus(); });
|
|
46031
|
-
that.addHandler(that.host, 'blur' + eventNamespace, function () { that.onBlur(); });
|
|
46032
|
-
if (that.isMaterialized() && this.input instanceof HTMLInputElement) {
|
|
46033
|
-
that.addHandler(that.input, 'blur' + eventNamespace, function () { that.onBlur(); });
|
|
46034
|
-
}
|
|
46270
|
+
next.className += ' ' + this.toThemeProperty('jqx-fill-state-pressed');
|
|
46271
|
+
},
|
|
46035
46272
|
|
|
46036
|
-
|
|
46037
|
-
|
|
46038
|
-
|
|
46039
|
-
|
|
46040
|
-
|
|
46273
|
+
prev: function () {
|
|
46274
|
+
var active = this._find('jqx-fill-state-pressed', this._popupHelper),
|
|
46275
|
+
prev = active.previousSibling;
|
|
46276
|
+
$(active).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
46277
|
+
if (!prev) {
|
|
46278
|
+
prev = this.$popup.lastChild;
|
|
46279
|
+
}
|
|
46041
46280
|
|
|
46042
|
-
|
|
46281
|
+
prev.className += ' ' + this.toThemeProperty('jqx-fill-state-pressed');
|
|
46282
|
+
},
|
|
46283
|
+
|
|
46284
|
+
addHandlers: function () {
|
|
46285
|
+
var that = this,
|
|
46286
|
+
eventNamespace = '.jqxInput' + that.element.id;
|
|
46287
|
+
that.addHandler(that.host, 'focus' + eventNamespace, function () { that.onFocus(); });
|
|
46288
|
+
that.addHandler(that.host, 'blur' + eventNamespace, function () { that.onBlur(); });
|
|
46289
|
+
if (that.isMaterialized() && this.input instanceof HTMLInputElement) {
|
|
46290
|
+
that.addHandler(that.input, 'blur' + eventNamespace, function () { that.onBlur(); });
|
|
46043
46291
|
}
|
|
46044
|
-
if (!event.args) {
|
|
46045
|
-
event.stopPropagation();
|
|
46046
|
-
event.preventDefault();
|
|
46047
|
-
event.stopImmediatePropagation();
|
|
46048
46292
|
|
|
46049
|
-
|
|
46050
|
-
|
|
46051
|
-
|
|
46052
|
-
|
|
46053
|
-
|
|
46054
|
-
|
|
46055
|
-
|
|
46056
|
-
label = item;
|
|
46057
|
-
val = item;
|
|
46293
|
+
that.addHandler(that.host, 'change' + eventNamespace, function (event) {
|
|
46294
|
+
if (that.opened && !event.args) {
|
|
46295
|
+
event.stopPropagation();
|
|
46296
|
+
event.preventDefault();
|
|
46297
|
+
event.stopImmediatePropagation();
|
|
46298
|
+
|
|
46299
|
+
return;
|
|
46058
46300
|
}
|
|
46059
|
-
|
|
46060
|
-
|
|
46061
|
-
|
|
46062
|
-
|
|
46063
|
-
});
|
|
46301
|
+
if (!event.args) {
|
|
46302
|
+
event.stopPropagation();
|
|
46303
|
+
event.preventDefault();
|
|
46304
|
+
event.stopImmediatePropagation();
|
|
46064
46305
|
|
|
46065
|
-
|
|
46066
|
-
|
|
46067
|
-
|
|
46068
|
-
|
|
46069
|
-
|
|
46306
|
+
var item = that.val(),
|
|
46307
|
+
label, val;
|
|
46308
|
+
if (item && item.label) {
|
|
46309
|
+
label = item.label;
|
|
46310
|
+
val = item.val;
|
|
46311
|
+
}
|
|
46312
|
+
else {
|
|
46313
|
+
label = item;
|
|
46314
|
+
val = item;
|
|
46315
|
+
}
|
|
46316
|
+
that._raiseEvent('3', { type: 'keyboard', 'item': { 'label': label, 'value': val }, 'label': label, 'value': val });
|
|
46317
|
+
that.value = label;
|
|
46318
|
+
that._refreshPlaceHolder();
|
|
46319
|
+
}
|
|
46320
|
+
});
|
|
46070
46321
|
|
|
46071
|
-
|
|
46072
|
-
|
|
46073
|
-
|
|
46074
|
-
|
|
46075
|
-
|
|
46076
|
-
that.removeHandler(that.host, 'blur' + eventNamespace);
|
|
46077
|
-
that.removeHandler(that.host, 'keypress' + eventNamespace);
|
|
46078
|
-
that.removeHandler(that.host, 'keyup' + eventNamespace);
|
|
46079
|
-
that.removeHandler(that.host, 'keydown' + eventNamespace);
|
|
46080
|
-
that.removeHandler(that.$popup, 'pointerdown' + eventNamespace);
|
|
46081
|
-
},
|
|
46082
|
-
|
|
46083
|
-
move: function (e) {
|
|
46084
|
-
if (!this.opened) {
|
|
46085
|
-
return;
|
|
46086
|
-
}
|
|
46322
|
+
that.addHandler(that.host, 'keypress' + eventNamespace, function (event) { that.keypress(event); });
|
|
46323
|
+
that.addHandler(that.host, 'keyup' + eventNamespace, function (event) { that.keyup(event); });
|
|
46324
|
+
that.addHandler(that.host, 'keydown' + eventNamespace, function (event) { that.keydown(event); });
|
|
46325
|
+
that.addHandler(that.$popup, 'pointerdown' + eventNamespace, function (event) { that.click(event); });
|
|
46326
|
+
},
|
|
46087
46327
|
|
|
46088
|
-
|
|
46089
|
-
|
|
46090
|
-
|
|
46091
|
-
|
|
46092
|
-
|
|
46093
|
-
|
|
46328
|
+
removeHandlers: function () {
|
|
46329
|
+
var that = this,
|
|
46330
|
+
eventNamespace = '.jqxInput' + that.element.id;
|
|
46331
|
+
that.removeHandler(that.host, 'change' + eventNamespace);
|
|
46332
|
+
that.removeHandler(that.host, 'focus' + eventNamespace);
|
|
46333
|
+
that.removeHandler(that.host, 'blur' + eventNamespace);
|
|
46334
|
+
that.removeHandler(that.host, 'keypress' + eventNamespace);
|
|
46335
|
+
that.removeHandler(that.host, 'keyup' + eventNamespace);
|
|
46336
|
+
that.removeHandler(that.host, 'keydown' + eventNamespace);
|
|
46337
|
+
that.removeHandler(that.$popup, 'pointerdown' + eventNamespace);
|
|
46338
|
+
},
|
|
46094
46339
|
|
|
46095
|
-
|
|
46096
|
-
|
|
46097
|
-
|
|
46098
|
-
|
|
46099
|
-
}
|
|
46100
|
-
break;
|
|
46340
|
+
move: function (e) {
|
|
46341
|
+
if (!this.opened) {
|
|
46342
|
+
return;
|
|
46343
|
+
}
|
|
46101
46344
|
|
|
46102
|
-
|
|
46103
|
-
|
|
46345
|
+
switch (e.keyCode) {
|
|
46346
|
+
case 9: // tab
|
|
46347
|
+
case 13: // enter
|
|
46348
|
+
case 27: // escape
|
|
46104
46349
|
e.preventDefault();
|
|
46105
|
-
|
|
46106
|
-
}
|
|
46107
|
-
break;
|
|
46108
|
-
}
|
|
46350
|
+
break;
|
|
46109
46351
|
|
|
46110
|
-
|
|
46111
|
-
|
|
46352
|
+
case 38: // up arrow
|
|
46353
|
+
if (!e.shiftKey) {
|
|
46354
|
+
e.preventDefault();
|
|
46355
|
+
this.prev();
|
|
46356
|
+
}
|
|
46357
|
+
break;
|
|
46112
46358
|
|
|
46113
|
-
|
|
46114
|
-
|
|
46115
|
-
|
|
46116
|
-
|
|
46117
|
-
|
|
46359
|
+
case 40: // down arrow
|
|
46360
|
+
if (!e.shiftKey) {
|
|
46361
|
+
e.preventDefault();
|
|
46362
|
+
this.next();
|
|
46363
|
+
}
|
|
46364
|
+
break;
|
|
46365
|
+
}
|
|
46118
46366
|
|
|
46119
|
-
|
|
46120
|
-
|
|
46121
|
-
return;
|
|
46122
|
-
}
|
|
46123
|
-
this.move(e);
|
|
46124
|
-
},
|
|
46367
|
+
e.stopPropagation();
|
|
46368
|
+
},
|
|
46125
46369
|
|
|
46126
|
-
|
|
46127
|
-
|
|
46128
|
-
|
|
46129
|
-
case 38: // up arrow
|
|
46130
|
-
case 16: // shift
|
|
46131
|
-
case 17: // ctrl
|
|
46132
|
-
case 18: // alt
|
|
46133
|
-
e.stopPropagation();
|
|
46134
|
-
e.preventDefault();
|
|
46135
|
-
break;
|
|
46370
|
+
keydown: function (e) {
|
|
46371
|
+
var arr = [40, 38, 9, 13, 27];
|
|
46372
|
+
this.suppressKeyPressRepeat = arr.indexOf(e.keyCode) !== -1;
|
|
46136
46373
|
|
|
46137
|
-
|
|
46138
|
-
case 13: // enter
|
|
46374
|
+
if (e.key === 'Tab') {
|
|
46139
46375
|
if (!this.opened) {
|
|
46376
|
+
if (this.inlineAutoComplete) {
|
|
46377
|
+
this.select(e, this, 'keyboard');
|
|
46378
|
+
}
|
|
46140
46379
|
return;
|
|
46141
46380
|
}
|
|
46142
|
-
|
|
46143
|
-
|
|
46144
|
-
|
|
46145
|
-
break;
|
|
46381
|
+
}
|
|
46382
|
+
this.move(e);
|
|
46383
|
+
},
|
|
46146
46384
|
|
|
46147
|
-
|
|
46148
|
-
|
|
46149
|
-
|
|
46150
|
-
|
|
46151
|
-
|
|
46152
|
-
|
|
46153
|
-
e.preventDefault();
|
|
46154
|
-
break;
|
|
46385
|
+
keypress: function (e) {
|
|
46386
|
+
if (this.suppressKeyPressRepeat) {
|
|
46387
|
+
return;
|
|
46388
|
+
}
|
|
46389
|
+
this.move(e);
|
|
46390
|
+
},
|
|
46155
46391
|
|
|
46156
|
-
|
|
46157
|
-
|
|
46158
|
-
|
|
46159
|
-
|
|
46160
|
-
|
|
46392
|
+
keyup: function (e) {
|
|
46393
|
+
switch (e.keyCode) {
|
|
46394
|
+
case 40: // down arrow
|
|
46395
|
+
case 38: // up arrow
|
|
46396
|
+
case 16: // shift
|
|
46397
|
+
case 17: // ctrl
|
|
46398
|
+
case 18: // alt
|
|
46399
|
+
e.stopPropagation();
|
|
46400
|
+
e.preventDefault();
|
|
46401
|
+
break;
|
|
46402
|
+
|
|
46403
|
+
case 9: // tab
|
|
46404
|
+
case 13: // enter
|
|
46405
|
+
if (!this.opened) {
|
|
46406
|
+
if (this.inlineAutoComplete) {
|
|
46407
|
+
this.select(e, this, 'keyboard');
|
|
46408
|
+
e.stopPropagation();
|
|
46409
|
+
e.preventDefault();
|
|
46410
|
+
}
|
|
46411
|
+
return;
|
|
46161
46412
|
}
|
|
46162
|
-
this.
|
|
46163
|
-
|
|
46164
|
-
|
|
46165
|
-
|
|
46166
|
-
}
|
|
46413
|
+
this.select(e, this, 'keyboard');
|
|
46414
|
+
e.stopPropagation();
|
|
46415
|
+
e.preventDefault();
|
|
46416
|
+
break;
|
|
46167
46417
|
|
|
46168
|
-
|
|
46418
|
+
case 27: // escape
|
|
46419
|
+
if (!this.opened) {
|
|
46420
|
+
return;
|
|
46421
|
+
}
|
|
46422
|
+
this.close();
|
|
46423
|
+
e.stopPropagation();
|
|
46424
|
+
e.preventDefault();
|
|
46425
|
+
break;
|
|
46169
46426
|
|
|
46170
|
-
|
|
46171
|
-
|
|
46172
|
-
|
|
46427
|
+
default:
|
|
46428
|
+
{
|
|
46429
|
+
var me = this;
|
|
46430
|
+
if (this.timer) {
|
|
46431
|
+
clearTimeout(this.timer);
|
|
46432
|
+
}
|
|
46173
46433
|
|
|
46174
|
-
|
|
46175
|
-
|
|
46176
|
-
|
|
46177
|
-
|
|
46178
|
-
|
|
46179
|
-
|
|
46434
|
+
if (this.inlineAutoComplete) {
|
|
46435
|
+
me.suggest();
|
|
46436
|
+
return;
|
|
46437
|
+
}
|
|
46438
|
+
this.timer = setTimeout(function () {
|
|
46439
|
+
me.suggest();
|
|
46440
|
+
}, 300);
|
|
46441
|
+
}
|
|
46442
|
+
}
|
|
46180
46443
|
|
|
46181
|
-
|
|
46182
|
-
var that = this;
|
|
46183
|
-
that.element.className += ' ' + that.toThemeProperty('jqx-fill-state-focus');
|
|
46184
|
-
that._refreshPlaceHolder();
|
|
46185
|
-
},
|
|
46444
|
+
},
|
|
46186
46445
|
|
|
46187
|
-
|
|
46188
|
-
|
|
46189
|
-
|
|
46190
|
-
this.select(e, this, 'mouse');
|
|
46191
|
-
},
|
|
46446
|
+
clear: function () {
|
|
46447
|
+
this.val('');
|
|
46448
|
+
},
|
|
46192
46449
|
|
|
46193
|
-
|
|
46194
|
-
|
|
46195
|
-
|
|
46196
|
-
|
|
46450
|
+
onBlur: function () {
|
|
46451
|
+
var that = this;
|
|
46452
|
+
setTimeout(function () { that.close(); }, 150);
|
|
46453
|
+
that.host.removeClass(that.toThemeProperty('jqx-fill-state-focus'));
|
|
46454
|
+
that._refreshPlaceHolder();
|
|
46455
|
+
},
|
|
46197
46456
|
|
|
46198
|
-
|
|
46199
|
-
|
|
46200
|
-
|
|
46201
|
-
|
|
46202
|
-
|
|
46203
|
-
|
|
46204
|
-
|
|
46457
|
+
onFocus: function () {
|
|
46458
|
+
var that = this;
|
|
46459
|
+
that.element.className += ' ' + that.toThemeProperty('jqx-fill-state-focus');
|
|
46460
|
+
that._refreshPlaceHolder();
|
|
46461
|
+
},
|
|
46462
|
+
|
|
46463
|
+
click: function (e) {
|
|
46464
|
+
e.stopPropagation();
|
|
46465
|
+
e.preventDefault();
|
|
46466
|
+
this.select(e, this, 'mouse');
|
|
46467
|
+
},
|
|
46468
|
+
|
|
46469
|
+
mouseenter: function (e) {
|
|
46470
|
+
$(this._find('jqx-fill-state-pressed', this._popupHelper)).removeClass(this.toThemeProperty('jqx-fill-state-pressed'));
|
|
46471
|
+
e.currentTarget.className += ' ' + this.toThemeProperty('jqx-fill-state-pressed');
|
|
46472
|
+
},
|
|
46473
|
+
|
|
46474
|
+
_toPx: function (value) {
|
|
46475
|
+
if (typeof value === 'number') {
|
|
46476
|
+
return value + 'px';
|
|
46477
|
+
} else {
|
|
46478
|
+
return value;
|
|
46479
|
+
}
|
|
46480
|
+
},
|
|
46205
46481
|
|
|
46206
|
-
|
|
46207
|
-
|
|
46208
|
-
|
|
46209
|
-
|
|
46210
|
-
|
|
46211
|
-
|
|
46482
|
+
_find: function (className, parentElement) {
|
|
46483
|
+
var children = parentElement.children();
|
|
46484
|
+
for (var i = 0; i < children.length; i++) {
|
|
46485
|
+
var child = children[i];
|
|
46486
|
+
if (child.className.indexOf(className) !== -1) {
|
|
46487
|
+
return child;
|
|
46488
|
+
}
|
|
46212
46489
|
}
|
|
46213
|
-
}
|
|
46214
|
-
},
|
|
46490
|
+
},
|
|
46215
46491
|
|
|
46216
|
-
|
|
46217
|
-
|
|
46218
|
-
|
|
46219
|
-
|
|
46492
|
+
_getAddonsWidth: function () {
|
|
46493
|
+
var that = this,
|
|
46494
|
+
children = that.baseHost.children(),
|
|
46495
|
+
result = 0;
|
|
46220
46496
|
|
|
46221
|
-
|
|
46222
|
-
|
|
46223
|
-
|
|
46497
|
+
for (var i = 0; i < children.length; i++) {
|
|
46498
|
+
if (children[i] !== that.element) {
|
|
46499
|
+
result += $(children[i]).outerWidth();
|
|
46500
|
+
}
|
|
46224
46501
|
}
|
|
46225
|
-
}
|
|
46226
46502
|
|
|
46227
|
-
|
|
46228
|
-
|
|
46229
|
-
|
|
46230
|
-
})(jqxBaseFramework); //ignore jslint
|
|
46503
|
+
return result;
|
|
46504
|
+
}
|
|
46505
|
+
});
|
|
46506
|
+
})(jqxBaseFramework); //ignore jslint
|
|
46231
46507
|
})();
|
|
46232
46508
|
|
|
46233
46509
|
/***/ }),
|
|
@@ -84048,7 +84324,7 @@ if (!Array.prototype.filter) {
|
|
|
84048
84324
|
/******/ var __webpack_module_cache__ = {};
|
|
84049
84325
|
/******/
|
|
84050
84326
|
/******/ // The require function
|
|
84051
|
-
/******/ function
|
|
84327
|
+
/******/ function __nested_webpack_require_3661758__(moduleId) {
|
|
84052
84328
|
/******/ // Check if module is in cache
|
|
84053
84329
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
84054
84330
|
/******/ if (cachedModule !== undefined) {
|
|
@@ -84062,7 +84338,7 @@ if (!Array.prototype.filter) {
|
|
|
84062
84338
|
/******/ };
|
|
84063
84339
|
/******/
|
|
84064
84340
|
/******/ // Execute the module function
|
|
84065
|
-
/******/ __webpack_modules__[moduleId](module, module.exports,
|
|
84341
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_3661758__);
|
|
84066
84342
|
/******/
|
|
84067
84343
|
/******/ // Return the exports of the module
|
|
84068
84344
|
/******/ return module.exports;
|
|
@@ -84071,17 +84347,17 @@ if (!Array.prototype.filter) {
|
|
|
84071
84347
|
/************************************************************************/
|
|
84072
84348
|
/******/ /* webpack/runtime/amd options */
|
|
84073
84349
|
/******/ (() => {
|
|
84074
|
-
/******/
|
|
84350
|
+
/******/ __nested_webpack_require_3661758__.amdO = {};
|
|
84075
84351
|
/******/ })();
|
|
84076
84352
|
/******/
|
|
84077
84353
|
/******/ /* webpack/runtime/compat get default export */
|
|
84078
84354
|
/******/ (() => {
|
|
84079
84355
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
84080
|
-
/******/
|
|
84356
|
+
/******/ __nested_webpack_require_3661758__.n = (module) => {
|
|
84081
84357
|
/******/ var getter = module && module.__esModule ?
|
|
84082
84358
|
/******/ () => (module['default']) :
|
|
84083
84359
|
/******/ () => (module);
|
|
84084
|
-
/******/
|
|
84360
|
+
/******/ __nested_webpack_require_3661758__.d(getter, { a: getter });
|
|
84085
84361
|
/******/ return getter;
|
|
84086
84362
|
/******/ };
|
|
84087
84363
|
/******/ })();
|
|
@@ -84089,9 +84365,9 @@ if (!Array.prototype.filter) {
|
|
|
84089
84365
|
/******/ /* webpack/runtime/define property getters */
|
|
84090
84366
|
/******/ (() => {
|
|
84091
84367
|
/******/ // define getter functions for harmony exports
|
|
84092
|
-
/******/
|
|
84368
|
+
/******/ __nested_webpack_require_3661758__.d = (exports, definition) => {
|
|
84093
84369
|
/******/ for(var key in definition) {
|
|
84094
|
-
/******/ if(
|
|
84370
|
+
/******/ if(__nested_webpack_require_3661758__.o(definition, key) && !__nested_webpack_require_3661758__.o(exports, key)) {
|
|
84095
84371
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
84096
84372
|
/******/ }
|
|
84097
84373
|
/******/ }
|
|
@@ -84100,7 +84376,7 @@ if (!Array.prototype.filter) {
|
|
|
84100
84376
|
/******/
|
|
84101
84377
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
84102
84378
|
/******/ (() => {
|
|
84103
|
-
/******/
|
|
84379
|
+
/******/ __nested_webpack_require_3661758__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
84104
84380
|
/******/ })();
|
|
84105
84381
|
/******/
|
|
84106
84382
|
/************************************************************************/
|
|
@@ -84108,50 +84384,50 @@ var __webpack_exports__ = {};
|
|
|
84108
84384
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
84109
84385
|
(() => {
|
|
84110
84386
|
"use strict";
|
|
84111
|
-
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0__ =
|
|
84112
|
-
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/
|
|
84113
|
-
/* harmony import */ var _jqxdata__WEBPACK_IMPORTED_MODULE_1__ =
|
|
84114
|
-
/* harmony import */ var _jqxdata__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/
|
|
84115
|
-
/* harmony import */ var _jqxdata_export__WEBPACK_IMPORTED_MODULE_2__ =
|
|
84116
|
-
/* harmony import */ var _jqxdata_export__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/
|
|
84117
|
-
/* harmony import */ var _jqxdate__WEBPACK_IMPORTED_MODULE_3__ =
|
|
84118
|
-
/* harmony import */ var _jqxdate__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/
|
|
84119
|
-
/* harmony import */ var _jqxbuttons__WEBPACK_IMPORTED_MODULE_4__ =
|
|
84120
|
-
/* harmony import */ var _jqxbuttons__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/
|
|
84121
|
-
/* harmony import */ var _jqxmenu__WEBPACK_IMPORTED_MODULE_5__ =
|
|
84122
|
-
/* harmony import */ var _jqxmenu__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/
|
|
84123
|
-
/* harmony import */ var _jqxtooltip__WEBPACK_IMPORTED_MODULE_6__ =
|
|
84124
|
-
/* harmony import */ var _jqxtooltip__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/
|
|
84125
|
-
/* harmony import */ var _jqxscrollbar__WEBPACK_IMPORTED_MODULE_7__ =
|
|
84126
|
-
/* harmony import */ var _jqxscrollbar__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/
|
|
84127
|
-
/* harmony import */ var _jqxradiobutton__WEBPACK_IMPORTED_MODULE_8__ =
|
|
84128
|
-
/* harmony import */ var _jqxradiobutton__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/
|
|
84129
|
-
/* harmony import */ var _jqxcheckbox__WEBPACK_IMPORTED_MODULE_9__ =
|
|
84130
|
-
/* harmony import */ var _jqxcheckbox__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/
|
|
84131
|
-
/* harmony import */ var _jqxwindow__WEBPACK_IMPORTED_MODULE_10__ =
|
|
84132
|
-
/* harmony import */ var _jqxwindow__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/
|
|
84133
|
-
/* harmony import */ var _jqxlistbox__WEBPACK_IMPORTED_MODULE_11__ =
|
|
84134
|
-
/* harmony import */ var _jqxlistbox__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/
|
|
84135
|
-
/* harmony import */ var _jqxcolorpicker__WEBPACK_IMPORTED_MODULE_12__ =
|
|
84136
|
-
/* harmony import */ var _jqxcolorpicker__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/
|
|
84137
|
-
/* harmony import */ var _jqxcombobox__WEBPACK_IMPORTED_MODULE_13__ =
|
|
84138
|
-
/* harmony import */ var _jqxcombobox__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/
|
|
84139
|
-
/* harmony import */ var _jqxdropdownlist__WEBPACK_IMPORTED_MODULE_14__ =
|
|
84140
|
-
/* harmony import */ var _jqxdropdownlist__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/
|
|
84141
|
-
/* harmony import */ var _jqxnumberinput__WEBPACK_IMPORTED_MODULE_15__ =
|
|
84142
|
-
/* harmony import */ var _jqxnumberinput__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/
|
|
84143
|
-
/* harmony import */ var _jqxinput__WEBPACK_IMPORTED_MODULE_16__ =
|
|
84144
|
-
/* harmony import */ var _jqxinput__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/
|
|
84145
|
-
/* harmony import */ var _globalization_globalize__WEBPACK_IMPORTED_MODULE_17__ =
|
|
84146
|
-
/* harmony import */ var _globalization_globalize__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/
|
|
84147
|
-
/* harmony import */ var _jqxcalendar__WEBPACK_IMPORTED_MODULE_18__ =
|
|
84148
|
-
/* harmony import */ var _jqxcalendar__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/
|
|
84149
|
-
/* harmony import */ var _jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_19__ =
|
|
84150
|
-
/* harmony import */ var _jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/
|
|
84151
|
-
/* harmony import */ var _jqxscheduler__WEBPACK_IMPORTED_MODULE_20__ =
|
|
84152
|
-
/* harmony import */ var _jqxscheduler__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/
|
|
84153
|
-
/* harmony import */ var _jqxscheduler_api__WEBPACK_IMPORTED_MODULE_21__ =
|
|
84154
|
-
/* harmony import */ var _jqxscheduler_api__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/
|
|
84387
|
+
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_3661758__(5459);
|
|
84388
|
+
/* harmony import */ var _jqxcore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxcore__WEBPACK_IMPORTED_MODULE_0__);
|
|
84389
|
+
/* harmony import */ var _jqxdata__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_3661758__(4198);
|
|
84390
|
+
/* harmony import */ var _jqxdata__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxdata__WEBPACK_IMPORTED_MODULE_1__);
|
|
84391
|
+
/* harmony import */ var _jqxdata_export__WEBPACK_IMPORTED_MODULE_2__ = __nested_webpack_require_3661758__(3907);
|
|
84392
|
+
/* harmony import */ var _jqxdata_export__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxdata_export__WEBPACK_IMPORTED_MODULE_2__);
|
|
84393
|
+
/* harmony import */ var _jqxdate__WEBPACK_IMPORTED_MODULE_3__ = __nested_webpack_require_3661758__(137);
|
|
84394
|
+
/* harmony import */ var _jqxdate__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxdate__WEBPACK_IMPORTED_MODULE_3__);
|
|
84395
|
+
/* harmony import */ var _jqxbuttons__WEBPACK_IMPORTED_MODULE_4__ = __nested_webpack_require_3661758__(7351);
|
|
84396
|
+
/* harmony import */ var _jqxbuttons__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxbuttons__WEBPACK_IMPORTED_MODULE_4__);
|
|
84397
|
+
/* harmony import */ var _jqxmenu__WEBPACK_IMPORTED_MODULE_5__ = __nested_webpack_require_3661758__(1610);
|
|
84398
|
+
/* harmony import */ var _jqxmenu__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxmenu__WEBPACK_IMPORTED_MODULE_5__);
|
|
84399
|
+
/* harmony import */ var _jqxtooltip__WEBPACK_IMPORTED_MODULE_6__ = __nested_webpack_require_3661758__(3899);
|
|
84400
|
+
/* harmony import */ var _jqxtooltip__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxtooltip__WEBPACK_IMPORTED_MODULE_6__);
|
|
84401
|
+
/* harmony import */ var _jqxscrollbar__WEBPACK_IMPORTED_MODULE_7__ = __nested_webpack_require_3661758__(4240);
|
|
84402
|
+
/* harmony import */ var _jqxscrollbar__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxscrollbar__WEBPACK_IMPORTED_MODULE_7__);
|
|
84403
|
+
/* harmony import */ var _jqxradiobutton__WEBPACK_IMPORTED_MODULE_8__ = __nested_webpack_require_3661758__(6826);
|
|
84404
|
+
/* harmony import */ var _jqxradiobutton__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxradiobutton__WEBPACK_IMPORTED_MODULE_8__);
|
|
84405
|
+
/* harmony import */ var _jqxcheckbox__WEBPACK_IMPORTED_MODULE_9__ = __nested_webpack_require_3661758__(4545);
|
|
84406
|
+
/* harmony import */ var _jqxcheckbox__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxcheckbox__WEBPACK_IMPORTED_MODULE_9__);
|
|
84407
|
+
/* harmony import */ var _jqxwindow__WEBPACK_IMPORTED_MODULE_10__ = __nested_webpack_require_3661758__(7762);
|
|
84408
|
+
/* harmony import */ var _jqxwindow__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxwindow__WEBPACK_IMPORTED_MODULE_10__);
|
|
84409
|
+
/* harmony import */ var _jqxlistbox__WEBPACK_IMPORTED_MODULE_11__ = __nested_webpack_require_3661758__(1062);
|
|
84410
|
+
/* harmony import */ var _jqxlistbox__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxlistbox__WEBPACK_IMPORTED_MODULE_11__);
|
|
84411
|
+
/* harmony import */ var _jqxcolorpicker__WEBPACK_IMPORTED_MODULE_12__ = __nested_webpack_require_3661758__(3960);
|
|
84412
|
+
/* harmony import */ var _jqxcolorpicker__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxcolorpicker__WEBPACK_IMPORTED_MODULE_12__);
|
|
84413
|
+
/* harmony import */ var _jqxcombobox__WEBPACK_IMPORTED_MODULE_13__ = __nested_webpack_require_3661758__(4720);
|
|
84414
|
+
/* harmony import */ var _jqxcombobox__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxcombobox__WEBPACK_IMPORTED_MODULE_13__);
|
|
84415
|
+
/* harmony import */ var _jqxdropdownlist__WEBPACK_IMPORTED_MODULE_14__ = __nested_webpack_require_3661758__(5868);
|
|
84416
|
+
/* harmony import */ var _jqxdropdownlist__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxdropdownlist__WEBPACK_IMPORTED_MODULE_14__);
|
|
84417
|
+
/* harmony import */ var _jqxnumberinput__WEBPACK_IMPORTED_MODULE_15__ = __nested_webpack_require_3661758__(7995);
|
|
84418
|
+
/* harmony import */ var _jqxnumberinput__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxnumberinput__WEBPACK_IMPORTED_MODULE_15__);
|
|
84419
|
+
/* harmony import */ var _jqxinput__WEBPACK_IMPORTED_MODULE_16__ = __nested_webpack_require_3661758__(5875);
|
|
84420
|
+
/* harmony import */ var _jqxinput__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxinput__WEBPACK_IMPORTED_MODULE_16__);
|
|
84421
|
+
/* harmony import */ var _globalization_globalize__WEBPACK_IMPORTED_MODULE_17__ = __nested_webpack_require_3661758__(2497);
|
|
84422
|
+
/* harmony import */ var _globalization_globalize__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_globalization_globalize__WEBPACK_IMPORTED_MODULE_17__);
|
|
84423
|
+
/* harmony import */ var _jqxcalendar__WEBPACK_IMPORTED_MODULE_18__ = __nested_webpack_require_3661758__(5725);
|
|
84424
|
+
/* harmony import */ var _jqxcalendar__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxcalendar__WEBPACK_IMPORTED_MODULE_18__);
|
|
84425
|
+
/* harmony import */ var _jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_19__ = __nested_webpack_require_3661758__(4993);
|
|
84426
|
+
/* harmony import */ var _jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxdatetimeinput__WEBPACK_IMPORTED_MODULE_19__);
|
|
84427
|
+
/* harmony import */ var _jqxscheduler__WEBPACK_IMPORTED_MODULE_20__ = __nested_webpack_require_3661758__(5253);
|
|
84428
|
+
/* harmony import */ var _jqxscheduler__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxscheduler__WEBPACK_IMPORTED_MODULE_20__);
|
|
84429
|
+
/* harmony import */ var _jqxscheduler_api__WEBPACK_IMPORTED_MODULE_21__ = __nested_webpack_require_3661758__(2536);
|
|
84430
|
+
/* harmony import */ var _jqxscheduler_api__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__nested_webpack_require_3661758__.n(_jqxscheduler_api__WEBPACK_IMPORTED_MODULE_21__);
|
|
84155
84431
|
|
|
84156
84432
|
|
|
84157
84433
|
|
|
@@ -84179,5 +84455,15 @@ var __webpack_exports__ = {};
|
|
|
84179
84455
|
|
|
84180
84456
|
})();
|
|
84181
84457
|
|
|
84458
|
+
/******/ })()
|
|
84459
|
+
;
|
|
84460
|
+
/******/ })()
|
|
84461
|
+
;
|
|
84462
|
+
/******/ })()
|
|
84463
|
+
;
|
|
84464
|
+
/******/ })()
|
|
84465
|
+
;
|
|
84466
|
+
/******/ })()
|
|
84467
|
+
;
|
|
84182
84468
|
/******/ })()
|
|
84183
84469
|
;
|