1 line
38 KiB
Plaintext
1 line
38 KiB
Plaintext
|
{"version":3,"file":"primeng-splitter.mjs","sources":["../../src/app/components/splitter/splitter.ts","../../src/app/components/splitter/primeng-splitter.ts"],"sourcesContent":["import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, ElementRef, EventEmitter, Inject, Input, NgModule, Output, PLATFORM_ID, QueryList, Renderer2, ViewChild, ViewEncapsulation, numberAttribute } from '@angular/core';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { Nullable, VoidListener } from 'primeng/ts-helpers';\nimport { SplitterResizeEndEvent, SplitterResizeStartEvent } from './splitter.interface';\n/**\n * Splitter is utilized to separate and resize panels.\n * @group Components\n */\n@Component({\n selector: 'p-splitter',\n template: `\n <div #container [ngClass]=\"containerClass()\" [class]=\"styleClass\" [ngStyle]=\"style\" [attr.data-pc-name]=\"'splitter'\" [attr.data-p-gutter-resizing]=\"false\" [attr.data-pc-section]=\"'root'\">\n <ng-template ngFor let-panel [ngForOf]=\"panels\" let-i=\"index\">\n <div [ngClass]=\"panelContainerClass()\" [class]=\"panelStyleClass\" [ngStyle]=\"panelStyle\" tabindex=\"-1\" [attr.data-pc-name]=\"'splitter'\" [attr.data-pc-section]=\"'root'\">\n <ng-container *ngTemplateOutlet=\"panel\"></ng-container>\n </div>\n <div\n *ngIf=\"i !== panels.length - 1\"\n class=\"p-splitter-gutter\"\n role=\"separator\"\n tabindex=\"-1\"\n (mousedown)=\"onGutterMouseDown($event, i)\"\n (touchstart)=\"onGutterTouchStart($event, i)\"\n (touchmove)=\"onGutterTouchMove($event)\"\n (touchend)=\"onGutterTouchEnd($event, i)\"\n [attr.data-p-gutter-resizing]=\"false\"\n [attr.data-pc-section]=\"'gutter'\"\n >\n <div\n class=\"p-splitter-gutter-handle\"\n tabindex=\"0\"\n [ngStyle]=\"gutterStyle()\"\n [attr.aria-orientation]=\"layout\"\n [attr.aria-valuenow]=\"prevSize\"\n [attr.data-pc-section]=\"'gutterhandle'\"\n (keyup)=\"onGutterKeyUp($event)\"\n (keydown)=\"onGutterKeyDown($event, i)\"\n ></div>\n </div>\n </ng-template>\n </div>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./splitter.css'],\n host: {\n class: 'p-element',\n '[class.p-splitter-panel-nested]': 'nested'\n }\n})\nexport class Splitter {\n /**\n * Style class of the component.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Style class of the panel.\n * @group Props\n */\n @Input() panelStyleClass: string | undefined;\n /**\n * Inline style of the component.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Inline style of the panel.\n * @group Props\n */\n @Input() panelStyle: { [klass: string]: any } | null | undefined;\n /**\n * Defines where a stateful splitter keeps its state, valid values are 'session' for sessionStorage and 'local' for localStorage.\n * @group Props\n */\n @Input() stateStorage: string | undefined = 'session';\n /**\n * Storage identifier of a stateful Splitter.\n * @group Props\n */\n @Input() stateKey: string | undefined | null = null;\n /**\n * Orientation of the panels. Valid values are 'horizontal' and 'vertical'.\n * @group Props\n */\n @Input() layout: string | undefined = 'horizontal';\n /**\n * Size of the divider in pixels
|