Skip to content

Commit

Permalink
Merge branch 'add-multiselect-to-combobox' into 1290-v2-resources-and…
Browse files Browse the repository at this point in the history
…-home-extension
  • Loading branch information
rolfheij-sil committed Dec 2, 2024
2 parents 5b9fb08 + aed2c2d commit de55698
Show file tree
Hide file tree
Showing 8 changed files with 1,922 additions and 1,831 deletions.
68 changes: 34 additions & 34 deletions lib/platform-bible-react/dist/index.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/platform-bible-react/dist/index.cjs.map

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions lib/platform-bible-react/dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,22 @@ export declare const inventoryCountColumn: (countLabel: string) => ColumnDef<Inv
* current status of the item is selected
*/
export declare const inventoryStatusColumn: (statusLabel: string, approvedItems: string[], onApprovedItemsChange: (items: string[]) => void, unapprovedItems: string[], onUnapprovedItemsChange: (items: string[]) => void) => ColumnDef<InventoryTableData>;
export type MultiSelectComboBoxEntry = {
value: string;
label: string;
starred?: boolean;
};
export interface MultiSelectComboboxProps {
options: MultiSelectComboBoxEntry[];
selected: string[];
onChange: (values: string[]) => void;
placeholder: string;
customSelectedText?: string;
sortSelected?: boolean;
isTypeCombobox?: boolean;
icon?: React$1.ReactNode;
}
export declare function MultiSelectComboBox({ options, selected, onChange, placeholder, customSelectedText, sortSelected, isTypeCombobox, icon, }: MultiSelectComboboxProps): import("react/jsx-runtime").JSX.Element;
export type TabKeyValueContent = {
key: string;
value: string;
Expand Down
3,654 changes: 1,864 additions & 1,790 deletions lib/platform-bible-react/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/platform-bible-react/dist/index.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface MultiSelectComboboxProps {
icon?: ReactNode;
}

function MultiSelectCombobox({
function MultiSelectComboBox({
options,
selected,
onChange,
Expand Down Expand Up @@ -135,4 +135,4 @@ function MultiSelectCombobox({
);
}

export default MultiSelectCombobox;
export default MultiSelectComboBox;
1 change: 1 addition & 0 deletions lib/platform-bible-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export {
inventoryCountColumn,
inventoryStatusColumn,
} from './components/advanced/inventory/inventory-columns';
export { default as MultiSelectComboBox } from './components/advanced/multi-select-combo-box';
export {
default as NavigationContentSearch,
type TabKeyValueContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from '@/components/shadcn-ui/table';
import { cn } from '@/utils/shadcn-ui.util';
import { DialogTitle } from '@radix-ui/react-dialog';
import MultiSelectCombobox from '@/components/advanced/multi-select-combo-box';
import MultiSelectComboBox from '@/components/advanced/multi-select-combo-box';

type MultiSelectComboBoxEntry = {
value: string;
Expand Down Expand Up @@ -242,7 +242,7 @@ export default function GetResourcesExample() {
className={cn({ 'tw-border-primary': searchQuery })}
/>

<MultiSelectCombobox
<MultiSelectComboBox
options={types}
selected={selectedTypes}
onChange={setSelectedTypes}
Expand All @@ -251,7 +251,7 @@ export default function GetResourcesExample() {
icon={<Blocks />}
/>

<MultiSelectCombobox
<MultiSelectComboBox
options={languages}
selected={selectedLanguages}
onChange={setSelectedLanguages}
Expand Down

0 comments on commit de55698

Please sign in to comment.