primevue 3.42.0 → 3.43.0

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 (293) hide show
  1. package/accordion/Accordion.d.ts +4 -0
  2. package/accordion/Accordion.vue +1 -0
  3. package/accordion/accordion.cjs.js +1 -0
  4. package/accordion/accordion.cjs.min.js +1 -1
  5. package/accordion/accordion.esm.js +1 -0
  6. package/accordion/accordion.esm.min.js +1 -1
  7. package/accordion/accordion.js +1 -0
  8. package/accordion/accordion.min.js +1 -1
  9. package/accordiontab/AccordionTab.d.ts +2 -3
  10. package/api/api.cjs.js +6 -6
  11. package/api/api.cjs.min.js +1 -1
  12. package/api/api.esm.js +6 -6
  13. package/api/api.esm.min.js +1 -1
  14. package/api/api.js +6 -6
  15. package/api/api.min.js +1 -1
  16. package/autocomplete/AutoComplete.d.ts +21 -2
  17. package/avatar/Avatar.d.ts +2 -3
  18. package/avatar/Avatar.vue +4 -11
  19. package/avatar/avatar.cjs.js +4 -11
  20. package/avatar/avatar.cjs.min.js +1 -1
  21. package/avatar/avatar.esm.js +4 -11
  22. package/avatar/avatar.esm.min.js +1 -1
  23. package/avatar/avatar.js +4 -11
  24. package/avatar/avatar.min.js +1 -1
  25. package/badge/Badge.d.ts +8 -4
  26. package/badgedirective/BadgeDirective.d.ts +4 -0
  27. package/basecomponent/BaseComponent.vue +14 -1
  28. package/basecomponent/basecomponent.cjs.js +8 -1
  29. package/basecomponent/basecomponent.cjs.min.js +1 -1
  30. package/basecomponent/basecomponent.esm.js +8 -1
  31. package/basecomponent/basecomponent.esm.min.js +1 -1
  32. package/basecomponent/basecomponent.js +8 -1
  33. package/basecomponent/basecomponent.min.js +1 -1
  34. package/blockui/BlockUI.d.ts +4 -0
  35. package/breadcrumb/Breadcrumb.d.ts +4 -0
  36. package/button/Button.d.ts +10 -10
  37. package/button/Button.vue +1 -5
  38. package/button/button.cjs.js +1 -6
  39. package/button/button.cjs.min.js +1 -1
  40. package/button/button.esm.js +1 -6
  41. package/button/button.esm.min.js +1 -1
  42. package/button/button.js +1 -6
  43. package/button/button.min.js +1 -1
  44. package/calendar/Calendar.d.ts +29 -11
  45. package/calendar/Calendar.vue +9 -18
  46. package/calendar/calendar.cjs.js +8 -17
  47. package/calendar/calendar.cjs.min.js +1 -1
  48. package/calendar/calendar.esm.js +8 -17
  49. package/calendar/calendar.esm.min.js +1 -1
  50. package/calendar/calendar.js +8 -17
  51. package/calendar/calendar.min.js +1 -1
  52. package/carousel/Carousel.d.ts +4 -0
  53. package/carousel/Carousel.vue +4 -2
  54. package/carousel/carousel.cjs.js +3 -1
  55. package/carousel/carousel.cjs.min.js +1 -1
  56. package/carousel/carousel.esm.js +3 -1
  57. package/carousel/carousel.esm.min.js +1 -1
  58. package/carousel/carousel.js +3 -1
  59. package/carousel/carousel.min.js +1 -1
  60. package/cascadeselect/CascadeSelect.d.ts +4 -0
  61. package/chart/Chart.d.ts +4 -0
  62. package/chart/Chart.vue +1 -1
  63. package/chart/chart.cjs.js +2 -1
  64. package/chart/chart.cjs.min.js +1 -1
  65. package/chart/chart.esm.js +2 -1
  66. package/chart/chart.esm.min.js +1 -1
  67. package/chart/chart.js +2 -1
  68. package/chart/chart.min.js +1 -1
  69. package/chart/style/chartstyle.cjs.js +6 -2
  70. package/chart/style/chartstyle.cjs.min.js +1 -1
  71. package/chart/style/chartstyle.esm.js +6 -2
  72. package/chart/style/chartstyle.esm.min.js +1 -1
  73. package/chart/style/chartstyle.js +6 -2
  74. package/chart/style/chartstyle.min.js +1 -1
  75. package/checkbox/Checkbox.d.ts +4 -0
  76. package/chip/Chip.d.ts +4 -0
  77. package/chips/Chips.d.ts +4 -0
  78. package/colorpicker/ColorPicker.d.ts +4 -0
  79. package/column/Column.d.ts +27 -13
  80. package/columngroup/ColumnGroup.d.ts +2 -3
  81. package/config/config.cjs.js +1 -1
  82. package/config/config.cjs.min.js +1 -1
  83. package/config/config.esm.js +1 -1
  84. package/config/config.esm.min.js +1 -1
  85. package/config/config.js +1 -1
  86. package/config/config.min.js +1 -1
  87. package/confirmdialog/ConfirmDialog.d.ts +20 -2
  88. package/confirmpopup/ConfirmPopup.d.ts +20 -2
  89. package/contextmenu/ContextMenu.d.ts +4 -0
  90. package/core/core.js +227 -105
  91. package/core/core.min.js +11 -11
  92. package/datatable/BodyCell.vue +1 -0
  93. package/datatable/ColumnFilter.vue +1 -0
  94. package/datatable/DataTable.d.ts +19 -1
  95. package/datatable/FooterCell.vue +1 -0
  96. package/datatable/HeaderCell.vue +1 -0
  97. package/datatable/HeaderCheckbox.vue +1 -0
  98. package/datatable/RowCheckbox.vue +1 -0
  99. package/datatable/RowRadioButton.vue +1 -0
  100. package/datatable/TableBody.vue +1 -0
  101. package/datatable/TableFooter.vue +2 -0
  102. package/datatable/TableHeader.vue +3 -0
  103. package/datatable/datatable.cjs.js +13 -0
  104. package/datatable/datatable.cjs.min.js +1 -1
  105. package/datatable/datatable.esm.js +13 -0
  106. package/datatable/datatable.esm.min.js +1 -1
  107. package/datatable/datatable.js +13 -0
  108. package/datatable/datatable.min.js +1 -1
  109. package/dataview/DataView.d.ts +20 -1
  110. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +4 -0
  111. package/deferredcontent/DeferredContent.d.ts +4 -0
  112. package/dialog/Dialog.d.ts +20 -16
  113. package/divider/Divider.d.ts +4 -0
  114. package/dock/Dock.d.ts +4 -0
  115. package/dropdown/Dropdown.d.ts +28 -24
  116. package/dropdown/Dropdown.vue +2 -2
  117. package/dropdown/dropdown.cjs.js +2 -2
  118. package/dropdown/dropdown.cjs.min.js +1 -1
  119. package/dropdown/dropdown.esm.js +2 -2
  120. package/dropdown/dropdown.esm.min.js +1 -1
  121. package/dropdown/dropdown.js +2 -2
  122. package/dropdown/dropdown.min.js +1 -1
  123. package/editor/Editor.d.ts +4 -0
  124. package/fieldset/Fieldset.d.ts +4 -0
  125. package/fieldset/Fieldset.vue +1 -1
  126. package/fieldset/fieldset.cjs.js +1 -1
  127. package/fieldset/fieldset.cjs.min.js +1 -1
  128. package/fieldset/fieldset.esm.js +1 -1
  129. package/fieldset/fieldset.esm.min.js +1 -1
  130. package/fieldset/fieldset.js +1 -1
  131. package/fieldset/fieldset.min.js +1 -1
  132. package/fileupload/FileUpload.d.ts +26 -6
  133. package/galleria/BaseGalleria.vue +8 -0
  134. package/galleria/Galleria.d.ts +12 -0
  135. package/galleria/Galleria.vue +1 -1
  136. package/galleria/GalleriaContent.vue +11 -1
  137. package/galleria/GalleriaItem.vue +72 -3
  138. package/galleria/galleria.cjs.js +87 -7
  139. package/galleria/galleria.cjs.min.js +1 -1
  140. package/galleria/galleria.esm.js +87 -7
  141. package/galleria/galleria.esm.min.js +1 -1
  142. package/galleria/galleria.js +87 -7
  143. package/galleria/galleria.min.js +1 -1
  144. package/image/Image.d.ts +4 -0
  145. package/image/Image.vue +4 -1
  146. package/image/image.cjs.js +18 -13
  147. package/image/image.cjs.min.js +1 -1
  148. package/image/image.esm.js +18 -13
  149. package/image/image.esm.min.js +1 -1
  150. package/image/image.js +18 -13
  151. package/image/image.min.js +1 -1
  152. package/inlinemessage/InlineMessage.d.ts +4 -0
  153. package/inplace/Inplace.d.ts +19 -1
  154. package/inputgroup/InputGroup.d.ts +4 -0
  155. package/inputgroupaddon/InputGroupAddon.d.ts +4 -0
  156. package/inputmask/InputMask.d.ts +4 -0
  157. package/inputnumber/InputNumber.d.ts +30 -12
  158. package/inputnumber/InputNumber.vue +10 -5
  159. package/inputnumber/inputnumber.cjs.js +22 -23
  160. package/inputnumber/inputnumber.cjs.min.js +1 -1
  161. package/inputnumber/inputnumber.esm.js +22 -23
  162. package/inputnumber/inputnumber.esm.min.js +1 -1
  163. package/inputnumber/inputnumber.js +22 -23
  164. package/inputnumber/inputnumber.min.js +1 -1
  165. package/inputswitch/InputSwitch.d.ts +4 -0
  166. package/inputtext/InputText.d.ts +8 -4
  167. package/inputtext/InputText.vue +9 -9
  168. package/inputtext/inputtext.cjs.js +9 -9
  169. package/inputtext/inputtext.cjs.min.js +1 -1
  170. package/inputtext/inputtext.esm.js +9 -9
  171. package/inputtext/inputtext.esm.min.js +1 -1
  172. package/inputtext/inputtext.js +9 -9
  173. package/inputtext/inputtext.min.js +1 -1
  174. package/knob/Knob.d.ts +4 -0
  175. package/listbox/Listbox.d.ts +4 -0
  176. package/megamenu/MegaMenu.d.ts +4 -0
  177. package/menu/Menu.d.ts +4 -0
  178. package/menubar/Menubar.d.ts +4 -0
  179. package/message/Message.d.ts +17 -13
  180. package/multiselect/MultiSelect.d.ts +4 -0
  181. package/orderlist/OrderList.d.ts +23 -5
  182. package/orderlist/OrderList.vue +4 -4
  183. package/orderlist/orderlist.cjs.js +16 -16
  184. package/orderlist/orderlist.cjs.min.js +1 -1
  185. package/orderlist/orderlist.esm.js +16 -16
  186. package/orderlist/orderlist.esm.min.js +1 -1
  187. package/orderlist/orderlist.js +16 -16
  188. package/orderlist/orderlist.min.js +1 -1
  189. package/organizationchart/OrganizationChart.d.ts +4 -0
  190. package/overlaypanel/OverlayPanel.d.ts +4 -0
  191. package/package.json +1 -1
  192. package/paginator/Paginator.d.ts +44 -26
  193. package/panel/Panel.d.ts +4 -0
  194. package/panel/Panel.vue +1 -1
  195. package/panel/panel.cjs.js +1 -1
  196. package/panel/panel.cjs.min.js +1 -1
  197. package/panel/panel.esm.js +1 -1
  198. package/panel/panel.esm.min.js +1 -1
  199. package/panel/panel.js +1 -1
  200. package/panel/panel.min.js +1 -1
  201. package/panelmenu/PanelMenu.d.ts +4 -0
  202. package/passthrough/tailwind/index.cjs.js +166 -53
  203. package/passthrough/tailwind/index.cjs.min.js +1 -1
  204. package/passthrough/tailwind/index.esm.js +166 -53
  205. package/passthrough/tailwind/index.esm.min.js +1 -1
  206. package/passthrough/tailwind/index.js +166 -53
  207. package/passthrough/tailwind/index.min.js +1 -1
  208. package/password/Password.d.ts +21 -3
  209. package/password/Password.vue +2 -1
  210. package/password/password.cjs.js +3 -2
  211. package/password/password.cjs.min.js +1 -1
  212. package/password/password.esm.js +3 -2
  213. package/password/password.esm.min.js +1 -1
  214. package/password/password.js +3 -2
  215. package/password/password.min.js +1 -1
  216. package/picklist/PickList.d.ts +31 -13
  217. package/picklist/PickList.vue +48 -12
  218. package/picklist/picklist.cjs.js +47 -35
  219. package/picklist/picklist.cjs.min.js +1 -1
  220. package/picklist/picklist.esm.js +47 -35
  221. package/picklist/picklist.esm.min.js +1 -1
  222. package/picklist/picklist.js +47 -35
  223. package/picklist/picklist.min.js +1 -1
  224. package/progressbar/ProgressBar.d.ts +10 -6
  225. package/progressspinner/ProgressSpinner.d.ts +4 -0
  226. package/radiobutton/RadioButton.d.ts +4 -0
  227. package/rating/Rating.d.ts +4 -0
  228. package/row/Row.d.ts +2 -3
  229. package/scrollpanel/ScrollPanel.d.ts +4 -0
  230. package/scrolltop/ScrollTop.d.ts +4 -0
  231. package/selectbutton/SelectButton.d.ts +4 -0
  232. package/sidebar/Sidebar.d.ts +4 -0
  233. package/skeleton/Skeleton.d.ts +4 -0
  234. package/slider/Slider.d.ts +4 -0
  235. package/speeddial/SpeedDial.d.ts +19 -1
  236. package/splitbutton/SplitButton.d.ts +20 -2
  237. package/splitbutton/SplitButton.vue +2 -2
  238. package/splitbutton/splitbutton.cjs.js +4 -4
  239. package/splitbutton/splitbutton.cjs.min.js +1 -1
  240. package/splitbutton/splitbutton.esm.js +4 -4
  241. package/splitbutton/splitbutton.esm.min.js +1 -1
  242. package/splitbutton/splitbutton.js +4 -4
  243. package/splitbutton/splitbutton.min.js +1 -1
  244. package/splitbutton/style/splitbuttonstyle.cjs.js +1 -1
  245. package/splitbutton/style/splitbuttonstyle.cjs.min.js +1 -1
  246. package/splitbutton/style/splitbuttonstyle.esm.js +1 -1
  247. package/splitbutton/style/splitbuttonstyle.esm.min.js +1 -1
  248. package/splitbutton/style/splitbuttonstyle.js +1 -1
  249. package/splitbutton/style/splitbuttonstyle.min.js +1 -1
  250. package/splitter/Splitter.d.ts +4 -0
  251. package/splitterpanel/SplitterPanel.d.ts +4 -0
  252. package/steps/Steps.d.ts +4 -0
  253. package/tabmenu/TabMenu.d.ts +4 -0
  254. package/tabpanel/TabPanel.d.ts +4 -5
  255. package/tabview/TabView.vue +1 -0
  256. package/tabview/tabview.cjs.js +1 -0
  257. package/tabview/tabview.cjs.min.js +1 -1
  258. package/tabview/tabview.esm.js +1 -0
  259. package/tabview/tabview.esm.min.js +1 -1
  260. package/tabview/tabview.js +1 -0
  261. package/tabview/tabview.min.js +1 -1
  262. package/tag/Tag.d.ts +4 -0
  263. package/terminal/Terminal.d.ts +4 -0
  264. package/textarea/Textarea.d.ts +4 -0
  265. package/tieredmenu/TieredMenu.d.ts +18 -14
  266. package/timeline/Timeline.d.ts +4 -0
  267. package/toast/Toast.d.ts +4 -0
  268. package/togglebutton/ToggleButton.d.ts +4 -0
  269. package/toolbar/Toolbar.d.ts +4 -0
  270. package/tooltip/Tooltip.d.ts +4 -0
  271. package/tree/Tree.d.ts +46 -22
  272. package/tree/Tree.vue +3 -1
  273. package/tree/tree.cjs.js +5 -1
  274. package/tree/tree.cjs.min.js +1 -1
  275. package/tree/tree.esm.js +5 -1
  276. package/tree/tree.esm.min.js +1 -1
  277. package/tree/tree.js +5 -1
  278. package/tree/tree.min.js +1 -1
  279. package/treeselect/TreeSelect.d.ts +21 -3
  280. package/treetable/BodyCell.vue +3 -1
  281. package/treetable/FooterCell.vue +1 -0
  282. package/treetable/HeaderCell.vue +1 -0
  283. package/treetable/TreeTable.d.ts +19 -1
  284. package/treetable/TreeTable.vue +3 -1
  285. package/treetable/treetable.cjs.js +7 -1
  286. package/treetable/treetable.cjs.min.js +1 -1
  287. package/treetable/treetable.esm.js +7 -1
  288. package/treetable/treetable.esm.min.js +1 -1
  289. package/treetable/treetable.js +7 -1
  290. package/treetable/treetable.min.js +1 -1
  291. package/tristatecheckbox/TriStateCheckbox.d.ts +4 -0
  292. package/virtualscroller/VirtualScroller.d.ts +4 -0
  293. package/web-types.json +1 -1
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { InputTextPassThroughOptionType } from '../inputtext';
12
+ import { InputTextPassThroughOptions } from '../inputtext';
13
13
  import { PassThroughOptions } from '../passthrough';
