smart-webcomponents-react 14.2.83 → 14.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alertwindow/alertwindow.d.ts +5 -5
- package/alertwindow/alertwindow.esm.js +10 -85
- package/alertwindow/alertwindow.umd.js +1134 -1209
- package/array/array.d.ts +5 -5
- package/array/array.esm.js +13 -88
- package/array/array.umd.js +752 -827
- package/barcode/barcode.d.ts +3 -3
- package/barcode/barcode.esm.js +6 -61
- package/barcode/barcode.umd.js +311 -366
- package/button/dropdownbutton.d.ts +2 -2
- package/button/multisplitbutton.d.ts +2 -2
- package/calendar/calendar.d.ts +2 -2
- package/calendar/calendar.esm.js +4 -49
- package/calendar/calendar.umd.js +710 -755
- package/card/cardview.d.ts +1 -1
- package/cardview/cardview.d.ts +1 -1
- package/cardview/cardview.esm.js +2 -37
- package/cardview/cardview.umd.js +515 -550
- package/chart/chart.d.ts +9 -9
- package/chart/chart.esm.js +18 -133
- package/chart/chart.umd.js +822 -937
- package/chart/ganttchart.d.ts +20 -20
- package/combobox/combobox.d.ts +4 -4
- package/combobox/combobox.esm.js +8 -73
- package/combobox/combobox.umd.js +1341 -1406
- package/datetimepicker/datetimepicker.d.ts +1 -1
- package/datetimepicker/datetimepicker.esm.js +2 -37
- package/datetimepicker/datetimepicker.umd.js +826 -861
- package/dialogwindow/dialogwindow.d.ts +5 -5
- package/dialogwindow/dialogwindow.esm.js +10 -85
- package/dialogwindow/dialogwindow.umd.js +1134 -1209
- package/dockinglayout/dockinglayout.d.ts +7 -7
- package/dockinglayout/dockinglayout.esm.js +14 -109
- package/dockinglayout/dockinglayout.umd.js +765 -860
- package/dropdownbutton/dropdownbutton.d.ts +2 -2
- package/dropdownbutton/dropdownbutton.esm.js +4 -49
- package/dropdownbutton/dropdownbutton.umd.js +527 -572
- package/dropdownlist/dropdownlist.d.ts +4 -4
- package/dropdownlist/dropdownlist.esm.js +8 -73
- package/dropdownlist/dropdownlist.umd.js +1275 -1340
- package/editor/editor.d.ts +11 -9
- package/editor/editor.esm.js +14 -109
- package/editor/editor.umd.js +911 -1006
- package/fileupload/fileupload.d.ts +2 -1
- package/filterbuilder/filterbuilder.d.ts +1 -1
- package/filterbuilder/filterbuilder.esm.js +2 -37
- package/filterbuilder/filterbuilder.umd.js +463 -498
- package/filterpanel/filterpanel.d.ts +1 -1
- package/filterpanel/filterpanel.esm.js +2 -37
- package/filterpanel/filterpanel.umd.js +354 -389
- package/form/form.d.ts +1 -1
- package/form/form.esm.js +4 -49
- package/form/form.umd.js +1016 -1061
- package/form/formgroup.d.ts +1 -1
- package/ganttchart/ganttchart.d.ts +20 -20
- package/ganttchart/ganttchart.esm.js +40 -265
- package/ganttchart/ganttchart.umd.js +1666 -1891
- package/gauge/gauge.d.ts +2 -2
- package/gauge/gauge.esm.js +4 -49
- package/gauge/gauge.umd.js +664 -709
- package/grid/grid.d.ts +56 -51
- package/grid/grid.esm.js +96 -460
- package/grid/grid.umd.js +2107 -2471
- package/index.d.ts +45 -3
- package/input/input.d.ts +2 -2
- package/input/input.esm.js +4 -49
- package/input/input.umd.js +505 -550
- package/input/numberinput.d.ts +2 -2
- package/input/phoneinput.d.ts +4 -4
- package/kanban/kanban.d.ts +6 -6
- package/kanban/kanban.esm.js +12 -97
- package/kanban/kanban.umd.js +1334 -1419
- package/layout/dockinglayout.d.ts +7 -7
- package/listbox/listbox.d.ts +5 -5
- package/listbox/listbox.esm.js +10 -85
- package/listbox/listbox.umd.js +1170 -1245
- package/listmenu/listmenu.d.ts +1 -1
- package/listmenu/listmenu.esm.js +2 -37
- package/listmenu/listmenu.umd.js +1005 -1040
- package/menu/listmenu.d.ts +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.esm.js +2 -37
- package/menu/menu.umd.js +1025 -1060
- package/multilinetextbox/multilinetextbox.d.ts +1 -1
- package/multilinetextbox/multilinetextbox.esm.js +2 -37
- package/multilinetextbox/multilinetextbox.umd.js +907 -942
- package/multilinewindow/multilinewindow.d.ts +5 -5
- package/multilinewindow/multilinewindow.esm.js +10 -85
- package/multilinewindow/multilinewindow.umd.js +1134 -1209
- package/multisplitbutton/multisplitbutton.d.ts +2 -2
- package/multisplitbutton/multisplitbutton.esm.js +4 -49
- package/multisplitbutton/multisplitbutton.umd.js +941 -986
- package/numberinput/numberinput.d.ts +2 -2
- package/numberinput/numberinput.esm.js +4 -49
- package/numberinput/numberinput.umd.js +348 -393
- package/numerictextbox/numerictextbox.d.ts +1 -1
- package/numerictextbox/numerictextbox.esm.js +2 -37
- package/numerictextbox/numerictextbox.umd.js +592 -627
- package/package.json +1 -1
- package/phoneinput/phoneinput.d.ts +4 -4
- package/phoneinput/phoneinput.esm.js +8 -73
- package/phoneinput/phoneinput.umd.js +386 -451
- package/pivottable/pivottable.d.ts +3 -3
- package/pivottable/pivottable.esm.js +6 -61
- package/pivottable/pivottable.umd.js +762 -817
- package/progresswindow/progresswindow.d.ts +5 -5
- package/progresswindow/progresswindow.esm.js +10 -85
- package/progresswindow/progresswindow.umd.js +1134 -1209
- package/promptwindow/promptwindow.d.ts +5 -5
- package/promptwindow/promptwindow.esm.js +10 -85
- package/promptwindow/promptwindow.umd.js +1134 -1209
- package/qrcode/qrcode.d.ts +3 -3
- package/qrcode/qrcode.esm.js +6 -61
- package/qrcode/qrcode.umd.js +333 -388
- package/querybuilder/querybuilder.d.ts +6 -1
- package/querybuilder/querybuilder.esm.js +14 -38
- package/querybuilder/querybuilder.umd.js +446 -470
- package/rating/rating.d.ts +1 -1
- package/rating/rating.esm.js +2 -37
- package/rating/rating.umd.js +261 -296
- package/scheduler/scheduler.d.ts +17 -17
- package/scheduler/scheduler.esm.js +34 -229
- package/scheduler/scheduler.umd.js +1782 -1977
- package/slider/slider.d.ts +2 -2
- package/slider/slider.esm.js +4 -49
- package/slider/slider.umd.js +642 -687
- package/source/modules/smart.accordion.js +1 -1
- package/source/modules/smart.array.js +2 -2
- package/source/modules/smart.barcode.js +1 -1
- package/source/modules/smart.breadcrumb.js +1 -1
- package/source/modules/smart.button.js +1 -1
- package/source/modules/smart.buttongroup.js +1 -1
- package/source/modules/smart.calendar.js +3 -3
- package/source/modules/smart.card.js +1 -1
- package/source/modules/smart.cardview.js +4 -4
- package/source/modules/smart.carousel.js +1 -1
- package/source/modules/smart.chart.js +1 -1
- package/source/modules/smart.checkbox.js +1 -1
- package/source/modules/smart.checkinput.js +2 -2
- package/source/modules/smart.chip.js +1 -1
- package/source/modules/smart.colorinput.js +2 -2
- package/source/modules/smart.colorpanel.js +2 -2
- package/source/modules/smart.colorpicker.js +2 -2
- package/source/modules/smart.combobox.js +2 -2
- package/source/modules/smart.common.js +1 -1
- package/source/modules/smart.countryinput.js +2 -2
- package/source/modules/smart.dateinput.js +3 -3
- package/source/modules/smart.daterangeinput.js +4 -4
- package/source/modules/smart.datetimepicker.js +3 -3
- package/source/modules/smart.dockinglayout.js +1 -1
- package/source/modules/smart.dropdownbutton.js +1 -1
- package/source/modules/smart.dropdownlist.js +2 -2
- package/source/modules/smart.editor.js +5 -5
- package/source/modules/smart.element.js +1 -1
- package/source/modules/smart.fileupload.js +3 -3
- package/source/modules/smart.form.js +2 -2
- package/source/modules/smart.formulaparser.js +1 -1
- package/source/modules/smart.ganttchart.js +5 -5
- package/source/modules/smart.gauge.js +1 -1
- package/source/modules/smart.grid.js +14 -14
- package/source/modules/smart.gridpanel.js +4 -4
- package/source/modules/smart.input.js +2 -2
- package/source/modules/smart.kanban.js +5 -5
- package/source/modules/smart.layout.js +1 -1
- package/source/modules/smart.led.js +1 -1
- package/source/modules/smart.listbox.js +2 -2
- package/source/modules/smart.listmenu.js +1 -1
- package/source/modules/smart.map.js +1 -1
- package/source/modules/smart.maskedtextbox.js +2 -2
- package/source/modules/smart.menu.js +1 -1
- package/source/modules/smart.multicomboinput.js +2 -2
- package/source/modules/smart.multiinput.js +2 -2
- package/source/modules/smart.multilinetextbox.js +2 -2
- package/source/modules/smart.multisplitbutton.js +2 -2
- package/source/modules/smart.numberinput.js +2 -2
- package/source/modules/smart.numerictextbox.js +2 -2
- package/source/modules/smart.pager.js +2 -2
- package/source/modules/smart.passwordinput.js +2 -2
- package/source/modules/smart.passwordtextbox.js +2 -2
- package/source/modules/smart.path.js +1 -1
- package/source/modules/smart.phoneinput.js +2 -2
- package/source/modules/smart.pivottable.js +3 -3
- package/source/modules/smart.progressbar.js +1 -1
- package/source/modules/smart.qrcode.js +1 -1
- package/source/modules/smart.querybuilder.js +5 -5
- package/source/modules/smart.radiobutton.js +1 -1
- package/source/modules/smart.rating.js +1 -1
- package/source/modules/smart.router.js +1 -1
- package/source/modules/smart.scheduler.js +4 -4
- package/source/modules/smart.scrollbar.js +1 -1
- package/source/modules/smart.slider.js +1 -1
- package/source/modules/smart.sortable.js +1 -1
- package/source/modules/smart.splitter.js +1 -1
- package/source/modules/smart.switchbutton.js +1 -1
- package/source/modules/smart.table.js +3 -3
- package/source/modules/smart.tabs.js +1 -1
- package/source/modules/smart.tank.js +1 -1
- package/source/modules/smart.textarea.js +2 -2
- package/source/modules/smart.textbox.js +2 -2
- package/source/modules/smart.timeinput.js +2 -2
- package/source/modules/smart.timepicker.js +1 -1
- package/source/modules/smart.toast.js +1 -1
- package/source/modules/smart.tooltip.js +1 -1
- package/source/modules/smart.tree.js +1 -1
- package/source/modules/smart.validator.js +1 -1
- package/source/modules/smart.window.js +2 -2
- package/source/smart.accordion.js +1 -1
- package/source/smart.ajax.js +1 -1
- package/source/smart.array.js +1 -1
- package/source/smart.barcode.js +1 -1
- package/source/smart.bootstrap.js +1 -1
- package/source/smart.breadcrumb.js +1 -1
- package/source/smart.button.js +1 -1
- package/source/smart.buttongroup.js +1 -1
- package/source/smart.calendar.js +2 -2
- package/source/smart.card.js +1 -1
- package/source/smart.cardview.js +1 -1
- package/source/smart.carousel.js +1 -1
- package/source/smart.chart.annotations.js +1 -1
- package/source/smart.chart.api.js +1 -1
- package/source/smart.chart.core.js +1 -1
- package/source/smart.chart.js +1 -1
- package/source/smart.chart.rangeselector.js +1 -1
- package/source/smart.chart.waterfall.js +1 -1
- package/source/smart.checkbox.js +1 -1
- package/source/smart.checkinput.js +1 -1
- package/source/smart.chip.js +1 -1
- package/source/smart.colorinput.js +1 -1
- package/source/smart.colorpanel.js +1 -1
- package/source/smart.colorpicker.js +1 -1
- package/source/smart.combobox.js +1 -1
- package/source/smart.complex.js +1 -1
- package/source/smart.core.js +1 -1
- package/source/smart.countryinput.js +1 -1
- package/source/smart.data.js +1 -1
- package/source/smart.date.js +1 -1
- package/source/smart.dateformatpanel.js +1 -1
- package/source/smart.dateinput.js +1 -1
- package/source/smart.daterangeinput.js +1 -1
- package/source/smart.datetimepicker.js +1 -1
- package/source/smart.dockinglayout.js +1 -1
- package/source/smart.draw.js +1 -1
- package/source/smart.dropdownbutton.js +1 -1
- package/source/smart.dropdownlist.js +1 -1
- package/source/smart.editor.js +2 -2
- package/source/smart.element.js +1 -1
- package/source/smart.elements.js +17 -17
- package/source/smart.export.js +1 -1
- package/source/smart.fileupload.js +2 -2
- package/source/smart.filter.js +1 -1
- package/source/smart.filterbuilder.js +2 -2
- package/source/smart.filterpanel.js +1 -1
- package/source/smart.form.js +1 -1
- package/source/smart.format.js +1 -1
- package/source/smart.formulaparser.js +1 -1
- package/source/smart.ganttchart.js +2 -2
- package/source/smart.gauge.js +1 -1
- package/source/smart.grid.cell.js +2 -2
- package/source/smart.grid.chart.js +1 -1
- package/source/smart.grid.column.js +1 -1
- package/source/smart.grid.core.js +2 -2
- package/source/smart.grid.dialog.js +2 -2
- package/source/smart.grid.edit.js +2 -2
- package/source/smart.grid.export.js +1 -1
- package/source/smart.grid.filter.js +1 -1
- package/source/smart.grid.group.js +1 -1
- package/source/smart.grid.js +1 -1
- package/source/smart.grid.menu.js +2 -2
- package/source/smart.grid.pager.js +1 -1
- package/source/smart.grid.reorder.js +1 -1
- package/source/smart.grid.resize.js +2 -2
- package/source/smart.grid.row.js +1 -1
- package/source/smart.grid.select.js +2 -2
- package/source/smart.grid.sort.js +1 -1
- package/source/smart.grid.toolbar.js +2 -2
- package/source/smart.grid.tree.js +1 -1
- package/source/smart.grid.view.js +2 -2
- package/source/smart.gridpanel.js +1 -1
- package/source/smart.input.js +2 -2
- package/source/smart.kanban.js +2 -2
- package/source/smart.layout.js +1 -1
- package/source/smart.led.js +1 -1
- package/source/smart.listbox.js +2 -2
- package/source/smart.listmenu.js +1 -1
- package/source/smart.map.js +1 -1
- package/source/smart.maskedtextbox.js +1 -1
- package/source/smart.math.js +1 -1
- package/source/smart.menu.js +1 -1
- package/source/smart.multicomboinput.js +1 -1
- package/source/smart.multiinput.js +1 -1
- package/source/smart.multilinetextbox.js +1 -1
- package/source/smart.multisplitbutton.js +1 -1
- package/source/smart.numberformatpanel.js +1 -1
- package/source/smart.numberinput.js +1 -1
- package/source/smart.numeric.js +1 -1
- package/source/smart.numerictextbox.js +1 -1
- package/source/smart.pager.js +1 -1
- package/source/smart.passwordinput.js +1 -1
- package/source/smart.passwordtextbox.js +1 -1
- package/source/smart.path.js +1 -1
- package/source/smart.phoneinput.js +1 -1
- package/source/smart.pivottable.js +1 -1
- package/source/smart.powerbutton.js +1 -1
- package/source/smart.progressbar.js +1 -1
- package/source/smart.qrcode.js +1 -1
- package/source/smart.radiobutton.js +1 -1
- package/source/smart.rating.js +1 -1
- package/source/smart.router.js +1 -1
- package/source/smart.scheduler.js +1 -1
- package/source/smart.scrollbar.js +1 -1
- package/source/smart.slider.js +1 -1
- package/source/smart.sortable.js +1 -1
- package/source/smart.splitter.js +1 -1
- package/source/smart.switchbutton.js +1 -1
- package/source/smart.table.js +1 -1
- package/source/smart.tabs.js +1 -1
- package/source/smart.tank.js +1 -1
- package/source/smart.textarea.js +1 -1
- package/source/smart.textbox.js +1 -1
- package/source/smart.tickintervalhandler.js +1 -1
- package/source/smart.timeinput.js +1 -1
- package/source/smart.timepicker.js +1 -1
- package/source/smart.toast.js +1 -1
- package/source/smart.tooltip.js +1 -1
- package/source/smart.tree.js +1 -1
- package/source/smart.validationpanel.js +1 -1
- package/source/smart.validator.js +1 -1
- package/source/smart.window.js +1 -1
- package/source/styles/components/smart.grid.css +1 -1
- package/source/styles/default/scss/smart.grid.scss +10 -3
- package/source/styles/default/smart.grid.css +7 -3
- package/source/styles/smart.default.css +1 -1
- package/source/typescript/smart.editor.d.ts +4 -2
- package/source/typescript/smart.elements.d.ts +45 -3
- package/source/typescript/smart.fileupload.d.ts +2 -1
- package/source/typescript/smart.grid.d.ts +34 -0
- package/source/typescript/smart.querybuilder.d.ts +5 -0
- package/splitter/splitter.d.ts +3 -3
- package/splitter/splitter.esm.js +6 -61
- package/splitter/splitter.umd.js +901 -956
- package/table/pivottable.d.ts +3 -3
- package/table/table.d.ts +7 -7
- package/table/table.esm.js +14 -109
- package/table/table.umd.js +1278 -1373
- package/tabs/tabs.d.ts +4 -4
- package/tabs/tabs.esm.js +8 -73
- package/tabs/tabs.umd.js +875 -940
- package/tabs/tabswindow.d.ts +5 -5
- package/tabswindow/tabswindow.d.ts +5 -5
- package/tabswindow/tabswindow.esm.js +10 -85
- package/tabswindow/tabswindow.umd.js +1134 -1209
- package/tank/tank.d.ts +2 -2
- package/tank/tank.esm.js +4 -49
- package/tank/tank.umd.js +598 -643
- package/textbox/multilinetextbox.d.ts +1 -1
- package/textbox/numerictextbox.d.ts +1 -1
- package/timepicker/datetimepicker.d.ts +1 -1
- package/toast/toast.d.ts +1 -1
- package/toast/toast.esm.js +2 -37
- package/toast/toast.umd.js +397 -432
- package/tree/tree.d.ts +4 -4
- package/tree/tree.esm.js +8 -73
- package/tree/tree.umd.js +1310 -1375
- package/waitwindow/waitwindow.d.ts +5 -5
- package/waitwindow/waitwindow.esm.js +10 -85
- package/waitwindow/waitwindow.umd.js +1134 -1209
- package/window/alertwindow.d.ts +5 -5
- package/window/dialogwindow.d.ts +5 -5
- package/window/multilinewindow.d.ts +5 -5
- package/window/progresswindow.d.ts +5 -5
- package/window/promptwindow.d.ts +5 -5
- package/window/tabswindow.d.ts +5 -5
- package/window/waitwindow.d.ts +5 -5
- package/window/window.d.ts +5 -5
- package/window/window.esm.js +10 -85
- package/window/window.umd.js +1134 -1209
package/splitter/splitter.umd.js
CHANGED
|
@@ -2,968 +2,913 @@
|
|
|
2
2
|
require('../source/modules/smart.splitter');
|
|
3
3
|
|
|
4
4
|
(function (global, factory) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
6
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
|
|
7
|
+
(factory((global.splitter = {}),global.React));
|
|
8
8
|
}(this, (function (exports,React) { 'use strict';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
React = React && React.hasOwnProperty('default') ? React['default'] : React;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
12
|
+
const Smart = window.Smart;
|
|
13
|
+
/**
|
|
14
|
+
Splitter Item is a Panel in a Splitter component.
|
|
15
|
+
*/
|
|
16
|
+
class SplitterItem extends React.Component {
|
|
17
|
+
constructor(props) {
|
|
18
|
+
super(props);
|
|
19
|
+
this.componentRef = React.createRef();
|
|
20
|
+
}
|
|
21
|
+
// Gets the id of the React component.
|
|
22
|
+
get id() {
|
|
23
|
+
if (!this._id) {
|
|
24
|
+
this._id = 'SplitterItem' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
25
|
+
}
|
|
26
|
+
return this._id;
|
|
27
|
+
}
|
|
28
|
+
/** Enables or disables the element.
|
|
29
|
+
* Property type: boolean
|
|
30
|
+
*/
|
|
31
|
+
get disabled() {
|
|
32
|
+
return this.nativeElement ? this.nativeElement.disabled : undefined;
|
|
33
|
+
}
|
|
34
|
+
set disabled(value) {
|
|
35
|
+
if (this.nativeElement) {
|
|
36
|
+
this.nativeElement.disabled = value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** Determines of the item is collapsed or not.
|
|
40
|
+
* Property type: boolean
|
|
41
|
+
*/
|
|
42
|
+
get collapsed() {
|
|
43
|
+
return this.nativeElement ? this.nativeElement.collapsed : undefined;
|
|
44
|
+
}
|
|
45
|
+
set collapsed(value) {
|
|
46
|
+
if (this.nativeElement) {
|
|
47
|
+
this.nativeElement.collapsed = value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Determines of the item can be collapsed. If set to false, the item can't be collapsed
|
|
51
|
+
* Property type: boolean
|
|
52
|
+
*/
|
|
53
|
+
get collapsible() {
|
|
54
|
+
return this.nativeElement ? this.nativeElement.collapsible : undefined;
|
|
55
|
+
}
|
|
56
|
+
set collapsible(value) {
|
|
57
|
+
if (this.nativeElement) {
|
|
58
|
+
this.nativeElement.collapsible = value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Determines the content of the splitter items
|
|
62
|
+
* Property type: boolean
|
|
63
|
+
*/
|
|
64
|
+
get locked() {
|
|
65
|
+
return this.nativeElement ? this.nativeElement.locked : undefined;
|
|
66
|
+
}
|
|
67
|
+
set locked(value) {
|
|
68
|
+
if (this.nativeElement) {
|
|
69
|
+
this.nativeElement.locked = value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/** Determines of the item can be resized or not.
|
|
73
|
+
* Property type: string
|
|
74
|
+
*/
|
|
75
|
+
get max() {
|
|
76
|
+
return this.nativeElement ? this.nativeElement.max : undefined;
|
|
77
|
+
}
|
|
78
|
+
set max(value) {
|
|
79
|
+
if (this.nativeElement) {
|
|
80
|
+
this.nativeElement.max = value;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** Determines the max size of the item.
|
|
84
|
+
* Property type: string
|
|
85
|
+
*/
|
|
86
|
+
get min() {
|
|
87
|
+
return this.nativeElement ? this.nativeElement.min : undefined;
|
|
88
|
+
}
|
|
89
|
+
set min(value) {
|
|
90
|
+
if (this.nativeElement) {
|
|
91
|
+
this.nativeElement.min = value;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Determines the min size of the item
|
|
95
|
+
* Property type: string
|
|
96
|
+
*/
|
|
97
|
+
get size() {
|
|
98
|
+
return this.nativeElement ? this.nativeElement.size : undefined;
|
|
99
|
+
}
|
|
100
|
+
set size(value) {
|
|
101
|
+
if (this.nativeElement) {
|
|
102
|
+
this.nativeElement.size = value;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// Gets the properties of the React component.
|
|
106
|
+
get properties() {
|
|
107
|
+
return ["disabled", "collapsed", "collapsible", "content", "locked", "max", "min", "size"];
|
|
108
|
+
}
|
|
109
|
+
// Gets the events of the React component.
|
|
110
|
+
get eventListeners() {
|
|
111
|
+
return ["onCreate", "onReady"];
|
|
112
|
+
}
|
|
113
|
+
/** Collapses the item.
|
|
114
|
+
* @param {string} far. If set to true the item will collapse to it's far side ( to the right for vertical splitter and down for horizontal)
|
|
115
|
+
*/
|
|
116
|
+
collapse(far) {
|
|
117
|
+
if (this.nativeElement.isRendered) {
|
|
118
|
+
this.nativeElement.collapse(far);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.nativeElement.whenRendered(() => {
|
|
122
|
+
this.nativeElement.collapse(far);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/** Expands the item if it's collapsed.
|
|
127
|
+
*/
|
|
128
|
+
expand() {
|
|
129
|
+
if (this.nativeElement.isRendered) {
|
|
130
|
+
this.nativeElement.expand();
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.nativeElement.whenRendered(() => {
|
|
134
|
+
this.nativeElement.expand();
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/** Locks the item so it can no longer change it's size.
|
|
139
|
+
*/
|
|
140
|
+
lock() {
|
|
141
|
+
if (this.nativeElement.isRendered) {
|
|
142
|
+
this.nativeElement.lock();
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
this.nativeElement.whenRendered(() => {
|
|
146
|
+
this.nativeElement.lock();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/** Unlocks a previously locked item.
|
|
151
|
+
*/
|
|
152
|
+
unlock() {
|
|
153
|
+
if (this.nativeElement.isRendered) {
|
|
154
|
+
this.nativeElement.unlock();
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
this.nativeElement.whenRendered(() => {
|
|
158
|
+
this.nativeElement.unlock();
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
componentDidRender(initialize) {
|
|
163
|
+
const that = this;
|
|
164
|
+
const props = {};
|
|
165
|
+
const events = {};
|
|
166
|
+
let styles = null;
|
|
167
|
+
for (let prop in that.props) {
|
|
168
|
+
if (prop === 'children') {
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (prop === 'style') {
|
|
172
|
+
styles = that.props[prop];
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
176
|
+
events[prop] = that.props[prop];
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
props[prop] = that.props[prop];
|
|
180
|
+
}
|
|
181
|
+
if (initialize) {
|
|
182
|
+
that.nativeElement = this.componentRef.current;
|
|
183
|
+
}
|
|
184
|
+
for (let prop in props) {
|
|
185
|
+
if (prop === 'class' || prop === 'className') {
|
|
186
|
+
const classNames = props[prop].trim().split(' ');
|
|
187
|
+
for (let className in classNames) {
|
|
188
|
+
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
189
|
+
that.nativeElement.classList.add(classNames[className]);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (props[prop] !== that.nativeElement[prop]) {
|
|
195
|
+
const normalizeProp = (str) => {
|
|
196
|
+
return str.replace(/-([a-z])/g, function (g) {
|
|
197
|
+
return g[1].toUpperCase();
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
201
|
+
that.nativeElement.setAttribute(prop, '');
|
|
202
|
+
}
|
|
203
|
+
const normalizedProp = normalizeProp(prop);
|
|
204
|
+
that.nativeElement[normalizedProp] = props[prop];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
for (let eventName in events) {
|
|
208
|
+
that[eventName] = events[eventName];
|
|
209
|
+
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
210
|
+
}
|
|
211
|
+
if (initialize) {
|
|
212
|
+
if (that.onCreate) {
|
|
213
|
+
that.onCreate();
|
|
214
|
+
}
|
|
215
|
+
that.nativeElement.whenRendered(() => {
|
|
216
|
+
if (that.onReady) {
|
|
217
|
+
that.onReady();
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
// setup styles.
|
|
222
|
+
if (styles) {
|
|
223
|
+
for (let styleName in styles) {
|
|
224
|
+
that.nativeElement.style[styleName] = styles[styleName];
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
componentDidMount() {
|
|
229
|
+
this.componentDidRender(true);
|
|
230
|
+
}
|
|
231
|
+
componentDidUpdate() {
|
|
232
|
+
this.componentDidRender(false);
|
|
233
|
+
}
|
|
234
|
+
componentWillUnmount() {
|
|
235
|
+
const that = this;
|
|
236
|
+
if (!that.nativeElement) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
that.nativeElement.whenRenderedCallbacks = [];
|
|
240
|
+
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
241
|
+
const eventName = that.eventListeners[i];
|
|
242
|
+
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
render() {
|
|
246
|
+
return (React.createElement("smart-splitter-item", { ref: this.componentRef }, this.props.children));
|
|
247
|
+
}
|
|
248
|
+
}
|
|
36
249
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
styles = that.props[prop];
|
|
198
|
-
continue;
|
|
199
|
-
}
|
|
200
|
-
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
201
|
-
events[prop] = that.props[prop];
|
|
202
|
-
continue;
|
|
203
|
-
}
|
|
204
|
-
props[prop] = that.props[prop];
|
|
205
|
-
}
|
|
206
|
-
if (initialize) {
|
|
207
|
-
that.nativeElement = this.componentRef.current;
|
|
208
|
-
}
|
|
209
|
-
for (let prop in props) {
|
|
210
|
-
if (prop === 'class' || prop === 'className') {
|
|
211
|
-
const classNames = props[prop].trim().split(' ');
|
|
212
|
-
for (let className in classNames) {
|
|
213
|
-
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
214
|
-
that.nativeElement.classList.add(classNames[className]);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
continue;
|
|
218
|
-
}
|
|
219
|
-
if (props[prop] !== that.nativeElement[prop]) {
|
|
220
|
-
const normalizeProp = (str) => {
|
|
221
|
-
return str.replace(/-([a-z])/g, function (g) {
|
|
222
|
-
return g[1].toUpperCase();
|
|
223
|
-
});
|
|
224
|
-
};
|
|
225
|
-
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
226
|
-
that.nativeElement.setAttribute(prop, '');
|
|
227
|
-
}
|
|
228
|
-
const normalizedProp = normalizeProp(prop);
|
|
229
|
-
that.nativeElement[normalizedProp] = props[prop];
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
for (let eventName in events) {
|
|
233
|
-
that[eventName] = events[eventName];
|
|
234
|
-
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
235
|
-
}
|
|
236
|
-
if (initialize) {
|
|
237
|
-
if (that.onCreate) {
|
|
238
|
-
that.onCreate();
|
|
239
|
-
}
|
|
240
|
-
that.nativeElement.whenRendered(() => {
|
|
241
|
-
if (that.onReady) {
|
|
242
|
-
that.onReady();
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
// setup styles.
|
|
247
|
-
if (styles) {
|
|
248
|
-
for (let styleName in styles) {
|
|
249
|
-
that.nativeElement.style[styleName] = styles[styleName];
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
componentDidMount() {
|
|
254
|
-
this.componentDidRender(true);
|
|
255
|
-
}
|
|
256
|
-
componentDidUpdate() {
|
|
257
|
-
this.componentDidRender(false);
|
|
258
|
-
}
|
|
259
|
-
componentWillUnmount() {
|
|
260
|
-
const that = this;
|
|
261
|
-
if (!that.nativeElement) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
that.nativeElement.whenRenderedCallbacks = [];
|
|
265
|
-
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
266
|
-
const eventName = that.eventListeners[i];
|
|
267
|
-
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
render() {
|
|
271
|
-
return (React.createElement("smart-splitter-item", { ref: this.componentRef }, this.props.children));
|
|
272
|
-
}
|
|
273
|
-
}
|
|
250
|
+
const Smart$1 = window.Smart;
|
|
251
|
+
/**
|
|
252
|
+
SplitterBar splits two Split panels in a Splitter.
|
|
253
|
+
*/
|
|
254
|
+
class SplitterBar extends React.Component {
|
|
255
|
+
constructor(props) {
|
|
256
|
+
super(props);
|
|
257
|
+
this.componentRef = React.createRef();
|
|
258
|
+
}
|
|
259
|
+
// Gets the id of the React component.
|
|
260
|
+
get id() {
|
|
261
|
+
if (!this._id) {
|
|
262
|
+
this._id = 'SplitterBar' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
263
|
+
}
|
|
264
|
+
return this._id;
|
|
265
|
+
}
|
|
266
|
+
// Gets the properties of the React component.
|
|
267
|
+
get properties() {
|
|
268
|
+
return [];
|
|
269
|
+
}
|
|
270
|
+
// Gets the events of the React component.
|
|
271
|
+
get eventListeners() {
|
|
272
|
+
return ["onCreate", "onReady"];
|
|
273
|
+
}
|
|
274
|
+
/** Hides the splitter bar.
|
|
275
|
+
*/
|
|
276
|
+
hide() {
|
|
277
|
+
if (this.nativeElement.isRendered) {
|
|
278
|
+
this.nativeElement.hide();
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
this.nativeElement.whenRendered(() => {
|
|
282
|
+
this.nativeElement.hide();
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/** Unhides a splitter bar.
|
|
287
|
+
*/
|
|
288
|
+
show() {
|
|
289
|
+
if (this.nativeElement.isRendered) {
|
|
290
|
+
this.nativeElement.show();
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
this.nativeElement.whenRendered(() => {
|
|
294
|
+
this.nativeElement.show();
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/** Locks the splitter bar.
|
|
299
|
+
*/
|
|
300
|
+
lock() {
|
|
301
|
+
if (this.nativeElement.isRendered) {
|
|
302
|
+
this.nativeElement.lock();
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
this.nativeElement.whenRendered(() => {
|
|
306
|
+
this.nativeElement.lock();
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
/** Unlocks the splitter bar.
|
|
311
|
+
*/
|
|
312
|
+
unlock() {
|
|
313
|
+
if (this.nativeElement.isRendered) {
|
|
314
|
+
this.nativeElement.unlock();
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
this.nativeElement.whenRendered(() => {
|
|
318
|
+
this.nativeElement.unlock();
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
componentDidRender(initialize) {
|
|
323
|
+
const that = this;
|
|
324
|
+
const props = {};
|
|
325
|
+
const events = {};
|
|
326
|
+
let styles = null;
|
|
327
|
+
for (let prop in that.props) {
|
|
328
|
+
if (prop === 'children') {
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
if (prop === 'style') {
|
|
332
|
+
styles = that.props[prop];
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
336
|
+
events[prop] = that.props[prop];
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
339
|
+
props[prop] = that.props[prop];
|
|
340
|
+
}
|
|
341
|
+
if (initialize) {
|
|
342
|
+
that.nativeElement = this.componentRef.current;
|
|
343
|
+
}
|
|
344
|
+
for (let prop in props) {
|
|
345
|
+
if (prop === 'class' || prop === 'className') {
|
|
346
|
+
const classNames = props[prop].trim().split(' ');
|
|
347
|
+
for (let className in classNames) {
|
|
348
|
+
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
349
|
+
that.nativeElement.classList.add(classNames[className]);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
if (props[prop] !== that.nativeElement[prop]) {
|
|
355
|
+
const normalizeProp = (str) => {
|
|
356
|
+
return str.replace(/-([a-z])/g, function (g) {
|
|
357
|
+
return g[1].toUpperCase();
|
|
358
|
+
});
|
|
359
|
+
};
|
|
360
|
+
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
361
|
+
that.nativeElement.setAttribute(prop, '');
|
|
362
|
+
}
|
|
363
|
+
const normalizedProp = normalizeProp(prop);
|
|
364
|
+
that.nativeElement[normalizedProp] = props[prop];
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
for (let eventName in events) {
|
|
368
|
+
that[eventName] = events[eventName];
|
|
369
|
+
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
370
|
+
}
|
|
371
|
+
if (initialize) {
|
|
372
|
+
Smart$1.Render();
|
|
373
|
+
if (that.onCreate) {
|
|
374
|
+
that.onCreate();
|
|
375
|
+
}
|
|
376
|
+
that.nativeElement.whenRendered(() => {
|
|
377
|
+
if (that.onReady) {
|
|
378
|
+
that.onReady();
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
// setup styles.
|
|
383
|
+
if (styles) {
|
|
384
|
+
for (let styleName in styles) {
|
|
385
|
+
that.nativeElement.style[styleName] = styles[styleName];
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
componentDidMount() {
|
|
390
|
+
this.componentDidRender(true);
|
|
391
|
+
}
|
|
392
|
+
componentDidUpdate() {
|
|
393
|
+
this.componentDidRender(false);
|
|
394
|
+
}
|
|
395
|
+
componentWillUnmount() {
|
|
396
|
+
const that = this;
|
|
397
|
+
if (!that.nativeElement) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
that.nativeElement.whenRenderedCallbacks = [];
|
|
401
|
+
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
402
|
+
const eventName = that.eventListeners[i];
|
|
403
|
+
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
render() {
|
|
407
|
+
return (React.createElement("smart-splitter-bar", { ref: this.componentRef }, this.props.children));
|
|
408
|
+
}
|
|
409
|
+
}
|
|
274
410
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
411
|
+
const Smart$2 = window.Smart;
|
|
412
|
+
/**
|
|
413
|
+
Splitter is a layout component that supports all important features such as resizing, collapsing, and nesting panels.
|
|
414
|
+
*/
|
|
415
|
+
class Splitter extends React.Component {
|
|
416
|
+
constructor(props) {
|
|
417
|
+
super(props);
|
|
418
|
+
this.componentRef = React.createRef();
|
|
419
|
+
}
|
|
420
|
+
// Gets the id of the React component.
|
|
421
|
+
get id() {
|
|
422
|
+
if (!this._id) {
|
|
423
|
+
this._id = 'Splitter' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
424
|
+
}
|
|
425
|
+
return this._id;
|
|
426
|
+
}
|
|
427
|
+
/** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
|
|
428
|
+
* Property type: Animation | string
|
|
429
|
+
*/
|
|
430
|
+
get animation() {
|
|
431
|
+
return this.nativeElement ? this.nativeElement.animation : undefined;
|
|
432
|
+
}
|
|
433
|
+
set animation(value) {
|
|
434
|
+
if (this.nativeElement) {
|
|
435
|
+
this.nativeElement.animation = value;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
/** Determines how the items are arranged inside the Splitter. Possible values: end - all items will fit the size of the Splitter. When inserting a new item the space required for the item to fit will be deducted from it's neighbour. proportional - all items will fit the size of the Splitter. When inserting a new item the space required for it to fit will be the result from the proportional deduction of the size from the rest of the items inside the element. overflow - the items inside the Splitter will not fit it's size. Instead they overflow by taking the exact amount of space they need and a scrollbar is displayed in order to view the content.
|
|
439
|
+
* Property type: SplitterAutoFitMode | string
|
|
440
|
+
*/
|
|
441
|
+
get autoFitMode() {
|
|
442
|
+
return this.nativeElement ? this.nativeElement.autoFitMode : undefined;
|
|
443
|
+
}
|
|
444
|
+
set autoFitMode(value) {
|
|
445
|
+
if (this.nativeElement) {
|
|
446
|
+
this.nativeElement.autoFitMode = value;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
/** Enables or disables the element.
|
|
450
|
+
* Property type: boolean
|
|
451
|
+
*/
|
|
452
|
+
get disabled() {
|
|
453
|
+
return this.nativeElement ? this.nativeElement.disabled : undefined;
|
|
454
|
+
}
|
|
455
|
+
set disabled(value) {
|
|
456
|
+
if (this.nativeElement) {
|
|
457
|
+
this.nativeElement.disabled = value;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
/** Sets or gets splitter's data source.
|
|
461
|
+
* Property type: any
|
|
462
|
+
*/
|
|
463
|
+
get dataSource() {
|
|
464
|
+
return this.nativeElement ? this.nativeElement.dataSource : undefined;
|
|
465
|
+
}
|
|
466
|
+
set dataSource(value) {
|
|
467
|
+
if (this.nativeElement) {
|
|
468
|
+
this.nativeElement.dataSource = value;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/** A getter that returns an array of all Splitter items.
|
|
472
|
+
* Property type: any
|
|
473
|
+
*/
|
|
474
|
+
get items() {
|
|
475
|
+
return this.nativeElement ? this.nativeElement.items : undefined;
|
|
476
|
+
}
|
|
477
|
+
set items(value) {
|
|
478
|
+
if (this.nativeElement) {
|
|
479
|
+
this.nativeElement.items = value;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
/** If set the element keeps the same proportions of the items after the whole element has been resized regardless of the size property unit ( pixels or percentages) of the items.
|
|
483
|
+
* Property type: boolean
|
|
484
|
+
*/
|
|
485
|
+
get keepProportionsOnResize() {
|
|
486
|
+
return this.nativeElement ? this.nativeElement.keepProportionsOnResize : undefined;
|
|
487
|
+
}
|
|
488
|
+
set keepProportionsOnResize(value) {
|
|
489
|
+
if (this.nativeElement) {
|
|
490
|
+
this.nativeElement.keepProportionsOnResize = value;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
/** Sets or gets the language. Used in conjunction with the property messages.
|
|
494
|
+
* Property type: string
|
|
495
|
+
*/
|
|
496
|
+
get locale() {
|
|
497
|
+
return this.nativeElement ? this.nativeElement.locale : undefined;
|
|
498
|
+
}
|
|
499
|
+
set locale(value) {
|
|
500
|
+
if (this.nativeElement) {
|
|
501
|
+
this.nativeElement.locale = value;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
/** Callback, related to localization module.
|
|
505
|
+
* Property type: any
|
|
506
|
+
*/
|
|
507
|
+
get localizeFormatFunction() {
|
|
508
|
+
return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
|
|
509
|
+
}
|
|
510
|
+
set localizeFormatFunction(value) {
|
|
511
|
+
if (this.nativeElement) {
|
|
512
|
+
this.nativeElement.localizeFormatFunction = value;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
/** Sets an object with string values, related to the different states of passwords strength.
|
|
516
|
+
* Property type: any
|
|
517
|
+
*/
|
|
518
|
+
get messages() {
|
|
519
|
+
return this.nativeElement ? this.nativeElement.messages : undefined;
|
|
520
|
+
}
|
|
521
|
+
set messages(value) {
|
|
522
|
+
if (this.nativeElement) {
|
|
523
|
+
this.nativeElement.messages = value;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
/** Sets or gets splitter's orientation.
|
|
527
|
+
* Property type: Orientation | string
|
|
528
|
+
*/
|
|
529
|
+
get orientation() {
|
|
530
|
+
return this.nativeElement ? this.nativeElement.orientation : undefined;
|
|
531
|
+
}
|
|
532
|
+
set orientation(value) {
|
|
533
|
+
if (this.nativeElement) {
|
|
534
|
+
this.nativeElement.orientation = value;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
/** If the element is readonly, users cannot interact with it.
|
|
538
|
+
* Property type: boolean
|
|
539
|
+
*/
|
|
540
|
+
get readonly() {
|
|
541
|
+
return this.nativeElement ? this.nativeElement.readonly : undefined;
|
|
542
|
+
}
|
|
543
|
+
set readonly(value) {
|
|
544
|
+
if (this.nativeElement) {
|
|
545
|
+
this.nativeElement.readonly = value;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
/** Determines the resize mode of the splitter. Possible values are: - None - resizing is disabled. - Adjacent - only the two adjacent items between the target splitter bar are being affected. This is the default behavior. - End - only the first item( left or top according to the orientation) of the target Splitter bar and the last item are affected. Proportional - all of the items positioned in the direction to which the splitter bar is dragged will be affected. For example, when a splitter bar is dragged to the right all the items positioned on it's the right side will be affected. The items will obtain a proportional size corresponding to their current size.
|
|
549
|
+
* Property type: SplitterResizeMode | string
|
|
550
|
+
*/
|
|
551
|
+
get resizeMode() {
|
|
552
|
+
return this.nativeElement ? this.nativeElement.resizeMode : undefined;
|
|
553
|
+
}
|
|
554
|
+
set resizeMode(value) {
|
|
555
|
+
if (this.nativeElement) {
|
|
556
|
+
this.nativeElement.resizeMode = value;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
/** Determines the resize step during reisizing
|
|
560
|
+
* Property type: number
|
|
561
|
+
*/
|
|
562
|
+
get resizeStep() {
|
|
563
|
+
return this.nativeElement ? this.nativeElement.resizeStep : undefined;
|
|
564
|
+
}
|
|
565
|
+
set resizeStep(value) {
|
|
566
|
+
if (this.nativeElement) {
|
|
567
|
+
this.nativeElement.resizeStep = value;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
/** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
|
|
571
|
+
* Property type: boolean
|
|
572
|
+
*/
|
|
573
|
+
get rightToLeft() {
|
|
574
|
+
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
|
|
575
|
+
}
|
|
576
|
+
set rightToLeft(value) {
|
|
577
|
+
if (this.nativeElement) {
|
|
578
|
+
this.nativeElement.rightToLeft = value;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
/** When enabled the resizing operation happens live. By default this feature is not enabled and the user sees a hightlighted bar while dragging instead of the actual splitter bar.
|
|
582
|
+
* Property type: boolean
|
|
583
|
+
*/
|
|
584
|
+
get liveResize() {
|
|
585
|
+
return this.nativeElement ? this.nativeElement.liveResize : undefined;
|
|
586
|
+
}
|
|
587
|
+
set liveResize(value) {
|
|
588
|
+
if (this.nativeElement) {
|
|
589
|
+
this.nativeElement.liveResize = value;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
/** Determines the theme. Theme defines the look of the element
|
|
593
|
+
* Property type: string
|
|
594
|
+
*/
|
|
595
|
+
get theme() {
|
|
596
|
+
return this.nativeElement ? this.nativeElement.theme : undefined;
|
|
597
|
+
}
|
|
598
|
+
set theme(value) {
|
|
599
|
+
if (this.nativeElement) {
|
|
600
|
+
this.nativeElement.theme = value;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
/** If is set to true, the element cannot be focused.
|
|
604
|
+
* Property type: boolean
|
|
605
|
+
*/
|
|
606
|
+
get unfocusable() {
|
|
607
|
+
return this.nativeElement ? this.nativeElement.unfocusable : undefined;
|
|
608
|
+
}
|
|
609
|
+
set unfocusable(value) {
|
|
610
|
+
if (this.nativeElement) {
|
|
611
|
+
this.nativeElement.unfocusable = value;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
// Gets the properties of the React component.
|
|
615
|
+
get properties() {
|
|
616
|
+
return ["animation", "autoFitMode", "disabled", "dataSource", "items", "keepProportionsOnResize", "locale", "localizeFormatFunction", "messages", "orientation", "readonly", "resizeMode", "resizeStep", "rightToLeft", "liveResize", "theme", "unfocusable"];
|
|
617
|
+
}
|
|
618
|
+
// Gets the events of the React component.
|
|
619
|
+
get eventListeners() {
|
|
620
|
+
return ["onCollapse", "onExpand", "onResizeStart", "onResizeEnd", "onCreate", "onReady"];
|
|
621
|
+
}
|
|
622
|
+
/** Appends a new node.
|
|
623
|
+
* @param {Node} node. The node to append
|
|
624
|
+
*/
|
|
625
|
+
appendChild(node) {
|
|
626
|
+
if (this.nativeElement.isRendered) {
|
|
627
|
+
this.nativeElement.appendChild(node);
|
|
628
|
+
}
|
|
629
|
+
else {
|
|
630
|
+
this.nativeElement.whenRendered(() => {
|
|
631
|
+
this.nativeElement.appendChild(node);
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
/** Collapses splitter item.
|
|
636
|
+
* @param {any} item. number indicating the index of the item or an isntance of JQX.SplitterItem
|
|
637
|
+
* @param {boolean} far?. Indicates whether the item should collapse to it's far or near side
|
|
638
|
+
*/
|
|
639
|
+
collapse(item, far) {
|
|
640
|
+
if (this.nativeElement.isRendered) {
|
|
641
|
+
this.nativeElement.collapse(item, far);
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
this.nativeElement.whenRendered(() => {
|
|
645
|
+
this.nativeElement.collapse(item, far);
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
/** Expands the splitter item if possible (if there's enough space available).
|
|
650
|
+
* @param {any} item. number indicating the index of the item or an isntance of JQX.SplitterItem
|
|
651
|
+
*/
|
|
652
|
+
expand(item) {
|
|
653
|
+
if (this.nativeElement.isRendered) {
|
|
654
|
+
this.nativeElement.expand(item);
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
this.nativeElement.whenRendered(() => {
|
|
658
|
+
this.nativeElement.expand(item);
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
/** Hides a splitter bar
|
|
663
|
+
* @param {number} splitterBar. A JQX.SplitterBar instance.
|
|
664
|
+
* @returns {number}
|
|
665
|
+
*/
|
|
666
|
+
hideBar(splitterBar) {
|
|
667
|
+
const result = this.nativeElement.hideBar(splitterBar);
|
|
668
|
+
return result;
|
|
669
|
+
}
|
|
670
|
+
/** Insert a new Splitter item at a given position.
|
|
671
|
+
* @param {number} index. The index at which a new item will be inserted.
|
|
672
|
+
* @param {any} details. An Object or string used as content if the splitter item.
|
|
673
|
+
*/
|
|
674
|
+
insert(index, details) {
|
|
675
|
+
if (this.nativeElement.isRendered) {
|
|
676
|
+
this.nativeElement.insert(index, details);
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
this.nativeElement.whenRendered(() => {
|
|
680
|
+
this.nativeElement.insert(index, details);
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
/** Inserts the specified "smart-splitter-item" node before the reference "smart-splitter-item" node.
|
|
685
|
+
* @param {Node} newNode. The "jqx-splitter-item" node to insert.
|
|
686
|
+
* @param {Node | null} referenceNode?. The "jqx-splitter-item" node before which newNode is inserted.
|
|
687
|
+
* @returns {Node}
|
|
688
|
+
*/
|
|
689
|
+
insertBefore(newNode, referenceNode) {
|
|
690
|
+
const result = this.nativeElement.insertBefore(newNode, referenceNode);
|
|
691
|
+
return result;
|
|
692
|
+
}
|
|
693
|
+
/** Locks a splitter item so it's size can't change.
|
|
694
|
+
* @param {number} index. The index of a Splitter Bar or it's instance.
|
|
695
|
+
*/
|
|
696
|
+
lockItem(index) {
|
|
697
|
+
if (this.nativeElement.isRendered) {
|
|
698
|
+
this.nativeElement.lockItem(index);
|
|
699
|
+
}
|
|
700
|
+
else {
|
|
701
|
+
this.nativeElement.whenRendered(() => {
|
|
702
|
+
this.nativeElement.lockItem(index);
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
/** Locks a splitter bar so it can't be dragged.
|
|
707
|
+
* @param {number} index. The index of a Splitter Bar or it's instance.
|
|
708
|
+
*/
|
|
709
|
+
lockBar(index) {
|
|
710
|
+
if (this.nativeElement.isRendered) {
|
|
711
|
+
this.nativeElement.lockBar(index);
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
this.nativeElement.whenRendered(() => {
|
|
715
|
+
this.nativeElement.lockBar(index);
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
/** Removes a Splitter item.
|
|
720
|
+
* @param {number} index. An item to be removed.
|
|
721
|
+
*/
|
|
722
|
+
removeAt(index) {
|
|
723
|
+
if (this.nativeElement.isRendered) {
|
|
724
|
+
this.nativeElement.removeAt(index);
|
|
725
|
+
}
|
|
726
|
+
else {
|
|
727
|
+
this.nativeElement.whenRendered(() => {
|
|
728
|
+
this.nativeElement.removeAt(index);
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
/** Removes all items from the Splitter
|
|
733
|
+
*/
|
|
734
|
+
removeAll() {
|
|
735
|
+
if (this.nativeElement.isRendered) {
|
|
736
|
+
this.nativeElement.removeAll();
|
|
737
|
+
}
|
|
738
|
+
else {
|
|
739
|
+
this.nativeElement.whenRendered(() => {
|
|
740
|
+
this.nativeElement.removeAll();
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
/** Removes a child "smart-splitter-item" node.
|
|
745
|
+
* @param {Node} node. The "jqx-splitter-item" node to remove.
|
|
746
|
+
* @returns {Node}
|
|
747
|
+
*/
|
|
748
|
+
removeChild(node) {
|
|
749
|
+
const result = this.nativeElement.removeChild(node);
|
|
750
|
+
return result;
|
|
751
|
+
}
|
|
752
|
+
/** Refreshes the Splitter
|
|
753
|
+
*/
|
|
754
|
+
refresh() {
|
|
755
|
+
if (this.nativeElement.isRendered) {
|
|
756
|
+
this.nativeElement.refresh();
|
|
757
|
+
}
|
|
758
|
+
else {
|
|
759
|
+
this.nativeElement.whenRendered(() => {
|
|
760
|
+
this.nativeElement.refresh();
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
/** Unhides a Splitter Bar
|
|
765
|
+
* @param {number} splitterBar. An instance of a splitter bar.
|
|
766
|
+
*/
|
|
767
|
+
showBar(splitterBar) {
|
|
768
|
+
if (this.nativeElement.isRendered) {
|
|
769
|
+
this.nativeElement.showBar(splitterBar);
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
this.nativeElement.whenRendered(() => {
|
|
773
|
+
this.nativeElement.showBar(splitterBar);
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
/** Unlocks a previously locked splitter item.
|
|
778
|
+
* @param {number} item. The index of a Splitter Item or it's instance.
|
|
779
|
+
*/
|
|
780
|
+
unlockItem(item) {
|
|
781
|
+
if (this.nativeElement.isRendered) {
|
|
782
|
+
this.nativeElement.unlockItem(item);
|
|
783
|
+
}
|
|
784
|
+
else {
|
|
785
|
+
this.nativeElement.whenRendered(() => {
|
|
786
|
+
this.nativeElement.unlockItem(item);
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
/** Unlocks a previously locked splitter bar.
|
|
791
|
+
* @param {number} item. The index of a Splitter Bar or it's instance.
|
|
792
|
+
*/
|
|
793
|
+
unlockBar(item) {
|
|
794
|
+
if (this.nativeElement.isRendered) {
|
|
795
|
+
this.nativeElement.unlockBar(item);
|
|
796
|
+
}
|
|
797
|
+
else {
|
|
798
|
+
this.nativeElement.whenRendered(() => {
|
|
799
|
+
this.nativeElement.unlockBar(item);
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
/** Updates the properties of a Splitter item inside the Splitter.
|
|
804
|
+
* @param {any} item. The index of a JQX.SplitterItem or it's instance.
|
|
805
|
+
* @param {any} settings. An object containing the properties of a JQX.SplitterItem.
|
|
806
|
+
*/
|
|
807
|
+
update(item, settings) {
|
|
808
|
+
if (this.nativeElement.isRendered) {
|
|
809
|
+
this.nativeElement.update(item, settings);
|
|
810
|
+
}
|
|
811
|
+
else {
|
|
812
|
+
this.nativeElement.whenRendered(() => {
|
|
813
|
+
this.nativeElement.update(item, settings);
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
componentDidRender(initialize) {
|
|
818
|
+
const that = this;
|
|
819
|
+
const props = {};
|
|
820
|
+
const events = {};
|
|
821
|
+
let styles = null;
|
|
822
|
+
for (let prop in that.props) {
|
|
823
|
+
if (prop === 'children') {
|
|
824
|
+
continue;
|
|
825
|
+
}
|
|
826
|
+
if (prop === 'style') {
|
|
827
|
+
styles = that.props[prop];
|
|
828
|
+
continue;
|
|
829
|
+
}
|
|
830
|
+
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
831
|
+
events[prop] = that.props[prop];
|
|
832
|
+
continue;
|
|
833
|
+
}
|
|
834
|
+
props[prop] = that.props[prop];
|
|
835
|
+
}
|
|
836
|
+
if (initialize) {
|
|
837
|
+
that.nativeElement = this.componentRef.current;
|
|
838
|
+
}
|
|
839
|
+
for (let prop in props) {
|
|
840
|
+
if (prop === 'class' || prop === 'className') {
|
|
841
|
+
const classNames = props[prop].trim().split(' ');
|
|
842
|
+
for (let className in classNames) {
|
|
843
|
+
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
844
|
+
that.nativeElement.classList.add(classNames[className]);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
continue;
|
|
848
|
+
}
|
|
849
|
+
if (props[prop] !== that.nativeElement[prop]) {
|
|
850
|
+
const normalizeProp = (str) => {
|
|
851
|
+
return str.replace(/-([a-z])/g, function (g) {
|
|
852
|
+
return g[1].toUpperCase();
|
|
853
|
+
});
|
|
854
|
+
};
|
|
855
|
+
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
856
|
+
that.nativeElement.setAttribute(prop, '');
|
|
857
|
+
}
|
|
858
|
+
const normalizedProp = normalizeProp(prop);
|
|
859
|
+
that.nativeElement[normalizedProp] = props[prop];
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
for (let eventName in events) {
|
|
863
|
+
that[eventName] = events[eventName];
|
|
864
|
+
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
865
|
+
}
|
|
866
|
+
if (initialize) {
|
|
867
|
+
Smart$2.Render();
|
|
868
|
+
if (that.onCreate) {
|
|
869
|
+
that.onCreate();
|
|
870
|
+
}
|
|
871
|
+
that.nativeElement.whenRendered(() => {
|
|
872
|
+
if (that.onReady) {
|
|
873
|
+
that.onReady();
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
// setup styles.
|
|
878
|
+
if (styles) {
|
|
879
|
+
for (let styleName in styles) {
|
|
880
|
+
that.nativeElement.style[styleName] = styles[styleName];
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
componentDidMount() {
|
|
885
|
+
this.componentDidRender(true);
|
|
886
|
+
}
|
|
887
|
+
componentDidUpdate() {
|
|
888
|
+
this.componentDidRender(false);
|
|
889
|
+
}
|
|
890
|
+
componentWillUnmount() {
|
|
891
|
+
const that = this;
|
|
892
|
+
if (!that.nativeElement) {
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
that.nativeElement.whenRenderedCallbacks = [];
|
|
896
|
+
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
897
|
+
const eventName = that.eventListeners[i];
|
|
898
|
+
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
render() {
|
|
902
|
+
return (React.createElement("smart-splitter", { ref: this.componentRef }, this.props.children));
|
|
903
|
+
}
|
|
904
|
+
}
|
|
435
905
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
constructor(props) {
|
|
442
|
-
super(props);
|
|
443
|
-
this.componentRef = React.createRef();
|
|
444
|
-
}
|
|
445
|
-
// Gets the id of the React component.
|
|
446
|
-
get id() {
|
|
447
|
-
if (!this._id) {
|
|
448
|
-
this._id = 'Splitter' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
449
|
-
}
|
|
450
|
-
return this._id;
|
|
451
|
-
}
|
|
452
|
-
/** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
|
|
453
|
-
* Property type: Animation | string
|
|
454
|
-
*/
|
|
455
|
-
get animation() {
|
|
456
|
-
return this.nativeElement ? this.nativeElement.animation : undefined;
|
|
457
|
-
}
|
|
458
|
-
set animation(value) {
|
|
459
|
-
if (this.nativeElement) {
|
|
460
|
-
this.nativeElement.animation = value;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
/** Determines how the items are arranged inside the Splitter. Possible values: end - all items will fit the size of the Splitter. When inserting a new item the space required for the item to fit will be deducted from it's neighbour. proportional - all items will fit the size of the Splitter. When inserting a new item the space required for it to fit will be the result from the proportional deduction of the size from the rest of the items inside the element. overflow - the items inside the Splitter will not fit it's size. Instead they overflow by taking the exact amount of space they need and a scrollbar is displayed in order to view the content.
|
|
464
|
-
* Property type: SplitterAutoFitMode | string
|
|
465
|
-
*/
|
|
466
|
-
get autoFitMode() {
|
|
467
|
-
return this.nativeElement ? this.nativeElement.autoFitMode : undefined;
|
|
468
|
-
}
|
|
469
|
-
set autoFitMode(value) {
|
|
470
|
-
if (this.nativeElement) {
|
|
471
|
-
this.nativeElement.autoFitMode = value;
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
/** Enables or disables the element.
|
|
475
|
-
* Property type: boolean
|
|
476
|
-
*/
|
|
477
|
-
get disabled() {
|
|
478
|
-
return this.nativeElement ? this.nativeElement.disabled : undefined;
|
|
479
|
-
}
|
|
480
|
-
set disabled(value) {
|
|
481
|
-
if (this.nativeElement) {
|
|
482
|
-
this.nativeElement.disabled = value;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
/** Sets or gets splitter's data source.
|
|
486
|
-
* Property type: any
|
|
487
|
-
*/
|
|
488
|
-
get dataSource() {
|
|
489
|
-
return this.nativeElement ? this.nativeElement.dataSource : undefined;
|
|
490
|
-
}
|
|
491
|
-
set dataSource(value) {
|
|
492
|
-
if (this.nativeElement) {
|
|
493
|
-
this.nativeElement.dataSource = value;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
/** A getter that returns an array of all Splitter items.
|
|
497
|
-
* Property type: any
|
|
498
|
-
*/
|
|
499
|
-
get items() {
|
|
500
|
-
return this.nativeElement ? this.nativeElement.items : undefined;
|
|
501
|
-
}
|
|
502
|
-
set items(value) {
|
|
503
|
-
if (this.nativeElement) {
|
|
504
|
-
this.nativeElement.items = value;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
/** If set the element keeps the same proportions of the items after the whole element has been resized regardless of the size property unit ( pixels or percentages) of the items.
|
|
508
|
-
* Property type: boolean
|
|
509
|
-
*/
|
|
510
|
-
get keepProportionsOnResize() {
|
|
511
|
-
return this.nativeElement ? this.nativeElement.keepProportionsOnResize : undefined;
|
|
512
|
-
}
|
|
513
|
-
set keepProportionsOnResize(value) {
|
|
514
|
-
if (this.nativeElement) {
|
|
515
|
-
this.nativeElement.keepProportionsOnResize = value;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
/** Sets or gets the language. Used in conjunction with the property messages.
|
|
519
|
-
* Property type: string
|
|
520
|
-
*/
|
|
521
|
-
get locale() {
|
|
522
|
-
return this.nativeElement ? this.nativeElement.locale : undefined;
|
|
523
|
-
}
|
|
524
|
-
set locale(value) {
|
|
525
|
-
if (this.nativeElement) {
|
|
526
|
-
this.nativeElement.locale = value;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
/** Callback, related to localization module.
|
|
530
|
-
* Property type: any
|
|
531
|
-
*/
|
|
532
|
-
get localizeFormatFunction() {
|
|
533
|
-
return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
|
|
534
|
-
}
|
|
535
|
-
set localizeFormatFunction(value) {
|
|
536
|
-
if (this.nativeElement) {
|
|
537
|
-
this.nativeElement.localizeFormatFunction = value;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
/** Sets an object with string values, related to the different states of passwords strength.
|
|
541
|
-
* Property type: any
|
|
542
|
-
*/
|
|
543
|
-
get messages() {
|
|
544
|
-
return this.nativeElement ? this.nativeElement.messages : undefined;
|
|
545
|
-
}
|
|
546
|
-
set messages(value) {
|
|
547
|
-
if (this.nativeElement) {
|
|
548
|
-
this.nativeElement.messages = value;
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
/** Sets or gets splitter's orientation.
|
|
552
|
-
* Property type: Orientation | string
|
|
553
|
-
*/
|
|
554
|
-
get orientation() {
|
|
555
|
-
return this.nativeElement ? this.nativeElement.orientation : undefined;
|
|
556
|
-
}
|
|
557
|
-
set orientation(value) {
|
|
558
|
-
if (this.nativeElement) {
|
|
559
|
-
this.nativeElement.orientation = value;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
/** If the element is readonly, users cannot interact with it.
|
|
563
|
-
* Property type: boolean
|
|
564
|
-
*/
|
|
565
|
-
get readonly() {
|
|
566
|
-
return this.nativeElement ? this.nativeElement.readonly : undefined;
|
|
567
|
-
}
|
|
568
|
-
set readonly(value) {
|
|
569
|
-
if (this.nativeElement) {
|
|
570
|
-
this.nativeElement.readonly = value;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
/** Determines the resize mode of the splitter. Possible values are: - None - resizing is disabled. - Adjacent - only the two adjacent items between the target splitter bar are being affected. This is the default behavior. - End - only the first item( left or top according to the orientation) of the target Splitter bar and the last item are affected. Proportional - all of the items positioned in the direction to which the splitter bar is dragged will be affected. For example, when a splitter bar is dragged to the right all the items positioned on it's the right side will be affected. The items will obtain a proportional size corresponding to their current size.
|
|
574
|
-
* Property type: SplitterResizeMode | string
|
|
575
|
-
*/
|
|
576
|
-
get resizeMode() {
|
|
577
|
-
return this.nativeElement ? this.nativeElement.resizeMode : undefined;
|
|
578
|
-
}
|
|
579
|
-
set resizeMode(value) {
|
|
580
|
-
if (this.nativeElement) {
|
|
581
|
-
this.nativeElement.resizeMode = value;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
/** Determines the resize step during reisizing
|
|
585
|
-
* Property type: number
|
|
586
|
-
*/
|
|
587
|
-
get resizeStep() {
|
|
588
|
-
return this.nativeElement ? this.nativeElement.resizeStep : undefined;
|
|
589
|
-
}
|
|
590
|
-
set resizeStep(value) {
|
|
591
|
-
if (this.nativeElement) {
|
|
592
|
-
this.nativeElement.resizeStep = value;
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
/** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
|
|
596
|
-
* Property type: boolean
|
|
597
|
-
*/
|
|
598
|
-
get rightToLeft() {
|
|
599
|
-
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
|
|
600
|
-
}
|
|
601
|
-
set rightToLeft(value) {
|
|
602
|
-
if (this.nativeElement) {
|
|
603
|
-
this.nativeElement.rightToLeft = value;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
/** When enabled the resizing operation happens live. By default this feature is not enabled and the user sees a hightlighted bar while dragging instead of the actual splitter bar.
|
|
607
|
-
* Property type: boolean
|
|
608
|
-
*/
|
|
609
|
-
get liveResize() {
|
|
610
|
-
return this.nativeElement ? this.nativeElement.liveResize : undefined;
|
|
611
|
-
}
|
|
612
|
-
set liveResize(value) {
|
|
613
|
-
if (this.nativeElement) {
|
|
614
|
-
this.nativeElement.liveResize = value;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
/** Determines the theme. Theme defines the look of the element
|
|
618
|
-
* Property type: string
|
|
619
|
-
*/
|
|
620
|
-
get theme() {
|
|
621
|
-
return this.nativeElement ? this.nativeElement.theme : undefined;
|
|
622
|
-
}
|
|
623
|
-
set theme(value) {
|
|
624
|
-
if (this.nativeElement) {
|
|
625
|
-
this.nativeElement.theme = value;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
/** If is set to true, the element cannot be focused.
|
|
629
|
-
* Property type: boolean
|
|
630
|
-
*/
|
|
631
|
-
get unfocusable() {
|
|
632
|
-
return this.nativeElement ? this.nativeElement.unfocusable : undefined;
|
|
633
|
-
}
|
|
634
|
-
set unfocusable(value) {
|
|
635
|
-
if (this.nativeElement) {
|
|
636
|
-
this.nativeElement.unfocusable = value;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
// Gets the properties of the React component.
|
|
640
|
-
get properties() {
|
|
641
|
-
return ["animation", "autoFitMode", "disabled", "dataSource", "items", "keepProportionsOnResize", "locale", "localizeFormatFunction", "messages", "orientation", "readonly", "resizeMode", "resizeStep", "rightToLeft", "liveResize", "theme", "unfocusable"];
|
|
642
|
-
}
|
|
643
|
-
// Gets the events of the React component.
|
|
644
|
-
get eventListeners() {
|
|
645
|
-
return ["onCollapse", "onExpand", "onResizeStart", "onResizeEnd", "onCreate", "onReady"];
|
|
646
|
-
}
|
|
647
|
-
/** Appends a new node.
|
|
648
|
-
* @param {Node} node. The node to append
|
|
649
|
-
*/
|
|
650
|
-
appendChild(node) {
|
|
651
|
-
if (this.nativeElement.isRendered) {
|
|
652
|
-
this.nativeElement.appendChild(node);
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
this.nativeElement.whenRendered(() => {
|
|
656
|
-
this.nativeElement.appendChild(node);
|
|
657
|
-
});
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
/** Collapses splitter item.
|
|
661
|
-
* @param {any} item. number indicating the index of the item or an isntance of JQX.SplitterItem
|
|
662
|
-
* @param {boolean} far?. Indicates whether the item should collapse to it's far or near side
|
|
663
|
-
*/
|
|
664
|
-
collapse(item, far) {
|
|
665
|
-
if (this.nativeElement.isRendered) {
|
|
666
|
-
this.nativeElement.collapse(item, far);
|
|
667
|
-
}
|
|
668
|
-
else {
|
|
669
|
-
this.nativeElement.whenRendered(() => {
|
|
670
|
-
this.nativeElement.collapse(item, far);
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
/** Expands the splitter item if possible (if there's enough space available).
|
|
675
|
-
* @param {any} item. number indicating the index of the item or an isntance of JQX.SplitterItem
|
|
676
|
-
*/
|
|
677
|
-
expand(item) {
|
|
678
|
-
if (this.nativeElement.isRendered) {
|
|
679
|
-
this.nativeElement.expand(item);
|
|
680
|
-
}
|
|
681
|
-
else {
|
|
682
|
-
this.nativeElement.whenRendered(() => {
|
|
683
|
-
this.nativeElement.expand(item);
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
/** Hides a splitter bar
|
|
688
|
-
* @param {number} splitterBar. A JQX.SplitterBar instance.
|
|
689
|
-
* @returns {number}
|
|
690
|
-
*/
|
|
691
|
-
hideBar(splitterBar) {
|
|
692
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
693
|
-
const getResultOnRender = () => {
|
|
694
|
-
return new Promise(resolve => {
|
|
695
|
-
this.nativeElement.whenRendered(() => {
|
|
696
|
-
const result = this.nativeElement.hideBar(splitterBar);
|
|
697
|
-
resolve(result);
|
|
698
|
-
});
|
|
699
|
-
});
|
|
700
|
-
};
|
|
701
|
-
const result = yield getResultOnRender();
|
|
702
|
-
return result;
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
/** Insert a new Splitter item at a given position.
|
|
706
|
-
* @param {number} index. The index at which a new item will be inserted.
|
|
707
|
-
* @param {any} details. An Object or string used as content if the splitter item.
|
|
708
|
-
*/
|
|
709
|
-
insert(index, details) {
|
|
710
|
-
if (this.nativeElement.isRendered) {
|
|
711
|
-
this.nativeElement.insert(index, details);
|
|
712
|
-
}
|
|
713
|
-
else {
|
|
714
|
-
this.nativeElement.whenRendered(() => {
|
|
715
|
-
this.nativeElement.insert(index, details);
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
/** Inserts the specified "smart-splitter-item" node before the reference "smart-splitter-item" node.
|
|
720
|
-
* @param {Node} newNode. The "jqx-splitter-item" node to insert.
|
|
721
|
-
* @param {Node | null} referenceNode?. The "jqx-splitter-item" node before which newNode is inserted.
|
|
722
|
-
* @returns {Node}
|
|
723
|
-
*/
|
|
724
|
-
insertBefore(newNode, referenceNode) {
|
|
725
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
726
|
-
const getResultOnRender = () => {
|
|
727
|
-
return new Promise(resolve => {
|
|
728
|
-
this.nativeElement.whenRendered(() => {
|
|
729
|
-
const result = this.nativeElement.insertBefore(newNode, referenceNode);
|
|
730
|
-
resolve(result);
|
|
731
|
-
});
|
|
732
|
-
});
|
|
733
|
-
};
|
|
734
|
-
const result = yield getResultOnRender();
|
|
735
|
-
return result;
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
/** Locks a splitter item so it's size can't change.
|
|
739
|
-
* @param {number} index. The index of a Splitter Bar or it's instance.
|
|
740
|
-
*/
|
|
741
|
-
lockItem(index) {
|
|
742
|
-
if (this.nativeElement.isRendered) {
|
|
743
|
-
this.nativeElement.lockItem(index);
|
|
744
|
-
}
|
|
745
|
-
else {
|
|
746
|
-
this.nativeElement.whenRendered(() => {
|
|
747
|
-
this.nativeElement.lockItem(index);
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
/** Locks a splitter bar so it can't be dragged.
|
|
752
|
-
* @param {number} index. The index of a Splitter Bar or it's instance.
|
|
753
|
-
*/
|
|
754
|
-
lockBar(index) {
|
|
755
|
-
if (this.nativeElement.isRendered) {
|
|
756
|
-
this.nativeElement.lockBar(index);
|
|
757
|
-
}
|
|
758
|
-
else {
|
|
759
|
-
this.nativeElement.whenRendered(() => {
|
|
760
|
-
this.nativeElement.lockBar(index);
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
/** Removes a Splitter item.
|
|
765
|
-
* @param {number} index. An item to be removed.
|
|
766
|
-
*/
|
|
767
|
-
removeAt(index) {
|
|
768
|
-
if (this.nativeElement.isRendered) {
|
|
769
|
-
this.nativeElement.removeAt(index);
|
|
770
|
-
}
|
|
771
|
-
else {
|
|
772
|
-
this.nativeElement.whenRendered(() => {
|
|
773
|
-
this.nativeElement.removeAt(index);
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
/** Removes all items from the Splitter
|
|
778
|
-
*/
|
|
779
|
-
removeAll() {
|
|
780
|
-
if (this.nativeElement.isRendered) {
|
|
781
|
-
this.nativeElement.removeAll();
|
|
782
|
-
}
|
|
783
|
-
else {
|
|
784
|
-
this.nativeElement.whenRendered(() => {
|
|
785
|
-
this.nativeElement.removeAll();
|
|
786
|
-
});
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
/** Removes a child "smart-splitter-item" node.
|
|
790
|
-
* @param {Node} node. The "jqx-splitter-item" node to remove.
|
|
791
|
-
* @returns {Node}
|
|
792
|
-
*/
|
|
793
|
-
removeChild(node) {
|
|
794
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
795
|
-
const getResultOnRender = () => {
|
|
796
|
-
return new Promise(resolve => {
|
|
797
|
-
this.nativeElement.whenRendered(() => {
|
|
798
|
-
const result = this.nativeElement.removeChild(node);
|
|
799
|
-
resolve(result);
|
|
800
|
-
});
|
|
801
|
-
});
|
|
802
|
-
};
|
|
803
|
-
const result = yield getResultOnRender();
|
|
804
|
-
return result;
|
|
805
|
-
});
|
|
806
|
-
}
|
|
807
|
-
/** Refreshes the Splitter
|
|
808
|
-
*/
|
|
809
|
-
refresh() {
|
|
810
|
-
if (this.nativeElement.isRendered) {
|
|
811
|
-
this.nativeElement.refresh();
|
|
812
|
-
}
|
|
813
|
-
else {
|
|
814
|
-
this.nativeElement.whenRendered(() => {
|
|
815
|
-
this.nativeElement.refresh();
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
/** Unhides a Splitter Bar
|
|
820
|
-
* @param {number} splitterBar. An instance of a splitter bar.
|
|
821
|
-
*/
|
|
822
|
-
showBar(splitterBar) {
|
|
823
|
-
if (this.nativeElement.isRendered) {
|
|
824
|
-
this.nativeElement.showBar(splitterBar);
|
|
825
|
-
}
|
|
826
|
-
else {
|
|
827
|
-
this.nativeElement.whenRendered(() => {
|
|
828
|
-
this.nativeElement.showBar(splitterBar);
|
|
829
|
-
});
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
/** Unlocks a previously locked splitter item.
|
|
833
|
-
* @param {number} item. The index of a Splitter Item or it's instance.
|
|
834
|
-
*/
|
|
835
|
-
unlockItem(item) {
|
|
836
|
-
if (this.nativeElement.isRendered) {
|
|
837
|
-
this.nativeElement.unlockItem(item);
|
|
838
|
-
}
|
|
839
|
-
else {
|
|
840
|
-
this.nativeElement.whenRendered(() => {
|
|
841
|
-
this.nativeElement.unlockItem(item);
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
/** Unlocks a previously locked splitter bar.
|
|
846
|
-
* @param {number} item. The index of a Splitter Bar or it's instance.
|
|
847
|
-
*/
|
|
848
|
-
unlockBar(item) {
|
|
849
|
-
if (this.nativeElement.isRendered) {
|
|
850
|
-
this.nativeElement.unlockBar(item);
|
|
851
|
-
}
|
|
852
|
-
else {
|
|
853
|
-
this.nativeElement.whenRendered(() => {
|
|
854
|
-
this.nativeElement.unlockBar(item);
|
|
855
|
-
});
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
/** Updates the properties of a Splitter item inside the Splitter.
|
|
859
|
-
* @param {any} item. The index of a JQX.SplitterItem or it's instance.
|
|
860
|
-
* @param {any} settings. An object containing the properties of a JQX.SplitterItem.
|
|
861
|
-
*/
|
|
862
|
-
update(item, settings) {
|
|
863
|
-
if (this.nativeElement.isRendered) {
|
|
864
|
-
this.nativeElement.update(item, settings);
|
|
865
|
-
}
|
|
866
|
-
else {
|
|
867
|
-
this.nativeElement.whenRendered(() => {
|
|
868
|
-
this.nativeElement.update(item, settings);
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
componentDidRender(initialize) {
|
|
873
|
-
const that = this;
|
|
874
|
-
const props = {};
|
|
875
|
-
const events = {};
|
|
876
|
-
let styles = null;
|
|
877
|
-
for (let prop in that.props) {
|
|
878
|
-
if (prop === 'children') {
|
|
879
|
-
continue;
|
|
880
|
-
}
|
|
881
|
-
if (prop === 'style') {
|
|
882
|
-
styles = that.props[prop];
|
|
883
|
-
continue;
|
|
884
|
-
}
|
|
885
|
-
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
886
|
-
events[prop] = that.props[prop];
|
|
887
|
-
continue;
|
|
888
|
-
}
|
|
889
|
-
props[prop] = that.props[prop];
|
|
890
|
-
}
|
|
891
|
-
if (initialize) {
|
|
892
|
-
that.nativeElement = this.componentRef.current;
|
|
893
|
-
}
|
|
894
|
-
for (let prop in props) {
|
|
895
|
-
if (prop === 'class' || prop === 'className') {
|
|
896
|
-
const classNames = props[prop].trim().split(' ');
|
|
897
|
-
for (let className in classNames) {
|
|
898
|
-
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
899
|
-
that.nativeElement.classList.add(classNames[className]);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
continue;
|
|
903
|
-
}
|
|
904
|
-
if (props[prop] !== that.nativeElement[prop]) {
|
|
905
|
-
const normalizeProp = (str) => {
|
|
906
|
-
return str.replace(/-([a-z])/g, function (g) {
|
|
907
|
-
return g[1].toUpperCase();
|
|
908
|
-
});
|
|
909
|
-
};
|
|
910
|
-
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
911
|
-
that.nativeElement.setAttribute(prop, '');
|
|
912
|
-
}
|
|
913
|
-
const normalizedProp = normalizeProp(prop);
|
|
914
|
-
that.nativeElement[normalizedProp] = props[prop];
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
for (let eventName in events) {
|
|
918
|
-
that[eventName] = events[eventName];
|
|
919
|
-
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
920
|
-
}
|
|
921
|
-
if (initialize) {
|
|
922
|
-
Smart$2.Render();
|
|
923
|
-
if (that.onCreate) {
|
|
924
|
-
that.onCreate();
|
|
925
|
-
}
|
|
926
|
-
that.nativeElement.whenRendered(() => {
|
|
927
|
-
if (that.onReady) {
|
|
928
|
-
that.onReady();
|
|
929
|
-
}
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
// setup styles.
|
|
933
|
-
if (styles) {
|
|
934
|
-
for (let styleName in styles) {
|
|
935
|
-
that.nativeElement.style[styleName] = styles[styleName];
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
componentDidMount() {
|
|
940
|
-
this.componentDidRender(true);
|
|
941
|
-
}
|
|
942
|
-
componentDidUpdate() {
|
|
943
|
-
this.componentDidRender(false);
|
|
944
|
-
}
|
|
945
|
-
componentWillUnmount() {
|
|
946
|
-
const that = this;
|
|
947
|
-
if (!that.nativeElement) {
|
|
948
|
-
return;
|
|
949
|
-
}
|
|
950
|
-
that.nativeElement.whenRenderedCallbacks = [];
|
|
951
|
-
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
952
|
-
const eventName = that.eventListeners[i];
|
|
953
|
-
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
render() {
|
|
957
|
-
return (React.createElement("smart-splitter", { ref: this.componentRef }, this.props.children));
|
|
958
|
-
}
|
|
959
|
-
}
|
|
906
|
+
exports.Smart = Smart$2;
|
|
907
|
+
exports.Splitter = Splitter;
|
|
908
|
+
exports.default = Splitter;
|
|
909
|
+
exports.SplitterItem = SplitterItem;
|
|
910
|
+
exports.SplitterBar = SplitterBar;
|
|
960
911
|
|
|
961
|
-
|
|
962
|
-
exports.Splitter = Splitter;
|
|
963
|
-
exports.default = Splitter;
|
|
964
|
-
exports.SplitterItem = SplitterItem;
|
|
965
|
-
exports.SplitterBar = SplitterBar;
|
|
966
|
-
|
|
967
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
912
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
968
913
|
|
|
969
914
|
})));
|