primevue 3.26.0 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/Api.d.ts +292 -284
- package/badge/Badge.d.ts +1 -1
- package/button/Button.d.ts +1 -1
- package/calendar/Calendar.vue +1 -1
- package/calendar/calendar.cjs.js +1 -1
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +1 -1
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +1 -1
- package/calendar/calendar.min.js +1 -1
- package/config/config.cjs.js +1 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +1 -1
- package/config/config.esm.min.js +1 -1
- package/config/config.js +1 -1
- package/config/config.min.js +1 -1
- package/core/core.js +5 -4
- package/core/core.min.js +3 -3
- package/datatable/DataTable.d.ts +2 -2
- package/datatable/DataTable.vue +3 -1
- package/datatable/TableBody.vue +17 -5
- package/datatable/datatable.cjs.js +18 -15
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +18 -15
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +18 -15
- package/datatable/datatable.min.js +1 -1
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.vue +3 -2
- package/dropdown/dropdown.cjs.js +3 -2
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +3 -2
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +3 -2
- package/dropdown/dropdown.min.js +1 -1
- package/image/Image.d.ts +25 -0
- package/image/Image.vue +24 -6
- package/image/image.cjs.js +51 -41
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +51 -41
- package/image/image.esm.min.js +1 -1
- package/image/image.js +51 -41
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +1 -1
- package/listbox/Listbox.d.ts +1 -1
- package/message/Message.d.ts +1 -1
- package/multiselect/MultiSelect.d.ts +1 -1
- package/multiselect/MultiSelect.vue +3 -2
- package/multiselect/multiselect.cjs.js +3 -2
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +3 -2
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +3 -2
- package/multiselect/multiselect.min.js +1 -1
- package/package.json +1 -1
- package/splitbutton/SplitButton.d.ts +1 -1
- package/splitbutton/splitbutton.cjs.js +2 -2
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +2 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +2 -2
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.vue +2 -11
- package/splitter/splitter.cjs.js +1 -2
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +1 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +1 -2
- package/splitter/splitter.min.js +1 -1
- package/tag/Tag.d.ts +1 -1
- package/toast/Toast.d.ts +1 -1
- package/treetable/TreeTable.d.ts +2 -2
- package/vetur-attributes.json +4 -0
- package/vetur-tags.json +2 -1
- package/virtualscroller/VirtualScroller.vue +1 -1
- package/virtualscroller/virtualscroller.cjs.js +1 -1
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +1 -1
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +37 -2
package/core/core.min.js
CHANGED
|
@@ -2,7 +2,7 @@ this.primevue=this.primevue||{},this.primevue.utils=function(e){"use strict";var
|
|
|
2
2
|
|
|
3
3
|
this.primevue=this.primevue||{},this.primevue.api=function(i,p){"use strict";const e={filter(i,e,t,r,l){let o=[];if(i)for(let E of i)for(let i of e){let e=p.ObjectUtils.resolveFieldData(E,i);if(this.filters[r](e,t,l)){o.push(E);break}}return o},filters:{startsWith(i,e,t){if(null==e||""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).slice(0,r.length)===r},contains(i,e,t){if(null==e||"string"==typeof e&&""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return-1!==p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).indexOf(r)},notContains(i,e,t){if(null==e||"string"==typeof e&&""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t);return-1===p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t).indexOf(r)},endsWith(i,e,t){if(null==e||""===e.trim())return!0;if(null==i)return!1;let r=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t),l=p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t);return-1!==l.indexOf(r,l.length-r.length)},equals:(i,e,t)=>null==e||"string"==typeof e&&""===e.trim()||null!=i&&(i.getTime&&e.getTime?i.getTime()===e.getTime():p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t)==p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t)),notEquals:(i,e,t)=>null!=e&&("string"!=typeof e||""!==e.trim())&&(null==i||(i.getTime&&e.getTime?i.getTime()!==e.getTime():p.ObjectUtils.removeAccents(i.toString()).toLocaleLowerCase(t)!=p.ObjectUtils.removeAccents(e.toString()).toLocaleLowerCase(t))),in(i,e){if(null==e||0===e.length)return!0;for(let t=0;t<e.length;t++)if(p.ObjectUtils.equals(i,e[t]))return!0;return!1},between:(i,p)=>null==p||null==p[0]||null==p[1]||null!=i&&(i.getTime?p[0].getTime()<=i.getTime()&&i.getTime()<=p[1].getTime():p[0]<=i&&i<=p[1]),lt:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()<p.getTime():i<p),lte:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()<=p.getTime():i<=p),gt:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()>p.getTime():i>p),gte:(i,p)=>null==p||null!=i&&(i.getTime&&p.getTime?i.getTime()>=p.getTime():i>=p),dateIs:(i,p)=>null==p||null!=i&&i.toDateString()===p.toDateString(),dateIsNot:(i,p)=>null==p||null!=i&&i.toDateString()!==p.toDateString(),dateBefore:(i,p)=>null==p||null!=i&&i.getTime()<p.getTime(),dateAfter:(i,p)=>null==p||null!=i&&i.getTime()>p.getTime()},register(i,p){this.filters[i]=p}};return i.FilterMatchMode={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},i.FilterOperator={AND:"and",OR:"or"},i.FilterService=e,i.PrimeIcons={ALIGN_CENTER:"pi pi-align-center",ALIGN_JUSTIFY:"pi pi-align-justify",ALIGN_LEFT:"pi pi-align-left",ALIGN_RIGHT:"pi pi-align-right",AMAZON:"pi pi-amazon",ANDROID:"pi pi-android",ANGLE_DOUBLE_DOWN:"pi pi-angle-double-down",ANGLE_DOUBLE_LEFT:"pi pi-angle-double-left",ANGLE_DOUBLE_RIGHT:"pi pi-angle-double-right",ANGLE_DOUBLE_UP:"pi pi-angle-double-up",ANGLE_DOWN:"pi pi-angle-down",ANGLE_LEFT:"pi pi-angle-left",ANGLE_RIGHT:"pi pi-angle-right",ANGLE_UP:"pi pi-angle-up",APPLE:"pi pi-apple",ARROW_CIRCLE_DOWN:"pi pi-arrow-circle-down",ARROW_CIRCLE_LEFT:"pi pi-arrow-circle-left",ARROW_CIRCLE_RIGHT:"pi pi-arrow-circle-right",ARROW_CIRCLE_UP:"pi pi-arrow-circle-up",ARROW_DOWN:"pi pi-arrow-down",ARROW_DOWN_LEFT:"pi pi-arrow-down-left",ARROW_DOWN_RIGHT:"pi pi-arrow-down-right",ARROW_LEFT:"pi pi-arrow-left",ARROW_RIGHT:"pi pi-arrow-right",ARROW_RIGHT_ARROW_LEFT:"pi pi-arrow-right-arrow-left",ARROW_UP:"pi pi-arrow-up",ARROW_UP_LEFT:"pi pi-arrow-up-left",ARROW_UP_RIGHT:"pi pi-arrow-up-right",ARROW_H:"pi pi-arrows-h",ARROW_V:"pi pi-arrows-v",ARROW_A:"pi pi-arrows-alt",AT:"pi pi-at",BACKWARD:"pi pi-backward",BAN:"pi pi-ban",BARS:"pi pi-bars",BELL:"pi pi-bell",BITCOIN:"pi pi-bitcoin",BOLT:"pi pi-bolt",BOOK:"pi pi-book",BOOKMARK:"pi pi-bookmark",BOOKMARK_FILL:"pi pi-bookmark-fill",BOX:"pi pi-box",BRIEFCASE:"pi pi-briefcase",BUILDING:"pi pi-building",CALENDAR:"pi pi-calendar",CALENDAR_MINUS:"pi pi-calendar-minus",CALENDAR_PLUS:"pi pi-calendar-plus",CALENDAR_TIMES:"pi pi-calendar-times",CALCULATOR:"pi pi-calculator",CAMERA:"pi pi-camera",CAR:"pi pi-car",CARET_DOWN:"pi pi-caret-down",CARET_LEFT:"pi pi-caret-left",CARET_RIGHT:"pi pi-caret-right",CARET_UP:"pi pi-caret-up",CART_PLUS:"pi pi-cart-plus",CHART_BAR:"pi pi-chart-bar",CHART_LINE:"pi pi-chart-line",CHART_PIE:"pi pi-chart-pie",CHECK:"pi pi-check",CHECK_CIRCLE:"pi pi-check-circle",CHECK_SQUARE:"pi pi-check-square",CHEVRON_CIRCLE_DOWN:"pi pi-chevron-circle-down",CHEVRON_CIRCLE_LEFT:"pi pi-chevron-circle-left",CHEVRON_CIRCLE_RIGHT:"pi pi-chevron-circle-right",CHEVRON_CIRCLE_UP:"pi pi-chevron-circle-up",CHEVRON_DOWN:"pi pi-chevron-down",CHEVRON_LEFT:"pi pi-chevron-left",CHEVRON_RIGHT:"pi pi-chevron-right",CHEVRON_UP:"pi pi-chevron-up",CIRCLE:"pi pi-circle",CIRCLE_FILL:"pi pi-circle-fill",CLOCK:"pi pi-clock",CLONE:"pi pi-clone",CLOUD:"pi pi-cloud",CLOUD_DOWNLOAD:"pi pi-cloud-download",CLOUD_UPLOAD:"pi pi-cloud-upload",CODE:"pi pi-code",COG:"pi pi-cog",COMMENT:"pi pi-comment",COMMENTS:"pi pi-comments",COMPASS:"pi pi-compass",COPY:"pi pi-copy",CREDIT_CARD:"pi pi-credit-card",DATABASE:"pi pi-database",DELETELEFT:"pi pi-delete-left",DESKTOP:"pi pi-desktop",DIRECTIONS:"pi pi-directions",DIRECTIONS_ALT:"pi pi-directions-alt",DISCORD:"pi pi-discord",DOLLAR:"pi pi-dollar",DOWNLOAD:"pi pi-download",EJECT:"pi pi-eject",ELLIPSIS_H:"pi pi-ellipsis-h",ELLIPSIS_V:"pi pi-ellipsis-v",ENVELOPE:"pi pi-envelope",ERASER:"pi pi-eraser",EURO:"pi pi-euro",EXCLAMATION_CIRCLE:"pi pi-exclamation-circle",EXCLAMATION_TRIANGLE:"pi pi-exclamation-triangle",EXTERNAL_LINK:"pi pi-external-link",EYE:"pi pi-eye",EYE_SLASH:"pi pi-eye-slash",FACEBOOK:"pi pi-facebook",FAST_BACKWARD:"pi pi-fast-backward",FAST_FORWARD:"pi pi-fast-forward",FILE:"pi pi-file",FILE_EDIT:"pi pi-file-edit",FILE_EXCEL:"pi pi-file-excel",FILE_EXPORT:"pi pi-file-export",FILE_IMPORT:"pi pi-file-import",FILE_PDF:"pi pi-file-pdf",FILE_WORD:"pi pi-file-word",FILTER:"pi pi-filter",FILTER_FILL:"pi pi-filter-fill",FILTER_SLASH:"pi pi-filter-slash",FLAG:"pi pi-flag",FLAG_FILL:"pi pi-flag-fill",FOLDER:"pi pi-folder",FOLDER_OPEN:"pi pi-folder-open",FORWARD:"pi pi-forward",GIFT:"pi pi-gift",GITHUB:"pi pi-github",GLOBE:"pi pi-globe",GOOGLE:"pi pi-google",HASHTAG:"pi pi-hashtag",HEART:"pi pi-heart",HEART_FILL:"pi pi-heart-fill",HISTORY:"pi pi-history",HOURGLASS:"pi pi-hourglass",HOME:"pi pi-home",ID_CARD:"pi pi-id-card",IMAGE:"pi pi-image",IMAGES:"pi pi-images",INBOX:"pi pi-inbox",INFO:"pi pi-info",INFO_CIRCLE:"pi pi-info-circle",INSTAGRAM:"pi pi-instagram",KEY:"pi pi-key",LANGUAGE:"pi pi-language",LINK:"pi pi-link",LINKEDIN:"pi pi-linkedin",LIST:"pi pi-list",LOCK:"pi pi-lock",LOCK_OPEN:"pi pi-lock-open",MAP:"pi pi-map",MAP_MARKER:"pi pi-map-marker",MEGAPHONE:"pi pi-megaphone",MICREPHONE:"pi pi-microphone",MICROSOFT:"pi pi-microsoft",MINUS:"pi pi-minus",MINUS_CIRCLE:"pi pi-minus-circle",MOBILE:"pi pi-mobile",MONEY_BILL:"pi pi-money-bill",MOON:"pi pi-moon",PALETTE:"pi pi-palette",PAPERCLIP:"pi pi-paperclip",PAUSE:"pi pi-pause",PAYPAL:"pi pi-paypal",PENCIL:"pi pi-pencil",PERCENTAGE:"pi pi-percentage",PHONE:"pi pi-phone",PLAY:"pi pi-play",PLUS:"pi pi-plus",PLUS_CIRCLE:"pi pi-plus-circle",POUND:"pi pi-pound",POWER_OFF:"pi pi-power-off",PRIME:"pi pi-prime",PRINT:"pi pi-print",QRCODE:"pi pi-qrcode",QUESTION:"pi pi-question",QUESTION_CIRCLE:"pi pi-question-circle",REDDIT:"pi pi-reddit",REFRESH:"pi pi-refresh",REPLAY:"pi pi-replay",REPLY:"pi pi-reply",SAVE:"pi pi-save",SEARCH:"pi pi-search",SEARCH_MINUS:"pi pi-search-minus",SEARCH_PLUS:"pi pi-search-plus",SEND:"pi pi-send",SERVER:"pi pi-server",SHARE_ALT:"pi pi-share-alt",SHIELD:"pi pi-shield",SHOPPING_BAG:"pi pi-shopping-bag",SHOPPING_CART:"pi pi-shopping-cart",SIGN_IN:"pi pi-sign-in",SIGN_OUT:"pi pi-sign-out",SITEMAP:"pi pi-sitemap",SLACK:"pi pi-slack",SLIDERS_H:"pi pi-sliders-h",SLIDERS_V:"pi pi-sliders-v",SORT:"pi pi-sort",SORT_ALPHA_DOWN:"pi pi-sort-alpha-down",SORT_ALPHA_ALT_DOWN:"pi pi-sort-alpha-alt-down",SORT_ALPHA_UP:"pi pi-sort-alpha-up",SORT_ALPHA_ALT_UP:"pi pi-sort-alpha-alt-up",SORT_ALT:"pi pi-sort-alt",SORT_ALT_SLASH:"pi pi-sort-slash",SORT_AMOUNT_DOWN:"pi pi-sort-amount-down",SORT_AMOUNT_DOWN_ALT:"pi pi-sort-amount-down-alt",SORT_AMOUNT_UP:"pi pi-sort-amount-up",SORT_AMOUNT_UP_ALT:"pi pi-sort-amount-up-alt",SORT_DOWN:"pi pi-sort-down",SORT_NUMERIC_DOWN:"pi pi-sort-numeric-down",SORT_NUMERIC_ALT_DOWN:"pi pi-sort-numeric-alt-down",SORT_NUMERIC_UP:"pi pi-sort-numeric-up",SORT_NUMERIC_ALT_UP:"pi pi-sort-numeric-alt-up",SORT_UP:"pi pi-sort-up",SPINNER:"pi pi-spinner",STAR:"pi pi-star",STAR_FILL:"pi pi-star-fill",STEP_BACKWARD:"pi pi-step-backward",STEP_BACKWARD_ALT:"pi pi-step-backward-alt",STEP_FORWARD:"pi pi-step-forward",STEP_FORWARD_ALT:"pi pi-step-forward-alt",STOP:"pi pi-stop",STOPWATCH:"pi pi-stop-watch",STOP_CIRCLE:"pi pi-stop-circle",SUN:"pi pi-sun",SYNC:"pi pi-sync",TABLE:"pi pi-table",TABLET:"pi pi-tablet",TAG:"pi pi-tag",TAGS:"pi pi-tags",TELEGRAM:"pi pi-telegram",TH_LARGE:"pi pi-th-large",THUMBS_DOWN:"pi pi-thumbs-down",THUMBS_DOWN_FILL:"pi pi-thumbs-down-fill",THUMBS_UP:"pi pi-thumbs-up",THUMBS_UP_FILL:"pi pi-thumbs-up-fill",TICKET:"pi pi-ticket",TIMES:"pi pi-times",TIMES_CIRCLE:"pi pi-times-circle",TRASH:"pi pi-trash",TRUCK:"pi pi-truck",TWITTER:"pi pi-twitter",UNDO:"pi pi-undo",UNLOCK:"pi pi-unlock",UPLOAD:"pi pi-upload",USER:"pi pi-user",USER_EDIT:"pi pi-user-edit",USER_MINUS:"pi pi-user-minus",USER_PLUS:"pi pi-user-plus",USERS:"pi pi-users",VERIFIED:"pi pi-verified",VIDEO:"pi pi-video",VIMEO:"pi pi-vimeo",VOLUME_DOWN:"pi pi-volume-down",VOLUME_OFF:"pi pi-volume-off",VOLUME_UP:"pi pi-volume-up",WALLET:"pi pi-wallet",WHATSAPP:"pi pi-whatsapp",WIFI:"pi pi-wifi",WINDOW_MAXIMIZE:"pi pi-window-maximize",WINDOW_MINIMIZE:"pi pi-window-minimize",WRENCH:"pi pi-wrench",YOUTUBE:"pi pi-youtube"},i.ToastSeverity={INFO:"info",WARN:"warn",ERROR:"error",SUCCESS:"success"},Object.defineProperty(i,"__esModule",{value:!0}),i}({},primevue.utils);
|
|
4
4
|
|
|
5
|
-
this.primevue=this.primevue||{},this.primevue.config=function(e,t,o){"use strict";const a={ripple:!1,inputStyle:"outlined",locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[t.FilterMatchMode.STARTS_WITH,t.FilterMatchMode.CONTAINS,t.FilterMatchMode.NOT_CONTAINS,t.FilterMatchMode.ENDS_WITH,t.FilterMatchMode.EQUALS,t.FilterMatchMode.NOT_EQUALS],numeric:[t.FilterMatchMode.EQUALS,t.FilterMatchMode.NOT_EQUALS,t.FilterMatchMode.LESS_THAN,t.FilterMatchMode.LESS_THAN_OR_EQUAL_TO,t.FilterMatchMode.GREATER_THAN,t.FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],date:[t.FilterMatchMode.DATE_IS,t.FilterMatchMode.DATE_IS_NOT,t.FilterMatchMode.DATE_BEFORE,t.FilterMatchMode.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100}},r=Symbol();function l(e,t,o,a){const r=document.getElementById(o),l=r.cloneNode(!0),i=r.getAttribute("href").replace(e,t);l.setAttribute("id",o+"-clone"),l.setAttribute("href",i),l.addEventListener("load",(()=>{r.remove(),l.setAttribute("id",o),a&&a()})),r.parentNode
|
|
5
|
+
this.primevue=this.primevue||{},this.primevue.config=function(e,t,o){"use strict";const a={ripple:!1,inputStyle:"outlined",locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left"}},filterMatchModeOptions:{text:[t.FilterMatchMode.STARTS_WITH,t.FilterMatchMode.CONTAINS,t.FilterMatchMode.NOT_CONTAINS,t.FilterMatchMode.ENDS_WITH,t.FilterMatchMode.EQUALS,t.FilterMatchMode.NOT_EQUALS],numeric:[t.FilterMatchMode.EQUALS,t.FilterMatchMode.NOT_EQUALS,t.FilterMatchMode.LESS_THAN,t.FilterMatchMode.LESS_THAN_OR_EQUAL_TO,t.FilterMatchMode.GREATER_THAN,t.FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],date:[t.FilterMatchMode.DATE_IS,t.FilterMatchMode.DATE_IS_NOT,t.FilterMatchMode.DATE_BEFORE,t.FilterMatchMode.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100}},r=Symbol();function l(e,t,o,a){const r=document.getElementById(o),l=r.cloneNode(!0),i=r.getAttribute("href").replace(e,t);l.setAttribute("id",o+"-clone"),l.setAttribute("href",i),l.addEventListener("load",(()=>{r.remove(),l.setAttribute("id",o),a&&a()})),r.parentNode&&r.parentNode.insertBefore(l,r.nextSibling)}var i={install:(e,t)=>{let i=t?{...a,...t}:{...a};const s={config:o.reactive(i),changeTheme:l};e.config.globalProperties.$primevue=s,e.provide(r,s)}};return e.default=i,e.usePrimeVue=function(){const e=o.inject(r);if(!e)throw new Error("PrimeVue is not installed!");return e},Object.defineProperty(e,"__esModule",{value:!0}),e}({},primevue.api,Vue);
|
|
6
6
|
|
|
7
7
|
this.primevue=this.primevue||{},this.primevue.ripple=function(e){"use strict";let t;function n(e){let t=l(e);t&&(!function(e){e.removeEventListener("mousedown",i)}(e),t.removeEventListener("animationend",r),t.remove())}function i(n){let i=n.currentTarget,r=l(i);if(!r||"none"===getComputedStyle(r,null).display)return;if(e.DomHandler.removeClass(r,"p-ink-active"),!e.DomHandler.getHeight(r)&&!e.DomHandler.getWidth(r)){let t=Math.max(e.DomHandler.getOuterWidth(i),e.DomHandler.getOuterHeight(i));r.style.height=t+"px",r.style.width=t+"px"}let o=e.DomHandler.getOffset(i),a=n.pageX-o.left+document.body.scrollTop-e.DomHandler.getWidth(r)/2,d=n.pageY-o.top+document.body.scrollLeft-e.DomHandler.getHeight(r)/2;r.style.top=d+"px",r.style.left=a+"px",e.DomHandler.addClass(r,"p-ink-active"),t=setTimeout((()=>{r&&e.DomHandler.removeClass(r,"p-ink-active")}),401)}function r(n){t&&clearTimeout(t),e.DomHandler.removeClass(n.currentTarget,"p-ink-active")}function l(e){for(let t=0;t<e.children.length;t++)if("string"==typeof e.children[t].className&&-1!==e.children[t].className.indexOf("p-ink"))return e.children[t];return null}return{mounted(e,t){t.instance.$primevue&&t.instance.$primevue.config&&t.instance.$primevue.config.ripple&&(function(e){let t=document.createElement("span");t.className="p-ink",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),e.appendChild(t),t.addEventListener("animationend",r)}(e),function(e){e.addEventListener("mousedown",i)}(e))},unmounted(e){n(e)}}}(primevue.utils);
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ this.primevue=this.primevue||{},this.primevue.tooltip=function(t){"use strict";f
|
|
|
12
12
|
|
|
13
13
|
this.primevue=this.primevue||{},this.primevue.focustrap=function(e){"use strict";function t(e){e.$_pfocustrap_mutationobserver&&e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_focusinlistener&&e.removeEventListener("focusin",e.$_pfocustrap_focusinlistener)&&(e.$_pfocustrap_focusinlistener=null),e.$_pfocustrap_focusoutlistener&&e.removeEventListener("focusout",e.$_pfocustrap_focusoutlistener)&&(e.$_pfocustrap_focusoutlistener=null)}function o(t){const{currentTarget:o,relatedTarget:s}=t,n=s===o.$_pfocustrap_lasthiddenfocusableelement?e.DomHandler.getFirstFocusableElement(o.parentElement,`:not(.p-hidden-focusable)${o.$_pfocustrap_focusableselector}`):o.$_pfocustrap_lasthiddenfocusableelement;e.DomHandler.focus(n)}function s(t){const{currentTarget:o,relatedTarget:s}=t,n=s===o.$_pfocustrap_firsthiddenfocusableelement?e.DomHandler.getLastFocusableElement(o.parentElement,`:not(.p-hidden-focusable)${o.$_pfocustrap_focusableselector}`):o.$_pfocustrap_firsthiddenfocusableelement;e.DomHandler.focus(n)}const n={mounted(t,n){const{disabled:u}=n.value||{};u||(function(e,t){const{tabIndex:n=0,firstFocusableSelector:u="",lastFocusableSelector:c=""}=t.value||{},r=e=>{const t=document.createElement("span");return t.classList="p-hidden-accessible p-hidden-focusable",t.tabIndex=n,t.setAttribute("aria-hidden","true"),t.setAttribute("role","presentation"),t.addEventListener("focus",e),t},a=r(o),l=r(s);a.$_pfocustrap_lasthiddenfocusableelement=l,a.$_pfocustrap_focusableselector=u,l.$_pfocustrap_firsthiddenfocusableelement=a,l.$_pfocustrap_focusableselector=c,e.prepend(a),e.append(l)}(t,n),function(t,o){const{onFocusIn:s,onFocusOut:n}=o.value||{};t.$_pfocustrap_mutationobserver=new MutationObserver((o=>{o.forEach((o=>{if("childList"===o.type&&!t.contains(document.activeElement)){const t=o=>{const s=e.DomHandler.isFocusableElement(o)?o:e.DomHandler.getFirstFocusableElement(o);return e.ObjectUtils.isNotEmpty(s)?s:t(o.nextSibling)};e.DomHandler.focus(t(o.nextSibling))}}))})),t.$_pfocustrap_mutationobserver.disconnect(),t.$_pfocustrap_mutationobserver.observe(t,{childList:!0}),t.$_pfocustrap_focusinlistener=e=>s&&s(e),t.$_pfocustrap_focusoutlistener=e=>n&&n(e),t.addEventListener("focusin",t.$_pfocustrap_focusinlistener),t.addEventListener("focusout",t.$_pfocustrap_focusoutlistener)}(t,n),function(t,o){const{autoFocusSelector:s="",firstFocusableSelector:n="",autoFocus:u=!1}=o.value||{};let c=e.DomHandler.getFirstFocusableElement(t,`[autofocus]:not(.p-hidden-focusable)${s}`);u&&!c&&(c=e.DomHandler.getFirstFocusableElement(t,`:not(.p-hidden-focusable)${n}`)),e.DomHandler.focus(c)}(t,n))},updated(e,o){const{disabled:s}=o.value||{};s&&t(e)},unmounted(e){t(e)}};return n}(primevue.utils);
|
|
14
14
|
|
|
15
|
-
this.primevue=this.primevue||{},this.primevue.virtualscroller=function(t,e){"use strict";var s={name:"VirtualScroller",emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},data(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems(t){this.d_numToleratedItems=t},loading(t){this.d_loading=t},items(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize(){this.init(),this.calculateAutoSize()},orientation(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight(){this.init(),this.calculateAutoSize()},scrollWidth(){this.init(),this.calculateAutoSize()}},mounted(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated(){!this.initialized&&this.viewInit()},unmounted(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit(){t.DomHandler.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.bindResizeListener(),this.defaultWidth=t.DomHandler.getWidth(this.element),this.defaultHeight=t.DomHandler.getHeight(this.element),this.defaultContentWidth=t.DomHandler.getWidth(this.content),this.defaultContentHeight=t.DomHandler.getHeight(this.content),this.initialized=!0)},init(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical(){return"vertical"===this.orientation},isHorizontal(){return"horizontal"===this.orientation},isBoth(){return"both"===this.orientation},scrollTo(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element?.scrollTo(t)},scrollToIndex(t,e="auto"){const s=this.isBoth(),i=this.isHorizontal(),o=this.first,{numToleratedItems:l}=this.calculateNumItems(),n=this.getContentPosition(),r=this.itemSize,h=(t=0,e)=>t<=e?0:t,a=(t,e,s)=>t*e+s,d=(t=0,s=0)=>this.scrollTo({left:t,top:s,behavior:e});let c=s?{rows:0,cols:0}:0,m=!1;s?(c={rows:h(t[0],l[0]),cols:h(t[1],l[1])},d(a(c.cols,r[1],n.left),a(c.rows,r[0],n.top)),m=c.rows!==o.rows||c.cols!==o.cols):(c=h(t,l),i?d(a(c,r,n.left),0):d(0,a(c,r,n.top)),m=c!==o),this.isRangeChanged=m,this.first=c},scrollInView(t,e,s="auto"){if(e){const i=this.isBoth(),o=this.isHorizontal(),{first:l,viewport:n}=this.getRenderedRange(),r=(t=0,e=0)=>this.scrollTo({left:t,top:e,behavior:s}),h="to-end"===e;if("to-start"===e){if(i)n.first.rows-l.rows>t[0]?r(n.first.cols*this.itemSize[1],(n.first.rows-1)*this.itemSize[0]):n.first.cols-l.cols>t[1]&&r((n.first.cols-1)*this.itemSize[1],n.first.rows*this.itemSize[0]);else if(n.first-l>t){const t=(n.first-1)*this.itemSize;o?r(t,0):r(0,t)}}else if(h)if(i)n.last.rows-l.rows<=t[0]+1?r(n.first.cols*this.itemSize[1],(n.first.rows+1)*this.itemSize[0]):n.last.cols-l.cols<=t[1]+1&&r((n.first.cols+1)*this.itemSize[1],n.first.rows*this.itemSize[0]);else if(n.last-l<=t+1){const t=(n.first+1)*this.itemSize;o?r(t,0):r(0,t)}}else this.scrollToIndex(t,s)},getRenderedRange(){const t=(t,e)=>Math.floor(t/(e||t));let e=this.first,s=0;if(this.element){const i=this.isBoth(),o=this.isHorizontal(),{scrollTop:l,scrollLeft:n}=this.element.scrollTop;if(i)e={rows:t(l,this.itemSize[0]),cols:t(n,this.itemSize[1])},s={rows:e.rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else{e=t(o?n:l,this.itemSize),s=e+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:e,last:s}}},calculateNumItems(){const t=this.isBoth(),e=this.isHorizontal(),s=this.itemSize,i=this.getContentPosition(),o=this.element?this.element.offsetWidth-i.left:0,l=this.element?this.element.offsetHeight-i.top:0,n=(t,e)=>Math.ceil(t/(e||t)),r=t=>Math.ceil(t/2),h=t?{rows:n(l,s[0]),cols:n(o,s[1])}:n(e?o:l,s);return{numItemsInViewport:h,numToleratedItems:this.d_numToleratedItems||(t?[r(h.rows),r(h.cols)]:r(h))}},calculateOptions(){const t=this.isBoth(),e=this.first,{numItemsInViewport:s,numToleratedItems:i}=this.calculateNumItems(),o=(t,e,s,i=!1)=>this.getLast(t+e+(t<s?2:3)*s,i),l=t?{rows:o(e.rows,s.rows,i[0]),cols:o(e.cols,s.cols,i[1],!0)}:o(e,s,i);this.last=l,this.numItemsInViewport=s,this.d_numToleratedItems=i,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=t?Array.from({length:s.rows}).map((()=>Array.from({length:s.cols}))):Array.from({length:s})),this.lazy&&Promise.resolve().then((()=>{this.lazyLoadState={first:this.step?t?{rows:0,cols:e.cols}:0:e,last:Math.min(this.step?this.step:l,this.items.length)},this.$emit("lazy-load",this.lazyLoadState)}))},calculateAutoSize(){this.autoSize&&!this.d_loading&&Promise.resolve().then((()=>{if(this.content){const e=this.isBoth(),s=this.isHorizontal(),i=this.isVertical();this.content.style.minHeight=this.content.style.minWidth="auto",this.content.style.position="relative",this.element.style.contain="none";const[o,l]=[t.DomHandler.getWidth(this.content),t.DomHandler.getHeight(this.content)];o!==this.defaultContentWidth&&(this.element.style.width=""),l!==this.defaultContentHeight&&(this.element.style.height="");const[n,r]=[t.DomHandler.getWidth(this.element),t.DomHandler.getHeight(this.element)];(e||s)&&(this.element.style.width=n<this.defaultWidth?n+"px":this.scrollWidth||this.defaultWidth+"px"),(e||i)&&(this.element.style.height=r<this.defaultHeight?r+"px":this.scrollHeight||this.defaultHeight+"px"),this.content.style.minHeight=this.content.style.minWidth="",this.content.style.position="",this.element.style.contain=""}}))},getLast(t=0,e){return this.items?Math.min(e?(this.columns||this.items[0]).length:this.items.length,t):0},getContentPosition(){if(this.content){const t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),s=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),i=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:s,top:i,bottom:o,x:e+s,y:i+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize(){if(this.element){const t=this.isBoth(),e=this.isHorizontal(),s=this.element.parentElement,i=this.scrollWidth||`${this.element.offsetWidth||s.offsetWidth}px`,o=this.scrollHeight||`${this.element.offsetHeight||s.offsetHeight}px`,l=(t,e)=>this.element.style[t]=e;t||e?(l("height",o),l("width",i)):l("height",o)}},setSpacerSize(){const t=this.items;if(t){const e=this.isBoth(),s=this.isHorizontal(),i=this.getContentPosition(),o=(t,e,s,i=0)=>this.spacerStyle={...this.spacerStyle,[`${t}`]:(e||[]).length*s+i+"px"};e?(o("height",t,this.itemSize[0],i.y),o("width",this.columns||t[1],this.itemSize[1],i.x)):s?o("width",this.columns||t,this.itemSize,i.x):o("height",t,this.itemSize,i.y)}},setContentPosition(t){if(this.content&&!this.appendOnly){const e=this.isBoth(),s=this.isHorizontal(),i=t?t.first:this.first,o=(t,e)=>t*e,l=(t=0,e=0)=>this.contentStyle={...this.contentStyle,transform:`translate3d(${t}px, ${e}px, 0)`};if(e)l(o(i.cols,this.itemSize[1]),o(i.rows,this.itemSize[0]));else{const t=o(i,this.itemSize);s?l(t,0):l(0,t)}}},onScrollPositionChange(t){const e=t.target,s=this.isBoth(),i=this.isHorizontal(),o=this.getContentPosition(),l=(t,e)=>t?t>e?t-e:t:0,n=(t,e)=>Math.floor(t/(e||t)),r=(t,e,s,i,o,l)=>t<=o?o:l?s-i-o:e+o-1,h=(t,e,s,i,o,l,n)=>t<=l?0:Math.max(0,n?t<e?s:t-l:t>e?s:t-2*l),a=(t,e,s,i,o,l)=>{let n=e+i+2*o;return t>=o&&(n+=o+1),this.getLast(n,l)},d=l(e.scrollTop,o.top),c=l(e.scrollLeft,o.left);let m=s?{rows:0,cols:0}:0,u=this.last,p=!1,f=this.lastScrollPos;if(s){const t=this.lastScrollPos.top<=d,e=this.lastScrollPos.left<=c;if(!this.appendOnly||this.appendOnly&&(t||e)){const s={rows:n(d,this.itemSize[0]),cols:n(c,this.itemSize[1])},i={rows:r(s.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],t),cols:r(s.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],e)};m={rows:h(s.rows,i.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],t),cols:h(s.cols,i.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],e)},u={rows:a(s.rows,m.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:a(s.cols,m.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||u.rows!==this.last.rows||m.cols!==this.first.cols||u.cols!==this.last.cols||this.isRangeChanged,f={top:d,left:c}}}else{const t=i?c:d,e=this.lastScrollPos<=t;if(!this.appendOnly||this.appendOnly&&e){const s=n(t,this.itemSize);m=h(s,r(s,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,e),this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,e),u=a(s,m,this.last,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||u!==this.last||this.isRangeChanged,f=t}}return{first:m,last:u,isRangeChanged:p,scrollPos:f}},onScrollChange(t){const{first:e,last:s,isRangeChanged:i,scrollPos:o}=this.onScrollPositionChange(t);if(i){const t={first:e,last:s};if(this.setContentPosition(t),this.first=e,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",t),this.lazy&&this.isPageChanged(e)){const t={first:this.step?Math.min(this.getPageByFirst(e)*this.step,this.items.length-this.step):e,last:Math.min(this.step?(this.getPageByFirst(e)+1)*this.step:s,this.items.length)};(this.lazyLoadState.first!==t.first||this.lazyLoadState.last!==t.last)&&this.$emit("lazy-load",t),this.lazyLoadState=t}}},onScroll(t){if(this.$emit("scroll",t),this.delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:e}=this.onScrollPositionChange(t);(e||!!this.step&&this.isPageChanged())&&(this.d_loading=!0)}this.scrollTimeout=setTimeout((()=>{this.onScrollChange(t),!this.d_loading||!this.showLoader||this.lazy&&void 0!==this.loading||(this.d_loading=!1,this.page=this.getPageByFirst())}),this.delay)}else this.onScrollChange(t)},onResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{if(t.DomHandler.isVisible(this.element)){const e=this.isBoth(),s=this.isVertical(),i=this.isHorizontal(),[o,l]=[t.DomHandler.getWidth(this.element),t.DomHandler.getHeight(this.element)],[n,r]=[o!==this.defaultWidth,l!==this.defaultHeight];(e?n||r:i?n:!!s&&r)&&(this.d_numToleratedItems=this.numToleratedItems,this.defaultWidth=o,this.defaultHeight=l,this.defaultContentWidth=t.DomHandler.getWidth(this.content),this.defaultContentHeight=t.DomHandler.getHeight(this.content),this.init())}}),this.resizeDelay)},bindResizeListener(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions(t){const e=(this.items||[]).length,s=this.isBoth()?this.first.rows+t:this.first+t;return{index:s,count:e,first:0===s,last:s===e-1,even:s%2==0,odd:s%2!=0}},getLoaderOptions(t,e){let s=this.loaderArr.length;return{index:t,count:s,first:0===t,last:t===s-1,even:t%2==0,odd:t%2!=0,...e}},getPageByFirst(t){return Math.floor(((t??this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged(t){return!this.step||this.page!==this.getPageByFirst(t??this.first)},setContentEl(e){this.content=e||this.content||t.DomHandler.findSingle(this.element,".p-virtualscroller-content")},elementRef(t){this.element=t},contentRef(t){this.content=t}},computed:{containerClass(){return["p-virtualscroller",{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()},this.class]},contentClass(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems(){return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((t=>this.columns?t:t.slice(this.appendOnly?0:this.first.cols,this.last.cols))):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns(){if(this.columns){const t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}}};const i=["tabindex"],o={key:1,class:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"};return function(t,e){void 0===e&&(e={});var s=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===s&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n transform: translateZ(0);\n will-change: scroll-position;\n outline: 0 none;\n}\n.p-virtualscroller-content {\n position: absolute;\n top: 0;\n left: 0;\n /* contain: content; */\n min-height: 100%;\n min-width: 100%;\n will-change: transform;\n}\n.p-virtualscroller-spacer {\n position: absolute;\n top: 0;\n left: 0;\n height: 1px;\n width: 1px;\n transform-origin: 0 0;\n pointer-events: none;\n}\n.p-virtualscroller .p-virtualscroller-loader {\n position: sticky;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.p-virtualscroller-loader.p-component-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.p-virtualscroller-loading-icon {\n font-size: 2rem;\n}\n.p-virtualscroller-horizontal > .p-virtualscroller-content {\n display: flex;\n}\n\n/* Inline */\n.p-virtualscroller-inline .p-virtualscroller-content {\n position: static;\n}\n"),s.render=function(t,s,l,n,r,h){return l.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"default"),e.renderSlot(t.$slots,"content",{items:l.items,rows:l.items,columns:h.loadedColumns})],64)):(e.openBlock(),e.createElementBlock("div",{key:0,ref:h.elementRef,class:e.normalizeClass(h.containerClass),tabindex:l.tabindex,style:e.normalizeStyle(l.style),onScroll:s[0]||(s[0]=(...t)=>h.onScroll&&h.onScroll(...t))},[e.renderSlot(t.$slots,"content",{styleClass:h.contentClass,items:h.loadedItems,getItemOptions:h.getOptions,loading:r.d_loading,getLoaderOptions:h.getLoaderOptions,itemSize:l.itemSize,rows:h.loadedRows,columns:h.loadedColumns,contentRef:h.contentRef,spacerStyle:r.spacerStyle,contentStyle:r.contentStyle,vertical:h.isVertical(),horizontal:h.isHorizontal(),both:h.isBoth()},(()=>[e.createElementVNode("div",{ref:h.contentRef,class:e.normalizeClass(h.contentClass),style:e.normalizeStyle(r.contentStyle)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.loadedItems,((s,i)=>e.renderSlot(t.$slots,"item",{key:i,item:s,options:h.getOptions(i)}))),128))],6)])),l.showSpacer?(e.openBlock(),e.createElementBlock("div",{key:0,class:"p-virtualscroller-spacer",style:e.normalizeStyle(r.spacerStyle)},null,4)):e.createCommentVNode("",!0),!l.loaderDisabled&&l.showLoader&&r.d_loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(h.loaderClass)},[t.$slots&&t.$slots.loader?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.loaderArr,((s,i)=>e.renderSlot(t.$slots,"loader",{key:i,options:h.getLoaderOptions(i,h.isBoth()&&{numCols:t.d_numItemsInViewport.cols})}))),128)):(e.openBlock(),e.createElementBlock("i",o))],2)):e.createCommentVNode("",!0)],46,i))},s}(primevue.utils,Vue);
|
|
15
|
+
this.primevue=this.primevue||{},this.primevue.virtualscroller=function(t,e){"use strict";var s={name:"VirtualScroller",emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},data(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems(t){this.d_numToleratedItems=t},loading(t){this.d_loading=t},items(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize(){this.init(),this.calculateAutoSize()},orientation(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight(){this.init(),this.calculateAutoSize()},scrollWidth(){this.init(),this.calculateAutoSize()}},mounted(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated(){!this.initialized&&this.viewInit()},unmounted(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit(){t.DomHandler.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.bindResizeListener(),this.defaultWidth=t.DomHandler.getWidth(this.element),this.defaultHeight=t.DomHandler.getHeight(this.element),this.defaultContentWidth=t.DomHandler.getWidth(this.content),this.defaultContentHeight=t.DomHandler.getHeight(this.content),this.initialized=!0)},init(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical(){return"vertical"===this.orientation},isHorizontal(){return"horizontal"===this.orientation},isBoth(){return"both"===this.orientation},scrollTo(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element&&this.element.scrollTo(t)},scrollToIndex(t,e="auto"){const s=this.isBoth(),i=this.isHorizontal(),o=this.first,{numToleratedItems:l}=this.calculateNumItems(),n=this.getContentPosition(),r=this.itemSize,h=(t=0,e)=>t<=e?0:t,a=(t,e,s)=>t*e+s,d=(t=0,s=0)=>this.scrollTo({left:t,top:s,behavior:e});let c=s?{rows:0,cols:0}:0,m=!1;s?(c={rows:h(t[0],l[0]),cols:h(t[1],l[1])},d(a(c.cols,r[1],n.left),a(c.rows,r[0],n.top)),m=c.rows!==o.rows||c.cols!==o.cols):(c=h(t,l),i?d(a(c,r,n.left),0):d(0,a(c,r,n.top)),m=c!==o),this.isRangeChanged=m,this.first=c},scrollInView(t,e,s="auto"){if(e){const i=this.isBoth(),o=this.isHorizontal(),{first:l,viewport:n}=this.getRenderedRange(),r=(t=0,e=0)=>this.scrollTo({left:t,top:e,behavior:s}),h="to-end"===e;if("to-start"===e){if(i)n.first.rows-l.rows>t[0]?r(n.first.cols*this.itemSize[1],(n.first.rows-1)*this.itemSize[0]):n.first.cols-l.cols>t[1]&&r((n.first.cols-1)*this.itemSize[1],n.first.rows*this.itemSize[0]);else if(n.first-l>t){const t=(n.first-1)*this.itemSize;o?r(t,0):r(0,t)}}else if(h)if(i)n.last.rows-l.rows<=t[0]+1?r(n.first.cols*this.itemSize[1],(n.first.rows+1)*this.itemSize[0]):n.last.cols-l.cols<=t[1]+1&&r((n.first.cols+1)*this.itemSize[1],n.first.rows*this.itemSize[0]);else if(n.last-l<=t+1){const t=(n.first+1)*this.itemSize;o?r(t,0):r(0,t)}}else this.scrollToIndex(t,s)},getRenderedRange(){const t=(t,e)=>Math.floor(t/(e||t));let e=this.first,s=0;if(this.element){const i=this.isBoth(),o=this.isHorizontal(),{scrollTop:l,scrollLeft:n}=this.element.scrollTop;if(i)e={rows:t(l,this.itemSize[0]),cols:t(n,this.itemSize[1])},s={rows:e.rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else{e=t(o?n:l,this.itemSize),s=e+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:e,last:s}}},calculateNumItems(){const t=this.isBoth(),e=this.isHorizontal(),s=this.itemSize,i=this.getContentPosition(),o=this.element?this.element.offsetWidth-i.left:0,l=this.element?this.element.offsetHeight-i.top:0,n=(t,e)=>Math.ceil(t/(e||t)),r=t=>Math.ceil(t/2),h=t?{rows:n(l,s[0]),cols:n(o,s[1])}:n(e?o:l,s);return{numItemsInViewport:h,numToleratedItems:this.d_numToleratedItems||(t?[r(h.rows),r(h.cols)]:r(h))}},calculateOptions(){const t=this.isBoth(),e=this.first,{numItemsInViewport:s,numToleratedItems:i}=this.calculateNumItems(),o=(t,e,s,i=!1)=>this.getLast(t+e+(t<s?2:3)*s,i),l=t?{rows:o(e.rows,s.rows,i[0]),cols:o(e.cols,s.cols,i[1],!0)}:o(e,s,i);this.last=l,this.numItemsInViewport=s,this.d_numToleratedItems=i,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=t?Array.from({length:s.rows}).map((()=>Array.from({length:s.cols}))):Array.from({length:s})),this.lazy&&Promise.resolve().then((()=>{this.lazyLoadState={first:this.step?t?{rows:0,cols:e.cols}:0:e,last:Math.min(this.step?this.step:l,this.items.length)},this.$emit("lazy-load",this.lazyLoadState)}))},calculateAutoSize(){this.autoSize&&!this.d_loading&&Promise.resolve().then((()=>{if(this.content){const e=this.isBoth(),s=this.isHorizontal(),i=this.isVertical();this.content.style.minHeight=this.content.style.minWidth="auto",this.content.style.position="relative",this.element.style.contain="none";const[o,l]=[t.DomHandler.getWidth(this.content),t.DomHandler.getHeight(this.content)];o!==this.defaultContentWidth&&(this.element.style.width=""),l!==this.defaultContentHeight&&(this.element.style.height="");const[n,r]=[t.DomHandler.getWidth(this.element),t.DomHandler.getHeight(this.element)];(e||s)&&(this.element.style.width=n<this.defaultWidth?n+"px":this.scrollWidth||this.defaultWidth+"px"),(e||i)&&(this.element.style.height=r<this.defaultHeight?r+"px":this.scrollHeight||this.defaultHeight+"px"),this.content.style.minHeight=this.content.style.minWidth="",this.content.style.position="",this.element.style.contain=""}}))},getLast(t=0,e){return this.items?Math.min(e?(this.columns||this.items[0]).length:this.items.length,t):0},getContentPosition(){if(this.content){const t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),s=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),i=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:s,top:i,bottom:o,x:e+s,y:i+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize(){if(this.element){const t=this.isBoth(),e=this.isHorizontal(),s=this.element.parentElement,i=this.scrollWidth||`${this.element.offsetWidth||s.offsetWidth}px`,o=this.scrollHeight||`${this.element.offsetHeight||s.offsetHeight}px`,l=(t,e)=>this.element.style[t]=e;t||e?(l("height",o),l("width",i)):l("height",o)}},setSpacerSize(){const t=this.items;if(t){const e=this.isBoth(),s=this.isHorizontal(),i=this.getContentPosition(),o=(t,e,s,i=0)=>this.spacerStyle={...this.spacerStyle,[`${t}`]:(e||[]).length*s+i+"px"};e?(o("height",t,this.itemSize[0],i.y),o("width",this.columns||t[1],this.itemSize[1],i.x)):s?o("width",this.columns||t,this.itemSize,i.x):o("height",t,this.itemSize,i.y)}},setContentPosition(t){if(this.content&&!this.appendOnly){const e=this.isBoth(),s=this.isHorizontal(),i=t?t.first:this.first,o=(t,e)=>t*e,l=(t=0,e=0)=>this.contentStyle={...this.contentStyle,transform:`translate3d(${t}px, ${e}px, 0)`};if(e)l(o(i.cols,this.itemSize[1]),o(i.rows,this.itemSize[0]));else{const t=o(i,this.itemSize);s?l(t,0):l(0,t)}}},onScrollPositionChange(t){const e=t.target,s=this.isBoth(),i=this.isHorizontal(),o=this.getContentPosition(),l=(t,e)=>t?t>e?t-e:t:0,n=(t,e)=>Math.floor(t/(e||t)),r=(t,e,s,i,o,l)=>t<=o?o:l?s-i-o:e+o-1,h=(t,e,s,i,o,l,n)=>t<=l?0:Math.max(0,n?t<e?s:t-l:t>e?s:t-2*l),a=(t,e,s,i,o,l)=>{let n=e+i+2*o;return t>=o&&(n+=o+1),this.getLast(n,l)},d=l(e.scrollTop,o.top),c=l(e.scrollLeft,o.left);let m=s?{rows:0,cols:0}:0,u=this.last,p=!1,f=this.lastScrollPos;if(s){const t=this.lastScrollPos.top<=d,e=this.lastScrollPos.left<=c;if(!this.appendOnly||this.appendOnly&&(t||e)){const s={rows:n(d,this.itemSize[0]),cols:n(c,this.itemSize[1])},i={rows:r(s.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],t),cols:r(s.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],e)};m={rows:h(s.rows,i.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],t),cols:h(s.cols,i.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],e)},u={rows:a(s.rows,m.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:a(s.cols,m.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||u.rows!==this.last.rows||m.cols!==this.first.cols||u.cols!==this.last.cols||this.isRangeChanged,f={top:d,left:c}}}else{const t=i?c:d,e=this.lastScrollPos<=t;if(!this.appendOnly||this.appendOnly&&e){const s=n(t,this.itemSize);m=h(s,r(s,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,e),this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,e),u=a(s,m,this.last,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||u!==this.last||this.isRangeChanged,f=t}}return{first:m,last:u,isRangeChanged:p,scrollPos:f}},onScrollChange(t){const{first:e,last:s,isRangeChanged:i,scrollPos:o}=this.onScrollPositionChange(t);if(i){const t={first:e,last:s};if(this.setContentPosition(t),this.first=e,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",t),this.lazy&&this.isPageChanged(e)){const t={first:this.step?Math.min(this.getPageByFirst(e)*this.step,this.items.length-this.step):e,last:Math.min(this.step?(this.getPageByFirst(e)+1)*this.step:s,this.items.length)};(this.lazyLoadState.first!==t.first||this.lazyLoadState.last!==t.last)&&this.$emit("lazy-load",t),this.lazyLoadState=t}}},onScroll(t){if(this.$emit("scroll",t),this.delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:e}=this.onScrollPositionChange(t);(e||!!this.step&&this.isPageChanged())&&(this.d_loading=!0)}this.scrollTimeout=setTimeout((()=>{this.onScrollChange(t),!this.d_loading||!this.showLoader||this.lazy&&void 0!==this.loading||(this.d_loading=!1,this.page=this.getPageByFirst())}),this.delay)}else this.onScrollChange(t)},onResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{if(t.DomHandler.isVisible(this.element)){const e=this.isBoth(),s=this.isVertical(),i=this.isHorizontal(),[o,l]=[t.DomHandler.getWidth(this.element),t.DomHandler.getHeight(this.element)],[n,r]=[o!==this.defaultWidth,l!==this.defaultHeight];(e?n||r:i?n:!!s&&r)&&(this.d_numToleratedItems=this.numToleratedItems,this.defaultWidth=o,this.defaultHeight=l,this.defaultContentWidth=t.DomHandler.getWidth(this.content),this.defaultContentHeight=t.DomHandler.getHeight(this.content),this.init())}}),this.resizeDelay)},bindResizeListener(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions(t){const e=(this.items||[]).length,s=this.isBoth()?this.first.rows+t:this.first+t;return{index:s,count:e,first:0===s,last:s===e-1,even:s%2==0,odd:s%2!=0}},getLoaderOptions(t,e){let s=this.loaderArr.length;return{index:t,count:s,first:0===t,last:t===s-1,even:t%2==0,odd:t%2!=0,...e}},getPageByFirst(t){return Math.floor(((t??this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged(t){return!this.step||this.page!==this.getPageByFirst(t??this.first)},setContentEl(e){this.content=e||this.content||t.DomHandler.findSingle(this.element,".p-virtualscroller-content")},elementRef(t){this.element=t},contentRef(t){this.content=t}},computed:{containerClass(){return["p-virtualscroller",{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()},this.class]},contentClass(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems(){return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((t=>this.columns?t:t.slice(this.appendOnly?0:this.first.cols,this.last.cols))):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns(){if(this.columns){const t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}}};const i=["tabindex"],o={key:1,class:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"};return function(t,e){void 0===e&&(e={});var s=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===s&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n transform: translateZ(0);\n will-change: scroll-position;\n outline: 0 none;\n}\n.p-virtualscroller-content {\n position: absolute;\n top: 0;\n left: 0;\n /* contain: content; */\n min-height: 100%;\n min-width: 100%;\n will-change: transform;\n}\n.p-virtualscroller-spacer {\n position: absolute;\n top: 0;\n left: 0;\n height: 1px;\n width: 1px;\n transform-origin: 0 0;\n pointer-events: none;\n}\n.p-virtualscroller .p-virtualscroller-loader {\n position: sticky;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.p-virtualscroller-loader.p-component-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.p-virtualscroller-loading-icon {\n font-size: 2rem;\n}\n.p-virtualscroller-horizontal > .p-virtualscroller-content {\n display: flex;\n}\n\n/* Inline */\n.p-virtualscroller-inline .p-virtualscroller-content {\n position: static;\n}\n"),s.render=function(t,s,l,n,r,h){return l.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"default"),e.renderSlot(t.$slots,"content",{items:l.items,rows:l.items,columns:h.loadedColumns})],64)):(e.openBlock(),e.createElementBlock("div",{key:0,ref:h.elementRef,class:e.normalizeClass(h.containerClass),tabindex:l.tabindex,style:e.normalizeStyle(l.style),onScroll:s[0]||(s[0]=(...t)=>h.onScroll&&h.onScroll(...t))},[e.renderSlot(t.$slots,"content",{styleClass:h.contentClass,items:h.loadedItems,getItemOptions:h.getOptions,loading:r.d_loading,getLoaderOptions:h.getLoaderOptions,itemSize:l.itemSize,rows:h.loadedRows,columns:h.loadedColumns,contentRef:h.contentRef,spacerStyle:r.spacerStyle,contentStyle:r.contentStyle,vertical:h.isVertical(),horizontal:h.isHorizontal(),both:h.isBoth()},(()=>[e.createElementVNode("div",{ref:h.contentRef,class:e.normalizeClass(h.contentClass),style:e.normalizeStyle(r.contentStyle)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.loadedItems,((s,i)=>e.renderSlot(t.$slots,"item",{key:i,item:s,options:h.getOptions(i)}))),128))],6)])),l.showSpacer?(e.openBlock(),e.createElementBlock("div",{key:0,class:"p-virtualscroller-spacer",style:e.normalizeStyle(r.spacerStyle)},null,4)):e.createCommentVNode("",!0),!l.loaderDisabled&&l.showLoader&&r.d_loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(h.loaderClass)},[t.$slots&&t.$slots.loader?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.loaderArr,((s,i)=>e.renderSlot(t.$slots,"loader",{key:i,options:h.getLoaderOptions(i,h.isBoth()&&{numCols:t.d_numItemsInViewport.cols})}))),128)):(e.openBlock(),e.createElementBlock("i",o))],2)):e.createCommentVNode("",!0)],46,i))},s}(primevue.utils,Vue);
|
|
16
16
|
|
|
17
17
|
this.primevue=this.primevue||{},this.primevue.confirmationeventbus=function(e){"use strict";return primevue.utils.EventBus()}();
|
|
18
18
|
|
|
@@ -40,7 +40,7 @@ this.primevue=this.primevue||{},this.primevue.message=function(e,t){"use strict"
|
|
|
40
40
|
|
|
41
41
|
this.primevue=this.primevue||{},this.primevue.progressbar=function(e){"use strict";var n={name:"ProgressBar",props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},computed:{containerClass(){return["p-progressbar p-component",{"p-progressbar-determinate":this.determinate,"p-progressbar-indeterminate":this.indeterminate}]},progressStyle(){return{width:this.value+"%",display:"flex"}},indeterminate(){return"indeterminate"===this.mode},determinate(){return"determinate"===this.mode}}};const t=["aria-valuenow"],r={key:0,class:"p-progressbar-label"},i={key:1,class:"p-progressbar-indeterminate-container"},a=[e.createElementVNode("div",{class:"p-progressbar-value p-progressbar-value-animate"},null,-1)];return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-progressbar {\n position: relative;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-value {\n height: 100%;\n width: 0%;\n position: absolute;\n display: none;\n border: 0 none;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n.p-progressbar-determinate .p-progressbar-label {\n display: inline-flex;\n}\n.p-progressbar-determinate .p-progressbar-value-animate {\n transition: width 1s ease-in-out;\n}\n.p-progressbar-indeterminate .p-progressbar-value::before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n}\n.p-progressbar-indeterminate .p-progressbar-value::after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim {\n0% {\n left: -35%;\n right: 100%;\n}\n60% {\n left: 100%;\n right: -90%;\n}\n100% {\n left: 100%;\n right: -90%;\n}\n}\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n@keyframes p-progressbar-indeterminate-anim-short {\n0% {\n left: -200%;\n right: 100%;\n}\n60% {\n left: 107%;\n right: -8%;\n}\n100% {\n left: 107%;\n right: -8%;\n}\n}\n"),n.render=function(n,s,o,l,p,m){return e.openBlock(),e.createElementBlock("div",{role:"progressbar",class:e.normalizeClass(m.containerClass),"aria-valuemin":"0","aria-valuenow":o.value,"aria-valuemax":"100"},[m.determinate?(e.openBlock(),e.createElementBlock("div",{key:0,class:"p-progressbar-value p-progressbar-value-animate",style:e.normalizeStyle(m.progressStyle)},[null!=o.value&&0!==o.value&&o.showValue?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(n.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.value+"%"),1)]))])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),m.indeterminate?(e.openBlock(),e.createElementBlock("div",i,a)):e.createCommentVNode("",!0)],10,t)},n}(Vue);
|
|
42
42
|
|
|
43
|
-
this.primevue=this.primevue||{},this.primevue.dropdown=function(e,t,i,n,o,s,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t),d=r(i),p=r(n),c=r(s),u={name:"Dropdown",emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{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},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:"pi pi-times"},dropdownIcon:{type:String,default:"pi pi-chevron-down"},filterIcon:{type:String,default:"pi pi-search"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,focusOnHover:!1,data(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||o.UniqueComponentId()},modelValue(){this.isModelValueChanged=!0},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||o.UniqueComponentId(),this.autoUpdateModel()},updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(o.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?o.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?o.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e,t){return(this.dataKey?o.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return!!this.optionDisabled&&o.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},show(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&o.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.focusedOptionIndex=-1,this.searchValue="",this.resetFilterOnHide&&(this.filterValue=null),e&&o.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled)return void e.preventDefault();const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&o.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key))}},onEditableInput(e){const t=e.target.value;this.searchValue="";!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.updateModel(e,t)},onContainerClick(e){this.disabled||this.loading||o.DomHandler.hasClass(e.target,"p-dropdown-clear-icon")||"INPUT"===e.target.tagName||this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide(!0):this.show(!0))},onClearClick(e){this.updateModel(e,null)},onFirstHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?o.DomHandler.getFirstFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;o.DomHandler.focus(t)},onLastHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?o.DomHandler.getLastFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;o.DomHandler.focus(t)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t);this.updateModel(e,n),i&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange(e){const t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0)}},onFilterBlur(){this.focusedOptionIndex=-1},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},onOverlayClick(e){a.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e,t=!1){if(e.altKey&&!t)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e,t=!1){t&&(this.focusedOptionIndex=-1)},onHomeKey(e,t=!1){t?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey(e,t=!1){if(t){const t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onSpaceKey(e,t=!1){!t&&this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e,t=!1){t||(this.overlayVisible&&this.hasFocusableElements()?(o.DomHandler.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey(e,t=!1){t&&!this.overlayVisible&&this.show()},onOverlayEnter(e){o.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&o.DomHandler.focus(this.$refs.filterInput)},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){o.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?o.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=o.DomHandler.getOuterWidth(this.$el)+"px",o.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new o.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!o.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},hasFocusableElements(){return o.DomHandler.getFocusableElements(this.overlay,":not(.p-hidden-focusable)").length>0},isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return this.isValidOption(e)&&o.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return o.ObjectUtils.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?o.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionIndex?(i=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionIndex):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionIndex&&(i=this.findFirstFocusedOptionIndex()),-1!==i&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),n},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=o.DomHandler.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)}),0)},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const n=this.getOptionGroupChildren(t);return n&&n.forEach((t=>e.push(t))),e}),[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-dropdown-label p-inputtext",this.inputClass,{"p-placeholder":!this.editable&&this.label===this.placeholder,"p-dropdown-label-empty":!(this.editable||this.$slots.value||"p-emptylabel"!==this.label&&0!==this.label.length)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},visibleOptions(){const t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){const i=e.FilterService.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){const e=this.options||[],t=[];return e.forEach((e=>{const n=e.items.filter((e=>i.includes(e)));n.length>0&&t.push({...e,items:[...n]})})),this.flatOptions(t)}return i}return t},hasSelectedOption(){return o.ObjectUtils.isNotEmpty(this.modelValue)},label(){const e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue(){const e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},filterResultMessageText(){return o.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId(){return-1!==this.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},directives:{ripple:p.default},components:{VirtualScroller:c.default,Portal:d.default}};const h=["id"],f=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],y=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],b={class:"p-dropdown-trigger"},v={key:0,class:"p-dropdown-header"},O={class:"p-dropdown-filter-container"},m=["value","placeholder","aria-owns","aria-activedescendant"],g={role:"status","aria-live":"polite",class:"p-hidden-accessible"},x=["id"],w=["id"],I=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],S={key:0,class:"p-dropdown-empty-message",role:"option"},V={key:1,class:"p-dropdown-empty-message",role:"option"},k={key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},F={role:"status","aria-live":"polite",class:"p-hidden-accessible"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-dropdown {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-dropdown-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-dropdown-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-dropdown-label-empty {\n overflow: hidden;\n opacity: 0;\n}\ninput.p-dropdown-label {\n cursor: default;\n}\n.p-dropdown .p-dropdown-panel {\n min-width: 100%;\n}\n.p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-dropdown-items-wrapper {\n overflow: auto;\n}\n.p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-dropdown-item-group {\n cursor: auto;\n}\n.p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-dropdown-filter {\n width: 100%;\n}\n.p-dropdown-filter-container {\n position: relative;\n}\n.p-dropdown-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-fluid .p-dropdown {\n display: flex;\n}\n.p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n}\n"),u.render=function(e,t,i,n,o,s){const r=l.resolveComponent("VirtualScroller"),a=l.resolveComponent("Portal"),d=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",{ref:"container",id:o.id,class:l.normalizeClass(s.containerClass),onClick:t[16]||(t[16]=(...e)=>s.onContainerClick&&s.onContainerClick(...e))},[i.editable?(l.openBlock(),l.createElementBlock("input",l.mergeProps({key:0,ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:s.inputStyleClass,value:s.editableInputValue,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),onInput:t[3]||(t[3]=(...e)=>s.onEditableInput&&s.onEditableInput(...e))},i.inputProps),null,16,f)):(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,ref:"focusInput",id:i.inputId,style:i.inputStyle,class:s.inputStyleClass,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel||("p-emptylabel"===s.label?void 0:s.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":i.disabled,onFocus:t[4]||(t[4]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[6]||(t[6]=(...e)=>s.onKeyDown&&s.onKeyDown(...e))},i.inputProps),[l.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[l.createTextVNode(l.toDisplayString("p-emptylabel"===s.label?" ":s.label||"empty"),1)]))],16,y)),i.showClear&&null!=i.modelValue?(l.openBlock(),l.createElementBlock("i",l.mergeProps({key:2,class:["p-dropdown-clear-icon",i.clearIcon],onClick:t[7]||(t[7]=(...e)=>s.onClearClick&&s.onClearClick(...e))},i.clearIconProps),null,16)):l.createCommentVNode("",!0),l.createElementVNode("div",b,[l.renderSlot(e.$slots,"indicator",{},(()=>[l.createElementVNode("span",{class:l.normalizeClass(s.dropdownIconClass),"aria-hidden":"true"},null,2)]))]),l.createVNode(a,{appendTo:i.appendTo},{default:l.withCtx((()=>[l.createVNode(l.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:l.withCtx((()=>[o.overlayVisible?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:s.overlayRef,style:i.panelStyle,class:s.panelStyleClass,onClick:t[14]||(t[14]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e)),onKeydown:t[15]||(t[15]=(...e)=>s.onOverlayKeyDown&&s.onOverlayKeyDown(...e))},i.panelProps),[l.createElementVNode("span",{ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[8]||(t[8]=(...e)=>s.onFirstHiddenFocus&&s.onFirstHiddenFocus(...e))},null,544),l.renderSlot(e.$slots,"header",{value:i.modelValue,options:s.visibleOptions}),i.filter?(l.openBlock(),l.createElementBlock("div",v,[l.createElementVNode("div",O,[l.createElementVNode("input",l.mergeProps({ref:"filterInput",type:"text",value:o.filterValue,onVnodeUpdated:t[9]||(t[9]=(...e)=>s.onFilterUpdated&&s.onFilterUpdated(...e)),class:"p-dropdown-filter p-inputtext p-component",placeholder:i.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,onKeydown:t[10]||(t[10]=(...e)=>s.onFilterKeyDown&&s.onFilterKeyDown(...e)),onBlur:t[11]||(t[11]=(...e)=>s.onFilterBlur&&s.onFilterBlur(...e)),onInput:t[12]||(t[12]=(...e)=>s.onFilterChange&&s.onFilterChange(...e))},i.filterInputProps),null,16,m),l.createElementVNode("span",{class:l.normalizeClass(["p-dropdown-filter-icon",i.filterIcon])},null,2)]),l.createElementVNode("span",g,l.toDisplayString(s.filterResultMessageText),1)])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"p-dropdown-items-wrapper",style:l.normalizeStyle({"max-height":s.virtualScrollerDisabled?i.scrollHeight:""})},[l.createVNode(r,l.mergeProps({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{items:s.visibleOptions,style:{height:i.scrollHeight},tabindex:-1,disabled:s.virtualScrollerDisabled}),l.createSlots({content:l.withCtx((({styleClass:t,contentRef:n,items:r,getItemOptions:a,contentStyle:p,itemSize:c})=>[l.createElementVNode("ul",{ref:e=>s.listRef(e,n),id:o.id+"_list",class:l.normalizeClass(["p-dropdown-items",t]),style:l.normalizeStyle(p),role:"listbox"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r,((t,i)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,a))},[s.isOptionGroup(t)?(l.openBlock(),l.createElementBlock("li",{key:0,id:o.id+"_"+s.getOptionIndex(i,a),style:l.normalizeStyle({height:c?c+"px":void 0}),class:"p-dropdown-item-group",role:"option"},[l.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,index:s.getOptionIndex(i,a)},(()=>[l.createTextVNode(l.toDisplayString(s.getOptionGroupLabel(t.optionGroup)),1)]))],12,w)):l.withDirectives((l.openBlock(),l.createElementBlock("li",{key:1,id:o.id+"_"+s.getOptionIndex(i,a),style:l.normalizeStyle({height:c?c+"px":void 0}),class:l.normalizeClass(["p-dropdown-item",{"p-highlight":s.isSelected(t),"p-focus":o.focusedOptionIndex===s.getOptionIndex(i,a),"p-disabled":s.isOptionDisabled(t)}]),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,a)),onClick:e=>s.onOptionSelect(e,t),onMousemove:e=>s.onOptionMouseMove(e,s.getOptionIndex(i,a))},[l.renderSlot(e.$slots,"option",{option:t,index:s.getOptionIndex(i,a)},(()=>[l.createTextVNode(l.toDisplayString(s.getOptionLabel(t)),1)]))],46,I)),[[d]])],64)))),128)),o.filterValue&&(!r||r&&0===r.length)?(l.openBlock(),l.createElementBlock("li",S,[l.renderSlot(e.$slots,"emptyfilter",{},(()=>[l.createTextVNode(l.toDisplayString(s.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(l.openBlock(),l.createElementBlock("li",V,[l.renderSlot(e.$slots,"empty",{},(()=>[l.createTextVNode(l.toDisplayString(s.emptyMessageText),1)]))])):l.createCommentVNode("",!0)],14,x)])),_:2},[e.$slots.loader?{name:"loader",fn:l.withCtx((({options:t})=>[l.renderSlot(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["items","style","disabled"])],4),l.renderSlot(e.$slots,"footer",{value:i.modelValue,options:s.visibleOptions}),!i.options||i.options&&0===i.options.length?(l.openBlock(),l.createElementBlock("span",k,l.toDisplayString(s.emptyMessageText),1)):l.createCommentVNode("",!0),l.createElementVNode("span",F,l.toDisplayString(s.selectedMessageText),1),l.createElementVNode("span",{ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[13]||(t[13]=(...e)=>s.onLastHiddenFocus&&s.onLastHiddenFocus(...e))},null,544)],16)):l.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],10,h)},u}(primevue.api,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,Vue);
|
|
43
|
+
this.primevue=this.primevue||{},this.primevue.dropdown=function(e,t,i,n,o,s,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t),d=r(i),p=r(n),c=r(s),u={name:"Dropdown",emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{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},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:"pi pi-times"},dropdownIcon:{type:String,default:"pi pi-chevron-down"},filterIcon:{type:String,default:"pi pi-search"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,focusOnHover:!1,data(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||o.UniqueComponentId()},modelValue(){this.isModelValueChanged=!0},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||o.UniqueComponentId(),this.autoUpdateModel()},updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(o.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?o.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?o.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e,t){return(this.dataKey?o.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return!!this.optionDisabled&&o.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},show(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&o.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.focusedOptionIndex=-1,this.searchValue="",this.resetFilterOnHide&&(this.filterValue=null),e&&o.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled)return void e.preventDefault();const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&o.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key))}},onEditableInput(e){const t=e.target.value;this.searchValue="";!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.updateModel(e,t)},onContainerClick(e){this.disabled||this.loading||o.DomHandler.hasClass(e.target,"p-dropdown-clear-icon")||"INPUT"===e.target.tagName||this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide(!0):this.show(!0))},onClearClick(e){this.updateModel(e,null)},onFirstHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?o.DomHandler.getFirstFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;o.DomHandler.focus(t)},onLastHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?o.DomHandler.getLastFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;o.DomHandler.focus(t)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t);this.updateModel(e,n),i&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange(e){const t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0)}},onFilterBlur(){this.focusedOptionIndex=-1},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},onOverlayClick(e){a.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e,t=!1){if(e.altKey&&!t)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e,t=!1){t&&(this.focusedOptionIndex=-1)},onHomeKey(e,t=!1){t?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey(e,t=!1){if(t){const t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onSpaceKey(e,t=!1){!t&&this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e,t=!1){t||(this.overlayVisible&&this.hasFocusableElements()?(o.DomHandler.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey(e,t=!1){t&&!this.overlayVisible&&this.show()},onOverlayEnter(e){o.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&o.DomHandler.focus(this.$refs.filterInput)},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){o.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?o.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=o.DomHandler.getOuterWidth(this.$el)+"px",o.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new o.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!o.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},hasFocusableElements(){return o.DomHandler.getFocusableElements(this.overlay,":not(.p-hidden-focusable)").length>0},isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return this.isValidOption(e)&&o.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return o.ObjectUtils.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?o.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionIndex?(i=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionIndex):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionIndex&&(i=this.findFirstFocusedOptionIndex()),-1!==i&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),n},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=o.DomHandler.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)}),0)},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const n=this.getOptionGroupChildren(t);return n&&n.forEach((t=>e.push(t))),e}),[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-dropdown-label p-inputtext",this.inputClass,{"p-placeholder":!this.editable&&this.label===this.placeholder,"p-dropdown-label-empty":!(this.editable||this.$slots.value||"p-emptylabel"!==this.label&&0!==this.label.length)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},visibleOptions(){const t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){const i=e.FilterService.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){const e=this.options||[],t=[];return e.forEach((e=>{const n=this.getOptionGroupChildren(e).filter((e=>i.includes(e)));n.length>0&&t.push({...e,["string"==typeof this.optionGroupChildren?this.optionGroupChildren:"items"]:[...n]})})),this.flatOptions(t)}return i}return t},hasSelectedOption(){return o.ObjectUtils.isNotEmpty(this.modelValue)},label(){const e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue(){const e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},filterResultMessageText(){return o.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId(){return-1!==this.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},directives:{ripple:p.default},components:{VirtualScroller:c.default,Portal:d.default}};const h=["id"],f=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],y=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],b={class:"p-dropdown-trigger"},v={key:0,class:"p-dropdown-header"},O={class:"p-dropdown-filter-container"},m=["value","placeholder","aria-owns","aria-activedescendant"],g={role:"status","aria-live":"polite",class:"p-hidden-accessible"},x=["id"],w=["id"],I=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],S={key:0,class:"p-dropdown-empty-message",role:"option"},V={key:1,class:"p-dropdown-empty-message",role:"option"},k={key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},F={role:"status","aria-live":"polite",class:"p-hidden-accessible"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-dropdown {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-dropdown-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-dropdown-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-dropdown-label-empty {\n overflow: hidden;\n opacity: 0;\n}\ninput.p-dropdown-label {\n cursor: default;\n}\n.p-dropdown .p-dropdown-panel {\n min-width: 100%;\n}\n.p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-dropdown-items-wrapper {\n overflow: auto;\n}\n.p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-dropdown-item-group {\n cursor: auto;\n}\n.p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-dropdown-filter {\n width: 100%;\n}\n.p-dropdown-filter-container {\n position: relative;\n}\n.p-dropdown-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-fluid .p-dropdown {\n display: flex;\n}\n.p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n}\n"),u.render=function(e,t,i,n,o,s){const r=l.resolveComponent("VirtualScroller"),a=l.resolveComponent("Portal"),d=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",{ref:"container",id:o.id,class:l.normalizeClass(s.containerClass),onClick:t[16]||(t[16]=(...e)=>s.onContainerClick&&s.onContainerClick(...e))},[i.editable?(l.openBlock(),l.createElementBlock("input",l.mergeProps({key:0,ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:s.inputStyleClass,value:s.editableInputValue,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),onInput:t[3]||(t[3]=(...e)=>s.onEditableInput&&s.onEditableInput(...e))},i.inputProps),null,16,f)):(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,ref:"focusInput",id:i.inputId,style:i.inputStyle,class:s.inputStyleClass,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel||("p-emptylabel"===s.label?void 0:s.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":i.disabled,onFocus:t[4]||(t[4]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[6]||(t[6]=(...e)=>s.onKeyDown&&s.onKeyDown(...e))},i.inputProps),[l.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[l.createTextVNode(l.toDisplayString("p-emptylabel"===s.label?" ":s.label||"empty"),1)]))],16,y)),i.showClear&&null!=i.modelValue?(l.openBlock(),l.createElementBlock("i",l.mergeProps({key:2,class:["p-dropdown-clear-icon",i.clearIcon],onClick:t[7]||(t[7]=(...e)=>s.onClearClick&&s.onClearClick(...e))},i.clearIconProps),null,16)):l.createCommentVNode("",!0),l.createElementVNode("div",b,[l.renderSlot(e.$slots,"indicator",{},(()=>[l.createElementVNode("span",{class:l.normalizeClass(s.dropdownIconClass),"aria-hidden":"true"},null,2)]))]),l.createVNode(a,{appendTo:i.appendTo},{default:l.withCtx((()=>[l.createVNode(l.Transition,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:l.withCtx((()=>[o.overlayVisible?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,ref:s.overlayRef,style:i.panelStyle,class:s.panelStyleClass,onClick:t[14]||(t[14]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e)),onKeydown:t[15]||(t[15]=(...e)=>s.onOverlayKeyDown&&s.onOverlayKeyDown(...e))},i.panelProps),[l.createElementVNode("span",{ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[8]||(t[8]=(...e)=>s.onFirstHiddenFocus&&s.onFirstHiddenFocus(...e))},null,544),l.renderSlot(e.$slots,"header",{value:i.modelValue,options:s.visibleOptions}),i.filter?(l.openBlock(),l.createElementBlock("div",v,[l.createElementVNode("div",O,[l.createElementVNode("input",l.mergeProps({ref:"filterInput",type:"text",value:o.filterValue,onVnodeUpdated:t[9]||(t[9]=(...e)=>s.onFilterUpdated&&s.onFilterUpdated(...e)),class:"p-dropdown-filter p-inputtext p-component",placeholder:i.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,onKeydown:t[10]||(t[10]=(...e)=>s.onFilterKeyDown&&s.onFilterKeyDown(...e)),onBlur:t[11]||(t[11]=(...e)=>s.onFilterBlur&&s.onFilterBlur(...e)),onInput:t[12]||(t[12]=(...e)=>s.onFilterChange&&s.onFilterChange(...e))},i.filterInputProps),null,16,m),l.createElementVNode("span",{class:l.normalizeClass(["p-dropdown-filter-icon",i.filterIcon])},null,2)]),l.createElementVNode("span",g,l.toDisplayString(s.filterResultMessageText),1)])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"p-dropdown-items-wrapper",style:l.normalizeStyle({"max-height":s.virtualScrollerDisabled?i.scrollHeight:""})},[l.createVNode(r,l.mergeProps({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{items:s.visibleOptions,style:{height:i.scrollHeight},tabindex:-1,disabled:s.virtualScrollerDisabled}),l.createSlots({content:l.withCtx((({styleClass:t,contentRef:n,items:r,getItemOptions:a,contentStyle:p,itemSize:c})=>[l.createElementVNode("ul",{ref:e=>s.listRef(e,n),id:o.id+"_list",class:l.normalizeClass(["p-dropdown-items",t]),style:l.normalizeStyle(p),role:"listbox"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r,((t,i)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,a))},[s.isOptionGroup(t)?(l.openBlock(),l.createElementBlock("li",{key:0,id:o.id+"_"+s.getOptionIndex(i,a),style:l.normalizeStyle({height:c?c+"px":void 0}),class:"p-dropdown-item-group",role:"option"},[l.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,index:s.getOptionIndex(i,a)},(()=>[l.createTextVNode(l.toDisplayString(s.getOptionGroupLabel(t.optionGroup)),1)]))],12,w)):l.withDirectives((l.openBlock(),l.createElementBlock("li",{key:1,id:o.id+"_"+s.getOptionIndex(i,a),style:l.normalizeStyle({height:c?c+"px":void 0}),class:l.normalizeClass(["p-dropdown-item",{"p-highlight":s.isSelected(t),"p-focus":o.focusedOptionIndex===s.getOptionIndex(i,a),"p-disabled":s.isOptionDisabled(t)}]),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,a)),onClick:e=>s.onOptionSelect(e,t),onMousemove:e=>s.onOptionMouseMove(e,s.getOptionIndex(i,a))},[l.renderSlot(e.$slots,"option",{option:t,index:s.getOptionIndex(i,a)},(()=>[l.createTextVNode(l.toDisplayString(s.getOptionLabel(t)),1)]))],46,I)),[[d]])],64)))),128)),o.filterValue&&(!r||r&&0===r.length)?(l.openBlock(),l.createElementBlock("li",S,[l.renderSlot(e.$slots,"emptyfilter",{},(()=>[l.createTextVNode(l.toDisplayString(s.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(l.openBlock(),l.createElementBlock("li",V,[l.renderSlot(e.$slots,"empty",{},(()=>[l.createTextVNode(l.toDisplayString(s.emptyMessageText),1)]))])):l.createCommentVNode("",!0)],14,x)])),_:2},[e.$slots.loader?{name:"loader",fn:l.withCtx((({options:t})=>[l.renderSlot(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["items","style","disabled"])],4),l.renderSlot(e.$slots,"footer",{value:i.modelValue,options:s.visibleOptions}),!i.options||i.options&&0===i.options.length?(l.openBlock(),l.createElementBlock("span",k,l.toDisplayString(s.emptyMessageText),1)):l.createCommentVNode("",!0),l.createElementVNode("span",F,l.toDisplayString(s.selectedMessageText),1),l.createElementVNode("span",{ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[13]||(t[13]=(...e)=>s.onLastHiddenFocus&&s.onLastHiddenFocus(...e))},null,544)],16)):l.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],10,h)},u}(primevue.api,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,Vue);
|
|
44
44
|
|
|
45
45
|
this.primevue=this.primevue||{},this.primevue.dialog=function(e,t,n,i,o){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(e),s=a(t),d={name:"Dialog",inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:"pi pi-times"},maximizeIcon:{type:String,default:"pi pi-window-maximize"},minimizeIcon:{type:String,default:"pi pi-window-minimize"},closeButtonProps:{type:null,default:null},_instance:null},provide(){return{dialogRef:o.computed((()=>this._instance))}},data(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&i.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted(){this.breakpoints&&this.createStyle()},methods:{close(){this.$emit("update:visible",!1)},onBeforeEnter(e){e.setAttribute(this.attributeSelector,"")},onEnter(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&i.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave(){this.modal&&i.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave(){this.autoZIndex&&i.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus(){const e=e=>e.querySelector("[autofocus]");let t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer),t||(t=this.$slots.default&&e(this.content),t||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)))),t&&i.DomHandler.focus(t)},maximize(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?i.DomHandler.addClass(document.body,"p-overflow-hidden"):i.DomHandler.removeClass(document.body,"p-overflow-hidden"))},enableDocumentSettings(){(this.modal||this.maximizable&&this.maximized)&&i.DomHandler.addClass(document.body,"p-overflow-hidden")},unbindDocumentState(){(this.modal||this.maximizable&&this.maximized)&&i.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeyDown(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},getPositionClass(){const e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((e=>e===this.position));return e?`p-dialog-${e}`:""},containerRef(e){this.container=e},maskRef(e){this.mask=e},contentRef(e){this.content=e},headerContainerRef(e){this.headerContainer=e},footerContainerRef(e){this.footerContainer=e},maximizableRef(e){this.maximizableButton=e},closeButtonRef(e){this.closeButton=e},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints)e+=`\n @media screen and (max-width: ${t}) {\n .p-dialog[${this.attributeSelector}] {\n width: ${this.breakpoints[t]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag(e){i.DomHandler.hasClass(e.target,"p-dialog-header-icon")||i.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",i.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener(){this.documentDragListener=e=>{if(this.dragging){let t=i.DomHandler.getOuterWidth(this.container),n=i.DomHandler.getOuterHeight(this.container),o=e.pageX-this.lastPageX,a=e.pageY-this.lastPageY,l=this.container.getBoundingClientRect(),s=l.left+o,d=l.top+a,r=i.DomHandler.getViewport();this.container.style.position="fixed",this.keepInViewport?(s>=this.minX&&s+t<r.width&&(this.lastPageX=e.pageX,this.container.style.left=s+"px"),d>=this.minY&&d+n<r.height&&(this.lastPageY=e.pageY,this.container.style.top=d+"px")):(this.lastPageX=e.pageX,this.container.style.left=s+"px",this.lastPageY=e.pageY,this.container.style.top=d+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener(){this.documentDragEndListener=e=>{this.dragging&&(this.dragging=!1,i.DomHandler.removeClass(document.body,"p-unselectable-text"),this.$emit("dragend",e))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maskClass(){return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":this.modal},this.getPositionClass()]},dialogClass(){return["p-dialog p-component",{"p-dialog-rtl":this.rtl,"p-dialog-maximized":this.maximizable&&this.maximized,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},maximizeIconClass(){return["p-dialog-header-maximize-icon",{[this.maximizeIcon]:!this.maximized,[this.minimizeIcon]:this.maximized}]},ariaId:()=>i.UniqueComponentId(),ariaLabelledById(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.ariaId+"_header":null},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:()=>i.UniqueComponentId(),contentStyleClass(){return["p-dialog-content",this.contentClass]}},directives:{ripple:a(n).default,focustrap:l.default},components:{Portal:s.default}};const r=["aria-labelledby","aria-modal"],m=["id"],p={class:"p-dialog-header-icons"},c=["autofocus","tabindex"],u=["autofocus","aria-label"];return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-dialog-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.p-dialog-mask.p-component-overlay {\n pointer-events: auto;\n}\n.p-dialog {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n max-height: 90%;\n transform: scale(1);\n}\n.p-dialog-content {\n overflow-y: auto;\n}\n.p-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n}\n.p-dialog-footer {\n flex-shrink: 0;\n}\n.p-dialog .p-dialog-header-icons {\n display: flex;\n align-items: center;\n}\n.p-dialog .p-dialog-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Fluid */\n.p-fluid .p-dialog-footer .p-button {\n width: auto;\n}\n\n/* Animation */\n/* Center */\n.p-dialog-enter-active {\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-dialog-leave-active {\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.p-dialog-enter-from,\n.p-dialog-leave-to {\n opacity: 0;\n transform: scale(0.7);\n}\n\n/* Top, Bottom, Left, Right, Top* and Bottom* */\n.p-dialog-top .p-dialog,\n.p-dialog-bottom .p-dialog,\n.p-dialog-left .p-dialog,\n.p-dialog-right .p-dialog,\n.p-dialog-topleft .p-dialog,\n.p-dialog-topright .p-dialog,\n.p-dialog-bottomleft .p-dialog,\n.p-dialog-bottomright .p-dialog {\n margin: 0.75rem;\n transform: translate3d(0px, 0px, 0px);\n}\n.p-dialog-top .p-dialog-enter-active,\n.p-dialog-top .p-dialog-leave-active,\n.p-dialog-bottom .p-dialog-enter-active,\n.p-dialog-bottom .p-dialog-leave-active,\n.p-dialog-left .p-dialog-enter-active,\n.p-dialog-left .p-dialog-leave-active,\n.p-dialog-right .p-dialog-enter-active,\n.p-dialog-right .p-dialog-leave-active,\n.p-dialog-topleft .p-dialog-enter-active,\n.p-dialog-topleft .p-dialog-leave-active,\n.p-dialog-topright .p-dialog-enter-active,\n.p-dialog-topright .p-dialog-leave-active,\n.p-dialog-bottomleft .p-dialog-enter-active,\n.p-dialog-bottomleft .p-dialog-leave-active,\n.p-dialog-bottomright .p-dialog-enter-active,\n.p-dialog-bottomright .p-dialog-leave-active {\n transition: all 0.3s ease-out;\n}\n.p-dialog-top .p-dialog-enter-from,\n.p-dialog-top .p-dialog-leave-to {\n transform: translate3d(0px, -100%, 0px);\n}\n.p-dialog-bottom .p-dialog-enter-from,\n.p-dialog-bottom .p-dialog-leave-to {\n transform: translate3d(0px, 100%, 0px);\n}\n.p-dialog-left .p-dialog-enter-from,\n.p-dialog-left .p-dialog-leave-to,\n.p-dialog-topleft .p-dialog-enter-from,\n.p-dialog-topleft .p-dialog-leave-to,\n.p-dialog-bottomleft .p-dialog-enter-from,\n.p-dialog-bottomleft .p-dialog-leave-to {\n transform: translate3d(-100%, 0px, 0px);\n}\n.p-dialog-right .p-dialog-enter-from,\n.p-dialog-right .p-dialog-leave-to,\n.p-dialog-topright .p-dialog-enter-from,\n.p-dialog-topright .p-dialog-leave-to,\n.p-dialog-bottomright .p-dialog-enter-from,\n.p-dialog-bottomright .p-dialog-leave-to {\n transform: translate3d(100%, 0px, 0px);\n}\n\n/* Maximize */\n.p-dialog-maximized {\n -webkit-transition: none;\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n top: 0px !important;\n left: 0px !important;\n max-height: 100%;\n height: 100%;\n}\n.p-dialog-maximized .p-dialog-content {\n flex-grow: 1;\n}\n\n/* Position */\n.p-dialog-left {\n justify-content: flex-start;\n}\n.p-dialog-right {\n justify-content: flex-end;\n}\n.p-dialog-top {\n align-items: flex-start;\n}\n.p-dialog-topleft {\n justify-content: flex-start;\n align-items: flex-start;\n}\n.p-dialog-topright {\n justify-content: flex-end;\n align-items: flex-start;\n}\n.p-dialog-bottom {\n align-items: flex-end;\n}\n.p-dialog-bottomleft {\n justify-content: flex-start;\n align-items: flex-end;\n}\n.p-dialog-bottomright {\n justify-content: flex-end;\n align-items: flex-end;\n}\n.p-confirm-dialog .p-dialog-content {\n display: flex;\n align-items: center;\n}\n"),d.render=function(e,t,n,i,a,l){const s=o.resolveComponent("Portal"),d=o.resolveDirective("ripple"),g=o.resolveDirective("focustrap");return o.openBlock(),o.createBlock(s,{appendTo:n.appendTo},{default:o.withCtx((()=>[a.containerVisible?(o.openBlock(),o.createElementBlock("div",{key:0,ref:l.maskRef,class:o.normalizeClass(l.maskClass),onClick:t[3]||(t[3]=(...e)=>l.onMaskClick&&l.onMaskClick(...e))},[o.createVNode(o.Transition,{name:"p-dialog",onBeforeEnter:l.onBeforeEnter,onEnter:l.onEnter,onBeforeLeave:l.onBeforeLeave,onLeave:l.onLeave,onAfterLeave:l.onAfterLeave,appear:""},{default:o.withCtx((()=>[n.visible?o.withDirectives((o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.containerRef,class:l.dialogClass,role:"dialog","aria-labelledby":l.ariaLabelledById,"aria-modal":n.modal},e.$attrs),[n.showHeader?(o.openBlock(),o.createElementBlock("div",{key:0,ref:l.headerContainerRef,class:"p-dialog-header",onMousedown:t[2]||(t[2]=(...e)=>l.initDrag&&l.initDrag(...e))},[o.renderSlot(e.$slots,"header",{},(()=>[n.header?(o.openBlock(),o.createElementBlock("span",{key:0,id:l.ariaLabelledById,class:"p-dialog-title"},o.toDisplayString(n.header),9,m)):o.createCommentVNode("",!0)])),o.createElementVNode("div",p,[n.maximizable?o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:0,ref:l.maximizableRef,autofocus:a.focusableMax,class:"p-dialog-header-icon p-dialog-header-maximize p-link",onClick:t[0]||(t[0]=(...e)=>l.maximize&&l.maximize(...e)),type:"button",tabindex:n.maximizable?"0":"-1"},[o.createElementVNode("span",{class:o.normalizeClass(l.maximizeIconClass)},null,2)],8,c)),[[d]]):o.createCommentVNode("",!0),n.closable?o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({key:1,ref:l.closeButtonRef,autofocus:a.focusableClose,class:"p-dialog-header-icon p-dialog-header-close p-link",onClick:t[1]||(t[1]=(...e)=>l.close&&l.close(...e)),"aria-label":l.closeAriaLabel,type:"button"},n.closeButtonProps),[o.createElementVNode("span",{class:o.normalizeClass(["p-dialog-header-close-icon",n.closeIcon])},null,2)],16,u)),[[d]]):o.createCommentVNode("",!0)])],544)):o.createCommentVNode("",!0),o.createElementVNode("div",o.mergeProps({ref:l.contentRef,class:l.contentStyleClass,style:n.contentStyle},n.contentProps),[o.renderSlot(e.$slots,"default")],16),n.footer||e.$slots.footer?(o.openBlock(),o.createElementBlock("div",{key:1,ref:l.footerContainerRef,class:"p-dialog-footer"},[o.renderSlot(e.$slots,"footer",{},(()=>[o.createTextVNode(o.toDisplayString(n.footer),1)]))],512)):o.createCommentVNode("",!0)],16,r)),[[g,{disabled:!n.modal}]]):o.createCommentVNode("",!0)])),_:3},8,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],2)):o.createCommentVNode("",!0)])),_:3},8,["appendTo"])},d}(primevue.focustrap,primevue.portal,primevue.ripple,primevue.utils,Vue);
|
|
46
46
|
|
package/datatable/DataTable.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface DataTableFilterMetaData {
|
|
|
36
36
|
/**
|
|
37
37
|
* Filter match mode
|
|
38
38
|
*/
|
|
39
|
-
matchMode: 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter' | undefined;
|
|
39
|
+
matchMode: 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter' | string | undefined;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -138,7 +138,7 @@ export interface DataTableSortEvent {
|
|
|
138
138
|
/**
|
|
139
139
|
* Match modes per field
|
|
140
140
|
*/
|
|
141
|
-
filterMatchModes: 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter' | undefined;
|
|
141
|
+
filterMatchModes: 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter' | string | undefined;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
/**
|
package/datatable/DataTable.vue
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
v-bind="virtualScrollerOptions"
|
|
35
35
|
:items="processedData"
|
|
36
36
|
:columns="columns"
|
|
37
|
-
:style="
|
|
37
|
+
:style="scrollHeight !== 'flex' ? { height: scrollHeight } : undefined"
|
|
38
38
|
:scrollHeight="scrollHeight !== 'flex' ? undefined : '100%'"
|
|
39
39
|
:disabled="virtualScrollerDisabled"
|
|
40
40
|
loaderDisabled
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
:frozenRow="true"
|
|
81
81
|
class="p-datatable-frozen-tbody"
|
|
82
82
|
:columns="slotProps.columns"
|
|
83
|
+
:first="d_first"
|
|
83
84
|
:dataKey="dataKey"
|
|
84
85
|
:selection="selection"
|
|
85
86
|
:selectionKeys="d_selectionKeys"
|
|
@@ -134,6 +135,7 @@
|
|
|
134
135
|
:class="slotProps.styleClass"
|
|
135
136
|
:columns="slotProps.columns"
|
|
136
137
|
:empty="empty"
|
|
138
|
+
:first="d_first"
|
|
137
139
|
:dataKey="dataKey"
|
|
138
140
|
:selection="selection"
|
|
139
141
|
:selectionKeys="d_selectionKeys"
|
package/datatable/TableBody.vue
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tbody :ref="bodyRef" class="p-datatable-tbody" role="rowgroup" :style="bodyStyle">
|
|
3
3
|
<template v-if="!empty">
|
|
4
|
-
<template v-for="(rowData, index) of value"
|
|
5
|
-
<tr
|
|
4
|
+
<template v-for="(rowData, index) of value">
|
|
5
|
+
<tr
|
|
6
|
+
v-if="templates['groupheader'] && rowGroupMode === 'subheader' && shouldRenderRowGroupHeader(value, rowData, getRowIndex(index))"
|
|
7
|
+
:key="getRowKey(rowData, getRowIndex(index)) + '_subheader'"
|
|
8
|
+
class="p-rowgroup-header"
|
|
9
|
+
:style="rowGroupHeaderStyle"
|
|
10
|
+
role="row"
|
|
11
|
+
>
|
|
6
12
|
<td :colspan="columnsLength - 1">
|
|
7
13
|
<button v-if="expandableRowGroups" class="p-row-toggler p-link" @click="onRowGroupToggle($event, rowData)" type="button">
|
|
8
14
|
<span :class="rowGroupTogglerIcon(rowData)"></span>
|
|
@@ -30,9 +36,10 @@
|
|
|
30
36
|
@dragend="onRowDragEnd($event)"
|
|
31
37
|
@drop="onRowDrop($event)"
|
|
32
38
|
>
|
|
33
|
-
<template v-for="(col, i) of columns"
|
|
39
|
+
<template v-for="(col, i) of columns">
|
|
34
40
|
<DTBodyCell
|
|
35
41
|
v-if="shouldRenderBodyCell(value, col, getRowIndex(index))"
|
|
42
|
+
:key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i"
|
|
36
43
|
:rowData="rowData"
|
|
37
44
|
:column="col"
|
|
38
45
|
:rowIndex="getRowIndex(index)"
|
|
@@ -144,6 +151,10 @@ export default {
|
|
|
144
151
|
type: Array,
|
|
145
152
|
default: null
|
|
146
153
|
},
|
|
154
|
+
first: {
|
|
155
|
+
type: Number,
|
|
156
|
+
default: 0
|
|
157
|
+
},
|
|
147
158
|
dataKey: {
|
|
148
159
|
type: String,
|
|
149
160
|
default: null
|
|
@@ -275,12 +286,12 @@ export default {
|
|
|
275
286
|
}
|
|
276
287
|
},
|
|
277
288
|
getRowKey(rowData, index) {
|
|
278
|
-
return this.dataKey ? ObjectUtils.resolveFieldData(rowData, this.dataKey) : index;
|
|
289
|
+
return this.dataKey ? ObjectUtils.resolveFieldData(rowData, this.dataKey) : this.getRowIndex(index);
|
|
279
290
|
},
|
|
280
291
|
getRowIndex(index) {
|
|
281
292
|
const getItemOptions = this.getVirtualScrollerProp('getItemOptions');
|
|
282
293
|
|
|
283
|
-
return getItemOptions ? getItemOptions(index).index : index;
|
|
294
|
+
return getItemOptions ? getItemOptions(index).index : this.first + index;
|
|
284
295
|
},
|
|
285
296
|
getRowStyle(rowData) {
|
|
286
297
|
if (this.rowStyle) {
|
|
@@ -558,6 +569,7 @@ export default {
|
|
|
558
569
|
let hiddenColLength = 0;
|
|
559
570
|
|
|
560
571
|
this.columns.forEach((column) => {
|
|
572
|
+
if (this.columnProp(column, 'selectionMode') === 'single') hiddenColLength--;
|
|
561
573
|
if (this.columnProp(column, 'hidden')) hiddenColLength++;
|
|
562
574
|
});
|
|
563
575
|
|
|
@@ -807,6 +807,10 @@ var script$7 = {
|
|
|
807
807
|
type: Array,
|
|
808
808
|
default: null
|
|
809
809
|
},
|
|
810
|
+
first: {
|
|
811
|
+
type: Number,
|
|
812
|
+
default: 0
|
|
813
|
+
},
|
|
810
814
|
dataKey: {
|
|
811
815
|
type: String,
|
|
812
816
|
default: null
|
|
@@ -938,12 +942,12 @@ var script$7 = {
|
|
|
938
942
|
}
|
|
939
943
|
},
|
|
940
944
|
getRowKey(rowData, index) {
|
|
941
|
-
return this.dataKey ? utils.ObjectUtils.resolveFieldData(rowData, this.dataKey) : index;
|
|
945
|
+
return this.dataKey ? utils.ObjectUtils.resolveFieldData(rowData, this.dataKey) : this.getRowIndex(index);
|
|
942
946
|
},
|
|
943
947
|
getRowIndex(index) {
|
|
944
948
|
const getItemOptions = this.getVirtualScrollerProp('getItemOptions');
|
|
945
949
|
|
|
946
|
-
return getItemOptions ? getItemOptions(index).index : index;
|
|
950
|
+
return getItemOptions ? getItemOptions(index).index : this.first + index;
|
|
947
951
|
},
|
|
948
952
|
getRowStyle(rowData) {
|
|
949
953
|
if (this.rowStyle) {
|
|
@@ -1221,6 +1225,7 @@ var script$7 = {
|
|
|
1221
1225
|
let hiddenColLength = 0;
|
|
1222
1226
|
|
|
1223
1227
|
this.columns.forEach((column) => {
|
|
1228
|
+
if (this.columnProp(column, 'selectionMode') === 'single') hiddenColLength--;
|
|
1224
1229
|
if (this.columnProp(column, 'hidden')) hiddenColLength++;
|
|
1225
1230
|
});
|
|
1226
1231
|
|
|
@@ -1272,12 +1277,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1272
1277
|
}, [
|
|
1273
1278
|
(!$props.empty)
|
|
1274
1279
|
? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList($props.value, (rowData, index) => {
|
|
1275
|
-
return (vue.openBlock(), vue.createElementBlock(vue.Fragment,
|
|
1276
|
-
key: $options.getRowKey(rowData, $options.getRowIndex(index)) + '_subheader'
|
|
1277
|
-
}, [
|
|
1280
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1278
1281
|
($props.templates['groupheader'] && $props.rowGroupMode === 'subheader' && $options.shouldRenderRowGroupHeader($props.value, rowData, $options.getRowIndex(index)))
|
|
1279
1282
|
? (vue.openBlock(), vue.createElementBlock("tr", {
|
|
1280
|
-
key:
|
|
1283
|
+
key: $options.getRowKey(rowData, $options.getRowIndex(index)) + '_subheader',
|
|
1281
1284
|
class: "p-rowgroup-header",
|
|
1282
1285
|
style: vue.normalizeStyle($options.rowGroupHeaderStyle),
|
|
1283
1286
|
role: "row"
|
|
@@ -1325,12 +1328,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1325
1328
|
onDrop: _cache[13] || (_cache[13] = $event => ($options.onRowDrop($event)))
|
|
1326
1329
|
}, [
|
|
1327
1330
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.columns, (col, i) => {
|
|
1328
|
-
return (vue.openBlock(), vue.createElementBlock(vue.Fragment,
|
|
1329
|
-
key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || i
|
|
1330
|
-
}, [
|
|
1331
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1331
1332
|
($options.shouldRenderBodyCell($props.value, col, $options.getRowIndex(index)))
|
|
1332
1333
|
? (vue.openBlock(), vue.createBlock(_component_DTBodyCell, {
|
|
1333
|
-
key:
|
|
1334
|
+
key: $options.columnProp(col, 'columnKey') || $options.columnProp(col, 'field') || i,
|
|
1334
1335
|
rowData: rowData,
|
|
1335
1336
|
column: col,
|
|
1336
1337
|
rowIndex: $options.getRowIndex(index),
|
|
@@ -1359,7 +1360,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1359
1360
|
}, null, 8, ["rowData", "column", "rowIndex", "index", "selected", "rowTogglerIcon", "frozenRow", "rowspan", "editMode", "editing", "editingMeta", "responsiveLayout", "virtualScrollerContentProps", "ariaControls", "name", "onEditingMetaChange"]))
|
|
1360
1361
|
: vue.createCommentVNode("", true)
|
|
1361
1362
|
], 64))
|
|
1362
|
-
}),
|
|
1363
|
+
}), 256))
|
|
1363
1364
|
], 46, _hoisted_3$4))
|
|
1364
1365
|
: vue.createCommentVNode("", true),
|
|
1365
1366
|
($props.templates['expansion'] && $props.expandedRows && $options.isRowExpanded(rowData))
|
|
@@ -1394,7 +1395,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1394
1395
|
]))
|
|
1395
1396
|
: vue.createCommentVNode("", true)
|
|
1396
1397
|
], 64))
|
|
1397
|
-
}),
|
|
1398
|
+
}), 256))
|
|
1398
1399
|
: (vue.openBlock(), vue.createElementBlock("tr", _hoisted_7$1, [
|
|
1399
1400
|
vue.createElementVNode("td", { colspan: $options.columnsLength }, [
|
|
1400
1401
|
($props.templates.empty)
|
|
@@ -5230,7 +5231,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5230
5231
|
vue.createVNode(_component_DTVirtualScroller, vue.mergeProps({ ref: "virtualScroller" }, $props.virtualScrollerOptions, {
|
|
5231
5232
|
items: $options.processedData,
|
|
5232
5233
|
columns: $options.columns,
|
|
5233
|
-
style:
|
|
5234
|
+
style: $props.scrollHeight !== 'flex' ? { height: $props.scrollHeight } : undefined,
|
|
5234
5235
|
scrollHeight: $props.scrollHeight !== 'flex' ? undefined : '100%',
|
|
5235
5236
|
disabled: $options.virtualScrollerDisabled,
|
|
5236
5237
|
loaderDisabled: "",
|
|
@@ -5282,6 +5283,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5282
5283
|
frozenRow: true,
|
|
5283
5284
|
class: "p-datatable-frozen-tbody",
|
|
5284
5285
|
columns: slotProps.columns,
|
|
5286
|
+
first: $data.d_first,
|
|
5285
5287
|
dataKey: $props.dataKey,
|
|
5286
5288
|
selection: $props.selection,
|
|
5287
5289
|
selectionKeys: $data.d_selectionKeys,
|
|
@@ -5329,7 +5331,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5329
5331
|
onRowEditCancel: _cache[25] || (_cache[25] = $event => ($options.onRowEditCancel($event))),
|
|
5330
5332
|
editingMeta: $data.d_editingMeta,
|
|
5331
5333
|
onEditingMetaChange: $options.onEditingMetaChange
|
|
5332
|
-
}, null, 8, ["value", "columns", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowKeys", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "responsiveLayout", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange"]))
|
|
5334
|
+
}, null, 8, ["value", "columns", "first", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowKeys", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "responsiveLayout", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange"]))
|
|
5333
5335
|
: vue.createCommentVNode("", true),
|
|
5334
5336
|
vue.createVNode(_component_DTTableBody, {
|
|
5335
5337
|
ref: "bodyRef",
|
|
@@ -5337,6 +5339,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5337
5339
|
class: vue.normalizeClass(slotProps.styleClass),
|
|
5338
5340
|
columns: slotProps.columns,
|
|
5339
5341
|
empty: $options.empty,
|
|
5342
|
+
first: $data.d_first,
|
|
5340
5343
|
dataKey: $props.dataKey,
|
|
5341
5344
|
selection: $props.selection,
|
|
5342
5345
|
selectionKeys: $data.d_selectionKeys,
|
|
@@ -5385,7 +5388,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5385
5388
|
onRowEditCancel: _cache[42] || (_cache[42] = $event => ($options.onRowEditCancel($event))),
|
|
5386
5389
|
editingMeta: $data.d_editingMeta,
|
|
5387
5390
|
onEditingMetaChange: $options.onEditingMetaChange
|
|
5388
|
-
}, null, 8, ["value", "class", "columns", "empty", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowKeys", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "responsiveLayout", "virtualScrollerContentProps", "isVirtualScrollerDisabled", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange"]),
|
|
5391
|
+
}, null, 8, ["value", "class", "columns", "empty", "first", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowKeys", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "responsiveLayout", "virtualScrollerContentProps", "isVirtualScrollerDisabled", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange"]),
|
|
5389
5392
|
($options.hasSpacerStyle(slotProps.spacerStyle))
|
|
5390
5393
|
? (vue.openBlock(), vue.createElementBlock("tbody", {
|
|
5391
5394
|
key: 1,
|