14
14
  import { ClassComponent, GlobalComponentConstructor, Nullable, PassThrough } from '../ts-helpers';
15
15
 
@@ -33,12 +33,30 @@ export interface PasswordPassThroughMethodOptions {
33
33
  * Defines current inline state.
34
34
  */
35
35
  state: PasswordState;
36
+ /**
37
+ * Defines parent options.
38
+ */
39
+ parent: any;
36
40
  /**
37
41
  * Defines passthrough(pt) options in global config.
38
42
  */
39
43
  global: object | undefined;
40
44
  }
41
45
 
46
+ /**
47
+ * Custom shared passthrough(pt) option method.
48
+ */
49
+ export interface PasswordSharedPassThroughMethodOptions {
50
+ /**
51
+ * Defines valid properties.
52
+ */
53
+ props: PasswordProps;
54
+ /**
55
+ * Defines current inline state.
56
+ */
57
+ state: PasswordState;
58
+ }
59
+
42
60
  /**
43
61
  * Custom passthrough(pt) options.
44
62
  * @see {@link PasswordProps.pt}
@@ -50,9 +68,9 @@ export interface PasswordPassThroughOptions {
50
68
  root?: PasswordPassThroughOptionType;
51
69
  /**
52
70
  * Used to pass attributes to the InputText component.
53
- * @see {@link InputTextPassThroughOptionType}
71
+ * @see {@link InputTextPassThroughOptions}
54
72
  */
