diff --git a/packages/Webkul/Admin/publishable/assets/css/admin.css b/packages/Webkul/Admin/publishable/assets/css/admin.css index d4b2be071..8f7f3bc94 100755 --- a/packages/Webkul/Admin/publishable/assets/css/admin.css +++ b/packages/Webkul/Admin/publishable/assets/css/admin.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);body{margin:0;color:#3a3a3a;font-family:Montserrat,sans-serif;font-size:14px;font-weight:500;position:static;min-height:100%}.navbar-top{height:60px;background:#fff;font-size:0;-webkit-box-shadow:0 3px 6px 0 rgba(0,0,0,.05);box-shadow:0 3px 6px 0 rgba(0,0,0,.05);border-bottom:1px solid hsla(0,0%,64%,.2);position:fixed;left:0;right:0;z-index:5}.navbar-top .navbar-top-left{width:50%;height:60px;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-left .brand-logo{padding:10px}.navbar-top .navbar-top-right{width:50%;height:60px;text-align:right;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-right .profile-info{display:inline-block;vertical-align:middle;text-align:left;min-width:50px;padding:12px 0;margin:0 25px 0 30px;font-size:15px;cursor:pointer;position:relative}.navbar-top .navbar-top-right .profile-info .dropdown-list{top:63px}.navbar-top .navbar-top-right .profile-info .name{color:#000311;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info .role{font-size:14px;color:#8e8e8e;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info i.icon{margin-left:10px}.navbar-left{position:absolute;top:60px;bottom:0;width:90px;padding-top:20px;height:auto;border-right:1px solid hsla(0,0%,64%,.2);z-index:2}.navbar-left ul.menubar li.menu-item{height:90px;padding:10px 5px;font-size:11px;text-align:center;text-transform:uppercase}.navbar-left ul.menubar li.menu-item a{color:#a2a2a2}.navbar-left ul.menubar li.menu-item.active a{color:#0041ff}.content-container{padding-left:90px;position:absolute;margin-top:60px;top:0;right:0;left:0;bottom:0;overflow-x:hidden;overflow-y:auto}.content-container .aside-nav{width:280px;position:fixed;top:60px;bottom:0;border-right:1px solid hsla(0,0%,64%,.2);background:#f8f9fa;padding-top:10px;overflow-y:auto;z-index:4}.content-container .aside-nav a{padding:15px;display:block;color:#000311}.content-container .aside-nav .active a{background:#fff;border-top:1px solid hsla(0,0%,64%,.2);border-bottom:1px solid hsla(0,0%,64%,.2)}.content-container .aside-nav .active i{float:right}.content-container .content-wrapper{padding:25px 25px 25px 305px}.content-container .content{padding:25px 0}.content-container .content.full-page{padding:25px}.content-container .content .page-header{display:inline-block;margin-bottom:20px;width:100%}.content-container .content .page-header .page-title{float:left}.content-container .content .page-header .page-title h1{margin-bottom:0;vertical-align:middle;display:inline-block}.content-container .content .page-header .page-action{float:right}.content-container .content .page-header .page-action *{display:inline-block}.content-container .content .page-header .page-action a{margin-left:25px}.content-container .content .page-header .control-group{width:180px;display:inline-block;margin-bottom:0;margin-left:20px}.content-container .content .page-header .control{width:100%;margin:0}.content-container .content .page-content{width:100%;display:inline-block}.control-group label{width:70%}.control-group label .locale{float:right;color:#8e8e8e}.control-group .mce-tinymce{margin-top:10px;margin-bottom:5px}.dashboard .page-header{margin-bottom:0!important;padding-bottom:15px;border-bottom:1px solid hsla(0,0%,64%,.2)}.dashboard .page-content{margin-top:15px}.dashboard .card{height:445px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:2px;padding:20px 0 0 20px}.dashboard .card .card-title{font-size:14px;color:#a2a2a2;letter-spacing:-.26px;text-transform:uppercase}.dashboard .card .card-info{width:100%;height:100%;display:inline-block}.dashboard .card .card-info.center{text-align:center}.dashboard .card .card-info ul li{border-bottom:1px solid hsla(0,0%,64%,.2);width:100%;display:inline-block;padding:10px 0;position:relative}.dashboard .card .card-info ul li .image{height:60px;width:60px;float:left;margin-right:15px}.dashboard .card .card-info ul li .image.product{background:#f2f2f2}.dashboard .card .card-info ul li .image img{width:100%}.dashboard .card .card-info ul li .description{margin-top:10px}.dashboard .card .card-info ul li .description .name{color:#0041ff}.dashboard .card .card-info ul li .description .info{color:#3a3a3a;margin-top:5px}.dashboard .card .card-info ul li .icon.angle-right-icon{position:absolute;right:30px;top:50%;margin-top:-8px}.dashboard .card .card-info ul li:last-child{border-bottom:0}.dashboard .card .card-info .no-result-found{margin-top:146px}.dashboard .card .card-info .no-result-found p{margin:0;color:#a2a2a2}.dashboard .dashboard-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px}.dashboard .dashboard-stats .dashboard-card{height:100px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:5px;position:relative;padding:15px}.dashboard .dashboard-stats .dashboard-card .title{font-size:14px;color:#a2a2a2;text-transform:uppercase}.dashboard .dashboard-stats .dashboard-card .data{padding-top:3px;font-size:32px;color:#0041ff}.dashboard .dashboard-stats .dashboard-card .data .progress{font-size:14px;color:#8e8e8e;float:right;margin-top:9px}.dashboard .dashboard-stats .dashboard-card .data .progress .icon{vertical-align:middle}.dashboard .graph-stats{margin-top:30px;width:100%;display:inline-block}.dashboard .graph-stats .left-card-container{float:left;width:75%;padding-right:9px}.dashboard .graph-stats .right-card-container{float:left;width:25%;padding-left:21px}.dashboard .sale-stock{width:100%;display:inline-block;display:grid;grid-template-columns:repeat(auto-fill,minmax(435px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;margin-top:30px}.sale-container .sale-section{font-size:16px}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid hsla(0,0%,64%,.2)}.sale-container .sale-section .section-content{display:block;padding:20px 0}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .table .qty-row{display:block;margin-bottom:5px}.sale-container .table .qty-row:last-child{margin-bottom:0}.sale-container .table .radio{margin:0}.sale-container .sale-summary{margin-top:2%;height:130px;float:right}.sale-container .sale-summary tr td{padding:5px 8px}.sale-container .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .sale-summary tr.border td{border-bottom:1px solid hsla(0,0%,64%,.2)}.stars{margin-top:5px}.stars .icon{width:16px;height:16px}.export{cursor:pointer}.export .export-icon{position:relative;top:10px}.export span{margin-left:2px}.rtl{direction:rtl}.rtl .navbar-top .navbar-top-right{text-align:left}.rtl .navbar-top .navbar-top-right .profile-info{margin:0 30px 0 25px}.rtl .navbar-top .navbar-top-right .profile-info i.icon{margin-left:0;margin-right:10px}.rtl .navbar-left{border-left:1px solid hsla(0,0%,64%,.2);border-right:none}.rtl .content-container{padding-right:90px;padding-left:0}.rtl .content-container .content .page-header .page-title{float:right}.rtl .content-container .content .page-header .page-action{float:left}.rtl .content-container .content .page-header .control-group{margin-right:20px;margin-left:0}.rtl .content-container .content .page-header .control-group.date:after{margin-top:6px;position:absolute;margin-right:-35px}.rtl .content-container .content .page-header .control-group.date:last-child{margin-left:0}.rtl .content-container .content-wrapper{padding:25px 305px 25px 25px}.rtl .content-container .aside-nav .active i{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .dashboard-stats .dashboard-card .data span{float:left}.rtl .dashboard .card{padding:20px 20px 0 0}.rtl .dashboard .card .card-info ul li .image{float:right;margin-right:0;margin-left:15px}.rtl .dashboard .card .card-info ul li .icon.angle-right-icon{left:30px;right:auto;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .graph-stats .left-card-container{float:right;padding-right:0}.rtl .dashboard .graph-stats .right-card-container{float:right;padding-left:0;padding-right:30px}.rtl .sale-container .sale-summary{float:left}.rtl .grid-container .filter-wrapper .filter-row-one .search-filter{border:2px solid #c7c7c7}.rtl .grid-container .filter-wrapper .filter-row-one .search-filter .control{border:none;padding-right:10px}.rtl .grid-container .filter-wrapper .filter-row-one .search-filter .ic-wrapper{border:none;padding-top:2px;padding-right:5px}.rtl .grid-container .filter-wrapper .filter-row-two .filter-one{margin-right:0}.rtl .grid-container .filter-wrapper .filter-row-two .filter-one .filter-name{margin-right:0;margin-left:5px}.rtl .grid-container .filter-wrapper .filter-row-two .filter-one .filter-value{padding-right:5px;padding-left:0}.rtl .grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header span{padding-right:5px}.rtl .grid-container .table tbody td.action a:first-child{margin-left:10px;margin-right:0}.rtl .table table{text-align:right}.rtl .dropdown-list.bottom-right{left:0;right:auto}.rtl .dropdown-list .dropdown-container{text-align:right}.rtl .accordian .accordian-header .icon{float:left}.rtl .tree-container .tree-item{padding-right:30px}.rtl .tree-container .tree-item .expand-icon,.rtl .tree-container .tree-item .folder-icon{margin-left:10px;margin-right:0}.rtl .tree-container>.tree-item{padding-right:0}.rtl .radio .radio-view{margin-left:5px}.rtl .image-wrapper .image-item{margin-right:0;margin-left:20px}.rtl .image-wrapper .image-item .remove-image{margin-right:0}.rtl .control-group label.required:before{content:"*";color:#fc6868;font-weight:700}.rtl .control-group label.required:after{content:none}.rtl .control-group label .locale{float:left}.rtl .control-group.date:after{margin-top:15px;position:absolute;margin-right:-35px}.rtl .pagination .page-item .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);body{margin:0;color:#3a3a3a;font-family:Montserrat,sans-serif;font-size:14px;font-weight:500;position:static;min-height:100%}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px hsla(0,0%,100%,.3);border-radius:10px}::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.navbar-top{height:60px;background:#fff;font-size:0;-webkit-box-shadow:0 3px 6px 0 rgba(0,0,0,.05);box-shadow:0 3px 6px 0 rgba(0,0,0,.05);border-bottom:1px solid hsla(0,0%,64%,.2);position:fixed;left:0;right:0;z-index:5}.navbar-top .navbar-top-left{width:50%;height:60px;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-left .brand-logo{padding:10px}.navbar-top .navbar-top-right{width:50%;height:60px;text-align:right;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-right .profile-info{display:inline-block;vertical-align:middle;text-align:left;min-width:50px;padding:12px 0;margin:0 25px 0 30px;font-size:15px;cursor:pointer;position:relative}.navbar-top .navbar-top-right .profile-info .dropdown-list{top:63px}.navbar-top .navbar-top-right .profile-info .name{color:#000311;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info .role{font-size:14px;color:#8e8e8e;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info i.icon{margin-left:10px}.navbar-left{position:absolute;top:60px;bottom:0;width:90px;padding-top:20px;height:auto;border-right:1px solid hsla(0,0%,64%,.2);z-index:2}.navbar-left ul.menubar li.menu-item{height:90px;padding:10px 5px;font-size:11px;text-align:center;text-transform:uppercase}.navbar-left ul.menubar li.menu-item a{color:#a2a2a2}.navbar-left ul.menubar li.menu-item.active a{color:#0041ff}.content-container{padding-left:90px;position:absolute;margin-top:60px;top:0;right:0;left:0;bottom:0;overflow-x:hidden;overflow-y:auto}.content-container .aside-nav{width:280px;position:fixed;top:60px;bottom:0;border-right:1px solid hsla(0,0%,64%,.2);background:#f8f9fa;padding-top:10px;overflow-y:auto;z-index:4}.content-container .aside-nav a{padding:15px;display:block;color:#000311}.content-container .aside-nav .active a{background:#fff;border-top:1px solid hsla(0,0%,64%,.2);border-bottom:1px solid hsla(0,0%,64%,.2)}.content-container .aside-nav .active i{float:right}.content-container .content-wrapper{padding:25px 25px 25px 305px}.content-container .content{margin-top:25px}.content-container .content.full-page{padding:25px}.content-container .content .page-header{display:inline-block;margin-bottom:20px;width:100%}.content-container .content .page-header .page-title{float:left}.content-container .content .page-header .page-title h1{margin-bottom:0;vertical-align:middle;display:inline-block}.content-container .content .page-header .page-action{float:right}.content-container .content .page-header .page-action *{display:inline-block}.content-container .content .page-header .page-action a{margin-left:25px}.content-container .content .page-header .control-group{width:180px;display:inline-block;margin-bottom:0;margin-left:20px}.content-container .content .page-header .control{width:100%;margin:0}.content-container .content .page-content{width:100%;display:inline-block}.control-group label{width:70%}.control-group label .locale{float:right;color:#8e8e8e}.control-group .mce-tinymce{margin-top:10px;margin-bottom:5px}.dashboard .page-header{margin-bottom:0!important;padding-bottom:15px;border-bottom:1px solid hsla(0,0%,64%,.2)}.dashboard .page-content{margin-top:15px}.dashboard .card{height:445px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:2px;padding:20px 0 0 20px}.dashboard .card .card-title{font-size:14px;color:#a2a2a2;letter-spacing:-.26px;text-transform:uppercase}.dashboard .card .card-info{width:100%;height:100%;display:inline-block}.dashboard .card .card-info.center{text-align:center}.dashboard .card .card-info ul li{border-bottom:1px solid hsla(0,0%,64%,.2);width:100%;display:inline-block;padding:10px 0;position:relative}.dashboard .card .card-info ul li .image{height:60px;width:60px;float:left;margin-right:15px}.dashboard .card .card-info ul li .image.product{background:#f2f2f2}.dashboard .card .card-info ul li .image img{width:100%}.dashboard .card .card-info ul li .description{margin-top:10px}.dashboard .card .card-info ul li .description .name{color:#0041ff}.dashboard .card .card-info ul li .description .info{color:#3a3a3a;margin-top:5px}.dashboard .card .card-info ul li .icon.angle-right-icon{position:absolute;right:30px;top:50%;margin-top:-8px}.dashboard .card .card-info ul li:last-child{border-bottom:0}.dashboard .card .card-info .no-result-found{margin-top:146px}.dashboard .card .card-info .no-result-found p{margin:0;color:#a2a2a2}.dashboard .dashboard-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px}.dashboard .dashboard-stats .dashboard-card{height:100px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:5px;position:relative;padding:15px}.dashboard .dashboard-stats .dashboard-card .title{font-size:14px;color:#a2a2a2;text-transform:uppercase}.dashboard .dashboard-stats .dashboard-card .data{padding-top:3px;font-size:32px;color:#0041ff}.dashboard .dashboard-stats .dashboard-card .data .progress{font-size:14px;color:#8e8e8e;float:right;margin-top:9px}.dashboard .dashboard-stats .dashboard-card .data .progress .icon{vertical-align:middle}.dashboard .graph-stats{margin-top:30px;width:100%;display:inline-block}.dashboard .graph-stats .left-card-container{float:left;width:75%;padding-right:9px}.dashboard .graph-stats .right-card-container{float:left;width:25%;padding-left:21px}.dashboard .sale-stock{width:100%;display:inline-block;display:grid;grid-template-columns:repeat(auto-fill,minmax(435px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;margin-top:30px}.sale-container .sale-section{font-size:16px}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid hsla(0,0%,64%,.2)}.sale-container .sale-section .section-content{display:block;padding:20px 0}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .table .qty-row{display:block;margin-bottom:5px}.sale-container .table .qty-row:last-child{margin-bottom:0}.sale-container .table .radio{margin:0}.sale-container .sale-summary{margin-top:2%;height:130px;float:right}.sale-container .sale-summary tr td{padding:5px 8px}.sale-container .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .sale-summary tr.border td{border-bottom:1px solid hsla(0,0%,64%,.2)}.stars{margin-top:5px}.stars .icon{width:16px;height:16px}.export{cursor:pointer}.export .export-icon{position:relative;top:10px}.export span{margin-left:2px}.rtl{direction:rtl}.rtl .navbar-top .navbar-top-right{text-align:left}.rtl .navbar-top .navbar-top-right .profile-info{margin:0 30px 0 25px}.rtl .navbar-top .navbar-top-right .profile-info i.icon{margin-left:0;margin-right:10px}.rtl .navbar-left{border-left:1px solid hsla(0,0%,64%,.2);border-right:none}.rtl .content-container{padding-right:90px;padding-left:0}.rtl .content-container .content .page-header .page-title{float:right}.rtl .content-container .content .page-header .page-action{float:left}.rtl .content-container .content .page-header .control-group{margin-right:20px;margin-left:0}.rtl .content-container .content .page-header .control-group.date:after{margin-top:6px;position:absolute;margin-right:-35px}.rtl .content-container .content .page-header .control-group.date:last-child{margin-left:0}.rtl .content-container .content-wrapper{padding:25px 305px 25px 25px}.rtl .content-container .aside-nav .active i{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .dashboard-stats .dashboard-card .data span{float:left}.rtl .dashboard .card{padding:20px 20px 0 0}.rtl .dashboard .card .card-info ul li .image{float:right;margin-right:0;margin-left:15px}.rtl .dashboard .card .card-info ul li .icon.angle-right-icon{left:30px;right:auto;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .graph-stats .left-card-container{float:right;padding-right:0}.rtl .dashboard .graph-stats .right-card-container{float:right;padding-left:0;padding-right:30px}.rtl .sale-container .sale-summary{float:left}.rtl .grid-container .filter-wrapper .filter-row-one .search-filter{border:2px solid #c7c7c7}.rtl .grid-container .filter-wrapper .filter-row-one .search-filter .control{border:none;padding-right:10px}.rtl .grid-container .filter-wrapper .filter-row-one .search-filter .ic-wrapper{border:none;padding-top:2px;padding-right:5px}.rtl .grid-container .filter-wrapper .filter-row-two .filter-one{margin-right:0}.rtl .grid-container .filter-wrapper .filter-row-two .filter-one .filter-name{margin-right:0;margin-left:5px}.rtl .grid-container .filter-wrapper .filter-row-two .filter-one .filter-value{padding-right:5px;padding-left:0}.rtl .grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header span{padding-right:5px}.rtl .grid-container .table tbody td.action a:first-child{margin-left:10px;margin-right:0}.rtl .table table{text-align:right}.rtl .dropdown-list.bottom-right{left:0;right:auto}.rtl .dropdown-list .dropdown-container{text-align:right}.rtl .accordian .accordian-header .icon{float:left}.rtl .tree-container .tree-item{padding-right:30px}.rtl .tree-container .tree-item .expand-icon,.rtl .tree-container .tree-item .folder-icon{margin-left:10px;margin-right:0}.rtl .tree-container>.tree-item{padding-right:0}.rtl .radio .radio-view{margin-left:5px}.rtl .image-wrapper .image-item{margin-right:0;margin-left:20px}.rtl .image-wrapper .image-item .remove-image{margin-right:0}.rtl .control-group label.required:before{content:"*";color:#fc6868;font-weight:700}.rtl .control-group label.required:after{content:none}.rtl .control-group label .locale{float:left}.rtl .control-group.date:after{margin-top:15px;position:absolute;margin-right:-35px}.rtl .pagination .page-item .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)} \ No newline at end of file diff --git a/packages/Webkul/Admin/publishable/assets/mix-manifest.json b/packages/Webkul/Admin/publishable/assets/mix-manifest.json index 0161eb3be..55e257eec 100755 --- a/packages/Webkul/Admin/publishable/assets/mix-manifest.json +++ b/packages/Webkul/Admin/publishable/assets/mix-manifest.json @@ -1,4 +1,4 @@ { "/js/admin.js": "/js/admin.js?id=c70dacdf945a32e04b77", - "/css/admin.css": "/css/admin.css?id=d40a640933cbcc121f1d" + "/css/admin.css": "/css/admin.css?id=3e790c2215bf5c60ac21" } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/Controllers/Sales/ShipmentController.php b/packages/Webkul/Admin/src/Http/Controllers/Sales/ShipmentController.php index d40c1e84f..16458d749 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/Sales/ShipmentController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Sales/ShipmentController.php @@ -159,6 +159,7 @@ class ShipmentController extends Controller $inventory = $product->inventories() ->where('inventory_source_id', $data['shipment']['source']) + ->where('vendor_id', 0) ->first(); if ($orderItem->qty_to_ship < $qty || $inventory->qty < $qty) { diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/inventories.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/inventories.blade.php index dc6085033..54fe2ee16 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/inventories.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/inventories.blade.php @@ -7,7 +7,7 @@ $qty = 0; foreach ($product->inventories as $inventory) { - if($inventory->inventory_source_id == $inventorySource->id) { + if($inventory->inventory_source_id == $inventorySource->id && !$inventory->vendor_id) { $qty = $inventory->qty; break; } diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/variations.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/variations.blade.php index cec769bf8..1348da23b 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/variations.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/variations.blade.php @@ -325,7 +325,7 @@ sourceInventoryQty (inventorySourceId) { var inventories = this.variant.inventories.filter(function(inventory) { - return inventorySourceId === inventory.inventory_source_id; + return inventorySourceId === inventory.inventory_source_id && !inventory.vendor_id; }) if(inventories.length) diff --git a/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php b/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php index eae212a51..20a86bc6e 100755 --- a/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php @@ -306,6 +306,19 @@ } ?> + type == 'configurable' ? $item->child->product : $item->product; + + foreach ($product->inventories as $inventory) { + if($inventory->inventory_source_id == $inventorySource->id && !$inventory->vendor_id) { + $sourceQty = $inventory->qty; + break; + } + } + ?> + {{ $sourceQty }} diff --git a/packages/Webkul/Admin/webpack.mix.js b/packages/Webkul/Admin/webpack.mix.js index 3f72c18c8..92e3d593b 100755 --- a/packages/Webkul/Admin/webpack.mix.js +++ b/packages/Webkul/Admin/webpack.mix.js @@ -1,8 +1,8 @@ const { mix } = require("laravel-mix"); require("laravel-mix-merge-manifest"); -// var publicPath = 'publishable/assets'; -var publicPath = "../../../public/vendor/webkul/admin/assets"; +var publicPath = 'publishable/assets'; +// var publicPath = "../../../public/vendor/webkul/admin/assets"; mix.setPublicPath(publicPath).mergeManifest(); mix.disableNotifications(); diff --git a/packages/Webkul/Product/src/Database/Migrations/2019_01_11_122452_add_vendor_id_column_in_product_inventories_table.php b/packages/Webkul/Product/src/Database/Migrations/2019_01_11_122452_add_vendor_id_column_in_product_inventories_table.php new file mode 100644 index 000000000..9fffb5e3c --- /dev/null +++ b/packages/Webkul/Product/src/Database/Migrations/2019_01_11_122452_add_vendor_id_column_in_product_inventories_table.php @@ -0,0 +1,33 @@ +integer('vendor_id')->default(0); + $table->unique(['product_id', 'inventory_source_id', 'vendor_id'], 'product_source_vendor_index_unique'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('product_inventories', function (Blueprint $table) { + // + }); + } +} diff --git a/packages/Webkul/Product/src/Models/Product.php b/packages/Webkul/Product/src/Models/Product.php index 71d92be7f..a757122fe 100755 --- a/packages/Webkul/Product/src/Models/Product.php +++ b/packages/Webkul/Product/src/Models/Product.php @@ -163,10 +163,10 @@ class Product extends Model * * @return bool */ - public function inventory_source_qty($inventorySource) + public function inventory_source_qty($inventorySourceId) { return $this->inventories() - ->where('inventory_source_id', $inventorySource->id) + ->where('inventory_source_id', $inventorySourceId) ->sum('qty'); } diff --git a/packages/Webkul/Product/src/Models/ProductInventory.php b/packages/Webkul/Product/src/Models/ProductInventory.php index f76ba89a5..91eb56c21 100755 --- a/packages/Webkul/Product/src/Models/ProductInventory.php +++ b/packages/Webkul/Product/src/Models/ProductInventory.php @@ -9,7 +9,7 @@ class ProductInventory extends Model { public $timestamps = false; - protected $fillable = ['qty', 'product_id', 'inventory_source_id']; + protected $fillable = ['qty', 'product_id', 'inventory_source_id', 'vendor_id']; /** * Get the product attribute family that owns the product. diff --git a/packages/Webkul/Product/src/Repositories/ProductInventoryRepository.php b/packages/Webkul/Product/src/Repositories/ProductInventoryRepository.php index 8e70a1cf5..ff2cd6ece 100755 --- a/packages/Webkul/Product/src/Repositories/ProductInventoryRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductInventoryRepository.php @@ -33,36 +33,32 @@ class ProductInventoryRepository extends Repository if ($product->type == 'configurable') return; - $inventorySourceIds = $product->inventory_sources->pluck('id'); - if(isset($data['inventories'])) { foreach($data['inventories'] as $inventorySourceId => $qty) { - if(is_null($qty)) - continue; - + if(is_null($qty)) { + $qty = 0; + } + $productInventory = $this->findOneWhere([ 'product_id' => $product->id, 'inventory_source_id' => $inventorySourceId, + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 ]); - + + if($productInventory) { - if(is_numeric($index = $inventorySourceIds->search($inventorySourceId))) { - $inventorySourceIds->forget($index); - } + $productInventory->qty = $qty; - $this->update(['qty' => $qty], $productInventory->id); + $productInventory->save(); } else { $this->create([ 'qty' => $qty, 'product_id' => $product->id, 'inventory_source_id' => $inventorySourceId, + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 ]); } } } - - if($inventorySourceIds->count()) { - $product->inventory_sources()->detach($inventorySourceIds); - } } } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Repositories/ShipmentItemRepository.php b/packages/Webkul/Sales/src/Repositories/ShipmentItemRepository.php index bbbec550f..7bce82f55 100644 --- a/packages/Webkul/Sales/src/Repositories/ShipmentItemRepository.php +++ b/packages/Webkul/Sales/src/Repositories/ShipmentItemRepository.php @@ -50,6 +50,7 @@ class ShipmentItemRepository extends Repository } $inventory = $data['product']->inventories() + ->where('vendor_id', $data['vendor_id']) ->where('inventory_source_id', $data['shipment']->inventory_source_id) ->first(); diff --git a/packages/Webkul/Sales/src/Repositories/ShipmentRepository.php b/packages/Webkul/Sales/src/Repositories/ShipmentRepository.php index c9ac6fbec..e2bc8813d 100755 --- a/packages/Webkul/Sales/src/Repositories/ShipmentRepository.php +++ b/packages/Webkul/Sales/src/Repositories/ShipmentRepository.php @@ -134,7 +134,8 @@ class ShipmentRepository extends Repository 'shipment' => $shipment, 'shipmentItem' => $shipmentItem, 'product' => $product, - 'qty' => $qty + 'qty' => $qty, + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 ]); $this->orderItem->update(['qty_shipped' => $orderItem->qty_shipped + $qty], $orderItem->id); diff --git a/packages/Webkul/Sales/src/Repositories/ShipmenttemRepository.php b/packages/Webkul/Sales/src/Repositories/ShipmenttemRepository.php deleted file mode 100755 index 2e5428c65..000000000 --- a/packages/Webkul/Sales/src/Repositories/ShipmenttemRepository.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) - */ - -class ShipmentItemRepository extends Repository -{ - /** - * Specify Model class name - * - * @return Mixed - */ - - function model() - { - return 'Webkul\Sales\Contracts\ShipmentItem'; - } -} \ No newline at end of file diff --git a/packages/Webkul/Ui/publishable/assets/css/ui.css b/packages/Webkul/Ui/publishable/assets/css/ui.css index 085e072c4..2df34d31a 100755 --- a/packages/Webkul/Ui/publishable/assets/css/ui.css +++ b/packages/Webkul/Ui/publishable/assets/css/ui.css @@ -1,1597 +1 @@ -.dashboard-icon, .sales-icon, .catalog-icon, .customer-icon, .configuration-icon, .settings-icon, .active.configuration-icon { - width: 48px; - height: 48px; - display: inline-block; - background-size: cover; -} - -.icon { - display: inline-block; - background-size: cover; -} - -.dashboard-icon { - background-image: url("../images/Icon-Dashboard.svg"); -} - -.sales-icon { - background-image: url("../images/Icon-Sales.svg"); -} - -.catalog-icon { - background-image: url("../images/Icon-Catalog.svg"); -} - -.customer-icon { - background-image: url("../images/Icon-Customers.svg"); -} - -.configuration-icon { - background-image: url("../images/Icon-Configure.svg"); -} - -.settings-icon { - background-image: url("../images/Icon-Settings.svg"); -} - -.angle-right-icon { - background-image: url("../images/Angle-Right.svg"); - width: 17px; - height: 17px; -} - -.angle-left-icon { - background-image: url("../images/Angle-Left.svg"); - width: 17px; - height: 17px; -} - -.arrow-down-icon { - background-image: url("../images/Arrow-Down-Light.svg"); - width: 14px; - height: 8px; -} - -.arrow-right-icon { - background-image: url("../images/Arrow-Right.svg"); - width: 18px; - height: 18px; -} - -.white-cross-sm-icon { - background-image: url("../images/Icon-Sm-Cross-White.svg"); - width: 18px; - height: 18px; -} - -.accordian-up-icon { - background-image: url("../images/Accordion-Arrow-Up.svg"); - width: 24px; - height: 24px; -} - -.accordian-down-icon { - background-image: url("../images/Accordion-Arrow-Down.svg"); - width: 24px; - height: 24px; -} - -.cross-icon { - background-image: url("../images/Icon-Crossed.svg"); - width: 18px; - height: 18px; -} - -.trash-icon { - background-image: url("../images/Icon-Trash.svg"); - width: 24px; - height: 24px; -} - -.remove-icon { - background-image: url("../images/Icon-remove.svg"); - width: 24px; - height: 24px; -} - -.pencil-lg-icon { - background-image: url("../images/Icon-Pencil-Large.svg"); - width: 24px; - height: 24px; -} - -.eye-icon { - background-image: url("../images/Icon-eye.svg"); - width: 24px; - height: 24px; -} - -.search-icon { - background-image: url("../images/icon-search.svg"); - width: 24px; - height: 24px; -} - -.sortable-icon { - background-image: url("../images/Icon-Sortable.svg"); - width: 24px; - height: 24px; -} - -.sort-down-icon { - background-image: url("../images/Icon-Sort-Down.svg"); - width: 18px; - height: 18px; -} - -.sort-up-icon { - background-image: url("../images/Icon-Sort-Down.svg"); - width: 18px; - height: 18px; - -webkit-transform: rotate(180deg); - transform: rotate(180deg); -} - -.primary-back-icon { - background-image: url("../images/Icon-Back-Primary.svg"); - width: 24px; - height: 24px; -} - -.checkbox-dash-icon { - background-image: url("../images/Checkbox-Dash.svg"); - width: 24px; - height: 24px; -} - -.account-icon { - background-image: url("../images/icon-account.svg"); - width: 24px; - height: 24px; -} - -.expand-icon { - background-image: url("../images/Expand-Light.svg"); - width: 18px; - height: 18px; -} - -.expand-on-icon { - background-image: url("../images/Expand-Light-On.svg"); - width: 18px; - height: 18px; -} - -.dark-left-icon { - background-image: url("../images/arrow-left-dark.svg"); - width: 18px; - height: 18px; -} - -.light-right-icon { - background-image: url("../images/arrow-right-light.svg"); - width: 18px; - height: 18px; -} - -.folder-icon { - background-image: url("../images/Folder-Icon.svg"); - width: 24px; - height: 24px; -} - -.star-icon { - background-image: url("../images/Star-Icon.svg"); - width: 24px; - height: 24px; -} - -.arrow-down-white-icon { - background-image: url("../images/down-arrow-white.svg"); - width: 17px; - height: 13px; -} - -.arrow-up-white-icon { - background-image: url("../images/up-arrow-white.svg"); - width: 17px; - height: 13px; -} - -.profile-pic-icon { - background-image: url("../images/Profile-Pic.svg"); - width: 60px; - height: 60px; -} - -.graph-up-icon { - background-image: url("../images/Icon-Graph-Green.svg"); - width: 24px; - height: 24px; -} - -.graph-down-icon { - background-image: url("../images/Icon-Graph-Red.svg"); - width: 24px; - height: 24px; -} - -.no-result-icon { - background-image: url("../images/limited-icon.svg"); - width: 52px; - height: 47px; -} - -.active .dashboard-icon { - background-image: url("../images/Icon-Dashboard-Active.svg"); -} - -.active .sales-icon { - background-image: url("../images/Icon-Sales-Active.svg"); -} - -.active .catalog-icon { - background-image: url("../images/Icon-Catalog-Active.svg"); -} - -.active .customer-icon { - background-image: url("../images/Icon-Customers-Active.svg"); -} - -.active .settings-icon { - background-image: url("../images/Icon-Settings-Active.svg"); -} - -.active .configuration-icon { - background-image: url("../images/Icon-Configure-Active.svg"); -} - -.active > .arrow-down-icon { - background-image: url("../images/Arrow-Down.svg"); - width: 14px; - height: 8px; -} - -.active > .expand-icon { - background-image: url("../images/Expand-Light-On.svg"); -} - -.active.dashboard-icon { - background-image: url("../images/Icon-Dashboard-Active.svg"); -} - -.active.customer-icon { - background-image: url("../images/Icon-Customers-Active.svg"); -} - -.active.sales-icon { - background-image: url("../images/Icon-Sales-Active.svg"); -} - -.active.settings-icon { - background-image: url("../images/Icon-Settings-Active.svg"); -} - -.active.configuration-icon { - background-image: url("../images/Icon-Configure-Active.svg"); -} - -.active.arrow-down-icon { - background-image: url("../images/Arrow-Down.svg"); - width: 14px; - height: 8px; -} - -.active.expand-icon { - background-image: url("../images/Expand-Light-On.svg"); -} - -.icon-404 { - background-image: url("../images/404-image.svg"); - width: 255px; - height: 255px; -} - -.export-icon { - background-image: url("../images/Icon-Export.svg"); - width: 32px; - height: 32px; -} - -.star-blue-icon { - width: 17px; - height: 17px; - background-image: url("../images/Icon-star.svg"); -} - -/* Data grid css starts here */ -.grid-container .filter-wrapper { - display: block; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.grid-container .filter-wrapper .filter-row-one, -.grid-container .filter-wrapper .filter-row-two { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; -} - -.grid-container .filter-wrapper .filter-row-one { - height: 40px; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; -} - -.grid-container .filter-wrapper .filter-row-one .search-filter .control { - font-family: "montserrat", sans-serif; - padding-left: 10px; - width: 380px; - height: 36px; - border: 2px solid #C7C7C7; - border-radius: 3px; - border-right: 0px; - border-top-right-radius: 0px; - border-bottom-right-radius: 0px; - font-size: 14px; -} - -.grid-container .filter-wrapper .filter-row-one .search-filter .ic-wrapper { - display: block; - height: 36px; - width: 36px; - border: 2px solid #C7C7C7; - border-left: none; - border-radius: 2px; -} - -.grid-container .filter-wrapper .filter-row-one .search-filter .ic-wrapper .search-icon { - margin-left: 4px; - margin-top: 4px; - height: 24px; - width: 24px; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters { - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - font-family: "montserrat", sans-serif; - padding-left: 5px; - height: 36px; - width: 150px; - border: 2px solid #C7C7C7; - border-radius: 2px; - background-color: #ffffff; - color: #8e8e8e; - font-size: 14px; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header { - width: 100%; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header .arrow-down-icon { - margin-right: 5px; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul li.filter-column-dropdown .filter-column-select { - width: 100%; - background: #ffffff; - border: 2px solid #C7C7C7; - border-radius: 3px; - height: 36px; - display: inline-block; - vertical-align: middle; - -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - padding: 0px 5px; - font-family: "montserrat", sans-serif; - margin-top: 10px; - margin-bottom: 5px; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul li select { - background: #ffffff; - border: 2px solid #C7C7C7; - border-radius: 3px; - height: 36px; - width: 100%; - display: inline-block; - vertical-align: middle; - -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - padding: 0px 5px; - font-family: "montserrat", sans-serif; - margin-top: 10px; - margin-bottom: 5px; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul li input { - background: #fff; - border: 2px solid #c7c7c7; - border-radius: 3px; - height: 36px; - width: 100%; - display: inline-block; - vertical-align: middle; - -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - padding: 0px 5px; - font-family: "montserrat", sans-serif; - margin-top: 10px; - margin-bottom: 5px; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul .filter-condition-dropdown-string { - display: none; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul .filter-condition-dropdown-number { - display: none; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul .filter-condition-dropdown-datetime { - display: none; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul .filter-condition-dropdown-boolean { - display: none; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul .filter-response-string { - display: none; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul .filter-response-boolean { - display: none; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul .filter-response-datetime { - display: none; -} - -.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-list .dropdown-container ul .filter-response-number { - display: none; -} - -.grid-container .filter-wrapper .filter-row-two { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-top: 6px; - margin-bottom: 6px; -} - -.grid-container .filter-wrapper .filter-row-two .filter-one { - margin-right: 10px; -} - -.grid-container .filter-wrapper .filter-row-two .filter-one .filter-name { - margin-right: 5px; -} - -.grid-container .filter-wrapper .filter-row-two .filter-one .filter-value { - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - background: #e7e7e7; - padding-left: 5px; - color: #000311; - vertical-align: middle; -} - -.grid-container .filter-wrapper .filter-row-two .filter-one .filter-value .f-value { - margin: auto; -} - -.grid-container .filter-wrapper .filter-row-two .filter-one .filter-value .cross-icon { - margin: 5px; - height: 18px !important; - width: 18px !important; - cursor: pointer; -} - -.grid-container .table thead .mass-action-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-pack: start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.grid-container .table thead .mass-action-wrapper .massaction-remove { - margin-top: 4px; - margin-right: 10px; -} - -.grid-container .table thead .mass-action-wrapper .selected-items { - margin-right: 15px; -} - -.grid-container .table thead tr th.grid_head .sort-down-icon, .grid-container .table thead tr th.grid_head .sort-up-icon { - margin-left: 5px; - margin-top: -3px; - vertical-align: middle; -} - -.grid-container .table thead tr th.grid_head.sortable { - cursor: pointer; -} - -.grid-container .table thead tr th { - text-transform: capitalize; -} - -.grid-container .table tbody td.action a:first-child { - margin-right: 10px; -} - -.grid-container .table .pagination { - margin-top: 20px; -} - -/* DataGrid css ends in here */ -@-webkit-keyframes jelly { - 0% { - -webkit-transform: translateY(0px) scale(0.7); - transform: translateY(0px) scale(0.7); - opacity: 0; - } - 70% { - -webkit-transform: translateY(5px) scale(1.05); - transform: translateY(5px) scale(1.05); - opacity: 1; - } - 100% { - -webkit-transform: translateY(0px) scale(1); - transform: translateY(0px) scale(1); - opacity: 1; - } -} -@keyframes jelly { - 0% { - -webkit-transform: translateY(0px) scale(0.7); - transform: translateY(0px) scale(0.7); - opacity: 0; - } - 70% { - -webkit-transform: translateY(5px) scale(1.05); - transform: translateY(5px) scale(1.05); - opacity: 1; - } - 100% { - -webkit-transform: translateY(0px) scale(1); - transform: translateY(0px) scale(1); - opacity: 1; - } -} - -@-webkit-keyframes jelly-out { - 0% { - -webkit-transform: translateY(0px) scale(1); - transform: translateY(0px) scale(1); - opacity: 1; - } - 30% { - -webkit-transform: translateY(-5px) scale(1.05); - transform: translateY(-5px) scale(1.05); - opacity: 1; - } - 100% { - -webkit-transform: translateY(0px) scale(0.7); - transform: translateY(0px) scale(0.7); - opacity: 0; - } -} - -@keyframes jelly-out { - 0% { - -webkit-transform: translateY(0px) scale(1); - transform: translateY(0px) scale(1); - opacity: 1; - } - 30% { - -webkit-transform: translateY(-5px) scale(1.05); - transform: translateY(-5px) scale(1.05); - opacity: 1; - } - 100% { - -webkit-transform: translateY(0px) scale(0.7); - transform: translateY(0px) scale(0.7); - opacity: 0; - } -} - -* { - -webkit-box-sizing: border-box; - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -*:focus { - outline: none; -} - -a:link, -a:hover, -a:visited, -a:focus, -a:active { - text-decoration: none; - color: #0041FF; -} - -textarea { - resize: none; -} - -ul { - margin: 0; - padding: 0; - list-style: none; -} - -h1 { - font-size: 28px; - color: #3a3a3a; - margin-top: 0; -} - -h2 { - font-size: 18px; - color: #3a3a3a; -} - -.tooltip { - position: relative; - border-bottom: 1px solid black; -} - -.tooltip .tooltiptext { - visibility: hidden; - width: 120px; - background-color: black; - color: #fff; - text-align: center; - border-radius: 6px; - padding: 5px 0; - /* Position the tooltip */ - position: absolute; - z-index: 1; -} - -.tooltip:hover .tooltiptext { - visibility: visible; -} - -.hide { - display: none !important; -} - -.btn { - -webkit-box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 8px 0 rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 8px 0 rgba(0, 0, 0, 0.1); - border-radius: 3px; - border: none; - color: #fff; - cursor: pointer; - -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - font: inherit; - display: inline-block; -} - -.btn:hover, .btn:active, .btn:focus { - opacity: 0.75; - border: none; -} - -.btn.btn-sm { - padding: 6px 12px; -} - -.btn.btn-md { - padding: 8px 16px; -} - -.btn.btn-lg { - padding: 10px 20px; -} - -.btn.btn-xl { - padding: 12px 24px; - font-size: 16px; -} - -.btn.btn-primary { - background: #0041FF; - color: #ffffff; -} - -.btn.btn-black { - background: #000; - color: #ffffff; -} - -.btn:disabled, .btn[disabled="disabled"], .btn[disabled="disabled"]:hover, .btn[disabled="disabled"]:active { - cursor: not-allowed; - background: #b1b1ae; - -webkit-box-shadow: none; - box-shadow: none; - opacity: 1; -} - -.dropdown-open { - position: relative; -} - -.dropdown-list { - width: 200px; - margin-bottom: 20px; - -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16), 0 0 9px 0 rgba(0, 0, 0, 0.16); - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16), 0 0 9px 0 rgba(0, 0, 0, 0.16); - border-radius: 3px; - background-color: #ffffff; - position: absolute; - display: none; - z-index: 10; - text-align: left; -} - -.dropdown-list.bottom-left { - top: 42px; - left: 0px; -} - -.dropdown-list.bottom-right { - top: 42px; - right: 0px; -} - -.dropdown-list.top-left { - bottom: 42px; - left: 0px; -} - -.dropdown-list.top-right { - bottom: 42px; - right: 0px; -} - -.dropdown-list .search-box { - padding: 20px; - border-bottom: 1px solid rgba(162, 162, 162, 0.2); -} - -.dropdown-list .search-box .control { - background: #fff; - border: 2px solid #C7C7C7; - border-radius: 3px; - width: 100%; - height: 36px; - display: inline-block; - vertical-align: middle; - -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - padding: 0px 10px; - font-size: 15px; -} - -.dropdown-list .search-box .control:focus { - border-color: #0041FF; -} - -.dropdown-list .dropdown-container { - padding: 20px; - overflow-y: auto; - max-height: 280px; -} - -.dropdown-list .dropdown-container label { - font-size: 15px; - display: inline-block; - text-transform: uppercase; - color: #9e9e9e; - font-weight: 700; - padding-bottom: 5px; -} - -.dropdown-list .dropdown-container ul { - margin: 0px; - list-style-type: none; - padding: 0px; -} - -.dropdown-list .dropdown-container ul li { - padding: 5px 0px; -} - -.dropdown-list .dropdown-container ul li a:link, -.dropdown-list .dropdown-container ul li a:active, -.dropdown-list .dropdown-container ul li a:visited, -.dropdown-list .dropdown-container ul li a:focus { - color: #333333; - display: block; -} - -.dropdown-list .dropdown-container ul li a:hover { - color: #0041FF; -} - -.dropdown-list .dropdown-container ul li .checkbox { - margin: 0; -} - -.dropdown-list .dropdown-container ul li .control-group label { - color: #3a3a3a; - font-size: 15px; - font-weight: 500; - text-transform: capitalize; - width: 100%; -} - -.dropdown-list .dropdown-container .btn { - width: 100%; - margin-top: 10px; -} - -.table { - width: 100%; - overflow-x: auto; -} - -.table table { - width: 100%; - border-collapse: collapse; - text-align: left; -} - -.table table thead th { - font-weight: 700; - padding: 12px 10px; - background: #f8f9fa; - color: #3a3a3a; -} - -.table table tbody td { - padding: 10px; - border-bottom: solid 1px #d3d3d3; - color: #3a3a3a; - vertical-align: top; -} - -.table table tbody td.actions { - text-align: right; -} - -.table table tbody td.actions .icon { - cursor: pointer; - vertical-align: middle; -} - -.table table tbody td.empty { - text-align: center; -} - -.table table tbody tr:last-child td { - border-bottom: none; -} - -.table .control-group { - width: 100%; - margin-bottom: 0; -} - -.table .control-group .control { - width: 100%; - margin: 0; -} - -.dropdown-btn { - min-width: 150px; - text-align: left; - background: #ffffff; - border: 2px solid #C7C7C7; - border-radius: 3px; - font-size: 14px; - padding: 8px 35px 8px 10px; - cursor: pointer; - position: relative; -} - -.dropdown-btn:hover, .dropdown-btn:active, .dropdown-btn:focus { - opacity: 0.75; - border: 2px solid #C7C7C7; -} - -.dropdown-btn .icon { - position: absolute; - right: 10px; - top: 50%; - margin-top: -4px; -} - -.pagination .page-item { - background: #ffffff; - border: 2px solid #C7C7C7; - border-radius: 3px; - padding: 7px 14px; - margin-right: 5px; - font-size: 16px; - display: inline-block; - color: #8e8e8e; - vertical-align: middle; - text-decoration: none; -} - -.pagination .page-item.previous, .pagination .page-item.next { - padding: 6px 9px; -} - -.pagination .page-item.active { - background: #0041ff; - color: #fff; - border-color: #0041ff; -} - -.pagination .page-item .icon { - vertical-align: middle; - margin-bottom: 3px; -} - -.checkbox { - position: relative; - display: block; -} - -.checkbox input { - left: 0; - opacity: 0; - position: absolute; - top: 0; - height: 24px; - width: 24px; - z-index: 100; -} - -.checkbox .checkbox-view { - background-image: url("../images/Checkbox.svg"); - height: 24px; - width: 24px; - margin: 0; - display: inline-block !important; - vertical-align: middle; - margin-right: 5px; -} - -.checkbox input:checked + .checkbox-view { - background-image: url("../images/Checkbox-Checked.svg"); -} - -.checkbox input:disabled + .checkbox-view { - opacity: 0.5; - cursor: not-allowed; -} - -.radio { - position: relative; - display: block; - margin: 10px 5px 5px 0px; -} - -.radio input { - left: 0; - opacity: 0; - position: absolute; - top: 0; - z-index: 100; -} - -.radio .radio-view { - background-image: url("../images/controls.svg"); - background-position: -21px 0px; - height: 20px; - width: 20px; - margin: 0; - display: inline-block !important; - vertical-align: middle; - margin-right: 5px; -} - -.radio input:checked + .radio-view { - background-position: -21px -21px; -} - -.radio input:disabled + .radio-view { - opacity: 0.5; - cursor: not-allowed; -} - -.control-group { - display: block; - margin-bottom: 25px; - font-size: 15px; - color: #333333; - width: 750px; - max-width: 100%; - position: relative; -} - -.control-group label { - display: block; - color: #3a3a3a; -} - -.control-group label.required::after { - content: "*"; - color: #FC6868; - font-weight: 700; - display: inline-block; -} - -.control-group textarea.control { - height: 100px; - padding: 10px; -} - -.control-group .control { - background: #fff; - border: 2px solid #C7C7C7; - border-radius: 3px; - width: 70%; - height: 36px; - display: inline-block; - vertical-align: middle; - -webkit-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); - padding: 0px 10px; - font-size: 15px; - margin-top: 10px; - margin-bottom: 5px; -} - -.control-group .control:focus { - border-color: #0041FF; -} - -.control-group .control[disabled="disabled"] { - border-color: #d3d3d3; - background-color: #d3d3d3; - cursor: not-allowed; -} - -.control-group .control[multiple] { - height: 100px; -} - -.control-group.date::after, .control-group.datetime::after { - background-image: url("../images/Icon-Calendar.svg"); - width: 24px; - height: 24px; - content: ''; - display: inline-block; - vertical-align: middle; - margin-left: -34px; - margin-top: 2px; - pointer-events: none; -} - -.control-group .control-info { - display: block; - font-style: italic; - color: #6f6f6f; -} - -.control-group .control-error { - display: none; - color: #ff5656; - margin-top: 5px; -} - -.control-group.has-error .control { - border-color: #FC6868; -} - -.control-group.has-error .control-error { - display: block; -} - -.control-group.price .currency-code { - vertical-align: middle; - display: inline-block; -} - -.button-group { - margin-top: 20px; - margin-bottom: 20px; -} - -.alert-wrapper { - width: 300px; - top: 10px; - right: 10px; - position: fixed; - z-index: 6; - text-align: left; -} - -.alert-wrapper .alert { - width: 300px; - padding: 15px; - border-radius: 3px; - display: inline-block; - -webkit-box-shadow: 0px 4px 15.36px 0.64px rgba(0, 0, 0, 0.1), 0px 2px 6px 0px rgba(0, 0, 0, 0.12); - box-shadow: 0px 4px 15.36px 0.64px rgba(0, 0, 0, 0.1), 0px 2px 6px 0px rgba(0, 0, 0, 0.12); - position: relative; - -webkit-animation: jelly 0.5s ease-in-out; - animation: jelly 0.5s ease-in-out; - -webkit-transform-origin: center top; - transform-origin: center top; - z-index: 500; - margin-bottom: 10px; -} - -.alert-wrapper .alert.alert-error { - background: #FC6868; -} - -.alert-wrapper .alert.alert-info { - background: #204d74; -} - -.alert-wrapper .alert.alert-success { - background: #4CAF50; -} - -.alert-wrapper .alert.alert-warning { - background: #FFC107; -} - -.alert-wrapper .alert .icon { - position: absolute; - right: 10px; - top: 10px; - cursor: pointer; -} - -.alert-wrapper .alert p { - color: #ffffff; - margin: 0px; - padding: 0px; - font-size: 15px; -} - -.tabs ul { - border-bottom: solid 1px rgba(162, 162, 162, 0.2); -} - -.tabs ul li { - display: inline-block; -} - -.tabs ul li a { - padding: 15px 20px; - cursor: pointer; - margin: 0px 2px; - text-align: center; - color: #000311; - display: block; -} - -.tabs ul li.active a { - border-bottom: 3px solid #0041FF; -} - -.accordian, accordian { - display: inline-block; - width: 100%; -} - -.accordian .accordian-header, .accordian div[slot*="header"], accordian .accordian-header, accordian div[slot*="header"] { - width: 100%; - display: inline-block; - font-size: 18px; - color: #3a3a3a; - border-bottom: solid 1px rgba(162, 162, 162, 0.2); - padding: 20px 15px; - cursor: pointer; -} - -.accordian .accordian-header .expand-icon, .accordian div[slot*="header"] .expand-icon, accordian .accordian-header .expand-icon, accordian div[slot*="header"] .expand-icon { - background-image: url("../images/Expand-Light.svg"); - margin-right: 10px; - margin-top: 3px; -} - -.accordian .accordian-header h1, .accordian div[slot*="header"] h1, accordian .accordian-header h1, accordian div[slot*="header"] h1 { - margin: 0; - font-size: 20px; - display: inline-block; -} - -.accordian .accordian-header .icon, .accordian div[slot*="header"] .icon, accordian .accordian-header .icon, accordian div[slot*="header"] .icon { - float: right; -} - -.accordian .accordian-header .icon.left, .accordian div[slot*="header"] .icon.left, accordian .accordian-header .icon.left, accordian div[slot*="header"] .icon.left { - float: left; -} - -.accordian .accordian-content, .accordian div[slot*="body"], accordian .accordian-content, accordian div[slot*="body"] { - width: 100%; - padding: 20px 15px; - display: none; - -webkit-transition: 0.3s ease all; - transition: 0.3s ease all; -} - -.accordian.active > .accordian-content, accordian.active > .accordian-content { - display: inline-block; -} - -.accordian.active > .accordian-header .expand-icon, accordian.active > .accordian-header .expand-icon { - background-image: url("../images/Expand-Light-On.svg"); -} - -.tree-container .tree-item { - padding-left: 30px; - display: inline-block; - margin-top: 10px; - width: 100%; -} - -.tree-container .tree-item > .tree-item { - display: none; -} - -.tree-container .tree-item.active > .tree-item { - display: inline-block; -} - -.tree-container .tree-item .checkbox { - margin: 0; - display: inline-block; -} - -.tree-container .tree-item .radio { - margin: 0; - display: inline-block; -} - -.tree-container .tree-item .expand-icon { - display: inline-block; - margin-right: 10px; - cursor: pointer; - background-image: url("../images/Expand-Light.svg"); - width: 18px; - height: 18px; - vertical-align: middle; -} - -.tree-container .tree-item .folder-icon { - vertical-align: middle; - margin-right: 10px; -} - -.tree-container .tree-item.active > .expand-icon { - background-image: url("../images/Expand-Light-On.svg"); -} - -.tree-container > .tree-item { - padding-left: 0; -} - -.panel { - -webkit-box-shadow: 0 2px 25px 0 rgba(0, 0, 0, 0.15); - box-shadow: 0 2px 25px 0 rgba(0, 0, 0, 0.15); - border-radius: 5px; - background: #fff; -} - -.panel .panel-content { - padding: 20px; -} - -modal { - display: none; -} - -.modal-open { - overflow: hidden; -} - -.modal-overlay { - display: none; - overflow-y: auto; - z-index: 10; - top: 0px; - right: 0px; - bottom: 0px; - left: 0px; - position: fixed; - background: #000; - opacity: 0.75; -} - -.modal-open .modal-overlay { - display: block; -} - -.modal-container { - -webkit-animation: fade-in-white 0.3s ease-in-out; - animation: fade-in-white 0.3s ease-in-out; - z-index: 11; - margin-left: -350px; - width: 600px; - max-width: 80%; - background: #ffffff; - position: fixed; - left: 50%; - top: 100px; - margin-bottom: 100px; - -webkit-box-shadow: 0px 15px 25px 0px rgba(0, 0, 0, 0.03), 0px 20px 45px 5px rgba(0, 0, 0, 0.2); - box-shadow: 0px 15px 25px 0px rgba(0, 0, 0, 0.03), 0px 20px 45px 5px rgba(0, 0, 0, 0.2); - -webkit-animation: jelly 0.5s ease-in-out; - animation: jelly 0.5s ease-in-out; - border-radius: 5px; -} - -.modal-container .modal-header { - padding: 20px; -} - -.modal-container .modal-header h3 { - display: inline-block; - font-size: 20px; - color: #3a3a3a; - margin: 0; -} - -.modal-container .modal-header .icon { - float: right; - cursor: pointer; -} - -.modal-container .modal-body { - padding: 20px; -} - -.modal-container .modal-body .control-group .control { - width: 100%; -} - -.label { - background: #E7E7E7; - border-radius: 2px; - padding: 8px; - color: #000311; - display: inline-block; -} - -.label.label-sm { - padding: 5px; -} - -.label.label-md { - padding: 8px; -} - -.label.label-lg { - padding: 11px; -} - -.label.label-xl { - padding: 14px; -} - -.badge { - border-radius: 50px; - color: white; - padding: 8px; - white-space: nowrap; -} - -.badge.badge-sm { - padding: 5px; -} - -.badge.badge-md { - padding: 3px 10px; -} - -.badge.badge-lg { - padding: 11px; -} - -.badge.badge-xl { - padding: 14px; -} - -.badge.badge-success { - background-color: #4CAF50; -} - -.badge.badge-info { - background-color: #0041FF; -} - -.badge.badge-danger { - background-color: #FC6868; -} - -.badge.badge-warning { - background-color: #FFC107; -} - -.image-wrapper { - margin-bottom: 20px; - margin-top: 10px; - display: inline-block; - width: 100%; -} - -.image-wrapper .image-item { - width: 200px; - height: 200px; - margin-right: 20px; - background: #F8F9FA; - border-radius: 3px; - display: inline-block; - position: relative; - background-image: url("../images/placeholder-icon.svg"); - background-repeat: no-repeat; - background-position: center; - margin-bottom: 20px; -} - -.image-wrapper .image-item img.preview { - width: 100%; - height: 100%; -} - -.image-wrapper .image-item input { - display: none; -} - -.image-wrapper .image-item .remove-image { - background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.08)), to(rgba(0, 0, 0, 0.24))); - background-image: linear-gradient(-180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.24) 100%); - border-radius: 0 0 4px 4px; - position: absolute; - bottom: 0; - width: 100%; - padding: 10px; - text-align: center; - color: #fff; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24); - margin-right: 20px; - cursor: pointer; -} - -.image-wrapper .image-item:hover .remove-image { - display: block; -} - -.image-wrapper .image-item.has-image { - background-image: none; -} - -.cp-spinner { - width: 48px; - height: 48px; - display: inline-block; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.cp-round:before { - border-radius: 50%; - content: " "; - width: 48px; - height: 48px; - display: inline-block; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border-top: solid 6px #bababa; - border-right: solid 6px #bababa; - border-bottom: solid 6px #bababa; - border-left: solid 6px #bababa; - position: absolute; - top: 0; - left: 0; -} - -.cp-round:after { - border-radius: 50%; - content: " "; - width: 48px; - height: 48px; - display: inline-block; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border-top: solid 6px #0041FF; - border-right: solid 6px transparent; - border-bottom: solid 6px transparent; - border-left: solid 6px transparent; - position: absolute; - top: 0; - left: 0; - -webkit-animation: spin 1s ease-in-out infinite; - animation: spin 1s ease-in-out infinite; -} - -@-webkit-keyframes spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} +.active.configuration-icon,.catalog-icon,.configuration-icon,.customer-icon,.dashboard-icon,.sales-icon,.settings-icon{width:48px;height:48px;display:inline-block;background-size:cover}.icon{display:inline-block;background-size:cover}.dashboard-icon{background-image:url("../images/Icon-Dashboard.svg")}.sales-icon{background-image:url("../images/Icon-Sales.svg")}.catalog-icon{background-image:url("../images/Icon-Catalog.svg")}.customer-icon{background-image:url("../images/Icon-Customers.svg")}.configuration-icon{background-image:url("../images/Icon-Configure.svg")}.settings-icon{background-image:url("../images/Icon-Settings.svg")}.angle-right-icon{background-image:url("../images/Angle-Right.svg");width:17px;height:17px}.angle-left-icon{background-image:url("../images/Angle-Left.svg");width:17px;height:17px}.arrow-down-icon{background-image:url("../images/Arrow-Down-Light.svg");width:14px;height:8px}.arrow-right-icon{background-image:url("../images/Arrow-Right.svg");width:18px;height:18px}.white-cross-sm-icon{background-image:url("../images/Icon-Sm-Cross-White.svg");width:18px;height:18px}.accordian-up-icon{background-image:url("../images/Accordion-Arrow-Up.svg");width:24px;height:24px}.accordian-down-icon{background-image:url("../images/Accordion-Arrow-Down.svg");width:24px;height:24px}.cross-icon{background-image:url("../images/Icon-Crossed.svg");width:18px;height:18px}.trash-icon{background-image:url("../images/Icon-Trash.svg");width:24px;height:24px}.remove-icon{background-image:url("../images/Icon-remove.svg");width:24px;height:24px}.pencil-lg-icon{background-image:url("../images/Icon-Pencil-Large.svg");width:24px;height:24px}.eye-icon{background-image:url("../images/Icon-eye.svg");width:24px;height:24px}.search-icon{background-image:url("../images/icon-search.svg");width:24px;height:24px}.sortable-icon{background-image:url("../images/Icon-Sortable.svg");width:24px;height:24px}.sort-down-icon,.sort-up-icon{background-image:url("../images/Icon-Sort-Down.svg");width:18px;height:18px}.sort-up-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.primary-back-icon{background-image:url("../images/Icon-Back-Primary.svg");width:24px;height:24px}.checkbox-dash-icon{background-image:url("../images/Checkbox-Dash.svg");width:24px;height:24px}.account-icon{background-image:url("../images/icon-account.svg");width:24px;height:24px}.expand-icon{background-image:url("../images/Expand-Light.svg");width:18px;height:18px}.expand-on-icon{background-image:url("../images/Expand-Light-On.svg");width:18px;height:18px}.dark-left-icon{background-image:url("../images/arrow-left-dark.svg");width:18px;height:18px}.light-right-icon{background-image:url("../images/arrow-right-light.svg");width:18px;height:18px}.folder-icon{background-image:url("../images/Folder-Icon.svg");width:24px;height:24px}.star-icon{background-image:url("../images/Star-Icon.svg");width:24px;height:24px}.arrow-down-white-icon{background-image:url("../images/down-arrow-white.svg");width:17px;height:13px}.arrow-up-white-icon{background-image:url("../images/up-arrow-white.svg");width:17px;height:13px}.profile-pic-icon{background-image:url("../images/Profile-Pic.svg");width:60px;height:60px}.graph-up-icon{background-image:url("../images/Icon-Graph-Green.svg");width:24px;height:24px}.graph-down-icon{background-image:url("../images/Icon-Graph-Red.svg");width:24px;height:24px}.no-result-icon{background-image:url("../images/limited-icon.svg");width:52px;height:47px}.active .dashboard-icon{background-image:url("../images/Icon-Dashboard-Active.svg")}.active .sales-icon{background-image:url("../images/Icon-Sales-Active.svg")}.active .catalog-icon{background-image:url("../images/Icon-Catalog-Active.svg")}.active .customer-icon{background-image:url("../images/Icon-Customers-Active.svg")}.active .settings-icon{background-image:url("../images/Icon-Settings-Active.svg")}.active .configuration-icon{background-image:url("../images/Icon-Configure-Active.svg")}.active>.arrow-down-icon{background-image:url("../images/Arrow-Down.svg");width:14px;height:8px}.active>.expand-icon{background-image:url("../images/Expand-Light-On.svg")}.active.dashboard-icon{background-image:url("../images/Icon-Dashboard-Active.svg")}.active.customer-icon{background-image:url("../images/Icon-Customers-Active.svg")}.active.sales-icon{background-image:url("../images/Icon-Sales-Active.svg")}.active.settings-icon{background-image:url("../images/Icon-Settings-Active.svg")}.active.configuration-icon{background-image:url("../images/Icon-Configure-Active.svg")}.active.arrow-down-icon{background-image:url("../images/Arrow-Down.svg");width:14px;height:8px}.active.expand-icon{background-image:url("../images/Expand-Light-On.svg")}.icon-404{background-image:url("../images/404-image.svg");width:255px;height:255px}.export-icon{background-image:url("../images/Icon-Export.svg");width:32px;height:32px}.star-blue-icon{width:17px;height:17px;background-image:url("../images/Icon-star.svg")}.grid-container{display:block;width:100%;height:100%}.filter-row-one{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.filter-row-one,.filter-row-two{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:10px}.filter-row-two,.search-filter{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.search-filter{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.search-filter .control{background:#fff;border:2px solid #c7c7c7;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-radius:3px;height:36px;width:360px;padding-left:10px;font-size:15px;color:#8e8e8e}.search-filter .contorl:focus{border-color:#0041ff}.search-filter .icon-wrapper{border:2px solid #c7c7c7;border-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0;height:36px;width:36px;margin-left:-1px}.search-filter .icon-wrapper .search-icon{margin-top:3px;margin-left:3px}.dropdown-header{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:36px;width:202px;border:2px solid #c7c7c7;border-radius:3px;color:#8e8e8e;padding:0 5px}.dropdown-header .arrow-icon-down{float:right}.filter-tag{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-radius:2px}.filter-tag,.filter-tag .wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:14px;height:28px}.filter-tag .wrapper{margin-left:5px;padding:0 5px;background:#e7e7e7;color:#000311;letter-spacing:-.22px}.filter-tag:not(first-child){margin-left:10px}@-webkit-keyframes jelly{0%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:0}70%{-webkit-transform:translateY(5px) scale(1.05);transform:translateY(5px) scale(1.05);opacity:1}to{-webkit-transform:translateY(0) scale(1);transform:translateY(0) scale(1);opacity:1}}@keyframes jelly{0%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:0}70%{-webkit-transform:translateY(5px) scale(1.05);transform:translateY(5px) scale(1.05);opacity:1}to{-webkit-transform:translateY(0) scale(1);transform:translateY(0) scale(1);opacity:1}}@-webkit-keyframes jelly-out{0%{-webkit-transform:translateY(0) scale(1);transform:translateY(0) scale(1);opacity:1}30%{-webkit-transform:translateY(-5px) scale(1.05);transform:translateY(-5px) scale(1.05);opacity:1}to{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:0}}@keyframes jelly-out{0%{-webkit-transform:translateY(0) scale(1);transform:translateY(0) scale(1);opacity:1}30%{-webkit-transform:translateY(-5px) scale(1.05);transform:translateY(-5px) scale(1.05);opacity:1}to{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:0}}*{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:focus{outline:none}a:active,a:focus,a:hover,a:link,a:visited{text-decoration:none;color:#0041ff}textarea{resize:none}ul{margin:0;padding:0;list-style:none}h1{font-size:28px;margin-top:0}h1,h2{color:#3a3a3a}h2{font-size:18px}.tooltip{position:relative;border-bottom:1px solid #000}.tooltip .tooltiptext{visibility:hidden;width:120px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1}.tooltip:hover .tooltiptext{visibility:visible}.hide{display:none!important}.btn{-webkit-box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 8px 0 rgba(0,0,0,.1);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 8px 0 rgba(0,0,0,.1);border-radius:3px;border:none;color:#fff;cursor:pointer;-webkit-transition:.2s cubic-bezier(.4,0,.2,1);transition:.2s cubic-bezier(.4,0,.2,1);font:inherit;display:inline-block}.btn:active,.btn:focus,.btn:hover{opacity:.75;border:none}.btn.btn-sm{padding:6px 12px}.btn.btn-md{padding:8px 16px}.btn.btn-lg{padding:10px 20px}.btn.btn-xl{padding:12px 24px;font-size:16px}.btn.btn-primary{background:#0041ff;color:#fff}.btn.btn-black{background:#000;color:#fff}.btn:disabled,.btn[disabled=disabled],.btn[disabled=disabled]:active,.btn[disabled=disabled]:hover{cursor:not-allowed;background:#b1b1ae;-webkit-box-shadow:none;box-shadow:none;opacity:1}.dropdown-open{position:relative}.dropdown-list{width:200px;margin-bottom:20px;-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);border-radius:3px;background-color:#fff;position:absolute;display:none;z-index:10;text-align:left}.dropdown-list.bottom-left{top:42px;left:0}.dropdown-list.bottom-right{top:42px;right:0}.dropdown-list.top-left{bottom:42px;left:0}.dropdown-list.top-right{bottom:42px;right:0}.dropdown-list .search-box{padding:20px;border-bottom:1px solid hsla(0,0%,64%,.2)}.dropdown-list .search-box .control{background:#fff;border:2px solid #c7c7c7;border-radius:3px;width:100%;height:36px;display:inline-block;vertical-align:middle;-webkit-transition:.2s cubic-bezier(.4,0,.2,1);transition:.2s cubic-bezier(.4,0,.2,1);padding:0 10px;font-size:15px}.dropdown-list .search-box .control:focus{border-color:#0041ff}.dropdown-list .dropdown-container{padding:20px;overflow-y:auto;max-height:280px}.dropdown-list .dropdown-container label{font-size:15px;display:inline-block;text-transform:uppercase;color:#9e9e9e;font-weight:700;padding-bottom:5px}.dropdown-list .dropdown-container ul{margin:0;list-style-type:none;padding:0}.dropdown-list .dropdown-container ul li{padding:5px 0}.dropdown-list .dropdown-container ul li a:active,.dropdown-list .dropdown-container ul li a:focus,.dropdown-list .dropdown-container ul li a:link,.dropdown-list .dropdown-container ul li a:visited{color:#333;display:block}.dropdown-list .dropdown-container ul li a:hover{color:#0041ff}.dropdown-list .dropdown-container ul li .checkbox{margin:0}.dropdown-list .dropdown-container ul li .control-group label{color:#3a3a3a;font-size:15px;font-weight:500;text-transform:capitalize;width:100%}.dropdown-list .dropdown-container .btn{width:100%;margin-top:10px}.table{width:100%;overflow-x:auto}.table table{width:100%;border-collapse:collapse;text-align:left}.table table thead th{font-weight:700;padding:12px 10px;background:#f8f9fa;color:#3a3a3a}.table table tbody td{padding:10px;border-bottom:1px solid #d3d3d3;color:#3a3a3a;vertical-align:top}.table table tbody td.actions{text-align:right}.table table tbody td.actions .icon{cursor:pointer;vertical-align:middle}.table table tbody td.empty{text-align:center}.table table tbody tr:last-child td{border-bottom:none}.table .control-group{width:100%;margin-bottom:0}.table .control-group .control{width:100%;margin:0}.dropdown-btn{min-width:150px;text-align:left;background:#fff;border:2px solid #c7c7c7;border-radius:3px;font-size:14px;padding:8px 35px 8px 10px;cursor:pointer;position:relative}.dropdown-btn:active,.dropdown-btn:focus,.dropdown-btn:hover{opacity:.75;border:2px solid #c7c7c7}.dropdown-btn .icon{position:absolute;right:10px;top:50%;margin-top:-4px}.pagination .page-item{background:#fff;border:2px solid #c7c7c7;border-radius:3px;padding:7px 14px;margin-right:5px;font-size:16px;display:inline-block;color:#8e8e8e;vertical-align:middle;text-decoration:none}.pagination .page-item.next,.pagination .page-item.previous{padding:6px 9px}.pagination .page-item.active{background:#0041ff;color:#fff;border-color:#0041ff}.pagination .page-item .icon{vertical-align:middle;margin-bottom:3px}.checkbox{position:relative;display:block}.checkbox input{left:0;opacity:0;position:absolute;top:0;height:24px;width:24px;z-index:100}.checkbox .checkbox-view{background-image:url("../images/Checkbox.svg");height:24px;width:24px;margin:0;display:inline-block!important;vertical-align:middle;margin-right:5px}.checkbox input:checked+.checkbox-view{background-image:url("../images/Checkbox-Checked.svg")}.checkbox input:disabled+.checkbox-view{opacity:.5;cursor:not-allowed}.radio{position:relative;display:block;margin:10px 5px 5px 0}.radio input{left:0;opacity:0;position:absolute;top:0;z-index:100}.radio .radio-view{background-image:url("../images/controls.svg");background-position:-21px 0;height:20px;width:20px;margin:0;display:inline-block!important;vertical-align:middle;margin-right:5px}.radio input:checked+.radio-view{background-position:-21px -21px}.radio input:disabled+.radio-view{opacity:.5;cursor:not-allowed}.control-group{display:block;margin-bottom:25px;font-size:15px;color:#333;width:750px;max-width:100%;position:relative}.control-group label{display:block;color:#3a3a3a}.control-group label.required:after{content:"*";color:#fc6868;font-weight:700;display:inline-block}.control-group textarea.control{height:100px;padding:10px}.control-group .control{background:#fff;border:2px solid #c7c7c7;border-radius:3px;width:70%;height:36px;display:inline-block;vertical-align:middle;-webkit-transition:.2s cubic-bezier(.4,0,.2,1);transition:.2s cubic-bezier(.4,0,.2,1);padding:0 10px;font-size:15px;margin-top:10px;margin-bottom:5px}.control-group .control:focus{border-color:#0041ff}.control-group .control[disabled=disabled]{border-color:#d3d3d3;background-color:#d3d3d3;cursor:not-allowed}.control-group .control[multiple]{height:100px}.control-group.date:after,.control-group.datetime:after{background-image:url("../images/Icon-Calendar.svg");width:24px;height:24px;content:"";display:inline-block;vertical-align:middle;margin-left:-34px;margin-top:2px;pointer-events:none}.control-group .control-info{display:block;font-style:italic;color:#6f6f6f}.control-group .control-error{display:none;color:#ff5656;margin-top:5px}.control-group.has-error .control{border-color:#fc6868}.control-group.has-error .control-error{display:block}.control-group.price .currency-code{vertical-align:middle;display:inline-block}.button-group{margin-top:20px;margin-bottom:20px}.alert-wrapper{width:300px;top:10px;right:10px;position:fixed;z-index:6;text-align:left}.alert-wrapper .alert{width:300px;padding:15px;border-radius:3px;display:inline-block;-webkit-box-shadow:0 4px 15.36px .64px rgba(0,0,0,.1),0 2px 6px 0 rgba(0,0,0,.12);box-shadow:0 4px 15.36px .64px rgba(0,0,0,.1),0 2px 6px 0 rgba(0,0,0,.12);position:relative;-webkit-animation:jelly .5s ease-in-out;animation:jelly .5s ease-in-out;-webkit-transform-origin:center top;transform-origin:center top;z-index:500;margin-bottom:10px}.alert-wrapper .alert.alert-error{background:#fc6868}.alert-wrapper .alert.alert-info{background:#204d74}.alert-wrapper .alert.alert-success{background:#4caf50}.alert-wrapper .alert.alert-warning{background:#ffc107}.alert-wrapper .alert .icon{position:absolute;right:10px;top:10px;cursor:pointer}.alert-wrapper .alert p{color:#fff;margin:0;padding:0;font-size:15px}.tabs ul{border-bottom:1px solid hsla(0,0%,64%,.2)}.tabs ul li{display:inline-block}.tabs ul li a{padding:15px 20px;cursor:pointer;margin:0 2px;text-align:center;color:#000311;display:block}.tabs ul li.active a{border-bottom:3px solid #0041ff}.accordian,accordian{display:inline-block;width:100%}.accordian .accordian-header,.accordian div[slot*=header],accordian .accordian-header,accordian div[slot*=header]{width:100%;display:inline-block;font-size:18px;color:#3a3a3a;border-bottom:1px solid hsla(0,0%,64%,.2);padding:20px 15px;cursor:pointer}.accordian .accordian-header .expand-icon,.accordian div[slot*=header] .expand-icon,accordian .accordian-header .expand-icon,accordian div[slot*=header] .expand-icon{background-image:url("../images/Expand-Light.svg");margin-right:10px;margin-top:3px}.accordian .accordian-header h1,.accordian div[slot*=header] h1,accordian .accordian-header h1,accordian div[slot*=header] h1{margin:0;font-size:20px;display:inline-block}.accordian .accordian-header .icon,.accordian div[slot*=header] .icon,accordian .accordian-header .icon,accordian div[slot*=header] .icon{float:right}.accordian .accordian-header .icon.left,.accordian div[slot*=header] .icon.left,accordian .accordian-header .icon.left,accordian div[slot*=header] .icon.left{float:left}.accordian .accordian-content,.accordian div[slot*=body],accordian .accordian-content,accordian div[slot*=body]{width:100%;padding:20px 15px;display:none;-webkit-transition:all .3s ease;transition:all .3s ease}.accordian.active>.accordian-content,accordian.active>.accordian-content{display:inline-block}.accordian.active>.accordian-header .expand-icon,accordian.active>.accordian-header .expand-icon{background-image:url("../images/Expand-Light-On.svg")}.tree-container .tree-item{padding-left:30px;display:inline-block;margin-top:10px;width:100%}.tree-container .tree-item>.tree-item{display:none}.tree-container .tree-item.active>.tree-item{display:inline-block}.tree-container .tree-item .checkbox,.tree-container .tree-item .radio{margin:0;display:inline-block}.tree-container .tree-item .expand-icon{display:inline-block;margin-right:10px;cursor:pointer;background-image:url("../images/Expand-Light.svg");width:18px;height:18px;vertical-align:middle}.tree-container .tree-item .folder-icon{vertical-align:middle;margin-right:10px}.tree-container .tree-item.active>.expand-icon{background-image:url("../images/Expand-Light-On.svg")}.tree-container>.tree-item{padding-left:0}.panel{-webkit-box-shadow:0 2px 25px 0 rgba(0,0,0,.15);box-shadow:0 2px 25px 0 rgba(0,0,0,.15);border-radius:5px;background:#fff}.panel .panel-content{padding:20px}modal{display:none}.modal-open{overflow:hidden}.modal-overlay{display:none;overflow-y:auto;z-index:10;top:0;right:0;bottom:0;left:0;position:fixed;background:#000;opacity:.75}.modal-open .modal-overlay{display:block}.modal-container{-webkit-animation:fade-in-white .3s ease-in-out;animation:fade-in-white .3s ease-in-out;z-index:11;margin-left:-350px;width:600px;max-width:80%;background:#fff;position:fixed;left:50%;top:100px;margin-bottom:100px;-webkit-box-shadow:0 15px 25px 0 rgba(0,0,0,.03),0 20px 45px 5px rgba(0,0,0,.2);box-shadow:0 15px 25px 0 rgba(0,0,0,.03),0 20px 45px 5px rgba(0,0,0,.2);-webkit-animation:jelly .5s ease-in-out;animation:jelly .5s ease-in-out;border-radius:5px}.modal-container .modal-header{padding:20px}.modal-container .modal-header h3{display:inline-block;font-size:20px;color:#3a3a3a;margin:0}.modal-container .modal-header .icon{float:right;cursor:pointer}.modal-container .modal-body{padding:20px}.modal-container .modal-body .control-group .control{width:100%}.label{background:#e7e7e7;border-radius:2px;padding:8px;color:#000311;display:inline-block}.label.label-sm{padding:5px}.label.label-md{padding:8px}.label.label-lg{padding:11px}.label.label-xl{padding:14px}.badge{border-radius:50px;color:#fff;padding:8px;white-space:nowrap}.badge.badge-sm{padding:5px}.badge.badge-md{padding:3px 10px}.badge.badge-lg{padding:11px}.badge.badge-xl{padding:14px}.badge.badge-success{background-color:#4caf50}.badge.badge-info{background-color:#0041ff}.badge.badge-danger{background-color:#fc6868}.badge.badge-warning{background-color:#ffc107}.image-wrapper{margin-bottom:20px;margin-top:10px;display:inline-block;width:100%}.image-wrapper .image-item{width:200px;height:200px;margin-right:20px;background:#f8f9fa;border-radius:3px;display:inline-block;position:relative;background-image:url("../images/placeholder-icon.svg");background-repeat:no-repeat;background-position:50%;margin-bottom:20px}.image-wrapper .image-item img.preview{width:100%;height:100%}.image-wrapper .image-item input{display:none}.image-wrapper .image-item .remove-image{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.08)),to(rgba(0,0,0,.24)));background-image:linear-gradient(-180deg,rgba(0,0,0,.08),rgba(0,0,0,.24));border-radius:0 0 4px 4px;position:absolute;bottom:0;width:100%;padding:10px;text-align:center;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.24);margin-right:20px;cursor:pointer}.image-wrapper .image-item:hover .remove-image{display:block}.image-wrapper .image-item.has-image{background-image:none}.cp-spinner{width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.cp-round:before{border-radius:50%;border:6px solid #bababa}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #0041ff;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} \ No newline at end of file diff --git a/packages/Webkul/Ui/publishable/assets/js/ui.js b/packages/Webkul/Ui/publishable/assets/js/ui.js index 606535f9d..d522d3ea5 100755 --- a/packages/Webkul/Ui/publishable/assets/js/ui.js +++ b/packages/Webkul/Ui/publishable/assets/js/ui.js @@ -1,5980 +1 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/"; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 3); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file. -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ -) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - options._compiled = true - } - - // functional template - if (functionalTemplate) { - options.functional = true - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // for template-only hot-reload because in that case the render fn doesn't - // go through the normalizer - options._injectStyles = hook - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } -} - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -module.exports = function(useSourceMap) { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item, useSourceMap); - if(item[2]) { - return "@media " + item[2] + "{" + content + "}"; - } else { - return content; - } - }).join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; -}; - -function cssWithMappingToString(item, useSourceMap) { - var content = item[1] || ''; - var cssMapping = item[3]; - if (!cssMapping) { - return content; - } - - if (useSourceMap && typeof btoa === 'function') { - var sourceMapping = toComment(cssMapping); - var sourceURLs = cssMapping.sources.map(function (source) { - return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' - }); - - return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); - } - - return [content].join('\n'); -} - -// Adapted from convert-source-map (MIT) -function toComment(sourceMap) { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); - var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; - - return '/*# ' + data + ' */'; -} - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -/* flatpickr v4.5.2, @license MIT */ -(function (global, factory) { - true ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.flatpickr = factory()); -}(this, (function () { 'use strict'; - - var pad = function pad(number) { - return ("0" + number).slice(-2); - }; - var int = function int(bool) { - return bool === true ? 1 : 0; - }; - function debounce(func, wait, immediate) { - if (immediate === void 0) { - immediate = false; - } - - var timeout; - return function () { - var context = this, - args = arguments; - timeout !== null && clearTimeout(timeout); - timeout = window.setTimeout(function () { - timeout = null; - if (!immediate) func.apply(context, args); - }, wait); - if (immediate && !timeout) func.apply(context, args); - }; - } - var arrayify = function arrayify(obj) { - return obj instanceof Array ? obj : [obj]; - }; - - var do_nothing = function do_nothing() { - return undefined; - }; - - var monthToStr = function monthToStr(monthNumber, shorthand, locale) { - return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; - }; - var revFormat = { - D: do_nothing, - F: function F(dateObj, monthName, locale) { - dateObj.setMonth(locale.months.longhand.indexOf(monthName)); - }, - G: function G(dateObj, hour) { - dateObj.setHours(parseFloat(hour)); - }, - H: function H(dateObj, hour) { - dateObj.setHours(parseFloat(hour)); - }, - J: function J(dateObj, day) { - dateObj.setDate(parseFloat(day)); - }, - K: function K(dateObj, amPM, locale) { - dateObj.setHours(dateObj.getHours() % 12 + 12 * int(new RegExp(locale.amPM[1], "i").test(amPM))); - }, - M: function M(dateObj, shortMonth, locale) { - dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth)); - }, - S: function S(dateObj, seconds) { - dateObj.setSeconds(parseFloat(seconds)); - }, - U: function U(_, unixSeconds) { - return new Date(parseFloat(unixSeconds) * 1000); - }, - W: function W(dateObj, weekNum) { - var weekNumber = parseInt(weekNum); - return new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0); - }, - Y: function Y(dateObj, year) { - dateObj.setFullYear(parseFloat(year)); - }, - Z: function Z(_, ISODate) { - return new Date(ISODate); - }, - d: function d(dateObj, day) { - dateObj.setDate(parseFloat(day)); - }, - h: function h(dateObj, hour) { - dateObj.setHours(parseFloat(hour)); - }, - i: function i(dateObj, minutes) { - dateObj.setMinutes(parseFloat(minutes)); - }, - j: function j(dateObj, day) { - dateObj.setDate(parseFloat(day)); - }, - l: do_nothing, - m: function m(dateObj, month) { - dateObj.setMonth(parseFloat(month) - 1); - }, - n: function n(dateObj, month) { - dateObj.setMonth(parseFloat(month) - 1); - }, - s: function s(dateObj, seconds) { - dateObj.setSeconds(parseFloat(seconds)); - }, - w: do_nothing, - y: function y(dateObj, year) { - dateObj.setFullYear(2000 + parseFloat(year)); - } - }; - var tokenRegex = { - D: "(\\w+)", - F: "(\\w+)", - G: "(\\d\\d|\\d)", - H: "(\\d\\d|\\d)", - J: "(\\d\\d|\\d)\\w+", - K: "", - M: "(\\w+)", - S: "(\\d\\d|\\d)", - U: "(.+)", - W: "(\\d\\d|\\d)", - Y: "(\\d{4})", - Z: "(.+)", - d: "(\\d\\d|\\d)", - h: "(\\d\\d|\\d)", - i: "(\\d\\d|\\d)", - j: "(\\d\\d|\\d)", - l: "(\\w+)", - m: "(\\d\\d|\\d)", - n: "(\\d\\d|\\d)", - s: "(\\d\\d|\\d)", - w: "(\\d\\d|\\d)", - y: "(\\d{2})" - }; - var formats = { - Z: function Z(date) { - return date.toISOString(); - }, - D: function D(date, locale, options) { - return locale.weekdays.shorthand[formats.w(date, locale, options)]; - }, - F: function F(date, locale, options) { - return monthToStr(formats.n(date, locale, options) - 1, false, locale); - }, - G: function G(date, locale, options) { - return pad(formats.h(date, locale, options)); - }, - H: function H(date) { - return pad(date.getHours()); - }, - J: function J(date, locale) { - return locale.ordinal !== undefined ? date.getDate() + locale.ordinal(date.getDate()) : date.getDate(); - }, - K: function K(date, locale) { - return locale.amPM[int(date.getHours() > 11)]; - }, - M: function M(date, locale) { - return monthToStr(date.getMonth(), true, locale); - }, - S: function S(date) { - return pad(date.getSeconds()); - }, - U: function U(date) { - return date.getTime() / 1000; - }, - W: function W(date, _, options) { - return options.getWeek(date); - }, - Y: function Y(date) { - return date.getFullYear(); - }, - d: function d(date) { - return pad(date.getDate()); - }, - h: function h(date) { - return date.getHours() % 12 ? date.getHours() % 12 : 12; - }, - i: function i(date) { - return pad(date.getMinutes()); - }, - j: function j(date) { - return date.getDate(); - }, - l: function l(date, locale) { - return locale.weekdays.longhand[date.getDay()]; - }, - m: function m(date) { - return pad(date.getMonth() + 1); - }, - n: function n(date) { - return date.getMonth() + 1; - }, - s: function s(date) { - return date.getSeconds(); - }, - w: function w(date) { - return date.getDay(); - }, - y: function y(date) { - return String(date.getFullYear()).substring(2); - } - }; - - var english = { - weekdays: { - shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - longhand: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] - }, - months: { - shorthand: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - longhand: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] - }, - daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], - firstDayOfWeek: 0, - ordinal: function ordinal(nth) { - var s = nth % 100; - if (s > 3 && s < 21) return "th"; - - switch (s % 10) { - case 1: - return "st"; - - case 2: - return "nd"; - - case 3: - return "rd"; - - default: - return "th"; - } - }, - rangeSeparator: " to ", - weekAbbreviation: "Wk", - scrollTitle: "Scroll to increment", - toggleTitle: "Click to toggle", - amPM: ["AM", "PM"], - yearAriaLabel: "Year" - }; - - var createDateFormatter = function createDateFormatter(_ref) { - var _ref$config = _ref.config, - config = _ref$config === void 0 ? defaults : _ref$config, - _ref$l10n = _ref.l10n, - l10n = _ref$l10n === void 0 ? english : _ref$l10n; - return function (dateObj, frmt, overrideLocale) { - var locale = overrideLocale || l10n; - - if (config.formatDate !== undefined) { - return config.formatDate(dateObj, frmt, locale); - } - - return frmt.split("").map(function (c, i, arr) { - return formats[c] && arr[i - 1] !== "\\" ? formats[c](dateObj, locale, config) : c !== "\\" ? c : ""; - }).join(""); - }; - }; - var createDateParser = function createDateParser(_ref2) { - var _ref2$config = _ref2.config, - config = _ref2$config === void 0 ? defaults : _ref2$config, - _ref2$l10n = _ref2.l10n, - l10n = _ref2$l10n === void 0 ? english : _ref2$l10n; - return function (date, givenFormat, timeless, customLocale) { - if (date !== 0 && !date) return undefined; - var locale = customLocale || l10n; - var parsedDate; - var date_orig = date; - if (date instanceof Date) parsedDate = new Date(date.getTime());else if (typeof date !== "string" && date.toFixed !== undefined) parsedDate = new Date(date);else if (typeof date === "string") { - var format = givenFormat || (config || defaults).dateFormat; - var datestr = String(date).trim(); - - if (datestr === "today") { - parsedDate = new Date(); - timeless = true; - } else if (/Z$/.test(datestr) || /GMT$/.test(datestr)) parsedDate = new Date(date);else if (config && config.parseDate) parsedDate = config.parseDate(date, format);else { - parsedDate = !config || !config.noCalendar ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0) : new Date(new Date().setHours(0, 0, 0, 0)); - var matched, - ops = []; - - for (var i = 0, matchIndex = 0, regexStr = ""; i < format.length; i++) { - var token = format[i]; - var isBackSlash = token === "\\"; - var escaped = format[i - 1] === "\\" || isBackSlash; - - if (tokenRegex[token] && !escaped) { - regexStr += tokenRegex[token]; - var match = new RegExp(regexStr).exec(date); - - if (match && (matched = true)) { - ops[token !== "Y" ? "push" : "unshift"]({ - fn: revFormat[token], - val: match[++matchIndex] - }); - } - } else if (!isBackSlash) regexStr += "."; - - ops.forEach(function (_ref3) { - var fn = _ref3.fn, - val = _ref3.val; - return parsedDate = fn(parsedDate, val, locale) || parsedDate; - }); - } - - parsedDate = matched ? parsedDate : undefined; - } - } - - if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) { - config.errorHandler(new Error("Invalid date provided: " + date_orig)); - return undefined; - } - - if (timeless === true) parsedDate.setHours(0, 0, 0, 0); - return parsedDate; - }; - }; - function compareDates(date1, date2, timeless) { - if (timeless === void 0) { - timeless = true; - } - - if (timeless !== false) { - return new Date(date1.getTime()).setHours(0, 0, 0, 0) - new Date(date2.getTime()).setHours(0, 0, 0, 0); - } - - return date1.getTime() - date2.getTime(); - } - var getWeek = function getWeek(givenDate) { - var date = new Date(givenDate.getTime()); - date.setHours(0, 0, 0, 0); - date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7); - var week1 = new Date(date.getFullYear(), 0, 4); - return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + (week1.getDay() + 6) % 7) / 7); - }; - var isBetween = function isBetween(ts, ts1, ts2) { - return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2); - }; - var duration = { - DAY: 86400000 - }; - - var HOOKS = ["onChange", "onClose", "onDayCreate", "onDestroy", "onKeyDown", "onMonthChange", "onOpen", "onParseConfig", "onReady", "onValueUpdate", "onYearChange", "onPreCalendarPosition"]; - var defaults = { - _disable: [], - _enable: [], - allowInput: false, - altFormat: "F j, Y", - altInput: false, - altInputClass: "form-control input", - animate: typeof window === "object" && window.navigator.userAgent.indexOf("MSIE") === -1, - ariaDateFormat: "F j, Y", - clickOpens: true, - closeOnSelect: true, - conjunction: ", ", - dateFormat: "Y-m-d", - defaultHour: 12, - defaultMinute: 0, - defaultSeconds: 0, - disable: [], - disableMobile: false, - enable: [], - enableSeconds: false, - enableTime: false, - errorHandler: function errorHandler(err) { - return typeof console !== "undefined" && console.warn(err); - }, - getWeek: getWeek, - hourIncrement: 1, - ignoredFocusElements: [], - inline: false, - locale: "default", - minuteIncrement: 5, - mode: "single", - nextArrow: "", - noCalendar: false, - now: new Date(), - onChange: [], - onClose: [], - onDayCreate: [], - onDestroy: [], - onKeyDown: [], - onMonthChange: [], - onOpen: [], - onParseConfig: [], - onReady: [], - onValueUpdate: [], - onYearChange: [], - onPreCalendarPosition: [], - plugins: [], - position: "auto", - positionElement: undefined, - prevArrow: "", - shorthandCurrentMonth: false, - showMonths: 1, - static: false, - time_24hr: false, - weekNumbers: false, - wrap: false - }; - - function toggleClass(elem, className, bool) { - if (bool === true) return elem.classList.add(className); - elem.classList.remove(className); - } - function createElement(tag, className, content) { - var e = window.document.createElement(tag); - className = className || ""; - content = content || ""; - e.className = className; - if (content !== undefined) e.textContent = content; - return e; - } - function clearNode(node) { - while (node.firstChild) { - node.removeChild(node.firstChild); - } - } - function findParent(node, condition) { - if (condition(node)) return node;else if (node.parentNode) return findParent(node.parentNode, condition); - return undefined; - } - function createNumberInput(inputClassName, opts) { - var wrapper = createElement("div", "numInputWrapper"), - numInput = createElement("input", "numInput " + inputClassName), - arrowUp = createElement("span", "arrowUp"), - arrowDown = createElement("span", "arrowDown"); - numInput.type = "text"; - numInput.pattern = "\\d*"; - if (opts !== undefined) for (var key in opts) { - numInput.setAttribute(key, opts[key]); - } - wrapper.appendChild(numInput); - wrapper.appendChild(arrowUp); - wrapper.appendChild(arrowDown); - return wrapper; - } - - if (typeof Object.assign !== "function") { - Object.assign = function (target) { - if (!target) { - throw TypeError("Cannot convert undefined or null to object"); - } - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var _loop = function _loop() { - var source = args[_i]; - - if (source) { - Object.keys(source).forEach(function (key) { - return target[key] = source[key]; - }); - } - }; - - for (var _i = 0; _i < args.length; _i++) { - _loop(); - } - - return target; - }; - } - - var DEBOUNCED_CHANGE_MS = 300; - - function FlatpickrInstance(element, instanceConfig) { - var self = { - config: Object.assign({}, flatpickr.defaultConfig), - l10n: english - }; - self.parseDate = createDateParser({ - config: self.config, - l10n: self.l10n - }); - self._handlers = []; - self._bind = bind; - self._setHoursFromDate = setHoursFromDate; - self._positionCalendar = positionCalendar; - self.changeMonth = changeMonth; - self.changeYear = changeYear; - self.clear = clear; - self.close = close; - self._createElement = createElement; - self.destroy = destroy; - self.isEnabled = isEnabled; - self.jumpToDate = jumpToDate; - self.open = open; - self.redraw = redraw; - self.set = set; - self.setDate = setDate; - self.toggle = toggle; - - function setupHelperFunctions() { - self.utils = { - getDaysInMonth: function getDaysInMonth(month, yr) { - if (month === void 0) { - month = self.currentMonth; - } - - if (yr === void 0) { - yr = self.currentYear; - } - - if (month === 1 && (yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0)) return 29; - return self.l10n.daysInMonth[month]; - } - }; - } - - function init() { - self.element = self.input = element; - self.isOpen = false; - parseConfig(); - setupLocale(); - setupInputs(); - setupDates(); - setupHelperFunctions(); - if (!self.isMobile) build(); - bindEvents(); - - if (self.selectedDates.length || self.config.noCalendar) { - if (self.config.enableTime) { - setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj || self.config.minDate : undefined); - } - - updateValue(false); - } - - setCalendarWidth(); - self.showTimeInput = self.selectedDates.length > 0 || self.config.noCalendar; - var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); - - if (!self.isMobile && isSafari) { - positionCalendar(); - } - - triggerEvent("onReady"); - } - - function bindToInstance(fn) { - return fn.bind(self); - } - - function setCalendarWidth() { - var config = self.config; - if (config.weekNumbers === false && config.showMonths === 1) return;else if (config.noCalendar !== true) { - window.requestAnimationFrame(function () { - self.calendarContainer.style.visibility = "hidden"; - self.calendarContainer.style.display = "block"; - - if (self.daysContainer !== undefined) { - var daysWidth = (self.days.offsetWidth + 1) * config.showMonths; - self.daysContainer.style.width = daysWidth + "px"; - self.calendarContainer.style.width = daysWidth + (self.weekWrapper !== undefined ? self.weekWrapper.offsetWidth : 0) + "px"; - self.calendarContainer.style.removeProperty("visibility"); - self.calendarContainer.style.removeProperty("display"); - } - }); - } - } - - function updateTime(e) { - if (self.selectedDates.length === 0) return; - - if (e !== undefined && e.type !== "blur") { - timeWrapper(e); - } - - var prevValue = self._input.value; - setHoursFromInputs(); - updateValue(); - - if (self._input.value !== prevValue) { - self._debouncedChange(); - } - } - - function ampm2military(hour, amPM) { - return hour % 12 + 12 * int(amPM === self.l10n.amPM[1]); - } - - function military2ampm(hour) { - switch (hour % 24) { - case 0: - case 12: - return 12; - - default: - return hour % 12; - } - } - - function setHoursFromInputs() { - if (self.hourElement === undefined || self.minuteElement === undefined) return; - var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, - minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, - seconds = self.secondElement !== undefined ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0; - - if (self.amPM !== undefined) { - hours = ampm2military(hours, self.amPM.textContent); - } - - var limitMinHours = self.config.minTime !== undefined || self.config.minDate && self.minDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.minDate, true) === 0; - var limitMaxHours = self.config.maxTime !== undefined || self.config.maxDate && self.maxDateHasTime && self.latestSelectedDateObj && compareDates(self.latestSelectedDateObj, self.config.maxDate, true) === 0; - - if (limitMaxHours) { - var maxTime = self.config.maxTime !== undefined ? self.config.maxTime : self.config.maxDate; - hours = Math.min(hours, maxTime.getHours()); - if (hours === maxTime.getHours()) minutes = Math.min(minutes, maxTime.getMinutes()); - if (minutes === maxTime.getMinutes()) seconds = Math.min(seconds, maxTime.getSeconds()); - } - - if (limitMinHours) { - var minTime = self.config.minTime !== undefined ? self.config.minTime : self.config.minDate; - hours = Math.max(hours, minTime.getHours()); - if (hours === minTime.getHours()) minutes = Math.max(minutes, minTime.getMinutes()); - if (minutes === minTime.getMinutes()) seconds = Math.max(seconds, minTime.getSeconds()); - } - - setHours(hours, minutes, seconds); - } - - function setHoursFromDate(dateObj) { - var date = dateObj || self.latestSelectedDateObj; - if (date) setHours(date.getHours(), date.getMinutes(), date.getSeconds()); - } - - function setDefaultHours() { - var hours = self.config.defaultHour; - var minutes = self.config.defaultMinute; - var seconds = self.config.defaultSeconds; - - if (self.config.minDate !== undefined) { - var min_hr = self.config.minDate.getHours(); - var min_minutes = self.config.minDate.getMinutes(); - hours = Math.max(hours, min_hr); - if (hours === min_hr) minutes = Math.max(min_minutes, minutes); - if (hours === min_hr && minutes === min_minutes) seconds = self.config.minDate.getSeconds(); - } - - if (self.config.maxDate !== undefined) { - var max_hr = self.config.maxDate.getHours(); - var max_minutes = self.config.maxDate.getMinutes(); - hours = Math.min(hours, max_hr); - if (hours === max_hr) minutes = Math.min(max_minutes, minutes); - if (hours === max_hr && minutes === max_minutes) seconds = self.config.maxDate.getSeconds(); - } - - setHours(hours, minutes, seconds); - } - - function setHours(hours, minutes, seconds) { - if (self.latestSelectedDateObj !== undefined) { - self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0); - } - - if (!self.hourElement || !self.minuteElement || self.isMobile) return; - self.hourElement.value = pad(!self.config.time_24hr ? (12 + hours) % 12 + 12 * int(hours % 12 === 0) : hours); - self.minuteElement.value = pad(minutes); - if (self.amPM !== undefined) self.amPM.textContent = self.l10n.amPM[int(hours >= 12)]; - if (self.secondElement !== undefined) self.secondElement.value = pad(seconds); - } - - function onYearInput(event) { - var year = parseInt(event.target.value) + (event.delta || 0); - - if (year / 1000 > 1 || event.key === "Enter" && !/[^\d]/.test(year.toString())) { - changeYear(year); - } - } - - function bind(element, event, handler, options) { - if (event instanceof Array) return event.forEach(function (ev) { - return bind(element, ev, handler, options); - }); - if (element instanceof Array) return element.forEach(function (el) { - return bind(el, event, handler, options); - }); - element.addEventListener(event, handler, options); - - self._handlers.push({ - element: element, - event: event, - handler: handler, - options: options - }); - } - - function onClick(handler) { - return function (evt) { - evt.which === 1 && handler(evt); - }; - } - - function triggerChange() { - triggerEvent("onChange"); - } - - function bindEvents() { - if (self.config.wrap) { - ["open", "close", "toggle", "clear"].forEach(function (evt) { - Array.prototype.forEach.call(self.element.querySelectorAll("[data-" + evt + "]"), function (el) { - return bind(el, "click", self[evt]); - }); - }); - } - - if (self.isMobile) { - setupMobile(); - return; - } - - var debouncedResize = debounce(onResize, 50); - self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS); - if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent)) bind(self.daysContainer, "mouseover", function (e) { - if (self.config.mode === "range") onMouseOver(e.target); - }); - bind(window.document.body, "keydown", onKeyDown); - if (!self.config.static) bind(self._input, "keydown", onKeyDown); - if (!self.config.inline && !self.config.static) bind(window, "resize", debouncedResize); - if (window.ontouchstart !== undefined) bind(window.document, "click", documentClick);else bind(window.document, "mousedown", onClick(documentClick)); - bind(window.document, "focus", documentClick, { - capture: true - }); - - if (self.config.clickOpens === true) { - bind(self._input, "focus", self.open); - bind(self._input, "mousedown", onClick(self.open)); - } - - if (self.daysContainer !== undefined) { - bind(self.monthNav, "mousedown", onClick(onMonthNavClick)); - bind(self.monthNav, ["keyup", "increment"], onYearInput); - bind(self.daysContainer, "mousedown", onClick(selectDate)); - } - - if (self.timeContainer !== undefined && self.minuteElement !== undefined && self.hourElement !== undefined) { - var selText = function selText(e) { - return e.target.select(); - }; - - bind(self.timeContainer, ["increment"], updateTime); - bind(self.timeContainer, "blur", updateTime, { - capture: true - }); - bind(self.timeContainer, "mousedown", onClick(timeIncrement)); - bind([self.hourElement, self.minuteElement], ["focus", "click"], selText); - if (self.secondElement !== undefined) bind(self.secondElement, "focus", function () { - return self.secondElement && self.secondElement.select(); - }); - - if (self.amPM !== undefined) { - bind(self.amPM, "mousedown", onClick(function (e) { - updateTime(e); - triggerChange(); - })); - } - } - } - - function jumpToDate(jumpDate) { - var jumpTo = jumpDate !== undefined ? self.parseDate(jumpDate) : self.latestSelectedDateObj || (self.config.minDate && self.config.minDate > self.now ? self.config.minDate : self.config.maxDate && self.config.maxDate < self.now ? self.config.maxDate : self.now); - - try { - if (jumpTo !== undefined) { - self.currentYear = jumpTo.getFullYear(); - self.currentMonth = jumpTo.getMonth(); - } - } catch (e) { - e.message = "Invalid date supplied: " + jumpTo; - self.config.errorHandler(e); - } - - self.redraw(); - } - - function timeIncrement(e) { - if (~e.target.className.indexOf("arrow")) incrementNumInput(e, e.target.classList.contains("arrowUp") ? 1 : -1); - } - - function incrementNumInput(e, delta, inputElem) { - var target = e && e.target; - var input = inputElem || target && target.parentNode && target.parentNode.firstChild; - var event = createEvent("increment"); - event.delta = delta; - input && input.dispatchEvent(event); - } - - function build() { - var fragment = window.document.createDocumentFragment(); - self.calendarContainer = createElement("div", "flatpickr-calendar"); - self.calendarContainer.tabIndex = -1; - - if (!self.config.noCalendar) { - fragment.appendChild(buildMonthNav()); - self.innerContainer = createElement("div", "flatpickr-innerContainer"); - - if (self.config.weekNumbers) { - var _buildWeeks = buildWeeks(), - weekWrapper = _buildWeeks.weekWrapper, - weekNumbers = _buildWeeks.weekNumbers; - - self.innerContainer.appendChild(weekWrapper); - self.weekNumbers = weekNumbers; - self.weekWrapper = weekWrapper; - } - - self.rContainer = createElement("div", "flatpickr-rContainer"); - self.rContainer.appendChild(buildWeekdays()); - - if (!self.daysContainer) { - self.daysContainer = createElement("div", "flatpickr-days"); - self.daysContainer.tabIndex = -1; - } - - buildDays(); - self.rContainer.appendChild(self.daysContainer); - self.innerContainer.appendChild(self.rContainer); - fragment.appendChild(self.innerContainer); - } - - if (self.config.enableTime) { - fragment.appendChild(buildTime()); - } - - toggleClass(self.calendarContainer, "rangeMode", self.config.mode === "range"); - toggleClass(self.calendarContainer, "animate", self.config.animate === true); - toggleClass(self.calendarContainer, "multiMonth", self.config.showMonths > 1); - self.calendarContainer.appendChild(fragment); - var customAppend = self.config.appendTo !== undefined && self.config.appendTo.nodeType !== undefined; - - if (self.config.inline || self.config.static) { - self.calendarContainer.classList.add(self.config.inline ? "inline" : "static"); - - if (self.config.inline) { - if (!customAppend && self.element.parentNode) self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);else if (self.config.appendTo !== undefined) self.config.appendTo.appendChild(self.calendarContainer); - } - - if (self.config.static) { - var wrapper = createElement("div", "flatpickr-wrapper"); - if (self.element.parentNode) self.element.parentNode.insertBefore(wrapper, self.element); - wrapper.appendChild(self.element); - if (self.altInput) wrapper.appendChild(self.altInput); - wrapper.appendChild(self.calendarContainer); - } - } - - if (!self.config.static && !self.config.inline) (self.config.appendTo !== undefined ? self.config.appendTo : window.document.body).appendChild(self.calendarContainer); - } - - function createDay(className, date, dayNumber, i) { - var dateIsEnabled = isEnabled(date, true), - dayElement = createElement("span", "flatpickr-day " + className, date.getDate().toString()); - dayElement.dateObj = date; - dayElement.$i = i; - dayElement.setAttribute("aria-label", self.formatDate(date, self.config.ariaDateFormat)); - - if (className.indexOf("hidden") === -1 && compareDates(date, self.now) === 0) { - self.todayDateElem = dayElement; - dayElement.classList.add("today"); - dayElement.setAttribute("aria-current", "date"); - } - - if (dateIsEnabled) { - dayElement.tabIndex = -1; - - if (isDateSelected(date)) { - dayElement.classList.add("selected"); - self.selectedDateElem = dayElement; - - if (self.config.mode === "range") { - toggleClass(dayElement, "startRange", self.selectedDates[0] && compareDates(date, self.selectedDates[0], true) === 0); - toggleClass(dayElement, "endRange", self.selectedDates[1] && compareDates(date, self.selectedDates[1], true) === 0); - if (className === "nextMonthDay") dayElement.classList.add("inRange"); - } - } - } else { - dayElement.classList.add("disabled"); - } - - if (self.config.mode === "range") { - if (isDateInRange(date) && !isDateSelected(date)) dayElement.classList.add("inRange"); - } - - if (self.weekNumbers && self.config.showMonths === 1 && className !== "prevMonthDay" && dayNumber % 7 === 1) { - self.weekNumbers.insertAdjacentHTML("beforeend", "" + self.config.getWeek(date) + ""); - } - - triggerEvent("onDayCreate", dayElement); - return dayElement; - } - - function focusOnDayElem(targetNode) { - targetNode.focus(); - if (self.config.mode === "range") onMouseOver(targetNode); - } - - function getFirstAvailableDay(delta) { - var startMonth = delta > 0 ? 0 : self.config.showMonths - 1; - var endMonth = delta > 0 ? self.config.showMonths : -1; - - for (var m = startMonth; m != endMonth; m += delta) { - var month = self.daysContainer.children[m]; - var startIndex = delta > 0 ? 0 : month.children.length - 1; - var endIndex = delta > 0 ? month.children.length : -1; - - for (var i = startIndex; i != endIndex; i += delta) { - var c = month.children[i]; - if (c.className.indexOf("hidden") === -1 && isEnabled(c.dateObj)) return c; - } - } - - return undefined; - } - - function getNextAvailableDay(current, delta) { - var givenMonth = current.className.indexOf("Month") === -1 ? current.dateObj.getMonth() : self.currentMonth; - var endMonth = delta > 0 ? self.config.showMonths : -1; - var loopDelta = delta > 0 ? 1 : -1; - - for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) { - var month = self.daysContainer.children[m]; - var startIndex = givenMonth - self.currentMonth === m ? current.$i + delta : delta < 0 ? month.children.length - 1 : 0; - var numMonthDays = month.children.length; - - for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) { - var c = month.children[i]; - if (c.className.indexOf("hidden") === -1 && isEnabled(c.dateObj) && Math.abs(current.$i - i) >= Math.abs(delta)) return focusOnDayElem(c); - } - } - - self.changeMonth(loopDelta); - focusOnDay(getFirstAvailableDay(loopDelta), 0); - return undefined; - } - - function focusOnDay(current, offset) { - var dayFocused = isInView(document.activeElement || document.body); - var startElem = current !== undefined ? current : dayFocused ? document.activeElement : self.selectedDateElem !== undefined && isInView(self.selectedDateElem) ? self.selectedDateElem : self.todayDateElem !== undefined && isInView(self.todayDateElem) ? self.todayDateElem : getFirstAvailableDay(offset > 0 ? 1 : -1); - if (startElem === undefined) return self._input.focus(); - if (!dayFocused) return focusOnDayElem(startElem); - getNextAvailableDay(startElem, offset); - } - - function buildMonthDays(year, month) { - var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7; - var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12); - var daysInMonth = self.utils.getDaysInMonth(month), - days = window.document.createDocumentFragment(), - isMultiMonth = self.config.showMonths > 1, - prevMonthDayClass = isMultiMonth ? "prevMonthDay hidden" : "prevMonthDay", - nextMonthDayClass = isMultiMonth ? "nextMonthDay hidden" : "nextMonthDay"; - var dayNumber = prevMonthDays + 1 - firstOfMonth, - dayIndex = 0; - - for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) { - days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex)); - } - - for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) { - days.appendChild(createDay("", new Date(year, month, dayNumber), dayNumber, dayIndex)); - } - - for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth && (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) { - days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex)); - } - - var dayContainer = createElement("div", "dayContainer"); - dayContainer.appendChild(days); - return dayContainer; - } - - function buildDays() { - if (self.daysContainer === undefined) { - return; - } - - clearNode(self.daysContainer); - if (self.weekNumbers) clearNode(self.weekNumbers); - var frag = document.createDocumentFragment(); - - for (var i = 0; i < self.config.showMonths; i++) { - var d = new Date(self.currentYear, self.currentMonth, 1); - d.setMonth(self.currentMonth + i); - frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth())); - } - - self.daysContainer.appendChild(frag); - self.days = self.daysContainer.firstChild; - - if (self.config.mode === "range" && self.selectedDates.length === 1) { - onMouseOver(); - } - } - - function buildMonth() { - var container = createElement("div", "flatpickr-month"); - var monthNavFragment = window.document.createDocumentFragment(); - var monthElement = createElement("span", "cur-month"); - var yearInput = createNumberInput("cur-year", { - tabindex: "-1" - }); - var yearElement = yearInput.getElementsByTagName("input")[0]; - yearElement.setAttribute("aria-label", self.l10n.yearAriaLabel); - if (self.config.minDate) yearElement.setAttribute("data-min", self.config.minDate.getFullYear().toString()); - - if (self.config.maxDate) { - yearElement.setAttribute("data-max", self.config.maxDate.getFullYear().toString()); - yearElement.disabled = !!self.config.minDate && self.config.minDate.getFullYear() === self.config.maxDate.getFullYear(); - } - - var currentMonth = createElement("div", "flatpickr-current-month"); - currentMonth.appendChild(monthElement); - currentMonth.appendChild(yearInput); - monthNavFragment.appendChild(currentMonth); - container.appendChild(monthNavFragment); - return { - container: container, - yearElement: yearElement, - monthElement: monthElement - }; - } - - function buildMonths() { - clearNode(self.monthNav); - self.monthNav.appendChild(self.prevMonthNav); - - for (var m = self.config.showMonths; m--;) { - var month = buildMonth(); - self.yearElements.push(month.yearElement); - self.monthElements.push(month.monthElement); - self.monthNav.appendChild(month.container); - } - - self.monthNav.appendChild(self.nextMonthNav); - } - - function buildMonthNav() { - self.monthNav = createElement("div", "flatpickr-months"); - self.yearElements = []; - self.monthElements = []; - self.prevMonthNav = createElement("span", "flatpickr-prev-month"); - self.prevMonthNav.innerHTML = self.config.prevArrow; - self.nextMonthNav = createElement("span", "flatpickr-next-month"); - self.nextMonthNav.innerHTML = self.config.nextArrow; - buildMonths(); - Object.defineProperty(self, "_hidePrevMonthArrow", { - get: function get() { - return self.__hidePrevMonthArrow; - }, - set: function set(bool) { - if (self.__hidePrevMonthArrow !== bool) { - toggleClass(self.prevMonthNav, "disabled", bool); - self.__hidePrevMonthArrow = bool; - } - } - }); - Object.defineProperty(self, "_hideNextMonthArrow", { - get: function get() { - return self.__hideNextMonthArrow; - }, - set: function set(bool) { - if (self.__hideNextMonthArrow !== bool) { - toggleClass(self.nextMonthNav, "disabled", bool); - self.__hideNextMonthArrow = bool; - } - } - }); - self.currentYearElement = self.yearElements[0]; - updateNavigationCurrentMonth(); - return self.monthNav; - } - - function buildTime() { - self.calendarContainer.classList.add("hasTime"); - if (self.config.noCalendar) self.calendarContainer.classList.add("noCalendar"); - self.timeContainer = createElement("div", "flatpickr-time"); - self.timeContainer.tabIndex = -1; - var separator = createElement("span", "flatpickr-time-separator", ":"); - var hourInput = createNumberInput("flatpickr-hour"); - self.hourElement = hourInput.getElementsByTagName("input")[0]; - var minuteInput = createNumberInput("flatpickr-minute"); - self.minuteElement = minuteInput.getElementsByTagName("input")[0]; - self.hourElement.tabIndex = self.minuteElement.tabIndex = -1; - self.hourElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getHours() : self.config.time_24hr ? self.config.defaultHour : military2ampm(self.config.defaultHour)); - self.minuteElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getMinutes() : self.config.defaultMinute); - self.hourElement.setAttribute("data-step", self.config.hourIncrement.toString()); - self.minuteElement.setAttribute("data-step", self.config.minuteIncrement.toString()); - self.hourElement.setAttribute("data-min", self.config.time_24hr ? "0" : "1"); - self.hourElement.setAttribute("data-max", self.config.time_24hr ? "23" : "12"); - self.minuteElement.setAttribute("data-min", "0"); - self.minuteElement.setAttribute("data-max", "59"); - self.timeContainer.appendChild(hourInput); - self.timeContainer.appendChild(separator); - self.timeContainer.appendChild(minuteInput); - if (self.config.time_24hr) self.timeContainer.classList.add("time24hr"); - - if (self.config.enableSeconds) { - self.timeContainer.classList.add("hasSeconds"); - var secondInput = createNumberInput("flatpickr-second"); - self.secondElement = secondInput.getElementsByTagName("input")[0]; - self.secondElement.value = pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getSeconds() : self.config.defaultSeconds); - self.secondElement.setAttribute("data-step", self.minuteElement.getAttribute("data-step")); - self.secondElement.setAttribute("data-min", self.minuteElement.getAttribute("data-min")); - self.secondElement.setAttribute("data-max", self.minuteElement.getAttribute("data-max")); - self.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":")); - self.timeContainer.appendChild(secondInput); - } - - if (!self.config.time_24hr) { - self.amPM = createElement("span", "flatpickr-am-pm", self.l10n.amPM[int((self.latestSelectedDateObj ? self.hourElement.value : self.config.defaultHour) > 11)]); - self.amPM.title = self.l10n.toggleTitle; - self.amPM.tabIndex = -1; - self.timeContainer.appendChild(self.amPM); - } - - return self.timeContainer; - } - - function buildWeekdays() { - if (!self.weekdayContainer) self.weekdayContainer = createElement("div", "flatpickr-weekdays");else clearNode(self.weekdayContainer); - - for (var i = self.config.showMonths; i--;) { - var container = createElement("div", "flatpickr-weekdaycontainer"); - self.weekdayContainer.appendChild(container); - } - - updateWeekdays(); - return self.weekdayContainer; - } - - function updateWeekdays() { - var firstDayOfWeek = self.l10n.firstDayOfWeek; - var weekdays = self.l10n.weekdays.shorthand.concat(); - - if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) { - weekdays = weekdays.splice(firstDayOfWeek, weekdays.length).concat(weekdays.splice(0, firstDayOfWeek)); - } - - for (var i = self.config.showMonths; i--;) { - self.weekdayContainer.children[i].innerHTML = "\n \n " + weekdays.join("") + "\n \n "; - } - } - - function buildWeeks() { - self.calendarContainer.classList.add("hasWeeks"); - var weekWrapper = createElement("div", "flatpickr-weekwrapper"); - weekWrapper.appendChild(createElement("span", "flatpickr-weekday", self.l10n.weekAbbreviation)); - var weekNumbers = createElement("div", "flatpickr-weeks"); - weekWrapper.appendChild(weekNumbers); - return { - weekWrapper: weekWrapper, - weekNumbers: weekNumbers - }; - } - - function changeMonth(value, is_offset) { - if (is_offset === void 0) { - is_offset = true; - } - - var delta = is_offset ? value : value - self.currentMonth; - if (delta < 0 && self._hidePrevMonthArrow === true || delta > 0 && self._hideNextMonthArrow === true) return; - self.currentMonth += delta; - - if (self.currentMonth < 0 || self.currentMonth > 11) { - self.currentYear += self.currentMonth > 11 ? 1 : -1; - self.currentMonth = (self.currentMonth + 12) % 12; - triggerEvent("onYearChange"); - } - - buildDays(); - triggerEvent("onMonthChange"); - updateNavigationCurrentMonth(); - } - - function clear(triggerChangeEvent) { - if (triggerChangeEvent === void 0) { - triggerChangeEvent = true; - } - - self.input.value = ""; - if (self.altInput !== undefined) self.altInput.value = ""; - if (self.mobileInput !== undefined) self.mobileInput.value = ""; - self.selectedDates = []; - self.latestSelectedDateObj = undefined; - self.showTimeInput = false; - - if (self.config.enableTime === true) { - setDefaultHours(); - } - - self.redraw(); - if (triggerChangeEvent) triggerEvent("onChange"); - } - - function close() { - self.isOpen = false; - - if (!self.isMobile) { - self.calendarContainer.classList.remove("open"); - - self._input.classList.remove("active"); - } - - triggerEvent("onClose"); - } - - function destroy() { - if (self.config !== undefined) triggerEvent("onDestroy"); - - for (var i = self._handlers.length; i--;) { - var h = self._handlers[i]; - h.element.removeEventListener(h.event, h.handler, h.options); - } - - self._handlers = []; - - if (self.mobileInput) { - if (self.mobileInput.parentNode) self.mobileInput.parentNode.removeChild(self.mobileInput); - self.mobileInput = undefined; - } else if (self.calendarContainer && self.calendarContainer.parentNode) { - if (self.config.static && self.calendarContainer.parentNode) { - var wrapper = self.calendarContainer.parentNode; - wrapper.lastChild && wrapper.removeChild(wrapper.lastChild); - - if (wrapper.parentNode) { - while (wrapper.firstChild) { - wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper); - } - - wrapper.parentNode.removeChild(wrapper); - } - } else self.calendarContainer.parentNode.removeChild(self.calendarContainer); - } - - if (self.altInput) { - self.input.type = "text"; - if (self.altInput.parentNode) self.altInput.parentNode.removeChild(self.altInput); - delete self.altInput; - } - - if (self.input) { - self.input.type = self.input._type; - self.input.classList.remove("flatpickr-input"); - self.input.removeAttribute("readonly"); - self.input.value = ""; - } - - ["_showTimeInput", "latestSelectedDateObj", "_hideNextMonthArrow", "_hidePrevMonthArrow", "__hideNextMonthArrow", "__hidePrevMonthArrow", "isMobile", "isOpen", "selectedDateElem", "minDateHasTime", "maxDateHasTime", "days", "daysContainer", "_input", "_positionElement", "innerContainer", "rContainer", "monthNav", "todayDateElem", "calendarContainer", "weekdayContainer", "prevMonthNav", "nextMonthNav", "currentMonthElement", "currentYearElement", "navigationCurrentMonth", "selectedDateElem", "config"].forEach(function (k) { - try { - delete self[k]; - } catch (_) {} - }); - } - - function isCalendarElem(elem) { - if (self.config.appendTo && self.config.appendTo.contains(elem)) return true; - return self.calendarContainer.contains(elem); - } - - function documentClick(e) { - if (self.isOpen && !self.config.inline) { - var isCalendarElement = isCalendarElem(e.target); - var isInput = e.target === self.input || e.target === self.altInput || self.element.contains(e.target) || e.path && e.path.indexOf && (~e.path.indexOf(self.input) || ~e.path.indexOf(self.altInput)); - var lostFocus = e.type === "blur" ? isInput && e.relatedTarget && !isCalendarElem(e.relatedTarget) : !isInput && !isCalendarElement; - var isIgnored = !self.config.ignoredFocusElements.some(function (elem) { - return elem.contains(e.target); - }); - - if (lostFocus && isIgnored) { - self.close(); - - if (self.config.mode === "range" && self.selectedDates.length === 1) { - self.clear(false); - self.redraw(); - } - } - } - } - - function changeYear(newYear) { - if (!newYear || self.config.minDate && newYear < self.config.minDate.getFullYear() || self.config.maxDate && newYear > self.config.maxDate.getFullYear()) return; - var newYearNum = newYear, - isNewYear = self.currentYear !== newYearNum; - self.currentYear = newYearNum || self.currentYear; - - if (self.config.maxDate && self.currentYear === self.config.maxDate.getFullYear()) { - self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth); - } else if (self.config.minDate && self.currentYear === self.config.minDate.getFullYear()) { - self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth); - } - - if (isNewYear) { - self.redraw(); - triggerEvent("onYearChange"); - } - } - - function isEnabled(date, timeless) { - if (timeless === void 0) { - timeless = true; - } - - var dateToCheck = self.parseDate(date, undefined, timeless); - if (self.config.minDate && dateToCheck && compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0 || self.config.maxDate && dateToCheck && compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0) return false; - if (self.config.enable.length === 0 && self.config.disable.length === 0) return true; - if (dateToCheck === undefined) return false; - var bool = self.config.enable.length > 0, - array = bool ? self.config.enable : self.config.disable; - - for (var i = 0, d; i < array.length; i++) { - d = array[i]; - if (typeof d === "function" && d(dateToCheck)) return bool;else if (d instanceof Date && dateToCheck !== undefined && d.getTime() === dateToCheck.getTime()) return bool;else if (typeof d === "string" && dateToCheck !== undefined) { - var parsed = self.parseDate(d, undefined, true); - return parsed && parsed.getTime() === dateToCheck.getTime() ? bool : !bool; - } else if (typeof d === "object" && dateToCheck !== undefined && d.from && d.to && dateToCheck.getTime() >= d.from.getTime() && dateToCheck.getTime() <= d.to.getTime()) return bool; - } - - return !bool; - } - - function isInView(elem) { - if (self.daysContainer !== undefined) return elem.className.indexOf("hidden") === -1 && self.daysContainer.contains(elem); - return false; - } - - function onKeyDown(e) { - var isInput = e.target === self._input; - var allowInput = self.config.allowInput; - var allowKeydown = self.isOpen && (!allowInput || !isInput); - var allowInlineKeydown = self.config.inline && isInput && !allowInput; - - if (e.keyCode === 13 && isInput) { - if (allowInput) { - self.setDate(self._input.value, true, e.target === self.altInput ? self.config.altFormat : self.config.dateFormat); - return e.target.blur(); - } else self.open(); - } else if (isCalendarElem(e.target) || allowKeydown || allowInlineKeydown) { - var isTimeObj = !!self.timeContainer && self.timeContainer.contains(e.target); - - switch (e.keyCode) { - case 13: - if (isTimeObj) updateTime();else selectDate(e); - break; - - case 27: - e.preventDefault(); - focusAndClose(); - break; - - case 8: - case 46: - if (isInput && !self.config.allowInput) { - e.preventDefault(); - self.clear(); - } - - break; - - case 37: - case 39: - if (!isTimeObj) { - e.preventDefault(); - - if (self.daysContainer !== undefined && (allowInput === false || isInView(document.activeElement))) { - var _delta = e.keyCode === 39 ? 1 : -1; - - if (!e.ctrlKey) focusOnDay(undefined, _delta);else { - changeMonth(_delta); - focusOnDay(getFirstAvailableDay(1), 0); - } - } - } else if (self.hourElement) self.hourElement.focus(); - - break; - - case 38: - case 40: - e.preventDefault(); - var delta = e.keyCode === 40 ? 1 : -1; - - if (self.daysContainer && e.target.$i !== undefined) { - if (e.ctrlKey) { - changeYear(self.currentYear - delta); - focusOnDay(getFirstAvailableDay(1), 0); - } else if (!isTimeObj) focusOnDay(undefined, delta * 7); - } else if (self.config.enableTime) { - if (!isTimeObj && self.hourElement) self.hourElement.focus(); - updateTime(e); - - self._debouncedChange(); - } - - break; - - case 9: - if (!isTimeObj) { - self.element.focus(); - break; - } - - var elems = [self.hourElement, self.minuteElement, self.secondElement, self.amPM].filter(function (x) { - return x; - }); - var i = elems.indexOf(e.target); - - if (i !== -1) { - var target = elems[i + (e.shiftKey ? -1 : 1)]; - - if (target !== undefined) { - e.preventDefault(); - target.focus(); - } else { - self.element.focus(); - } - } - - break; - - default: - break; - } - } - - if (self.amPM !== undefined && e.target === self.amPM) { - switch (e.key) { - case self.l10n.amPM[0].charAt(0): - case self.l10n.amPM[0].charAt(0).toLowerCase(): - self.amPM.textContent = self.l10n.amPM[0]; - setHoursFromInputs(); - updateValue(); - break; - - case self.l10n.amPM[1].charAt(0): - case self.l10n.amPM[1].charAt(0).toLowerCase(): - self.amPM.textContent = self.l10n.amPM[1]; - setHoursFromInputs(); - updateValue(); - break; - } - } - - triggerEvent("onKeyDown", e); - } - - function onMouseOver(elem) { - if (self.selectedDates.length !== 1 || elem && (!elem.classList.contains("flatpickr-day") || elem.classList.contains("disabled"))) return; - var hoverDate = elem ? elem.dateObj.getTime() : self.days.firstElementChild.dateObj.getTime(), - initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), - rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), - rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime()), - lastDate = self.daysContainer.lastChild.lastChild.dateObj.getTime(); - var containsDisabled = false; - var minRange = 0, - maxRange = 0; - - for (var t = rangeStartDate; t < lastDate; t += duration.DAY) { - if (!isEnabled(new Date(t), true)) { - containsDisabled = containsDisabled || t > rangeStartDate && t < rangeEndDate; - if (t < initialDate && (!minRange || t > minRange)) minRange = t;else if (t > initialDate && (!maxRange || t < maxRange)) maxRange = t; - } - } - - for (var m = 0; m < self.config.showMonths; m++) { - var month = self.daysContainer.children[m]; - var prevMonth = self.daysContainer.children[m - 1]; - - var _loop = function _loop(i, l) { - var dayElem = month.children[i], - date = dayElem.dateObj; - var timestamp = date.getTime(); - var outOfRange = minRange > 0 && timestamp < minRange || maxRange > 0 && timestamp > maxRange; - - if (outOfRange) { - dayElem.classList.add("notAllowed"); - ["inRange", "startRange", "endRange"].forEach(function (c) { - dayElem.classList.remove(c); - }); - return "continue"; - } else if (containsDisabled && !outOfRange) return "continue"; - - ["startRange", "inRange", "endRange", "notAllowed"].forEach(function (c) { - dayElem.classList.remove(c); - }); - - if (elem !== undefined) { - elem.classList.add(hoverDate < self.selectedDates[0].getTime() ? "startRange" : "endRange"); - - if (month.contains(elem) || !(m > 0 && prevMonth && prevMonth.lastChild.dateObj.getTime() >= timestamp)) { - if (initialDate < hoverDate && timestamp === initialDate) dayElem.classList.add("startRange");else if (initialDate > hoverDate && timestamp === initialDate) dayElem.classList.add("endRange"); - if (timestamp >= minRange && (maxRange === 0 || timestamp <= maxRange) && isBetween(timestamp, initialDate, hoverDate)) dayElem.classList.add("inRange"); - } - } - }; - - for (var i = 0, l = month.children.length; i < l; i++) { - var _ret = _loop(i, l); - - if (_ret === "continue") continue; - } - } - } - - function onResize() { - if (self.isOpen && !self.config.static && !self.config.inline) positionCalendar(); - } - - function open(e, positionElement) { - if (positionElement === void 0) { - positionElement = self._positionElement; - } - - if (self.isMobile === true) { - if (e) { - e.preventDefault(); - e.target && e.target.blur(); - } - - if (self.mobileInput !== undefined) { - self.mobileInput.focus(); - self.mobileInput.click(); - } - - triggerEvent("onOpen"); - return; - } - - if (self._input.disabled || self.config.inline) return; - var wasOpen = self.isOpen; - self.isOpen = true; - - if (!wasOpen) { - self.calendarContainer.classList.add("open"); - - self._input.classList.add("active"); - - triggerEvent("onOpen"); - positionCalendar(positionElement); - } - - if (self.config.enableTime === true && self.config.noCalendar === true) { - if (self.selectedDates.length === 0) { - self.setDate(self.config.minDate !== undefined ? new Date(self.config.minDate.getTime()) : new Date(), false); - setDefaultHours(); - updateValue(); - } - - if (self.config.allowInput === false && (e === undefined || !self.timeContainer.contains(e.relatedTarget))) { - setTimeout(function () { - return self.hourElement.select(); - }, 50); - } - } - } - - function minMaxDateSetter(type) { - return function (date) { - var dateObj = self.config["_" + type + "Date"] = self.parseDate(date, self.config.dateFormat); - var inverseDateObj = self.config["_" + (type === "min" ? "max" : "min") + "Date"]; - - if (dateObj !== undefined) { - self[type === "min" ? "minDateHasTime" : "maxDateHasTime"] = dateObj.getHours() > 0 || dateObj.getMinutes() > 0 || dateObj.getSeconds() > 0; - } - - if (self.selectedDates) { - self.selectedDates = self.selectedDates.filter(function (d) { - return isEnabled(d); - }); - if (!self.selectedDates.length && type === "min") setHoursFromDate(dateObj); - updateValue(); - } - - if (self.daysContainer) { - redraw(); - if (dateObj !== undefined) self.currentYearElement[type] = dateObj.getFullYear().toString();else self.currentYearElement.removeAttribute(type); - self.currentYearElement.disabled = !!inverseDateObj && dateObj !== undefined && inverseDateObj.getFullYear() === dateObj.getFullYear(); - } - }; - } - - function parseConfig() { - var boolOpts = ["wrap", "weekNumbers", "allowInput", "clickOpens", "time_24hr", "enableTime", "noCalendar", "altInput", "shorthandCurrentMonth", "inline", "static", "enableSeconds", "disableMobile"]; - var userConfig = Object.assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {}))); - var formats$$1 = {}; - self.config.parseDate = userConfig.parseDate; - self.config.formatDate = userConfig.formatDate; - Object.defineProperty(self.config, "enable", { - get: function get() { - return self.config._enable; - }, - set: function set(dates) { - self.config._enable = parseDateRules(dates); - } - }); - Object.defineProperty(self.config, "disable", { - get: function get() { - return self.config._disable; - }, - set: function set(dates) { - self.config._disable = parseDateRules(dates); - } - }); - var timeMode = userConfig.mode === "time"; - - if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) { - formats$$1.dateFormat = userConfig.noCalendar || timeMode ? "H:i" + (userConfig.enableSeconds ? ":S" : "") : flatpickr.defaultConfig.dateFormat + " H:i" + (userConfig.enableSeconds ? ":S" : ""); - } - - if (userConfig.altInput && (userConfig.enableTime || timeMode) && !userConfig.altFormat) { - formats$$1.altFormat = userConfig.noCalendar || timeMode ? "h:i" + (userConfig.enableSeconds ? ":S K" : " K") : flatpickr.defaultConfig.altFormat + (" h:i" + (userConfig.enableSeconds ? ":S" : "") + " K"); - } - - Object.defineProperty(self.config, "minDate", { - get: function get() { - return self.config._minDate; - }, - set: minMaxDateSetter("min") - }); - Object.defineProperty(self.config, "maxDate", { - get: function get() { - return self.config._maxDate; - }, - set: minMaxDateSetter("max") - }); - - var minMaxTimeSetter = function minMaxTimeSetter(type) { - return function (val) { - self.config[type === "min" ? "_minTime" : "_maxTime"] = self.parseDate(val, "H:i"); - }; - }; - - Object.defineProperty(self.config, "minTime", { - get: function get() { - return self.config._minTime; - }, - set: minMaxTimeSetter("min") - }); - Object.defineProperty(self.config, "maxTime", { - get: function get() { - return self.config._maxTime; - }, - set: minMaxTimeSetter("max") - }); - - if (userConfig.mode === "time") { - self.config.noCalendar = true; - self.config.enableTime = true; - } - - Object.assign(self.config, formats$$1, userConfig); - - for (var i = 0; i < boolOpts.length; i++) { - self.config[boolOpts[i]] = self.config[boolOpts[i]] === true || self.config[boolOpts[i]] === "true"; - } - - HOOKS.filter(function (hook) { - return self.config[hook] !== undefined; - }).forEach(function (hook) { - self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance); - }); - self.isMobile = !self.config.disableMobile && !self.config.inline && self.config.mode === "single" && !self.config.disable.length && !self.config.enable.length && !self.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); - - for (var _i = 0; _i < self.config.plugins.length; _i++) { - var pluginConf = self.config.plugins[_i](self) || {}; - - for (var key in pluginConf) { - if (HOOKS.indexOf(key) > -1) { - self.config[key] = arrayify(pluginConf[key]).map(bindToInstance).concat(self.config[key]); - } else if (typeof userConfig[key] === "undefined") self.config[key] = pluginConf[key]; - } - } - - triggerEvent("onParseConfig"); - } - - function setupLocale() { - if (typeof self.config.locale !== "object" && typeof flatpickr.l10ns[self.config.locale] === "undefined") self.config.errorHandler(new Error("flatpickr: invalid locale " + self.config.locale)); - self.l10n = Object.assign({}, flatpickr.l10ns.default, typeof self.config.locale === "object" ? self.config.locale : self.config.locale !== "default" ? flatpickr.l10ns[self.config.locale] : undefined); - tokenRegex.K = "(" + self.l10n.amPM[0] + "|" + self.l10n.amPM[1] + "|" + self.l10n.amPM[0].toLowerCase() + "|" + self.l10n.amPM[1].toLowerCase() + ")"; - self.formatDate = createDateFormatter(self); - self.parseDate = createDateParser({ - config: self.config, - l10n: self.l10n - }); - } - - function positionCalendar(customPositionElement) { - if (self.calendarContainer === undefined) return; - triggerEvent("onPreCalendarPosition"); - var positionElement = customPositionElement || self._positionElement; - var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, function (acc, child) { - return acc + child.offsetHeight; - }, 0), - calendarWidth = self.calendarContainer.offsetWidth, - configPos = self.config.position.split(" "), - configPosVertical = configPos[0], - configPosHorizontal = configPos.length > 1 ? configPos[1] : null, - inputBounds = positionElement.getBoundingClientRect(), - distanceFromBottom = window.innerHeight - inputBounds.bottom, - showOnTop = configPosVertical === "above" || configPosVertical !== "below" && distanceFromBottom < calendarHeight && inputBounds.top > calendarHeight; - var top = window.pageYOffset + inputBounds.top + (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2); - toggleClass(self.calendarContainer, "arrowTop", !showOnTop); - toggleClass(self.calendarContainer, "arrowBottom", showOnTop); - if (self.config.inline) return; - var left = window.pageXOffset + inputBounds.left - (configPosHorizontal != null && configPosHorizontal === "center" ? (calendarWidth - inputBounds.width) / 2 : 0); - var right = window.document.body.offsetWidth - inputBounds.right; - var rightMost = left + calendarWidth > window.document.body.offsetWidth; - toggleClass(self.calendarContainer, "rightMost", rightMost); - if (self.config.static) return; - self.calendarContainer.style.top = top + "px"; - - if (!rightMost) { - self.calendarContainer.style.left = left + "px"; - self.calendarContainer.style.right = "auto"; - } else { - self.calendarContainer.style.left = "auto"; - self.calendarContainer.style.right = right + "px"; - } - } - - function redraw() { - if (self.config.noCalendar || self.isMobile) return; - updateNavigationCurrentMonth(); - buildDays(); - } - - function focusAndClose() { - self._input.focus(); - - if (window.navigator.userAgent.indexOf("MSIE") !== -1 || navigator.msMaxTouchPoints !== undefined) { - setTimeout(self.close, 0); - } else { - self.close(); - } - } - - function selectDate(e) { - e.preventDefault(); - e.stopPropagation(); - - var isSelectable = function isSelectable(day) { - return day.classList && day.classList.contains("flatpickr-day") && !day.classList.contains("disabled") && !day.classList.contains("notAllowed"); - }; - - var t = findParent(e.target, isSelectable); - if (t === undefined) return; - var target = t; - var selectedDate = self.latestSelectedDateObj = new Date(target.dateObj.getTime()); - var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth || selectedDate.getMonth() > self.currentMonth + self.config.showMonths - 1) && self.config.mode !== "range"; - self.selectedDateElem = target; - if (self.config.mode === "single") self.selectedDates = [selectedDate];else if (self.config.mode === "multiple") { - var selectedIndex = isDateSelected(selectedDate); - if (selectedIndex) self.selectedDates.splice(parseInt(selectedIndex), 1);else self.selectedDates.push(selectedDate); - } else if (self.config.mode === "range") { - if (self.selectedDates.length === 2) self.clear(false); - self.selectedDates.push(selectedDate); - if (compareDates(selectedDate, self.selectedDates[0], true) !== 0) self.selectedDates.sort(function (a, b) { - return a.getTime() - b.getTime(); - }); - } - setHoursFromInputs(); - - if (shouldChangeMonth) { - var isNewYear = self.currentYear !== selectedDate.getFullYear(); - self.currentYear = selectedDate.getFullYear(); - self.currentMonth = selectedDate.getMonth(); - if (isNewYear) triggerEvent("onYearChange"); - triggerEvent("onMonthChange"); - } - - updateNavigationCurrentMonth(); - buildDays(); - updateValue(); - if (self.config.enableTime) setTimeout(function () { - return self.showTimeInput = true; - }, 50); - if (!shouldChangeMonth && self.config.mode !== "range" && self.config.showMonths === 1) focusOnDayElem(target);else self.selectedDateElem && self.selectedDateElem.focus(); - if (self.hourElement !== undefined) setTimeout(function () { - return self.hourElement !== undefined && self.hourElement.select(); - }, 451); - - if (self.config.closeOnSelect) { - var single = self.config.mode === "single" && !self.config.enableTime; - var range = self.config.mode === "range" && self.selectedDates.length === 2 && !self.config.enableTime; - - if (single || range) { - focusAndClose(); - } - } - - triggerChange(); - } - - var CALLBACKS = { - locale: [setupLocale, updateWeekdays], - showMonths: [buildMonths, setCalendarWidth, buildWeekdays] - }; - - function set(option, value) { - if (option !== null && typeof option === "object") Object.assign(self.config, option);else { - self.config[option] = value; - if (CALLBACKS[option] !== undefined) CALLBACKS[option].forEach(function (x) { - return x(); - });else if (HOOKS.indexOf(option) > -1) self.config[option] = arrayify(value); - } - self.redraw(); - jumpToDate(); - updateValue(false); - } - - function setSelectedDate(inputDate, format) { - var dates = []; - if (inputDate instanceof Array) dates = inputDate.map(function (d) { - return self.parseDate(d, format); - });else if (inputDate instanceof Date || typeof inputDate === "number") dates = [self.parseDate(inputDate, format)];else if (typeof inputDate === "string") { - switch (self.config.mode) { - case "single": - case "time": - dates = [self.parseDate(inputDate, format)]; - break; - - case "multiple": - dates = inputDate.split(self.config.conjunction).map(function (date) { - return self.parseDate(date, format); - }); - break; - - case "range": - dates = inputDate.split(self.l10n.rangeSeparator).map(function (date) { - return self.parseDate(date, format); - }); - break; - - default: - break; - } - } else self.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(inputDate))); - self.selectedDates = dates.filter(function (d) { - return d instanceof Date && isEnabled(d, false); - }); - if (self.config.mode === "range") self.selectedDates.sort(function (a, b) { - return a.getTime() - b.getTime(); - }); - } - - function setDate(date, triggerChange, format) { - if (triggerChange === void 0) { - triggerChange = false; - } - - if (format === void 0) { - format = self.config.dateFormat; - } - - if (date !== 0 && !date || date instanceof Array && date.length === 0) return self.clear(triggerChange); - setSelectedDate(date, format); - self.showTimeInput = self.selectedDates.length > 0; - self.latestSelectedDateObj = self.selectedDates[0]; - self.redraw(); - jumpToDate(); - setHoursFromDate(); - updateValue(triggerChange); - if (triggerChange) triggerEvent("onChange"); - } - - function parseDateRules(arr) { - return arr.slice().map(function (rule) { - if (typeof rule === "string" || typeof rule === "number" || rule instanceof Date) { - return self.parseDate(rule, undefined, true); - } else if (rule && typeof rule === "object" && rule.from && rule.to) return { - from: self.parseDate(rule.from, undefined), - to: self.parseDate(rule.to, undefined) - }; - - return rule; - }).filter(function (x) { - return x; - }); - } - - function setupDates() { - self.selectedDates = []; - self.now = self.parseDate(self.config.now) || new Date(); - var preloadedDate = self.config.defaultDate || ((self.input.nodeName === "INPUT" || self.input.nodeName === "TEXTAREA") && self.input.placeholder && self.input.value === self.input.placeholder ? null : self.input.value); - if (preloadedDate) setSelectedDate(preloadedDate, self.config.dateFormat); - var initialDate = self.selectedDates.length > 0 ? self.selectedDates[0] : self.config.minDate && self.config.minDate.getTime() > self.now.getTime() ? self.config.minDate : self.config.maxDate && self.config.maxDate.getTime() < self.now.getTime() ? self.config.maxDate : self.now; - self.currentYear = initialDate.getFullYear(); - self.currentMonth = initialDate.getMonth(); - if (self.selectedDates.length > 0) self.latestSelectedDateObj = self.selectedDates[0]; - if (self.config.minTime !== undefined) self.config.minTime = self.parseDate(self.config.minTime, "H:i"); - if (self.config.maxTime !== undefined) self.config.maxTime = self.parseDate(self.config.maxTime, "H:i"); - self.minDateHasTime = !!self.config.minDate && (self.config.minDate.getHours() > 0 || self.config.minDate.getMinutes() > 0 || self.config.minDate.getSeconds() > 0); - self.maxDateHasTime = !!self.config.maxDate && (self.config.maxDate.getHours() > 0 || self.config.maxDate.getMinutes() > 0 || self.config.maxDate.getSeconds() > 0); - Object.defineProperty(self, "showTimeInput", { - get: function get() { - return self._showTimeInput; - }, - set: function set(bool) { - self._showTimeInput = bool; - if (self.calendarContainer) toggleClass(self.calendarContainer, "showTimeInput", bool); - self.isOpen && positionCalendar(); - } - }); - } - - function setupInputs() { - self.input = self.config.wrap ? element.querySelector("[data-input]") : element; - - if (!self.input) { - self.config.errorHandler(new Error("Invalid input element specified")); - return; - } - - self.input._type = self.input.type; - self.input.type = "text"; - self.input.classList.add("flatpickr-input"); - self._input = self.input; - - if (self.config.altInput) { - self.altInput = createElement(self.input.nodeName, self.input.className + " " + self.config.altInputClass); - self._input = self.altInput; - self.altInput.placeholder = self.input.placeholder; - self.altInput.disabled = self.input.disabled; - self.altInput.required = self.input.required; - self.altInput.tabIndex = self.input.tabIndex; - self.altInput.type = "text"; - self.input.setAttribute("type", "hidden"); - if (!self.config.static && self.input.parentNode) self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling); - } - - if (!self.config.allowInput) self._input.setAttribute("readonly", "readonly"); - self._positionElement = self.config.positionElement || self._input; - } - - function setupMobile() { - var inputType = self.config.enableTime ? self.config.noCalendar ? "time" : "datetime-local" : "date"; - self.mobileInput = createElement("input", self.input.className + " flatpickr-mobile"); - self.mobileInput.step = self.input.getAttribute("step") || "any"; - self.mobileInput.tabIndex = 1; - self.mobileInput.type = inputType; - self.mobileInput.disabled = self.input.disabled; - self.mobileInput.required = self.input.required; - self.mobileInput.placeholder = self.input.placeholder; - self.mobileFormatStr = inputType === "datetime-local" ? "Y-m-d\\TH:i:S" : inputType === "date" ? "Y-m-d" : "H:i:S"; - - if (self.selectedDates.length > 0) { - self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr); - } - - if (self.config.minDate) self.mobileInput.min = self.formatDate(self.config.minDate, "Y-m-d"); - if (self.config.maxDate) self.mobileInput.max = self.formatDate(self.config.maxDate, "Y-m-d"); - self.input.type = "hidden"; - if (self.altInput !== undefined) self.altInput.type = "hidden"; - - try { - if (self.input.parentNode) self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling); - } catch (_a) {} - - bind(self.mobileInput, "change", function (e) { - self.setDate(e.target.value, false, self.mobileFormatStr); - triggerEvent("onChange"); - triggerEvent("onClose"); - }); - } - - function toggle(e) { - if (self.isOpen === true) return self.close(); - self.open(e); - } - - function triggerEvent(event, data) { - if (self.config === undefined) return; - var hooks = self.config[event]; - - if (hooks !== undefined && hooks.length > 0) { - for (var i = 0; hooks[i] && i < hooks.length; i++) { - hooks[i](self.selectedDates, self.input.value, self, data); - } - } - - if (event === "onChange") { - self.input.dispatchEvent(createEvent("change")); - self.input.dispatchEvent(createEvent("input")); - } - } - - function createEvent(name) { - var e = document.createEvent("Event"); - e.initEvent(name, true, true); - return e; - } - - function isDateSelected(date) { - for (var i = 0; i < self.selectedDates.length; i++) { - if (compareDates(self.selectedDates[i], date) === 0) return "" + i; - } - - return false; - } - - function isDateInRange(date) { - if (self.config.mode !== "range" || self.selectedDates.length < 2) return false; - return compareDates(date, self.selectedDates[0]) >= 0 && compareDates(date, self.selectedDates[1]) <= 0; - } - - function updateNavigationCurrentMonth() { - if (self.config.noCalendar || self.isMobile || !self.monthNav) return; - self.yearElements.forEach(function (yearElement, i) { - var d = new Date(self.currentYear, self.currentMonth, 1); - d.setMonth(self.currentMonth + i); - self.monthElements[i].textContent = monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + " "; - yearElement.value = d.getFullYear().toString(); - }); - self._hidePrevMonthArrow = self.config.minDate !== undefined && (self.currentYear === self.config.minDate.getFullYear() ? self.currentMonth <= self.config.minDate.getMonth() : self.currentYear < self.config.minDate.getFullYear()); - self._hideNextMonthArrow = self.config.maxDate !== undefined && (self.currentYear === self.config.maxDate.getFullYear() ? self.currentMonth + 1 > self.config.maxDate.getMonth() : self.currentYear > self.config.maxDate.getFullYear()); - } - - function getDateStr(format) { - return self.selectedDates.map(function (dObj) { - return self.formatDate(dObj, format); - }).filter(function (d, i, arr) { - return self.config.mode !== "range" || self.config.enableTime || arr.indexOf(d) === i; - }).join(self.config.mode !== "range" ? self.config.conjunction : self.l10n.rangeSeparator); - } - - function updateValue(triggerChange) { - if (triggerChange === void 0) { - triggerChange = true; - } - - if (self.selectedDates.length === 0) return self.clear(triggerChange); - - if (self.mobileInput !== undefined && self.mobileFormatStr) { - self.mobileInput.value = self.latestSelectedDateObj !== undefined ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr) : ""; - } - - self.input.value = getDateStr(self.config.dateFormat); - - if (self.altInput !== undefined) { - self.altInput.value = getDateStr(self.config.altFormat); - } - - if (triggerChange !== false) triggerEvent("onValueUpdate"); - } - - function onMonthNavClick(e) { - e.preventDefault(); - var isPrevMonth = self.prevMonthNav.contains(e.target); - var isNextMonth = self.nextMonthNav.contains(e.target); - - if (isPrevMonth || isNextMonth) { - changeMonth(isPrevMonth ? -1 : 1); - } else if (self.yearElements.indexOf(e.target) >= 0) { - e.target.select(); - } else if (e.target.classList.contains("arrowUp")) { - self.changeYear(self.currentYear + 1); - } else if (e.target.classList.contains("arrowDown")) { - self.changeYear(self.currentYear - 1); - } - } - - function timeWrapper(e) { - e.preventDefault(); - var isKeyDown = e.type === "keydown", - input = e.target; - - if (self.amPM !== undefined && e.target === self.amPM) { - self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])]; - } - - var min = parseFloat(input.getAttribute("data-min")), - max = parseFloat(input.getAttribute("data-max")), - step = parseFloat(input.getAttribute("data-step")), - curValue = parseInt(input.value, 10), - delta = e.delta || (isKeyDown ? e.which === 38 ? 1 : -1 : 0); - var newValue = curValue + step * delta; - - if (typeof input.value !== "undefined" && input.value.length === 2) { - var isHourElem = input === self.hourElement, - isMinuteElem = input === self.minuteElement; - - if (newValue < min) { - newValue = max + newValue + int(!isHourElem) + (int(isHourElem) && int(!self.amPM)); - if (isMinuteElem) incrementNumInput(undefined, -1, self.hourElement); - } else if (newValue > max) { - newValue = input === self.hourElement ? newValue - max - int(!self.amPM) : min; - if (isMinuteElem) incrementNumInput(undefined, 1, self.hourElement); - } - - if (self.amPM && isHourElem && (step === 1 ? newValue + curValue === 23 : Math.abs(newValue - curValue) > step)) { - self.amPM.textContent = self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])]; - } - - input.value = pad(newValue); - } - } - - init(); - return self; - } - - function _flatpickr(nodeList, config) { - var nodes = Array.prototype.slice.call(nodeList); - var instances = []; - - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - - try { - if (node.getAttribute("data-fp-omit") !== null) continue; - - if (node._flatpickr !== undefined) { - node._flatpickr.destroy(); - - node._flatpickr = undefined; - } - - node._flatpickr = FlatpickrInstance(node, config || {}); - instances.push(node._flatpickr); - } catch (e) { - console.error(e); - } - } - - return instances.length === 1 ? instances[0] : instances; - } - - if (typeof HTMLElement !== "undefined") { - HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) { - return _flatpickr(this, config); - }; - - HTMLElement.prototype.flatpickr = function (config) { - return _flatpickr([this], config); - }; - } - - var flatpickr = function flatpickr(selector, config) { - if (selector instanceof NodeList) return _flatpickr(selector, config);else if (typeof selector === "string") return _flatpickr(window.document.querySelectorAll(selector), config); - return _flatpickr([selector], config); - }; - - flatpickr.defaultConfig = defaults; - flatpickr.l10ns = { - en: Object.assign({}, english), - default: Object.assign({}, english) - }; - - flatpickr.localize = function (l10n) { - flatpickr.l10ns.default = Object.assign({}, flatpickr.l10ns.default, l10n); - }; - - flatpickr.setDefaults = function (config) { - flatpickr.defaultConfig = Object.assign({}, flatpickr.defaultConfig, config); - }; - - flatpickr.parseDate = createDateParser({}); - flatpickr.formatDate = createDateFormatter({}); - flatpickr.compareDates = compareDates; - - if (typeof jQuery !== "undefined") { - jQuery.fn.flatpickr = function (config) { - return _flatpickr(this, config); - }; - } - - Date.prototype.fp_incr = function (days) { - return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === "string" ? parseInt(days, 10) : days)); - }; - - if (typeof window !== "undefined") { - window.flatpickr = flatpickr; - } - - return flatpickr; - -}))); - - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(4); -__webpack_require__(62); -module.exports = __webpack_require__(63); - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -Vue.component("flash-wrapper", __webpack_require__(5)); -Vue.component("flash", __webpack_require__(8)); -Vue.component("tabs", __webpack_require__(11)); -Vue.component("tab", __webpack_require__(14)); -Vue.component("accordian", __webpack_require__(17)); -Vue.component("tree-view", __webpack_require__(20)); -Vue.component("tree-item", __webpack_require__(22)); -Vue.component("tree-checkbox", __webpack_require__(24)); -Vue.component("tree-radio", __webpack_require__(27)); -Vue.component("modal", __webpack_require__(30)); -Vue.component("image-upload", __webpack_require__(33)); -Vue.component("image-wrapper", __webpack_require__(40)); -Vue.component("image-item", __webpack_require__(43)); -Vue.directive("slugify", __webpack_require__(46)); -Vue.directive("code", __webpack_require__(48)); -Vue.directive("alert", __webpack_require__(50)); -Vue.component("datetime", __webpack_require__(52)); -Vue.component("date", __webpack_require__(55)); - -__webpack_require__(58); - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(6) -/* template */ -var __vue_template__ = __webpack_require__(7) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/flash-wrapper.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-34b58a1a", Component.options) - } else { - hotAPI.reload("data-v-34b58a1a", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 6 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - uid: 1, - - flashes: [] - }; - }, - - methods: { - addFlash: function addFlash(flash) { - flash.uid = this.uid++; - this.flashes.push(flash); - }, - - removeFlash: function removeFlash(flash) { - var index = this.flashes.indexOf(flash); - - this.flashes.splice(index, 1); - } - } -}); - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "transition-group", - { - staticClass: "alert-wrapper", - attrs: { tag: "div", name: "flash-wrapper" } - }, - _vm._l(_vm.flashes, function(flash) { - return _c("flash", { - key: flash.uid, - attrs: { flash: flash }, - on: { - onRemoveFlash: function($event) { - _vm.removeFlash($event) - } - } - }) - }), - 1 - ) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-34b58a1a", module.exports) - } -} - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(9) -/* template */ -var __vue_template__ = __webpack_require__(10) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/flash.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-feee1d58", Component.options) - } else { - hotAPI.reload("data-v-feee1d58", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 9 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: ['flash'], - - created: function created() { - var this_this = this; - setTimeout(function () { - this_this.$emit('onRemoveFlash', this_this.flash); - }, 5000); - }, - - methods: { - remove: function remove() { - this.$emit('onRemoveFlash', this.flash); - } - } -}); - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("div", { staticClass: "alert", class: _vm.flash.type }, [ - _c("span", { - staticClass: "icon white-cross-sm-icon", - on: { click: _vm.remove } - }), - _vm._v(" "), - _c("p", [_vm._v(_vm._s(_vm.flash.message))]) - ]) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-feee1d58", module.exports) - } -} - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(12) -/* template */ -var __vue_template__ = __webpack_require__(13) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/tabs/tabs.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-7e97b353", Component.options) - } else { - hotAPI.reload("data-v-7e97b353", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 12 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - tabs: [] - }; - }, - - created: function created() { - this.tabs = this.$children; - }, - - - methods: { - selectTab: function selectTab(selectedTab) { - this.tabs.forEach(function (tab) { - tab.isActive = tab.name == selectedTab.name; - }); - } - } -}); - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("div", [ - _c("div", { staticClass: "tabs" }, [ - _c( - "ul", - _vm._l(_vm.tabs, function(tab) { - return _c( - "li", - { - class: { active: tab.isActive }, - on: { - click: function($event) { - _vm.selectTab(tab) - } - } - }, - [_c("a", [_vm._v(_vm._s(tab.name))])] - ) - }), - 0 - ) - ]), - _vm._v(" "), - _c("div", { staticClass: "tabs-content" }, [_vm._t("default")], 2) - ]) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-7e97b353", module.exports) - } -} - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(15) -/* template */ -var __vue_template__ = __webpack_require__(16) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/tabs/tab.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-299e3060", Component.options) - } else { - hotAPI.reload("data-v-299e3060", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 15 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: { - name: { - required: true - }, - - selected: { - default: false - } - }, - - data: function data() { - return { - isActive: false - }; - }, - mounted: function mounted() { - this.isActive = this.selected; - } -}); - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "div", - { - directives: [ - { - name: "show", - rawName: "v-show", - value: _vm.isActive, - expression: "isActive" - } - ] - }, - [_vm._t("default")], - 2 - ) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-299e3060", module.exports) - } -} - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(18) -/* template */ -var __vue_template__ = __webpack_require__(19) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/accordian.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-d9e5880c", Component.options) - } else { - hotAPI.reload("data-v-d9e5880c", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 18 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: { - title: String, - id: String, - className: String, - active: Boolean - }, - - inject: ['$validator'], - - data: function data() { - return { - isActive: false, - imageData: '' - }; - }, - - mounted: function mounted() { - this.isActive = this.active; - }, - - methods: { - toggleAccordion: function toggleAccordion() { - this.isActive = !this.isActive; - } - }, - - computed: { - iconClass: function iconClass() { - return { - 'accordian-down-icon': !this.isActive, - 'accordian-up-icon': this.isActive - }; - } - } -}); - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "div", - { - staticClass: "accordian", - class: [_vm.isActive ? "active" : "", _vm.className], - attrs: { id: _vm.id } - }, - [ - _c( - "div", - { - staticClass: "accordian-header", - on: { - click: function($event) { - _vm.toggleAccordion() - } - } - }, - [ - _vm._t("header", [ - _vm._v("\n " + _vm._s(_vm.title) + "\n "), - _c("i", { staticClass: "icon", class: _vm.iconClass }) - ]) - ], - 2 - ), - _vm._v(" "), - _c("div", { staticClass: "accordian-content" }, [_vm._t("body")], 2) - ] - ) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-d9e5880c", module.exports) - } -} - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(21) -/* template */ -var __vue_template__ = null -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/tree-view/tree-view.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-2c07aa7d", Component.options) - } else { - hotAPI.reload("data-v-2c07aa7d", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 21 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); - - -/* harmony default export */ __webpack_exports__["default"] = ({ - name: 'tree-view', - - inheritAttrs: false, - - props: { - inputType: { - type: String, - required: false, - default: 'checkbox' - }, - - nameField: { - type: String, - required: false, - default: 'permissions' - }, - - idField: { - type: String, - required: false, - default: 'id' - }, - - valueField: { - type: String, - required: false, - default: 'value' - }, - - captionField: { - type: String, - required: false, - default: 'name' - }, - - childrenField: { - type: String, - required: false, - default: 'children' - }, - - items: { - type: [Array, String, Object], - required: false, - default: function _default() { - return []; - } - }, - - behavior: { - type: String, - required: false, - default: 'reactive' - }, - - value: { - type: [Array, String, Object], - required: false, - default: function _default() { - return []; - } - } - }, - - data: function data() { - return { - finalValues: [] - }; - }, - - computed: { - savedValues: function savedValues() { - if (!this.value) return []; - - if (this.inputType == 'radio') return [this.value]; - - return typeof this.value == 'string' ? JSON.parse(this.value) : this.value; - } - }, - - methods: { - generateChildren: function generateChildren() { - var childElements = []; - - var items = typeof this.items == 'string' ? JSON.parse(this.items) : this.items; - - for (var key in items) { - childElements.push(this.generateTreeItem(items[key])); - } - - return childElements; - }, - generateTreeItem: function generateTreeItem(item) { - var _this = this; - - return this.$createElement('tree-item', { - props: { - items: item, - value: this.finalValues, - savedValues: this.savedValues, - nameField: this.nameField, - inputType: this.inputType, - captionField: this.captionField, - childrenField: this.childrenField, - valueField: this.valueField, - idField: this.idField, - behavior: this.behavior - }, - on: { - input: function input(selection) { - _this.finalValues = selection; - } - } - }); - } - }, - - render: function render(createElement) { - return createElement('div', { - class: ['tree-container'] - }, [this.generateChildren()]); - } -}); - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(23) -/* template */ -var __vue_template__ = null -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/tree-view/tree-item.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-2af003eb", Component.options) - } else { - hotAPI.reload("data-v-2af003eb", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 23 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -/* harmony default export */ __webpack_exports__["default"] = ({ - name: 'tree-view', - - inheritAttrs: false, - - props: { - inputType: String, - - nameField: String, - - idField: String, - - captionField: String, - - childrenField: String, - - valueField: String, - - items: { - type: [Array, String, Object], - required: false, - default: null - }, - - value: { - type: Array, - required: false, - default: null - }, - - behavior: { - type: String, - required: false, - default: 'reactive' - }, - - savedValues: { - type: Array, - required: false, - default: null - } - }, - - created: function created() { - var index = this.savedValues.indexOf(this.items[this.valueField]); - if (index !== -1) { - this.value.push(this.items); - } - }, - - - computed: { - caption: function caption() { - return this.items[this.captionField]; - }, - allChildren: function allChildren() { - var _this = this; - - var leafs = []; - var searchTree = function searchTree(items) { - if (!!items[_this.childrenField] && _this.getLength(items[_this.childrenField]) > 0) { - if (_typeof(items[_this.childrenField]) == 'object') { - for (var key in items[_this.childrenField]) { - searchTree(items[_this.childrenField][key]); - } - } else { - items[_this.childrenField].forEach(function (child) { - return searchTree(child); - }); - } - } else { - leafs.push(items); - } - }; - - searchTree(this.items); - - return leafs; - }, - hasChildren: function hasChildren() { - return !!this.items[this.childrenField] && this.getLength(this.items[this.childrenField]) > 0; - }, - hasSelection: function hasSelection() { - return !!this.value && this.value.length > 0; - }, - isAllChildrenSelected: function isAllChildrenSelected() { - var _this2 = this; - - return this.hasChildren && this.hasSelection && this.allChildren.every(function (leaf) { - return _this2.value.some(function (sel) { - return sel[_this2.idField] === leaf[_this2.idField]; - }); - }); - }, - isSomeChildrenSelected: function isSomeChildrenSelected() { - var _this3 = this; - - return this.hasChildren && this.hasSelection && this.allChildren.some(function (leaf) { - return _this3.value.some(function (sel) { - return sel[_this3.idField] === leaf[_this3.idField]; - }); - }); - } - }, - - methods: { - getLength: function getLength(items) { - if ((typeof items === 'undefined' ? 'undefined' : _typeof(items)) == 'object') { - var length = 0; - - for (var item in items) { - length++; - } - - return length; - } - - return items.length; - }, - generateRoot: function generateRoot() { - var _this4 = this; - - if (this.inputType == 'checkbox') { - if (this.behavior == 'reactive') { - return this.$createElement('tree-checkbox', { - props: { - id: this.items[this.idField], - label: this.caption, - nameField: this.nameField, - modelValue: this.items[this.valueField], - inputValue: this.hasChildren ? this.isSomeChildrenSelected : this.value, - value: this.hasChildren ? this.isAllChildrenSelected : this.items - }, - on: { - change: function change(selection) { - if (_this4.hasChildren) { - if (_this4.isAllChildrenSelected) { - _this4.allChildren.forEach(function (leaf) { - var index = _this4.value.indexOf(leaf); - _this4.value.splice(index, 1); - }); - } else { - _this4.allChildren.forEach(function (leaf) { - var exists = false; - _this4.value.forEach(function (item) { - if (item['key'] == leaf['key']) { - exists = true; - } - }); - - if (!exists) { - _this4.value.push(leaf); - } - }); - } - - _this4.$emit('input', _this4.value); - } else { - _this4.$emit('input', selection); - } - } - } - }); - } else { - return this.$createElement('tree-checkbox', { - props: { - id: this.items[this.idField], - label: this.caption, - nameField: this.nameField, - modelValue: this.items[this.valueField], - inputValue: this.value, - value: this.items - } - }); - } - } else if (this.inputType == 'radio') { - return this.$createElement('tree-radio', { - props: { - id: this.items[this.idField], - label: this.caption, - nameField: this.nameField, - modelValue: this.items[this.valueField], - value: this.savedValues - } - }); - } - }, - generateChild: function generateChild(child) { - var _this5 = this; - - return this.$createElement('tree-item', { - on: { - input: function input(selection) { - _this5.$emit('input', selection); - } - }, - props: { - items: child, - value: this.value, - savedValues: this.savedValues, - nameField: this.nameField, - inputType: this.inputType, - captionField: this.captionField, - childrenField: this.childrenField, - valueField: this.valueField, - idField: this.idField, - behavior: this.behavior - } - }); - }, - generateChildren: function generateChildren() { - var _this6 = this; - - var childElements = []; - if (this.items[this.childrenField]) { - if (_typeof(this.items[this.childrenField]) == 'object') { - for (var key in this.items[this.childrenField]) { - childElements.push(this.generateChild(this.items[this.childrenField][key])); - } - } else { - this.items[this.childrenField].forEach(function (child) { - childElements.push(_this6.generateChild(child)); - }); - } - } - - return childElements; - }, - generateIcon: function generateIcon() { - var _this7 = this; - - return this.$createElement('i', { - class: ['expand-icon'], - on: { - click: function click(selection) { - _this7.$el.classList.toggle("active"); - } - } - }); - }, - generateFolderIcon: function generateFolderIcon() { - return this.$createElement('i', { - class: ['icon', 'folder-icon'] - }); - } - }, - - render: function render(createElement) { - return createElement('div', { - class: ['tree-item', 'active', this.hasChildren ? 'has-children' : ''] - }, [this.generateIcon(), this.generateFolderIcon(), this.generateRoot()].concat(_toConsumableArray(this.generateChildren()))); - } -}); - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(25) -/* template */ -var __vue_template__ = __webpack_require__(26) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/tree-view/tree-checkbox.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-0c27ec9b", Component.options) - } else { - hotAPI.reload("data-v-0c27ec9b", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 25 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - name: 'tree-checkbox', - - props: ['id', 'label', 'nameField', 'modelValue', 'inputValue', 'value'], - - computed: { - isMultiple: function isMultiple() { - return Array.isArray(this.internalValue); - }, - isActive: function isActive() { - var _this = this; - - var value = this.value; - var input = this.internalValue; - - if (this.isMultiple) { - return input.some(function (item) { - return _this.valueComparator(item, value); - }); - } - - return value ? this.valueComparator(value, input) : Boolean(input); - }, - - - internalValue: { - get: function get() { - return this.lazyValue; - }, - set: function set(val) { - this.lazyValue = val; - this.$emit('input', val); - } - } - }, - - data: function data(vm) { - return { - lazyValue: vm.inputValue - }; - }, - - watch: { - inputValue: function inputValue(val) { - this.internalValue = val; - } - }, - - methods: { - inputChanged: function inputChanged() { - var _this2 = this; - - var value = this.value; - var input = this.internalValue; - - if (this.isMultiple) { - var length = input.length; - - input = input.filter(function (item) { - return !_this2.valueComparator(item, value); - }); - - if (input.length === length) { - input.push(value); - } - } else { - input = !input; - } - - this.$emit('change', input); - }, - valueComparator: function valueComparator(a, b) { - var _this3 = this; - - if (a === b) return true; - - if (a !== Object(a) || b !== Object(b)) { - return false; - } - - var props = Object.keys(a); - - if (props.length !== Object.keys(b).length) { - return false; - } - - return props.every(function (p) { - return _this3.valueComparator(a[p], b[p]); - }); - } - } -}); - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("span", { staticClass: "checkbox" }, [ - _c("input", { - attrs: { type: "checkbox", id: _vm.id, name: [_vm.nameField + "[]"] }, - domProps: { value: _vm.modelValue, checked: _vm.isActive }, - on: { - change: function($event) { - _vm.inputChanged() - } - } - }), - _vm._v(" "), - _c("label", { staticClass: "checkbox-view", attrs: { for: _vm.id } }), - _vm._v(" "), - _c("span", { attrs: { for: _vm.id } }, [_vm._v(_vm._s(_vm.label))]) - ]) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-0c27ec9b", module.exports) - } -} - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(28) -/* template */ -var __vue_template__ = __webpack_require__(29) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/tree-view/tree-radio.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-7b7bb153", Component.options) - } else { - hotAPI.reload("data-v-7b7bb153", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 28 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - name: 'tree-radio', - - props: ['id', 'label', 'nameField', 'modelValue', 'value'], - - computed: { - isActive: function isActive() { - if (this.value.length) { - return this.value[0] == this.modelValue ? true : false; - } - - return false; - } - } -}); - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("span", { staticClass: "radio" }, [ - _c("input", { - attrs: { type: "radio", id: _vm.id, name: _vm.nameField }, - domProps: { value: _vm.modelValue, checked: _vm.isActive } - }), - _vm._v(" "), - _c("label", { staticClass: "radio-view", attrs: { for: _vm.id } }), - _vm._v(" "), - _c("span", { attrs: { for: _vm.id } }, [_vm._v(_vm._s(_vm.label))]) - ]) -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-7b7bb153", module.exports) - } -} - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(31) -/* template */ -var __vue_template__ = __webpack_require__(32) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = null -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/modal.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-463f5591", Component.options) - } else { - hotAPI.reload("data-v-463f5591", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 31 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - props: ['id', 'isOpen'], - - created: function created() { - this.closeModal(); - }, - - - computed: { - isModalOpen: function isModalOpen() { - this.addClassToBody(); - - return this.isOpen; - } - }, - - methods: { - closeModal: function closeModal() { - this.$root.$set(this.$root.modalIds, this.id, false); - }, - addClassToBody: function addClassToBody() { - var body = document.querySelector("body"); - if (this.isOpen) { - body.classList.add("modal-open"); - } else { - body.classList.remove("modal-open"); - } - } - } -}); - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _vm.isModalOpen - ? _c("div", { staticClass: "modal-container" }, [ - _c( - "div", - { staticClass: "modal-header" }, - [ - _vm._t("header", [ - _vm._v("\n Default header\n ") - ]), - _vm._v(" "), - _c("i", { - staticClass: "icon remove-icon", - on: { click: _vm.closeModal } - }) - ], - 2 - ), - _vm._v(" "), - _c( - "div", - { staticClass: "modal-body" }, - [_vm._t("body", [_vm._v("\n Default body\n ")])], - 2 - ) - ]) - : _vm._e() -} -var staticRenderFns = [] -render._withStripped = true -module.exports = { render: render, staticRenderFns: staticRenderFns } -if (false) { - module.hot.accept() - if (module.hot.data) { - require("vue-hot-reload-api") .rerender("data-v-463f5591", module.exports) - } -} - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -var disposed = false -function injectStyle (ssrContext) { - if (disposed) return - __webpack_require__(34) -} -var normalizeComponent = __webpack_require__(0) -/* script */ -var __vue_script__ = __webpack_require__(38) -/* template */ -var __vue_template__ = __webpack_require__(39) -/* template functional */ -var __vue_template_functional__ = false -/* styles */ -var __vue_styles__ = injectStyle -/* scopeId */ -var __vue_scopeId__ = null -/* moduleIdentifier (server only) */ -var __vue_module_identifier__ = null -var Component = normalizeComponent( - __vue_script__, - __vue_template__, - __vue_template_functional__, - __vue_styles__, - __vue_scopeId__, - __vue_module_identifier__ -) -Component.options.__file = "src/Resources/assets/js/components/image/image-upload.vue" - -/* hot reload */ -if (false) {(function () { - var hotAPI = require("vue-hot-reload-api") - hotAPI.install(require("vue"), false) - if (!hotAPI.compatible) return - module.hot.accept() - if (!module.hot.data) { - hotAPI.createRecord("data-v-5431fa9a", Component.options) - } else { - hotAPI.reload("data-v-5431fa9a", Component.options) - } - module.hot.dispose(function (data) { - disposed = true - }) -})()} - -module.exports = Component.exports - - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -// style-loader: Adds some css to the DOM by adding a