@spectrum-web-components/split-view 0.41.2 → 0.42.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spectrum-web-components/split-view",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.42.0",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -61,10 +61,10 @@
|
|
61
61
|
"lit-html"
|
62
62
|
],
|
63
63
|
"dependencies": {
|
64
|
-
"@spectrum-web-components/base": "^0.
|
64
|
+
"@spectrum-web-components/base": "^0.42.0"
|
65
65
|
},
|
66
66
|
"devDependencies": {
|
67
|
-
"@spectrum-css/splitview": "^4.2.
|
67
|
+
"@spectrum-css/splitview": "^4.2.3"
|
68
68
|
},
|
69
69
|
"types": "./src/index.d.ts",
|
70
70
|
"customElements": "custom-elements.json",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"./sp-*.js",
|
73
73
|
"./**/*.dev.js"
|
74
74
|
],
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "9b3bd55ff8e8f9438817255976e77fd456b19d72"
|
76
76
|
}
|
package/src/SplitView.dev.js
CHANGED
@@ -96,7 +96,7 @@ export class SplitView extends SpectrumElement {
|
|
96
96
|
this.viewSize - this.splitterSize
|
97
97
|
)
|
98
98
|
};
|
99
|
-
const label = this.
|
99
|
+
const label = this.resizable ? this.label || "Resize the panels" : void 0;
|
100
100
|
return html`
|
101
101
|
<slot
|
102
102
|
id=${ifDefined(
|
package/src/SplitView.dev.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["SplitView.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n LitElement,\n nothing,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n classMap,\n ifDefined,\n} from '@spectrum-web-components/base/src/directives.js';\nimport {\n property,\n query,\n state,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { streamingListener } from '@spectrum-web-components/base/src/streaming-listener.js';\nimport { randomID } from '@spectrum-web-components/shared/src/random-id.js';\n\nimport { WithSWCResizeObserver } from './types';\n\nimport styles from './split-view.css.js';\n\nconst DEFAULT_MAX_SIZE = 3840;\n\nconst SPLITTERSIZE = 2;\n\nconst ARROW_KEY_CHANGE_VALUE = 10;\n\nconst PAGEUPDOWN_KEY_CHANGE_VALUE = 50;\n\nconst COLLAPSE_THREASHOLD = 50;\n\n/**\n * @element sp-split-view\n *\n * @slot Two sibling elements to be sized by the element attritubes\n * @fires change - Announces the new position of the splitter\n */\nexport class SplitView extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @state()\n public controlledEl?: HTMLElement;\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n @property({ type: Boolean, reflect: true })\n public resizable = false;\n\n @property({ type: Boolean, reflect: true })\n public collapsible = false;\n\n /** The minimum size of the primary pane */\n @property({ type: Number, attribute: 'primary-min' })\n public primaryMin = 0;\n\n /** The maximum size of the primary pane */\n @property({ type: Number, attribute: 'primary-max' })\n public primaryMax = DEFAULT_MAX_SIZE;\n\n /**\n * The start size of the primary pane, can be a real pixel number|string, percentage or \"auto\"\n * For example: \"100\", \"120px\", \"75%\" or \"auto\" are valid values\n * @type {number |\u00A0number + \"px\" | number + \"%\" | \"auto\"}\n * @attr\n */\n @property({ type: String, attribute: 'primary-size' })\n public primarySize?: string;\n\n /** The minimum size of the secondary pane */\n @property({ type: Number, attribute: 'secondary-min' })\n public secondaryMin = 0;\n\n /** The maximum size of the secondary pane */\n @property({ type: Number, attribute: 'secondary-max' })\n public secondaryMax = DEFAULT_MAX_SIZE;\n\n /** The current splitter position of split-view */\n @property({ type: Number, reflect: true, attribute: 'splitter-pos' })\n public splitterPos?: number;\n\n /** The current size of first pane of split-view */\n @property({ type: String, attribute: false })\n private firstPaneSize = 'auto';\n\n @property()\n public label?: string;\n\n @property({ type: Boolean, attribute: false })\n private enoughChildren = false;\n\n @property({ type: Number })\n private viewSize = 0;\n\n @query('slot')\n private paneSlot!: HTMLSlotElement;\n\n @query('#splitter')\n private splitter!: HTMLDivElement;\n\n private offset = 0;\n\n private minPos = 0;\n\n private maxPos = DEFAULT_MAX_SIZE;\n\n private observer?: WithSWCResizeObserver['ResizeObserver'];\n\n private rect?: DOMRect;\n\n private _splitterSize?: number;\n\n public constructor() {\n super();\n const RO = (window as unknown as WithSWCResizeObserver).ResizeObserver;\n if (RO) {\n this.observer = new RO(() => {\n this.rect = undefined;\n this.updateMinMax();\n });\n }\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.observer?.observe(this);\n }\n\n public override disconnectedCallback(): void {\n this.observer?.unobserve(this);\n super.disconnectedCallback();\n }\n\n /**\n * @private\n **/\n public get splitterSize(): number {\n if (!this._splitterSize) {\n this._splitterSize =\n (this.splitter &&\n Math.round(\n parseFloat(\n window\n .getComputedStyle(this.splitter)\n .getPropertyValue(\n this.vertical ? 'height' : 'width'\n )\n )\n )) ||\n SPLITTERSIZE;\n }\n return this._splitterSize;\n }\n\n protected override render(): TemplateResult {\n const splitterClasses = {\n 'is-resized-start': this.splitterPos === this.minPos,\n 'is-resized-end': (this.splitterPos &&\n this.splitterPos > this.splitterSize &&\n this.splitterPos === this.maxPos) as boolean,\n 'is-collapsed-start': this.splitterPos === 0,\n 'is-collapsed-end': (this.splitterPos &&\n this.splitterPos >=\n Math.max(\n this.splitterSize,\n this.viewSize - this.splitterSize\n )) as boolean,\n };\n const label =\n this.label || (this.resizable ? 'Resize the panels' : undefined);\n\n return html`\n <slot\n id=${ifDefined(\n this.resizable ? this.controlledEl?.id : undefined\n )}\n @slotchange=${this.onContentSlotChange}\n style=\"--spectrum-split-view-first-pane-size: ${this\n .firstPaneSize}\"\n ></slot>\n ${this.enoughChildren\n ? html`\n <div\n id=\"splitter\"\n class=${classMap(splitterClasses)}\n role=\"separator\"\n aria-controls=${ifDefined(\n this.resizable ? this.controlledEl?.id : undefined\n )}\n aria-label=${ifDefined(label)}\n aria-orientation=${this.vertical\n ? 'horizontal'\n : 'vertical'}\n aria-valuenow=${Math.round(\n (parseFloat(this.firstPaneSize) / this.viewSize) *\n 100\n )}\n tabindex=${ifDefined(\n this.resizable ? '0' : undefined\n )}\n @keydown=${this.onKeydown}\n ${streamingListener({\n start: ['pointerdown', this.onPointerdown],\n streamInside: ['pointermove', this.onPointermove],\n end: [\n [\n 'pointerup',\n 'pointercancel',\n 'pointerleave',\n ],\n this.onPointerup,\n ],\n })}\n >\n ${this.resizable\n ? html`\n <div id=\"gripper\"></div>\n `\n : nothing}\n </div>\n `\n : nothing}\n `;\n }\n\n private controlledElIDApplied = false;\n\n private onContentSlotChange(\n event: Event & { target: HTMLSlotElement }\n ): void {\n if (this.controlledEl && this.controlledElIDApplied) {\n this.controlledEl.removeAttribute('id');\n this.controlledElIDApplied = false;\n }\n this.controlledEl = event.target.assignedElements()[0] as HTMLElement;\n if (this.controlledEl && !this.controlledEl.id) {\n this.controlledEl.id = `${this.tagName.toLowerCase()}-${randomID()}`;\n this.controlledElIDApplied = true;\n }\n this.enoughChildren = this.children.length > 1;\n this.checkResize();\n }\n\n private onPointerdown(event: PointerEvent): void {\n if (!this.resizable || (event.button && event.button !== 0)) {\n event.preventDefault();\n return;\n }\n this.splitter.setPointerCapture(event.pointerId);\n this.offset = this.getOffset();\n }\n\n private onPointermove(event: PointerEvent): void {\n event.preventDefault();\n let pos =\n this.vertical || this.isLTR\n ? this.getPosition(event) - this.offset\n : this.offset - this.getPosition(event);\n if (this.collapsible && pos < this.minPos - COLLAPSE_THREASHOLD) {\n pos = 0;\n }\n if (this.collapsible && pos > this.maxPos + COLLAPSE_THREASHOLD) {\n pos = this.viewSize - this.splitterSize;\n }\n this.updatePosition(pos);\n }\n\n private onPointerup(event: PointerEvent): void {\n this.splitter.releasePointerCapture(event.pointerId);\n }\n\n private getOffset(): number {\n if (!this.rect) {\n this.rect = this.getBoundingClientRect();\n }\n const offsetX = this.isLTR ? this.rect.left : this.rect.right;\n return this.vertical ? this.rect.top : offsetX;\n }\n\n private getPosition(event: PointerEvent): number {\n return this.vertical ? event.clientY : event.clientX;\n }\n\n private movePosition(event: KeyboardEvent, offset: number): void {\n event.preventDefault();\n if (this.splitterPos !== undefined) {\n this.updatePosition(this.splitterPos + offset);\n }\n }\n\n private onKeydown(event: KeyboardEvent): void {\n if (!this.resizable) {\n return;\n }\n let direction = 0;\n const isLTRorVertical = this.isLTR || this.vertical;\n switch (event.key) {\n case 'Home':\n event.preventDefault();\n this.updatePosition(this.collapsible ? 0 : this.minPos);\n return;\n case 'End':\n event.preventDefault();\n this.updatePosition(\n this.collapsible\n ? this.viewSize - this.splitterSize\n : this.maxPos\n );\n return;\n case 'ArrowLeft':\n direction = isLTRorVertical ? -1 : 1;\n break;\n case 'ArrowRight':\n direction = isLTRorVertical ? 1 : -1;\n break;\n case 'ArrowUp':\n direction = this.vertical ? -1 : 1;\n break;\n case 'ArrowDown':\n direction = this.vertical ? 1 : -1;\n break;\n case 'PageUp':\n direction = this.vertical ? -1 : 1;\n break;\n case 'PageDown':\n direction = this.vertical ? 1 : -1;\n break;\n }\n if (direction !== 0) {\n const moveBy = event.key.startsWith('Page')\n ? PAGEUPDOWN_KEY_CHANGE_VALUE\n : ARROW_KEY_CHANGE_VALUE;\n this.movePosition(event, moveBy * direction);\n }\n }\n\n private async checkResize(): Promise<void> {\n if (!this.enoughChildren) {\n return;\n }\n this.updateMinMax();\n if (this.splitterPos === undefined) {\n const startPos = await this.calcStartPos();\n this.updatePosition(startPos);\n }\n }\n\n private updateMinMax(): void {\n this.viewSize = this.vertical ? this.offsetHeight : this.offsetWidth;\n this.minPos = Math.max(\n this.primaryMin,\n this.viewSize - this.secondaryMax\n );\n this.maxPos = Math.min(\n this.primaryMax,\n this.viewSize - Math.max(this.secondaryMin, this.splitterSize)\n );\n }\n\n private updatePosition(x: number): void {\n let pos = this.getLimitedPosition(x);\n if (this.collapsible && x <= 0) {\n pos = 0;\n }\n if (\n this.collapsible &&\n x > this.maxPos &&\n x >= this.viewSize - this.splitterSize\n ) {\n pos = this.viewSize - this.splitterSize;\n }\n if (pos !== this.splitterPos) {\n this.splitterPos = pos;\n this.dispatchChangeEvent();\n }\n }\n\n private getLimitedPosition(input: number): number {\n if (input <= this.minPos) {\n return this.minPos;\n }\n if (input >= this.maxPos) {\n return this.maxPos;\n }\n return Math.max(this.minPos, Math.min(this.maxPos, input));\n }\n\n private async calcStartPos(): Promise<number> {\n if (\n this.primarySize !== undefined &&\n /^\\d+(px)?$/.test(this.primarySize)\n ) {\n return parseInt(this.primarySize, 10);\n }\n if (this.primarySize !== undefined && /^\\d+%$/.test(this.primarySize)) {\n return (parseInt(this.primarySize, 10) * this.viewSize) / 100;\n }\n if (this.primarySize === 'auto') {\n this.firstPaneSize = 'auto';\n const nodes = this.paneSlot.assignedNodes({ flatten: true });\n const firstEl = nodes.find(\n (node) => node instanceof HTMLElement\n ) as LitElement;\n if (typeof firstEl.updateComplete !== 'undefined') {\n await firstEl.updateComplete;\n }\n if (firstEl) {\n const size = window\n .getComputedStyle(firstEl)\n .getPropertyValue(this.vertical ? 'height' : 'width');\n const size_i = parseFloat(size);\n if (!isNaN(size_i)) {\n return this.getLimitedPosition(Math.ceil(size_i));\n }\n }\n }\n return this.viewSize / 2;\n }\n\n private dispatchChangeEvent(): void {\n const changeEvent = new Event('change', {\n bubbles: true,\n composed: true,\n });\n this.dispatchEvent(changeEvent);\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (!this.hasUpdated || changed.has('primarySize')) {\n this.splitterPos = undefined;\n this.checkResize();\n }\n if (\n changed.has('splitterPos') &&\n this.splitterPos !== undefined &&\n this.enoughChildren\n ) {\n this.firstPaneSize = `${Math.round(this.splitterPos)}px`;\n }\n }\n}\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EAEA;AAAA,OAEG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AAIzB,OAAO,YAAY;AAEnB,MAAM,mBAAmB;AAEzB,MAAM,eAAe;AAErB,MAAM,yBAAyB;AAE/B,MAAM,8BAA8B;AAEpC,MAAM,sBAAsB;AAQrB,aAAM,kBAAkB,gBAAgB;AAAA,EA6EpC,cAAc;AACjB,UAAM;AArEV,SAAO,WAAW;AAGlB,SAAO,YAAY;AAGnB,SAAO,cAAc;AAIrB,SAAO,aAAa;AAIpB,SAAO,aAAa;AAapB,SAAO,eAAe;AAItB,SAAO,eAAe;AAQtB,SAAQ,gBAAgB;AAMxB,SAAQ,iBAAiB;AAGzB,SAAQ,WAAW;AAQnB,SAAQ,SAAS;AAEjB,SAAQ,SAAS;AAEjB,SAAQ,SAAS;
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n LitElement,\n nothing,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n classMap,\n ifDefined,\n} from '@spectrum-web-components/base/src/directives.js';\nimport {\n property,\n query,\n state,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { streamingListener } from '@spectrum-web-components/base/src/streaming-listener.js';\nimport { randomID } from '@spectrum-web-components/shared/src/random-id.js';\n\nimport { WithSWCResizeObserver } from './types';\n\nimport styles from './split-view.css.js';\n\nconst DEFAULT_MAX_SIZE = 3840;\n\nconst SPLITTERSIZE = 2;\n\nconst ARROW_KEY_CHANGE_VALUE = 10;\n\nconst PAGEUPDOWN_KEY_CHANGE_VALUE = 50;\n\nconst COLLAPSE_THREASHOLD = 50;\n\n/**\n * @element sp-split-view\n *\n * @slot Two sibling elements to be sized by the element attritubes\n * @fires change - Announces the new position of the splitter\n */\nexport class SplitView extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @state()\n public controlledEl?: HTMLElement;\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n @property({ type: Boolean, reflect: true })\n public resizable = false;\n\n @property({ type: Boolean, reflect: true })\n public collapsible = false;\n\n /** The minimum size of the primary pane */\n @property({ type: Number, attribute: 'primary-min' })\n public primaryMin = 0;\n\n /** The maximum size of the primary pane */\n @property({ type: Number, attribute: 'primary-max' })\n public primaryMax = DEFAULT_MAX_SIZE;\n\n /**\n * The start size of the primary pane, can be a real pixel number|string, percentage or \"auto\"\n * For example: \"100\", \"120px\", \"75%\" or \"auto\" are valid values\n * @type {number |\u00A0number + \"px\" | number + \"%\" | \"auto\"}\n * @attr\n */\n @property({ type: String, attribute: 'primary-size' })\n public primarySize?: string;\n\n /** The minimum size of the secondary pane */\n @property({ type: Number, attribute: 'secondary-min' })\n public secondaryMin = 0;\n\n /** The maximum size of the secondary pane */\n @property({ type: Number, attribute: 'secondary-max' })\n public secondaryMax = DEFAULT_MAX_SIZE;\n\n /** The current splitter position of split-view */\n @property({ type: Number, reflect: true, attribute: 'splitter-pos' })\n public splitterPos?: number;\n\n /** The current size of first pane of split-view */\n @property({ type: String, attribute: false })\n private firstPaneSize = 'auto';\n\n @property()\n public label?: string;\n\n @property({ type: Boolean, attribute: false })\n private enoughChildren = false;\n\n @property({ type: Number })\n private viewSize = 0;\n\n @query('slot')\n private paneSlot!: HTMLSlotElement;\n\n @query('#splitter')\n private splitter!: HTMLDivElement;\n\n private offset = 0;\n\n private minPos = 0;\n\n private maxPos = DEFAULT_MAX_SIZE;\n\n private observer?: WithSWCResizeObserver['ResizeObserver'];\n\n private rect?: DOMRect;\n\n private _splitterSize?: number;\n\n public constructor() {\n super();\n const RO = (window as unknown as WithSWCResizeObserver).ResizeObserver;\n if (RO) {\n this.observer = new RO(() => {\n this.rect = undefined;\n this.updateMinMax();\n });\n }\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.observer?.observe(this);\n }\n\n public override disconnectedCallback(): void {\n this.observer?.unobserve(this);\n super.disconnectedCallback();\n }\n\n /**\n * @private\n **/\n public get splitterSize(): number {\n if (!this._splitterSize) {\n this._splitterSize =\n (this.splitter &&\n Math.round(\n parseFloat(\n window\n .getComputedStyle(this.splitter)\n .getPropertyValue(\n this.vertical ? 'height' : 'width'\n )\n )\n )) ||\n SPLITTERSIZE;\n }\n return this._splitterSize;\n }\n\n protected override render(): TemplateResult {\n const splitterClasses = {\n 'is-resized-start': this.splitterPos === this.minPos,\n 'is-resized-end': (this.splitterPos &&\n this.splitterPos > this.splitterSize &&\n this.splitterPos === this.maxPos) as boolean,\n 'is-collapsed-start': this.splitterPos === 0,\n 'is-collapsed-end': (this.splitterPos &&\n this.splitterPos >=\n Math.max(\n this.splitterSize,\n this.viewSize - this.splitterSize\n )) as boolean,\n };\n const label = this.resizable\n ? this.label || 'Resize the panels'\n : undefined;\n\n return html`\n <slot\n id=${ifDefined(\n this.resizable ? this.controlledEl?.id : undefined\n )}\n @slotchange=${this.onContentSlotChange}\n style=\"--spectrum-split-view-first-pane-size: ${this\n .firstPaneSize}\"\n ></slot>\n ${this.enoughChildren\n ? html`\n <div\n id=\"splitter\"\n class=${classMap(splitterClasses)}\n role=\"separator\"\n aria-controls=${ifDefined(\n this.resizable ? this.controlledEl?.id : undefined\n )}\n aria-label=${ifDefined(label)}\n aria-orientation=${this.vertical\n ? 'horizontal'\n : 'vertical'}\n aria-valuenow=${Math.round(\n (parseFloat(this.firstPaneSize) / this.viewSize) *\n 100\n )}\n tabindex=${ifDefined(\n this.resizable ? '0' : undefined\n )}\n @keydown=${this.onKeydown}\n ${streamingListener({\n start: ['pointerdown', this.onPointerdown],\n streamInside: ['pointermove', this.onPointermove],\n end: [\n [\n 'pointerup',\n 'pointercancel',\n 'pointerleave',\n ],\n this.onPointerup,\n ],\n })}\n >\n ${this.resizable\n ? html`\n <div id=\"gripper\"></div>\n `\n : nothing}\n </div>\n `\n : nothing}\n `;\n }\n\n private controlledElIDApplied = false;\n\n private onContentSlotChange(\n event: Event & { target: HTMLSlotElement }\n ): void {\n if (this.controlledEl && this.controlledElIDApplied) {\n this.controlledEl.removeAttribute('id');\n this.controlledElIDApplied = false;\n }\n this.controlledEl = event.target.assignedElements()[0] as HTMLElement;\n if (this.controlledEl && !this.controlledEl.id) {\n this.controlledEl.id = `${this.tagName.toLowerCase()}-${randomID()}`;\n this.controlledElIDApplied = true;\n }\n this.enoughChildren = this.children.length > 1;\n this.checkResize();\n }\n\n private onPointerdown(event: PointerEvent): void {\n if (!this.resizable || (event.button && event.button !== 0)) {\n event.preventDefault();\n return;\n }\n this.splitter.setPointerCapture(event.pointerId);\n this.offset = this.getOffset();\n }\n\n private onPointermove(event: PointerEvent): void {\n event.preventDefault();\n let pos =\n this.vertical || this.isLTR\n ? this.getPosition(event) - this.offset\n : this.offset - this.getPosition(event);\n if (this.collapsible && pos < this.minPos - COLLAPSE_THREASHOLD) {\n pos = 0;\n }\n if (this.collapsible && pos > this.maxPos + COLLAPSE_THREASHOLD) {\n pos = this.viewSize - this.splitterSize;\n }\n this.updatePosition(pos);\n }\n\n private onPointerup(event: PointerEvent): void {\n this.splitter.releasePointerCapture(event.pointerId);\n }\n\n private getOffset(): number {\n if (!this.rect) {\n this.rect = this.getBoundingClientRect();\n }\n const offsetX = this.isLTR ? this.rect.left : this.rect.right;\n return this.vertical ? this.rect.top : offsetX;\n }\n\n private getPosition(event: PointerEvent): number {\n return this.vertical ? event.clientY : event.clientX;\n }\n\n private movePosition(event: KeyboardEvent, offset: number): void {\n event.preventDefault();\n if (this.splitterPos !== undefined) {\n this.updatePosition(this.splitterPos + offset);\n }\n }\n\n private onKeydown(event: KeyboardEvent): void {\n if (!this.resizable) {\n return;\n }\n let direction = 0;\n const isLTRorVertical = this.isLTR || this.vertical;\n switch (event.key) {\n case 'Home':\n event.preventDefault();\n this.updatePosition(this.collapsible ? 0 : this.minPos);\n return;\n case 'End':\n event.preventDefault();\n this.updatePosition(\n this.collapsible\n ? this.viewSize - this.splitterSize\n : this.maxPos\n );\n return;\n case 'ArrowLeft':\n direction = isLTRorVertical ? -1 : 1;\n break;\n case 'ArrowRight':\n direction = isLTRorVertical ? 1 : -1;\n break;\n case 'ArrowUp':\n direction = this.vertical ? -1 : 1;\n break;\n case 'ArrowDown':\n direction = this.vertical ? 1 : -1;\n break;\n case 'PageUp':\n direction = this.vertical ? -1 : 1;\n break;\n case 'PageDown':\n direction = this.vertical ? 1 : -1;\n break;\n }\n if (direction !== 0) {\n const moveBy = event.key.startsWith('Page')\n ? PAGEUPDOWN_KEY_CHANGE_VALUE\n : ARROW_KEY_CHANGE_VALUE;\n this.movePosition(event, moveBy * direction);\n }\n }\n\n private async checkResize(): Promise<void> {\n if (!this.enoughChildren) {\n return;\n }\n this.updateMinMax();\n if (this.splitterPos === undefined) {\n const startPos = await this.calcStartPos();\n this.updatePosition(startPos);\n }\n }\n\n private updateMinMax(): void {\n this.viewSize = this.vertical ? this.offsetHeight : this.offsetWidth;\n this.minPos = Math.max(\n this.primaryMin,\n this.viewSize - this.secondaryMax\n );\n this.maxPos = Math.min(\n this.primaryMax,\n this.viewSize - Math.max(this.secondaryMin, this.splitterSize)\n );\n }\n\n private updatePosition(x: number): void {\n let pos = this.getLimitedPosition(x);\n if (this.collapsible && x <= 0) {\n pos = 0;\n }\n if (\n this.collapsible &&\n x > this.maxPos &&\n x >= this.viewSize - this.splitterSize\n ) {\n pos = this.viewSize - this.splitterSize;\n }\n if (pos !== this.splitterPos) {\n this.splitterPos = pos;\n this.dispatchChangeEvent();\n }\n }\n\n private getLimitedPosition(input: number): number {\n if (input <= this.minPos) {\n return this.minPos;\n }\n if (input >= this.maxPos) {\n return this.maxPos;\n }\n return Math.max(this.minPos, Math.min(this.maxPos, input));\n }\n\n private async calcStartPos(): Promise<number> {\n if (\n this.primarySize !== undefined &&\n /^\\d+(px)?$/.test(this.primarySize)\n ) {\n return parseInt(this.primarySize, 10);\n }\n if (this.primarySize !== undefined && /^\\d+%$/.test(this.primarySize)) {\n return (parseInt(this.primarySize, 10) * this.viewSize) / 100;\n }\n if (this.primarySize === 'auto') {\n this.firstPaneSize = 'auto';\n const nodes = this.paneSlot.assignedNodes({ flatten: true });\n const firstEl = nodes.find(\n (node) => node instanceof HTMLElement\n ) as LitElement;\n if (typeof firstEl.updateComplete !== 'undefined') {\n await firstEl.updateComplete;\n }\n if (firstEl) {\n const size = window\n .getComputedStyle(firstEl)\n .getPropertyValue(this.vertical ? 'height' : 'width');\n const size_i = parseFloat(size);\n if (!isNaN(size_i)) {\n return this.getLimitedPosition(Math.ceil(size_i));\n }\n }\n }\n return this.viewSize / 2;\n }\n\n private dispatchChangeEvent(): void {\n const changeEvent = new Event('change', {\n bubbles: true,\n composed: true,\n });\n this.dispatchEvent(changeEvent);\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (!this.hasUpdated || changed.has('primarySize')) {\n this.splitterPos = undefined;\n this.checkResize();\n }\n if (\n changed.has('splitterPos') &&\n this.splitterPos !== undefined &&\n this.enoughChildren\n ) {\n this.firstPaneSize = `${Math.round(this.splitterPos)}px`;\n }\n }\n}\n"],
|
5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,t,i),i};import{html as p,nothing as c,SpectrumElement as b}from"@spectrum-web-components/base";import{classMap as P,ifDefined as n}from"@spectrum-web-components/base/src/directives.js";import{property as r,query as u,state as z}from"@spectrum-web-components/base/src/decorators.js";import{streamingListener as y}from"@spectrum-web-components/base/src/streaming-listener.js";import{randomID as E}from"@spectrum-web-components/shared/src/random-id.js";import S from"./split-view.css.js";const d=3840,g=2,M=10,C=50,m=50;export class SplitView extends b{constructor(){super();this.vertical=!1;this.resizable=!1;this.collapsible=!1;this.primaryMin=0;this.primaryMax=d;this.secondaryMin=0;this.secondaryMax=d;this.firstPaneSize="auto";this.enoughChildren=!1;this.viewSize=0;this.offset=0;this.minPos=0;this.maxPos=d;this.controlledElIDApplied=!1;const t=window.ResizeObserver;t&&(this.observer=new t(()=>{this.rect=void 0,this.updateMinMax()}))}static get styles(){return[S]}connectedCallback(){var t;super.connectedCallback(),(t=this.observer)==null||t.observe(this)}disconnectedCallback(){var t;(t=this.observer)==null||t.unobserve(this),super.disconnectedCallback()}get splitterSize(){return this._splitterSize||(this._splitterSize=this.splitter&&Math.round(parseFloat(window.getComputedStyle(this.splitter).getPropertyValue(this.vertical?"height":"width")))||g),this._splitterSize}render(){var i,o;const t={"is-resized-start":this.splitterPos===this.minPos,"is-resized-end":this.splitterPos&&this.splitterPos>this.splitterSize&&this.splitterPos===this.maxPos,"is-collapsed-start":this.splitterPos===0,"is-collapsed-end":this.splitterPos&&this.splitterPos>=Math.max(this.splitterSize,this.viewSize-this.splitterSize)},e=this.label||
|
1
|
+
"use strict";var v=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var s=(l,a,t,e)=>{for(var i=e>1?void 0:e?f(a,t):a,o=l.length-1,h;o>=0;o--)(h=l[o])&&(i=(e?h(a,t,i):h(i))||i);return e&&i&&v(a,t,i),i};import{html as p,nothing as c,SpectrumElement as b}from"@spectrum-web-components/base";import{classMap as P,ifDefined as n}from"@spectrum-web-components/base/src/directives.js";import{property as r,query as u,state as z}from"@spectrum-web-components/base/src/decorators.js";import{streamingListener as y}from"@spectrum-web-components/base/src/streaming-listener.js";import{randomID as E}from"@spectrum-web-components/shared/src/random-id.js";import S from"./split-view.css.js";const d=3840,g=2,M=10,C=50,m=50;export class SplitView extends b{constructor(){super();this.vertical=!1;this.resizable=!1;this.collapsible=!1;this.primaryMin=0;this.primaryMax=d;this.secondaryMin=0;this.secondaryMax=d;this.firstPaneSize="auto";this.enoughChildren=!1;this.viewSize=0;this.offset=0;this.minPos=0;this.maxPos=d;this.controlledElIDApplied=!1;const t=window.ResizeObserver;t&&(this.observer=new t(()=>{this.rect=void 0,this.updateMinMax()}))}static get styles(){return[S]}connectedCallback(){var t;super.connectedCallback(),(t=this.observer)==null||t.observe(this)}disconnectedCallback(){var t;(t=this.observer)==null||t.unobserve(this),super.disconnectedCallback()}get splitterSize(){return this._splitterSize||(this._splitterSize=this.splitter&&Math.round(parseFloat(window.getComputedStyle(this.splitter).getPropertyValue(this.vertical?"height":"width")))||g),this._splitterSize}render(){var i,o;const t={"is-resized-start":this.splitterPos===this.minPos,"is-resized-end":this.splitterPos&&this.splitterPos>this.splitterSize&&this.splitterPos===this.maxPos,"is-collapsed-start":this.splitterPos===0,"is-collapsed-end":this.splitterPos&&this.splitterPos>=Math.max(this.splitterSize,this.viewSize-this.splitterSize)},e=this.resizable?this.label||"Resize the panels":void 0;return p`
|
2
2
|
<slot
|
3
3
|
id=${n(this.resizable?(i=this.controlledEl)==null?void 0:i.id:void 0)}
|
4
4
|
@slotchange=${this.onContentSlotChange}
|
package/src/SplitView.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["SplitView.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n LitElement,\n nothing,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n classMap,\n ifDefined,\n} from '@spectrum-web-components/base/src/directives.js';\nimport {\n property,\n query,\n state,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { streamingListener } from '@spectrum-web-components/base/src/streaming-listener.js';\nimport { randomID } from '@spectrum-web-components/shared/src/random-id.js';\n\nimport { WithSWCResizeObserver } from './types';\n\nimport styles from './split-view.css.js';\n\nconst DEFAULT_MAX_SIZE = 3840;\n\nconst SPLITTERSIZE = 2;\n\nconst ARROW_KEY_CHANGE_VALUE = 10;\n\nconst PAGEUPDOWN_KEY_CHANGE_VALUE = 50;\n\nconst COLLAPSE_THREASHOLD = 50;\n\n/**\n * @element sp-split-view\n *\n * @slot Two sibling elements to be sized by the element attritubes\n * @fires change - Announces the new position of the splitter\n */\nexport class SplitView extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @state()\n public controlledEl?: HTMLElement;\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n @property({ type: Boolean, reflect: true })\n public resizable = false;\n\n @property({ type: Boolean, reflect: true })\n public collapsible = false;\n\n /** The minimum size of the primary pane */\n @property({ type: Number, attribute: 'primary-min' })\n public primaryMin = 0;\n\n /** The maximum size of the primary pane */\n @property({ type: Number, attribute: 'primary-max' })\n public primaryMax = DEFAULT_MAX_SIZE;\n\n /**\n * The start size of the primary pane, can be a real pixel number|string, percentage or \"auto\"\n * For example: \"100\", \"120px\", \"75%\" or \"auto\" are valid values\n * @type {number |\u00A0number + \"px\" | number + \"%\" | \"auto\"}\n * @attr\n */\n @property({ type: String, attribute: 'primary-size' })\n public primarySize?: string;\n\n /** The minimum size of the secondary pane */\n @property({ type: Number, attribute: 'secondary-min' })\n public secondaryMin = 0;\n\n /** The maximum size of the secondary pane */\n @property({ type: Number, attribute: 'secondary-max' })\n public secondaryMax = DEFAULT_MAX_SIZE;\n\n /** The current splitter position of split-view */\n @property({ type: Number, reflect: true, attribute: 'splitter-pos' })\n public splitterPos?: number;\n\n /** The current size of first pane of split-view */\n @property({ type: String, attribute: false })\n private firstPaneSize = 'auto';\n\n @property()\n public label?: string;\n\n @property({ type: Boolean, attribute: false })\n private enoughChildren = false;\n\n @property({ type: Number })\n private viewSize = 0;\n\n @query('slot')\n private paneSlot!: HTMLSlotElement;\n\n @query('#splitter')\n private splitter!: HTMLDivElement;\n\n private offset = 0;\n\n private minPos = 0;\n\n private maxPos = DEFAULT_MAX_SIZE;\n\n private observer?: WithSWCResizeObserver['ResizeObserver'];\n\n private rect?: DOMRect;\n\n private _splitterSize?: number;\n\n public constructor() {\n super();\n const RO = (window as unknown as WithSWCResizeObserver).ResizeObserver;\n if (RO) {\n this.observer = new RO(() => {\n this.rect = undefined;\n this.updateMinMax();\n });\n }\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.observer?.observe(this);\n }\n\n public override disconnectedCallback(): void {\n this.observer?.unobserve(this);\n super.disconnectedCallback();\n }\n\n /**\n * @private\n **/\n public get splitterSize(): number {\n if (!this._splitterSize) {\n this._splitterSize =\n (this.splitter &&\n Math.round(\n parseFloat(\n window\n .getComputedStyle(this.splitter)\n .getPropertyValue(\n this.vertical ? 'height' : 'width'\n )\n )\n )) ||\n SPLITTERSIZE;\n }\n return this._splitterSize;\n }\n\n protected override render(): TemplateResult {\n const splitterClasses = {\n 'is-resized-start': this.splitterPos === this.minPos,\n 'is-resized-end': (this.splitterPos &&\n this.splitterPos > this.splitterSize &&\n this.splitterPos === this.maxPos) as boolean,\n 'is-collapsed-start': this.splitterPos === 0,\n 'is-collapsed-end': (this.splitterPos &&\n this.splitterPos >=\n Math.max(\n this.splitterSize,\n this.viewSize - this.splitterSize\n )) as boolean,\n };\n const label =\n this.label || (this.resizable ? 'Resize the panels' : undefined);\n\n return html`\n <slot\n id=${ifDefined(\n this.resizable ? this.controlledEl?.id : undefined\n )}\n @slotchange=${this.onContentSlotChange}\n style=\"--spectrum-split-view-first-pane-size: ${this\n .firstPaneSize}\"\n ></slot>\n ${this.enoughChildren\n ? html`\n <div\n id=\"splitter\"\n class=${classMap(splitterClasses)}\n role=\"separator\"\n aria-controls=${ifDefined(\n this.resizable ? this.controlledEl?.id : undefined\n )}\n aria-label=${ifDefined(label)}\n aria-orientation=${this.vertical\n ? 'horizontal'\n : 'vertical'}\n aria-valuenow=${Math.round(\n (parseFloat(this.firstPaneSize) / this.viewSize) *\n 100\n )}\n tabindex=${ifDefined(\n this.resizable ? '0' : undefined\n )}\n @keydown=${this.onKeydown}\n ${streamingListener({\n start: ['pointerdown', this.onPointerdown],\n streamInside: ['pointermove', this.onPointermove],\n end: [\n [\n 'pointerup',\n 'pointercancel',\n 'pointerleave',\n ],\n this.onPointerup,\n ],\n })}\n >\n ${this.resizable\n ? html`\n <div id=\"gripper\"></div>\n `\n : nothing}\n </div>\n `\n : nothing}\n `;\n }\n\n private controlledElIDApplied = false;\n\n private onContentSlotChange(\n event: Event & { target: HTMLSlotElement }\n ): void {\n if (this.controlledEl && this.controlledElIDApplied) {\n this.controlledEl.removeAttribute('id');\n this.controlledElIDApplied = false;\n }\n this.controlledEl = event.target.assignedElements()[0] as HTMLElement;\n if (this.controlledEl && !this.controlledEl.id) {\n this.controlledEl.id = `${this.tagName.toLowerCase()}-${randomID()}`;\n this.controlledElIDApplied = true;\n }\n this.enoughChildren = this.children.length > 1;\n this.checkResize();\n }\n\n private onPointerdown(event: PointerEvent): void {\n if (!this.resizable || (event.button && event.button !== 0)) {\n event.preventDefault();\n return;\n }\n this.splitter.setPointerCapture(event.pointerId);\n this.offset = this.getOffset();\n }\n\n private onPointermove(event: PointerEvent): void {\n event.preventDefault();\n let pos =\n this.vertical || this.isLTR\n ? this.getPosition(event) - this.offset\n : this.offset - this.getPosition(event);\n if (this.collapsible && pos < this.minPos - COLLAPSE_THREASHOLD) {\n pos = 0;\n }\n if (this.collapsible && pos > this.maxPos + COLLAPSE_THREASHOLD) {\n pos = this.viewSize - this.splitterSize;\n }\n this.updatePosition(pos);\n }\n\n private onPointerup(event: PointerEvent): void {\n this.splitter.releasePointerCapture(event.pointerId);\n }\n\n private getOffset(): number {\n if (!this.rect) {\n this.rect = this.getBoundingClientRect();\n }\n const offsetX = this.isLTR ? this.rect.left : this.rect.right;\n return this.vertical ? this.rect.top : offsetX;\n }\n\n private getPosition(event: PointerEvent): number {\n return this.vertical ? event.clientY : event.clientX;\n }\n\n private movePosition(event: KeyboardEvent, offset: number): void {\n event.preventDefault();\n if (this.splitterPos !== undefined) {\n this.updatePosition(this.splitterPos + offset);\n }\n }\n\n private onKeydown(event: KeyboardEvent): void {\n if (!this.resizable) {\n return;\n }\n let direction = 0;\n const isLTRorVertical = this.isLTR || this.vertical;\n switch (event.key) {\n case 'Home':\n event.preventDefault();\n this.updatePosition(this.collapsible ? 0 : this.minPos);\n return;\n case 'End':\n event.preventDefault();\n this.updatePosition(\n this.collapsible\n ? this.viewSize - this.splitterSize\n : this.maxPos\n );\n return;\n case 'ArrowLeft':\n direction = isLTRorVertical ? -1 : 1;\n break;\n case 'ArrowRight':\n direction = isLTRorVertical ? 1 : -1;\n break;\n case 'ArrowUp':\n direction = this.vertical ? -1 : 1;\n break;\n case 'ArrowDown':\n direction = this.vertical ? 1 : -1;\n break;\n case 'PageUp':\n direction = this.vertical ? -1 : 1;\n break;\n case 'PageDown':\n direction = this.vertical ? 1 : -1;\n break;\n }\n if (direction !== 0) {\n const moveBy = event.key.startsWith('Page')\n ? PAGEUPDOWN_KEY_CHANGE_VALUE\n : ARROW_KEY_CHANGE_VALUE;\n this.movePosition(event, moveBy * direction);\n }\n }\n\n private async checkResize(): Promise<void> {\n if (!this.enoughChildren) {\n return;\n }\n this.updateMinMax();\n if (this.splitterPos === undefined) {\n const startPos = await this.calcStartPos();\n this.updatePosition(startPos);\n }\n }\n\n private updateMinMax(): void {\n this.viewSize = this.vertical ? this.offsetHeight : this.offsetWidth;\n this.minPos = Math.max(\n this.primaryMin,\n this.viewSize - this.secondaryMax\n );\n this.maxPos = Math.min(\n this.primaryMax,\n this.viewSize - Math.max(this.secondaryMin, this.splitterSize)\n );\n }\n\n private updatePosition(x: number): void {\n let pos = this.getLimitedPosition(x);\n if (this.collapsible && x <= 0) {\n pos = 0;\n }\n if (\n this.collapsible &&\n x > this.maxPos &&\n x >= this.viewSize - this.splitterSize\n ) {\n pos = this.viewSize - this.splitterSize;\n }\n if (pos !== this.splitterPos) {\n this.splitterPos = pos;\n this.dispatchChangeEvent();\n }\n }\n\n private getLimitedPosition(input: number): number {\n if (input <= this.minPos) {\n return this.minPos;\n }\n if (input >= this.maxPos) {\n return this.maxPos;\n }\n return Math.max(this.minPos, Math.min(this.maxPos, input));\n }\n\n private async calcStartPos(): Promise<number> {\n if (\n this.primarySize !== undefined &&\n /^\\d+(px)?$/.test(this.primarySize)\n ) {\n return parseInt(this.primarySize, 10);\n }\n if (this.primarySize !== undefined && /^\\d+%$/.test(this.primarySize)) {\n return (parseInt(this.primarySize, 10) * this.viewSize) / 100;\n }\n if (this.primarySize === 'auto') {\n this.firstPaneSize = 'auto';\n const nodes = this.paneSlot.assignedNodes({ flatten: true });\n const firstEl = nodes.find(\n (node) => node instanceof HTMLElement\n ) as LitElement;\n if (typeof firstEl.updateComplete !== 'undefined') {\n await firstEl.updateComplete;\n }\n if (firstEl) {\n const size = window\n .getComputedStyle(firstEl)\n .getPropertyValue(this.vertical ? 'height' : 'width');\n const size_i = parseFloat(size);\n if (!isNaN(size_i)) {\n return this.getLimitedPosition(Math.ceil(size_i));\n }\n }\n }\n return this.viewSize / 2;\n }\n\n private dispatchChangeEvent(): void {\n const changeEvent = new Event('change', {\n bubbles: true,\n composed: true,\n });\n this.dispatchEvent(changeEvent);\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (!this.hasUpdated || changed.has('primarySize')) {\n this.splitterPos = undefined;\n this.checkResize();\n }\n if (\n changed.has('splitterPos') &&\n this.splitterPos !== undefined &&\n this.enoughChildren\n ) {\n this.firstPaneSize = `${Math.round(this.splitterPos)}px`;\n }\n }\n}\n"],
|
5
|
-
"mappings": "qNAYA,OAEI,QAAAA,EAEA,WAAAC,EAEA,mBAAAC,MAEG,gCACP,OACI,YAAAC,EACA,aAAAC,MACG,kDACP,OACI,YAAAC,EACA,SAAAC,EACA,SAAAC,MACG,kDACP,OAAS,qBAAAC,MAAyB,0DAClC,OAAS,YAAAC,MAAgB,mDAIzB,OAAOC,MAAY,sBAEnB,MAAMC,EAAmB,KAEnBC,EAAe,EAEfC,EAAyB,GAEzBC,EAA8B,GAE9BC,EAAsB,GAQrB,aAAM,kBAAkBb,CAAgB,CA6EpC,aAAc,CACjB,MAAM,EArEV,KAAO,SAAW,GAGlB,KAAO,UAAY,GAGnB,KAAO,YAAc,GAIrB,KAAO,WAAa,EAIpB,KAAO,WAAaS,EAapB,KAAO,aAAe,EAItB,KAAO,aAAeA,EAQtB,KAAQ,cAAgB,OAMxB,KAAQ,eAAiB,GAGzB,KAAQ,SAAW,EAQnB,KAAQ,OAAS,EAEjB,KAAQ,OAAS,EAEjB,KAAQ,OAASA,
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n LitElement,\n nothing,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n classMap,\n ifDefined,\n} from '@spectrum-web-components/base/src/directives.js';\nimport {\n property,\n query,\n state,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { streamingListener } from '@spectrum-web-components/base/src/streaming-listener.js';\nimport { randomID } from '@spectrum-web-components/shared/src/random-id.js';\n\nimport { WithSWCResizeObserver } from './types';\n\nimport styles from './split-view.css.js';\n\nconst DEFAULT_MAX_SIZE = 3840;\n\nconst SPLITTERSIZE = 2;\n\nconst ARROW_KEY_CHANGE_VALUE = 10;\n\nconst PAGEUPDOWN_KEY_CHANGE_VALUE = 50;\n\nconst COLLAPSE_THREASHOLD = 50;\n\n/**\n * @element sp-split-view\n *\n * @slot Two sibling elements to be sized by the element attritubes\n * @fires change - Announces the new position of the splitter\n */\nexport class SplitView extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @state()\n public controlledEl?: HTMLElement;\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n @property({ type: Boolean, reflect: true })\n public resizable = false;\n\n @property({ type: Boolean, reflect: true })\n public collapsible = false;\n\n /** The minimum size of the primary pane */\n @property({ type: Number, attribute: 'primary-min' })\n public primaryMin = 0;\n\n /** The maximum size of the primary pane */\n @property({ type: Number, attribute: 'primary-max' })\n public primaryMax = DEFAULT_MAX_SIZE;\n\n /**\n * The start size of the primary pane, can be a real pixel number|string, percentage or \"auto\"\n * For example: \"100\", \"120px\", \"75%\" or \"auto\" are valid values\n * @type {number |\u00A0number + \"px\" | number + \"%\" | \"auto\"}\n * @attr\n */\n @property({ type: String, attribute: 'primary-size' })\n public primarySize?: string;\n\n /** The minimum size of the secondary pane */\n @property({ type: Number, attribute: 'secondary-min' })\n public secondaryMin = 0;\n\n /** The maximum size of the secondary pane */\n @property({ type: Number, attribute: 'secondary-max' })\n public secondaryMax = DEFAULT_MAX_SIZE;\n\n /** The current splitter position of split-view */\n @property({ type: Number, reflect: true, attribute: 'splitter-pos' })\n public splitterPos?: number;\n\n /** The current size of first pane of split-view */\n @property({ type: String, attribute: false })\n private firstPaneSize = 'auto';\n\n @property()\n public label?: string;\n\n @property({ type: Boolean, attribute: false })\n private enoughChildren = false;\n\n @property({ type: Number })\n private viewSize = 0;\n\n @query('slot')\n private paneSlot!: HTMLSlotElement;\n\n @query('#splitter')\n private splitter!: HTMLDivElement;\n\n private offset = 0;\n\n private minPos = 0;\n\n private maxPos = DEFAULT_MAX_SIZE;\n\n private observer?: WithSWCResizeObserver['ResizeObserver'];\n\n private rect?: DOMRect;\n\n private _splitterSize?: number;\n\n public constructor() {\n super();\n const RO = (window as unknown as WithSWCResizeObserver).ResizeObserver;\n if (RO) {\n this.observer = new RO(() => {\n this.rect = undefined;\n this.updateMinMax();\n });\n }\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.observer?.observe(this);\n }\n\n public override disconnectedCallback(): void {\n this.observer?.unobserve(this);\n super.disconnectedCallback();\n }\n\n /**\n * @private\n **/\n public get splitterSize(): number {\n if (!this._splitterSize) {\n this._splitterSize =\n (this.splitter &&\n Math.round(\n parseFloat(\n window\n .getComputedStyle(this.splitter)\n .getPropertyValue(\n this.vertical ? 'height' : 'width'\n )\n )\n )) ||\n SPLITTERSIZE;\n }\n return this._splitterSize;\n }\n\n protected override render(): TemplateResult {\n const splitterClasses = {\n 'is-resized-start': this.splitterPos === this.minPos,\n 'is-resized-end': (this.splitterPos &&\n this.splitterPos > this.splitterSize &&\n this.splitterPos === this.maxPos) as boolean,\n 'is-collapsed-start': this.splitterPos === 0,\n 'is-collapsed-end': (this.splitterPos &&\n this.splitterPos >=\n Math.max(\n this.splitterSize,\n this.viewSize - this.splitterSize\n )) as boolean,\n };\n const label = this.resizable\n ? this.label || 'Resize the panels'\n : undefined;\n\n return html`\n <slot\n id=${ifDefined(\n this.resizable ? this.controlledEl?.id : undefined\n )}\n @slotchange=${this.onContentSlotChange}\n style=\"--spectrum-split-view-first-pane-size: ${this\n .firstPaneSize}\"\n ></slot>\n ${this.enoughChildren\n ? html`\n <div\n id=\"splitter\"\n class=${classMap(splitterClasses)}\n role=\"separator\"\n aria-controls=${ifDefined(\n this.resizable ? this.controlledEl?.id : undefined\n )}\n aria-label=${ifDefined(label)}\n aria-orientation=${this.vertical\n ? 'horizontal'\n : 'vertical'}\n aria-valuenow=${Math.round(\n (parseFloat(this.firstPaneSize) / this.viewSize) *\n 100\n )}\n tabindex=${ifDefined(\n this.resizable ? '0' : undefined\n )}\n @keydown=${this.onKeydown}\n ${streamingListener({\n start: ['pointerdown', this.onPointerdown],\n streamInside: ['pointermove', this.onPointermove],\n end: [\n [\n 'pointerup',\n 'pointercancel',\n 'pointerleave',\n ],\n this.onPointerup,\n ],\n })}\n >\n ${this.resizable\n ? html`\n <div id=\"gripper\"></div>\n `\n : nothing}\n </div>\n `\n : nothing}\n `;\n }\n\n private controlledElIDApplied = false;\n\n private onContentSlotChange(\n event: Event & { target: HTMLSlotElement }\n ): void {\n if (this.controlledEl && this.controlledElIDApplied) {\n this.controlledEl.removeAttribute('id');\n this.controlledElIDApplied = false;\n }\n this.controlledEl = event.target.assignedElements()[0] as HTMLElement;\n if (this.controlledEl && !this.controlledEl.id) {\n this.controlledEl.id = `${this.tagName.toLowerCase()}-${randomID()}`;\n this.controlledElIDApplied = true;\n }\n this.enoughChildren = this.children.length > 1;\n this.checkResize();\n }\n\n private onPointerdown(event: PointerEvent): void {\n if (!this.resizable || (event.button && event.button !== 0)) {\n event.preventDefault();\n return;\n }\n this.splitter.setPointerCapture(event.pointerId);\n this.offset = this.getOffset();\n }\n\n private onPointermove(event: PointerEvent): void {\n event.preventDefault();\n let pos =\n this.vertical || this.isLTR\n ? this.getPosition(event) - this.offset\n : this.offset - this.getPosition(event);\n if (this.collapsible && pos < this.minPos - COLLAPSE_THREASHOLD) {\n pos = 0;\n }\n if (this.collapsible && pos > this.maxPos + COLLAPSE_THREASHOLD) {\n pos = this.viewSize - this.splitterSize;\n }\n this.updatePosition(pos);\n }\n\n private onPointerup(event: PointerEvent): void {\n this.splitter.releasePointerCapture(event.pointerId);\n }\n\n private getOffset(): number {\n if (!this.rect) {\n this.rect = this.getBoundingClientRect();\n }\n const offsetX = this.isLTR ? this.rect.left : this.rect.right;\n return this.vertical ? this.rect.top : offsetX;\n }\n\n private getPosition(event: PointerEvent): number {\n return this.vertical ? event.clientY : event.clientX;\n }\n\n private movePosition(event: KeyboardEvent, offset: number): void {\n event.preventDefault();\n if (this.splitterPos !== undefined) {\n this.updatePosition(this.splitterPos + offset);\n }\n }\n\n private onKeydown(event: KeyboardEvent): void {\n if (!this.resizable) {\n return;\n }\n let direction = 0;\n const isLTRorVertical = this.isLTR || this.vertical;\n switch (event.key) {\n case 'Home':\n event.preventDefault();\n this.updatePosition(this.collapsible ? 0 : this.minPos);\n return;\n case 'End':\n event.preventDefault();\n this.updatePosition(\n this.collapsible\n ? this.viewSize - this.splitterSize\n : this.maxPos\n );\n return;\n case 'ArrowLeft':\n direction = isLTRorVertical ? -1 : 1;\n break;\n case 'ArrowRight':\n direction = isLTRorVertical ? 1 : -1;\n break;\n case 'ArrowUp':\n direction = this.vertical ? -1 : 1;\n break;\n case 'ArrowDown':\n direction = this.vertical ? 1 : -1;\n break;\n case 'PageUp':\n direction = this.vertical ? -1 : 1;\n break;\n case 'PageDown':\n direction = this.vertical ? 1 : -1;\n break;\n }\n if (direction !== 0) {\n const moveBy = event.key.startsWith('Page')\n ? PAGEUPDOWN_KEY_CHANGE_VALUE\n : ARROW_KEY_CHANGE_VALUE;\n this.movePosition(event, moveBy * direction);\n }\n }\n\n private async checkResize(): Promise<void> {\n if (!this.enoughChildren) {\n return;\n }\n this.updateMinMax();\n if (this.splitterPos === undefined) {\n const startPos = await this.calcStartPos();\n this.updatePosition(startPos);\n }\n }\n\n private updateMinMax(): void {\n this.viewSize = this.vertical ? this.offsetHeight : this.offsetWidth;\n this.minPos = Math.max(\n this.primaryMin,\n this.viewSize - this.secondaryMax\n );\n this.maxPos = Math.min(\n this.primaryMax,\n this.viewSize - Math.max(this.secondaryMin, this.splitterSize)\n );\n }\n\n private updatePosition(x: number): void {\n let pos = this.getLimitedPosition(x);\n if (this.collapsible && x <= 0) {\n pos = 0;\n }\n if (\n this.collapsible &&\n x > this.maxPos &&\n x >= this.viewSize - this.splitterSize\n ) {\n pos = this.viewSize - this.splitterSize;\n }\n if (pos !== this.splitterPos) {\n this.splitterPos = pos;\n this.dispatchChangeEvent();\n }\n }\n\n private getLimitedPosition(input: number): number {\n if (input <= this.minPos) {\n return this.minPos;\n }\n if (input >= this.maxPos) {\n return this.maxPos;\n }\n return Math.max(this.minPos, Math.min(this.maxPos, input));\n }\n\n private async calcStartPos(): Promise<number> {\n if (\n this.primarySize !== undefined &&\n /^\\d+(px)?$/.test(this.primarySize)\n ) {\n return parseInt(this.primarySize, 10);\n }\n if (this.primarySize !== undefined && /^\\d+%$/.test(this.primarySize)) {\n return (parseInt(this.primarySize, 10) * this.viewSize) / 100;\n }\n if (this.primarySize === 'auto') {\n this.firstPaneSize = 'auto';\n const nodes = this.paneSlot.assignedNodes({ flatten: true });\n const firstEl = nodes.find(\n (node) => node instanceof HTMLElement\n ) as LitElement;\n if (typeof firstEl.updateComplete !== 'undefined') {\n await firstEl.updateComplete;\n }\n if (firstEl) {\n const size = window\n .getComputedStyle(firstEl)\n .getPropertyValue(this.vertical ? 'height' : 'width');\n const size_i = parseFloat(size);\n if (!isNaN(size_i)) {\n return this.getLimitedPosition(Math.ceil(size_i));\n }\n }\n }\n return this.viewSize / 2;\n }\n\n private dispatchChangeEvent(): void {\n const changeEvent = new Event('change', {\n bubbles: true,\n composed: true,\n });\n this.dispatchEvent(changeEvent);\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (!this.hasUpdated || changed.has('primarySize')) {\n this.splitterPos = undefined;\n this.checkResize();\n }\n if (\n changed.has('splitterPos') &&\n this.splitterPos !== undefined &&\n this.enoughChildren\n ) {\n this.firstPaneSize = `${Math.round(this.splitterPos)}px`;\n }\n }\n}\n"],
|
5
|
+
"mappings": "qNAYA,OAEI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,CAhZWC,EAAA,CADN9B,EAAM,GALE,UAMF,4BAGA8B,EAAA,CADNhC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GARjC,UASF,wBAGAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAXjC,UAYF,yBAGAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAdjC,UAeF,2BAIAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,CAAC,GAlB3C,UAmBF,0BAIAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,CAAC,GAtB3C,UAuBF,0BASAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GA/B5C,UAgCF,2BAIAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GAnC7C,UAoCF,4BAIAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,OAAQ,UAAW,eAAgB,CAAC,GAvC7C,UAwCF,4BAIAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,cAAe,CAAC,GA3C3D,UA4CF,2BAICgC,EAAA,CADPhC,EAAS,CAAE,KAAM,OAAQ,UAAW,EAAM,CAAC,GA/CnC,UAgDD,6BAGDgC,EAAA,CADNhC,EAAS,GAlDD,UAmDF,qBAGCgC,EAAA,CADPhC,EAAS,CAAE,KAAM,QAAS,UAAW,EAAM,CAAC,GArDpC,UAsDD,8BAGAgC,EAAA,CADPhC,EAAS,CAAE,KAAM,MAAO,CAAC,GAxDjB,UAyDD,wBAGAgC,EAAA,CADP/B,EAAM,MAAM,GA3DJ,UA4DD,wBAGA+B,EAAA,CADP/B,EAAM,WAAW,GA9DT,UA+DD",
|
6
6
|
"names": ["html", "nothing", "SpectrumElement", "classMap", "ifDefined", "property", "query", "state", "streamingListener", "randomID", "styles", "DEFAULT_MAX_SIZE", "SPLITTERSIZE", "ARROW_KEY_CHANGE_VALUE", "PAGEUPDOWN_KEY_CHANGE_VALUE", "COLLAPSE_THREASHOLD", "RO", "_a", "_b", "splitterClasses", "label", "event", "pos", "offsetX", "offset", "direction", "isLTRorVertical", "moveBy", "startPos", "x", "input", "firstEl", "node", "size", "size_i", "changeEvent", "changed", "__decorateClass"]
|
7
7
|
}
|
package/test/split-view.test.js
CHANGED
@@ -838,6 +838,38 @@ describe("SplitView", () => {
|
|
838
838
|
);
|
839
839
|
expect(testPanel).to.be.null;
|
840
840
|
});
|
841
|
+
it("allows a custom label when resizable if specified", async () => {
|
842
|
+
const customLabel = "Resizable Split View Custom Label";
|
843
|
+
const defaultLabel = "Resize the panels";
|
844
|
+
let el = await fixture(
|
845
|
+
html`
|
846
|
+
<sp-split-view
|
847
|
+
resizable
|
848
|
+
label=${customLabel}
|
849
|
+
primary-min="50"
|
850
|
+
secondary-min="50"
|
851
|
+
>
|
852
|
+
<div>First panel</div>
|
853
|
+
<div>Second panel</div>
|
854
|
+
</sp-split-view>
|
855
|
+
`
|
856
|
+
);
|
857
|
+
expect(el.label).to.equal(customLabel);
|
858
|
+
let splitter = el.shadowRoot.querySelector(
|
859
|
+
"#splitter"
|
860
|
+
);
|
861
|
+
expect(splitter.ariaLabel).to.equal(customLabel);
|
862
|
+
el = await fixture(
|
863
|
+
html`
|
864
|
+
<sp-split-view resizable primary-min="50" secondary-min="50">
|
865
|
+
<div>First panel</div>
|
866
|
+
<div>Second panel</div>
|
867
|
+
</sp-split-view>
|
868
|
+
`
|
869
|
+
);
|
870
|
+
splitter = el.shadowRoot.querySelector("#splitter");
|
871
|
+
expect(splitter.ariaLabel).to.equal(defaultLabel);
|
872
|
+
});
|
841
873
|
it("keeps the splitter pos when removing and re-adding a panel", async () => {
|
842
874
|
var _a, _b;
|
843
875
|
let pointerId = -1;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["split-view.test.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n nextFrame,\n} from '@open-wc/testing';\n\nimport '@spectrum-web-components/split-view/sp-split-view.js';\nimport { SplitView } from '@spectrum-web-components/split-view';\nimport {\n arrowDownEvent,\n arrowLeftEvent,\n arrowRightEvent,\n arrowUpEvent,\n endEvent,\n homeEvent,\n pageDownEvent,\n pageUpEvent,\n shiftTabEvent,\n testForLitDevWarnings,\n} from '../../../test/testing-helpers.js';\nimport { spy } from 'sinon';\n\ndescribe('SplitView', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<SplitView>(\n html`\n <sp-split-view primary-size=\"100\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n )\n );\n it('loads default (horizontal) split-view accessibly', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view primary-size=\"100\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n expect(el.splitterPos || 0).to.equal(100);\n expect(el.resizable).to.be.false;\n expect(el.collapsible).to.be.false;\n const gripper = el.shadowRoot.querySelector(\n '#gripper'\n ) as HTMLDivElement;\n expect(gripper).to.be.null;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(getComputedStyle(splitter).cursor).to.equal('auto');\n });\n\n it('loads horizontal [resizable] split-view accessibly', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view resizable primary-size=\"100px\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n expect(el.splitterPos || 0).to.equal(100);\n\n const gripper = el.shadowRoot.querySelector(\n '#gripper'\n ) as HTMLDivElement;\n await expect(gripper).to.be.accessible();\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(getComputedStyle(splitter).cursor).to.equal('ew-resize');\n });\n\n it('loads [vertical] split-view accessibly', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n primary-size=\"75%\"\n style=\"height: 400px\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n expect(el.splitterPos || 0).to.equal(300);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(getComputedStyle(splitter).cursor).to.equal('auto');\n });\n\n it('loads [vertical] [resizable] split-view accessibly', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view vertical resizable style=\"height: 400px\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n expect(el.splitterPos || 0).to.equal(200);\n\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(getComputedStyle(splitter).cursor).to.equal('ns-resize');\n });\n\n it('set all panel values', async () => {\n const splitTotalWidth = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n primary-max=\"300\"\n secondary-min=\"50\"\n style=${`height: 500px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n expect(el.primaryMin).to.equal(50);\n expect(el.primaryMax).to.equal(300);\n expect(el.secondaryMin).to.equal(50);\n expect(el.secondaryMax).to.equal(3840);\n });\n\n it('use auto height in primary pane', async () => {\n const splitTotalWidth = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-size=\"auto\"\n style=${`height: 500px; width: ${splitTotalWidth}px;`}\n >\n <div>\n First panel Lorem Ipsum is simply dummy text of the\n printing and typesetting industry. Lorem Ipsum has been\n the industry's standard dummy text ever since the 1500s,\n when an unknown printer took a galley of type and\n scrambled it to make a type specimen book. It has\n survived not only five centuries, but also the leap into\n electronic typesetting, remaining essentially unchanged.\n </div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n expect(el.primarySize).to.equal('auto');\n expect(el.splitterPos || 0).to.equal(398);\n });\n\n it('resizes when pointer moves and resizable is enabled [ltr]', async () => {\n let pointerId = -1;\n const splitTotalWidth = 400;\n const el = await fixture<\n SplitView & {\n splitterPos: number;\n }\n >(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n secondary-min=\"50\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n let pos = el.splitterPos;\n expect(el.splitterPos).to.equal(200);\n\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n pos -= 10;\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: pos,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(Math.round(el.splitterPos)).to.equal(\n pos - el.getBoundingClientRect().left\n );\n\n // don't collapse to start\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: 0,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos).to.equal(el.primaryMin);\n expect(getComputedStyle(splitter).cursor).to.equal('e-resize');\n\n // don't collapse to end\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: splitTotalWidth,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos, '350 first time').to.equal(\n splitTotalWidth - el.secondaryMin\n );\n expect(getComputedStyle(splitter).cursor).to.equal('w-resize');\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n // don't change anything when triggering mouseevent with right button click\n splitter.dispatchEvent(\n new MouseEvent('pointerdown', { button: 2, cancelable: true })\n );\n await elementUpdated(el);\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: 0,\n })\n );\n expect(el.splitterPos, '350 second time, because right click').to.equal(\n splitTotalWidth - el.secondaryMin\n );\n });\n\n it('resizes when pointer moves and resizable is enabled [rtl]', async () => {\n let pointerId = -1;\n const splitTotalWidth = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n secondary-min=\"40\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n dir=\"rtl\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n\n let pos = el.splitterPos || 0;\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n pos = el.getBoundingClientRect().right - 100;\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: pos,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(Math.round(el.splitterPos || 0)).to.equal(\n el.getBoundingClientRect().right - pos\n );\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: 0,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - el.secondaryMin);\n expect(getComputedStyle(splitter).cursor).to.equal('e-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: el.getBoundingClientRect().right,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(el.primaryMin);\n expect(getComputedStyle(splitter).cursor).to.equal('w-resize');\n });\n\n it('resizes to start pos when pointer moves in horizontal splitview', async () => {\n let pointerId = -1;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n secondary-min=\"50\"\n style=\"height: 200px; width: 400px;\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: -10,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-start')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('e-resize');\n });\n\n it('resizes to end pos when pointer moves in horizontal splitview', async () => {\n let pointerId = -1;\n const splitTotalWidth = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n expect(el.primaryMin).to.equal(50);\n expect(el.resizable).to.be.true;\n\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: splitTotalWidth + 10,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - el.splitterSize);\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('w-resize');\n });\n\n it('resizes to start pos when pointer moves in [vertical] splitview', async () => {\n let pointerId = -1;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n resizable\n primary-min=\"0\"\n secondary-min=\"50\"\n style=\"height: 400px; width: 200px;\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: 0,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-start')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('s-resize');\n });\n\n it('resizes to end pos when pointer moves in [vertical] splitview', async () => {\n let pointerId = -1;\n const splitTotalHeight = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n resizable\n primary-min=\"50\"\n style=${`height: ${splitTotalHeight}px; width: 200px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n expect(el.primaryMin).to.equal(50);\n expect(el.resizable).to.be.true;\n\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: splitTotalHeight + 10,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(\n splitTotalHeight - el.splitterSize\n );\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('n-resize');\n });\n\n it('resizes and collapses when pointer moves in horizontal splitview', async () => {\n let pointerId = -1;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n collapsible\n primary-min=\"50\"\n secondary-min=\"50\"\n style=\"height: 200px; width: 400px;\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.collapsible).to.be.true;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: 40,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(50);\n expect(splitter.classList.contains('is-collapsed-start')).to.be.false;\n expect(getComputedStyle(splitter).cursor).to.equal('ew-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: -10,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(0);\n\n expect(splitter.classList.contains('is-collapsed-start')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('e-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: el.getBoundingClientRect().right - 10,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(350);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.false;\n expect(getComputedStyle(splitter).cursor).to.equal('ew-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: el.getBoundingClientRect().right,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(400 - el.splitterSize);\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('w-resize');\n });\n\n it('resizes and collapses when pointer moves in [vertical] splitview', async () => {\n let pointerId = -1;\n const splitTotalHeight = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n resizable\n collapsible\n primary-min=\"50\"\n secondary-min=\"50\"\n style=${`height: ${splitTotalHeight}px; width: 200px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: 40,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(50);\n expect(splitter.classList.contains('is-collapsed-start')).to.be.false;\n expect(getComputedStyle(splitter).cursor).to.equal('ns-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: -10,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(0);\n\n expect(splitter.classList.contains('is-collapsed-start')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('s-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: splitTotalHeight - 40,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(splitTotalHeight - 50);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.false;\n expect(getComputedStyle(splitter).cursor).to.equal('ns-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: splitTotalHeight + 50,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(\n splitTotalHeight - el.splitterSize\n );\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('n-resize');\n });\n\n it('handles focus and keyboard inputs and resizes accordingly for horizontal splitviews [ltr]', async () => {\n const splitTotalWidth = 500;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n secondary-min=\"50\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 10);\n\n splitter.dispatchEvent(arrowRightEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(arrowUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 10);\n\n splitter.dispatchEvent(arrowDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(pageUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 50);\n\n splitter.dispatchEvent(pageDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(homeEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(50);\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(50);\n\n splitter.dispatchEvent(endEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - 50);\n\n splitter.dispatchEvent(arrowRightEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - 50);\n\n splitter.dispatchEvent(shiftTabEvent());\n await elementUpdated(el);\n const outsideFocused = document.activeElement as HTMLElement;\n expect(typeof outsideFocused).not.to.equal(splitter);\n });\n\n it('handles focus and keyboard inputs and resizes accordingly for horizontal splitviews [rtl]', async () => {\n const splitTotalWidth = 500;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n dir=\"rtl\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 10);\n\n splitter.dispatchEvent(arrowRightEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(arrowUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 10);\n\n splitter.dispatchEvent(arrowDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(pageUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 50);\n\n splitter.dispatchEvent(pageDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(homeEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(endEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - el.splitterSize);\n\n splitter.dispatchEvent(shiftTabEvent());\n await elementUpdated(el);\n const outsideFocused = document.activeElement as HTMLElement;\n expect(typeof outsideFocused).not.to.equal(splitter);\n });\n\n it('handles keyboard inputs and resizes accordingly for [vertical] splitviews', async () => {\n const splitTotalHeight = 500;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n resizable\n style=${`width: 200px; height: ${splitTotalHeight}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 10);\n\n splitter.dispatchEvent(arrowRightEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(arrowUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 10);\n\n splitter.dispatchEvent(arrowDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(pageUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 50);\n\n splitter.dispatchEvent(pageDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(homeEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(endEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(\n splitTotalHeight - el.splitterSize\n );\n\n splitter.dispatchEvent(shiftTabEvent());\n await elementUpdated(el);\n const outsideFocused = document.activeElement as HTMLElement;\n expect(typeof outsideFocused).not.to.equal(splitter);\n });\n\n it('handles focus and keyboard inputs and resizes accordingly for collapsible horizontal splitviews', async () => {\n const splitTotalWidth = 500;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n collapsible\n primary-min=\"50\"\n secondary-min=\"50\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(homeEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(endEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - el.splitterSize);\n });\n\n it('does not resize when not resizable', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view>\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.resizable).to.be.false;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot\n ? (el.shadowRoot.querySelector('#splitter') as HTMLDivElement)\n : (el as SplitView);\n splitter.dispatchEvent(new PointerEvent('pointerdown'));\n await elementUpdated(el);\n //Send keyboard events to resize\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n });\n\n it('renders no splitter if only one panel is provided', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view style=\"width: 400px\">\n <div id=\"primary\" style=\"width: 200px\">First panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.false;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(splitter).to.be.null;\n\n const slot = el.shadowRoot.querySelector('slot') as HTMLSlotElement;\n expect(slot).to.exist;\n\n expect(slot.assignedElements().length).to.equal(1);\n\n const elPrim = slot.assignedElements()[0] as HTMLDivElement;\n expect(getComputedStyle(elPrim).width).to.equal('200px');\n });\n\n it('renders only 2 out of 3 panels', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view>\n <div>First panel</div>\n <div>Second panel</div>\n <div id=\"testPanel\">Third (invisible) panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n const testPanel = el.shadowRoot.querySelector(\n '#testPanel'\n ) as HTMLDivElement;\n expect(testPanel).to.be.null;\n });\n\n it('keeps the splitter pos when removing and re-adding a panel', async () => {\n let pointerId = -1;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view resizable style=\"width: 400px\">\n <div id=\"primary\">First panel</div>\n <div id=\"secondary\">Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n let splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n let pos = el.splitterPos || 0;\n expect(pos).to.equal(200);\n\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n pos -= 10;\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: pos,\n })\n );\n await elementUpdated(el);\n expect(Math.round(el.splitterPos || 0)).to.equal(\n pos - el.getBoundingClientRect().left\n );\n\n // Remove second panel\n const secPanel = el.lastElementChild?.cloneNode(true);\n expect(secPanel).not.to.be.null;\n\n el.lastElementChild?.remove();\n await elementUpdated(el);\n let slot = el.shadowRoot.querySelector('slot') as HTMLSlotElement;\n expect(slot).to.exist;\n expect(slot.assignedElements().length).to.equal(1);\n\n splitter = el.shadowRoot.querySelector('#splitter') as HTMLDivElement;\n expect(splitter).to.be.null;\n\n if (secPanel) {\n // Re-add second panel\n el.appendChild(secPanel);\n await elementUpdated(el);\n expect(Math.round(el.splitterPos || 0)).to.equal(\n pos - el.getBoundingClientRect().left\n );\n slot = el.shadowRoot.querySelector('slot') as HTMLSlotElement;\n expect(slot).to.exist;\n\n expect(slot.assignedElements().length).to.equal(2);\n\n splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n await expect(splitter).to.be.accessible();\n }\n });\n\n it('announces when splitterPos moves', async () => {\n const changeSpy = spy();\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n style=${`height: 200px; width: 500px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n el.addEventListener('change', changeSpy);\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 10);\n expect(changeSpy.callCount).to.equal(1);\n });\n\n it('resizes when primarySize changes', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-size=\"100\"\n style=${`height: 200px; width: 500px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(100);\n el.primarySize = '300';\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(300);\n });\n});\n"],
|
5
|
-
"mappings": ";AAYA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AAEP,OAAO;AAEP;AAAA,EACI;AAAA,EACA;AAAA,EACA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ed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n nextFrame,\n} from '@open-wc/testing';\n\nimport '@spectrum-web-components/split-view/sp-split-view.js';\nimport { SplitView } from '@spectrum-web-components/split-view';\nimport {\n arrowDownEvent,\n arrowLeftEvent,\n arrowRightEvent,\n arrowUpEvent,\n endEvent,\n homeEvent,\n pageDownEvent,\n pageUpEvent,\n shiftTabEvent,\n testForLitDevWarnings,\n} from '../../../test/testing-helpers.js';\nimport { spy } from 'sinon';\n\ndescribe('SplitView', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<SplitView>(\n html`\n <sp-split-view primary-size=\"100\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n )\n );\n it('loads default (horizontal) split-view accessibly', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view primary-size=\"100\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n expect(el.splitterPos || 0).to.equal(100);\n expect(el.resizable).to.be.false;\n expect(el.collapsible).to.be.false;\n const gripper = el.shadowRoot.querySelector(\n '#gripper'\n ) as HTMLDivElement;\n expect(gripper).to.be.null;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(getComputedStyle(splitter).cursor).to.equal('auto');\n });\n\n it('loads horizontal [resizable] split-view accessibly', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view resizable primary-size=\"100px\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n expect(el.splitterPos || 0).to.equal(100);\n\n const gripper = el.shadowRoot.querySelector(\n '#gripper'\n ) as HTMLDivElement;\n await expect(gripper).to.be.accessible();\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(getComputedStyle(splitter).cursor).to.equal('ew-resize');\n });\n\n it('loads [vertical] split-view accessibly', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n primary-size=\"75%\"\n style=\"height: 400px\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n expect(el.splitterPos || 0).to.equal(300);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(getComputedStyle(splitter).cursor).to.equal('auto');\n });\n\n it('loads [vertical] [resizable] split-view accessibly', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view vertical resizable style=\"height: 400px\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n await expect(el).to.be.accessible();\n expect(el.splitterPos || 0).to.equal(200);\n\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(getComputedStyle(splitter).cursor).to.equal('ns-resize');\n });\n\n it('set all panel values', async () => {\n const splitTotalWidth = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n primary-max=\"300\"\n secondary-min=\"50\"\n style=${`height: 500px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n expect(el.primaryMin).to.equal(50);\n expect(el.primaryMax).to.equal(300);\n expect(el.secondaryMin).to.equal(50);\n expect(el.secondaryMax).to.equal(3840);\n });\n\n it('use auto height in primary pane', async () => {\n const splitTotalWidth = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-size=\"auto\"\n style=${`height: 500px; width: ${splitTotalWidth}px;`}\n >\n <div>\n First panel Lorem Ipsum is simply dummy text of the\n printing and typesetting industry. Lorem Ipsum has been\n the industry's standard dummy text ever since the 1500s,\n when an unknown printer took a galley of type and\n scrambled it to make a type specimen book. It has\n survived not only five centuries, but also the leap into\n electronic typesetting, remaining essentially unchanged.\n </div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n expect(el.primarySize).to.equal('auto');\n expect(el.splitterPos || 0).to.equal(398);\n });\n\n it('resizes when pointer moves and resizable is enabled [ltr]', async () => {\n let pointerId = -1;\n const splitTotalWidth = 400;\n const el = await fixture<\n SplitView & {\n splitterPos: number;\n }\n >(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n secondary-min=\"50\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n let pos = el.splitterPos;\n expect(el.splitterPos).to.equal(200);\n\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n pos -= 10;\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: pos,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(Math.round(el.splitterPos)).to.equal(\n pos - el.getBoundingClientRect().left\n );\n\n // don't collapse to start\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: 0,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos).to.equal(el.primaryMin);\n expect(getComputedStyle(splitter).cursor).to.equal('e-resize');\n\n // don't collapse to end\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: splitTotalWidth,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos, '350 first time').to.equal(\n splitTotalWidth - el.secondaryMin\n );\n expect(getComputedStyle(splitter).cursor).to.equal('w-resize');\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n // don't change anything when triggering mouseevent with right button click\n splitter.dispatchEvent(\n new MouseEvent('pointerdown', { button: 2, cancelable: true })\n );\n await elementUpdated(el);\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: 0,\n })\n );\n expect(el.splitterPos, '350 second time, because right click').to.equal(\n splitTotalWidth - el.secondaryMin\n );\n });\n\n it('resizes when pointer moves and resizable is enabled [rtl]', async () => {\n let pointerId = -1;\n const splitTotalWidth = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n secondary-min=\"40\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n dir=\"rtl\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n\n let pos = el.splitterPos || 0;\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n pos = el.getBoundingClientRect().right - 100;\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: pos,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(Math.round(el.splitterPos || 0)).to.equal(\n el.getBoundingClientRect().right - pos\n );\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: 0,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - el.secondaryMin);\n expect(getComputedStyle(splitter).cursor).to.equal('e-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: el.getBoundingClientRect().right,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(el.primaryMin);\n expect(getComputedStyle(splitter).cursor).to.equal('w-resize');\n });\n\n it('resizes to start pos when pointer moves in horizontal splitview', async () => {\n let pointerId = -1;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n secondary-min=\"50\"\n style=\"height: 200px; width: 400px;\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: -10,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-start')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('e-resize');\n });\n\n it('resizes to end pos when pointer moves in horizontal splitview', async () => {\n let pointerId = -1;\n const splitTotalWidth = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n expect(el.primaryMin).to.equal(50);\n expect(el.resizable).to.be.true;\n\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: splitTotalWidth + 10,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - el.splitterSize);\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('w-resize');\n });\n\n it('resizes to start pos when pointer moves in [vertical] splitview', async () => {\n let pointerId = -1;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n resizable\n primary-min=\"0\"\n secondary-min=\"50\"\n style=\"height: 400px; width: 200px;\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: 0,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-start')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('s-resize');\n });\n\n it('resizes to end pos when pointer moves in [vertical] splitview', async () => {\n let pointerId = -1;\n const splitTotalHeight = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n resizable\n primary-min=\"50\"\n style=${`height: ${splitTotalHeight}px; width: 200px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n expect(el.primaryMin).to.equal(50);\n expect(el.resizable).to.be.true;\n\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: splitTotalHeight + 10,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(\n splitTotalHeight - el.splitterSize\n );\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('n-resize');\n });\n\n it('resizes and collapses when pointer moves in horizontal splitview', async () => {\n let pointerId = -1;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n collapsible\n primary-min=\"50\"\n secondary-min=\"50\"\n style=\"height: 200px; width: 400px;\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.collapsible).to.be.true;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: 40,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(50);\n expect(splitter.classList.contains('is-collapsed-start')).to.be.false;\n expect(getComputedStyle(splitter).cursor).to.equal('ew-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: -10,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(0);\n\n expect(splitter.classList.contains('is-collapsed-start')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('e-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: el.getBoundingClientRect().right - 10,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(350);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.false;\n expect(getComputedStyle(splitter).cursor).to.equal('ew-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: el.getBoundingClientRect().right,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(400 - el.splitterSize);\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('w-resize');\n });\n\n it('resizes and collapses when pointer moves in [vertical] splitview', async () => {\n let pointerId = -1;\n const splitTotalHeight = 400;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n resizable\n collapsible\n primary-min=\"50\"\n secondary-min=\"50\"\n style=${`height: ${splitTotalHeight}px; width: 200px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: 40,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(50);\n expect(splitter.classList.contains('is-collapsed-start')).to.be.false;\n expect(getComputedStyle(splitter).cursor).to.equal('ns-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: -10,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(0);\n\n expect(splitter.classList.contains('is-collapsed-start')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('s-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: splitTotalHeight - 40,\n })\n );\n await elementUpdated(el);\n await nextFrame();\n expect(el.splitterPos || 0).to.equal(splitTotalHeight - 50);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.false;\n expect(getComputedStyle(splitter).cursor).to.equal('ns-resize');\n\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientY: splitTotalHeight + 50,\n })\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(\n splitTotalHeight - el.splitterSize\n );\n\n splitter.dispatchEvent(new PointerEvent('pointerup'));\n await elementUpdated(el);\n expect(splitter.classList.contains('is-collapsed-end')).to.be.true;\n expect(getComputedStyle(splitter).cursor).to.equal('n-resize');\n });\n\n it('handles focus and keyboard inputs and resizes accordingly for horizontal splitviews [ltr]', async () => {\n const splitTotalWidth = 500;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-min=\"50\"\n secondary-min=\"50\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 10);\n\n splitter.dispatchEvent(arrowRightEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(arrowUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 10);\n\n splitter.dispatchEvent(arrowDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(pageUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 50);\n\n splitter.dispatchEvent(pageDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(homeEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(50);\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(50);\n\n splitter.dispatchEvent(endEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - 50);\n\n splitter.dispatchEvent(arrowRightEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - 50);\n\n splitter.dispatchEvent(shiftTabEvent());\n await elementUpdated(el);\n const outsideFocused = document.activeElement as HTMLElement;\n expect(typeof outsideFocused).not.to.equal(splitter);\n });\n\n it('handles focus and keyboard inputs and resizes accordingly for horizontal splitviews [rtl]', async () => {\n const splitTotalWidth = 500;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n dir=\"rtl\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 10);\n\n splitter.dispatchEvent(arrowRightEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(arrowUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 10);\n\n splitter.dispatchEvent(arrowDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(pageUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos + 50);\n\n splitter.dispatchEvent(pageDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(homeEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(endEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - el.splitterSize);\n\n splitter.dispatchEvent(shiftTabEvent());\n await elementUpdated(el);\n const outsideFocused = document.activeElement as HTMLElement;\n expect(typeof outsideFocused).not.to.equal(splitter);\n });\n\n it('handles keyboard inputs and resizes accordingly for [vertical] splitviews', async () => {\n const splitTotalHeight = 500;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n vertical\n resizable\n style=${`width: 200px; height: ${splitTotalHeight}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 10);\n\n splitter.dispatchEvent(arrowRightEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(arrowUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 10);\n\n splitter.dispatchEvent(arrowDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(pageUpEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 50);\n\n splitter.dispatchEvent(pageDownEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n\n splitter.dispatchEvent(homeEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(endEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(\n splitTotalHeight - el.splitterSize\n );\n\n splitter.dispatchEvent(shiftTabEvent());\n await elementUpdated(el);\n const outsideFocused = document.activeElement as HTMLElement;\n expect(typeof outsideFocused).not.to.equal(splitter);\n });\n\n it('handles focus and keyboard inputs and resizes accordingly for collapsible horizontal splitviews', async () => {\n const splitTotalWidth = 500;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n collapsible\n primary-min=\"50\"\n secondary-min=\"50\"\n style=${`height: 200px; width: ${splitTotalWidth}px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(homeEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(0);\n\n splitter.dispatchEvent(endEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(splitTotalWidth - el.splitterSize);\n });\n\n it('does not resize when not resizable', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view>\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.resizable).to.be.false;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot\n ? (el.shadowRoot.querySelector('#splitter') as HTMLDivElement)\n : (el as SplitView);\n splitter.dispatchEvent(new PointerEvent('pointerdown'));\n await elementUpdated(el);\n //Send keyboard events to resize\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos);\n });\n\n it('renders no splitter if only one panel is provided', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view style=\"width: 400px\">\n <div id=\"primary\" style=\"width: 200px\">First panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.false;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(splitter).to.be.null;\n\n const slot = el.shadowRoot.querySelector('slot') as HTMLSlotElement;\n expect(slot).to.exist;\n\n expect(slot.assignedElements().length).to.equal(1);\n\n const elPrim = slot.assignedElements()[0] as HTMLDivElement;\n expect(getComputedStyle(elPrim).width).to.equal('200px');\n });\n\n it('renders only 2 out of 3 panels', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view>\n <div>First panel</div>\n <div>Second panel</div>\n <div id=\"testPanel\">Third (invisible) panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n const testPanel = el.shadowRoot.querySelector(\n '#testPanel'\n ) as HTMLDivElement;\n expect(testPanel).to.be.null;\n });\n\n it('allows a custom label when resizable if specified', async () => {\n const customLabel = 'Resizable Split View Custom Label';\n const defaultLabel = 'Resize the panels';\n let el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n label=${customLabel}\n primary-min=\"50\"\n secondary-min=\"50\"\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n expect(el.label).to.equal(customLabel);\n let splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n expect(splitter.ariaLabel).to.equal(customLabel);\n\n // If custom label not provided, should fall back to default label\n el = await fixture<SplitView>(\n html`\n <sp-split-view resizable primary-min=\"50\" secondary-min=\"50\">\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n splitter = el.shadowRoot.querySelector('#splitter') as HTMLDivElement;\n expect(splitter.ariaLabel).to.equal(defaultLabel);\n });\n\n it('keeps the splitter pos when removing and re-adding a panel', async () => {\n let pointerId = -1;\n const el = await fixture<SplitView>(\n html`\n <sp-split-view resizable style=\"width: 400px\">\n <div id=\"primary\">First panel</div>\n <div id=\"secondary\">Second panel</div>\n </sp-split-view>\n `\n );\n\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n let splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n splitter.setPointerCapture = (id: number) => (pointerId = id);\n splitter.releasePointerCapture = (id: number) => (pointerId = id);\n let pos = el.splitterPos || 0;\n expect(pos).to.equal(200);\n\n splitter.dispatchEvent(\n new PointerEvent('pointerdown', { pointerId: 1 })\n );\n await elementUpdated(el);\n expect(pointerId).to.equal(1);\n\n pos -= 10;\n splitter.dispatchEvent(\n new PointerEvent('pointermove', {\n clientX: pos,\n })\n );\n await elementUpdated(el);\n expect(Math.round(el.splitterPos || 0)).to.equal(\n pos - el.getBoundingClientRect().left\n );\n\n // Remove second panel\n const secPanel = el.lastElementChild?.cloneNode(true);\n expect(secPanel).not.to.be.null;\n\n el.lastElementChild?.remove();\n await elementUpdated(el);\n let slot = el.shadowRoot.querySelector('slot') as HTMLSlotElement;\n expect(slot).to.exist;\n expect(slot.assignedElements().length).to.equal(1);\n\n splitter = el.shadowRoot.querySelector('#splitter') as HTMLDivElement;\n expect(splitter).to.be.null;\n\n if (secPanel) {\n // Re-add second panel\n el.appendChild(secPanel);\n await elementUpdated(el);\n expect(Math.round(el.splitterPos || 0)).to.equal(\n pos - el.getBoundingClientRect().left\n );\n slot = el.shadowRoot.querySelector('slot') as HTMLSlotElement;\n expect(slot).to.exist;\n\n expect(slot.assignedElements().length).to.equal(2);\n\n splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n await expect(splitter).to.be.accessible();\n }\n });\n\n it('announces when splitterPos moves', async () => {\n const changeSpy = spy();\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n style=${`height: 200px; width: 500px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n el.addEventListener('change', changeSpy);\n await elementUpdated(el);\n expect(el.resizable).to.be.true;\n\n const pos = el.splitterPos || 0;\n const splitter = el.shadowRoot.querySelector(\n '#splitter'\n ) as HTMLDivElement;\n\n splitter.dispatchEvent(arrowLeftEvent());\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(pos - 10);\n expect(changeSpy.callCount).to.equal(1);\n });\n\n it('resizes when primarySize changes', async () => {\n const el = await fixture<SplitView>(\n html`\n <sp-split-view\n resizable\n primary-size=\"100\"\n style=${`height: 200px; width: 500px;`}\n >\n <div>First panel</div>\n <div>Second panel</div>\n </sp-split-view>\n `\n );\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(100);\n el.primarySize = '300';\n await elementUpdated(el);\n expect(el.splitterPos || 0).to.equal(300);\n });\n});\n"],
|
5
|
+
"mappings": ";AAYA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AAEP,OAAO;AAEP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,SAAS,WAAW;AAEpB,SAAS,aAAa,MAAM;AACxB;AAAA,IACI,YACI,MAAM;AAAA,MACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMJ;AAAA,EACR;AACA,KAAG,oDAAoD,YAAY;AAC/D,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMJ;AAEA,UAAM,eAAe,EAAE;AACvB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAClC,WAAO,GAAG,eAAe,CAAC,EAAE,GAAG,MAAM,GAAG;AACxC,WAAO,GAAG,SAAS,EAAE,GAAG,GAAG;AAC3B,WAAO,GAAG,WAAW,EAAE,GAAG,GAAG;AAC7B,UAAM,UAAU,GAAG,WAAW;AAAA,MAC1B;AAAA,IACJ;AACA,WAAO,OAAO,EAAE,GAAG,GAAG;AACtB,UAAM,WAAW,GAAG,WAAW;AAAA,MAC3B;AAAA,IACJ;AACA,WAAO,iBAAiB,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM;AAAA,EAC7D,CAAC;AAED,KAAG,s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