@sustaina/shared-ui 1.63.1 → 1.64.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/index.d.mts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1329,13 +1329,15 @@ type RichTextProps<T = DefaultMentionItem$1> = {
|
|
|
1329
1329
|
mentions?: T[];
|
|
1330
1330
|
/** Configuration for mapping mention item fields. If not provided, assumes default structure {id, name, fieldName} */
|
|
1331
1331
|
mentionConfig?: MentionConfig$1<T>;
|
|
1332
|
-
/** Optional trigger character for mentions (e.g., "$", "@"). If not provided, suggestions appear when typing matching text */
|
|
1332
|
+
/** Optional trigger character for mentions (e.g., "$", "@", "{{"). If not provided, suggestions appear when typing matching text */
|
|
1333
1333
|
mentionTrigger?: string;
|
|
1334
|
+
/** If true, suggestions will ONLY appear when the trigger is typed. Text matching is disabled. Requires mentionTrigger to be set. */
|
|
1335
|
+
mentionTriggerOnly?: boolean;
|
|
1334
1336
|
/** If true, mentions will be rendered as plain text (e.g., {{FIRSTNAME}}) suitable for mail templates. If false, mentions will be styled HTML tags */
|
|
1335
1337
|
plainTextMentions?: boolean;
|
|
1336
1338
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">;
|
|
1337
1339
|
|
|
1338
|
-
declare function RichTextInner<T = DefaultMentionItem$1>({ value, defaultValue, onChange, onHtmlChange, onTextChange, placeholder, readOnly, disabled, editorClassName, toolbarClassName, autoFocus, onImageUpload, onImageUploadError, onImageDialogUpload, onImageDialogUploadError, acceptImageMimeTypes, allowImageUrlInsert, maxLength, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: RichTextProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
1340
|
+
declare function RichTextInner<T = DefaultMentionItem$1>({ value, defaultValue, onChange, onHtmlChange, onTextChange, placeholder, readOnly, disabled, editorClassName, toolbarClassName, autoFocus, onImageUpload, onImageUploadError, onImageDialogUpload, onImageDialogUploadError, acceptImageMimeTypes, allowImageUrlInsert, maxLength, mentions, mentionConfig, mentionTrigger, mentionTriggerOnly, plainTextMentions, className, id, ...rest }: RichTextProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
1339
1341
|
declare const RichText: <T = DefaultMentionItem$1>(props: RichTextProps<T> & {
|
|
1340
1342
|
ref?: React.Ref<HTMLDivElement>;
|
|
1341
1343
|
}) => ReturnType<typeof RichTextInner>;
|
|
@@ -2081,13 +2083,15 @@ type InputMentionProps<T = DefaultMentionItem> = {
|
|
|
2081
2083
|
mentions?: T[];
|
|
2082
2084
|
/** Configuration for mapping mention item fields. If not provided, assumes default structure {id, name, fieldName} */
|
|
2083
2085
|
mentionConfig?: MentionConfig<T>;
|
|
2084
|
-
/** Optional trigger character for mentions (e.g., "$", "@"). If not provided, suggestions appear when typing matching text */
|
|
2086
|
+
/** Optional trigger character for mentions (e.g., "$", "@", "{{"). If not provided, suggestions appear when typing matching text */
|
|
2085
2087
|
mentionTrigger?: string;
|
|
2088
|
+
/** If true, suggestions will ONLY appear when the trigger is typed. Text matching is disabled. Requires mentionTrigger to be set. */
|
|
2089
|
+
mentionTriggerOnly?: boolean;
|
|
2086
2090
|
/** If true, mentions will be rendered as plain text (e.g., {{FIRSTNAME}}) suitable for mail templates. If false, mentions will be styled HTML tags */
|
|
2087
2091
|
plainTextMentions?: boolean;
|
|
2088
2092
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">;
|
|
2089
2093
|
|
|
2090
|
-
declare function InputMentionInner<T = DefaultMentionItem>({ value, onChange, placeholder, readOnly, disabled, editorClassName, autoFocus, maxLength, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: InputMentionProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
2094
|
+
declare function InputMentionInner<T = DefaultMentionItem>({ value, onChange, placeholder, readOnly, disabled, editorClassName, autoFocus, maxLength, mentions, mentionConfig, mentionTrigger, mentionTriggerOnly, plainTextMentions, className, id, ...rest }: InputMentionProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
2091
2095
|
declare const InputMention: <T = DefaultMentionItem>(props: InputMentionProps<T> & {
|
|
2092
2096
|
ref?: React.Ref<HTMLDivElement>;
|
|
2093
2097
|
}) => ReturnType<typeof InputMentionInner>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1329,13 +1329,15 @@ type RichTextProps<T = DefaultMentionItem$1> = {
|
|
|
1329
1329
|
mentions?: T[];
|
|
1330
1330
|
/** Configuration for mapping mention item fields. If not provided, assumes default structure {id, name, fieldName} */
|
|
1331
1331
|
mentionConfig?: MentionConfig$1<T>;
|
|
1332
|
-
/** Optional trigger character for mentions (e.g., "$", "@"). If not provided, suggestions appear when typing matching text */
|
|
1332
|
+
/** Optional trigger character for mentions (e.g., "$", "@", "{{"). If not provided, suggestions appear when typing matching text */
|
|
1333
1333
|
mentionTrigger?: string;
|
|
1334
|
+
/** If true, suggestions will ONLY appear when the trigger is typed. Text matching is disabled. Requires mentionTrigger to be set. */
|
|
1335
|
+
mentionTriggerOnly?: boolean;
|
|
1334
1336
|
/** If true, mentions will be rendered as plain text (e.g., {{FIRSTNAME}}) suitable for mail templates. If false, mentions will be styled HTML tags */
|
|
1335
1337
|
plainTextMentions?: boolean;
|
|
1336
1338
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">;
|
|
1337
1339
|
|
|
1338
|
-
declare function RichTextInner<T = DefaultMentionItem$1>({ value, defaultValue, onChange, onHtmlChange, onTextChange, placeholder, readOnly, disabled, editorClassName, toolbarClassName, autoFocus, onImageUpload, onImageUploadError, onImageDialogUpload, onImageDialogUploadError, acceptImageMimeTypes, allowImageUrlInsert, maxLength, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: RichTextProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
1340
|
+
declare function RichTextInner<T = DefaultMentionItem$1>({ value, defaultValue, onChange, onHtmlChange, onTextChange, placeholder, readOnly, disabled, editorClassName, toolbarClassName, autoFocus, onImageUpload, onImageUploadError, onImageDialogUpload, onImageDialogUploadError, acceptImageMimeTypes, allowImageUrlInsert, maxLength, mentions, mentionConfig, mentionTrigger, mentionTriggerOnly, plainTextMentions, className, id, ...rest }: RichTextProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
1339
1341
|
declare const RichText: <T = DefaultMentionItem$1>(props: RichTextProps<T> & {
|
|
1340
1342
|
ref?: React.Ref<HTMLDivElement>;
|
|
1341
1343
|
}) => ReturnType<typeof RichTextInner>;
|
|
@@ -2081,13 +2083,15 @@ type InputMentionProps<T = DefaultMentionItem> = {
|
|
|
2081
2083
|
mentions?: T[];
|
|
2082
2084
|
/** Configuration for mapping mention item fields. If not provided, assumes default structure {id, name, fieldName} */
|
|
2083
2085
|
mentionConfig?: MentionConfig<T>;
|
|
2084
|
-
/** Optional trigger character for mentions (e.g., "$", "@"). If not provided, suggestions appear when typing matching text */
|
|
2086
|
+
/** Optional trigger character for mentions (e.g., "$", "@", "{{"). If not provided, suggestions appear when typing matching text */
|
|
2085
2087
|
mentionTrigger?: string;
|
|
2088
|
+
/** If true, suggestions will ONLY appear when the trigger is typed. Text matching is disabled. Requires mentionTrigger to be set. */
|
|
2089
|
+
mentionTriggerOnly?: boolean;
|
|
2086
2090
|
/** If true, mentions will be rendered as plain text (e.g., {{FIRSTNAME}}) suitable for mail templates. If false, mentions will be styled HTML tags */
|
|
2087
2091
|
plainTextMentions?: boolean;
|
|
2088
2092
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">;
|
|
2089
2093
|
|
|
2090
|
-
declare function InputMentionInner<T = DefaultMentionItem>({ value, onChange, placeholder, readOnly, disabled, editorClassName, autoFocus, maxLength, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: InputMentionProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
2094
|
+
declare function InputMentionInner<T = DefaultMentionItem>({ value, onChange, placeholder, readOnly, disabled, editorClassName, autoFocus, maxLength, mentions, mentionConfig, mentionTrigger, mentionTriggerOnly, plainTextMentions, className, id, ...rest }: InputMentionProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
2091
2095
|
declare const InputMention: <T = DefaultMentionItem>(props: InputMentionProps<T> & {
|
|
2092
2096
|
ref?: React.Ref<HTMLDivElement>;
|
|
2093
2097
|
}) => ReturnType<typeof InputMentionInner>;
|
package/dist/index.js
CHANGED
|
@@ -15719,7 +15719,8 @@ function MentionsTypeaheadMenuItem({
|
|
|
15719
15719
|
function MentionsPlugin({
|
|
15720
15720
|
mentions = [],
|
|
15721
15721
|
mentionConfig,
|
|
15722
|
-
trigger
|
|
15722
|
+
trigger,
|
|
15723
|
+
triggerOnly = false
|
|
15723
15724
|
}) {
|
|
15724
15725
|
const [editor] = LexicalComposerContext.useLexicalComposerContext();
|
|
15725
15726
|
const [queryString, setQueryString] = React.useState(null);
|
|
@@ -15894,10 +15895,13 @@ function MentionsPlugin({
|
|
|
15894
15895
|
if (triggerMatch) {
|
|
15895
15896
|
return triggerMatch;
|
|
15896
15897
|
}
|
|
15898
|
+
if (triggerOnly) {
|
|
15899
|
+
return null;
|
|
15900
|
+
}
|
|
15897
15901
|
}
|
|
15898
15902
|
return checkForTextMatch(text, mentions, mentionConfig);
|
|
15899
15903
|
},
|
|
15900
|
-
[trigger, mentions, mentionConfig]
|
|
15904
|
+
[trigger, triggerOnly, mentions, mentionConfig]
|
|
15901
15905
|
);
|
|
15902
15906
|
if (mentions.length === 0) {
|
|
15903
15907
|
return null;
|
|
@@ -16090,6 +16094,7 @@ function RichTextInner({
|
|
|
16090
16094
|
mentions,
|
|
16091
16095
|
mentionConfig,
|
|
16092
16096
|
mentionTrigger,
|
|
16097
|
+
mentionTriggerOnly,
|
|
16093
16098
|
plainTextMentions = false,
|
|
16094
16099
|
className,
|
|
16095
16100
|
id,
|
|
@@ -16198,7 +16203,8 @@ function RichTextInner({
|
|
|
16198
16203
|
{
|
|
16199
16204
|
mentions,
|
|
16200
16205
|
mentionConfig: finalMentionConfig,
|
|
16201
|
-
trigger: mentionTrigger
|
|
16206
|
+
trigger: mentionTrigger,
|
|
16207
|
+
triggerOnly: mentionTriggerOnly
|
|
16202
16208
|
}
|
|
16203
16209
|
),
|
|
16204
16210
|
/* @__PURE__ */ jsxRuntime.jsx(MentionDeletePlugin, {}),
|
|
@@ -18158,7 +18164,8 @@ function MentionsTypeaheadMenuItem2({
|
|
|
18158
18164
|
function MentionsPlugin2({
|
|
18159
18165
|
mentions = [],
|
|
18160
18166
|
mentionConfig,
|
|
18161
|
-
trigger
|
|
18167
|
+
trigger,
|
|
18168
|
+
triggerOnly = false
|
|
18162
18169
|
}) {
|
|
18163
18170
|
const [editor] = LexicalComposerContext.useLexicalComposerContext();
|
|
18164
18171
|
const [queryString, setQueryString] = React.useState(null);
|
|
@@ -18336,10 +18343,13 @@ function MentionsPlugin2({
|
|
|
18336
18343
|
if (triggerMatch) {
|
|
18337
18344
|
return triggerMatch;
|
|
18338
18345
|
}
|
|
18346
|
+
if (triggerOnly) {
|
|
18347
|
+
return null;
|
|
18348
|
+
}
|
|
18339
18349
|
}
|
|
18340
18350
|
return checkForTextMatch2(text, mentions, mentionConfig);
|
|
18341
18351
|
},
|
|
18342
|
-
[trigger, mentions, mentionConfig]
|
|
18352
|
+
[trigger, triggerOnly, mentions, mentionConfig]
|
|
18343
18353
|
);
|
|
18344
18354
|
if (mentions.length === 0) {
|
|
18345
18355
|
return null;
|
|
@@ -18490,6 +18500,7 @@ function InputMentionInner({
|
|
|
18490
18500
|
mentions,
|
|
18491
18501
|
mentionConfig,
|
|
18492
18502
|
mentionTrigger,
|
|
18503
|
+
mentionTriggerOnly,
|
|
18493
18504
|
plainTextMentions = false,
|
|
18494
18505
|
className,
|
|
18495
18506
|
id,
|
|
@@ -18569,7 +18580,8 @@ function InputMentionInner({
|
|
|
18569
18580
|
{
|
|
18570
18581
|
mentions,
|
|
18571
18582
|
mentionConfig: finalMentionConfig,
|
|
18572
|
-
trigger: mentionTrigger
|
|
18583
|
+
trigger: mentionTrigger,
|
|
18584
|
+
triggerOnly: mentionTriggerOnly
|
|
18573
18585
|
}
|
|
18574
18586
|
),
|
|
18575
18587
|
/* @__PURE__ */ jsxRuntime.jsx(MentionDeletePlugin2, {}),
|