primevue 4.3.1 → 4.3.2

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.
Files changed (173) hide show
  1. package/accordionheader/AccordionHeader.vue +8 -2
  2. package/accordionheader/index.mjs +8 -1
  3. package/accordionheader/index.mjs.map +1 -1
  4. package/autocomplete/AutoComplete.vue +16 -6
  5. package/autocomplete/index.d.ts +3 -3
  6. package/autocomplete/index.mjs +17 -4
  7. package/autocomplete/index.mjs.map +1 -1
  8. package/avatar/Avatar.vue +13 -4
  9. package/avatar/index.d.ts +3 -3
  10. package/avatar/index.mjs +26 -6
  11. package/avatar/index.mjs.map +1 -1
  12. package/badge/Badge.vue +13 -2
  13. package/badge/index.d.ts +1 -1
  14. package/badge/index.mjs +18 -3
  15. package/badge/index.mjs.map +1 -1
  16. package/blockui/BlockUI.vue +15 -4
  17. package/blockui/index.mjs +13 -4
  18. package/blockui/index.mjs.map +1 -1
  19. package/button/Button.vue +30 -3
  20. package/button/index.d.ts +3 -7
  21. package/button/index.mjs +28 -9
  22. package/button/index.mjs.map +1 -1
  23. package/cascadeselect/index.d.ts +2 -2
  24. package/checkbox/Checkbox.vue +14 -4
  25. package/checkbox/index.d.ts +2 -2
  26. package/checkbox/index.mjs +27 -6
  27. package/checkbox/index.mjs.map +1 -1
  28. package/chip/Chip.vue +9 -1
  29. package/chip/index.mjs +12 -2
  30. package/chip/index.mjs.map +1 -1
  31. package/colorpicker/ColorPicker.vue +10 -2
  32. package/colorpicker/index.d.ts +1 -1
  33. package/colorpicker/index.mjs +9 -2
  34. package/colorpicker/index.mjs.map +1 -1
  35. package/column/index.d.ts +3 -3
  36. package/columngroup/index.d.ts +2 -2
  37. package/confirmationoptions/index.d.ts +1 -1
  38. package/datatable/BodyCell.vue +3 -1
  39. package/datatable/BodyRow.vue +2 -0
  40. package/datatable/index.d.ts +10 -10
  41. package/datatable/index.mjs +7 -2
  42. package/datatable/index.mjs.map +1 -1
  43. package/dataview/index.d.ts +3 -3
  44. package/datepicker/DatePicker.vue +1 -1
  45. package/datepicker/index.d.ts +6 -6
  46. package/datepicker/index.mjs +1 -1
  47. package/datepicker/index.mjs.map +1 -1
  48. package/dialog/Dialog.vue +48 -39
  49. package/dialog/index.d.ts +26 -1
  50. package/dialog/index.mjs +73 -50
  51. package/dialog/index.mjs.map +1 -1
  52. package/divider/Divider.vue +13 -3
  53. package/divider/index.d.ts +4 -4
  54. package/divider/index.mjs +18 -5
  55. package/divider/index.mjs.map +1 -1
  56. package/dock/index.d.ts +4 -4
  57. package/drawer/index.d.ts +2 -2
  58. package/fieldset/Fieldset.vue +8 -2
  59. package/fieldset/index.mjs +20 -10
  60. package/fieldset/index.mjs.map +1 -1
  61. package/fileupload/index.d.ts +2 -2
  62. package/floatlabel/index.d.ts +2 -2
  63. package/galleria/GalleriaItem.vue +8 -9
  64. package/galleria/index.d.ts +3 -3
  65. package/galleria/index.mjs +8 -8
  66. package/galleria/index.mjs.map +1 -1
  67. package/inputchips/index.d.ts +2 -2
  68. package/inputmask/InputMask.vue +15 -1
  69. package/inputmask/index.d.ts +3 -3
  70. package/inputmask/index.mjs +12 -1
  71. package/inputmask/index.mjs.map +1 -1
  72. package/inputnumber/InputNumber.vue +27 -5
  73. package/inputnumber/index.d.ts +6 -6
  74. package/inputnumber/index.mjs +41 -18
  75. package/inputnumber/index.mjs.map +1 -1
  76. package/inputotp/index.d.ts +3 -3
  77. package/inputtext/InputText.vue +10 -1
  78. package/inputtext/index.d.ts +3 -3
  79. package/inputtext/index.mjs +14 -1
  80. package/inputtext/index.mjs.map +1 -1
  81. package/knob/Knob.vue +1 -1
  82. package/knob/index.mjs +1 -1
  83. package/knob/index.mjs.map +1 -1
  84. package/megamenu/index.d.ts +2 -2
  85. package/message/Message.vue +16 -7
  86. package/message/index.d.ts +2 -2
  87. package/message/index.mjs +35 -13
  88. package/message/index.mjs.map +1 -1
  89. package/multiselect/MultiSelect.vue +5 -1
  90. package/multiselect/index.d.ts +3 -3
  91. package/multiselect/index.mjs +4 -1
  92. package/multiselect/index.mjs.map +1 -1
  93. package/organizationchart/index.d.ts +2 -2
  94. package/overlaybadge/index.d.ts +1 -1
  95. package/package.json +3 -3
  96. package/panel/Panel.vue +29 -22
  97. package/panel/index.d.ts +22 -2
  98. package/panel/index.mjs +55 -31
  99. package/panel/index.mjs.map +1 -1
  100. package/password/index.d.ts +2 -2
  101. package/popover/Popover.vue +2 -2
  102. package/popover/index.mjs +2 -2
  103. package/popover/index.mjs.map +1 -1
  104. package/progressbar/ProgressBar.vue +11 -4
  105. package/progressbar/index.mjs +24 -6
  106. package/progressbar/index.mjs.map +1 -1
  107. package/radiobutton/RadioButton.vue +13 -3
  108. package/radiobutton/index.d.ts +3 -3
  109. package/radiobutton/index.mjs +24 -4
  110. package/radiobutton/index.mjs.map +1 -1
  111. package/rating/Rating.vue +19 -2
  112. package/rating/index.mjs +28 -7
  113. package/rating/index.mjs.map +1 -1
  114. package/scrolltop/index.d.ts +2 -2
  115. package/select/Select.vue +8 -4
  116. package/select/index.d.ts +2 -2
  117. package/select/index.mjs +9 -5
  118. package/select/index.mjs.map +1 -1
  119. package/selectbutton/SelectButton.vue +26 -9
  120. package/selectbutton/index.d.ts +2 -2
  121. package/selectbutton/index.mjs +30 -10
  122. package/selectbutton/index.mjs.map +1 -1
  123. package/skeleton/Skeleton.vue +7 -1
  124. package/skeleton/index.d.ts +3 -3
  125. package/skeleton/index.mjs +12 -1
  126. package/skeleton/index.mjs.map +1 -1
  127. package/slider/Slider.vue +11 -2
  128. package/slider/index.d.ts +2 -2
  129. package/slider/index.mjs +27 -8
  130. package/slider/index.mjs.map +1 -1
  131. package/speeddial/index.d.ts +5 -5
  132. package/splitbutton/index.d.ts +1 -1
  133. package/splitter/index.d.ts +3 -3
  134. package/stepper/index.d.ts +4 -0
  135. package/tab/Tab.vue +8 -2
  136. package/tab/index.mjs +9 -1
  137. package/tab/index.mjs.map +1 -1
  138. package/tablist/TabList.vue +10 -2
  139. package/tablist/index.mjs +20 -8
  140. package/tablist/index.mjs.map +1 -1
  141. package/tag/Tag.vue +11 -2
  142. package/tag/index.mjs +17 -3
  143. package/tag/index.mjs.map +1 -1
  144. package/textarea/Textarea.vue +10 -1
  145. package/textarea/index.d.ts +3 -3
  146. package/textarea/index.mjs +14 -1
  147. package/textarea/index.mjs.map +1 -1
  148. package/timeline/Timeline.vue +16 -7
  149. package/timeline/index.d.ts +3 -3
  150. package/timeline/index.mjs +42 -11
  151. package/timeline/index.mjs.map +1 -1
  152. package/toast/Toast.vue +10 -1
  153. package/toast/ToastMessage.vue +29 -19
  154. package/toast/index.d.ts +2 -2
  155. package/toast/index.mjs +77 -38
  156. package/toast/index.mjs.map +1 -1
  157. package/togglebutton/ToggleButton.vue +10 -1
  158. package/togglebutton/index.d.ts +3 -3
  159. package/togglebutton/index.mjs +19 -4
  160. package/togglebutton/index.mjs.map +1 -1
  161. package/toggleswitch/ToggleSwitch.vue +11 -3
  162. package/toggleswitch/index.mjs +20 -5
  163. package/toggleswitch/index.mjs.map +1 -1
  164. package/tooltip/index.mjs +0 -6
  165. package/tooltip/index.mjs.map +1 -1
  166. package/tree/index.d.ts +3 -3
  167. package/treeselect/index.d.ts +6 -6
  168. package/treetable/index.d.ts +7 -7
  169. package/treetable/style/index.mjs +2 -3
  170. package/treetable/style/index.mjs.map +1 -1
  171. package/umd/primevue.min.js +1 -1
  172. package/virtualscroller/index.d.ts +2 -2
  173. package/web-types.json +1 -1
