How to use pp method in stryker-parent

Best JavaScript code snippet using stryker-parent

jquery.prettyPhoto.js

Source:jquery.prettyPhoto.js Github

copy

Full Screen

1/* ------------------------------------------------------------------------2 Class: prettyPhoto3 Use: Lightbox clone for jQuery4 Author: Stephane Caron (http://www.no-margin-for-errors.com)5 Version: 3.1.66------------------------------------------------------------------------- */7(function($) {8 $.prettyPhoto = {version: '3.1.6'};9 $.fn.prettyPhoto = function(pp_settings) {10 pp_settings = jQuery.extend({11 hook: 'rel', /* the attribute tag to use for prettyPhoto hooks. default: 'rel'. For HTML5, use "data-rel" or similar. */12 animation_speed: 'fast', /* fast/slow/normal */13 ajaxcallback: function() {},14 slideshow: 5000, /* false OR interval time in ms */15 autoplay_slideshow: false, /* true/false */16 opacity: 0.80, /* Value between 0 and 1 */17 show_title: true, /* true/false */18 allow_resize: true, /* Resize the photos bigger than viewport. true/false */19 allow_expand: true, /* Allow the user to expand a resized image. true/false */20 default_width: 500,21 default_height: 344,22 counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */23 theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */24 horizontal_padding: 20, /* The padding on each side of the picture */25 hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */26 wmode: 'opaque', /* Set the flash wmode attribute */27 autoplay: true, /* Automatically start videos: True/False */28 modal: false, /* If set to true, only the close button will close the window */29 deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */30 overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */31 overlay_gallery_max: 30, /* Maximum number of pictures in the overlay gallery */32 keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */33 changepicturecallback: function(){}, /* Called everytime an item is shown/changed */34 callback: function(){}, /* Called when prettyPhoto is closed */35 ie6_fallback: true,36 markup: '<div class="pp_pic_holder"> \37 <div class="ppt">&nbsp;</div> \38 <div class="pp_top"> \39 <div class="pp_left"></div> \40 <div class="pp_middle"></div> \41 <div class="pp_right"></div> \42 </div> \43 <div class="pp_content_container"> \44 <div class="pp_left"> \45 <div class="pp_right"> \46 <div class="pp_content"> \47 <div class="pp_loaderIcon"></div> \48 <div class="pp_fade"> \49 <a href="#" class="pp_expand" title="Expand the image">Expand</a> \50 <div class="pp_hoverContainer"> \51 <a class="pp_next" href="#">next</a> \52 <a class="pp_previous" href="#">previous</a> \53 </div> \54 <div id="pp_full_res"></div> \55 <div class="pp_details"> \56 <div class="pp_nav"> \57 <a href="#" class="pp_arrow_previous">Previous</a> \58 <p class="currentTextHolder">0/0</p> \59 <a href="#" class="pp_arrow_next">Next</a> \60 </div> \61 <p class="pp_description"></p> \62 <div class="pp_social">{pp_social}</div> \63 <a class="pp_close" href="#">Close</a> \64 </div> \65 </div> \66 </div> \67 </div> \68 </div> \69 </div> \70 <div class="pp_bottom"> \71 <div class="pp_left"></div> \72 <div class="pp_middle"></div> \73 <div class="pp_right"></div> \74 </div> \75 </div> \76 <div class="pp_overlay"></div>',77 gallery_markup: '<div class="pp_gallery"> \78 <a href="#" class="pp_arrow_previous">Previous</a> \79 <div> \80 <ul> \81 {gallery} \82 </ul> \83 </div> \84 <a href="#" class="pp_arrow_next">Next</a> \85 </div>',86 image_markup: '<img id="fullResImage" src="{path}" />',87 flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',88 quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="https://www.apple.com/quicktime/download/"></embed></object>',89 iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',90 inline_markup: '<div class="pp_inline">{content}</div>',91 custom_markup: '',92 social_tools: '<div class="twitter"><a href="//twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>' /* html or false to disable */93 }, pp_settings);94 // Global variables accessible only by prettyPhoto95 var matchedObjects = this, percentBased = false, pp_dimensions, pp_open,96 // prettyPhoto container specific97 pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth,98 // Window size99 windowHeight = $(window).height(), windowWidth = $(window).width(),100 // Global elements101 pp_slideshow;102 doresize = true, scroll_pos = _get_scroll();103 // Window/Keyboard events104 $(window).off('resize.prettyphoto').on('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); });105 if(pp_settings.keyboard_shortcuts) {106 $(document).off('keydown.prettyphoto').on('keydown.prettyphoto',function(e){107 if(typeof $pp_pic_holder != 'undefined'){108 if($pp_pic_holder.is(':visible')){109 switch(e.keyCode){110 case 37:111 $.prettyPhoto.changePage('previous');112 e.preventDefault();113 break;114 case 39:115 $.prettyPhoto.changePage('next');116 e.preventDefault();117 break;118 case 27:119 if(!settings.modal)120 $.prettyPhoto.close();121 e.preventDefault();122 break;123 };124 // return false;125 };126 };127 });128 };129 /**130 * Initialize prettyPhoto.131 */132 $.prettyPhoto.initialize = function() {133 settings = pp_settings;134 if(settings.theme == 'pp_default') settings.horizontal_padding = 16;135 // Find out if the picture is part of a set136 theRel = $(this).attr(settings.hook);137 galleryRegExp = /\[(?:.*)\]/;138 isSet = (galleryRegExp.exec(theRel)) ? true : false;139 // Put the SRCs, TITLEs, ALTs into an array.140 pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href'));141 pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt'));142 pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title'));143 if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false;144 set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned145 rel_index = (isSet) ? set_position : $("a["+settings.hook+"^='"+theRel+"']").index($(this));146 _build_overlay(this); // Build the overlay {this} being the caller147 if(settings.allow_resize)148 $(window).on('scroll.prettyphoto',function(){ _center_overlay(); });149 $.prettyPhoto.open();150 return false;151 }152 /**153 * Opens the prettyPhoto modal box.154 * @param image {String,Array} Full path to the image to be open, can also be an array containing full images paths.155 * @param title {String,Array} The title to be displayed with the picture, can also be an array containing all the titles.156 * @param description {String,Array} The description to be displayed with the picture, can also be an array containing all the descriptions.157 */158 $.prettyPhoto.open = function(event) {159 if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables160 settings = pp_settings;161 pp_images = $.makeArray(arguments[0]);162 pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray("");163 pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray("");164 isSet = (pp_images.length > 1) ? true : false;165 set_position = (arguments[3])? arguments[3]: 0;166 _build_overlay(event.target); // Build the overlay {this} being the caller167 }168 if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); // Hide the flash169 _checkPosition($(pp_images).length); // Hide the next/previous links if on first or last images.170 $('.pp_loaderIcon').show();171 if(settings.deeplinking)172 setHashtag();173 // Rebuild Facebook Like Button with updated href174 if(settings.social_tools){175 facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));176 $pp_pic_holder.find('.pp_social').html(facebook_like_link);177 }178 // Fade the content in179 if($ppt.is(':hidden')) $ppt.css('opacity',0).show();180 $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);181 // Display the current position182 $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).length);183 // Set the description184 if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){185 $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));186 }else{187 $pp_pic_holder.find('.pp_description').hide();188 }189 // Get the dimensions190 movie_width = ( parseFloat(getParam('width',pp_images[set_position])) ) ? getParam('width',pp_images[set_position]) : settings.default_width.toString();191 movie_height = ( parseFloat(getParam('height',pp_images[set_position])) ) ? getParam('height',pp_images[set_position]) : settings.default_height.toString();192 // If the size is % based, calculate according to window dimensions193 percentBased=false;194 if(movie_height.indexOf('%') != -1) { movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased = true; }195 if(movie_width.indexOf('%') != -1) { movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true; }196 // Fade the holder197 $pp_pic_holder.fadeIn(function(){198 // Set the title199 (settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html('&nbsp;');200 imgPreloader = "";201 skipInjection = false;202 // Inject the proper content203 switch(_getFileType(pp_images[set_position])){204 case 'image':205 imgPreloader = new Image();206 // Preload the neighbour images207 nextImage = new Image();208 if(isSet && set_position < $(pp_images).length -1) nextImage.src = pp_images[set_position + 1];209 prevImage = new Image();210 if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1];211 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup.replace(/{path}/g,pp_images[set_position]);212 imgPreloader.onload = function(){213 // Fit item to viewport214 pp_dimensions = _fitToViewport(imgPreloader.width,imgPreloader.height);215 _showContent();216 };217 imgPreloader.onerror = function(){218 alert('Image cannot be loaded. Make sure the path is correct and image exist.');219 $.prettyPhoto.close();220 };221 imgPreloader.src = pp_images[set_position];222 break;223 case 'youtube':224 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport225 // Regular youtube link226 movie_id = getParam('v',pp_images[set_position]);227 // youtu.be link228 if(movie_id == ""){229 movie_id = pp_images[set_position].split('youtu.be/');230 movie_id = movie_id[1];231 if(movie_id.indexOf('?') > 0)232 movie_id = movie_id.substr(0,movie_id.indexOf('?')); // Strip anything after the ?233 if(movie_id.indexOf('&') > 0)234 movie_id = movie_id.substr(0,movie_id.indexOf('&')); // Strip anything after the &235 }236 movie = '//www.youtube.com/embed/'+movie_id;237 (getParam('rel',pp_images[set_position])) ? movie+="?rel="+getParam('rel',pp_images[set_position]) : movie+="?rel=1";238 if(settings.autoplay) movie += "&autoplay=1";239 toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);240 break;241 case 'vimeo':242 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport243 movie_id = pp_images[set_position];244 var regExp = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;245 var match = movie_id.match(regExp);246 movie = '//player.vimeo.com/video/'+ match[3] +'?title=0&amp;byline=0&amp;portrait=0';247 if(settings.autoplay) movie += "&autoplay=1;";248 vimeo_width = pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width'];249 toInject = settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);250 break;251 case 'quicktime':252 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport253 pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15; // Add space for the control bar254 toInject = settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);255 break;256 case 'flash':257 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport258 flash_vars = pp_images[set_position];259 flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length);260 filename = pp_images[set_position];261 filename = filename.substring(0,filename.indexOf('?'));262 toInject = settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);263 break;264 case 'iframe':265 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport266 frame_url = pp_images[set_position];267 frame_url = frame_url.substr(0,frame_url.indexOf('iframe')-1);268 toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);269 break;270 case 'ajax':271 doresize = false; // Make sure the dimensions are not resized.272 pp_dimensions = _fitToViewport(movie_width,movie_height);273 doresize = true; // Reset the dimensions274 skipInjection = true;275 $.get(pp_images[set_position],function(responseHTML){276 toInject = settings.inline_markup.replace(/{content}/g,responseHTML);277 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject;278 _showContent();279 });280 break;281 case 'custom':282 pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport283 toInject = settings.custom_markup;284 break;285 case 'inline':286 // to get the item height clone it, apply default width, wrap it in the prettyPhoto containers , then delete287 myClone = $(pp_images[set_position]).clone().append('<br clear="all" />').css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo($('body')).show();288 doresize = false; // Make sure the dimensions are not resized.289 pp_dimensions = _fitToViewport($(myClone).width(),$(myClone).height());290 doresize = true; // Reset the dimensions291 $(myClone).remove();292 toInject = settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());293 break;294 };295 if(!imgPreloader && !skipInjection){296 $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject;297 // Show content298 _showContent();299 };300 });301 return false;302 };303 /**304 * Change page in the prettyPhoto modal box305 * @param direction {String} Direction of the paging, previous or next.306 */307 $.prettyPhoto.changePage = function(direction){308 currentGalleryPage = 0;309 if(direction == 'previous') {310 set_position--;311 if (set_position < 0) set_position = $(pp_images).length-1;312 }else if(direction == 'next'){313 set_position++;314 if(set_position > $(pp_images).length-1) set_position = 0;315 }else{316 set_position=direction;317 };318 rel_index = set_position;319 if(!doresize) doresize = true; // Allow the resizing of the images320 if(settings.allow_expand) {321 $('.pp_contract').removeClass('pp_contract').addClass('pp_expand');322 }323 _hideContent(function(){ $.prettyPhoto.open(); });324 };325 /**326 * Change gallery page in the prettyPhoto modal box327 * @param direction {String} Direction of the paging, previous or next.328 */329 $.prettyPhoto.changeGalleryPage = function(direction){330 if(direction=='next'){331 currentGalleryPage ++;332 if(currentGalleryPage > totalPage) currentGalleryPage = 0;333 }else if(direction=='previous'){334 currentGalleryPage --;335 if(currentGalleryPage < 0) currentGalleryPage = totalPage;336 }else{337 currentGalleryPage = direction;338 };339 slide_speed = (direction == 'next' || direction == 'previous') ? settings.animation_speed : 0;340 slide_to = currentGalleryPage * (itemsPerPage * itemWidth);341 $pp_gallery.find('ul').animate({left:-slide_to},slide_speed);342 };343 /**344 * Start the slideshow...345 */346 $.prettyPhoto.startSlideshow = function(){347 if(typeof pp_slideshow == 'undefined'){348 $pp_pic_holder.find('.pp_play').off('click').removeClass('pp_play').addClass('pp_pause').on( 'click', function(){349 $.prettyPhoto.stopSlideshow();350 return false;351 });352 pp_slideshow = setInterval($.prettyPhoto.startSlideshow,settings.slideshow);353 }else{354 $.prettyPhoto.changePage('next');355 };356 }357 /**358 * Stop the slideshow...359 */360 $.prettyPhoto.stopSlideshow = function(){361 $pp_pic_holder.find('.pp_pause').off('click').removeClass('pp_pause').addClass('pp_play').on( 'click', function(){362 $.prettyPhoto.startSlideshow();363 return false;364 });365 clearInterval(pp_slideshow);366 pp_slideshow=undefined;367 }368 /**369 * Closes prettyPhoto.370 */371 $.prettyPhoto.close = function(){372 if($pp_overlay.is(":animated")) return;373 $.prettyPhoto.stopSlideshow();374 $pp_pic_holder.stop().find('object,embed').css('visibility','hidden');375 $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); });376 $pp_overlay.fadeOut(settings.animation_speed, function(){377 if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible'); // Show the flash378 $(this).remove(); // No more need for the prettyPhoto markup379 $(window).off('scroll.prettyphoto');380 clearHashtag();381 settings.callback();382 doresize = true;383 pp_open = false;384 delete settings;385 });386 };387 /**388 * Set the proper sizes on the containers and animate the content in.389 */390 function _showContent(){391 $('.pp_loaderIcon').hide();392 // Calculate the opened top position of the pic holder393 projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2));394 if(projectedTop < 0) projectedTop = 0;395 $ppt.fadeTo(settings.animation_speed,1);396 // Resize the content holder397 $pp_pic_holder.find('.pp_content')398 .animate({399 height:pp_dimensions['contentHeight'],400 width:pp_dimensions['contentWidth']401 },settings.animation_speed);402 // Resize picture the holder403 $pp_pic_holder.animate({404 'top': projectedTop,405 'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0 : (windowWidth/2) - (pp_dimensions['containerWidth']/2),406 width:pp_dimensions['containerWidth']407 },settings.animation_speed,function(){408 $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);409 $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); // Fade the new content410 // Show the nav411 if(isSet && _getFileType(pp_images[set_position])=="image") { $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); }412 if(settings.allow_expand) {413 if(pp_dimensions['resized']){ // Fade the resizing link if the image is resized414 $('a.pp_expand,a.pp_contract').show();415 }else{416 $('a.pp_expand').hide();417 }418 }419 if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow();420 settings.changepicturecallback(); // Callback!421 pp_open = true;422 });423 _insert_gallery();424 pp_settings.ajaxcallback();425 };426 /**427 * Hide the content...DUH!428 */429 function _hideContent(callback){430 // Fade out the current picture431 $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');432 $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){433 $('.pp_loaderIcon').show();434 callback();435 });436 };437 /**438 * Check the item position in the gallery array, hide or show the navigation links439 * @param setCount {integer} The total number of items in the set440 */441 function _checkPosition(setCount){442 (setCount > 1) ? $('.pp_nav').show() : $('.pp_nav').hide(); // Hide the bottom nav if it's not a set.443 };444 /**445 * Resize the item dimensions if it's bigger than the viewport446 * @param width {integer} Width of the item to be opened447 * @param height {integer} Height of the item to be opened448 * @return An array containin the "fitted" dimensions449 */450 function _fitToViewport(width,height){451 resized = false;452 _getDimensions(width,height);453 // Define them in case there's no resize needed454 imageWidth = width, imageHeight = height;455 if( ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) {456 resized = true, fitting = false;457 while (!fitting){458 if((pp_containerWidth > windowWidth)){459 imageWidth = (windowWidth - 200);460 imageHeight = (height/width) * imageWidth;461 }else if((pp_containerHeight > windowHeight)){462 imageHeight = (windowHeight - 200);463 imageWidth = (width/height) * imageHeight;464 }else{465 fitting = true;466 };467 pp_containerHeight = imageHeight, pp_containerWidth = imageWidth;468 };469 if((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)){470 _fitToViewport(pp_containerWidth,pp_containerHeight)471 };472 _getDimensions(imageWidth,imageHeight);473 };474 return {475 width:Math.floor(imageWidth),476 height:Math.floor(imageHeight),477 containerHeight:Math.floor(pp_containerHeight),478 containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2),479 contentHeight:Math.floor(pp_contentHeight),480 contentWidth:Math.floor(pp_contentWidth),481 resized:resized482 };483 };484 /**485 * Get the containers dimensions according to the item size486 * @param width {integer} Width of the item to be opened487 * @param height {integer} Height of the item to be opened488 */489 function _getDimensions(width,height){490 width = parseFloat(width);491 height = parseFloat(height);492 // Get the details height, to do so, I need to clone it since it's invisible493 $pp_details = $pp_pic_holder.find('.pp_details');494 $pp_details.width(width);495 detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom'));496 $pp_details = $pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({497 'position':'absolute',498 'top':-10000499 });500 detailsHeight += $pp_details.height();501 detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; // Min-height for the details502 $pp_details.remove();503 // Get the titles height, to do so, I need to clone it since it's invisible504 $pp_title = $pp_pic_holder.find('.ppt');505 $pp_title.width(width);506 titleHeight = parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom'));507 $pp_title = $pp_title.clone().appendTo($('body')).css({508 'position':'absolute',509 'top':-10000510 });511 titleHeight += $pp_title.height();512 $pp_title.remove();513 // Get the container size, to resize the holder to the right dimensions514 pp_contentHeight = height + detailsHeight;515 pp_contentWidth = width;516 pp_containerHeight = pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height();517 pp_containerWidth = width;518 }519 function _getFileType(itemSrc){520 if (itemSrc.match(/youtube\.com\/watch/i) || itemSrc.match(/youtu\.be/i)) {521 return 'youtube';522 }else if (itemSrc.match(/vimeo\.com/i)) {523 return 'vimeo';524 }else if(itemSrc.match(/\b.mov\b/i)){525 return 'quicktime';526 }else if(itemSrc.match(/\b.swf\b/i)){527 return 'flash';528 }else if(itemSrc.match(/\biframe=true\b/i)){529 return 'iframe';530 }else if(itemSrc.match(/\bajax=true\b/i)){531 return 'ajax';532 }else if(itemSrc.match(/\bcustom=true\b/i)){533 return 'custom';534 }else if(itemSrc.substr(0,1) == '#'){535 return 'inline';536 }else{537 return 'image';538 };539 };540 function _center_overlay(){541 if(doresize && typeof $pp_pic_holder != 'undefined') {542 scroll_pos = _get_scroll();543 contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width();544 projectedTop = (windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2);545 if(projectedTop < 0) projectedTop = 0;546 if(contentHeight > windowHeight)547 return;548 $pp_pic_holder.css({549 'top': projectedTop,550 'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2)551 });552 };553 };554 function _get_scroll(){555 if (self.pageYOffset) {556 return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};557 } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict558 return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};559 } else if (document.body) {// all other Explorers560 return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};561 };562 };563 function _resize_overlay() {564 windowHeight = $(window).height(), windowWidth = $(window).width();565 if(typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()).width(windowWidth);566 };567 function _insert_gallery(){568 if(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image") {569 itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.570 navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme571 itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth);572 itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length;573 totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1;574 // Hide the nav in the case there's no need for links575 if(totalPage == 0){576 navWidth = 0; // No nav means no width!577 $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide();578 }else{579 $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show();580 };581 galleryWidth = itemsPerPage * itemWidth;582 fullGalleryWidth = pp_images.length * itemWidth;583 // Set the proper width to the gallery items584 $pp_gallery585 .css('margin-left',-((galleryWidth/2) + (navWidth/2)))586 .find('div:first').width(galleryWidth+5)587 .find('ul').width(fullGalleryWidth)588 .find('li.selected').removeClass('selected');589 goToPage = (Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage) : totalPage;590 $.prettyPhoto.changeGalleryPage(goToPage);591 $pp_gallery_li.filter(':eq('+set_position+')').addClass('selected');592 }else{593 $pp_pic_holder.find('.pp_content').off('mouseenter mouseleave');594 // $pp_gallery.hide();595 }596 }597 function _build_overlay(caller){598 // Inject Social Tool markup into General markup599 if(settings.social_tools)600 facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href));601 settings.markup = settings.markup.replace('{pp_social}','');602 $('body').append(settings.markup); // Inject the markup603 $pp_pic_holder = $('.pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); // Set my global selectors604 // Inject the inline gallery!605 if(isSet && settings.overlay_gallery) {606 currentGalleryPage = 0;607 toInject = "";608 for (var i=0; i < pp_images.length; i++) {609 if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){610 classname = 'default';611 img_src = '';612 }else{613 classname = '';614 img_src = pp_images[i];615 }616 toInject += "<li class='"+classname+"'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>";617 };618 toInject = settings.gallery_markup.replace(/{gallery}/g,toInject);619 $pp_pic_holder.find('#pp_full_res').after(toInject);620 $pp_gallery = $('.pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors621 $pp_gallery.find('.pp_arrow_next').on( 'click', function(){622 $.prettyPhoto.changeGalleryPage('next');623 $.prettyPhoto.stopSlideshow();624 return false;625 });626 $pp_gallery.find('.pp_arrow_previous').on( 'click', function(){627 $.prettyPhoto.changeGalleryPage('previous');628 $.prettyPhoto.stopSlideshow();629 return false;630 });631 $pp_pic_holder.find('.pp_content').on( 'mouseenter',632 function(){633 $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();634 } ).on( 'mouseleave',635 function(){636 $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();637 });638 itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.639 $pp_gallery_li.each(function(i){640 $(this)641 .find('a')642 .on( 'click', function(){643 $.prettyPhoto.changePage(i);644 $.prettyPhoto.stopSlideshow();645 return false;646 });647 });648 };649 // Inject the play/pause if it's a slideshow650 if(settings.slideshow){651 $pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')652 $pp_pic_holder.find('.pp_nav .pp_play').on( 'click', function(){653 $.prettyPhoto.startSlideshow();654 return false;655 });656 }657 $pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); // Set the proper theme658 $pp_overlay659 .css({660 'opacity':0,661 'height':$(document).height(),662 'width':$(window).width()663 })664 .on('click',function(){665 if(!settings.modal) $.prettyPhoto.close();666 });667 $('a.pp_close').on('click',function(){ $.prettyPhoto.close(); return false; });668 if(settings.allow_expand) {669 $('a.pp_expand').on('click',function(e){670 // Expand the image671 if($(this).hasClass('pp_expand')){672 $(this).removeClass('pp_expand').addClass('pp_contract');673 doresize = false;674 }else{675 $(this).removeClass('pp_contract').addClass('pp_expand');676 doresize = true;677 };678 _hideContent(function(){ $.prettyPhoto.open(); });679 return false;680 });681 }682 $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').on('click',function(){683 $.prettyPhoto.changePage('previous');684 $.prettyPhoto.stopSlideshow();685 return false;686 });687 $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').on('click',function(){688 $.prettyPhoto.changePage('next');689 $.prettyPhoto.stopSlideshow();690 return false;691 });692 _center_overlay(); // Center it693 };694 if(!pp_alreadyInitialized && getHashtag()){695 pp_alreadyInitialized = true;696 // Grab the rel index to trigger the click on the correct element697 hashIndex = getHashtag();698 hashRel = hashIndex;699 hashIndex = hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1);700 hashRel = hashRel.substring(0,hashRel.indexOf('/'));701 // Little timeout to make sure all the prettyPhoto initialize scripts has been run.702 // Useful in the event the page contain several init scripts.703 setTimeout(function(){ $("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click'); },50);704 }705 return this.off('click.prettyphoto').on('click.prettyphoto',$.prettyPhoto.initialize); // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once706 };707 function getHashtag(){708 var url = location.href;709 hashtag = (url.indexOf('#prettyPhoto') !== -1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)) : false;710 if(hashtag){ hashtag = hashtag.replace(/<|>/g,''); }711 return hashtag;712 };713 function setHashtag(){714 if(typeof theRel == 'undefined') return; // theRel is set on normal calls, it's impossible to deeplink using the API715 location.hash = theRel + '/'+rel_index+'/';716 };717 function clearHashtag(){718 if ( location.href.indexOf('#prettyPhoto') !== -1 ) location.hash = "prettyPhoto";719 }720 function getParam(name,url){721 name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");722 var regexS = "[\\?&]"+name+"=([^&#]*)";723 var regex = new RegExp( regexS );724 var results = regex.exec( url );725 return ( results == null ) ? "" : results[1];726 }727})(jQuery);...

Full Screen

Full Screen

components.d.ts

Source:components.d.ts Github

copy

Full Screen

1/* eslint-disable */2/* tslint:disable */3/**4 * This is an autogenerated file created by the Stencil compiler.5 * It contains typing information for all components that exist in this project.6 */7import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";8import { ButtonVariants, ColorVariants, IInputNumberOptions, OptionShape, Sizes } from "./components/types";9import { AvatarStatus } from "./components/pp-avatar/pp-avatar";10import { Options } from "@popperjs/core";11export namespace Components {12 interface PpAccordion {13 }14 interface PpAccordionItem {15 }16 interface PpAlert {17 }18 interface PpAvatar {19 "alt": string;20 "initialLen": number;21 "size": Sizes;22 "src": string;23 "status": AvatarStatus;24 }25 interface PpBadge {26 "color": ColorVariants;27 }28 interface PpButton {29 "color": ColorVariants;30 "disabled": boolean;31 "size": Sizes;32 "variant": ButtonVariants;33 }34 interface PpCard {35 }36 interface PpCheckbox {37 "checked": boolean;38 "label": string;39 "name": string;40 "value": string;41 }42 interface PpCheckboxOption {43 "checked": boolean;44 "label": string;45 "name": string;46 "optionValue": string;47 }48 interface PpCheckboxOptions {49 "name": string;50 "options": Array<OptionShape>;51 "value": Array<any>;52 }53 interface PpDrawer {54 "attachCloseAction": boolean;55 "lockScroll"?: boolean;56 "open": boolean;57 }58 interface PpFab {59 }60 interface PpIconButton {61 }62 interface PpInputDate {63 "format"?: string;64 "name": string;65 "type": string;66 "value": string;67 "yearList": Array<number>;68 }69 interface PpInputNumber {70 "autoFocus"?: boolean;71 "focusIndex"?: number;72 "name"?: string;73 "numeralDecimalScale"?: number;74 "options": IInputNumberOptions | string;75 "prefixValue"?: string;76 "value": string;77 }78 interface PpInputSearch {79 "name": string;80 "placeholder": string;81 "searchButtonDisabled": boolean;82 "searchText": string;83 "value": string;84 }85 interface PpInputTel {86 "config": any;87 "dropdownZIndex": number;88 "error": boolean;89 "initialCountry": string;90 "maxlength"?: string | number;91 "name": string;92 "placeholder": string;93 "value": string;94 }95 interface PpIntlInput {96 "config": any;97 "dropdownZIndex": number;98 "error": boolean;99 "initialCountry": string;100 "maxlength"?: string;101 "name": string;102 "placeholder": string;103 "value": string;104 }105 interface PpModal {106 "centered": boolean;107 "fit": boolean;108 "lockScroll"?: boolean;109 "open": boolean;110 "portal": HTMLElement | boolean;111 }112 interface PpPopper {113 "closeOnBlur": boolean;114 "open": boolean;115 "options": Options| string;116 "placement": string;117 "portal": HTMLElement | boolean;118 "reference": HTMLElement | string;119 }120 interface PpRadio {121 "checked": boolean;122 "label": string;123 "name": string;124 "value": string;125 }126 interface PpRadioOption {127 "checked": boolean;128 "finalValue": string;129 "label": string;130 "name": string;131 }132 interface PpRadioOptions {133 "name": string;134 "options": Array<OptionShape>;135 "value": any;136 }137 interface PpSandbox {138 "val": string;139 }140 interface PpSpinner {141 }142 interface PpTabs {143 "enableMenu": boolean;144 "menuContainerWidth": number;145 }146 interface PpText {147 "size": Sizes;148 }149 interface PpToast {150 "height": string;151 "open": boolean;152 "position": string;153 "width": string;154 }155 interface PpToggle {156 "on": boolean;157 }158}159declare global {160 interface HTMLPpAccordionElement extends Components.PpAccordion, HTMLStencilElement {161 }162 var HTMLPpAccordionElement: {163 prototype: HTMLPpAccordionElement;164 new (): HTMLPpAccordionElement;165 };166 interface HTMLPpAccordionItemElement extends Components.PpAccordionItem, HTMLStencilElement {167 }168 var HTMLPpAccordionItemElement: {169 prototype: HTMLPpAccordionItemElement;170 new (): HTMLPpAccordionItemElement;171 };172 interface HTMLPpAlertElement extends Components.PpAlert, HTMLStencilElement {173 }174 var HTMLPpAlertElement: {175 prototype: HTMLPpAlertElement;176 new (): HTMLPpAlertElement;177 };178 interface HTMLPpAvatarElement extends Components.PpAvatar, HTMLStencilElement {179 }180 var HTMLPpAvatarElement: {181 prototype: HTMLPpAvatarElement;182 new (): HTMLPpAvatarElement;183 };184 interface HTMLPpBadgeElement extends Components.PpBadge, HTMLStencilElement {185 }186 var HTMLPpBadgeElement: {187 prototype: HTMLPpBadgeElement;188 new (): HTMLPpBadgeElement;189 };190 interface HTMLPpButtonElement extends Components.PpButton, HTMLStencilElement {191 }192 var HTMLPpButtonElement: {193 prototype: HTMLPpButtonElement;194 new (): HTMLPpButtonElement;195 };196 interface HTMLPpCardElement extends Components.PpCard, HTMLStencilElement {197 }198 var HTMLPpCardElement: {199 prototype: HTMLPpCardElement;200 new (): HTMLPpCardElement;201 };202 interface HTMLPpCheckboxElement extends Components.PpCheckbox, HTMLStencilElement {203 }204 var HTMLPpCheckboxElement: {205 prototype: HTMLPpCheckboxElement;206 new (): HTMLPpCheckboxElement;207 };208 interface HTMLPpCheckboxOptionElement extends Components.PpCheckboxOption, HTMLStencilElement {209 }210 var HTMLPpCheckboxOptionElement: {211 prototype: HTMLPpCheckboxOptionElement;212 new (): HTMLPpCheckboxOptionElement;213 };214 interface HTMLPpCheckboxOptionsElement extends Components.PpCheckboxOptions, HTMLStencilElement {215 }216 var HTMLPpCheckboxOptionsElement: {217 prototype: HTMLPpCheckboxOptionsElement;218 new (): HTMLPpCheckboxOptionsElement;219 };220 interface HTMLPpDrawerElement extends Components.PpDrawer, HTMLStencilElement {221 }222 var HTMLPpDrawerElement: {223 prototype: HTMLPpDrawerElement;224 new (): HTMLPpDrawerElement;225 };226 interface HTMLPpFabElement extends Components.PpFab, HTMLStencilElement {227 }228 var HTMLPpFabElement: {229 prototype: HTMLPpFabElement;230 new (): HTMLPpFabElement;231 };232 interface HTMLPpIconButtonElement extends Components.PpIconButton, HTMLStencilElement {233 }234 var HTMLPpIconButtonElement: {235 prototype: HTMLPpIconButtonElement;236 new (): HTMLPpIconButtonElement;237 };238 interface HTMLPpInputDateElement extends Components.PpInputDate, HTMLStencilElement {239 }240 var HTMLPpInputDateElement: {241 prototype: HTMLPpInputDateElement;242 new (): HTMLPpInputDateElement;243 };244 interface HTMLPpInputNumberElement extends Components.PpInputNumber, HTMLStencilElement {245 }246 var HTMLPpInputNumberElement: {247 prototype: HTMLPpInputNumberElement;248 new (): HTMLPpInputNumberElement;249 };250 interface HTMLPpInputSearchElement extends Components.PpInputSearch, HTMLStencilElement {251 }252 var HTMLPpInputSearchElement: {253 prototype: HTMLPpInputSearchElement;254 new (): HTMLPpInputSearchElement;255 };256 interface HTMLPpInputTelElement extends Components.PpInputTel, HTMLStencilElement {257 }258 var HTMLPpInputTelElement: {259 prototype: HTMLPpInputTelElement;260 new (): HTMLPpInputTelElement;261 };262 interface HTMLPpIntlInputElement extends Components.PpIntlInput, HTMLStencilElement {263 }264 var HTMLPpIntlInputElement: {265 prototype: HTMLPpIntlInputElement;266 new (): HTMLPpIntlInputElement;267 };268 interface HTMLPpModalElement extends Components.PpModal, HTMLStencilElement {269 }270 var HTMLPpModalElement: {271 prototype: HTMLPpModalElement;272 new (): HTMLPpModalElement;273 };274 interface HTMLPpPopperElement extends Components.PpPopper, HTMLStencilElement {275 }276 var HTMLPpPopperElement: {277 prototype: HTMLPpPopperElement;278 new (): HTMLPpPopperElement;279 };280 interface HTMLPpRadioElement extends Components.PpRadio, HTMLStencilElement {281 }282 var HTMLPpRadioElement: {283 prototype: HTMLPpRadioElement;284 new (): HTMLPpRadioElement;285 };286 interface HTMLPpRadioOptionElement extends Components.PpRadioOption, HTMLStencilElement {287 }288 var HTMLPpRadioOptionElement: {289 prototype: HTMLPpRadioOptionElement;290 new (): HTMLPpRadioOptionElement;291 };292 interface HTMLPpRadioOptionsElement extends Components.PpRadioOptions, HTMLStencilElement {293 }294 var HTMLPpRadioOptionsElement: {295 prototype: HTMLPpRadioOptionsElement;296 new (): HTMLPpRadioOptionsElement;297 };298 interface HTMLPpSandboxElement extends Components.PpSandbox, HTMLStencilElement {299 }300 var HTMLPpSandboxElement: {301 prototype: HTMLPpSandboxElement;302 new (): HTMLPpSandboxElement;303 };304 interface HTMLPpSpinnerElement extends Components.PpSpinner, HTMLStencilElement {305 }306 var HTMLPpSpinnerElement: {307 prototype: HTMLPpSpinnerElement;308 new (): HTMLPpSpinnerElement;309 };310 interface HTMLPpTabsElement extends Components.PpTabs, HTMLStencilElement {311 }312 var HTMLPpTabsElement: {313 prototype: HTMLPpTabsElement;314 new (): HTMLPpTabsElement;315 };316 interface HTMLPpTextElement extends Components.PpText, HTMLStencilElement {317 }318 var HTMLPpTextElement: {319 prototype: HTMLPpTextElement;320 new (): HTMLPpTextElement;321 };322 interface HTMLPpToastElement extends Components.PpToast, HTMLStencilElement {323 }324 var HTMLPpToastElement: {325 prototype: HTMLPpToastElement;326 new (): HTMLPpToastElement;327 };328 interface HTMLPpToggleElement extends Components.PpToggle, HTMLStencilElement {329 }330 var HTMLPpToggleElement: {331 prototype: HTMLPpToggleElement;332 new (): HTMLPpToggleElement;333 };334 interface HTMLElementTagNameMap {335 "pp-accordion": HTMLPpAccordionElement;336 "pp-accordion-item": HTMLPpAccordionItemElement;337 "pp-alert": HTMLPpAlertElement;338 "pp-avatar": HTMLPpAvatarElement;339 "pp-badge": HTMLPpBadgeElement;340 "pp-button": HTMLPpButtonElement;341 "pp-card": HTMLPpCardElement;342 "pp-checkbox": HTMLPpCheckboxElement;343 "pp-checkbox-option": HTMLPpCheckboxOptionElement;344 "pp-checkbox-options": HTMLPpCheckboxOptionsElement;345 "pp-drawer": HTMLPpDrawerElement;346 "pp-fab": HTMLPpFabElement;347 "pp-icon-button": HTMLPpIconButtonElement;348 "pp-input-date": HTMLPpInputDateElement;349 "pp-input-number": HTMLPpInputNumberElement;350 "pp-input-search": HTMLPpInputSearchElement;351 "pp-input-tel": HTMLPpInputTelElement;352 "pp-intl-input": HTMLPpIntlInputElement;353 "pp-modal": HTMLPpModalElement;354 "pp-popper": HTMLPpPopperElement;355 "pp-radio": HTMLPpRadioElement;356 "pp-radio-option": HTMLPpRadioOptionElement;357 "pp-radio-options": HTMLPpRadioOptionsElement;358 "pp-sandbox": HTMLPpSandboxElement;359 "pp-spinner": HTMLPpSpinnerElement;360 "pp-tabs": HTMLPpTabsElement;361 "pp-text": HTMLPpTextElement;362 "pp-toast": HTMLPpToastElement;363 "pp-toggle": HTMLPpToggleElement;364 }365}366declare namespace LocalJSX {367 interface PpAccordion {368 }369 interface PpAccordionItem {370 }371 interface PpAlert {372 }373 interface PpAvatar {374 "alt"?: string;375 "initialLen"?: number;376 "size"?: Sizes;377 "src"?: string;378 "status"?: AvatarStatus;379 }380 interface PpBadge {381 "color"?: ColorVariants;382 }383 interface PpButton {384 "color"?: ColorVariants;385 "disabled"?: boolean;386 "size"?: Sizes;387 "variant"?: ButtonVariants;388 }389 interface PpCard {390 }391 interface PpCheckbox {392 "checked"?: boolean;393 "label"?: string;394 "name"?: string;395 "onInputBlur"?: (event: CustomEvent<any>) => void;396 "onInputChange"?: (event: CustomEvent<any>) => void;397 "onInputFocus"?: (event: CustomEvent<any>) => void;398 "value"?: string;399 }400 interface PpCheckboxOption {401 "checked"?: boolean;402 "label"?: string;403 "name"?: string;404 "onOptionChange"?: (event: CustomEvent<any>) => void;405 "optionValue"?: string;406 }407 interface PpCheckboxOptions {408 "name"?: string;409 "onListOptionChange"?: (event: CustomEvent<any>) => void;410 "options"?: Array<OptionShape>;411 "value"?: Array<any>;412 }413 interface PpDrawer {414 "attachCloseAction"?: boolean;415 "lockScroll"?: boolean;416 "onBackdropClick"?: (event: CustomEvent<any>) => void;417 "onModalClose"?: (event: CustomEvent<any>) => void;418 "onModalOpen"?: (event: CustomEvent<any>) => void;419 "open"?: boolean;420 }421 interface PpFab {422 }423 interface PpIconButton {424 }425 interface PpInputDate {426 "format"?: string;427 "name"?: string;428 "onInputBlur"?: (event: CustomEvent<any>) => void;429 "onInputChange"?: (event: CustomEvent<any>) => void;430 "onInputFocus"?: (event: CustomEvent<any>) => void;431 "type"?: string;432 "value"?: string;433 "yearList"?: Array<number>;434 }435 interface PpInputNumber {436 "autoFocus"?: boolean;437 "focusIndex"?: number;438 "name"?: string;439 "numeralDecimalScale"?: number;440 "onInputBlur"?: (event: CustomEvent<any>) => void;441 "onInputChange"?: (event: CustomEvent<any>) => void;442 "onInputFocus"?: (event: CustomEvent<any>) => void;443 "options"?: IInputNumberOptions | string;444 "prefixValue"?: string;445 "value"?: string;446 }447 interface PpInputSearch {448 "name"?: string;449 "onSearchButtonClick"?: (event: CustomEvent<any>) => void;450 "onSearchInputChange"?: (event: CustomEvent<any>) => void;451 "placeholder"?: string;452 "searchButtonDisabled"?: boolean;453 "searchText"?: string;454 "value"?: string;455 }456 interface PpInputTel {457 "config"?: any;458 "dropdownZIndex"?: number;459 "error"?: boolean;460 "initialCountry"?: string;461 "maxlength"?: string | number;462 "name"?: string;463 "onInputBlur"?: (event: CustomEvent<any>) => void;464 "onInputChange"?: (event: CustomEvent<any>) => void;465 "onInputCountryChange"?: (event: CustomEvent<any>) => void;466 "onInputLoad"?: (event: CustomEvent<any>) => void;467 "placeholder"?: string;468 "value"?: string;469 }470 interface PpIntlInput {471 "config"?: any;472 "dropdownZIndex"?: number;473 "error"?: boolean;474 "initialCountry"?: string;475 "maxlength"?: string;476 "name"?: string;477 "onInputBlur"?: (event: CustomEvent<any>) => void;478 "onInputChange"?: (event: CustomEvent<any>) => void;479 "onInputFocus"?: (event: CustomEvent<any>) => void;480 "onInputLoad"?: (event: CustomEvent<any>) => void;481 "placeholder"?: string;482 "value"?: string;483 }484 interface PpModal {485 "centered"?: boolean;486 "fit"?: boolean;487 "lockScroll"?: boolean;488 "onBackdropClick"?: (event: CustomEvent<any>) => void;489 "onModalClose"?: (event: CustomEvent<any>) => void;490 "onModalLoad"?: (event: CustomEvent<any>) => void;491 "onModalOpen"?: (event: CustomEvent<any>) => void;492 "open"?: boolean;493 "portal"?: HTMLElement | boolean;494 }495 interface PpPopper {496 "closeOnBlur"?: boolean;497 "onClose"?: (event: CustomEvent<any>) => void;498 "onPopperShow"?: (event: CustomEvent<any>) => void;499 "open"?: boolean;500 "options"?: Options| string;501 "placement"?: string;502 "portal"?: HTMLElement | boolean;503 "reference"?: HTMLElement | string;504 }505 interface PpRadio {506 "checked"?: boolean;507 "label"?: string;508 "name"?: string;509 "onInputBlur"?: (event: CustomEvent<any>) => void;510 "onInputChange"?: (event: CustomEvent<any>) => void;511 "onInputFocus"?: (event: CustomEvent<any>) => void;512 "value"?: string;513 }514 interface PpRadioOption {515 "checked"?: boolean;516 "finalValue"?: string;517 "label"?: string;518 "name"?: string;519 "onOptionChange"?: (event: CustomEvent<any>) => void;520 }521 interface PpRadioOptions {522 "name"?: string;523 "onOptionChange"?: (event: CustomEvent<any>) => void;524 "options"?: Array<OptionShape>;525 "value"?: any;526 }527 interface PpSandbox {528 "val"?: string;529 }530 interface PpSpinner {531 }532 interface PpTabs {533 "enableMenu"?: boolean;534 "menuContainerWidth"?: number;535 "onBoundMeasureChange"?: (event: CustomEvent<any>) => void;536 "onTabChange"?: (event: CustomEvent<any>) => void;537 }538 interface PpText {539 "size"?: Sizes;540 }541 interface PpToast {542 "height"?: string;543 "open"?: boolean;544 "position"?: string;545 "width"?: string;546 }547 interface PpToggle {548 "on"?: boolean;549 "onToggleChange"?: (event: CustomEvent<any>) => void;550 }551 interface IntrinsicElements {552 "pp-accordion": PpAccordion;553 "pp-accordion-item": PpAccordionItem;554 "pp-alert": PpAlert;555 "pp-avatar": PpAvatar;556 "pp-badge": PpBadge;557 "pp-button": PpButton;558 "pp-card": PpCard;559 "pp-checkbox": PpCheckbox;560 "pp-checkbox-option": PpCheckboxOption;561 "pp-checkbox-options": PpCheckboxOptions;562 "pp-drawer": PpDrawer;563 "pp-fab": PpFab;564 "pp-icon-button": PpIconButton;565 "pp-input-date": PpInputDate;566 "pp-input-number": PpInputNumber;567 "pp-input-search": PpInputSearch;568 "pp-input-tel": PpInputTel;569 "pp-intl-input": PpIntlInput;570 "pp-modal": PpModal;571 "pp-popper": PpPopper;572 "pp-radio": PpRadio;573 "pp-radio-option": PpRadioOption;574 "pp-radio-options": PpRadioOptions;575 "pp-sandbox": PpSandbox;576 "pp-spinner": PpSpinner;577 "pp-tabs": PpTabs;578 "pp-text": PpText;579 "pp-toast": PpToast;580 "pp-toggle": PpToggle;581 }582}583export { LocalJSX as JSX };584declare module "@stencil/core" {585 export namespace JSX {586 interface IntrinsicElements {587 "pp-accordion": LocalJSX.PpAccordion & JSXBase.HTMLAttributes<HTMLPpAccordionElement>;588 "pp-accordion-item": LocalJSX.PpAccordionItem & JSXBase.HTMLAttributes<HTMLPpAccordionItemElement>;589 "pp-alert": LocalJSX.PpAlert & JSXBase.HTMLAttributes<HTMLPpAlertElement>;590 "pp-avatar": LocalJSX.PpAvatar & JSXBase.HTMLAttributes<HTMLPpAvatarElement>;591 "pp-badge": LocalJSX.PpBadge & JSXBase.HTMLAttributes<HTMLPpBadgeElement>;592 "pp-button": LocalJSX.PpButton & JSXBase.HTMLAttributes<HTMLPpButtonElement>;593 "pp-card": LocalJSX.PpCard & JSXBase.HTMLAttributes<HTMLPpCardElement>;594 "pp-checkbox": LocalJSX.PpCheckbox & JSXBase.HTMLAttributes<HTMLPpCheckboxElement>;595 "pp-checkbox-option": LocalJSX.PpCheckboxOption & JSXBase.HTMLAttributes<HTMLPpCheckboxOptionElement>;596 "pp-checkbox-options": LocalJSX.PpCheckboxOptions & JSXBase.HTMLAttributes<HTMLPpCheckboxOptionsElement>;597 "pp-drawer": LocalJSX.PpDrawer & JSXBase.HTMLAttributes<HTMLPpDrawerElement>;598 "pp-fab": LocalJSX.PpFab & JSXBase.HTMLAttributes<HTMLPpFabElement>;599 "pp-icon-button": LocalJSX.PpIconButton & JSXBase.HTMLAttributes<HTMLPpIconButtonElement>;600 "pp-input-date": LocalJSX.PpInputDate & JSXBase.HTMLAttributes<HTMLPpInputDateElement>;601 "pp-input-number": LocalJSX.PpInputNumber & JSXBase.HTMLAttributes<HTMLPpInputNumberElement>;602 "pp-input-search": LocalJSX.PpInputSearch & JSXBase.HTMLAttributes<HTMLPpInputSearchElement>;603 "pp-input-tel": LocalJSX.PpInputTel & JSXBase.HTMLAttributes<HTMLPpInputTelElement>;604 "pp-intl-input": LocalJSX.PpIntlInput & JSXBase.HTMLAttributes<HTMLPpIntlInputElement>;605 "pp-modal": LocalJSX.PpModal & JSXBase.HTMLAttributes<HTMLPpModalElement>;606 "pp-popper": LocalJSX.PpPopper & JSXBase.HTMLAttributes<HTMLPpPopperElement>;607 "pp-radio": LocalJSX.PpRadio & JSXBase.HTMLAttributes<HTMLPpRadioElement>;608 "pp-radio-option": LocalJSX.PpRadioOption & JSXBase.HTMLAttributes<HTMLPpRadioOptionElement>;609 "pp-radio-options": LocalJSX.PpRadioOptions & JSXBase.HTMLAttributes<HTMLPpRadioOptionsElement>;610 "pp-sandbox": LocalJSX.PpSandbox & JSXBase.HTMLAttributes<HTMLPpSandboxElement>;611 "pp-spinner": LocalJSX.PpSpinner & JSXBase.HTMLAttributes<HTMLPpSpinnerElement>;612 "pp-tabs": LocalJSX.PpTabs & JSXBase.HTMLAttributes<HTMLPpTabsElement>;613 "pp-text": LocalJSX.PpText & JSXBase.HTMLAttributes<HTMLPpTextElement>;614 "pp-toast": LocalJSX.PpToast & JSXBase.HTMLAttributes<HTMLPpToastElement>;615 "pp-toggle": LocalJSX.PpToggle & JSXBase.HTMLAttributes<HTMLPpToggleElement>;616 }617 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2strykerParent.pp();3var strykerParent = require('stryker-parent');4strykerParent.pp();5var strykerParent = require('stryker-parent');6strykerParent.pp();7var strykerParent = require('stryker-parent');8strykerParent.pp();9var strykerParent = require('stryker-parent');10strykerParent.pp();11var strykerParent = require('stryker-parent');12strykerParent.pp();13var strykerParent = require('stryker-parent');14strykerParent.pp();15var strykerParent = require('stryker-parent');16strykerParent.pp();17var strykerParent = require('stryker-parent');18strykerParent.pp();19var strykerParent = require('stryker-parent');20strykerParent.pp();21var strykerParent = require('stryker-parent');22strykerParent.pp();23var strykerParent = require('stryker-parent');24strykerParent.pp();25var strykerParent = require('stryker-parent');26strykerParent.pp();27var strykerParent = require('stryker-parent');28strykerParent.pp();

Full Screen

Using AI Code Generation

copy

Full Screen

1var pp = require('stryker-parent').pp;2var pp2 = require('stryker-parent2').pp;3var pp3 = require('stryker-parent3').pp;4var pp4 = require('stryker-parent4').pp;5var pp5 = require('stryker-parent5').pp;6var pp6 = require('stryker-parent6').pp;7var pp7 = require('stryker-parent7').pp;8var pp8 = require('stryker-parent8').pp;9var pp9 = require('stryker-parent9').pp;10var pp10 = require('stryker-parent10').pp;11var pp11 = require('stryker-parent11').pp;12var pp12 = require('stryker-parent12').pp;13var pp13 = require('stryker-parent13').pp;14var pp14 = require('stryker-parent14').pp;15var pp15 = require('stryker-parent15').pp;16var pp16 = require('stryker-parent16').pp;17var pp17 = require('stryker-parent17').pp;18var pp18 = require('stryker-parent18').pp;19var pp19 = require('stryker-parent19').pp;20var pp20 = require('stry

Full Screen

Using AI Code Generation

copy

Full Screen

1const strykerParent = require('stryker-parent');2strykerParent.pp('hello world');3const strykerParent = require('stryker-parent');4strykerParent.pp('hello world');5const strykerParent = require('stryker-parent');6strykerParent.pp('hello world');7const strykerParent = require('stryker-parent');8strykerParent.pp('hello world');9const strykerParent = require('stryker-parent');10strykerParent.pp('hello world');11const strykerParent = require('stryker-parent');12strykerParent.pp('hello world');13const strykerParent = require('stryker-parent');14strykerParent.pp('hello world');15const strykerParent = require('stryker-parent');16strykerParent.pp('hello world');17const strykerParent = require('stryker-parent');18strykerParent.pp('hello world');19const strykerParent = require('stryker-parent');20strykerParent.pp('hello world');21const strykerParent = require('stryker-parent');22strykerParent.pp('hello world');23const strykerParent = require('stryker-parent');24strykerParent.pp('hello world');25const strykerParent = require('stryker-parent');26strykerParent.pp('hello world');

Full Screen

Using AI Code Generation

copy

Full Screen

1var parent = require('stryker-parent-module');2parent.pp('test');3var parent = require('stryker-parent-module');4parent.pp('test2');5var parent = require('stryker-parent-module');6parent.pp('test3');7var parent = require('stryker-parent-module');8parent.pp('test4');9var parent = require('stryker-parent-module');10parent.pp('test5');11var parent = require('stryker-parent-module');12parent.pp('test6');13var parent = require('stryker-parent-module');14parent.pp('test7');15var parent = require('stryker-parent-module');16parent.pp('test8');17var parent = require('stryker-parent-module');18parent.pp('test9');19var parent = require('stryker-parent-module');20parent.pp('test10');21var parent = require('stryker-parent-module');22parent.pp('test11');23var parent = require('stryker-parent-module');24parent.pp('test12');25var parent = require('stryker-parent-module');26parent.pp('test13');27var parent = require('stryker-parent-module');28parent.pp('test14');

Full Screen

Using AI Code Generation

copy

Full Screen

1var pp = require('stryker-parent').pp;2var str = 'Hello World';3console.log(pp(str));4var pp = require('stryker-parent').pp;5var str = 'Hello World';6console.log(pp(str));7var pp = require('stryker-parent').pp;8var str = 'Hello World';9console.log(pp(str));10var pp = require('stryker-parent').pp;11var str = 'Hello World';12console.log(pp(str));13var pp = require('stryker-parent').pp;14var str = 'Hello World';15console.log(pp(str));16var pp = require('stryker-parent').pp;17var str = 'Hello World';18console.log(pp(str));19var pp = require('stryker-parent').pp;20var str = 'Hello World';21console.log(pp(str));22var pp = require('stryker-parent').pp;23var str = 'Hello World';24console.log(pp(str));25var pp = require('stryker-parent').pp;26var str = 'Hello World';27console.log(pp(str));28var pp = require('stryker-parent').pp;29var str = 'Hello World';30console.log(pp(str));31var pp = require('stryker-parent').pp;32var str = 'Hello World';33console.log(pp(str));34var pp = require('stryker-parent').pp;35var str = 'Hello World';36console.log(pp(str));37var pp = require('stryker

Full Screen

Using AI Code Generation

copy

Full Screen

1var stryker = require(‘stryker-parent’);2stryker.pp(‘Hello World’);3var stryker = require(‘stryker-child’);4stryker.pp(‘Hello World’);5var stryker = require(‘stryker-child’);6stryker.pp(‘Hello World’);7var stryker = require(‘stryker-parent’);8stryker.pp(‘Hello World’);9var stryker = require(‘stryker-parent’);10stryker.pp(‘Hello World’);11var stryker = require(‘stryker-child’);12stryker.pp(‘Hello World’);13var stryker = require(‘stryker-child’);14stryker.pp(‘Hello World’);15var stryker = require(‘stryker-parent’);16stryker.pp(‘Hello World’);17var stryker = require(‘stryker-parent’);18stryker.pp(‘Hello World’);19var stryker = require(‘stryker-child’);20stryker.pp(‘Hello World’);21var stryker = require(‘stryker-child’);22stryker.pp(‘Hello World’);23var stryker = require(‘stryker-parent’);24stryker.pp(‘Hello World’);25var stryker = require(

Full Screen

Using AI Code Generation

copy

Full Screen

1var pp = require('stryker-parent').pp;2var str = 'Hello World';3pp(str);4var pp = require('stryker-parent').pp;5var str = 'Hello World';6pp(str);7var pp = require('stryker-parent').pp;8var str = 'Hello World';9pp(str);10var pp = require('stryker-parent').pp;11var str = 'Hello World';12pp(str);13var pp = require('stryker-parent').pp;14var str = 'Hello World';15pp(str);16var pp = require('stryker-parent').pp;17var str = 'Hello World';18pp(str);19var pp = require('stryker-parent').pp;20var str = 'Hello World';21pp(str);22var pp = require('stryker-parent').pp;23var str = 'Hello World';24pp(str);25var pp = require('stryker-parent').pp;26var str = 'Hello World';27pp(str);28var pp = require('stryker-parent').pp;29var str = 'Hello World';30pp(str);31var pp = require('stryker-parent').pp;32var str = 'Hello World';33pp(str);

Full Screen

Using AI Code Generation

copy

Full Screen

1var stryker = require('stryker-parent');2var stryker = require('stryker-parent');3module.exports = stryker;4var stryker = {};5stryker.pp = function() { console.log('Hello from stryker-parent'); };6module.exports = stryker;7var stryker = {};8stryker.pp = function() { console.log('Hello from stryker'); };9module.exports = stryker;10var stryker = {};11stryker.pp = function() { console.log('Hello from stryker'); };12module.exports = stryker;13var stryker = {};14stryker.pp = function() { console.log('Hello from stryker-parent'); };15module.exports = stryker;16var stryker = {};17stryker.pp = function() { console.log('Hello from stryker'); };18module.exports = stryker;19var stryker = {};20stryker.pp = function() { console.log('Hello from stryker-parent'); };21module.exports = stryker;22var stryker = {};23stryker.pp = function() { console.log('Hello from stryker'); };24module.exports = stryker;25var stryker = {};26stryker.pp = function() { console.log('Hello from stryker-parent'); };27module.exports = stryker;28var stryker = {};29stryker.pp = function() { console.log('Hello from stryker'); };

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run stryker-parent automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful