framework7 7.0.7 → 7.0.9
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/components/accordion/accordion.lazy.js +1 -1
- package/components/actions/actions.lazy.js +1 -1
- package/components/app/app-class.js +2 -0
- package/components/appbar/appbar.lazy.js +1 -1
- package/components/area-chart/area-chart.lazy.js +1 -1
- package/components/autocomplete/autocomplete.lazy.js +1 -1
- package/components/breadcrumbs/breadcrumbs.lazy.js +1 -1
- package/components/calendar/calendar.lazy.js +1 -1
- package/components/card/card.lazy.js +1 -1
- package/components/checkbox/checkbox.lazy.js +1 -1
- package/components/chip/chip.lazy.js +1 -1
- package/components/color-picker/color-picker.lazy.js +1 -1
- package/components/contacts-list/contacts-list.lazy.js +1 -1
- package/components/data-table/data-table-class.js +2 -2
- package/components/data-table/data-table.lazy.js +1 -1
- package/components/dialog/dialog.lazy.js +1 -1
- package/components/elevation/elevation.lazy.js +1 -1
- package/components/fab/fab.lazy.js +1 -1
- package/components/form/form.lazy.js +1 -1
- package/components/gauge/gauge.lazy.js +1 -1
- package/components/grid/grid.lazy.js +1 -1
- package/components/infinite-scroll/infinite-scroll.lazy.js +1 -1
- package/components/input/input.lazy.js +1 -1
- package/components/lazy/lazy.lazy.js +1 -1
- package/components/list-index/list-index.lazy.js +1 -1
- package/components/login-screen/login-screen.lazy.js +1 -1
- package/components/menu/menu.lazy.js +1 -1
- package/components/messagebar/messagebar.lazy.js +1 -1
- package/components/messages/messages.lazy.js +1 -1
- package/components/notification/notification.lazy.js +1 -1
- package/components/panel/panel.lazy.js +1 -1
- package/components/panel/swipe-panel.js +21 -11
- package/components/photo-browser/photo-browser.lazy.js +1 -1
- package/components/picker/picker.lazy.js +1 -1
- package/components/pie-chart/pie-chart.lazy.js +1 -1
- package/components/popover/popover.lazy.js +1 -1
- package/components/popup/popup.lazy.js +1 -1
- package/components/preloader/preloader.lazy.js +1 -1
- package/components/progressbar/progressbar.lazy.js +1 -1
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -1
- package/components/radio/radio.lazy.js +1 -1
- package/components/range/range.lazy.js +1 -1
- package/components/searchbar/searchbar.lazy.js +1 -1
- package/components/sheet/sheet.lazy.js +1 -1
- package/components/skeleton/skeleton.lazy.js +1 -1
- package/components/smart-select/smart-select.lazy.js +1 -1
- package/components/sortable/sortable.lazy.js +1 -1
- package/components/stepper/stepper.lazy.js +1 -1
- package/components/swipeout/swipeout.lazy.js +1 -1
- package/components/swiper/swiper.lazy.js +1 -1
- package/components/tabs/tabs.lazy.js +1 -1
- package/components/text-editor/text-editor.lazy.js +1 -1
- package/components/timeline/timeline.lazy.js +1 -1
- package/components/toast/toast.lazy.js +1 -1
- package/components/toggle/toggle.lazy.js +1 -1
- package/components/tooltip/tooltip.lazy.js +1 -1
- package/components/treeview/treeview.lazy.js +1 -1
- package/components/typography/typography.lazy.js +1 -1
- package/components/virtual-list/virtual-list.lazy.js +1 -1
- package/framework7-bundle-rtl.css +2 -2
- package/framework7-bundle-rtl.min.css +2 -2
- package/framework7-bundle.css +2 -2
- package/framework7-bundle.esm.js +2 -2
- package/framework7-bundle.js +447 -435
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +2 -2
- package/framework7-bundle.min.css +2 -2
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +2 -2
- package/framework7-lite.esm.js +2 -2
- package/framework7-rtl.css +2 -2
- package/framework7-rtl.min.css +2 -2
- package/framework7.css +2 -2
- package/framework7.esm.js +2 -2
- package/framework7.js +30 -2
- package/framework7.js.map +1 -1
- package/framework7.less +2 -2
- package/framework7.min.css +2 -2
- package/framework7.min.js +3 -3
- package/framework7.min.js.map +1 -1
- package/modules/component/component.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function framework7ComponentLoader(e,t){void 0===t&&(t=!0);var s=e.$,o=e.utils,i=(e.getDevice,e.getSupport),n=(e.Class,e.Modal,e.ConstructorMethods,e.ModalMethods,o.nextFrame),a=o.bindMethods;const r={init(){const e=this,t=
|
|
1
|
+
(function framework7ComponentLoader(e,t){void 0===t&&(t=!0);var s=e.$,o=e.utils,i=(e.getDevice,e.getSupport),n=(e.Class,e.Modal,e.ConstructorMethods,e.ModalMethods,e.$jsx,o.nextFrame),a=o.bindMethods;const r={init(){const e=this,t={};let o,n,a,p,l,u,w,f,d,c,h,g,m,v,C,x,O,$,E,M,T;const L=!!i().passiveListener&&{passive:!0};e.on("touchstart",(t=>{if(r.el){const o=s(t.target);s(r.el).is(o[0])||o.parents(".swipeout").is(r.el)||o.hasClass("modal-in")||(o.attr("class")||"").indexOf("-backdrop")>0||o.hasClass("actions-modal")||o.parents(".actions-modal.modal-in, .dialog.modal-in").length>0||e.swipeout.close(r.el)}})),s(document).on(e.touchEvents.start,"li.swipeout",(function(i){e.swipeout.allow&&(n=!1,o=!0,a=void 0,t.x="touchstart"===i.type?i.targetTouches[0].pageX:i.pageX,t.y="touchstart"===i.type?i.targetTouches[0].pageY:i.pageY,p=(new Date).getTime(),u=s(this))}),L),e.on("touchmove:active",(function(i){if(!o)return;const r="touchmove"===i.type?i.targetTouches[0].pageX:i.pageX,p="touchmove"===i.type?i.targetTouches[0].pageY:i.pageY;if(void 0===a&&(a=!!(a||Math.abs(p-t.y)>Math.abs(r-t.x))),a)return void(o=!1);if(!n){if(s(".list.sortable-opened").length>0)return;w=u.find(".swipeout-content"),f=u.find(".swipeout-actions-right"),d=u.find(".swipeout-actions-left"),c=null,h=null,C=null,x=null,E=null,$=null,d.length>0&&(c=d.outerWidth(),C=d.children("a"),$=d.find(".swipeout-overswipe")),f.length>0&&(h=f.outerWidth(),x=f.children("a"),E=f.find(".swipeout-overswipe")),m=u.hasClass("swipeout-opened"),m&&(v=u.find(".swipeout-actions-left.swipeout-actions-opened").length>0?"left":"right"),u.removeClass("swipeout-transitioning"),e.params.swipeout.noFollow||(u.find(".swipeout-actions-opened").removeClass("swipeout-actions-opened"),u.removeClass("swipeout-opened"))}if(n=!0,i.cancelable&&i.preventDefault(),l=r-t.x,g=l,m&&("right"===v?g-=h:g+=c),g>0&&0===d.length||g<0&&0===f.length){if(!m)return o=!1,n=!1,w.transform(""),x&&x.length>0&&x.transform(""),void(C&&C.length>0&&C.transform(""));g=0}let L,S;if(g<0?O="to-left":g>0?O="to-right":O||(O="to-left"),i.f7PreventSwipePanel=!0,e.params.swipeout.noFollow)return m?("right"===v&&l>0&&e.swipeout.close(u),"left"===v&&l<0&&e.swipeout.close(u)):(l<0&&f.length>0&&e.swipeout.open(u,"right"),l>0&&d.length>0&&e.swipeout.open(u,"left")),o=!1,void(n=!1);if(M=!1,T=!1,f.length>0){let t=g;if(S=t/h,t<-h){const s=t/-h;t=-h-(-t-h)**.8,g=t,E.length>0&&s>e.params.swipeout.overswipeRatio&&(T=!0)}"to-left"!==O&&(S=0,t=0),x.each((o=>{const i=s(o);void 0===o.f7SwipeoutButtonOffset&&(i[0].f7SwipeoutButtonOffset=o.offsetLeft),L=o.f7SwipeoutButtonOffset,E.length>0&&i.hasClass("swipeout-overswipe")&&"to-left"===O&&(i.css({left:(T?-L:0)+"px"}),T?(i.hasClass("swipeout-overswipe-active")||(u.trigger("swipeout:overswipeenter"),e.emit("swipeoutOverswipeEnter",u[0])),i.addClass("swipeout-overswipe-active")):(i.hasClass("swipeout-overswipe-active")&&(u.trigger("swipeout:overswipeexit"),e.emit("swipeoutOverswipeExit",u[0])),i.removeClass("swipeout-overswipe-active"))),i.transform(`translate3d(${t-L*(1+Math.max(S,-1))}px,0,0)`)}))}if(d.length>0){let t=g;if(S=t/c,t>c){const s=t/h;t=c+(t-c)**.8,g=t,$.length>0&&s>e.params.swipeout.overswipeRatio&&(M=!0)}"to-right"!==O&&(t=0,S=0),C.each(((o,i)=>{const n=s(o);void 0===o.f7SwipeoutButtonOffset&&(n[0].f7SwipeoutButtonOffset=c-o.offsetLeft-o.offsetWidth),L=o.f7SwipeoutButtonOffset,$.length>0&&n.hasClass("swipeout-overswipe")&&"to-right"===O&&(n.css({left:`${M?L:0}px`}),M?(n.hasClass("swipeout-overswipe-active")||(u.trigger("swipeout:overswipeenter"),e.emit("swipeoutOverswipeEnter",u[0])),n.addClass("swipeout-overswipe-active")):(n.hasClass("swipeout-overswipe-active")&&(u.trigger("swipeout:overswipeexit"),e.emit("swipeoutOverswipeExit",u[0])),n.removeClass("swipeout-overswipe-active"))),C.length>1&&n.css("z-index",C.length-i),n.transform(`translate3d(${t+L*(1-Math.min(S,1))}px,0,0)`)}))}u.trigger("swipeout",S),e.emit("swipeout",u[0],S),w.transform(`translate3d(${g}px,0,0)`)})),e.on("touchend:passive",(function(){if(!o||!n)return o=!1,void(n=!1);o=!1,n=!1;const t=(new Date).getTime()-p,i="to-left"===O?f:d,a="to-left"===O?h:c;let v,$,E,L;if(v=t<300&&(l<-10&&"to-left"===O||l>10&&"to-right"===O)||t>=300&&Math.abs(g)>a/2?"open":"close",t<300&&(0===Math.abs(g)&&(v="close"),Math.abs(g)===a&&(v="open")),"open"===v){r.el=u[0],u.trigger("swipeout:open"),e.emit("swipeoutOpen",u[0]),u.addClass("swipeout-opened swipeout-transitioning");const t="to-left"===O?-a:a;if(w.transform(`translate3d(${t}px,0,0)`),i.addClass("swipeout-actions-opened"),$="to-left"===O?x:C,$)for(E=0;E<$.length;E+=1)s($[E]).transform(`translate3d(${t}px,0,0)`);T&&f.find(".swipeout-overswipe").trigger("click","f7Overswipe"),M&&d.find(".swipeout-overswipe").trigger("click","f7Overswipe")}else u.trigger("swipeout:close"),e.emit("swipeoutClose",u[0]),r.el=void 0,u.addClass("swipeout-transitioning").removeClass("swipeout-opened"),w.transform(""),i.removeClass("swipeout-actions-opened");C&&C.length>0&&C!==$&&C.each((e=>{const t=s(e);L=e.f7SwipeoutButtonOffset,void 0===L&&(t[0].f7SwipeoutButtonOffset=c-e.offsetLeft-e.offsetWidth),t.transform(`translate3d(${L}px,0,0)`)})),x&&x.length>0&&x!==$&&x.each((e=>{const t=s(e);L=e.f7SwipeoutButtonOffset,void 0===L&&(t[0].f7SwipeoutButtonOffset=e.offsetLeft),t.transform(`translate3d(${-L}px,0,0)`)})),w.transitionEnd((()=>{m&&"open"===v||!m&&"close"===v||(u.trigger("open"===v?"swipeout:opened":"swipeout:closed"),e.emit("open"===v?"swipeoutOpened":"swipeoutClosed",u[0]),u.removeClass("swipeout-transitioning"),m&&"close"===v&&(f.length>0&&x.transform(""),d.length>0&&C.transform("")))}))}))},allow:!0,el:void 0,open(){const e=this;for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];let[a,p,l]=o;"function"==typeof o[1]&&([a,l,p]=o);const u=s(a).eq(0);if(0===u.length)return;if(!u.hasClass("swipeout")||u.hasClass("swipeout-opened"))return;p||(p=u.find(".swipeout-actions-right").length>0?"right":"left");const w=u.find(`.swipeout-actions-${p}`),f=u.find(".swipeout-content");if(0===w.length)return;u.trigger("swipeout:open").addClass("swipeout-opened").removeClass("swipeout-transitioning"),e.emit("swipeoutOpen",u[0]),w.addClass("swipeout-actions-opened");const d=w.children("a"),c=w.outerWidth(),h="right"===p?-c:c;d.length>1&&d.each(((e,t)=>{const o=s(e);"right"===p?o.transform(`translate3d(${-e.offsetLeft}px,0,0)`):o.css("z-index",d.length-t).transform(`translate3d(${c-e.offsetWidth-e.offsetLeft}px,0,0)`)})),u.addClass("swipeout-transitioning"),f.transitionEnd((()=>{u.trigger("swipeout:opened"),e.emit("swipeoutOpened",u[0]),l&&l.call(u[0])})),n((()=>{d.transform(`translate3d(${h}px,0,0)`),f.transform(`translate3d(${h}px,0,0)`)})),r.el=u[0]},close(e,t){const o=this,i=s(e).eq(0);if(0===i.length)return;if(!i.hasClass("swipeout-opened"))return;const n=i.find(".swipeout-actions-opened").hasClass("swipeout-actions-right")?"right":"left",a=i.find(".swipeout-actions-opened").removeClass("swipeout-actions-opened"),p=a.children("a"),l=a.outerWidth();let u;function w(){o.swipeout.allow=!0,i.hasClass("swipeout-opened")||(i.removeClass("swipeout-transitioning"),p.transform(""),i.trigger("swipeout:closed"),o.emit("swipeoutClosed",i[0]),t&&t.call(i[0]),u&&clearTimeout(u))}o.swipeout.allow=!1,i.trigger("swipeout:close"),o.emit("swipeoutClose",i[0]),i.removeClass("swipeout-opened").addClass("swipeout-transitioning"),i.find(".swipeout-content").transform("").transitionEnd(w),u=setTimeout(w,500),p.each((e=>{const t=s(e);"right"===n?t.transform(`translate3d(${-e.offsetLeft}px,0,0)`):t.transform(`translate3d(${l-e.offsetWidth-e.offsetLeft}px,0,0)`),t.css({left:"0px"}).removeClass("swipeout-overswipe-active")})),r.el&&r.el===i[0]&&(r.el=void 0)},delete(e,t){const o=this,i=s(e).eq(0);0!==i.length&&(r.el=void 0,i.trigger("swipeout:delete"),o.emit("swipeoutDelete",i[0]),i.css({height:`${i.outerHeight()}px`}),i.transitionEnd((()=>{if(i.trigger("swipeout:deleted"),o.emit("swipeoutDeleted",i[0]),t&&t.call(i[0]),i.parents(".virtual-list").length>0){const e=i.parents(".virtual-list")[0].f7VirtualList,t=i[0].f7VirtualListIndex;e&&void 0!==t&&e.deleteItem(t)}else o.params.swipeout.removeElements?o.params.swipeout.removeElementsWithTimeout?setTimeout((()=>{i.remove()}),o.params.swipeout.removeElementsTimeout):i.remove():i.removeClass("swipeout-deleting swipeout-transitioning")})),n((()=>{i.addClass("swipeout-deleting swipeout-transitioning").css({height:"0px"}).find(".swipeout-content").transform("translate3d(-100%,0,0)")})))}};var p={name:"swipeout",params:{swipeout:{actionsNoFold:!1,noFollow:!1,removeElements:!0,removeElementsWithTimeout:!1,removeElementsTimeout:0,overswipeRatio:1.2}},create(){a(this,{swipeout:r})},clicks:{".swipeout-open":function(e,t){void 0===t&&(t={});this.swipeout.open(t.swipeout,t.side)},".swipeout-close":function(e){const t=e.closest(".swipeout");0!==t.length&&this.swipeout.close(t)},".swipeout-delete":function(e,t){void 0===t&&(t={});const s=this,o=e.closest(".swipeout");if(0===o.length)return;const{confirm:i,confirmTitle:n}=t;t.confirm?s.dialog.confirm(i,n,(()=>{s.swipeout.delete(o)})):s.swipeout.delete(o)}},on:{init(){this.params.swipeout&&this.swipeout.init()}}};if(t){if(e.prototype.modules&&e.prototype.modules[p.name])return;e.use(p),e.instance&&(e.instance.useModuleParams(p,e.instance.params),e.instance.useModule(p))}return p}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
|