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/tabs/tabs.umd.js
CHANGED
|
@@ -2,952 +2,887 @@
|
|
|
2
2
|
require('../source/modules/smart.tabs');
|
|
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.tabs = {}),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
|
+
Defines a tab item.
|
|
15
|
+
*/
|
|
16
|
+
class TabItem 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 = 'TabItem' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
25
|
+
}
|
|
26
|
+
return this._id;
|
|
27
|
+
}
|
|
28
|
+
/** Tab item close button state
|
|
29
|
+
* Property type: boolean
|
|
30
|
+
*/
|
|
31
|
+
get closeButtonHidden() {
|
|
32
|
+
return this.nativeElement ? this.nativeElement.closeButtonHidden : undefined;
|
|
33
|
+
}
|
|
34
|
+
set closeButtonHidden(value) {
|
|
35
|
+
if (this.nativeElement) {
|
|
36
|
+
this.nativeElement.closeButtonHidden = value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** Disables the Tab item
|
|
40
|
+
* Property type: boolean
|
|
41
|
+
*/
|
|
42
|
+
get disabled() {
|
|
43
|
+
return this.nativeElement ? this.nativeElement.disabled : undefined;
|
|
44
|
+
}
|
|
45
|
+
set disabled(value) {
|
|
46
|
+
if (this.nativeElement) {
|
|
47
|
+
this.nativeElement.disabled = value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Tab item index
|
|
51
|
+
* Property type: number
|
|
52
|
+
*/
|
|
53
|
+
get index() {
|
|
54
|
+
return this.nativeElement ? this.nativeElement.index : undefined;
|
|
55
|
+
}
|
|
56
|
+
set index(value) {
|
|
57
|
+
if (this.nativeElement) {
|
|
58
|
+
this.nativeElement.index = value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Tab item selected state
|
|
62
|
+
* Property type: boolean
|
|
63
|
+
*/
|
|
64
|
+
get selected() {
|
|
65
|
+
return this.nativeElement ? this.nativeElement.selected : undefined;
|
|
66
|
+
}
|
|
67
|
+
set selected(value) {
|
|
68
|
+
if (this.nativeElement) {
|
|
69
|
+
this.nativeElement.selected = value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/** Tab item label
|
|
73
|
+
* Property type: string
|
|
74
|
+
*/
|
|
75
|
+
get label() {
|
|
76
|
+
return this.nativeElement ? this.nativeElement.label : undefined;
|
|
77
|
+
}
|
|
78
|
+
set label(value) {
|
|
79
|
+
if (this.nativeElement) {
|
|
80
|
+
this.nativeElement.label = value;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** Tab item content
|
|
84
|
+
* Property type: number
|
|
85
|
+
*/
|
|
86
|
+
get labelSize() {
|
|
87
|
+
return this.nativeElement ? this.nativeElement.labelSize : undefined;
|
|
88
|
+
}
|
|
89
|
+
set labelSize(value) {
|
|
90
|
+
if (this.nativeElement) {
|
|
91
|
+
this.nativeElement.labelSize = value;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// Gets the properties of the React component.
|
|
95
|
+
get properties() {
|
|
96
|
+
return ["closeButtonHidden", "disabled", "index", "selected", "label", "content", "labelSize"];
|
|
97
|
+
}
|
|
98
|
+
// Gets the events of the React component.
|
|
99
|
+
get eventListeners() {
|
|
100
|
+
return ["onCreate", "onReady"];
|
|
101
|
+
}
|
|
102
|
+
componentDidRender(initialize) {
|
|
103
|
+
const that = this;
|
|
104
|
+
const props = {};
|
|
105
|
+
const events = {};
|
|
106
|
+
let styles = null;
|
|
107
|
+
for (let prop in that.props) {
|
|
108
|
+
if (prop === 'children') {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (prop === 'style') {
|
|
112
|
+
styles = that.props[prop];
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
116
|
+
events[prop] = that.props[prop];
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
props[prop] = that.props[prop];
|
|
120
|
+
}
|
|
121
|
+
if (initialize) {
|
|
122
|
+
that.nativeElement = this.componentRef.current;
|
|
123
|
+
}
|
|
124
|
+
for (let prop in props) {
|
|
125
|
+
if (prop === 'class' || prop === 'className') {
|
|
126
|
+
const classNames = props[prop].trim().split(' ');
|
|
127
|
+
for (let className in classNames) {
|
|
128
|
+
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
129
|
+
that.nativeElement.classList.add(classNames[className]);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (props[prop] !== that.nativeElement[prop]) {
|
|
135
|
+
const normalizeProp = (str) => {
|
|
136
|
+
return str.replace(/-([a-z])/g, function (g) {
|
|
137
|
+
return g[1].toUpperCase();
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
141
|
+
that.nativeElement.setAttribute(prop, '');
|
|
142
|
+
}
|
|
143
|
+
const normalizedProp = normalizeProp(prop);
|
|
144
|
+
that.nativeElement[normalizedProp] = props[prop];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
for (let eventName in events) {
|
|
148
|
+
that[eventName] = events[eventName];
|
|
149
|
+
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
150
|
+
}
|
|
151
|
+
if (initialize) {
|
|
152
|
+
if (that.onCreate) {
|
|
153
|
+
that.onCreate();
|
|
154
|
+
}
|
|
155
|
+
that.nativeElement.whenRendered(() => {
|
|
156
|
+
if (that.onReady) {
|
|
157
|
+
that.onReady();
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
// setup styles.
|
|
162
|
+
if (styles) {
|
|
163
|
+
for (let styleName in styles) {
|
|
164
|
+
that.nativeElement.style[styleName] = styles[styleName];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
componentDidMount() {
|
|
169
|
+
this.componentDidRender(true);
|
|
170
|
+
}
|
|
171
|
+
componentDidUpdate() {
|
|
172
|
+
this.componentDidRender(false);
|
|
173
|
+
}
|
|
174
|
+
componentWillUnmount() {
|
|
175
|
+
const that = this;
|
|
176
|
+
if (!that.nativeElement) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
that.nativeElement.whenRenderedCallbacks = [];
|
|
180
|
+
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
181
|
+
const eventName = that.eventListeners[i];
|
|
182
|
+
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
render() {
|
|
186
|
+
return (React.createElement("smart-tab-item", { ref: this.componentRef }, this.props.children));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
36
189
|
|
|
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
|
-
for (let eventName in events) {
|
|
173
|
-
that[eventName] = events[eventName];
|
|
174
|
-
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
175
|
-
}
|
|
176
|
-
if (initialize) {
|
|
177
|
-
if (that.onCreate) {
|
|
178
|
-
that.onCreate();
|
|
179
|
-
}
|
|
180
|
-
that.nativeElement.whenRendered(() => {
|
|
181
|
-
if (that.onReady) {
|
|
182
|
-
that.onReady();
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
// setup styles.
|
|
187
|
-
if (styles) {
|
|
188
|
-
for (let styleName in styles) {
|
|
189
|
-
that.nativeElement.style[styleName] = styles[styleName];
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
componentDidMount() {
|
|
194
|
-
this.componentDidRender(true);
|
|
195
|
-
}
|
|
196
|
-
componentDidUpdate() {
|
|
197
|
-
this.componentDidRender(false);
|
|
198
|
-
}
|
|
199
|
-
componentWillUnmount() {
|
|
200
|
-
const that = this;
|
|
201
|
-
if (!that.nativeElement) {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
that.nativeElement.whenRenderedCallbacks = [];
|
|
205
|
-
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
206
|
-
const eventName = that.eventListeners[i];
|
|
207
|
-
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
render() {
|
|
211
|
-
return (React.createElement("smart-tab-item", { ref: this.componentRef }, this.props.children));
|
|
212
|
-
}
|
|
213
|
-
}
|
|
190
|
+
const Smart$1 = window.Smart;
|
|
191
|
+
/**
|
|
192
|
+
Defines a group of tab items.
|
|
193
|
+
*/
|
|
194
|
+
class TabItemsGroup extends React.Component {
|
|
195
|
+
constructor(props) {
|
|
196
|
+
super(props);
|
|
197
|
+
this.componentRef = React.createRef();
|
|
198
|
+
}
|
|
199
|
+
// Gets the id of the React component.
|
|
200
|
+
get id() {
|
|
201
|
+
if (!this._id) {
|
|
202
|
+
this._id = 'TabItemsGroup' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
203
|
+
}
|
|
204
|
+
return this._id;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Property type: string
|
|
208
|
+
*/
|
|
209
|
+
get label() {
|
|
210
|
+
return this.nativeElement ? this.nativeElement.label : undefined;
|
|
211
|
+
}
|
|
212
|
+
set label(value) {
|
|
213
|
+
if (this.nativeElement) {
|
|
214
|
+
this.nativeElement.label = value;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Property type: number
|
|
219
|
+
*/
|
|
220
|
+
get labelSize() {
|
|
221
|
+
return this.nativeElement ? this.nativeElement.labelSize : undefined;
|
|
222
|
+
}
|
|
223
|
+
set labelSize(value) {
|
|
224
|
+
if (this.nativeElement) {
|
|
225
|
+
this.nativeElement.labelSize = value;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
// Gets the properties of the React component.
|
|
229
|
+
get properties() {
|
|
230
|
+
return ["label", "labelSize"];
|
|
231
|
+
}
|
|
232
|
+
// Gets the events of the React component.
|
|
233
|
+
get eventListeners() {
|
|
234
|
+
return ["onCreate", "onReady"];
|
|
235
|
+
}
|
|
236
|
+
componentDidRender(initialize) {
|
|
237
|
+
const that = this;
|
|
238
|
+
const props = {};
|
|
239
|
+
const events = {};
|
|
240
|
+
let styles = null;
|
|
241
|
+
for (let prop in that.props) {
|
|
242
|
+
if (prop === 'children') {
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
if (prop === 'style') {
|
|
246
|
+
styles = that.props[prop];
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
250
|
+
events[prop] = that.props[prop];
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
props[prop] = that.props[prop];
|
|
254
|
+
}
|
|
255
|
+
if (initialize) {
|
|
256
|
+
that.nativeElement = this.componentRef.current;
|
|
257
|
+
}
|
|
258
|
+
for (let prop in props) {
|
|
259
|
+
if (prop === 'class' || prop === 'className') {
|
|
260
|
+
const classNames = props[prop].trim().split(' ');
|
|
261
|
+
for (let className in classNames) {
|
|
262
|
+
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
263
|
+
that.nativeElement.classList.add(classNames[className]);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if (props[prop] !== that.nativeElement[prop]) {
|
|
269
|
+
const normalizeProp = (str) => {
|
|
270
|
+
return str.replace(/-([a-z])/g, function (g) {
|
|
271
|
+
return g[1].toUpperCase();
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
275
|
+
that.nativeElement.setAttribute(prop, '');
|
|
276
|
+
}
|
|
277
|
+
const normalizedProp = normalizeProp(prop);
|
|
278
|
+
that.nativeElement[normalizedProp] = props[prop];
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
for (let eventName in events) {
|
|
282
|
+
that[eventName] = events[eventName];
|
|
283
|
+
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
284
|
+
}
|
|
285
|
+
if (initialize) {
|
|
286
|
+
if (that.onCreate) {
|
|
287
|
+
that.onCreate();
|
|
288
|
+
}
|
|
289
|
+
that.nativeElement.whenRendered(() => {
|
|
290
|
+
if (that.onReady) {
|
|
291
|
+
that.onReady();
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
// setup styles.
|
|
296
|
+
if (styles) {
|
|
297
|
+
for (let styleName in styles) {
|
|
298
|
+
that.nativeElement.style[styleName] = styles[styleName];
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
componentDidMount() {
|
|
303
|
+
this.componentDidRender(true);
|
|
304
|
+
}
|
|
305
|
+
componentDidUpdate() {
|
|
306
|
+
this.componentDidRender(false);
|
|
307
|
+
}
|
|
308
|
+
componentWillUnmount() {
|
|
309
|
+
const that = this;
|
|
310
|
+
if (!that.nativeElement) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
that.nativeElement.whenRenderedCallbacks = [];
|
|
314
|
+
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
315
|
+
const eventName = that.eventListeners[i];
|
|
316
|
+
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
render() {
|
|
320
|
+
return (React.createElement("smart-tab-items-group", { ref: this.componentRef }, this.props.children));
|
|
321
|
+
}
|
|
322
|
+
}
|
|
214
323
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
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
|
-
|
|
324
|
+
const Smart$2 = window.Smart;
|
|
325
|
+
/**
|
|
326
|
+
Tabs organize content across different screens, data sets, and other interactions. Tabs can be paired with components like top app bars. Tabs can be displayed horizontally or vertically.
|
|
327
|
+
*/
|
|
328
|
+
class Tabs extends React.Component {
|
|
329
|
+
constructor(props) {
|
|
330
|
+
super(props);
|
|
331
|
+
this.componentRef = React.createRef();
|
|
332
|
+
}
|
|
333
|
+
// Gets the id of the React component.
|
|
334
|
+
get id() {
|
|
335
|
+
if (!this._id) {
|
|
336
|
+
this._id = 'Tabs' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
337
|
+
}
|
|
338
|
+
return this._id;
|
|
339
|
+
}
|
|
340
|
+
/** Sets or gets whether the "Add new tab" button (+) is displayed.
|
|
341
|
+
* Property type: boolean
|
|
342
|
+
*/
|
|
343
|
+
get addNewTab() {
|
|
344
|
+
return this.nativeElement ? this.nativeElement.addNewTab : undefined;
|
|
345
|
+
}
|
|
346
|
+
set addNewTab(value) {
|
|
347
|
+
if (this.nativeElement) {
|
|
348
|
+
this.nativeElement.addNewTab = value;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
/** Allows toggle. If set to true, **selectedIndex** can be set to null (no selected tab).
|
|
352
|
+
* Property type: boolean
|
|
353
|
+
*/
|
|
354
|
+
get allowToggle() {
|
|
355
|
+
return this.nativeElement ? this.nativeElement.allowToggle : undefined;
|
|
356
|
+
}
|
|
357
|
+
set allowToggle(value) {
|
|
358
|
+
if (this.nativeElement) {
|
|
359
|
+
this.nativeElement.allowToggle = value;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
/** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
|
|
363
|
+
* Property type: Animation | string
|
|
364
|
+
*/
|
|
365
|
+
get animation() {
|
|
366
|
+
return this.nativeElement ? this.nativeElement.animation : undefined;
|
|
367
|
+
}
|
|
368
|
+
set animation(value) {
|
|
369
|
+
if (this.nativeElement) {
|
|
370
|
+
this.nativeElement.animation = value;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
/** Sets or gets the close button mode.
|
|
374
|
+
* Property type: TabsCloseButtonMode | string
|
|
375
|
+
*/
|
|
376
|
+
get closeButtonMode() {
|
|
377
|
+
return this.nativeElement ? this.nativeElement.closeButtonMode : undefined;
|
|
378
|
+
}
|
|
379
|
+
set closeButtonMode(value) {
|
|
380
|
+
if (this.nativeElement) {
|
|
381
|
+
this.nativeElement.closeButtonMode = value;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
/** Sets or gets whether close buttons are displayed.
|
|
385
|
+
* Property type: boolean
|
|
386
|
+
*/
|
|
387
|
+
get closeButtons() {
|
|
388
|
+
return this.nativeElement ? this.nativeElement.closeButtons : undefined;
|
|
389
|
+
}
|
|
390
|
+
set closeButtons(value) {
|
|
391
|
+
if (this.nativeElement) {
|
|
392
|
+
this.nativeElement.closeButtons = value;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
/** Sets or gets whether the Tabs content section is collapsed.
|
|
396
|
+
* Property type: boolean
|
|
397
|
+
*/
|
|
398
|
+
get collapsed() {
|
|
399
|
+
return this.nativeElement ? this.nativeElement.collapsed : undefined;
|
|
400
|
+
}
|
|
401
|
+
set collapsed(value) {
|
|
402
|
+
if (this.nativeElement) {
|
|
403
|
+
this.nativeElement.collapsed = value;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/** Enables or disables the collapsible feature.
|
|
407
|
+
* Property type: boolean
|
|
408
|
+
*/
|
|
409
|
+
get collapsible() {
|
|
410
|
+
return this.nativeElement ? this.nativeElement.collapsible : undefined;
|
|
411
|
+
}
|
|
412
|
+
set collapsible(value) {
|
|
413
|
+
if (this.nativeElement) {
|
|
414
|
+
this.nativeElement.collapsible = value;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
/** Determines the data source that will be loaded to the Tabs.
|
|
418
|
+
* Property type: any
|
|
419
|
+
*/
|
|
420
|
+
get dataSource() {
|
|
421
|
+
return this.nativeElement ? this.nativeElement.dataSource : undefined;
|
|
422
|
+
}
|
|
423
|
+
set dataSource(value) {
|
|
424
|
+
if (this.nativeElement) {
|
|
425
|
+
this.nativeElement.dataSource = value;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
/** Enables or disables the element.
|
|
429
|
+
* Property type: boolean
|
|
430
|
+
*/
|
|
431
|
+
get disabled() {
|
|
432
|
+
return this.nativeElement ? this.nativeElement.disabled : undefined;
|
|
433
|
+
}
|
|
434
|
+
set disabled(value) {
|
|
435
|
+
if (this.nativeElement) {
|
|
436
|
+
this.nativeElement.disabled = value;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
/** Enables or disables scrolling using the mouse wheel through overflowing tab labels in the tab strip.
|
|
440
|
+
* Property type: boolean
|
|
441
|
+
*/
|
|
442
|
+
get enableMouseWheelAction() {
|
|
443
|
+
return this.nativeElement ? this.nativeElement.enableMouseWheelAction : undefined;
|
|
444
|
+
}
|
|
445
|
+
set enableMouseWheelAction(value) {
|
|
446
|
+
if (this.nativeElement) {
|
|
447
|
+
this.nativeElement.enableMouseWheelAction = value;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
/** Sets or gets the locale. Used in conjunction with the property messages.
|
|
451
|
+
* Property type: string
|
|
452
|
+
*/
|
|
453
|
+
get locale() {
|
|
454
|
+
return this.nativeElement ? this.nativeElement.locale : undefined;
|
|
455
|
+
}
|
|
456
|
+
set locale(value) {
|
|
457
|
+
if (this.nativeElement) {
|
|
458
|
+
this.nativeElement.locale = value;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
/** Callback, related to localization module.
|
|
462
|
+
* Property type: any
|
|
463
|
+
*/
|
|
464
|
+
get localizeFormatFunction() {
|
|
465
|
+
return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
|
|
466
|
+
}
|
|
467
|
+
set localizeFormatFunction(value) {
|
|
468
|
+
if (this.nativeElement) {
|
|
469
|
+
this.nativeElement.localizeFormatFunction = value;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
/** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
|
|
473
|
+
* Property type: any
|
|
474
|
+
*/
|
|
475
|
+
get messages() {
|
|
476
|
+
return this.nativeElement ? this.nativeElement.messages : undefined;
|
|
477
|
+
}
|
|
478
|
+
set messages(value) {
|
|
479
|
+
if (this.nativeElement) {
|
|
480
|
+
this.nativeElement.messages = value;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
/** Sets or gets the widget's name.
|
|
484
|
+
* Property type: string
|
|
485
|
+
*/
|
|
486
|
+
get name() {
|
|
487
|
+
return this.nativeElement ? this.nativeElement.name : undefined;
|
|
488
|
+
}
|
|
489
|
+
set name(value) {
|
|
490
|
+
if (this.nativeElement) {
|
|
491
|
+
this.nativeElement.name = value;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
/** Sets or gets the Tabs scroll buttons behavior. Applicable only when tabLayout is 'scroll'.
|
|
495
|
+
* Property type: Overflow | string
|
|
496
|
+
*/
|
|
497
|
+
get overflow() {
|
|
498
|
+
return this.nativeElement ? this.nativeElement.overflow : undefined;
|
|
499
|
+
}
|
|
500
|
+
set overflow(value) {
|
|
501
|
+
if (this.nativeElement) {
|
|
502
|
+
this.nativeElement.overflow = value;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
/** Disables user interaction with the element.
|
|
506
|
+
* Property type: boolean
|
|
507
|
+
*/
|
|
508
|
+
get readonly() {
|
|
509
|
+
return this.nativeElement ? this.nativeElement.readonly : undefined;
|
|
510
|
+
}
|
|
511
|
+
set readonly(value) {
|
|
512
|
+
if (this.nativeElement) {
|
|
513
|
+
this.nativeElement.readonly = value;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
/** Enables or disables the reorder feature. When this feature is enabled, the end-user can drag a tab and drop it over another tab. As a result the tabs will be reordered.
|
|
517
|
+
* Property type: boolean
|
|
518
|
+
*/
|
|
519
|
+
get reorder() {
|
|
520
|
+
return this.nativeElement ? this.nativeElement.reorder : undefined;
|
|
521
|
+
}
|
|
522
|
+
set reorder(value) {
|
|
523
|
+
if (this.nativeElement) {
|
|
524
|
+
this.nativeElement.reorder = value;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
/** Sets or gets whether tab labels can be resized by dragging with the mouse.
|
|
528
|
+
* Property type: boolean
|
|
529
|
+
*/
|
|
530
|
+
get resize() {
|
|
531
|
+
return this.nativeElement ? this.nativeElement.resize : undefined;
|
|
532
|
+
}
|
|
533
|
+
set resize(value) {
|
|
534
|
+
if (this.nativeElement) {
|
|
535
|
+
this.nativeElement.resize = value;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
/** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
|
|
539
|
+
* Property type: boolean
|
|
540
|
+
*/
|
|
541
|
+
get rightToLeft() {
|
|
542
|
+
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
|
|
543
|
+
}
|
|
544
|
+
set rightToLeft(value) {
|
|
545
|
+
if (this.nativeElement) {
|
|
546
|
+
this.nativeElement.rightToLeft = value;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
/** Sets or gets the position of the scroll buttons.
|
|
550
|
+
* Property type: LayoutPosition | string
|
|
551
|
+
*/
|
|
552
|
+
get scrollButtonsPosition() {
|
|
553
|
+
return this.nativeElement ? this.nativeElement.scrollButtonsPosition : undefined;
|
|
554
|
+
}
|
|
555
|
+
set scrollButtonsPosition(value) {
|
|
556
|
+
if (this.nativeElement) {
|
|
557
|
+
this.nativeElement.scrollButtonsPosition = value;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
/** Sets or gets the behavior when scrolling the tab strip via the scroll buttons.
|
|
561
|
+
* Property type: TabsScrollMode | string
|
|
562
|
+
*/
|
|
563
|
+
get scrollMode() {
|
|
564
|
+
return this.nativeElement ? this.nativeElement.scrollMode : undefined;
|
|
565
|
+
}
|
|
566
|
+
set scrollMode(value) {
|
|
567
|
+
if (this.nativeElement) {
|
|
568
|
+
this.nativeElement.scrollMode = value;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
/** Sets or gets which tab is selected.
|
|
572
|
+
* Property type: number | null
|
|
573
|
+
*/
|
|
574
|
+
get selectedIndex() {
|
|
575
|
+
return this.nativeElement ? this.nativeElement.selectedIndex : undefined;
|
|
576
|
+
}
|
|
577
|
+
set selectedIndex(value) {
|
|
578
|
+
if (this.nativeElement) {
|
|
579
|
+
this.nativeElement.selectedIndex = value;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
/** Determines the way the user can switch between tabs.
|
|
583
|
+
* Property type: TabSelectionMode | string
|
|
584
|
+
*/
|
|
585
|
+
get selectionMode() {
|
|
586
|
+
return this.nativeElement ? this.nativeElement.selectionMode : undefined;
|
|
587
|
+
}
|
|
588
|
+
set selectionMode(value) {
|
|
589
|
+
if (this.nativeElement) {
|
|
590
|
+
this.nativeElement.selectionMode = value;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
/** Applies one of four behaviors when the element is not wide enough to display all tab labels.
|
|
594
|
+
* Property type: TabsTabLayout | string
|
|
595
|
+
*/
|
|
596
|
+
get tabLayout() {
|
|
597
|
+
return this.nativeElement ? this.nativeElement.tabLayout : undefined;
|
|
598
|
+
}
|
|
599
|
+
set tabLayout(value) {
|
|
600
|
+
if (this.nativeElement) {
|
|
601
|
+
this.nativeElement.tabLayout = value;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
/** Sets or gets where the tab strip is positioned.
|
|
605
|
+
* Property type: TabPosition | string
|
|
606
|
+
*/
|
|
607
|
+
get tabPosition() {
|
|
608
|
+
return this.nativeElement ? this.nativeElement.tabPosition : undefined;
|
|
609
|
+
}
|
|
610
|
+
set tabPosition(value) {
|
|
611
|
+
if (this.nativeElement) {
|
|
612
|
+
this.nativeElement.tabPosition = value;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
/** Sets or gets the orientation of the text in the tabs.
|
|
616
|
+
* Property type: Orientation | string
|
|
617
|
+
*/
|
|
618
|
+
get tabTextOrientation() {
|
|
619
|
+
return this.nativeElement ? this.nativeElement.tabTextOrientation : undefined;
|
|
620
|
+
}
|
|
621
|
+
set tabTextOrientation(value) {
|
|
622
|
+
if (this.nativeElement) {
|
|
623
|
+
this.nativeElement.tabTextOrientation = value;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
/** Determines the theme. Theme defines the look of the element
|
|
627
|
+
* Property type: string
|
|
628
|
+
*/
|
|
629
|
+
get theme() {
|
|
630
|
+
return this.nativeElement ? this.nativeElement.theme : undefined;
|
|
631
|
+
}
|
|
632
|
+
set theme(value) {
|
|
633
|
+
if (this.nativeElement) {
|
|
634
|
+
this.nativeElement.theme = value;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
/** If is set to true, the element cannot be focused.
|
|
638
|
+
* Property type: boolean
|
|
639
|
+
*/
|
|
640
|
+
get unfocusable() {
|
|
641
|
+
return this.nativeElement ? this.nativeElement.unfocusable : undefined;
|
|
642
|
+
}
|
|
643
|
+
set unfocusable(value) {
|
|
644
|
+
if (this.nativeElement) {
|
|
645
|
+
this.nativeElement.unfocusable = value;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
// Gets the properties of the React component.
|
|
649
|
+
get properties() {
|
|
650
|
+
return ["addNewTab", "allowToggle", "animation", "closeButtonMode", "closeButtons", "collapsed", "collapsible", "dataSource", "disabled", "enableMouseWheelAction", "locale", "localizeFormatFunction", "messages", "name", "overflow", "readonly", "reorder", "resize", "rightToLeft", "scrollButtonsPosition", "scrollMode", "selectedIndex", "selectionMode", "tabLayout", "tabPosition", "tabTextOrientation", "theme", "unfocusable"];
|
|
651
|
+
}
|
|
652
|
+
// Gets the events of the React component.
|
|
653
|
+
get eventListeners() {
|
|
654
|
+
return ["onAddNewTabClick", "onChange", "onClose", "onClosing", "onDragEnd", "onDragStart", "onReorder", "onCreate", "onReady"];
|
|
655
|
+
}
|
|
656
|
+
/** Collapses the content section.
|
|
657
|
+
*/
|
|
658
|
+
collapse() {
|
|
659
|
+
if (this.nativeElement.isRendered) {
|
|
660
|
+
this.nativeElement.collapse();
|
|
661
|
+
}
|
|
662
|
+
else {
|
|
663
|
+
this.nativeElement.whenRendered(() => {
|
|
664
|
+
this.nativeElement.collapse();
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
/** Returns the label of a Tab at given index.
|
|
669
|
+
* @param {number} index. The index of the tab.
|
|
670
|
+
* @returns {string}
|
|
671
|
+
*/
|
|
672
|
+
getTabLabel(index) {
|
|
673
|
+
const result = this.nativeElement.getTabLabel(index);
|
|
674
|
+
return result;
|
|
675
|
+
}
|
|
676
|
+
/** Returns the content of a Tab at given index.
|
|
677
|
+
* @param {number} index. The index of the tab.
|
|
678
|
+
* @returns {HTMLElement}
|
|
679
|
+
*/
|
|
680
|
+
getTabContent(index) {
|
|
681
|
+
const result = this.nativeElement.getTabContent(index);
|
|
682
|
+
return result;
|
|
683
|
+
}
|
|
684
|
+
/** Makes sure a tab is visible by scrolling to it.
|
|
685
|
+
* @param {number} index. The index of the tab to scroll to.
|
|
686
|
+
*/
|
|
687
|
+
ensureVisible(index) {
|
|
688
|
+
if (this.nativeElement.isRendered) {
|
|
689
|
+
this.nativeElement.ensureVisible(index);
|
|
690
|
+
}
|
|
691
|
+
else {
|
|
692
|
+
this.nativeElement.whenRendered(() => {
|
|
693
|
+
this.nativeElement.ensureVisible(index);
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
/** Expands the content section.
|
|
698
|
+
*/
|
|
699
|
+
expand() {
|
|
700
|
+
if (this.nativeElement.isRendered) {
|
|
701
|
+
this.nativeElement.expand();
|
|
702
|
+
}
|
|
703
|
+
else {
|
|
704
|
+
this.nativeElement.whenRendered(() => {
|
|
705
|
+
this.nativeElement.expand();
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
/** Returns an array of the TabItems inside the element.
|
|
710
|
+
* @returns {TabItem[]}
|
|
711
|
+
*/
|
|
712
|
+
getTabs() {
|
|
713
|
+
const result = this.nativeElement.getTabs();
|
|
714
|
+
return result;
|
|
715
|
+
}
|
|
716
|
+
/** Returns the offset of the tab item container (smart-tab-item element) from the edge of the Tabs (smart-tabs element) where the tab strip is positioned.
|
|
717
|
+
* @param {number} index. The index of the tab item.
|
|
718
|
+
* @returns {number}
|
|
719
|
+
*/
|
|
720
|
+
getOffsetFromEdgeOfElement(index) {
|
|
721
|
+
const result = this.nativeElement.getOffsetFromEdgeOfElement(index);
|
|
722
|
+
return result;
|
|
723
|
+
}
|
|
724
|
+
/** Inserts a new tab and an associated content section.
|
|
725
|
+
* @param {number} index. The index to insert a new tab at.
|
|
726
|
+
* @param {any} details. An Object with the fields "label", "labelSize", "content" and "group".
|
|
727
|
+
*/
|
|
728
|
+
insert(index, details) {
|
|
729
|
+
if (this.nativeElement.isRendered) {
|
|
730
|
+
this.nativeElement.insert(index, details);
|
|
731
|
+
}
|
|
732
|
+
else {
|
|
733
|
+
this.nativeElement.whenRendered(() => {
|
|
734
|
+
this.nativeElement.insert(index, details);
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
/** Refreshes the Tabs header section. Useful when the header contains elements (such as images) loaded slower than the Tabs itself.
|
|
739
|
+
*/
|
|
740
|
+
refreshTabHeader() {
|
|
741
|
+
if (this.nativeElement.isRendered) {
|
|
742
|
+
this.nativeElement.refreshTabHeader();
|
|
743
|
+
}
|
|
744
|
+
else {
|
|
745
|
+
this.nativeElement.whenRendered(() => {
|
|
746
|
+
this.nativeElement.refreshTabHeader();
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
/** Removes a tab and its associated content section.
|
|
751
|
+
* @param {number} index. The index of the tab to remove.
|
|
752
|
+
*/
|
|
753
|
+
removeAt(index) {
|
|
754
|
+
if (this.nativeElement.isRendered) {
|
|
755
|
+
this.nativeElement.removeAt(index);
|
|
756
|
+
}
|
|
757
|
+
else {
|
|
758
|
+
this.nativeElement.whenRendered(() => {
|
|
759
|
+
this.nativeElement.removeAt(index);
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
/** Selects a tab.
|
|
764
|
+
* @param {number} index. The index of the tab to select.
|
|
765
|
+
*/
|
|
766
|
+
select(index) {
|
|
767
|
+
if (this.nativeElement.isRendered) {
|
|
768
|
+
this.nativeElement.select(index);
|
|
769
|
+
}
|
|
770
|
+
else {
|
|
771
|
+
this.nativeElement.whenRendered(() => {
|
|
772
|
+
this.nativeElement.select(index);
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
/** Updates a tab and its associated content section.
|
|
777
|
+
* @param {number} index. The index of the tab to update.
|
|
778
|
+
* @param {string} label. The new label of the tab. The value can be the id of an HTMLTemplateElement
|
|
779
|
+
* @param {string | HTMLElement} content. The new content of the tab.
|
|
780
|
+
*/
|
|
781
|
+
update(index, label, content) {
|
|
782
|
+
if (this.nativeElement.isRendered) {
|
|
783
|
+
this.nativeElement.update(index, label, content);
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
this.nativeElement.whenRendered(() => {
|
|
787
|
+
this.nativeElement.update(index, label, content);
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
componentDidRender(initialize) {
|
|
792
|
+
const that = this;
|
|
793
|
+
const props = {};
|
|
794
|
+
const events = {};
|
|
795
|
+
let styles = null;
|
|
796
|
+
for (let prop in that.props) {
|
|
797
|
+
if (prop === 'children') {
|
|
798
|
+
continue;
|
|
799
|
+
}
|
|
800
|
+
if (prop === 'style') {
|
|
801
|
+
styles = that.props[prop];
|
|
802
|
+
continue;
|
|
803
|
+
}
|
|
804
|
+
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
805
|
+
events[prop] = that.props[prop];
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
props[prop] = that.props[prop];
|
|
809
|
+
}
|
|
810
|
+
if (initialize) {
|
|
811
|
+
that.nativeElement = this.componentRef.current;
|
|
812
|
+
}
|
|
813
|
+
for (let prop in props) {
|
|
814
|
+
if (prop === 'class' || prop === 'className') {
|
|
815
|
+
const classNames = props[prop].trim().split(' ');
|
|
816
|
+
for (let className in classNames) {
|
|
817
|
+
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
818
|
+
that.nativeElement.classList.add(classNames[className]);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
continue;
|
|
822
|
+
}
|
|
823
|
+
if (props[prop] !== that.nativeElement[prop]) {
|
|
824
|
+
const normalizeProp = (str) => {
|
|
825
|
+
return str.replace(/-([a-z])/g, function (g) {
|
|
826
|
+
return g[1].toUpperCase();
|
|
827
|
+
});
|
|
828
|
+
};
|
|
829
|
+
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
830
|
+
that.nativeElement.setAttribute(prop, '');
|
|
831
|
+
}
|
|
832
|
+
const normalizedProp = normalizeProp(prop);
|
|
833
|
+
that.nativeElement[normalizedProp] = props[prop];
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
for (let eventName in events) {
|
|
837
|
+
that[eventName] = events[eventName];
|
|
838
|
+
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
839
|
+
}
|
|
840
|
+
if (initialize) {
|
|
841
|
+
Smart$2.Render();
|
|
842
|
+
if (that.onCreate) {
|
|
843
|
+
that.onCreate();
|
|
844
|
+
}
|
|
845
|
+
that.nativeElement.whenRendered(() => {
|
|
846
|
+
if (that.onReady) {
|
|
847
|
+
that.onReady();
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
// setup styles.
|
|
852
|
+
if (styles) {
|
|
853
|
+
for (let styleName in styles) {
|
|
854
|
+
that.nativeElement.style[styleName] = styles[styleName];
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
componentDidMount() {
|
|
859
|
+
this.componentDidRender(true);
|
|
860
|
+
}
|
|
861
|
+
componentDidUpdate() {
|
|
862
|
+
this.componentDidRender(false);
|
|
863
|
+
}
|
|
864
|
+
componentWillUnmount() {
|
|
865
|
+
const that = this;
|
|
866
|
+
if (!that.nativeElement) {
|
|
867
|
+
return;
|
|
868
|
+
}
|
|
869
|
+
that.nativeElement.whenRenderedCallbacks = [];
|
|
870
|
+
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
871
|
+
const eventName = that.eventListeners[i];
|
|
872
|
+
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
render() {
|
|
876
|
+
return (React.createElement("smart-tabs", { ref: this.componentRef }, this.props.children));
|
|
877
|
+
}
|
|
878
|
+
}
|
|
348
879
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
constructor(props) {
|
|
355
|
-
super(props);
|
|
356
|
-
this.componentRef = React.createRef();
|
|
357
|
-
}
|
|
358
|
-
// Gets the id of the React component.
|
|
359
|
-
get id() {
|
|
360
|
-
if (!this._id) {
|
|
361
|
-
this._id = 'Tabs' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
362
|
-
}
|
|
363
|
-
return this._id;
|
|
364
|
-
}
|
|
365
|
-
/** Sets or gets whether the "Add new tab" button (+) is displayed.
|
|
366
|
-
* Property type: boolean
|
|
367
|
-
*/
|
|
368
|
-
get addNewTab() {
|
|
369
|
-
return this.nativeElement ? this.nativeElement.addNewTab : undefined;
|
|
370
|
-
}
|
|
371
|
-
set addNewTab(value) {
|
|
372
|
-
if (this.nativeElement) {
|
|
373
|
-
this.nativeElement.addNewTab = value;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
/** Allows toggle. If set to true, **selectedIndex** can be set to null (no selected tab).
|
|
377
|
-
* Property type: boolean
|
|
378
|
-
*/
|
|
379
|
-
get allowToggle() {
|
|
380
|
-
return this.nativeElement ? this.nativeElement.allowToggle : undefined;
|
|
381
|
-
}
|
|
382
|
-
set allowToggle(value) {
|
|
383
|
-
if (this.nativeElement) {
|
|
384
|
-
this.nativeElement.allowToggle = value;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
/** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
|
|
388
|
-
* Property type: Animation | string
|
|
389
|
-
*/
|
|
390
|
-
get animation() {
|
|
391
|
-
return this.nativeElement ? this.nativeElement.animation : undefined;
|
|
392
|
-
}
|
|
393
|
-
set animation(value) {
|
|
394
|
-
if (this.nativeElement) {
|
|
395
|
-
this.nativeElement.animation = value;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
/** Sets or gets the close button mode.
|
|
399
|
-
* Property type: TabsCloseButtonMode | string
|
|
400
|
-
*/
|
|
401
|
-
get closeButtonMode() {
|
|
402
|
-
return this.nativeElement ? this.nativeElement.closeButtonMode : undefined;
|
|
403
|
-
}
|
|
404
|
-
set closeButtonMode(value) {
|
|
405
|
-
if (this.nativeElement) {
|
|
406
|
-
this.nativeElement.closeButtonMode = value;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
/** Sets or gets whether close buttons are displayed.
|
|
410
|
-
* Property type: boolean
|
|
411
|
-
*/
|
|
412
|
-
get closeButtons() {
|
|
413
|
-
return this.nativeElement ? this.nativeElement.closeButtons : undefined;
|
|
414
|
-
}
|
|
415
|
-
set closeButtons(value) {
|
|
416
|
-
if (this.nativeElement) {
|
|
417
|
-
this.nativeElement.closeButtons = value;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
/** Sets or gets whether the Tabs content section is collapsed.
|
|
421
|
-
* Property type: boolean
|
|
422
|
-
*/
|
|
423
|
-
get collapsed() {
|
|
424
|
-
return this.nativeElement ? this.nativeElement.collapsed : undefined;
|
|
425
|
-
}
|
|
426
|
-
set collapsed(value) {
|
|
427
|
-
if (this.nativeElement) {
|
|
428
|
-
this.nativeElement.collapsed = value;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
/** Enables or disables the collapsible feature.
|
|
432
|
-
* Property type: boolean
|
|
433
|
-
*/
|
|
434
|
-
get collapsible() {
|
|
435
|
-
return this.nativeElement ? this.nativeElement.collapsible : undefined;
|
|
436
|
-
}
|
|
437
|
-
set collapsible(value) {
|
|
438
|
-
if (this.nativeElement) {
|
|
439
|
-
this.nativeElement.collapsible = value;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
/** Determines the data source that will be loaded to the Tabs.
|
|
443
|
-
* Property type: any
|
|
444
|
-
*/
|
|
445
|
-
get dataSource() {
|
|
446
|
-
return this.nativeElement ? this.nativeElement.dataSource : undefined;
|
|
447
|
-
}
|
|
448
|
-
set dataSource(value) {
|
|
449
|
-
if (this.nativeElement) {
|
|
450
|
-
this.nativeElement.dataSource = value;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
/** Enables or disables the element.
|
|
454
|
-
* Property type: boolean
|
|
455
|
-
*/
|
|
456
|
-
get disabled() {
|
|
457
|
-
return this.nativeElement ? this.nativeElement.disabled : undefined;
|
|
458
|
-
}
|
|
459
|
-
set disabled(value) {
|
|
460
|
-
if (this.nativeElement) {
|
|
461
|
-
this.nativeElement.disabled = value;
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
/** Enables or disables scrolling using the mouse wheel through overflowing tab labels in the tab strip.
|
|
465
|
-
* Property type: boolean
|
|
466
|
-
*/
|
|
467
|
-
get enableMouseWheelAction() {
|
|
468
|
-
return this.nativeElement ? this.nativeElement.enableMouseWheelAction : undefined;
|
|
469
|
-
}
|
|
470
|
-
set enableMouseWheelAction(value) {
|
|
471
|
-
if (this.nativeElement) {
|
|
472
|
-
this.nativeElement.enableMouseWheelAction = value;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
/** Sets or gets the locale. Used in conjunction with the property messages.
|
|
476
|
-
* Property type: string
|
|
477
|
-
*/
|
|
478
|
-
get locale() {
|
|
479
|
-
return this.nativeElement ? this.nativeElement.locale : undefined;
|
|
480
|
-
}
|
|
481
|
-
set locale(value) {
|
|
482
|
-
if (this.nativeElement) {
|
|
483
|
-
this.nativeElement.locale = value;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
/** Callback, related to localization module.
|
|
487
|
-
* Property type: any
|
|
488
|
-
*/
|
|
489
|
-
get localizeFormatFunction() {
|
|
490
|
-
return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
|
|
491
|
-
}
|
|
492
|
-
set localizeFormatFunction(value) {
|
|
493
|
-
if (this.nativeElement) {
|
|
494
|
-
this.nativeElement.localizeFormatFunction = value;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
/** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
|
|
498
|
-
* Property type: any
|
|
499
|
-
*/
|
|
500
|
-
get messages() {
|
|
501
|
-
return this.nativeElement ? this.nativeElement.messages : undefined;
|
|
502
|
-
}
|
|
503
|
-
set messages(value) {
|
|
504
|
-
if (this.nativeElement) {
|
|
505
|
-
this.nativeElement.messages = value;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
/** Sets or gets the widget's name.
|
|
509
|
-
* Property type: string
|
|
510
|
-
*/
|
|
511
|
-
get name() {
|
|
512
|
-
return this.nativeElement ? this.nativeElement.name : undefined;
|
|
513
|
-
}
|
|
514
|
-
set name(value) {
|
|
515
|
-
if (this.nativeElement) {
|
|
516
|
-
this.nativeElement.name = value;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
/** Sets or gets the Tabs scroll buttons behavior. Applicable only when tabLayout is 'scroll'.
|
|
520
|
-
* Property type: Overflow | string
|
|
521
|
-
*/
|
|
522
|
-
get overflow() {
|
|
523
|
-
return this.nativeElement ? this.nativeElement.overflow : undefined;
|
|
524
|
-
}
|
|
525
|
-
set overflow(value) {
|
|
526
|
-
if (this.nativeElement) {
|
|
527
|
-
this.nativeElement.overflow = value;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
/** Disables user interaction with the element.
|
|
531
|
-
* Property type: boolean
|
|
532
|
-
*/
|
|
533
|
-
get readonly() {
|
|
534
|
-
return this.nativeElement ? this.nativeElement.readonly : undefined;
|
|
535
|
-
}
|
|
536
|
-
set readonly(value) {
|
|
537
|
-
if (this.nativeElement) {
|
|
538
|
-
this.nativeElement.readonly = value;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
/** Enables or disables the reorder feature. When this feature is enabled, the end-user can drag a tab and drop it over another tab. As a result the tabs will be reordered.
|
|
542
|
-
* Property type: boolean
|
|
543
|
-
*/
|
|
544
|
-
get reorder() {
|
|
545
|
-
return this.nativeElement ? this.nativeElement.reorder : undefined;
|
|
546
|
-
}
|
|
547
|
-
set reorder(value) {
|
|
548
|
-
if (this.nativeElement) {
|
|
549
|
-
this.nativeElement.reorder = value;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
/** Sets or gets whether tab labels can be resized by dragging with the mouse.
|
|
553
|
-
* Property type: boolean
|
|
554
|
-
*/
|
|
555
|
-
get resize() {
|
|
556
|
-
return this.nativeElement ? this.nativeElement.resize : undefined;
|
|
557
|
-
}
|
|
558
|
-
set resize(value) {
|
|
559
|
-
if (this.nativeElement) {
|
|
560
|
-
this.nativeElement.resize = value;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
/** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
|
|
564
|
-
* Property type: boolean
|
|
565
|
-
*/
|
|
566
|
-
get rightToLeft() {
|
|
567
|
-
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
|
|
568
|
-
}
|
|
569
|
-
set rightToLeft(value) {
|
|
570
|
-
if (this.nativeElement) {
|
|
571
|
-
this.nativeElement.rightToLeft = value;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
/** Sets or gets the position of the scroll buttons.
|
|
575
|
-
* Property type: LayoutPosition | string
|
|
576
|
-
*/
|
|
577
|
-
get scrollButtonsPosition() {
|
|
578
|
-
return this.nativeElement ? this.nativeElement.scrollButtonsPosition : undefined;
|
|
579
|
-
}
|
|
580
|
-
set scrollButtonsPosition(value) {
|
|
581
|
-
if (this.nativeElement) {
|
|
582
|
-
this.nativeElement.scrollButtonsPosition = value;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
/** Sets or gets the behavior when scrolling the tab strip via the scroll buttons.
|
|
586
|
-
* Property type: TabsScrollMode | string
|
|
587
|
-
*/
|
|
588
|
-
get scrollMode() {
|
|
589
|
-
return this.nativeElement ? this.nativeElement.scrollMode : undefined;
|
|
590
|
-
}
|
|
591
|
-
set scrollMode(value) {
|
|
592
|
-
if (this.nativeElement) {
|
|
593
|
-
this.nativeElement.scrollMode = value;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
/** Sets or gets which tab is selected.
|
|
597
|
-
* Property type: number | null
|
|
598
|
-
*/
|
|
599
|
-
get selectedIndex() {
|
|
600
|
-
return this.nativeElement ? this.nativeElement.selectedIndex : undefined;
|
|
601
|
-
}
|
|
602
|
-
set selectedIndex(value) {
|
|
603
|
-
if (this.nativeElement) {
|
|
604
|
-
this.nativeElement.selectedIndex = value;
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
/** Determines the way the user can switch between tabs.
|
|
608
|
-
* Property type: TabSelectionMode | string
|
|
609
|
-
*/
|
|
610
|
-
get selectionMode() {
|
|
611
|
-
return this.nativeElement ? this.nativeElement.selectionMode : undefined;
|
|
612
|
-
}
|
|
613
|
-
set selectionMode(value) {
|
|
614
|
-
if (this.nativeElement) {
|
|
615
|
-
this.nativeElement.selectionMode = value;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
/** Applies one of four behaviors when the element is not wide enough to display all tab labels.
|
|
619
|
-
* Property type: TabsTabLayout | string
|
|
620
|
-
*/
|
|
621
|
-
get tabLayout() {
|
|
622
|
-
return this.nativeElement ? this.nativeElement.tabLayout : undefined;
|
|
623
|
-
}
|
|
624
|
-
set tabLayout(value) {
|
|
625
|
-
if (this.nativeElement) {
|
|
626
|
-
this.nativeElement.tabLayout = value;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
/** Sets or gets where the tab strip is positioned.
|
|
630
|
-
* Property type: TabPosition | string
|
|
631
|
-
*/
|
|
632
|
-
get tabPosition() {
|
|
633
|
-
return this.nativeElement ? this.nativeElement.tabPosition : undefined;
|
|
634
|
-
}
|
|
635
|
-
set tabPosition(value) {
|
|
636
|
-
if (this.nativeElement) {
|
|
637
|
-
this.nativeElement.tabPosition = value;
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
/** Sets or gets the orientation of the text in the tabs.
|
|
641
|
-
* Property type: Orientation | string
|
|
642
|
-
*/
|
|
643
|
-
get tabTextOrientation() {
|
|
644
|
-
return this.nativeElement ? this.nativeElement.tabTextOrientation : undefined;
|
|
645
|
-
}
|
|
646
|
-
set tabTextOrientation(value) {
|
|
647
|
-
if (this.nativeElement) {
|
|
648
|
-
this.nativeElement.tabTextOrientation = value;
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
/** Determines the theme. Theme defines the look of the element
|
|
652
|
-
* Property type: string
|
|
653
|
-
*/
|
|
654
|
-
get theme() {
|
|
655
|
-
return this.nativeElement ? this.nativeElement.theme : undefined;
|
|
656
|
-
}
|
|
657
|
-
set theme(value) {
|
|
658
|
-
if (this.nativeElement) {
|
|
659
|
-
this.nativeElement.theme = value;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
/** If is set to true, the element cannot be focused.
|
|
663
|
-
* Property type: boolean
|
|
664
|
-
*/
|
|
665
|
-
get unfocusable() {
|
|
666
|
-
return this.nativeElement ? this.nativeElement.unfocusable : undefined;
|
|
667
|
-
}
|
|
668
|
-
set unfocusable(value) {
|
|
669
|
-
if (this.nativeElement) {
|
|
670
|
-
this.nativeElement.unfocusable = value;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
// Gets the properties of the React component.
|
|
674
|
-
get properties() {
|
|
675
|
-
return ["addNewTab", "allowToggle", "animation", "closeButtonMode", "closeButtons", "collapsed", "collapsible", "dataSource", "disabled", "enableMouseWheelAction", "locale", "localizeFormatFunction", "messages", "name", "overflow", "readonly", "reorder", "resize", "rightToLeft", "scrollButtonsPosition", "scrollMode", "selectedIndex", "selectionMode", "tabLayout", "tabPosition", "tabTextOrientation", "theme", "unfocusable"];
|
|
676
|
-
}
|
|
677
|
-
// Gets the events of the React component.
|
|
678
|
-
get eventListeners() {
|
|
679
|
-
return ["onAddNewTabClick", "onChange", "onClose", "onClosing", "onDragEnd", "onDragStart", "onReorder", "onCreate", "onReady"];
|
|
680
|
-
}
|
|
681
|
-
/** Collapses the content section.
|
|
682
|
-
*/
|
|
683
|
-
collapse() {
|
|
684
|
-
if (this.nativeElement.isRendered) {
|
|
685
|
-
this.nativeElement.collapse();
|
|
686
|
-
}
|
|
687
|
-
else {
|
|
688
|
-
this.nativeElement.whenRendered(() => {
|
|
689
|
-
this.nativeElement.collapse();
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
/** Returns the label of a Tab at given index.
|
|
694
|
-
* @param {number} index. The index of the tab.
|
|
695
|
-
* @returns {string}
|
|
696
|
-
*/
|
|
697
|
-
getTabLabel(index) {
|
|
698
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
699
|
-
const getResultOnRender = () => {
|
|
700
|
-
return new Promise(resolve => {
|
|
701
|
-
this.nativeElement.whenRendered(() => {
|
|
702
|
-
const result = this.nativeElement.getTabLabel(index);
|
|
703
|
-
resolve(result);
|
|
704
|
-
});
|
|
705
|
-
});
|
|
706
|
-
};
|
|
707
|
-
const result = yield getResultOnRender();
|
|
708
|
-
return result;
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
/** Returns the content of a Tab at given index.
|
|
712
|
-
* @param {number} index. The index of the tab.
|
|
713
|
-
* @returns {HTMLElement}
|
|
714
|
-
*/
|
|
715
|
-
getTabContent(index) {
|
|
716
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
717
|
-
const getResultOnRender = () => {
|
|
718
|
-
return new Promise(resolve => {
|
|
719
|
-
this.nativeElement.whenRendered(() => {
|
|
720
|
-
const result = this.nativeElement.getTabContent(index);
|
|
721
|
-
resolve(result);
|
|
722
|
-
});
|
|
723
|
-
});
|
|
724
|
-
};
|
|
725
|
-
const result = yield getResultOnRender();
|
|
726
|
-
return result;
|
|
727
|
-
});
|
|
728
|
-
}
|
|
729
|
-
/** Makes sure a tab is visible by scrolling to it.
|
|
730
|
-
* @param {number} index. The index of the tab to scroll to.
|
|
731
|
-
*/
|
|
732
|
-
ensureVisible(index) {
|
|
733
|
-
if (this.nativeElement.isRendered) {
|
|
734
|
-
this.nativeElement.ensureVisible(index);
|
|
735
|
-
}
|
|
736
|
-
else {
|
|
737
|
-
this.nativeElement.whenRendered(() => {
|
|
738
|
-
this.nativeElement.ensureVisible(index);
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
/** Expands the content section.
|
|
743
|
-
*/
|
|
744
|
-
expand() {
|
|
745
|
-
if (this.nativeElement.isRendered) {
|
|
746
|
-
this.nativeElement.expand();
|
|
747
|
-
}
|
|
748
|
-
else {
|
|
749
|
-
this.nativeElement.whenRendered(() => {
|
|
750
|
-
this.nativeElement.expand();
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
/** Returns an array of the TabItems inside the element.
|
|
755
|
-
* @returns {TabItem[]}
|
|
756
|
-
*/
|
|
757
|
-
getTabs() {
|
|
758
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
759
|
-
const getResultOnRender = () => {
|
|
760
|
-
return new Promise(resolve => {
|
|
761
|
-
this.nativeElement.whenRendered(() => {
|
|
762
|
-
const result = this.nativeElement.getTabs();
|
|
763
|
-
resolve(result);
|
|
764
|
-
});
|
|
765
|
-
});
|
|
766
|
-
};
|
|
767
|
-
const result = yield getResultOnRender();
|
|
768
|
-
return result;
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
/** Returns the offset of the tab item container (smart-tab-item element) from the edge of the Tabs (smart-tabs element) where the tab strip is positioned.
|
|
772
|
-
* @param {number} index. The index of the tab item.
|
|
773
|
-
* @returns {number}
|
|
774
|
-
*/
|
|
775
|
-
getOffsetFromEdgeOfElement(index) {
|
|
776
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
777
|
-
const getResultOnRender = () => {
|
|
778
|
-
return new Promise(resolve => {
|
|
779
|
-
this.nativeElement.whenRendered(() => {
|
|
780
|
-
const result = this.nativeElement.getOffsetFromEdgeOfElement(index);
|
|
781
|
-
resolve(result);
|
|
782
|
-
});
|
|
783
|
-
});
|
|
784
|
-
};
|
|
785
|
-
const result = yield getResultOnRender();
|
|
786
|
-
return result;
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
/** Inserts a new tab and an associated content section.
|
|
790
|
-
* @param {number} index. The index to insert a new tab at.
|
|
791
|
-
* @param {any} details. An Object with the fields "label", "labelSize", "content" and "group".
|
|
792
|
-
*/
|
|
793
|
-
insert(index, details) {
|
|
794
|
-
if (this.nativeElement.isRendered) {
|
|
795
|
-
this.nativeElement.insert(index, details);
|
|
796
|
-
}
|
|
797
|
-
else {
|
|
798
|
-
this.nativeElement.whenRendered(() => {
|
|
799
|
-
this.nativeElement.insert(index, details);
|
|
800
|
-
});
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
/** Refreshes the Tabs header section. Useful when the header contains elements (such as images) loaded slower than the Tabs itself.
|
|
804
|
-
*/
|
|
805
|
-
refreshTabHeader() {
|
|
806
|
-
if (this.nativeElement.isRendered) {
|
|
807
|
-
this.nativeElement.refreshTabHeader();
|
|
808
|
-
}
|
|
809
|
-
else {
|
|
810
|
-
this.nativeElement.whenRendered(() => {
|
|
811
|
-
this.nativeElement.refreshTabHeader();
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
/** Removes a tab and its associated content section.
|
|
816
|
-
* @param {number} index. The index of the tab to remove.
|
|
817
|
-
*/
|
|
818
|
-
removeAt(index) {
|
|
819
|
-
if (this.nativeElement.isRendered) {
|
|
820
|
-
this.nativeElement.removeAt(index);
|
|
821
|
-
}
|
|
822
|
-
else {
|
|
823
|
-
this.nativeElement.whenRendered(() => {
|
|
824
|
-
this.nativeElement.removeAt(index);
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
/** Selects a tab.
|
|
829
|
-
* @param {number} index. The index of the tab to select.
|
|
830
|
-
*/
|
|
831
|
-
select(index) {
|
|
832
|
-
if (this.nativeElement.isRendered) {
|
|
833
|
-
this.nativeElement.select(index);
|
|
834
|
-
}
|
|
835
|
-
else {
|
|
836
|
-
this.nativeElement.whenRendered(() => {
|
|
837
|
-
this.nativeElement.select(index);
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
/** Updates a tab and its associated content section.
|
|
842
|
-
* @param {number} index. The index of the tab to update.
|
|
843
|
-
* @param {string} label. The new label of the tab. The value can be the id of an HTMLTemplateElement
|
|
844
|
-
* @param {string | HTMLElement} content. The new content of the tab.
|
|
845
|
-
*/
|
|
846
|
-
update(index, label, content) {
|
|
847
|
-
if (this.nativeElement.isRendered) {
|
|
848
|
-
this.nativeElement.update(index, label, content);
|
|
849
|
-
}
|
|
850
|
-
else {
|
|
851
|
-
this.nativeElement.whenRendered(() => {
|
|
852
|
-
this.nativeElement.update(index, label, content);
|
|
853
|
-
});
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
componentDidRender(initialize) {
|
|
857
|
-
const that = this;
|
|
858
|
-
const props = {};
|
|
859
|
-
const events = {};
|
|
860
|
-
let styles = null;
|
|
861
|
-
for (let prop in that.props) {
|
|
862
|
-
if (prop === 'children') {
|
|
863
|
-
continue;
|
|
864
|
-
}
|
|
865
|
-
if (prop === 'style') {
|
|
866
|
-
styles = that.props[prop];
|
|
867
|
-
continue;
|
|
868
|
-
}
|
|
869
|
-
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
870
|
-
events[prop] = that.props[prop];
|
|
871
|
-
continue;
|
|
872
|
-
}
|
|
873
|
-
props[prop] = that.props[prop];
|
|
874
|
-
}
|
|
875
|
-
if (initialize) {
|
|
876
|
-
that.nativeElement = this.componentRef.current;
|
|
877
|
-
}
|
|
878
|
-
for (let prop in props) {
|
|
879
|
-
if (prop === 'class' || prop === 'className') {
|
|
880
|
-
const classNames = props[prop].trim().split(' ');
|
|
881
|
-
for (let className in classNames) {
|
|
882
|
-
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
883
|
-
that.nativeElement.classList.add(classNames[className]);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
continue;
|
|
887
|
-
}
|
|
888
|
-
if (props[prop] !== that.nativeElement[prop]) {
|
|
889
|
-
const normalizeProp = (str) => {
|
|
890
|
-
return str.replace(/-([a-z])/g, function (g) {
|
|
891
|
-
return g[1].toUpperCase();
|
|
892
|
-
});
|
|
893
|
-
};
|
|
894
|
-
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
895
|
-
that.nativeElement.setAttribute(prop, '');
|
|
896
|
-
}
|
|
897
|
-
const normalizedProp = normalizeProp(prop);
|
|
898
|
-
that.nativeElement[normalizedProp] = props[prop];
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
for (let eventName in events) {
|
|
902
|
-
that[eventName] = events[eventName];
|
|
903
|
-
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
904
|
-
}
|
|
905
|
-
if (initialize) {
|
|
906
|
-
Smart$2.Render();
|
|
907
|
-
if (that.onCreate) {
|
|
908
|
-
that.onCreate();
|
|
909
|
-
}
|
|
910
|
-
that.nativeElement.whenRendered(() => {
|
|
911
|
-
if (that.onReady) {
|
|
912
|
-
that.onReady();
|
|
913
|
-
}
|
|
914
|
-
});
|
|
915
|
-
}
|
|
916
|
-
// setup styles.
|
|
917
|
-
if (styles) {
|
|
918
|
-
for (let styleName in styles) {
|
|
919
|
-
that.nativeElement.style[styleName] = styles[styleName];
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
componentDidMount() {
|
|
924
|
-
this.componentDidRender(true);
|
|
925
|
-
}
|
|
926
|
-
componentDidUpdate() {
|
|
927
|
-
this.componentDidRender(false);
|
|
928
|
-
}
|
|
929
|
-
componentWillUnmount() {
|
|
930
|
-
const that = this;
|
|
931
|
-
if (!that.nativeElement) {
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
that.nativeElement.whenRenderedCallbacks = [];
|
|
935
|
-
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
936
|
-
const eventName = that.eventListeners[i];
|
|
937
|
-
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
render() {
|
|
941
|
-
return (React.createElement("smart-tabs", { ref: this.componentRef }, this.props.children));
|
|
942
|
-
}
|
|
943
|
-
}
|
|
880
|
+
exports.Smart = Smart$2;
|
|
881
|
+
exports.Tabs = Tabs;
|
|
882
|
+
exports.default = Tabs;
|
|
883
|
+
exports.TabItem = TabItem;
|
|
884
|
+
exports.TabItemsGroup = TabItemsGroup;
|
|
944
885
|
|
|
945
|
-
|
|
946
|
-
exports.Tabs = Tabs;
|
|
947
|
-
exports.default = Tabs;
|
|
948
|
-
exports.TabItem = TabItem;
|
|
949
|
-
exports.TabItemsGroup = TabItemsGroup;
|
|
950
|
-
|
|
951
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
886
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
952
887
|
|
|
953
888
|
})));
|