svelte-multiselect
Advanced tools
Comparing version 10.0.0 to 10.1.0
@@ -1,2 +0,2 @@ | ||
import { SvelteComponentTyped } from "svelte"; | ||
import { SvelteComponent } from "svelte"; | ||
declare const __propDef: { | ||
@@ -16,4 +16,4 @@ props: { | ||
export type CircleSpinnerSlots = typeof __propDef.slots; | ||
export default class CircleSpinner extends SvelteComponentTyped<CircleSpinnerProps, CircleSpinnerEvents, CircleSpinnerSlots> { | ||
export default class CircleSpinner extends SvelteComponent<CircleSpinnerProps, CircleSpinnerEvents, CircleSpinnerSlots> { | ||
} | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { SvelteComponentTyped } from "svelte"; | ||
import { SvelteComponent } from "svelte"; | ||
declare const __propDef: { | ||
@@ -29,4 +29,4 @@ props: { | ||
export type CmdPaletteSlots = typeof __propDef.slots; | ||
export default class CmdPalette extends SvelteComponentTyped<CmdPaletteProps, CmdPaletteEvents, CmdPaletteSlots> { | ||
export default class CmdPalette extends SvelteComponent<CmdPaletteProps, CmdPaletteEvents, CmdPaletteSlots> { | ||
} | ||
export {}; |
/** @typedef {typeof __propDef.props} ChevronExpandProps */ | ||
/** @typedef {typeof __propDef.events} ChevronExpandEvents */ | ||
/** @typedef {typeof __propDef.slots} ChevronExpandSlots */ | ||
export default class ChevronExpand extends SvelteComponentTyped<{ | ||
export default class ChevronExpand extends SvelteComponent<{ | ||
[x: string]: any; | ||
@@ -13,3 +13,3 @@ }, { | ||
export type ChevronExpandSlots = typeof __propDef.slots; | ||
import { SvelteComponentTyped } from "svelte"; | ||
import { SvelteComponent } from "svelte"; | ||
declare const __propDef: { | ||
@@ -16,0 +16,0 @@ props: { |
/** @typedef {typeof __propDef.props} CrossProps */ | ||
/** @typedef {typeof __propDef.events} CrossEvents */ | ||
/** @typedef {typeof __propDef.slots} CrossSlots */ | ||
export default class Cross extends SvelteComponentTyped<{ | ||
export default class Cross extends SvelteComponent<{ | ||
[x: string]: any; | ||
@@ -13,3 +13,3 @@ }, { | ||
export type CrossSlots = typeof __propDef.slots; | ||
import { SvelteComponentTyped } from "svelte"; | ||
import { SvelteComponent } from "svelte"; | ||
declare const __propDef: { | ||
@@ -16,0 +16,0 @@ props: { |
/** @typedef {typeof __propDef.props} DisabledProps */ | ||
/** @typedef {typeof __propDef.events} DisabledEvents */ | ||
/** @typedef {typeof __propDef.slots} DisabledSlots */ | ||
export default class Disabled extends SvelteComponentTyped<{ | ||
export default class Disabled extends SvelteComponent<{ | ||
[x: string]: any; | ||
@@ -13,3 +13,3 @@ }, { | ||
export type DisabledSlots = typeof __propDef.slots; | ||
import { SvelteComponentTyped } from "svelte"; | ||
import { SvelteComponent } from "svelte"; | ||
declare const __propDef: { | ||
@@ -16,0 +16,0 @@ props: { |
/** @typedef {typeof __propDef.props} OctocatProps */ | ||
/** @typedef {typeof __propDef.events} OctocatEvents */ | ||
/** @typedef {typeof __propDef.slots} OctocatSlots */ | ||
export default class Octocat extends SvelteComponentTyped<{ | ||
export default class Octocat extends SvelteComponent<{ | ||
[x: string]: any; | ||
@@ -13,3 +13,3 @@ }, { | ||
export type OctocatSlots = typeof __propDef.slots; | ||
import { SvelteComponentTyped } from "svelte"; | ||
import { SvelteComponent } from "svelte"; | ||
declare const __propDef: { | ||
@@ -16,0 +16,0 @@ props: { |
@@ -1,2 +0,2 @@ | ||
import { SvelteComponentTyped } from "svelte"; | ||
import { SvelteComponent } from "svelte"; | ||
import type { MultiSelectEvents, Option as T } from './types'; | ||
@@ -58,3 +58,2 @@ declare class __sveltets_Render<Option extends T> { | ||
value?: Option | Option[] | null | undefined; | ||
get_label?: ((opt: T) => string | number) | undefined; | ||
}; | ||
@@ -91,6 +90,4 @@ events(): MultiSelectEvents; | ||
'user-msg': { | ||
duplicateOptionMsg: string; | ||
createOptionMsg: string | null; | ||
textInputIsDuplicate: any; | ||
searchText: string; | ||
msgType: any; | ||
msg: any; | ||
@@ -103,5 +100,4 @@ }; | ||
export type MultiSelectSlots<Option extends T> = ReturnType<__sveltets_Render<Option>['slots']>; | ||
export default class MultiSelect<Option extends T> extends SvelteComponentTyped<MultiSelectProps<Option>, MultiSelectEvents<Option>, MultiSelectSlots<Option>> { | ||
get get_label(): (opt: T) => string | number; | ||
export default class MultiSelect<Option extends T> extends SvelteComponent<MultiSelectProps<Option>, MultiSelectEvents<Option>, MultiSelectSlots<Option>> { | ||
} | ||
export {}; |
export type Option = string | number | ObjectOption; | ||
export type OptionStyle = string | { | ||
option: string; | ||
selected: string; | ||
}; | ||
export type ObjectOption = { | ||
@@ -10,2 +14,3 @@ label: string | number; | ||
selectedTitle?: string; | ||
style?: OptionStyle; | ||
[key: string]: unknown; | ||
@@ -12,0 +17,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { SvelteComponentTyped } from "svelte"; | ||
import { SvelteComponent } from "svelte"; | ||
declare const __propDef: { | ||
@@ -23,4 +23,4 @@ props: { | ||
export type WiggleSlots = typeof __propDef.slots; | ||
export default class Wiggle extends SvelteComponentTyped<WiggleProps, WiggleEvents, WiggleSlots> { | ||
export default class Wiggle extends SvelteComponent<WiggleProps, WiggleEvents, WiggleSlots> { | ||
} | ||
export {}; |
@@ -8,3 +8,3 @@ { | ||
"license": "MIT", | ||
"version": "10.0.0", | ||
"version": "10.1.0", | ||
"type": "module", | ||
@@ -27,15 +27,15 @@ "svelte": "./dist/index.js", | ||
"dependencies": { | ||
"svelte": "^4.0.1" | ||
"svelte": "^4.0.5" | ||
}, | ||
"devDependencies": { | ||
"@iconify/svelte": "^3.1.4", | ||
"@playwright/test": "^1.35.1", | ||
"@playwright/test": "^1.36.1", | ||
"@sveltejs/adapter-static": "^2.0.2", | ||
"@sveltejs/kit": "^1.21.0", | ||
"@sveltejs/package": "2.1.0", | ||
"@sveltejs/kit": "^1.22.3", | ||
"@sveltejs/package": "2.2.0", | ||
"@sveltejs/vite-plugin-svelte": "2.4.2", | ||
"@typescript-eslint/eslint-plugin": "^5.60.1", | ||
"@typescript-eslint/parser": "^5.60.1", | ||
"@vitest/coverage-v8": "^0.32.2", | ||
"eslint": "^8.44.0", | ||
"@typescript-eslint/eslint-plugin": "^6.1.0", | ||
"@typescript-eslint/parser": "^6.1.0", | ||
"@vitest/coverage-v8": "^0.33.0", | ||
"eslint": "^8.45.0", | ||
"eslint-plugin-svelte": "^2.32.2", | ||
@@ -51,10 +51,10 @@ "hastscript": "^7.2.0", | ||
"rehype-slug": "^5.1.0", | ||
"svelte-check": "^3.4.4", | ||
"svelte-check": "^3.4.6", | ||
"svelte-preprocess": "^5.0.4", | ||
"svelte-toc": "^0.5.5", | ||
"svelte-zoo": "^0.4.8", | ||
"svelte2tsx": "^0.6.16", | ||
"svelte-zoo": "^0.4.9", | ||
"svelte2tsx": "^0.6.19", | ||
"typescript": "5.1.6", | ||
"vite": "^4.3.9", | ||
"vitest": "^0.32.2" | ||
"vite": "^4.4.4", | ||
"vitest": "^0.33.0" | ||
}, | ||
@@ -61,0 +61,0 @@ "keywords": [ |
@@ -388,3 +388,3 @@ <h1 align="center"> | ||
If `maxSelect={1}`, `value` will be the single item in `selected` (or `null` if `selected` is empty). If `maxSelect != 1`, `maxSelect` and `selected` are equal. Warning: `value` supports 1-way binding only, meaning `bind:value` will update `value` when internal component state changes but changing `value` externally will not update internal component state. This is because `value` is already reactive to `selected` and making `selected` reactive to `value` would be cyclic. Suggestions for better solutions that solve both [#86](https://github.com/janosh/svelte-multiselect/issues/86) and [#136](https://github.com/janosh/svelte-multiselect/issues/136) welcome! | ||
If `maxSelect={1}`, `value` will be the single item in `selected` (or `null` if `selected` is empty). If `maxSelect != 1`, `maxSelect` and `selected` are equal. Warning: Setting `value` does not rendered state on initial mount, meaning `bind:value` will update local variable `value` whenever internal component state changes but passing a `value` when component first mounts won't be reflected in UI. This is because the source of truth for rendering is `bind:selected`. `selected` is reactive to `value` internally but only on reassignment from initial value. Suggestions for better solutions than [#249](https://github.com/janosh/svelte-multiselect/issues/249) welcome! | ||
@@ -391,0 +391,0 @@ ## 🎰   Slots |
Sorry, the diff of this file is not supported yet
88511
27
404
Updatedsvelte@^4.0.5