@yesilyazilim/web.spa 1.0.90 → 1.0.92

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/index.js CHANGED
@@ -7625,9 +7625,9 @@ let $1b4e3c1abfa7ee85$export$df30df7ec97b32b5 = class DataTable extends (0, $ea0
7625
7625
  if (this._table.getSelectedRows().length > 0) this._table.deselectRow();
7626
7626
  row.select();
7627
7627
  });
7628
- if (this._selDepTableActions.length > 0) this._table.on("rowSelectionChanged", (data, rows, selected, deselected)=>{
7628
+ this._table.on("rowSelectionChanged", (data, rows, selected, deselected)=>{
7629
7629
  this.rowSelected.raise(data);
7630
- for (const sda of this._selDepTableActions){
7630
+ if (this._selDepTableActions.length > 0) for (const sda of this._selDepTableActions){
7631
7631
  const enabled = sda.tai.enabledFnc ? sda.tai.enabledFnc(data) : true;
7632
7632
  sda.btn.disabled = !enabled;
7633
7633
  }
@@ -8585,12 +8585,68 @@ class $1b4e3c1abfa7ee85$var$DateFilterComponent {
8585
8585
  return this._htmlElement;
8586
8586
  }
8587
8587
  }
8588
+ class $1b4e3c1abfa7ee85$var$BooeleanFilterComponent {
8589
+ constructor(_applyFunction, _clearFunction, _customFilterValues){
8590
+ this._applyFunction = _applyFunction;
8591
+ this._clearFunction = _clearFunction;
8592
+ this._customFilterValues = _customFilterValues;
8593
+ _customFilterValues;
8594
+ }
8595
+ getFilterValues() {
8596
+ return [
8597
+ {
8598
+ type: '=',
8599
+ value: this._customFilterValues.trueStr == this._multiCombobox.value ? true : false
8600
+ }
8601
+ ];
8602
+ }
8603
+ _checkTestFilterComponent() {
8604
+ this._applyButton.disabled = true;
8605
+ this._clearButton.disabled = true;
8606
+ if (this._multiCombobox.value) {
8607
+ this._clearButton.disabled = false;
8608
+ this._applyButton.disabled = false;
8609
+ }
8610
+ }
8611
+ create() {
8612
+ this._container = (0, $94579973dd0f02f3$export$624631f482c54f59).div('dt-filter');
8613
+ this._multiCombobox = (0, $94579973dd0f02f3$export$624631f482c54f59).selectWithOptions(this._customFilterValues.trueStr || "Do\u011Fru", this._customFilterValues.falseStr || "Yanl\u0131\u015F");
8614
+ this._multiCombobox.onchange = (ev)=>{
8615
+ this._checkTestFilterComponent();
8616
+ if (!this._multiCombobox.value) this._clearFunction();
8617
+ };
8618
+ this._applyButton = (0, $94579973dd0f02f3$export$624631f482c54f59).button('Tamam', null, 'filter-button done-button', (0, $7eed205a7fd9dfa6$export$b990f82335fc0ff9).success, this._applyFunction);
8619
+ this._applyButton.disabled = true;
8620
+ this._clearButton = (0, $94579973dd0f02f3$export$624631f482c54f59).button('Temizle', null, 'filter-button clear-button danger', (0, $7eed205a7fd9dfa6$export$b990f82335fc0ff9).delete, ()=>{
8621
+ this.clearFilter();
8622
+ });
8623
+ this._clearButton.disabled = true;
8624
+ this._buttonContainer = (0, $94579973dd0f02f3$export$624631f482c54f59).div('dt-filter-buttons');
8625
+ this._buttonContainer.appendChild(this._applyButton);
8626
+ this._buttonContainer.appendChild(this._clearButton);
8627
+ this._container.appendChild(this._multiCombobox);
8628
+ this._container.appendChild(this._buttonContainer);
8629
+ this._htmlElement = this._container;
8630
+ }
8631
+ clearFilter() {
8632
+ this.clearFilterGroup();
8633
+ this._clearFunction();
8634
+ }
8635
+ clearFilterGroup() {
8636
+ this._multiCombobox.value = '';
8637
+ this._checkTestFilterComponent();
8638
+ }
8639
+ getHtmlElement() {
8640
+ return this._htmlElement;
8641
+ }
8642
+ }
8588
8643
  class $1b4e3c1abfa7ee85$var$ColumnCustomFilter {
8589
8644
  constructor(options, field, applyFilterGroupFunc, removeFilterGroupFunc){
8590
8645
  this.options = options;
8591
8646
  this._filterValue = [];
8592
8647
  this._field = field;
8593
8648
  this._title = options.title;
8649
+ this._columnOptions = options;
8594
8650
  this._applyFilterGroupFunc = applyFilterGroupFunc;
8595
8651
  this._removeFilterGroupFunc = removeFilterGroupFunc;
8596
8652
  this._setFilterElement(options.CustomFilter, options.CustomFilterParams);
@@ -8647,6 +8703,12 @@ class $1b4e3c1abfa7ee85$var$ColumnCustomFilter {
8647
8703
  case 'list':
8648
8704
  this._columnFilterComponent = new $1b4e3c1abfa7ee85$var$ListFilterComponent(this._apply.bind(this), this._clear.bind(this), CustomFilterParams);
8649
8705
  break;
8706
+ case 'boolean':
8707
+ this._columnFilterComponent = new $1b4e3c1abfa7ee85$var$BooeleanFilterComponent(this._apply.bind(this), this._clear.bind(this), {
8708
+ trueStr: this._columnOptions.mutatorParams.trueStr,
8709
+ falseStr: this._columnOptions.mutatorParams.falseStr
8710
+ });
8711
+ break;
8650
8712
  case 'date':
8651
8713
  case 'datetime-local':
8652
8714
  this._columnFilterComponent = new $1b4e3c1abfa7ee85$var$DateFilterComponent(this._apply.bind(this), this._clear.bind(this), CustomFilterParams, CustomFilter);