Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "radweb", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "radweb", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
import { ColumnSetting } from './utils'; | ||
import { ColumnSetting, DropDownItem } from './utils'; | ||
import { DataColumnSettings, FilterBase, ColumnValueProvider, FindOptions, FindOptionsPerEntity, RowEvents, DataProvider, DataProviderFactory, FilterConsumer } from './DataInterfaces'; | ||
@@ -310,4 +310,4 @@ export interface dataAreaSettings { | ||
allowDesignMode: boolean; | ||
add(...columns: ColumnSetting<rowType>[]): void; | ||
add(...columns: string[]): void; | ||
add(...columns: ColumnSetting<rowType>[]): Promise<void>; | ||
add(...columns: string[]): Promise<void>; | ||
buildDropDown(s: ColumnSetting<any>): Promise<void>; | ||
@@ -314,0 +314,0 @@ designMode: boolean; |
@@ -1032,26 +1032,43 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
for (var _a = 0, columns_1 = columns; _a < columns_1.length; _a++) { | ||
var c = columns_1[_a]; | ||
var s = void 0; | ||
var x = c; | ||
if (!x.column && c instanceof Column) { | ||
x = { | ||
column: c, | ||
readonly: c.readonly, | ||
caption: c.caption, | ||
inputType: c.inputType | ||
}; | ||
} | ||
else if (x.column) { | ||
if (!x.caption && x.column.caption) | ||
x.caption = x.column.caption; | ||
} | ||
if (x.getValue) { | ||
s = x; | ||
} | ||
else { | ||
this.buildDropDown(x); | ||
} | ||
this.items.push(x); | ||
} | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _i, columns_1, c, s, x; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
_i = 0, columns_1 = columns; | ||
_a.label = 1; | ||
case 1: | ||
if (!(_i < columns_1.length)) return [3 /*break*/, 6]; | ||
c = columns_1[_i]; | ||
s = void 0; | ||
x = c; | ||
if (!x.column && c instanceof Column) { | ||
x = { | ||
column: c, | ||
readonly: c.readonly, | ||
caption: c.caption, | ||
inputType: c.inputType | ||
}; | ||
} | ||
else if (x.column) { | ||
if (!x.caption && x.column.caption) | ||
x.caption = x.column.caption; | ||
} | ||
if (!x.getValue) return [3 /*break*/, 2]; | ||
s = x; | ||
return [3 /*break*/, 4]; | ||
case 2: return [4 /*yield*/, this.buildDropDown(x)]; | ||
case 3: | ||
_a.sent(); | ||
_a.label = 4; | ||
case 4: | ||
this.items.push(x); | ||
_a.label = 5; | ||
case 5: | ||
_i++; | ||
return [3 /*break*/, 1]; | ||
case 6: return [2 /*return*/, Promise.resolve()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
@@ -1187,2 +1204,9 @@ ColumnCollection.prototype.buildDropDown = function (s) { | ||
else if (col.column) { | ||
if (col.dropDown && col.dropDown.items) { | ||
for (var _i = 0, _a = col.dropDown.items; _i < _a.length; _i++) { | ||
var x = _a[_i]; | ||
if (x.id == row.__getColumn(col.column).value) | ||
return x.caption; | ||
} | ||
} | ||
r = row.__getColumn(col.column).displayValue; | ||
@@ -1189,0 +1213,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
356699
3990