@equisoft/design-elements-react 9.7.2-snapshot.20250520130218 → 9.7.2-snapshot.20250520201612
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +9 -10
- package/dist/components/date-picker/calendar-header.d.ts +1 -1
- package/dist/components/date-picker/utils/datepicker-utils.d.ts +1 -1
- package/dist/components/dropdown-list/dropdown-list-option.d.ts +4 -0
- package/dist/components/dropdown-list/dropdown-list.d.ts +2 -4
- package/dist/components/dropdown-list/utils/dropdown-list-utils.d.ts +9 -0
- package/dist/components/dropdown-list/utils/dropdown-list-utils.test.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/utils/array.d.ts +2 -1
- package/dist/utils/dom.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Locale } from 'date-fns';
|
|
2
|
-
import { DropdownListOption } from '../../dropdown-list/dropdown-list';
|
|
2
|
+
import { DropdownListOption } from '../../dropdown-list/dropdown-list-option';
|
|
3
3
|
export type SupportedLocale = 'fr-CA' | 'en-CA' | 'en-US';
|
|
4
4
|
export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
5
|
export declare function getLocale(localeArray: Locale[], localeCode?: SupportedLocale): Locale;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { VoidFunctionComponent } from 'react';
|
|
2
2
|
import { IconName } from '../icon/icon';
|
|
3
|
-
import { ListboxOption } from '../listbox/listbox';
|
|
4
3
|
import { ToggletipProps } from '../toggletip/toggletip';
|
|
5
4
|
import { TooltipProps } from '../tooltip/tooltip';
|
|
6
|
-
|
|
7
|
-
label: string;
|
|
8
|
-
}
|
|
5
|
+
import { DropdownListOption } from './dropdown-list-option';
|
|
9
6
|
type Value = string | string[];
|
|
10
7
|
export interface TagValue {
|
|
11
8
|
id?: string;
|
|
@@ -54,6 +51,7 @@ export interface DropdownListProps<M extends boolean | undefined> {
|
|
|
54
51
|
value?: Value;
|
|
55
52
|
hint?: string;
|
|
56
53
|
multiselect?: M;
|
|
54
|
+
maxSelectableOptions?: number;
|
|
57
55
|
/**
|
|
58
56
|
* Display an icon inside the Dropdown control
|
|
59
57
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownListOption } from '../dropdown-list-option';
|
|
2
|
+
export declare function optionsAreEqual(option: DropdownListOption, optionToCompare: DropdownListOption): boolean;
|
|
3
|
+
export declare function addUniqueOption(newOption: DropdownListOption, options?: DropdownListOption[]): DropdownListOption[];
|
|
4
|
+
export declare function removeOption(optionToRemove: DropdownListOption, options?: DropdownListOption[]): DropdownListOption[];
|
|
5
|
+
export declare function isOptionEnabled(option: DropdownListOption): boolean;
|
|
6
|
+
export declare function disableNonSelectedOptions(options: DropdownListOption[], selectedOptions: DropdownListOption[]): DropdownListOption[];
|
|
7
|
+
export declare function getDefaultOptions(value: string | string[] | undefined, options: DropdownListOption[], multiselect?: boolean): DropdownListOption[] | undefined;
|
|
8
|
+
export declare function getOptionLabel(option: DropdownListOption): string;
|
|
9
|
+
export declare function isOptionSelected(option: DropdownListOption, selectedOptions?: DropdownListOption[]): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ export { Checkbox, CheckboxProps } from './components/checkbox/checkbox';
|
|
|
14
14
|
export { CheckboxGroup } from './components/checkbox-group/checkbox-group';
|
|
15
15
|
export { Combobox, ComboboxOption } from './components/combobox/combobox';
|
|
16
16
|
export { Datepicker, DatepickerHandles } from './components/date-picker/date-picker';
|
|
17
|
-
export { DropdownList
|
|
17
|
+
export { DropdownList } from './components/dropdown-list/dropdown-list';
|
|
18
|
+
export { DropdownListOption } from './components/dropdown-list/dropdown-list-option';
|
|
18
19
|
export * from './components/money-input';
|
|
19
20
|
export * from './components/numeric-input';
|
|
20
21
|
export { PasswordCreationInput } from './components/password-creation-input/password-creation-input';
|
package/dist/utils/array.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ export declare function getPreviousElement<T>(array: T[], currentIndex: number,
|
|
|
10
10
|
export declare function findPreviousElement<T>(array: T[], currentIndex: number, predicate: Predicate<T>, { wrapAround }?: FindOptions): T | undefined;
|
|
11
11
|
export declare function getNextElement<T>(array: T[], currentIndex: number, { wrapAround }?: FindOptions): T | undefined;
|
|
12
12
|
export declare function findNextElement<T>(array: T[], currentIndex: number, predicate: Predicate<T>, { wrapAround }?: FindOptions): T | undefined;
|
|
13
|
-
export declare function unique<T>(list: T[]): T[];
|
|
13
|
+
export declare function unique<T>(list: T[], predicate?: (item: T, itemToCompared: T) => boolean): T[];
|
|
14
|
+
export declare function includes<T>(list: T[], item: T, predicate?: (item: T, itemToCompared: T) => boolean): boolean;
|
|
14
15
|
export {};
|
package/dist/utils/dom.d.ts
CHANGED
package/package.json
CHANGED