Skip to content

Commit

Permalink
refactor(code): remove deprecated FormElementType
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed May 26, 2018
1 parent 532554d commit 895474a
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 34 deletions.
Expand Up @@ -28,7 +28,6 @@ import {
BackendServiceOption,
CellArgs,
Column,
FormElementType,
GraphqlResult,
GridOption,
GridStateChange,
Expand Down
@@ -1,5 +1,5 @@
import { inject, Container } from 'aurelia-framework';
import { Filter, FilterType, FormElementType } from '../models/index';
import { Filter, FilterType } from '../models/index';
import { SlickgridConfig } from '../slickgrid-config';

/** The name of the plugins the factory will initialize */
Expand All @@ -26,11 +26,11 @@ export class FilterFactory {

/**
* Creates a new Filter from the provided filterType
* @param {FilterType | FormElementType | string} [filterType] the type of filter to create
* @param {FilterType | string} [filterType] the type of filter to create
* as an enum or custom string. The default filter type will be used if no value is passed
* @return {Filter} the new Filter
*/
public createFilter(filterType?: FilterType | FormElementType | string): Filter {
public createFilter(filterType?: FilterType | string): Filter {
const filters = this.container.getAll(PLUGIN_NAME);

let filter: Filter | undefined = filters.find((f: Filter) =>
Expand Down
Expand Up @@ -4,7 +4,6 @@ import {
Column,
Filter,
FilterType,
FormElementType,
MultipleSelectOption,
OperatorString,
OperatorType,
Expand Down Expand Up @@ -34,7 +33,7 @@ export interface ColumnFilter {
operator?: OperatorType | OperatorString;

/** Filter Type to use (input, multipleSelect, singleSelect, select, custom) */
type?: FilterType | FormElementType | string;
type?: FilterType | string;

/** A collection of items/options (commonly used with a Select/Multi-Select Filter) */
collection?: any[];
Expand Down
19 changes: 0 additions & 19 deletions aurelia-slickgrid/src/aurelia-slickgrid/models/formElementType.ts

This file was deleted.

1 change: 0 additions & 1 deletion aurelia-slickgrid/src/aurelia-slickgrid/models/index.ts
Expand Up @@ -33,7 +33,6 @@ export * from './filterCondition.interface';
export * from './filterConditionOption.interface';
export * from './filterType.enum';
export * from './formatter.interface';
export * from './formElementType';
export * from './graphqlDatasetFilter.interface';
export * from './graphqlCursorPaginationOption.interface';
export * from './graphqlFilteringOption.interface';
Expand Down
4 changes: 2 additions & 2 deletions aurelia-slickgrid/src/aurelia-slickgrid/services/utilities.ts
@@ -1,4 +1,4 @@
import { FieldType, OperatorType, FilterType, FormElementType } from '../models/index';
import { FieldType, OperatorType, FilterType } from '../models/index';
import * as moment from 'moment';

/**
Expand Down Expand Up @@ -291,7 +291,7 @@ export function mapOperatorByFieldType(fieldType: FieldType | string): OperatorT
* @param operator
* @returns string map
*/
export function mapOperatorByFilterType(filterType: FilterType | FormElementType | string): OperatorType {
export function mapOperatorByFilterType(filterType: FilterType | string): OperatorType {
let map = OperatorType.empty;

switch (filterType) {
Expand Down
2 changes: 1 addition & 1 deletion aurelia-slickgrid/src/examples/slickgrid/example7.ts
@@ -1,5 +1,5 @@
import { autoinject } from 'aurelia-framework';
import { Column, GridOption, FieldType, Formatters, FormElementType } from '../../aurelia-slickgrid';
import { Column, GridOption, FieldType, Formatters } from '../../aurelia-slickgrid';

let columnsWithHighlightingById = {};

Expand Down
4 changes: 2 additions & 2 deletions client-cli/src/examples/slickgrid/example5.js
@@ -1,6 +1,6 @@
import { inject } from 'aurelia-framework';
import { HttpClient } from 'aurelia-http-client';
import { FieldType, FilterType, FormElementType, GridOdataService } from 'aurelia-slickgrid';
import { FieldType, FilterType, GridOdataService } from 'aurelia-slickgrid';

const defaultPageSize = 20;
const sampleDataRoot = 'src/examples/slickgrid/sample-data';
Expand Down Expand Up @@ -52,7 +52,7 @@ export class Example5 {
id: 'gender', name: 'Gender', field: 'gender', filterable: true, sortable: true, minWidth: 100,
filter: {
collection: [{ value: '', label: '' }, { value: 'male', label: 'male' }, { value: 'female', label: 'female' }],
type: FormElementType.singleSelect
type: FilterType.singleSelect
}
},
{ id: 'company', name: 'Company', field: 'company', minWidth: 100 }
Expand Down
2 changes: 1 addition & 1 deletion client-cli/src/examples/slickgrid/example7.js
@@ -1,5 +1,5 @@
import { autoinject } from 'aurelia-framework';
import { Column, GridOption, Formatters, FormElementType } from 'aurelia-slickgrid';
import { Column, GridOption, Formatters } from 'aurelia-slickgrid';

let columnsWithHighlightingById = {};

Expand Down
2 changes: 1 addition & 1 deletion doc/github-demo/src/examples/slickgrid/example5.ts
@@ -1,6 +1,6 @@
import { autoinject } from 'aurelia-framework';
import { HttpClient } from 'aurelia-http-client';
import { CaseType, Column, GridOption, FieldType, FilterType, Formatters, FormElementType, GridOdataService, OperatorType } from 'aurelia-slickgrid';
import { CaseType, Column, GridOption, FieldType, FilterType, Formatters, GridOdataService, OperatorType } from 'aurelia-slickgrid';

const defaultPageSize = 20;
const sampleDataRoot = 'assets/data';
Expand Down
2 changes: 1 addition & 1 deletion doc/github-demo/src/examples/slickgrid/example7.ts
@@ -1,5 +1,5 @@
import { autoinject } from 'aurelia-framework';
import { Column, GridOption, FieldType, Formatters, FormElementType } from 'aurelia-slickgrid';
import { Column, GridOption, FieldType, Formatters } from 'aurelia-slickgrid';

let columnsWithHighlightingById = {};

Expand Down

0 comments on commit 895474a

Please sign in to comment.