@commercetools-uikit/localized-rich-text-input 19.9.0 → 19.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/commercetools-uikit-localized-rich-text-input.cjs.dev.js +1 -1
- package/dist/commercetools-uikit-localized-rich-text-input.cjs.prod.js +1 -1
- package/dist/commercetools-uikit-localized-rich-text-input.esm.js +1 -1
- package/dist/declarations/src/localized-rich-text-input.d.ts +68 -0
- package/package.json +16 -16
|
@@ -639,7 +639,7 @@ LocalizedRichTextInput.isTouched = localizedUtils.isTouched;
|
|
|
639
639
|
var LocalizedRichTextInput$1 = LocalizedRichTextInput;
|
|
640
640
|
|
|
641
641
|
// NOTE: This string will be replaced on build time with the package version.
|
|
642
|
-
var version = "19.
|
|
642
|
+
var version = "19.11.0";
|
|
643
643
|
|
|
644
644
|
exports["default"] = LocalizedRichTextInput$1;
|
|
645
645
|
exports.version = version;
|
|
@@ -568,7 +568,7 @@ LocalizedRichTextInput.isTouched = localizedUtils.isTouched;
|
|
|
568
568
|
var LocalizedRichTextInput$1 = LocalizedRichTextInput;
|
|
569
569
|
|
|
570
570
|
// NOTE: This string will be replaced on build time with the package version.
|
|
571
|
-
var version = "19.
|
|
571
|
+
var version = "19.11.0";
|
|
572
572
|
|
|
573
573
|
exports["default"] = LocalizedRichTextInput$1;
|
|
574
574
|
exports.version = version;
|
|
@@ -610,6 +610,6 @@ LocalizedRichTextInput.isTouched = isTouched;
|
|
|
610
610
|
var LocalizedRichTextInput$1 = LocalizedRichTextInput;
|
|
611
611
|
|
|
612
612
|
// NOTE: This string will be replaced on build time with the package version.
|
|
613
|
-
var version = "19.
|
|
613
|
+
var version = "19.11.0";
|
|
614
614
|
|
|
615
615
|
export { LocalizedRichTextInput$1 as default, version };
|
|
@@ -14,28 +14,96 @@ type TCustomEvent = {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export type TLocalizedRichTextInputProps = {
|
|
17
|
+
/**
|
|
18
|
+
* Used as prefix of HTML `id` property. Each input field id will have the language as a suffix (`${idPrefix}.${lang}`), e.g. `foo.en
|
|
19
|
+
*/
|
|
17
20
|
id?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Used as HTML `name` property for each input field. Each input field name will have the language as a suffix (`${namePrefix}.${lang}`), e.g. `foo.en`
|
|
23
|
+
*/
|
|
18
24
|
name?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Values to use. Keyed by language, the values are the actual values, e.g. `{ en: '<p>Horse</p>', de: '<p>Pferd</p>' }
|
|
27
|
+
*/
|
|
19
28
|
value: Record<string, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Gets called when any input is changed. Is called with the change event of the changed input.
|
|
31
|
+
*/
|
|
20
32
|
onChange?: (event: TCustomEvent) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Specifies which language will be shown in case the `LocalizedRichTextInput` is collapsed.
|
|
35
|
+
*/
|
|
21
36
|
selectedLanguage: string;
|
|
37
|
+
/**
|
|
38
|
+
* Called when any field is blurred. Is called with the `event` of that field.
|
|
39
|
+
*/
|
|
22
40
|
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
41
|
+
/**
|
|
42
|
+
* Called when any field is focussed. Is called with the `event` of that field.
|
|
43
|
+
*/
|
|
23
44
|
onFocus?: FocusEventHandler<HTMLDivElement>;
|
|
45
|
+
/**
|
|
46
|
+
* Expands input components holding multiline values instead of collapsing them by default.
|
|
47
|
+
*/
|
|
24
48
|
defaultExpandMultilineText?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Will hide the language expansion controls when set to `true`. All languages will be shown when set to `true`
|
|
51
|
+
*/
|
|
25
52
|
hideLanguageExpansionControls?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Controls whether one or all languages are visible by default. Pass `true` to show all languages by default.
|
|
55
|
+
*/
|
|
26
56
|
defaultExpandLanguages?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Disables all input
|
|
59
|
+
*/
|
|
27
60
|
isDisabled?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Disables all input fields and shows them in read-only mode.
|
|
63
|
+
*/
|
|
28
64
|
isReadOnly?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Placeholders for each language. Object of the same shape as
|
|
67
|
+
*/
|
|
29
68
|
placeholder?: Record<string, string>;
|
|
69
|
+
/**
|
|
70
|
+
* Horizontal size limit of the input fields.
|
|
71
|
+
*/
|
|
30
72
|
horizontalConstraint?: 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
73
|
+
/**
|
|
74
|
+
* Will apply the error state to each input without showing any error message.
|
|
75
|
+
*/
|
|
31
76
|
hasError?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Will apply the warning state to each input without showing any warning message.
|
|
79
|
+
*/
|
|
32
80
|
hasWarning?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Used to show errors underneath the inputs of specific languages. Pass an object whose key is a language and whose value is the error to show for that key.
|
|
83
|
+
*/
|
|
33
84
|
errors?: TErrors;
|
|
85
|
+
/**
|
|
86
|
+
* Used to show warnings underneath the inputs of specific languages. Pass an object whose key is a language and whose value is the warning to show for that key.
|
|
87
|
+
*/
|
|
34
88
|
warnings?: TWarnings;
|
|
89
|
+
/**
|
|
90
|
+
* An object mapping locales to additional messages to be rendered below each input element.
|
|
91
|
+
Example:
|
|
92
|
+
{
|
|
93
|
+
en: 'Some value',
|
|
94
|
+
es: 'Algún valor',
|
|
95
|
+
}
|
|
96
|
+
*/
|
|
35
97
|
additionalInfo?: Record<string, string | ReactNode | (MessageDescriptor & {
|
|
36
98
|
values: Record<string, ReactNode>;
|
|
37
99
|
})>;
|
|
100
|
+
/**
|
|
101
|
+
* Shows an `expand` icon in the toolbar
|
|
102
|
+
*/
|
|
38
103
|
showExpandIcon: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Called when the `expand` button is clicked
|
|
106
|
+
*/
|
|
39
107
|
onClickExpand?: () => boolean;
|
|
40
108
|
};
|
|
41
109
|
type StaticProps = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/localized-rich-text-input",
|
|
3
3
|
"description": "A controlled text input component for localized rich text input with validation states.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.11.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/collapsible-motion": "19.
|
|
25
|
-
"@commercetools-uikit/constraints": "19.
|
|
26
|
-
"@commercetools-uikit/design-system": "19.
|
|
27
|
-
"@commercetools-uikit/flat-button": "19.
|
|
28
|
-
"@commercetools-uikit/hooks": "19.
|
|
29
|
-
"@commercetools-uikit/icons": "19.
|
|
30
|
-
"@commercetools-uikit/input-utils": "19.
|
|
31
|
-
"@commercetools-uikit/localized-utils": "19.
|
|
32
|
-
"@commercetools-uikit/messages": "19.
|
|
33
|
-
"@commercetools-uikit/rich-text-utils": "19.
|
|
34
|
-
"@commercetools-uikit/spacings-inline": "19.
|
|
35
|
-
"@commercetools-uikit/spacings-stack": "19.
|
|
36
|
-
"@commercetools-uikit/text": "19.
|
|
37
|
-
"@commercetools-uikit/tooltip": "19.
|
|
38
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/collapsible-motion": "19.11.0",
|
|
25
|
+
"@commercetools-uikit/constraints": "19.11.0",
|
|
26
|
+
"@commercetools-uikit/design-system": "19.11.0",
|
|
27
|
+
"@commercetools-uikit/flat-button": "19.11.0",
|
|
28
|
+
"@commercetools-uikit/hooks": "19.11.0",
|
|
29
|
+
"@commercetools-uikit/icons": "19.11.0",
|
|
30
|
+
"@commercetools-uikit/input-utils": "19.11.0",
|
|
31
|
+
"@commercetools-uikit/localized-utils": "19.11.0",
|
|
32
|
+
"@commercetools-uikit/messages": "19.11.0",
|
|
33
|
+
"@commercetools-uikit/rich-text-utils": "19.11.0",
|
|
34
|
+
"@commercetools-uikit/spacings-inline": "19.11.0",
|
|
35
|
+
"@commercetools-uikit/spacings-stack": "19.11.0",
|
|
36
|
+
"@commercetools-uikit/text": "19.11.0",
|
|
37
|
+
"@commercetools-uikit/tooltip": "19.11.0",
|
|
38
|
+
"@commercetools-uikit/utils": "19.11.0",
|
|
39
39
|
"@emotion/react": "^11.10.5",
|
|
40
40
|
"@emotion/styled": "^11.10.5",
|
|
41
41
|
"downshift": "6.1.12",
|