@try-at-software/input-elements 1.2.6 → 1.2.8
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/lib/SingleValueInputElements/IdentityPickerInputElement/IIdentityPickerProps.d.ts +4 -1
- package/lib/SingleValueInputElements/IdentityPickerInputElement/IdentityPicker.d.ts +1 -1
- package/lib/SingleValueInputElements/IdentityPickerInputElement/IdentityPicker.js +3 -3
- package/package.json +1 -1
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IBasePickerSuggestionsProps, IPersonaProps, ISuggestionItemProps } from '@fluentui/react';
|
|
2
3
|
import { IBaseInputElementProps } from '../IBaseInputElementProps';
|
|
3
4
|
export interface IIdentityPickerProps<TIdentity extends IPersonaProps = IPersonaProps> extends IBaseInputElementProps {
|
|
4
5
|
onResolveSuggestions: (query: string, selectedItems?: TIdentity[]) => Promise<TIdentity[]>;
|
|
5
6
|
getTextFromItem?: (item: TIdentity, currentValue?: string) => string;
|
|
6
7
|
onEmptyResolveSuggestions?: (currentPersonas?: TIdentity[]) => Promise<TIdentity[]>;
|
|
8
|
+
onRenderSuggestionItems?: (item: TIdentity, props: ISuggestionItemProps<TIdentity>) => JSX.Element;
|
|
7
9
|
suggestionProps?: IBasePickerSuggestionsProps;
|
|
8
10
|
onRemoveSuggestion?: (item: TIdentity) => void;
|
|
9
11
|
onInputChange?: (input: string) => string;
|
|
10
12
|
resolveDelay?: number;
|
|
11
13
|
itemLimit?: number;
|
|
14
|
+
pickerCalloutClassName?: string;
|
|
12
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IPersonaProps } from '@fluentui/react';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import { IPersonaProps } from '@fluentui/react';
|
|
3
3
|
import { IBaseInputElementDynamicProps } from '../IBaseInputElementDynamicProps';
|
|
4
4
|
import { IDynamicProps } from '../IDynamicProps';
|
|
5
5
|
import { IOperativeProps } from '../IOperativeProps';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IdentityPicker = void 0;
|
|
4
|
-
const react_1 = require("@fluentui/react");
|
|
5
4
|
const React = require("react");
|
|
5
|
+
const react_1 = require("@fluentui/react");
|
|
6
6
|
const Components_1 = require("../../Components");
|
|
7
7
|
class IdentityPicker extends React.Component {
|
|
8
8
|
render() {
|
|
@@ -12,12 +12,12 @@ class IdentityPicker extends React.Component {
|
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
React.createElement(Components_1.LabelRenderer, { label: this.props.label, required: !!this.props.renderRequiredIndicator }),
|
|
14
14
|
React.createElement("div", { "data-automationid": "identity-picker" },
|
|
15
|
-
React.createElement(react_1.NormalPeoplePicker, { onResolveSuggestions: operativeProps.onResolveSuggestions, onEmptyResolveSuggestions: operativeProps.onEmptyResolveSuggestions, getTextFromItem: operativeProps.getTextFromItem, pickerSuggestionsProps: operativeProps.suggestionProps, onRemoveSuggestion: operativeProps.onRemoveSuggestion, onInputChange: operativeProps.onInputChange, resolveDelay: operativeProps.resolveDelay, itemLimit: operativeProps.itemLimit, disabled: dynamicProps.isDisabled, defaultSelectedItems: this.props.value, inputProps: {
|
|
15
|
+
React.createElement(react_1.NormalPeoplePicker, { onResolveSuggestions: operativeProps.onResolveSuggestions, onEmptyResolveSuggestions: operativeProps.onEmptyResolveSuggestions, getTextFromItem: operativeProps.getTextFromItem, pickerSuggestionsProps: operativeProps.suggestionProps, onRenderSuggestionsItem: operativeProps.onRenderSuggestionItems, onRemoveSuggestion: operativeProps.onRemoveSuggestion, onInputChange: operativeProps.onInputChange, resolveDelay: operativeProps.resolveDelay, itemLimit: operativeProps.itemLimit, disabled: dynamicProps.isDisabled, defaultSelectedItems: this.props.value, inputProps: {
|
|
16
16
|
required: this.props.renderRequiredIndicator,
|
|
17
17
|
placeholder: !!this.props.value && this.props.value.length > 0 ? '' : operativeProps.placeholder
|
|
18
18
|
}, onChange: (items) => {
|
|
19
19
|
this.props.onChange(items);
|
|
20
|
-
} })),
|
|
20
|
+
}, pickerCalloutProps: { className: operativeProps.pickerCalloutClassName } })),
|
|
21
21
|
React.createElement(Components_1.ErrorRenderer, { error: this.props.errorMessage, messageBarType: react_1.MessageBarType.warning })));
|
|
22
22
|
}
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@try-at-software/input-elements",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "A package providing different input elements that are extensible and easily configurable for your custom needs.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|