@webority/ui-react 0.10.0 → 0.11.0
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/types/components/AppMultiSelect.d.ts +21 -2
- package/dist/ui-react.js +1451 -1435
- package/package.json +3 -3
|
@@ -3,13 +3,32 @@ import "@webority/ui-elements";
|
|
|
3
3
|
* Multi-value select over the shared `<wui-multiselect>` element. The control shows each
|
|
4
4
|
* chosen value as a removable `.chip`; the dropdown is a searchable checklist.
|
|
5
5
|
*
|
|
6
|
+
* Options may be rich rows: `description` is a secondary line under the label (also matched
|
|
7
|
+
* by the search), `avatar` an image URL and `initials` the face shown without (or under) it,
|
|
8
|
+
* and `disabled` keeps a row visible but unselectable with `disabledHint` beside it
|
|
9
|
+
* (e.g. "Already added").
|
|
10
|
+
*
|
|
11
|
+
* `allowCustom` turns the control into free entry: an inline text input after the chips
|
|
12
|
+
* filters the list, and Enter / comma / blur / a pasted list commit whatever was typed as its
|
|
13
|
+
* own chip (value = label = the text). Typed text is checked against `customPattern` then
|
|
14
|
+
* `validateCustom`; a refusal keeps the text and shows the message under the control. Chips are
|
|
15
|
+
* de-duplicated ignoring case. The in-menu search box is not shown in this mode.
|
|
16
|
+
*
|
|
6
17
|
* @param {object} props
|
|
7
18
|
* @param {string[]} [props.values] Selected option values.
|
|
8
19
|
* @param {(values: string[]) => void} [props.onChange]
|
|
9
|
-
* @param {{value: string, label: string}[]} [props.options]
|
|
20
|
+
* @param {{value: string, label: string, description?: string, avatar?: string, initials?: string, disabled?: boolean, disabledHint?: string}[]} [props.options]
|
|
10
21
|
* @param {string} [props.placeholder]
|
|
11
22
|
* @param {string} [props.searchPlaceholder] Placeholder for the in-menu search box.
|
|
12
|
-
* @param {boolean} [props.searchable=true]
|
|
23
|
+
* @param {boolean} [props.searchable=true] Ignored under `allowCustom`, whose inline input is the search.
|
|
24
|
+
* @param {boolean} [props.allowCustom=false] Accept typed entries that are not options.
|
|
25
|
+
* @param {(value: string) => boolean | string} [props.validateCustom] Checks a typed entry:
|
|
26
|
+
* `true` accepts, a string refuses with that message, anything else refuses with
|
|
27
|
+
* `customInvalidMessage`. Runs after `customPattern`.
|
|
28
|
+
* @param {string} [props.customPattern] Regular expression a typed entry must match in full
|
|
29
|
+
* (anchored like the HTML `pattern` attribute).
|
|
30
|
+
* @param {string} [props.customInvalidMessage] Message for a refused typed entry
|
|
31
|
+
* (default "Enter a valid value.").
|
|
13
32
|
* @param {boolean} [props.disabled]
|
|
14
33
|
* @param {string} [props.icon] Leading glyph inside the control (a Bootstrap Icons name).
|
|
15
34
|
* @param {'sm'|'lg'} [props.size] Control size around the default.
|