@ni/nimble-components 24.1.12 → 24.1.13
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/all-components-bundle.js +9 -17
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +5 -5
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.js +3 -1
- package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.js.map +1 -1
- package/dist/esm/rich-text/models/configuration.js +1 -1
- package/dist/esm/rich-text/models/configuration.js.map +1 -1
- package/dist/esm/rich-text/models/rich-text-validator.js +1 -1
- package/dist/esm/rich-text/models/rich-text-validator.js.map +1 -1
- package/dist/esm/rich-text-mention/base/index.d.ts +1 -4
- package/dist/esm/rich-text-mention/base/index.js +5 -7
- package/dist/esm/rich-text-mention/base/index.js.map +1 -1
- package/dist/esm/rich-text-mention/base/models/mention-internals.d.ts +9 -7
- package/dist/esm/rich-text-mention/base/models/mention-internals.js +1 -7
- package/dist/esm/rich-text-mention/base/models/mention-internals.js.map +1 -1
- package/dist/esm/rich-text-mention/base/models/mention-validator.d.ts +1 -4
- package/dist/esm/rich-text-mention/base/models/mention-validator.js +1 -6
- package/dist/esm/rich-text-mention/base/models/mention-validator.js.map +1 -1
- package/dist/esm/rich-text-mention/users/index.d.ts +1 -2
- package/dist/esm/rich-text-mention/users/index.js +2 -4
- package/dist/esm/rich-text-mention/users/index.js.map +1 -1
- package/dist/esm/rich-text-mention/users/models/rich-text-mention-users-validator.d.ts +1 -2
- package/dist/esm/rich-text-mention/users/models/rich-text-mention-users-validator.js +2 -2
- package/dist/esm/rich-text-mention/users/models/rich-text-mention-users-validator.js.map +1 -1
- package/dist/esm/src/rich-text-mention/base/index.d.ts +1 -4
- package/dist/esm/src/rich-text-mention/base/models/mention-internals.d.ts +9 -7
- package/dist/esm/src/rich-text-mention/base/models/mention-validator.d.ts +1 -4
- package/dist/esm/src/rich-text-mention/users/index.d.ts +1 -2
- package/dist/esm/src/rich-text-mention/users/models/rich-text-mention-users-validator.d.ts +1 -2
- package/package.json +1 -1
|
@@ -12,8 +12,6 @@ export declare abstract class RichTextMention<TValidator extends RichTextMention
|
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
14
|
readonly mentionInternals: MentionInternals;
|
|
15
|
-
/** @internal */
|
|
16
|
-
readonly validator: TValidator;
|
|
17
15
|
/**
|
|
18
16
|
* A regex used to extract user ID from user key (url) while parsing and serializing a markdown.
|
|
19
17
|
*/
|
|
@@ -42,9 +40,8 @@ export declare abstract class RichTextMention<TValidator extends RichTextMention
|
|
|
42
40
|
* @internal
|
|
43
41
|
*/
|
|
44
42
|
handleChange(source: unknown, args: unknown): void;
|
|
45
|
-
protected abstract createValidator(): TValidator;
|
|
46
43
|
protected abstract getObservedMappingProperty(): string[];
|
|
47
|
-
protected abstract getMentionInternalsOptions(): MentionInternalsOptions
|
|
44
|
+
protected abstract getMentionInternalsOptions(): MentionInternalsOptions<TValidator>;
|
|
48
45
|
protected abstract createMappingConfig(mapping: Mapping<unknown>): MappingConfig;
|
|
49
46
|
private getMappingConfigs;
|
|
50
47
|
private updateMappingConfigs;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
2
2
|
import type { MappingConfigs, MentionUpdateEmitter } from '../types';
|
|
3
|
-
|
|
3
|
+
import type { RichTextMentionValidator } from './mention-validator';
|
|
4
|
+
export interface MentionInternalsOptions<TValidator extends RichTextMentionValidator = RichTextMentionValidator> {
|
|
4
5
|
readonly icon: string;
|
|
5
6
|
readonly character: string;
|
|
6
7
|
readonly viewElement: string;
|
|
8
|
+
readonly validator: TValidator;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* Internal mention state
|
|
10
12
|
*/
|
|
11
|
-
export declare class MentionInternals {
|
|
13
|
+
export declare class MentionInternals<TValidator extends RichTextMentionValidator = RichTextMentionValidator> {
|
|
12
14
|
/**
|
|
13
15
|
* Mappings configured for the mention node
|
|
14
16
|
*/
|
|
15
17
|
mappingConfigs?: MappingConfigs;
|
|
16
|
-
/**
|
|
17
|
-
* Whether this mention has a valid configuration.
|
|
18
|
-
*/
|
|
19
|
-
validConfiguration: boolean;
|
|
20
18
|
/**
|
|
21
19
|
* Regex used to extract user ID from user key (url)
|
|
22
20
|
*/
|
|
@@ -37,9 +35,13 @@ export declare class MentionInternals {
|
|
|
37
35
|
* Mention view element to render in rich text components
|
|
38
36
|
*/
|
|
39
37
|
readonly viewElement: string;
|
|
38
|
+
/**
|
|
39
|
+
* The validator for the mention element.
|
|
40
|
+
*/
|
|
41
|
+
readonly validator: TValidator;
|
|
40
42
|
/**
|
|
41
43
|
* Function to invoke to emit a mention-update event
|
|
42
44
|
*/
|
|
43
45
|
readonly mentionUpdateEmitter: MentionUpdateEmitter;
|
|
44
|
-
constructor(options: MentionInternalsOptions
|
|
46
|
+
constructor(options: MentionInternalsOptions<TValidator>, mentionUpdateEmitter: MentionUpdateEmitter);
|
|
45
47
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Mapping } from '../../../mapping/base';
|
|
2
2
|
import { Validator, ValidityObject } from '../../../utilities/models/validator';
|
|
3
|
-
import type { MentionInternals } from './mention-internals';
|
|
4
3
|
export interface RichTextMentionValidity extends ValidityObject {
|
|
5
4
|
}
|
|
6
5
|
type FlagNames<T> = T extends readonly (infer U)[] ? U : never;
|
|
@@ -9,8 +8,7 @@ export declare const baseValidityFlagNames: readonly ["duplicateMappingMentionHr
|
|
|
9
8
|
* Validator for RichTextMention
|
|
10
9
|
*/
|
|
11
10
|
export declare class RichTextMentionValidator<ValidityFlagNames extends readonly string[] = typeof baseValidityFlagNames> extends Validator<typeof baseValidityFlagNames | ValidityFlagNames> {
|
|
12
|
-
|
|
13
|
-
constructor(mentionInternals: MentionInternals, configValidityKeys: ValidityFlagNames);
|
|
11
|
+
constructor(configValidityKeys: ValidityFlagNames);
|
|
14
12
|
validate(mappings: Mapping<unknown>[], pattern: string | undefined): void;
|
|
15
13
|
/**
|
|
16
14
|
* @returns an object containing flags for various ways the configuation can be invalid
|
|
@@ -20,7 +18,6 @@ export declare class RichTextMentionValidator<ValidityFlagNames extends readonly
|
|
|
20
18
|
* Sets a particular validity condition flag's value, e.g. "hasInvalidFooValue" = true
|
|
21
19
|
*/
|
|
22
20
|
protected setConditionValue(name: FlagNames<typeof baseValidityFlagNames | ValidityFlagNames>, isInvalid: boolean): void;
|
|
23
|
-
private updateMentionInternalsFlag;
|
|
24
21
|
private validateMissingPattern;
|
|
25
22
|
private validatePattern;
|
|
26
23
|
private validateUniqueMentionHref;
|
|
@@ -13,8 +13,7 @@ declare global {
|
|
|
13
13
|
* Rich Text user mention configuration element which will have MappingMentionUser elements as children
|
|
14
14
|
*/
|
|
15
15
|
export declare class RichTextMentionUsers extends RichTextMention<RichTextMentionUsersValidator> {
|
|
16
|
-
protected
|
|
17
|
-
protected getMentionInternalsOptions(): MentionInternalsOptions;
|
|
16
|
+
protected getMentionInternalsOptions(): MentionInternalsOptions<RichTextMentionUsersValidator>;
|
|
18
17
|
protected getObservedMappingProperty(): string[];
|
|
19
18
|
protected createMappingConfig(mapping: Mapping<MappingUserKey>): MappingConfig;
|
|
20
19
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { Mapping } from '../../../mapping/base';
|
|
2
2
|
import type { MappingUserKey } from '../../../mapping/base/types';
|
|
3
|
-
import type { MentionInternals } from '../../base/models/mention-internals';
|
|
4
3
|
import { RichTextMentionValidator } from '../../base/models/mention-validator';
|
|
5
4
|
declare const usersValidityFlagNames: readonly ["duplicateMappingMentionHref", "missingMentionHrefValue", "mentionHrefNotValidUrl", "mentionHrefDoesNotMatchPattern", "missingPatternAttribute", "unsupportedPatternValue", "missingDisplayNameValue", "unsupportedMappingType"];
|
|
6
5
|
/**
|
|
7
6
|
* Validator for RichTextMentionUsers
|
|
8
7
|
*/
|
|
9
8
|
export declare class RichTextMentionUsersValidator extends RichTextMentionValidator<typeof usersValidityFlagNames> {
|
|
10
|
-
constructor(
|
|
9
|
+
constructor();
|
|
11
10
|
private static isSupportedMappingElement;
|
|
12
11
|
validate(mappings: Mapping<MappingUserKey>[], pattern: string): void;
|
|
13
12
|
private validateNoMissingDisplayName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "24.1.
|
|
3
|
+
"version": "24.1.13",
|
|
4
4
|
"description": "Styled web components for the NI Nimble Design System",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",
|