-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(table): Enhancing editable tables
- Loading branch information
Showing
37 changed files
with
483 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { | ||
AddressControl, CheckboxControl, CheckListControl, DateControl, DateTimeControl, EditorControl, | ||
FileControl, NativeSelectControl, PickerControl, AppendToBodyPickerControl, TablePickerControl, | ||
QuickNoteControl, RadioControl, ReadOnlyControl, TextAreaControl, TextBoxControl, SelectControl, | ||
TilesControl, TimeControl | ||
} from './index'; | ||
import { BaseControl } from './BaseControl'; | ||
|
||
export class ControlFactory { | ||
static create(type: string, config: BaseControl): BaseControl { | ||
switch (type) { | ||
case 'AddressControl': | ||
return new AddressControl(config); | ||
case 'CheckboxControl': | ||
return new CheckboxControl(config); | ||
case 'CheckListControl': | ||
return new CheckListControl(config); | ||
case 'CheckListControl': | ||
return new CheckListControl(config); | ||
case 'DateTimeControl': | ||
return new DateTimeControl(config); | ||
case 'EditorControl': | ||
return new EditorControl(config); | ||
case 'FileControl': | ||
return new FileControl(config); | ||
case 'NativeSelectControl': | ||
return new NativeSelectControl(config); | ||
case 'PickerControl': | ||
return new PickerControl(config); | ||
case 'AppendToBodyPickerControl': | ||
return new AppendToBodyPickerControl(config); | ||
case 'TablePickerControl': | ||
return new TablePickerControl(config); | ||
case 'QuickNoteControl': | ||
return new QuickNoteControl(config); | ||
case 'RadioControl': | ||
return new RadioControl(config); | ||
case 'ReadOnlyControl': | ||
return new ReadOnlyControl(config); | ||
case 'TextAreaControl': | ||
return new TextAreaControl(config); | ||
case 'TextBoxControl': | ||
return new TextBoxControl(config); | ||
case 'SelectControl': | ||
return new SelectControl(config); | ||
case 'TilesControl': | ||
return new TilesControl(config); | ||
case 'TimeControl': | ||
return new TimeControl(config); | ||
default: | ||
console.warn('[ControlFactory] - unable to find control for type. Make sure to set "editorType" and "editorConfig" on your column', type); | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.