Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
angular.forEach(columnElements, (columnElement) => {
const column = {};
if (hasAttribute(columnElement, 'name')) {
column.name = getAttribute(columnElement, 'name');
}
if (hasAttribute(columnElement, 'property')) {
const propertyValue = getAttribute(columnElement, 'property');
column.name = column.name || propertyValue;
column.getValue = this.$parse(propertyValue);
// A column can be sorted only if it has a "property" attribute.
if (hasAttribute(columnElement, 'sortable')) {
const sortableValue = getAttribute(columnElement, 'sortable');
column.sortable = !!sortableValue;
const sorting = DatagridColumnBuilder.defineDefaultSorting(column, sortableValue);
Object.assign(currentSorting, sorting);
const propertyValue = getAttribute(columnElement, 'property');
column.name = column.name || propertyValue;
column.getValue = this.$parse(propertyValue);
// A column can be sorted only if it has a "property" attribute.
if (hasAttribute(columnElement, 'sortable')) {
const sortableValue = getAttribute(columnElement, 'sortable');
column.sortable = !!sortableValue;
const sorting = DatagridColumnBuilder.defineDefaultSorting(column, sortableValue);
Object.assign(currentSorting, sorting);
}
}
if (!hasAttribute(columnElement, 'type')) {
column.type = 'string';
}
copyValueProperties.forEach((propertyName) => {
if (hasAttribute(columnElement, propertyName)) {
column[propertyName] = getAttribute(columnElement, propertyName);
}
});
column.filterable = DatagridColumnBuilder.isFilterable(column)
&& hasAttribute(columnElement, 'filterable');
column.searchable = DatagridColumnBuilder.isSearchable(column)
&& hasAttribute(columnElement, 'searchable');
if (column['type-options']) {
column.typeOptions = this.$parse(column['type-options'])($scope);
angular.forEach(columnElements, (columnElement) => {
const column = {};
if (hasAttribute(columnElement, 'name')) {
column.name = getAttribute(columnElement, 'name');
}
if (hasAttribute(columnElement, 'property')) {
const propertyValue = getAttribute(columnElement, 'property');
column.name = column.name || propertyValue;
column.getValue = this.$parse(propertyValue);
// A column can be sorted only if it has a "property" attribute.
if (hasAttribute(columnElement, 'sortable')) {
const sortableValue = getAttribute(columnElement, 'sortable');
column.sortable = !!sortableValue;
const sorting = DatagridColumnBuilder.defineDefaultSorting(column, sortableValue);
Object.assign(currentSorting, sorting);
}
}
if (!hasAttribute(columnElement, 'type')) {
column.type = 'string';
}
copyValueProperties.forEach((propertyName) => {
if (hasAttribute(columnElement, propertyName)) {
column[propertyName] = getAttribute(columnElement, propertyName);
}
angular.forEach(columnElements, (columnElement) => {
const column = {};
if (hasAttribute(columnElement, 'name')) {
column.name = getAttribute(columnElement, 'name');
}
if (hasAttribute(columnElement, 'property')) {
const propertyValue = getAttribute(columnElement, 'property');
column.name = column.name || propertyValue;
column.getValue = this.$parse(propertyValue);
// A column can be sorted only if it has a "property" attribute.
if (hasAttribute(columnElement, 'sortable')) {
const sortableValue = getAttribute(columnElement, 'sortable');
column.sortable = !!sortableValue;
const sorting = DatagridColumnBuilder.defineDefaultSorting(column, sortableValue);
Object.assign(currentSorting, sorting);
}
}
if (!hasAttribute(columnElement, 'type')) {
Object.assign(currentSorting, sorting);
}
}
if (!hasAttribute(columnElement, 'type')) {
column.type = 'string';
}
copyValueProperties.forEach((propertyName) => {
if (hasAttribute(columnElement, propertyName)) {
column[propertyName] = getAttribute(columnElement, propertyName);
}
});
column.filterable = DatagridColumnBuilder.isFilterable(column)
&& hasAttribute(columnElement, 'filterable');
column.searchable = DatagridColumnBuilder.isSearchable(column)
&& hasAttribute(columnElement, 'searchable');
if (column['type-options']) {
column.typeOptions = this.$parse(column['type-options'])($scope);
}
if (hasAttribute(columnElement, 'prevent-customization')) {
column.preventCustomization = true;
}
if (hasAttribute(columnElement, 'hidden')) {
column.hidden = true;
}
if (hasAttribute(columnElement, 'title')) {
}
if (!hasAttribute(columnElement, 'type')) {
column.type = 'string';
}
copyValueProperties.forEach((propertyName) => {
if (hasAttribute(columnElement, propertyName)) {
column[propertyName] = getAttribute(columnElement, propertyName);
}
});
column.filterable = DatagridColumnBuilder.isFilterable(column)
&& hasAttribute(columnElement, 'filterable');
column.searchable = DatagridColumnBuilder.isSearchable(column)
&& hasAttribute(columnElement, 'searchable');
if (column['type-options']) {
column.typeOptions = this.$parse(column['type-options'])($scope);
}
if (hasAttribute(columnElement, 'prevent-customization')) {
column.preventCustomization = true;
}
if (hasAttribute(columnElement, 'hidden')) {
column.hidden = true;
}
if (hasAttribute(columnElement, 'title')) {
const titleValue = getAttribute(columnElement, 'title');
if (hasAttribute(columnElement, 'prevent-customization')) {
column.preventCustomization = true;
}
if (hasAttribute(columnElement, 'hidden')) {
column.hidden = true;
}
if (hasAttribute(columnElement, 'title')) {
const titleValue = getAttribute(columnElement, 'title');
column.title = this.buildTitle(titleValue, $scope);
column.rawTitle = titleValue;
}
if (hasAttribute(columnElement, 'footer')) {
hasFooter = true;
column.footer = getAttribute(columnElement, 'footer');
}
if (!column.sortProperty) {
column.sortProperty = column.name;
}
const htmlTemplate = columnElement.innerHTML.trim();
if (!column.template && htmlTemplate.length) {
column.template = htmlTemplate;
}
if (column.template) {
column.compiledTemplate = this.getColumnTemplate(column);
}
copyValueProperties.forEach((propertyName) => {
if (hasAttribute(columnElement, propertyName)) {
column[propertyName] = getAttribute(columnElement, propertyName);
}
});
column.filterable = DatagridColumnBuilder.isFilterable(column)
&& hasAttribute(columnElement, 'filterable');
column.searchable = DatagridColumnBuilder.isSearchable(column)
&& hasAttribute(columnElement, 'searchable');
if (column['type-options']) {
column.typeOptions = this.$parse(column['type-options'])($scope);
}
if (hasAttribute(columnElement, 'prevent-customization')) {
column.preventCustomization = true;
}
if (hasAttribute(columnElement, 'hidden')) {
column.hidden = true;
}
if (hasAttribute(columnElement, 'title')) {
const titleValue = getAttribute(columnElement, 'title');
column.title = this.buildTitle(titleValue, $scope);
column.rawTitle = titleValue;
}
if (hasAttribute(columnElement, 'footer')) {
hasFooter = true;
});
column.filterable = DatagridColumnBuilder.isFilterable(column)
&& hasAttribute(columnElement, 'filterable');
column.searchable = DatagridColumnBuilder.isSearchable(column)
&& hasAttribute(columnElement, 'searchable');
if (column['type-options']) {
column.typeOptions = this.$parse(column['type-options'])($scope);
}
if (hasAttribute(columnElement, 'prevent-customization')) {
column.preventCustomization = true;
}
if (hasAttribute(columnElement, 'hidden')) {
column.hidden = true;
}
if (hasAttribute(columnElement, 'title')) {
const titleValue = getAttribute(columnElement, 'title');
column.title = this.buildTitle(titleValue, $scope);
column.rawTitle = titleValue;
}
if (hasAttribute(columnElement, 'footer')) {
hasFooter = true;
column.footer = getAttribute(columnElement, 'footer');
}
if (!column.sortProperty) {
copyValueProperties.forEach((propertyName) => {
if (hasAttribute(columnElement, propertyName)) {
column[propertyName] = getAttribute(columnElement, propertyName);
}
});