55
- input?: PasswordPassThroughOptionType;
73
+ input?: InputTextPassThroughOptions<PasswordSharedPassThroughMethodOptions>;
56
74
  /**
57
75
  * Used to pass attributes to the hide icon's DOM element.
58
76
  */
@@ -20,7 +20,8 @@
20
20
  @blur="onBlur"
21
21
  @keyup="onKeyUp"
22
22
  @invalid="onInvalid"
23
- v-bind="{ ...inputProps, ...ptm('input') }"
23
+ v-bind="inputProps"
24
+ :pt="ptm('input')"
24
25
  :unstyled="unstyled"
25
26
  />
26
27
  <slot v-if="toggleMask && unmasked" name="hideicon" :onClick="onMaskToggle" :toggleCallback="onMaskToggle">
@@ -396,9 +396,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
396
396
  onBlur: $options.onBlur,
397
397
  onKeyup: $options.onKeyUp,
398
398
  onInvalid: $options.onInvalid
399
- }, _objectSpread(_objectSpread({}, _ctx.inputProps), _ctx.ptm('input')), {
399
+ }, _ctx.inputProps, {
400
+ pt: _ctx.ptm('input'),
400
401
  unstyled: _ctx.unstyled
401
- }), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? vue.renderSlot(_ctx.$slots, "hideicon", {
402
+ }), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "pt", "unstyled"]), _ctx.toggleMask && $data.unmasked ? vue.renderSlot(_ctx.$slots, "hideicon", {
402
403
  key: 0,
403
404
  onClick: $options.onMaskToggle,
404
405
  toggleCallback: $options.onMaskToggle
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/icons/eye"),t=require("primevue/icons/eyeslash"),n=require("primevue/inputtext"),l=require("primevue/overlayeventbus"),r=require("primevue/portal"),i=require("primevue/utils"),o=require("primevue/basecomponent"),s=require("primevue/password/style"),a=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(e),d=u(t),p=u(n),h=u(l),f=u(r),m={name:"Password",extends:{name:"BasePassword",extends:u(o).default,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u(s).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(i.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){i.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),i.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){i.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?i.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=i.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",i.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new i.ConnectedOverlayScrollHandler(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!i.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){h.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return i.UniqueComponentId()+"_panel"}},components:{PInputText:p.default,Portal:f.default,EyeSlashIcon:d.default,EyeIcon:c.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=S(e,"string");return"symbol"===y(t)?t:String(t)}function S(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var l=n.call(e,t||"default");if("object"!==y(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var x=["id"];m.render=function(e,t,n,l,r,i){var o=a.resolveComponent("PInputText"),s=a.resolveComponent("Portal");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[a.createVNode(o,a.mergeProps({ref:"input",id:e.inputId,type:i.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||i.panelUniqueId,"aria-expanded":r.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:i.onInput,onFocus:i.onFocus,onBlur:i.onBlur,onKeyup:i.onKeyUp,onInvalid:i.onInvalid},g(g({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&r.unmasked?a.renderSlot(e.$slots,"hideicon",{key:0,onClick:i.onMaskToggle,toggleCallback:i.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"i":"EyeSlashIcon"),a.mergeProps({class:e.hideIcon,onClick:i.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),e.toggleMask&&!r.unmasked?a.renderSlot(e.$slots,"showicon",{key:1,onClick:i.onMaskToggle,toggleCallback:i.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"i":"EyeIcon"),a.mergeProps({class:e.showIcon,onClick:i.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),a.toDisplayString(r.infoText),17),a.createVNode(s,{appendTo:e.appendTo},{default:a.withCtx((function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-connected-overlay",onEnter:i.onOverlayEnter,onLeave:i.onOverlayLeave,onAfterLeave:i.onOverlayAfterLeave},e.ptm("transition")),{default:a.withCtx((function(){return[r.overlayVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:i.overlayRef,id:e.panelId||i.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return i.onOverlayClick&&i.onOverlayClick.apply(i,arguments)})},g(g({},e.panelProps),e.ptm("panel"))),[a.renderSlot(e.$slots,"header"),a.renderSlot(e.$slots,"content",{},(function(){return[a.createElementVNode("div",a.mergeProps({class:e.cx("meter")},e.ptm("meter")),[a.createElementVNode("div",a.mergeProps({class:e.cx("meterLabel"),style:{width:r.meter?r.meter.width:""}},e.ptm("meterLabel")),null,16)],16),a.createElementVNode("div",a.mergeProps({class:e.cx("info")},e.ptm("info")),a.toDisplayString(r.infoText),17)]})),a.renderSlot(e.$slots,"footer")],16,x)):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},module.exports=m;
1
+ "use strict";var e=require("primevue/icons/eye"),t=require("primevue/icons/eyeslash"),n=require("primevue/inputtext"),l=require("primevue/overlayeventbus"),r=require("primevue/portal"),i=require("primevue/utils"),o=require("primevue/basecomponent"),s=require("primevue/password/style"),a=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(e),d=u(t),p=u(n),h=u(l),f=u(r),m={name:"Password",extends:{name:"BasePassword",extends:u(o).default,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u(s).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(i.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){i.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),i.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){i.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?i.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=i.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",i.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new i.ConnectedOverlayScrollHandler(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!i.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){h.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return i.UniqueComponentId()+"_panel"}},components:{PInputText:p.default,Portal:f.default,EyeSlashIcon:d.default,EyeIcon:c.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=S(e,"string");return"symbol"===y(t)?t:String(t)}function S(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var l=n.call(e,t||"default");if("object"!==y(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var x=["id"];m.render=function(e,t,n,l,r,i){var o=a.resolveComponent("PInputText"),s=a.resolveComponent("Portal");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[a.createVNode(o,a.mergeProps({ref:"input",id:e.inputId,type:i.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||i.panelUniqueId,"aria-expanded":r.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:i.onInput,onFocus:i.onFocus,onBlur:i.onBlur,onKeyup:i.onKeyUp,onInvalid:i.onInvalid},e.inputProps,{pt:e.ptm("input"),unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","pt","unstyled"]),e.toggleMask&&r.unmasked?a.renderSlot(e.$slots,"hideicon",{key:0,onClick:i.onMaskToggle,toggleCallback:i.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"i":"EyeSlashIcon"),a.mergeProps({class:e.hideIcon,onClick:i.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),e.toggleMask&&!r.unmasked?a.renderSlot(e.$slots,"showicon",{key:1,onClick:i.onMaskToggle,toggleCallback:i.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"i":"EyeIcon"),a.mergeProps({class:e.showIcon,onClick:i.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),a.toDisplayString(r.infoText),17),a.createVNode(s,{appendTo:e.appendTo},{default:a.withCtx((function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-connected-overlay",onEnter:i.onOverlayEnter,onLeave:i.onOverlayLeave,onAfterLeave:i.onOverlayAfterLeave},e.ptm("transition")),{default:a.withCtx((function(){return[r.overlayVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:i.overlayRef,id:e.panelId||i.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return i.onOverlayClick&&i.onOverlayClick.apply(i,arguments)})},g(g({},e.panelProps),e.ptm("panel"))),[a.renderSlot(e.$slots,"header"),a.renderSlot(e.$slots,"content",{},(function(){return[a.createElementVNode("div",a.mergeProps({class:e.cx("meter")},e.ptm("meter")),[a.createElementVNode("div",a.mergeProps({class:e.cx("meterLabel"),style:{width:r.meter?r.meter.width:""}},e.ptm("meterLabel")),null,16)],16),a.createElementVNode("div",a.mergeProps({class:e.cx("info")},e.ptm("info")),a.toDisplayString(r.infoText),17)]})),a.renderSlot(e.$slots,"footer")],16,x)):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},module.exports=m;
@@ -384,9 +384,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
384
384
  onBlur: $options.onBlur,
385
385
  onKeyup: $options.onKeyUp,
386
386
  onInvalid: $options.onInvalid
387
- }, _objectSpread(_objectSpread({}, _ctx.inputProps), _ctx.ptm('input')), {
387
+ }, _ctx.inputProps, {
388
+ pt: _ctx.ptm('input'),
388
389
  unstyled: _ctx.unstyled
389
- }), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? renderSlot(_ctx.$slots, "hideicon", {
390
+ }), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "pt", "unstyled"]), _ctx.toggleMask && $data.unmasked ? renderSlot(_ctx.$slots, "hideicon", {
390
391
  key: 0,
391
392
  onClick: $options.onMaskToggle,
392
393
  toggleCallback: $options.onMaskToggle
@@ -1 +1 @@
1
- import e from"primevue/icons/eye";import t from"primevue/icons/eyeslash";import n from"primevue/inputtext";import i from"primevue/overlayeventbus";import l from"primevue/portal";import{ZIndexUtils as r,DomHandler as o,ConnectedOverlayScrollHandler as s,UniqueComponentId as a}from"primevue/utils";import u from"primevue/basecomponent";import c from"primevue/password/style";import{resolveComponent as p,openBlock as d,createElementBlock as h,mergeProps as f,createVNode as y,renderSlot as m,createBlock as v,resolveDynamicComponent as b,createCommentVNode as g,createElementVNode as k,toDisplayString as S,withCtx as x,Transition as w}from"vue";var L={name:"Password",extends:{name:"BasePassword",extends:u,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:c,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){r.set("overlay",e,this.$primevue.config.zIndex.overlay),o.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){r.clear(e)},alignOverlay:function(){"self"===this.appendTo?o.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=o.getOuterWidth(this.$refs.input.$el)+"px",o.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!o.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){i.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return a()+"_panel"}},components:{PInputText:n,Portal:l,EyeSlashIcon:t,EyeIcon:e}};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){var t=V(e,"string");return"symbol"===O(t)?t:String(t)}function V(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var E=["id"];L.render=function(e,t,n,i,l,r){var o=p("PInputText"),s=p("Portal");return d(),h("div",f({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[y(o,f({ref:"input",id:e.inputId,type:r.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||r.panelUniqueId,"aria-expanded":l.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:r.onInput,onFocus:r.onFocus,onBlur:r.onBlur,onKeyup:r.onKeyUp,onInvalid:r.onInvalid},I(I({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&l.unmasked?m(e.$slots,"hideicon",{key:0,onClick:r.onMaskToggle,toggleCallback:r.onMaskToggle},(function(){return[(d(),v(b(e.hideIcon?"i":"EyeSlashIcon"),f({class:e.hideIcon,onClick:r.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):g("",!0),e.toggleMask&&!l.unmasked?m(e.$slots,"showicon",{key:1,onClick:r.onMaskToggle,toggleCallback:r.onMaskToggle},(function(){return[(d(),v(b(e.showIcon?"i":"EyeIcon"),f({class:e.showIcon,onClick:r.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):g("",!0),k("span",f({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),S(l.infoText),17),y(s,{appendTo:e.appendTo},{default:x((function(){return[y(w,f({name:"p-connected-overlay",onEnter:r.onOverlayEnter,onLeave:r.onOverlayLeave,onAfterLeave:r.onOverlayAfterLeave},e.ptm("transition")),{default:x((function(){return[l.overlayVisible?(d(),h("div",f({key:0,ref:r.overlayRef,id:e.panelId||r.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)})},I(I({},e.panelProps),e.ptm("panel"))),[m(e.$slots,"header"),m(e.$slots,"content",{},(function(){return[k("div",f({class:e.cx("meter")},e.ptm("meter")),[k("div",f({class:e.cx("meterLabel"),style:{width:l.meter?l.meter.width:""}},e.ptm("meterLabel")),null,16)],16),k("div",f({class:e.cx("info")},e.ptm("info")),S(l.infoText),17)]})),m(e.$slots,"footer")],16,E)):g("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)};export{L as default};
1
+ import e from"primevue/icons/eye";import t from"primevue/icons/eyeslash";import n from"primevue/inputtext";import i from"primevue/overlayeventbus";import l from"primevue/portal";import{ZIndexUtils as r,DomHandler as o,ConnectedOverlayScrollHandler as s,UniqueComponentId as a}from"primevue/utils";import u from"primevue/basecomponent";import c from"primevue/password/style";import{resolveComponent as p,openBlock as d,createElementBlock as h,mergeProps as f,createVNode as y,renderSlot as m,createBlock as v,resolveDynamicComponent as b,createCommentVNode as g,createElementVNode as k,toDisplayString as S,withCtx as x,Transition as w}from"vue";var L={name:"Password",extends:{name:"BasePassword",extends:u,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:c,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){r.set("overlay",e,this.$primevue.config.zIndex.overlay),o.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){r.clear(e)},alignOverlay:function(){"self"===this.appendTo?o.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=o.getOuterWidth(this.$refs.input.$el)+"px",o.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!o.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){i.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return a()+"_panel"}},components:{PInputText:n,Portal:l,EyeSlashIcon:t,EyeIcon:e}};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){var t=V(e,"string");return"symbol"===O(t)?t:String(t)}function V(e,t){if("object"!==O(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var E=["id"];L.render=function(e,t,n,i,l,r){var o=p("PInputText"),s=p("Portal");return d(),h("div",f({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[y(o,f({ref:"input",id:e.inputId,type:r.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||r.panelUniqueId,"aria-expanded":l.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:r.onInput,onFocus:r.onFocus,onBlur:r.onBlur,onKeyup:r.onKeyUp,onInvalid:r.onInvalid},e.inputProps,{pt:e.ptm("input"),unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","pt","unstyled"]),e.toggleMask&&l.unmasked?m(e.$slots,"hideicon",{key:0,onClick:r.onMaskToggle,toggleCallback:r.onMaskToggle},(function(){return[(d(),v(b(e.hideIcon?"i":"EyeSlashIcon"),f({class:e.hideIcon,onClick:r.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):g("",!0),e.toggleMask&&!l.unmasked?m(e.$slots,"showicon",{key:1,onClick:r.onMaskToggle,toggleCallback:r.onMaskToggle},(function(){return[(d(),v(b(e.showIcon?"i":"EyeIcon"),f({class:e.showIcon,onClick:r.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):g("",!0),k("span",f({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),S(l.infoText),17),y(s,{appendTo:e.appendTo},{default:x((function(){return[y(w,f({name:"p-connected-overlay",onEnter:r.onOverlayEnter,onLeave:r.onOverlayLeave,onAfterLeave:r.onOverlayAfterLeave},e.ptm("transition")),{default:x((function(){return[l.overlayVisible?(d(),h("div",f({key:0,ref:r.overlayRef,id:e.panelId||r.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)})},I(I({},e.panelProps),e.ptm("panel"))),[m(e.$slots,"header"),m(e.$slots,"content",{},(function(){return[k("div",f({class:e.cx("meter")},e.ptm("meter")),[k("div",f({class:e.cx("meterLabel"),style:{width:l.meter?l.meter.width:""}},e.ptm("meterLabel")),null,16)],16),k("div",f({class:e.cx("info")},e.ptm("info")),S(l.infoText),17)]})),m(e.$slots,"footer")],16,E)):g("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)};export{L as default};
@@ -388,9 +388,10 @@ this.primevue.password = (function (EyeIcon, EyeSlashIcon, InputText, OverlayEve
388
388
  onBlur: $options.onBlur,
389
389
  onKeyup: $options.onKeyUp,
390
390
  onInvalid: $options.onInvalid
391
- }, _objectSpread(_objectSpread({}, _ctx.inputProps), _ctx.ptm('input')), {
391
+ }, _ctx.inputProps, {
392
+ pt: _ctx.ptm('input'),
392
393
  unstyled: _ctx.unstyled
393
- }), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? vue.renderSlot(_ctx.$slots, "hideicon", {
394
+ }), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "pt", "unstyled"]), _ctx.toggleMask && $data.unmasked ? vue.renderSlot(_ctx.$slots, "hideicon", {
394
395
  key: 0,
395
396
  onClick: $options.onMaskToggle,
396
397
  toggleCallback: $options.onMaskToggle
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.password=function(e,t,n,l,i,r,o,s,a){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(e),d=u(t),p=u(n),h=u(l),m=u(i),f={name:"Password",extends:{name:"BasePassword",extends:u(o).default,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u(s).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),r.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?r.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=r.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",r.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!r.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){h.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return r.UniqueComponentId()+"_panel"}},components:{PInputText:p.default,Portal:m.default,EyeSlashIcon:d.default,EyeIcon:c.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=S(e,"string");return"symbol"===y(t)?t:String(t)}function S(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var l=n.call(e,t||"default");if("object"!==y(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var x=["id"];return f.render=function(e,t,n,l,i,r){var o=a.resolveComponent("PInputText"),s=a.resolveComponent("Portal");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[a.createVNode(o,a.mergeProps({ref:"input",id:e.inputId,type:r.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||r.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:r.onInput,onFocus:r.onFocus,onBlur:r.onBlur,onKeyup:r.onKeyUp,onInvalid:r.onInvalid},g(g({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&i.unmasked?a.renderSlot(e.$slots,"hideicon",{key:0,onClick:r.onMaskToggle,toggleCallback:r.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"i":"EyeSlashIcon"),a.mergeProps({class:e.hideIcon,onClick:r.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),e.toggleMask&&!i.unmasked?a.renderSlot(e.$slots,"showicon",{key:1,onClick:r.onMaskToggle,toggleCallback:r.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"i":"EyeIcon"),a.mergeProps({class:e.showIcon,onClick:r.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),a.toDisplayString(i.infoText),17),a.createVNode(s,{appendTo:e.appendTo},{default:a.withCtx((function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-connected-overlay",onEnter:r.onOverlayEnter,onLeave:r.onOverlayLeave,onAfterLeave:r.onOverlayAfterLeave},e.ptm("transition")),{default:a.withCtx((function(){return[i.overlayVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:r.overlayRef,id:e.panelId||r.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)})},g(g({},e.panelProps),e.ptm("panel"))),[a.renderSlot(e.$slots,"header"),a.renderSlot(e.$slots,"content",{},(function(){return[a.createElementVNode("div",a.mergeProps({class:e.cx("meter")},e.ptm("meter")),[a.createElementVNode("div",a.mergeProps({class:e.cx("meterLabel"),style:{width:i.meter?i.meter.width:""}},e.ptm("meterLabel")),null,16)],16),a.createElementVNode("div",a.mergeProps({class:e.cx("info")},e.ptm("info")),a.toDisplayString(i.infoText),17)]})),a.renderSlot(e.$slots,"footer")],16,x)):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},f}(primevue.icons.eye,primevue.icons.eyeslash,primevue.inputtext,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.password.style,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.password=function(e,t,n,l,i,r,o,s,a){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(e),d=u(t),p=u(n),h=u(l),m=u(i),f={name:"Password",extends:{name:"BasePassword",extends:u(o).default,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:u(s).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),r.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?r.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=r.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",r.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!r.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){h.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return r.UniqueComponentId()+"_panel"}},components:{PInputText:p.default,Portal:m.default,EyeSlashIcon:d.default,EyeIcon:c.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=S(e,"string");return"symbol"===y(t)?t:String(t)}function S(e,t){if("object"!==y(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var l=n.call(e,t||"default");if("object"!==y(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var x=["id"];return f.render=function(e,t,n,l,i,r){var o=a.resolveComponent("PInputText"),s=a.resolveComponent("Portal");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[a.createVNode(o,a.mergeProps({ref:"input",id:e.inputId,type:r.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||r.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:r.onInput,onFocus:r.onFocus,onBlur:r.onBlur,onKeyup:r.onKeyUp,onInvalid:r.onInvalid},e.inputProps,{pt:e.ptm("input"),unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","pt","unstyled"]),e.toggleMask&&i.unmasked?a.renderSlot(e.$slots,"hideicon",{key:0,onClick:r.onMaskToggle,toggleCallback:r.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"i":"EyeSlashIcon"),a.mergeProps({class:e.hideIcon,onClick:r.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),e.toggleMask&&!i.unmasked?a.renderSlot(e.$slots,"showicon",{key:1,onClick:r.onMaskToggle,toggleCallback:r.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"i":"EyeIcon"),a.mergeProps({class:e.showIcon,onClick:r.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),a.toDisplayString(i.infoText),17),a.createVNode(s,{appendTo:e.appendTo},{default:a.withCtx((function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-connected-overlay",onEnter:r.onOverlayEnter,onLeave:r.onOverlayLeave,onAfterLeave:r.onOverlayAfterLeave},e.ptm("transition")),{default:a.withCtx((function(){return[i.overlayVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:r.overlayRef,id:e.panelId||r.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return r.onOverlayClick&&r.onOverlayClick.apply(r,arguments)})},g(g({},e.panelProps),e.ptm("panel"))),[a.renderSlot(e.$slots,"header"),a.renderSlot(e.$slots,"content",{},(function(){return[a.createElementVNode("div",a.mergeProps({class:e.cx("meter")},e.ptm("meter")),[a.createElementVNode("div",a.mergeProps({class:e.cx("meterLabel"),style:{width:i.meter?i.meter.width:""}},e.ptm("meterLabel")),null,16)],16),a.createElementVNode("div",a.mergeProps({class:e.cx("info")},e.ptm("info")),a.toDisplayString(i.infoText),17)]})),a.renderSlot(e.$slots,"footer")],16,x)):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},f}(primevue.icons.eye,primevue.icons.eyeslash,primevue.inputtext,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.password.style,Vue);
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { ButtonHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ButtonPassThroughOptionType } from '../button';
12
+ import { ButtonPassThroughOptions } from '../button';
13
13
  import { PassThroughOptions } from '../passthrough';
14
14
  import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
15
15
 
@@ -37,12 +37,30 @@ export interface PickListPassThroughMethodOptions {
37
37
  * Defines current options.
38
38
  */
39
39
  context: PickListContext;
40
+ /**
41
+ * Defines parent options.
42
+ */
43
+ parent: any;
40
44
  /**
41
45
  * Defines passthrough(pt) options in global config.
42
46
  */
43
47
  global: object | undefined;
44
48
  }
45
49
 
50
+ /**
51
+ * Custom shared passthrough(pt) option method.
52
+ */
53
+ export interface PickListSharedPassThroughMethodOptions {
54
+ /**
55
+ * Defines valid properties.
56
+ */
57
+ props: PickListProps;
58
+ /**
59
+ * Defines current inline state.
60
+ */
61
+ state: PickListState;
62
+ }
63
+
46
64
  /**
47
65
  * Custom reorder event.
48
66
  * @see {@link PickListEmits.reorder}
@@ -133,19 +151,19 @@ export interface PickListPassThroughOptions {
133
151
  /**
134
152
  * Used to pass attributes to the Button component.
135
153
  */
136
- sourceMoveUpButton?: ButtonPassThroughOptionType;
154
+ sourceMoveUpButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
137
155
  /**
138
156
  * Used to pass attributes to the Button component.
139
157
  */
140
- sourceMoveTopButton?: ButtonPassThroughOptionType;
158
+ sourceMoveTopButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
141
159
  /**
142
160
  * Used to pass attributes to the Button component.
143
161
  */
144
- sourceMoveDownButton?: ButtonPassThroughOptionType;
162
+ sourceMoveDownButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
145
163
  /**
146
164
  * Used to pass attributes to the Button component.
147
165
  */
148
- sourceMoveBottomButton?: ButtonPassThroughOptionType;
166
+ sourceMoveBottomButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
149
167
  /**
150
168
  * Used to pass attributes to the source wrapper's DOM element.
151
169
  */
@@ -165,19 +183,19 @@ export interface PickListPassThroughOptions {
165
183
  /**
166
184
  * Used to pass attributes to the Button component.
167
185
  */
168
- moveToTargetButton?: ButtonPassThroughOptionType;
186
+ moveToTargetButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
169
187
  /**
170
188
  * Used to pass attributes to the Button component.
171
189
  */
172
- moveAllToTargetButton?: ButtonPassThroughOptionType;
190
+ moveAllToTargetButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
173
191
  /**
174
192
  * Used to pass attributes to the Button component.
175
193
  */
176
- moveToSourceButton?: ButtonPassThroughOptionType;
194
+ moveToSourceButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
177
195
  /**
178
196
  * Used to pass attributes to the Button component.
179
197
  */
180
- moveAllToSourceButton?: ButtonPassThroughOptionType;
198
+ moveAllToSourceButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
181
199
  /**
182
200
  * Used to pass attributes to the target wrapper's DOM element.
183
201
  */
@@ -201,19 +219,19 @@ export interface PickListPassThroughOptions {
201
219
  /**
202
220
  * Used to pass attributes to the Button component.
203
221
  */
204
- targetMoveUpButton?: ButtonPassThroughOptionType;
222
+ targetMoveUpButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
205
223
  /**
206
224
  * Used to pass attributes to the Button component.
207
225
  */
208
- targetMoveTopButton?: ButtonPassThroughOptionType;
226
+ targetMoveTopButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
209
227
  /**
210
228
  * Used to pass attributes to the Button component.
211
229
  */
212
- targetMoveDownButton?: ButtonPassThroughOptionType;
230
+ targetMoveDownButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
213
231
  /**
214
232
  * Used to pass attributes to the Button component.
215
233
  */
216
- targetMoveBottomButton?: ButtonPassThroughOptionType;
234
+ targetMoveBottomButton?: ButtonPassThroughOptions<PickListSharedPassThroughMethodOptions>;
217
235
  /**
218
236
  * Used to manage all lifecycle hooks.
219
237
  * @see {@link BaseComponent.ComponentHooks}
@@ -2,28 +2,37 @@
2
2
  <div :class="cx('root')" v-bind="ptm('root')">
3
3
  <div v-if="showSourceControls" :class="cx('sourceControls')" v-bind="ptm('sourceControls')" data-pc-group-section="controls">
4
4
  <slot name="sourcecontrolsstart"></slot>
5
- <PLButton :aria-label="moveUpAriaLabel" :disabled="moveDisabled(0)" type="button" @click="moveUp($event, 0)" :pt="ptm('sourceMoveUpButton')" v-bind="moveUpButtonProps" :unstyled="unstyled">
5
+ <PLButton :aria-label="moveUpAriaLabel" :disabled="moveDisabled(0)" type="button" @click="moveUp($event, 0)" v-bind="moveUpButtonProps" :pt="ptm('sourceMoveUpButton')" :unstyled="unstyled" data-pc-section="sourcemoveupbutton">
6
6
  <template #icon>
7
7
  <slot name="moveupicon">
8
8
  <AngleUpIcon v-bind="ptm('sourceMoveUpButton')['icon']" data-pc-section="moveupicon" />
9
9
  </slot>
10
10
  </template>
11
11
  </PLButton>
12
- <PLButton :aria-label="moveTopAriaLabel" :disabled="moveDisabled(0)" type="button" @click="moveTop($event, 0)" :pt="ptm('sourceMoveTopButton')" v-bind="moveTopButtonProps" :unstyled="unstyled">
12
+ <PLButton :aria-label="moveTopAriaLabel" :disabled="moveDisabled(0)" type="button" @click="moveTop($event, 0)" v-bind="moveTopButtonProps" :pt="ptm('sourceMoveTopButton')" :unstyled="unstyled" data-pc-section="sourcemovetopbutton">
13
13
  <template #icon>
14
14
  <slot name="movetopicon">
15
15
  <AngleDoubleUpIcon v-bind="ptm('sourceMoveTopButton')['icon']" data-pc-section="movetopicon" />
16
16
  </slot>
17
17
  </template>
18
18
  </PLButton>
19
- <PLButton :aria-label="moveDownAriaLabel" :disabled="moveDisabled(0)" type="button" @click="moveDown($event, 0)" :pt="ptm('sourceMoveDownButton')" v-bind="moveDownButtonProps" :unstyled="unstyled">
19
+ <PLButton :aria-label="moveDownAriaLabel" :disabled="moveDisabled(0)" type="button" @click="moveDown($event, 0)" v-bind="moveDownButtonProps" :pt="ptm('sourceMoveDownButton')" :unstyled="unstyled" data-pc-section="sourcemovedownbutton">
20
20
  <template #icon>
21
21
  <slot name="movedownicon">
22
22
  <AngleDownIcon v-bind="ptm('sourceMoveDownButton')['icon']" data-pc-section="movedownicon" />
23
23
  </slot>
24
24
  </template>
25
25
  </PLButton>
26
- <PLButton :aria-label="moveBottomAriaLabel" :disabled="moveDisabled(0)" type="button" @click="moveBottom($event, 0)" :pt="ptm('sourceMoveBottomButton')" v-bind="moveBottomButtonProps" :unstyled="unstyled">
26
+ <PLButton
27
+ :aria-label="moveBottomAriaLabel"
28
+ :disabled="moveDisabled(0)"
29
+ type="button"
30
+ @click="moveBottom($event, 0)"
31
+ v-bind="moveBottomButtonProps"
32
+ :pt="ptm('sourceMoveBottomButton')"
33
+ :unstyled="unstyled"
34
+ data-pc-section="sourcemovebottombutton"
35
+ >
27
36
  <template #icon>
28
37
  <slot name="movebottomicon">
29
38
  <AngleDoubleDownIcon v-bind="ptm('sourceMoveBottomButton')['icon']" data-pc-section="movebottomicon" />
@@ -75,28 +84,46 @@
75
84
  </div>
76
85
  <div :class="cx('buttons')" v-bind="ptm('buttons')" data-pc-group-section="controls">
77
86
  <slot name="movecontrolsstart"></slot>
78
- <PLButton :aria-label="moveToTargetAriaLabel" type="button" @click="moveToTarget" :disabled="moveDisabled(0)" :pt="ptm('moveToTargetButton')" v-bind="moveToTargetProps" :unstyled="unstyled">
87
+ <PLButton :aria-label="moveToTargetAriaLabel" type="button" @click="moveToTarget" :disabled="moveDisabled(0)" v-bind="moveToTargetProps" :pt="ptm('moveToTargetButton')" :unstyled="unstyled" data-pc-section="movetotargetbuton">
79
88
  <template #icon>
80
89
  <slot name="movetotargeticon" :viewChanged="viewChanged">
81
90
  <component :is="viewChanged ? 'AngleDownIcon' : 'AngleRightIcon'" v-bind="ptm('moveToTargetButton')['icon']" data-pc-section="movetotargeticon" />
82
91
  </slot>
83
92
  </template>
84
93
  </PLButton>
85
- <PLButton :aria-label="moveAllToTargetAriaLabel" type="button" @click="moveAllToTarget" :disabled="moveAllDisabled('sourceList')" :pt="ptm('moveAllToTargetButton')" v-bind="moveAllToTargetProps" :unstyled="unstyled">
94
+ <PLButton
95
+ :aria-label="moveAllToTargetAriaLabel"
96
+ type="button"
97
+ @click="moveAllToTarget"
98
+ :disabled="moveAllDisabled('sourceList')"
99
+ v-bind="moveAllToTargetProps"
100
+ :pt="ptm('moveAllToTargetButton')"
101
+ :unstyled="unstyled"
102
+ data-pc-section="movealltotargetbuton"
103
+ >
86
104
  <template #icon>
87
105
  <slot name="movealltotargeticon" :viewChanged="viewChanged">
88
106
  <component :is="viewChanged ? 'AngleDoubleDownIcon' : 'AngleDoubleRightIcon'" v-bind="ptm('moveAllToTargetButton')['icon']" data-pc-section="movealltotargeticon" />
89
107
  </slot>
90
108
  </template>
91
109
  </PLButton>
92
- <PLButton :aria-label="moveToSourceAriaLabel" type="button" @click="moveToSource" :disabled="moveDisabled(1)" :pt="ptm('moveToSourceButton')" v-bind="moveToSourceProps" :unstyled="unstyled">
110
+ <PLButton :aria-label="moveToSourceAriaLabel" type="button" @click="moveToSource" :disabled="moveDisabled(1)" v-bind="moveToSourceProps" :pt="ptm('moveToSourceButton')" :unstyled="unstyled" data-pc-section="movetosourcebuton">
93
111
  <template #icon>
94
112
  <slot name="movetosourceicon" :viewChanged="viewChanged">
95
113
  <component :is="viewChanged ? 'AngleUpIcon' : 'AngleLeftIcon'" v-bind="ptm('moveToSourceButton')['icon']" data-pc-section="movetosourceicon" />
96
114
  </slot>
97
115
  </template>
98
116
  </PLButton>
99
- <PLButton :aria-label="moveAllToSourceAriaLabel" type="button" @click="moveAllToSource" :disabled="moveAllDisabled('targetList')" :pt="ptm('moveAllToSourceButton')" v-bind="moveAllToSourceProps" :unstyled="unstyled">
117
+ <PLButton
118
+ :aria-label="moveAllToSourceAriaLabel"
119
+ type="button"
120
+ @click="moveAllToSource"
121
+ :disabled="moveAllDisabled('targetList')"
122
+ v-bind="moveAllToSourceProps"
123
+ :pt="ptm('moveAllToSourceButton')"
124
+ data-pc-section="movealltosourcebuton"
125
+ :unstyled="unstyled"
126
+ >
100
127
  <template #icon>
101
128
  <slot name="movealltosourceicon" :viewChanged="viewChanged">
102
129
  <component :is="viewChanged ? 'AngleDoubleUpIcon' : 'AngleDoubleLeftIcon'" v-bind="ptm('moveAllToSourceButton')['icon']" data-pc-section="movealltosourceicon" />
@@ -149,28 +176,37 @@
149
176
  </div>
150
177
  <div v-if="showTargetControls" :class="cx('targetControls')" v-bind="ptm('targetControls')" data-pc-group-section="controls">
151
178
  <slot name="targetcontrolsstart"></slot>
152
- <PLButton :aria-label="moveUpAriaLabel" :disabled="moveDisabled(1)" type="button" @click="moveUp($event, 1)" :pt="ptm('targetMoveUpButton')" v-bind="moveUpButtonProps" :unstyled="unstyled">
179
+ <PLButton :aria-label="moveUpAriaLabel" :disabled="moveDisabled(1)" type="button" @click="moveUp($event, 1)" v-bind="moveUpButtonProps" :pt="ptm('targetMoveUpButton')" :unstyled="unstyled" data-pc-section="targetmoveupbutton">
153
180
  <template #icon>
154
181
  <slot name="moveupicon">
155
182
  <AngleUpIcon v-bind="ptm('targetMoveUpButton')['icon']" data-pc-section="moveupicon" />
156
183
  </slot>
157
184
  </template>
158
185
  </PLButton>
159
- <PLButton :aria-label="moveTopAriaLabel" :disabled="moveDisabled(1)" type="button" @click="moveTop($event, 1)" :pt="ptm('targetMoveTopButton')" v-bind="moveTopButtonProps" :unstyled="unstyled">
186
+ <PLButton :aria-label="moveTopAriaLabel" :disabled="moveDisabled(1)" type="button" @click="moveTop($event, 1)" v-bind="moveTopButtonProps" :pt="ptm('targetMoveTopButton')" :unstyled="unstyled" data-pc-section="targetmovetopbutton">
160
187
  <template #icon>
161
188
  <slot name="movetopicon">
162
189
  <AngleDoubleUpIcon v-bind="ptm('targetMoveTopButton')['icon']" data-pc-section="movetopicon" />
163
190
  </slot>
164
191
  </template>
165
192
  </PLButton>
166
- <PLButton :aria-label="moveDownAriaLabel" :disabled="moveDisabled(1)" type="button" @click="moveDown($event, 1)" :pt="ptm('targetMoveDownButton')" v-bind="moveDownButtonProps" :unstyled="unstyled">
193
+ <PLButton :aria-label="moveDownAriaLabel" :disabled="moveDisabled(1)" type="button" @click="moveDown($event, 1)" v-bind="moveDownButtonProps" :pt="ptm('targetMoveDownButton')" :unstyled="unstyled" data-pc-section="targetmovedownbutton">
167
194
  <template #icon>
168
195
  <slot name="movedownicon">
169
196
  <AngleDownIcon v-bind="ptm('targetMoveDownButton')['icon']" data-pc-section="movedownicon" />
170
197
  </slot>
171
198
  </template>
172
199
  </PLButton>
173
- <PLButton :aria-label="moveBottomAriaLabel" :disabled="moveDisabled(1)" type="button" @click="moveBottom($event, 1)" :pt="ptm('targetMoveBottomButton')" v-bind="moveBottomButtonProps" :unstyled="unstyled">
200
+ <PLButton
201
+ :aria-label="moveBottomAriaLabel"
202
+ :disabled="moveDisabled(1)"
203
+ type="button"
204
+ @click="moveBottom($event, 1)"
205
+ v-bind="moveBottomButtonProps"
206
+ :pt="ptm('targetMoveBottomButton')"
207
+ :unstyled="unstyled"
208
+ data-pc-section="targetmovebottombutton"
209
+ >
174
210
  <template #icon>
175
211
  <slot name="movebottomicon">
176
212
  <AngleDoubleDownIcon v-bind="ptm('targetMoveBottomButton')['icon']" data-pc-section="movebottomicon" />