@ni/nimble-components 20.17.1 → 20.17.2
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 +22 -7
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +481 -481
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/rich-text/editor/index.d.ts +4 -2
- package/dist/esm/rich-text/editor/index.js +21 -6
- package/dist/esm/rich-text/editor/index.js.map +1 -1
- package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.d.ts +1 -0
- package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.js +3 -0
- package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.js.map +1 -1
- package/dist/esm/rich-text/editor/types.d.ts +4 -0
- package/dist/esm/rich-text/editor/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -16301,7 +16301,7 @@
|
|
|
16301
16301
|
|
|
16302
16302
|
/**
|
|
16303
16303
|
* Do not edit directly
|
|
16304
|
-
* Generated on Fri, 05 Jan 2024
|
|
16304
|
+
* Generated on Fri, 05 Jan 2024 14:36:09 GMT
|
|
16305
16305
|
*/
|
|
16306
16306
|
|
|
16307
16307
|
const Information100DarkUi = "#a46eff";
|
|
@@ -56623,8 +56623,10 @@ img.ProseMirror-separator {
|
|
|
56623
56623
|
* @internal
|
|
56624
56624
|
*/
|
|
56625
56625
|
configurationChanged(prev, next) {
|
|
56626
|
+
const formatButtonsState = this.getButtonsState(this.tiptapEditor);
|
|
56627
|
+
const { from, to } = this.tiptapEditor.view.state.selection;
|
|
56626
56628
|
if (this.isMentionExtensionConfigUnchanged(prev, next)) {
|
|
56627
|
-
this.
|
|
56629
|
+
this.setMarkdown(this.getMarkdown());
|
|
56628
56630
|
}
|
|
56629
56631
|
else {
|
|
56630
56632
|
const mentionExtensionConfig = this.getMentionExtensionConfig();
|
|
@@ -56633,6 +56635,8 @@ img.ProseMirror-separator {
|
|
|
56633
56635
|
this.initializeEditor();
|
|
56634
56636
|
this.setMarkdown(currentStateMarkdown);
|
|
56635
56637
|
}
|
|
56638
|
+
this.tiptapEditor.commands.setTextSelection({ from, to });
|
|
56639
|
+
this.resetEditorButtonsState(formatButtonsState);
|
|
56636
56640
|
this.setActiveMappingConfigs();
|
|
56637
56641
|
}
|
|
56638
56642
|
/**
|
|
@@ -56978,11 +56982,22 @@ img.ProseMirror-separator {
|
|
|
56978
56982
|
getMentionExtensionConfigFromCharacter(character) {
|
|
56979
56983
|
return this.getMentionExtensionConfig().find(config => config.character === character);
|
|
56980
56984
|
}
|
|
56981
|
-
|
|
56982
|
-
|
|
56983
|
-
|
|
56984
|
-
|
|
56985
|
-
this.tiptapEditor.
|
|
56985
|
+
resetEditorButtonsState(buttonsState) {
|
|
56986
|
+
if (buttonsState?.bold && !this.tiptapEditor.isActive('bold')) {
|
|
56987
|
+
this.tiptapEditor.chain().focus().toggleBold().run();
|
|
56988
|
+
}
|
|
56989
|
+
if (buttonsState?.italics && !this.tiptapEditor.isActive('italic')) {
|
|
56990
|
+
this.tiptapEditor.chain().focus().toggleItalic().run();
|
|
56991
|
+
}
|
|
56992
|
+
}
|
|
56993
|
+
getButtonsState(tiptapEditor) {
|
|
56994
|
+
if (!this.$fastController.isConnected) {
|
|
56995
|
+
return undefined;
|
|
56996
|
+
}
|
|
56997
|
+
return {
|
|
56998
|
+
bold: tiptapEditor.isActive('bold'),
|
|
56999
|
+
italics: tiptapEditor.isActive('italic')
|
|
57000
|
+
};
|
|
56986
57001
|
}
|
|
56987
57002
|
}
|
|
56988
57003
|
__decorate$1([
|