smart-webcomponents-react 18.0.2 → 18.0.11
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/accordion/accordion.d.ts +2 -0
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.umd.js +2 -3
- package/accordion/accordionitem.d.ts +2 -0
- package/alertwindow/alertwindow.d.ts +2 -0
- package/alertwindow/alertwindow.esm.js +1 -1
- package/alertwindow/alertwindow.umd.js +2 -3
- package/array/array.d.ts +2 -0
- package/array/array.esm.js +1 -1
- package/array/array.umd.js +2 -3
- package/barcode/barcode.d.ts +2 -0
- package/barcode/barcode.esm.js +1 -1
- package/barcode/barcode.umd.js +2 -3
- package/breadcrumb/breadcrumb.d.ts +2 -0
- package/breadcrumb/breadcrumb.esm.js +1 -1
- package/breadcrumb/breadcrumb.umd.js +2 -3
- package/button/button.d.ts +2 -0
- package/button/button.esm.js +1 -1
- package/button/button.umd.js +2 -3
- package/button/buttongroup.d.ts +2 -0
- package/button/dropdownbutton.d.ts +2 -0
- package/button/multisplitbutton.d.ts +2 -0
- package/button/powerbutton.d.ts +2 -0
- package/button/radiobutton.d.ts +2 -0
- package/button/repeatbutton.d.ts +2 -0
- package/button/switchbutton.d.ts +2 -0
- package/button/togglebutton.d.ts +2 -0
- package/buttongroup/buttongroup.d.ts +2 -0
- package/buttongroup/buttongroup.esm.js +1 -1
- package/buttongroup/buttongroup.umd.js +2 -3
- package/calendar/calendar.d.ts +7 -0
- package/calendar/calendar.esm.js +13 -2
- package/calendar/calendar.umd.js +14 -4
- package/card/card.d.ts +2 -0
- package/card/card.esm.js +1 -1
- package/card/card.umd.js +2 -3
- package/card/cardview.d.ts +2 -0
- package/cardview/cardview.d.ts +2 -0
- package/cardview/cardview.esm.js +1 -1
- package/cardview/cardview.umd.js +2 -3
- package/carousel/carousel.d.ts +2 -0
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.umd.js +2 -3
- package/chart/chart.d.ts +2 -0
- package/chart/chart.esm.js +1 -1
- package/chart/chart.umd.js +2 -3
- package/chart/ganttchart.d.ts +2 -0
- package/chart/threedchart.d.ts +2 -0
- package/checkbox/checkbox.d.ts +2 -0
- package/checkbox/checkbox.esm.js +1 -1
- package/checkbox/checkbox.umd.js +2 -3
- package/checkinput/checkinput.d.ts +2 -0
- package/checkinput/checkinput.esm.js +1 -1
- package/checkinput/checkinput.umd.js +2 -3
- package/chip/chip.d.ts +2 -0
- package/chip/chip.esm.js +1 -1
- package/chip/chip.umd.js +2 -3
- package/colorinput/colorinput.d.ts +2 -0
- package/colorinput/colorinput.esm.js +1 -1
- package/colorinput/colorinput.umd.js +2 -3
- package/colorpanel/colorpanel.d.ts +2 -0
- package/colorpanel/colorpanel.esm.js +1 -1
- package/colorpanel/colorpanel.umd.js +2 -3
- package/colorpicker/colorpicker.d.ts +2 -0
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.umd.js +2 -3
- package/columnpanel/columnpanel.d.ts +2 -0
- package/columnpanel/columnpanel.esm.js +1 -1
- package/columnpanel/columnpanel.umd.js +2 -3
- package/combobox/combobox.d.ts +2 -0
- package/combobox/combobox.esm.js +1 -1
- package/combobox/combobox.umd.js +2 -3
- package/countryinput/countryinput.d.ts +2 -0
- package/countryinput/countryinput.esm.js +1 -1
- package/countryinput/countryinput.umd.js +2 -3
- package/customizationdialog/customizationdialog.d.ts +2 -0
- package/customizationdialog/customizationdialog.esm.js +1 -1
- package/customizationdialog/customizationdialog.umd.js +2 -3
- package/dateinput/dateinput.d.ts +2 -0
- package/dateinput/dateinput.esm.js +1 -1
- package/dateinput/dateinput.umd.js +2 -3
- package/daterangeinput/daterangeinput.d.ts +2 -0
- package/daterangeinput/daterangeinput.esm.js +1 -1
- package/daterangeinput/daterangeinput.umd.js +2 -3
- package/datetimepicker/datetimepicker.d.ts +2 -0
- package/datetimepicker/datetimepicker.esm.js +1 -1
- package/datetimepicker/datetimepicker.umd.js +2 -3
- package/dialogwindow/dialogwindow.d.ts +2 -0
- package/dialogwindow/dialogwindow.esm.js +1 -1
- package/dialogwindow/dialogwindow.umd.js +2 -3
- package/dockinglayout/dockinglayout.d.ts +2 -0
- package/dockinglayout/dockinglayout.esm.js +1 -1
- package/dockinglayout/dockinglayout.umd.js +2 -3
- package/dropdownbutton/dropdownbutton.d.ts +2 -0
- package/dropdownbutton/dropdownbutton.esm.js +1 -1
- package/dropdownbutton/dropdownbutton.umd.js +2 -3
- package/dropdownlist/dropdownlist.d.ts +2 -0
- package/dropdownlist/dropdownlist.esm.js +1 -1
- package/dropdownlist/dropdownlist.umd.js +2 -3
- package/editor/editor.d.ts +2 -0
- package/editor/editor.esm.js +1 -1
- package/editor/editor.umd.js +2 -3
- package/element/element.d.ts +2 -0
- package/element/element.esm.js +1 -1
- package/element/element.umd.js +2 -3
- package/fileupload/fileupload.d.ts +2 -0
- package/fileupload/fileupload.esm.js +1 -1
- package/fileupload/fileupload.umd.js +2 -3
- package/filterbuilder/filterbuilder.d.ts +2 -0
- package/filterbuilder/filterbuilder.esm.js +1 -1
- package/filterbuilder/filterbuilder.umd.js +2 -3
- package/filterpanel/filterpanel.d.ts +2 -0
- package/filterpanel/filterpanel.esm.js +1 -1
- package/filterpanel/filterpanel.umd.js +2 -3
- package/filterpanel/multicolumnfilterpanel.d.ts +2 -0
- package/form/form.d.ts +2 -0
- package/form/form.esm.js +1 -1
- package/form/form.umd.js +2 -3
- package/form/formcontrol.d.ts +2 -0
- package/form/formgroup.d.ts +2 -0
- package/ganttchart/ganttchart.d.ts +2 -0
- package/ganttchart/ganttchart.esm.js +1 -1
- package/ganttchart/ganttchart.umd.js +2 -3
- package/gauge/gauge.d.ts +2 -0
- package/gauge/gauge.esm.js +1 -1
- package/gauge/gauge.umd.js +2 -3
- package/grid/grid.d.ts +23 -12
- package/grid/grid.esm.js +25 -14
- package/grid/grid.umd.js +26 -16
- package/grouppanel/grouppanel.d.ts +2 -0
- package/grouppanel/grouppanel.esm.js +1 -1
- package/grouppanel/grouppanel.umd.js +2 -3
- package/index.d.ts +54 -3
- package/input/checkinput.d.ts +2 -0
- package/input/colorinput.d.ts +2 -0
- package/input/countryinput.d.ts +2 -0
- package/input/dateinput.d.ts +2 -0
- package/input/daterangeinput.d.ts +2 -0
- package/input/input.d.ts +2 -0
- package/input/input.esm.js +1 -1
- package/input/input.umd.js +2 -3
- package/input/multicomboinput.d.ts +2 -0
- package/input/multiinput.d.ts +2 -0
- package/input/numberinput.d.ts +2 -0
- package/input/passwordinput.d.ts +2 -0
- package/input/phoneinput.d.ts +2 -0
- package/input/timeinput.d.ts +2 -0
- package/kanban/kanban.d.ts +2 -0
- package/kanban/kanban.esm.js +1 -1
- package/kanban/kanban.umd.js +2 -3
- package/layout/dockinglayout.d.ts +2 -0
- package/layout/layout.d.ts +2 -0
- package/layout/layout.esm.js +1 -1
- package/layout/layout.umd.js +2 -3
- package/layout/layoutgroup.d.ts +2 -0
- package/layout/layoutitem.d.ts +2 -0
- package/layout/tablayoutgroup.d.ts +2 -0
- package/layout/tablayoutitem.d.ts +2 -0
- package/led/led.d.ts +2 -0
- package/led/led.esm.js +1 -1
- package/led/led.umd.js +2 -3
- package/listbox/listbox.d.ts +2 -0
- package/listbox/listbox.esm.js +1 -1
- package/listbox/listbox.umd.js +2 -3
- package/listmenu/listmenu.d.ts +2 -0
- package/listmenu/listmenu.esm.js +1 -1
- package/listmenu/listmenu.umd.js +2 -3
- package/map/map.d.ts +2 -0
- package/map/map.esm.js +1 -1
- package/map/map.umd.js +2 -3
- package/maskedtextbox/maskedtextbox.d.ts +2 -0
- package/maskedtextbox/maskedtextbox.esm.js +1 -1
- package/maskedtextbox/maskedtextbox.umd.js +2 -3
- package/menu/listmenu.d.ts +2 -0
- package/menu/menu.d.ts +2 -0
- package/menu/menu.esm.js +1 -1
- package/menu/menu.umd.js +2 -3
- package/menu/menuitem.d.ts +2 -0
- package/menu/menuitemsgroup.d.ts +2 -0
- package/multicolumnfilterpanel/multicolumnfilterpanel.d.ts +2 -0
- package/multicolumnfilterpanel/multicolumnfilterpanel.esm.js +1 -1
- package/multicolumnfilterpanel/multicolumnfilterpanel.umd.js +2 -3
- package/multicomboinput/multicomboinput.d.ts +2 -0
- package/multicomboinput/multicomboinput.esm.js +1 -1
- package/multicomboinput/multicomboinput.umd.js +2 -3
- package/multiinput/multiinput.d.ts +2 -0
- package/multiinput/multiinput.esm.js +1 -1
- package/multiinput/multiinput.umd.js +2 -3
- package/multilinetextbox/multilinetextbox.d.ts +2 -0
- package/multilinetextbox/multilinetextbox.esm.js +1 -1
- package/multilinetextbox/multilinetextbox.umd.js +2 -3
- package/multilinewindow/multilinewindow.d.ts +2 -0
- package/multilinewindow/multilinewindow.esm.js +1 -1
- package/multilinewindow/multilinewindow.umd.js +2 -3
- package/multisplitbutton/multisplitbutton.d.ts +2 -0
- package/multisplitbutton/multisplitbutton.esm.js +1 -1
- package/multisplitbutton/multisplitbutton.umd.js +2 -3
- package/numberinput/numberinput.d.ts +2 -0
- package/numberinput/numberinput.esm.js +1 -1
- package/numberinput/numberinput.umd.js +2 -3
- package/numerictextbox/numerictextbox.d.ts +2 -0
- package/numerictextbox/numerictextbox.esm.js +1 -1
- package/numerictextbox/numerictextbox.umd.js +2 -3
- package/package.json +1 -1
- package/pager/pager.d.ts +2 -0
- package/pager/pager.esm.js +1 -1
- package/pager/pager.umd.js +2 -3
- package/passwordinput/passwordinput.d.ts +2 -0
- package/passwordinput/passwordinput.esm.js +1 -1
- package/passwordinput/passwordinput.umd.js +2 -3
- package/passwordtextbox/passwordtextbox.d.ts +2 -0
- package/passwordtextbox/passwordtextbox.esm.js +1 -1
- package/passwordtextbox/passwordtextbox.umd.js +2 -3
- package/path/path.d.ts +2 -0
- package/path/path.esm.js +1 -1
- package/path/path.umd.js +2 -3
- package/phoneinput/phoneinput.d.ts +2 -0
- package/phoneinput/phoneinput.esm.js +1 -1
- package/phoneinput/phoneinput.umd.js +2 -3
- package/pivottable/pivottable.d.ts +2 -0
- package/pivottable/pivottable.esm.js +1 -1
- package/pivottable/pivottable.umd.js +2 -3
- package/progressbar/circularprogressbar.d.ts +2 -0
- package/progressbar/progressbar.d.ts +2 -0
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.umd.js +2 -3
- package/progresswindow/progresswindow.d.ts +2 -0
- package/progresswindow/progresswindow.esm.js +1 -1
- package/progresswindow/progresswindow.umd.js +2 -3
- package/promptwindow/promptwindow.d.ts +2 -0
- package/promptwindow/promptwindow.esm.js +1 -1
- package/promptwindow/promptwindow.umd.js +2 -3
- package/qrcode/qrcode.d.ts +2 -0
- package/qrcode/qrcode.esm.js +1 -1
- package/qrcode/qrcode.umd.js +2 -3
- package/querybuilder/querybuilder.d.ts +2 -0
- package/querybuilder/querybuilder.esm.js +1 -1
- package/querybuilder/querybuilder.umd.js +2 -3
- package/radiobutton/radiobutton.d.ts +2 -0
- package/radiobutton/radiobutton.esm.js +1 -1
- package/radiobutton/radiobutton.umd.js +2 -3
- package/rating/rating.d.ts +2 -0
- package/rating/rating.esm.js +1 -1
- package/rating/rating.umd.js +2 -3
- package/ribbon/ribbon.d.ts +2 -0
- package/ribbon/ribbon.esm.js +1 -1
- package/ribbon/ribbon.umd.js +2 -3
- package/ribbon/ribbongroup.d.ts +2 -0
- package/ribbon/ribbonitem.d.ts +2 -0
- package/ribbon/ribbontab.d.ts +2 -0
- package/scheduler/scheduler.d.ts +2 -0
- package/scheduler/scheduler.esm.js +1 -1
- package/scheduler/scheduler.umd.js +2 -3
- package/scrollbar/scrollbar.d.ts +2 -0
- package/scrollbar/scrollbar.esm.js +1 -1
- package/scrollbar/scrollbar.umd.js +2 -3
- package/slider/slider.d.ts +2 -0
- package/slider/slider.esm.js +1 -1
- package/slider/slider.umd.js +2 -3
- package/sortable/sortable.d.ts +2 -0
- package/sortable/sortable.esm.js +1 -1
- package/sortable/sortable.umd.js +2 -3
- package/sortpanel/sortpanel.d.ts +2 -0
- package/sortpanel/sortpanel.esm.js +1 -1
- package/sortpanel/sortpanel.umd.js +2 -3
- package/source/modules/smart.3dchart.js +1 -1
- package/source/modules/smart.accordion.js +1 -1
- package/source/modules/smart.array.js +1 -1
- 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 +5 -5
- package/source/modules/smart.carousel.js +1 -1
- package/source/modules/smart.chart.js +2 -2
- 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 +1 -1
- package/source/modules/smart.colorpicker.js +1 -1
- package/source/modules/smart.combobox.js +1 -1
- package/source/modules/smart.common.js +3 -3
- package/source/modules/smart.countryinput.js +2 -2
- package/source/modules/smart.dateinput.js +3 -3
- package/source/modules/smart.daterangeinput.js +3 -3
- 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 +1 -1
- package/source/modules/smart.editor.js +2 -2
- package/source/modules/smart.element.js +1 -1
- package/source/modules/smart.fileupload.js +1 -1
- package/source/modules/smart.form.js +3 -3
- package/source/modules/smart.formulaparser.js +1 -1
- package/source/modules/smart.ganttchart.js +6 -6
- package/source/modules/smart.gauge.js +1 -1
- package/source/modules/smart.grid.js +15 -15
- package/source/modules/smart.gridpanel.js +5 -5
- 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 +1 -1
- 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 +1 -1
- package/source/modules/smart.multisplitbutton.js +1 -1
- package/source/modules/smart.numberinput.js +2 -2
- package/source/modules/smart.numerictextbox.js +1 -1
- 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 +6 -6
- package/source/modules/smart.progressbar.js +1 -1
- package/source/modules/smart.qrcode.js +1 -1
- package/source/modules/smart.querybuilder.js +3 -3
- package/source/modules/smart.radiobutton.js +1 -1
- package/source/modules/smart.rating.js +1 -1
- package/source/modules/smart.ribbon.js +2 -2
- package/source/modules/smart.router.js +2 -2
- package/source/modules/smart.scheduler.js +5 -5
- 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 +4 -4
- package/source/modules/smart.tabs.js +1 -1
- package/source/modules/smart.tank.js +1 -1
- package/source/modules/smart.textarea.js +3 -3
- package/source/modules/smart.textbox.js +1 -1
- 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 +2 -2
- package/source/modules/smart.validator.js +1 -1
- package/source/modules/smart.window.js +1 -1
- package/source/smart.3dchart.js +1 -1
- 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 +2 -2
- 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 +1 -1
- package/source/smart.element.js +1 -1
- package/source/smart.elements.js +16 -16
- package/source/smart.export.js +1 -1
- package/source/smart.fileupload.js +1 -1
- package/source/smart.filter.js +2 -2
- package/source/smart.filterbuilder.js +1 -1
- package/source/smart.filterpanel.js +2 -2
- 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 +2 -2
- 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 +1 -1
- package/source/smart.grid.pager.js +1 -1
- package/source/smart.grid.reorder.js +1 -1
- package/source/smart.grid.resize.js +1 -1
- package/source/smart.grid.row.js +2 -2
- package/source/smart.grid.select.js +2 -2
- package/source/smart.grid.sort.js +1 -1
- package/source/smart.grid.toolbar.js +1 -1
- package/source/smart.grid.tree.js +1 -1
- package/source/smart.grid.view.js +1 -1
- package/source/smart.gridpanel.js +1 -1
- package/source/smart.input.js +2 -2
- package/source/smart.kanban.js +1 -1
- package/source/smart.layout.js +1 -1
- package/source/smart.led.js +1 -1
- package/source/smart.listbox.js +1 -1
- 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.ribbon.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.sparkline.js +6 -0
- 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 +2 -2
- 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 +2 -2
- 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/components/smart.validator.css +1 -1
- package/source/styles/default/scss/smart.grid.scss +230 -168
- package/source/styles/default/scss/smart.validator.scss +1 -0
- package/source/styles/default/smart.grid.css +48 -9
- package/source/styles/default/smart.validator.css +123 -121
- package/source/styles/smart.default.css +2 -2
- package/source/typescript/smart.calendar.d.ts +5 -0
- package/source/typescript/smart.elements.d.ts +54 -3
- package/source/typescript/smart.grid.d.ts +33 -3
- package/source/typescript/smart.textarea.d.ts +5 -0
- package/source/typescript/smart.tree.d.ts +11 -0
- package/splitter/splitter.d.ts +2 -0
- package/splitter/splitter.esm.js +1 -1
- package/splitter/splitter.umd.js +2 -3
- package/splitter/splitterbar.d.ts +2 -0
- package/splitter/splitteritem.d.ts +2 -0
- package/switchbutton/switchbutton.d.ts +2 -0
- package/switchbutton/switchbutton.esm.js +1 -1
- package/switchbutton/switchbutton.umd.js +2 -3
- package/table/pivottable.d.ts +2 -0
- package/table/sortable.d.ts +2 -0
- package/table/table.d.ts +2 -0
- package/table/table.esm.js +1 -1
- package/table/table.umd.js +2 -3
- package/tabs/tabs.d.ts +2 -0
- package/tabs/tabs.esm.js +1 -1
- package/tabs/tabs.umd.js +2 -3
- package/tabs/tabswindow.d.ts +2 -0
- package/tabswindow/tabswindow.d.ts +2 -0
- package/tabswindow/tabswindow.esm.js +1 -1
- package/tabswindow/tabswindow.umd.js +2 -3
- package/tank/tank.d.ts +2 -0
- package/tank/tank.esm.js +1 -1
- package/tank/tank.umd.js +2 -3
- package/textarea/textarea.d.ts +7 -0
- package/textarea/textarea.esm.js +13 -2
- package/textarea/textarea.umd.js +14 -4
- package/textbox/maskedtextbox.d.ts +2 -0
- package/textbox/multilinetextbox.d.ts +2 -0
- package/textbox/numerictextbox.d.ts +2 -0
- package/textbox/passwordtextbox.d.ts +2 -0
- package/textbox/textbox.d.ts +2 -0
- package/textbox/textbox.esm.js +1 -1
- package/textbox/textbox.umd.js +2 -3
- package/threedchart/threedchart.d.ts +2 -0
- package/threedchart/threedchart.esm.js +1 -1
- package/threedchart/threedchart.umd.js +2 -3
- package/timeinput/timeinput.d.ts +2 -0
- package/timeinput/timeinput.esm.js +1 -1
- package/timeinput/timeinput.umd.js +2 -3
- package/timepicker/datetimepicker.d.ts +2 -0
- package/timepicker/timepicker.d.ts +2 -0
- package/timepicker/timepicker.esm.js +1 -1
- package/timepicker/timepicker.umd.js +2 -3
- package/toast/toast.d.ts +2 -0
- package/toast/toast.esm.js +1 -1
- package/toast/toast.umd.js +2 -3
- package/tooltip/tooltip.d.ts +2 -0
- package/tooltip/tooltip.esm.js +1 -1
- package/tooltip/tooltip.umd.js +2 -3
- package/tree/tree.d.ts +12 -0
- package/tree/tree.esm.js +9 -2
- package/tree/tree.umd.js +10 -4
- package/tree/treeitem.d.ts +2 -0
- package/tree/treeitemsgroup.d.ts +2 -0
- package/validator/validator.d.ts +2 -0
- package/validator/validator.esm.js +1 -1
- package/validator/validator.umd.js +2 -3
- package/waitwindow/waitwindow.d.ts +2 -0
- package/waitwindow/waitwindow.esm.js +1 -1
- package/waitwindow/waitwindow.umd.js +2 -3
- package/window/alertwindow.d.ts +2 -0
- package/window/dialogwindow.d.ts +2 -0
- package/window/multilinewindow.d.ts +2 -0
- package/window/progresswindow.d.ts +2 -0
- package/window/promptwindow.d.ts +2 -0
- package/window/tabswindow.d.ts +2 -0
- package/window/waitwindow.d.ts +2 -0
- package/window/window.d.ts +2 -0
- package/window/window.esm.js +1 -1
- package/window/window.umd.js +2 -3
package/source/smart.export.js
CHANGED
package/source/smart.filter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
/* Smart UI v18.0.
|
|
2
|
+
/* Smart UI v18.0.11 (2024-02-10)
|
|
3
3
|
Copyright (c) 2011-2023 jQWidgets.
|
|
4
4
|
License: https://htmlelements.com/license/ */ //
|
|
5
5
|
|
|
6
|
-
Smart.Utilities.Assign("FilterGroup",class t{constructor(){const t=this;t.stringConditions=["EMPTY","NOT_EMPTY","CONTAINS","CONTAINS_CASE_SENSITIVE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_CASE_SENSITIVE","STARTS_WITH","STARTS_WITH_CASE_SENSITIVE","ENDS_WITH","ENDS_WITH_CASE_SENSITIVE","EQUAL","NOT_EQUAL","EQUAL_CASE_SENSITIVE","NOT_EQUAL_CASE_SENSITIVE","NULL","NOT_NULL"],t.numericConditions=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"],t.dateConditions=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"],t.booleanConditions=["EQUAL","NOT_EQUAL","NULL","NOT_NULL"],t.filters=new Array,t.logicalOperators=new Array}toString(){const t=this;let e="";for(let r=0;r<t.filters.length;r++){r>0&&(e+=" "+t.logicalOperators[r-1]+" ");let n=t.filters[r].toString();n.indexOf("[object")>=0&&"object"==typeof t.filters[r]&&(n=t.filters[r].condition+' "'+t.filters[r].value+'"'),e+=n}return e}evaluate(t){const e=this;let r=!0;for(let n=0;n<e.filters.length;n++){if(!e.filters[n].evaluate)continue;let i=e.filters[n].evaluate(t);r=0===n?i:1===e.logicalOperators[n]||"or"===e.logicalOperators[n]?r||i:r&&i}return r}getFiltersCount(){return this.filters.length}setConditions(t,e){const r=this;switch(t){case"numeric":r.numericConditions=e;break;case"string":r.stringConditions=e;break;case"date":case"time":r.dateConditions=e;break;case"bool":case"boolean":r.booleanConditions=e}}getConditions(t){const e=this;let r=new Array;switch(t){case"numeric":r=e.numericConditions.slice(0);break;case"string":r=e.stringConditions.slice(0);break;case"date":case"time":r=e.dateConditions.slice(0);break;case"bool":case"boolean":r=e.booleanConditions.slice(0)}return r}generateFilterKey(){const t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return t()+"-"+t()+"-"+t()}createFilter(t,e,r,n,i,s,l){if(null==t)return null;switch(t){case"int":case"float":case"int64":case"double":case"numeric":case"number":case"numericFilter":return new Smart.Utilities.NumericFilter(e,r.toUpperCase());case"string":case"stringFilter":return new Smart.Utilities.StringFilter(e,r.toUpperCase(),s);case"date":case"time":case"dateFilter":return new Smart.Utilities.DateFilter(e,r.toUpperCase(),i,s,l);case"bool":case"boolean":case"booleanFilter":return new Smart.Utilities.BooleanFilter(e,r.toUpperCase());case"custom":return new Smart.Utilities.CustomFilter(e,r.toUpperCase(),n)}throw new Error('smartGrid: There is no such filter type. The available filter types are: "numericFilter", "stringFilter", "dateFilter" and "booleanFilter"')}getFilters(){const e=this;let r=new Array;for(let n=0;n<e.filters.length;n++){const i=e.filters[n];if(i instanceof t){let t=i.getFilters();r.push({value:t,logicalOperator:e.logicalOperators[n],type:"FilterGroup"})}else{const t={value:i.value,condition:i.condition,logicalOperator:e.logicalOperators[n],type:i.type};i.data&&(t.id=i.data),r.push(t)}}return r}addFilter(t,e){const r=this;r.filters[r.filters.length]=e,e.key=r.generateFilterKey(),r.logicalOperators[r.logicalOperators.length]=t}removeFilter(t){const e=this;for(let r=0;r<e.filters.length;r++)if(e.filters[r].key===t.key){e.filters.splice(r,1),e.logicalOperators.splice(r,1);break}}getOperatorAt(t){return null==t||t<0||t>this.filters.length?null:this.logicalOperators[t]}setOperatorAt(t,e){return null==t||t<0||t>this.filters.length?null:void(this.logicalOperators[e]=e)}getFilterAt(t){return null==t||t<0||t>this.filters.length?null:this.filters[t]}setFilterAt(t,e){const r=this;return null==t||t<0||t>r.filters.length?null:(e.key=r.generateFilterKey(),void(r.filters[t]=e))}clear(){this.filters=new Array,this.logicalOperators=new Array}getUniqueValues(t,e){const r=t.data,n=[],i=[],s="dateFilter"===t.filterType&&"timePicker"===t.displayMode;let l,a=!1;for(let e=0;e<r.length;e++){let l,o=r[e][t.dataField];""!==o&&null!=o?(l=s?new Smart.Utilities.DateTime(o).toString(t.formatString):o.toString(),-1===n.indexOf(l)&&(n.push(l),i.push({label:l,value:o,customAttribute:"default-item"}))):a=!0}switch(t.filterType){case"numericFilter":case"booleanFilter":l=function(t,e){return t.value-e.value};break;case"stringFilter":l=function(t,e){return(new Intl.Collator).compare(t.value,e.value)};break;case"dateFilter":l=s?function(t,e){try{const r=t.value.getHours(),n=e.value.getHours();if(r!==n)return r-n;const i=t.value.getMinutes(),s=e.value.getMinutes();if(i!==s)return i-s;const l=t.value.getSeconds(),a=e.value.getSeconds();return l!==a?l-a:0}catch(t){return-1}}:function(t,e){try{return t.value.getTime()-e.value.getTime()}catch(t){return-1}}}return i.sort(l),"booleanFilter"===t.filterType&&i.map((function(t){t.label=t.label.toUpperCase()})),a&&i.push({label:e.localize("blanks"),value:"",customAttribute:"default-item"}),i}}),Smart.Utilities.Assign("StringFilter",class{constructor(t,e,r){const n=this;n.value=t,n.condition=e,n.locale=r||"en",n.type="stringFilter"}toString(){return this.condition+' "'+this.value+'"'}evaluate(t){const e=this,r=e.value,n=e.condition;if(null==t||""===t){if("NULL"===n)return!0;if("EQUAL"===n&&t===r)return!0;if("NOT_EQUAL"===n&&t!==r)return!0;if("CONTAINS"===n&&t===r)return!0;if("EMPTY"!==n)return!1;if(""===t)return!0}let i="";try{i=t.toString()}catch(t){return!0}const s=function(t,r){const i=e.locale;switch(n){case"EQUAL":return 0===t.localeCompare(r,i,{sensitivity:"accent"});case"EQUAL_CASE_SENSITIVE":return 0===t.localeCompare(r,i,{sensitivity:"variant"});case"NOT_EQUAL":return 0!==t.localeCompare(r,i,{sensitivity:"accent"});case"NOT_EQUAL_CASE_SENSITIVE":return 0!==t.localeCompare(r,i,{sensitivity:"variant"});case"CONTAINS":return"number"==typeof r?t===r:-1!==t.toLowerCase().indexOf(r.toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.indexOf(r);case"DOES_NOT_CONTAIN":return-1===t.toLowerCase().indexOf(r.toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.indexOf(r);case"EMPTY":return""===t;case"NOT_EMPTY":return""!==t;case"NOT_NULL":return null!==t;case"STARTS_WITH":return 0===(t=t.substring(0,r.length)).localeCompare(r,i,{sensitivity:"accent"});case"ENDS_WITH":return 0===(t=t.substring(t.length-r.length,t.length)).localeCompare(r,i,{sensitivity:"accent"});case"ENDS_WITH_CASE_SENSITIVE":return 0===(t=t.substring(t.length-r.length,t.length)).localeCompare(r,i,{sensitivity:"variant"});case"STARTS_WITH_CASE_SENSITIVE":return 0===(t=t.substring(0,r.length)).localeCompare(r,i,{sensitivity:"variant"});default:return!1}},l=new Array;if(r&&r.indexOf&&(r.indexOf("|")>=0||r.indexOf(" AND ")>=0||r.indexOf(" OR ")>=0||r.indexOf(" and ")>=0||r.indexOf(" or ")>=0)){const t=s(i,r);if(t)return t;const e=r.indexOf(" and ")>=0?r.split(" and "):new Array,n=r.indexOf(" or ")>=0?r.split(" or "):new Array,a=r.indexOf("|")>=0?r.split("|"):new Array;let o=r.indexOf(" AND ")>=0?r.split(" AND "):new Array,c=r.indexOf(" OR ")>=0?r.split(" OR "):new Array;if(a.length>0)for(let t=0;t<a.length;t++)a[t]=a[t].trim;const u=r.indexOf(" ")>=0?r.split(" "):new Array;if(u.length>0)for(let t=0;t<u.length;t++)u[t]=u[t].trim;if(o=o.concat(u),o=o.concat(e),c=c.concat(a),c=c.concat(n),o.length>0)for(let t=0;t<o.length;t++)!o[t].indexOf(" OR ")>=0&&l.push(o[t]);if(c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" AND ")>=0&&l.push(c[t]);let S;for(let t=0;t<l.length;t++){const e=s(i,l[t]),r=t<o.length?"and":"or";S=void 0===S?e:"or"===r?S||e:S&&e}return S}return s(i,r)}}),Smart.Utilities.Assign("BooleanFilter",class{constructor(t,e){const r=this;r.value=t,r.condition=e,r.type="booleanFilter"}toString(){return this.condition+" "+this.value}evaluate(t){const e=this.value,r=t;switch(this.condition){case"EQUAL":return r===e;case"NOT_EQUAL":return r!==e;case"NULL":return null==t||""===t;case"NOT_NULL":return!(null==t||""===t);default:return!1}}}),Smart.Utilities.Assign("NumericFilter",class{constructor(t,e){const r=this;r.value=t,r.condition=e,r.type="numericFilter"}toString(){return this.condition+" "+this.value}evaluate(t){let e=this.value,r=this.condition;if(null==t||""===t){if("NOT_NULL"===r)return!1;if("NULL"===r)return!0;switch(r){case"EQUAL":return t===e;case"NOT_EQUAL":return t!==e}return!1}if("NULL"===r)return!1;if("NOT_NULL"===r)return!0;let n=t;try{n=parseFloat(n)}catch(e){if(null!==t&&""!==t.toString())return!1}const i=function(t,e){switch("number"==typeof t&&"number"!=typeof e&&(e=parseFloat(e)),r){case"EQUAL":return t===e;case"NOT_EQUAL":return t!==e;case"GREATER_THAN":return t>e;case"GREATER_THAN_OR_EQUAL":return t>=e;case"LESS_THAN":return t<e;case"LESS_THAN_OR_EQUAL":return t<=e;case"STARTS_WITH":return e=e.toString().toLowerCase(),t.toString().toLowerCase().substring(0,e.length)===e;case"ENDS_WITH":return t=t.toString().toLowerCase(),e=e.toString().toLowerCase(),t.substring(t.length-e.length,t.length)===e;case"ENDS_WITH_CASE_SENSITIVE":return t=t.toString(),e=e.toString(),t.substring(t.length-e.length,t.length)===e;case"STARTS_WITH_CASE_SENSITIVE":return e=e.toString(),t.toString().substring(0,e.length)===e;case"CONTAINS":return-1!==t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.toString().indexOf(e.toString());case"DOES_NOT_CONTAIN":return-1===t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.toString().indexOf(e.toString());default:return!0}};let s=new Array;if(e&&e.indexOf&&(e.indexOf("|")>=0||e.indexOf(" AND ")>=0||e.indexOf(" OR ")>=0||e.indexOf(" and ")>=0||e.indexOf(" or ")>=0)){let t=i(n,e);if(t)return t;e=e.toString();const r=e.indexOf(" and ")>=0?e.split(" and "):new Array,l=e.indexOf(" or ")>=0?e.split(" or "):new Array,a=e.indexOf("|")>=0?e.split("|"):new Array;let o,c=e.indexOf(" AND ")>=0?e.split(" AND "):new Array,u=e.indexOf(" OR ")>=0?e.split(" OR "):new Array;if(c=c.concat(r),u=u.concat(l),a.length>0)for(let t=0;t<a.length;t++)a[t]=a[t].trim;if(u=u.concat(a),c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" OR ")>=0&&s.push(c[t]);if(u.length>0)for(let t=0;t<u.length;t++)!u[t].indexOf(" AND ")>=0&&s.push(u[t]);for(let e=0;e<s.length;e++){const r=s[e];if(r&&r.indexOf&&r.indexOf("..")>=0){const e=r.toString().split("..");2===e.length&&(t=n>=e[0]&&n<=e[1])}else t=i(n,r);const l=e<c.length?"and":"or";o=void 0===o?t:"or"===l?o||t:o&&t}return o}return e&&e.indexOf&&e.indexOf("..")>=0&&(s=e.toString().split(".."),2===s.length)?n>=s[0]&&n<=s[1]:i(n,e)}}),Smart.Utilities.Assign("DateFilter",class{constructor(t,e,r,n,i){const s=this,l=new Smart.Utilities.DateTime;if(s.value=t,s.type="dateFilter",void 0!==r){const e=l.parseDate(t,r);if(null!==e)s.filterdate=e;else{const e=l.tryparseDate(t);null!==e&&(s.filterdate=e)}}else{const e=new Date(t);"NaN"===e.toString()||"Invalid Date"===e.toString()?s.filterdate=l.tryparseDate(t):s.filterdate=e}if(!s.filterdate){const e=new Date(t);"NaN"===e.toString()||"Invalid Date"===e.toString()?s.filterdate=l.tryparseDate(t):s.filterdate=e}s.condition=e,s.formatString=r,s.timeOnly=i}toString(){return this.value&&this.value instanceof Date?this.condition+' "'+this.value.toISOString()+'"':this.condition+" "+this.value}evaluate(t){const e=this,r=e.condition,n=e.formatString;let i=e.value;if(e.timeOnly)return e.evaluateTimeOnly(t);if(null==t||""===t){if("NOT_NULL"===r)return!1;if("NULL"===r)return!0;switch(r){case"EQUAL":return t===i;case"NOT_EQUAL":return t!==i}return!1}if("NULL"===r)return!1;if("NOT_NULL"===r)return!0;let s,l=new Date;l.setFullYear(1900,0,1),l.setHours(12,0,0,0);try{const r=new Smart.Utilities.DateTime,a=new Date(t);if(l=t="NaN"===a.toString()||"Invalid Date"===a.toString()?r.tryparseDate(t):a,s=!1,void 0!==n&&(n.indexOf("t")>=0||n.indexOf("T")>=0||n.indexOf(":")>=0||n.indexOf("f")>=0)&&(s=!0,i&&-1===i.toString().indexOf(":"))){const t=r.tryparseDate(i.toString()+":00");null!==t&&(e.filterdate=t)}s||(l.setHours(0),l.setMinutes(0),l.setSeconds(0))}catch(e){if(null!==t&&""!==t.toString())return!1}if(null!==e.filterdate)i=e.filterdate;else if(i&&i.indexOf&&(-1!==i.indexOf(":")||!isNaN(parseInt(i)))){const t=new Date(l);t.setHours(12,0,0,0);const e=i.split(":");for(let r=0;r<e.length;r++)0===r&&t.setHours(e[r]),1===r&&t.setMinutes(e[r]),2===r&&t.setSeconds(e[r]);i=t}s&&i&&i.setFullYear&&l&&l.getFullYear&&-1===n.indexOf("d")&&-1===n.indexOf("M")&&-1===n.indexOf("y")&&i.setFullYear(l.getFullYear(),l.getMonth(),l.getDate());const a=function(t,e){switch(null===t&&(t=""),r){case"EQUAL":return t.toString()===e.toString();case"NOT_EQUAL":return t.toString()!==e.toString();case"GREATER_THAN":return t>e;case"GREATER_THAN_OR_EQUAL":return t>=e;case"LESS_THAN":return t<e;case"LESS_THAN_OR_EQUAL":return t<=e;case"STARTS_WITH":return e=e.toString().toLowerCase(),t.toString().toLowerCase().substring(0,e.length)===e;case"ENDS_WITH":return t=t.toString().toLowerCase(),e=e.toString().toLowerCase(),t.substring(t.length-e.length,t.length)===e;case"ENDS_WITH_CASE_SENSITIVE":return t=t.toString(),e=e.toString(),t.substring(t.length-e.length,t.length)===e;case"STARTS_WITH_CASE_SENSITIVE":return e=e.toString(),t.toString().substring(0,e.length)===e;case"CONTAINS":return-1!==t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.toString().indexOf(e.toString());case"DOES_NOT_CONTAIN":return-1===t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.toString().indexOf(e.toString());default:return!0}};let o=new Array;if(i&&i.indexOf&&(i.indexOf("|")>=0||i.indexOf(" AND ")>=0||i.indexOf(" OR ")>=0||i.indexOf(" and ")>=0||i.indexOf(" or ")>=0)){let t=a(l,i);if(t)return t;const e=i.indexOf(" and ")>=0?i.split(" and "):new Array,r=i.indexOf(" or ")>=0?i.split(" or "):new Array,n=i.indexOf("|")>=0?i.split("|"):new Array;let s,c=i.indexOf(" AND ")>=0?i.split(" AND "):new Array,u=i.indexOf(" OR ")>=0?i.split(" OR "):new Array;if(c=c.concat(e),u=u.concat(r),n.length>0)for(let t=0;t<n.length;t++)n[t]=n[t].trim;if(u=u.concat(n),c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" OR ")>=0&&o.push(c[t]);if(u.length>0)for(let t=0;t<u.length;t++)!u[t].indexOf(" AND ")>=0&&o.push(u[t]);for(let e=0;e<o.length;e++){const r=o[e];if(r&&r.indexOf&&r.indexOf("..")>=0){const e=r.toString().split("..");2===e.length&&(t=l>=e[0]&&l<=e[1])}else t=a(l,r);const n=e<c.length?"and":"or";s=void 0===s?t:"or"===n?s||t:s&&t}return s}return i&&i.indexOf&&i.indexOf("..")>=0&&(o=i.toString().split(".."),2===o.length)?l>=o[0]&&l<=o[1]:a(l,i)}evaluateTimeOnly(t){const e=this.value;return e?!!(t&&t instanceof Date)&&(t.getHours()===e.getHours()&&(t.getMinutes()===e.getMinutes()&&t.getSeconds()===e.getSeconds())):!t}}),Smart.Utilities.Assign("CustomFilter",class{constructor(t,e,r){const n=this;n.value=t,n.condition=e,n.customfilter=r}toString(){return this.condition+" "+this.value}evaluate(t){const e=this;return e.customfilter(e.value,t,e.condition)}}),Smart.FilterGroup=Smart.Utilities.FilterGroup,Smart.StringFilter=Smart.Utilities.StringFilter,Smart.NumericFilter=Smart.Utilities.NumericFilter,Smart.DateFilter=Smart.Utilities.DateFilter,Smart.CustomFilter=Smart.Utilities.CustomFilter;
|
|
6
|
+
Smart.Utilities.Assign("FilterGroup",class t{constructor(){const t=this;t.stringConditions=["EMPTY","NOT_EMPTY","CONTAINS","CONTAINS_CASE_SENSITIVE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_CASE_SENSITIVE","STARTS_WITH","STARTS_WITH_CASE_SENSITIVE","ENDS_WITH","ENDS_WITH_CASE_SENSITIVE","EQUAL","NOT_EQUAL","EQUAL_CASE_SENSITIVE","NOT_EQUAL_CASE_SENSITIVE","NULL","NOT_NULL"],t.numericConditions=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"],t.dateConditions=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"],t.booleanConditions=["EQUAL","NOT_EQUAL","NULL","NOT_NULL"],t.filters=new Array,t.logicalOperators=new Array}toString(){const t=this;let e="";for(let r=0;r<t.filters.length;r++){r>0&&(e+=" "+t.logicalOperators[r-1]+" ");let n=t.filters[r].toString();n.indexOf("[object")>=0&&"object"==typeof t.filters[r]&&(n=t.filters[r].condition+' "'+t.filters[r].value+'"'),e+=n}return e}evaluate(t){const e=this;let r=!0;for(let n=0;n<e.filters.length;n++){if(!e.filters[n].evaluate)continue;let i=e.filters[n].evaluate(t);r=0===n?i:1===e.logicalOperators[n]||"or"===e.logicalOperators[n]?r||i:r&&i}return r}getFiltersCount(){return this.filters.length}setConditions(t,e){const r=this;switch(t){case"numeric":r.numericConditions=e;break;case"string":r.stringConditions=e;break;case"date":case"time":r.dateConditions=e;break;case"bool":case"boolean":r.booleanConditions=e}}getConditions(t){const e=this;let r=new Array;switch(t){case"numeric":r=e.numericConditions.slice(0);break;case"string":r=e.stringConditions.slice(0);break;case"date":case"time":r=e.dateConditions.slice(0);break;case"bool":case"boolean":r=e.booleanConditions.slice(0)}return r}generateFilterKey(){const t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return t()+"-"+t()+"-"+t()}createFilter(t,e,r,n,i,s,l){if(null==t)return null;switch(t){case"int":case"float":case"int64":case"double":case"numeric":case"number":case"numericFilter":return new Smart.Utilities.NumericFilter(e,r.toUpperCase());case"string":case"stringFilter":return new Smart.Utilities.StringFilter(e,r.toUpperCase(),s);case"date":case"time":case"dateFilter":return new Smart.Utilities.DateFilter(e,r.toUpperCase(),i,s,l);case"bool":case"boolean":case"booleanFilter":return new Smart.Utilities.BooleanFilter(e,r.toUpperCase());case"custom":return new Smart.Utilities.CustomFilter(e,r.toUpperCase(),n)}throw new Error('smartGrid: There is no such filter type. The available filter types are: "numericFilter", "stringFilter", "dateFilter" and "booleanFilter"')}getFilters(){const e=this;let r=new Array;for(let n=0;n<e.filters.length;n++){const i=e.filters[n];if(i instanceof t){let t=i.getFilters();r.push({value:t,logicalOperator:e.logicalOperators[n],type:"FilterGroup"})}else{const t={value:i.value,condition:i.condition,logicalOperator:e.logicalOperators[n],type:i.type};i.data&&(t.id=i.data),r.push(t)}}return r}addFilter(t,e){const r=this;r.filters[r.filters.length]=e,e.key=r.generateFilterKey(),r.logicalOperators[r.logicalOperators.length]=t}removeFilter(t){const e=this;for(let r=0;r<e.filters.length;r++)if(e.filters[r].key===t.key){e.filters.splice(r,1),e.logicalOperators.splice(r,1);break}}getOperatorAt(t){return null==t||t<0||t>this.filters.length?null:this.logicalOperators[t]}setOperatorAt(t,e){return null==t||t<0||t>this.filters.length?null:void(this.logicalOperators[e]=e)}getFilterAt(t){return null==t||t<0||t>this.filters.length?null:this.filters[t]}setFilterAt(t,e){const r=this;return null==t||t<0||t>r.filters.length?null:(e.key=r.generateFilterKey(),void(r.filters[t]=e))}clear(){this.filters=new Array,this.logicalOperators=new Array}getUniqueValues(t,e){const r=t.data,n=[],i=[],s="dateFilter"===t.filterType&&"timePicker"===t.displayMode;let l,a=!1;for(let e=0;e<r.length;e++){let l,o=r[e][t.dataField];""!==o&&null!=o?(l=s?new Smart.Utilities.DateTime(o).toString(t.formatString):o.toString(),-1===n.indexOf(l)&&(n.push(l),i.push({label:l,value:o,customAttribute:"default-item"}))):a=!0}switch(t.filterType){case"numericFilter":case"booleanFilter":l=function(t,e){return t.value-e.value};break;case"stringFilter":l=function(t,e){return(new Intl.Collator).compare(t.value,e.value)};break;case"dateFilter":l=s?function(t,e){try{const r=t.value.getHours(),n=e.value.getHours();if(r!==n)return r-n;const i=t.value.getMinutes(),s=e.value.getMinutes();if(i!==s)return i-s;const l=t.value.getSeconds(),a=e.value.getSeconds();return l!==a?l-a:0}catch(t){return-1}}:function(t,e){try{return t.value.getTime()-e.value.getTime()}catch(t){return-1}}}return i.sort(l),"booleanFilter"===t.filterType&&i.map((function(t){const r=e.localize(t.label);t.label=""+r})),a&&i.push({label:e.localize("blanks"),value:"",customAttribute:"default-item"}),i}}),Smart.Utilities.Assign("StringFilter",class{constructor(t,e,r){const n=this;n.value=t,n.condition=e,n.locale=r||"en",n.type="stringFilter"}toString(){return this.condition+' "'+this.value+'"'}evaluate(t){const e=this,r=e.value,n=e.condition;if(null==t||""===t){if("NULL"===n)return!0;if("EQUAL"===n&&t===r)return!0;if("NOT_EQUAL"===n&&t!==r)return!0;if("CONTAINS"===n&&t===r)return!0;if("EMPTY"!==n)return!1;if(""===t)return!0}let i="";try{i=t.toString()}catch(t){return!0}const s=function(t,r){const i=e.locale;switch(n){case"EQUAL":return 0===t.localeCompare(r,i,{sensitivity:"accent"});case"EQUAL_CASE_SENSITIVE":return 0===t.localeCompare(r,i,{sensitivity:"variant"});case"NOT_EQUAL":return 0!==t.localeCompare(r,i,{sensitivity:"accent"});case"NOT_EQUAL_CASE_SENSITIVE":return 0!==t.localeCompare(r,i,{sensitivity:"variant"});case"CONTAINS":return"number"==typeof r?t===r:-1!==t.toLowerCase().indexOf(r.toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.indexOf(r);case"DOES_NOT_CONTAIN":return-1===t.toLowerCase().indexOf(r.toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.indexOf(r);case"EMPTY":return""===t;case"NOT_EMPTY":return""!==t;case"NOT_NULL":return null!==t;case"STARTS_WITH":return 0===(t=t.substring(0,r.length)).localeCompare(r,i,{sensitivity:"accent"});case"ENDS_WITH":return 0===(t=t.substring(t.length-r.length,t.length)).localeCompare(r,i,{sensitivity:"accent"});case"ENDS_WITH_CASE_SENSITIVE":return 0===(t=t.substring(t.length-r.length,t.length)).localeCompare(r,i,{sensitivity:"variant"});case"STARTS_WITH_CASE_SENSITIVE":return 0===(t=t.substring(0,r.length)).localeCompare(r,i,{sensitivity:"variant"});default:return!1}},l=new Array;if(r&&r.indexOf&&(r.indexOf("|")>=0||r.indexOf(" AND ")>=0||r.indexOf(" OR ")>=0||r.indexOf(" and ")>=0||r.indexOf(" or ")>=0)){const t=s(i,r);if(t)return t;const e=r.indexOf(" and ")>=0?r.split(" and "):new Array,n=r.indexOf(" or ")>=0?r.split(" or "):new Array,a=r.indexOf("|")>=0?r.split("|"):new Array;let o=r.indexOf(" AND ")>=0?r.split(" AND "):new Array,c=r.indexOf(" OR ")>=0?r.split(" OR "):new Array;if(a.length>0)for(let t=0;t<a.length;t++)a[t]=a[t].trim;const u=r.indexOf(" ")>=0?r.split(" "):new Array;if(u.length>0)for(let t=0;t<u.length;t++)u[t]=u[t].trim;if(o=o.concat(u),o=o.concat(e),c=c.concat(a),c=c.concat(n),o.length>0)for(let t=0;t<o.length;t++)!o[t].indexOf(" OR ")>=0&&l.push(o[t]);if(c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" AND ")>=0&&l.push(c[t]);let S;for(let t=0;t<l.length;t++){const e=s(i,l[t]),r=t<o.length?"and":"or";S=void 0===S?e:"or"===r?S||e:S&&e}return S}return s(i,r)}}),Smart.Utilities.Assign("BooleanFilter",class{constructor(t,e){const r=this;r.value=t,r.condition=e,r.type="booleanFilter"}toString(){return this.condition+" "+this.value}evaluate(t){const e=this.value,r=t;switch(this.condition){case"EQUAL":return r===e;case"NOT_EQUAL":return r!==e;case"NULL":return null==t||""===t;case"NOT_NULL":return!(null==t||""===t);default:return!1}}}),Smart.Utilities.Assign("NumericFilter",class{constructor(t,e){const r=this;r.value=t,r.condition=e,r.type="numericFilter"}toString(){return this.condition+" "+this.value}evaluate(t){let e=this.value,r=this.condition;if(null==t||""===t){if("NOT_NULL"===r)return!1;if("NULL"===r)return!0;switch(r){case"EQUAL":return t===e;case"NOT_EQUAL":return t!==e}return!1}if("NULL"===r)return!1;if("NOT_NULL"===r)return!0;let n=t;try{n=parseFloat(n)}catch(e){if(null!==t&&""!==t.toString())return!1}const i=function(t,e){switch("number"==typeof t&&"number"!=typeof e&&(e=parseFloat(e)),r){case"EQUAL":return t===e;case"NOT_EQUAL":return t!==e;case"GREATER_THAN":return t>e;case"GREATER_THAN_OR_EQUAL":return t>=e;case"LESS_THAN":return t<e;case"LESS_THAN_OR_EQUAL":return t<=e;case"STARTS_WITH":return e=e.toString().toLowerCase(),t.toString().toLowerCase().substring(0,e.length)===e;case"ENDS_WITH":return t=t.toString().toLowerCase(),e=e.toString().toLowerCase(),t.substring(t.length-e.length,t.length)===e;case"ENDS_WITH_CASE_SENSITIVE":return t=t.toString(),e=e.toString(),t.substring(t.length-e.length,t.length)===e;case"STARTS_WITH_CASE_SENSITIVE":return e=e.toString(),t.toString().substring(0,e.length)===e;case"CONTAINS":return-1!==t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.toString().indexOf(e.toString());case"DOES_NOT_CONTAIN":return-1===t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.toString().indexOf(e.toString());default:return!0}};let s=new Array;if(e&&e.indexOf&&(e.indexOf("|")>=0||e.indexOf(" AND ")>=0||e.indexOf(" OR ")>=0||e.indexOf(" and ")>=0||e.indexOf(" or ")>=0)){let t=i(n,e);if(t)return t;e=e.toString();const r=e.indexOf(" and ")>=0?e.split(" and "):new Array,l=e.indexOf(" or ")>=0?e.split(" or "):new Array,a=e.indexOf("|")>=0?e.split("|"):new Array;let o,c=e.indexOf(" AND ")>=0?e.split(" AND "):new Array,u=e.indexOf(" OR ")>=0?e.split(" OR "):new Array;if(c=c.concat(r),u=u.concat(l),a.length>0)for(let t=0;t<a.length;t++)a[t]=a[t].trim;if(u=u.concat(a),c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" OR ")>=0&&s.push(c[t]);if(u.length>0)for(let t=0;t<u.length;t++)!u[t].indexOf(" AND ")>=0&&s.push(u[t]);for(let e=0;e<s.length;e++){const r=s[e];if(r&&r.indexOf&&r.indexOf("..")>=0){const e=r.toString().split("..");2===e.length&&(t=n>=e[0]&&n<=e[1])}else t=i(n,r);const l=e<c.length?"and":"or";o=void 0===o?t:"or"===l?o||t:o&&t}return o}return e&&e.indexOf&&e.indexOf("..")>=0&&(s=e.toString().split(".."),2===s.length)?n>=s[0]&&n<=s[1]:i(n,e)}}),Smart.Utilities.Assign("DateFilter",class{constructor(t,e,r,n,i){const s=this,l=new Smart.Utilities.DateTime;if(s.value=t,s.type="dateFilter",void 0!==r){const e=l.parseDate(t,r);if(null!==e)s.filterdate=e;else{const e=l.tryparseDate(t);null!==e&&(s.filterdate=e)}}else{const e=new Date(t);"NaN"===e.toString()||"Invalid Date"===e.toString()?s.filterdate=l.tryparseDate(t):s.filterdate=e}if(!s.filterdate){const e=new Date(t);"NaN"===e.toString()||"Invalid Date"===e.toString()?s.filterdate=l.tryparseDate(t):s.filterdate=e}s.condition=e,s.formatString=r,s.timeOnly=i}toString(){return this.value&&this.value instanceof Date?this.condition+' "'+this.value.toISOString()+'"':this.condition+" "+this.value}evaluate(t){const e=this,r=e.condition,n=e.formatString;let i=e.value;if(e.timeOnly)return e.evaluateTimeOnly(t);if(null==t||""===t){if("NOT_NULL"===r)return!1;if("NULL"===r)return!0;switch(r){case"EQUAL":return t===i;case"NOT_EQUAL":return t!==i}return!1}if("NULL"===r)return!1;if("NOT_NULL"===r)return!0;let s,l=new Date;l.setFullYear(1900,0,1),l.setHours(12,0,0,0);try{const r=new Smart.Utilities.DateTime,a=new Date(t);if(l=t="NaN"===a.toString()||"Invalid Date"===a.toString()?r.tryparseDate(t):a,s=!1,void 0!==n&&(n.indexOf("t")>=0||n.indexOf("T")>=0||n.indexOf(":")>=0||n.indexOf("f")>=0)&&(s=!0,i&&-1===i.toString().indexOf(":"))){const t=r.tryparseDate(i.toString()+":00");null!==t&&(e.filterdate=t)}s||(l.setHours(0),l.setMinutes(0),l.setSeconds(0))}catch(e){if(null!==t&&""!==t.toString())return!1}if(null!==e.filterdate)i=e.filterdate;else if(i&&i.indexOf&&(-1!==i.indexOf(":")||!isNaN(parseInt(i)))){const t=new Date(l);t.setHours(12,0,0,0);const e=i.split(":");for(let r=0;r<e.length;r++)0===r&&t.setHours(e[r]),1===r&&t.setMinutes(e[r]),2===r&&t.setSeconds(e[r]);i=t}s&&i&&i.setFullYear&&l&&l.getFullYear&&-1===n.indexOf("d")&&-1===n.indexOf("M")&&-1===n.indexOf("y")&&i.setFullYear(l.getFullYear(),l.getMonth(),l.getDate());const a=function(t,e){switch(null===t&&(t=""),r){case"EQUAL":return t.toString()===e.toString();case"NOT_EQUAL":return t.toString()!==e.toString();case"GREATER_THAN":return t>e;case"GREATER_THAN_OR_EQUAL":return t>=e;case"LESS_THAN":return t<e;case"LESS_THAN_OR_EQUAL":return t<=e;case"STARTS_WITH":return e=e.toString().toLowerCase(),t.toString().toLowerCase().substring(0,e.length)===e;case"ENDS_WITH":return t=t.toString().toLowerCase(),e=e.toString().toLowerCase(),t.substring(t.length-e.length,t.length)===e;case"ENDS_WITH_CASE_SENSITIVE":return t=t.toString(),e=e.toString(),t.substring(t.length-e.length,t.length)===e;case"STARTS_WITH_CASE_SENSITIVE":return e=e.toString(),t.toString().substring(0,e.length)===e;case"CONTAINS":return-1!==t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.toString().indexOf(e.toString());case"DOES_NOT_CONTAIN":return-1===t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.toString().indexOf(e.toString());default:return!0}};let o=new Array;if(i&&i.indexOf&&(i.indexOf("|")>=0||i.indexOf(" AND ")>=0||i.indexOf(" OR ")>=0||i.indexOf(" and ")>=0||i.indexOf(" or ")>=0)){let t=a(l,i);if(t)return t;const e=i.indexOf(" and ")>=0?i.split(" and "):new Array,r=i.indexOf(" or ")>=0?i.split(" or "):new Array,n=i.indexOf("|")>=0?i.split("|"):new Array;let s,c=i.indexOf(" AND ")>=0?i.split(" AND "):new Array,u=i.indexOf(" OR ")>=0?i.split(" OR "):new Array;if(c=c.concat(e),u=u.concat(r),n.length>0)for(let t=0;t<n.length;t++)n[t]=n[t].trim;if(u=u.concat(n),c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" OR ")>=0&&o.push(c[t]);if(u.length>0)for(let t=0;t<u.length;t++)!u[t].indexOf(" AND ")>=0&&o.push(u[t]);for(let e=0;e<o.length;e++){const r=o[e];if(r&&r.indexOf&&r.indexOf("..")>=0){const e=r.toString().split("..");2===e.length&&(t=l>=e[0]&&l<=e[1])}else t=a(l,r);const n=e<c.length?"and":"or";s=void 0===s?t:"or"===n?s||t:s&&t}return s}return i&&i.indexOf&&i.indexOf("..")>=0&&(o=i.toString().split(".."),2===o.length)?l>=o[0]&&l<=o[1]:a(l,i)}evaluateTimeOnly(t){const e=this.value;return e?!!(t&&t instanceof Date)&&(t.getHours()===e.getHours()&&(t.getMinutes()===e.getMinutes()&&t.getSeconds()===e.getSeconds())):!t}}),Smart.Utilities.Assign("CustomFilter",class{constructor(t,e,r){const n=this;n.value=t,n.condition=e,n.customfilter=r}toString(){return this.condition+" "+this.value}evaluate(t){const e=this;return e.customfilter(e.value,t,e.condition)}}),Smart.FilterGroup=Smart.Utilities.FilterGroup,Smart.StringFilter=Smart.Utilities.StringFilter,Smart.NumericFilter=Smart.Utilities.NumericFilter,Smart.DateFilter=Smart.Utilities.DateFilter,Smart.CustomFilter=Smart.Utilities.CustomFilter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
/* Smart UI v18.0.
|
|
2
|
+
/* Smart UI v18.0.11 (2024-02-10)
|
|
3
3
|
Copyright (c) 2011-2023 jQWidgets.
|
|
4
4
|
License: https://htmlelements.com/license/ */ //
|
|
5
5
|
|
|
6
|
-
Smart("smart-filter-panel",class extends Smart.BaseElement{static get properties(){return{buttons:{value:["clear","filter"],type:"array"},data:{value:null,type:"array?",reflectToAttribute:!1},dataField:{value:null,type:"string?"},dataSource:{value:null,type:"any",reflectToAttribute:!1},evaluateFilterExpression:{value:null,type:"function?",reflectToAttribute:!1},filterType:{value:"string",allowedValues:["numeric","string","date","boolean"],type:"string"},formatString:{value:"d",type:"string"},messages:{value:{en:{addCondition:"Add Condition",addGroup:"Add Group",and:"and",blanks:"(Blanks)",cancel:"Cancel",clear:"Clear",contains:"contains",containsCaseSensitive:"contains (case sensitive)",dateTabLabel:"DATE",doesNotContain:"does not contain",doesNotContainCaseSensitive:"does not contain (case sensitive)",empty:"empty",endsWith:"ends with",endsWithCaseSensitive:"ends with (case sensitive)",equal:"equal",equalCaseSensitive:"equal (case sensitive)",filter:"Filter",greaterThan:"greater than",greaterThanOrEqual:"greater than or equal",lessThan:"less than",lessThanOrEqual:"less than or equal",mismatchedProperties:'smartFilterPanel: The "filterType" and the data type of the selected "dataField" are mismatched.',missingProperty:'smartFilterPanel: When mode is \'excel\', either "data" and "dataField" or "dataSource" of type Array have to be set.',notEmpty:"not empty",notEqual:"not equal",notNull:"not null",null:"null ",or:"or",placeholderBoolean:"Select value",placeholderDate:"Enter date",placeholderNumber:"Enter number",placeholderTime:"Enter time",placeholderValue:"Enter value",selectAll:"(Select All)",showRows:"Show rows where:",startsWith:"starts with",startsWithCaseSensitive:"starts with (case sensitive)",matchCase:"Match Case",timeTabLabel:"TIME"}},type:"object",extend:!0},mode:{value:"default",allowedValues:["basic","default","excel"],type:"string"}}}static get listeners(){return{"cancelButton.click":"cancel","clearButton.click":"clear","filterButton.click":"filter"}}template(){return'<div id="container" class="smart-container" role="presentation">\n <div id="label" class="smart-filter-panel-label"></div>\n <div id="mainContainer" role="presentation"></div>\n <div id="buttonContainer" class="smart-filter-panel-button-container" role="presentation">\n <smart-button id="filterButton" class="primary" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n <smart-button id="clearButton" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n <smart-button id="cancelButton" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n </div>\n </div>'}static get styleUrls(){return["smart.grid.css","smart.dropdownlist.css","smart.menu.css","smart.filterpanel.css","smart.textbox.css"]}ready(){super.ready()}render(){const e=this,t=e.filterType;e.$.label.id||(e.$.label.id=e.id+"Label"),e.setAttribute("role","dialog"),e.setAttribute("aria-labelledby",e.$.label.id),e._localize(),e._setButtonsVisibility(),e._filterType=t+"Filter",e._filterHandler=new(Smart.Utilities[t.slice(0,1).toUpperCase()+t.slice(1)+"FilterHandler"])(e),super.render()}cancel(){const e=this;e._filterHandler[e.mode+"Cancel"](),e.$.fireEvent("cancel")}clear(){const e=this;e._filterHandler[e.mode+"Clear"](),e.$.fireEvent("clear")}reset(){const e=this;e.$.clearButton.removeAttribute("hover"),e.$.filterButton.removeAttribute("hover"),e.$.cancelButton.removeAttribute("hover"),e._filterHandler.firstInputMatchCase&&e._filterHandler.firstInputMatchCase.classList.remove("active"),e._filterHandler.secondInputMatchCase&&e._filterHandler.secondInputMatchCase.classList.remove("active"),e._filterHandler[e.mode+"Clear"](),e._filterHandler.filterObject=new Smart.Utilities.FilterGroup}getFilter(){if(this._filterHandler){const e=new Smart.Utilities.FilterGroup;for(let t in this._filterHandler.filterObject)e[t]=this._filterHandler.filterObject[t];return e}return null}evaluate(e){try{return this._filterHandler.evaluate(e)}catch(e){return!1}}filter(){const e=this;e._filterHandler[e.mode+"Filter"](),e.$.fireEvent("filter")}getState(){return this._filterHandler.cachedFilter}loadState(e){try{const t=this;t._filterHandler.cachedFilter=e,t._filterHandler[t.mode+"Cancel"]()}catch(e){}}propertyChangedHandler(e,t,l){super.propertyChangedHandler(e,t,l);const a=this,i=a._filterHandler;function s(){a.$.mainContainer.innerHTML="",function(){const e=["cachedFilter","caseSensitive","customExcelFilterObjects","customItems","dataSource","defaultListSelection","defaultListSource","displayMode","filterBuilder","filterBuilderObject","filterBuilderOperations","filterObject","firstInput","firstList","operationsMapping","operatorList","secondInput","secondList","timeOnly","tree"];e.forEach((function(t){delete i[e[t]]})),delete a._filterHandler}(),a._filterHandler=new(Smart.Utilities[a.filterType.slice(0,1).toUpperCase()+a.filterType.slice(1)+"FilterHandler"])(a)}switch(e){case"animation":case"disabled":case"rightToLeft":case"unfocusable":switch(a.mode){case"default":case"basic":[i.firstList,i.firstInput,i.logicalOperatorList,i.secondList,i.secondInput].forEach((function(t){t[e]=l}));break;case"excel":i.tree[e]=l;break;case"filterBuilder":i.filterBuilder[e]=l,i.caseSensitive&&(i.caseSensitive[e]=l)}break;case"buttons":a._setButtonsVisibility();break;case"data":case"dataField":"excel"!==a.mode||Array.isArray(a.dataSource)||s();break;case"dataSource":"excel"===a.mode&&s();break;case"filterType":a._filterType=l+"Filter",s();break;case"mode":s();break;case"formatString":if("date"!==a.filterType)return;switch(a.mode){case"default":case"basic":i.firstInput.formatString=l,i.secondInput.formatString=l;break;case"excel":s();break;case"filterBuilder":i.filterBuilder.formatStringDate=l,i.filterBuilder.formatStringDateTime=l}break;case"locale":case"messages":switch(a._localize(),a.mode){case"default":case"basic":{const t=i.firstList.selectedIndex,l=i.logicalOperatorList.selectedIndex,s=i.secondList.selectedIndex,r=[i.firstInput,i.secondInput];switch(i.setDefaults(),i.firstList.dataSource=JSON.parse(JSON.stringify(i.defaultListSource)),i.logicalOperatorList.dataSource=[{value:0,label:a.localize("and")},{value:1,label:a.localize("or")}],i.secondList.dataSource=JSON.parse(JSON.stringify(i.defaultListSource)),a.filterType){case"date":r.forEach((function(t){t.messages[a.locale]||(t.messages[a.locale]={});const l=a.localize("dateTabLabel");l&&(t.messages[a.locale].dateTabLabel=l);const i=a.localize("timeTabLabel");if(i&&(t.messages[a.locale].timeTabLabel=i),"locale"===e&&(t.locale=a.locale),"timePicker"===t._dropDownDisplayMode){const e=a.localize("placeholderTime");e&&(t.placeholder=e,t.placeholder=e)}else{const e=a.localize("placeholderDate");e&&(t.placeholder=e,t.placeholder=e)}}));break;case"numeric":r[0].placeholder=a.localize("placeholderNumber"),r[1].placeholder=a.localize("placeholderNumber");break;case"string":r[0].placeholder=a.localize("placeholderValue"),r[1].placeholder=a.localize("placeholderValue");break;case"boolean":r[0].placeholder=a.localize("placeholderBoolean"),r[1].placeholder=a.localize("placeholderBoolean")}i.firstList.selectedIndex=t,i.logicalOperatorList.selectedIndex=l,i.secondList.selectedIndex=s;break}case"excel":i.tree.selectAll&&(i.tree.selectAll.label=a.localize("selectAll")),i.tree.blanks&&(i.tree.blanks.label=a.localize("blanks"));break;case"filterBuilder":i.localizeFilterBuilder(),"messages"===e&&(i.filterBuilder._localizeInitialValues(),i.filterBuilder._refresh()),i.filterBuilder.$.scrollableContainer.refresh()}}}_localize(){const e=this;e.localize("showRows")&&(e.$.label.innerHTML=e.localize("showRows")),e.localize("filter")&&(e.$.filterButton.innerHTML=e.localize("filter")),e.localize("clear")&&(e.$.clearButton.innerHTML=e.localize("clear")),e.localize("cancel")&&(e.$.cancelButton.innerHTML=e.localize("cancel"))}_setButtonsVisibility(){const e=this,t=e.buttons;["cancel","clear","filter"].forEach((function(l){-1!==t.indexOf(l)?e["$"+l+"Button"].removeClass("smart-hidden"):e["$"+l+"Button"].addClass("smart-hidden")}))}}),Smart.Utilities.Assign("BaseFilterHandler",class{constructor(e){const t=this;if(t.basicFilter=t.defaultFilter,t.basicClear=t.defaultClear,t.basicCancel=t.defaultCancel,t.context=e,t.filterObject=new Smart.Utilities.FilterGroup,t.setDefaults(),"date"===e.filterType){const l=new Smart.Utilities.DateTime,a=e.formatString,i=l.getParseRegExp(l.calendar,a.replace(/y+/g,"yyyyy"));t.displayMode=Smart.Utilities.DateTime.detectDisplayMode(l,a,i),t.timeOnly="timePicker"===t.displayMode}"default"!==e.mode&&"basic"!==e.mode?(t.operationsMapping={"=":"EQUAL","<>":"NOT_EQUAL","<":"LESS_THAN",">":"GREATER_THAN","<=":"LESS_THAN_OR_EQUAL",">=":"GREATER_THAN_OR_EQUAL",isblank:"EMPTY",isnotblank:"NOT_EMPTY",contains:"CONTAINS",notcontains:"DOES_NOT_CONTAIN",startswith:"STARTS_WITH",endswith:"ENDS_WITH",NULL:"NULL",NOT_NULL:"NOT_NULL"},"excel"===e.mode?t.createExcelHTMLStructure():"filterBuilder"===e.mode&&t.createBuilderHTMLStructure()):t.createDefaultHTMLStructure()}setDefaults(){const e=this,t=e.context;e.defaultListSource=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("equal")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("notEqual")},{prefix:'<span class="smart-icon smart-icon-less-than"></span>',value:"LESS_THAN",label:t.localize("lessThan")},{prefix:'<span class="smart-icon smart-icon-less-than-equal"></span>',value:"LESS_THAN_OR_EQUAL",label:t.localize("lessThanOrEqual")},{prefix:'<span class="smart-icon smart-icon-greater-than"></span>',value:"GREATER_THAN",label:t.localize("greaterThan")},{prefix:'<span class="smart-icon smart-icon-greater-than-equal"></span>',value:"GREATER_THAN_OR_EQUAL",label:t.localize("greaterThanOrEqual")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("null")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("notNull")}],e.filterBuilderOperations=["<","=","<>","<=",">",">=","NULL","NOT_NULL"],e.defaultListSelection=2}createDefaultHTMLStructure(){const e=this,t=e.context,l=document.createElement("smart-input"),a=document.createElement("smart-input"),i=document.createElement("smart-input"),s=document.createDocumentFragment(),r=e=>{e.readonly=!0,e.dropDownButtonPosition="right"};l.classList.add("smart-filter-panel-list"),l.dataSource=JSON.parse(JSON.stringify(this.defaultListSource)),l.selectedIndex=e.defaultListSelection,r(l),a.classList.add("smart-filter-panel-operator-list"),a.dataSource=[{value:0,label:t.localize("and")},{value:1,label:t.localize("or")}],r(a),i.classList.add("smart-filter-panel-list"),i.dataSource=JSON.parse(JSON.stringify(this.defaultListSource)),i.selectedIndex=e.defaultListSelection,r(i),e.firstList=l,e.logicalOperatorList=a,e.secondList=i;const n=document.createElement("span");n.classList.add("smart-icon","smart-icon-font-size"),n.title=t.localize("matchCase");const c=document.createElement("span");c.classList.add("smart-icon","smart-icon-font-size"),c.title=t.localize("matchCase"),e.firstInputMatchCase=n,e.secondInputMatchCase=c,e.appendInputs(),e.firstInput.classList.add("smart-filter-panel-input"),e.secondInput.classList.add("smart-filter-panel-input"),"basic"===t.mode&&(e.secondList.classList.add("smart-hidden"),e.secondInput.classList.add("smart-hidden"),e.logicalOperatorList.classList.add("smart-hidden"),e.secondInputMatchCase.classList.add("smart-hidden")),a.dropDownHeight="auto",a.selectedIndex=0,[l,e.firstInput,e.firstInputMatchCase,a,i,e.secondInput,e.secondInputMatchCase].forEach((function(e){e.animation=t.animation,e.disabled=t.disabled,e.unfocusable=t.unfocusable,e.dropDownPosition="bottom",e.dropDownAppendTo="body",e.dropDownMaxHeight=200,e.rightToLeft=t.rightToLeft,s.appendChild(e)})),e.context.$.mainContainer.appendChild(s),e.cacheFilter(e.defaultListSelection,0,e.defaultListSelection)}cacheFilter(e,t,l){const a=this;a.cachedFilter={firstFilterComparison:e,firstFilterValue:a.firstInput.value,firstFilterCaseSensitive:a.firstInputMatchCase.classList.contains("active"),logicalOperator:t,secondFilterComparison:l,secondFilterValue:a.secondInput.value,secondFilterCaseSensitive:a.secondInputMatchCase.classList.contains("active")}}defaultFilter(){const e=this,t=e.context,l=e.getFilterInputValue(e.firstInput),a=parseFloat(e.logicalOperatorList.selectedValues[0]),i=e.getFilterInputValue(e.secondInput),s=e.filterObject;let r=e.firstList.selectedValues[0],n=e.secondList.selectedValues[0];s.clear();const c=e=>"CONTAINS"===e?"CONTAINS_CASE_SENSITIVE":"DOES_NOT_CONTAIN"===e?"DOES_NOT_CONTAIN_CASE_SENSITIVE":"STARTS_WITH"===e?"STARTS_WITH_CASE_SENSITIVE":"ENDS_WITH"===e?"ENDS_WITH_CASE_SENSITIVE":"EQUAL"===e?"EQUAL_CASE_SENSITIVE":"NOT_EQUAL"===e?"NOT_EQUAL_CASE_SENSITIVE":void 0;if(e.firstInputMatchCase.classList.contains("active")&&(r=c(r)),e.secondInputMatchCase.classList.contains("active")&&(n=c(n)),""!==l||-1!==["NULL","NOT_NULL","EMPTY","NOT_EMPTY"].indexOf(r)){const i=s.createFilter(t._filterType,l,r,void 0,t.formatString,t.locale,"timePicker"===e.firstInput._dropDownDisplayMode);s.addFilter(a,i)}if(""!==i||-1!==["NULL","NOT_NULL","EMPTY","NOT_EMPTY"].indexOf(n)){const l=s.createFilter(t._filterType,i,n,void 0,t.formatString,t.locale,"timePicker"===e.secondInput._dropDownDisplayMode);s.addFilter(a,l)}let o=e.firstList.selectedIndexes[0],d=e.secondList.selectedIndexes[0];const u=s.stringConditions;l&&"string"==typeof l&&(o=u.findIndex((e=>e===r))),i&&"string"==typeof i&&(d=u.findIndex((e=>e===n))),e.cacheFilter(o,e.logicalOperatorList.selectedIndexes[0],d)}getFilterInputValue(e){return e.value}excelFilter(){const e=this,t=e.context;if(Array.isArray(t.dataSource))return void e.customExcelFilter();const l=e.tree,a=e.filterObject;if(a.clear(),e.customItems=[],l._menuItems[0].selected)return void e.excelClear();const i=l.selectedIndexes;if(i.forEach((function(i){const s=l._menuItems[i];if(s instanceof Smart.TreeItem){const l=s.value;if(s.hasAttribute("default-item"))if(l instanceof Date){const i=new Smart.FilterGroup,s=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),n=i.createFilter(t._filterType,s,"GREATER_THAN_OR_EQUAL",void 0,t.formatString,t.locale,e.timeOnly),c=i.createFilter(t._filterType,r,"LESS_THAN_OR_EQUAL",void 0,t.formatString,t.locale,e.timeOnly);i.addFilter("and",n),i.addFilter("and",c),a.addFilter("or",i)}else{const i=e.getExcelComparison(l),s=a.createFilter(t._filterType,l,i,void 0,t.formatString,t.locale,e.timeOnly);a.addFilter("or",s)}else e.customItems.push(s)}})),0===i.length){const l=e.getExcelComparison("Empty Filter"),i=a.createFilter(t._filterType,"Empty Filter",l,void 0,t.formatString,t.locale,e.timeOnly);a.addFilter("or",i)}e.cachedFilter=i.slice(0)}customExcelFilter(){const e=this,t=e.tree;if(delete e.customExcelFilterObjects,t._menuItems[0].selected)return;const l=e.context,a=[],i=t.selectedIndexes;i.forEach((function(i){const s=t._menuItems[i];if(s instanceof Smart.TreeItem){let t=s.value;if(!Array.isArray(t))return;Array.isArray(t[0])||(t=[t]);const i=new Smart.Utilities.FilterGroup;for(let a=0;a<t.length;a++){const s=t[a],r=e.operationsMapping[s[1]],n=i.createFilter(l._filterType,s[2],r,void 0,l.formatString,l.locale,e.timeOnly);i.addFilter("and",n)}a.push(i)}})),e.customExcelFilterObjects=a,e.cachedFilter=i.slice(0)}getExcelComparison(e){return""===e?"NULL":"EQUAL"}filterBuilderFilter(){const e=this,t=e.filterBuilder.value,l="string"===e.context.filterType&&e.caseSensitive.checked,a={filters:[]};!function t(a,i){const s=new Smart.Utilities.FilterGroup,r=a[1];i.logicalOperator=r;for(let n=0;n<a.length;n++){if(1===n)continue;const c=a[n];if(Array.isArray(c))if(Array.isArray(c[0])){const e={filters:[]};i.filters.push(e),t(c,e)}else s.addFilter(r,e.createFilterBuilderFilter(s,c,l))}s.filters.length>0&&i.filters.push(s)}(t,a),e.filterBuilderObject=a,e.cachedFilter={filterBuilder:JSON.parse(JSON.stringify(e.filterBuilder.value),(function(e,t){return/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$/.test(t)?new Date(t):t})),caseSensitive:l}}createFilterBuilderFilter(e,t,l){const a=this.context;let i=this.operationsMapping[t[1]];return l&&-1!==["CONTAINS","DOES_NOT_CONTAIN","STARTS_WITH","ENDS_WITH","EQUAL"].indexOf(i)&&(i+="_CASE_SENSITIVE"),e.createFilter(a._filterType,t[2],i,void 0,a.formatString,a.locale,!1)}defaultClear(){const e=this;e.firstList.selectedIndexes=[e.defaultListSelection],e.firstInput.value="",e.logicalOperatorList.selectedIndexes=[0],e.secondList.selectedIndexes=[e.defaultListSelection],e.secondInput.value="",e.filterObject.clear(),e.cacheFilter(e.defaultListSelection,0,e.defaultListSelection)}excelClear(){const e=this;0!==e.tree.offsetHeight&&e.tree.select("0"),e.filterObject.clear(),e.cachedFilter=e.tree.selectedIndexes.slice(0)}filterBuilderClear(){const e=this;e.filterBuilder.value=["and"],"string"===e.context.filterType&&(e.caseSensitive.checked=!1),e.cachedFilter={filterBuilder:["and"],caseSensitive:!1}}defaultCancel(){const e=this;let t=null,l=null;if(e.filterObject){const a=e.filterObject.stringConditions,i=e.filterObject.numericConditions,s=e.filterObject.booleanConditions,r=e.filterObject.dateConditions;t=a[e.cachedFilter.firstFilterComparison],l=a[e.cachedFilter.secondFilterComparison],e.cachedFilter.firstFilterValue&&"string"!=typeof e.cachedFilter.firstFilterValue&&(!0===e.cachedFilter.firstFilterValue||!1===e.cachedFilter.firstFilterValue?(t=s[e.cachedFilter.firstFilterComparison],l=s[e.cachedFilter.secondFilterComparison]):e.cachedFilter.firstFilterValue&&e.cachedFilter.firstFilterValue instanceof Date?(t=r[e.cachedFilter.firstFilterComparison],l=r[e.cachedFilter.secondFilterComparison]):(t=i[e.cachedFilter.firstFilterComparison],l=i[e.cachedFilter.secondFilterComparison]))}let a=-1;e.firstList.dataSource.find(((e,l)=>{if(e.value===t)return a=l,e}));let i=-1;e.secondList.dataSource.find(((e,t)=>{if(e.value===l)return i=t,e})),e.firstList.selectedIndexes=[a],e.firstInput.value=e.cachedFilter.firstFilterValue,e.cachedFilter.firstFilterCaseSensitive&&e.firstInputMatchCase.classList.add("active"),e.logicalOperatorList.selectedIndexes=[e.cachedFilter.logicalOperator],e.secondList.selectedIndexes=[i],e.secondInput.value=e.cachedFilter.secondFilterValue,e.cachedFilter.firstFilterCaseSensitive&&e.firstInputMatchCase.classList.add("active"),e.cachedFilter.secondFilterCaseSensitive&&e.secondInputMatchCase.classList.add("active")}excelCancel(){const e=this;if(e.cachedFilter&&e.cachedFilter.firstFilterValue){const t=e.cachedFilter.firstFilterValue,l=e.cachedFilter.secondFilterValue,a=e.cachedFilter.firstFilterComparison,i=e.cachedFilter.secondFilterComparison;let s=e.filterObject.stringConditions;if(isNaN(parseFloat(t))||(s=e.filterObject.numericConditions),e.dataSource){let r=[];return e.dataSource.forEach(((e,n)=>{r.push("0."+n),e.label===t||e.label===l?("NOT_EQUAL"!==s[a]&&"DOES_NOT_CONTAIN"!==s[a]||r.pop(),"NOT_EQUAL"!==s[i]&&"DOES_NOT_CONTAIN"!==s[i]||r.pop()):e.label===t&&e.label===l||("EQUAL"!==s[a]&&"EQUAL_CASE_SENSITIVE"!==s[a]&&"CONTAINS"!==s[a]&&"ENDS_WITH"!==s[a]&&"STARTS_WITH"!==s[a]||r.pop(),"EQUAL"!==s[i]&&"EQUAL_CASE_SENSITIVE"!==s[i]&&"CONTAINS"!==s[i]&&"ENDS_WITH"!==s[i]&&"STARTS_WITH"!==s[i]||r.pop())})),void setTimeout((()=>{e.tree.selectedIndexes=r}))}}else if(e.cachedFilter&&e.cachedFilter.filters&&e.dataSource){let t=[];return e.dataSource.forEach(((l,a)=>{t.push("0."+a);let i=!1;e.cachedFilter.filters.forEach((e=>{e.value===l.label&&(i=!0)})),i||t.pop()})),void setTimeout((()=>{e.tree.selectedIndexes=t}))}e.tree.selectedIndexes=e.cachedFilter.slice(0)}filterBuilderCancel(){const e=this;e.filterBuilder.value=e.cachedFilter.filterBuilder,"string"===e.context.filterType&&(e.caseSensitive.checked=e.cachedFilter.caseSensitive)}createExcelHTMLStructure(){const e=this,t=e.context,l=document.createElement("smart-tree"),a={data:t.data,dataField:t.dataField,filterType:t._filterType};if(t.dataSource&&Array.isArray(t.dataSource))e.processCustomDataSource(l);else{if(t.data&&t.dataField||t.error(t.localize("missingProperty")),"date"===t.filterType){a.formatString=t.formatString,a.displayMode=e.displayMode,e.dataSource=e.filterObject.getUniqueValues(a,t);try{e.getHierarchicalDataSource(e.displayMode)}catch(e){t.error(t.localize("mismatchedProperties"))}e.timeOnly?l.classList.add("standard-excel"):l.classList.add("date-excel")}else e.dataSource=e.filterObject.getUniqueValues(a,t),l.classList.add("standard-excel");"function"==typeof t.dataSource&&(e.dataSource=t.dataSource(e.dataSource)||e.dataSource)}l.animation=t.animation,l.disabled=t.disabled,l.unfocusable=t.unfocusable,l.dataSource=[{label:t.localize("selectAll"),value:"",items:e.dataSource,expanded:!0,selected:!0}],l.selectionMode="checkBox",l.hasThreeStates=!0,l.theme=t.theme,l.animation="none",l.toggleMode="arrow",l.rightToLeft=t.rightToLeft,l.addEventListener("collapsing",(function(e){1===e.detail.item.level&&e.preventDefault()})),l._onCompleted=function(){if(e.cachedFilter=l.selectedIndexes.slice(0),l.classList.contains("date-excel"))for(let e in l._menuItems){if("0"===e)continue;const t=l._menuItems[e];t.firstElementChild.style.paddingLeft=20*(t.level-1)-10+"px"}else l._menuItems[0].firstElementChild.style.paddingLeft=0;l.selectAll=l._menuItems[0],l.blanks=l.querySelector('[label="'+t.localize("blanks")+'"]'),"en"!==t.locale&&(l.selectAll&&(l.selectAll.label=t.localize("selectAll")),l.blanks&&(l.blanks.label=t.localize("blanks")))},e.tree=l,t.$.mainContainer.appendChild(l)}processCustomDataSource(e){const t=this.context.dataSource;e.classList.add("standard-excel"),this.dataSource=t}createBuilderHTMLStructure(){const e=this,t=e.context,l=document.createElement("smart-filter-builder"),a=t.dataField,i="numeric"===t.filterType?"number":t.filterType;if(e.filterBuilder=l,l.animation=t.animation,l.disabled=t.disabled,l.unfocusable=t.unfocusable,l.value=["and"],l.fields=[{label:a,dataField:a,dataType:i,filterOperations:e.filterBuilderOperations}],e.localizeFilterBuilder(),t.$.mainContainer.appendChild(l),"string"===i){const l=document.createElement("smart-check-box");l.classList.add("case-sensitive"),l.innerHTML="Case sensitive",l.animation=t.animation,l.disabled=t.disabled,l.unfocusable=t.unfocusable,l.checked=!1,e.caseSensitive=l,t.$.mainContainer.appendChild(l)}e.filterBuilderObject={filters:[]},e.cachedFilter={filterBuilder:["and"],caseSensitive:!1}}localizeFilterBuilder(){const e=this.context,t=this.filterBuilder;let l=t.messages[e.locale];l||(l={},t.messages[e.locale]=l),t.customOperations=[{name:"NULL",label:e.localize("null"),hideValue:!0},{name:"NOT_NULL",label:e.localize("notNull"),hideValue:!0}],l.addCondition=e.localize("addCondition"),l.addGroup=e.localize("addGroup"),l["<"]=e.localize("lessThan"),l["<="]=e.localize("lessThanOrEqual"),l["<>"]=e.localize("notEqual"),l["="]=e.localize("equal"),l[">"]=e.localize("greaterThan"),l[">="]=e.localize("greaterThanOrEqual"),l.and=e.localize("and"),l.contains=e.localize("contains"),l.endswith=e.localize("endsWith"),l.isblank=e.localize("empty"),l.isnotblank=e.localize("notEmpty"),l.notcontains=e.localize("doesNotContain"),l.or=e.localize("or"),l.startswith=e.localize("startsWith"),l.dateTabLabel=e.localize("dateTabLabel"),l.timeTabLabel=e.localize("timeTabLabel"),t.formatStringDate=e.formatString,t.formatStringDateTime=e.formatString,t.locale=e.locale,t.valuePlaceholder=e.localize("filterBuilderPlaceholder")}evaluate(e){const t=this,l=t.context;if("default"===l.mode||"basic"===l.mode)return t.filterObject.evaluate(e);if("excel"===l.mode){let a=!1;if(Array.isArray(l.dataSource)){if(!t.customExcelFilterObjects||0===t.customExcelFilterObjects.length)return!0;for(let l=0;l<t.customExcelFilterObjects.length;l++)a=a||t.customExcelFilterObjects[l].evaluate(e);return a}if(t.customItems&&t.customItems.length>0){if(t.filterObject.filters.length>0&&(a=t.filterObject.evaluate(e)),t.customItems&&l.evaluateFilterExpression)for(let i=0;i<t.customItems.length;i++){const s=l.evaluateFilterExpression(e,t.customItems[i].value);void 0!==s&&(a=a||s)}}else a=t.filterObject.evaluate(e);return a}return!t.filterBuilderObject.logicalOperator||function t(l){let a="and"===l.logicalOperator;for(let i=0;i<l.filters.length;i++){let s;s=l.filters[i]instanceof Smart.Utilities.FilterGroup?l.filters[i].evaluate(e):t(l.filters[i]),a="and"===l.logicalOperator?a&&s:a||s}return a}(t.filterBuilderObject)}}),Smart.Utilities.Assign("NumericFilterHandler",class extends Smart.Utilities.BaseFilterHandler{appendInputs(){let e=this,t=document.createElement("smart-number-input"),l=document.createElement("smart-number-input");t.placeholder=e.context.localize("placeholderNumber"),l.placeholder=e.context.localize("placeholderNumber"),t.nullable=!0,t.spinButtons=!0,t.value=null,l.nullable=!0,l.spinButtons=!0,l.value=null,e.firstInput=t,e.secondInput=l}getFilterInputValue(e){return null===e.value||""===e.value?"":parseFloat(e.value)}}),Smart.Utilities.Assign("StringFilterHandler",class extends Smart.Utilities.BaseFilterHandler{setDefaults(){const e=this,t=e.context;e.defaultListSource=[{prefix:'<span class="smart-icon smart-icon-empty"></span>',value:"EMPTY",label:t.localize("empty")},{prefix:'<span class="smart-icon smart-icon-not-empty"></span>',value:"NOT_EMPTY",label:t.localize("notEmpty")},{prefix:'<span class="smart-icon smart-icon-contains"></span>',value:"CONTAINS",label:t.localize("contains")},{prefix:'<span class="smart-icon smart-icon-does-not-contain"></span>',value:"DOES_NOT_CONTAIN",label:t.localize("doesNotContain")},{prefix:'<span class="smart-icon smart-icon-starts-with"></span>',value:"STARTS_WITH",label:t.localize("startsWith")},{prefix:'<span class="smart-icon smart-icon-ends-with"></span>',value:"ENDS_WITH",label:t.localize("endsWith")},{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("equal")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("notEqual")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("null")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("notNull")}],e.filterBuilderOperations=["contains","isblank","isnotblank","notcontains","startswith","endswith","=","NULL","NOT_NULL"],e.defaultListSelection=2}appendInputs(){const e=this,t=document.createElement("input"),l=document.createElement("input");t.placeholder=e.context.localize("placeholderValue"),t.setAttribute("aria-label",t.placeholder),l.placeholder=e.context.localize("placeholderValue"),l.setAttribute("aria-label",l.placeholder),t.classList.add("smart-input"),l.classList.add("smart-input"),e.firstInput=t,e.secondInput=l,e.firstInputMatchCase.onclick=()=>{e.firstInputMatchCase.classList.toggle("active")},e.secondInputMatchCase.onclick=()=>{e.secondInputMatchCase.classList.toggle("active")};const a=(e,t,l)=>{if(0===e.selectedValues.length)return t.classList.remove("case-sensitive"),void l.classList.remove("case-sensitive");const a=e.selectedValues[0];t.classList.remove("case-sensitive"),l.classList.remove("case-sensitive"),["EQUAL","NOT_EQUAL","CONTAINS","DOES_NOT_CONTAIN","STARTS_WITH","ENDS_WITH"].indexOf(a)>=0&&(t.classList.add("case-sensitive"),l.classList.add("case-sensitive"))};e.firstList.onchange=()=>{a(e.firstList,e.firstInput,e.firstInputMatchCase)},e.secondList.onchange=()=>{a(e.secondList,e.secondInput,e.secondInputMatchCase)},setTimeout((()=>{a(e.firstList,e.firstInput,e.firstInputMatchCase),a(e.secondList,e.secondInput,e.secondInputMatchCase)}),50)}getExcelComparison(e){return""===e?"EMPTY":"EQUAL_CASE_SENSITIVE"}}),Smart.Utilities.Assign("DateFilterHandler",class extends Smart.Utilities.BaseFilterHandler{cacheFilter(e,t,l){const a=this;a.cachedFilter={firstFilterComparison:e,firstFilterValue:a.firstInput.getValue(),logicalOperator:t,secondFilterComparison:l,secondFilterValue:a.secondInput.getValue()}}appendInputs(){let e=this,t=e.context,l=document.createElement("smart-date-input"),a=document.createElement("smart-date-input");t.formatString&&!(t.formatString.indexOf("d")>=0||t.formatString.indexOf("M")>=0||t.formatString.indexOf("y")>=0)&&(l=document.createElement("smart-time-input"),a=document.createElement("smart-time-input")),l.calendarButton=!0,l.editMode="partial",l.formatString=t.formatString,l.dropDownDisplayMode="auto",l.locale=t.locale,l.autoClose=!0,l.messages[t.locale]||(l.messages[t.locale]={}),l.messages[t.locale].dateTabLabel=t.localize("dateTabLabel"),l.messages[t.locale].timeTabLabel=t.localize("timeTabLabel"),l.nullable=!0,l.value=null,a.autoClose=!0,a.calendarButton=!0,a.formatString=t.formatString,a.dropDownDisplayMode="auto",a.locale=t.locale,a.messages[t.locale]||(a.messages[t.locale]={}),a.messages[t.locale].dateTabLabel=t.localize("dateTabLabel"),a.messages[t.locale].timeTabLabel=t.localize("timeTabLabel"),a.nullable=!0,a.value=null,e.firstInput=l,e.secondInput=a}getFilterInputValue(e){if(null===e.value)return"";const t=e.getDate();return"calendar"===this.displayMode&&t&&t.setHours(0,0,0),t}defaultClear(){const e=this;e.firstList.selectedIndexes=[e.defaultListSelection],e.firstInput.value=null,e.logicalOperatorList.selectedIndexes=[0],e.secondList.selectedIndexes=[e.defaultListSelection],e.secondInput.value=null,e.filterObject.clear(),e.cacheFilter(e.defaultListSelection,0,e.defaultListSelection)}getHierarchicalDataSource(e){const t=this,l=t.dataSource,a={},i=[];let s;if("timePicker"!==e){""===l[l.length-1].value&&(s=l[l.length-1],l.pop()),l.forEach((function(e){const l=e.value,i=l.getFullYear(),s=new Intl.DateTimeFormat(t.context.locale,{month:"long"}).format(l);a[i]||(a[i]={}),a[i][s]||(a[i][s]=e.value)}));for(let e in a){const t={expanded:!0,label:e,items:[],customAttribute:"default-item"};i.push(t);for(let l in a[e]){const i={value:a[e][l],expanded:!0,label:l,items:[],customAttribute:"default-item"};t.items.push(i)}}s&&i.push(s),t.dataSource=i}}}),Smart.Utilities.Assign("BooleanFilterHandler",class extends Smart.Utilities.BaseFilterHandler{cacheFilter(e,t,l){const a=this;a.cachedFilter={firstFilterComparison:e,firstFilterValue:a.firstInput.selectedIndexes.slice(0),logicalOperator:t,secondFilterComparison:l,secondFilterValue:a.secondInput.selectedIndexes.slice(0)}}setDefaults(){const e=this,t=e.context;e.defaultListSource=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("equal")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("notEqual")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("null")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("notNull")}],e.filterBuilderOperations=["=","<>","NULL","NOT_NULL"],e.defaultListSelection=0}appendInputs(){const e=this,t=document.createElement("smart-input"),l=document.createElement("smart-input");t.dataSource=[{value:!0,label:"true"},{value:!1,label:"false"}],t.placeholder=e.context.localize("placeholderBoolean"),t.selectedIndexes=[],t.selectionMode="zeroOrOne",t.readonly=!0,t.dropDownButtonPosition="right",l.dataSource=[{value:!0,label:"true"},{value:!1,label:"false"}],l.placeholder=e.context.localize("placeholderBoolean"),l.selectedIndexes=[],l.selectionMode="zeroOrOne",l.readonly=!0,l.dropDownButtonPosition="right",e.firstInput=t,e.secondInput=l}getFilterInputValue(e){return 0===e.selectedValues.length?"":!0===e.selectedValues[0]}defaultClear(){const e=this;e.firstList.selectedIndexes=[e.defaultListSelection],e.firstInput.selectedIndexes=[],e.logicalOperatorList.selectedIndexes=[0],e.secondList.selectedIndexes=[e.defaultListSelection],e.secondInput.selectedIndexes=[],e.filterObject.clear(),e.cacheFilter(e.defaultListSelection,0,e.defaultListSelection)}defaultCancel(){const e=this;e.firstList.selectedIndexes=[e.cachedFilter.firstFilterComparison],e.firstInput.selectedIndexes=e.cachedFilter.firstFilterValue,e.logicalOperatorList.selectedIndexes=[e.cachedFilter.logicalOperator],e.secondList.selectedIndexes=[e.cachedFilter.secondFilterComparison],e.secondInput.selectedIndexes=e.cachedFilter.secondFilterValue}});
|
|
6
|
+
Smart("smart-filter-panel",class extends Smart.BaseElement{static get properties(){return{buttons:{value:["clear","filter"],type:"array"},data:{value:null,type:"array?",reflectToAttribute:!1},dataField:{value:null,type:"string?"},dataSource:{value:null,type:"any",reflectToAttribute:!1},evaluateFilterExpression:{value:null,type:"function?",reflectToAttribute:!1},filterType:{value:"string",allowedValues:["numeric","string","date","boolean"],type:"string"},formatString:{value:"d",type:"string"},messages:{value:{en:{addCondition:"Add Condition",addGroup:"Add Group",and:"and",blanks:"(Blanks)",cancel:"Cancel",clear:"Clear",contains:"contains",containsCaseSensitive:"contains (case sensitive)",dateTabLabel:"DATE",doesNotContain:"does not contain",doesNotContainCaseSensitive:"does not contain (case sensitive)",empty:"empty",endsWith:"ends with",endsWithCaseSensitive:"ends with (case sensitive)",equal:"equal",equalCaseSensitive:"equal (case sensitive)",filter:"Filter",greaterThan:"greater than",greaterThanOrEqual:"greater than or equal",lessThan:"less than",lessThanOrEqual:"less than or equal",mismatchedProperties:'smartFilterPanel: The "filterType" and the data type of the selected "dataField" are mismatched.',missingProperty:'smartFilterPanel: When mode is \'excel\', either "data" and "dataField" or "dataSource" of type Array have to be set.',notEmpty:"not empty",notEqual:"not equal",notNull:"not null",null:"null ",or:"or",placeholderBoolean:"Select value",placeholderDate:"Enter date",placeholderNumber:"Enter number",placeholderTime:"Enter time",placeholderValue:"Enter value",selectAll:"(Select All)",showRows:"Show rows where:",startsWith:"starts with",startsWithCaseSensitive:"starts with (case sensitive)",matchCase:"Match Case",timeTabLabel:"TIME",true:"true",false:"false"}},type:"object",extend:!0},mode:{value:"default",allowedValues:["basic","default","excel"],type:"string"}}}static get listeners(){return{"cancelButton.click":"cancel","clearButton.click":"clear","filterButton.click":"filter"}}template(){return'<div id="container" class="smart-container" role="presentation">\n <div id="label" class="smart-filter-panel-label"></div>\n <div id="mainContainer" role="presentation"></div>\n <div id="buttonContainer" class="smart-filter-panel-button-container" role="presentation">\n <smart-button id="filterButton" class="primary" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n <smart-button id="clearButton" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n <smart-button id="cancelButton" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n </div>\n </div>'}static get styleUrls(){return["smart.grid.css","smart.dropdownlist.css","smart.menu.css","smart.filterpanel.css","smart.textbox.css"]}ready(){super.ready()}render(){const e=this,t=e.filterType;e.$.label.id||(e.$.label.id=e.id+"Label"),e.setAttribute("role","dialog"),e.setAttribute("aria-labelledby",e.$.label.id),e._localize(),e._setButtonsVisibility(),e._filterType=t+"Filter",e._filterHandler=new(Smart.Utilities[t.slice(0,1).toUpperCase()+t.slice(1)+"FilterHandler"])(e),super.render()}cancel(){const e=this;e._filterHandler[e.mode+"Cancel"](),e.$.fireEvent("cancel")}clear(){const e=this;e._filterHandler[e.mode+"Clear"](),e.$.fireEvent("clear")}reset(){const e=this;e.$.clearButton.removeAttribute("hover"),e.$.filterButton.removeAttribute("hover"),e.$.cancelButton.removeAttribute("hover"),e._filterHandler.firstInputMatchCase&&e._filterHandler.firstInputMatchCase.classList.remove("active"),e._filterHandler.secondInputMatchCase&&e._filterHandler.secondInputMatchCase.classList.remove("active"),e._filterHandler[e.mode+"Clear"](),e._filterHandler.filterObject=new Smart.Utilities.FilterGroup}getFilter(){if(this._filterHandler){const e=new Smart.Utilities.FilterGroup;for(let t in this._filterHandler.filterObject)e[t]=this._filterHandler.filterObject[t];return e}return null}evaluate(e){try{return this._filterHandler.evaluate(e)}catch(e){return!1}}filter(){const e=this;e._filterHandler[e.mode+"Filter"](),e.$.fireEvent("filter")}getState(){return this._filterHandler.cachedFilter}loadState(e){try{const t=this;t._filterHandler.cachedFilter=e,t._filterHandler[t.mode+"Cancel"]()}catch(e){}}propertyChangedHandler(e,t,l){super.propertyChangedHandler(e,t,l);const a=this,i=a._filterHandler;function s(){a.$.mainContainer.innerHTML="",function(){const e=["cachedFilter","caseSensitive","customExcelFilterObjects","customItems","dataSource","defaultListSelection","defaultListSource","displayMode","filterBuilder","filterBuilderObject","filterBuilderOperations","filterObject","firstInput","firstList","operationsMapping","operatorList","secondInput","secondList","timeOnly","tree"];e.forEach((function(t){delete i[e[t]]})),delete a._filterHandler}(),a._filterHandler=new(Smart.Utilities[a.filterType.slice(0,1).toUpperCase()+a.filterType.slice(1)+"FilterHandler"])(a)}switch(e){case"animation":case"disabled":case"rightToLeft":case"unfocusable":switch(a.mode){case"default":case"basic":[i.firstList,i.firstInput,i.logicalOperatorList,i.secondList,i.secondInput].forEach((function(t){t[e]=l}));break;case"excel":i.tree[e]=l;break;case"filterBuilder":i.filterBuilder[e]=l,i.caseSensitive&&(i.caseSensitive[e]=l)}break;case"buttons":a._setButtonsVisibility();break;case"data":case"dataField":"excel"!==a.mode||Array.isArray(a.dataSource)||s();break;case"dataSource":"excel"===a.mode&&s();break;case"filterType":a._filterType=l+"Filter",s();break;case"mode":s();break;case"formatString":if("date"!==a.filterType)return;switch(a.mode){case"default":case"basic":i.firstInput.formatString=l,i.secondInput.formatString=l;break;case"excel":s();break;case"filterBuilder":i.filterBuilder.formatStringDate=l,i.filterBuilder.formatStringDateTime=l}break;case"locale":case"messages":switch(a._localize(),a.mode){case"default":case"basic":{const t=i.firstList.selectedIndex,l=i.logicalOperatorList.selectedIndex,s=i.secondList.selectedIndex,r=[i.firstInput,i.secondInput];switch(i.setDefaults(),i.firstList.dataSource=JSON.parse(JSON.stringify(i.defaultListSource)),i.logicalOperatorList.dataSource=[{value:0,label:a.localize("and")},{value:1,label:a.localize("or")}],i.secondList.dataSource=JSON.parse(JSON.stringify(i.defaultListSource)),a.filterType){case"date":r.forEach((function(t){t.messages[a.locale]||(t.messages[a.locale]={});const l=a.localize("dateTabLabel");l&&(t.messages[a.locale].dateTabLabel=l);const i=a.localize("timeTabLabel");if(i&&(t.messages[a.locale].timeTabLabel=i),"locale"===e&&(t.locale=a.locale),"timePicker"===t._dropDownDisplayMode){const e=a.localize("placeholderTime");e&&(t.placeholder=e,t.placeholder=e)}else{const e=a.localize("placeholderDate");e&&(t.placeholder=e,t.placeholder=e)}}));break;case"numeric":r[0].placeholder=a.localize("placeholderNumber"),r[1].placeholder=a.localize("placeholderNumber");break;case"string":r[0].placeholder=a.localize("placeholderValue"),r[1].placeholder=a.localize("placeholderValue");break;case"boolean":r[0].placeholder=a.localize("placeholderBoolean"),r[1].placeholder=a.localize("placeholderBoolean")}i.firstList.selectedIndex=t,i.logicalOperatorList.selectedIndex=l,i.secondList.selectedIndex=s;break}case"excel":i.tree.selectAll&&(i.tree.selectAll.label=a.localize("selectAll")),i.tree.blanks&&(i.tree.blanks.label=a.localize("blanks"));break;case"filterBuilder":i.localizeFilterBuilder(),"messages"===e&&(i.filterBuilder._localizeInitialValues(),i.filterBuilder._refresh()),i.filterBuilder.$.scrollableContainer.refresh()}}}_localize(){const e=this;e.localize("showRows")&&(e.$.label.innerHTML=e.localize("showRows")),e.localize("filter")&&(e.$.filterButton.innerHTML=e.localize("filter")),e.localize("clear")&&(e.$.clearButton.innerHTML=e.localize("clear")),e.localize("cancel")&&(e.$.cancelButton.innerHTML=e.localize("cancel"))}_setButtonsVisibility(){const e=this,t=e.buttons;["cancel","clear","filter"].forEach((function(l){-1!==t.indexOf(l)?e["$"+l+"Button"].removeClass("smart-hidden"):e["$"+l+"Button"].addClass("smart-hidden")}))}}),Smart.Utilities.Assign("BaseFilterHandler",class{constructor(e){const t=this;if(t.basicFilter=t.defaultFilter,t.basicClear=t.defaultClear,t.basicCancel=t.defaultCancel,t.context=e,t.filterObject=new Smart.Utilities.FilterGroup,t.setDefaults(),"date"===e.filterType){const l=new Smart.Utilities.DateTime,a=e.formatString,i=l.getParseRegExp(l.calendar,a.replace(/y+/g,"yyyyy"));t.displayMode=Smart.Utilities.DateTime.detectDisplayMode(l,a,i),t.timeOnly="timePicker"===t.displayMode}"default"!==e.mode&&"basic"!==e.mode?(t.operationsMapping={"=":"EQUAL","<>":"NOT_EQUAL","<":"LESS_THAN",">":"GREATER_THAN","<=":"LESS_THAN_OR_EQUAL",">=":"GREATER_THAN_OR_EQUAL",isblank:"EMPTY",isnotblank:"NOT_EMPTY",contains:"CONTAINS",notcontains:"DOES_NOT_CONTAIN",startswith:"STARTS_WITH",endswith:"ENDS_WITH",NULL:"NULL",NOT_NULL:"NOT_NULL"},"excel"===e.mode?t.createExcelHTMLStructure():"filterBuilder"===e.mode&&t.createBuilderHTMLStructure()):t.createDefaultHTMLStructure()}setDefaults(){const e=this,t=e.context;e.defaultListSource=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("equal")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("notEqual")},{prefix:'<span class="smart-icon smart-icon-less-than"></span>',value:"LESS_THAN",label:t.localize("lessThan")},{prefix:'<span class="smart-icon smart-icon-less-than-equal"></span>',value:"LESS_THAN_OR_EQUAL",label:t.localize("lessThanOrEqual")},{prefix:'<span class="smart-icon smart-icon-greater-than"></span>',value:"GREATER_THAN",label:t.localize("greaterThan")},{prefix:'<span class="smart-icon smart-icon-greater-than-equal"></span>',value:"GREATER_THAN_OR_EQUAL",label:t.localize("greaterThanOrEqual")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("null")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("notNull")}],e.filterBuilderOperations=["<","=","<>","<=",">",">=","NULL","NOT_NULL"],e.defaultListSelection=2}createDefaultHTMLStructure(){const e=this,t=e.context,l=document.createElement("smart-input"),a=document.createElement("smart-input"),i=document.createElement("smart-input"),s=document.createDocumentFragment(),r=e=>{e.readonly=!0,e.dropDownButtonPosition="right"};l.classList.add("smart-filter-panel-list"),l.dataSource=JSON.parse(JSON.stringify(this.defaultListSource)),l.selectedIndex=e.defaultListSelection,r(l),a.classList.add("smart-filter-panel-operator-list"),a.dataSource=[{value:0,label:t.localize("and")},{value:1,label:t.localize("or")}],r(a),i.classList.add("smart-filter-panel-list"),i.dataSource=JSON.parse(JSON.stringify(this.defaultListSource)),i.selectedIndex=e.defaultListSelection,r(i),e.firstList=l,e.logicalOperatorList=a,e.secondList=i;const n=document.createElement("span");n.classList.add("smart-icon","smart-icon-font-size"),n.title=t.localize("matchCase");const c=document.createElement("span");c.classList.add("smart-icon","smart-icon-font-size"),c.title=t.localize("matchCase"),e.firstInputMatchCase=n,e.secondInputMatchCase=c,e.appendInputs(),e.firstInput.classList.add("smart-filter-panel-input"),e.secondInput.classList.add("smart-filter-panel-input"),"basic"===t.mode&&(e.secondList.classList.add("smart-hidden"),e.secondInput.classList.add("smart-hidden"),e.logicalOperatorList.classList.add("smart-hidden"),e.secondInputMatchCase.classList.add("smart-hidden")),a.dropDownHeight="auto",a.selectedIndex=0,[l,e.firstInput,e.firstInputMatchCase,a,i,e.secondInput,e.secondInputMatchCase].forEach((function(e){e.animation=t.animation,e.disabled=t.disabled,e.unfocusable=t.unfocusable,e.dropDownPosition="bottom",e.dropDownAppendTo="body",e.dropDownMaxHeight=200,e.rightToLeft=t.rightToLeft,s.appendChild(e)})),e.context.$.mainContainer.appendChild(s),e.cacheFilter(e.defaultListSelection,0,e.defaultListSelection)}cacheFilter(e,t,l){const a=this;a.cachedFilter={firstFilterComparison:e,firstFilterValue:a.firstInput.value,firstFilterCaseSensitive:a.firstInputMatchCase.classList.contains("active"),logicalOperator:t,secondFilterComparison:l,secondFilterValue:a.secondInput.value,secondFilterCaseSensitive:a.secondInputMatchCase.classList.contains("active")}}defaultFilter(){const e=this,t=e.context,l=e.getFilterInputValue(e.firstInput),a=parseFloat(e.logicalOperatorList.selectedValues[0]),i=e.getFilterInputValue(e.secondInput),s=e.filterObject;let r=e.firstList.selectedValues[0],n=e.secondList.selectedValues[0];s.clear();const c=e=>"CONTAINS"===e?"CONTAINS_CASE_SENSITIVE":"DOES_NOT_CONTAIN"===e?"DOES_NOT_CONTAIN_CASE_SENSITIVE":"STARTS_WITH"===e?"STARTS_WITH_CASE_SENSITIVE":"ENDS_WITH"===e?"ENDS_WITH_CASE_SENSITIVE":"EQUAL"===e?"EQUAL_CASE_SENSITIVE":"NOT_EQUAL"===e?"NOT_EQUAL_CASE_SENSITIVE":void 0;if(e.firstInputMatchCase.classList.contains("active")&&(r=c(r)),e.secondInputMatchCase.classList.contains("active")&&(n=c(n)),""!==l||-1!==["NULL","NOT_NULL","EMPTY","NOT_EMPTY"].indexOf(r)){const i=s.createFilter(t._filterType,l,r,void 0,t.formatString,t.locale,"timePicker"===e.firstInput._dropDownDisplayMode);s.addFilter(a,i)}if(""!==i||-1!==["NULL","NOT_NULL","EMPTY","NOT_EMPTY"].indexOf(n)){const l=s.createFilter(t._filterType,i,n,void 0,t.formatString,t.locale,"timePicker"===e.secondInput._dropDownDisplayMode);s.addFilter(a,l)}let o=e.firstList.selectedIndexes[0],d=e.secondList.selectedIndexes[0];const u=s.stringConditions;l&&"string"==typeof l&&(o=u.findIndex((e=>e===r))),i&&"string"==typeof i&&(d=u.findIndex((e=>e===n))),e.cacheFilter(o,e.logicalOperatorList.selectedIndexes[0],d)}getFilterInputValue(e){return e.value}excelFilter(){const e=this,t=e.context;if(Array.isArray(t.dataSource))return void e.customExcelFilter();const l=e.tree,a=e.filterObject;if(a.clear(),e.customItems=[],l._menuItems[0].selected)return void e.excelClear();const i=l.selectedIndexes;if(i.forEach((function(i){const s=l._menuItems[i];if(s instanceof Smart.TreeItem){const l=s.value;if(s.hasAttribute("default-item"))if(l instanceof Date){const i=new Smart.FilterGroup,s=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),n=i.createFilter(t._filterType,s,"GREATER_THAN_OR_EQUAL",void 0,t.formatString,t.locale,e.timeOnly),c=i.createFilter(t._filterType,r,"LESS_THAN_OR_EQUAL",void 0,t.formatString,t.locale,e.timeOnly);i.addFilter("and",n),i.addFilter("and",c),a.addFilter("or",i)}else{const i=e.getExcelComparison(l),s=a.createFilter(t._filterType,l,i,void 0,t.formatString,t.locale,e.timeOnly);a.addFilter("or",s)}else e.customItems.push(s)}})),0===i.length){const l=e.getExcelComparison("Empty Filter"),i=a.createFilter(t._filterType,"Empty Filter",l,void 0,t.formatString,t.locale,e.timeOnly);a.addFilter("or",i)}e.cachedFilter=i.slice(0)}customExcelFilter(){const e=this,t=e.tree;if(delete e.customExcelFilterObjects,t._menuItems[0].selected)return;const l=e.context,a=[],i=t.selectedIndexes;i.forEach((function(i){const s=t._menuItems[i];if(s instanceof Smart.TreeItem){let t=s.value;if(!Array.isArray(t))return;Array.isArray(t[0])||(t=[t]);const i=new Smart.Utilities.FilterGroup;for(let a=0;a<t.length;a++){const s=t[a],r=e.operationsMapping[s[1]],n=i.createFilter(l._filterType,s[2],r,void 0,l.formatString,l.locale,e.timeOnly);i.addFilter("and",n)}a.push(i)}})),e.customExcelFilterObjects=a,e.cachedFilter=i.slice(0)}getExcelComparison(e){return""===e?"NULL":"EQUAL"}filterBuilderFilter(){const e=this,t=e.filterBuilder.value,l="string"===e.context.filterType&&e.caseSensitive.checked,a={filters:[]};!function t(a,i){const s=new Smart.Utilities.FilterGroup,r=a[1];i.logicalOperator=r;for(let n=0;n<a.length;n++){if(1===n)continue;const c=a[n];if(Array.isArray(c))if(Array.isArray(c[0])){const e={filters:[]};i.filters.push(e),t(c,e)}else s.addFilter(r,e.createFilterBuilderFilter(s,c,l))}s.filters.length>0&&i.filters.push(s)}(t,a),e.filterBuilderObject=a,e.cachedFilter={filterBuilder:JSON.parse(JSON.stringify(e.filterBuilder.value),(function(e,t){return/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$/.test(t)?new Date(t):t})),caseSensitive:l}}createFilterBuilderFilter(e,t,l){const a=this.context;let i=this.operationsMapping[t[1]];return l&&-1!==["CONTAINS","DOES_NOT_CONTAIN","STARTS_WITH","ENDS_WITH","EQUAL"].indexOf(i)&&(i+="_CASE_SENSITIVE"),e.createFilter(a._filterType,t[2],i,void 0,a.formatString,a.locale,!1)}defaultClear(){const e=this;e.firstList.selectedIndexes=[e.defaultListSelection],e.firstInput.value="",e.logicalOperatorList.selectedIndexes=[0],e.secondList.selectedIndexes=[e.defaultListSelection],e.secondInput.value="",e.filterObject.clear(),e.cacheFilter(e.defaultListSelection,0,e.defaultListSelection)}excelClear(){const e=this;0!==e.tree.offsetHeight&&e.tree.select("0"),e.filterObject.clear(),e.cachedFilter=e.tree.selectedIndexes.slice(0)}filterBuilderClear(){const e=this;e.filterBuilder.value=["and"],"string"===e.context.filterType&&(e.caseSensitive.checked=!1),e.cachedFilter={filterBuilder:["and"],caseSensitive:!1}}defaultCancel(){const e=this;let t=null,l=null;if(e.filterObject){const a=e.filterObject.stringConditions,i=e.filterObject.numericConditions,s=e.filterObject.booleanConditions,r=e.filterObject.dateConditions;t=a[e.cachedFilter.firstFilterComparison],l=a[e.cachedFilter.secondFilterComparison],e.cachedFilter.firstFilterValue&&"string"!=typeof e.cachedFilter.firstFilterValue&&(!0===e.cachedFilter.firstFilterValue||!1===e.cachedFilter.firstFilterValue?(t=s[e.cachedFilter.firstFilterComparison],l=s[e.cachedFilter.secondFilterComparison]):e.cachedFilter.firstFilterValue&&e.cachedFilter.firstFilterValue instanceof Date?(t=r[e.cachedFilter.firstFilterComparison],l=r[e.cachedFilter.secondFilterComparison]):(t=i[e.cachedFilter.firstFilterComparison],l=i[e.cachedFilter.secondFilterComparison]))}let a=-1;e.firstList.dataSource.find(((e,l)=>{if(e.value===t)return a=l,e}));let i=-1;e.secondList.dataSource.find(((e,t)=>{if(e.value===l)return i=t,e})),e.firstList.selectedIndexes=[a],e.firstInput.value=e.cachedFilter.firstFilterValue,e.cachedFilter.firstFilterCaseSensitive&&e.firstInputMatchCase.classList.add("active"),e.logicalOperatorList.selectedIndexes=[e.cachedFilter.logicalOperator],e.secondList.selectedIndexes=[i],e.secondInput.value=e.cachedFilter.secondFilterValue,e.cachedFilter.firstFilterCaseSensitive&&e.firstInputMatchCase.classList.add("active"),e.cachedFilter.secondFilterCaseSensitive&&e.secondInputMatchCase.classList.add("active")}excelCancel(){const e=this;if(e.cachedFilter&&e.cachedFilter.firstFilterValue){const t=e.cachedFilter.firstFilterValue,l=e.cachedFilter.secondFilterValue,a=e.cachedFilter.firstFilterComparison,i=e.cachedFilter.secondFilterComparison;let s=e.filterObject.stringConditions;if(isNaN(parseFloat(t))||(s=e.filterObject.numericConditions),e.dataSource){let r=[];return e.dataSource.forEach(((e,n)=>{r.push("0."+n),e.label===t||e.label===l?("NOT_EQUAL"!==s[a]&&"DOES_NOT_CONTAIN"!==s[a]||r.pop(),"NOT_EQUAL"!==s[i]&&"DOES_NOT_CONTAIN"!==s[i]||r.pop()):e.label===t&&e.label===l||("EQUAL"!==s[a]&&"EQUAL_CASE_SENSITIVE"!==s[a]&&"CONTAINS"!==s[a]&&"ENDS_WITH"!==s[a]&&"STARTS_WITH"!==s[a]||r.pop(),"EQUAL"!==s[i]&&"EQUAL_CASE_SENSITIVE"!==s[i]&&"CONTAINS"!==s[i]&&"ENDS_WITH"!==s[i]&&"STARTS_WITH"!==s[i]||r.pop())})),void setTimeout((()=>{e.tree.selectedIndexes=r}))}}else if(e.cachedFilter&&e.cachedFilter.filters&&e.dataSource){let t=[];return e.dataSource.forEach(((l,a)=>{t.push("0."+a);let i=!1;e.cachedFilter.filters.forEach((e=>{"booleanFilter"===e.type&&e.value===l.value&&(i=!0),e.value===l.label&&(i=!0)})),i||t.pop()})),void setTimeout((()=>{const l=e.tree.selectedIndexes;e.tree.selectedIndexes=t,e.tree._applySelection(!1,l)}))}e.tree.selectedIndexes=e.cachedFilter.slice(0)}filterBuilderCancel(){const e=this;e.filterBuilder.value=e.cachedFilter.filterBuilder,"string"===e.context.filterType&&(e.caseSensitive.checked=e.cachedFilter.caseSensitive)}createExcelHTMLStructure(){const e=this,t=e.context,l=document.createElement("smart-tree"),a={data:t.data,dataField:t.dataField,filterType:t._filterType};if(t.dataSource&&Array.isArray(t.dataSource))e.processCustomDataSource(l);else{if(t.data&&t.dataField||t.error(t.localize("missingProperty")),"date"===t.filterType){a.formatString=t.formatString,a.displayMode=e.displayMode,e.dataSource=e.filterObject.getUniqueValues(a,t);try{e.getHierarchicalDataSource(e.displayMode)}catch(e){t.error(t.localize("mismatchedProperties"))}e.timeOnly?l.classList.add("standard-excel"):l.classList.add("date-excel")}else e.dataSource=e.filterObject.getUniqueValues(a,t),l.classList.add("standard-excel");"function"==typeof t.dataSource&&(e.dataSource=t.dataSource(e.dataSource)||e.dataSource)}l.animation=t.animation,l.disabled=t.disabled,l.unfocusable=t.unfocusable,l.dataSource=[{label:t.localize("selectAll"),value:"",items:e.dataSource,expanded:!0,selected:!0}],l.selectionMode="checkBox",l.hasThreeStates=!0,l.theme=t.theme,l.animation="none",l.toggleMode="arrow",l.rightToLeft=t.rightToLeft,l.addEventListener("collapsing",(function(e){1===e.detail.item.level&&e.preventDefault()})),l._onCompleted=function(){if(e.cachedFilter=l.selectedIndexes.slice(0),l.classList.contains("date-excel"))for(let e in l._menuItems){if("0"===e)continue;const t=l._menuItems[e];t.firstElementChild.style.paddingLeft=20*(t.level-1)-10+"px"}else l._menuItems[0].firstElementChild.style.paddingLeft=0;l.selectAll=l._menuItems[0],l.blanks=l.querySelector('[label="'+t.localize("blanks")+'"]'),"en"!==t.locale&&(l.selectAll&&(l.selectAll.label=t.localize("selectAll")),l.blanks&&(l.blanks.label=t.localize("blanks")))},e.tree=l,t.$.mainContainer.appendChild(l)}processCustomDataSource(e){const t=this.context.dataSource;e.classList.add("standard-excel"),this.dataSource=t}createBuilderHTMLStructure(){const e=this,t=e.context,l=document.createElement("smart-filter-builder"),a=t.dataField,i="numeric"===t.filterType?"number":t.filterType;if(e.filterBuilder=l,l.animation=t.animation,l.disabled=t.disabled,l.unfocusable=t.unfocusable,l.value=["and"],l.fields=[{label:a,dataField:a,dataType:i,filterOperations:e.filterBuilderOperations}],e.localizeFilterBuilder(),t.$.mainContainer.appendChild(l),"string"===i){const l=document.createElement("smart-check-box");l.classList.add("case-sensitive"),l.innerHTML="Case sensitive",l.animation=t.animation,l.disabled=t.disabled,l.unfocusable=t.unfocusable,l.checked=!1,e.caseSensitive=l,t.$.mainContainer.appendChild(l)}e.filterBuilderObject={filters:[]},e.cachedFilter={filterBuilder:["and"],caseSensitive:!1}}localizeFilterBuilder(){const e=this.context,t=this.filterBuilder;let l=t.messages[e.locale];l||(l={},t.messages[e.locale]=l),t.customOperations=[{name:"NULL",label:e.localize("null"),hideValue:!0},{name:"NOT_NULL",label:e.localize("notNull"),hideValue:!0}],l.addCondition=e.localize("addCondition"),l.addGroup=e.localize("addGroup"),l["<"]=e.localize("lessThan"),l["<="]=e.localize("lessThanOrEqual"),l["<>"]=e.localize("notEqual"),l["="]=e.localize("equal"),l[">"]=e.localize("greaterThan"),l[">="]=e.localize("greaterThanOrEqual"),l.and=e.localize("and"),l.contains=e.localize("contains"),l.endswith=e.localize("endsWith"),l.isblank=e.localize("empty"),l.isnotblank=e.localize("notEmpty"),l.notcontains=e.localize("doesNotContain"),l.or=e.localize("or"),l.startswith=e.localize("startsWith"),l.dateTabLabel=e.localize("dateTabLabel"),l.timeTabLabel=e.localize("timeTabLabel"),t.formatStringDate=e.formatString,t.formatStringDateTime=e.formatString,t.locale=e.locale,t.valuePlaceholder=e.localize("filterBuilderPlaceholder")}evaluate(e){const t=this,l=t.context;if("default"===l.mode||"basic"===l.mode)return t.filterObject.evaluate(e);if("excel"===l.mode){let a=!1;if(Array.isArray(l.dataSource)){if(!t.customExcelFilterObjects||0===t.customExcelFilterObjects.length)return!0;for(let l=0;l<t.customExcelFilterObjects.length;l++)a=a||t.customExcelFilterObjects[l].evaluate(e);return a}if(t.customItems&&t.customItems.length>0){if(t.filterObject.filters.length>0&&(a=t.filterObject.evaluate(e)),t.customItems&&l.evaluateFilterExpression)for(let i=0;i<t.customItems.length;i++){const s=l.evaluateFilterExpression(e,t.customItems[i].value);void 0!==s&&(a=a||s)}}else a=t.filterObject.evaluate(e);return a}return!t.filterBuilderObject.logicalOperator||function t(l){let a="and"===l.logicalOperator;for(let i=0;i<l.filters.length;i++){let s;s=l.filters[i]instanceof Smart.Utilities.FilterGroup?l.filters[i].evaluate(e):t(l.filters[i]),a="and"===l.logicalOperator?a&&s:a||s}return a}(t.filterBuilderObject)}}),Smart.Utilities.Assign("NumericFilterHandler",class extends Smart.Utilities.BaseFilterHandler{appendInputs(){let e=this,t=document.createElement("smart-number-input"),l=document.createElement("smart-number-input");t.placeholder=e.context.localize("placeholderNumber"),l.placeholder=e.context.localize("placeholderNumber"),t.nullable=!0,t.spinButtons=!0,t.value=null,l.nullable=!0,l.spinButtons=!0,l.value=null,e.firstInput=t,e.secondInput=l}getFilterInputValue(e){return null===e.value||""===e.value?"":parseFloat(e.value)}}),Smart.Utilities.Assign("StringFilterHandler",class extends Smart.Utilities.BaseFilterHandler{setDefaults(){const e=this,t=e.context;e.defaultListSource=[{prefix:'<span class="smart-icon smart-icon-empty"></span>',value:"EMPTY",label:t.localize("empty")},{prefix:'<span class="smart-icon smart-icon-not-empty"></span>',value:"NOT_EMPTY",label:t.localize("notEmpty")},{prefix:'<span class="smart-icon smart-icon-contains"></span>',value:"CONTAINS",label:t.localize("contains")},{prefix:'<span class="smart-icon smart-icon-does-not-contain"></span>',value:"DOES_NOT_CONTAIN",label:t.localize("doesNotContain")},{prefix:'<span class="smart-icon smart-icon-starts-with"></span>',value:"STARTS_WITH",label:t.localize("startsWith")},{prefix:'<span class="smart-icon smart-icon-ends-with"></span>',value:"ENDS_WITH",label:t.localize("endsWith")},{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("equal")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("notEqual")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("null")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("notNull")}],e.filterBuilderOperations=["contains","isblank","isnotblank","notcontains","startswith","endswith","=","NULL","NOT_NULL"],e.defaultListSelection=2}appendInputs(){const e=this,t=document.createElement("input"),l=document.createElement("input");t.placeholder=e.context.localize("placeholderValue"),t.setAttribute("aria-label",t.placeholder),l.placeholder=e.context.localize("placeholderValue"),l.setAttribute("aria-label",l.placeholder),t.classList.add("smart-input"),l.classList.add("smart-input"),e.firstInput=t,e.secondInput=l,e.firstInputMatchCase.onclick=()=>{e.firstInputMatchCase.classList.toggle("active")},e.secondInputMatchCase.onclick=()=>{e.secondInputMatchCase.classList.toggle("active")};const a=(e,t,l)=>{if(0===e.selectedValues.length)return t.classList.remove("case-sensitive"),void l.classList.remove("case-sensitive");const a=e.selectedValues[0];t.classList.remove("case-sensitive"),l.classList.remove("case-sensitive"),["EQUAL","NOT_EQUAL","CONTAINS","DOES_NOT_CONTAIN","STARTS_WITH","ENDS_WITH"].indexOf(a)>=0&&(t.classList.add("case-sensitive"),l.classList.add("case-sensitive"))};e.firstList.onchange=()=>{a(e.firstList,e.firstInput,e.firstInputMatchCase)},e.secondList.onchange=()=>{a(e.secondList,e.secondInput,e.secondInputMatchCase)},setTimeout((()=>{a(e.firstList,e.firstInput,e.firstInputMatchCase),a(e.secondList,e.secondInput,e.secondInputMatchCase)}),50)}getExcelComparison(e){return""===e?"EMPTY":"EQUAL_CASE_SENSITIVE"}}),Smart.Utilities.Assign("DateFilterHandler",class extends Smart.Utilities.BaseFilterHandler{cacheFilter(e,t,l){const a=this;a.cachedFilter={firstFilterComparison:e,firstFilterValue:a.firstInput.getValue(),logicalOperator:t,secondFilterComparison:l,secondFilterValue:a.secondInput.getValue()}}appendInputs(){let e=this,t=e.context,l=document.createElement("smart-date-input"),a=document.createElement("smart-date-input");t.formatString&&!(t.formatString.indexOf("d")>=0||t.formatString.indexOf("M")>=0||t.formatString.indexOf("y")>=0)&&(l=document.createElement("smart-time-input"),a=document.createElement("smart-time-input")),l.calendarButton=!0,l.editMode="partial",l.formatString=t.formatString,l.dropDownDisplayMode="auto",l.locale=t.locale,l.autoClose=!0,l.messages[t.locale]||(l.messages[t.locale]={}),l.messages[t.locale].dateTabLabel=t.localize("dateTabLabel"),l.messages[t.locale].timeTabLabel=t.localize("timeTabLabel"),l.nullable=!0,l.value=null,a.autoClose=!0,a.calendarButton=!0,a.formatString=t.formatString,a.dropDownDisplayMode="auto",a.locale=t.locale,a.messages[t.locale]||(a.messages[t.locale]={}),a.messages[t.locale].dateTabLabel=t.localize("dateTabLabel"),a.messages[t.locale].timeTabLabel=t.localize("timeTabLabel"),a.nullable=!0,a.value=null,e.firstInput=l,e.secondInput=a}getFilterInputValue(e){if(null===e.value)return"";const t=e.getDate();return"calendar"===this.displayMode&&t&&t.setHours(0,0,0),t}defaultClear(){const e=this;e.firstList.selectedIndexes=[e.defaultListSelection],e.firstInput.value=null,e.logicalOperatorList.selectedIndexes=[0],e.secondList.selectedIndexes=[e.defaultListSelection],e.secondInput.value=null,e.filterObject.clear(),e.cacheFilter(e.defaultListSelection,0,e.defaultListSelection)}getHierarchicalDataSource(e){const t=this,l=t.dataSource,a={},i=[];let s;if("timePicker"!==e){""===l[l.length-1].value&&(s=l[l.length-1],l.pop()),l.forEach((function(e){const l=e.value,i=l.getFullYear(),s=new Intl.DateTimeFormat(t.context.locale,{month:"long"}).format(l);a[i]||(a[i]={}),a[i][s]||(a[i][s]=e.value)}));for(let e in a){const t={expanded:!0,label:e,items:[],customAttribute:"default-item"};i.push(t);for(let l in a[e]){const i={value:a[e][l],expanded:!0,label:l,items:[],customAttribute:"default-item"};t.items.push(i)}}s&&i.push(s),t.dataSource=i}}}),Smart.Utilities.Assign("BooleanFilterHandler",class extends Smart.Utilities.BaseFilterHandler{cacheFilter(e,t,l){const a=this;a.cachedFilter={firstFilterComparison:e,firstFilterValue:a.firstInput.selectedIndexes.slice(0),logicalOperator:t,secondFilterComparison:l,secondFilterValue:a.secondInput.selectedIndexes.slice(0)}}setDefaults(){const e=this,t=e.context;e.defaultListSource=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("equal")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("notEqual")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("null")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("notNull")}],e.filterBuilderOperations=["=","<>","NULL","NOT_NULL"],e.defaultListSelection=0}appendInputs(){const e=this,t=document.createElement("smart-input"),l=document.createElement("smart-input");t.dataSource=[{value:!0,label:"true"},{value:!1,label:"false"}],t.placeholder=e.context.localize("placeholderBoolean"),t.selectedIndexes=[],t.selectionMode="zeroOrOne",t.readonly=!0,t.dropDownButtonPosition="right",l.dataSource=[{value:!0,label:"true"},{value:!1,label:"false"}],l.placeholder=e.context.localize("placeholderBoolean"),l.selectedIndexes=[],l.selectionMode="zeroOrOne",l.readonly=!0,l.dropDownButtonPosition="right",e.firstInput=t,e.secondInput=l}getFilterInputValue(e){return 0===e.selectedValues.length?"":!0===e.selectedValues[0]}defaultClear(){const e=this;e.firstList.selectedIndexes=[e.defaultListSelection],e.firstInput.selectedIndexes=[],e.logicalOperatorList.selectedIndexes=[0],e.secondList.selectedIndexes=[e.defaultListSelection],e.secondInput.selectedIndexes=[],e.filterObject.clear(),e.cacheFilter(e.defaultListSelection,0,e.defaultListSelection)}defaultCancel(){const e=this;e.firstList.selectedIndexes=[e.cachedFilter.firstFilterComparison],e.firstInput.selectedIndexes=e.cachedFilter.firstFilterValue,e.logicalOperatorList.selectedIndexes=[e.cachedFilter.logicalOperator],e.secondList.selectedIndexes=[e.cachedFilter.secondFilterComparison],e.secondInput.selectedIndexes=e.cachedFilter.secondFilterValue}});
|
package/source/smart.form.js
CHANGED
package/source/smart.format.js
CHANGED