primevue 4.2.2 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/index.mjs +2 -1
- package/autocomplete/index.mjs.map +1 -1
- package/chip/Chip.vue +1 -1
- package/chip/index.mjs +0 -1
- package/chip/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +1 -1
- package/colorpicker/index.mjs +1 -0
- package/colorpicker/index.mjs.map +1 -1
- package/datatable/BodyCell.vue +2 -11
- package/datatable/DataTable.vue +3 -24
- package/datatable/FooterCell.vue +3 -12
- package/datatable/HeaderCell.vue +2 -11
- package/datatable/index.mjs +49 -98
- package/datatable/index.mjs.map +1 -1
- package/datatable/style/index.mjs +1 -1
- package/datatable/style/index.mjs.map +1 -1
- package/datepicker/DatePicker.vue +1 -1
- package/datepicker/index.mjs +1 -1
- package/datepicker/index.mjs.map +1 -1
- package/datepicker/style/index.mjs +1 -1
- package/datepicker/style/index.mjs.map +1 -1
- package/drawer/style/index.mjs +1 -1
- package/drawer/style/index.mjs.map +1 -1
- package/imagecompare/ImageCompare.vue +3 -33
- package/imagecompare/index.mjs +3 -35
- package/imagecompare/index.mjs.map +1 -1
- package/imagecompare/style/index.mjs +1 -1
- package/imagecompare/style/index.mjs.map +1 -1
- package/inputnumber/InputNumber.vue +11 -2
- package/inputnumber/index.mjs +9 -2
- package/inputnumber/index.mjs.map +1 -1
- package/inputtext/index.d.ts +1 -1
- package/knob/index.d.ts +1 -1
- package/package.json +5 -5
- package/panelmenu/PanelMenu.vue +6 -3
- package/panelmenu/index.mjs +5 -2
- package/panelmenu/index.mjs.map +1 -1
- package/password/index.d.ts +1 -1
- package/scrollpanel/ScrollPanel.vue +4 -35
- package/scrollpanel/index.mjs +27 -57
- package/scrollpanel/index.mjs.map +1 -1
- package/scrollpanel/style/index.mjs +1 -1
- package/scrollpanel/style/index.mjs.map +1 -1
- package/select/Select.vue +1 -1
- package/select/index.mjs +1 -1
- package/select/index.mjs.map +1 -1
- package/slider/Slider.vue +7 -33
- package/slider/index.mjs +11 -47
- package/slider/index.mjs.map +1 -1
- package/splitter/Splitter.vue +3 -24
- package/splitter/index.mjs +21 -43
- package/splitter/index.mjs.map +1 -1
- package/step/Step.vue +2 -2
- package/step/index.mjs +2 -2
- package/step/index.mjs.map +1 -1
- package/tablist/TabList.vue +11 -43
- package/tablist/index.mjs +11 -42
- package/tablist/index.mjs.map +1 -1
- package/tabs/index.d.ts +3 -3
- package/textarea/index.d.ts +2 -3
- package/togglebutton/ToggleButton.vue +1 -1
- package/togglebutton/index.mjs +1 -1
- package/togglebutton/index.mjs.map +1 -1
- package/toggleswitch/style/index.mjs +1 -1
- package/toggleswitch/style/index.mjs.map +1 -1
- package/tree/Tree.vue +1 -1
- package/tree/index.mjs +29 -23
- package/tree/index.mjs.map +1 -1
- package/tree/style/index.mjs +1 -1
- package/tree/style/index.mjs.map +1 -1
- package/treetable/BodyCell.vue +3 -11
- package/treetable/FooterCell.vue +3 -12
- package/treetable/HeaderCell.vue +3 -12
- package/treetable/TreeTable.vue +3 -26
- package/treetable/index.mjs +26 -76
- package/treetable/index.mjs.map +1 -1
- package/treetable/style/index.mjs +1 -1
- package/treetable/style/index.mjs.map +1 -1
- package/umd/primevue.min.js +1 -1
- package/virtualscroller/VirtualScroller.vue +1 -1
- package/virtualscroller/index.mjs +1 -1
- package/virtualscroller/index.mjs.map +1 -1
- package/web-types.json +1 -1
package/splitter/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getWidth, getHeight, getOuterWidth, getOuterHeight } from '@primeuix/utils/dom';
|
|
1
|
+
import { getWidth, getHeight, getOuterWidth, getOuterHeight, isRTL } from '@primeuix/utils/dom';
|
|
2
2
|
import { isArray } from '@primeuix/utils/object';
|
|
3
3
|
import { getVNodeProp } from '@primevue/core/utils';
|
|
4
4
|
import BaseComponent from '@primevue/core/basecomponent';
|
|
@@ -65,46 +65,24 @@ var script = {
|
|
|
65
65
|
panelSizes: null,
|
|
66
66
|
prevPanelIndex: null,
|
|
67
67
|
timer: null,
|
|
68
|
-
mutationObserver: null,
|
|
69
68
|
data: function data() {
|
|
70
69
|
return {
|
|
71
|
-
prevSize: null
|
|
72
|
-
isRTL: false
|
|
70
|
+
prevSize: null
|
|
73
71
|
};
|
|
74
72
|
},
|
|
75
73
|
mounted: function mounted() {
|
|
76
74
|
this.initializePanels();
|
|
77
|
-
this.updateDirection();
|
|
78
|
-
this.observeDirectionChanges();
|
|
79
75
|
},
|
|
80
76
|
beforeUnmount: function beforeUnmount() {
|
|
81
77
|
this.clear();
|
|
82
78
|
this.unbindMouseListeners();
|
|
83
|
-
if (this.mutationObserver) {
|
|
84
|
-
this.mutationObserver.disconnect();
|
|
85
|
-
}
|
|
86
79
|
},
|
|
87
80
|
methods: {
|
|
88
|
-
updateDirection: function updateDirection() {
|
|
89
|
-
this.isRTL = !!this.$el.closest('[dir="rtl"]');
|
|
90
|
-
},
|
|
91
|
-
observeDirectionChanges: function observeDirectionChanges() {
|
|
92
|
-
var _this = this;
|
|
93
|
-
var targetNode = document.documentElement;
|
|
94
|
-
var config = {
|
|
95
|
-
attributes: true,
|
|
96
|
-
attributeFilter: ['dir']
|
|
97
|
-
};
|
|
98
|
-
this.mutationObserver = new MutationObserver(function () {
|
|
99
|
-
_this.updateDirection();
|
|
100
|
-
});
|
|
101
|
-
this.mutationObserver.observe(targetNode, config);
|
|
102
|
-
},
|
|
103
81
|
isSplitterPanel: function isSplitterPanel(child) {
|
|
104
82
|
return child.type.name === 'SplitterPanel';
|
|
105
83
|
},
|
|
106
84
|
initializePanels: function initializePanels() {
|
|
107
|
-
var
|
|
85
|
+
var _this = this;
|
|
108
86
|
if (this.panels && this.panels.length) {
|
|
109
87
|
var initialized = false;
|
|
110
88
|
if (this.isStateful()) {
|
|
@@ -117,9 +95,9 @@ var script = {
|
|
|
117
95
|
var _panelSizes = [];
|
|
118
96
|
this.panels.map(function (panel, i) {
|
|
119
97
|
var panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;
|
|
120
|
-
var panelSize = panelInitialSize || 100 /
|
|
98
|
+
var panelSize = panelInitialSize || 100 / _this.panels.length;
|
|
121
99
|
_panelSizes[i] = panelSize;
|
|
122
|
-
children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (
|
|
100
|
+
children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (_this.panels.length - 1) * _this.gutterSize + 'px)';
|
|
123
101
|
});
|
|
124
102
|
this.panelSizes = _panelSizes;
|
|
125
103
|
this.prevSize = parseFloat(_panelSizes[0]).toFixed(4);
|
|
@@ -162,7 +140,7 @@ var script = {
|
|
|
162
140
|
}
|
|
163
141
|
} else {
|
|
164
142
|
if (this.horizontal) {
|
|
165
|
-
if (this
|
|
143
|
+
if (isRTL(this.$el)) {
|
|
166
144
|
newPos = (this.startPos - event.pageX) * 100 / this.size;
|
|
167
145
|
} else {
|
|
168
146
|
newPos = (event.pageX - this.startPos) * 100 / this.size;
|
|
@@ -204,10 +182,10 @@ var script = {
|
|
|
204
182
|
this.onResize(event, step, true);
|
|
205
183
|
},
|
|
206
184
|
setTimer: function setTimer(event, index, step) {
|
|
207
|
-
var
|
|
185
|
+
var _this2 = this;
|
|
208
186
|
if (!this.timer) {
|
|
209
187
|
this.timer = setInterval(function () {
|
|
210
|
-
|
|
188
|
+
_this2.repeat(event, index, step);
|
|
211
189
|
}, 40);
|
|
212
190
|
}
|
|
213
191
|
},
|
|
@@ -276,33 +254,33 @@ var script = {
|
|
|
276
254
|
event.preventDefault();
|
|
277
255
|
},
|
|
278
256
|
bindMouseListeners: function bindMouseListeners() {
|
|
279
|
-
var
|
|
257
|
+
var _this3 = this;
|
|
280
258
|
if (!this.mouseMoveListener) {
|
|
281
259
|
this.mouseMoveListener = function (event) {
|
|
282
|
-
return
|
|
260
|
+
return _this3.onResize(event);
|
|
283
261
|
};
|
|
284
262
|
document.addEventListener('mousemove', this.mouseMoveListener);
|
|
285
263
|
}
|
|
286
264
|
if (!this.mouseUpListener) {
|
|
287
265
|
this.mouseUpListener = function (event) {
|
|
288
|
-
|
|
289
|
-
|
|
266
|
+
_this3.onResizeEnd(event);
|
|
267
|
+
_this3.unbindMouseListeners();
|
|
290
268
|
};
|
|
291
269
|
document.addEventListener('mouseup', this.mouseUpListener);
|
|
292
270
|
}
|
|
293
271
|
},
|
|
294
272
|
bindTouchListeners: function bindTouchListeners() {
|
|
295
|
-
var
|
|
273
|
+
var _this4 = this;
|
|
296
274
|
if (!this.touchMoveListener) {
|
|
297
275
|
this.touchMoveListener = function (event) {
|
|
298
|
-
return
|
|
276
|
+
return _this4.onResize(event.changedTouches[0]);
|
|
299
277
|
};
|
|
300
278
|
document.addEventListener('touchmove', this.touchMoveListener);
|
|
301
279
|
}
|
|
302
280
|
if (!this.touchEndListener) {
|
|
303
281
|
this.touchEndListener = function (event) {
|
|
304
|
-
|
|
305
|
-
|
|
282
|
+
_this4.resizeEnd(event);
|
|
283
|
+
_this4.unbindTouchListeners();
|
|
306
284
|
};
|
|
307
285
|
document.addEventListener('touchend', this.touchEndListener);
|
|
308
286
|
}
|
|
@@ -370,7 +348,7 @@ var script = {
|
|
|
370
348
|
}
|
|
371
349
|
},
|
|
372
350
|
restoreState: function restoreState() {
|
|
373
|
-
var
|
|
351
|
+
var _this5 = this;
|
|
374
352
|
var storage = this.getStorage();
|
|
375
353
|
var stateString = storage.getItem(this.stateKey);
|
|
376
354
|
if (stateString) {
|
|
@@ -379,7 +357,7 @@ var script = {
|
|
|
379
357
|
return child.getAttribute('data-pc-name') === 'splitterpanel';
|
|
380
358
|
});
|
|
381
359
|
children.forEach(function (child, i) {
|
|
382
|
-
child.style.flexBasis = 'calc(' +
|
|
360
|
+
child.style.flexBasis = 'calc(' + _this5.panelSizes[i] + '% - ' + (_this5.panels.length - 1) * _this5.gutterSize + 'px)';
|
|
383
361
|
});
|
|
384
362
|
return true;
|
|
385
363
|
}
|
|
@@ -391,14 +369,14 @@ var script = {
|
|
|
391
369
|
},
|
|
392
370
|
computed: {
|
|
393
371
|
panels: function panels() {
|
|
394
|
-
var
|
|
372
|
+
var _this6 = this;
|
|
395
373
|
var panels = [];
|
|
396
374
|
this.$slots["default"]().forEach(function (child) {
|
|
397
|
-
if (
|
|
375
|
+
if (_this6.isSplitterPanel(child)) {
|
|
398
376
|
panels.push(child);
|
|
399
377
|
} else if (child.children instanceof Array) {
|
|
400
378
|
child.children.forEach(function (nestedChild) {
|
|
401
|
-
if (
|
|
379
|
+
if (_this6.isSplitterPanel(nestedChild)) {
|
|
402
380
|
panels.push(nestedChild);
|
|
403
381
|
}
|
|
404
382
|
});
|
package/splitter/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/splitter/BaseSplitter.vue","../../src/splitter/Splitter.vue","../../src/splitter/Splitter.vue?vue&type=template&id=acb2cbae&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SplitterStyle from 'primevue/splitter/style';\n\nexport default {\n name: 'BaseSplitter',\n extends: BaseComponent,\n props: {\n layout: {\n type: String,\n default: 'horizontal'\n },\n gutterSize: {\n type: Number,\n default: 4\n },\n stateKey: {\n type: String,\n default: null\n },\n stateStorage: {\n type: String,\n default: 'session'\n },\n step: {\n type: Number,\n default: 5\n }\n },\n style: SplitterStyle,\n provide() {\n return {\n $pcSplitter: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" :style=\"sx('root')\" :data-p-resizing=\"false\" v-bind=\"ptmi('root', getPTOptions)\">\n <template v-for=\"(panel, i) of panels\" :key=\"i\">\n <component :is=\"panel\" tabindex=\"-1\"></component>\n <div\n v-if=\"i !== panels.length - 1\"\n ref=\"gutter\"\n :class=\"cx('gutter')\"\n role=\"separator\"\n tabindex=\"-1\"\n @mousedown=\"onGutterMouseDown($event, i)\"\n @touchstart=\"onGutterTouchStart($event, i)\"\n @touchmove=\"onGutterTouchMove($event, i)\"\n @touchend=\"onGutterTouchEnd($event, i)\"\n :data-p-gutter-resizing=\"false\"\n v-bind=\"ptm('gutter')\"\n >\n <div :class=\"cx('gutterHandle')\" tabindex=\"0\" :style=\"[gutterStyle]\" :aria-orientation=\"layout\" :aria-valuenow=\"prevSize\" @keyup=\"onGutterKeyUp\" @keydown=\"onGutterKeyDown($event, i)\" v-bind=\"ptm('gutterHandle')\"></div>\n </div>\n </template>\n </div>\n</template>\n\n<script>\nimport { getHeight, getOuterHeight, getOuterWidth, getWidth } from '@primeuix/utils/dom';\nimport { isArray } from '@primeuix/utils/object';\nimport { getVNodeProp } from '@primevue/core/utils';\nimport BaseSplitter from './BaseSplitter.vue';\n\nexport default {\n name: 'Splitter',\n extends: BaseSplitter,\n inheritAttrs: false,\n emits: ['resizestart', 'resizeend', 'resize'],\n dragging: false,\n mouseMoveListener: null,\n mouseUpListener: null,\n touchMoveListener: null,\n touchEndListener: null,\n size: null,\n gutterElement: null,\n startPos: null,\n prevPanelElement: null,\n nextPanelElement: null,\n nextPanelSize: null,\n prevPanelSize: null,\n panelSizes: null,\n prevPanelIndex: null,\n timer: null,\n mutationObserver: null,\n data() {\n return {\n prevSize: null,\n isRTL: false\n };\n },\n mounted() {\n this.initializePanels();\n this.updateDirection();\n this.observeDirectionChanges();\n },\n beforeUnmount() {\n this.clear();\n this.unbindMouseListeners();\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n },\n methods: {\n updateDirection() {\n this.isRTL = !!this.$el.closest('[dir=\"rtl\"]');\n },\n observeDirectionChanges() {\n const targetNode = document.documentElement;\n const config = { attributes: true, attributeFilter: ['dir'] };\n\n this.mutationObserver = new MutationObserver(() => {\n this.updateDirection();\n });\n\n this.mutationObserver.observe(targetNode, config);\n },\n isSplitterPanel(child) {\n return child.type.name === 'SplitterPanel';\n },\n initializePanels() {\n if (this.panels && this.panels.length) {\n let initialized = false;\n\n if (this.isStateful()) {\n initialized = this.restoreState();\n }\n\n if (!initialized) {\n let children = [...this.$el.children].filter((child) => child.getAttribute('data-pc-name') === 'splitterpanel');\n let _panelSizes = [];\n\n this.panels.map((panel, i) => {\n let panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;\n let panelSize = panelInitialSize || 100 / this.panels.length;\n\n _panelSizes[i] = panelSize;\n children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n });\n\n this.panelSizes = _panelSizes;\n this.prevSize = parseFloat(_panelSizes[0]).toFixed(4);\n }\n }\n },\n onResizeStart(event, index, isKeyDown) {\n this.gutterElement = event.currentTarget || event.target.parentElement;\n this.size = this.horizontal ? getWidth(this.$el) : getHeight(this.$el);\n\n if (!isKeyDown) {\n this.dragging = true;\n this.startPos = this.layout === 'horizontal' ? event.pageX || event.changedTouches[0].pageX : event.pageY || event.changedTouches[0].pageY;\n }\n\n this.prevPanelElement = this.gutterElement.previousElementSibling;\n this.nextPanelElement = this.gutterElement.nextElementSibling;\n\n if (isKeyDown) {\n this.prevPanelSize = this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true);\n this.nextPanelSize = this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true);\n } else {\n this.prevPanelSize = (100 * (this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true))) / this.size;\n this.nextPanelSize = (100 * (this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true))) / this.size;\n }\n\n this.prevPanelIndex = index;\n this.$emit('resizestart', { originalEvent: event, sizes: this.panelSizes });\n this.$refs.gutter[index].setAttribute('data-p-gutter-resizing', true);\n this.$el.setAttribute('data-p-resizing', true);\n },\n onResize(event, step, isKeyDown) {\n let newPos, newPrevPanelSize, newNextPanelSize;\n\n if (isKeyDown) {\n if (this.horizontal) {\n newPrevPanelSize = (100 * (this.prevPanelSize + step)) / this.size;\n newNextPanelSize = (100 * (this.nextPanelSize - step)) / this.size;\n } else {\n newPrevPanelSize = (100 * (this.prevPanelSize - step)) / this.size;\n newNextPanelSize = (100 * (this.nextPanelSize + step)) / this.size;\n }\n } else {\n if (this.horizontal) {\n if (this.isRTL) {\n newPos = ((this.startPos - event.pageX) * 100) / this.size;\n } else {\n newPos = ((event.pageX - this.startPos) * 100) / this.size;\n }\n } else {\n newPos = ((event.pageY - this.startPos) * 100) / this.size;\n }\n\n newPrevPanelSize = this.prevPanelSize + newPos;\n newNextPanelSize = this.nextPanelSize - newPos;\n }\n\n if (this.validateResize(newPrevPanelSize, newNextPanelSize)) {\n this.prevPanelElement.style.flexBasis = 'calc(' + newPrevPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.nextPanelElement.style.flexBasis = 'calc(' + newNextPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;\n this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;\n this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);\n }\n\n this.$emit('resize', { originalEvent: event, sizes: this.panelSizes });\n },\n onResizeEnd(event) {\n if (this.isStateful()) {\n this.saveState();\n }\n\n this.$emit('resizeend', { originalEvent: event, sizes: this.panelSizes });\n this.$refs.gutter.forEach((gutter) => gutter.setAttribute('data-p-gutter-resizing', false));\n this.$el.setAttribute('data-p-resizing', false);\n this.clear();\n },\n repeat(event, index, step) {\n this.onResizeStart(event, index, true);\n this.onResize(event, step, true);\n },\n setTimer(event, index, step) {\n if (!this.timer) {\n this.timer = setInterval(() => {\n this.repeat(event, index, step);\n }, 40);\n }\n },\n clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n },\n onGutterKeyUp() {\n this.clearTimer();\n this.onResizeEnd();\n },\n onGutterKeyDown(event, index) {\n switch (event.code) {\n case 'ArrowLeft': {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step * -1);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowRight': {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowDown': {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step * -1);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowUp': {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step);\n }\n\n event.preventDefault();\n break;\n }\n\n default:\n //no op\n break;\n }\n },\n onGutterMouseDown(event, index) {\n this.onResizeStart(event, index);\n this.bindMouseListeners();\n },\n onGutterTouchStart(event, index) {\n this.onResizeStart(event, index);\n this.bindTouchListeners();\n event.preventDefault();\n },\n onGutterTouchMove(event) {\n this.onResize(event);\n event.preventDefault();\n },\n onGutterTouchEnd(event) {\n this.onResizeEnd(event);\n this.unbindTouchListeners();\n event.preventDefault();\n },\n bindMouseListeners() {\n if (!this.mouseMoveListener) {\n this.mouseMoveListener = (event) => this.onResize(event);\n document.addEventListener('mousemove', this.mouseMoveListener);\n }\n\n if (!this.mouseUpListener) {\n this.mouseUpListener = (event) => {\n this.onResizeEnd(event);\n this.unbindMouseListeners();\n };\n\n document.addEventListener('mouseup', this.mouseUpListener);\n }\n },\n bindTouchListeners() {\n if (!this.touchMoveListener) {\n this.touchMoveListener = (event) => this.onResize(event.changedTouches[0]);\n document.addEventListener('touchmove', this.touchMoveListener);\n }\n\n if (!this.touchEndListener) {\n this.touchEndListener = (event) => {\n this.resizeEnd(event);\n this.unbindTouchListeners();\n };\n\n document.addEventListener('touchend', this.touchEndListener);\n }\n },\n validateResize(newPrevPanelSize, newNextPanelSize) {\n if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;\n if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;\n\n let prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');\n\n if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {\n return false;\n }\n\n let newPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');\n\n if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {\n return false;\n }\n\n return true;\n },\n unbindMouseListeners() {\n if (this.mouseMoveListener) {\n document.removeEventListener('mousemove', this.mouseMoveListener);\n this.mouseMoveListener = null;\n }\n\n if (this.mouseUpListener) {\n document.removeEventListener('mouseup', this.mouseUpListener);\n this.mouseUpListener = null;\n }\n },\n unbindTouchListeners() {\n if (this.touchMoveListener) {\n document.removeEventListener('touchmove', this.touchMoveListener);\n this.touchMoveListener = null;\n }\n\n if (this.touchEndListener) {\n document.removeEventListener('touchend', this.touchEndListener);\n this.touchEndListener = null;\n }\n },\n clear() {\n this.dragging = false;\n this.size = null;\n this.startPos = null;\n this.prevPanelElement = null;\n this.nextPanelElement = null;\n this.prevPanelSize = null;\n this.nextPanelSize = null;\n this.gutterElement = null;\n this.prevPanelIndex = null;\n },\n isStateful() {\n return this.stateKey != null;\n },\n getStorage() {\n switch (this.stateStorage) {\n case 'local':\n return window.localStorage;\n\n case 'session':\n return window.sessionStorage;\n\n default:\n throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are \"local\" and \"session\".');\n }\n },\n saveState() {\n if (isArray(this.panelSizes)) {\n this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes));\n }\n },\n restoreState() {\n const storage = this.getStorage();\n const stateString = storage.getItem(this.stateKey);\n\n if (stateString) {\n this.panelSizes = JSON.parse(stateString);\n let children = [...this.$el.children].filter((child) => child.getAttribute('data-pc-name') === 'splitterpanel');\n\n children.forEach((child, i) => {\n child.style.flexBasis = 'calc(' + this.panelSizes[i] + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n });\n\n return true;\n }\n\n return false;\n },\n resetState() {\n this.initializePanels();\n }\n },\n computed: {\n panels() {\n const panels = [];\n\n this.$slots.default().forEach((child) => {\n if (this.isSplitterPanel(child)) {\n panels.push(child);\n } else if (child.children instanceof Array) {\n child.children.forEach((nestedChild) => {\n if (this.isSplitterPanel(nestedChild)) {\n panels.push(nestedChild);\n }\n });\n }\n });\n\n return panels;\n },\n gutterStyle() {\n if (this.horizontal) return { width: this.gutterSize + 'px' };\n else return { height: this.gutterSize + 'px' };\n },\n horizontal() {\n return this.layout === 'horizontal';\n },\n getPTOptions() {\n return {\n context: {\n nested: this.$parentInstance?.nestedState\n }\n };\n }\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" :style=\"sx('root')\" :data-p-resizing=\"false\" v-bind=\"ptmi('root', getPTOptions)\">\n <template v-for=\"(panel, i) of panels\" :key=\"i\">\n <component :is=\"panel\" tabindex=\"-1\"></component>\n <div\n v-if=\"i !== panels.length - 1\"\n ref=\"gutter\"\n :class=\"cx('gutter')\"\n role=\"separator\"\n tabindex=\"-1\"\n @mousedown=\"onGutterMouseDown($event, i)\"\n @touchstart=\"onGutterTouchStart($event, i)\"\n @touchmove=\"onGutterTouchMove($event, i)\"\n @touchend=\"onGutterTouchEnd($event, i)\"\n :data-p-gutter-resizing=\"false\"\n v-bind=\"ptm('gutter')\"\n >\n <div :class=\"cx('gutterHandle')\" tabindex=\"0\" :style=\"[gutterStyle]\" :aria-orientation=\"layout\" :aria-valuenow=\"prevSize\" @keyup=\"onGutterKeyUp\" @keydown=\"onGutterKeyDown($event, i)\" v-bind=\"ptm('gutterHandle')\"></div>\n </div>\n </template>\n </div>\n</template>\n\n<script>\nimport { getHeight, getOuterHeight, getOuterWidth, getWidth } from '@primeuix/utils/dom';\nimport { isArray } from '@primeuix/utils/object';\nimport { getVNodeProp } from '@primevue/core/utils';\nimport BaseSplitter from './BaseSplitter.vue';\n\nexport default {\n name: 'Splitter',\n extends: BaseSplitter,\n inheritAttrs: false,\n emits: ['resizestart', 'resizeend', 'resize'],\n dragging: false,\n mouseMoveListener: null,\n mouseUpListener: null,\n touchMoveListener: null,\n touchEndListener: null,\n size: null,\n gutterElement: null,\n startPos: null,\n prevPanelElement: null,\n nextPanelElement: null,\n nextPanelSize: null,\n prevPanelSize: null,\n panelSizes: null,\n prevPanelIndex: null,\n timer: null,\n mutationObserver: null,\n data() {\n return {\n prevSize: null,\n isRTL: false\n };\n },\n mounted() {\n this.initializePanels();\n this.updateDirection();\n this.observeDirectionChanges();\n },\n beforeUnmount() {\n this.clear();\n this.unbindMouseListeners();\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n },\n methods: {\n updateDirection() {\n this.isRTL = !!this.$el.closest('[dir=\"rtl\"]');\n },\n observeDirectionChanges() {\n const targetNode = document.documentElement;\n const config = { attributes: true, attributeFilter: ['dir'] };\n\n this.mutationObserver = new MutationObserver(() => {\n this.updateDirection();\n });\n\n this.mutationObserver.observe(targetNode, config);\n },\n isSplitterPanel(child) {\n return child.type.name === 'SplitterPanel';\n },\n initializePanels() {\n if (this.panels && this.panels.length) {\n let initialized = false;\n\n if (this.isStateful()) {\n initialized = this.restoreState();\n }\n\n if (!initialized) {\n let children = [...this.$el.children].filter((child) => child.getAttribute('data-pc-name') === 'splitterpanel');\n let _panelSizes = [];\n\n this.panels.map((panel, i) => {\n let panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;\n let panelSize = panelInitialSize || 100 / this.panels.length;\n\n _panelSizes[i] = panelSize;\n children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n });\n\n this.panelSizes = _panelSizes;\n this.prevSize = parseFloat(_panelSizes[0]).toFixed(4);\n }\n }\n },\n onResizeStart(event, index, isKeyDown) {\n this.gutterElement = event.currentTarget || event.target.parentElement;\n this.size = this.horizontal ? getWidth(this.$el) : getHeight(this.$el);\n\n if (!isKeyDown) {\n this.dragging = true;\n this.startPos = this.layout === 'horizontal' ? event.pageX || event.changedTouches[0].pageX : event.pageY || event.changedTouches[0].pageY;\n }\n\n this.prevPanelElement = this.gutterElement.previousElementSibling;\n this.nextPanelElement = this.gutterElement.nextElementSibling;\n\n if (isKeyDown) {\n this.prevPanelSize = this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true);\n this.nextPanelSize = this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true);\n } else {\n this.prevPanelSize = (100 * (this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true))) / this.size;\n this.nextPanelSize = (100 * (this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true))) / this.size;\n }\n\n this.prevPanelIndex = index;\n this.$emit('resizestart', { originalEvent: event, sizes: this.panelSizes });\n this.$refs.gutter[index].setAttribute('data-p-gutter-resizing', true);\n this.$el.setAttribute('data-p-resizing', true);\n },\n onResize(event, step, isKeyDown) {\n let newPos, newPrevPanelSize, newNextPanelSize;\n\n if (isKeyDown) {\n if (this.horizontal) {\n newPrevPanelSize = (100 * (this.prevPanelSize + step)) / this.size;\n newNextPanelSize = (100 * (this.nextPanelSize - step)) / this.size;\n } else {\n newPrevPanelSize = (100 * (this.prevPanelSize - step)) / this.size;\n newNextPanelSize = (100 * (this.nextPanelSize + step)) / this.size;\n }\n } else {\n if (this.horizontal) {\n if (this.isRTL) {\n newPos = ((this.startPos - event.pageX) * 100) / this.size;\n } else {\n newPos = ((event.pageX - this.startPos) * 100) / this.size;\n }\n } else {\n newPos = ((event.pageY - this.startPos) * 100) / this.size;\n }\n\n newPrevPanelSize = this.prevPanelSize + newPos;\n newNextPanelSize = this.nextPanelSize - newPos;\n }\n\n if (this.validateResize(newPrevPanelSize, newNextPanelSize)) {\n this.prevPanelElement.style.flexBasis = 'calc(' + newPrevPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.nextPanelElement.style.flexBasis = 'calc(' + newNextPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;\n this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;\n this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);\n }\n\n this.$emit('resize', { originalEvent: event, sizes: this.panelSizes });\n },\n onResizeEnd(event) {\n if (this.isStateful()) {\n this.saveState();\n }\n\n this.$emit('resizeend', { originalEvent: event, sizes: this.panelSizes });\n this.$refs.gutter.forEach((gutter) => gutter.setAttribute('data-p-gutter-resizing', false));\n this.$el.setAttribute('data-p-resizing', false);\n this.clear();\n },\n repeat(event, index, step) {\n this.onResizeStart(event, index, true);\n this.onResize(event, step, true);\n },\n setTimer(event, index, step) {\n if (!this.timer) {\n this.timer = setInterval(() => {\n this.repeat(event, index, step);\n }, 40);\n }\n },\n clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n },\n onGutterKeyUp() {\n this.clearTimer();\n this.onResizeEnd();\n },\n onGutterKeyDown(event, index) {\n switch (event.code) {\n case 'ArrowLeft': {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step * -1);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowRight': {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowDown': {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step * -1);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowUp': {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step);\n }\n\n event.preventDefault();\n break;\n }\n\n default:\n //no op\n break;\n }\n },\n onGutterMouseDown(event, index) {\n this.onResizeStart(event, index);\n this.bindMouseListeners();\n },\n onGutterTouchStart(event, index) {\n this.onResizeStart(event, index);\n this.bindTouchListeners();\n event.preventDefault();\n },\n onGutterTouchMove(event) {\n this.onResize(event);\n event.preventDefault();\n },\n onGutterTouchEnd(event) {\n this.onResizeEnd(event);\n this.unbindTouchListeners();\n event.preventDefault();\n },\n bindMouseListeners() {\n if (!this.mouseMoveListener) {\n this.mouseMoveListener = (event) => this.onResize(event);\n document.addEventListener('mousemove', this.mouseMoveListener);\n }\n\n if (!this.mouseUpListener) {\n this.mouseUpListener = (event) => {\n this.onResizeEnd(event);\n this.unbindMouseListeners();\n };\n\n document.addEventListener('mouseup', this.mouseUpListener);\n }\n },\n bindTouchListeners() {\n if (!this.touchMoveListener) {\n this.touchMoveListener = (event) => this.onResize(event.changedTouches[0]);\n document.addEventListener('touchmove', this.touchMoveListener);\n }\n\n if (!this.touchEndListener) {\n this.touchEndListener = (event) => {\n this.resizeEnd(event);\n this.unbindTouchListeners();\n };\n\n document.addEventListener('touchend', this.touchEndListener);\n }\n },\n validateResize(newPrevPanelSize, newNextPanelSize) {\n if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;\n if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;\n\n let prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');\n\n if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {\n return false;\n }\n\n let newPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');\n\n if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {\n return false;\n }\n\n return true;\n },\n unbindMouseListeners() {\n if (this.mouseMoveListener) {\n document.removeEventListener('mousemove', this.mouseMoveListener);\n this.mouseMoveListener = null;\n }\n\n if (this.mouseUpListener) {\n document.removeEventListener('mouseup', this.mouseUpListener);\n this.mouseUpListener = null;\n }\n },\n unbindTouchListeners() {\n if (this.touchMoveListener) {\n document.removeEventListener('touchmove', this.touchMoveListener);\n this.touchMoveListener = null;\n }\n\n if (this.touchEndListener) {\n document.removeEventListener('touchend', this.touchEndListener);\n this.touchEndListener = null;\n }\n },\n clear() {\n this.dragging = false;\n this.size = null;\n this.startPos = null;\n this.prevPanelElement = null;\n this.nextPanelElement = null;\n this.prevPanelSize = null;\n this.nextPanelSize = null;\n this.gutterElement = null;\n this.prevPanelIndex = null;\n },\n isStateful() {\n return this.stateKey != null;\n },\n getStorage() {\n switch (this.stateStorage) {\n case 'local':\n return window.localStorage;\n\n case 'session':\n return window.sessionStorage;\n\n default:\n throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are \"local\" and \"session\".');\n }\n },\n saveState() {\n if (isArray(this.panelSizes)) {\n this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes));\n }\n },\n restoreState() {\n const storage = this.getStorage();\n const stateString = storage.getItem(this.stateKey);\n\n if (stateString) {\n this.panelSizes = JSON.parse(stateString);\n let children = [...this.$el.children].filter((child) => child.getAttribute('data-pc-name') === 'splitterpanel');\n\n children.forEach((child, i) => {\n child.style.flexBasis = 'calc(' + this.panelSizes[i] + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n });\n\n return true;\n }\n\n return false;\n },\n resetState() {\n this.initializePanels();\n }\n },\n computed: {\n panels() {\n const panels = [];\n\n this.$slots.default().forEach((child) => {\n if (this.isSplitterPanel(child)) {\n panels.push(child);\n } else if (child.children instanceof Array) {\n child.children.forEach((nestedChild) => {\n if (this.isSplitterPanel(nestedChild)) {\n panels.push(nestedChild);\n }\n });\n }\n });\n\n return panels;\n },\n gutterStyle() {\n if (this.horizontal) return { width: this.gutterSize + 'px' };\n else return { height: this.gutterSize + 'px' };\n },\n horizontal() {\n return this.layout === 'horizontal';\n },\n getPTOptions() {\n return {\n context: {\n nested: this.$parentInstance?.nestedState\n }\n };\n }\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","layout","type","String","gutterSize","Number","stateKey","stateStorage","step","style","SplitterStyle","provide","$pcSplitter","$parentInstance","BaseSplitter","inheritAttrs","emits","dragging","mouseMoveListener","mouseUpListener","touchMoveListener","touchEndListener","size","gutterElement","startPos","prevPanelElement","nextPanelElement","nextPanelSize","prevPanelSize","panelSizes","prevPanelIndex","timer","mutationObserver","data","prevSize","isRTL","mounted","initializePanels","updateDirection","observeDirectionChanges","beforeUnmount","clear","unbindMouseListeners","disconnect","methods","$el","closest","_this","targetNode","document","documentElement","config","attributes","attributeFilter","MutationObserver","observe","isSplitterPanel","child","_this2","panels","length","initialized","isStateful","restoreState","children","_toConsumableArray","filter","getAttribute","_panelSizes","map","panel","i","panelInitialSize","panelSize","flexBasis","parseFloat","toFixed","onResizeStart","event","index","isKeyDown","currentTarget","target","parentElement","horizontal","getWidth","getHeight","pageX","changedTouches","pageY","previousElementSibling","nextElementSibling","getOuterWidth","getOuterHeight","$emit","originalEvent","sizes","$refs","gutter","setAttribute","onResize","newPos","newPrevPanelSize","newNextPanelSize","validateResize","onResizeEnd","saveState","forEach","repeat","setTimer","_this3","setInterval","clearTimer","clearInterval","onGutterKeyUp","onGutterKeyDown","code","preventDefault","onGutterMouseDown","bindMouseListeners","onGutterTouchStart","bindTouchListeners","onGutterTouchMove","onGutterTouchEnd","unbindTouchListeners","_this4","addEventListener","_this5","resizeEnd","prevPanelMinSize","getVNodeProp","newPanelMinSize","removeEventListener","getStorage","window","localStorage","sessionStorage","Error","isArray","setItem","JSON","stringify","_this6","storage","stateString","getItem","parse","resetState","computed","_this7","$slots","push","Array","nestedChild","gutterStyle","width","height","getPTOptions","_this$$parentInstance","context","nested","nestedState","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","sx","ptmi","$options","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","tabindex","ref","role","onMousedown","$event","onTouchstart","onTouchmove","onTouchend","ptm","_createElementVNode","$data","onKeyup","apply","arguments","onKeydown","_hoisted_2"],"mappings":";;;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,cAAc;AACpB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,MAAM,EAAE;AACJC,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,UAAU,EAAE;AACRF,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,QAAQ,EAA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;OACjB8F,IAAG,CAAAiB,GAAA,CAAA,QAAA,CAAA,CAAA,EAAA,CAEXC,kBAAA,CAAyN,OAAzNnB,UAAyN,CAAA;AAAnN,MAAA,OAAA,EAAOC,IAAE,CAAAC,EAAA,CAAA,cAAA,CAAA;AAAkBQ,MAAAA,QAAQ,EAAC,GAAI;AAACrK,MAAAA,KAAK,GAAGgK,QAAW,CAAAf,WAAA,CAAA;MAAI,kBAAgB,EAAEW,IAAM,CAAApK,MAAA;MAAG,eAAa,EAAEuL,KAAQ,CAAAtJ,QAAA;MAAGuJ,OAAK;eAAEhB,QAAa,CAAAvD,aAAA,IAAAuD,QAAA,CAAAvD,aAAA,CAAAwE,KAAA,CAAAjB,QAAA,EAAAkB,SAAA,CAAA;AAAA,OAAA,CAAA;AAAGC,MAAAA,SAAO,EAAE,SAATA,SAAOA,CAAEV,MAAA,EAAA;AAAA,QAAA,OAAAT,QAAA,CAAAtD,eAAe,CAAC+D,MAAM,EAAE3G,CAAC,CAAA;OAAA;;OAAW8F,IAAG,CAAAiB,GAAA,CAAA,cAAA,CAAA,CAAA,EAAA,IAAA,EAAA,EAAA,EAAAO,UAAA,CAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/splitter/BaseSplitter.vue","../../src/splitter/Splitter.vue","../../src/splitter/Splitter.vue?vue&type=template&id=7edac2d7&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SplitterStyle from 'primevue/splitter/style';\n\nexport default {\n name: 'BaseSplitter',\n extends: BaseComponent,\n props: {\n layout: {\n type: String,\n default: 'horizontal'\n },\n gutterSize: {\n type: Number,\n default: 4\n },\n stateKey: {\n type: String,\n default: null\n },\n stateStorage: {\n type: String,\n default: 'session'\n },\n step: {\n type: Number,\n default: 5\n }\n },\n style: SplitterStyle,\n provide() {\n return {\n $pcSplitter: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" :style=\"sx('root')\" :data-p-resizing=\"false\" v-bind=\"ptmi('root', getPTOptions)\">\n <template v-for=\"(panel, i) of panels\" :key=\"i\">\n <component :is=\"panel\" tabindex=\"-1\"></component>\n <div\n v-if=\"i !== panels.length - 1\"\n ref=\"gutter\"\n :class=\"cx('gutter')\"\n role=\"separator\"\n tabindex=\"-1\"\n @mousedown=\"onGutterMouseDown($event, i)\"\n @touchstart=\"onGutterTouchStart($event, i)\"\n @touchmove=\"onGutterTouchMove($event, i)\"\n @touchend=\"onGutterTouchEnd($event, i)\"\n :data-p-gutter-resizing=\"false\"\n v-bind=\"ptm('gutter')\"\n >\n <div :class=\"cx('gutterHandle')\" tabindex=\"0\" :style=\"[gutterStyle]\" :aria-orientation=\"layout\" :aria-valuenow=\"prevSize\" @keyup=\"onGutterKeyUp\" @keydown=\"onGutterKeyDown($event, i)\" v-bind=\"ptm('gutterHandle')\"></div>\n </div>\n </template>\n </div>\n</template>\n\n<script>\nimport { getHeight, getOuterHeight, getOuterWidth, getWidth, isRTL } from '@primeuix/utils/dom';\nimport { isArray } from '@primeuix/utils/object';\nimport { getVNodeProp } from '@primevue/core/utils';\nimport BaseSplitter from './BaseSplitter.vue';\n\nexport default {\n name: 'Splitter',\n extends: BaseSplitter,\n inheritAttrs: false,\n emits: ['resizestart', 'resizeend', 'resize'],\n dragging: false,\n mouseMoveListener: null,\n mouseUpListener: null,\n touchMoveListener: null,\n touchEndListener: null,\n size: null,\n gutterElement: null,\n startPos: null,\n prevPanelElement: null,\n nextPanelElement: null,\n nextPanelSize: null,\n prevPanelSize: null,\n panelSizes: null,\n prevPanelIndex: null,\n timer: null,\n data() {\n return {\n prevSize: null\n };\n },\n mounted() {\n this.initializePanels();\n },\n beforeUnmount() {\n this.clear();\n this.unbindMouseListeners();\n },\n methods: {\n isSplitterPanel(child) {\n return child.type.name === 'SplitterPanel';\n },\n initializePanels() {\n if (this.panels && this.panels.length) {\n let initialized = false;\n\n if (this.isStateful()) {\n initialized = this.restoreState();\n }\n\n if (!initialized) {\n let children = [...this.$el.children].filter((child) => child.getAttribute('data-pc-name') === 'splitterpanel');\n let _panelSizes = [];\n\n this.panels.map((panel, i) => {\n let panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;\n let panelSize = panelInitialSize || 100 / this.panels.length;\n\n _panelSizes[i] = panelSize;\n children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n });\n\n this.panelSizes = _panelSizes;\n this.prevSize = parseFloat(_panelSizes[0]).toFixed(4);\n }\n }\n },\n onResizeStart(event, index, isKeyDown) {\n this.gutterElement = event.currentTarget || event.target.parentElement;\n this.size = this.horizontal ? getWidth(this.$el) : getHeight(this.$el);\n\n if (!isKeyDown) {\n this.dragging = true;\n this.startPos = this.layout === 'horizontal' ? event.pageX || event.changedTouches[0].pageX : event.pageY || event.changedTouches[0].pageY;\n }\n\n this.prevPanelElement = this.gutterElement.previousElementSibling;\n this.nextPanelElement = this.gutterElement.nextElementSibling;\n\n if (isKeyDown) {\n this.prevPanelSize = this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true);\n this.nextPanelSize = this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true);\n } else {\n this.prevPanelSize = (100 * (this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true))) / this.size;\n this.nextPanelSize = (100 * (this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true))) / this.size;\n }\n\n this.prevPanelIndex = index;\n this.$emit('resizestart', { originalEvent: event, sizes: this.panelSizes });\n this.$refs.gutter[index].setAttribute('data-p-gutter-resizing', true);\n this.$el.setAttribute('data-p-resizing', true);\n },\n onResize(event, step, isKeyDown) {\n let newPos, newPrevPanelSize, newNextPanelSize;\n\n if (isKeyDown) {\n if (this.horizontal) {\n newPrevPanelSize = (100 * (this.prevPanelSize + step)) / this.size;\n newNextPanelSize = (100 * (this.nextPanelSize - step)) / this.size;\n } else {\n newPrevPanelSize = (100 * (this.prevPanelSize - step)) / this.size;\n newNextPanelSize = (100 * (this.nextPanelSize + step)) / this.size;\n }\n } else {\n if (this.horizontal) {\n if (isRTL(this.$el)) {\n newPos = ((this.startPos - event.pageX) * 100) / this.size;\n } else {\n newPos = ((event.pageX - this.startPos) * 100) / this.size;\n }\n } else {\n newPos = ((event.pageY - this.startPos) * 100) / this.size;\n }\n\n newPrevPanelSize = this.prevPanelSize + newPos;\n newNextPanelSize = this.nextPanelSize - newPos;\n }\n\n if (this.validateResize(newPrevPanelSize, newNextPanelSize)) {\n this.prevPanelElement.style.flexBasis = 'calc(' + newPrevPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.nextPanelElement.style.flexBasis = 'calc(' + newNextPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;\n this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;\n this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);\n }\n\n this.$emit('resize', { originalEvent: event, sizes: this.panelSizes });\n },\n onResizeEnd(event) {\n if (this.isStateful()) {\n this.saveState();\n }\n\n this.$emit('resizeend', { originalEvent: event, sizes: this.panelSizes });\n this.$refs.gutter.forEach((gutter) => gutter.setAttribute('data-p-gutter-resizing', false));\n this.$el.setAttribute('data-p-resizing', false);\n this.clear();\n },\n repeat(event, index, step) {\n this.onResizeStart(event, index, true);\n this.onResize(event, step, true);\n },\n setTimer(event, index, step) {\n if (!this.timer) {\n this.timer = setInterval(() => {\n this.repeat(event, index, step);\n }, 40);\n }\n },\n clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n },\n onGutterKeyUp() {\n this.clearTimer();\n this.onResizeEnd();\n },\n onGutterKeyDown(event, index) {\n switch (event.code) {\n case 'ArrowLeft': {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step * -1);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowRight': {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowDown': {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step * -1);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowUp': {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step);\n }\n\n event.preventDefault();\n break;\n }\n\n default:\n //no op\n break;\n }\n },\n onGutterMouseDown(event, index) {\n this.onResizeStart(event, index);\n this.bindMouseListeners();\n },\n onGutterTouchStart(event, index) {\n this.onResizeStart(event, index);\n this.bindTouchListeners();\n event.preventDefault();\n },\n onGutterTouchMove(event) {\n this.onResize(event);\n event.preventDefault();\n },\n onGutterTouchEnd(event) {\n this.onResizeEnd(event);\n this.unbindTouchListeners();\n event.preventDefault();\n },\n bindMouseListeners() {\n if (!this.mouseMoveListener) {\n this.mouseMoveListener = (event) => this.onResize(event);\n document.addEventListener('mousemove', this.mouseMoveListener);\n }\n\n if (!this.mouseUpListener) {\n this.mouseUpListener = (event) => {\n this.onResizeEnd(event);\n this.unbindMouseListeners();\n };\n\n document.addEventListener('mouseup', this.mouseUpListener);\n }\n },\n bindTouchListeners() {\n if (!this.touchMoveListener) {\n this.touchMoveListener = (event) => this.onResize(event.changedTouches[0]);\n document.addEventListener('touchmove', this.touchMoveListener);\n }\n\n if (!this.touchEndListener) {\n this.touchEndListener = (event) => {\n this.resizeEnd(event);\n this.unbindTouchListeners();\n };\n\n document.addEventListener('touchend', this.touchEndListener);\n }\n },\n validateResize(newPrevPanelSize, newNextPanelSize) {\n if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;\n if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;\n\n let prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');\n\n if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {\n return false;\n }\n\n let newPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');\n\n if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {\n return false;\n }\n\n return true;\n },\n unbindMouseListeners() {\n if (this.mouseMoveListener) {\n document.removeEventListener('mousemove', this.mouseMoveListener);\n this.mouseMoveListener = null;\n }\n\n if (this.mouseUpListener) {\n document.removeEventListener('mouseup', this.mouseUpListener);\n this.mouseUpListener = null;\n }\n },\n unbindTouchListeners() {\n if (this.touchMoveListener) {\n document.removeEventListener('touchmove', this.touchMoveListener);\n this.touchMoveListener = null;\n }\n\n if (this.touchEndListener) {\n document.removeEventListener('touchend', this.touchEndListener);\n this.touchEndListener = null;\n }\n },\n clear() {\n this.dragging = false;\n this.size = null;\n this.startPos = null;\n this.prevPanelElement = null;\n this.nextPanelElement = null;\n this.prevPanelSize = null;\n this.nextPanelSize = null;\n this.gutterElement = null;\n this.prevPanelIndex = null;\n },\n isStateful() {\n return this.stateKey != null;\n },\n getStorage() {\n switch (this.stateStorage) {\n case 'local':\n return window.localStorage;\n\n case 'session':\n return window.sessionStorage;\n\n default:\n throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are \"local\" and \"session\".');\n }\n },\n saveState() {\n if (isArray(this.panelSizes)) {\n this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes));\n }\n },\n restoreState() {\n const storage = this.getStorage();\n const stateString = storage.getItem(this.stateKey);\n\n if (stateString) {\n this.panelSizes = JSON.parse(stateString);\n let children = [...this.$el.children].filter((child) => child.getAttribute('data-pc-name') === 'splitterpanel');\n\n children.forEach((child, i) => {\n child.style.flexBasis = 'calc(' + this.panelSizes[i] + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n });\n\n return true;\n }\n\n return false;\n },\n resetState() {\n this.initializePanels();\n }\n },\n computed: {\n panels() {\n const panels = [];\n\n this.$slots.default().forEach((child) => {\n if (this.isSplitterPanel(child)) {\n panels.push(child);\n } else if (child.children instanceof Array) {\n child.children.forEach((nestedChild) => {\n if (this.isSplitterPanel(nestedChild)) {\n panels.push(nestedChild);\n }\n });\n }\n });\n\n return panels;\n },\n gutterStyle() {\n if (this.horizontal) return { width: this.gutterSize + 'px' };\n else return { height: this.gutterSize + 'px' };\n },\n horizontal() {\n return this.layout === 'horizontal';\n },\n getPTOptions() {\n return {\n context: {\n nested: this.$parentInstance?.nestedState\n }\n };\n }\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" :style=\"sx('root')\" :data-p-resizing=\"false\" v-bind=\"ptmi('root', getPTOptions)\">\n <template v-for=\"(panel, i) of panels\" :key=\"i\">\n <component :is=\"panel\" tabindex=\"-1\"></component>\n <div\n v-if=\"i !== panels.length - 1\"\n ref=\"gutter\"\n :class=\"cx('gutter')\"\n role=\"separator\"\n tabindex=\"-1\"\n @mousedown=\"onGutterMouseDown($event, i)\"\n @touchstart=\"onGutterTouchStart($event, i)\"\n @touchmove=\"onGutterTouchMove($event, i)\"\n @touchend=\"onGutterTouchEnd($event, i)\"\n :data-p-gutter-resizing=\"false\"\n v-bind=\"ptm('gutter')\"\n >\n <div :class=\"cx('gutterHandle')\" tabindex=\"0\" :style=\"[gutterStyle]\" :aria-orientation=\"layout\" :aria-valuenow=\"prevSize\" @keyup=\"onGutterKeyUp\" @keydown=\"onGutterKeyDown($event, i)\" v-bind=\"ptm('gutterHandle')\"></div>\n </div>\n </template>\n </div>\n</template>\n\n<script>\nimport { getHeight, getOuterHeight, getOuterWidth, getWidth, isRTL } from '@primeuix/utils/dom';\nimport { isArray } from '@primeuix/utils/object';\nimport { getVNodeProp } from '@primevue/core/utils';\nimport BaseSplitter from './BaseSplitter.vue';\n\nexport default {\n name: 'Splitter',\n extends: BaseSplitter,\n inheritAttrs: false,\n emits: ['resizestart', 'resizeend', 'resize'],\n dragging: false,\n mouseMoveListener: null,\n mouseUpListener: null,\n touchMoveListener: null,\n touchEndListener: null,\n size: null,\n gutterElement: null,\n startPos: null,\n prevPanelElement: null,\n nextPanelElement: null,\n nextPanelSize: null,\n prevPanelSize: null,\n panelSizes: null,\n prevPanelIndex: null,\n timer: null,\n data() {\n return {\n prevSize: null\n };\n },\n mounted() {\n this.initializePanels();\n },\n beforeUnmount() {\n this.clear();\n this.unbindMouseListeners();\n },\n methods: {\n isSplitterPanel(child) {\n return child.type.name === 'SplitterPanel';\n },\n initializePanels() {\n if (this.panels && this.panels.length) {\n let initialized = false;\n\n if (this.isStateful()) {\n initialized = this.restoreState();\n }\n\n if (!initialized) {\n let children = [...this.$el.children].filter((child) => child.getAttribute('data-pc-name') === 'splitterpanel');\n let _panelSizes = [];\n\n this.panels.map((panel, i) => {\n let panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;\n let panelSize = panelInitialSize || 100 / this.panels.length;\n\n _panelSizes[i] = panelSize;\n children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n });\n\n this.panelSizes = _panelSizes;\n this.prevSize = parseFloat(_panelSizes[0]).toFixed(4);\n }\n }\n },\n onResizeStart(event, index, isKeyDown) {\n this.gutterElement = event.currentTarget || event.target.parentElement;\n this.size = this.horizontal ? getWidth(this.$el) : getHeight(this.$el);\n\n if (!isKeyDown) {\n this.dragging = true;\n this.startPos = this.layout === 'horizontal' ? event.pageX || event.changedTouches[0].pageX : event.pageY || event.changedTouches[0].pageY;\n }\n\n this.prevPanelElement = this.gutterElement.previousElementSibling;\n this.nextPanelElement = this.gutterElement.nextElementSibling;\n\n if (isKeyDown) {\n this.prevPanelSize = this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true);\n this.nextPanelSize = this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true);\n } else {\n this.prevPanelSize = (100 * (this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true))) / this.size;\n this.nextPanelSize = (100 * (this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true))) / this.size;\n }\n\n this.prevPanelIndex = index;\n this.$emit('resizestart', { originalEvent: event, sizes: this.panelSizes });\n this.$refs.gutter[index].setAttribute('data-p-gutter-resizing', true);\n this.$el.setAttribute('data-p-resizing', true);\n },\n onResize(event, step, isKeyDown) {\n let newPos, newPrevPanelSize, newNextPanelSize;\n\n if (isKeyDown) {\n if (this.horizontal) {\n newPrevPanelSize = (100 * (this.prevPanelSize + step)) / this.size;\n newNextPanelSize = (100 * (this.nextPanelSize - step)) / this.size;\n } else {\n newPrevPanelSize = (100 * (this.prevPanelSize - step)) / this.size;\n newNextPanelSize = (100 * (this.nextPanelSize + step)) / this.size;\n }\n } else {\n if (this.horizontal) {\n if (isRTL(this.$el)) {\n newPos = ((this.startPos - event.pageX) * 100) / this.size;\n } else {\n newPos = ((event.pageX - this.startPos) * 100) / this.size;\n }\n } else {\n newPos = ((event.pageY - this.startPos) * 100) / this.size;\n }\n\n newPrevPanelSize = this.prevPanelSize + newPos;\n newNextPanelSize = this.nextPanelSize - newPos;\n }\n\n if (this.validateResize(newPrevPanelSize, newNextPanelSize)) {\n this.prevPanelElement.style.flexBasis = 'calc(' + newPrevPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.nextPanelElement.style.flexBasis = 'calc(' + newNextPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;\n this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;\n this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);\n }\n\n this.$emit('resize', { originalEvent: event, sizes: this.panelSizes });\n },\n onResizeEnd(event) {\n if (this.isStateful()) {\n this.saveState();\n }\n\n this.$emit('resizeend', { originalEvent: event, sizes: this.panelSizes });\n this.$refs.gutter.forEach((gutter) => gutter.setAttribute('data-p-gutter-resizing', false));\n this.$el.setAttribute('data-p-resizing', false);\n this.clear();\n },\n repeat(event, index, step) {\n this.onResizeStart(event, index, true);\n this.onResize(event, step, true);\n },\n setTimer(event, index, step) {\n if (!this.timer) {\n this.timer = setInterval(() => {\n this.repeat(event, index, step);\n }, 40);\n }\n },\n clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n },\n onGutterKeyUp() {\n this.clearTimer();\n this.onResizeEnd();\n },\n onGutterKeyDown(event, index) {\n switch (event.code) {\n case 'ArrowLeft': {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step * -1);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowRight': {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowDown': {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step * -1);\n }\n\n event.preventDefault();\n break;\n }\n\n case 'ArrowUp': {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step);\n }\n\n event.preventDefault();\n break;\n }\n\n default:\n //no op\n break;\n }\n },\n onGutterMouseDown(event, index) {\n this.onResizeStart(event, index);\n this.bindMouseListeners();\n },\n onGutterTouchStart(event, index) {\n this.onResizeStart(event, index);\n this.bindTouchListeners();\n event.preventDefault();\n },\n onGutterTouchMove(event) {\n this.onResize(event);\n event.preventDefault();\n },\n onGutterTouchEnd(event) {\n this.onResizeEnd(event);\n this.unbindTouchListeners();\n event.preventDefault();\n },\n bindMouseListeners() {\n if (!this.mouseMoveListener) {\n this.mouseMoveListener = (event) => this.onResize(event);\n document.addEventListener('mousemove', this.mouseMoveListener);\n }\n\n if (!this.mouseUpListener) {\n this.mouseUpListener = (event) => {\n this.onResizeEnd(event);\n this.unbindMouseListeners();\n };\n\n document.addEventListener('mouseup', this.mouseUpListener);\n }\n },\n bindTouchListeners() {\n if (!this.touchMoveListener) {\n this.touchMoveListener = (event) => this.onResize(event.changedTouches[0]);\n document.addEventListener('touchmove', this.touchMoveListener);\n }\n\n if (!this.touchEndListener) {\n this.touchEndListener = (event) => {\n this.resizeEnd(event);\n this.unbindTouchListeners();\n };\n\n document.addEventListener('touchend', this.touchEndListener);\n }\n },\n validateResize(newPrevPanelSize, newNextPanelSize) {\n if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;\n if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;\n\n let prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');\n\n if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {\n return false;\n }\n\n let newPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');\n\n if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {\n return false;\n }\n\n return true;\n },\n unbindMouseListeners() {\n if (this.mouseMoveListener) {\n document.removeEventListener('mousemove', this.mouseMoveListener);\n this.mouseMoveListener = null;\n }\n\n if (this.mouseUpListener) {\n document.removeEventListener('mouseup', this.mouseUpListener);\n this.mouseUpListener = null;\n }\n },\n unbindTouchListeners() {\n if (this.touchMoveListener) {\n document.removeEventListener('touchmove', this.touchMoveListener);\n this.touchMoveListener = null;\n }\n\n if (this.touchEndListener) {\n document.removeEventListener('touchend', this.touchEndListener);\n this.touchEndListener = null;\n }\n },\n clear() {\n this.dragging = false;\n this.size = null;\n this.startPos = null;\n this.prevPanelElement = null;\n this.nextPanelElement = null;\n this.prevPanelSize = null;\n this.nextPanelSize = null;\n this.gutterElement = null;\n this.prevPanelIndex = null;\n },\n isStateful() {\n return this.stateKey != null;\n },\n getStorage() {\n switch (this.stateStorage) {\n case 'local':\n return window.localStorage;\n\n case 'session':\n return window.sessionStorage;\n\n default:\n throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are \"local\" and \"session\".');\n }\n },\n saveState() {\n if (isArray(this.panelSizes)) {\n this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes));\n }\n },\n restoreState() {\n const storage = this.getStorage();\n const stateString = storage.getItem(this.stateKey);\n\n if (stateString) {\n this.panelSizes = JSON.parse(stateString);\n let children = [...this.$el.children].filter((child) => child.getAttribute('data-pc-name') === 'splitterpanel');\n\n children.forEach((child, i) => {\n child.style.flexBasis = 'calc(' + this.panelSizes[i] + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n });\n\n return true;\n }\n\n return false;\n },\n resetState() {\n this.initializePanels();\n }\n },\n computed: {\n panels() {\n const panels = [];\n\n this.$slots.default().forEach((child) => {\n if (this.isSplitterPanel(child)) {\n panels.push(child);\n } else if (child.children instanceof Array) {\n child.children.forEach((nestedChild) => {\n if (this.isSplitterPanel(nestedChild)) {\n panels.push(nestedChild);\n }\n });\n }\n });\n\n return panels;\n },\n gutterStyle() {\n if (this.horizontal) return { width: this.gutterSize + 'px' };\n else return { height: this.gutterSize + 'px' };\n },\n horizontal() {\n return this.layout === 'horizontal';\n },\n getPTOptions() {\n return {\n context: {\n nested: this.$parentInstance?.nestedState\n }\n };\n }\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","layout","type","String","gutterSize","Number","stateKey","stateStorage","step","style","SplitterStyle","provide","$pcSplitter","$parentInstance","BaseSplitter","inheritAttrs","emits","dragging","mouseMoveListener","mouseUpListener","touchMoveListener","touchEndListener","size","gutterElement","startPos","prevPanelElement","nextPanelElement","nextPanelSize","prevPanelSize","panelSizes","prevPanelIndex","timer","data","prevSize","mounted","initializePanels","beforeUnmount","clear","unbindMouseListeners","methods","isSplitterPanel","child","_this","panels","length","initialized","isStateful","restoreState","children","_toConsumableArray","$el","filter","getAttribute","_panelSizes","map","panel","i","panelInitialSize","panelSize","flexBasis","parseFloat","toFixed","onResizeStart","event","index","isKeyDown","currentTarget","target","parentElement","horizontal","getWidth","getHeight","pageX","changedTouches","pageY","previousElementSibling","nextElementSibling","getOuterWidth","getOuterHeight","$emit","originalEvent","sizes","$refs","gutter","setAttribute","onResize","newPos","newPrevPanelSize","newNextPanelSize","isRTL","validateResize","onResizeEnd","saveState","forEach","repeat","setTimer","_this2","setInterval","clearTimer","clearInterval","onGutterKeyUp","onGutterKeyDown","code","preventDefault","onGutterMouseDown","bindMouseListeners","onGutterTouchStart","bindTouchListeners","onGutterTouchMove","onGutterTouchEnd","unbindTouchListeners","_this3","document","addEventListener","_this4","resizeEnd","prevPanelMinSize","getVNodeProp","newPanelMinSize","removeEventListener","getStorage","window","localStorage","sessionStorage","Error","isArray","setItem","JSON","stringify","_this5","storage","stateString","getItem","parse","resetState","computed","_this6","$slots","push","Array","nestedChild","gutterStyle","width","height","getPTOptions","_this$$parentInstance","context","nested","nestedState","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","sx","ptmi","$options","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","tabindex","ref","role","onMousedown","$event","onTouchstart","onTouchmove","onTouchend","ptm","_createElementVNode","$data","onKeyup","apply","arguments","onKeydown","_hoisted_2"],"mappings":";;;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,cAAc;AACpB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,MAAM,EAAE;AACJC,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,UAAU,EAAE;AACRF,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,QAAQ,EAAE;AACNJ,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDI,IAAAA,YAAY,EAAE;AACVL,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDK,IAAAA,IAAI,EAAE;AACFN,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAAS,EAAA;AACb;GACH;AACDI,EAAAA,KAAK,EAAEC,aAAa;EACpBC,OAAO,EAAA,SAAPA,OAAOA,GAAG;IACN,OAAO;AACHC,MAAAA,WAAW,EAAE,IAAI;AACjBC,MAAAA,eAAe,EAAE;KACpB;A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AAM,EAAE7G,CAAC,CAAA;OAAA;AACpC,MAAA,wBAAsB,EAAE;OACjBgG,IAAG,CAAAiB,GAAA,CAAA,QAAA,CAAA,CAAA,EAAA,CAEXC,kBAAA,CAAyN,OAAzNnB,UAAyN,CAAA;AAAnN,MAAA,OAAA,EAAOC,IAAE,CAAAC,EAAA,CAAA,cAAA,CAAA;AAAkBQ,MAAAA,QAAQ,EAAC,GAAI;AAACxJ,MAAAA,KAAK,GAAGmJ,QAAW,CAAAf,WAAA,CAAA;MAAI,kBAAgB,EAAEW,IAAM,CAAAvJ,MAAA;MAAG,eAAa,EAAE0K,KAAQ,CAAA1I,QAAA;MAAG2I,OAAK;eAAEhB,QAAa,CAAAxD,aAAA,IAAAwD,QAAA,CAAAxD,aAAA,CAAAyE,KAAA,CAAAjB,QAAA,EAAAkB,SAAA,CAAA;AAAA,OAAA,CAAA;AAAGC,MAAAA,SAAO,EAAE,SAATA,SAAOA,CAAEV,MAAA,EAAA;AAAA,QAAA,OAAAT,QAAA,CAAAvD,eAAe,CAACgE,MAAM,EAAE7G,CAAC,CAAA;OAAA;;OAAWgG,IAAG,CAAAiB,GAAA,CAAA,cAAA,CAAA,CAAA,EAAA,IAAA,EAAA,EAAA,EAAAO,UAAA,CAAA;;;;;;;;"}
|
package/step/Step.vue
CHANGED
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
'aria-current': this.active ? 'step' : undefined,
|
|
78
78
|
'data-pc-name': 'step',
|
|
79
79
|
'data-pc-section': 'root',
|
|
80
|
-
'data-p-disabled': this.
|
|
80
|
+
'data-p-disabled': this.isStepDisabled,
|
|
81
81
|
'data-p-active': this.active
|
|
82
82
|
},
|
|
83
83
|
header: {
|
|
@@ -86,7 +86,7 @@ export default {
|
|
|
86
86
|
taindex: this.disabled ? -1 : undefined,
|
|
87
87
|
'aria-controls': this.ariaControls,
|
|
88
88
|
'data-pc-section': 'header',
|
|
89
|
-
disabled: this.
|
|
89
|
+
disabled: this.isStepDisabled,
|
|
90
90
|
onClick: this.onStepClick
|
|
91
91
|
}
|
|
92
92
|
};
|
package/step/index.mjs
CHANGED
|
@@ -115,7 +115,7 @@ var script = {
|
|
|
115
115
|
'aria-current': this.active ? 'step' : undefined,
|
|
116
116
|
'data-pc-name': 'step',
|
|
117
117
|
'data-pc-section': 'root',
|
|
118
|
-
'data-p-disabled': this.
|
|
118
|
+
'data-p-disabled': this.isStepDisabled,
|
|
119
119
|
'data-p-active': this.active
|
|
120
120
|
},
|
|
121
121
|
header: {
|
|
@@ -124,7 +124,7 @@ var script = {
|
|
|
124
124
|
taindex: this.disabled ? -1 : undefined,
|
|
125
125
|
'aria-controls': this.ariaControls,
|
|
126
126
|
'data-pc-section': 'header',
|
|
127
|
-
disabled: this.
|
|
127
|
+
disabled: this.isStepDisabled,
|
|
128
128
|
onClick: this.onStepClick
|
|
129
129
|
}
|
|
130
130
|
};
|
package/step/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/stepper/StepperSeparator.vue","../../src/stepper/StepperSeparator.vue?vue&type=template&id=131b32e8&lang.js","../../src/step/BaseStep.vue","../../src/step/Step.vue","../../src/step/Step.vue?vue&type=template&id=7c679b82&lang.js"],"sourcesContent":["<template>\n <span :class=\"cx('separator')\" v-bind=\"ptm('separator')\" />\n</template>\n\n<script>\nimport BaseComponent from '@primevue/core/basecomponent';\n\nexport default {\n name: 'StepperSeparator',\n hostName: 'Stepper',\n extends: BaseComponent\n};\n</script>\n","<template>\n <span :class=\"cx('separator')\" v-bind=\"ptm('separator')\" />\n</template>\n\n<script>\nimport BaseComponent from '@primevue/core/basecomponent';\n\nexport default {\n name: 'StepperSeparator',\n hostName: 'Stepper',\n extends: BaseComponent\n};\n</script>\n","<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport StepStyle from 'primevue/step/style';\n\nexport default {\n name: 'BaseStep',\n extends: BaseComponent,\n props: {\n value: {\n type: [String, Number],\n default: undefined\n },\n disabled: {\n type: Boolean,\n default: false\n },\n asChild: {\n type: Boolean,\n default: false\n },\n as: {\n type: [String, Object],\n default: 'DIV'\n }\n },\n style: StepStyle,\n provide() {\n return {\n $pcStep: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <component v-if=\"!asChild\" :is=\"as\" :class=\"cx('root')\" :aria-current=\"active ? 'step' : undefined\" role=\"presentation\" :data-p-active=\"active\" :data-p-disabled=\"isStepDisabled\" v-bind=\"getPTOptions('root')\">\n <button :id=\"id\" :class=\"cx('header')\" role=\"tab\" type=\"button\" :tabindex=\"isStepDisabled ? -1 : undefined\" :aria-controls=\"ariaControls\" :disabled=\"isStepDisabled\" @click=\"onStepClick\" v-bind=\"getPTOptions('header')\">\n <span :class=\"cx('number')\" v-bind=\"getPTOptions('number')\">{{ activeValue }}</span>\n <span :class=\"cx('title')\" v-bind=\"getPTOptions('title')\">\n <slot />\n </span>\n </button>\n <StepperSeparator v-if=\"isSeparatorVisible\" />\n </component>\n <slot v-else :class=\"cx('root')\" :active=\"active\" :value=\"value\" :a11yAttrs=\"a11yAttrs\" :activateCallback=\"onStepClick\" />\n</template>\n\n<script>\nimport { find } from '@primeuix/utils/dom';\nimport { findIndexInList } from '@primeuix/utils/object';\nimport StepperSeparator from '../stepper/StepperSeparator.vue';\nimport BaseStep from './BaseStep.vue';\n\nexport default {\n name: 'Step',\n extends: BaseStep,\n inheritAttrs: false,\n inject: {\n $pcStepper: { default: null },\n $pcStepList: { default: null },\n $pcStepItem: { default: null }\n },\n data() {\n return {\n isSeparatorVisible: false\n };\n },\n mounted() {\n if (this.$el && this.$pcStepList) {\n let index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name=\"step\"]'));\n let stepLen = find(this.$pcStepper.$el, '[data-pc-name=\"step\"]').length;\n\n this.isSeparatorVisible = index !== stepLen - 1;\n }\n },\n methods: {\n getPTOptions(key) {\n const _ptm = key === 'root' ? this.ptmi : this.ptm;\n\n return _ptm(key, {\n context: {\n active: this.active,\n disabled: this.isStepDisabled\n }\n });\n },\n onStepClick() {\n this.$pcStepper.updateValue(this.activeValue);\n }\n },\n computed: {\n active() {\n return this.$pcStepper.isStepActive(this.activeValue);\n },\n activeValue() {\n return !!this.$pcStepItem ? this.$pcStepItem?.value : this.value;\n },\n isStepDisabled() {\n return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled);\n },\n id() {\n return `${this.$pcStepper?.id}_step_${this.activeValue}`;\n },\n ariaControls() {\n return `${this.$pcStepper?.id}_steppanel_${this.activeValue}`;\n },\n a11yAttrs() {\n return {\n root: {\n role: 'presentation',\n 'aria-current': this.active ? 'step' : undefined,\n 'data-pc-name': 'step',\n 'data-pc-section': 'root',\n 'data-p-disabled': this.disabled,\n 'data-p-active': this.active\n },\n header: {\n id: this.id,\n role: 'tab',\n taindex: this.disabled ? -1 : undefined,\n 'aria-controls': this.ariaControls,\n 'data-pc-section': 'header',\n disabled: this.disabled,\n onClick: this.onStepClick\n }\n };\n }\n },\n components: {\n StepperSeparator\n }\n};\n</script>\n","<template>\n <component v-if=\"!asChild\" :is=\"as\" :class=\"cx('root')\" :aria-current=\"active ? 'step' : undefined\" role=\"presentation\" :data-p-active=\"active\" :data-p-disabled=\"isStepDisabled\" v-bind=\"getPTOptions('root')\">\n <button :id=\"id\" :class=\"cx('header')\" role=\"tab\" type=\"button\" :tabindex=\"isStepDisabled ? -1 : undefined\" :aria-controls=\"ariaControls\" :disabled=\"isStepDisabled\" @click=\"onStepClick\" v-bind=\"getPTOptions('header')\">\n <span :class=\"cx('number')\" v-bind=\"getPTOptions('number')\">{{ activeValue }}</span>\n <span :class=\"cx('title')\" v-bind=\"getPTOptions('title')\">\n <slot />\n </span>\n </button>\n <StepperSeparator v-if=\"isSeparatorVisible\" />\n </component>\n <slot v-else :class=\"cx('root')\" :active=\"active\" :value=\"value\" :a11yAttrs=\"a11yAttrs\" :activateCallback=\"onStepClick\" />\n</template>\n\n<script>\nimport { find } from '@primeuix/utils/dom';\nimport { findIndexInList } from '@primeuix/utils/object';\nimport StepperSeparator from '../stepper/StepperSeparator.vue';\nimport BaseStep from './BaseStep.vue';\n\nexport default {\n name: 'Step',\n extends: BaseStep,\n inheritAttrs: false,\n inject: {\n $pcStepper: { default: null },\n $pcStepList: { default: null },\n $pcStepItem: { default: null }\n },\n data() {\n return {\n isSeparatorVisible: false\n };\n },\n mounted() {\n if (this.$el && this.$pcStepList) {\n let index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name=\"step\"]'));\n let stepLen = find(this.$pcStepper.$el, '[data-pc-name=\"step\"]').length;\n\n this.isSeparatorVisible = index !== stepLen - 1;\n }\n },\n methods: {\n getPTOptions(key) {\n const _ptm = key === 'root' ? this.ptmi : this.ptm;\n\n return _ptm(key, {\n context: {\n active: this.active,\n disabled: this.isStepDisabled\n }\n });\n },\n onStepClick() {\n this.$pcStepper.updateValue(this.activeValue);\n }\n },\n computed: {\n active() {\n return this.$pcStepper.isStepActive(this.activeValue);\n },\n activeValue() {\n return !!this.$pcStepItem ? this.$pcStepItem?.value : this.value;\n },\n isStepDisabled() {\n return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled);\n },\n id() {\n return `${this.$pcStepper?.id}_step_${this.activeValue}`;\n },\n ariaControls() {\n return `${this.$pcStepper?.id}_steppanel_${this.activeValue}`;\n },\n a11yAttrs() {\n return {\n root: {\n role: 'presentation',\n 'aria-current': this.active ? 'step' : undefined,\n 'data-pc-name': 'step',\n 'data-pc-section': 'root',\n 'data-p-disabled': this.disabled,\n 'data-p-active': this.active\n },\n header: {\n id: this.id,\n role: 'tab',\n taindex: this.disabled ? -1 : undefined,\n 'aria-controls': this.ariaControls,\n 'data-pc-section': 'header',\n disabled: this.disabled,\n onClick: this.onStepClick\n }\n };\n }\n },\n components: {\n StepperSeparator\n }\n};\n</script>\n"],"names":["name","hostName","BaseComponent","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","ptm","props","value","type","String","Number","undefined","disabled","Boolean","asChild","as","Object","style","StepStyle","provide","$pcStep","$parentInstance","BaseStep","inheritAttrs","inject","$pcStepper","$pcStepList","$pcStepItem","data","isSeparatorVisible","mounted","$el","index","findIndexInList","find","stepLen","length","methods","getPTOptions","key","_ptm","ptmi","context","active","isStepDisabled","onStepClick","updateValue","activeValue","computed","isStepActive","_this$$pcStepItem","id","_this$$pcStepper","concat","ariaControls","_this$$pcStepper2","a11yAttrs","root","role","header","taindex","onClick","components","StepperSeparator","_createBlock","_resolveDynamicComponent","$options","_createElementVNode","tabindex","apply","arguments","_renderSlot","$slots","$data","_component_StepperSeparator","activateCallback"],"mappings":";;;;;;AAOA,eAAe;AACXA,EAAAA,IAAI,EAAE,kBAAkB;AACxBC,EAAAA,QAAQ,EAAE,SAAS;EACnB,SAASC,EAAAA;AACb,CAAC;;;ECVG,OAAAC,SAAA,EAAA,EAAAC,kBAAA,CAA0D,QAA1DC,UAA0D,CAAA;AAAnD,IAAA,OAAA,EAAOC,IAAE,CAAAC,EAAA,CAAA,WAAA;KAAuBD,IAAG,CAAAE,GAAA,CAAA,WAAA,CAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA;;;;;ACG9C,eAAe;AACXR,EAAAA,IAAI,EAAE,UAAU;AAChB,EAAA,SAAA,EAASE,aAAa;AACtBO,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE;AACHC,MAAAA,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;MACtB,SAASC,EAAAA;KACZ;AACDC,IAAAA,QAAQ,EAAE;AACNJ,MAAAA,IAAI,EAAEK,OAAO;MACb,SAAS,EAAA;KACZ;AACDC,IAAAA,OAAO,EAAE;AACLN,MAAAA,IAAI,EAAEK,OAAO;MACb,SAAS,EAAA;KACZ;AACDE,IAAAA,EAAE,EAAE;AACAP,MAAAA,IAAI,EAAE,CAACC,MAAM,EAAEO,MAAM,CAAC;MACtB,SAAS,EAAA;AACb;GACH;AACDC,EAAAA,KAAK,EAAEC,SAAS;EAChBC,O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AAM,EAAEuB,QAAM,CAAAvB,MAAA;IAAGpC,KAAK,EAAEJ,IAAK,CAAAI,KAAA;IAAGiD,SAAS,EAAEU,QAAS,CAAAV,SAAA;IAAGmB,gBAAgB,EAAET,QAAW,CAAArB;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/stepper/StepperSeparator.vue","../../src/stepper/StepperSeparator.vue?vue&type=template&id=131b32e8&lang.js","../../src/step/BaseStep.vue","../../src/step/Step.vue","../../src/step/Step.vue?vue&type=template&id=e408397c&lang.js"],"sourcesContent":["<template>\n <span :class=\"cx('separator')\" v-bind=\"ptm('separator')\" />\n</template>\n\n<script>\nimport BaseComponent from '@primevue/core/basecomponent';\n\nexport default {\n name: 'StepperSeparator',\n hostName: 'Stepper',\n extends: BaseComponent\n};\n</script>\n","<template>\n <span :class=\"cx('separator')\" v-bind=\"ptm('separator')\" />\n</template>\n\n<script>\nimport BaseComponent from '@primevue/core/basecomponent';\n\nexport default {\n name: 'StepperSeparator',\n hostName: 'Stepper',\n extends: BaseComponent\n};\n</script>\n","<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport StepStyle from 'primevue/step/style';\n\nexport default {\n name: 'BaseStep',\n extends: BaseComponent,\n props: {\n value: {\n type: [String, Number],\n default: undefined\n },\n disabled: {\n type: Boolean,\n default: false\n },\n asChild: {\n type: Boolean,\n default: false\n },\n as: {\n type: [String, Object],\n default: 'DIV'\n }\n },\n style: StepStyle,\n provide() {\n return {\n $pcStep: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <component v-if=\"!asChild\" :is=\"as\" :class=\"cx('root')\" :aria-current=\"active ? 'step' : undefined\" role=\"presentation\" :data-p-active=\"active\" :data-p-disabled=\"isStepDisabled\" v-bind=\"getPTOptions('root')\">\n <button :id=\"id\" :class=\"cx('header')\" role=\"tab\" type=\"button\" :tabindex=\"isStepDisabled ? -1 : undefined\" :aria-controls=\"ariaControls\" :disabled=\"isStepDisabled\" @click=\"onStepClick\" v-bind=\"getPTOptions('header')\">\n <span :class=\"cx('number')\" v-bind=\"getPTOptions('number')\">{{ activeValue }}</span>\n <span :class=\"cx('title')\" v-bind=\"getPTOptions('title')\">\n <slot />\n </span>\n </button>\n <StepperSeparator v-if=\"isSeparatorVisible\" />\n </component>\n <slot v-else :class=\"cx('root')\" :active=\"active\" :value=\"value\" :a11yAttrs=\"a11yAttrs\" :activateCallback=\"onStepClick\" />\n</template>\n\n<script>\nimport { find } from '@primeuix/utils/dom';\nimport { findIndexInList } from '@primeuix/utils/object';\nimport StepperSeparator from '../stepper/StepperSeparator.vue';\nimport BaseStep from './BaseStep.vue';\n\nexport default {\n name: 'Step',\n extends: BaseStep,\n inheritAttrs: false,\n inject: {\n $pcStepper: { default: null },\n $pcStepList: { default: null },\n $pcStepItem: { default: null }\n },\n data() {\n return {\n isSeparatorVisible: false\n };\n },\n mounted() {\n if (this.$el && this.$pcStepList) {\n let index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name=\"step\"]'));\n let stepLen = find(this.$pcStepper.$el, '[data-pc-name=\"step\"]').length;\n\n this.isSeparatorVisible = index !== stepLen - 1;\n }\n },\n methods: {\n getPTOptions(key) {\n const _ptm = key === 'root' ? this.ptmi : this.ptm;\n\n return _ptm(key, {\n context: {\n active: this.active,\n disabled: this.isStepDisabled\n }\n });\n },\n onStepClick() {\n this.$pcStepper.updateValue(this.activeValue);\n }\n },\n computed: {\n active() {\n return this.$pcStepper.isStepActive(this.activeValue);\n },\n activeValue() {\n return !!this.$pcStepItem ? this.$pcStepItem?.value : this.value;\n },\n isStepDisabled() {\n return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled);\n },\n id() {\n return `${this.$pcStepper?.id}_step_${this.activeValue}`;\n },\n ariaControls() {\n return `${this.$pcStepper?.id}_steppanel_${this.activeValue}`;\n },\n a11yAttrs() {\n return {\n root: {\n role: 'presentation',\n 'aria-current': this.active ? 'step' : undefined,\n 'data-pc-name': 'step',\n 'data-pc-section': 'root',\n 'data-p-disabled': this.isStepDisabled,\n 'data-p-active': this.active\n },\n header: {\n id: this.id,\n role: 'tab',\n taindex: this.disabled ? -1 : undefined,\n 'aria-controls': this.ariaControls,\n 'data-pc-section': 'header',\n disabled: this.isStepDisabled,\n onClick: this.onStepClick\n }\n };\n }\n },\n components: {\n StepperSeparator\n }\n};\n</script>\n","<template>\n <component v-if=\"!asChild\" :is=\"as\" :class=\"cx('root')\" :aria-current=\"active ? 'step' : undefined\" role=\"presentation\" :data-p-active=\"active\" :data-p-disabled=\"isStepDisabled\" v-bind=\"getPTOptions('root')\">\n <button :id=\"id\" :class=\"cx('header')\" role=\"tab\" type=\"button\" :tabindex=\"isStepDisabled ? -1 : undefined\" :aria-controls=\"ariaControls\" :disabled=\"isStepDisabled\" @click=\"onStepClick\" v-bind=\"getPTOptions('header')\">\n <span :class=\"cx('number')\" v-bind=\"getPTOptions('number')\">{{ activeValue }}</span>\n <span :class=\"cx('title')\" v-bind=\"getPTOptions('title')\">\n <slot />\n </span>\n </button>\n <StepperSeparator v-if=\"isSeparatorVisible\" />\n </component>\n <slot v-else :class=\"cx('root')\" :active=\"active\" :value=\"value\" :a11yAttrs=\"a11yAttrs\" :activateCallback=\"onStepClick\" />\n</template>\n\n<script>\nimport { find } from '@primeuix/utils/dom';\nimport { findIndexInList } from '@primeuix/utils/object';\nimport StepperSeparator from '../stepper/StepperSeparator.vue';\nimport BaseStep from './BaseStep.vue';\n\nexport default {\n name: 'Step',\n extends: BaseStep,\n inheritAttrs: false,\n inject: {\n $pcStepper: { default: null },\n $pcStepList: { default: null },\n $pcStepItem: { default: null }\n },\n data() {\n return {\n isSeparatorVisible: false\n };\n },\n mounted() {\n if (this.$el && this.$pcStepList) {\n let index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name=\"step\"]'));\n let stepLen = find(this.$pcStepper.$el, '[data-pc-name=\"step\"]').length;\n\n this.isSeparatorVisible = index !== stepLen - 1;\n }\n },\n methods: {\n getPTOptions(key) {\n const _ptm = key === 'root' ? this.ptmi : this.ptm;\n\n return _ptm(key, {\n context: {\n active: this.active,\n disabled: this.isStepDisabled\n }\n });\n },\n onStepClick() {\n this.$pcStepper.updateValue(this.activeValue);\n }\n },\n computed: {\n active() {\n return this.$pcStepper.isStepActive(this.activeValue);\n },\n activeValue() {\n return !!this.$pcStepItem ? this.$pcStepItem?.value : this.value;\n },\n isStepDisabled() {\n return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled);\n },\n id() {\n return `${this.$pcStepper?.id}_step_${this.activeValue}`;\n },\n ariaControls() {\n return `${this.$pcStepper?.id}_steppanel_${this.activeValue}`;\n },\n a11yAttrs() {\n return {\n root: {\n role: 'presentation',\n 'aria-current': this.active ? 'step' : undefined,\n 'data-pc-name': 'step',\n 'data-pc-section': 'root',\n 'data-p-disabled': this.isStepDisabled,\n 'data-p-active': this.active\n },\n header: {\n id: this.id,\n role: 'tab',\n taindex: this.disabled ? -1 : undefined,\n 'aria-controls': this.ariaControls,\n 'data-pc-section': 'header',\n disabled: this.isStepDisabled,\n onClick: this.onStepClick\n }\n };\n }\n },\n components: {\n StepperSeparator\n }\n};\n</script>\n"],"names":["name","hostName","BaseComponent","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","ptm","props","value","type","String","Number","undefined","disabled","Boolean","asChild","as","Object","style","StepStyle","provide","$pcStep","$parentInstance","BaseStep","inheritAttrs","inject","$pcStepper","$pcStepList","$pcStepItem","data","isSeparatorVisible","mounted","$el","index","findIndexInList","find","stepLen","length","methods","getPTOptions","key","_ptm","ptmi","context","active","isStepDisabled","onStepClick","updateValue","activeValue","computed","isStepActive","_this$$pcStepItem","id","_this$$pcStepper","concat","ariaControls","_this$$pcStepper2","a11yAttrs","root","role","header","taindex","onClick","components","StepperSeparator","_createBlock","_resolveDynamicComponent","$options","_createElementVNode","tabindex","apply","arguments","_renderSlot","$slots","$data","_component_StepperSeparator","activateCallback"],"mappings":";;;;;;AAOA,eAAe;AACXA,EAAAA,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