Skip to content

Commit

Permalink
remove multi select
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbach committed Dec 4, 2023
1 parent 18c696c commit f1b9c7c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 45 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
"react": ">17"
},
"dependencies": {
"ink-multi-select": "^2.0.0",
"ink-quicksearch-input": "^1.0.0",
"ink-select-input": "^5.0.0",
"ink-text-input": "^5.0.1"
}
Expand Down
7 changes: 7 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ dependencies and then run one of the demo scripts:
- `yarn demo:custommanager` ([See Code](https://github.com/lukasbach/ink-form/blob/main/src/demo/custommanager.tsx))
- `yarn demo:imperative` ([See Code](https://github.com/lukasbach/ink-form/blob/main/src/demo/imperative.ts))

## Update Note

This package is now pure ESM as of 2.0.0. (Details: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)

With that upgrade, I had to remove the multi select component as its dependency does not support ESM. Please
use the v1x version branch with CJS if you need that.

## Documentation

Detailed documentation is available at [lukasbach.github.io/ink-form](https://lukasbach.github.io/ink-form/).
Expand Down
1 change: 0 additions & 1 deletion src/demo/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ render(
title: "Selection fields",
fields: [
{ type: 'select', name: 'field20', label: 'Select', options },
{ type: 'multiselect', name: 'field21', label: 'Multi Select', options },
]
},
{
Expand Down
34 changes: 0 additions & 34 deletions src/managers/MultiSelectFormFieldManager.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/managers/managers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FloatFormFieldManager } from './FloatFormFieldManager.js';
import { IntegerFormFieldManager } from './IntegerFormFieldManager.js';
import { MultiSelectFormFieldManager } from './MultiSelectFormFieldManager.js';
import { SelectFormFieldManager } from './SelectFormFieldManager.js';
import { FormField, FormFieldManager, TypeOfField } from '../types.js';
import { StringFormFieldManager } from './StringFormFieldManager.js';
Expand All @@ -9,7 +8,6 @@ import { BooleanFormFieldManager } from './BooleanFormFieldManager.js';
export const managers: FormFieldManager<FormField>[] = [
new FloatFormFieldManager(),
new IntegerFormFieldManager(),
new MultiSelectFormFieldManager(),
new SelectFormFieldManager(),
new StringFormFieldManager(),
new BooleanFormFieldManager(),
Expand Down
6 changes: 0 additions & 6 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export interface FormSection {
* - FormFieldInteger
* - FormFieldFloat
* - FormFieldSelect
* - FormFieldMultiSelect
* - FormFieldBoolean
*
* You can add your own form field by extending ``AbstractFormField`` and implementing
Expand All @@ -87,7 +86,6 @@ export type FormField =
| FormFieldInteger
| FormFieldFloat
| FormFieldSelect
| FormFieldMultiSelect
| FormFieldBoolean
| AbstractFormField<any, any>;

Expand Down Expand Up @@ -155,10 +153,6 @@ export type FormFieldSelect = AbstractFormField<'select', string> & {
options: Array<{ label?: string; value: string }>;
};

export type FormFieldMultiSelect = AbstractFormField<'multiselect', string[]> & {
options: Array<{ label?: string; value: string }>;
};

export interface FormFieldValueRendererProps<T extends FormField> {
value?: ValueOfField<T>;
field: T;
Expand Down

0 comments on commit f1b9c7c

Please sign in to comment.