primevue 4.3.1 → 4.3.3
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/accordionheader/AccordionHeader.vue +8 -2
- package/accordionheader/index.mjs +8 -1
- package/accordionheader/index.mjs.map +1 -1
- package/autocomplete/AutoComplete.vue +72 -16
- package/autocomplete/index.d.ts +3 -3
- package/autocomplete/index.mjs +84 -37
- package/autocomplete/index.mjs.map +1 -1
- package/avatar/Avatar.vue +13 -4
- package/avatar/index.d.ts +3 -3
- package/avatar/index.mjs +26 -6
- package/avatar/index.mjs.map +1 -1
- package/badge/Badge.vue +13 -2
- package/badge/index.d.ts +1 -1
- package/badge/index.mjs +18 -3
- package/badge/index.mjs.map +1 -1
- package/blockui/BlockUI.vue +15 -4
- package/blockui/index.mjs +13 -4
- package/blockui/index.mjs.map +1 -1
- package/button/Button.vue +30 -3
- package/button/index.d.ts +3 -7
- package/button/index.mjs +28 -9
- package/button/index.mjs.map +1 -1
- package/cascadeselect/CascadeSelect.vue +1 -1
- package/cascadeselect/index.d.ts +2 -2
- package/cascadeselect/index.mjs +1 -2
- package/cascadeselect/index.mjs.map +1 -1
- package/checkbox/Checkbox.vue +15 -5
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.mjs +29 -7
- package/checkbox/index.mjs.map +1 -1
- package/chip/BaseChip.vue +1 -1
- package/chip/Chip.vue +9 -1
- package/chip/index.d.ts +1 -1
- package/chip/index.mjs +13 -3
- package/chip/index.mjs.map +1 -1
- package/colorpicker/ColorPicker.vue +10 -2
- package/colorpicker/index.d.ts +1 -1
- package/colorpicker/index.mjs +9 -2
- package/colorpicker/index.mjs.map +1 -1
- package/column/index.d.ts +3 -3
- package/columngroup/index.d.ts +2 -2
- package/confirmationoptions/index.d.ts +1 -1
- package/datatable/BodyCell.vue +4 -1
- package/datatable/BodyRow.vue +2 -0
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.vue +103 -44
- package/datatable/HeaderCheckbox.vue +2 -2
- package/datatable/RowCheckbox.vue +1 -1
- package/datatable/TableBody.vue +12 -1
- package/datatable/TableFooter.vue +9 -1
- package/datatable/TableHeader.vue +9 -2
- package/datatable/index.d.ts +45 -37
- package/datatable/index.mjs +170 -101
- package/datatable/index.mjs.map +1 -1
- package/dataview/DataView.vue +4 -0
- package/dataview/index.d.ts +61 -4
- package/dataview/index.mjs +6 -2
- package/dataview/index.mjs.map +1 -1
- package/datepicker/DatePicker.vue +370 -234
- package/datepicker/index.d.ts +162 -6
- package/datepicker/index.mjs +644 -384
- package/datepicker/index.mjs.map +1 -1
- package/dialog/Dialog.vue +48 -39
- package/dialog/index.d.ts +26 -1
- package/dialog/index.mjs +73 -50
- package/dialog/index.mjs.map +1 -1
- package/divider/Divider.vue +13 -3
- package/divider/index.d.ts +4 -4
- package/divider/index.mjs +18 -5
- package/divider/index.mjs.map +1 -1
- package/dock/index.d.ts +4 -4
- package/drawer/Drawer.vue +30 -20
- package/drawer/index.d.ts +12 -2
- package/drawer/index.mjs +42 -25
- package/drawer/index.mjs.map +1 -1
- package/fieldset/Fieldset.vue +8 -2
- package/fieldset/index.mjs +20 -10
- package/fieldset/index.mjs.map +1 -1
- package/fileupload/FileUpload.vue +1 -1
- package/fileupload/index.d.ts +2 -2
- package/fileupload/index.mjs +2 -2
- package/fileupload/index.mjs.map +1 -1
- package/floatlabel/index.d.ts +2 -2
- package/galleria/Galleria.vue +39 -3
- package/galleria/GalleriaItem.vue +8 -9
- package/galleria/index.d.ts +3 -3
- package/galleria/index.mjs +48 -11
- package/galleria/index.mjs.map +1 -1
- package/inplace/Inplace.vue +1 -1
- package/inplace/index.mjs +3 -2
- package/inplace/index.mjs.map +1 -1
- package/inputchips/index.d.ts +2 -2
- package/inputmask/InputMask.vue +15 -1
- package/inputmask/index.d.ts +3 -3
- package/inputmask/index.mjs +12 -1
- package/inputmask/index.mjs.map +1 -1
- package/inputnumber/BaseInputNumber.vue +4 -0
- package/inputnumber/InputNumber.vue +29 -14
- package/inputnumber/index.d.ts +6 -6
- package/inputnumber/index.mjs +47 -25
- package/inputnumber/index.mjs.map +1 -1
- package/inputotp/index.d.ts +3 -3
- package/inputtext/InputText.vue +10 -1
- package/inputtext/index.d.ts +4 -5
- package/inputtext/index.mjs +14 -1
- package/inputtext/index.mjs.map +1 -1
- package/keyfilter/index.mjs +12 -19
- package/keyfilter/index.mjs.map +1 -1
- package/knob/Knob.vue +1 -1
- package/knob/index.mjs +1 -1
- package/knob/index.mjs.map +1 -1
- package/listbox/Listbox.vue +9 -2
- package/listbox/index.mjs +11 -3
- package/listbox/index.mjs.map +1 -1
- package/megamenu/index.d.ts +2 -2
- package/menu/Menu.vue +8 -2
- package/menu/Menuitem.vue +14 -4
- package/menu/index.mjs +36 -16
- package/menu/index.mjs.map +1 -1
- package/message/Message.vue +16 -7
- package/message/index.d.ts +2 -2
- package/message/index.mjs +35 -13
- package/message/index.mjs.map +1 -1
- package/metergroup/MeterGroup.vue +9 -3
- package/metergroup/MeterGroupLabel.vue +10 -1
- package/metergroup/index.mjs +32 -7
- package/metergroup/index.mjs.map +1 -1
- package/multiselect/MultiSelect.vue +41 -6
- package/multiselect/index.d.ts +3 -3
- package/multiselect/index.mjs +53 -21
- package/multiselect/index.mjs.map +1 -1
- package/organizationchart/index.d.ts +2 -2
- package/overlaybadge/index.d.ts +1 -1
- package/package.json +3 -3
- package/paginator/Paginator.vue +2 -0
- package/paginator/index.d.ts +8 -0
- package/paginator/index.mjs +3 -1
- package/paginator/index.mjs.map +1 -1
- package/panel/Panel.vue +29 -22
- package/panel/index.d.ts +22 -2
- package/panel/index.mjs +55 -31
- package/panel/index.mjs.map +1 -1
- package/panelmenu/PanelMenuList.vue +1 -1
- package/panelmenu/index.mjs +1 -1
- package/panelmenu/index.mjs.map +1 -1
- package/password/Password.vue +21 -3
- package/password/index.d.ts +3 -3
- package/password/index.mjs +32 -10
- package/password/index.mjs.map +1 -1
- package/popover/Popover.vue +3 -3
- package/popover/index.mjs +3 -4
- package/popover/index.mjs.map +1 -1
- package/progressbar/ProgressBar.vue +11 -4
- package/progressbar/index.mjs +21 -7
- package/progressbar/index.mjs.map +1 -1
- package/radiobutton/RadioButton.vue +13 -3
- package/radiobutton/index.d.ts +3 -3
- package/radiobutton/index.mjs +24 -4
- package/radiobutton/index.mjs.map +1 -1
- package/rating/Rating.vue +19 -2
- package/rating/index.mjs +28 -7
- package/rating/index.mjs.map +1 -1
- package/scrolltop/ScrollTop.vue +2 -2
- package/scrolltop/index.d.ts +2 -2
- package/scrolltop/index.mjs +4 -2
- package/scrolltop/index.mjs.map +1 -1
- package/select/Select.vue +56 -16
- package/select/index.d.ts +2 -2
- package/select/index.mjs +111 -74
- package/select/index.mjs.map +1 -1
- package/selectbutton/SelectButton.vue +26 -9
- package/selectbutton/index.d.ts +2 -2
- package/selectbutton/index.mjs +30 -10
- package/selectbutton/index.mjs.map +1 -1
- package/skeleton/Skeleton.vue +7 -1
- package/skeleton/index.d.ts +3 -3
- package/skeleton/index.mjs +12 -1
- package/skeleton/index.mjs.map +1 -1
- package/slider/Slider.vue +11 -2
- package/slider/index.d.ts +2 -2
- package/slider/index.mjs +27 -8
- package/slider/index.mjs.map +1 -1
- package/speeddial/index.d.ts +5 -5
- package/splitbutton/index.d.ts +1 -1
- package/splitter/Splitter.vue +10 -2
- package/splitter/index.d.ts +3 -3
- package/splitter/index.mjs +19 -6
- package/splitter/index.mjs.map +1 -1
- package/step/Step.vue +25 -7
- package/step/index.mjs +44 -14
- package/step/index.mjs.map +1 -1
- package/steppanel/StepPanel.vue +9 -3
- package/steppanel/index.d.ts +8 -0
- package/steppanel/index.mjs +23 -8
- package/steppanel/index.mjs.map +1 -1
- package/stepper/StepperSeparator.vue +5 -2
- package/stepper/index.d.ts +4 -0
- package/tab/Tab.vue +12 -6
- package/tab/index.mjs +13 -5
- package/tab/index.mjs.map +1 -1
- package/tablist/TabList.vue +13 -2
- package/tablist/index.mjs +21 -8
- package/tablist/index.mjs.map +1 -1
- package/tabpanel/TabPanel.vue +2 -2
- package/tabpanel/index.mjs +2 -2
- package/tabpanel/index.mjs.map +1 -1
- package/tag/Tag.vue +11 -2
- package/tag/index.mjs +17 -3
- package/tag/index.mjs.map +1 -1
- package/textarea/Textarea.vue +10 -1
- package/textarea/index.d.ts +4 -5
- package/textarea/index.mjs +14 -1
- package/textarea/index.mjs.map +1 -1
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/index.mjs +1 -2
- package/tieredmenu/index.mjs.map +1 -1
- package/timeline/Timeline.vue +16 -7
- package/timeline/index.d.ts +3 -3
- package/timeline/index.mjs +42 -11
- package/timeline/index.mjs.map +1 -1
- package/toast/Toast.vue +10 -1
- package/toast/ToastMessage.vue +29 -19
- package/toast/index.d.ts +2 -2
- package/toast/index.mjs +77 -38
- package/toast/index.mjs.map +1 -1
- package/togglebutton/ToggleButton.vue +10 -1
- package/togglebutton/index.d.ts +3 -3
- package/togglebutton/index.mjs +19 -4
- package/togglebutton/index.mjs.map +1 -1
- package/toggleswitch/ToggleSwitch.vue +11 -3
- package/toggleswitch/index.mjs +20 -5
- package/toggleswitch/index.mjs.map +1 -1
- package/tooltip/index.mjs +22 -22
- package/tooltip/index.mjs.map +1 -1
- package/tree/Tree.vue +14 -2
- package/tree/TreeNode.vue +2 -2
- package/tree/index.d.ts +3 -3
- package/tree/index.mjs +28 -10
- package/tree/index.mjs.map +1 -1
- package/treeselect/TreeSelect.vue +1 -1
- package/treeselect/index.d.ts +6 -6
- package/treeselect/index.mjs +1 -2
- package/treeselect/index.mjs.map +1 -1
- package/treetable/index.d.ts +7 -7
- package/treetable/style/index.mjs +2 -3
- package/treetable/style/index.mjs.map +1 -1
- package/umd/primevue.min.js +1 -1
- package/virtualscroller/VirtualScroller.vue +13 -2
- package/virtualscroller/index.d.ts +2 -2
- package/virtualscroller/index.mjs +14 -4
- package/virtualscroller/index.mjs.map +1 -1
- package/virtualscroller/style/index.mjs +1 -1
- package/virtualscroller/style/index.mjs.map +1 -1
- package/web-types.json +1 -1
package/timeline/Timeline.vue
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="cx('root')" v-bind="ptmi('root')">
|
|
3
|
-
<div v-for="(item, index) of value" :key="getKey(item, index)" :class="cx('event')" v-bind="getPTOptions('event', index)">
|
|
4
|
-
<div :class="cx('eventOpposite', { index })" v-bind="getPTOptions('eventOpposite', index)">
|
|
2
|
+
<div :class="cx('root')" v-bind="ptmi('root')" :data-p="dataP">
|
|
3
|
+
<div v-for="(item, index) of value" :key="getKey(item, index)" :class="cx('event')" v-bind="getPTOptions('event', index)" :data-p="dataP">
|
|
4
|
+
<div :class="cx('eventOpposite', { index })" v-bind="getPTOptions('eventOpposite', index)" :data-p="dataP">
|
|
5
5
|
<slot name="opposite" :item="item" :index="index"></slot>
|
|
6
6
|
</div>
|
|
7
|
-
<div :class="cx('eventSeparator')" v-bind="getPTOptions('eventSeparator', index)">
|
|
7
|
+
<div :class="cx('eventSeparator')" v-bind="getPTOptions('eventSeparator', index)" :data-p="dataP">
|
|
8
8
|
<slot name="marker" :item="item" :index="index">
|
|
9
|
-
<div :class="cx('eventMarker')" v-bind="getPTOptions('eventMarker', index)"></div>
|
|
9
|
+
<div :class="cx('eventMarker')" v-bind="getPTOptions('eventMarker', index)" :data-p="dataP"></div>
|
|
10
10
|
</slot>
|
|
11
11
|
<slot v-if="index !== value.length - 1" name="connector" :item="item" :index="index">
|
|
12
|
-
<div :class="cx('eventConnector')" v-bind="getPTOptions('eventConnector', index)"></div>
|
|
12
|
+
<div :class="cx('eventConnector')" v-bind="getPTOptions('eventConnector', index)" :data-p="dataP"></div>
|
|
13
13
|
</slot>
|
|
14
14
|
</div>
|
|
15
|
-
<div :class="cx('eventContent')" v-bind="getPTOptions('eventContent', index)">
|
|
15
|
+
<div :class="cx('eventContent')" v-bind="getPTOptions('eventContent', index)" :data-p="dataP">
|
|
16
16
|
<slot name="content" :item="item" :index="index"></slot>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script>
|
|
23
|
+
import { cn } from '@primeuix/utils';
|
|
23
24
|
import { resolveFieldData } from '@primeuix/utils/object';
|
|
24
25
|
import BaseTimeline from './BaseTimeline.vue';
|
|
25
26
|
|
|
@@ -39,6 +40,14 @@ export default {
|
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
}
|
|
43
|
+
},
|
|
44
|
+
computed: {
|
|
45
|
+
dataP() {
|
|
46
|
+
return cn({
|
|
47
|
+
[this.layout]: this.layout,
|
|
48
|
+
[this.align]: this.align
|
|
49
|
+
});
|
|
50
|
+
}
|
|
42
51
|
}
|
|
43
52
|
};
|
|
44
53
|
</script>
|
package/timeline/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module timeline
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
|
|
10
|
+
import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } from '@primevue/core';
|
|
11
11
|
import type { ComponentHooks } from '@primevue/core/basecomponent';
|
|
12
12
|
import type { PassThroughOptions } from 'primevue/passthrough';
|
|
13
13
|
import { VNode } from 'vue';
|
|
@@ -117,12 +117,12 @@ export interface TimelineProps {
|
|
|
117
117
|
* Position of the timeline bar relative to the content.
|
|
118
118
|
* @defaultValue left
|
|
119
119
|
*/
|
|
120
|
-
align?: 'left' | 'right' | 'alternate' | 'top' | 'bottom' | undefined;
|
|
120
|
+
align?: HintedString<'left' | 'right' | 'alternate' | 'top' | 'bottom'> | undefined;
|
|
121
121
|
/**
|
|
122
122
|
* Orientation of the timeline.
|
|
123
123
|
* @defaultValue horizontal
|
|
124
124
|
*/
|
|
125
|
-
layout?: 'vertical' | 'horizontal' | undefined;
|
|
125
|
+
layout?: HintedString<'vertical' | 'horizontal'> | undefined;
|
|
126
126
|
/**
|
|
127
127
|
* Name of the field that uniquely identifies the a record in the data.
|
|
128
128
|
*/
|
package/timeline/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cn } from '@primeuix/utils';
|
|
1
2
|
import { resolveFieldData } from '@primeuix/utils/object';
|
|
2
3
|
import BaseComponent from '@primevue/core/basecomponent';
|
|
3
4
|
import TimelineStyle from 'primevue/timeline/style';
|
|
@@ -27,6 +28,10 @@ var script$1 = {
|
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
|
|
31
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
32
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
|
|
33
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
34
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
30
35
|
var script = {
|
|
31
36
|
name: 'Timeline',
|
|
32
37
|
"extends": script$1,
|
|
@@ -43,36 +48,58 @@ var script = {
|
|
|
43
48
|
}
|
|
44
49
|
});
|
|
45
50
|
}
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
dataP: function dataP() {
|
|
54
|
+
return cn(_defineProperty(_defineProperty({}, this.layout, this.layout), this.align, this.align));
|
|
55
|
+
}
|
|
46
56
|
}
|
|
47
57
|
};
|
|
48
58
|
|
|
59
|
+
var _hoisted_1 = ["data-p"];
|
|
60
|
+
var _hoisted_2 = ["data-p"];
|
|
61
|
+
var _hoisted_3 = ["data-p"];
|
|
62
|
+
var _hoisted_4 = ["data-p"];
|
|
63
|
+
var _hoisted_5 = ["data-p"];
|
|
64
|
+
var _hoisted_6 = ["data-p"];
|
|
65
|
+
var _hoisted_7 = ["data-p"];
|
|
49
66
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
50
67
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
51
68
|
"class": _ctx.cx('root')
|
|
52
|
-
}, _ctx.ptmi('root')
|
|
69
|
+
}, _ctx.ptmi('root'), {
|
|
70
|
+
"data-p": $options.dataP
|
|
71
|
+
}), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.value, function (item, index) {
|
|
53
72
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
54
73
|
key: $options.getKey(item, index),
|
|
55
74
|
"class": _ctx.cx('event'),
|
|
56
75
|
ref_for: true
|
|
57
|
-
}, $options.getPTOptions('event', index)
|
|
76
|
+
}, $options.getPTOptions('event', index), {
|
|
77
|
+
"data-p": $options.dataP
|
|
78
|
+
}), [createElementVNode("div", mergeProps({
|
|
58
79
|
"class": _ctx.cx('eventOpposite', {
|
|
59
80
|
index: index
|
|
60
81
|
}),
|
|
61
82
|
ref_for: true
|
|
62
|
-
}, $options.getPTOptions('eventOpposite', index)
|
|
83
|
+
}, $options.getPTOptions('eventOpposite', index), {
|
|
84
|
+
"data-p": $options.dataP
|
|
85
|
+
}), [renderSlot(_ctx.$slots, "opposite", {
|
|
63
86
|
item: item,
|
|
64
87
|
index: index
|
|
65
|
-
})], 16), createElementVNode("div", mergeProps({
|
|
88
|
+
})], 16, _hoisted_3), createElementVNode("div", mergeProps({
|
|
66
89
|
"class": _ctx.cx('eventSeparator'),
|
|
67
90
|
ref_for: true
|
|
68
|
-
}, $options.getPTOptions('eventSeparator', index)
|
|
91
|
+
}, $options.getPTOptions('eventSeparator', index), {
|
|
92
|
+
"data-p": $options.dataP
|
|
93
|
+
}), [renderSlot(_ctx.$slots, "marker", {
|
|
69
94
|
item: item,
|
|
70
95
|
index: index
|
|
71
96
|
}, function () {
|
|
72
97
|
return [createElementVNode("div", mergeProps({
|
|
73
98
|
"class": _ctx.cx('eventMarker'),
|
|
74
99
|
ref_for: true
|
|
75
|
-
}, $options.getPTOptions('eventMarker', index)
|
|
100
|
+
}, $options.getPTOptions('eventMarker', index), {
|
|
101
|
+
"data-p": $options.dataP
|
|
102
|
+
}), null, 16, _hoisted_5)];
|
|
76
103
|
}), index !== _ctx.value.length - 1 ? renderSlot(_ctx.$slots, "connector", {
|
|
77
104
|
key: 0,
|
|
78
105
|
item: item,
|
|
@@ -81,15 +108,19 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
81
108
|
return [createElementVNode("div", mergeProps({
|
|
82
109
|
"class": _ctx.cx('eventConnector'),
|
|
83
110
|
ref_for: true
|
|
84
|
-
}, $options.getPTOptions('eventConnector', index)
|
|
85
|
-
|
|
111
|
+
}, $options.getPTOptions('eventConnector', index), {
|
|
112
|
+
"data-p": $options.dataP
|
|
113
|
+
}), null, 16, _hoisted_6)];
|
|
114
|
+
}) : createCommentVNode("", true)], 16, _hoisted_4), createElementVNode("div", mergeProps({
|
|
86
115
|
"class": _ctx.cx('eventContent'),
|
|
87
116
|
ref_for: true
|
|
88
|
-
}, $options.getPTOptions('eventContent', index)
|
|
117
|
+
}, $options.getPTOptions('eventContent', index), {
|
|
118
|
+
"data-p": $options.dataP
|
|
119
|
+
}), [renderSlot(_ctx.$slots, "content", {
|
|
89
120
|
item: item,
|
|
90
121
|
index: index
|
|
91
|
-
})], 16)], 16);
|
|
92
|
-
}), 128))], 16);
|
|
122
|
+
})], 16, _hoisted_7)], 16, _hoisted_2);
|
|
123
|
+
}), 128))], 16, _hoisted_1);
|
|
93
124
|
}
|
|
94
125
|
|
|
95
126
|
script.render = render;
|
package/timeline/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/timeline/BaseTimeline.vue","../../src/timeline/Timeline.vue","../../src/timeline/Timeline.vue?vue&type=template&id=
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/timeline/BaseTimeline.vue","../../src/timeline/Timeline.vue","../../src/timeline/Timeline.vue?vue&type=template&id=93256150&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TimelineStyle from 'primevue/timeline/style';\n\nexport default {\n name: 'BaseTimeline',\n extends: BaseComponent,\n props: {\n value: null,\n align: {\n mode: String,\n default: 'left'\n },\n layout: {\n mode: String,\n default: 'vertical'\n },\n dataKey: null\n },\n style: TimelineStyle,\n provide() {\n return {\n $pcTimeline: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" v-bind=\"ptmi('root')\" :data-p=\"dataP\">\n <div v-for=\"(item, index) of value\" :key=\"getKey(item, index)\" :class=\"cx('event')\" v-bind=\"getPTOptions('event', index)\" :data-p=\"dataP\">\n <div :class=\"cx('eventOpposite', { index })\" v-bind=\"getPTOptions('eventOpposite', index)\" :data-p=\"dataP\">\n <slot name=\"opposite\" :item=\"item\" :index=\"index\"></slot>\n </div>\n <div :class=\"cx('eventSeparator')\" v-bind=\"getPTOptions('eventSeparator', index)\" :data-p=\"dataP\">\n <slot name=\"marker\" :item=\"item\" :index=\"index\">\n <div :class=\"cx('eventMarker')\" v-bind=\"getPTOptions('eventMarker', index)\" :data-p=\"dataP\"></div>\n </slot>\n <slot v-if=\"index !== value.length - 1\" name=\"connector\" :item=\"item\" :index=\"index\">\n <div :class=\"cx('eventConnector')\" v-bind=\"getPTOptions('eventConnector', index)\" :data-p=\"dataP\"></div>\n </slot>\n </div>\n <div :class=\"cx('eventContent')\" v-bind=\"getPTOptions('eventContent', index)\" :data-p=\"dataP\">\n <slot name=\"content\" :item=\"item\" :index=\"index\"></slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { resolveFieldData } from '@primeuix/utils/object';\nimport BaseTimeline from './BaseTimeline.vue';\n\nexport default {\n name: 'Timeline',\n extends: BaseTimeline,\n inheritAttrs: false,\n methods: {\n getKey(item, index) {\n return this.dataKey ? resolveFieldData(item, this.dataKey) : index;\n },\n getPTOptions(key, index) {\n return this.ptm(key, {\n context: {\n index,\n count: this.value.length\n }\n });\n }\n },\n computed: {\n dataP() {\n return cn({\n [this.layout]: this.layout,\n [this.align]: this.align\n });\n }\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" v-bind=\"ptmi('root')\" :data-p=\"dataP\">\n <div v-for=\"(item, index) of value\" :key=\"getKey(item, index)\" :class=\"cx('event')\" v-bind=\"getPTOptions('event', index)\" :data-p=\"dataP\">\n <div :class=\"cx('eventOpposite', { index })\" v-bind=\"getPTOptions('eventOpposite', index)\" :data-p=\"dataP\">\n <slot name=\"opposite\" :item=\"item\" :index=\"index\"></slot>\n </div>\n <div :class=\"cx('eventSeparator')\" v-bind=\"getPTOptions('eventSeparator', index)\" :data-p=\"dataP\">\n <slot name=\"marker\" :item=\"item\" :index=\"index\">\n <div :class=\"cx('eventMarker')\" v-bind=\"getPTOptions('eventMarker', index)\" :data-p=\"dataP\"></div>\n </slot>\n <slot v-if=\"index !== value.length - 1\" name=\"connector\" :item=\"item\" :index=\"index\">\n <div :class=\"cx('eventConnector')\" v-bind=\"getPTOptions('eventConnector', index)\" :data-p=\"dataP\"></div>\n </slot>\n </div>\n <div :class=\"cx('eventContent')\" v-bind=\"getPTOptions('eventContent', index)\" :data-p=\"dataP\">\n <slot name=\"content\" :item=\"item\" :index=\"index\"></slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { resolveFieldData } from '@primeuix/utils/object';\nimport BaseTimeline from './BaseTimeline.vue';\n\nexport default {\n name: 'Timeline',\n extends: BaseTimeline,\n inheritAttrs: false,\n methods: {\n getKey(item, index) {\n return this.dataKey ? resolveFieldData(item, this.dataKey) : index;\n },\n getPTOptions(key, index) {\n return this.ptm(key, {\n context: {\n index,\n count: this.value.length\n }\n });\n }\n },\n computed: {\n dataP() {\n return cn({\n [this.layout]: this.layout,\n [this.align]: this.align\n });\n }\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","value","align","mode","String","layout","dataKey","style","TimelineStyle","provide","$pcTimeline","$parentInstance","BaseTimeline","inheritAttrs","methods","getKey","item","index","resolveFieldData","getPTOptions","key","ptm","context","count","length","computed","dataP","cn","_defineProperty","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","ptmi","$options","_Fragment","_renderList","_createElementVNode","_renderSlot","$slots","_hoisted_5","_hoisted_6"],"mappings":"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"}
|
package/toast/Toast.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Portal>
|
|
3
|
-
<div ref="container" :class="cx('root')" :style="sx('root', true, { position })" v-bind="ptmi('root')">
|
|
3
|
+
<div ref="container" :class="cx('root')" :style="sx('root', true, { position })" :data-p="dataP" v-bind="ptmi('root')">
|
|
4
4
|
<transition-group name="p-toast-message" tag="div" @enter="onEnter" @leave="onLeave" v-bind="{ ...ptm('transition') }">
|
|
5
5
|
<ToastMessage
|
|
6
6
|
v-for="msg of messages"
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<script>
|
|
26
|
+
import { cn } from '@primeuix/utils';
|
|
26
27
|
import { setAttribute } from '@primeuix/utils/dom';
|
|
27
28
|
import { isEmpty } from '@primeuix/utils/object';
|
|
28
29
|
import { ZIndex } from '@primeuix/utils/zindex';
|
|
@@ -96,6 +97,7 @@ export default {
|
|
|
96
97
|
}
|
|
97
98
|
},
|
|
98
99
|
onRemoveAllGroups() {
|
|
100
|
+
this.messages.forEach((message) => this.$emit('close', { message }));
|
|
99
101
|
this.messages = [];
|
|
100
102
|
},
|
|
101
103
|
onEnter() {
|
|
@@ -145,6 +147,13 @@ export default {
|
|
|
145
147
|
}
|
|
146
148
|
}
|
|
147
149
|
},
|
|
150
|
+
computed: {
|
|
151
|
+
dataP() {
|
|
152
|
+
return cn({
|
|
153
|
+
[this.position]: this.position
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
},
|
|
148
157
|
components: {
|
|
149
158
|
ToastMessage: ToastMessage,
|
|
150
159
|
Portal: Portal
|
package/toast/ToastMessage.vue
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="[cx('message'), message.styleClass]" role="alert" aria-live="assertive" aria-atomic="true" v-bind="ptm('message')" @click="onMessageClick" @mouseenter="onMouseEnter" @mouseleave="onMouseLeave">
|
|
2
|
+
<div :class="[cx('message'), message.styleClass]" role="alert" aria-live="assertive" aria-atomic="true" :data-p="dataP" v-bind="ptm('message')" @click="onMessageClick" @mouseenter="onMouseEnter" @mouseleave="onMouseLeave">
|
|
3
3
|
<component v-if="templates.container" :is="templates.container" :message="message" :closeCallback="onCloseClick" />
|
|
4
4
|
<div v-else :class="[cx('messageContent'), message.contentStyleClass]" v-bind="ptm('messageContent')">
|
|
5
5
|
<template v-if="!templates.message">
|
|
6
6
|
<component :is="templates.messageicon ? templates.messageicon : templates.icon ? templates.icon : iconComponent && iconComponent.name ? iconComponent : 'span'" :class="cx('messageIcon')" v-bind="ptm('messageIcon')" />
|
|
7
|
-
<div :class="cx('messageText')" v-bind="ptm('messageText')">
|
|
8
|
-
<span :class="cx('summary')" v-bind="ptm('summary')">{{ message.summary }}</span>
|
|
9
|
-
<div :class="cx('detail')" v-bind="ptm('detail')">{{ message.detail }}</div>
|
|
7
|
+
<div :class="cx('messageText')" :data-p="dataP" v-bind="ptm('messageText')">
|
|
8
|
+
<span :class="cx('summary')" :data-p="dataP" v-bind="ptm('summary')">{{ message.summary }}</span>
|
|
9
|
+
<div v-if="message.detail" :class="cx('detail')" :data-p="dataP" v-bind="ptm('detail')">{{ message.detail }}</div>
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
<component v-else :is="templates.message" :message="message"></component>
|
|
13
13
|
<div v-if="message.closable !== false" v-bind="ptm('buttonContainer')">
|
|
14
|
-
<button v-ripple :class="cx('closeButton')" type="button" :aria-label="closeAriaLabel" @click="onCloseClick" autofocus v-bind="{ ...closeButtonProps, ...ptm('closeButton') }">
|
|
14
|
+
<button v-ripple :class="cx('closeButton')" type="button" :aria-label="closeAriaLabel" @click="onCloseClick" autofocus :data-p="dataP" v-bind="{ ...closeButtonProps, ...ptm('closeButton') }">
|
|
15
15
|
<component :is="templates.closeicon || 'TimesIcon'" :class="[cx('closeIcon'), closeIcon]" v-bind="ptm('closeIcon')" />
|
|
16
16
|
</button>
|
|
17
17
|
</div>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script>
|
|
23
|
+
import { cn } from '@primeuix/utils';
|
|
23
24
|
import BaseComponent from '@primevue/core/basecomponent';
|
|
24
25
|
import CheckIcon from '@primevue/icons/check';
|
|
25
26
|
import ExclamationTriangleIcon from '@primevue/icons/exclamationtriangle';
|
|
@@ -103,27 +104,31 @@ export default {
|
|
|
103
104
|
this.props?.onClick && this.props.onClick({ originalEvent: event, message: this.message });
|
|
104
105
|
},
|
|
105
106
|
onMouseEnter(event) {
|
|
106
|
-
this.props?.onMouseEnter
|
|
107
|
+
if (this.props?.onMouseEnter) {
|
|
108
|
+
this.props.onMouseEnter({ originalEvent: event, message: this.message });
|
|
107
109
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
if (event.defaultPrevented) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
111
113
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
if (this.message.life) {
|
|
115
|
+
this.lifeRemaining = this.createdAt + this.lifeRemaining - Date().valueOf();
|
|
116
|
+
this.createdAt = null;
|
|
117
|
+
this.clearCloseTimeout();
|
|
118
|
+
}
|
|
116
119
|
}
|
|
117
120
|
},
|
|
118
121
|
onMouseLeave(event) {
|
|
119
|
-
this.props?.onMouseLeave
|
|
122
|
+
if (this.props?.onMouseLeave) {
|
|
123
|
+
this.props.onMouseLeave({ originalEvent: event, message: this.message });
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
if (event.defaultPrevented) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
124
128
|
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
if (this.message.life) {
|
|
130
|
+
this.startTimeout();
|
|
131
|
+
}
|
|
127
132
|
}
|
|
128
133
|
}
|
|
129
134
|
},
|
|
@@ -138,6 +143,11 @@ export default {
|
|
|
138
143
|
},
|
|
139
144
|
closeAriaLabel() {
|
|
140
145
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
|
146
|
+
},
|
|
147
|
+
dataP() {
|
|
148
|
+
return cn({
|
|
149
|
+
[this.message.severity]: this.message.severity
|
|
150
|
+
});
|
|
141
151
|
}
|
|
142
152
|
},
|
|
143
153
|
components: {
|
package/toast/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module toast
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
|
|
10
|
+
import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } from '@primevue/core';
|
|
11
11
|
import type { ComponentHooks } from '@primevue/core/basecomponent';
|
|
12
12
|
import type { PassThroughOptions } from 'primevue/passthrough';
|
|
13
13
|
import { ButtonHTMLAttributes, TransitionProps, VNode } from 'vue';
|
|
@@ -117,7 +117,7 @@ export interface ToastMessageOptions {
|
|
|
117
117
|
* Severity level of the message.
|
|
118
118
|
* @defaultValue info
|
|
119
119
|
*/
|
|
120
|
-
severity?: 'success' | 'info' | 'warn' | 'error' | 'secondary' | 'contrast' | undefined;
|
|
120
|
+
severity?: HintedString<'success' | 'info' | 'warn' | 'error' | 'secondary' | 'contrast'> | undefined;
|
|
121
121
|
/**
|
|
122
122
|
* Summary content of the message.
|
|
123
123
|
*/
|
package/toast/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cn } from '@primeuix/utils';
|
|
1
2
|
import { setAttribute } from '@primeuix/utils/dom';
|
|
2
3
|
import { isEmpty } from '@primeuix/utils/object';
|
|
3
4
|
import { ZIndex } from '@primeuix/utils/zindex';
|
|
@@ -83,6 +84,10 @@ var script$2 = {
|
|
|
83
84
|
}
|
|
84
85
|
};
|
|
85
86
|
|
|
87
|
+
function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); }
|
|
88
|
+
function _defineProperty$3(e, r, t) { return (r = _toPropertyKey$3(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
|
|
89
|
+
function _toPropertyKey$3(t) { var i = _toPrimitive$3(t, "string"); return "symbol" == _typeof$3(i) ? i : i + ""; }
|
|
90
|
+
function _toPrimitive$3(t, r) { if ("object" != _typeof$3(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$3(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
86
91
|
var script$1 = {
|
|
87
92
|
name: 'ToastMessage',
|
|
88
93
|
hostName: 'Toast',
|
|
@@ -170,30 +175,34 @@ var script$1 = {
|
|
|
170
175
|
},
|
|
171
176
|
onMouseEnter: function onMouseEnter(event) {
|
|
172
177
|
var _this$props2;
|
|
173
|
-
((_this$props2 = this.props)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
if ((_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.onMouseEnter) {
|
|
179
|
+
this.props.onMouseEnter({
|
|
180
|
+
originalEvent: event,
|
|
181
|
+
message: this.message
|
|
182
|
+
});
|
|
183
|
+
if (event.defaultPrevented) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (this.message.life) {
|
|
187
|
+
this.lifeRemaining = this.createdAt + this.lifeRemaining - Date().valueOf();
|
|
188
|
+
this.createdAt = null;
|
|
189
|
+
this.clearCloseTimeout();
|
|
190
|
+
}
|
|
184
191
|
}
|
|
185
192
|
},
|
|
186
193
|
onMouseLeave: function onMouseLeave(event) {
|
|
187
194
|
var _this$props3;
|
|
188
|
-
((_this$props3 = this.props)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
this.
|
|
195
|
+
if ((_this$props3 = this.props) !== null && _this$props3 !== void 0 && _this$props3.onMouseLeave) {
|
|
196
|
+
this.props.onMouseLeave({
|
|
197
|
+
originalEvent: event,
|
|
198
|
+
message: this.message
|
|
199
|
+
});
|
|
200
|
+
if (event.defaultPrevented) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (this.message.life) {
|
|
204
|
+
this.startTimeout();
|
|
205
|
+
}
|
|
197
206
|
}
|
|
198
207
|
}
|
|
199
208
|
},
|
|
@@ -208,6 +217,9 @@ var script$1 = {
|
|
|
208
217
|
},
|
|
209
218
|
closeAriaLabel: function closeAriaLabel() {
|
|
210
219
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
|
220
|
+
},
|
|
221
|
+
dataP: function dataP() {
|
|
222
|
+
return cn(_defineProperty$3({}, this.message.severity, this.message.severity));
|
|
211
223
|
}
|
|
212
224
|
},
|
|
213
225
|
components: {
|
|
@@ -222,20 +234,25 @@ var script$1 = {
|
|
|
222
234
|
}
|
|
223
235
|
};
|
|
224
236
|
|
|
225
|
-
function _typeof$
|
|
237
|
+
function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
|
|
226
238
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
227
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty$
|
|
228
|
-
function _defineProperty$
|
|
229
|
-
function _toPropertyKey$
|
|
230
|
-
function _toPrimitive$
|
|
231
|
-
var _hoisted_1 = ["
|
|
239
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
240
|
+
function _defineProperty$2(e, r, t) { return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
|
|
241
|
+
function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$2(i) ? i : i + ""; }
|
|
242
|
+
function _toPrimitive$2(t, r) { if ("object" != _typeof$2(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$2(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
243
|
+
var _hoisted_1$1 = ["data-p"];
|
|
244
|
+
var _hoisted_2 = ["data-p"];
|
|
245
|
+
var _hoisted_3 = ["data-p"];
|
|
246
|
+
var _hoisted_4 = ["data-p"];
|
|
247
|
+
var _hoisted_5 = ["aria-label", "data-p"];
|
|
232
248
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
233
249
|
var _directive_ripple = resolveDirective("ripple");
|
|
234
250
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
235
251
|
"class": [_ctx.cx('message'), $props.message.styleClass],
|
|
236
252
|
role: "alert",
|
|
237
253
|
"aria-live": "assertive",
|
|
238
|
-
"aria-atomic": "true"
|
|
254
|
+
"aria-atomic": "true",
|
|
255
|
+
"data-p": $options.dataP
|
|
239
256
|
}, _ctx.ptm('message'), {
|
|
240
257
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
241
258
|
return $options.onMessageClick && $options.onMessageClick.apply($options, arguments);
|
|
@@ -258,12 +275,16 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
258
275
|
}, [(openBlock(), createBlock(resolveDynamicComponent($props.templates.messageicon ? $props.templates.messageicon : $props.templates.icon ? $props.templates.icon : $options.iconComponent && $options.iconComponent.name ? $options.iconComponent : 'span'), mergeProps({
|
|
259
276
|
"class": _ctx.cx('messageIcon')
|
|
260
277
|
}, _ctx.ptm('messageIcon')), null, 16, ["class"])), createElementVNode("div", mergeProps({
|
|
261
|
-
"class": _ctx.cx('messageText')
|
|
278
|
+
"class": _ctx.cx('messageText'),
|
|
279
|
+
"data-p": $options.dataP
|
|
262
280
|
}, _ctx.ptm('messageText')), [createElementVNode("span", mergeProps({
|
|
263
|
-
"class": _ctx.cx('summary')
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
281
|
+
"class": _ctx.cx('summary'),
|
|
282
|
+
"data-p": $options.dataP
|
|
283
|
+
}, _ctx.ptm('summary')), toDisplayString($props.message.summary), 17, _hoisted_3), $props.message.detail ? (openBlock(), createElementBlock("div", mergeProps({
|
|
284
|
+
key: 0,
|
|
285
|
+
"class": _ctx.cx('detail'),
|
|
286
|
+
"data-p": $options.dataP
|
|
287
|
+
}, _ctx.ptm('detail')), toDisplayString($props.message.detail), 17, _hoisted_4)) : createCommentVNode("", true)], 16, _hoisted_2)], 64)) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.message), {
|
|
267
288
|
key: 1,
|
|
268
289
|
message: $props.message
|
|
269
290
|
}, null, 8, ["message"])), $props.message.closable !== false ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({
|
|
@@ -275,14 +296,19 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
275
296
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
276
297
|
return $options.onCloseClick && $options.onCloseClick.apply($options, arguments);
|
|
277
298
|
}),
|
|
278
|
-
autofocus: ""
|
|
299
|
+
autofocus: "",
|
|
300
|
+
"data-p": $options.dataP
|
|
279
301
|
}, _objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm('closeButton'))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.closeicon || 'TimesIcon'), mergeProps({
|
|
280
302
|
"class": [_ctx.cx('closeIcon'), $props.closeIcon]
|
|
281
|
-
}, _ctx.ptm('closeIcon')), null, 16, ["class"]))], 16,
|
|
303
|
+
}, _ctx.ptm('closeIcon')), null, 16, ["class"]))], 16, _hoisted_5)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16, _hoisted_1$1);
|
|
282
304
|
}
|
|
283
305
|
|
|
284
306
|
script$1.render = render$1;
|
|
285
307
|
|
|
308
|
+
function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
|
|
309
|
+
function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
|
|
310
|
+
function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; }
|
|
311
|
+
function _toPrimitive$1(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
286
312
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
287
313
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
288
314
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -355,6 +381,12 @@ var script = {
|
|
|
355
381
|
}
|
|
356
382
|
},
|
|
357
383
|
onRemoveAllGroups: function onRemoveAllGroups() {
|
|
384
|
+
var _this = this;
|
|
385
|
+
this.messages.forEach(function (message) {
|
|
386
|
+
return _this.$emit('close', {
|
|
387
|
+
message: message
|
|
388
|
+
});
|
|
389
|
+
});
|
|
358
390
|
this.messages = [];
|
|
359
391
|
},
|
|
360
392
|
onEnter: function onEnter() {
|
|
@@ -363,10 +395,10 @@ var script = {
|
|
|
363
395
|
}
|
|
364
396
|
},
|
|
365
397
|
onLeave: function onLeave() {
|
|
366
|
-
var
|
|
398
|
+
var _this2 = this;
|
|
367
399
|
if (this.$refs.container && this.autoZIndex && isEmpty(this.messages)) {
|
|
368
400
|
setTimeout(function () {
|
|
369
|
-
ZIndex.clear(
|
|
401
|
+
ZIndex.clear(_this2.$refs.container);
|
|
370
402
|
}, 200);
|
|
371
403
|
}
|
|
372
404
|
},
|
|
@@ -395,6 +427,11 @@ var script = {
|
|
|
395
427
|
}
|
|
396
428
|
}
|
|
397
429
|
},
|
|
430
|
+
computed: {
|
|
431
|
+
dataP: function dataP() {
|
|
432
|
+
return cn(_defineProperty$1({}, this.position, this.position));
|
|
433
|
+
}
|
|
434
|
+
},
|
|
398
435
|
components: {
|
|
399
436
|
ToastMessage: script$1,
|
|
400
437
|
Portal: Portal
|
|
@@ -407,6 +444,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
407
444
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
|
|
408
445
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
409
446
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
447
|
+
var _hoisted_1 = ["data-p"];
|
|
410
448
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
411
449
|
var _component_ToastMessage = resolveComponent("ToastMessage");
|
|
412
450
|
var _component_Portal = resolveComponent("Portal");
|
|
@@ -417,7 +455,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
417
455
|
"class": _ctx.cx('root'),
|
|
418
456
|
style: _ctx.sx('root', true, {
|
|
419
457
|
position: _ctx.position
|
|
420
|
-
})
|
|
458
|
+
}),
|
|
459
|
+
"data-p": $options.dataP
|
|
421
460
|
}, _ctx.ptmi('root')), [createVNode(TransitionGroup, mergeProps({
|
|
422
461
|
name: "p-toast-message",
|
|
423
462
|
tag: "div",
|
|
@@ -445,7 +484,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
445
484
|
}), 128))];
|
|
446
485
|
}),
|
|
447
486
|
_: 1
|
|
448
|
-
}, 16, ["onEnter", "onLeave"])], 16)];
|
|
487
|
+
}, 16, ["onEnter", "onLeave"])], 16, _hoisted_1)];
|
|
449
488
|
}),
|
|
450
489
|
_: 1
|
|
451
490
|
});
|