Skip to content

Commit

Permalink
List, ListBase: ignore errors after move to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeniyKiyashko committed Jun 13, 2024
1 parent 8c1e996 commit 39f2aa8
Show file tree
Hide file tree
Showing 47 changed files with 3,098 additions and 3,087 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable max-classes-per-file */
import '@js/ui/list/modules/search';
import '@js/ui/list/modules/selection';
import '@ts/ui/list/modules/m_search';
import '@ts/ui/list/modules/m_selection';

import $ from '@js/core/renderer';
import { extend } from '@js/core/utils/extend';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import $ from '@js/core/renderer';
import { FunctionTemplate } from '@js/core/templates/function_template';
import Button from '@js/ui/button';
import List from '@js/ui/list/ui.list.edit';
import List from '@ts/ui/list/m_list.edit';
import { createPromise } from '@ts/core/utils/promise';

const TOOLTIP_APPOINTMENT_ITEM = 'dx-tooltip-appointment-item';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@js/ui/list/modules/selection';
import '@ts/ui/list/modules/m_selection';

import { ensureDefined, noop } from '@js/core/utils/common';
import dateSerialization from '@js/core/utils/date_serialization';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { addNamespace } from '@js/events/utils/index';
import messageLocalization from '@js/localization/message';
import DataExpressionMixin from '@js/ui/editor/ui.data_expression';
import List from '@js/ui/list_light';
import DataConverterMixin from '@js/ui/shared/grouped_data_converter_mixin';
import errors from '@js/ui/widget/ui.errors';
import DataConverterMixin from '@ts/ui/shared/m_grouped_data_converter_mixin';

import DropDownEditor from './m_drop_down_editor';

Expand Down
61 changes: 30 additions & 31 deletions packages/devextreme/js/__internal/ui/list/m_item.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import $ from '../../core/renderer';
import CollectionWidgetItem from '../collection/item';
import $ from '@js/core/renderer';
import CollectionWidgetItem from '@js/ui/collection/item';

const LIST_ITEM_BADGE_CONTAINER_CLASS = 'dx-list-item-badge-container';
const LIST_ITEM_BADGE_CLASS = 'dx-list-item-badge';
Expand All @@ -10,44 +10,43 @@ const LIST_ITEM_CHEVRON_CLASS = 'dx-list-item-chevron';

const ListItem = CollectionWidgetItem.inherit({

_renderWatchers: function() {
this.callBase();
_renderWatchers() {
this.callBase();

this._startWatcher('badge', this._renderBadge.bind(this));
this._startWatcher('showChevron', this._renderShowChevron.bind(this));
},
this._startWatcher('badge', this._renderBadge.bind(this));
this._startWatcher('showChevron', this._renderShowChevron.bind(this));
},

_renderBadge: function(badge) {
this._$element.children('.' + LIST_ITEM_BADGE_CONTAINER_CLASS).remove();
_renderBadge(badge) {
this._$element.children(`.${LIST_ITEM_BADGE_CONTAINER_CLASS}`).remove();

if(!badge) {
return;
}
if (!badge) {
return;
}

const $badge = $('<div>')
.addClass(LIST_ITEM_BADGE_CONTAINER_CLASS)
.append($('<div>')
.addClass(LIST_ITEM_BADGE_CLASS)
.addClass(BADGE_CLASS)
.text(badge)
);
const $badge = $('<div>')
.addClass(LIST_ITEM_BADGE_CONTAINER_CLASS)
.append($('<div>')
.addClass(LIST_ITEM_BADGE_CLASS)
.addClass(BADGE_CLASS)
.text(badge));

const $chevron = this._$element.children('.' + LIST_ITEM_CHEVRON_CONTAINER_CLASS).first();
$chevron.length > 0 ? $badge.insertBefore($chevron) : $badge.appendTo(this._$element);
},
const $chevron = this._$element.children(`.${LIST_ITEM_CHEVRON_CONTAINER_CLASS}`).first();
$chevron.length > 0 ? $badge.insertBefore($chevron) : $badge.appendTo(this._$element);
},

_renderShowChevron: function(showChevron) {
this._$element.children('.' + LIST_ITEM_CHEVRON_CONTAINER_CLASS).remove();
_renderShowChevron(showChevron) {
this._$element.children(`.${LIST_ITEM_CHEVRON_CONTAINER_CLASS}`).remove();

if(!showChevron) {
return;
}
if (!showChevron) {
return;
}

const $chevronContainer = $('<div>').addClass(LIST_ITEM_CHEVRON_CONTAINER_CLASS);
const $chevron = $('<div>').addClass(LIST_ITEM_CHEVRON_CLASS);
const $chevronContainer = $('<div>').addClass(LIST_ITEM_CHEVRON_CONTAINER_CLASS);
const $chevron = $('<div>').addClass(LIST_ITEM_CHEVRON_CLASS);

$chevronContainer.append($chevron).appendTo(this._$element);
}
$chevronContainer.append($chevron).appendTo(this._$element);
},

});

Expand Down
Loading

0 comments on commit 39f2aa8

Please sign in to comment.