@ni/nimble-components 32.4.0 → 32.4.1
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 +61 -16
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +24 -20
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.js +2 -1
- package/dist/esm/rich-text/editor/testing/rich-text-editor.pageobject.js.map +1 -1
- package/dist/esm/table/testing/table.pageobject.d.ts +4 -4
- package/dist/esm/table/testing/table.pageobject.js +24 -17
- package/dist/esm/table/testing/table.pageobject.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { keySpace, keyEnter, keyTab, keyEscape } from '@microsoft/fast-web-utilities';
|
|
2
2
|
import { waitForUpdatesAsync } from '../../../testing/async-helpers';
|
|
3
|
+
import { toggleButtonTag } from '../../../toggle-button';
|
|
3
4
|
import { ToolbarButton } from './types';
|
|
4
5
|
import { getTagsFromElement, getLeafContentsFromElement, getLastChildElement, getLastChildElementAttribute } from '../../models/testing/markdown-parser-utils';
|
|
5
6
|
import { richTextMentionUsersViewTag } from '../../../rich-text-mention/users/view';
|
|
@@ -352,7 +353,7 @@ export class RichTextEditorPageObject {
|
|
|
352
353
|
return this.richTextEditorElement.shadowRoot.querySelector('.ProseMirror');
|
|
353
354
|
}
|
|
354
355
|
getFormattingButton(button) {
|
|
355
|
-
const buttons = this.richTextEditorElement.shadowRoot.querySelectorAll(
|
|
356
|
+
const buttons = this.richTextEditorElement.shadowRoot.querySelectorAll(toggleButtonTag);
|
|
356
357
|
return buttons[button];
|
|
357
358
|
}
|
|
358
359
|
getUserMentionButton() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-editor.pageobject.js","sourceRoot":"","sources":["../../../../../src/rich-text/editor/testing/rich-text-editor.pageobject.ts"],"names":[],"mappings":"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,mBAAmB,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,iCAAiC;QAC3C,IAAI,MAAM,IAAI,CAAC,sBAAsB,EAAE,EAAE,CAAC;YACtC,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACzD,MAAM,mBAAmB,EAAE,CAAC;QAChC,CAAC;IACL,CAAC;CACJ","sourcesContent":["import {\n keySpace,\n keyEnter,\n keyTab,\n keyEscape\n} from '@microsoft/fast-web-utilities';\nimport type { RichTextEditor } from '..';\nimport { waitForUpdatesAsync } from '../../../testing/async-helpers';\nimport type { ToggleButton } from '../../../toggle-button';\nimport {\n ArrowKeyButton,\n MappingConfiguration,\n ToolbarButton,\n ToolbarButtonKey\n} from './types';\nimport {\n getTagsFromElement,\n getLeafContentsFromElement,\n getLastChildElement,\n getLastChildElementAttribute\n} from '../../models/testing/markdown-parser-utils';\nimport { richTextMentionUsersViewTag } from '../../../rich-text-mention/users/view';\nimport { RichTextMarkdownParser } from '../../models/markdown-parser';\nimport { buttonTag, type Button } from '../../../button';\nimport { richTextMentionListboxTag } from '../../mention-listbox';\nimport { listOptionTag, type ListOption } from '../../../list-option';\nimport { anchoredRegionTag } from '../../../anchored-region';\nimport { iconAtTag } from '../../../icons/at';\nimport { MarkdownParserMentionConfiguration } from '../../models/markdown-parser-mention-configuration';\nimport { MentionInternals } from '../../../rich-text-mention/base/models/mention-internals';\nimport { MappingUserConfig } from '../../../rich-text-mention/users/models/mapping-user-config';\nimport { RichTextMentionUsersValidator } from '../../../rich-text-mention/users/models/rich-text-mention-users-validator';\n\n/**\n * Page object for the `nimble-rich-text-editor` component.\n */\nexport class RichTextEditorPageObject {\n public constructor(\n private readonly richTextEditorElement: RichTextEditor\n ) {}\n\n public editorSectionHasChildNodes(): boolean {\n const editorSection = this.getEditorSection();\n return editorSection!.hasChildNodes();\n }\n\n public getEditorSectionFirstElementChildClassName(): string {\n const editorSection = this.getEditorSection();\n return editorSection!.firstElementChild!.className;\n }\n\n public async clickEditorShortcutKeys(\n shortcutKey: string,\n isShiftKey: boolean\n ): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: shortcutKey,\n ctrlKey: true,\n shiftKey: isShiftKey,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressEnterKeyInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: keyEnter,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressEscapeKeyInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: keyEscape,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressArrowKeyInEditor(\n arrowButton: ArrowKeyButton\n ): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: arrowButton,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressShiftEnterKeysInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const shiftEnterEvent = new KeyboardEvent('keydown', {\n key: keyEnter,\n shiftKey: true,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(shiftEnterEvent);\n await waitForUpdatesAsync();\n }\n\n public async pressTabKeyInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: keyTab,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressShiftTabKeysInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const shiftTabEvent = new KeyboardEvent('keydown', {\n key: keyTab,\n shiftKey: true,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(shiftTabEvent);\n await waitForUpdatesAsync();\n }\n\n /**\n * In testing environment, when clicking on the footer button, it may not persist in the same state if any editor transaction occurs in between.\n * This behavior is likely due to dynamic modifications of formatting button states based on cursor positions during editor transactions.\n * Setting the \"force\" parameter to true activates the formatting button state; when set to false, it deactivates the state.\n * If unset, the state toggles by interacting with it once.\n */\n public async toggleFooterButton(\n button: ToolbarButton,\n force?: boolean\n ): Promise<void> {\n const toggleButton = this.getFormattingButton(button);\n const event = new Event('mousedown', { bubbles: true });\n toggleButton!.dispatchEvent(event);\n toggleButton!.click();\n let format = Object.keys(ToolbarButton).find(\n key => ToolbarButton[key as ToolbarButtonKey] === button\n );\n // In the editor, the isActive() method expects the format name to be 'italic' instead of 'italics.'\n // As it was consistently represent it as 'italics' elsewhere just updated it here\n if (format === 'italics') {\n format = 'italic';\n }\n if (force === true || force === false) {\n if (\n this.richTextEditorElement.tiptapEditor.isActive(format!)\n !== force\n ) {\n toggleButton!.dispatchEvent(event);\n toggleButton!.click();\n }\n }\n await waitForUpdatesAsync();\n }\n\n public async clickUserMentionButton(): Promise<void> {\n const userMentionButton = this.getUserMentionButton();\n userMentionButton!.click();\n await waitForUpdatesAsync();\n }\n\n public getMentionButtonIcon(buttonIndex: number): string | undefined {\n const buttons: Button[] = this.getMentionButtons()!;\n return buttons[buttonIndex]?.firstElementChild?.tagName;\n }\n\n public getMentionButtonTitle(buttonIndex: number): string {\n const buttons: Button[] = this.getMentionButtons()!;\n return buttons[buttonIndex]?.getAttribute('title') ?? '';\n }\n\n public getMentionButtonLabel(buttonIndex: number): string {\n const buttons: Button[] = this.getMentionButtons()!;\n return buttons[buttonIndex]?.innerText ?? '';\n }\n\n public getButtonCheckedState(button: ToolbarButton): boolean {\n const toggleButton = this.getFormattingButton(button);\n return toggleButton!.checked;\n }\n\n public getButtonTabIndex(button: ToolbarButton): number {\n const toggleButton = this.getFormattingButton(button);\n return toggleButton!.tabIndex;\n }\n\n public spaceKeyActivatesButton(button: ToolbarButton): void {\n const toggleButton = this.getFormattingButton(button)!;\n const event = new KeyboardEvent('keypress', {\n key: keySpace\n } as KeyboardEventInit);\n toggleButton.control.dispatchEvent(event);\n }\n\n public enterKeyActivatesButton(button: ToolbarButton): void {\n const toggleButton = this.getFormattingButton(button)!;\n const event = new KeyboardEvent('keypress', {\n key: keyEnter\n } as KeyboardEventInit);\n toggleButton.control.dispatchEvent(event);\n }\n\n public async pasteToEditor(text: string): Promise<void> {\n const editor = this.getTiptapEditor();\n const pasteEvent = new ClipboardEvent('paste', {\n clipboardData: new DataTransfer()\n });\n pasteEvent.clipboardData?.setData('text/plain', text);\n editor.dispatchEvent(pasteEvent);\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n // Simulate the actual pasting of content by passing the extracted HTML string as an argument and setting the format to 'text/html',\n // as in the [DataFormat](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) object.\n // For example, when copying a link, the clipboard stores information that includes the anchor tag, href attribute value etc, and paste it as an HTML string\n public async pasteHTMLToEditor(htmlString: string): Promise<void> {\n const editor = this.getTiptapEditor();\n const pasteEvent = new ClipboardEvent('paste', {\n clipboardData: new DataTransfer()\n });\n pasteEvent.clipboardData?.setData('text/html', htmlString);\n editor.dispatchEvent(pasteEvent);\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n public async setEditorTextContent(value: string): Promise<void> {\n this.richTextEditorElement.tiptapEditor\n .chain()\n .focus()\n .insertContent({\n type: 'text',\n text: value\n })\n .run();\n await waitForUpdatesAsync();\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n public async setCursorPosition(position: number): Promise<void> {\n this.richTextEditorElement.tiptapEditor.commands.setTextSelection(\n position\n );\n await waitForUpdatesAsync();\n }\n\n public async replaceEditorContent(value: string): Promise<void> {\n const lastElement = this.getEditorLastChildElement();\n lastElement.parentElement!.textContent = value;\n await waitForUpdatesAsync();\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n public async sliceEditorContent(from: number, to: number): Promise<void> {\n this.richTextEditorElement.tiptapEditor\n .chain()\n .focus()\n .deleteRange({ from, to })\n .run();\n await waitForUpdatesAsync();\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n public getEditorLastChildAttribute(attribute: string): string {\n return getLastChildElementAttribute(attribute, this.getTiptapEditor());\n }\n\n public async isMentionListboxOpened(): Promise<boolean> {\n await waitForUpdatesAsync();\n\n return !this.getMentionListbox()?.shadowRoot?.querySelector(\n anchoredRegionTag\n )?.hidden;\n }\n\n public getEditorMentionViewAttributeValues(attribute: string): string[] {\n return Array.from(\n this.getTiptapEditor().querySelectorAll(richTextMentionUsersViewTag)\n ).map(el => el.getAttribute(attribute) || '');\n }\n\n public getEditorFirstChildTagName(): string {\n return this.getTiptapEditor().firstElementChild?.tagName ?? '';\n }\n\n public getEditorFirstChildTextContent(): string {\n return this.getTiptapEditor().firstElementChild?.textContent ?? '';\n }\n\n public getEditorTextContents(): string[] {\n return Array.from(this.getTiptapEditor().querySelectorAll('*')).map(\n el => el.textContent || ''\n );\n }\n\n public getEditorTagNames(): string[] {\n return getTagsFromElement(this.getTiptapEditor());\n }\n\n // Return list of tags, excluding those such as 'IMG' (prosemirror-separator) that do not affect the UI or markdown output.\n // These tags are considered extraneous and are added by prosemirror.\n public getMarkdownRenderedTagNames(): string[] {\n return getTagsFromElement(this.getTiptapEditor()).filter(\n tag => tag !== 'IMG'\n );\n }\n\n public getEditorLeafContents(): string[] {\n return getLeafContentsFromElement(this.getTiptapEditor());\n }\n\n public getEditorTagNamesWithClosingTags(): string[] {\n const tagNames: string[] = [];\n const tiptapEditor = this.getTiptapEditor();\n\n const processNode = (node: Node): void => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const el = node as Element;\n tagNames.push(el.tagName);\n\n el.childNodes.forEach(processNode);\n\n tagNames.push(`/${el.tagName}`);\n }\n };\n\n if (tiptapEditor) {\n processNode(tiptapEditor);\n }\n\n return tagNames.slice(1, -1);\n }\n\n public getFormattingButtonTextContent(\n toolbarButton: ToolbarButton\n ): string {\n const button = this.getFormattingButton(toolbarButton);\n return button!.textContent!.trim();\n }\n\n public getFormattingButtonTitle(toolbarButton: ToolbarButton): string {\n const button = this.getFormattingButton(toolbarButton);\n return button!.title;\n }\n\n public isRichTextEditorActiveElement(): boolean {\n return (\n document.activeElement === this.richTextEditorElement\n && document.activeElement?.shadowRoot?.activeElement\n === this.getTiptapEditor()\n );\n }\n\n public getEditorTabIndex(): string {\n return this.getTiptapEditor().getAttribute('tabindex') ?? '';\n }\n\n public async setFooterHidden(footerHidden: boolean): Promise<void> {\n if (footerHidden) {\n this.richTextEditorElement.setAttribute('footer-hidden', '');\n } else {\n this.richTextEditorElement.removeAttribute('footer-hidden');\n }\n await waitForUpdatesAsync();\n }\n\n public isFooterHidden(): boolean {\n const footerSection = this.getFooter()!;\n return window.getComputedStyle(footerSection).display === 'none';\n }\n\n public async setDisabled(disabled: boolean): Promise<void> {\n if (disabled) {\n this.richTextEditorElement.setAttribute('disabled', '');\n } else {\n this.richTextEditorElement.removeAttribute('disabled');\n }\n await waitForUpdatesAsync();\n }\n\n public isButtonDisabled(button: ToolbarButton): boolean {\n const toggleButton = this.getFormattingButton(button)!;\n return toggleButton.hasAttribute('disabled');\n }\n\n public getPlaceholderValue(): string {\n const editor = this.getTiptapEditor();\n return editor.firstElementChild?.getAttribute('data-placeholder') ?? '';\n }\n\n public getParsedHtmlFromMarkdown(\n markdown: string,\n mappings?: MappingConfiguration[]\n ): string {\n const parserMentionConfigForUser = this.getParserMentionConfigForUser(mappings);\n const parseResult = RichTextMarkdownParser.parseMarkdownToDOM(\n markdown,\n [parserMentionConfigForUser]\n );\n return this.richTextEditorElement.xmlSerializer.serializeToString(\n parseResult.fragment\n );\n }\n\n public async focusOutEditor(): Promise<void> {\n const focusout = new FocusEvent('focusout');\n this.richTextEditorElement.dispatchEvent(focusout);\n await waitForUpdatesAsync();\n }\n\n public getMentionListboxItemsName(): string[] {\n const listItemsName: string[] = [];\n this.getAllListItemsInMentionBox().forEach(item => (item.hidden ? null : listItemsName.push(item.textContent!)));\n return listItemsName;\n }\n\n public getSelectedOption(): string {\n const nodeList = this.getAllListItemsInMentionBox();\n return (\n Array.from(nodeList).find(\n item => item.selected && !item.hasAttribute('hidden')\n )?.textContent ?? ''\n );\n }\n\n public async clickMentionListboxOption(index: number): Promise<void> {\n await this.focusEditorIfMentionListboxOpened();\n\n const listOption = this.getAllListItemsInMentionBox()[index];\n listOption?.click();\n await waitForUpdatesAsync();\n }\n\n public moveCursorToStart(): void {\n this.richTextEditorElement.tiptapEditor.commands.focus('start');\n }\n\n public getCursorPosition(): number {\n return this.richTextEditorElement.tiptapEditor.state.selection.anchor;\n }\n\n private getEditorSection(): Element | null | undefined {\n return this.richTextEditorElement.shadowRoot?.querySelector('.editor');\n }\n\n private getFooter(): Element | null | undefined {\n return this.richTextEditorElement.shadowRoot!.querySelector(\n '.footer-section'\n );\n }\n\n private getTiptapEditor(): HTMLDivElement {\n return this.richTextEditorElement.shadowRoot!.querySelector<HTMLDivElement>(\n '.ProseMirror'\n )!;\n }\n\n private getFormattingButton(\n button: ToolbarButton\n ): ToggleButton | null | undefined {\n const buttons: NodeListOf<ToggleButton> = this.richTextEditorElement.shadowRoot!.querySelectorAll(\n 'nimble-toggle-button'\n );\n return buttons[button];\n }\n\n private getUserMentionButton(): Button | null | undefined {\n const buttons: Button[] = this.getMentionButtons()!;\n return buttons.find(button => button.querySelector(iconAtTag));\n }\n\n private getMentionButtons(): Button[] | null | undefined {\n return Array.from(\n this.richTextEditorElement.shadowRoot!.querySelectorAll(buttonTag)\n );\n }\n\n private getMentionListbox(): Element | null {\n return this.richTextEditorElement.shadowRoot!.querySelector(\n richTextMentionListboxTag\n );\n }\n\n private getAllListItemsInMentionBox(): NodeListOf<ListOption> {\n return this.getMentionListbox()!.querySelectorAll(listOptionTag);\n }\n\n private getEditorLastChildElement(): Element {\n return getLastChildElement(this.getTiptapEditor())!;\n }\n\n private getParserMentionConfigForUser(\n mappings: MappingConfiguration[] = []\n ): MarkdownParserMentionConfiguration {\n const mentionInternals = new MentionInternals(\n {\n character: '',\n icon: '',\n viewElement: richTextMentionUsersViewTag,\n validator: new RichTextMentionUsersValidator()\n },\n () => {}\n );\n mentionInternals.pattern = '^user:(.*)';\n mappings.forEach(mapping => {\n const mappingConfig = new MappingUserConfig(\n mapping.key,\n mapping.displayName\n );\n mentionInternals.mappingConfigs = new Map().set(\n mapping.key,\n mappingConfig\n );\n });\n const parserMentionConfig = new MarkdownParserMentionConfiguration(\n mentionInternals\n );\n return parserMentionConfig;\n }\n\n private async focusEditorIfMentionListboxOpened(): Promise<void> {\n if (await this.isMentionListboxOpened()) {\n this.richTextEditorElement.tiptapEditor.commands.focus();\n await waitForUpdatesAsync();\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"rich-text-editor.pageobject.js","sourceRoot":"","sources":["../../../../../src/rich-text/editor/testing/rich-text-editor.pageobject.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACZ,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAqB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAGH,aAAa,EAEhB,MAAM,SAAS,CAAC;AACjB,OAAO,EACH,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC/B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAe,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAmB,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,M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C,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,CACzC;YACI,SAAS,EAAE,EAAE;YACb,IAAI,EAAE,EAAE;YACR,WAAW,EAAE,2BAA2B;YACxC,SAAS,EAAE,IAAI,6BAA6B,EAAE;SACjD,EACD,GAAG,EAAE,GAAE,CAAC,CACX,CAAC;QACF,gBAAgB,CAAC,OAAO,GAAG,YAAY,CAAC;QACxC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YACvB,MAAM,aAAa,GAAG,IAAI,iBAAiB,CACvC,OAAO,CAAC,GAAG,EACX,OAAO,CAAC,WAAW,CACtB,CAAC;YACF,gBAAgB,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC,GAAG,CAC3C,OAAO,CAAC,GAAG,EACX,aAAa,CAChB,CAAC;QACN,CAAC,CAAC,CAAC;QACH,MAAM,mBAAmB,GAAG,IAAI,kCAAkC,CAC9D,gBAAgB,CACnB,CAAC;QACF,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,iCAAiC;QAC3C,IAAI,MAAM,IAAI,CAAC,sBAAsB,EAAE,EAAE,CAAC;YACtC,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACzD,MAAM,mBAAmB,EAAE,CAAC;QAChC,CAAC;IACL,CAAC;CACJ","sourcesContent":["import {\n keySpace,\n keyEnter,\n keyTab,\n keyEscape\n} from '@microsoft/fast-web-utilities';\nimport type { RichTextEditor } from '..';\nimport { waitForUpdatesAsync } from '../../../testing/async-helpers';\nimport { toggleButtonTag, type ToggleButton } from '../../../toggle-button';\nimport {\n ArrowKeyButton,\n MappingConfiguration,\n ToolbarButton,\n ToolbarButtonKey\n} from './types';\nimport {\n getTagsFromElement,\n getLeafContentsFromElement,\n getLastChildElement,\n getLastChildElementAttribute\n} from '../../models/testing/markdown-parser-utils';\nimport { richTextMentionUsersViewTag } from '../../../rich-text-mention/users/view';\nimport { RichTextMarkdownParser } from '../../models/markdown-parser';\nimport { buttonTag, type Button } from '../../../button';\nimport { richTextMentionListboxTag } from '../../mention-listbox';\nimport { listOptionTag, type ListOption } from '../../../list-option';\nimport { anchoredRegionTag } from '../../../anchored-region';\nimport { iconAtTag } from '../../../icons/at';\nimport { MarkdownParserMentionConfiguration } from '../../models/markdown-parser-mention-configuration';\nimport { MentionInternals } from '../../../rich-text-mention/base/models/mention-internals';\nimport { MappingUserConfig } from '../../../rich-text-mention/users/models/mapping-user-config';\nimport { RichTextMentionUsersValidator } from '../../../rich-text-mention/users/models/rich-text-mention-users-validator';\n\n/**\n * Page object for the `nimble-rich-text-editor` component.\n */\nexport class RichTextEditorPageObject {\n public constructor(\n private readonly richTextEditorElement: RichTextEditor\n ) {}\n\n public editorSectionHasChildNodes(): boolean {\n const editorSection = this.getEditorSection();\n return editorSection!.hasChildNodes();\n }\n\n public getEditorSectionFirstElementChildClassName(): string {\n const editorSection = this.getEditorSection();\n return editorSection!.firstElementChild!.className;\n }\n\n public async clickEditorShortcutKeys(\n shortcutKey: string,\n isShiftKey: boolean\n ): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: shortcutKey,\n ctrlKey: true,\n shiftKey: isShiftKey,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressEnterKeyInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: keyEnter,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressEscapeKeyInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: keyEscape,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressArrowKeyInEditor(\n arrowButton: ArrowKeyButton\n ): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: arrowButton,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressShiftEnterKeysInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const shiftEnterEvent = new KeyboardEvent('keydown', {\n key: keyEnter,\n shiftKey: true,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(shiftEnterEvent);\n await waitForUpdatesAsync();\n }\n\n public async pressTabKeyInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const event = new KeyboardEvent('keydown', {\n key: keyTab,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public async pressShiftTabKeysInEditor(): Promise<void> {\n const editor = this.getTiptapEditor();\n const shiftTabEvent = new KeyboardEvent('keydown', {\n key: keyTab,\n shiftKey: true,\n bubbles: true,\n cancelable: true\n });\n editor.dispatchEvent(shiftTabEvent);\n await waitForUpdatesAsync();\n }\n\n /**\n * In testing environment, when clicking on the footer button, it may not persist in the same state if any editor transaction occurs in between.\n * This behavior is likely due to dynamic modifications of formatting button states based on cursor positions during editor transactions.\n * Setting the \"force\" parameter to true activates the formatting button state; when set to false, it deactivates the state.\n * If unset, the state toggles by interacting with it once.\n */\n public async toggleFooterButton(\n button: ToolbarButton,\n force?: boolean\n ): Promise<void> {\n const toggleButton = this.getFormattingButton(button);\n const event = new Event('mousedown', { bubbles: true });\n toggleButton!.dispatchEvent(event);\n toggleButton!.click();\n let format = Object.keys(ToolbarButton).find(\n key => ToolbarButton[key as ToolbarButtonKey] === button\n );\n // In the editor, the isActive() method expects the format name to be 'italic' instead of 'italics.'\n // As it was consistently represent it as 'italics' elsewhere just updated it here\n if (format === 'italics') {\n format = 'italic';\n }\n if (force === true || force === false) {\n if (\n this.richTextEditorElement.tiptapEditor.isActive(format!)\n !== force\n ) {\n toggleButton!.dispatchEvent(event);\n toggleButton!.click();\n }\n }\n await waitForUpdatesAsync();\n }\n\n public async clickUserMentionButton(): Promise<void> {\n const userMentionButton = this.getUserMentionButton();\n userMentionButton!.click();\n await waitForUpdatesAsync();\n }\n\n public getMentionButtonIcon(buttonIndex: number): string | undefined {\n const buttons: Button[] = this.getMentionButtons()!;\n return buttons[buttonIndex]?.firstElementChild?.tagName;\n }\n\n public getMentionButtonTitle(buttonIndex: number): string {\n const buttons: Button[] = this.getMentionButtons()!;\n return buttons[buttonIndex]?.getAttribute('title') ?? '';\n }\n\n public getMentionButtonLabel(buttonIndex: number): string {\n const buttons: Button[] = this.getMentionButtons()!;\n return buttons[buttonIndex]?.innerText ?? '';\n }\n\n public getButtonCheckedState(button: ToolbarButton): boolean {\n const toggleButton = this.getFormattingButton(button);\n return toggleButton!.checked;\n }\n\n public getButtonTabIndex(button: ToolbarButton): number {\n const toggleButton = this.getFormattingButton(button);\n return toggleButton!.tabIndex;\n }\n\n public spaceKeyActivatesButton(button: ToolbarButton): void {\n const toggleButton = this.getFormattingButton(button)!;\n const event = new KeyboardEvent('keypress', {\n key: keySpace\n } as KeyboardEventInit);\n toggleButton.control.dispatchEvent(event);\n }\n\n public enterKeyActivatesButton(button: ToolbarButton): void {\n const toggleButton = this.getFormattingButton(button)!;\n const event = new KeyboardEvent('keypress', {\n key: keyEnter\n } as KeyboardEventInit);\n toggleButton.control.dispatchEvent(event);\n }\n\n public async pasteToEditor(text: string): Promise<void> {\n const editor = this.getTiptapEditor();\n const pasteEvent = new ClipboardEvent('paste', {\n clipboardData: new DataTransfer()\n });\n pasteEvent.clipboardData?.setData('text/plain', text);\n editor.dispatchEvent(pasteEvent);\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n // Simulate the actual pasting of content by passing the extracted HTML string as an argument and setting the format to 'text/html',\n // as in the [DataFormat](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) object.\n // For example, when copying a link, the clipboard stores information that includes the anchor tag, href attribute value etc, and paste it as an HTML string\n public async pasteHTMLToEditor(htmlString: string): Promise<void> {\n const editor = this.getTiptapEditor();\n const pasteEvent = new ClipboardEvent('paste', {\n clipboardData: new DataTransfer()\n });\n pasteEvent.clipboardData?.setData('text/html', htmlString);\n editor.dispatchEvent(pasteEvent);\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n public async setEditorTextContent(value: string): Promise<void> {\n this.richTextEditorElement.tiptapEditor\n .chain()\n .focus()\n .insertContent({\n type: 'text',\n text: value\n })\n .run();\n await waitForUpdatesAsync();\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n public async setCursorPosition(position: number): Promise<void> {\n this.richTextEditorElement.tiptapEditor.commands.setTextSelection(\n position\n );\n await waitForUpdatesAsync();\n }\n\n public async replaceEditorContent(value: string): Promise<void> {\n const lastElement = this.getEditorLastChildElement();\n lastElement.parentElement!.textContent = value;\n await waitForUpdatesAsync();\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n public async sliceEditorContent(from: number, to: number): Promise<void> {\n this.richTextEditorElement.tiptapEditor\n .chain()\n .focus()\n .deleteRange({ from, to })\n .run();\n await waitForUpdatesAsync();\n\n await this.focusEditorIfMentionListboxOpened();\n }\n\n public getEditorLastChildAttribute(attribute: string): string {\n return getLastChildElementAttribute(attribute, this.getTiptapEditor());\n }\n\n public async isMentionListboxOpened(): Promise<boolean> {\n await waitForUpdatesAsync();\n\n return !this.getMentionListbox()?.shadowRoot?.querySelector(\n anchoredRegionTag\n )?.hidden;\n }\n\n public getEditorMentionViewAttributeValues(attribute: string): string[] {\n return Array.from(\n this.getTiptapEditor().querySelectorAll(richTextMentionUsersViewTag)\n ).map(el => el.getAttribute(attribute) || '');\n }\n\n public getEditorFirstChildTagName(): string {\n return this.getTiptapEditor().firstElementChild?.tagName ?? '';\n }\n\n public getEditorFirstChildTextContent(): string {\n return this.getTiptapEditor().firstElementChild?.textContent ?? '';\n }\n\n public getEditorTextContents(): string[] {\n return Array.from(this.getTiptapEditor().querySelectorAll('*')).map(\n el => el.textContent || ''\n );\n }\n\n public getEditorTagNames(): string[] {\n return getTagsFromElement(this.getTiptapEditor());\n }\n\n // Return list of tags, excluding those such as 'IMG' (prosemirror-separator) that do not affect the UI or markdown output.\n // These tags are considered extraneous and are added by prosemirror.\n public getMarkdownRenderedTagNames(): string[] {\n return getTagsFromElement(this.getTiptapEditor()).filter(\n tag => tag !== 'IMG'\n );\n }\n\n public getEditorLeafContents(): string[] {\n return getLeafContentsFromElement(this.getTiptapEditor());\n }\n\n public getEditorTagNamesWithClosingTags(): string[] {\n const tagNames: string[] = [];\n const tiptapEditor = this.getTiptapEditor();\n\n const processNode = (node: Node): void => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const el = node as Element;\n tagNames.push(el.tagName);\n\n el.childNodes.forEach(processNode);\n\n tagNames.push(`/${el.tagName}`);\n }\n };\n\n if (tiptapEditor) {\n processNode(tiptapEditor);\n }\n\n return tagNames.slice(1, -1);\n }\n\n public getFormattingButtonTextContent(\n toolbarButton: ToolbarButton\n ): string {\n const button = this.getFormattingButton(toolbarButton);\n return button!.textContent!.trim();\n }\n\n public getFormattingButtonTitle(toolbarButton: ToolbarButton): string {\n const button = this.getFormattingButton(toolbarButton);\n return button!.title;\n }\n\n public isRichTextEditorActiveElement(): boolean {\n return (\n document.activeElement === this.richTextEditorElement\n && document.activeElement?.shadowRoot?.activeElement\n === this.getTiptapEditor()\n );\n }\n\n public getEditorTabIndex(): string {\n return this.getTiptapEditor().getAttribute('tabindex') ?? '';\n }\n\n public async setFooterHidden(footerHidden: boolean): Promise<void> {\n if (footerHidden) {\n this.richTextEditorElement.setAttribute('footer-hidden', '');\n } else {\n this.richTextEditorElement.removeAttribute('footer-hidden');\n }\n await waitForUpdatesAsync();\n }\n\n public isFooterHidden(): boolean {\n const footerSection = this.getFooter()!;\n return window.getComputedStyle(footerSection).display === 'none';\n }\n\n public async setDisabled(disabled: boolean): Promise<void> {\n if (disabled) {\n this.richTextEditorElement.setAttribute('disabled', '');\n } else {\n this.richTextEditorElement.removeAttribute('disabled');\n }\n await waitForUpdatesAsync();\n }\n\n public isButtonDisabled(button: ToolbarButton): boolean {\n const toggleButton = this.getFormattingButton(button)!;\n return toggleButton.hasAttribute('disabled');\n }\n\n public getPlaceholderValue(): string {\n const editor = this.getTiptapEditor();\n return editor.firstElementChild?.getAttribute('data-placeholder') ?? '';\n }\n\n public getParsedHtmlFromMarkdown(\n markdown: string,\n mappings?: MappingConfiguration[]\n ): string {\n const parserMentionConfigForUser = this.getParserMentionConfigForUser(mappings);\n const parseResult = RichTextMarkdownParser.parseMarkdownToDOM(\n markdown,\n [parserMentionConfigForUser]\n );\n return this.richTextEditorElement.xmlSerializer.serializeToString(\n parseResult.fragment\n );\n }\n\n public async focusOutEditor(): Promise<void> {\n const focusout = new FocusEvent('focusout');\n this.richTextEditorElement.dispatchEvent(focusout);\n await waitForUpdatesAsync();\n }\n\n public getMentionListboxItemsName(): string[] {\n const listItemsName: string[] = [];\n this.getAllListItemsInMentionBox().forEach(item => (item.hidden ? null : listItemsName.push(item.textContent!)));\n return listItemsName;\n }\n\n public getSelectedOption(): string {\n const nodeList = this.getAllListItemsInMentionBox();\n return (\n Array.from(nodeList).find(\n item => item.selected && !item.hasAttribute('hidden')\n )?.textContent ?? ''\n );\n }\n\n public async clickMentionListboxOption(index: number): Promise<void> {\n await this.focusEditorIfMentionListboxOpened();\n\n const listOption = this.getAllListItemsInMentionBox()[index];\n listOption?.click();\n await waitForUpdatesAsync();\n }\n\n public moveCursorToStart(): void {\n this.richTextEditorElement.tiptapEditor.commands.focus('start');\n }\n\n public getCursorPosition(): number {\n return this.richTextEditorElement.tiptapEditor.state.selection.anchor;\n }\n\n private getEditorSection(): Element | null | undefined {\n return this.richTextEditorElement.shadowRoot?.querySelector('.editor');\n }\n\n private getFooter(): Element | null | undefined {\n return this.richTextEditorElement.shadowRoot!.querySelector(\n '.footer-section'\n );\n }\n\n private getTiptapEditor(): HTMLDivElement {\n return this.richTextEditorElement.shadowRoot!.querySelector<HTMLDivElement>(\n '.ProseMirror'\n )!;\n }\n\n private getFormattingButton(\n button: ToolbarButton\n ): ToggleButton | null | undefined {\n const buttons: NodeListOf<ToggleButton> = this.richTextEditorElement.shadowRoot!.querySelectorAll(\n toggleButtonTag\n );\n return buttons[button];\n }\n\n private getUserMentionButton(): Button | null | undefined {\n const buttons: Button[] = this.getMentionButtons()!;\n return buttons.find(button => button.querySelector(iconAtTag));\n }\n\n private getMentionButtons(): Button[] | null | undefined {\n return Array.from(\n this.richTextEditorElement.shadowRoot!.querySelectorAll(buttonTag)\n );\n }\n\n private getMentionListbox(): Element | null {\n return this.richTextEditorElement.shadowRoot!.querySelector(\n richTextMentionListboxTag\n );\n }\n\n private getAllListItemsInMentionBox(): NodeListOf<ListOption> {\n return this.getMentionListbox()!.querySelectorAll(listOptionTag);\n }\n\n private getEditorLastChildElement(): Element {\n return getLastChildElement(this.getTiptapEditor())!;\n }\n\n private getParserMentionConfigForUser(\n mappings: MappingConfiguration[] = []\n ): MarkdownParserMentionConfiguration {\n const mentionInternals = new MentionInternals(\n {\n character: '',\n icon: '',\n viewElement: richTextMentionUsersViewTag,\n validator: new RichTextMentionUsersValidator()\n },\n () => {}\n );\n mentionInternals.pattern = '^user:(.*)';\n mappings.forEach(mapping => {\n const mappingConfig = new MappingUserConfig(\n mapping.key,\n mapping.displayName\n );\n mentionInternals.mappingConfigs = new Map().set(\n mapping.key,\n mappingConfig\n );\n });\n const parserMentionConfig = new MarkdownParserMentionConfiguration(\n mentionInternals\n );\n return parserMentionConfig;\n }\n\n private async focusEditorIfMentionListboxOpened(): Promise<void> {\n if (await this.isMentionListboxOpened()) {\n this.richTextEditorElement.tiptapEditor.commands.focus();\n await waitForUpdatesAsync();\n }\n }\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Table } from '..';
|
|
2
|
-
import type
|
|
2
|
+
import { type TableHeader } from '../components/header';
|
|
3
3
|
import { TableColumnSortDirection, TableRecord, TableRowSelectionState } from '../types';
|
|
4
|
-
import type
|
|
5
|
-
import type
|
|
4
|
+
import { type MenuButton } from '../../menu-button';
|
|
5
|
+
import { type TableCell } from '../components/cell';
|
|
6
6
|
import type { TableGroupHeaderView } from '../../table-column/base/group-header-view';
|
|
7
7
|
import { TableCellView } from '../../table-column/base/cell-view';
|
|
8
|
-
import type
|
|
8
|
+
import { type TableRow } from '../components/row';
|
|
9
9
|
import { Anchor } from '../../anchor';
|
|
10
10
|
/**
|
|
11
11
|
* Summary information about a column that is sorted in the table for use in the `TablePageObject`.
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { keyShift } from '@microsoft/fast-web-utilities';
|
|
2
2
|
import { parseColor } from '@microsoft/fast-colors';
|
|
3
|
+
import { tableHeaderTag } from '../components/header';
|
|
3
4
|
import { TableColumnSortDirection, TableRowSelectionState } from '../types';
|
|
4
5
|
import { waitForUpdatesAsync } from '../../testing/async-helpers';
|
|
6
|
+
import { menuButtonTag } from '../../menu-button';
|
|
7
|
+
import { tableCellTag } from '../components/cell';
|
|
5
8
|
import { TableCellView } from '../../table-column/base/cell-view';
|
|
9
|
+
import { tableRowTag } from '../components/row';
|
|
6
10
|
import { anchorTag } from '../../anchor';
|
|
11
|
+
import { tableGroupRowTag } from '../components/group-row';
|
|
7
12
|
import { Icon } from '../../icon-base';
|
|
8
13
|
import { Spinner, spinnerTag } from '../../spinner';
|
|
9
14
|
import { borderHoverColor } from '../../theme-provider/design-tokens';
|
|
@@ -19,23 +24,23 @@ export class TablePageObject {
|
|
|
19
24
|
};
|
|
20
25
|
}
|
|
21
26
|
getRenderedHeaderCount() {
|
|
22
|
-
const headers = this.tableElement.shadowRoot.querySelectorAll(
|
|
27
|
+
const headers = this.tableElement.shadowRoot.querySelectorAll(tableHeaderTag);
|
|
23
28
|
return headers.length;
|
|
24
29
|
}
|
|
25
30
|
getRenderedCellCountForRow(rowIndex) {
|
|
26
31
|
const row = this.getRow(rowIndex);
|
|
27
|
-
const cells = row.shadowRoot.querySelectorAll(
|
|
32
|
+
const cells = row.shadowRoot.querySelectorAll(tableCellTag);
|
|
28
33
|
return cells.length;
|
|
29
34
|
}
|
|
30
35
|
getHeaderContent(columnIndex) {
|
|
31
|
-
const headers = this.tableElement.shadowRoot.querySelectorAll(
|
|
36
|
+
const headers = this.tableElement.shadowRoot.querySelectorAll(tableHeaderTag);
|
|
32
37
|
if (columnIndex >= headers.length) {
|
|
33
38
|
throw new Error('Attempting to index past the total number of rendered columns');
|
|
34
39
|
}
|
|
35
40
|
return this.getHeaderContentElement(headers.item(columnIndex));
|
|
36
41
|
}
|
|
37
42
|
getHeaderElement(columnIndex) {
|
|
38
|
-
const headers = this.tableElement.shadowRoot.querySelectorAll(
|
|
43
|
+
const headers = this.tableElement.shadowRoot.querySelectorAll(tableHeaderTag);
|
|
39
44
|
if (columnIndex >= headers.length) {
|
|
40
45
|
throw new Error('Attempting to index past the total number of rendered columns');
|
|
41
46
|
}
|
|
@@ -53,7 +58,7 @@ export class TablePageObject {
|
|
|
53
58
|
return column?.shadowRoot.firstElementChild?.dispatchEvent(event);
|
|
54
59
|
}
|
|
55
60
|
getHeaderRenderedWidth(columnIndex) {
|
|
56
|
-
const headers = this.tableElement.shadowRoot.querySelectorAll(
|
|
61
|
+
const headers = this.tableElement.shadowRoot.querySelectorAll(tableHeaderTag);
|
|
57
62
|
if (columnIndex >= headers.length) {
|
|
58
63
|
throw new Error('Attempting to index past the total number of rendered columns');
|
|
59
64
|
}
|
|
@@ -68,17 +73,19 @@ export class TablePageObject {
|
|
|
68
73
|
await waitForUpdatesAsync();
|
|
69
74
|
}
|
|
70
75
|
getRenderedRowCount() {
|
|
71
|
-
return this.tableElement.shadowRoot.querySelectorAll(
|
|
76
|
+
return this.tableElement.shadowRoot.querySelectorAll(tableRowTag)
|
|
77
|
+
.length;
|
|
72
78
|
}
|
|
73
79
|
getRenderedGroupRowCount() {
|
|
74
|
-
return this.tableElement.shadowRoot.querySelectorAll(
|
|
80
|
+
return this.tableElement.shadowRoot.querySelectorAll(tableGroupRowTag)
|
|
81
|
+
.length;
|
|
75
82
|
}
|
|
76
83
|
getAllGroupRowsExpandedState() {
|
|
77
|
-
const groupRows = this.tableElement.shadowRoot.querySelectorAll(
|
|
84
|
+
const groupRows = this.tableElement.shadowRoot.querySelectorAll(tableGroupRowTag);
|
|
78
85
|
return Array.from(groupRows).map(row => row.expanded);
|
|
79
86
|
}
|
|
80
87
|
getAllDataRowsExpandedState() {
|
|
81
|
-
const rows = this.tableElement.shadowRoot.querySelectorAll(
|
|
88
|
+
const rows = this.tableElement.shadowRoot.querySelectorAll(tableRowTag);
|
|
82
89
|
return Array.from(rows).map(row => row.expanded);
|
|
83
90
|
}
|
|
84
91
|
getRenderedCellView(rowIndex, columnIndex) {
|
|
@@ -115,7 +122,7 @@ export class TablePageObject {
|
|
|
115
122
|
return (this.getGroupRowHeaderView(groupRowIndex).shadowRoot.textContent?.trim() ?? '');
|
|
116
123
|
}
|
|
117
124
|
getAllRenderedGroupHeaderTextContent() {
|
|
118
|
-
const groupRows = this.tableElement.shadowRoot.querySelectorAll(
|
|
125
|
+
const groupRows = this.tableElement.shadowRoot.querySelectorAll(tableGroupRowTag);
|
|
119
126
|
return Array.from(groupRows).map((_, i) => {
|
|
120
127
|
return this.getRenderedGroupHeaderTextContent(i);
|
|
121
128
|
});
|
|
@@ -166,7 +173,7 @@ export class TablePageObject {
|
|
|
166
173
|
}
|
|
167
174
|
getTotalCellRenderedWidth() {
|
|
168
175
|
const row = this.getRow(0);
|
|
169
|
-
const cells = row?.shadowRoot?.querySelectorAll(
|
|
176
|
+
const cells = row?.shadowRoot?.querySelectorAll(tableCellTag);
|
|
170
177
|
return Array.from(cells).reduce((p, c) => {
|
|
171
178
|
return p + c.getBoundingClientRect().width;
|
|
172
179
|
}, 0);
|
|
@@ -182,7 +189,7 @@ export class TablePageObject {
|
|
|
182
189
|
await waitForUpdatesAsync();
|
|
183
190
|
}
|
|
184
191
|
getCellActionMenu(rowIndex, columnIndex) {
|
|
185
|
-
return this.getCell(rowIndex, columnIndex).shadowRoot.querySelector(
|
|
192
|
+
return this.getCell(rowIndex, columnIndex).shadowRoot.querySelector(menuButtonTag);
|
|
186
193
|
}
|
|
187
194
|
async clickCellActionMenu(rowIndex, columnIndex) {
|
|
188
195
|
this.setRowHoverState(rowIndex, true);
|
|
@@ -202,7 +209,7 @@ export class TablePageObject {
|
|
|
202
209
|
}
|
|
203
210
|
setRowHoverState(rowIndex, hover) {
|
|
204
211
|
const row = this.getRow(rowIndex);
|
|
205
|
-
const cells = row.shadowRoot.querySelectorAll(
|
|
212
|
+
const cells = row.shadowRoot.querySelectorAll(tableCellTag);
|
|
206
213
|
if (hover) {
|
|
207
214
|
cells.forEach(cell => cell.style.setProperty('--ni-private-table-cell-action-menu-display', 'block'));
|
|
208
215
|
}
|
|
@@ -406,7 +413,7 @@ export class TablePageObject {
|
|
|
406
413
|
}
|
|
407
414
|
/** @internal */
|
|
408
415
|
isRowHoverStylingEnabled() {
|
|
409
|
-
const rows = this.tableElement.shadowRoot.querySelectorAll(
|
|
416
|
+
const rows = this.tableElement.shadowRoot.querySelectorAll(`${tableRowTag}, ${tableGroupRowTag}`);
|
|
410
417
|
const firstRowAllowsHover = rows[0].allowHover;
|
|
411
418
|
if (Array.from(rows).some(x => x.allowHover !== firstRowAllowsHover)) {
|
|
412
419
|
throw new Error('Rows inconsistently allow hover styling');
|
|
@@ -420,7 +427,7 @@ export class TablePageObject {
|
|
|
420
427
|
}
|
|
421
428
|
/** @internal */
|
|
422
429
|
getRow(rowIndex) {
|
|
423
|
-
const rows = this.tableElement.shadowRoot.querySelectorAll(
|
|
430
|
+
const rows = this.tableElement.shadowRoot.querySelectorAll(tableRowTag);
|
|
424
431
|
if (rowIndex >= rows.length) {
|
|
425
432
|
throw new Error('Attempting to index past the total number of rendered rows');
|
|
426
433
|
}
|
|
@@ -429,7 +436,7 @@ export class TablePageObject {
|
|
|
429
436
|
/** @internal */
|
|
430
437
|
getCell(rowIndex, columnIndex) {
|
|
431
438
|
const row = this.getRow(rowIndex);
|
|
432
|
-
const cells = row.shadowRoot.querySelectorAll(
|
|
439
|
+
const cells = row.shadowRoot.querySelectorAll(tableCellTag);
|
|
433
440
|
if (columnIndex >= cells.length) {
|
|
434
441
|
throw new Error('Attempting to index past the total number of rendered columns');
|
|
435
442
|
}
|
|
@@ -489,7 +496,7 @@ export class TablePageObject {
|
|
|
489
496
|
return TableRowSelectionState.notSelected;
|
|
490
497
|
}
|
|
491
498
|
getGroupRow(groupRowIndex) {
|
|
492
|
-
const groupRows = this.tableElement.shadowRoot.querySelectorAll(
|
|
499
|
+
const groupRows = this.tableElement.shadowRoot.querySelectorAll(tableGroupRowTag);
|
|
493
500
|
if (groupRowIndex >= groupRows.length) {
|
|
494
501
|
throw new Error('Attempting to index past the total number of group rows');
|
|
495
502
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.pageobject.js","sourceRoot":"","sources":["../../../../src/table/testing/table.pageobject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EACH,wBAAwB,EAExB,sBAAsB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIlE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAU,SAAS,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAUtE;;;GAGG;AACH,MAAM,OAAO,eAAe;IACxB,YAAoC,YAAsB;QAAtB,iBAAY,GAAZ,YAAY,CAAU;QAu0BzC,kBAAa,GAAG,CAC7B,OAAyB,EACC,EAAE;YAC5B,OAAO,OAA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;QACD,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CAOJ","sourcesContent":["import type { Checkbox } from '@microsoft/fast-foundation';\nimport { keyShift } from '@microsoft/fast-web-utilities';\nimport { parseColor } from '@microsoft/fast-colors';\nimport type { Table } from '..';\nimport type { TableHeader } from '../components/header';\nimport {\n TableColumnSortDirection,\n TableRecord,\n TableRowSelectionState\n} from '../types';\nimport { waitForUpdatesAsync } from '../../testing/async-helpers';\nimport type { MenuButton } from '../../menu-button';\nimport type { TableCell } from '../components/cell';\nimport type { TableGroupHeaderView } from '../../table-column/base/group-header-view';\nimport { TableCellView } from '../../table-column/base/cell-view';\nimport type { TableRow } from '../components/row';\nimport { Anchor, anchorTag } from '../../anchor';\nimport type { TableGroupRow } from '../components/group-row';\nimport type { Button } from '../../button';\nimport { Icon } from '../../icon-base';\nimport { Spinner, spinnerTag } from '../../spinner';\nimport { borderHoverColor } from '../../theme-provider/design-tokens';\n\n/**\n * Summary information about a column that is sorted in the table for use in the `TablePageObject`.\n */\nexport interface SortedColumn {\n columnId?: string;\n sortDirection: TableColumnSortDirection;\n}\n\n/**\n * Page object for the `nimble-table` component to provide consistent ways\n * of querying and interacting with the component during tests.\n */\nexport class TablePageObject<T extends TableRecord> {\n public constructor(private readonly tableElement: Table<T>) {}\n\n public getRenderedHeaderCount(): number {\n const headers = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-header'\n )!;\n return headers.length;\n }\n\n public getRenderedCellCountForRow(rowIndex: number): number {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n return cells.length;\n }\n\n public getHeaderContent(columnIndex: number): Node | undefined {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return this.getHeaderContentElement(headers.item(columnIndex));\n }\n\n public getHeaderElement(columnIndex: number): TableHeader {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return headers.item(columnIndex);\n }\n\n public getHeaderTitle(columnIndex: number): string {\n const column = this.tableElement.columns[columnIndex];\n return (\n column?.shadowRoot!.firstElementChild?.getAttribute('title') ?? ''\n );\n }\n\n public getHeaderTextContent(columnIndex: number): string {\n return (\n this.getHeaderContent(\n columnIndex\n )?.firstChild?.textContent?.trim() ?? ''\n );\n }\n\n public dispatchEventToHeader(\n columnIndex: number,\n event: Event\n ): boolean | undefined {\n const column = this.tableElement.columns[columnIndex];\n return column?.shadowRoot!.firstElementChild?.dispatchEvent(event);\n }\n\n public getHeaderRenderedWidth(columnIndex: number): number {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return headers[columnIndex]!.getBoundingClientRect().width;\n }\n\n public async clickColumnHeader(\n columnIndex: number,\n shiftKeyDown = false\n ): Promise<void> {\n const clickEvent = new MouseEvent('click', {\n shiftKey: shiftKeyDown,\n bubbles: true\n } as MouseEventInit);\n this.getHeaderElement(columnIndex).dispatchEvent(clickEvent);\n await waitForUpdatesAsync();\n }\n\n public getRenderedRowCount(): number {\n return this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-row'\n ).length;\n }\n\n public getRenderedGroupRowCount(): number {\n return this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n ).length;\n }\n\n public getAllGroupRowsExpandedState(): boolean[] {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n return Array.from(groupRows).map(row => row.expanded);\n }\n\n public getAllDataRowsExpandedState(): boolean[] {\n const rows = this.tableElement.shadowRoot!.querySelectorAll('nimble-table-row');\n return Array.from(rows).map(row => row.expanded);\n }\n\n public getRenderedCellView(\n rowIndex: number,\n columnIndex: number\n ): TableCellView {\n const cell = this.getCell(rowIndex, columnIndex);\n const cellView = cell.cellViewContainer.firstElementChild;\n if (!(cellView instanceof TableCellView)) {\n throw new Error(\n 'Cell view not found in cell - ensure cellViewTag is set for column'\n );\n }\n return cellView as TableCellView;\n }\n\n public getRenderedCellViewById(\n recordId: string,\n columnId: string\n ): TableCellView {\n const cell = this.getCellById(recordId, columnId);\n const cellView = cell.cellViewContainer.firstElementChild;\n if (!(cellView instanceof TableCellView)) {\n throw new Error(\n 'Cell view not found in cell - ensure cellViewTag is set for column'\n );\n }\n return cellView as TableCellView;\n }\n\n public getRenderedCellTextContent(\n rowIndex: number,\n columnIndex: number\n ): string {\n return (\n this.getRenderedCellView(\n rowIndex,\n columnIndex\n ).shadowRoot!.textContent?.trim() ?? ''\n );\n }\n\n public getRenderedCellAnchor(\n rowIndex: number,\n columnIndex: number\n ): Anchor {\n const anchor = this.getRenderedCellView(\n rowIndex,\n columnIndex\n ).shadowRoot!.querySelector(anchorTag);\n if (!anchor) {\n throw new Error(\n `Anchor not found at cell ${rowIndex},${columnIndex}`\n );\n }\n return anchor;\n }\n\n public getRenderedMappingColumnCellIconTagName(\n rowIndex: number,\n columnIndex: number\n ): string {\n const iconOrSpinner = this.getRenderedMappingColumnIconOrSpinner(\n this.getRenderedCellView(rowIndex, columnIndex)\n );\n return iconOrSpinner.tagName.toLocaleLowerCase();\n }\n\n public getRenderedGroupHeaderTextContent(groupRowIndex: number): string {\n return (\n this.getGroupRowHeaderView(\n groupRowIndex\n ).shadowRoot!.textContent?.trim() ?? ''\n );\n }\n\n public getAllRenderedGroupHeaderTextContent(): string[] {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n return Array.from(groupRows).map((_, i) => {\n return this.getRenderedGroupHeaderTextContent(i);\n });\n }\n\n public getCellTitle(rowIndex: number, columnIndex: number): string {\n const cellView = this.getRenderedCellView(rowIndex, columnIndex);\n return (\n cellView.shadowRoot!.firstElementChild?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToCell(\n rowIndex: number,\n columnIndex: number,\n event: Event\n ): boolean | undefined {\n const cellView = this.getRenderedCellView(rowIndex, columnIndex);\n return cellView.shadowRoot!.firstElementChild?.dispatchEvent(event);\n }\n\n public getGroupHeaderTitle(groupRowIndex: number): string {\n const groupHeader = this.getGroupRowHeaderView(groupRowIndex);\n return (\n groupHeader\n .shadowRoot!.querySelector('span')\n ?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToGroupHeader(\n groupRowIndex: number,\n event: Event\n ): boolean | undefined {\n const groupHeader = this.getGroupRowHeaderView(groupRowIndex);\n return groupHeader\n .shadowRoot!.querySelector('span')\n ?.dispatchEvent(event);\n }\n\n public getRecordId(rowIndex: number): string | undefined {\n return this.getRow(rowIndex).recordId;\n }\n\n public getRowWidth(): number {\n const tableRowContainer = this.tableElement.shadowRoot!.querySelector(\n '.table-row-container'\n );\n return tableRowContainer!.scrollWidth;\n }\n\n public async sizeTableToGivenRowWidth(\n rowWidth: number,\n table: Table<T>\n ): Promise<void> {\n if (!table.$fastController.isConnected) {\n throw Error(\n 'The element must be connected before calling this method'\n );\n }\n\n table.style.width = `${\n rowWidth\n + table.headerRowActionContainer.getBoundingClientRect().width\n + table.virtualizer.headerContainerMarginRight\n }px`;\n await waitForUpdatesAsync();\n }\n\n public getCellRenderedWidth(rowIndex: number, columnIndex: number): number {\n const cell = this.getCell(rowIndex, columnIndex);\n const actualWidth = cell.getBoundingClientRect().width;\n // Round to one decimal place. This is to work around a bug in Chrome related to\n // fractional widths (e.g. '1fr') in grid layouts that results in some numerical\n // precision issues. See: https://bugs.chromium.org/p/chromium/issues/detail?id=1515685\n return Math.round(actualWidth * 10) / 10;\n }\n\n public getTotalCellRenderedWidth(): number {\n const row = this.getRow(0);\n const cells = row?.shadowRoot?.querySelectorAll('nimble-table-cell');\n return Array.from(cells!).reduce((p, c) => {\n return p + c.getBoundingClientRect().width;\n }, 0);\n }\n\n public async scrollToFirstRowAsync(): Promise<void> {\n const scrollElement = this.tableElement.viewport;\n scrollElement.scroll({ top: 0 });\n await waitForUpdatesAsync();\n }\n\n public async scrollToLastRowAsync(): Promise<void> {\n const scrollElement = this.tableElement.viewport;\n scrollElement.scroll({ top: scrollElement.scrollHeight });\n await waitForUpdatesAsync();\n }\n\n public getCellActionMenu(\n rowIndex: number,\n columnIndex: number\n ): MenuButton | null {\n return this.getCell(\n rowIndex,\n columnIndex\n ).shadowRoot!.querySelector<MenuButton>('nimble-menu-button');\n }\n\n public async clickCellActionMenu(\n rowIndex: number,\n columnIndex: number\n ): Promise<void> {\n this.setRowHoverState(rowIndex, true);\n await waitForUpdatesAsync();\n\n const menuButton = this.getCellActionMenu(rowIndex, columnIndex);\n if (!menuButton) {\n throw new Error('Cannot click on a non-visible action menu');\n }\n\n menuButton.toggleButton!.control.click();\n }\n\n public isCellActionMenuVisible(\n rowIndex: number,\n columnIndex: number\n ): boolean {\n const actionMenu = this.getCellActionMenu(rowIndex, columnIndex);\n if (!actionMenu) {\n return false;\n }\n\n return window.getComputedStyle(actionMenu).display !== 'none';\n }\n\n public setRowHoverState(rowIndex: number, hover: boolean): void {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n if (hover) {\n cells.forEach(cell => cell.style.setProperty(\n '--ni-private-table-cell-action-menu-display',\n 'block'\n ));\n } else {\n cells.forEach(cell => cell.style.removeProperty(\n '--ni-private-table-cell-action-menu-display'\n ));\n }\n }\n\n public async clickGroupRow(groupRowIndex: number): Promise<void> {\n const groupRow = this.getGroupRow(groupRowIndex);\n groupRow.click();\n await waitForUpdatesAsync();\n }\n\n public async clickRow(\n rowIndex: number,\n modifiers: { shiftKey?: boolean, ctrlKey?: boolean } = {}\n ): Promise<void> {\n const row = this.getRow(rowIndex);\n const event = new MouseEvent('click', modifiers);\n row.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public getIsRowSelectable(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n return row.selectable;\n }\n\n public getIsRowSelected(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n return row.selected;\n }\n\n public toggleGroupRowExpandedState(groupRowIndex: number): void {\n this.getGroupRow(groupRowIndex).click();\n }\n\n public clickCollapseAllButton(): void {\n this.getCollapseAllButton()?.click();\n }\n\n public clickDataRowExpandCollapseButton(rowIndex: number): void {\n const expandCollapseButton = this.getExpandCollapseButtonForRow(rowIndex);\n if (!expandCollapseButton) {\n throw new Error(\n 'The provided row index has no visible expand collapse button associated with it.'\n );\n }\n\n expandCollapseButton.click();\n }\n\n public isCollapseAllButtonVisible(): boolean {\n const collapseButton = this.getCollapseAllButton();\n if (collapseButton) {\n return (\n window.getComputedStyle(collapseButton).visibility === 'visible'\n );\n }\n return false;\n }\n\n public isCollapseAllButtonSpaceReserved(): boolean {\n const collapseButton = this.getCollapseAllButton();\n if (collapseButton) {\n return window.getComputedStyle(collapseButton).display !== 'none';\n }\n return true;\n }\n\n public isDataRowExpandCollapseButtonVisible(rowIndex: number): boolean {\n const expandCollapseButton = this.getExpandCollapseButtonForRow(rowIndex);\n return expandCollapseButton !== null;\n }\n\n public isDataRowLoadingSpinnerVisible(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n const spinner = row.shadowRoot!.querySelector(spinnerTag);\n return spinner !== null;\n }\n\n public isTableSelectionCheckboxVisible(): boolean {\n const checkbox = this.getSelectionCheckboxForTable();\n return this.isCheckboxVisible(checkbox);\n }\n\n public getTableSelectionState(): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForTable();\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickTableSelectionCheckbox(): void {\n const checkbox = this.getSelectionCheckboxForTable();\n checkbox!.click();\n }\n\n public isRowSelectionCheckboxVisible(rowIndex: number): boolean {\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n return this.isCheckboxVisible(checkbox);\n }\n\n public getRowSelectionState(rowIndex: number): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickRowSelectionCheckbox(rowIndex: number, shiftKey = false): void {\n if (shiftKey) {\n const shiftKeyDownEvent = new KeyboardEvent('keydown', {\n key: keyShift,\n shiftKey: true,\n bubbles: true\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyDownEvent);\n }\n\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n checkbox!.click();\n\n if (shiftKey) {\n const shiftKeyUpEvent = new KeyboardEvent('keyup', {\n key: keyShift,\n bubbles: true\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyUpEvent);\n }\n }\n\n public getGroupRowSelectionState(\n groupRowIndex: number\n ): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForGroupRow(groupRowIndex);\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickGroupRowSelectionCheckbox(\n groupRowIndex: number,\n shiftKey = false\n ): void {\n if (shiftKey) {\n const shiftKeyDownEvent = new KeyboardEvent('keydown', {\n key: keyShift,\n shiftKey: true,\n bubbles: true\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyDownEvent);\n }\n\n const checkbox = this.getSelectionCheckboxForGroupRow(groupRowIndex);\n checkbox!.click();\n\n if (shiftKey) {\n const shiftKeyUpEvent = new KeyboardEvent('keyup', {\n key: keyShift,\n bubbles: true\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyUpEvent);\n }\n }\n\n /**\n * @param columnIndex The index of the column to the left of the divider to press.\n */\n public pressRightColumnDivider(columnIndex: number): void {\n this.pressColumnDivider(this.getColumnDivider(columnIndex, false));\n }\n\n /**\n * @param columnIndex The index of the column to the left of the divider to release.\n */\n public releaseRightColumnDivider(columnIndex: number): void {\n this.releaseColumnDivider(this.getColumnDivider(columnIndex, false));\n }\n\n /**\n * @param columnIndex The index of the column to the left of a divider being dragged. Thus, this\n * cannot be given a value representing the last visible column index.\n * @param deltas The series of mouse movements in the x-direction while sizing a column.\n */\n public dragSizeColumnByRightDivider(\n columnIndex: number,\n deltas: readonly number[]\n ): void {\n this.dragSizeColumnByDivider(columnIndex, false, deltas);\n }\n\n /**\n * @param columnIndex The index of the column to the right of a divider being dragged. Thus, this\n * value must be greater than 0 and less than the total number of visible columns.\n * @param deltas The series of mouse movements in the x-direction while sizing a column.\n */\n public dragSizeColumnByLeftDivider(\n columnIndex: number,\n deltas: readonly number[]\n ): void {\n this.dragSizeColumnByDivider(columnIndex, true, deltas);\n }\n\n /**\n * @param columnIndex The index of the column whose right divider we're checking.\n */\n public columnRightDividerHasActiveStyling(columnIndex: number): boolean {\n const divider = this.getColumnDivider(columnIndex, false);\n const currentColor = parseColor(\n window.getComputedStyle(divider).borderLeftColor\n );\n const hoverColor = parseColor(borderHoverColor.getValueFor(divider))!;\n return currentColor!.equalValue(hoverColor);\n }\n\n public isVerticalScrollbarVisible(): boolean {\n return (\n this.tableElement.viewport.clientHeight\n < this.tableElement.viewport.scrollHeight\n );\n }\n\n public isHorizontalScrollbarVisible(): boolean {\n return (\n this.tableElement.viewport.clientWidth\n < this.tableElement.viewport.scrollWidth\n );\n }\n\n public getSortedColumns(): SortedColumn[] {\n return this.tableElement.columns\n .filter(\n x => !x.columnInternals.sortingDisabled\n && typeof x.columnInternals.currentSortIndex === 'number'\n && x.columnInternals.currentSortDirection\n !== TableColumnSortDirection.none\n )\n .sort(\n (a, b) => a.columnInternals.currentSortIndex!\n - b.columnInternals.currentSortIndex!\n )\n .map(x => {\n return {\n columnId: x.columnId,\n sortDirection: x.columnInternals.currentSortDirection\n };\n });\n }\n\n public getGroupedColumns(): string[] {\n return this.tableElement.columns\n .filter(\n x => !x.columnInternals.groupingDisabled\n && typeof x.columnInternals.groupIndex === 'number'\n )\n .sort(\n (a, b) => a.columnInternals.groupIndex!\n - b.columnInternals.groupIndex!\n )\n .map(x => x.columnId ?? '');\n }\n\n public getChildRowCountForGroup(groupRowIndex: number): number {\n const groupRow = this.getGroupRow(groupRowIndex);\n const countDisplayString = groupRow\n .shadowRoot!.querySelector('.group-row-child-count')!\n .textContent!.trim();\n // Remove the parenthesis to get just the number as a string\n const countString = countDisplayString.substring(\n 1,\n countDisplayString.length - 1\n );\n return Number(countString);\n }\n\n /** @internal */\n public isRowHoverStylingEnabled(): boolean {\n const rows: NodeListOf<TableRow | TableGroupRow> = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-row, nimble-table-group-row'\n );\n const firstRowAllowsHover = rows[0]!.allowHover;\n if (Array.from(rows).some(x => x.allowHover !== firstRowAllowsHover)) {\n throw new Error('Rows inconsistently allow hover styling');\n }\n return firstRowAllowsHover;\n }\n\n /** @internal */\n public getGroupRowHeaderView(groupRowIndex: number): TableGroupHeaderView {\n const groupRow = this.getGroupRow(groupRowIndex);\n return groupRow.shadowRoot!.querySelector('.group-header-view')!;\n }\n\n /** @internal */\n public getRow(rowIndex: number): TableRow {\n const rows = this.tableElement.shadowRoot!.querySelectorAll('nimble-table-row');\n if (rowIndex >= rows.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered rows'\n );\n }\n\n return rows.item(rowIndex);\n }\n\n /** @internal */\n public getCell(rowIndex: number, columnIndex: number): TableCell {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n if (columnIndex >= cells.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return cells.item(columnIndex);\n }\n\n private getRowById(recordId: string): TableRow {\n const row: TableRow | null = this.tableElement.shadowRoot!.querySelector(\n `nimble-table-row[record-id=\"${CSS.escape(recordId)}\"]`\n );\n if (!row) {\n throw new Error(\n 'Row with given id was not found. It may not be scrolled into view.'\n );\n }\n\n return row;\n }\n\n private getCellById(recordId: string, columnId: string): TableCell {\n const row = this.getRowById(recordId);\n const cell: TableCell | null = row.shadowRoot!.querySelector(\n `nimble-table-cell[column-id=\"${CSS.escape(columnId)}\"]`\n );\n\n if (!cell) {\n throw new Error('Cell with given columnId was not found in row');\n }\n\n return cell;\n }\n\n private getCollapseAllButton(): Button | null {\n return this.tableElement.shadowRoot!.querySelector<Button>(\n '.collapse-all-button'\n );\n }\n\n private getExpandCollapseButtonForRow(rowIndex: number): Button | null {\n const row = this.getRow(rowIndex);\n const rowExpandCollapseButton = row.shadowRoot!.querySelector<Button>(\n '.expand-collapse-button'\n );\n if (!rowExpandCollapseButton) {\n const firstCell = this.getCell(rowIndex, 0);\n return firstCell?.shadowRoot!.querySelector<Button>(\n '.expand-collapse-button'\n );\n }\n\n return rowExpandCollapseButton;\n }\n\n private getSelectionCheckboxForRow(rowIndex: number): Checkbox | null {\n const row = this.getRow(rowIndex);\n return row.shadowRoot!.querySelector('.selection-checkbox');\n }\n\n private getSelectionCheckboxForGroupRow(\n groupRowIndex: number\n ): Checkbox | null {\n const groupRow = this.getGroupRow(groupRowIndex);\n return groupRow.shadowRoot!.querySelector('.selection-checkbox');\n }\n\n private getSelectionCheckboxForTable(): Checkbox | null {\n return this.tableElement.shadowRoot!.querySelector<Checkbox>(\n '.header-row .selection-checkbox'\n );\n }\n\n private isCheckboxVisible(checkbox: Checkbox | null): boolean {\n return !!checkbox && !checkbox.hidden;\n }\n\n private getSelectionStateOfCheckbox(\n checkbox: Checkbox | null\n ): TableRowSelectionState {\n if (!checkbox) {\n throw new Error('Cannot get selection state from null checkbox');\n }\n\n if (checkbox.indeterminate) {\n return TableRowSelectionState.partiallySelected;\n }\n if (checkbox.checked) {\n return TableRowSelectionState.selected;\n }\n return TableRowSelectionState.notSelected;\n }\n\n private getGroupRow(groupRowIndex: number): TableGroupRow {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n if (groupRowIndex >= groupRows.length) {\n throw new Error(\n 'Attempting to index past the total number of group rows'\n );\n }\n\n return groupRows.item(groupRowIndex);\n }\n\n private getHeaderContentElement(\n element: HTMLElement | HTMLSlotElement\n ): Node | undefined {\n const nodeChildren = this.isSlotElement(element)\n ? element.assignedNodes()\n : element.shadowRoot?.childNodes;\n if (!nodeChildren) {\n return undefined;\n }\n\n const slotElement = Array.from(nodeChildren)?.find<HTMLSlotElement>(\n this.isSlotElement\n );\n if (slotElement) {\n return this.getHeaderContentElement(slotElement);\n }\n\n return nodeChildren[0]; // header content should be first item in final slot element\n }\n\n private getRenderedMappingColumnIconOrSpinner(\n view: TableCellView | TableGroupHeaderView\n ): Icon | Spinner {\n const viewShadowRoot = view.shadowRoot!;\n const spinnerOrIcon = viewShadowRoot.querySelector(\n '.reserve-icon-size'\n )?.firstElementChild;\n if (\n !(spinnerOrIcon instanceof Icon || spinnerOrIcon instanceof Spinner)\n ) {\n throw new Error('Icon or Spinner not found');\n }\n\n return spinnerOrIcon;\n }\n\n private getColumnDivider(\n columnIndex: number,\n leftDivider: boolean\n ): HTMLElement {\n const headerContainers = this.tableElement.shadowRoot!.querySelectorAll('.header-container');\n if (columnIndex < 0 || columnIndex >= headerContainers.length) {\n throw new Error(\n 'Invalid column index. Index must be greater than or equal to 0 and less than the number of visible columns.'\n );\n }\n const side = leftDivider ? 'left' : 'right';\n const divider = headerContainers[columnIndex]!.querySelector(\n `.column-divider.${side}`\n );\n if (!divider) {\n throw new Error(\n `The provided column index has no ${side} divider associated with it.`\n );\n }\n\n return divider as HTMLElement;\n }\n\n private pressColumnDivider(divider: HTMLElement): number {\n const dividerRect = divider.getBoundingClientRect();\n const clickX = (dividerRect.x + dividerRect.width) / 2;\n const pointerDownEvent = new PointerEvent('pointerdown', {\n // -1 is a value reserved for synthetic events: https://w3c.github.io/pointerevents/#dom-pointerevent-pointerid\n pointerId: -1,\n clientX: clickX,\n clientY: (dividerRect.y + dividerRect.height) / 2\n });\n divider.dispatchEvent(pointerDownEvent);\n\n return clickX;\n }\n\n private releaseColumnDivider(divider: HTMLElement): void {\n divider.dispatchEvent(new PointerEvent('pointerup'));\n }\n\n private dragSizeColumnByDivider(\n columnIndex: number,\n leftDivider: boolean,\n deltas: readonly number[]\n ): void {\n const divider = this.getColumnDivider(columnIndex, leftDivider);\n let currentPointerX = this.pressColumnDivider(divider);\n for (const delta of deltas) {\n currentPointerX += delta;\n const pointerMoveEvent = new PointerEvent('pointermove', {\n clientX: currentPointerX\n });\n divider.dispatchEvent(pointerMoveEvent);\n }\n this.releaseColumnDivider(divider);\n }\n\n private readonly isSlotElement = (\n element: Node | undefined\n ): element is HTMLSlotElement => {\n return element?.nodeName === 'SLOT';\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"table.pageobject.js","sourceRoot":"","sources":["../../../../src/table/testing/table.pageobject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAoB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EACH,wBAAwB,EAExB,sBAAsB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAmB,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAkB,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAU,SAAS,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAsB,MAAM,yBAAyB,CAAC;AAE/E,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAUtE;;;GAGG;AACH,MAAM,OAAO,eAAe;IACxB,YAAoC,YAAsB;QAAtB,iB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AE,eAAe;aAC3B,CAAC,CAAC;YACH,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CAOJ","sourcesContent":["import type { Checkbox } from '@microsoft/fast-foundation';\nimport { keyShift } from '@microsoft/fast-web-utilities';\nimport { parseColor } from '@microsoft/fast-colors';\nimport type { Table } from '..';\nimport { tableHeaderTag, type TableHeader } from '../components/header';\nimport {\n TableColumnSortDirection,\n TableRecord,\n TableRowSelectionState\n} from '../types';\nimport { waitForUpdatesAsync } from '../../testing/async-helpers';\nimport { menuButtonTag, type MenuButton } from '../../menu-button';\nimport { tableCellTag, type TableCell } from '../components/cell';\nimport type { TableGroupHeaderView } from '../../table-column/base/group-header-view';\nimport { TableCellView } from '../../table-column/base/cell-view';\nimport { tableRowTag, type TableRow } from '../components/row';\nimport { Anchor, anchorTag } from '../../anchor';\nimport { tableGroupRowTag, type TableGroupRow } from '../components/group-row';\nimport type { Button } from '../../button';\nimport { Icon } from '../../icon-base';\nimport { Spinner, spinnerTag } from '../../spinner';\nimport { borderHoverColor } from '../../theme-provider/design-tokens';\n\n/**\n * Summary information about a column that is sorted in the table for use in the `TablePageObject`.\n */\nexport interface SortedColumn {\n columnId?: string;\n sortDirection: TableColumnSortDirection;\n}\n\n/**\n * Page object for the `nimble-table` component to provide consistent ways\n * of querying and interacting with the component during tests.\n */\nexport class TablePageObject<T extends TableRecord> {\n public constructor(private readonly tableElement: Table<T>) {}\n\n public getRenderedHeaderCount(): number {\n const headers = this.tableElement.shadowRoot!.querySelectorAll(tableHeaderTag)!;\n return headers.length;\n }\n\n public getRenderedCellCountForRow(rowIndex: number): number {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll(tableCellTag);\n return cells.length;\n }\n\n public getHeaderContent(columnIndex: number): Node | undefined {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n tableHeaderTag\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return this.getHeaderContentElement(headers.item(columnIndex));\n }\n\n public getHeaderElement(columnIndex: number): TableHeader {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n tableHeaderTag\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return headers.item(columnIndex);\n }\n\n public getHeaderTitle(columnIndex: number): string {\n const column = this.tableElement.columns[columnIndex];\n return (\n column?.shadowRoot!.firstElementChild?.getAttribute('title') ?? ''\n );\n }\n\n public getHeaderTextContent(columnIndex: number): string {\n return (\n this.getHeaderContent(\n columnIndex\n )?.firstChild?.textContent?.trim() ?? ''\n );\n }\n\n public dispatchEventToHeader(\n columnIndex: number,\n event: Event\n ): boolean | undefined {\n const column = this.tableElement.columns[columnIndex];\n return column?.shadowRoot!.firstElementChild?.dispatchEvent(event);\n }\n\n public getHeaderRenderedWidth(columnIndex: number): number {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n tableHeaderTag\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return headers[columnIndex]!.getBoundingClientRect().width;\n }\n\n public async clickColumnHeader(\n columnIndex: number,\n shiftKeyDown = false\n ): Promise<void> {\n const clickEvent = new MouseEvent('click', {\n shiftKey: shiftKeyDown,\n bubbles: true\n } as MouseEventInit);\n this.getHeaderElement(columnIndex).dispatchEvent(clickEvent);\n await waitForUpdatesAsync();\n }\n\n public getRenderedRowCount(): number {\n return this.tableElement.shadowRoot!.querySelectorAll(tableRowTag)\n .length;\n }\n\n public getRenderedGroupRowCount(): number {\n return this.tableElement.shadowRoot!.querySelectorAll(tableGroupRowTag)\n .length;\n }\n\n public getAllGroupRowsExpandedState(): boolean[] {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(tableGroupRowTag);\n return Array.from(groupRows).map(row => row.expanded);\n }\n\n public getAllDataRowsExpandedState(): boolean[] {\n const rows = this.tableElement.shadowRoot!.querySelectorAll(tableRowTag);\n return Array.from(rows).map(row => row.expanded);\n }\n\n public getRenderedCellView(\n rowIndex: number,\n columnIndex: number\n ): TableCellView {\n const cell = this.getCell(rowIndex, columnIndex);\n const cellView = cell.cellViewContainer.firstElementChild;\n if (!(cellView instanceof TableCellView)) {\n throw new Error(\n 'Cell view not found in cell - ensure cellViewTag is set for column'\n );\n }\n return cellView as TableCellView;\n }\n\n public getRenderedCellViewById(\n recordId: string,\n columnId: string\n ): TableCellView {\n const cell = this.getCellById(recordId, columnId);\n const cellView = cell.cellViewContainer.firstElementChild;\n if (!(cellView instanceof TableCellView)) {\n throw new Error(\n 'Cell view not found in cell - ensure cellViewTag is set for column'\n );\n }\n return cellView as TableCellView;\n }\n\n public getRenderedCellTextContent(\n rowIndex: number,\n columnIndex: number\n ): string {\n return (\n this.getRenderedCellView(\n rowIndex,\n columnIndex\n ).shadowRoot!.textContent?.trim() ?? ''\n );\n }\n\n public getRenderedCellAnchor(\n rowIndex: number,\n columnIndex: number\n ): Anchor {\n const anchor = this.getRenderedCellView(\n rowIndex,\n columnIndex\n ).shadowRoot!.querySelector(anchorTag);\n if (!anchor) {\n throw new Error(\n `Anchor not found at cell ${rowIndex},${columnIndex}`\n );\n }\n return anchor;\n }\n\n public getRenderedMappingColumnCellIconTagName(\n rowIndex: number,\n columnIndex: number\n ): string {\n const iconOrSpinner = this.getRenderedMappingColumnIconOrSpinner(\n this.getRenderedCellView(rowIndex, columnIndex)\n );\n return iconOrSpinner.tagName.toLocaleLowerCase();\n }\n\n public getRenderedGroupHeaderTextContent(groupRowIndex: number): string {\n return (\n this.getGroupRowHeaderView(\n groupRowIndex\n ).shadowRoot!.textContent?.trim() ?? ''\n );\n }\n\n public getAllRenderedGroupHeaderTextContent(): string[] {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(tableGroupRowTag);\n return Array.from(groupRows).map((_, i) => {\n return this.getRenderedGroupHeaderTextContent(i);\n });\n }\n\n public getCellTitle(rowIndex: number, columnIndex: number): string {\n const cellView = this.getRenderedCellView(rowIndex, columnIndex);\n return (\n cellView.shadowRoot!.firstElementChild?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToCell(\n rowIndex: number,\n columnIndex: number,\n event: Event\n ): boolean | undefined {\n const cellView = this.getRenderedCellView(rowIndex, columnIndex);\n return cellView.shadowRoot!.firstElementChild?.dispatchEvent(event);\n }\n\n public getGroupHeaderTitle(groupRowIndex: number): string {\n const groupHeader = this.getGroupRowHeaderView(groupRowIndex);\n return (\n groupHeader\n .shadowRoot!.querySelector('span')\n ?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToGroupHeader(\n groupRowIndex: number,\n event: Event\n ): boolean | undefined {\n const groupHeader = this.getGroupRowHeaderView(groupRowIndex);\n return groupHeader\n .shadowRoot!.querySelector('span')\n ?.dispatchEvent(event);\n }\n\n public getRecordId(rowIndex: number): string | undefined {\n return this.getRow(rowIndex).recordId;\n }\n\n public getRowWidth(): number {\n const tableRowContainer = this.tableElement.shadowRoot!.querySelector(\n '.table-row-container'\n );\n return tableRowContainer!.scrollWidth;\n }\n\n public async sizeTableToGivenRowWidth(\n rowWidth: number,\n table: Table<T>\n ): Promise<void> {\n if (!table.$fastController.isConnected) {\n throw Error(\n 'The element must be connected before calling this method'\n );\n }\n\n table.style.width = `${\n rowWidth\n + table.headerRowActionContainer.getBoundingClientRect().width\n + table.virtualizer.headerContainerMarginRight\n }px`;\n await waitForUpdatesAsync();\n }\n\n public getCellRenderedWidth(rowIndex: number, columnIndex: number): number {\n const cell = this.getCell(rowIndex, columnIndex);\n const actualWidth = cell.getBoundingClientRect().width;\n // Round to one decimal place. This is to work around a bug in Chrome related to\n // fractional widths (e.g. '1fr') in grid layouts that results in some numerical\n // precision issues. See: https://bugs.chromium.org/p/chromium/issues/detail?id=1515685\n return Math.round(actualWidth * 10) / 10;\n }\n\n public getTotalCellRenderedWidth(): number {\n const row = this.getRow(0);\n const cells = row?.shadowRoot?.querySelectorAll(tableCellTag);\n return Array.from(cells!).reduce((p, c) => {\n return p + c.getBoundingClientRect().width;\n }, 0);\n }\n\n public async scrollToFirstRowAsync(): Promise<void> {\n const scrollElement = this.tableElement.viewport;\n scrollElement.scroll({ top: 0 });\n await waitForUpdatesAsync();\n }\n\n public async scrollToLastRowAsync(): Promise<void> {\n const scrollElement = this.tableElement.viewport;\n scrollElement.scroll({ top: scrollElement.scrollHeight });\n await waitForUpdatesAsync();\n }\n\n public getCellActionMenu(\n rowIndex: number,\n columnIndex: number\n ): MenuButton | null {\n return this.getCell(rowIndex, columnIndex).shadowRoot!.querySelector(\n menuButtonTag\n );\n }\n\n public async clickCellActionMenu(\n rowIndex: number,\n columnIndex: number\n ): Promise<void> {\n this.setRowHoverState(rowIndex, true);\n await waitForUpdatesAsync();\n\n const menuButton = this.getCellActionMenu(rowIndex, columnIndex);\n if (!menuButton) {\n throw new Error('Cannot click on a non-visible action menu');\n }\n\n menuButton.toggleButton!.control.click();\n }\n\n public isCellActionMenuVisible(\n rowIndex: number,\n columnIndex: number\n ): boolean {\n const actionMenu = this.getCellActionMenu(rowIndex, columnIndex);\n if (!actionMenu) {\n return false;\n }\n\n return window.getComputedStyle(actionMenu).display !== 'none';\n }\n\n public setRowHoverState(rowIndex: number, hover: boolean): void {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll(tableCellTag);\n if (hover) {\n cells.forEach(cell => cell.style.setProperty(\n '--ni-private-table-cell-action-menu-display',\n 'block'\n ));\n } else {\n cells.forEach(cell => cell.style.removeProperty(\n '--ni-private-table-cell-action-menu-display'\n ));\n }\n }\n\n public async clickGroupRow(groupRowIndex: number): Promise<void> {\n const groupRow = this.getGroupRow(groupRowIndex);\n groupRow.click();\n await waitForUpdatesAsync();\n }\n\n public async clickRow(\n rowIndex: number,\n modifiers: { shiftKey?: boolean, ctrlKey?: boolean } = {}\n ): Promise<void> {\n const row = this.getRow(rowIndex);\n const event = new MouseEvent('click', modifiers);\n row.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public getIsRowSelectable(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n return row.selectable;\n }\n\n public getIsRowSelected(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n return row.selected;\n }\n\n public toggleGroupRowExpandedState(groupRowIndex: number): void {\n this.getGroupRow(groupRowIndex).click();\n }\n\n public clickCollapseAllButton(): void {\n this.getCollapseAllButton()?.click();\n }\n\n public clickDataRowExpandCollapseButton(rowIndex: number): void {\n const expandCollapseButton = this.getExpandCollapseButtonForRow(rowIndex);\n if (!expandCollapseButton) {\n throw new Error(\n 'The provided row index has no visible expand collapse button associated with it.'\n );\n }\n\n expandCollapseButton.click();\n }\n\n public isCollapseAllButtonVisible(): boolean {\n const collapseButton = this.getCollapseAllButton();\n if (collapseButton) {\n return (\n window.getComputedStyle(collapseButton).visibility === 'visible'\n );\n }\n return false;\n }\n\n public isCollapseAllButtonSpaceReserved(): boolean {\n const collapseButton = this.getCollapseAllButton();\n if (collapseButton) {\n return window.getComputedStyle(collapseButton).display !== 'none';\n }\n return true;\n }\n\n public isDataRowExpandCollapseButtonVisible(rowIndex: number): boolean {\n const expandCollapseButton = this.getExpandCollapseButtonForRow(rowIndex);\n return expandCollapseButton !== null;\n }\n\n public isDataRowLoadingSpinnerVisible(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n const spinner = row.shadowRoot!.querySelector(spinnerTag);\n return spinner !== null;\n }\n\n public isTableSelectionCheckboxVisible(): boolean {\n const checkbox = this.getSelectionCheckboxForTable();\n return this.isCheckboxVisible(checkbox);\n }\n\n public getTableSelectionState(): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForTable();\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickTableSelectionCheckbox(): void {\n const checkbox = this.getSelectionCheckboxForTable();\n checkbox!.click();\n }\n\n public isRowSelectionCheckboxVisible(rowIndex: number): boolean {\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n return this.isCheckboxVisible(checkbox);\n }\n\n public getRowSelectionState(rowIndex: number): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickRowSelectionCheckbox(rowIndex: number, shiftKey = false): void {\n if (shiftKey) {\n const shiftKeyDownEvent = new KeyboardEvent('keydown', {\n key: keyShift,\n shiftKey: true,\n bubbles: true\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyDownEvent);\n }\n\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n checkbox!.click();\n\n if (shiftKey) {\n const shiftKeyUpEvent = new KeyboardEvent('keyup', {\n key: keyShift,\n bubbles: true\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyUpEvent);\n }\n }\n\n public getGroupRowSelectionState(\n groupRowIndex: number\n ): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForGroupRow(groupRowIndex);\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickGroupRowSelectionCheckbox(\n groupRowIndex: number,\n shiftKey = false\n ): void {\n if (shiftKey) {\n const shiftKeyDownEvent = new KeyboardEvent('keydown', {\n key: keyShift,\n shiftKey: true,\n bubbles: true\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyDownEvent);\n }\n\n const checkbox = this.getSelectionCheckboxForGroupRow(groupRowIndex);\n checkbox!.click();\n\n if (shiftKey) {\n const shiftKeyUpEvent = new KeyboardEvent('keyup', {\n key: keyShift,\n bubbles: true\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyUpEvent);\n }\n }\n\n /**\n * @param columnIndex The index of the column to the left of the divider to press.\n */\n public pressRightColumnDivider(columnIndex: number): void {\n this.pressColumnDivider(this.getColumnDivider(columnIndex, false));\n }\n\n /**\n * @param columnIndex The index of the column to the left of the divider to release.\n */\n public releaseRightColumnDivider(columnIndex: number): void {\n this.releaseColumnDivider(this.getColumnDivider(columnIndex, false));\n }\n\n /**\n * @param columnIndex The index of the column to the left of a divider being dragged. Thus, this\n * cannot be given a value representing the last visible column index.\n * @param deltas The series of mouse movements in the x-direction while sizing a column.\n */\n public dragSizeColumnByRightDivider(\n columnIndex: number,\n deltas: readonly number[]\n ): void {\n this.dragSizeColumnByDivider(columnIndex, false, deltas);\n }\n\n /**\n * @param columnIndex The index of the column to the right of a divider being dragged. Thus, this\n * value must be greater than 0 and less than the total number of visible columns.\n * @param deltas The series of mouse movements in the x-direction while sizing a column.\n */\n public dragSizeColumnByLeftDivider(\n columnIndex: number,\n deltas: readonly number[]\n ): void {\n this.dragSizeColumnByDivider(columnIndex, true, deltas);\n }\n\n /**\n * @param columnIndex The index of the column whose right divider we're checking.\n */\n public columnRightDividerHasActiveStyling(columnIndex: number): boolean {\n const divider = this.getColumnDivider(columnIndex, false);\n const currentColor = parseColor(\n window.getComputedStyle(divider).borderLeftColor\n );\n const hoverColor = parseColor(borderHoverColor.getValueFor(divider))!;\n return currentColor!.equalValue(hoverColor);\n }\n\n public isVerticalScrollbarVisible(): boolean {\n return (\n this.tableElement.viewport.clientHeight\n < this.tableElement.viewport.scrollHeight\n );\n }\n\n public isHorizontalScrollbarVisible(): boolean {\n return (\n this.tableElement.viewport.clientWidth\n < this.tableElement.viewport.scrollWidth\n );\n }\n\n public getSortedColumns(): SortedColumn[] {\n return this.tableElement.columns\n .filter(\n x => !x.columnInternals.sortingDisabled\n && typeof x.columnInternals.currentSortIndex === 'number'\n && x.columnInternals.currentSortDirection\n !== TableColumnSortDirection.none\n )\n .sort(\n (a, b) => a.columnInternals.currentSortIndex!\n - b.columnInternals.currentSortIndex!\n )\n .map(x => {\n return {\n columnId: x.columnId,\n sortDirection: x.columnInternals.currentSortDirection\n };\n });\n }\n\n public getGroupedColumns(): string[] {\n return this.tableElement.columns\n .filter(\n x => !x.columnInternals.groupingDisabled\n && typeof x.columnInternals.groupIndex === 'number'\n )\n .sort(\n (a, b) => a.columnInternals.groupIndex!\n - b.columnInternals.groupIndex!\n )\n .map(x => x.columnId ?? '');\n }\n\n public getChildRowCountForGroup(groupRowIndex: number): number {\n const groupRow = this.getGroupRow(groupRowIndex);\n const countDisplayString = groupRow\n .shadowRoot!.querySelector('.group-row-child-count')!\n .textContent!.trim();\n // Remove the parenthesis to get just the number as a string\n const countString = countDisplayString.substring(\n 1,\n countDisplayString.length - 1\n );\n return Number(countString);\n }\n\n /** @internal */\n public isRowHoverStylingEnabled(): boolean {\n const rows: NodeListOf<TableRow | TableGroupRow> = this.tableElement.shadowRoot!.querySelectorAll(\n `${tableRowTag}, ${tableGroupRowTag}`\n );\n const firstRowAllowsHover = rows[0]!.allowHover;\n if (Array.from(rows).some(x => x.allowHover !== firstRowAllowsHover)) {\n throw new Error('Rows inconsistently allow hover styling');\n }\n return firstRowAllowsHover;\n }\n\n /** @internal */\n public getGroupRowHeaderView(groupRowIndex: number): TableGroupHeaderView {\n const groupRow = this.getGroupRow(groupRowIndex);\n return groupRow.shadowRoot!.querySelector('.group-header-view')!;\n }\n\n /** @internal */\n public getRow(rowIndex: number): TableRow {\n const rows = this.tableElement.shadowRoot!.querySelectorAll(tableRowTag);\n if (rowIndex >= rows.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered rows'\n );\n }\n\n return rows.item(rowIndex);\n }\n\n /** @internal */\n public getCell(rowIndex: number, columnIndex: number): TableCell {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll(tableCellTag);\n if (columnIndex >= cells.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return cells.item(columnIndex);\n }\n\n private getRowById(recordId: string): TableRow {\n const row: TableRow | null = this.tableElement.shadowRoot!.querySelector(\n `nimble-table-row[record-id=\"${CSS.escape(recordId)}\"]`\n );\n if (!row) {\n throw new Error(\n 'Row with given id was not found. It may not be scrolled into view.'\n );\n }\n\n return row;\n }\n\n private getCellById(recordId: string, columnId: string): TableCell {\n const row = this.getRowById(recordId);\n const cell: TableCell | null = row.shadowRoot!.querySelector(\n `nimble-table-cell[column-id=\"${CSS.escape(columnId)}\"]`\n );\n\n if (!cell) {\n throw new Error('Cell with given columnId was not found in row');\n }\n\n return cell;\n }\n\n private getCollapseAllButton(): Button | null {\n return this.tableElement.shadowRoot!.querySelector<Button>(\n '.collapse-all-button'\n );\n }\n\n private getExpandCollapseButtonForRow(rowIndex: number): Button | null {\n const row = this.getRow(rowIndex);\n const rowExpandCollapseButton = row.shadowRoot!.querySelector<Button>(\n '.expand-collapse-button'\n );\n if (!rowExpandCollapseButton) {\n const firstCell = this.getCell(rowIndex, 0);\n return firstCell?.shadowRoot!.querySelector<Button>(\n '.expand-collapse-button'\n );\n }\n\n return rowExpandCollapseButton;\n }\n\n private getSelectionCheckboxForRow(rowIndex: number): Checkbox | null {\n const row = this.getRow(rowIndex);\n return row.shadowRoot!.querySelector('.selection-checkbox');\n }\n\n private getSelectionCheckboxForGroupRow(\n groupRowIndex: number\n ): Checkbox | null {\n const groupRow = this.getGroupRow(groupRowIndex);\n return groupRow.shadowRoot!.querySelector('.selection-checkbox');\n }\n\n private getSelectionCheckboxForTable(): Checkbox | null {\n return this.tableElement.shadowRoot!.querySelector<Checkbox>(\n '.header-row .selection-checkbox'\n );\n }\n\n private isCheckboxVisible(checkbox: Checkbox | null): boolean {\n return !!checkbox && !checkbox.hidden;\n }\n\n private getSelectionStateOfCheckbox(\n checkbox: Checkbox | null\n ): TableRowSelectionState {\n if (!checkbox) {\n throw new Error('Cannot get selection state from null checkbox');\n }\n\n if (checkbox.indeterminate) {\n return TableRowSelectionState.partiallySelected;\n }\n if (checkbox.checked) {\n return TableRowSelectionState.selected;\n }\n return TableRowSelectionState.notSelected;\n }\n\n private getGroupRow(groupRowIndex: number): TableGroupRow {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(tableGroupRowTag);\n if (groupRowIndex >= groupRows.length) {\n throw new Error(\n 'Attempting to index past the total number of group rows'\n );\n }\n\n return groupRows.item(groupRowIndex);\n }\n\n private getHeaderContentElement(\n element: HTMLElement | HTMLSlotElement\n ): Node | undefined {\n const nodeChildren = this.isSlotElement(element)\n ? element.assignedNodes()\n : element.shadowRoot?.childNodes;\n if (!nodeChildren) {\n return undefined;\n }\n\n const slotElement = Array.from(nodeChildren)?.find<HTMLSlotElement>(\n this.isSlotElement\n );\n if (slotElement) {\n return this.getHeaderContentElement(slotElement);\n }\n\n return nodeChildren[0]; // header content should be first item in final slot element\n }\n\n private getRenderedMappingColumnIconOrSpinner(\n view: TableCellView | TableGroupHeaderView\n ): Icon | Spinner {\n const viewShadowRoot = view.shadowRoot!;\n const spinnerOrIcon = viewShadowRoot.querySelector(\n '.reserve-icon-size'\n )?.firstElementChild;\n if (\n !(spinnerOrIcon instanceof Icon || spinnerOrIcon instanceof Spinner)\n ) {\n throw new Error('Icon or Spinner not found');\n }\n\n return spinnerOrIcon;\n }\n\n private getColumnDivider(\n columnIndex: number,\n leftDivider: boolean\n ): HTMLElement {\n const headerContainers = this.tableElement.shadowRoot!.querySelectorAll('.header-container');\n if (columnIndex < 0 || columnIndex >= headerContainers.length) {\n throw new Error(\n 'Invalid column index. Index must be greater than or equal to 0 and less than the number of visible columns.'\n );\n }\n const side = leftDivider ? 'left' : 'right';\n const divider = headerContainers[columnIndex]!.querySelector(\n `.column-divider.${side}`\n );\n if (!divider) {\n throw new Error(\n `The provided column index has no ${side} divider associated with it.`\n );\n }\n\n return divider as HTMLElement;\n }\n\n private pressColumnDivider(divider: HTMLElement): number {\n const dividerRect = divider.getBoundingClientRect();\n const clickX = (dividerRect.x + dividerRect.width) / 2;\n const pointerDownEvent = new PointerEvent('pointerdown', {\n // -1 is a value reserved for synthetic events: https://w3c.github.io/pointerevents/#dom-pointerevent-pointerid\n pointerId: -1,\n clientX: clickX,\n clientY: (dividerRect.y + dividerRect.height) / 2\n });\n divider.dispatchEvent(pointerDownEvent);\n\n return clickX;\n }\n\n private releaseColumnDivider(divider: HTMLElement): void {\n divider.dispatchEvent(new PointerEvent('pointerup'));\n }\n\n private dragSizeColumnByDivider(\n columnIndex: number,\n leftDivider: boolean,\n deltas: readonly number[]\n ): void {\n const divider = this.getColumnDivider(columnIndex, leftDivider);\n let currentPointerX = this.pressColumnDivider(divider);\n for (const delta of deltas) {\n currentPointerX += delta;\n const pointerMoveEvent = new PointerEvent('pointermove', {\n clientX: currentPointerX\n });\n divider.dispatchEvent(pointerMoveEvent);\n }\n this.releaseColumnDivider(divider);\n }\n\n private readonly isSlotElement = (\n element: Node | undefined\n ): element is HTMLSlotElement => {\n return element?.nodeName === 'SLOT';\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "32.4.
|
|
3
|
+
"version": "32.4.1",
|
|
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",
|