@@ -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')), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.value, function (item, index) {
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)), [createElementVNode("div", mergeProps({
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)), [renderSlot(_ctx.$slots, "opposite", {
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)), [renderSlot(_ctx.$slots, "marker", {
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)), null, 16)];
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)), null, 16)];
85
- }) : createCommentVNode("", true)], 16), createElementVNode("div", mergeProps({
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)), [renderSlot(_ctx.$slots, "content", {
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;
@@ -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=400cfd06&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')\">\n <div v-for=\"(item, index) of value\" :key=\"getKey(item, index)\" :class=\"cx('event')\" v-bind=\"getPTOptions('event', index)\">\n <div :class=\"cx('eventOpposite', { index })\" v-bind=\"getPTOptions('eventOpposite', index)\">\n <slot name=\"opposite\" :item=\"item\" :index=\"index\"></slot>\n </div>\n <div :class=\"cx('eventSeparator')\" v-bind=\"getPTOptions('eventSeparator', index)\">\n <slot name=\"marker\" :item=\"item\" :index=\"index\">\n <div :class=\"cx('eventMarker')\" v-bind=\"getPTOptions('eventMarker', index)\"></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)\"></div>\n </slot>\n </div>\n <div :class=\"cx('eventContent')\" v-bind=\"getPTOptions('eventContent', index)\">\n <slot name=\"content\" :item=\"item\" :index=\"index\"></slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\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};\n</script>\n","<template>\n <div :class=\"cx('root')\" v-bind=\"ptmi('root')\">\n <div v-for=\"(item, index) of value\" :key=\"getKey(item, index)\" :class=\"cx('event')\" v-bind=\"getPTOptions('event', index)\">\n <div :class=\"cx('eventOpposite', { index })\" v-bind=\"getPTOptions('eventOpposite', index)\">\n <slot name=\"opposite\" :item=\"item\" :index=\"index\"></slot>\n </div>\n <div :class=\"cx('eventSeparator')\" v-bind=\"getPTOptions('eventSeparator', index)\">\n <slot name=\"marker\" :item=\"item\" :index=\"index\">\n <div :class=\"cx('eventMarker')\" v-bind=\"getPTOptions('eventMarker', index)\"></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)\"></div>\n </slot>\n </div>\n <div :class=\"cx('eventContent')\" v-bind=\"getPTOptions('eventContent', index)\">\n <slot name=\"content\" :item=\"item\" :index=\"index\"></slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\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};\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","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","ptmi","_Fragment","_renderList","$options","_createElementVNode","_renderSlot","$slots"],"mappings":";;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,cAAc;AACpB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,KAAK,EAAE;AACHC,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,MAAM,EAAE;AACJF,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDE,IAAAA,OAAO,EAAE;GACZ;AACDC,EAAAA,KAAK,EAAEC,aAAa;EACpBC,OAAO,EAAA,SAAPA,OAAOA,GAAG;IACN,OAAO;AACHC,MAAAA,WAAW,EAAE,IAAI;AACjBC,MAAAA,eAAe,EAAE;KACpB;AACL;AACJ,CAAC;;ACDD,aAAe;AACXb,EAAAA,IAAI,EAAE,UAAU;AAChB,EAAA,SAAA,EAASc,QAAY;AACrBC,EAAAA,YAAY,EAAE,KAAK;AACnBC,EAAAA,OAAO,EAAE;AACLC,IAAAA,MAAM,WAANA,MAAMA,CAACC,IAAI,EAAEC,KAAK,EAAE;AAChB,MAAA,OAAO,IAAI,CAACX,OAAM,GAAIY,gBAAgB,CAACF,IAAI,EAAE,IAAI,CAACV,OAAO,CAAE,GAAEW,KAAK;KACrE;AACDE,IAAAA,YAAY,WAAZA,YAAYA,CAACC,GAAG,EAAEH,KAAK,EAAE;AACrB,MAAA,OAAO,IAAI,CAACI,GAAG,CAACD,GAAG,EAAE;AACjBE,QAAAA,OAAO,EAAE;AACLL,UAAAA,KAAK,EAALA,KAAK;AACLM,UAAAA,KAAK,EAAE,IAAI,CAACtB,KAAK,CAACuB;AACtB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FepB,MAAAA,IAAI,EAAEA,IAAI;AAAGC,MAAAA,KAAK,EAAEA;OAAzC,YAAA;AAAA,MAAA,OAEM,CADFiB,kBAAA,CAAiF,OAAjFP,UAAiF,CAAA;AAA3E,QAAA,OAAA,EAAOC,IAAE,CAAAC,EAAA,CAAA,aAAA,CAAA;;AAAyB,OAAA,EAAAI,QAAA,CAAAd,YAAY,gBAAgBF,KAAK,CAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA;QAEjEA,UAAUW,IAAK,CAAA3B,KAAA,CAACuB,aAA5BW,UAEM,CAAAP,IAAA,CAAAQ,MAAA,EAAA,WAAA,EAAA;;AAFoDpB,MAAAA,IAAI,EAAEA,IAAI;AAAGC,MAAAA,KAAK,EAAEA;OAA9E,YAAA;AAAA,MAAA,OAEM,CADFiB,kBAAA,CAAuF,OAAvFP,UAAuF,CAAA;AAAjF,QAAA,OAAA,EAAOC,IAAE,CAAAC,EAAA,CAAA,gBAAA,CAAA;;AAA4B,OAAA,EAAAI,QAAA,CAAAd,YAAY,mBAAmBF,KAAK,CAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA;6CAGvFiB,kBAAA,CAEK,OAFLP,UAEK,CAAA;AAFC,MAAA,OAAA,EAAOC,IAAE,CAAAC,EAAA,CAAA,cAAA,CAAA;;AAA0B,KAAA,EAAAI,QAAA,CAAAd,YAAY,iBAAiBF,KAAK,CAAA,CAAA,EAAA,CACvEkB,UAAuD,CAAAP,IAAA,CAAAQ,MAAA,EAAA,SAAA,EAAA;AAAjCpB,MAAAA,IAAI,EAAEA,IAAI;AAAGC,MAAAA,KAAK,EAAEA;;;;;;;;;"}
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":";;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,cAAc;AACpB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,KAAK,EAAE;AACHC,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,MAAM,EAAE;AACJF,MAAAA,IAAI,EAAEC,MAAM;MACZ,SAAS,EAAA;KACZ;AACDE,IAAAA,OAAO,EAAE;GACZ;AACDC,EAAAA,KAAK,EAAEC,aAAa;EACpBC,OAAO,EAAA,SAAPA,OAAOA,GAAG;IACN,OAAO;AACHC,MAAAA,WAAW,EAAE,IAAI;AACjBC,MAAAA,eAAe,EAAE;KACpB;AACL;AACJ,CAAC;;;;;;ACAD,aAAe;AACXb,EAAAA,IAAI,EAAE,UAAU;AAChB,EAAA,SAAA,EAASc,QAAY;AACrBC,EAAAA,YAAY,EAAE,KAAK;AACnBC,EAAAA,OAAO,EAAE;AACLC,IAAAA,MAAM,WAANA,MAAMA,CAACC,IAAI,EAAEC,KAAK,EAAE;AAChB,MAAA,OAAO,IAAI,CAACX,OAAM,GAAIY,gBAAgB,CAACF,IAAI,EAAE,IAAI,CAACV,OAAO,CAAE,GAAEW,KAAK;KACrE;AACDE,IAAAA,YAAY,WAAZA,YAAYA,CAACC,GAAG,EAAEH,KAAK,EAAE;AACrB,MAAA,OAAO,IAAI,CAACI,GAAG,CAACD,GAAG,EAAE;AACjBE,QAAAA,OAAO,EAAE;AACLL,UAAAA,KAAK,EAALA,KAAK;AACLM,UAAAA,KAAK,EAAE,IAAI,CAACtB,KAAK,CAACuB;AACtB;AACJ,OAAC,CAAC;AACN;GACH;AACDC,EAAAA,QAAQ,EAAE;IACNC,KAAK,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kBAAA,CAEK,OAFLP,UAEK,CAAA;AAFC,MAAA,OAAA,EAAOC,IAAE,CAAAC,EAAA,CAAA,cAAA,CAAA;;KAA0B,EAAAE,QAAA,CAAAhB,YAAY,CAAiB,cAAA,EAAAF,KAAK,CAAI,EAAA;MAAA,QAAM,EAAEkB,QAAK,CAAAT;KAAA,CAAA,EAAA,CACxFa,UAAuD,CAAAP,IAAA,CAAAQ,MAAA,EAAA,SAAA,EAAA;AAAjCxB,MAAAA,IAAI,EAAEA,IAAI;AAAGC,MAAAA,KAAK,EAAEA;;;;;;;;;"}
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
@@ -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 && this.props.onMouseEnter({ originalEvent: event, message: this.message });
107
+ if (this.props?.onMouseEnter) {
108
+ this.props.onMouseEnter({ originalEvent: event, message: this.message });
107
109
 
108
- if (event.defaultPrevented) {
109
- return;
110
- }
110
+ if (event.defaultPrevented) {
111
+ return;
112
+ }
111
113
 
112
- if (this.message.life) {
113
- this.lifeRemaining = this.createdAt + this.lifeRemaining - Date().valueOf();
114
- this.createdAt = null;
115
- this.clearCloseTimeout();
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 && this.props.onMouseLeave({ originalEvent: event, message: this.message });
122
+ if (this.props?.onMouseLeave) {
123
+ this.props.onMouseLeave({ originalEvent: event, message: this.message });
120
124
 
121
- if (event.defaultPrevented) {
122
- return;
123
- }
125
+ if (event.defaultPrevented) {
126
+ return;
127
+ }
124
128
 
125
- if (this.message.life) {
126
- this.startTimeout();
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) === null || _this$props2 === void 0 ? void 0 : _this$props2.onMouseEnter) && this.props.onMouseEnter({
174
- originalEvent: event,
175
- message: this.message
176
- });
177
- if (event.defaultPrevented) {
178
- return;
179
- }
180
- if (this.message.life) {
181
- this.lifeRemaining = this.createdAt + this.lifeRemaining - Date().valueOf();
182
- this.createdAt = null;
183
- this.clearCloseTimeout();
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) === null || _this$props3 === void 0 ? void 0 : _this$props3.onMouseLeave) && this.props.onMouseLeave({
189
- originalEvent: event,
190
- message: this.message
191
- });
192
- if (event.defaultPrevented) {
193
- return;
194
- }
195
- if (this.message.life) {
196
- this.startTimeout();
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$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); }
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$1(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; }
228
- 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; }
229
- function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; }
230
- 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); }
231
- var _hoisted_1 = ["aria-label"];
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
- }, _ctx.ptm('summary')), toDisplayString($props.message.summary), 17), createElementVNode("div", mergeProps({
265
- "class": _ctx.cx('detail')
266
- }, _ctx.ptm('detail')), toDisplayString($props.message.detail), 17)], 16)], 64)) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.message), {
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, _hoisted_1)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 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 _this = this;
398
+ var _this2 = this;
367
399
  if (this.$refs.container && this.autoZIndex && isEmpty(this.messages)) {
368
400
  setTimeout(function () {
369
- ZIndex.clear(_this.$refs.container);
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
  });