From 07d64f72d1cd9951b374191a26f72abb9085bbd8 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Tue, 3 Jul 2018 14:06:18 +0200 Subject: Remove grid lib Remove Grid javascript library as not currently used Issue-ID: CLAMP-191 Change-Id: I0a0bbbbf598945f89827264a6c1cda47bbcd2b3d Signed-off-by: Determe, Sebastien (sd378r) --- .../resources/designer/css/ui-grid-stable.css | 1086 -- .../resources/designer/css/ui-grid-stable.min.css | 10 - .../resources/designer/css/ui-grid-unstable.css | 1330 -- .../resources/designer/css/ui-grid-unstable.eot | Bin 7992 -> 0 bytes .../designer/css/ui-grid-unstable.min.css | 13 - .../resources/designer/css/ui-grid-unstable.svg | 31 - .../resources/designer/css/ui-grid-unstable.ttf | Bin 7828 -> 0 bytes .../resources/designer/css/ui-grid-unstable.woff | Bin 4456 -> 0 bytes .../META-INF/resources/designer/css/ui-grid.css | 14 - .../META-INF/resources/designer/css/ui-grid.eot | Bin 8184 -> 0 bytes .../resources/designer/css/ui-grid.min.css | 1 - .../META-INF/resources/designer/css/ui-grid.svg | 32 - .../META-INF/resources/designer/css/ui-grid.ttf | Bin 8020 -> 0 bytes .../META-INF/resources/designer/css/ui-grid.woff | Bin 4584 -> 0 bytes .../META-INF/resources/designer/index.html | 5 - .../resources/designer/lib/ui-grid-stable.js | 13034 -------------- .../resources/designer/lib/ui-grid-stable.min.js | 7 - .../resources/designer/lib/ui-grid-unstable.js | 18014 ------------------- .../resources/designer/lib/ui-grid-unstable.min.js | 8 - .../META-INF/resources/designer/partials/grid.html | 35 - .../META-INF/resources/designer/scripts/app.js | 9 +- 21 files changed, 1 insertion(+), 33628 deletions(-) delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid-stable.css delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid-stable.min.css delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.css delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.eot delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.min.css delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.svg delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.ttf delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.woff delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid.css delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid.eot delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid.min.css delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid.svg delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid.ttf delete mode 100644 src/main/resources/META-INF/resources/designer/css/ui-grid.woff delete mode 100644 src/main/resources/META-INF/resources/designer/lib/ui-grid-stable.js delete mode 100644 src/main/resources/META-INF/resources/designer/lib/ui-grid-stable.min.js delete mode 100644 src/main/resources/META-INF/resources/designer/lib/ui-grid-unstable.js delete mode 100644 src/main/resources/META-INF/resources/designer/lib/ui-grid-unstable.min.js delete mode 100644 src/main/resources/META-INF/resources/designer/partials/grid.html (limited to 'src/main/resources/META-INF') diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid-stable.css b/src/main/resources/META-INF/resources/designer/css/ui-grid-stable.css deleted file mode 100644 index 409817bc..00000000 --- a/src/main/resources/META-INF/resources/designer/css/ui-grid-stable.css +++ /dev/null @@ -1,1086 +0,0 @@ -.ui-grid { - border: 1px solid #d4d4d4; - box-sizing: content-box; - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - border-radius: 0px; - -webkit-transform: translateZ(0); - -moz-transform: translateZ(0); - -o-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); -} -.ui-grid-vertical-bar { - position: absolute; - right: 0; - width: 0; -} -.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar, -.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar { - width: 1px; -} -.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar { - background-color: #d4d4d4; -} -.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar { - background-color: #d4d4d4; -} -.ui-grid-header-cell:last-child .ui-grid-vertical-bar { - right: -1px; - width: 1px; - background-color: #d4d4d4; -} -.ui-grid-clearfix:before, -.ui-grid-clearfix:after { - content: ""; - display: table; -} -.ui-grid-clearfix:after { - clear: both; -} -.ui-grid-invisible { - visibility: hidden; -} -.ui-grid-top-panel-background { - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); -} -.ui-grid-top-panel { - position: relative; - border-bottom: 1px solid #d4d4d4; - overflow: hidden; - font-weight: bold; - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - -webkit-border-top-right-radius: -1px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: -1px; - -moz-border-radius-topright: -1px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: -1px; - border-top-right-radius: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: -1px; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -.ui-grid-group-panel { - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - border-bottom: 1px solid #d4d4d4; - -webkit-border-top-right-radius: -1px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: -1px; - -moz-border-radius-topright: -1px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: -1px; - border-top-right-radius: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: -1px; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; - min-height: 30px; -} -.ui-grid-header-group-panel .hidden { - display: none; -} -.ui-grid-header-viewport { - overflow: hidden; -} -.ui-grid-header-canvas { - position: relative; -} -.ui-grid-header-canvas:before, -.ui-grid-header-canvas:after { - content: ""; - display: table; - line-height: 0; -} -.ui-grid-header-canvas:after { - clear: both; -} -.ui-grid-header-cell { - position: relative; - float: left; - top: 0; - bottom: 0; - background-color: inherit; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - width: 0; -} -.ui-grid-header-cell .sortable { - cursor: pointer; -} -.ui-grid-header .ui-grid-vertical-bar { - top: 0; - bottom: 0; -} -.ui-grid-column-menu-button { - position: absolute; - right: 1px; - top: 0; -} -.ui-grid-column-menu-button .ui-grid-icon-angle-down { - vertical-align: sub; -} -.ui-grid-column-menu { - position: absolute; -} -/* Slide up/down animations */ -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-add, -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-remove { - -webkit-transition: all 0.05s linear; - -moz-transition: all 0.05s linear; - -o-transition: all 0.05s linear; - transition: all 0.05s linear; - display: block !important; -} -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-add.ng-hide-add-active, -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-remove { - -webkit-transform: translateY(-100%); - -moz-transform: translateY(-100%); - -o-transform: translateY(-100%); - -ms-transform: translateY(-100%); - transform: translateY(-100%); -} -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-add, -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-remove.ng-hide-remove-active { - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); -} -.ui-grid-filter-container { - padding: 4px 10px; - position: relative; -} -.ui-grid-filter-container .ui-grid-filter-button { - position: absolute; - top: 0; - bottom: 0; - right: 0; -} -.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"].right { - position: absolute; - top: 50%; - line-height: 32px; - margin-top: -16px; - right: 10px; - opacity: 0.66; -} -.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"].right:hover { - opacity: 1; -} -input[type="text"].ui-grid-filter-input { - padding: 0; - margin: 0; - border: 0; - width: 100%; - border: 1px solid #d4d4d4; - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: 0; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -input[type="text"].ui-grid-filter-input:hover { - border: 1px solid #d4d4d4; -} -.ui-grid-render-container { - position: relative; - -webkit-border-top-right-radius: 0; - -webkit-border-bottom-right-radius: 0px; - -webkit-border-bottom-left-radius: 0px; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -moz-border-radius-bottomright: 0px; - -moz-border-radius-bottomleft: 0px; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 0px; - border-bottom-left-radius: 0px; - border-top-left-radius: 0; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -.ui-grid-viewport { - min-height: 20px; - position: relative; - overflow: hidden; -} -.ui-grid-viewport :focus { - outline: none; -} -.ui-grid-canvas { - position: relative; -} -.ui-grid-row:nth-child(odd) .ui-grid-cell { - background-color: #fdfdfd; -} -.ui-grid-row:nth-child(even) .ui-grid-cell { - background-color: #f3f3f3; -} -.ui-grid-row:last-child .ui-grid-cell { - border-bottom-color: #d4d4d4; - border-bottom-style: solid; -} -.ui-grid-no-row-overlay { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - margin: 10%; - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: 0; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #d4d4d4; - font-size: 2em; - text-align: center; -} -.ui-grid-no-row-overlay > * { - position: absolute; - display: table; - margin: auto 0; - width: 100%; - top: 0; - bottom: 0; - left: 0; - right: 0; - opacity: 0.66; -} -.ui-grid-cell { - overflow: hidden; - float: left; - background-color: inherit; - border-right: 1px solid; - border-color: #d4d4d4; - box-sizing: border-box; -} -.ui-grid-cell:last-child { - border-right: 0; -} -.ui-grid-cell-contents { - padding: 5px; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - white-space: nowrap; - -ms-text-overflow: ellipsis; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - overflow: hidden; - height: 100%; -} -.ui-grid-cell-contents-hidden { - visibility: hidden; - width: 0; - height: 0; - display: none; -} -.ui-grid-row-header-cell { - background-color: #F0F0EE !important; - border-bottom: solid 1px #d4d4d4; -} -.ui-grid-native-scrollbar { - position: absolute; - overflow: scroll; -} -.ui-grid-native-scrollbar.vertical { - top: 0; - right: 0; - height: 100%; - overflow-x: hidden; - width: 17px; -} -.ui-grid-native-scrollbar.horizontal { - bottom: 0; - left: 0; - width: 100%; - overflow-y: hidden; - height: 17px; -} -.ui-grid-footer-panel-background { - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); -} -.ui-grid-footer-panel { - position: relative; - border-bottom: 1px solid #d4d4d4; - border-top: 1px solid #d4d4d4; - overflow: hidden; - font-weight: bold; - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - -webkit-border-top-right-radius: -1px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: -1px; - -moz-border-radius-topright: -1px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: -1px; - border-top-right-radius: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: -1px; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -.ui-grid-group-panel { - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - border-bottom: 1px solid #d4d4d4; - border-top: 1px solid #d4d4d4; - -webkit-border-top-right-radius: -1px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: -1px; - -moz-border-radius-topright: -1px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: -1px; - border-top-right-radius: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: -1px; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; - min-height: 30px; -} -.ui-grid-footer-group-panel .hidden { - display: none; -} -.ui-grid-footer-viewport { - overflow: hidden; -} -.ui-grid-footer-canvas { - position: relative; -} -.ui-grid-footer-canvas:before, -.ui-grid-footer-canvas:after { - content: ""; - display: table; - line-height: 0; -} -.ui-grid-footer-canvas:after { - clear: both; -} -.ui-grid-footer-cell { - overflow: hidden; - float: left; - background-color: inherit; - border-right: 1px solid; - border-color: #d4d4d4; - box-sizing: border-box; -} -.ui-grid-footer-cell:last-child { - border-right: 0; -} -.ui-grid-footer .ui-grid-vertical-bar { - top: 0; - bottom: 0; -} -input[type="text"].ui-grid-filter-input { - padding: 0; - margin: 0; - border: 0; - width: 100%; - border: 1px solid #d4d4d4; - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: 0; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -input[type="text"].ui-grid-filter-input:hover { - border: 1px solid #d4d4d4; -} -.ui-grid-menu { - z-index: 2; - position: absolute; - overflow: hidden; - padding: 0 10px 20px 10px; - cursor: default; -} -.ui-grid-menu .ui-grid-menu-inner { - background: #f3f3f3; - border: 1px solid #d4d4d4; - position: relative; - white-space: nowrap; - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - border-radius: 0px; - -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2); -} -.ui-grid-menu .ui-grid-menu-inner ul { - margin: 0; - padding: 0; - list-style-type: none; -} -.ui-grid-menu .ui-grid-menu-inner ul li { - padding: 8px; - cursor: pointer; -} -.ui-grid-menu .ui-grid-menu-inner ul li:hover { - -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); -} -.ui-grid-menu .ui-grid-menu-inner ul li.ui-grid-menu-item-active { - -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - background-color: #cecece; -} -.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child) { - border-bottom: 1px solid #d4d4d4; -} -.ui-grid-sortarrow { - right: 5px; - position: absolute; - width: 20px; - top: 0; - bottom: 0; - background-position: center; -} -.ui-grid-sortarrow.down { - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -o-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} -@font-face { - font-family: 'ui-grid'; - src: url('ui-grid.eot'); - src: url('ui-grid.eot#iefix') format('embedded-opentype'), url('ui-grid.woff') format('woff'), url('ui-grid.ttf?') format('truetype'), url('ui-grid.svg?#ui-grid') format('svg'); - font-weight: normal; - font-style: normal; -} -/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ -/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ -/* -@media screen and (-webkit-min-device-pixel-ratio:0) { - @font-face { - font-family: 'ui-grid'; - src: url('../font/ui-grid.svg?12312827#ui-grid') format('svg'); - } -} -*/ -[class^="ui-grid-icon"]:before, -[class*=" ui-grid-icon"]:before { - font-family: "ui-grid"; - font-style: normal; - font-weight: normal; - speak: none; - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: .2em; - text-align: center; - /* opacity: .8; */ - /* For safety - reset parent styles, that can break glyph codes*/ - font-variant: normal; - text-transform: none; - /* fix buttons height, for twitter bootstrap */ - line-height: 1em; - /* Animation center compensation - margins should be symmetric */ - /* remove if not needed */ - margin-left: .2em; - /* you can be more comfortable with increased icons size */ - /* font-size: 120%; */ - /* Uncomment for 3D effect */ - /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ -} -.ui-grid-icon-blank::before { - width: 1em; - content: ' '; -} -/* -* RTL Styles -*/ -.ui-grid[dir=rtl] .ui-grid-header-cell, -.ui-grid[dir=rtl] .ui-grid-footer-cell, -.ui-grid[dir=rtl] .ui-grid-cell { - float: right !important; -} -.ui-grid[dir=rtl] .ui-grid-scrollbar-horizontal { - left: inherit; - right: 0; -} -.ui-grid[dir=rtl] .ui-grid-native-scrollbar.vertical { - left: 0; - right: inherit; -} -.ui-grid[dir=rtl] .ui-grid-column-menu-button { - position: absolute; - left: 1px; - top: 0; - right: inherit; -} -.ui-grid[dir=rtl] .ui-grid-cell:first-child, -.ui-grid[dir=rtl] .ui-grid-header-cell:first-child, -.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child { - border-right: 0; -} -.ui-grid[dir=rtl] .ui-grid-cell:last-child { - border-right: 1px solid; - border-color: #d4d4d4; -} -.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar, -.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar, -.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar { - width: 0; -} -/* - Animation example, for spinners -*/ -.ui-grid-animate-spin { - -moz-animation: ui-grid-spin 2s infinite linear; - -o-animation: ui-grid-spin 2s infinite linear; - -webkit-animation: ui-grid-spin 2s infinite linear; - animation: ui-grid-spin 2s infinite linear; - display: inline-block; -} -@-moz-keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@-webkit-keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@-o-keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@-ms-keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -/*--------------------------------------------------- - LESS Elements 0.9 - --------------------------------------------------- - A set of useful LESS mixins - More info at: http://lesselements.com - ---------------------------------------------------*/ -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-cell-contents:focus { - outline: 0; - background-color: #b3c4c7; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -div.ui-grid-cell input { - border-radius: inherit; - padding: 0; - width: 100%; - color: inherit; - height: auto; - font: inherit; - outline: none; -} -div.ui-grid-cell input:focus { - color: inherit; - outline: none; -} -div.ui-grid-cell input[type="checkbox"] { - margin: 9px 0 0 6px; - width: auto; -} -div.ui-grid-cell input.ng-invalid { - border: 1px solid #fc8f8f; -} -div.ui-grid-cell input.ng-valid { - border: 1px solid #d4d4d4; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.expandableRow .ui-grid-row:nth-child(odd) .ui-grid-cell { - background-color: #fdfdfd; -} -.expandableRow .ui-grid-row:nth-child(even) .ui-grid-cell { - background-color: #f3f3f3; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-pinned-container { - float: left; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child { - box-sizing: border-box; - border-right: 1px solid; - border-width: 1px; - border-color: #aeaeae; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child { - box-sizing: border-box; - border-right: 1px solid; - border-width: 1px; - border-color: #aeaeae; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar, -.ui-grid-pinned-container .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar { - width: 1px; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar { - background-color: #d4d4d4; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar { - background-color: #aeaeae; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child .ui-grid-vertical-bar { - right: -1px; - width: 1px; - background-color: #aeaeae; -} -.ui-grid-render-container-body { - float: left; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-column-resizer { - top: 0; - bottom: 0; - width: 5px; - position: absolute; - cursor: col-resize; -} -.ui-grid-column-resizer.left { - left: 0; -} -.ui-grid-column-resizer.right { - right: 0; -} -.ui-grid.column-resizing { - cursor: col-resize; -} -.ui-grid.column-resizing .ui-grid-resize-overlay { - position: absolute; - top: 0; - height: 100%; - width: 1px; - background-color: #aeaeae; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-row-saving .ui-grid-cell { - color: #848484 !important; -} -.ui-grid-row-error .ui-grid-cell { - color: #ff0000 !important; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-row-selected .ui-grid-cell { - background-color: #c9dde1 !important; -} -.ui-grid-disable-selection { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: default; -} -.ui-grid-selection-row-header-buttons { - cursor: pointer; - opacity: 0.1; -} -.ui-grid-selection-row-header-buttons.ui-grid-row-selected { - opacity: 1; -} -.ui-grid-selection-row-header-cell { - border-bottom: solid 1px #d4d4d4; -} - -.ui-grid-icon-plus-squared:before { - content: '\c350'; -} -/* '썐' */ -.ui-grid-icon-minus-squared:before { - content: '\c351'; -} -/* '썑' */ -.ui-grid-icon-search:before { - content: '\c352'; -} -/* '썒' */ -.ui-grid-icon-cancel:before { - content: '\c353'; -} -/* '썓' */ -.ui-grid-icon-info-circled:before { - content: '\c354'; -} -/* '썔' */ -.ui-grid-icon-lock:before { - content: '\c355'; -} -/* '썕' */ -.ui-grid-icon-lock-open:before { - content: '\c356'; -} -/* '썖' */ -.ui-grid-icon-pencil:before { - content: '\c357'; -} -/* '썗' */ -.ui-grid-icon-down-dir:before { - content: '\c358'; -} -/* '썘' */ -.ui-grid-icon-up-dir:before { - content: '\c359'; -} -/* '썙' */ -.ui-grid-icon-left-dir:before { - content: '\c35a'; -} -/* '썚' */ -.ui-grid-icon-right-dir:before { - content: '\c35b'; -} -/* '썛' */ -.ui-grid-icon-left-open:before { - content: '\c35c'; -} -/* '썜' */ -.ui-grid-icon-right-open:before { - content: '\c35d'; -} -/* '썝' */ -.ui-grid-icon-angle-down:before { - content: '\c35e'; -} -/* '썞' */ -.ui-grid-icon-filter:before { - content: '\c35f'; -} -/* '썟' */ -.ui-grid-icon-sort-alt-up:before { - content: '\c360'; -} -/* '썠' */ -.ui-grid-icon-sort-alt-down:before { - content: '\c361'; -} -/* '썡' */ -.ui-grid-icon-ok:before { - content: '\e800'; -} -/* '' */ -.ui-grid-icon-spin5:before { - content: '\ea61'; -} -/* '' */ diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid-stable.min.css b/src/main/resources/META-INF/resources/designer/css/ui-grid-stable.min.css deleted file mode 100644 index f4074831..00000000 --- a/src/main/resources/META-INF/resources/designer/css/ui-grid-stable.min.css +++ /dev/null @@ -1,10 +0,0 @@ -.ui-grid{border:1px solid #d4d4d4;box-sizing:content-box;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-o-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}.ui-grid-vertical-bar{position:absolute;right:0;width:0}.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{width:1px}.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-header-cell:last-child .ui-grid-vertical-bar{right:-1px;width:1px;background-color:#d4d4d4}.ui-grid-clearfix:before,.ui-grid-clearfix:after{content:"";display:table}.ui-grid-clearfix:after{clear:both}.ui-grid-invisible{visibility:hidden}.ui-grid-top-panel-background{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0)}.ui-grid-top-panel{position:relative;border-bottom:1px solid #d4d4d4;overflow:hidden;font-weight:bold;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-group-panel{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);border-bottom:1px solid #d4d4d4;-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;min-height:30px}.ui-grid-header-group-panel .hidden{display:none}.ui-grid-header-viewport{overflow:hidden}.ui-grid-header-canvas{position:relative}.ui-grid-header-canvas:before,.ui-grid-header-canvas:after{content:"";display:table;line-height:0}.ui-grid-header-canvas:after{clear:both}.ui-grid-header-cell{position:relative;float:left;top:0;bottom:0;background-color:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0}.ui-grid-header-cell .sortable{cursor:pointer}.ui-grid-header .ui-grid-vertical-bar{top:0;bottom:0}.ui-grid-column-menu-button{position:absolute;right:1px;top:0}.ui-grid-column-menu-button .ui-grid-icon-angle-down{vertical-align:sub}.ui-grid-column-menu{position:absolute}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-remove{-webkit-transition:all .05s linear;-moz-transition:all .05s linear;-o-transition:all .05s linear;transition:all .05s linear;display:block !important}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-add.ng-hide-add-active,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-inner.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-filter-container{padding:4px 10px;position:relative}.ui-grid-filter-container .ui-grid-filter-button{position:absolute;top:0;bottom:0;right:0}.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"].right{position:absolute;top:50%;line-height:32px;margin-top:-16px;right:10px;opacity:0.66}.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"].right:hover{opacity:1}input[type="text"].ui-grid-filter-input{padding:0;margin:0;border:0;width:100%;border:1px solid #d4d4d4;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}input[type="text"].ui-grid-filter-input:hover{border:1px solid #d4d4d4}.ui-grid-render-container{position:relative;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-viewport{min-height:20px;position:relative;overflow:hidden}.ui-grid-viewport :focus{outline:none}.ui-grid-canvas{position:relative}.ui-grid-row:nth-child(odd) .ui-grid-cell{background-color:#fdfdfd}.ui-grid-row:nth-child(even) .ui-grid-cell{background-color:#f3f3f3}.ui-grid-row:last-child .ui-grid-cell{border-bottom-color:#d4d4d4;border-bottom-style:solid}.ui-grid-no-row-overlay{position:absolute;top:0;bottom:0;left:0;right:0;margin:10%;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #d4d4d4;font-size:2em;text-align:center}.ui-grid-no-row-overlay>*{position:absolute;display:table;margin:auto 0;width:100%;top:0;bottom:0;left:0;right:0;opacity:0.66}.ui-grid-cell{overflow:hidden;float:left;background-color:inherit;border-right:1px solid;border-color:#d4d4d4;box-sizing:border-box}.ui-grid-cell:last-child{border-right:0}.ui-grid-cell-contents{padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;height:100%}.ui-grid-cell-contents-hidden{visibility:hidden;width:0;height:0;display:none}.ui-grid-row-header-cell{background-color:#F0F0EE !important;border-bottom:solid 1px #d4d4d4}.ui-grid-native-scrollbar{position:absolute;overflow:scroll}.ui-grid-native-scrollbar.vertical{top:0;right:0;height:100%;overflow-x:hidden;width:17px}.ui-grid-native-scrollbar.horizontal{bottom:0;left:0;width:100%;overflow-y:hidden;height:17px}.ui-grid-footer-panel-background{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0)}.ui-grid-footer-panel{position:relative;border-bottom:1px solid #d4d4d4;border-top:1px solid #d4d4d4;overflow:hidden;font-weight:bold;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-group-panel{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);border-bottom:1px solid #d4d4d4;border-top:1px solid #d4d4d4;-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;min-height:30px}.ui-grid-footer-group-panel .hidden{display:none}.ui-grid-footer-viewport{overflow:hidden}.ui-grid-footer-canvas{position:relative}.ui-grid-footer-canvas:before,.ui-grid-footer-canvas:after{content:"";display:table;line-height:0}.ui-grid-footer-canvas:after{clear:both}.ui-grid-footer-cell{overflow:hidden;float:left;background-color:inherit;border-right:1px solid;border-color:#d4d4d4;box-sizing:border-box}.ui-grid-footer-cell:last-child{border-right:0}.ui-grid-footer .ui-grid-vertical-bar{top:0;bottom:0}input[type="text"].ui-grid-filter-input{padding:0;margin:0;border:0;width:100%;border:1px solid #d4d4d4;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}input[type="text"].ui-grid-filter-input:hover{border:1px solid #d4d4d4}.ui-grid-menu{z-index:2;position:absolute;overflow:hidden;padding:0 10px 20px 10px;cursor:default}.ui-grid-menu .ui-grid-menu-inner{background:#f3f3f3;border:1px solid #d4d4d4;position:relative;white-space:nowrap;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2)}.ui-grid-menu .ui-grid-menu-inner ul{margin:0;padding:0;list-style-type:none}.ui-grid-menu .ui-grid-menu-inner ul li{padding:8px;cursor:pointer}.ui-grid-menu .ui-grid-menu-inner ul li:hover{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);box-shadow:inset 0 0 14px rgba(0,0,0,0.2)}.ui-grid-menu .ui-grid-menu-inner ul li.ui-grid-menu-item-active{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);box-shadow:inset 0 0 14px rgba(0,0,0,0.2);background-color:#cecece}.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child){border-bottom:1px solid #d4d4d4}.ui-grid-sortarrow{right:5px;position:absolute;width:20px;top:0;bottom:0;background-position:center}.ui-grid-sortarrow.down{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}@font-face{font-family:'ui-grid';src:url('ui-grid.eot');src:url('ui-grid.eot#iefix') format('embedded-opentype'),url('ui-grid.woff') format('woff'),url('ui-grid.ttf?') format('truetype'),url('ui-grid.svg?#ui-grid') format('svg');font-weight:normal;font-style:normal}[class^="ui-grid-icon"]:before,[class*=" ui-grid-icon"]:before{font-family:"ui-grid";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.ui-grid-icon-blank::before{width:1em;content:' '}.ui-grid[dir=rtl] .ui-grid-header-cell,.ui-grid[dir=rtl] .ui-grid-footer-cell,.ui-grid[dir=rtl] .ui-grid-cell{float:right !important}.ui-grid[dir=rtl] .ui-grid-scrollbar-horizontal{left:inherit;right:0}.ui-grid[dir=rtl] .ui-grid-native-scrollbar.vertical{left:0;right:inherit}.ui-grid[dir=rtl] .ui-grid-column-menu-button{position:absolute;left:1px;top:0;right:inherit}.ui-grid[dir=rtl] .ui-grid-cell:first-child,.ui-grid[dir=rtl] .ui-grid-header-cell:first-child,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child{border-right:0}.ui-grid[dir=rtl] .ui-grid-cell:last-child{border-right:1px solid;border-color:#d4d4d4}.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar{width:0}.ui-grid-animate-spin{-moz-animation:ui-grid-spin 2s infinite linear;-o-animation:ui-grid-spin 2s infinite linear;-webkit-animation:ui-grid-spin 2s infinite linear;animation:ui-grid-spin 2s infinite linear;display:inline-block}@-moz-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}} -.ui-grid-cell-contents:focus{outline:0;background-color:#b3c4c7} -div.ui-grid-cell input{border-radius:inherit;padding:0;width:100%;color:inherit;height:auto;font:inherit;outline:none}div.ui-grid-cell input:focus{color:inherit;outline:none}div.ui-grid-cell input[type="checkbox"]{margin:9px 0 0 6px;width:auto}div.ui-grid-cell input.ng-invalid{border:1px solid #fc8f8f}div.ui-grid-cell input.ng-valid{border:1px solid #d4d4d4} -.expandableRow .ui-grid-row:nth-child(odd) .ui-grid-cell{background-color:#fdfdfd}.expandableRow .ui-grid-row:nth-child(even) .ui-grid-cell{background-color:#f3f3f3} - -.ui-grid-pinned-container{float:left}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child{box-sizing:border-box;border-right:1px solid;border-width:1px;border-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child{box-sizing:border-box;border-right:1px solid;border-width:1px;border-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,.ui-grid-pinned-container .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{width:1px}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child .ui-grid-vertical-bar{right:-1px;width:1px;background-color:#aeaeae}.ui-grid-render-container-body{float:left} -.ui-grid-column-resizer{top:0;bottom:0;width:5px;position:absolute;cursor:col-resize}.ui-grid-column-resizer.left{left:0}.ui-grid-column-resizer.right{right:0}.ui-grid.column-resizing{cursor:col-resize}.ui-grid.column-resizing .ui-grid-resize-overlay{position:absolute;top:0;height:100%;width:1px;background-color:#aeaeae} -.ui-grid-row-saving .ui-grid-cell{color:#848484 !important}.ui-grid-row-error .ui-grid-cell{color:#f00 !important} -.ui-grid-row-selected .ui-grid-cell{background-color:#c9dde1 !important}.ui-grid-disable-selection{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.ui-grid-selection-row-header-buttons{cursor:pointer;opacity:0.1}.ui-grid-selection-row-header-buttons.ui-grid-row-selected{opacity:1}.ui-grid-selection-row-header-cell{border-bottom:solid 1px #d4d4d4} -.ui-grid-icon-plus-squared:before{content:'\c350'}.ui-grid-icon-minus-squared:before{content:'\c351'}.ui-grid-icon-search:before{content:'\c352'}.ui-grid-icon-cancel:before{content:'\c353'}.ui-grid-icon-info-circled:before{content:'\c354'}.ui-grid-icon-lock:before{content:'\c355'}.ui-grid-icon-lock-open:before{content:'\c356'}.ui-grid-icon-pencil:before{content:'\c357'}.ui-grid-icon-down-dir:before{content:'\c358'}.ui-grid-icon-up-dir:before{content:'\c359'}.ui-grid-icon-left-dir:before{content:'\c35a'}.ui-grid-icon-right-dir:before{content:'\c35b'}.ui-grid-icon-left-open:before{content:'\c35c'}.ui-grid-icon-right-open:before{content:'\c35d'}.ui-grid-icon-angle-down:before{content:'\c35e'}.ui-grid-icon-filter:before{content:'\c35f'}.ui-grid-icon-sort-alt-up:before{content:'\c360'}.ui-grid-icon-sort-alt-down:before{content:'\c361'}.ui-grid-icon-ok:before{content:'\e800'}.ui-grid-icon-spin5:before{content:'\ea61'} diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.css b/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.css deleted file mode 100644 index acb27bea..00000000 --- a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.css +++ /dev/null @@ -1,1330 +0,0 @@ -.ui-grid { - border: 1px solid #d4d4d4; - box-sizing: content-box; - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - border-radius: 0px; - -webkit-transform: translateZ(0); - -moz-transform: translateZ(0); - -o-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); -} -.ui-grid-vertical-bar { - position: absolute; - right: 0; - width: 0; -} -.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar, -.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar { - width: 1px; -} -.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar { - background-color: #d4d4d4; -} -.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar { - background-color: #d4d4d4; -} -.ui-grid-header-cell:last-child .ui-grid-vertical-bar { - right: -1px; - width: 1px; - background-color: #d4d4d4; -} -.ui-grid-clearfix:before, -.ui-grid-clearfix:after { - content: ""; - display: table; -} -.ui-grid-clearfix:after { - clear: both; -} -.ui-grid-invisible { - visibility: hidden; -} -.ui-grid-top-panel-background { - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); -} -.ui-grid-header { - border-bottom: 1px solid #d4d4d4; - box-sizing: content-box; -} -.ui-grid-top-panel { - position: relative; - overflow: hidden; - font-weight: bold; - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - -webkit-border-top-right-radius: -1px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: -1px; - -moz-border-radius-topright: -1px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: -1px; - border-top-right-radius: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: -1px; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -.ui-grid-group-panel { - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - border-bottom: 1px solid #d4d4d4; - -webkit-border-top-right-radius: -1px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: -1px; - -moz-border-radius-topright: -1px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: -1px; - border-top-right-radius: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: -1px; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; - min-height: 30px; -} -.ui-grid-header-group-panel .hidden { - display: none; -} -.ui-grid-header-viewport { - overflow: hidden; -} -.ui-grid-header-canvas { - position: relative; -} -.ui-grid-header-canvas:before, -.ui-grid-header-canvas:after { - content: ""; - display: table; - line-height: 0; -} -.ui-grid-header-canvas:after { - clear: both; -} -.ui-grid-header-cell { - position: relative; - float: left; - top: 0; - bottom: 0; - background-color: inherit; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - width: 0; -} -.ui-grid-header-cell .sortable { - cursor: pointer; -} -.ui-grid-header .ui-grid-vertical-bar { - top: 0; - bottom: 0; -} -.ui-grid-column-menu-button { - position: absolute; - right: 1px; - top: 0; -} -.ui-grid-column-menu-button .ui-grid-icon-angle-down { - vertical-align: sub; -} -.ui-grid-column-menu { - position: absolute; -} -/* Slide up/down animations */ -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add, -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove { - -webkit-transition: all 0.05s linear; - -moz-transition: all 0.05s linear; - -o-transition: all 0.05s linear; - transition: all 0.05s linear; - display: block !important; -} -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active, -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove { - -webkit-transform: translateY(-100%); - -moz-transform: translateY(-100%); - -o-transform: translateY(-100%); - -ms-transform: translateY(-100%); - transform: translateY(-100%); -} -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add, -.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active { - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); -} -/* Slide up/down animations */ -.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add, -.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove { - -webkit-transition: all 0.05s linear; - -moz-transition: all 0.05s linear; - -o-transition: all 0.05s linear; - transition: all 0.05s linear; - display: block !important; -} -.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active, -.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove { - -webkit-transform: translateY(-100%); - -moz-transform: translateY(-100%); - -o-transform: translateY(-100%); - -ms-transform: translateY(-100%); - transform: translateY(-100%); -} -.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add, -.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active { - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); -} -.ui-grid-filter-container { - padding: 4px 10px; - position: relative; -} -.ui-grid-filter-container .ui-grid-filter-button { - position: absolute; - top: 0; - bottom: 0; - right: 0; -} -.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"] { - position: absolute; - top: 50%; - line-height: 32px; - margin-top: -16px; - right: 10px; - opacity: 0.66; -} -.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]:hover { - opacity: 1; -} -input[type="text"].ui-grid-filter-input { - padding: 0; - margin: 0; - border: 0; - width: 100%; - border: 1px solid #d4d4d4; - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: 0; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -input[type="text"].ui-grid-filter-input:hover { - border: 1px solid #d4d4d4; -} -.ui-grid-render-container { - position: inherit; - -webkit-border-top-right-radius: 0; - -webkit-border-bottom-right-radius: 0px; - -webkit-border-bottom-left-radius: 0px; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -moz-border-radius-bottomright: 0px; - -moz-border-radius-bottomleft: 0px; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 0px; - border-bottom-left-radius: 0px; - border-top-left-radius: 0; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -.ui-grid-render-container:focus { - outline: none; -} -.ui-grid-viewport { - min-height: 20px; - position: relative; - overflow: hidden; -} -.ui-grid-viewport :focus { - outline: none; -} -.ui-grid-canvas { - position: relative; -} -.ui-grid-row:nth-child(odd) .ui-grid-cell { - background-color: #fdfdfd; -} -.ui-grid-row:nth-child(even) .ui-grid-cell { - background-color: #f3f3f3; -} -.ui-grid-row:last-child .ui-grid-cell { - border-bottom-color: #d4d4d4; - border-bottom-style: solid; -} -.ui-grid-no-row-overlay { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - margin: 10%; - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: 0; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #d4d4d4; - font-size: 2em; - text-align: center; -} -.ui-grid-no-row-overlay > * { - position: absolute; - display: table; - margin: auto 0; - width: 100%; - top: 0; - bottom: 0; - left: 0; - right: 0; - opacity: 0.66; -} -.ui-grid-cell { - overflow: hidden; - float: left; - background-color: inherit; - border-right: 1px solid; - border-color: #d4d4d4; - box-sizing: border-box; -} -.ui-grid-cell:last-child { - border-right: 0; -} -.ui-grid-cell-contents { - padding: 5px; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - white-space: nowrap; - -ms-text-overflow: ellipsis; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - overflow: hidden; - height: 100%; -} -.ui-grid-cell-contents-hidden { - visibility: hidden; - width: 0; - height: 0; - display: none; -} -.ui-grid-row-header-cell { - background-color: #F0F0EE !important; - border-bottom: solid 1px #d4d4d4; -} -.ui-grid-native-scrollbar { - position: absolute; - overflow: scroll; -} -.ui-grid-native-scrollbar.vertical { - top: 0; - right: 0; - height: 100%; - overflow-x: hidden; - width: 17px; -} -.ui-grid-native-scrollbar.horizontal { - bottom: 0; - left: 0; - width: 100%; - overflow-y: hidden; - height: 17px; -} -.ui-grid-footer-panel-background { - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); -} -.ui-grid-footer-panel { - position: relative; - border-bottom: 1px solid #d4d4d4; - border-top: 1px solid #d4d4d4; - overflow: hidden; - font-weight: bold; - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - -webkit-border-top-right-radius: -1px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: -1px; - -moz-border-radius-topright: -1px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: -1px; - border-top-right-radius: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: -1px; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -.ui-grid-group-panel { - background: #f3f3f3; - background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff)); - background: -ms-linear-gradient(bottom, #eeeeee, #ffffff); - background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%); - background: -o-linear-gradient(#ffffff, #eeeeee); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - border-bottom: 1px solid #d4d4d4; - border-top: 1px solid #d4d4d4; - -webkit-border-top-right-radius: -1px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: -1px; - -moz-border-radius-topright: -1px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: -1px; - border-top-right-radius: -1px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: -1px; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; - min-height: 30px; -} -.ui-grid-footer-group-panel .hidden { - display: none; -} -.ui-grid-footer-viewport { - overflow: hidden; -} -.ui-grid-footer-canvas { - position: relative; -} -.ui-grid-footer-canvas:before, -.ui-grid-footer-canvas:after { - content: ""; - display: table; - line-height: 0; -} -.ui-grid-footer-canvas:after { - clear: both; -} -.ui-grid-footer-cell { - overflow: hidden; - float: left; - background-color: inherit; - border-right: 1px solid; - border-color: #d4d4d4; - box-sizing: border-box; -} -.ui-grid-footer-cell:last-child { - border-right: 0; -} -.ui-grid-footer .ui-grid-vertical-bar { - top: 0; - bottom: 0; -} -input[type="text"].ui-grid-filter-input { - padding: 0; - margin: 0; - border: 0; - width: 100%; - border: 1px solid #d4d4d4; - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -webkit-border-top-left-radius: 0; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - -moz-border-radius-topleft: 0; - border-top-right-radius: 0px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-top-left-radius: 0; - -moz-background-clip: padding-box; - -webkit-background-clip: padding-box; - background-clip: padding-box; -} -input[type="text"].ui-grid-filter-input:hover { - border: 1px solid #d4d4d4; -} -.ui-grid-menu-button { - z-index: 2; - position: absolute; - right: 0; - background: #f3f3f3; - border: 1px solid #d4d4d4; - cursor: pointer; - min-height: 27px; - font-weight: normal; -} -.ui-grid-menu-button .ui-grid-icon-container { - margin-top: 3px; -} -.ui-grid-menu-button .ui-grid-menu { - right: 0; -} -.ui-grid-menu { - z-index: 2; - position: fixed; - overflow: hidden; - padding: 0 10px 20px 10px; - cursor: pointer; - box-sizing: content-box; -} -.ui-grid-menu .ui-grid-menu-inner { - background: #f3f3f3; - border: 1px solid #d4d4d4; - position: relative; - white-space: nowrap; - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - border-radius: 0px; - -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2); -} -.ui-grid-menu .ui-grid-menu-inner ul { - margin: 0; - padding: 0; - list-style-type: none; -} -.ui-grid-menu .ui-grid-menu-inner ul li { - padding: 8px; - cursor: pointer; -} -.ui-grid-menu .ui-grid-menu-inner ul li:hover { - -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); -} -.ui-grid-menu .ui-grid-menu-inner ul li.ui-grid-menu-item-active { - -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); - background-color: #cecece; -} -.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child) { - border-bottom: 1px solid #d4d4d4; -} -.ui-grid-sortarrow { - right: 5px; - position: absolute; - width: 20px; - top: 0; - bottom: 0; - background-position: center; -} -.ui-grid-sortarrow.down { - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -o-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} -@font-face { - font-family: 'ui-grid'; - src: url('ui-grid.eot'); - src: url('ui-grid.eot#iefix') format('embedded-opentype'), url('ui-grid.woff') format('woff'), url('ui-grid.ttf?') format('truetype'), url('ui-grid.svg?#ui-grid') format('svg'); - font-weight: normal; - font-style: normal; -} -/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ -/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ -/* -@media screen and (-webkit-min-device-pixel-ratio:0) { - @font-face { - font-family: 'ui-grid'; - src: url('../font/ui-grid.svg?12312827#ui-grid') format('svg'); - } -} -*/ -[class^="ui-grid-icon"]:before, -[class*=" ui-grid-icon"]:before { - font-family: "ui-grid"; - font-style: normal; - font-weight: normal; - speak: none; - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: .2em; - text-align: center; - /* opacity: .8; */ - /* For safety - reset parent styles, that can break glyph codes*/ - font-variant: normal; - text-transform: none; - /* fix buttons height, for twitter bootstrap */ - line-height: 1em; - /* Animation center compensation - margins should be symmetric */ - /* remove if not needed */ - margin-left: .2em; - /* you can be more comfortable with increased icons size */ - /* font-size: 120%; */ - /* Uncomment for 3D effect */ - /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ -} -.ui-grid-icon-blank::before { - width: 1em; - content: ' '; -} -/* -* RTL Styles -*/ -.ui-grid[dir=rtl] .ui-grid-header-cell, -.ui-grid[dir=rtl] .ui-grid-footer-cell, -.ui-grid[dir=rtl] .ui-grid-cell { - float: right !important; -} -.ui-grid[dir=rtl] .ui-grid-scrollbar-horizontal { - left: inherit; - right: 0; -} -.ui-grid[dir=rtl] .ui-grid-native-scrollbar.vertical { - left: 0; - right: inherit; -} -.ui-grid[dir=rtl] .ui-grid-column-menu-button { - position: absolute; - left: 1px; - top: 0; - right: inherit; -} -.ui-grid[dir=rtl] .ui-grid-cell:first-child, -.ui-grid[dir=rtl] .ui-grid-header-cell:first-child, -.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child { - border-right: 0; -} -.ui-grid[dir=rtl] .ui-grid-cell:last-child { - border-right: 1px solid; - border-color: #d4d4d4; -} -.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar, -.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar, -.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar { - width: 0; -} -.ui-grid[dir=rtl] .ui-grid-menu-button { - z-index: 2; - position: absolute; - left: 0; - right: auto; - background: #f3f3f3; - border: 1px solid #d4d4d4; - cursor: pointer; - min-height: 27px; - font-weight: normal; -} -.ui-grid[dir=rtl] .ui-grid-menu-button .ui-grid-menu { - left: 0; - right: auto; -} -.ui-grid[dir="rtl"] .ui-grid-filter-container .ui-grid-filter-button { - right: initial; - left: 0; -} -.ui-grid[dir="rtl"] .ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"] { - right: initial; - left: 10px; -} -/* - Animation example, for spinners -*/ -.ui-grid-animate-spin { - -moz-animation: ui-grid-spin 2s infinite linear; - -o-animation: ui-grid-spin 2s infinite linear; - -webkit-animation: ui-grid-spin 2s infinite linear; - animation: ui-grid-spin 2s infinite linear; - display: inline-block; -} -@-moz-keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@-webkit-keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@-o-keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@-ms-keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@keyframes ui-grid-spin { - 0% { - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -moz-transform: rotate(359deg); - -o-transform: rotate(359deg); - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -/*--------------------------------------------------- - LESS Elements 0.9 - --------------------------------------------------- - A set of useful LESS mixins - More info at: http://lesselements.com - ---------------------------------------------------*/ -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-cell-focus { - outline: 0; - background-color: #b3c4c7; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -div.ui-grid-cell input { - border-radius: inherit; - padding: 0; - width: 100%; - color: inherit; - height: auto; - font: inherit; - outline: none; -} -div.ui-grid-cell input:focus { - color: inherit; - outline: none; -} -div.ui-grid-cell input[type="checkbox"] { - margin: 9px 0 0 6px; - width: auto; -} -div.ui-grid-cell input.ng-invalid { - border: 1px solid #fc8f8f; -} -div.ui-grid-cell input.ng-valid { - border: 1px solid #d4d4d4; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.expandableRow .ui-grid-row:nth-child(odd) .ui-grid-cell { - background-color: #fdfdfd; -} -.expandableRow .ui-grid-row:nth-child(even) .ui-grid-cell { - background-color: #f3f3f3; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.movingColumn { - position: fixed; - border: 1px solid #d4d4d4; - box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2); -} -.movingColumn .ui-grid-icon-angle-down { - display: none; -} - -.ui-grid-pager-panel { - position: absolute; - left: 0; - bottom: 0; - width: 100%; - padding-top: 3px; - padding-bottom: 3px; -} -.ui-grid-pager-container { - float: left; -} -.ui-grid-pager-control { - margin-right: 10px; - margin-left: 10px; - min-width: 135px; - float: left; -} -.ui-grid-pager-control button { - height: 25px; - min-width: 26px; -} -.ui-grid-pager-control input { - height: 26px; - width: 50px; - vertical-align: top; -} -.ui-grid-pager-control .first-bar { - width: 10px; - border-left: 2px solid #4d4d4d; - margin-top: -6px; - height: 12px; - margin-left: -3px; -} -.ui-grid-pager-control .first-triangle { - width: 0; - height: 0; - border-style: solid; - border-width: 5px 8.7px 5px 0; - border-color: transparent #4d4d4d transparent transparent; - margin-left: 2px; -} -.ui-grid-pager-control .next-triangle { - margin-left: 1px; -} -.ui-grid-pager-control .prev-triangle { - margin-left: 0; -} -.ui-grid-pager-control .last-triangle { - width: 0; - height: 0; - border-style: solid; - border-width: 5px 0 5px 8.7px; - border-color: transparent transparent transparent #4d4d4d; - margin-left: -1px; -} -.ui-grid-pager-control .last-bar { - width: 10px; - border-left: 2px solid #4d4d4d; - margin-top: -6px; - height: 12px; - margin-left: 1px; -} -.ui-grid-pager-row-count-picker { - float: left; -} -.ui-grid-pager-row-count-picker select { - height: 26px; - width: 60px; -} -.ui-grid-pager-row-count-picker .ui-grid-pager-row-count-label { - margin-top: 3px; -} -.ui-grid-pager-count-container { - float: right; - margin-top: 4px; - min-width: 50px; -} -.ui-grid-pager-count-container .ui-grid-pager-count { - margin-right: 10px; - margin-left: 10px; - float: right; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-pinned-container { - float: left; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child { - box-sizing: border-box; - border-right: 1px solid; - border-width: 1px; - border-color: #aeaeae; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child { - box-sizing: border-box; - border-right: 1px solid; - border-width: 1px; - border-color: #aeaeae; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar, -.ui-grid-pinned-container .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar { - width: 1px; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar { - background-color: #d4d4d4; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar { - background-color: #aeaeae; -} -.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child .ui-grid-vertical-bar { - right: -1px; - width: 1px; - background-color: #aeaeae; -} -.ui-grid-render-container-body { - float: left; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-column-resizer { - top: 0; - bottom: 0; - width: 5px; - position: absolute; - cursor: col-resize; -} -.ui-grid-column-resizer.left { - left: 0; -} -.ui-grid-column-resizer.right { - right: 0; -} -.ui-grid.column-resizing { - cursor: col-resize; -} -.ui-grid.column-resizing .ui-grid-resize-overlay { - position: absolute; - top: 0; - height: 100%; - width: 1px; - background-color: #aeaeae; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-row-saving .ui-grid-cell { - color: #848484 !important; -} -.ui-grid-row-dirty .ui-grid-cell { - color: #610b38; -} -.ui-grid-row-error .ui-grid-cell { - color: #ff0000 !important; -} - -/* This file contains variable declarations (do not remove this line) */ -/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -/** -* @section Grid styles -*/ -/** -* @section Header styles -*/ -/** @description Colors for header gradient */ -/** -* @section Grid body styles -*/ -/** @description Colors used for row alternation */ -/** -* @section Sort arrow colors -*/ -/** -* @section Scrollbar styles -*/ -/** -* @section font library path -*/ -/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/ -.ui-grid-row-selected .ui-grid-cell { - background-color: #c9dde1 !important; -} -.ui-grid-disable-selection { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: default; -} -.ui-grid-selection-row-header-buttons { - cursor: pointer; - opacity: 0.1; -} -.ui-grid-selection-row-header-buttons.ui-grid-row-selected { - opacity: 1; -} -.ui-grid-selection-row-header-buttons.ui-grid-all-selected { - opacity: 1; -} - -.ui-grid-icon-plus-squared:before { - content: '\c350'; -} -/* '썐' */ -.ui-grid-icon-minus-squared:before { - content: '\c351'; -} -/* '썑' */ -.ui-grid-icon-search:before { - content: '\c352'; -} -/* '썒' */ -.ui-grid-icon-cancel:before { - content: '\c353'; -} -/* '썓' */ -.ui-grid-icon-info-circled:before { - content: '\c354'; -} -/* '썔' */ -.ui-grid-icon-lock:before { - content: '\c355'; -} -/* '썕' */ -.ui-grid-icon-lock-open:before { - content: '\c356'; -} -/* '썖' */ -.ui-grid-icon-pencil:before { - content: '\c357'; -} -/* '썗' */ -.ui-grid-icon-down-dir:before { - content: '\c358'; -} -/* '썘' */ -.ui-grid-icon-up-dir:before { - content: '\c359'; -} -/* '썙' */ -.ui-grid-icon-left-dir:before { - content: '\c35a'; -} -/* '썚' */ -.ui-grid-icon-right-dir:before { - content: '\c35b'; -} -/* '썛' */ -.ui-grid-icon-left-open:before { - content: '\c35c'; -} -/* '썜' */ -.ui-grid-icon-right-open:before { - content: '\c35d'; -} -/* '썝' */ -.ui-grid-icon-angle-down:before { - content: '\c35e'; -} -/* '썞' */ -.ui-grid-icon-filter:before { - content: '\c35f'; -} -/* '썟' */ -.ui-grid-icon-sort-alt-up:before { - content: '\c360'; -} -/* '썠' */ -.ui-grid-icon-sort-alt-down:before { - content: '\c361'; -} -/* '썡' */ -.ui-grid-icon-ok:before { - content: '\c362'; -} -/* '썢' */ -.ui-grid-icon-menu:before { - content: '\c363'; -} -/* '썣' */ -.ui-grid-icon-spin5:before { - content: '\ea61'; -} -/* '' */ diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.eot b/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.eot deleted file mode 100644 index 88b133b6..00000000 Binary files a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.eot and /dev/null differ diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.min.css b/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.min.css deleted file mode 100644 index cc065e90..00000000 --- a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.min.css +++ /dev/null @@ -1,13 +0,0 @@ -.ui-grid{border:1px solid #d4d4d4;box-sizing:content-box;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-o-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}.ui-grid-vertical-bar{position:absolute;right:0;width:0}.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{width:1px}.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-header-cell:last-child .ui-grid-vertical-bar{right:-1px;width:1px;background-color:#d4d4d4}.ui-grid-clearfix:before,.ui-grid-clearfix:after{content:"";display:table}.ui-grid-clearfix:after{clear:both}.ui-grid-invisible{visibility:hidden}.ui-grid-top-panel-background{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0)}.ui-grid-header{border-bottom:1px solid #d4d4d4;box-sizing:content-box}.ui-grid-top-panel{position:relative;overflow:hidden;font-weight:bold;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-group-panel{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);border-bottom:1px solid #d4d4d4;-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;min-height:30px}.ui-grid-header-group-panel .hidden{display:none}.ui-grid-header-viewport{overflow:hidden}.ui-grid-header-canvas{position:relative}.ui-grid-header-canvas:before,.ui-grid-header-canvas:after{content:"";display:table;line-height:0}.ui-grid-header-canvas:after{clear:both}.ui-grid-header-cell{position:relative;float:left;top:0;bottom:0;background-color:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0}.ui-grid-header-cell .sortable{cursor:pointer}.ui-grid-header .ui-grid-vertical-bar{top:0;bottom:0}.ui-grid-column-menu-button{position:absolute;right:1px;top:0}.ui-grid-column-menu-button .ui-grid-icon-angle-down{vertical-align:sub}.ui-grid-column-menu{position:absolute}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transition:all .05s linear;-moz-transition:all .05s linear;-o-transition:all .05s linear;transition:all .05s linear;display:block !important}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transition:all .05s linear;-moz-transition:all .05s linear;-o-transition:all .05s linear;transition:all .05s linear;display:block !important}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-filter-container{padding:4px 10px;position:relative}.ui-grid-filter-container .ui-grid-filter-button{position:absolute;top:0;bottom:0;right:0}.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]{position:absolute;top:50%;line-height:32px;margin-top:-16px;right:10px;opacity:0.66}.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]:hover{opacity:1}input[type="text"].ui-grid-filter-input{padding:0;margin:0;border:0;width:100%;border:1px solid #d4d4d4;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}input[type="text"].ui-grid-filter-input:hover{border:1px solid #d4d4d4}.ui-grid-render-container{position:inherit;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-render-container:focus{outline:none}.ui-grid-viewport{min-height:20px;position:relative;overflow:hidden}.ui-grid-viewport :focus{outline:none}.ui-grid-canvas{position:relative}.ui-grid-row:nth-child(odd) .ui-grid-cell{background-color:#fdfdfd}.ui-grid-row:nth-child(even) .ui-grid-cell{background-color:#f3f3f3}.ui-grid-row:last-child .ui-grid-cell{border-bottom-color:#d4d4d4;border-bottom-style:solid}.ui-grid-no-row-overlay{position:absolute;top:0;bottom:0;left:0;right:0;margin:10%;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #d4d4d4;font-size:2em;text-align:center}.ui-grid-no-row-overlay>*{position:absolute;display:table;margin:auto 0;width:100%;top:0;bottom:0;left:0;right:0;opacity:0.66}.ui-grid-cell{overflow:hidden;float:left;background-color:inherit;border-right:1px solid;border-color:#d4d4d4;box-sizing:border-box}.ui-grid-cell:last-child{border-right:0}.ui-grid-cell-contents{padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;height:100%}.ui-grid-cell-contents-hidden{visibility:hidden;width:0;height:0;display:none}.ui-grid-row-header-cell{background-color:#F0F0EE !important;border-bottom:solid 1px #d4d4d4}.ui-grid-native-scrollbar{position:absolute;overflow:scroll}.ui-grid-native-scrollbar.vertical{top:0;right:0;height:100%;overflow-x:hidden;width:17px}.ui-grid-native-scrollbar.horizontal{bottom:0;left:0;width:100%;overflow-y:hidden;height:17px}.ui-grid-footer-panel-background{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0)}.ui-grid-footer-panel{position:relative;border-bottom:1px solid #d4d4d4;border-top:1px solid #d4d4d4;overflow:hidden;font-weight:bold;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-group-panel{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);border-bottom:1px solid #d4d4d4;border-top:1px solid #d4d4d4;-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;min-height:30px}.ui-grid-footer-group-panel .hidden{display:none}.ui-grid-footer-viewport{overflow:hidden}.ui-grid-footer-canvas{position:relative}.ui-grid-footer-canvas:before,.ui-grid-footer-canvas:after{content:"";display:table;line-height:0}.ui-grid-footer-canvas:after{clear:both}.ui-grid-footer-cell{overflow:hidden;float:left;background-color:inherit;border-right:1px solid;border-color:#d4d4d4;box-sizing:border-box}.ui-grid-footer-cell:last-child{border-right:0}.ui-grid-footer .ui-grid-vertical-bar{top:0;bottom:0}input[type="text"].ui-grid-filter-input{padding:0;margin:0;border:0;width:100%;border:1px solid #d4d4d4;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}input[type="text"].ui-grid-filter-input:hover{border:1px solid #d4d4d4}.ui-grid-menu-button{z-index:2;position:absolute;right:0;background:#f3f3f3;border:1px solid #d4d4d4;cursor:pointer;min-height:27px;font-weight:normal}.ui-grid-menu-button .ui-grid-icon-container{margin-top:3px}.ui-grid-menu-button .ui-grid-menu{right:0}.ui-grid-menu{z-index:2;position:fixed;overflow:hidden;padding:0 10px 20px 10px;cursor:pointer;box-sizing:content-box}.ui-grid-menu .ui-grid-menu-inner{background:#f3f3f3;border:1px solid #d4d4d4;position:relative;white-space:nowrap;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2)}.ui-grid-menu .ui-grid-menu-inner ul{margin:0;padding:0;list-style-type:none}.ui-grid-menu .ui-grid-menu-inner ul li{padding:8px;cursor:pointer}.ui-grid-menu .ui-grid-menu-inner ul li:hover{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);box-shadow:inset 0 0 14px rgba(0,0,0,0.2)}.ui-grid-menu .ui-grid-menu-inner ul li.ui-grid-menu-item-active{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);box-shadow:inset 0 0 14px rgba(0,0,0,0.2);background-color:#cecece}.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child){border-bottom:1px solid #d4d4d4}.ui-grid-sortarrow{right:5px;position:absolute;width:20px;top:0;bottom:0;background-position:center}.ui-grid-sortarrow.down{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}@font-face{font-family:'ui-grid';src:url('ui-grid.eot');src:url('ui-grid.eot#iefix') format('embedded-opentype'),url('ui-grid.woff') format('woff'),url('ui-grid.ttf?') format('truetype'),url('ui-grid.svg?#ui-grid') format('svg');font-weight:normal;font-style:normal}[class^="ui-grid-icon"]:before,[class*=" ui-grid-icon"]:before{font-family:"ui-grid";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.ui-grid-icon-blank::before{width:1em;content:' '}.ui-grid[dir=rtl] .ui-grid-header-cell,.ui-grid[dir=rtl] .ui-grid-footer-cell,.ui-grid[dir=rtl] .ui-grid-cell{float:right !important}.ui-grid[dir=rtl] .ui-grid-scrollbar-horizontal{left:inherit;right:0}.ui-grid[dir=rtl] .ui-grid-native-scrollbar.vertical{left:0;right:inherit}.ui-grid[dir=rtl] .ui-grid-column-menu-button{position:absolute;left:1px;top:0;right:inherit}.ui-grid[dir=rtl] .ui-grid-cell:first-child,.ui-grid[dir=rtl] .ui-grid-header-cell:first-child,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child{border-right:0}.ui-grid[dir=rtl] .ui-grid-cell:last-child{border-right:1px solid;border-color:#d4d4d4}.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar{width:0}.ui-grid[dir=rtl] .ui-grid-menu-button{z-index:2;position:absolute;left:0;right:auto;background:#f3f3f3;border:1px solid #d4d4d4;cursor:pointer;min-height:27px;font-weight:normal}.ui-grid[dir=rtl] .ui-grid-menu-button .ui-grid-menu{left:0;right:auto}.ui-grid[dir="rtl"] .ui-grid-filter-container .ui-grid-filter-button{right:initial;left:0}.ui-grid[dir="rtl"] .ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]{right:initial;left:10px}.ui-grid-animate-spin{-moz-animation:ui-grid-spin 2s infinite linear;-o-animation:ui-grid-spin 2s infinite linear;-webkit-animation:ui-grid-spin 2s infinite linear;animation:ui-grid-spin 2s infinite linear;display:inline-block}@-moz-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}} -.ui-grid-cell-focus{outline:0;background-color:#b3c4c7} -div.ui-grid-cell input{border-radius:inherit;padding:0;width:100%;color:inherit;height:auto;font:inherit;outline:none}div.ui-grid-cell input:focus{color:inherit;outline:none}div.ui-grid-cell input[type="checkbox"]{margin:9px 0 0 6px;width:auto}div.ui-grid-cell input.ng-invalid{border:1px solid #fc8f8f}div.ui-grid-cell input.ng-valid{border:1px solid #d4d4d4} -.expandableRow .ui-grid-row:nth-child(odd) .ui-grid-cell{background-color:#fdfdfd}.expandableRow .ui-grid-row:nth-child(even) .ui-grid-cell{background-color:#f3f3f3} - - -.movingColumn{position:fixed;border:1px solid #d4d4d4;box-shadow:inset 0 0 14px rgba(0,0,0,0.2)}.movingColumn .ui-grid-icon-angle-down{display:none} -.ui-grid-pager-panel{position:absolute;left:0;bottom:0;width:100%;padding-top:3px;padding-bottom:3px}.ui-grid-pager-container{float:left}.ui-grid-pager-control{margin-right:10px;margin-left:10px;min-width:135px;float:left}.ui-grid-pager-control button{height:25px;min-width:26px}.ui-grid-pager-control input{height:26px;width:50px;vertical-align:top}.ui-grid-pager-control .first-bar{width:10px;border-left:2px solid #4d4d4d;margin-top:-6px;height:12px;margin-left:-3px}.ui-grid-pager-control .first-triangle{width:0;height:0;border-style:solid;border-width:5px 8.7px 5px 0;border-color:transparent #4d4d4d transparent transparent;margin-left:2px}.ui-grid-pager-control .next-triangle{margin-left:1px}.ui-grid-pager-control .prev-triangle{margin-left:0}.ui-grid-pager-control .last-triangle{width:0;height:0;border-style:solid;border-width:5px 0 5px 8.7px;border-color:transparent transparent transparent #4d4d4d;margin-left:-1px}.ui-grid-pager-control .last-bar{width:10px;border-left:2px solid #4d4d4d;margin-top:-6px;height:12px;margin-left:1px}.ui-grid-pager-row-count-picker{float:left}.ui-grid-pager-row-count-picker select{height:26px;width:60px}.ui-grid-pager-row-count-picker .ui-grid-pager-row-count-label{margin-top:3px}.ui-grid-pager-count-container{float:right;margin-top:4px;min-width:50px}.ui-grid-pager-count-container .ui-grid-pager-count{margin-right:10px;margin-left:10px;float:right} -.ui-grid-pinned-container{float:left}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child{box-sizing:border-box;border-right:1px solid;border-width:1px;border-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child{box-sizing:border-box;border-right:1px solid;border-width:1px;border-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,.ui-grid-pinned-container .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{width:1px}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child .ui-grid-vertical-bar{right:-1px;width:1px;background-color:#aeaeae}.ui-grid-render-container-body{float:left} -.ui-grid-column-resizer{top:0;bottom:0;width:5px;position:absolute;cursor:col-resize}.ui-grid-column-resizer.left{left:0}.ui-grid-column-resizer.right{right:0}.ui-grid.column-resizing{cursor:col-resize}.ui-grid.column-resizing .ui-grid-resize-overlay{position:absolute;top:0;height:100%;width:1px;background-color:#aeaeae} -.ui-grid-row-saving .ui-grid-cell{color:#848484 !important}.ui-grid-row-dirty .ui-grid-cell{color:#610b38}.ui-grid-row-error .ui-grid-cell{color:#f00 !important} -.ui-grid-row-selected .ui-grid-cell{background-color:#c9dde1 !important}.ui-grid-disable-selection{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.ui-grid-selection-row-header-buttons{cursor:pointer;opacity:0.1}.ui-grid-selection-row-header-buttons.ui-grid-row-selected{opacity:1}.ui-grid-selection-row-header-buttons.ui-grid-all-selected{opacity:1} -.ui-grid-icon-plus-squared:before{content:'\c350'}.ui-grid-icon-minus-squared:before{content:'\c351'}.ui-grid-icon-search:before{content:'\c352'}.ui-grid-icon-cancel:before{content:'\c353'}.ui-grid-icon-info-circled:before{content:'\c354'}.ui-grid-icon-lock:before{content:'\c355'}.ui-grid-icon-lock-open:before{content:'\c356'}.ui-grid-icon-pencil:before{content:'\c357'}.ui-grid-icon-down-dir:before{content:'\c358'}.ui-grid-icon-up-dir:before{content:'\c359'}.ui-grid-icon-left-dir:before{content:'\c35a'}.ui-grid-icon-right-dir:before{content:'\c35b'}.ui-grid-icon-left-open:before{content:'\c35c'}.ui-grid-icon-right-open:before{content:'\c35d'}.ui-grid-icon-angle-down:before{content:'\c35e'}.ui-grid-icon-filter:before{content:'\c35f'}.ui-grid-icon-sort-alt-up:before{content:'\c360'}.ui-grid-icon-sort-alt-down:before{content:'\c361'}.ui-grid-icon-ok:before{content:'\c362'}.ui-grid-icon-menu:before{content:'\c363'}.ui-grid-icon-spin5:before{content:'\ea61'} diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.svg b/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.svg deleted file mode 100644 index ad8cdc63..00000000 --- a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - -Copyright (C) 2014 by original authors @ fontello.com - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.ttf b/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.ttf deleted file mode 100644 index d2dc304d..00000000 Binary files a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.ttf and /dev/null differ diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.woff b/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.woff deleted file mode 100644 index e11bc656..00000000 Binary files a/src/main/resources/META-INF/resources/designer/css/ui-grid-unstable.woff and /dev/null differ diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid.css b/src/main/resources/META-INF/resources/designer/css/ui-grid.css deleted file mode 100644 index b31f2f54..00000000 --- a/src/main/resources/META-INF/resources/designer/css/ui-grid.css +++ /dev/null @@ -1,14 +0,0 @@ -.ui-grid-header-table { - margin-bottom: 0; -} -.ui-grid-pinned.left { - float: left; -} -.ui-grid-pinned.right { - float: right; -} -.ui-grid-viewport tbody, -.ui-grid-viewport table tr:first-child, -.ui-grid-viewport table tr:first-child > td { - border-top: none; -} diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid.eot b/src/main/resources/META-INF/resources/designer/css/ui-grid.eot deleted file mode 100644 index 4d98e71c..00000000 Binary files a/src/main/resources/META-INF/resources/designer/css/ui-grid.eot and /dev/null differ diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid.min.css b/src/main/resources/META-INF/resources/designer/css/ui-grid.min.css deleted file mode 100644 index 0506679b..00000000 --- a/src/main/resources/META-INF/resources/designer/css/ui-grid.min.css +++ /dev/null @@ -1 +0,0 @@ -.ui-grid-header-table{margin-bottom:0}.ui-grid-pinned.left{float:left}.ui-grid-pinned.right{float:right}.ui-grid-viewport tbody,.ui-grid-viewport table tr:first-child,.ui-grid-viewport table tr:first-child>td{border-top:none} diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid.svg b/src/main/resources/META-INF/resources/designer/css/ui-grid.svg deleted file mode 100644 index e3138a36..00000000 --- a/src/main/resources/META-INF/resources/designer/css/ui-grid.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - -Copyright (C) 2014 by original authors @ fontello.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid.ttf b/src/main/resources/META-INF/resources/designer/css/ui-grid.ttf deleted file mode 100644 index 838611af..00000000 Binary files a/src/main/resources/META-INF/resources/designer/css/ui-grid.ttf and /dev/null differ diff --git a/src/main/resources/META-INF/resources/designer/css/ui-grid.woff b/src/main/resources/META-INF/resources/designer/css/ui-grid.woff deleted file mode 100644 index ca1a9c6e..00000000 Binary files a/src/main/resources/META-INF/resources/designer/css/ui-grid.woff and /dev/null differ diff --git a/src/main/resources/META-INF/resources/designer/index.html b/src/main/resources/META-INF/resources/designer/index.html index 85fff431..82d3d7bb 100644 --- a/src/main/resources/META-INF/resources/designer/index.html +++ b/src/main/resources/META-INF/resources/designer/index.html @@ -65,9 +65,6 @@ - - - @@ -120,8 +117,6 @@ - - diff --git a/src/main/resources/META-INF/resources/designer/lib/ui-grid-stable.js b/src/main/resources/META-INF/resources/designer/lib/ui-grid-stable.js deleted file mode 100644 index c3c3dcd7..00000000 --- a/src/main/resources/META-INF/resources/designer/lib/ui-grid-stable.js +++ /dev/null @@ -1,13034 +0,0 @@ -/*! ui-grid - v3.0.0-rc.3 - 2014-09-25 -* Copyright (c) 2014 ; License: MIT */ -(function () { - 'use strict'; - angular.module('ui.grid.i18n', []); - angular.module('ui.grid', ['ui.grid.i18n']); -})(); -(function () { - 'use strict'; - angular.module('ui.grid').constant('uiGridConstants', { - CUSTOM_FILTERS: /CUSTOM_FILTERS/g, - COL_FIELD: /COL_FIELD/g, - DISPLAY_CELL_TEMPLATE: /DISPLAY_CELL_TEMPLATE/g, - TEMPLATE_REGEXP: /<.+>/, - FUNC_REGEXP: /(\([^)]*\))?$/, - DOT_REGEXP: /\./g, - APOS_REGEXP: /'/g, - BRACKET_REGEXP: /^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/, - COL_CLASS_PREFIX: 'ui-grid-col', - events: { - GRID_SCROLL: 'uiGridScroll', - COLUMN_MENU_SHOWN: 'uiGridColMenuShown', - ITEM_DRAGGING: 'uiGridItemDragStart' // For any item being dragged - }, - // copied from http://www.lsauer.com/2011/08/javascript-keymap-keycodes-in-json.html - keymap: { - TAB: 9, - STRG: 17, - CTRL: 17, - CTRLRIGHT: 18, - CTRLR: 18, - SHIFT: 16, - RETURN: 13, - ENTER: 13, - BACKSPACE: 8, - BCKSP: 8, - ALT: 18, - ALTR: 17, - ALTRIGHT: 17, - SPACE: 32, - WIN: 91, - MAC: 91, - FN: null, - UP: 38, - DOWN: 40, - LEFT: 37, - RIGHT: 39, - ESC: 27, - DEL: 46, - F1: 112, - F2: 113, - F3: 114, - F4: 115, - F5: 116, - F6: 117, - F7: 118, - F8: 119, - F9: 120, - F10: 121, - F11: 122, - F12: 123 - }, - ASC: 'asc', - DESC: 'desc', - filter: { - STARTS_WITH: 2, - ENDS_WITH: 4, - EXACT: 8, - CONTAINS: 16, - GREATER_THAN: 32, - GREATER_THAN_OR_EQUAL: 64, - LESS_THAN: 128, - LESS_THAN_OR_EQUAL: 256, - NOT_EQUAL: 512 - }, - - aggregationTypes: { - sum: 2, - count: 4, - avg: 8, - min: 16, - max: 32 - }, - - // TODO(c0bra): Create full list of these somehow. NOTE: do any allow a space before or after them? - CURRENCY_SYMBOLS: ['ƒ', '$', '£', '$', '¤', '¥', '៛', '₩', '₱', '฿', '₫'] - }); - -})(); -angular.module('ui.grid').directive('uiGridCell', ['$compile', '$log', '$parse', 'gridUtil', 'uiGridConstants', function ($compile, $log, $parse, gridUtil, uiGridConstants) { - var uiGridCell = { - priority: 0, - scope: false, - require: '?^uiGrid', - compile: function() { - return { - pre: function($scope, $elm, $attrs, uiGridCtrl) { - function compileTemplate() { - var compiledElementFn = $scope.col.compiledElementFn; - - compiledElementFn($scope, function(clonedElement, scope) { - $elm.append(clonedElement); - }); - } - - // If the grid controller is present, use it to get the compiled cell template function - if (uiGridCtrl) { - compileTemplate(); - } - // No controller, compile the element manually (for unit tests) - else { - var html = $scope.col.cellTemplate - .replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)'); - var cellElement = $compile(html)($scope); - $elm.append(cellElement); - } - }, - post: function($scope, $elm, $attrs, uiGridCtrl) { - $elm.addClass($scope.col.getColClass(false)); - if ($scope.col.cellClass) { - //var contents = angular.element($elm[0].getElementsByClassName('ui-grid-cell-contents')); - var contents = $elm; - if (angular.isFunction($scope.col.cellClass)) { - contents.addClass($scope.col.cellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex)); - } - else { - contents.addClass($scope.col.cellClass); - } - } - } - }; - } - }; - - return uiGridCell; -}]); - - -(function(){ - -angular.module('ui.grid').directive('uiGridColumnMenu', ['$log', '$timeout', '$window', '$document', '$injector', 'gridUtil', 'uiGridConstants', 'i18nService', function ($log, $timeout, $window, $document, $injector, gridUtil, uiGridConstants, i18nService) { - - var uiGridColumnMenu = { - priority: 0, - scope: true, - require: '?^uiGrid', - templateUrl: 'ui-grid/uiGridColumnMenu', - replace: true, - link: function ($scope, $elm, $attrs, uiGridCtrl) { - gridUtil.enableAnimations($elm); - - $scope.grid = uiGridCtrl.grid; - - var self = this; - - // Store a reference to this link/controller in the main uiGrid controller - // to allow showMenu later - uiGridCtrl.columnMenuScope = $scope; - - // Save whether we're shown or not so the columns can check - self.shown = $scope.menuShown = false; - - // Put asc and desc sort directions in scope - $scope.asc = uiGridConstants.ASC; - $scope.desc = uiGridConstants.DESC; - - // $scope.i18n = i18nService; - - // Get the grid menu element. We'll use it to calculate positioning - $scope.menu = $elm[0].querySelectorAll('.ui-grid-menu'); - - // Get the inner menu part. It's what slides up/down - $scope.inner = $elm[0].querySelectorAll('.ui-grid-menu-inner'); - - /** - * @ngdoc boolean - * @name enableSorting - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description (optional) True by default. When enabled, this setting adds sort - * widgets to the column header, allowing sorting of the data in the individual column. - */ - $scope.sortable = function() { - if (uiGridCtrl.grid.options.enableSorting && typeof($scope.col) !== 'undefined' && $scope.col && $scope.col.enableSorting) { - return true; - } - else { - return false; - } - }; - - /** - * @ngdoc boolean - * @name enableFiltering - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description (optional) True by default. When enabled, this setting adds filter - * widgets to the column header, allowing filtering of the data in the individual column. - */ - $scope.filterable = function() { - if (uiGridCtrl.grid.options.enableFiltering && typeof($scope.col) !== 'undefined' && $scope.col && $scope.col.enableFiltering) { - return true; - } - else { - return false; - } - }; - - var defaultMenuItems = [ - // NOTE: disabling this in favor of a little filter text box - // Column filter input - // { - // templateUrl: 'ui-grid/uiGridColumnFilter', - // action: function($event) { - // $event.stopPropagation(); - // $scope.filterColumn($event); - // }, - // cancel: function ($event) { - // $event.stopPropagation(); - - // $scope.col.filter = {}; - // }, - // shown: function () { - // return filterable(); - // } - // }, - { - title: i18nService.getSafeText('sort.ascending'), - icon: 'ui-grid-icon-sort-alt-up', - action: function($event) { - $event.stopPropagation(); - $scope.sortColumn($event, uiGridConstants.ASC); - }, - shown: function () { - return $scope.sortable(); - }, - active: function() { - return (typeof($scope.col) !== 'undefined' && typeof($scope.col.sort) !== 'undefined' && typeof($scope.col.sort.direction) !== 'undefined' && $scope.col.sort.direction === uiGridConstants.ASC); - } - }, - { - title: i18nService.getSafeText('sort.descending'), - icon: 'ui-grid-icon-sort-alt-down', - action: function($event) { - $event.stopPropagation(); - $scope.sortColumn($event, uiGridConstants.DESC); - }, - shown: function() { - return $scope.sortable(); - }, - active: function() { - return (typeof($scope.col) !== 'undefined' && typeof($scope.col.sort) !== 'undefined' && typeof($scope.col.sort.direction) !== 'undefined' && $scope.col.sort.direction === uiGridConstants.DESC); - } - }, - { - title: i18nService.getSafeText('sort.remove'), - icon: 'ui-grid-icon-cancel', - action: function ($event) { - $event.stopPropagation(); - $scope.unsortColumn(); - }, - shown: function() { - return ($scope.sortable() && typeof($scope.col) !== 'undefined' && (typeof($scope.col.sort) !== 'undefined' && typeof($scope.col.sort.direction) !== 'undefined') && $scope.col.sort.direction !== null); - } - }, - { - title: i18nService.getSafeText('column.hide'), - icon: 'ui-grid-icon-cancel', - action: function ($event) { - $event.stopPropagation(); - $scope.hideColumn(); - } - } - ]; - - // Set the menu items for use with the column menu. Let's the user specify extra menu items per column if they want. - $scope.menuItems = defaultMenuItems; - $scope.$watch('col.menuItems', function (n, o) { - if (typeof(n) !== 'undefined' && n && angular.isArray(n)) { - n.forEach(function (item) { - if (typeof(item.context) === 'undefined' || !item.context) { - item.context = {}; - } - item.context.col = $scope.col; - }); - - $scope.menuItems = defaultMenuItems.concat(n); - } - else { - $scope.menuItems = defaultMenuItems; - } - }); - - var $animate; - try { - $animate = $injector.get('$animate'); - } - catch (e) { - $log.info('$animate service not found (ngAnimate not add as a dependency?), menu animations will not occur'); - } - - // Show the menu - $scope.showMenu = function(column, $columnElement) { - // Swap to this column - // note - store a reference to this column in 'self' so the columns can check whether they're the shown column or not - self.col = $scope.col = column; - - // Remove an existing document click handler - $document.off('click', documentClick); - - /* Reposition the menu below this column's element */ - var left = $columnElement[0].offsetLeft; - var top = $columnElement[0].offsetTop; - - // Get the grid scrollLeft - var offset = 0; - if (column.grid.options.offsetLeft) { - offset = column.grid.options.offsetLeft; - } - - var height = gridUtil.elementHeight($columnElement, true); - var width = gridUtil.elementWidth($columnElement, true); - - // Flag for whether we're hidden for showing via $animate - var hidden = false; - - // Re-position the menu AFTER it's been shown, so we can calculate the width correctly. - function reposition() { - $timeout(function() { - if (hidden && $animate) { - $animate.removeClass($scope.inner, 'ng-hide'); - self.shown = $scope.menuShown = true; - $scope.$broadcast('show-menu'); - } - else if (angular.element($scope.inner).hasClass('ng-hide')) { - angular.element($scope.inner).removeClass('ng-hide'); - } - - // var containerScrollLeft = $columnelement - var containerId = column.renderContainer ? column.renderContainer : 'body'; - var renderContainer = column.grid.renderContainers[containerId]; - // var containerScrolLeft = renderContainer.prevScrollLeft; - - // It's possible that the render container of the column we're attaching to is offset from the grid (i.e. pinned containers), we - // need to get the different in the offsetLeft between the render container and the grid - var renderContainerElm = gridUtil.closestElm($columnElement, '.ui-grid-render-container'); - var renderContainerOffset = renderContainerElm.offsetLeft - $scope.grid.element[0].offsetLeft; - - var containerScrolLeft = renderContainerElm.querySelectorAll('.ui-grid-viewport')[0].scrollLeft; - - var myWidth = gridUtil.elementWidth($scope.menu, true); - - // TODO(c0bra): use padding-left/padding-right based on document direction (ltr/rtl), place menu on proper side - // Get the column menu right padding - var paddingRight = parseInt(angular.element($scope.menu).css('padding-right'), 10); - - // $log.debug('position', left + ' + ' + width + ' - ' + myWidth + ' + ' + paddingRight); - - $elm.css('left', (left + renderContainerOffset - containerScrolLeft + width - myWidth + paddingRight) + 'px'); - $elm.css('top', (top + height) + 'px'); - - // Hide the menu on a click on the document - $document.on('click', documentClick); - }); - } - - if ($scope.menuShown && $animate) { - // Animate closing the menu on the current column, then animate it opening on the other column - $animate.addClass($scope.inner, 'ng-hide', reposition); - hidden = true; - } - else { - self.shown = $scope.menuShown = true; - $scope.$broadcast('show-menu'); - reposition(); - } - }; - - // Hide the menu - $scope.hideMenu = function() { - delete self.col; - delete $scope.col; - self.shown = $scope.menuShown = false; - $scope.$broadcast('hide-menu'); - }; - - // Prevent clicks on the menu from bubbling up to the document and making it hide prematurely - // $elm.on('click', function (event) { - // event.stopPropagation(); - // }); - - function documentClick() { - $scope.$apply($scope.hideMenu); - $document.off('click', documentClick); - } - - function resizeHandler() { - $scope.$apply($scope.hideMenu); - } - angular.element($window).bind('resize', resizeHandler); - - $scope.$on('$destroy', $scope.$on(uiGridConstants.events.GRID_SCROLL, function(evt, args) { - $scope.hideMenu(); - // if (!$scope.$$phase) { $scope.$apply(); } - })); - - $scope.$on('$destroy', $scope.$on(uiGridConstants.events.ITEM_DRAGGING, function(evt, args) { - $scope.hideMenu(); - // if (!$scope.$$phase) { $scope.$apply(); } - })); - - $scope.$on('$destroy', function() { - angular.element($window).off('resize', resizeHandler); - $document.off('click', documentClick); - }); - - /* Column methods */ - $scope.sortColumn = function (event, dir) { - event.stopPropagation(); - - uiGridCtrl.grid.sortColumn($scope.col, dir, true) - .then(function () { - uiGridCtrl.grid.refresh(); - $scope.hideMenu(); - }); - }; - - $scope.unsortColumn = function () { - $scope.col.unsort(); - - uiGridCtrl.grid.refresh(); - $scope.hideMenu(); - }; - - $scope.hideColumn = function () { - $scope.col.colDef.visible = false; - - uiGridCtrl.grid.refresh(); - $scope.hideMenu(); - }; - }, - controller: ['$scope', function ($scope) { - var self = this; - - $scope.$watch('menuItems', function (n, o) { - self.menuItems = n; - }); - }] - }; - - return uiGridColumnMenu; - -}]); - -})(); -(function () { - 'use strict'; - - angular.module('ui.grid').directive('uiGridFooterCell', ['$log', '$timeout', 'gridUtil', '$compile', function ($log, $timeout, gridUtil, $compile) { - var uiGridFooterCell = { - priority: 0, - scope: { - col: '=', - row: '=', - renderIndex: '=' - }, - replace: true, - require: '^uiGrid', - compile: function compile(tElement, tAttrs, transclude) { - return { - pre: function ($scope, $elm, $attrs, uiGridCtrl) { - function compileTemplate(template) { - gridUtil.getTemplate(template).then(function (contents) { - var linkFunction = $compile(contents); - var html = linkFunction($scope); - $elm.append(html); - }); - } - - //compile the footer template - if ($scope.col.footerCellTemplate) { - //compile the custom template - compileTemplate($scope.col.footerCellTemplate); - } - else { - //use default template - compileTemplate('ui-grid/uiGridFooterCell'); - } - }, - post: function ($scope, $elm, $attrs, uiGridCtrl) { - //$elm.addClass($scope.col.getColClass(false)); - $scope.grid = uiGridCtrl.grid; - - $elm.addClass($scope.col.getColClass(false)); - } - }; - } - }; - - return uiGridFooterCell; - }]); - -})(); - -(function () { - 'use strict'; - - angular.module('ui.grid').directive('uiGridFooter', ['$log', '$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function ($log, $templateCache, $compile, uiGridConstants, gridUtil, $timeout) { - var defaultTemplate = 'ui-grid/ui-grid-footer'; - - return { - restrict: 'EA', - replace: true, - // priority: 1000, - require: ['^uiGrid', '^uiGridRenderContainer'], - scope: true, - compile: function ($elm, $attrs) { - return { - pre: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - $scope.grid = uiGridCtrl.grid; - $scope.colContainer = containerCtrl.colContainer; - - containerCtrl.footer = $elm; - - var footerTemplate = ($scope.grid.options.footerTemplate) ? $scope.grid.options.footerTemplate : defaultTemplate; - gridUtil.getTemplate(footerTemplate) - .then(function (contents) { - var template = angular.element(contents); - - var newElm = $compile(template)($scope); - $elm.append(newElm); - - if (containerCtrl) { - // Inject a reference to the footer viewport (if it exists) into the grid controller for use in the horizontal scroll handler below - var footerViewport = $elm[0].getElementsByClassName('ui-grid-footer-viewport')[0]; - - if (footerViewport) { - containerCtrl.footerViewport = footerViewport; - } - } - }); - }, - - post: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - $log.debug('ui-grid-footer link'); - - var grid = uiGridCtrl.grid; - - // Don't animate footer cells - gridUtil.disableAnimations($elm); - - containerCtrl.footer = $elm; - - var footerViewport = $elm[0].getElementsByClassName('ui-grid-footer-viewport')[0]; - if (footerViewport) { - containerCtrl.footerViewport = footerViewport; - } - } - }; - } - }; - }]); - -})(); -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridGroupPanel', ["$compile", "uiGridConstants", "gridUtil", function($compile, uiGridConstants, gridUtil) { - var defaultTemplate = 'ui-grid/ui-grid-group-panel'; - - return { - restrict: 'EA', - replace: true, - require: '?^uiGrid', - scope: false, - compile: function($elm, $attrs) { - return { - pre: function ($scope, $elm, $attrs, uiGridCtrl) { - var groupPanelTemplate = $scope.grid.options.groupPanelTemplate || defaultTemplate; - - gridUtil.getTemplate(groupPanelTemplate) - .then(function (contents) { - var template = angular.element(contents); - - var newElm = $compile(template)($scope); - $elm.append(newElm); - }); - }, - - post: function ($scope, $elm, $attrs, uiGridCtrl) { - $elm.bind('$destroy', function() { - // scrollUnbinder(); - }); - } - }; - } - }; - }]); - -})(); -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridHeaderCell', ['$log', '$compile', '$timeout', '$window', '$document', 'gridUtil', 'uiGridConstants', - function ($log, $compile, $timeout, $window, $document, gridUtil, uiGridConstants) { - // Do stuff after mouse has been down this many ms on the header cell - var mousedownTimeout = 500; - - var uiGridHeaderCell = { - priority: 0, - scope: { - col: '=', - row: '=', - renderIndex: '=' - }, - require: '?^uiGrid', - replace: true, - compile: function() { - return { - pre: function ($scope, $elm, $attrs, uiGridCtrl) { - var cellHeader = $compile($scope.col.headerCellTemplate)($scope); - $elm.append(cellHeader); - }, - - post: function ($scope, $elm, $attrs, uiGridCtrl) { - $scope.grid = uiGridCtrl.grid; - - /** - * @ngdoc event - * @name filterChanged - * @eventOf ui.grid.core.api:PublicApi - * @description is raised after the filter is changed. The nature - * of the watch expression doesn't allow notification of what changed, - * so the receiver of this event will need to re-extract the filter - * conditions from the columns. - * - */ - if (!$scope.grid.api.core.raise.filterChanged){ - $scope.grid.api.registerEvent( 'core', 'filterChanged' ); - } - - - $elm.addClass($scope.col.getColClass(false)); - // shane - No need for watch now that we trackby col name - // $scope.$watch('col.index', function (newValue, oldValue) { - // if (newValue === oldValue) { return; } - // var className = $elm.attr('class'); - // className = className.replace(uiGridConstants.COL_CLASS_PREFIX + oldValue, uiGridConstants.COL_CLASS_PREFIX + newValue); - // $elm.attr('class', className); - // }); - - // Hide the menu by default - $scope.menuShown = false; - - // Put asc and desc sort directions in scope - $scope.asc = uiGridConstants.ASC; - $scope.desc = uiGridConstants.DESC; - - // Store a reference to menu element - var $colMenu = angular.element( $elm[0].querySelectorAll('.ui-grid-header-cell-menu') ); - - var $contentsElm = angular.element( $elm[0].querySelectorAll('.ui-grid-cell-contents') ); - - // Figure out whether this column is sortable or not - if (uiGridCtrl.grid.options.enableSorting && $scope.col.enableSorting) { - $scope.sortable = true; - } - else { - $scope.sortable = false; - } - - if (uiGridCtrl.grid.options.enableFiltering && $scope.col.enableFiltering) { - $scope.filterable = true; - } - else { - $scope.filterable = false; - } - - function handleClick(evt) { - // If the shift key is being held down, add this column to the sort - var add = false; - if (evt.shiftKey) { - add = true; - } - - // Sort this column then rebuild the grid's rows - uiGridCtrl.grid.sortColumn($scope.col, add) - .then(function () { - if (uiGridCtrl.columnMenuScope) { uiGridCtrl.columnMenuScope.hideMenu(); } - uiGridCtrl.grid.refresh(); - }); - } - - // Long-click (for mobile) - var cancelMousedownTimeout; - var mousedownStartTime = 0; - $contentsElm.on('mousedown', function(event) { - if (typeof(event.originalEvent) !== 'undefined' && event.originalEvent !== undefined) { - event = event.originalEvent; - } - - // Don't show the menu if it's not the left button - if (event.button && event.button !== 0) { - return; - } - - mousedownStartTime = (new Date()).getTime(); - - cancelMousedownTimeout = $timeout(function() { }, mousedownTimeout); - - cancelMousedownTimeout.then(function () { - uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm); - }); - }); - - $contentsElm.on('mouseup', function () { - $timeout.cancel(cancelMousedownTimeout); - }); - - $scope.toggleMenu = function($event) { - $event.stopPropagation(); - - // If the menu is already showing... - if (uiGridCtrl.columnMenuScope.menuShown) { - // ... and we're the column the menu is on... - if (uiGridCtrl.columnMenuScope.col === $scope.col) { - // ... hide it - uiGridCtrl.columnMenuScope.hideMenu(); - } - // ... and we're NOT the column the menu is on - else { - // ... move the menu to our column - uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm); - } - } - // If the menu is NOT showing - else { - // ... show it on our column - uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm); - } - }; - - // If this column is sortable, add a click event handler - if ($scope.sortable) { - $contentsElm.on('click', function(evt) { - evt.stopPropagation(); - - $timeout.cancel(cancelMousedownTimeout); - - var mousedownEndTime = (new Date()).getTime(); - var mousedownTime = mousedownEndTime - mousedownStartTime; - - if (mousedownTime > mousedownTimeout) { - // long click, handled above with mousedown - } - else { - // short click - handleClick(evt); - } - }); - - $scope.$on('$destroy', function () { - // Cancel any pending long-click timeout - $timeout.cancel(cancelMousedownTimeout); - }); - } - - if ($scope.filterable) { - var filterDeregisters = []; - angular.forEach($scope.col.filters, function(filter, i) { - filterDeregisters.push($scope.$watch('col.filters[' + i + '].term', function(n, o) { - uiGridCtrl.grid.api.core.raise.filterChanged(); - uiGridCtrl.grid.refresh() - .then(function () { - if (uiGridCtrl.prevScrollArgs && uiGridCtrl.prevScrollArgs.y && uiGridCtrl.prevScrollArgs.y.percentage) { - uiGridCtrl.fireScrollingEvent({ y: { percentage: uiGridCtrl.prevScrollArgs.y.percentage } }); - } - // uiGridCtrl.fireEvent('force-vertical-scroll'); - }); - })); - }); - $scope.$on('$destroy', function() { - angular.forEach(filterDeregisters, function(filterDeregister) { - filterDeregister(); - }); - }); - } - } - }; - } - }; - - return uiGridHeaderCell; - }]); - -})(); - -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridHeader', ['$log', '$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function($log, $templateCache, $compile, uiGridConstants, gridUtil, $timeout) { - var defaultTemplate = 'ui-grid/ui-grid-header'; - var emptyTemplate = 'ui-grid/ui-grid-no-header'; - - return { - restrict: 'EA', - // templateUrl: 'ui-grid/ui-grid-header', - replace: true, - // priority: 1000, - require: ['^uiGrid', '^uiGridRenderContainer'], - scope: true, - compile: function($elm, $attrs) { - return { - pre: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - $scope.grid = uiGridCtrl.grid; - $scope.colContainer = containerCtrl.colContainer; - - containerCtrl.header = $elm; - containerCtrl.colContainer.header = $elm; - - /** - * @ngdoc property - * @name hideHeader - * @propertyOf ui.grid.class:GridOptions - * @description Null by default. When set to true, this setting will replace the - * standard header template with '
', resulting in no header being shown. - */ - - var headerTemplate; - if ($scope.grid.options.hideHeader){ - headerTemplate = emptyTemplate; - } else { - headerTemplate = ($scope.grid.options.headerTemplate) ? $scope.grid.options.headerTemplate : defaultTemplate; - } - - gridUtil.getTemplate(headerTemplate) - .then(function (contents) { - var template = angular.element(contents); - - var newElm = $compile(template)($scope); - $elm.append(newElm); - - if (containerCtrl) { - // Inject a reference to the header viewport (if it exists) into the grid controller for use in the horizontal scroll handler below - var headerViewport = $elm[0].getElementsByClassName('ui-grid-header-viewport')[0]; - - if (headerViewport) { - containerCtrl.headerViewport = headerViewport; - } - } - }); - }, - - post: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - $log.debug('ui-grid-header link'); - - var grid = uiGridCtrl.grid; - - // Don't animate header cells - gridUtil.disableAnimations($elm); - - function updateColumnWidths() { - var asterisksArray = [], - percentArray = [], - manualArray = [], - asteriskNum = 0, - totalWidth = 0; - - // Get the width of the viewport - var availableWidth = containerCtrl.colContainer.getViewportWidth(); - - if (typeof(uiGridCtrl.grid.verticalScrollbarWidth) !== 'undefined' && uiGridCtrl.grid.verticalScrollbarWidth !== undefined && uiGridCtrl.grid.verticalScrollbarWidth > 0) { - availableWidth = availableWidth + uiGridCtrl.grid.verticalScrollbarWidth; - } - - // The total number of columns - // var equalWidthColumnCount = columnCount = uiGridCtrl.grid.options.columnDefs.length; - // var equalWidth = availableWidth / equalWidthColumnCount; - - // The last column we processed - var lastColumn; - - var manualWidthSum = 0; - - var canvasWidth = 0; - - var ret = ''; - - - // uiGridCtrl.grid.columns.forEach(function(column, i) { - - var columnCache = containerCtrl.colContainer.visibleColumnCache; - - columnCache.forEach(function(column, i) { - // ret = ret + ' .grid' + uiGridCtrl.grid.id + ' .col' + i + ' { width: ' + equalWidth + 'px; left: ' + left + 'px; }'; - //var colWidth = (typeof(c.width) !== 'undefined' && c.width !== undefined) ? c.width : equalWidth; - - // Skip hidden columns - if (!column.visible) { return; } - - var colWidth, - isPercent = false; - - if (!angular.isNumber(column.width)) { - isPercent = isNaN(column.width) ? gridUtil.endsWith(column.width, "%") : false; - } - - if (angular.isString(column.width) && column.width.indexOf('*') !== -1) { // we need to save it until the end to do the calulations on the remaining width. - asteriskNum = parseInt(asteriskNum + column.width.length, 10); - - asterisksArray.push(column); - } - else if (isPercent) { // If the width is a percentage, save it until the very last. - percentArray.push(column); - } - else if (angular.isNumber(column.width)) { - manualWidthSum = parseInt(manualWidthSum + column.width, 10); - - canvasWidth = parseInt(canvasWidth, 10) + parseInt(column.width, 10); - - column.drawnWidth = column.width; - - // ret = ret + ' .grid' + uiGridCtrl.grid.id + ' .col' + column.index + ' { width: ' + column.width + 'px; }'; - } - }); - - // Get the remaining width (available width subtracted by the manual widths sum) - var remainingWidth = availableWidth - manualWidthSum; - - var i, column, colWidth; - - if (percentArray.length > 0) { - // Pre-process to make sure they're all within any min/max values - for (i = 0; i < percentArray.length; i++) { - column = percentArray[i]; - - var percent = parseInt(column.width.replace(/%/g, ''), 10) / 100; - - colWidth = parseInt(percent * remainingWidth, 10); - - if (column.colDef.minWidth && colWidth < column.colDef.minWidth) { - colWidth = column.colDef.minWidth; - - remainingWidth = remainingWidth - colWidth; - - canvasWidth += colWidth; - column.drawnWidth = colWidth; - - // ret = ret + ' .grid' + uiGridCtrl.grid.id + ' .col' + column.index + ' { width: ' + colWidth + 'px; }'; - - // Remove this element from the percent array so it's not processed below - percentArray.splice(i, 1); - } - else if (column.colDef.maxWidth && colWidth > column.colDef.maxWidth) { - colWidth = column.colDef.maxWidth; - - remainingWidth = remainingWidth - colWidth; - - canvasWidth += colWidth; - column.drawnWidth = colWidth; - - // ret = ret + ' .grid' + uiGridCtrl.grid.id + ' .col' + column.index + ' { width: ' + colWidth + 'px; }'; - - // Remove this element from the percent array so it's not processed below - percentArray.splice(i, 1); - } - } - - percentArray.forEach(function(column) { - var percent = parseInt(column.width.replace(/%/g, ''), 10) / 100; - var colWidth = parseInt(percent * remainingWidth, 10); - - canvasWidth += colWidth; - - column.drawnWidth = colWidth; - - // ret = ret + ' .grid' + uiGridCtrl.grid.id + ' .col' + column.index + ' { width: ' + colWidth + 'px; }'; - }); - } - - if (asterisksArray.length > 0) { - var asteriskVal = parseInt(remainingWidth / asteriskNum, 10); - - // Pre-process to make sure they're all within any min/max values - for (i = 0; i < asterisksArray.length; i++) { - column = asterisksArray[i]; - - colWidth = parseInt(asteriskVal * column.width.length, 10); - - if (column.colDef.minWidth && colWidth < column.colDef.minWidth) { - colWidth = column.colDef.minWidth; - - remainingWidth = remainingWidth - colWidth; - asteriskNum--; - - canvasWidth += colWidth; - column.drawnWidth = colWidth; - - // ret = ret + ' .grid' + uiGridCtrl.grid.id + ' .col' + column.index + ' { width: ' + colWidth + 'px; }'; - - lastColumn = column; - - // Remove this element from the percent array so it's not processed below - asterisksArray.splice(i, 1); - } - else if (column.colDef.maxWidth && colWidth > column.colDef.maxWidth) { - colWidth = column.colDef.maxWidth; - - remainingWidth = remainingWidth - colWidth; - asteriskNum--; - - canvasWidth += colWidth; - column.drawnWidth = colWidth; - - // ret = ret + ' .grid' + uiGridCtrl.grid.id + ' .col' + column.index + ' { width: ' + colWidth + 'px; }'; - - // Remove this element from the percent array so it's not processed below - asterisksArray.splice(i, 1); - } - } - - // Redo the asterisk value, as we may have removed columns due to width constraints - asteriskVal = parseInt(remainingWidth / asteriskNum, 10); - - asterisksArray.forEach(function(column) { - var colWidth = parseInt(asteriskVal * column.width.length, 10); - - canvasWidth += colWidth; - - column.drawnWidth = colWidth; - - // ret = ret + ' .grid' + uiGridCtrl.grid.id + ' .col' + column.index + ' { width: ' + colWidth + 'px; }'; - }); - } - - // If the grid width didn't divide evenly into the column widths and we have pixels left over, dole them out to the columns one by one to make everything fit - var leftoverWidth = availableWidth - parseInt(canvasWidth, 10); - - if (leftoverWidth > 0 && canvasWidth > 0 && canvasWidth < availableWidth) { - var variableColumn = false; - // uiGridCtrl.grid.columns.forEach(function(col) { - columnCache.forEach(function(col) { - if (col.width && !angular.isNumber(col.width)) { - variableColumn = true; - } - }); - - if (variableColumn) { - var remFn = function (column) { - if (leftoverWidth > 0) { - column.drawnWidth = column.drawnWidth + 1; - canvasWidth = canvasWidth + 1; - leftoverWidth--; - } - }; - while (leftoverWidth > 0) { - columnCache.forEach(remFn); - } - } - } - - if (canvasWidth < availableWidth) { - canvasWidth = availableWidth; - } - - // Build the CSS - // uiGridCtrl.grid.columns.forEach(function (column) { - columnCache.forEach(function (column) { - ret = ret + column.getColClassDefinition(); - }); - - // Add the vertical scrollbar width back in to the canvas width, it's taken out in getCanvasWidth - if (grid.verticalScrollbarWidth) { - canvasWidth = canvasWidth + grid.verticalScrollbarWidth; - } - // canvasWidth = canvasWidth + 1; - - containerCtrl.colContainer.canvasWidth = parseInt(canvasWidth, 10); - - // Return the styles back to buildStyles which pops them into the `customStyles` scope variable - return ret; - } - - containerCtrl.header = $elm; - - var headerViewport = $elm[0].getElementsByClassName('ui-grid-header-viewport')[0]; - if (headerViewport) { - containerCtrl.headerViewport = headerViewport; - } - - //todo: remove this if by injecting gridCtrl into unit tests - if (uiGridCtrl) { - uiGridCtrl.grid.registerStyleComputation({ - priority: 5, - func: updateColumnWidths - }); - } - } - }; - } - }; - }]); - -})(); -(function(){ - -/** - * @ngdoc directive - * @name ui.grid.directive:uiGridColumnMenu - * @element style - * @restrict A - * - * @description - * Allows us to interpolate expressions in ` - I am in a box. - - - - it('should apply the right class to the element', function () { - element(by.css('.blah')).getCssValue('border') - .then(function(c) { - expect(c).toContain('1px solid'); - }); - }); - - - */ - - - angular.module('ui.grid').directive('uiGridStyle', ['$log', '$interpolate', function($log, $interpolate) { - return { - // restrict: 'A', - // priority: 1000, - // require: '?^uiGrid', - link: function($scope, $elm, $attrs, uiGridCtrl) { - $log.debug('ui-grid-style link'); - // if (uiGridCtrl === undefined) { - // $log.warn('[ui-grid-style link] uiGridCtrl is undefined!'); - // } - - var interpolateFn = $interpolate($elm.text(), true); - - if (interpolateFn) { - $scope.$watch(interpolateFn, function(value) { - $elm.text(value); - }); - } - - // uiGridCtrl.recalcRowStyles = function() { - // var offset = (scope.options.offsetTop || 0) - (scope.options.excessRows * scope.options.rowHeight); - // var rowHeight = scope.options.rowHeight; - - // var ret = ''; - // var rowStyleCount = uiGridCtrl.minRowsToRender() + (scope.options.excessRows * 2); - // for (var i = 1; i <= rowStyleCount; i++) { - // ret = ret + ' .grid' + scope.gridId + ' .ui-grid-row:nth-child(' + i + ') { top: ' + offset + 'px; }'; - // offset = offset + rowHeight; - // } - - // scope.rowStyles = ret; - // }; - - // uiGridCtrl.styleComputions.push(uiGridCtrl.recalcRowStyles); - - } - }; - }]); - -})(); -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridViewport', ['$log', 'gridUtil', - function($log, gridUtil) { - return { - replace: true, - scope: {}, - templateUrl: 'ui-grid/uiGridViewport', - require: ['^uiGrid', '^uiGridRenderContainer'], - link: function($scope, $elm, $attrs, controllers) { - $log.debug('viewport post-link'); - - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - $scope.containerCtrl = containerCtrl; - - var rowContainer = containerCtrl.rowContainer; - var colContainer = containerCtrl.colContainer; - - var grid = uiGridCtrl.grid; - - $scope.grid = uiGridCtrl.grid; - - // Put the containers in scope so we can get rows and columns from them - $scope.rowContainer = containerCtrl.rowContainer; - $scope.colContainer = containerCtrl.colContainer; - - // Register this viewport with its container - containerCtrl.viewport = $elm; - - $elm.on('scroll', function (evt) { - var newScrollTop = $elm[0].scrollTop; - // var newScrollLeft = $elm[0].scrollLeft; - var newScrollLeft = gridUtil.normalizeScrollLeft($elm); - - // Handle RTL here - - if (newScrollLeft !== colContainer.prevScrollLeft) { - var xDiff = newScrollLeft - colContainer.prevScrollLeft; - - var horizScrollLength = (colContainer.getCanvasWidth() - colContainer.getViewportWidth()); - var horizScrollPercentage = newScrollLeft / horizScrollLength; - - colContainer.adjustScrollHorizontal(newScrollLeft, horizScrollPercentage); - } - - if (newScrollTop !== rowContainer.prevScrollTop) { - var yDiff = newScrollTop - rowContainer.prevScrollTop; - - // uiGridCtrl.fireScrollingEvent({ y: { pixels: diff } }); - var vertScrollLength = (rowContainer.getCanvasHeight() - rowContainer.getViewportHeight()); - // var vertScrollPercentage = (uiGridCtrl.prevScrollTop + yDiff) / vertScrollLength; - var vertScrollPercentage = newScrollTop / vertScrollLength; - - if (vertScrollPercentage > 1) { vertScrollPercentage = 1; } - if (vertScrollPercentage < 0) { vertScrollPercentage = 0; } - - rowContainer.adjustScrollVertical(newScrollTop, vertScrollPercentage); - } - }); - } - }; - } - ]); - -})(); -(function() { - -angular.module('ui.grid') -.directive('uiGridVisible', function uiGridVisibleAction() { - return function ($scope, $elm, $attr) { - $scope.$watch($attr.uiGridVisible, function (visible) { - // $elm.css('visibility', visible ? 'visible' : 'hidden'); - $elm[visible ? 'removeClass' : 'addClass']('ui-grid-invisible'); - }); - }; -}); - -})(); -(function () { - 'use strict'; - - angular.module('ui.grid').controller('uiGridController', ['$scope', '$element', '$attrs', '$log', 'gridUtil', '$q', 'uiGridConstants', - '$templateCache', 'gridClassFactory', '$timeout', '$parse', '$compile', - function ($scope, $elm, $attrs, $log, gridUtil, $q, uiGridConstants, - $templateCache, gridClassFactory, $timeout, $parse, $compile) { - $log.debug('ui-grid controller'); - - var self = this; - - // Extend options with ui-grid attribute reference - self.grid = gridClassFactory.createGrid($scope.uiGrid); - $elm.addClass('grid' + self.grid.id); - self.grid.rtl = $elm.css('direction') === 'rtl'; - - - //add optional reference to externalScopes function to controller - //so it can be retrieved in lower elements that have isolate scope - self.getExternalScopes = $scope.getExternalScopes; - - // angular.extend(self.grid.options, ); - - //all properties of grid are available on scope - $scope.grid = self.grid; - - if ($attrs.uiGridColumns) { - $attrs.$observe('uiGridColumns', function(value) { - self.grid.options.columnDefs = value; - self.grid.buildColumns() - .then(function(){ - self.grid.preCompileCellTemplates(); - - self.grid.refreshCanvas(true); - }); - }); - } - - - var dataWatchCollectionDereg; - if (angular.isString($scope.uiGrid.data)) { - dataWatchCollectionDereg = $scope.$parent.$watchCollection($scope.uiGrid.data, dataWatchFunction); - } - else { - dataWatchCollectionDereg = $scope.$parent.$watchCollection(function() { return $scope.uiGrid.data; }, dataWatchFunction); - } - - var columnDefWatchCollectionDereg = $scope.$parent.$watchCollection(function() { return $scope.uiGrid.columnDefs; }, columnDefsWatchFunction); - - function columnDefsWatchFunction(n, o) { - if (n && n !== o) { - self.grid.options.columnDefs = n; - self.grid.buildColumns() - .then(function(){ - - self.grid.preCompileCellTemplates(); - - self.grid.refreshCanvas(true); - }); - } - } - - function dataWatchFunction(n) { - // $log.debug('dataWatch fired'); - var promises = []; - - if (n) { - if (self.grid.columns.length === 0) { - $log.debug('loading cols in dataWatchFunction'); - if (!$attrs.uiGridColumns && self.grid.options.columnDefs.length === 0) { - self.grid.buildColumnDefsFromData(n); - } - promises.push(self.grid.buildColumns() - .then(function() { - self.grid.preCompileCellTemplates();} - )); - } - $q.all(promises).then(function() { - self.grid.modifyRows(n) - .then(function () { - // if (self.viewport) { - self.grid.redrawInPlace(); - // } - - $scope.$evalAsync(function() { - self.grid.refreshCanvas(true); - }); - }); - }); - } - } - - - $scope.$on('$destroy', function() { - dataWatchCollectionDereg(); - columnDefWatchCollectionDereg(); - }); - - $scope.$watch(function () { return self.grid.styleComputations; }, function() { - self.grid.refreshCanvas(true); - }); - - - /* Event Methods */ - - //todo: throttle this event? - self.fireScrollingEvent = function(args) { - $scope.$broadcast(uiGridConstants.events.GRID_SCROLL, args); - }; - - self.fireEvent = function(eventName, args) { - // Add the grid to the event arguments if it's not there - if (typeof(args) === 'undefined' || args === undefined) { - args = {}; - } - - if (typeof(args.grid) === 'undefined' || args.grid === undefined) { - args.grid = self.grid; - } - - $scope.$broadcast(eventName, args); - }; - - self.innerCompile = function innerCompile(elm) { - $compile(elm)($scope); - }; - - }]); - -/** - * @ngdoc directive - * @name ui.grid.directive:uiGrid - * @element div - * @restrict EA - * @param {Object} uiGrid Options for the grid to use - * @param {Object=} external-scopes Add external-scopes='someScopeObjectYouNeed' attribute so you can access - * your scopes from within any custom templatedirective. You access by $scope.getExternalScopes() function - * - * @description Create a very basic grid. - * - * @example - - - var app = angular.module('app', ['ui.grid']); - - app.controller('MainCtrl', ['$scope', function ($scope) { - $scope.data = [ - { name: 'Bob', title: 'CEO' }, - { name: 'Frank', title: 'Lowly Developer' } - ]; - }]); - - -
-
-
-
-
- */ -angular.module('ui.grid').directive('uiGrid', - [ - '$log', - '$compile', - '$templateCache', - 'gridUtil', - '$window', - function( - $log, - $compile, - $templateCache, - gridUtil, - $window - ) { - return { - templateUrl: 'ui-grid/ui-grid', - scope: { - uiGrid: '=', - getExternalScopes: '&?externalScopes' //optional functionwrapper around any needed external scope instances - }, - replace: true, - transclude: true, - controller: 'uiGridController', - compile: function () { - return { - post: function ($scope, $elm, $attrs, uiGridCtrl) { - $log.debug('ui-grid postlink'); - - var grid = uiGridCtrl.grid; - - // Initialize scrollbars (TODO: move to controller??) - uiGridCtrl.scrollbars = []; - - //todo: assume it is ok to communicate that rendering is complete?? - grid.renderingComplete(); - - grid.element = $elm; - - grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm); - - // Default canvasWidth to the grid width, in case we don't get any column definitions to calculate it from - grid.canvasWidth = uiGridCtrl.grid.gridWidth; - - grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm); - - // If the grid isn't tall enough to fit a single row, it's kind of useless. Resize it to fit a minimum number of rows - if (grid.gridHeight < grid.options.rowHeight) { - // Figure out the new height - var newHeight = grid.options.minRowsToShow * grid.options.rowHeight; - - $elm.css('height', newHeight + 'px'); - - grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm); - } - - // Run initial canvas refresh - grid.refreshCanvas(); - - //add pinned containers for row headers support - //moved from pinning feature - var left = angular.element('
'); - $elm.prepend(left); - uiGridCtrl.innerCompile(left); - - var right = angular.element('
'); - $elm.append(right); - uiGridCtrl.innerCompile(right); - - - //if we add a left container after render, we need to watch and react - $scope.$watch(function () { return grid.hasLeftContainer();}, function (newValue, oldValue) { - if (newValue === oldValue) { - return; - } - - //todo: remove this code. it was commented out after moving from pinning because body is already float:left -// var bodyContainer = angular.element($elm[0].querySelectorAll('[container-id="body"]')); -// if (newValue){ -// bodyContainer.attr('style', 'float: left; position: inherit'); -// } -// else { -// bodyContainer.attr('style', 'float: left; position: relative'); -// } - - grid.refreshCanvas(true); - }); - - //if we add a right container after render, we need to watch and react - $scope.$watch(function () { return grid.hasRightContainer();}, function (newValue, oldValue) { - if (newValue === oldValue) { - return; - } - grid.refreshCanvas(true); - }); - - - // Resize the grid on window resize events - function gridResize($event) { - grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm); - grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm); - - grid.queueRefresh(); - } - - angular.element($window).on('resize', gridResize); - - // Unbind from window resize events when the grid is destroyed - $elm.on('$destroy', function () { - angular.element($window).off('resize', gridResize); - }); - } - }; - } - }; - } - ]); - -})(); - -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridPinnedContainer', ['$log', function ($log) { - return { - restrict: 'EA', - replace: true, - template: '
', - scope: { - side: '=uiGridPinnedContainer' - }, - require: '^uiGrid', - compile: function compile() { - return { - post: function ($scope, $elm, $attrs, uiGridCtrl) { - $log.debug('ui-grid-pinned-container ' + $scope.side + ' link'); - - var grid = uiGridCtrl.grid; - - var myWidth = 0; - - $elm.addClass('ui-grid-pinned-container-' + $scope.side); - - function updateContainerDimensions() { - // $log.debug('update ' + $scope.side + ' dimensions'); - - var ret = ''; - - // Column containers - if ($scope.side === 'left' || $scope.side === 'right') { - var cols = grid.renderContainers[$scope.side].visibleColumnCache; - var width = 0; - for (var i = 0; i < cols.length; i++) { - var col = cols[i]; - width += col.drawnWidth; - } - - myWidth = width; - - // $log.debug('myWidth', myWidth); - - // TODO(c0bra): Subtract sum of col widths from grid viewport width and update it - $elm.attr('style', null); - - var myHeight = grid.renderContainers.body.getViewportHeight(); // + grid.horizontalScrollbarHeight; - - ret += '.grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.side + ', .grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.side + ' .ui-grid-render-container-' + $scope.side + ' .ui-grid-viewport { width: ' + myWidth + 'px; height: ' + myHeight + 'px; } '; - } - - return ret; - } - - grid.renderContainers.body.registerViewportAdjuster(function (adjustment) { - // Subtract our own width - adjustment.width -= myWidth; - - return adjustment; - }); - - // Register style computation to adjust for columns in `side`'s render container - grid.registerStyleComputation({ - priority: 15, - func: updateContainerDimensions - }); - } - }; - } - }; - }]); -})(); -(function(){ - -angular.module('ui.grid') -.factory('Grid', ['$log', '$q', '$compile', '$parse', 'gridUtil', 'uiGridConstants', 'GridOptions', 'GridColumn', 'GridRow', 'GridApi', 'rowSorter', 'rowSearcher', 'GridRenderContainer', '$timeout', - function($log, $q, $compile, $parse, gridUtil, uiGridConstants, GridOptions, GridColumn, GridRow, GridApi, rowSorter, rowSearcher, GridRenderContainer, $timeout) { - -/** - * @ngdoc object - * @name ui.grid.core.api:PublicApi - * @description Public Api for the core grid features - * - */ - - -/** - * @ngdoc function - * @name ui.grid.class:Grid - * @description Grid is the main viewModel. Any properties or methods needed to maintain state are defined in - * * this prototype. One instance of Grid is created per Grid directive instance. - * @param {object} options Object map of options to pass into the grid. An 'id' property is expected. - */ - var Grid = function Grid(options) { - var self = this; - // Get the id out of the options, then remove it - if (options !== undefined && typeof(options.id) !== 'undefined' && options.id) { - if (!/^[_a-zA-Z0-9-]+$/.test(options.id)) { - throw new Error("Grid id '" + options.id + '" is invalid. It must follow CSS selector syntax rules.'); - } - } - else { - throw new Error('No ID provided. An ID must be given when creating a grid.'); - } - - self.id = options.id; - delete options.id; - - // Get default options - self.options = new GridOptions(); - - // Extend the default options with what we were passed in - angular.extend(self.options, options); - - self.headerHeight = self.options.headerRowHeight; - self.footerHeight = self.options.showFooter === true ? self.options.footerRowHeight : 0; - - self.rtl = false; - self.gridHeight = 0; - self.gridWidth = 0; - self.columnBuilders = []; - self.rowBuilders = []; - self.rowsProcessors = []; - self.columnsProcessors = []; - self.styleComputations = []; - self.viewportAdjusters = []; - self.rowHeaderColumns = []; - - // self.visibleRowCache = []; - - // Set of 'render' containers for self grid, which can render sets of rows - self.renderContainers = {}; - - // Create a - self.renderContainers.body = new GridRenderContainer('body', self); - - self.cellValueGetterCache = {}; - - // Cached function to use with custom row templates - self.getRowTemplateFn = null; - - - //representation of the rows on the grid. - //these are wrapped references to the actual data rows (options.data) - self.rows = []; - - //represents the columns on the grid - self.columns = []; - - /** - * @ngdoc boolean - * @name isScrollingVertically - * @propertyOf ui.grid.class:Grid - * @description set to true when Grid is scrolling vertically. Set to false via debounced method - */ - self.isScrollingVertically = false; - - /** - * @ngdoc boolean - * @name isScrollingHorizontally - * @propertyOf ui.grid.class:Grid - * @description set to true when Grid is scrolling horizontally. Set to false via debounced method - */ - self.isScrollingHorizontally = false; - - var debouncedVertical = gridUtil.debounce(function () { - self.isScrollingVertically = false; - }, 300); - - var debouncedHorizontal = gridUtil.debounce(function () { - self.isScrollingHorizontally = false; - }, 300); - - - /** - * @ngdoc function - * @name flagScrollingVertically - * @methodOf ui.grid.class:Grid - * @description sets isScrollingVertically to true and sets it to false in a debounced function - */ - self.flagScrollingVertically = function() { - self.isScrollingVertically = true; - debouncedVertical(); - }; - - /** - * @ngdoc function - * @name flagScrollingHorizontally - * @methodOf ui.grid.class:Grid - * @description sets isScrollingHorizontally to true and sets it to false in a debounced function - */ - self.flagScrollingHorizontally = function() { - self.isScrollingHorizontally = true; - debouncedHorizontal(); - }; - - - - self.api = new GridApi(self); - - /** - * @ngdoc function - * @name refresh - * @methodOf ui.grid.core.api:PublicApi - * @description Refresh the rendered grid on screen. - * - */ - self.api.registerMethod( 'core', 'refresh', this.refresh ); - - /** - * @ngdoc function - * @name refreshRows - * @methodOf ui.grid.core.api:PublicApi - * @description Refresh the rendered grid on screen? Note: not functional at present - * @returns {promise} promise that is resolved when render completes? - * - */ - self.api.registerMethod( 'core', 'refreshRows', this.refreshRows ); - - - /** - * @ngdoc function - * @name sortChanged - * @methodOf ui.grid.core.api:PublicApi - * @description The sort criteria on one or more columns has - * changed. Provides as parameters the grid and the output of - * getColumnSorting, which is an array of gridColumns - * that have sorting on them, sorted in priority order. - * - * @param {Grid} grid the grid - * @param {array} sortColumns an array of columns with - * sorts on them, in priority order - * - * @example - *
-   *      gridApi.core.on.sortChanged( grid, sortColumns );
-   * 
- */ - self.api.registerEvent( 'core', 'sortChanged' ); -}; - - /** - * @ngdoc function - * @name isRTL - * @methodOf ui.grid.class:Grid - * @description Returns true if grid is RightToLeft - */ - Grid.prototype.isRTL = function () { - return this.rtl; - }; - - - /** - * @ngdoc function - * @name registerColumnBuilder - * @methodOf ui.grid.class:Grid - * @description When the build creates columns from column definitions, the columnbuilders will be called to add - * additional properties to the column. - * @param {function(colDef, col, gridOptions)} columnsProcessor function to be called - */ - Grid.prototype.registerColumnBuilder = function registerColumnBuilder(columnBuilder) { - this.columnBuilders.push(columnBuilder); - }; - - /** - * @ngdoc function - * @name buildColumnDefsFromData - * @methodOf ui.grid.class:Grid - * @description Populates columnDefs from the provided data - * @param {function(colDef, col, gridOptions)} rowBuilder function to be called - */ - Grid.prototype.buildColumnDefsFromData = function (dataRows){ - this.options.columnDefs = gridUtil.getColumnsFromData(dataRows, this.options.excludeProperties); - }; - - /** - * @ngdoc function - * @name registerRowBuilder - * @methodOf ui.grid.class:Grid - * @description When the build creates rows from gridOptions.data, the rowBuilders will be called to add - * additional properties to the row. - * @param {function(colDef, col, gridOptions)} rowBuilder function to be called - */ - Grid.prototype.registerRowBuilder = function registerRowBuilder(rowBuilder) { - this.rowBuilders.push(rowBuilder); - }; - - /** - * @ngdoc function - * @name getColumn - * @methodOf ui.grid.class:Grid - * @description returns a grid column for the column name - * @param {string} name column name - */ - Grid.prototype.getColumn = function getColumn(name) { - var columns = this.columns.filter(function (column) { - return column.colDef.name === name; - }); - return columns.length > 0 ? columns[0] : null; - }; - - /** - * @ngdoc function - * @name getColDef - * @methodOf ui.grid.class:Grid - * @description returns a grid colDef for the column name - * @param {string} name column.field - */ - Grid.prototype.getColDef = function getColDef(name) { - var colDefs = this.options.columnDefs.filter(function (colDef) { - return colDef.name === name; - }); - return colDefs.length > 0 ? colDefs[0] : null; - }; - - /** - * @ngdoc function - * @name assignTypes - * @methodOf ui.grid.class:Grid - * @description uses the first row of data to assign colDef.type for any types not defined. - */ - /** - * @ngdoc property - * @name type - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description the type of the column, used in sorting. If not provided then the - * grid will guess the type. Add this only if the grid guessing is not to your - * satisfaction. Refer to {@link ui.grid.service:GridUtil.guessType gridUtil.guessType} for - * a list of values the grid knows about. - * - */ - Grid.prototype.assignTypes = function(){ - var self = this; - self.options.columnDefs.forEach(function (colDef, index) { - - //Assign colDef type if not specified - if (!colDef.type) { - var col = new GridColumn(colDef, index, self); - var firstRow = self.rows.length > 0 ? self.rows[0] : null; - if (firstRow) { - colDef.type = gridUtil.guessType(self.getCellValue(firstRow, col)); - } - else { - $log.log('Unable to assign type from data, so defaulting to string'); - colDef.type = 'string'; - } - } - }); - }; - - /** - * @ngdoc function - * @name addRowHeaderColumn - * @methodOf ui.grid.class:Grid - * @description adds a row header column to the grid - * @param {object} column def - */ - Grid.prototype.addRowHeaderColumn = function addRowHeaderColumn(colDef) { - var self = this; - //self.createLeftContainer(); - var rowHeaderCol = new GridColumn(colDef, self.rowHeaderColumns.length + 1, self); - rowHeaderCol.isRowHeader = true; - if (self.isRTL()) { - self.createRightContainer(); - rowHeaderCol.renderContainer = 'right'; - } - else { - self.createLeftContainer(); - rowHeaderCol.renderContainer = 'left'; - } - - self.columnBuilders[0](colDef,rowHeaderCol,self.gridOptions) - .then(function(){ - rowHeaderCol.enableFiltering = false; - rowHeaderCol.enableSorting = false; - self.rowHeaderColumns.push(rowHeaderCol); - }); - }; - - /** - * @ngdoc function - * @name buildColumns - * @methodOf ui.grid.class:Grid - * @description creates GridColumn objects from the columnDefinition. Calls each registered - * columnBuilder to further process the column - * @returns {Promise} a promise to load any needed column resources - */ - Grid.prototype.buildColumns = function buildColumns() { - $log.debug('buildColumns'); - var self = this; - var builderPromises = []; - var offset = self.rowHeaderColumns.length; - - //add row header columns to the grid columns array - angular.forEach(self.rowHeaderColumns, function (rowHeaderColumn) { - offset++; - self.columns.push(rowHeaderColumn); - }); - - // Synchronize self.columns with self.options.columnDefs so that columns can also be removed. - if (self.columns.length > self.options.columnDefs.length) { - self.columns.forEach(function (column, index) { - if (!self.getColDef(column.name)) { - self.columns.splice(index, 1); - } - }); - } - - self.options.columnDefs.forEach(function (colDef, index) { - self.preprocessColDef(colDef); - var col = self.getColumn(colDef.name); - - if (!col) { - col = new GridColumn(colDef, index + offset, self); - self.columns.push(col); - } - else { - col.updateColumnDef(colDef, col.index); - } - - self.columnBuilders.forEach(function (builder) { - builderPromises.push(builder.call(self, colDef, col, self.options)); - }); - }); - - return $q.all(builderPromises); - }; - -/** - * @ngdoc function - * @name preCompileCellTemplates - * @methodOf ui.grid.class:Grid - * @description precompiles all cell templates - */ - Grid.prototype.preCompileCellTemplates = function() { - this.columns.forEach(function (col) { - var html = col.cellTemplate.replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)'); - - var compiledElementFn = $compile(html); - col.compiledElementFn = compiledElementFn; - }); - }; - - /** - * @ngdoc function - * @name createLeftContainer - * @methodOf ui.grid.class:Grid - * @description creates the left render container if it doesn't already exist - */ - Grid.prototype.createLeftContainer = function() { - if (!this.hasLeftContainer()) { - this.renderContainers.left = new GridRenderContainer('left', this, { disableColumnOffset: true }); - } - }; - - /** - * @ngdoc function - * @name createRightContainer - * @methodOf ui.grid.class:Grid - * @description creates the right render container if it doesn't already exist - */ - Grid.prototype.createRightContainer = function() { - if (!this.hasRightContainer()) { - this.renderContainers.right = new GridRenderContainer('right', this, { disableColumnOffset: true }); - } - }; - - /** - * @ngdoc function - * @name hasLeftContainer - * @methodOf ui.grid.class:Grid - * @description returns true if leftContainer exists - */ - Grid.prototype.hasLeftContainer = function() { - return this.renderContainers.left !== undefined; - }; - - /** - * @ngdoc function - * @name hasLeftContainer - * @methodOf ui.grid.class:Grid - * @description returns true if rightContainer exists - */ - Grid.prototype.hasRightContainer = function() { - return this.renderContainers.right !== undefined; - }; - - - /** - * undocumented function - * @name preprocessColDef - * @methodOf ui.grid.class:Grid - * @description defaults the name property from field to maintain backwards compatibility with 2.x - * validates that name or field is present - */ - Grid.prototype.preprocessColDef = function preprocessColDef(colDef) { - if (!colDef.field && !colDef.name) { - throw new Error('colDef.name or colDef.field property is required'); - } - - //maintain backwards compatibility with 2.x - //field was required in 2.x. now name is required - if (colDef.name === undefined && colDef.field !== undefined) { - colDef.name = colDef.field; - } - - }; - - // Return a list of items that exist in the `n` array but not the `o` array. Uses optional property accessors passed as third & fourth parameters - Grid.prototype.newInN = function newInN(o, n, oAccessor, nAccessor) { - var self = this; - - var t = []; - for (var i=0; i 0 ? rows[0] : null; - }; - - - /** - * @ngdoc function - * @name modifyRows - * @methodOf ui.grid.class:Grid - * @description creates or removes GridRow objects from the newRawData array. Calls each registered - * rowBuilder to further process the row - * - * Rows are identified using the gridOptions.rowEquality function - */ - Grid.prototype.modifyRows = function modifyRows(newRawData) { - var self = this, - i, - newRow; - - if (self.rows.length === 0 && newRawData.length > 0) { - if (self.options.enableRowHashing) { - if (!self.rowHashMap) { - self.createRowHashMap(); - } - - for (i=0; i 0) { - var unfoundNewRows, unfoundOldRows, unfoundNewRowsToFind; - - // If row hashing is turned on - if (self.options.enableRowHashing) { - // Array of new rows that haven't been found in the old rowset - unfoundNewRows = []; - // Array of new rows that we explicitly HAVE to search for manually in the old row set. They cannot be looked up by their identity (because it doesn't exist). - unfoundNewRowsToFind = []; - // Map of rows that have been found in the new rowset - var foundOldRows = {}; - // Array of old rows that have NOT been found in the new rowset - unfoundOldRows = []; - - // Create the row HashMap if it doesn't exist already - if (!self.rowHashMap) { - self.createRowHashMap(); - } - var rowhash = self.rowHashMap; - - // Make sure every new row has a hash - for (i = 0; i < newRawData.length; i++) { - newRow = newRawData[i]; - - // Flag this row as needing to be manually found if it didn't come in with a $$hashKey - var mustFind = false; - if (!self.options.getRowIdentity(newRow)) { - mustFind = true; - } - - // See if the new row is already in the rowhash - var found = rowhash.get(newRow); - // If so... - if (found) { - // See if it's already being used by as GridRow - if (found.row) { - // If so, mark this new row as being found - foundOldRows[self.options.rowIdentity(newRow)] = true; - } - } - else { - // Put the row in the hashmap with the index it corresponds to - rowhash.put(newRow, { - i: i, - entity: newRow - }); - - // This row has to be searched for manually in the old row set - if (mustFind) { - unfoundNewRowsToFind.push(newRow); - } - else { - unfoundNewRows.push(newRow); - } - } - } - - // Build the list of unfound old rows - for (i = 0; i < self.rows.length; i++) { - var row = self.rows[i]; - var hash = self.options.rowIdentity(row.entity); - if (!foundOldRows[hash]) { - unfoundOldRows.push(row); - } - } - } - - // Look for new rows - var newRows = unfoundNewRows || []; - - // The unfound new rows is either `unfoundNewRowsToFind`, if row hashing is turned on, or straight `newRawData` if it isn't - var unfoundNew = (unfoundNewRowsToFind || newRawData); - - // Search for real new rows in `unfoundNew` and concat them onto `newRows` - newRows = newRows.concat(self.newInN(self.rows, unfoundNew, 'entity')); - - self.addRows(newRows); - - var deletedRows = self.getDeletedRows((unfoundOldRows || self.rows), newRawData); - - for (i = 0; i < deletedRows.length; i++) { - if (self.options.enableRowHashing) { - self.rowHashMap.remove(deletedRows[i].entity); - } - - self.rows.splice( self.rows.indexOf(deletedRows[i]), 1 ); - } - } - // Empty data set - else { - // Reset the row HashMap - self.createRowHashMap(); - - // Reset the rows length! - self.rows.length = 0; - } - - var p1 = $q.when(self.processRowsProcessors(self.rows)) - .then(function (renderableRows) { - return self.setVisibleRows(renderableRows); - }); - - var p2 = $q.when(self.processColumnsProcessors(self.columns)) - .then(function (renderableColumns) { - return self.setVisibleColumns(renderableColumns); - }); - - return $q.all([p1, p2]); - }; - - Grid.prototype.getDeletedRows = function(oldRows, newRows) { - var self = this; - - var olds = oldRows.filter(function (oldRow) { - return !newRows.some(function (newItem) { - return self.options.rowEquality(newItem, oldRow.entity); - }); - }); - // var olds = self.newInN(newRows, oldRows, null, 'entity'); - // dump('olds', olds); - return olds; - }; - - /** - * Private Undocumented Method - * @name addRows - * @methodOf ui.grid.class:Grid - * @description adds the newRawData array of rows to the grid and calls all registered - * rowBuilders. this keyword will reference the grid - */ - Grid.prototype.addRows = function addRows(newRawData) { - var self = this; - - var existingRowCount = self.rows.length; - for (var i=0; i < newRawData.length; i++) { - var newRow = self.processRowBuilders(new GridRow(newRawData[i], i + existingRowCount, self)); - - if (self.options.enableRowHashing) { - var found = self.rowHashMap.get(newRow.entity); - if (found) { - found.row = newRow; - } - } - - self.rows.push(newRow); - } - }; - - /** - * @ngdoc function - * @name processRowBuilders - * @methodOf ui.grid.class:Grid - * @description processes all RowBuilders for the gridRow - * @param {GridRow} gridRow reference to gridRow - * @returns {GridRow} the gridRow with all additional behavior added - */ - Grid.prototype.processRowBuilders = function processRowBuilders(gridRow) { - var self = this; - - self.rowBuilders.forEach(function (builder) { - builder.call(self, gridRow, self.gridOptions); - }); - - return gridRow; - }; - - /** - * @ngdoc function - * @name registerStyleComputation - * @methodOf ui.grid.class:Grid - * @description registered a styleComputation function - * - * If the function returns a value it will be appended into the grid's `
" - ); - - - $templateCache.put('ui-grid/uiGridCell', - "
{{COL_FIELD CUSTOM_FILTERS}}
" - ); - - - $templateCache.put('ui-grid/uiGridColumnFilter', - "
  •  
     
  • " - ); - - - $templateCache.put('ui-grid/uiGridColumnMenu', - "
    " - ); - - - $templateCache.put('ui-grid/uiGridFooterCell', - "
    {{ col.getAggregationValue() }}
    " - ); - - - $templateCache.put('ui-grid/uiGridHeaderCell', - "
     
    {{ col.displayName CUSTOM_FILTERS }}  
     
     
    " - ); - - - $templateCache.put('ui-grid/uiGridMenu', - "
    " - ); - - - $templateCache.put('ui-grid/uiGridMenuItem', - "
  • {{ title }}
  • " - ); - - - $templateCache.put('ui-grid/uiGridRenderContainer', - "
    " - ); - - - $templateCache.put('ui-grid/uiGridViewport', - "
    " - ); - - - $templateCache.put('ui-grid/cellEditor', - "
    " - ); - - - $templateCache.put('ui-grid/dropdownEditor', - "
    " - ); - - - $templateCache.put('ui-grid/expandableRow', - "
    " - ); - - - $templateCache.put('ui-grid/expandableRowHeader', - "
    " - ); - - - $templateCache.put('ui-grid/expandableScrollFiller', - "
    " - ); - - - $templateCache.put('ui-grid/csvLink', - "LINK_LABEL" - ); - - - $templateCache.put('ui-grid/columnResizer', - "
    " - ); - - - $templateCache.put('ui-grid/selectionRowHeader', - "
    " - ); - - - $templateCache.put('ui-grid/selectionRowHeaderButtons', - "
     
    " - ); - -}]); diff --git a/src/main/resources/META-INF/resources/designer/lib/ui-grid-stable.min.js b/src/main/resources/META-INF/resources/designer/lib/ui-grid-stable.min.js deleted file mode 100644 index 84b4ab8d..00000000 --- a/src/main/resources/META-INF/resources/designer/lib/ui-grid-stable.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! ui-grid - v3.0.0-rc.3 - 2014-09-25 -* Copyright (c) 2014 ; License: MIT */ -!function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart"},keymap:{TAB:9,STRG:17,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["ƒ","$","£","$","¤","¥","៛","₩","₱","฿","₫"]})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$log","$parse","gridUtil","uiGridConstants",function(a,b,c,d,e){var f={priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(b,c,d,f){function g(){var a=b.col.compiledElementFn;a(b,function(a){c.append(a)})}if(f)g();else{var h=b.col.cellTemplate.replace(e.COL_FIELD,"grid.getCellValue(row, col)"),i=a(h)(b);c.append(i)}},post:function(a,b){if(b.addClass(a.col.getColClass(!1)),a.col.cellClass){var c=b;c.addClass(angular.isFunction(a.col.cellClass)?a.col.cellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.cellClass)}}}}};return f}]),function(){angular.module("ui.grid").directive("uiGridColumnMenu",["$log","$timeout","$window","$document","$injector","gridUtil","uiGridConstants","i18nService",function(a,b,c,d,e,f,g,h){var i={priority:0,scope:!0,require:"?^uiGrid",templateUrl:"ui-grid/uiGridColumnMenu",replace:!0,link:function(i,j,k,l){function m(){i.$apply(i.hideMenu),d.off("click",m)}function n(){i.$apply(i.hideMenu)}f.enableAnimations(j),i.grid=l.grid;var o=this;l.columnMenuScope=i,o.shown=i.menuShown=!1,i.asc=g.ASC,i.desc=g.DESC,i.menu=j[0].querySelectorAll(".ui-grid-menu"),i.inner=j[0].querySelectorAll(".ui-grid-menu-inner"),i.sortable=function(){return l.grid.options.enableSorting&&"undefined"!=typeof i.col&&i.col&&i.col.enableSorting?!0:!1},i.filterable=function(){return l.grid.options.enableFiltering&&"undefined"!=typeof i.col&&i.col&&i.col.enableFiltering?!0:!1};var p=[{title:h.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(a){a.stopPropagation(),i.sortColumn(a,g.ASC)},shown:function(){return i.sortable()},active:function(){return"undefined"!=typeof i.col&&"undefined"!=typeof i.col.sort&&"undefined"!=typeof i.col.sort.direction&&i.col.sort.direction===g.ASC}},{title:h.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(a){a.stopPropagation(),i.sortColumn(a,g.DESC)},shown:function(){return i.sortable()},active:function(){return"undefined"!=typeof i.col&&"undefined"!=typeof i.col.sort&&"undefined"!=typeof i.col.sort.direction&&i.col.sort.direction===g.DESC}},{title:h.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),i.unsortColumn()},shown:function(){return i.sortable()&&"undefined"!=typeof i.col&&"undefined"!=typeof i.col.sort&&"undefined"!=typeof i.col.sort.direction&&null!==i.col.sort.direction}},{title:h.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),i.hideColumn()}}];i.menuItems=p,i.$watch("col.menuItems",function(a){"undefined"!=typeof a&&a&&angular.isArray(a)?(a.forEach(function(a){"undefined"!=typeof a.context&&a.context||(a.context={}),a.context.col=i.col}),i.menuItems=p.concat(a)):i.menuItems=p});var q;try{q=e.get("$animate")}catch(r){a.info("$animate service not found (ngAnimate not add as a dependency?), menu animations will not occur")}i.showMenu=function(a,c){function e(){b(function(){p&&q?(q.removeClass(i.inner,"ng-hide"),o.shown=i.menuShown=!0,i.$broadcast("show-menu")):angular.element(i.inner).hasClass("ng-hide")&&angular.element(i.inner).removeClass("ng-hide");var b=a.renderContainer?a.renderContainer:"body",e=(a.grid.renderContainers[b],f.closestElm(c,".ui-grid-render-container")),k=e.offsetLeft-i.grid.element[0].offsetLeft,r=e.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,s=f.elementWidth(i.menu,!0),t=parseInt(angular.element(i.menu).css("padding-right"),10);j.css("left",g+k-r+n-s+t+"px"),j.css("top",h+l+"px"),d.on("click",m)})}o.col=i.col=a,d.off("click",m);var g=c[0].offsetLeft,h=c[0].offsetTop,k=0;a.grid.options.offsetLeft&&(k=a.grid.options.offsetLeft);var l=f.elementHeight(c,!0),n=f.elementWidth(c,!0),p=!1;i.menuShown&&q?(q.addClass(i.inner,"ng-hide",e),p=!0):(o.shown=i.menuShown=!0,i.$broadcast("show-menu"),e())},i.hideMenu=function(){delete o.col,delete i.col,o.shown=i.menuShown=!1,i.$broadcast("hide-menu")},angular.element(c).bind("resize",n),i.$on("$destroy",i.$on(g.events.GRID_SCROLL,function(){i.hideMenu()})),i.$on("$destroy",i.$on(g.events.ITEM_DRAGGING,function(){i.hideMenu()})),i.$on("$destroy",function(){angular.element(c).off("resize",n),d.off("click",m)}),i.sortColumn=function(a,b){a.stopPropagation(),l.grid.sortColumn(i.col,b,!0).then(function(){l.grid.refresh(),i.hideMenu()})},i.unsortColumn=function(){i.col.unsort(),l.grid.refresh(),i.hideMenu()},i.hideColumn=function(){i.col.colDef.visible=!1,l.grid.refresh(),i.hideMenu()}},controller:["$scope",function(a){var b=this;a.$watch("menuItems",function(a){b.menuItems=a})}]};return i}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooterCell",["$log","$timeout","gridUtil","$compile",function(a,b,c,d){var e={priority:0,scope:{col:"=",row:"=",renderIndex:"="},replace:!0,require:"^uiGrid",compile:function(){return{pre:function(a,b){function e(e){c.getTemplate(e).then(function(c){var e=d(c),f=e(a);b.append(f)})}e(a.col.footerCellTemplate?a.col.footerCellTemplate:"ui-grid/uiGridFooterCell")},post:function(a,b,c,d){a.grid=d.grid,b.addClass(a.col.getColClass(!1))}}}};return e}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooter",["$log","$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){var f="ui-grid/ui-grid-footer";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,b,d,g){var h=g[0],i=g[1];a.grid=h.grid,a.colContainer=i.colContainer,i.footer=b;var j=a.grid.options.footerTemplate?a.grid.options.footerTemplate:f;e.getTemplate(j).then(function(d){var e=angular.element(d),f=c(e)(a);if(b.append(f),i){var g=b[0].getElementsByClassName("ui-grid-footer-viewport")[0];g&&(i.footerViewport=g)}})},post:function(b,c,d,f){var g=f[0],h=f[1];a.debug("ui-grid-footer link");g.grid;e.disableAnimations(c),h.footer=c;var i=c[0].getElementsByClassName("ui-grid-footer-viewport")[0];i&&(h.footerViewport=i)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGroupPanel",["$compile","uiGridConstants","gridUtil",function(a,b,c){var d="ui-grid/ui-grid-group-panel";return{restrict:"EA",replace:!0,require:"?^uiGrid",scope:!1,compile:function(){return{pre:function(b,e){var f=b.grid.options.groupPanelTemplate||d;c.getTemplate(f).then(function(c){var d=angular.element(c),f=a(d)(b);e.append(f)})},post:function(a,b){b.bind("$destroy",function(){})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeaderCell",["$log","$compile","$timeout","$window","$document","gridUtil","uiGridConstants",function(a,b,c,d,e,f,g){var h=500,i={priority:0,scope:{col:"=",row:"=",renderIndex:"="},require:"?^uiGrid",replace:!0,compile:function(){return{pre:function(a,c){var d=b(a.col.headerCellTemplate)(a);c.append(d)},post:function(a,b,d,e){function f(b){var c=!1;b.shiftKey&&(c=!0),e.grid.sortColumn(a.col,c).then(function(){e.columnMenuScope&&e.columnMenuScope.hideMenu(),e.grid.refresh()})}a.grid=e.grid,a.grid.api.core.raise.filterChanged||a.grid.api.registerEvent("core","filterChanged"),b.addClass(a.col.getColClass(!1)),a.menuShown=!1,a.asc=g.ASC,a.desc=g.DESC;var i=(angular.element(b[0].querySelectorAll(".ui-grid-header-cell-menu")),angular.element(b[0].querySelectorAll(".ui-grid-cell-contents")));a.sortable=e.grid.options.enableSorting&&a.col.enableSorting?!0:!1,a.filterable=e.grid.options.enableFiltering&&a.col.enableFiltering?!0:!1;var j,k=0;if(i.on("mousedown",function(d){"undefined"!=typeof d.originalEvent&&void 0!==d.originalEvent&&(d=d.originalEvent),d.button&&0!==d.button||(k=(new Date).getTime(),j=c(function(){},h),j.then(function(){e.columnMenuScope.showMenu(a.col,b)}))}),i.on("mouseup",function(){c.cancel(j)}),a.toggleMenu=function(c){c.stopPropagation(),e.columnMenuScope.menuShown&&e.columnMenuScope.col===a.col?e.columnMenuScope.hideMenu():e.columnMenuScope.showMenu(a.col,b)},a.sortable&&(i.on("click",function(a){a.stopPropagation(),c.cancel(j);var b=(new Date).getTime(),d=b-k;d>h||f(a)}),a.$on("$destroy",function(){c.cancel(j)})),a.filterable){var l=[];angular.forEach(a.col.filters,function(b,c){l.push(a.$watch("col.filters["+c+"].term",function(){e.grid.api.core.raise.filterChanged(),e.grid.refresh().then(function(){e.prevScrollArgs&&e.prevScrollArgs.y&&e.prevScrollArgs.y.percentage&&e.fireScrollingEvent({y:{percentage:e.prevScrollArgs.y.percentage}})})}))}),a.$on("$destroy",function(){angular.forEach(l,function(a){a()})})}}}}};return i}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$log","$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){var f="ui-grid/ui-grid-header",g="ui-grid/ui-grid-no-header";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,b,d,h){var i=h[0],j=h[1];a.grid=i.grid,a.colContainer=j.colContainer,j.header=b,j.colContainer.header=b;var k;k=a.grid.options.hideHeader?g:a.grid.options.headerTemplate?a.grid.options.headerTemplate:f,e.getTemplate(k).then(function(d){var e=angular.element(d),f=c(e)(a);if(b.append(f),j){var g=b[0].getElementsByClassName("ui-grid-header-viewport")[0];g&&(j.headerViewport=g)}})},post:function(b,c,d,f){function g(){var a=[],b=[],c=0,d=i.colContainer.getViewportWidth();"undefined"!=typeof h.grid.verticalScrollbarWidth&&void 0!==h.grid.verticalScrollbarWidth&&h.grid.verticalScrollbarWidth>0&&(d+=h.grid.verticalScrollbarWidth);var f,g=0,k=0,l="",m=i.colContainer.visibleColumnCache;m.forEach(function(d){if(d.visible){var f=!1;angular.isNumber(d.width)||(f=isNaN(d.width)?e.endsWith(d.width,"%"):!1),angular.isString(d.width)&&-1!==d.width.indexOf("*")?(c=parseInt(c+d.width.length,10),a.push(d)):f?b.push(d):angular.isNumber(d.width)&&(g=parseInt(g+d.width,10),k=parseInt(k,10)+parseInt(d.width,10),d.drawnWidth=d.width)}});var n,o,p,q=d-g;if(b.length>0){for(n=0;no.colDef.maxWidth&&(p=o.colDef.maxWidth,q-=p,k+=p,o.drawnWidth=p,b.splice(n,1))}b.forEach(function(a){var b=parseInt(a.width.replace(/%/g,""),10)/100,c=parseInt(b*q,10);k+=c,a.drawnWidth=c})}if(a.length>0){var s=parseInt(q/c,10);for(n=0;no.colDef.maxWidth&&(p=o.colDef.maxWidth,q-=p,c--,k+=p,o.drawnWidth=p,a.splice(n,1));s=parseInt(q/c,10),a.forEach(function(a){var b=parseInt(s*a.width.length,10);k+=b,a.drawnWidth=b})}var t=d-parseInt(k,10);if(t>0&&k>0&&d>k){var u=!1;if(m.forEach(function(a){a.width&&!angular.isNumber(a.width)&&(u=!0)}),u)for(var v=function(a){t>0&&(a.drawnWidth=a.drawnWidth+1,k+=1,t--)};t>0;)m.forEach(v)}return d>k&&(k=d),m.forEach(function(a){l+=a.getColClassDefinition()}),j.verticalScrollbarWidth&&(k+=j.verticalScrollbarWidth),i.colContainer.canvasWidth=parseInt(k,10),l}var h=f[0],i=f[1];a.debug("ui-grid-header link");var j=h.grid;e.disableAnimations(c),i.header=c;var k=c[0].getElementsByClassName("ui-grid-header-viewport")[0];k&&(i.headerViewport=k),h&&h.grid.registerStyleComputation({priority:5,func:g})}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$log","$compile","$timeout","$window","$document","gridUtil",function(a,b,c,d,e,f){var g={priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(a,b){f.enableAnimations(b),("undefined"==typeof a.autoHide||void 0===a.autoHide)&&(a.autoHide=!0),a.autoHide&&angular.element(d).on("resize",a.hideMenu),a.$on("hide-menu",function(){a.shown=!1}),a.$on("show-menu",function(){a.shown=!0}),a.$on("$destroy",function(){angular.element(d).off("resize",a.hideMenu)})},controller:["$scope","$element","$attrs",function(a){function b(){a.$apply(function(){d.hideMenu(),angular.element(document).off("click",b)})}var d=this;d.hideMenu=a.hideMenu=function(){a.shown=!1},d.showMenu=a.showMenu=function(){a.shown=!0,angular.element(document).off("click",b),c(function(){angular.element(document).on("click",b)})},a.$on("$destroy",function(){angular.element(document).off("click",b)})}]};return g}]).directive("uiGridMenuItem",["$log","gridUtil","$compile","i18nService",function(a,b,c,d){var e={priority:0,scope:{title:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"="},require:["?^uiGrid","^uiGridMenu"],templateUrl:"ui-grid/uiGridMenuItem",replace:!0,compile:function(){return{pre:function(a,d,e,f){f[0],f[1];a.templateUrl&&b.getTemplate(a.templateUrl).then(function(b){var e=angular.element(b),f=c(e)(a);d.replaceWith(f)})},post:function(b,c,e,f){var g=f[0],h=f[1];("undefined"==typeof b.shown||null===b.shown)&&(b.shown=function(){return!0}),b.itemShown=function(){var a={};return b.context&&(a.context=b.context),"undefined"!=typeof g&&g&&(a.grid=g.grid),b.shown.call(a)},b.itemAction=function(c,d){if(a.debug("itemAction"),c.stopPropagation(),"function"==typeof b.action){var e={};b.context&&(e.context=b.context),"undefined"!=typeof g&&g&&(e.grid=g.grid),b.action.call(e,c,d),h.hideMenu()}},b.i18n=d.get()}}}};return e}])}(),function(){angular.module("ui.grid").directive("uiGridNativeScrollbar",["$log","$timeout","$document","uiGridConstants","gridUtil",function(a,b,c,d,e){var f=e.getScrollbarWidth();f=f>0?f:17;var g=e.detectBrowser();return"ie"===g&&(f+=1),{scope:{type:"@"},require:["^uiGrid","^uiGridRenderContainer"],link:function(a,b,c,g){function h(){var a=n.getViewportHeight(),b=n.getCanvasHeight(),c=o.headerHeight?o.headerHeight:p.headerHeight,d=".grid"+p.id+" .ui-grid-render-container-"+m.containerId+" .ui-grid-native-scrollbar.vertical .contents { height: "+b+"px; }";return d+="\n .grid"+p.id+" .ui-grid-render-container-"+m.containerId+" .ui-grid-native-scrollbar.vertical { height: "+a+"px; top: "+c+"px}",s=b,d}function i(){var a=o.getCanvasWidth(),b=-1*f+u;p.options.showFooter&&(b-=1);var c=".grid"+p.id+" .ui-grid-render-container-"+m.containerId+" .ui-grid-native-scrollbar.horizontal { bottom: "+b+"px; }";return c+=".grid"+p.id+" .ui-grid-render-container-"+m.containerId+" .ui-grid-native-scrollbar.horizontal .contents { width: "+a+"px; }",s=a,c}function j(){if("vertical"===a.type){p.flagScrollingVertically();var c=b[0].scrollTop,d=n.getCanvasHeight()-n.getViewportHeight();p.horizontalScrollbarHeight&&p.horizontalScrollbarHeight>0&&(d-=l.grid.horizontalScrollbarHeight);var f=c/d;f>1&&(f=1),0>f&&(f=0);var g={target:b,y:{percentage:f}};a.scrollSource?a.scrollSource=null:l.fireScrollingEvent(g),r=c}else if("horizontal"===a.type){p.flagScrollingHorizontally();var h=e.normalizeScrollLeft(b),i=o.getCanvasWidth()-o.getViewportWidth(),j=h/i,k={target:b,x:{percentage:j}};a.scrollSource?a.scrollSource=null:l.fireScrollingEvent(k),r=h}}function k(c,d){if(!d.target||d.target!==b&&!angular.element(d.target).hasClass("ui-grid-native-scrollbar"))if(a.scrollSource=d.target,"vertical"===a.type){if(d.y&&"undefined"!=typeof d.y.percentage&&void 0!==d.y.percentage){p.flagScrollingVertically();var f=n.getCanvasHeight()-n.getViewportHeight(),g=Math.max(0,d.y.percentage*f);b[0].scrollTop=g}}else if("horizontal"===a.type&&d.x&&"undefined"!=typeof d.x.percentage&&void 0!==d.x.percentage){p.flagScrollingHorizontally();var h=o.getCanvasWidth()-o.getViewportWidth(),i=Math.max(0,d.x.percentage*h);b[0].scrollLeft=e.denormalizeScrollLeft(b,i)}}var l=g[0],m=g[1],n=m.rowContainer,o=m.colContainer,p=l.grid,q=angular.element('
     
    ');b.addClass("ui-grid-native-scrollbar");var r,s=0;"vertical"===a.type?(b.css("width",f+"px"),b.addClass("vertical"),p.verticalScrollbarWidth=f,o.verticalScrollbarWidth=f,r=b[0].scrollTop):"horizontal"===a.type&&(b.css("height",f+"px"),b.addClass("horizontal"),p.horizontalScrollbarHeight=f,n.horizontalScrollbarHeight=f,r=e.normalizeScrollLeft(b)),b.append(q),"vertical"===a.type?s=e.elementHeight(b):"horizontal"===a.type&&(s=e.elementWidth(b));var t=e.closestElm(b,".ui-grid"),u=e.getBorderSize(t,"bottom");"vertical"===a.type?p.registerStyleComputation({priority:6,func:h}):"horizontal"===a.type&&p.registerStyleComputation({priority:6,func:i}),a.scrollSource=null,b.on("scroll",j),b.on("$destroy",function(){b.off("scroll")});var v=a.$on(d.events.GRID_SCROLL,k);a.$on("$destroy",v)}}}])}(),function(){"use strict";var a=angular.module("ui.grid");a.directive("uiGridRenderContainer",["$log","$timeout","$document","uiGridConstants","gridUtil",function(a,b,c,d,e){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableScrollbars:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(b,c,d,e){a.debug("render container "+b.containerId+" pre-link");var f=e[0],g=e[1],h=b.grid=f.grid;if(!b.rowContainerName)throw"No row render container name specified";if(!b.colContainerName)throw"No column render container name specified";if(!h.renderContainers[b.rowContainerName])throw"Row render container '"+b.rowContainerName+"' is not registered.";if(!h.renderContainers[b.colContainerName])throw"Column render container '"+b.colContainerName+"' is not registered.";var i=b.rowContainer=h.renderContainers[b.rowContainerName],j=b.colContainer=h.renderContainers[b.colContainerName];g.containerId=b.containerId,g.rowContainer=i,g.colContainer=j},post:function(b,f,g,h){function i(a,c){if(c.y&&b.bindScrollVertical){n.prevScrollArgs=c;var d=p.getCanvasHeight()-p.getViewportHeight();o.horizontalScrollbarHeight&&o.horizontalScrollbarHeight>0&&(d+=o.horizontalScrollbarHeight);var f,g=n.viewport[0].scrollTop;if("undefined"!=typeof c.y.percentage&&void 0!==c.y.percentage)f=c.y.percentage;else{if("undefined"==typeof c.y.pixels||void 0===c.y.pixels)throw new Error("No percentage or pixel value provided for scroll event Y axis");f=c.y.percentage=(g+c.y.pixels)/d}var h=Math.max(0,f*d);n.viewport[0].scrollTop=h,n.prevScrollArgs.y.pixels=h-g}if(c.x&&b.bindScrollHorizontal){n.prevScrollArgs=c;var i,j=q.getCanvasWidth()-q.getViewportWidth(),k=e.normalizeScrollLeft(n.viewport);if("undefined"!=typeof c.x.percentage&&void 0!==c.x.percentage)i=c.x.percentage;else{if("undefined"==typeof c.x.pixels||void 0===c.x.pixels)throw new Error("No percentage or pixel value provided for scroll event X axis");i=c.x.percentage=(k+c.x.pixels)/j}var l=Math.max(0,i*j);n.viewport[0].scrollLeft=e.denormalizeScrollLeft(n.viewport,l),n.prevScrollLeft=l,n.headerViewport&&(n.headerViewport.scrollLeft=e.denormalizeScrollLeft(n.headerViewport,l)),n.footerViewport&&(n.footerViewport.scrollLeft=e.denormalizeScrollLeft(n.footerViewport,l)),n.prevScrollArgs.x.pixels=l-k}}function j(a){a.originalEvent&&(a=a.originalEvent),a.preventDefault();var b,c,d,e;d=a.targetTouches[0].screenX,e=a.targetTouches[0].screenY,b=-(d-u),c=-(e-t),x=1>c?-1:1,y=1>b?-1:1,c*=2,b*=2;var f={target:a.target};if(0!==c){var g=(v+c)/(p.getCanvasHeight()-p.getViewportHeight());g>1?g=1:0>g&&(g=0),f.y={percentage:g,pixels:c}}if(0!==b){var h=(w+b)/(q.getCanvasWidth()-q.getViewportWidth());h>1?h=1:0>h&&(h=0),f.x={percentage:h,pixels:b}}m.fireScrollingEvent(f)}function k(a){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),c.unbind("touchmove",j),c.unbind("touchend",k),c.unbind("touchcancel",k);{var b=n.viewport[0].scrollTop,d=n.viewport[0].scrollTop;Math.abs(b-v),Math.abs(d-w),new Date-s}}function l(){var a="",c=q.getCanvasWidth(),d=q.getViewportWidth(),e=p.getCanvasHeight(),f=p.getViewportHeight(),g=q.getHeaderViewportWidth(),h=q.getHeaderViewportWidth();return a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+b.containerId+" .ui-grid-canvas { width: "+c+"px; height: "+e+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+b.containerId+" .ui-grid-header-canvas { width: "+c+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+b.containerId+" .ui-grid-viewport { width: "+d+"px; height: "+f+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+b.containerId+" .ui-grid-header-viewport { width: "+g+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+b.containerId+" .ui-grid-footer-canvas { width: "+c+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+b.containerId+" .ui-grid-footer-viewport { width: "+h+"px; }"}a.debug("render container "+b.containerId+" post-link");var m=h[0],n=h[1],o=m.grid,p=n.rowContainer,q=n.colContainer;f.addClass("ui-grid-render-container-"+b.containerId);var r;(b.bindScrollHorizontal||b.bindScrollVertical)&&(r=b.$on(d.events.GRID_SCROLL,i)),f.bind("wheel mousewheel DomMouseScroll MozMousePixelScroll",function(a){a.preventDefault();var b=e.normalizeWheelEvent(a),c={target:f};if(0!==b.deltaY){var d=-120*b.deltaY,g=(n.viewport[0].scrollTop+d)/(p.getCanvasHeight()-p.getViewportHeight());0>g?g=0:g>1&&(g=1),c.y={percentage:g,pixels:d}}if(0!==b.deltaX){var h=-120*b.deltaX,i=e.normalizeScrollLeft(n.viewport),j=(i+h)/(q.getCanvasWidth()-q.getViewportWidth());0>j?j=0:j>1&&(j=1),c.x={percentage:j,pixels:h}}m.fireScrollingEvent(c)});var s,t=0,u=0,v=0,w=0,x=1,y=1;e.isTouchEnabled()&&f.bind("touchstart",function(a){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),m.scrollbars.forEach(function(a){a.addClass("ui-grid-scrollbar-visible"),a.addClass("ui-grid-scrolling")}),s=new Date,t=a.targetTouches[0].screenY,u=a.targetTouches[0].screenX,v=n.viewport[0].scrollTop,w=n.viewport[0].scrollLeft,c.on("touchmove",j),c.on("touchend touchcancel",k)}),f.bind("$destroy",function(){r(),f.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(a){f.unbind(a)})}),m.grid.registerStyleComputation({priority:6,func:l})}}}}}]),a.controller("uiGridRenderContainer",["$scope","$log",function(a){var b=this;b.rowStyle=function(c){var d=a.grid.renderContainers[a.containerId],e={};if(!d.disableRowOffset&&0===c&&0!==b.currentTopRow){var f=a.rowContainer.currentTopRow*a.rowContainer.visibleRowCache[a.rowContainer.currentTopRow].height;e["margin-top"]=f+"px"}return d.disableColumnOffset||0===a.colContainer.currentFirstColumn||(a.grid.isRTL()?e["margin-right"]=a.colContainer.columnOffset+"px":e["margin-left"]=a.colContainer.columnOffset+"px"),e},b.columnStyle=function(b){var c=a.grid.renderContainers[a.containerId];if(!c.disableColumnOffset&&0===b&&0!==a.colContainer.currentFirstColumn){var d=a.colContainer.columnOffset;return a.grid.isRTL()?{"margin-right":d+"px"}:{"margin-left":d+"px"}}return null}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["$log",function(){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=e.grid;a.grid=e.grid,a.colContainer=f.colContainer,g.getRowTemplateFn.then(function(c){c(a,function(a){b.replaceWith(a)})})},post:function(a,b,c,d){{var e=d[0];d[1]}a.getExternalScopes=e.getExternalScopes}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["$log","$interpolate",function(a,b){return{link:function(c,d){a.debug("ui-grid-style link");var e=b(d.text(),!0);e&&c.$watch(e,function(a){d.text(a)})}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridViewport",["$log","gridUtil",function(a,b){return{replace:!0,scope:{},templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(c,d,e,f){a.debug("viewport post-link");var g=f[0],h=f[1];c.containerCtrl=h;{var i=h.rowContainer,j=h.colContainer;g.grid}c.grid=g.grid,c.rowContainer=h.rowContainer,c.colContainer=h.colContainer,h.viewport=d,d.on("scroll",function(){var a=d[0].scrollTop,c=b.normalizeScrollLeft(d);if(c!==j.prevScrollLeft){var e=(c-j.prevScrollLeft,j.getCanvasWidth()-j.getViewportWidth()),f=c/e;j.adjustScrollHorizontal(c,f)}if(a!==i.prevScrollTop){var g=(a-i.prevScrollTop,i.getCanvasHeight()-i.getViewportHeight()),h=a/g;h>1&&(h=1),0>h&&(h=0),i.adjustScrollVertical(a,h)}})}}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(a,b,c){a.$watch(c.uiGridVisible,function(a){b[a?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";angular.module("ui.grid").controller("uiGridController",["$scope","$element","$attrs","$log","gridUtil","$q","uiGridConstants","$templateCache","gridClassFactory","$timeout","$parse","$compile",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(a,b){a&&a!==b&&(o.grid.options.columnDefs=a,o.grid.buildColumns().then(function(){o.grid.preCompileCellTemplates(),o.grid.refreshCanvas(!0)}))}function n(b){var e=[];b&&(0===o.grid.columns.length&&(d.debug("loading cols in dataWatchFunction"),c.uiGridColumns||0!==o.grid.options.columnDefs.length||o.grid.buildColumnDefsFromData(b),e.push(o.grid.buildColumns().then(function(){o.grid.preCompileCellTemplates()}))),f.all(e).then(function(){o.grid.modifyRows(b).then(function(){o.grid.redrawInPlace(),a.$evalAsync(function(){o.grid.refreshCanvas(!0)})})}))}d.debug("ui-grid controller");var o=this;o.grid=i.createGrid(a.uiGrid),b.addClass("grid"+o.grid.id),o.grid.rtl="rtl"===b.css("direction"),o.getExternalScopes=a.getExternalScopes,a.grid=o.grid,c.uiGridColumns&&c.$observe("uiGridColumns",function(a){o.grid.options.columnDefs=a,o.grid.buildColumns().then(function(){o.grid.preCompileCellTemplates(),o.grid.refreshCanvas(!0)})});var p;p=angular.isString(a.uiGrid.data)?a.$parent.$watchCollection(a.uiGrid.data,n):a.$parent.$watchCollection(function(){return a.uiGrid.data},n);var q=a.$parent.$watchCollection(function(){return a.uiGrid.columnDefs},m);a.$on("$destroy",function(){p(),q()}),a.$watch(function(){return o.grid.styleComputations},function(){o.grid.refreshCanvas(!0)}),o.fireScrollingEvent=function(b){a.$broadcast(g.events.GRID_SCROLL,b)},o.fireEvent=function(b,c){("undefined"==typeof c||void 0===c)&&(c={}),("undefined"==typeof c.grid||void 0===c.grid)&&(c.grid=o.grid),a.$broadcast(b,c)},o.innerCompile=function(b){l(b)(a)}}]),angular.module("ui.grid").directive("uiGrid",["$log","$compile","$templateCache","gridUtil","$window",function(a,b,c,d,e){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"=",getExternalScopes:"&?externalScopes"},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(b,c,f,g){function h(){i.gridWidth=b.gridWidth=d.elementWidth(c),i.gridHeight=b.gridHeight=d.elementHeight(c),i.queueRefresh()}a.debug("ui-grid postlink");var i=g.grid;if(g.scrollbars=[],i.renderingComplete(),i.element=c,i.gridWidth=b.gridWidth=d.elementWidth(c),i.canvasWidth=g.grid.gridWidth,i.gridHeight=b.gridHeight=d.elementHeight(c),i.gridHeight');c.prepend(k),g.innerCompile(k);var l=angular.element('
    ');c.append(l),g.innerCompile(l),b.$watch(function(){return i.hasLeftContainer()},function(a,b){a!==b&&i.refreshCanvas(!0)}),b.$watch(function(){return i.hasRightContainer()},function(a,b){a!==b&&i.refreshCanvas(!0)}),angular.element(e).on("resize",h),c.on("$destroy",function(){angular.element(e).off("resize",h)})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["$log",function(a){return{restrict:"EA",replace:!0,template:'
    ',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(b,c,d,e){function f(){var a="";if("left"===b.side||"right"===b.side){for(var d=g.renderContainers[b.side].visibleColumnCache,e=0,f=0;f0?b[0]:null},p.prototype.getColDef=function(a){var b=this.options.columnDefs.filter(function(b){return b.name===a});return b.length>0?b[0]:null},p.prototype.assignTypes=function(){var b=this;b.options.columnDefs.forEach(function(c,d){if(!c.type){var f=new h(c,d,b),g=b.rows.length>0?b.rows[0]:null;g?c.type=e.guessType(b.getCellValue(g,f)):(a.log("Unable to assign type from data, so defaulting to string"),c.type="string")}})},p.prototype.addRowHeaderColumn=function(a){var b=this,c=new h(a,b.rowHeaderColumns.length+1,b);c.isRowHeader=!0,b.isRTL()?(b.createRightContainer(),c.renderContainer="right"):(b.createLeftContainer(),c.renderContainer="left"),b.columnBuilders[0](a,c,b.gridOptions).then(function(){c.enableFiltering=!1,c.enableSorting=!1,b.rowHeaderColumns.push(c)})},p.prototype.buildColumns=function(){a.debug("buildColumns");var c=this,d=[],e=c.rowHeaderColumns.length;return angular.forEach(c.rowHeaderColumns,function(a){e++,c.columns.push(a)}),c.columns.length>c.options.columnDefs.length&&c.columns.forEach(function(a,b){c.getColDef(a.name)||c.columns.splice(b,1)}),c.options.columnDefs.forEach(function(a,b){c.preprocessColDef(a);var f=c.getColumn(a.name);f?f.updateColumnDef(a,f.index):(f=new h(a,b+e,c),c.columns.push(f)),c.columnBuilders.forEach(function(b){d.push(b.call(c,a,f,c.options))})}),b.all(d)},p.prototype.preCompileCellTemplates=function(){this.columns.forEach(function(a){var b=a.cellTemplate.replace(f.COL_FIELD,"grid.getCellValue(row, col)"),d=c(b);a.compiledElementFn=d})},p.prototype.createLeftContainer=function(){this.hasLeftContainer()||(this.renderContainers.left=new m("left",this,{disableColumnOffset:!0}))},p.prototype.createRightContainer=function(){this.hasRightContainer()||(this.renderContainers.right=new m("right",this,{disableColumnOffset:!0}))},p.prototype.hasLeftContainer=function(){return void 0!==this.renderContainers.left},p.prototype.hasRightContainer=function(){return void 0!==this.renderContainers.right},p.prototype.preprocessColDef=function(a){if(!a.field&&!a.name)throw new Error("colDef.name or colDef.field property is required");void 0===a.name&&void 0!==a.field&&(a.name=a.field)},p.prototype.newInN=function(a,b,c,d){for(var e=this,f=[],g=0;g0?b[0]:null},p.prototype.modifyRows=function(a){var c,d,e=this;if(0===e.rows.length&&a.length>0){if(e.options.enableRowHashing)for(e.rowHashMap||e.createRowHashMap(),c=0;c0){var f,g,h;if(e.options.enableRowHashing){f=[],h=[];var i={};g=[],e.rowHashMap||e.createRowHashMap();var j=e.rowHashMap;for(c=0;cd)d+=e.drawnWidth,c++;else{for(var g=0,h=f;h>=f-c;h--)g+=a.columns[h].drawnWidth;b>g&&c++}}),c},p.prototype.getBodyHeight=function(){var a=this.getViewportHeight();return"undefined"!=typeof this.horizontalScrollbarHeight&&void 0!==this.horizontalScrollbarHeight&&this.horizontalScrollbarHeight>0&&(a+=this.horizontalScrollbarHeight),a},p.prototype.getViewportHeight=function(){var a=this,b=this.gridHeight-this.headerHeight-this.footerHeight;"undefined"!=typeof this.horizontalScrollbarHeight&&void 0!==this.horizontalScrollbarHeight&&this.horizontalScrollbarHeight>0&&(b-=this.horizontalScrollbarHeight);var c=a.getViewportAdjustment();return b+=c.height},p.prototype.getViewportWidth=function(){var a=this,b=this.gridWidth;"undefined"!=typeof this.verticalScrollbarWidth&&void 0!==this.verticalScrollbarWidth&&this.verticalScrollbarWidth>0&&(b-=this.verticalScrollbarWidth);var c=a.getViewportAdjustment();return b+=c.width},p.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return"undefined"!=typeof this.verticalScrollbarWidth&&void 0!==this.verticalScrollbarWidth&&this.verticalScrollbarWidth>0&&(a+=this.verticalScrollbarWidth),a},p.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},p.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.viewportAdjusters.splice(b,1)},p.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},p.prototype.getVisibleRowCount=function(){return this.renderContainers.body.visibleRowCache.length},p.prototype.getVisibleRows=function(){return this.renderContainers.body.visibleRowCache},p.prototype.getVisibleColumnCount=function(){return this.renderContainers.body.visibleColumnCache.length},p.prototype.searchRows=function(a){return l.search(this,a,this.columns)},p.prototype.sortByColumn=function(a){return k.sort(this,a,this.columns)},p.prototype.getCellValue=function(a,b){var c=this;return c.cellValueGetterCache[b.colDef.name]||(c.cellValueGetterCache[b.colDef.name]=d(a.getEntityQualifiedColField(b))),c.cellValueGetterCache[b.colDef.name](a)},p.prototype.getNextColumnSortPriority=function(){var a=this,b=0;return a.columns.forEach(function(a){a.sort&&a.sort.priority&&a.sort.priority>b&&(b=a.sort.priority)}),b+1},p.prototype.resetColumnSorting=function(a){var b=this;b.columns.forEach(function(b){b!==a&&(b.sort={})})},p.prototype.getColumnSorting=function(){var a,b=this,c=[];return a=b.columns.slice(0),a.sort(k.prioritySort).forEach(function(a){a.sort&&"undefined"!=typeof a.sort.direction&&a.sort.direction&&(a.sort.direction===f.ASC||a.sort.direction===f.DESC)&&c.push(a)}),c},p.prototype.sortColumn=function(a,c,d){var e=this,g=null;if("undefined"==typeof a||!a)throw new Error("No column parameter provided");return"boolean"==typeof c?d=c:g=c,d?a.sort.priority=e.getNextColumnSortPriority():(e.resetColumnSorting(a),a.sort.priority=0),a.sort.direction=g?g:a.sort.direction&&a.sort.direction===f.ASC?f.DESC:a.sort.direction&&a.sort.direction===f.DESC?null:f.ASC,e.api.core.raise.sortChanged(e,e.getColumnSorting()),b.when(a)},p.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},p.prototype.createRowHashMap=function(){var a=this,b=new o;b.grid=a,a.rowHashMap=b},p.prototype.refresh=function(){a.debug("grid refresh");var c=this,d=c.processRowsProcessors(c.rows).then(function(a){c.setVisibleRows(a)}),e=c.processColumnsProcessors(c.columns).then(function(a){c.setVisibleColumns(a)});return b.all([d,e]).then(function(){c.redrawInPlace(),c.refreshCanvas(!0)})},p.prototype.refreshRows=function(){var a=this;return a.processRowsProcessors(a.rows).then(function(b){a.setVisibleRows(b),a.redrawRows(),a.refreshCanvas()})},p.prototype.refreshCanvas=function(a){var c=this;a&&c.buildStyles();var d=b.defer(),f=[];for(var g in c.renderContainers)if(c.renderContainers.hasOwnProperty(g)){var h=c.renderContainers[g];h.header&&f.push(h)}return n(f.length>0?function(){for(var b=!1,g=0;gc&&e>=0;e--)c+=a.visibleRowCache[e].height,b++;return b},c.prototype.minColumnsToRender=function(){for(var a=this,b=this.getViewportWidth(),c=0,d=0,e=0;ed)d+=f.drawnWidth,c++;else{for(var g=0,h=e;h>=e-c;h--)g+=a.visibleColumnCache[h].drawnWidth;b>g&&c++}}return c},c.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length},c.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},c.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.viewportAdjusters.splice(b,1)},c.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},c.prototype.getViewportHeight=function(){var a=this,b=a.headerHeight?a.headerHeight:a.grid.headerHeight,c=a.grid.gridHeight-b-a.grid.footerHeight;"undefined"!=typeof a.horizontalScrollbarHeight&&void 0!==a.horizontalScrollbarHeight&&a.horizontalScrollbarHeight>0&&(c-=a.horizontalScrollbarHeight);var d=a.getViewportAdjustment();return c+=d.height},c.prototype.getViewportWidth=function(){var a=this,b=a.grid.gridWidth;"undefined"!=typeof a.grid.verticalScrollbarWidth&&void 0!==a.grid.verticalScrollbarWidth&&a.grid.verticalScrollbarWidth>0&&(b-=a.grid.verticalScrollbarWidth);var c=a.getViewportAdjustment();return b+=c.width},c.prototype.getHeaderViewportWidth=function(){var a=this,b=this.getViewportWidth();return"undefined"!=typeof a.grid.verticalScrollbarWidth&&void 0!==a.grid.verticalScrollbarWidth&&a.grid.verticalScrollbarWidth>0&&(b+=a.grid.verticalScrollbarWidth),b},c.prototype.getCanvasHeight=function(){var a=this,b=0;return a.visibleRowCache.forEach(function(a){b+=a.height}),"undefined"!=typeof a.grid.horizontalScrollbarHeight&&void 0!==a.grid.horizontalScrollbarHeight&&a.grid.horizontalScrollbarHeight>0&&(b-=a.grid.horizontalScrollbarHeight),b},c.prototype.getCanvasWidth=function(){var a=this,b=a.canvasWidth;return"undefined"!=typeof a.verticalScrollbarWidth&&void 0!==a.verticalScrollbarWidth&&a.verticalScrollbarWidth>0&&(b-=a.verticalScrollbarWidth),b},c.prototype.setRenderedRows=function(a){this.renderedRows.length=a.length;for(var b=0;bf&&(g=f);var h=[];if(e.length>c.grid.options.virtualizationThreshold){if(c.prevScrollTopg)return;if(c.prevScrollTop>a&&g>c.prevRowScrollIndex-c.grid.options.scrollThreshold&&f>g)return;var i=Math.max(0,g-c.grid.options.excessRows),j=Math.min(e.length,g+d+c.grid.options.excessRows);h=[i,j]}else{var k=c.visibleRowCache.length;h=[0,Math.max(k,d+c.grid.options.excessRows)]}c.updateViewableRowRange(h),c.prevRowScrollIndex=g},c.prototype.adjustColumns=function(a,b){var c=this,d=c.minColumnsToRender(),e=c.visibleColumnCache,f=e.length-d;"undefined"!=typeof b&&null!==b||!a||(b=a/c.getCanvasWidth());var g=Math.ceil(Math.min(f,f*b));g>f&&(g=f);var h=[];if(e.length>c.grid.options.columnVirtualizationThreshold&&c.getCanvasWidth()>c.getViewportWidth()){if(c.prevScrollLeftg)return;if(c.prevScrollLeft>a&&g>c.prevColumnScrollIndex-c.grid.options.horizontalScrollThreshold&&f>g)return;var i=Math.max(0,g-c.grid.options.excessColumns),j=Math.min(e.length,g+d+c.grid.options.excessColumns);h=[i,j]}else{var k=c.visibleColumnCache.length;h=[0,Math.max(k,d+c.grid.options.excessColumns)]}c.updateViewableColumnRange(h),c.prevColumnScrollIndex=g},c.prototype.updateViewableRowRange=function(a){var b=this.visibleRowCache.slice(a[0],a[1]);this.currentTopRow=a[0],this.setRenderedRows(b)},c.prototype.updateViewableColumnRange=function(a){var b=this.visibleColumnCache.slice(a[0],a[1]);this.currentFirstColumn=a[0],this.setRenderedColumns(b)},c.prototype.rowStyle=function(a){var b=this,c={};if(0===a&&0!==b.currentTopRow){var d=b.currentTopRow*b.grid.options.rowHeight;c["margin-top"]=d+"px"}return 0!==b.currentFirstColumn&&(b.grid.isRTL()?c["margin-right"]=b.columnOffset+"px":c["margin-left"]=b.columnOffset+"px"),c},c.prototype.columnStyle=function(a){var b=this;if(0===a&&0!==b.currentFirstColumn){var c=b.columnOffset;return b.grid.isRTL()?{"margin-right":c+"px"}:{"margin-left":c+"px"}}return null},c.prototype.updateColumnWidths=function(){var a=this,c=[],d=[],e=0,f=a.getViewportWidth();"undefined"!=typeof a.grid.verticalScrollbarWidth&&void 0!==a.grid.verticalScrollbarWidth&&a.grid.verticalScrollbarWidth>0&&(f+=a.grid.verticalScrollbarWidth);var g,h=0,i=0,j="",k=a.visibleColumnCache;k.forEach(function(a){if(a.visible){var f=!1;angular.isNumber(a.width)||(f=isNaN(a.width)?b.endsWith(a.width,"%"):!1),angular.isString(a.width)&&-1!==a.width.indexOf("*")?(e=parseInt(e+a.width.length,10),c.push(a)):f?d.push(a):angular.isNumber(a.width)&&(h=parseInt(h+a.width,10),i=parseInt(i,10)+parseInt(a.width,10),a.drawnWidth=a.width)}});var l,m,n,o=f-h;if(d.length>0){for(l=0;lm.colDef.maxWidth&&(n=m.colDef.maxWidth,o-=n,i+=n,m.drawnWidth=n,d.splice(l,1))}d.forEach(function(a){var b=parseInt(a.width.replace(/%/g,""),10)/100,c=parseInt(b*o,10);i+=c,a.drawnWidth=c})}if(c.length>0){var q=parseInt(o/e,10);for(l=0;lm.colDef.maxWidth&&(n=m.colDef.maxWidth,o-=n,e--,i+=n,m.drawnWidth=n,c.splice(l,1));q=parseInt(o/e,10),c.forEach(function(a){var b=parseInt(q*a.width.length,10);i+=b,a.drawnWidth=b})}var r=f-parseInt(i,10);if(r>0&&i>0&&f>i){var s=!1;if(k.forEach(function(a){a.width&&!angular.isNumber(a.width)&&(s=!0)}),s)for(var t=function(a){r>0&&(a.drawnWidth=a.drawnWidth+1,i+=1,r--)};r>0;)k.forEach(t)}f>i&&(i=f),k.forEach(function(a){j+=a.getColClassDefinition()}),a.grid.verticalScrollbarWidth&&(i+=a.grid.verticalScrollbarWidth),a.canvasWidth=parseInt(i,10),this.columnStyles=j},c}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil",function(a){function b(b,c,d){this.grid=d,this.entity=b,this.index=c,this.uid=a.nextUid(),this.visible=!0,this.height=d.options.rowHeight,this.grid.api.core.setRowInvisible||this.grid.api.registerMethod("core","setRowInvisible",this.setRowInvisible),this.grid.api.core.clearRowInvisible||this.grid.api.registerMethod("core","clearRowInvisible",this.clearRowInvisible),this.grid.api.core.getVisibleRows||this.grid.api.registerMethod("core","getVisibleRows",this.getVisibleRows),this.grid.api.core.raise.rowsVisibleChanged||this.grid.api.registerEvent("core","rowsVisibleChanged")}return b.prototype.getQualifiedColField=function(a){return"row."+this.getEntityQualifiedColField(a)},b.prototype.getEntityQualifiedColField=function(b){return a.preEval("entity."+b.field)},b.prototype.setRowInvisible=function(a){null!==a&&(a.forceInvisible=!0,a.visible&&(a.visible=!1,a.grid.refresh(),a.grid.api.core.raise.rowsVisibleChanged()))},b.prototype.clearRowInvisible=function(a){null!==a&&(a.forceInvisible=!1,a.visible||(a.visible=!0,a.grid.refresh(),a.grid.api.core.raise.rowsVisibleChanged()))},b.prototype.getVisibleRows=function(a){return a.rows.filter(function(a){return a.visible})},b}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","$log","Grid","GridColumn","GridRow",function(a,b,c,d,e,f,g){var h={createGrid:function(d){d="undefined"!=typeof d?d:{},d.id=a.newId();var e=new g(d);if(e.options.rowTemplate){var f=b.defer();e.getRowTemplateFn=f.promise,a.getTemplate(e.options.rowTemplate).then(function(a){var b=c(a);f.resolve(b)},function(){throw new Error("Couldn't fetch/use row template '"+e.options.rowTemplate+"'")})}return e.registerColumnBuilder(h.defaultColumnBuilder),e.registerRowsProcessor(function(a){return a.forEach(function(a){a.visible=!a.forceInvisible}),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.visible=!0}),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.colDef.visible===!1&&(a.visible=!1)}),a}),e.options.enableFiltering&&e.registerRowsProcessor(e.searchRows),e.registerRowsProcessor(e.options.externalSort&&angular.isFunction(e.options.externalSort)?e.options.externalSort:e.sortByColumn),e},defaultColumnBuilder:function(c,d){var f=[];return c.headerCellTemplate||(c.headerCellTemplate="ui-grid/uiGridHeaderCell"),c.cellTemplate||(c.cellTemplate="ui-grid/uiGridCell"),f.push(a.getTemplate(c.cellTemplate).then(function(a){d.cellTemplate=a.replace(e.CUSTOM_FILTERS,d.cellFilter?"|"+d.cellFilter:"")},function(){throw new Error("Couldn't fetch/use colDef.cellTemplate '"+c.cellTemplate+"'")})),f.push(a.getTemplate(c.headerCellTemplate).then(function(a){d.headerCellTemplate=a.replace(e.CUSTOM_FILTERS,d.headerCellFilter?"|"+d.headerCellFilter:"")},function(){throw new Error("Couldn't fetch/use colDef.headerCellTemplate '"+c.headerCellTemplate+"'")})),b.all(f)}};return h}])}(),function(){function a(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function b(){var a=function(b,c){return b&&a.cache[b]?a.cache[b]:b&&c?(a.cache[b]=c,a.cache[b]):void 0};return a.cache={},a.clear=function(){a.cache={}},a}var c=angular.module("ui.grid");c.service("rowSearcher",["$log","uiGridConstants",function(c,d){var e=d.filter.STARTS_WITH,f={};return f.getTerm=function(a){if("undefined"==typeof a.term)return a.term;var b=a.term;return"string"==typeof b&&(b=b.trim()),b},f.stripTerm=function(b){var c=f.getTerm(b);return"string"==typeof c?a(c.replace(/(^\*|\*$)/g,"")):c},f.guessCondition=function(a){if("undefined"==typeof a.term||!a.term)return e;var b=f.getTerm(a);if(/\*/.test(b)){var c="";a.flags&&a.flags.caseSensitive||(c+="i");var d=b.replace(/(\\)?\*/g,function(a,b){return b?a:"[\\s\\S]*?"});return new RegExp("^"+d+"$",c)}return e},f.runColumnFilter=function(a,b,c,e,g,h){var i=typeof h.condition;"undefined"!==i&&h.condition||(h.condition=d.filter.CONTAINS);var j=f.stripTerm(h);if(null===j||void 0===j||""===j)return!0;var k=a.getCellValue(b,c),l="";h.flags&&h.flags.caseSensitive||(l+="i");var m=c.field+g;if(h.condition instanceof RegExp){if(!h.condition.test(k))return!1}else{if("function"===i)return h.condition(j,k,b,c);if(h.condition===d.filter.STARTS_WITH){var n=e(m)?e(m):e(m,new RegExp("^"+j,l));if(!n.test(k))return!1}else if(h.condition===d.filter.ENDS_WITH){var o=e(m)?e(m):e(m,new RegExp(j+"$",l));if(!o.test(k))return!1}else if(h.condition===d.filter.CONTAINS){var p=e(m)?e(m):e(m,new RegExp(j,l));if(!p.test(k))return!1}else if(h.condition===d.filter.EXACT){var q=e(m)?e(m):e(m,new RegExp("^"+j+"$",l));if(!q.test(k))return!1}else if(h.condition===d.filter.GREATER_THAN){if(j>=k)return!1}else if(h.condition===d.filter.GREATER_THAN_OR_EQUAL){if(j>k)return!1}else if(h.condition===d.filter.LESS_THAN){if(k>=j)return!1}else if(h.condition===d.filter.LESS_THAN_OR_EQUAL){if(k>j)return!1}else if(h.condition===d.filter.NOT_EQUAL&&!angular.equals(k,j))return!1}return!0},f.searchColumn=function(a,b,c,d){var e=[];if(a.options.useExternalFiltering)return!0;if(!("undefined"!=typeof c.filters&&c.filters&&c.filters.length>0))return!0;e=c.filters;for(var g in e){var h=e[g];if(!h.condition){var i="cond-"+c.field+"-"+h.term,j=d(i)?d(i):d(i,f.guessCondition(h));h={term:h.term,condition:j,flags:angular.extend({caseSensitive:!1},h.flags)}}var k=f.runColumnFilter(a,b,c,d,g,h);if(!k)return!1}return!0},f.search=function(a,c,d){if(c){var e=new b,g=[];return d.forEach(function(a){"undefined"!=typeof a.filters&&a.filters.length>0?g.push(a):"undefined"!=typeof a.filter&&a.filter&&"undefined"!=typeof a.filter.term&&a.filter.term&&g.push(a)}),g.length>0&&(g.forEach(function(b){c.forEach(function(c){(c.forceInvisible||!f.searchColumn(a,c,b,e))&&(c.visible=!1)})}),a.api.core.raise.rowsVisibleChanged()),e.clear(),c -}},f}])}(),function(){var a=angular.module("ui.grid");a.service("rowSorter",["$parse","uiGridConstants",function(a,b){var c="("+b.CURRENCY_SYMBOLS.map(function(a){return"\\"+a}).join("|")+")?",d=(new RegExp("^[-+]?"+c+"[\\d,.]+"+c+"%?$"),{colSortFnCache:[]});return d.guessSortFn=function(a){switch(a){case"number":return d.sortNumber;case"boolean":return d.sortBool;case"string":return d.sortAlpha;case"date":return d.sortDate;case"object":return d.basicSort;default:throw new Error("No sorting function found for type:"+a)}},d.basicSort=function(a,b){return a===b?0:b>a?-1:1},d.sortNumber=function(a,b){return a-b},d.sortNumberStr=function(a,b){var c,d,e=!1,f=!1;return c=parseFloat(a.replace(/[^0-9.-]/g,"")),isNaN(c)&&(e=!0),d=parseFloat(b.replace(/[^0-9.-]/g,"")),isNaN(d)&&(f=!0),e&&f?0:e?1:f?-1:c-d},d.sortAlpha=function(a,b){var c=a.toLowerCase(),d=b.toLowerCase();return c===d?0:d>c?-1:1},d.sortDate=function(a,b){var c=a.getTime(),d=b.getTime();return c===d?0:d>c?-1:1},d.sortBool=function(a,b){return a&&b?0:a||b?a?1:-1:0},d.getSortFn=function(a,b){var c;return d.colSortFnCache[b.colDef.name]?c=d.colSortFnCache[b.colDef.name]:void 0!==b.sortingAlgorithm?(c=b.sortingAlgorithm,d.colSortFnCache[b.colDef.name]=b.sortingAlgorithm):(c=d.guessSortFn(b.colDef.type),c?d.colSortFnCache[b.colDef.name]=c:c=d.sortAlpha),c},d.prioritySort=function(a,b){return void 0!==a.sort.priority&&void 0!==b.sort.priority?a.sort.priorityf;f+=2){var i=h[f];if("margin"===c){var j=parseFloat(e[c+i]);isNaN(j)||(g+=j)}if(d){if("content"===c){var k=parseFloat(e["padding"+i]);isNaN(k)||(g-=k)}if("margin"!==c){var l=parseFloat(e["border"+i+"Width"]);isNaN(l)||(g-=l)}}else{var m=parseFloat(e["padding"+i]);if(isNaN(m)||(g+=m),"padding"!==c){var n=parseFloat(e["border"+i+"Width"]);isNaN(n)||(g+=n)}}}return g}function c(c,d,f){var g=!0,h="width"===d?c.offsetWidth:c.offsetHeight,i=a(c),j="border-box"===i.boxSizing;if(0>=h||null==h){if(h=i[d],(0>h||null==h)&&(h=c.style[d]),e.test(h))return h;g=j&&!0,h=parseFloat(h)||0}var k=h+b(c,d,f||(j?"border":"content"),g,i);return k}var d=angular.module("ui.grid"),e=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),f=/^(block|none|table(?!-c[ea]).+)/,g={position:"absolute",visibility:"hidden",display:"block"},h=["0","0","0"],i="uiGrid-";d.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$injector","$q","uiGridConstants",function(b,d,e,j,k,l,m,n,o){var p={createBoundedWrapper:function(a,b){return function(){return b.apply(a,arguments)}},readableColumnName:function(a){return"undefined"==typeof a||void 0===a||null===a?a:("string"!=typeof a&&(a=String(a)),a.replace(/_+/g," ").replace(/^[A-Z]+$/,function(a){return angular.lowercase(angular.uppercase(a.charAt(0))+a.slice(1))}).replace(/(\w+)/g,function(a){return angular.uppercase(a.charAt(0))+a.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(a,b){var c=[];if(!a||"undefined"==typeof a[0]||void 0===a[0])return[];angular.isUndefined(b)&&(b=[]);var d=a[0];return angular.forEach(d,function(a,d){-1===b.indexOf(d)&&c.push({name:d})}),c},newId:function(){var a=(new Date).getTime();return function(){return a+=1}}(),getTemplate:function(a){if(k.get(a))return n.when(k.get(a));if(a.hasOwnProperty("then"))return a;try{if(angular.element(a).length>0)return n.when(a)}catch(c){}return b.debug("Fetching url",a),j({method:"GET",url:a}).then(function(b){var c=b.data.trim();return k.put(a,c),c},function(b){throw new Error("Could not get template "+a+": "+b)})},guessType:function(a){var b=typeof a;switch(b){case"number":case"boolean":case"string":return b;default:return angular.isDate(a)?"date":"object"}},elementWidth:function(){},elementHeight:function(){},getScrollbarWidth:function(){var a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a);var b=a.offsetWidth;a.style.overflow="scroll";var c=document.createElement("div");c.style.width="100%",a.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),b-d},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},fakeElement:function(a,b,c){var d,e,f=angular.element(a).clone()[0];for(e in b)f.style[e]=b[e];return angular.element(document.body).append(f),d=c.call(f,f),angular.element(f).remove(),d},normalizeWheelEvent:function(a){var b,c,d,e=a||window.event,f=([].slice.call(arguments,1),0),g=0,h=0,i=0,j=0;return e.originalEvent&&(e=e.originalEvent),e.wheelDelta&&(f=e.wheelDelta),e.detail&&(f=-1*e.detail),h=f,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*f),e.deltaY&&(h=-1*e.deltaY,f=h),e.deltaX&&(g=e.deltaX,f=-1*g),void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY),void 0!==e.wheelDeltaX&&(g=e.wheelDeltaX),i=Math.abs(f),(!b||b>i)&&(b=i),j=Math.max(Math.abs(h),Math.abs(g)),(!c||c>j)&&(c=j),d=f>0?"floor":"ceil",f=Math[d](f/b),g=Math[d](g/c),h=Math[d](h/c),{delta:f,deltaX:g,deltaY:h}},isTouchEnabled:function(){var a;return("ontouchstart"in d||d.DocumentTouch&&e instanceof DocumentTouch)&&(a=!0),a},isNullOrUndefined:function(a){return void 0===a||null===a?!0:!1},endsWith:function(a,b){return a&&b&&"string"==typeof a?-1!==a.indexOf(b,a.length-b.length):!1},requestAnimationFrame:d.requestAnimationFrame&&d.requestAnimationFrame.bind(d)||d.webkitRequestAnimationFrame&&d.webkitRequestAnimationFrame.bind(d)||function(a){return l(a,10,!1)},numericAndNullSort:function(a,b){return null===a?1:null===b?-1:null===a&&null===b?0:a-b},disableAnimations:function(a){var b;try{b=m.get("$animate"),b.enabled(!1,a)}catch(c){}},enableAnimations:function(a){var b;try{b=m.get("$animate"),b.enabled(!0,a)}catch(c){}},nextUid:function(){for(var a,b=h.length;b;){if(b--,a=h[b].charCodeAt(0),57===a)return h[b]="A",i+h.join("");if(90!==a)return h[b]=String.fromCharCode(a+1),i+h.join("");h[b]="0"}return h.unshift("0"),i+h.join("")},hashKey:function(a){var b,c=typeof a;return"object"===c&&null!==a?"function"==typeof(b=a.$$hashKey)?b=a.$$hashKey():"undefined"!=typeof a.$$hashKey&&a.$$hashKey?b=a.$$hashKey:void 0===b&&(b=a.$$hashKey=p.nextUid()):b=a,c+":"+b}};return["width","height"].forEach(function(b){var d=angular.uppercase(b.charAt(0))+b.substr(1);p["element"+d]=function(d,e){var h=d;if("undefined"!=typeof h.length&&h.length&&(h=d[0]),h){var i=a(h);return 0===h.offsetWidth&&f.test(i.display)?p.fakeElement(h,g,function(a){return c(a,b,e)}):c(h,b,e)}return null},p["outerElement"+d]=function(a,b){return a?p["element"+d].call(this,a,b?"margin":"border"):null}}),p.closestElm=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(a){return"function"==typeof document.body[a]?(c=a,!0):!1});for(var d;null!==a;){if(d=a.parentElement,null!==d&&d[c](b))return d;a=d}return null},p.type=function(a){var b=Function.prototype.toString.call(a.constructor);return b.match(/function (.*?)\(/)[1]},p.getBorderSize=function(b,c){"undefined"!=typeof b.length&&b.length&&(b=b[0]);var d=a(b);c=c?"border-"+c:"border";var e=parseInt(d[c],10);return isNaN(e)?0:e},p.detectBrowser=function(){var a=d.navigator.userAgent,b={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var c in b)if(b[c].test(a))return c;return"unknown"},p.normalizeScrollLeft=function(a){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var b=p.detectBrowser(),c=a.scrollLeft,d=angular.element(a).css("direction");if("ie"===b)return c;if("chrome"===b){if("rtl"===d){var e=a.scrollWidth-a.clientWidth;return e-c}return c}return"firefox"===b?Math.abs(c):c},p.denormalizeScrollLeft=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c=p.detectBrowser(),d=angular.element(a).css("direction");if("ie"===c)return b;if("chrome"===c){if("rtl"===d){var e=a.scrollWidth-a.clientWidth;return e-b}return b}return"firefox"===c&&"rtl"===d?-1*b:b},p.preEval=function(a){var b=o.BRACKET_REGEXP.exec(a);if(b)return(b[1]?p.preEval(b[1]):b[1])+b[2]+(b[3]?p.preEval(b[3]):b[3]);a=a.replace(o.APOS_REGEXP,"\\'");var c=a.split(o.DOT_REGEXP),d=[c.shift()];return angular.forEach(c,function(a){d.push(a.replace(o.FUNC_REGEXP,"']$1"))}),d.join("['")},p.debounce=function(a,b,c){function d(){g=this,f=arguments;var d=function(){e=null,c||(h=a.apply(g,f))},i=c&&!e;return e&&l.cancel(e),e=l(d,b),i&&(h=a.apply(g,f)),h}var e,f,g,h;return d.cancel=function(){l.cancel(e),e=null},d},p}]),d.filter("px",function(){return function(a){return a.match(/^[\d\.]+$/)?a+"px":a}})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil."},search:{placeholder:"Søg...",showingItems:"Viste rækker:",selectedItems:"Valgte rækker:",totalItems:"Rækker totalt:",size:"Side størrelse:",first:"Første side",next:"Næste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"Vælg kolonner:"},column:{hide:"Skjul kolonne"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("de",{aggregate:{label:"eintrag"},groupPanel:{description:"Ziehen Sie eine Spaltenüberschrift hierhin um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Einträge:",selectedItems:"Ausgewählte Einträge:",totalItems:"Einträge gesamt:",size:"Einträge pro Seite:",first:"Erste Seite",next:"Nächste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten auswählen:"},column:{hide:"Spalte ausblenden"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",remove:"Remove Sort"},column:{hide:"Hide Column"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("es",{aggregate:{label:"Artículos"},groupPanel:{description:"Arrastre un encabezado de columna aquí y soltarlo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Artículos Mostrando:",selectedItems:"Artículos Seleccionados:",totalItems:"Artículos Totales:",size:"Tamaño de Página:",first:"Primera Página",next:"Página Siguiente",previous:"Página Anterior",last:"Última Página"},menu:{text:"Elegir columnas:"},column:{hide:"Ocultar la columna"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fa",{aggregate:{label:"موردها"},groupPanel:{description:"یک عنوان ستون اینجا را بردار و به گروهی از آن ستون بیانداز."},search:{placeholder:"جستجو...",showingItems:"نمایش موردها:",selectedItems:"موردهای انتخاب‌شده:",totalItems:"همهٔ موردها:",size:"اندازهٔ صفحه:",first:"صفحهٔ اول",next:"صفحهٔ بعد",previous:"صفحهٔ قبل",last:"آخرین صفحه"},menu:{text:"انتخاب ستون‌ها:"},column:{hide:"ستون پنهان کن"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fr",{aggregate:{label:"articles"},groupPanel:{description:"Faites glisser un en-tête de colonne ici et déposez-le vers un groupe par cette colonne."},search:{placeholder:"Recherche...",showingItems:"Articles Affichage des:",selectedItems:"Éléments Articles:",totalItems:"Nombre total d'articles:",size:"Taille de page:",first:"Première page",next:"Page Suivante",previous:"Page précédente",last:"Dernière page"},menu:{text:"Choisir des colonnes:"},column:{hide:"Colonne de peau"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("he",{aggregate:{label:"items"},groupPanel:{description:"גרור עמודה לכאן ושחרר בכדי לקבץ עמודה זו."},search:{placeholder:"חפש...",showingItems:"מציג:",selectedItems:'סה"כ נבחרו:',totalItems:'סה"כ רשומות:',size:"תוצאות בדף:",first:"דף ראשון",next:"דף הבא",previous:"דף קודם",last:"דף אחרון"},menu:{text:"בחר עמודות:"},sort:{ascending:"סדר עולה",descending:"סדר יורד",remove:"בטל"},column:{hide:"טור הסתר"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Kolom te verbergen"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt-br",{aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},column:{hide:"Esconder coluna"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ru",{aggregate:{label:"элементы"},groupPanel:{description:"Для группировки по столбцу перетащите сюда его название."},search:{placeholder:"Поиск...",showingItems:"Показать элементы:",selectedItems:"Выбранные элементы:",totalItems:"Всего элементов:",size:"Размер страницы:",first:"Первая страница",next:"Следующая страница",previous:"Предыдущая страница",last:"Последняя страница"},menu:{text:"Выбрать столбцы:"},sort:{ascending:"По возрастанию",descending:"По убыванию",remove:"Убрать сортировку"},column:{hide:"спрятать столбец"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca."},search:{placeholder:"Hľadaj...",showingItems:"Zobrazujem položky:",selectedItems:"Vybraté položky:",totalItems:"Počet položiek:",size:"Počet:",first:"Prvá strana",next:"Ďalšia strana",previous:"Predchádzajúca strana",last:"Posledná strana"},menu:{text:"Vyberte stĺpce:"},sort:{ascending:"Zotriediť vzostupne",descending:"Zotriediť zostupne",remove:"Vymazať triedenie"}}),a}])}])}(),function(){var a=["uiT","uiTranslate"],b=["t","uiTranslate"],c=angular.module("ui.grid.i18n");c.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),c.service("i18nService",["$log","i18nConstants","$rootScope",function(a,b,c){var d={_langs:{},current:null,get:function(a){return this._langs[a.toLowerCase()]},add:function(a,b){var c=a.toLowerCase();this._langs[c]||(this._langs[c]={}),angular.extend(this._langs[c],b)},getAllLangs:function(){var a=[];if(!this._langs)return a;for(var b in this._langs)a.push(b);return a},setCurrent:function(a){this.current=a.toLowerCase()},getCurrentLang:function(){return this.current}},e={add:function(a,b){"object"==typeof a?angular.forEach(a,function(a){a&&d.add(a,b)}):d.add(a,b)},getAllLangs:function(){return d.getAllLangs()},get:function(a){var b=a?a:e.getCurrentLang();return d.get(b)},getSafeText:function(a,c){var f=c?c:e.getCurrentLang(),g=d.get(f);if(!g)return b.MISSING;for(var h=a.split("."),i=g,j=0;je.index?0===d.index?new a(d,c[g]):new a(b[d.index-1],c[g]):new a(d,c[g])},getRowColRight:function(b,c,d,e){var g=f.getNextColIndexRight(c,e);return ga.length-1&&(c=0);return c},getRowColUp:function(b,c,d,e){var g=e.colDef.allowCellFocus?e.index:f.getNextColIndexRight(c,e);return 0===d.index?new a(d,c[g]):new a(b[d.index-1],c[g])},getRowColDown:function(b,c,d,e){var g=e.colDef.allowCellFocus?e.index:f.getNextColIndexRight(c,e);return d.index===b.length-1?new a(d,c[g]):new a(b[d.index+1],c[g])},cellNavColumnBuilder:function(a){var b=[];return a.allowCellFocus=void 0===a.allowCellFocus?!0:a.allowCellFocus,e.all(b)},scrollTo:function(a,b,d,e){var f={};if(null!==d){var g=a.getRow(d);g&&(f.y={percentage:g.index/a.renderContainers.body.visibleRowCache.length})}if(null!==e){var h=a.getColumn(e.name?e.name:e.field);h&&(f.x={percentage:this.getLeftWidth(a,h.index)/this.getLeftWidth(a,a.renderContainers.body.visibleColumnCache.length-1)})}(f.y||f.x)&&b.$broadcast(c.events.GRID_SCROLL,f)},getLeftWidth:function(a,b){var c=0;if(b){for(var d=0;b>=d;d++)a.renderContainers.body.visibleColumnCache[d].drawnWidth&&(c+=a.renderContainers.body.visibleColumnCache[d].drawnWidth);return c}}};return f}]),b.directive("uiGridCellnav",["$log","uiGridCellNavService","uiGridCellNavConstants",function(b,c,d){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,e,f,g){var h=g.grid;c.initializeGrid(h),g.cellNav={},g.cellNav.broadcastCellNav=function(a){b.$broadcast(d.CELL_NAV_EVENT,a),g.cellNav.broadcastFocus(a.row,a.col)},g.cellNav.broadcastFocus=function(b,c){if(null===h.cellNav.lastRowCol||h.cellNav.lastRowCol.row!==b||h.cellNav.lastRowCol.col!==c){var d=new a(b,c);h.api.cellNav.raise.navigate(d,h.cellNav.lastRowCol),h.cellNav.lastRowCol=d}}},post:function(){}}}}}]),b.directive("uiGridCell",["uiGridCellNavService","$log","uiGridCellNavConstants",function(a,b,c){return{priority:-150,restrict:"A",require:"^uiGrid",scope:!1,link:function(b,d,e,f){function g(){d.find("div").attr("tabindex",-1)}function h(){var a=d.find("div");a[0].focus(),a.attr("tabindex",0)}b.col.colDef.allowCellFocus&&(g(),d.on("keydown",function(c){var d=a.getDirection(c);if(null===d)return!0;var e=a.getNextRowCol(d,b.grid,b.row,b.col);return f.cellNav.broadcastCellNav(e),g(),!1}),d.find("div").on("focus",function(){f.cellNav.broadcastFocus(b.row,b.col)}),b.$on(c.CELL_NAV_EVENT,function(a,c){c.row===b.row&&c.col===b.col&&h()}))}}}])}(),function(){"use strict";var a=angular.module("ui.grid.edit",["ui.grid"]);a.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),a.service("uiGridEditService",["$log","$q","$templateCache","uiGridConstants","gridUtil",function(a,b,c,d,e){var f={initializeGrid:function(a){f.defaultGridOptions(a.options),a.registerColumnBuilder(f.editColumnBuilder);var b={events:{edit:{afterCellEdit:function(){},beginCellEdit:function(){},cancelCellEdit:function(){}}},methods:{edit:{}}};a.api.registerEventsFromObject(b.events)},defaultGridOptions:function(a){a.cellEditableCondition=void 0===a.cellEditableCondition?!0:a.cellEditableCondition,a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?!1:a.enableCellEditOnFocus},editColumnBuilder:function(a,c,d){var f=[];return a.enableCellEdit=void 0===a.enableCellEdit?void 0===d.enableCellEdit?"object"!==a.type:d.enableCellEdit:a.enableCellEdit,a.cellEditableCondition=void 0===a.cellEditableCondition?d.cellEditableCondition:a.cellEditableCondition,a.enableCellEdit&&(a.editableCellTemplate=a.editableCellTemplate||d.editableCellTemplate||"ui-grid/cellEditor",f.push(e.getTemplate(a.editableCellTemplate).then(function(a){c.editableCellTemplate=a},function(){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+a.editableCellTemplate+"'")}))),a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?d.enableCellEditOnFocus:a.enableCellEditOnFocus,b.all(f)},isStartEditKey:function(a){return a.keyCode===d.keymap.LEFT||a.keyCode===d.keymap.TAB&&a.shiftKey||a.keyCode===d.keymap.RIGHT||a.keyCode===d.keymap.TAB||a.keyCode===d.keymap.UP||a.keyCode===d.keymap.ENTER&&a.shiftKey||a.keyCode===d.keymap.DOWN||a.keyCode===d.keymap.ENTER?!1:!0}};return f}]),a.directive("uiGridEdit",["$log","uiGridEditService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridEditConstants","$log","$parse","uiGridEditService",function(a,b,c,d,e,f){return{priority:-100,restrict:"A",scope:!1,link:function(d,g){function h(){g.on("dblclick",m),g.on("keydown",k),d.col.colDef.enableCellEditOnFocus&&g.find("div").on("focus",j)}function i(){g.off("dblclick",m),g.off("keydown",k),d.col.colDef.enableCellEditOnFocus&&g.find("div").off("focus",j)}function j(a){a.stopPropagation(),m()}function k(a){f.isStartEditKey(a)&&m()}function l(a,b){return!b.isSaving&&(angular.isFunction(a.colDef.cellEditableCondition)?a.colDef.cellEditableCondition(d):a.colDef.cellEditableCondition)}function m(){if(l(d.col,d.row)){r=e(d.row.getQualifiedColField(d.col)),q=r(d),p=d.col.editableCellTemplate,p=p.replace(b.COL_FIELD,d.row.getQualifiedColField(d.col));var f=d.col.colDef.editDropdownFilter?"|"+d.col.colDef.editDropdownFilter:"";switch(p=p.replace(b.CUSTOM_FILTERS,f),d.inputType="text",d.col.colDef.type){case"boolean":d.inputType="checkbox";break;case"number":d.inputType="number";break;case"date":d.inputType="date"}d.editDropdownOptionsArray=d.col.colDef.editDropdownOptionsArray,d.editDropdownIdLabel=d.col.colDef.editDropdownIdLabel?d.col.colDef.editDropdownIdLabel:"id",d.editDropdownValueLabel=d.col.colDef.editDropdownValueLabel?d.col.colDef.editDropdownValueLabel:"value";var h;d.$apply(function(){s=!0,i(),h=a(p)(d.$new());var b=angular.element(g.children()[0]);t=b.hasClass(":focus"),b.addClass("ui-grid-cell-contents-hidden"),g.append(h)});var j=d.$on(b.events.GRID_SCROLL,function(){n(!0),d.grid.api.edit.raise.afterCellEdit(d.row.entity,d.col.colDef,r(d),q),j()}),k=d.$on(c.events.END_CELL_EDIT,function(a,b){n(b),d.grid.api.edit.raise.afterCellEdit(d.row.entity,d.col.colDef,r(d),q),k()}),m=d.$on(c.events.CANCEL_CELL_EDIT,function(){o(),m()});d.$broadcast(c.events.BEGIN_CELL_EDIT),d.grid.api.edit.raise.beginCellEdit(d.row.entity,d.col.colDef)}}function n(a){if(s){var b=angular.element(g.children()[0]);angular.element(g.children()[1]).remove(),b.removeClass("ui-grid-cell-contents-hidden"),a&&t&&b.focus(),t=!1,s=!1,h()}}function o(){s&&(r.assign(d,q),d.$apply(),d.grid.api.edit.raise.cancelCellEdit(d.row.entity,d.col.colDef),n(!0))}if(d.col.colDef.enableCellEdit){var p,q,r,s=!1,t=!1;h()}}}}]),a.directive("uiGridEditor",["uiGridConstants","uiGridEditConstants",function(a,b){return{scope:!0,compile:function(){return{pre:function(){},post:function(c,d){c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].select(),d.on("blur",function(a){c.stopEdit(a)})}),c.deepEdit=!1,c.stopEdit=function(a){c.inputForm&&!c.inputForm.$valid?(a.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT)):c.$emit(b.events.END_CELL_EDIT),c.deepEdit=!1},d.on("click",function(){c.deepEdit=!0}),d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT);break;case a.keymap.ENTER:c.stopEdit(d);break;case a.keymap.TAB:c.stopEdit(d)}if(c.deepEdit)switch(d.keyCode){case a.keymap.LEFT:d.stopPropagation();break;case a.keymap.RIGHT:d.stopPropagation();break;case a.keymap.UP:d.stopPropagation();break;case a.keymap.DOWN:d.stopPropagation()}return!0})}}}}}]),a.directive("input",["$filter",function(a){function b(a){if("undefined"==typeof a||""===a)return null;var b=a.split("-");if(3!==b.length)return null;var c=parseInt(b[0],10),d=parseInt(b[1],10),e=parseInt(b[2],10);return 1>d||1>c||1>e?null:new Date(c,d-1,e)}return{restrict:"E",require:"?ngModel",link:function(c,d,e,f){2===angular.version.minor&&e.type&&"date"===e.type&&f&&(f.$formatters.push(function(b){return f.$setValidity(null,!b||!isNaN(b.getTime())),a("date")(b,"yyyy-MM-dd")}),f.$parsers.push(function(a){if(a&&a.length>0){var c=b(a);return f.$setValidity(null,c&&!isNaN(c.getTime())),c}return f.$setValidity(null,!0),null}))}}}]),a.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants",function(a,b){return{scope:!0,compile:function(){return{pre:function(){},post:function(c,d){c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].style.width=d[0].parentElement.offsetWidth-1+"px",d.on("blur",function(a){c.stopEdit(a)})}),c.stopEdit=function(){c.$emit(b.events.END_CELL_EDIT)},d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT);break;case a.keymap.ENTER:c.stopEdit(d);break;case a.keymap.LEFT:c.stopEdit(d);break;case a.keymap.RIGHT:c.stopEdit(d);break;case a.keymap.UP:d.stopPropagation();break;case a.keymap.DOWN:d.stopPropagation();break;case a.keymap.TAB:c.stopEdit(d)}return!0})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.expandable",["ui.grid"]);a.service("uiGridExpandableService",["gridUtil","$log","$compile",function(){var a={initializeGrid:function(b){var c={events:{expandable:{rowExpandedStateChanged:function(){}}},methods:{expandable:{toggleRowExpansion:function(c){var d=b.getRow(c);null!==d&&a.toggleRowExpansion(b,d)},expandAllRows:function(){a.expandAllRows(b)},collapseAllRows:function(){a.collapseAllRows(b)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods)},toggleRowExpansion:function(a,b){b.isExpanded=!b.isExpanded,b.height=b.isExpanded?b.grid.options.rowHeight+a.options.expandable.expandableRowHeight:b.grid.options.rowHeight,a.api.expandable.raise.rowExpandedStateChanged(b)},expandAllRows:function(b){angular.forEach(b.renderContainers.body.visibleRowCache,function(c){c.isExpanded||a.toggleRowExpansion(b,c)}),b.refresh()},collapseAllRows:function(b){angular.forEach(b.renderContainers.body.visibleRowCache,function(c){c.isExpanded&&a.toggleRowExpansion(b,c)}),b.refresh()}};return a}]),a.directive("uiGridExpandable",["$log","uiGridExpandableService","$templateCache",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,d,e,f){var g={name:"expandableButtons",width:40}; -g.cellTemplate=c.get("ui-grid/expandableRowHeader"),f.grid.addRowHeaderColumn(g),b.initializeGrid(f.grid)},post:function(){}}}}}]),a.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$log","$compile","uiGridConstants","gridUtil","$interval",function(a,b,c,d,e,f){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(a,b){f.getTemplate(a.grid.options.expandable.rowExpandableTemplate).then(function(c){var e=d(c)(a);b.append(e),a.row.expandedRendered=!0})},post:function(a){a.$on("$destroy",function(){a.row.expandedRendered=!1})}}}}}]),a.directive("uiGridRow",["$compile","$log","$templateCache",function(){return{priority:-200,scope:!1,compile:function(){return{pre:function(a){a.expandableRow={},a.expandableRow.shouldRenderExpand=function(){var b="body"===a.colContainer.name&&a.row.isExpanded&&(!a.grid.isScrollingVertically||a.row.expandedRendered);return b},a.expandableRow.shouldRenderFiller=function(){var b=a.row.isExpanded&&("body"!==a.colContainer.name||a.grid.isScrollingVertically&&!a.row.expandedRendered);return b}},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","$log","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]),d=c.get("ui-grid/expandableScrollFiller"),e=c.get("ui-grid/expandableRow");return b.append(e),b.append(d),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.exporter",["ui.grid"]);a.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",LINK_LABEL:"LINK_LABEL",BUTTON_LABEL:"BUTTON_LABEL"}),a.service("uiGridExporterService",["$log","$q","uiGridExporterConstants","gridUtil","$compile",function(a,b,c,d,e){var f={initializeGrid:function(a){a.exporter={},this.defaultGridOptions(a.options);var b={events:{exporter:{}},methods:{exporter:{csvExport:function(b,c,d){f.csvExport(a,b,c,d)},pdfExport:function(b,c){f.pdfExport(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.exporterSuppressButton=a.exporterSuppressButton===!0,a.exporterLinkTemplate=a.exporterLinkTemplate?a.exporterLinkTemplate:"ui-grid/csvLink",a.exporterHeaderTemplate=a.exporterHeaderTemplate?a.exporterHeaderTemplate:"ui-grid/exporterHeader",a.exporterLinkLabel=a.exporterLinkLabel?a.exporterLinkLabel:"Download CSV",a.exporterButtonLabel=a.exporterButtonLabel?a.exporterButtonLabel:"Export",a.exporterPdfDefaultStyle=a.exporterPdfDefaultStyle?a.exporterPdfDefaultStyle:{fontSize:11},a.exporterPdfTableStyle=a.exporterPdfTableStyle?a.exporterPdfTableStyle:{margin:[0,5,0,15]},a.exporterPdfTableHeaderStyle=a.exporterPdfTableHeaderStyle?a.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},a.exporterPdfOrientation=a.exporterPdfOrientation?a.exporterPdfOrientation:"landscape",a.exporterPdfPageSize=a.exporterPdfPageSize?a.exporterPdfPageSize:"A4",a.exporterPdfMaxGridWidth=a.exporterPdfMaxGridWidth?a.exporterPdfMaxGridWidth:720},showMenu:function(a){a.exporter.$scope.menuItems=[{title:"Export all data as csv",action:function(){this.grid.api.exporter.csvExport(c.ALL,c.ALL)}},{title:"Export visible data as csv",action:function(){this.grid.api.exporter.csvExport(c.VISIBLE,c.VISIBLE)}},{title:"Export selected data as csv",action:function(){this.grid.api.exporter.csvExport(c.SELECTED,c.VISIBLE)}},{title:"Export all data as pdf",action:function(){this.grid.api.exporter.pdfExport(c.ALL,c.ALL)}},{title:"Export visible data as pdf",action:function(){this.grid.api.exporter.pdfExport(c.VISIBLE,c.VISIBLE)}},{title:"Export selected data as pdf",action:function(){this.grid.api.exporter.pdfExport(c.SELECTED,c.VISIBLE)}}],a.exporter.$scope.$broadcast("toggleExporterMenu")},csvExport:function(a,b,c,d){var e=this.getColumnHeaders(a,c),f=this.getData(a,b,c),g=this.formatAsCsv(e,f);this.renderCsvLink(a,g,d)},getColumnHeaders:function(a,b){var d=[];return angular.forEach(a.columns,function(a){(a.visible||b===c.ALL)&&d.push({name:a.field,displayName:a.displayName,width:a.drawnWidth?a.drawnWidth:a.width,align:"number"===a.colDef.type?"right":"left"})}),d},getData:function(b,d,e){var f,g=[];switch(d){case c.ALL:f=b.rows;break;case c.VISIBLE:f=b.getVisibleRows();break;case c.SELECTED:b.api.selection?f=b.api.selection.getSelectedGridRows():a.error("selection feature must be enabled to allow selected rows to be exported")}return c.ALL?(angular.forEach(f,function(a){var d=[];angular.forEach(b.columns,function(f){(f.visible||e===c.ALL)&&d.push(b.getCellValue(a,f))}),g.push(d)}),g):void 0},formatAsCsv:function(a,b){var c=this,d=a.map(function(a){return a.displayName}),e=c.formatRowAsCsv(this)(d)+"\n";return e+=b.map(this.formatRowAsCsv(this)).join("\n")},formatRowAsCsv:function(a){return function(b){return b.map(a.formatFieldAsCsv).join(",")}},formatFieldAsCsv:function(a){return null==a?"":"number"==typeof a?a:"boolean"==typeof a?a?"TRUE":"FALSE":"string"==typeof a?'"'+a.replace(/"/g,'""')+'"':JSON.stringify(a)},renderCsvLink:function(a,b,f){var g=f?f:angular.element(a.exporter.gridElm[0].querySelectorAll(".ui-grid-exporter-csv-link"));angular.element(g[0].querySelectorAll(".ui-grid-exporter-csv-link-span"))&&angular.element(g[0].querySelectorAll(".ui-grid-exporter-csv-link-span")).remove();d.getTemplate(a.options.exporterLinkTemplate).then(function(d){d=d.replace(c.LINK_LABEL,a.options.exporterLinkLabel),d=d.replace(c.CSV_CONTENT,encodeURIComponent(b));var f=angular.element(d),h=e(f)(a.exporter.$scope);g.append(h)})},pdfExport:function(a,b,c){var d=this.getColumnHeaders(a,c),e=this.getData(a,b,c),f=this.prepareAsPdf(a,d,e);pdfMake.createPdf(f).open()},prepareAsPdf:function(a,b,c){var d=this.calculatePdfHeaderWidths(a,b),e=b.map(function(a){return{text:a.displayName,style:"tableHeader"}}),f=c.map(this.formatRowAsPdf(this)),g=[e].concat(f),h={pageOrientation:a.options.exporterPdfOrientation,content:[{style:"tableStyle",table:{headerRows:1,widths:d,body:g}}],styles:{tableStyle:a.options.exporterPdfTableStyle,tableHeader:a.options.exporterPdfTableHeaderStyle},defaultStyle:a.options.exporterPdfDefaultStyle};return a.options.exporterPdfLayout&&(h.layout=a.options.exporterPdfLayout),h},calculatePdfHeaderWidths:function(a,b){var c=0;angular.forEach(b,function(a){"number"==typeof a.width&&(c+=a.width)});var d=0;angular.forEach(b,function(a){if("*"===a.width&&(d+=100),"string"==typeof a.width&&a.width.match(/(\d)*%/)){var b=parseInt(a.width.match(/(\d)*%/)[0]);a.width=c*b/100,d+=a.width}});var e=c+d;return b.map(function(b){return"*"===b.width?b.width:b.width*a.options.exporterPdfMaxGridWidth/e})},formatRowAsPdf:function(a){return function(b){return b.map(a.formatFieldAsPdfString)}},formatFieldAsPdfString:function(a){return null==a?"":"number"==typeof a?a.toString():"boolean"==typeof a?a?"TRUE":"FALSE":"string"==typeof a?a.replace(/"/g,'""'):JSON.stringify(a).replace(/^"/,"").replace(/"$/,"")}};return f}]),a.directive("uiGridExporter",["$log","uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,b,d,e){c.initializeGrid(e.grid),e.grid.exporter.$scope=a},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.infiniteScroll",["ui.grid"]);a.service("uiGridInfiniteScrollService",["gridUtil","$log","$compile","$timeout",function(){var a={initializeGrid:function(a){var b={events:{infiniteScroll:{needLoadMoreData:function(){}}},methods:{infiniteScroll:{dataLoaded:function(){a.options.loadTimout=!1}}}};a.options.loadTimout=!1,a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},loadData:function(a){a.api.infiniteScroll.raise.needLoadMoreData(),a.options.loadTimout=!0},checkScroll:function(a,b){var c=a.options.infiniteScrollPercentage?a.options.infiniteScrollPercentage:20;return!a.options.loadTimout&&c>=b?(this.loadData(a),!0):!1}};return a}]),a.directive("uiGridInfiniteScroll",["$log","uiGridInfiniteScrollService",function(a,b){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","$log","uiGridInfiniteScrollService","uiGridConstants",function(a,b,c,d){return{priority:-200,scope:!1,link:function(a){a.$on(d.events.GRID_SCROLL,function(b,d){var e=100-100*d.y.percentage;c.checkScroll(a.grid,e)})}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pinning",["ui.grid"]);a.config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"}}),a}])}]),a.service("uiGridPinningService",["$log","GridRenderContainer","i18nService",function(a,b,c){var d={initializeGrid:function(a){d.defaultGridOptions(a.options),a.registerColumnBuilder(d.pinningColumnBuilder)},defaultGridOptions:function(a){a.enablePinning=a.enablePinning!==!1},pinningColumnBuilder:function(a,b,d){if(a.enablePinning=void 0===a.enablePinning?d.enablePinning:a.enablePinning,a.pinnedLeft?(b.renderContainer="left",b.grid.createLeftContainer()):a.pinnedRight&&(b.renderContainer="right",b.grid.createRightContainer()),a.enablePinning){var e={title:c.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer="left",this.context.col.grid.createLeftContainer(),b.grid.refresh().then(function(){b.grid.refresh()})}},f={title:c.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer="right",this.context.col.grid.createRightContainer(),b.grid.refresh().then(function(){b.grid.refresh()})}},g={title:c.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer=null,b.grid.refresh().then(function(){b.grid.refresh()})}};b.menuItems.push(e),b.menuItems.push(f),b.menuItems.push(g)}}};return d}]),a.directive("uiGridPinning",["$log","uiGridPinningService",function(a,b){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.resizeColumns",["ui.grid"]);a.constant("columnBounds",{minWidth:35}),a.service("uiGridResizeColumnsService",["$log","$q",function(a,b){var c={defaultGridOptions:function(a){a.enableColumnResizing=a.enableColumnResizing!==!1,a.enableColumnResize===!1&&(a.enableColumnResizing=!1)},colResizerColumnBuilder:function(a,c,d){var e=[];return a.enableColumnResizing=void 0===a.enableColumnResizing?d.enableColumnResizing:a.enableColumnResizing,a.enableColumnResize===!1&&(a.enableColumnResizing=!1),b.all(e)}};return c}]),a.directive("uiGridResizeColumns",["$log","uiGridResizeColumnsService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.defaultGridOptions(e.grid.options),e.grid.registerColumnBuilder(b.colResizerColumnBuilder)},post:function(){}}}}}]),a.directive("uiGridHeaderCell",["$log","$templateCache","$compile","$q",function(a,b,c,d){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,e,f,g){if(g.grid.options.enableColumnResizing){var h=d.defer();f.$observe("renderIndex",function(b){a.renderIndex=a.$eval(b),h.resolve()}),h.promise.then(function(){var d=b.get("ui-grid/columnResizer"),f=angular.element(d).clone(),g=angular.element(d).clone();f.attr("position","left"),g.attr("position","right");var h=a.col,i=h.getRenderContainer(),j=i.renderedColumns[a.renderIndex-1];j&&0!==a.col.index&&j.colDef.enableColumnResizing!==!1&&e.prepend(f),a.col.colDef.enableColumnResizing!==!1&&e.append(g),c(f)(a),c(g)(a)})}}}}}}]),a.directive("uiGridColumnResizer",["$log","$document","gridUtil","uiGridConstants","columnBounds",function(a,b,c,d,e){var f=angular.element('
    '),g={priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(a,g,h,i){function j(a){var b=a.getRenderContainer();b.visibleColumnCache.forEach(function(b){if(b.index!==a.index){var c=b.colDef;(!c.width||angular.isString(c.width)&&(-1!==c.width.indexOf("*")||-1!==c.width.indexOf("%")))&&(c.width=b.drawnWidth)}})}function k(){i.grid.buildColumns().then(function(){i.grid.refreshCanvas(!0)})}function l(b){b.originalEvent&&(b=b.originalEvent),b.preventDefault(),o=b.clientX-p,0>o?o=0:o>i.grid.gridWidth&&(o=i.grid.gridWidth);var c,g=a.col,h=g.getRenderContainer();if("left"===a.position?(g=h.renderedColumns[a.renderIndex-1],c=a.col):"right"===a.position&&(c=h.renderedColumns[a.renderIndex+1]),g.colDef.enableColumnResizing!==!1){i.grid.element.hasClass("column-resizing")||i.grid.element.addClass("column-resizing");var j=o-n,k=g.drawnWidth+j;g.colDef.minWidth&&kg.colDef.maxWidth&&(o+=g.colDef.maxWidth-k),f.css({left:o+"px"}),i.fireEvent(d.events.ITEM_DRAGGING)}}function m(c){c.originalEvent&&(c=c.originalEvent),c.preventDefault(),i.grid.element.removeClass("column-resizing"),f.remove(),o=c.clientX-p;var d=o-n;if(0===d)return b.off("mouseup",m),void b.off("mousemove",l);var g,h=a.col,q=h.getRenderContainer();if("left"===a.position?(h=q.renderedColumns[a.renderIndex-1],g=a.col):"right"===a.position&&(g=q.renderedColumns[a.renderIndex+1]),h.colDef.enableColumnResizing!==!1){var r=h.drawnWidth+d;h.colDef.minWidth&&rh.colDef.maxWidth&&(r=h.colDef.maxWidth),h.colDef.width=r,j(h),k(d),b.off("mouseup",m),b.off("mousemove",l)}}var n=0,o=0,p=0;"left"===a.position?g.addClass("left"):"right"===a.position&&g.addClass("right"),g.on("mousedown",function(a){a.originalEvent&&(a=a.originalEvent),a.stopPropagation(),p=i.grid.element[0].getBoundingClientRect().left,n=a.clientX-p,i.grid.element.append(f),f.css({left:n}),b.on("mouseup",m),b.on("mousemove",l)}),g.on("dblclick",function(b){b.stopPropagation();var f,h,i=a.col,l=i.getRenderContainer();"left"===a.position?(i=l.renderedColumns[a.renderIndex-1],f=a.col,h=1):"right"===a.position&&(f=l.renderedColumns[a.renderIndex+1],f=l.renderedColumns[a.renderIndex+1],h=-1);var m=0,n=0,o=c.closestElm(g,".ui-grid-render-container"),p=o.querySelectorAll("."+d.COL_CLASS_PREFIX+i.index+" .ui-grid-cell-contents");Array.prototype.forEach.call(p,function(a){var b;angular.element(a).parent().hasClass("ui-grid-header-cell")&&(b=angular.element(a).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),c.fakeElement(a,{},function(a){var d=angular.element(a);d.attr("style","float: left");var e=c.elementWidth(d);if(b){var f=c.elementWidth(b);e+=f}e>m&&(m=e,n=m-e)})}),i.colDef.minWidth&&mi.colDef.maxWidth&&(m=i.colDef.maxWidth),i.colDef.width=m,j(i),k(n)}),g.on("$destroy",function(){g.off("mousedown"),g.off("dblclick"),b.off("mousemove",l),b.off("mouseup",m)})}};return g}])}(),function(){"use strict";var a=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);a.constant("uiGridRowEditConstants",{}),a.service("uiGridRowEditService",["$interval","$log","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(a,b,c){var d={initializeGrid:function(a,b){var c={events:{rowEdit:{saveRow:function(){}}},methods:{rowEdit:{setSavePromise:function(a,b,c){d.setSavePromise(a,b,c)},getDirtyRows:function(a){return a.rowEditDirtyRows},getErrorRows:function(a){return a.rowEditErrorRows},flushDirtyRows:function(a){return d.flushDirtyRows(a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.api.core.on.renderingComplete(a,function(){b.api.edit.on.afterCellEdit(a,d.endEditCell),b.api.edit.on.beginCellEdit(a,d.beginEditCell),b.api.edit.on.cancelCellEdit(a,d.cancelEditCell),b.api.cellNav&&b.api.cellNav.on.navigate(a,d.navigate)})},defaultGridOptions:function(){},saveRow:function(a,c){var d=this;return function(){c.isSaving=!0;var e=a.api.rowEdit.raise.saveRow(c.entity);return c.rowEditSavePromise?c.rowEditSavePromise.then(d.processSuccessPromise(a,c),d.processErrorPromise(a,c)):b.log("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),e}},setSavePromise:function(a,b,c){var d=a.getRow(b);d.rowEditSavePromise=c},processSuccessPromise:function(a,b){var c=this;return function(){delete b.isSaving,delete b.isDirty,delete b.isError,delete b.rowEditSaveTimer,c.removeRow(a.rowEditErrorRows,b),c.removeRow(a.rowEditDirtyRows,b)}},processErrorPromise:function(a,b){return function(){delete b.isSaving,delete b.rowEditSaveTimer,b.isError=!0,a.rowEditErrorRows||(a.rowEditErrorRows=[]),a.rowEditErrorRows.push(b)}},removeRow:function(a,b){angular.forEach(a,function(c,d){c.uid===b.uid&&a.splice(d,1)})},flushDirtyRows:function(a){var b=[];return angular.forEach(a.rowEditDirtyRows,function(c){d.saveRow(a,c)(),b.push(c.rowEditSavePromise)}),c.all(b)},endEditCell:function(a,c,e,f){var g=this.grid,h=g.getRow(a);return h?void((e!==f||h.isDirty)&&(g.rowEditDirtyRows||(g.rowEditDirtyRows=[]),h.isDirty||(h.isDirty=!0,g.rowEditDirtyRows.push(h)),delete h.isError,d.considerSetTimer(g,h))):void b.log("Unable to find rowEntity in grid data, dirty flag cannot be set")},beginEditCell:function(a){var c=this.grid,e=c.getRow(a);return e?void d.cancelTimer(c,e):void b.log("Unable to find rowEntity in grid data, timer cannot be cancelled")},cancelEditCell:function(a){var c=this.grid,e=c.getRow(a);return e?void d.considerSetTimer(c,e):void b.log("Unable to find rowEntity in grid data, timer cannot be set")},navigate:function(a,b){var c=this.grid;a.row.rowEditSaveTimer&&d.cancelTimer(c,a.row),b&&b.row&&b.row!==a.row&&d.considerSetTimer(c,b.row)},considerSetTimer:function(b,c){if(d.cancelTimer(b,c),c.isDirty&&!c.isSaving){var e=b.options.rowEditWaitInterval?b.options.rowEditWaitInterval:2e3;c.rowEditSaveTimer=a(d.saveRow(b,c),e,1)}},cancelTimer:function(b,c){c.rowEditSaveTimer&&!c.isSaving&&(a.cancel(c.rowEditSaveTimer),delete c.rowEditSaveTimer)}};return d}]),a.directive("uiGridRowEdit",["$log","uiGridRowEditService","uiGridEditConstants",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","$log","$parse",function(){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]);return b.attr("ng-class","{'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}"),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.selection",["ui.grid"]);a.constant("uiGridSelectionConstants",{featureName:"selection"}),a.service("uiGridSelectionService",["$log","$q","$templateCache","uiGridSelectionConstants","gridUtil",function(){var a={initializeGrid:function(b){b.selection={},b.selection.lastSelectedRow=null,a.defaultGridOptions(b.options);var c={events:{selection:{rowSelectionChanged:function(){}}},methods:{selection:{toggleRowSelection:function(c){var d=b.getRow(c);null!==d&&a.toggleRowSelection(b,d,b.options.multiSelect)},selectRow:function(c){var d=b.getRow(c);null===d||d.isSelected||a.toggleRowSelection(b,d,b.options.multiSelect)},unSelectRow:function(c){var d=b.getRow(c);null!==d&&d.isSelected&&a.toggleRowSelection(b,d,b.options.multiSelect)},selectAllRows:function(){b.options.multiSelect!==!1&&b.rows.forEach(function(a){a.isSelected=!0})},selectAllVisibleRows:function(){b.options.multiSelect!==!1&&b.rows.forEach(function(a){a.isSelected=a.visible?!0:!1})},clearSelectedRows:function(){a.clearSelectedRows(b)},getSelectedRows:function(){return a.getSelectedRows(b).map(function(a){return a.entity})},getSelectedGridRows:function(){return a.getSelectedRows(b)},setMultiSelect:function(a){b.options.multiSelect=a}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableRowSelection=a.enableRowSelection!==!1,a.multiSelect=a.multiSelect!==!1,a.enableRowHeaderSelection=a.enableRowHeaderSelection!==!1},toggleRowSelection:function(b,c,d){var e=c.isSelected;d||e||a.clearSelectedRows(b),c.isSelected=!e,c.isSelected===!0&&(b.selection.lastSelectedRow=c),b.api.selection.raise.rowSelectionChanged(c)},shiftSelect:function(b,c,d){if(d){var e=a.getSelectedRows(b),f=e.length>0?b.renderContainers.body.visibleRowCache.indexOf(b.selection.lastSelectedRow):0,g=b.renderContainers.body.visibleRowCache.indexOf(c);if(f>g){var h=f;f=g,g=h}for(var i=f;g>=i;i++){var j=b.renderContainers.body.visibleRowCache[i];j&&(j.isSelected=!0,b.selection.lastSelectedRow=j,b.api.selection.raise.rowSelectionChanged(j))}}},getSelectedRows:function(a){return a.rows.filter(function(a){return a.isSelected})},clearSelectedRows:function(b){a.getSelectedRows(b).forEach(function(a){a.isSelected=!1,b.api.selection.raise.rowSelectionChanged(a)})}};return a}]),a.directive("uiGridSelection",["$log","uiGridSelectionConstants","uiGridSelectionService","$templateCache",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,b,d,e){if(c.initializeGrid(e.grid),e.grid.options.enableRowHeaderSelection){var f="ui-grid/selectionRowHeader",g={name:"selectionRowHeaderCol",displayName:"",width:30,cellTemplate:f};e.grid.addRowHeaderColumn(g)}},post:function(){}}}}}]),a.directive("uiGridSelectionRowHeaderButtons",["$log","$templateCache","uiGridSelectionService",function(a,b,c){return{replace:!0,restrict:"E",template:b.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,b,d,e){var f=e.grid;a.selectButtonClick=function(a,b){b.shiftKey?c.shiftSelect(f,a,f.options.multiSelect):c.toggleRowSelection(f,a,f.options.multiSelect)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","$log","$parse","uiGridSelectionService",function(){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]);return b.attr("ng-class","{'ui-grid-row-selected': row.isSelected}"),{pre:function(){},post:function(){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","$log","$parse","uiGridSelectionService",function(a,b,c,d,e,f){return{priority:-200,restrict:"A",scope:!1,link:function(a,b){function c(){b.on("click",function(b){b.shiftKey?f.shiftSelect(a.grid,a.row,a.grid.options.multiSelect):f.toggleRowSelection(a.grid,a.row,a.grid.options.multiSelect),a.$apply()})}a.grid.options.enableRowSelection&&!a.grid.options.enableRowHeaderSelection&&(b.addClass("ui-grid-disable-selection"),c())}}}])}(),angular.module("ui.grid").run(["$templateCache",function(a){"use strict";a.put("ui-grid/ui-grid-footer",''),a.put("ui-grid/ui-grid-group-panel",'
    • {{group.displayName}} x
    '),a.put("ui-grid/ui-grid-header",'
    '),a.put("ui-grid/ui-grid-no-header",'
    '),a.put("ui-grid/ui-grid-row",'
    '),a.put("ui-grid/ui-grid",'
    '),a.put("ui-grid/uiGridCell",'
    {{COL_FIELD CUSTOM_FILTERS}}
    '),a.put("ui-grid/uiGridColumnFilter",'
  •  
     
  • '),a.put("ui-grid/uiGridColumnMenu",'
    '),a.put("ui-grid/uiGridFooterCell",'
    {{ col.getAggregationValue() }}
    '),a.put("ui-grid/uiGridHeaderCell",'
     
    {{ col.displayName CUSTOM_FILTERS }}  
     
     
    '),a.put("ui-grid/uiGridMenu",'
    '),a.put("ui-grid/uiGridMenuItem",'
  • {{ title }}
  • '),a.put("ui-grid/uiGridRenderContainer",'
    '),a.put("ui-grid/uiGridViewport",'
    '),a.put("ui-grid/cellEditor",'
    '),a.put("ui-grid/dropdownEditor",'
    '),a.put("ui-grid/expandableRow",'
    '),a.put("ui-grid/expandableRowHeader",'
    '),a.put("ui-grid/expandableScrollFiller",'
    '),a.put("ui-grid/csvLink",'LINK_LABEL'),a.put("ui-grid/columnResizer",'
    '),a.put("ui-grid/selectionRowHeader",'
    '),a.put("ui-grid/selectionRowHeaderButtons",'
     
    ') -}]); \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/designer/lib/ui-grid-unstable.js b/src/main/resources/META-INF/resources/designer/lib/ui-grid-unstable.js deleted file mode 100644 index 6bec9360..00000000 --- a/src/main/resources/META-INF/resources/designer/lib/ui-grid-unstable.js +++ /dev/null @@ -1,18014 +0,0 @@ -/*! ui-grid - v3.0.0-rc.16-234dd76 - 2014-11-22 -* Copyright (c) 2014 ; License: MIT */ -(function () { - 'use strict'; - angular.module('ui.grid.i18n', []); - angular.module('ui.grid', ['ui.grid.i18n']); -})(); -(function () { - 'use strict'; - angular.module('ui.grid').constant('uiGridConstants', { - LOG_DEBUG_MESSAGES: true, - LOG_WARN_MESSAGES: true, - LOG_ERROR_MESSAGES: true, - CUSTOM_FILTERS: /CUSTOM_FILTERS/g, - COL_FIELD: /COL_FIELD/g, - MODEL_COL_FIELD: /MODEL_COL_FIELD/g, - DISPLAY_CELL_TEMPLATE: /DISPLAY_CELL_TEMPLATE/g, - TEMPLATE_REGEXP: /<.+>/, - FUNC_REGEXP: /(\([^)]*\))?$/, - DOT_REGEXP: /\./g, - APOS_REGEXP: /'/g, - BRACKET_REGEXP: /^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/, - COL_CLASS_PREFIX: 'ui-grid-col', - events: { - GRID_SCROLL: 'uiGridScroll', - COLUMN_MENU_SHOWN: 'uiGridColMenuShown', - ITEM_DRAGGING: 'uiGridItemDragStart' // For any item being dragged - }, - // copied from http://www.lsauer.com/2011/08/javascript-keymap-keycodes-in-json.html - keymap: { - TAB: 9, - STRG: 17, - CTRL: 17, - CTRLRIGHT: 18, - CTRLR: 18, - SHIFT: 16, - RETURN: 13, - ENTER: 13, - BACKSPACE: 8, - BCKSP: 8, - ALT: 18, - ALTR: 17, - ALTRIGHT: 17, - SPACE: 32, - WIN: 91, - MAC: 91, - FN: null, - UP: 38, - DOWN: 40, - LEFT: 37, - RIGHT: 39, - ESC: 27, - DEL: 46, - F1: 112, - F2: 113, - F3: 114, - F4: 115, - F5: 116, - F6: 117, - F7: 118, - F8: 119, - F9: 120, - F10: 121, - F11: 122, - F12: 123 - }, - ASC: 'asc', - DESC: 'desc', - filter: { - STARTS_WITH: 2, - ENDS_WITH: 4, - EXACT: 8, - CONTAINS: 16, - GREATER_THAN: 32, - GREATER_THAN_OR_EQUAL: 64, - LESS_THAN: 128, - LESS_THAN_OR_EQUAL: 256, - NOT_EQUAL: 512 - }, - - aggregationTypes: { - sum: 2, - count: 4, - avg: 8, - min: 16, - max: 32 - }, - - // TODO(c0bra): Create full list of these somehow. NOTE: do any allow a space before or after them? - CURRENCY_SYMBOLS: ['ƒ', '$', '£', '$', '¤', '¥', '៛', '₩', '₱', '฿', '₫'], - - dataChange: { - ALL: 'all', - EDIT: 'edit', - ROW: 'row', - COLUMN: 'column' - }, - scrollbars: { - NEVER: 0, - ALWAYS: 1, - WHEN_NEEDED: 2 - } - }); - -})(); -angular.module('ui.grid').directive('uiGridCell', ['$compile', '$parse', 'gridUtil', 'uiGridConstants', function ($compile, $parse, gridUtil, uiGridConstants) { - var uiGridCell = { - priority: 0, - scope: false, - require: '?^uiGrid', - compile: function() { - return { - pre: function($scope, $elm, $attrs, uiGridCtrl) { - function compileTemplate() { - var compiledElementFn = $scope.col.compiledElementFn; - - compiledElementFn($scope, function(clonedElement, scope) { - $elm.append(clonedElement); - }); - } - - // If the grid controller is present, use it to get the compiled cell template function - if (uiGridCtrl && $scope.col.compiledElementFn) { - compileTemplate(); - } - // No controller, compile the element manually (for unit tests) - else { - if ( uiGridCtrl && !$scope.col.compiledElementFn ){ - // gridUtil.logError('Render has been called before precompile. Please log a ui-grid issue'); - - $scope.col.getCompiledElementFn() - .then(function (compiledElementFn) { - compiledElementFn($scope, function(clonedElement, scope) { - $elm.append(clonedElement); - }); - }); - } - else { - var html = $scope.col.cellTemplate - .replace(uiGridConstants.MODEL_COL_FIELD, 'row.entity.' + gridUtil.preEval($scope.col.field)) - .replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)'); - - var cellElement = $compile(html)($scope); - $elm.append(cellElement); - } - } - }, - post: function($scope, $elm, $attrs, uiGridCtrl) { - $elm.addClass($scope.col.getColClass(false)); - - var classAdded; - var updateClass = function( grid ){ - var contents = $elm; - if ( classAdded ){ - contents.removeClass( classAdded ); - classAdded = null; - } - - if (angular.isFunction($scope.col.cellClass)) { - classAdded = $scope.col.cellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex); - } - else { - classAdded = $scope.col.cellClass; - } - contents.addClass(classAdded); - }; - - if ($scope.col.cellClass) { - updateClass(); - } - - // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs - var watchUid = $scope.grid.registerDataChangeCallback( updateClass, [uiGridConstants.dataChange.COLUMN, uiGridConstants.dataChange.EDIT]); - - var deregisterFunction = function() { - $scope.grid.deregisterDataChangeCallback( watchUid ); - }; - - $scope.$on( '$destroy', deregisterFunction ); - } - }; - } - }; - - return uiGridCell; -}]); - - -(function(){ - -angular.module('ui.grid') -.service('uiGridColumnMenuService', [ 'i18nService', 'uiGridConstants', 'gridUtil', -function ( i18nService, uiGridConstants, gridUtil ) { -/** - * @ngdoc service - * @name ui.grid.service:uiGridColumnMenuService - * - * @description Services for working with column menus, factored out - * to make the code easier to understand - */ - - var service = { - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name initialize - * @description Sets defaults, puts a reference to the $scope on - * the uiGridController - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * @param {controller} uiGridCtrl the uiGridController for the grid - * we're on - * - */ - initialize: function( $scope, uiGridCtrl ){ - $scope.grid = uiGridCtrl.grid; - - // Store a reference to this link/controller in the main uiGrid controller - // to allow showMenu later - uiGridCtrl.columnMenuScope = $scope; - - // Save whether we're shown or not so the columns can check - $scope.menuShown = false; - }, - - - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name setColMenuItemWatch - * @description Setup a watch on $scope.col.menuItems, and update - * menuItems based on this. $scope.col needs to be set by the column - * before calling the menu. - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * @param {controller} uiGridCtrl the uiGridController for the grid - * we're on - * - */ - setColMenuItemWatch: function ( $scope ){ - var deregFunction = $scope.$watch('col.menuItems', function (n, o) { - if (typeof(n) !== 'undefined' && n && angular.isArray(n)) { - n.forEach(function (item) { - if (typeof(item.context) === 'undefined' || !item.context) { - item.context = {}; - } - item.context.col = $scope.col; - }); - - $scope.menuItems = $scope.defaultMenuItems.concat(n); - } - else { - $scope.menuItems = $scope.defaultMenuItems; - } - }); - - $scope.$on( '$destroy', deregFunction ); - }, - - - /** - * @ngdoc boolean - * @name enableSorting - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description (optional) True by default. When enabled, this setting adds sort - * widgets to the column header, allowing sorting of the data in the individual column. - */ - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name sortable - * @description determines whether this column is sortable - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * - */ - sortable: function( $scope ) { - if ( $scope.grid.options.enableSorting && typeof($scope.col) !== 'undefined' && $scope.col && $scope.col.enableSorting) { - return true; - } - else { - return false; - } - }, - - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name isActiveSort - * @description determines whether the requested sort direction is current active, to - * allow highlighting in the menu - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * @param {string} direction the direction that we'd have selected for us to be active - * - */ - isActiveSort: function( $scope, direction ){ - return (typeof($scope.col) !== 'undefined' && typeof($scope.col.sort) !== 'undefined' && - typeof($scope.col.sort.direction) !== 'undefined' && $scope.col.sort.direction === direction); - - }, - - /** - * @ngdoc boolean - * @name suppressRemoveSort - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description (optional) False by default. When enabled, this setting hides the removeSort option - * in the menu. - */ - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name suppressRemoveSort - * @description determines whether we should suppress the removeSort option - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * - */ - suppressRemoveSort: function( $scope ) { - if ($scope.col && $scope.col.colDef && $scope.col.colDef.suppressRemoveSort) { - return true; - } - else { - return false; - } - }, - - - /** - * @ngdoc boolean - * @name enableHiding - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description (optional) True by default. When set to false, this setting prevents a user from hiding the column - * using the column menu or the grid menu. - */ - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name hideable - * @description determines whether a column can be hidden, by checking the enableHiding columnDef option - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * - */ - hideable: function( $scope ) { - if (typeof($scope.col) !== 'undefined' && $scope.col && $scope.col.colDef && $scope.col.colDef.enableHiding === false ) { - return false; - } - else { - return true; - } - }, - - - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name getDefaultMenuItems - * @description returns the default menu items for a column menu - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * - */ - getDefaultMenuItems: function( $scope ){ - return [ - { - title: i18nService.getSafeText('sort.ascending'), - icon: 'ui-grid-icon-sort-alt-up', - action: function($event) { - $event.stopPropagation(); - $scope.sortColumn($event, uiGridConstants.ASC); - }, - shown: function () { - return service.sortable( $scope ); - }, - active: function() { - return service.isActiveSort( $scope, uiGridConstants.ASC); - } - }, - { - title: i18nService.getSafeText('sort.descending'), - icon: 'ui-grid-icon-sort-alt-down', - action: function($event) { - $event.stopPropagation(); - $scope.sortColumn($event, uiGridConstants.DESC); - }, - shown: function() { - return service.sortable( $scope ); - }, - active: function() { - return service.isActiveSort( $scope, uiGridConstants.DESC); - } - }, - { - title: i18nService.getSafeText('sort.remove'), - icon: 'ui-grid-icon-cancel', - action: function ($event) { - $event.stopPropagation(); - $scope.unsortColumn(); - }, - shown: function() { - return service.sortable( $scope ) && - typeof($scope.col) !== 'undefined' && (typeof($scope.col.sort) !== 'undefined' && - typeof($scope.col.sort.direction) !== 'undefined') && $scope.col.sort.direction !== null && - !service.suppressRemoveSort( $scope ); - } - }, - { - title: i18nService.getSafeText('column.hide'), - icon: 'ui-grid-icon-cancel', - shown: function() { - return service.hideable( $scope ); - }, - action: function ($event) { - $event.stopPropagation(); - $scope.hideColumn(); - } - } - ]; - }, - - - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name getColumnElementPosition - * @description gets the position information needed to place the column - * menu below the column header - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * @param {GridCol} column the column we want to position below - * @param {element} $columnElement the column element we want to position below - * @returns {hash} containing left, top, offset, height, width - * - */ - getColumnElementPosition: function( $scope, column, $columnElement ){ - var positionData = {}; - positionData.left = $columnElement[0].offsetLeft; - positionData.top = $columnElement[0].offsetTop; - - // Get the grid scrollLeft - positionData.offset = 0; - if (column.grid.options.offsetLeft) { - positionData.offset = column.grid.options.offsetLeft; - } - - positionData.height = gridUtil.elementHeight($columnElement, true); - positionData.width = gridUtil.elementWidth($columnElement, true); - - return positionData; - }, - - - /** - * @ngdoc method - * @methodOf ui.grid.service:uiGridColumnMenuService - * @name repositionMenu - * @description Reposition the menu below the new column. If the menu has no child nodes - * (i.e. it's not currently visible) then we guess it's width at 100, we'll be called again - * later to fix it - * @param {$scope} $scope the $scope from the uiGridColumnMenu - * @param {GridCol} column the column we want to position below - * @param {hash} positionData a hash containing left, top, offset, height, width - * @param {element} $elm the column menu element that we want to reposition - * @param {element} $columnElement the column element that we want to reposition underneath - * - */ - repositionMenu: function( $scope, column, positionData, $elm, $columnElement ) { - var menu = $elm[0].querySelectorAll('.ui-grid-menu'); - var containerId = column.renderContainer ? column.renderContainer : 'body'; - var renderContainer = column.grid.renderContainers[containerId]; - - // It's possible that the render container of the column we're attaching to is - // offset from the grid (i.e. pinned containers), we need to get the difference in the offsetLeft - // between the render container and the grid - var renderContainerElm = gridUtil.closestElm($columnElement, '.ui-grid-render-container'); - var renderContainerOffset = renderContainerElm.getBoundingClientRect().left - $scope.grid.element[0].getBoundingClientRect().left; - - var containerScrollLeft = renderContainerElm.querySelectorAll('.ui-grid-viewport')[0].scrollLeft; - - // default value the last width for _this_ column, otherwise last width for _any_ column, otherwise default to 170 - var myWidth = column.lastMenuWidth ? column.lastMenuWidth : ( $scope.lastMenuWidth ? $scope.lastMenuWidth : 170); - var paddingRight = column.lastMenuPaddingRight ? column.lastMenuPaddingRight : ( $scope.lastMenuPaddingRight ? $scope.lastMenuPaddingRight : 10); - - if ( menu.length !== 0 ){ - var mid = menu[0].querySelectorAll('.ui-grid-menu-mid'); - if ( mid.length !== 0 && !angular.element(mid).hasClass('ng-hide') ) { - myWidth = gridUtil.elementWidth(menu, true); - $scope.lastMenuWidth = myWidth; - column.lastMenuWidth = myWidth; - - // TODO(c0bra): use padding-left/padding-right based on document direction (ltr/rtl), place menu on proper side - // Get the column menu right padding - paddingRight = parseInt(gridUtil.getStyles(angular.element(menu)[0])['paddingRight'], 10); - $scope.lastMenuPaddingRight = paddingRight; - column.lastMenuPaddingRight = paddingRight; - } - } - - var left = positionData.left + renderContainerOffset - containerScrollLeft + positionData.width - myWidth + paddingRight; - if (left < positionData.offset){ - left = positionData.offset; - } - - $elm.css('left', left + 'px'); - $elm.css('top', (positionData.top + positionData.height) + 'px'); - } - - }; - - return service; -}]) - - -.directive('uiGridColumnMenu', ['$timeout', 'gridUtil', 'uiGridConstants', 'uiGridColumnMenuService', -function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService) { -/** - * @ngdoc directive - * @name ui.grid.directive:uiGridColumnMenu - * @description Provides the column menu framework, leverages uiGridMenu underneath - * - */ - - var uiGridColumnMenu = { - priority: 0, - scope: true, - require: '?^uiGrid', - templateUrl: 'ui-grid/uiGridColumnMenu', - replace: true, - link: function ($scope, $elm, $attrs, uiGridCtrl) { - var self = this; - - uiGridColumnMenuService.initialize( $scope, uiGridCtrl ); - - $scope.defaultMenuItems = uiGridColumnMenuService.getDefaultMenuItems( $scope ); - - // Set the menu items for use with the column menu. The user can later add additional items via the watch - $scope.menuItems = $scope.defaultMenuItems; - uiGridColumnMenuService.setColMenuItemWatch( $scope ); - - - /** - * @ngdoc method - * @methodOf ui.grid.directive:uiGridColumnMenu - * @name showMenu - * @description Shows the column menu. If the menu is already displayed it - * calls the menu to ask it to hide (it will animate), then it repositions the menu - * to the right place whilst hidden (it will make an assumption on menu width), - * then it asks the menu to show (it will animate), then it repositions the menu again - * once we can calculate it's size. - * @param {GridCol} column the column we want to position below - * @param {element} $columnElement the column element we want to position below - */ - $scope.showMenu = function(column, $columnElement, event) { - // Swap to this column - $scope.col = column; - - // Get the position information for the column element - var colElementPosition = uiGridColumnMenuService.getColumnElementPosition( $scope, column, $columnElement ); - - if ($scope.menuShown) { - // we want to hide, then reposition, then show, but we want to wait for animations - // we set a variable, and then rely on the menu-hidden event to call the reposition and show - $scope.colElement = $columnElement; - $scope.colElementPosition = colElementPosition; - $scope.hideThenShow = true; - - $scope.$broadcast('hide-menu', { originalEvent: event }); - } else { - self.shown = $scope.menuShown = true; - uiGridColumnMenuService.repositionMenu( $scope, column, colElementPosition, $elm, $columnElement ); - - $scope.colElement = $columnElement; - $scope.colElementPosition = colElementPosition; - $scope.$broadcast('show-menu', { originalEvent: event }); - } - - }; - - - /** - * @ngdoc method - * @methodOf ui.grid.directive:uiGridColumnMenu - * @name hideMenu - * @description Hides the column menu. - * @param {boolean} broadcastTrigger true if we were triggered by a broadcast - * from the menu itself - in which case don't broadcast again as we'll get - * an infinite loop - */ - $scope.hideMenu = function( broadcastTrigger ) { - // delete $scope.col; - $scope.menuShown = false; - - if ( !broadcastTrigger ){ - $scope.$broadcast('hide-menu'); - } - }; - - - $scope.$on('menu-hidden', function() { - if ( $scope.hideThenShow ){ - delete $scope.hideThenShow; - - uiGridColumnMenuService.repositionMenu( $scope, $scope.col, $scope.colElementPosition, $elm, $scope.colElement ); - $scope.$broadcast('show-menu'); - - $scope.menuShown = true; - } else { - $scope.hideMenu( true ); - } - }); - - $scope.$on('menu-shown', function() { - $timeout( function() { - uiGridColumnMenuService.repositionMenu( $scope, $scope.col, $scope.colElementPosition, $elm, $scope.colElement ); - delete $scope.colElementPosition; - delete $scope.columnElement; - }, 200); - }); - - - /* Column methods */ - $scope.sortColumn = function (event, dir) { - event.stopPropagation(); - - $scope.grid.sortColumn($scope.col, dir, true) - .then(function () { - $scope.grid.refresh(); - $scope.hideMenu(); - }); - }; - - $scope.unsortColumn = function () { - $scope.col.unsort(); - - $scope.grid.refresh(); - $scope.hideMenu(); - }; - - $scope.hideColumn = function () { - $scope.col.colDef.visible = false; - - $scope.grid.refresh(); - $scope.hideMenu(); - }; - }, - - - - controller: ['$scope', function ($scope) { - var self = this; - - $scope.$watch('menuItems', function (n, o) { - self.menuItems = n; - }); - }] - }; - - return uiGridColumnMenu; - -}]); - -})(); -(function () { - 'use strict'; - - angular.module('ui.grid').directive('uiGridFooterCell', ['$timeout', 'gridUtil', 'uiGridConstants', '$compile', - function ($timeout, gridUtil, uiGridConstants, $compile) { - var uiGridFooterCell = { - priority: 0, - scope: { - col: '=', - row: '=', - renderIndex: '=' - }, - replace: true, - require: '^uiGrid', - compile: function compile(tElement, tAttrs, transclude) { - return { - pre: function ($scope, $elm, $attrs, uiGridCtrl) { - function compileTemplate(template) { - gridUtil.getTemplate(template).then(function (contents) { - var linkFunction = $compile(contents); - var html = linkFunction($scope); - $elm.append(html); - }); - } - - //compile the footer template - if ($scope.col.footerCellTemplate) { - //compile the custom template - compileTemplate($scope.col.footerCellTemplate); - } - else { - //use default template - compileTemplate('ui-grid/uiGridFooterCell'); - } - }, - post: function ($scope, $elm, $attrs, uiGridCtrl) { - //$elm.addClass($scope.col.getColClass(false)); - $scope.grid = uiGridCtrl.grid; - $scope.getExternalScopes = uiGridCtrl.getExternalScopes; - - $elm.addClass($scope.col.getColClass(false)); - - // apply any footerCellClass - var classAdded; - var updateClass = function( grid ){ - var contents = $elm; - if ( classAdded ){ - contents.removeClass( classAdded ); - classAdded = null; - } - - if (angular.isFunction($scope.col.footerCellClass)) { - classAdded = $scope.col.footerCellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex); - } - else { - classAdded = $scope.col.footerCellClass; - } - contents.addClass(classAdded); - }; - - if ($scope.col.footerCellClass) { - updateClass(); - } - - // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs - var watchUid = $scope.grid.registerDataChangeCallback( updateClass, [uiGridConstants.dataChange.COLUMN]); - - $scope.$on( '$destroy', function() { - $scope.grid.deregisterDataChangeCallback( watchUid ); - }); - } - }; - } - }; - - return uiGridFooterCell; - }]); - -})(); - -(function () { - 'use strict'; - - angular.module('ui.grid').directive('uiGridFooter', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function ($templateCache, $compile, uiGridConstants, gridUtil, $timeout) { - var defaultTemplate = 'ui-grid/ui-grid-footer'; - - return { - restrict: 'EA', - replace: true, - // priority: 1000, - require: ['^uiGrid', '^uiGridRenderContainer'], - scope: true, - compile: function ($elm, $attrs) { - return { - pre: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - $scope.grid = uiGridCtrl.grid; - $scope.colContainer = containerCtrl.colContainer; - $scope.getExternalScopes = uiGridCtrl.getExternalScopes; - - containerCtrl.footer = $elm; - - var footerTemplate = ($scope.grid.options.footerTemplate) ? $scope.grid.options.footerTemplate : defaultTemplate; - gridUtil.getTemplate(footerTemplate) - .then(function (contents) { - var template = angular.element(contents); - - var newElm = $compile(template)($scope); - $elm.append(newElm); - - if (containerCtrl) { - // Inject a reference to the footer viewport (if it exists) into the grid controller for use in the horizontal scroll handler below - var footerViewport = $elm[0].getElementsByClassName('ui-grid-footer-viewport')[0]; - - if (footerViewport) { - containerCtrl.footerViewport = footerViewport; - } - } - }); - }, - - post: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - // gridUtil.logDebug('ui-grid-footer link'); - - var grid = uiGridCtrl.grid; - - // Don't animate footer cells - gridUtil.disableAnimations($elm); - - containerCtrl.footer = $elm; - - var footerViewport = $elm[0].getElementsByClassName('ui-grid-footer-viewport')[0]; - if (footerViewport) { - containerCtrl.footerViewport = footerViewport; - } - } - }; - } - }; - }]); - -})(); -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridGroupPanel', ["$compile", "uiGridConstants", "gridUtil", function($compile, uiGridConstants, gridUtil) { - var defaultTemplate = 'ui-grid/ui-grid-group-panel'; - - return { - restrict: 'EA', - replace: true, - require: '?^uiGrid', - scope: false, - compile: function($elm, $attrs) { - return { - pre: function ($scope, $elm, $attrs, uiGridCtrl) { - var groupPanelTemplate = $scope.grid.options.groupPanelTemplate || defaultTemplate; - - gridUtil.getTemplate(groupPanelTemplate) - .then(function (contents) { - var template = angular.element(contents); - - var newElm = $compile(template)($scope); - $elm.append(newElm); - }); - }, - - post: function ($scope, $elm, $attrs, uiGridCtrl) { - $elm.bind('$destroy', function() { - // scrollUnbinder(); - }); - } - }; - } - }; - }]); - -})(); -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridHeaderCell', ['$compile', '$timeout', '$window', '$document', 'gridUtil', 'uiGridConstants', - function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants) { - // Do stuff after mouse has been down this many ms on the header cell - var mousedownTimeout = 500; - - var uiGridHeaderCell = { - priority: 0, - scope: { - col: '=', - row: '=', - renderIndex: '=' - }, - require: ['?^uiGrid', '^uiGridRenderContainer'], - replace: true, - compile: function() { - return { - pre: function ($scope, $elm, $attrs) { - var cellHeader = $compile($scope.col.headerCellTemplate)($scope); - $elm.append(cellHeader); - }, - - post: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var renderContainerCtrl = controllers[1]; - - $scope.grid = uiGridCtrl.grid; - $scope.getExternalScopes = uiGridCtrl.getExternalScopes; - - $scope.renderContainer = uiGridCtrl.grid.renderContainers[renderContainerCtrl.containerId]; - - $elm.addClass($scope.col.getColClass(false)); - - // Hide the menu by default - $scope.menuShown = false; - - // Put asc and desc sort directions in scope - $scope.asc = uiGridConstants.ASC; - $scope.desc = uiGridConstants.DESC; - - // Store a reference to menu element - var $colMenu = angular.element( $elm[0].querySelectorAll('.ui-grid-header-cell-menu') ); - - var $contentsElm = angular.element( $elm[0].querySelectorAll('.ui-grid-cell-contents') ); - - - // apply any headerCellClass - var classAdded; - var updateClass = function( grid ){ - var contents = $elm; - if ( classAdded ){ - contents.removeClass( classAdded ); - classAdded = null; - } - - if (angular.isFunction($scope.col.headerCellClass)) { - classAdded = $scope.col.headerCellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex); - } - else { - classAdded = $scope.col.headerCellClass; - } - contents.addClass(classAdded); - }; - - if ($scope.col.headerCellClass) { - updateClass(); - } - - // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs - var watchUid = $scope.grid.registerDataChangeCallback( updateClass, [uiGridConstants.dataChange.COLUMN]); - - var deregisterFunction = function() { - $scope.grid.deregisterDataChangeCallback( watchUid ); - }; - - $scope.$on( '$destroy', deregisterFunction ); - - - // Figure out whether this column is sortable or not - if (uiGridCtrl.grid.options.enableSorting && $scope.col.enableSorting) { - $scope.sortable = true; - } - else { - $scope.sortable = false; - } - - if (uiGridCtrl.grid.options.enableFiltering && $scope.col.enableFiltering) { - $scope.filterable = true; - } - else { - $scope.filterable = false; - } - - function handleClick(evt) { - // If the shift key is being held down, add this column to the sort - var add = false; - if (evt.shiftKey) { - add = true; - } - - // Sort this column then rebuild the grid's rows - uiGridCtrl.grid.sortColumn($scope.col, add) - .then(function () { - if (uiGridCtrl.columnMenuScope) { uiGridCtrl.columnMenuScope.hideMenu(); } - uiGridCtrl.grid.refresh(); - }); - } - - /** - * @ngdoc property - * @name enableColumnMenu - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description if column menus are enabled, controls the column menus for this specific - * column (i.e. if gridOptions.enableColumnMenus, then you can control column menus - * using this option. If gridOptions.enableColumnMenus === false then you get no column - * menus irrespective of the value of this option ). Defaults to true. - * - */ - /** - * @ngdoc property - * @name enableColumnMenus - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description Override for column menus everywhere - if set to false then you get no - * column menus. Defaults to true. - * - */ - - // Long-click (for mobile) - var cancelMousedownTimeout; - var mousedownStartTime = 0; - $contentsElm.on('mousedown touchstart', function(event) { - if (typeof(event.originalEvent) !== 'undefined' && event.originalEvent !== undefined) { - event = event.originalEvent; - } - - // Don't show the menu if it's not the left button - if (event.button && event.button !== 0) { - return; - } - - mousedownStartTime = (new Date()).getTime(); - - cancelMousedownTimeout = $timeout(function() { }, mousedownTimeout); - - cancelMousedownTimeout.then(function () { - if ($scope.col.grid.options && $scope.col.grid.options.enableColumnMenus !== false && - $scope.col.colDef && $scope.col.colDef.enableColumnMenu !== false) { - uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm, event); - } - }); - }); - - $contentsElm.on('mouseup touchend', function () { - $timeout.cancel(cancelMousedownTimeout); - }); - - $scope.$on('$destroy', function () { - $contentsElm.off('mousedown touchstart'); - }); - - - $scope.toggleMenu = function($event) { - $event.stopPropagation(); - - // If the menu is already showing... - if (uiGridCtrl.columnMenuScope.menuShown) { - // ... and we're the column the menu is on... - if (uiGridCtrl.columnMenuScope.col === $scope.col) { - // ... hide it - uiGridCtrl.columnMenuScope.hideMenu(); - } - // ... and we're NOT the column the menu is on - else { - // ... move the menu to our column - uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm); - } - } - // If the menu is NOT showing - else { - // ... show it on our column - uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm); - } - }; - - // If this column is sortable, add a click event handler - if ($scope.sortable) { - $contentsElm.on('click touchend', function(evt) { - evt.stopPropagation(); - - $timeout.cancel(cancelMousedownTimeout); - - var mousedownEndTime = (new Date()).getTime(); - var mousedownTime = mousedownEndTime - mousedownStartTime; - - if (mousedownTime > mousedownTimeout) { - // long click, handled above with mousedown - } - else { - // short click - handleClick(evt); - } - }); - - $scope.$on('$destroy', function () { - // Cancel any pending long-click timeout - $timeout.cancel(cancelMousedownTimeout); - }); - } - - if ($scope.filterable) { - var filterDeregisters = []; - angular.forEach($scope.col.filters, function(filter, i) { - filterDeregisters.push($scope.$watch('col.filters[' + i + '].term', function(n, o) { - if (n !== o) { - uiGridCtrl.grid.api.core.raise.filterChanged(); - uiGridCtrl.grid.refresh() - .then(function () { - if (uiGridCtrl.prevScrollArgs && uiGridCtrl.prevScrollArgs.y && uiGridCtrl.prevScrollArgs.y.percentage) { - uiGridCtrl.fireScrollingEvent({ y: { percentage: uiGridCtrl.prevScrollArgs.y.percentage } }); - } - // uiGridCtrl.fireEvent('force-vertical-scroll'); - }); - } - })); - }); - $scope.$on('$destroy', function() { - angular.forEach(filterDeregisters, function(filterDeregister) { - filterDeregister(); - }); - }); - } - } - }; - } - }; - - return uiGridHeaderCell; - }]); - -})(); - -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridHeader', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function($templateCache, $compile, uiGridConstants, gridUtil, $timeout) { - var defaultTemplate = 'ui-grid/ui-grid-header'; - var emptyTemplate = 'ui-grid/ui-grid-no-header'; - - return { - restrict: 'EA', - // templateUrl: 'ui-grid/ui-grid-header', - replace: true, - // priority: 1000, - require: ['^uiGrid', '^uiGridRenderContainer'], - scope: true, - compile: function($elm, $attrs) { - return { - pre: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - $scope.grid = uiGridCtrl.grid; - $scope.colContainer = containerCtrl.colContainer; - $scope.getExternalScopes = uiGridCtrl.getExternalScopes; - - containerCtrl.header = $elm; - containerCtrl.colContainer.header = $elm; - - /** - * @ngdoc property - * @name hideHeader - * @propertyOf ui.grid.class:GridOptions - * @description Null by default. When set to true, this setting will replace the - * standard header template with '
    ', resulting in no header being shown. - */ - - var headerTemplate; - if ($scope.grid.options.hideHeader){ - headerTemplate = emptyTemplate; - } else { - headerTemplate = ($scope.grid.options.headerTemplate) ? $scope.grid.options.headerTemplate : defaultTemplate; - } - - gridUtil.getTemplate(headerTemplate) - .then(function (contents) { - var template = angular.element(contents); - - var newElm = $compile(template)($scope); - $elm.replaceWith(newElm); - - // Replace the reference to the container's header element with this new element - containerCtrl.header = newElm; - containerCtrl.colContainer.header = newElm; - - // And update $elm to be the new element - $elm = newElm; - - if (containerCtrl) { - // Inject a reference to the header viewport (if it exists) into the grid controller for use in the horizontal scroll handler below - var headerViewport = $elm[0].getElementsByClassName('ui-grid-header-viewport')[0]; - - if (headerViewport) { - containerCtrl.headerViewport = headerViewport; - } - } - }); - }, - - post: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - // gridUtil.logDebug('ui-grid-header link'); - - var grid = uiGridCtrl.grid; - - // Don't animate header cells - gridUtil.disableAnimations($elm); - - function updateColumnWidths() { - // Get the width of the viewport - var availableWidth = containerCtrl.colContainer.getViewportWidth(); - - if (typeof(uiGridCtrl.grid.verticalScrollbarWidth) !== 'undefined' && uiGridCtrl.grid.verticalScrollbarWidth !== undefined && uiGridCtrl.grid.verticalScrollbarWidth > 0) { - availableWidth = availableWidth + uiGridCtrl.grid.verticalScrollbarWidth; - } - - // The total number of columns - // var equalWidthColumnCount = columnCount = uiGridCtrl.grid.options.columnDefs.length; - // var equalWidth = availableWidth / equalWidthColumnCount; - - var columnCache = containerCtrl.colContainer.visibleColumnCache, - canvasWidth = 0, - asteriskNum = 0, - oneAsterisk = 0, - leftoverWidth = availableWidth, - hasVariableWidth = false; - - var getColWidth = function(column){ - if (column.widthType === "manual"){ - return +column.width; - } - else if (column.widthType === "percent"){ - return parseInt(column.width.replace(/%/g, ''), 10) * availableWidth / 100; - } - else if (column.widthType === "auto"){ - // leftOverWidth is subtracted from after each call to this - // function so we need to calculate oneAsterisk size only once - if (oneAsterisk === 0) { - oneAsterisk = parseInt(leftoverWidth / asteriskNum, 10); - } - return column.width.length * oneAsterisk; - } - }; - - // Populate / determine column width types: - columnCache.forEach(function(column){ - column.widthType = null; - if (isFinite(+column.width)){ - column.widthType = "manual"; - } - else if (gridUtil.endsWith(column.width, "%")){ - column.widthType = "percent"; - hasVariableWidth = true; - } - else if (angular.isString(column.width) && column.width.indexOf('*') !== -1){ - column.widthType = "auto"; - asteriskNum += column.width.length; - hasVariableWidth = true; - } - }); - - // For sorting, calculate width from first to last: - var colWidthPriority = ["manual", "percent", "auto"]; - columnCache.filter(function(column){ - // Only draw visible items with a widthType - return (column.visible && column.widthType); - }).sort(function(a,b){ - // Calculate widths in order, so that manual comes first, etc. - return colWidthPriority.indexOf(a.widthType) - colWidthPriority.indexOf(b.widthType); - }).forEach(function(column){ - // Calculate widths: - var colWidth = getColWidth(column); - if (column.minWidth){ - colWidth = Math.max(colWidth, column.minWidth); - } - if (column.maxWidth){ - colWidth = Math.min(colWidth, column.maxWidth); - } - column.drawnWidth = Math.floor(colWidth); - canvasWidth += column.drawnWidth; - leftoverWidth -= column.drawnWidth; - }); - - // If the grid width didn't divide evenly into the column widths and we have pixels left over, dole them out to the columns one by one to make everything fit - if (hasVariableWidth && leftoverWidth > 0 && canvasWidth > 0 && canvasWidth < availableWidth) { - var remFn = function (column) { - if (leftoverWidth > 0 && (column.widthType === "auto" || column.widthType === "percent")) { - column.drawnWidth = column.drawnWidth + 1; - canvasWidth = canvasWidth + 1; - leftoverWidth--; - } - }; - var prevLeftover = 0; - do { - prevLeftover = leftoverWidth; - columnCache.forEach(remFn); - } while (leftoverWidth > 0 && leftoverWidth !== prevLeftover ); - } - canvasWidth = Math.max(canvasWidth, availableWidth); - - // Build the CSS - // uiGridCtrl.grid.columns.forEach(function (column) { - var ret = ''; - columnCache.forEach(function (column) { - ret = ret + column.getColClassDefinition(); - }); - - // Add the vertical scrollbar width back in to the canvas width, it's taken out in getViewportWidth - if (grid.verticalScrollbarWidth) { - canvasWidth = canvasWidth + grid.verticalScrollbarWidth; - } - // canvasWidth = canvasWidth + 1; - - // if we have a grid menu, then we prune the width of the last column header - // to allow room for the button whilst still getting to the column menu - if (columnCache.length > 0) { // && grid.options.enableGridMenu) { - columnCache[columnCache.length - 1].headerWidth = columnCache[columnCache.length - 1].drawnWidth - 30; - } - - containerCtrl.colContainer.canvasWidth = parseInt(canvasWidth, 10); - - // Return the styles back to buildStyles which pops them into the `customStyles` scope variable - return ret; - } - - containerCtrl.header = $elm; - - var headerViewport = $elm[0].getElementsByClassName('ui-grid-header-viewport')[0]; - if (headerViewport) { - containerCtrl.headerViewport = headerViewport; - } - - //todo: remove this if by injecting gridCtrl into unit tests - if (uiGridCtrl) { - uiGridCtrl.grid.registerStyleComputation({ - priority: 5, - func: updateColumnWidths - }); - } - } - }; - } - }; - }]); - -})(); - -(function(){ - -angular.module('ui.grid') -.service('uiGridGridMenuService', [ 'gridUtil', 'i18nService', function( gridUtil, i18nService ) { - /** - * @ngdoc service - * @name ui.grid.gridMenuService - * - * @description Methods for working with the grid menu - */ - - var service = { - /** - * @ngdoc method - * @methodOf ui.grid.gridMenuService - * @name initialize - * @description Sets up the gridMenu. Most importantly, sets our - * scope onto the grid object as grid.gridMenuScope, allowing us - * to operate when passed only the grid. Second most importantly, - * we register the 'addToGridMenu' and 'removeFromGridMenu' methods - * on the core api. - * @param {$scope} $scope the scope of this gridMenu - * @param {Grid} grid the grid to which this gridMenu is associated - */ - initialize: function( $scope, grid ){ - grid.gridMenuScope = $scope; - $scope.grid = grid; - $scope.registeredMenuItems = []; - - // not certain this is needed, but would be bad to create a memory leak - $scope.$on('$destroy', function() { - if ( $scope.grid && $scope.grid.gridMenuScope ){ - $scope.grid.gridMenuScope = null; - } - if ( $scope.grid ){ - $scope.grid = null; - } - if ( $scope.registeredMenuItems ){ - $scope.registeredMenuItems = null; - } - }); - - $scope.registeredMenuItems = []; - - /** - * @ngdoc function - * @name addToGridMenu - * @methodOf ui.grid.core.api:PublicApi - * @description add items to the grid menu. Used by features - * to add their menu items if they are enabled, can also be used by - * end users to add menu items. This method has the advantage of allowing - * remove again, which can simplify management of which items are included - * in the menu when. (Noting that in most cases the shown and active functions - * provide a better way to handle visibility of menu items) - * @param {Grid} grid the grid on which we are acting - * @param {array} items menu items in the format as described in the tutorial, with - * the added note that if you want to use remove you must also specify an `id` field, - * which is provided when you want to remove an item. The id should be unique. - * - */ - grid.api.registerMethod( 'core', 'addToGridMenu', service.addToGridMenu ); - - /** - * @ngdoc function - * @name removeFromGridMenu - * @methodOf ui.grid.core.api:PublicApi - * @description Remove an item from the grid menu based on a provided id. Assumes - * that the id is unique, removes only the last instance of that id. Does nothing if - * the specified id is not found - * @param {Grid} grid the grid on which we are acting - * @param {string} id the id we'd like to remove from the menu - * - */ - grid.api.registerMethod( 'core', 'removeFromGridMenu', service.removeFromGridMenu ); - }, - - - /** - * @ngdoc function - * @name addToGridMenu - * @propertyOf ui.grid.class:GridOptions - * @description add items to the grid menu. Used by features - * to add their menu items if they are enabled, can also be used by - * end users to add menu items. This method has the advantage of allowing - * remove again, which can simplify management of which items are included - * in the menu when. (Noting that in most cases the shown and active functions - * provide a better way to handle visibility of menu items) - * @param {Grid} grid the grid on which we are acting - * @param {array} items menu items in the format as described in the tutorial, with - * the added note that if you want to use remove you must also specify an `id` field, - * which is provided when you want to remove an item. The id should be unique. - * - */ - addToGridMenu: function( grid, menuItems ) { - if ( !angular.isArray( menuItems ) ) { - gridUtil.logError( 'addToGridMenu: menuItems must be an array, and is not, not adding any items'); - } else { - if ( grid.gridMenuScope ){ - grid.gridMenuScope.registeredMenuItems = grid.gridMenuScope.registeredMenuItems ? grid.gridMenuScope.registeredMenuItems : []; - grid.gridMenuScope.registeredMenuItems = grid.gridMenuScope.registeredMenuItems.concat( menuItems ); - } else { - gridUtil.logError( 'Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid'); - } - } - }, - - - /** - * @ngdoc function - * @name removeFromGridMenu - * @methodOf ui.grid.core.api:PublicApi - * @description Remove an item from the grid menu based on a provided id. Assumes - * that the id is unique, removes only the last instance of that id. Does nothing if - * the specified id is not found. If there is no gridMenuScope or registeredMenuItems - * then do nothing silently - the desired result is those menu items not be present and they - * aren't. - * @param {Grid} grid the grid on which we are acting - * @param {string} id the id we'd like to remove from the menu - * - */ - removeFromGridMenu: function( grid, id ){ - var foundIndex = -1; - - if ( grid && grid.gridMenuScope ){ - grid.gridMenuScope.registeredMenuItems.forEach( function( value, index ) { - if ( value.id === id ){ - if (foundIndex > -1) { - gridUtil.logError( 'removeFromGridMenu: found multiple items with the same id, removing only the last' ); - } else { - - foundIndex = index; - } - } - }); - } - - if ( foundIndex > -1 ){ - grid.gridMenuScope.registeredMenuItems.splice( foundIndex, 1 ); - } - }, - - - /** - * @ngdoc array - * @name gridMenuCustomItems - * @propertyOf ui.grid.class:GridOptions - * @description (optional) An array of menu items that should be added to - * the gridMenu. Follow the format documented in the tutorial for column - * menu customisation. The context provided to the action function will - * include context.grid. An alternative if working with dynamic menus is to use the - * provided api - core.addToGridMenu and core.removeFromGridMenu, which handles - * some of the management of items for you. - * - */ - /** - * @ngdoc boolean - * @name gridMenuShowHideColumns - * @propertyOf ui.grid.class:GridOptions - * @description true by default, whether the grid menu should allow hide/show - * of columns - * - */ - /** - * @ngdoc method - * @methodOf ui.grid.gridMenuService - * @name getMenuItems - * @description Decides the menu items to show in the menu. This is a - * combination of: - * - * - the default menu items that are always included, - * - any menu items that have been provided through the addMenuItem api. These - * are typically added by features within the grid - * - any menu items included in grid.options.gridMenuCustomItems. These can be - * changed dynamically, as they're always recalculated whenever we show the - * menu - * @param {$scope} $scope the scope of this gridMenu, from which we can find all - * the information that we need - * @returns {array} an array of menu items that can be shown - */ - getMenuItems: function( $scope ) { - var menuItems = [ - // this is where we add any menu items we want to always include - ]; - - if ( $scope.grid.options.gridMenuCustomItems ){ - if ( !angular.isArray( $scope.grid.options.gridMenuCustomItems ) ){ - gridUtil.logError( 'gridOptions.gridMenuCustomItems must be an array, and is not'); - } else { - menuItems = menuItems.concat( $scope.grid.options.gridMenuCustomItems ); - } - } - - menuItems = menuItems.concat( $scope.registeredMenuItems ); - - if ( $scope.grid.options.gridMenuShowHideColumns !== false ){ - menuItems = menuItems.concat( service.showHideColumns( $scope ) ); - } - - return menuItems; - }, - - - /** - * @ngdoc array - * @name gridMenuTitleFilter - * @propertyOf ui.grid.class:GridOptions - * @description (optional) A function that takes a title string - * (usually the col.displayName), and converts it into a display value. The function - * must return either a string or a promise. - * - * Used for internationalization of the grid menu column names - for angular-translate - * you can pass $translate as the function, for i18nService you can pass getSafeText as the - * function - * @example - *
    -     *   gridOptions = {
    -     *     gridMenuTitleFilter: $translate
    -     *   }
    -     * 
    - */ - /** - * @ngdoc method - * @methodOf ui.grid.gridMenuService - * @name showHideColumns - * @description Adds two menu items for each of the columns in columnDefs. One - * menu item for hide, one menu item for show. Each is visible when appropriate - * (show when column is not visible, hide when column is visible). Each toggles - * the visible property on the columnDef using toggleColumnVisibility - * @param {$scope} $scope of a gridMenu, which contains a reference to the grid - */ - showHideColumns: function( $scope ){ - var showHideColumns = []; - if ( !$scope.grid.options.columnDefs || $scope.grid.options.columnDefs.length === 0 || $scope.grid.columns.length === 0 ) { - return showHideColumns; - } - - // add header for columns - showHideColumns.push({ - title: i18nService.getSafeText('gridMenu.columns') - }); - - $scope.grid.options.gridMenuTitleFilter = $scope.grid.options.gridMenuTitleFilter ? $scope.grid.options.gridMenuTitleFilter : function( title ) { return title; }; - - $scope.grid.options.columnDefs.forEach( function( colDef, index ){ - if ( colDef.enableHiding !== false ){ - // add hide menu item - shows an OK icon as we only show when column is already visible - var menuItem = { - icon: 'ui-grid-icon-ok', - action: function($event) { - $event.stopPropagation(); - service.toggleColumnVisibility( this.context.gridCol ); - }, - shown: function() { - return this.context.gridCol.colDef.visible === true || this.context.gridCol.colDef.visible === undefined; - }, - context: { gridCol: $scope.grid.getColumn(colDef.name || colDef.field) } - }; - service.setMenuItemTitle( menuItem, colDef, $scope.grid ); - showHideColumns.push( menuItem ); - - // add show menu item - shows no icon as we only show when column is invisible - menuItem = { - icon: 'ui-grid-icon-cancel', - action: function($event) { - $event.stopPropagation(); - service.toggleColumnVisibility( this.context.gridCol ); - }, - shown: function() { - return !(this.context.gridCol.colDef.visible === true || this.context.gridCol.colDef.visible === undefined); - }, - context: { gridCol: $scope.grid.getColumn(colDef.name || colDef.field) } - }; - service.setMenuItemTitle( menuItem, colDef, $scope.grid ); - showHideColumns.push( menuItem ); - } - }); - return showHideColumns; - }, - - - /** - * @ngdoc method - * @methodOf ui.grid.gridMenuService - * @name setMenuItemTitle - * @description Handles the response from gridMenuTitleFilter, adding it directly to the menu - * item if it returns a string, otherwise waiting for the promise to resolve or reject then - * putting the result into the title - * @param {object} menuItem the menuItem we want to put the title on - * @param {object} colDef the colDef from which we can get displayName, name or field - * @param {Grid} grid the grid, from which we can get the options.gridMenuTitleFilter - * - */ - setMenuItemTitle: function( menuItem, colDef, grid ){ - var title = grid.options.gridMenuTitleFilter( colDef.displayName || colDef.name || colDef.field ); - - if ( typeof(title) === 'string' ){ - menuItem.title = title; - } else if ( title.then ){ - // must be a promise - menuItem.title = ""; - title.then( function( successValue ) { - menuItem.title = successValue; - }, function( errorValue ) { - menuItem.title = errorValue; - }); - } else { - gridUtil.logError('Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config'); - menuItem.title = 'badconfig'; - } - }, - - /** - * @ngdoc method - * @methodOf ui.grid.gridMenuService - * @name toggleColumnVisibility - * @description Toggles the visibility of an individual column. Expects to be - * provided a context that has on it a gridColumn, which is the column that - * we'll operate upon. We change the visibility, and refresh the grid as appropriate - * @param {GridCol} gridCol the column that we want to toggle - * - */ - toggleColumnVisibility: function( gridCol ) { - gridCol.colDef.visible = !( gridCol.colDef.visible === true || gridCol.colDef.visible === undefined ); - - gridCol.grid.refresh(); - } - }; - - return service; -}]) - - - -.directive('uiGridMenuButton', ['gridUtil', 'uiGridConstants', 'uiGridGridMenuService', -function (gridUtil, uiGridConstants, uiGridGridMenuService) { - - return { - priority: 0, - scope: true, - require: ['?^uiGrid'], - templateUrl: 'ui-grid/ui-grid-menu-button', - replace: true, - - - link: function ($scope, $elm, $attrs, controllers) { - var uiGridCtrl = controllers[0]; - - uiGridGridMenuService.initialize($scope, uiGridCtrl.grid); - - $scope.shown = false; - - $scope.toggleMenu = function () { - if ( $scope.shown ){ - $scope.$broadcast('hide-menu'); - $scope.shown = false; - } else { - $scope.menuItems = uiGridGridMenuService.getMenuItems( $scope ); - $scope.$broadcast('show-menu'); - $scope.shown = true; - } - }; - - $scope.$on('menu-hidden', function() { - $scope.shown = false; - }); - } - }; - -}]); - -})(); -(function(){ - -/** - * @ngdoc directive - * @name ui.grid.directive:uiGridColumnMenu - * @element style - * @restrict A - * - * @description - * Allows us to interpolate expressions in ` - I am in a box. - - - - it('should apply the right class to the element', function () { - element(by.css('.blah')).getCssValue('border') - .then(function(c) { - expect(c).toContain('1px solid'); - }); - }); - - - */ - - - angular.module('ui.grid').directive('uiGridStyle', ['gridUtil', '$interpolate', function(gridUtil, $interpolate) { - return { - // restrict: 'A', - // priority: 1000, - // require: '?^uiGrid', - link: function($scope, $elm, $attrs, uiGridCtrl) { - // gridUtil.logDebug('ui-grid-style link'); - // if (uiGridCtrl === undefined) { - // gridUtil.logWarn('[ui-grid-style link] uiGridCtrl is undefined!'); - // } - - var interpolateFn = $interpolate($elm.text(), true); - - if (interpolateFn) { - $scope.$watch(interpolateFn, function(value) { - $elm.text(value); - }); - } - - // uiGridCtrl.recalcRowStyles = function() { - // var offset = (scope.options.offsetTop || 0) - (scope.options.excessRows * scope.options.rowHeight); - // var rowHeight = scope.options.rowHeight; - - // var ret = ''; - // var rowStyleCount = uiGridCtrl.minRowsToRender() + (scope.options.excessRows * 2); - // for (var i = 1; i <= rowStyleCount; i++) { - // ret = ret + ' .grid' + scope.gridId + ' .ui-grid-row:nth-child(' + i + ') { top: ' + offset + 'px; }'; - // offset = offset + rowHeight; - // } - - // scope.rowStyles = ret; - // }; - - // uiGridCtrl.styleComputions.push(uiGridCtrl.recalcRowStyles); - - } - }; - }]); - -})(); -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridViewport', ['gridUtil', - function(gridUtil) { - return { - replace: true, - scope: {}, - templateUrl: 'ui-grid/uiGridViewport', - require: ['^uiGrid', '^uiGridRenderContainer'], - link: function($scope, $elm, $attrs, controllers) { - // gridUtil.logDebug('viewport post-link'); - - var uiGridCtrl = controllers[0]; - var containerCtrl = controllers[1]; - - $scope.containerCtrl = containerCtrl; - - var rowContainer = containerCtrl.rowContainer; - var colContainer = containerCtrl.colContainer; - - var grid = uiGridCtrl.grid; - - $scope.grid = uiGridCtrl.grid; - - // Put the containers in scope so we can get rows and columns from them - $scope.rowContainer = containerCtrl.rowContainer; - $scope.colContainer = containerCtrl.colContainer; - - // Register this viewport with its container - containerCtrl.viewport = $elm; - - $elm.on('scroll', function (evt) { - var newScrollTop = $elm[0].scrollTop; - // var newScrollLeft = $elm[0].scrollLeft; - var newScrollLeft = gridUtil.normalizeScrollLeft($elm); - var horizScrollPercentage = -1; - var vertScrollPercentage = -1; - - // Handle RTL here - - if (newScrollLeft !== colContainer.prevScrollLeft) { - var xDiff = newScrollLeft - colContainer.prevScrollLeft; - - var horizScrollLength = (colContainer.getCanvasWidth() - colContainer.getViewportWidth()); - horizScrollPercentage = newScrollLeft / horizScrollLength; - - colContainer.adjustScrollHorizontal(newScrollLeft, horizScrollPercentage); - } - - if (newScrollTop !== rowContainer.prevScrollTop) { - var yDiff = newScrollTop - rowContainer.prevScrollTop; - - // uiGridCtrl.fireScrollingEvent({ y: { pixels: diff } }); - var vertScrollLength = (rowContainer.getCanvasHeight() - rowContainer.getViewportHeight()); - // var vertScrollPercentage = (uiGridCtrl.prevScrollTop + yDiff) / vertScrollLength; - vertScrollPercentage = newScrollTop / vertScrollLength; - - if (vertScrollPercentage > 1) { vertScrollPercentage = 1; } - if (vertScrollPercentage < 0) { vertScrollPercentage = 0; } - - rowContainer.adjustScrollVertical(newScrollTop, vertScrollPercentage); - } - - if ( !$scope.grid.isScrollingVertically && !$scope.grid.isScrollingHorizontally ){ - // viewport scroll that didn't come from fireScrollEvent, so fire a scroll to keep - // the header in sync - var args = {}; - if ( horizScrollPercentage > -1 ){ - args.x = { percentage: horizScrollPercentage }; - } - - if ( vertScrollPercentage > -1 ){ - args.y = { percentage: vertScrollPercentage }; - } - uiGridCtrl.fireScrollingEvent(args); - } - }); - } - }; - } - ]); - -})(); -(function() { - -angular.module('ui.grid') -.directive('uiGridVisible', function uiGridVisibleAction() { - return function ($scope, $elm, $attr) { - $scope.$watch($attr.uiGridVisible, function (visible) { - // $elm.css('visibility', visible ? 'visible' : 'hidden'); - $elm[visible ? 'removeClass' : 'addClass']('ui-grid-invisible'); - }); - }; -}); - -})(); -(function () { - 'use strict'; - - angular.module('ui.grid').controller('uiGridController', ['$scope', '$element', '$attrs', 'gridUtil', '$q', 'uiGridConstants', - '$templateCache', 'gridClassFactory', '$timeout', '$parse', '$compile', - function ($scope, $elm, $attrs, gridUtil, $q, uiGridConstants, - $templateCache, gridClassFactory, $timeout, $parse, $compile) { - // gridUtil.logDebug('ui-grid controller'); - - var self = this; - - // Extend options with ui-grid attribute reference - self.grid = gridClassFactory.createGrid($scope.uiGrid); - $elm.addClass('grid' + self.grid.id); - self.grid.rtl = gridUtil.getStyles($elm[0])['direction'] === 'rtl'; - - - //add optional reference to externalScopes function to controller - //so it can be retrieved in lower elements that have isolate scope - self.getExternalScopes = $scope.getExternalScopes; - - // angular.extend(self.grid.options, ); - - //all properties of grid are available on scope - $scope.grid = self.grid; - - if ($attrs.uiGridColumns) { - $attrs.$observe('uiGridColumns', function(value) { - self.grid.options.columnDefs = value; - self.grid.buildColumns() - .then(function(){ - self.grid.preCompileCellTemplates(); - - self.grid.refreshCanvas(true); - }); - }); - } - - - var dataWatchCollectionDereg; - if (angular.isString($scope.uiGrid.data)) { - dataWatchCollectionDereg = $scope.$parent.$watchCollection($scope.uiGrid.data, dataWatchFunction); - } - else { - dataWatchCollectionDereg = $scope.$parent.$watchCollection(function() { return $scope.uiGrid.data; }, dataWatchFunction); - } - - var columnDefWatchCollectionDereg = $scope.$parent.$watchCollection(function() { return $scope.uiGrid.columnDefs; }, columnDefsWatchFunction); - - function columnDefsWatchFunction(n, o) { - if (n && n !== o) { - self.grid.options.columnDefs = n; - self.grid.buildColumns() - .then(function(){ - - self.grid.preCompileCellTemplates(); - - self.grid.callDataChangeCallbacks(uiGridConstants.dataChange.COLUMN); - }); - } - } - - function dataWatchFunction(newData) { - // gridUtil.logDebug('dataWatch fired'); - var promises = []; - - if (newData) { - if ( - // If we have no columns (i.e. columns length is either 0 or equal to the number of row header columns, which don't count because they're created automatically) - self.grid.columns.length === (self.grid.rowHeaderColumns ? self.grid.rowHeaderColumns.length : 0) && - // ... and we don't have a ui-grid-columns attribute, which would define columns for us - !$attrs.uiGridColumns && - // ... and we have no pre-defined columns - self.grid.options.columnDefs.length === 0 && - // ... but we DO have data - newData.length > 0 - ) { - // ... then build the column definitions from the data that we have - self.grid.buildColumnDefsFromData(newData); - } - - // If we either have some columns defined, or some data defined - if (self.grid.options.columnDefs.length > 0 || newData.length > 0) { - // Build the column set, then pre-compile the column cell templates - promises.push(self.grid.buildColumns() - .then(function() { - self.grid.preCompileCellTemplates(); - })); - } - - $q.all(promises).then(function() { - self.grid.modifyRows(newData) - .then(function () { - // if (self.viewport) { - self.grid.redrawInPlace(); - // } - - $scope.$evalAsync(function() { - self.grid.refreshCanvas(true); - self.grid.callDataChangeCallbacks(uiGridConstants.dataChange.ROW); - }); - }); - }); - } - } - - - $scope.$on('$destroy', function() { - dataWatchCollectionDereg(); - columnDefWatchCollectionDereg(); - }); - - $scope.$watch(function () { return self.grid.styleComputations; }, function() { - self.grid.refreshCanvas(true); - }); - - - /* Event Methods */ - - self.fireScrollingEvent = gridUtil.throttle(function(args) { - $scope.$broadcast(uiGridConstants.events.GRID_SCROLL, args); - }, self.grid.options.scrollThrottle, {trailing: true}); - - self.fireEvent = function(eventName, args) { - // Add the grid to the event arguments if it's not there - if (typeof(args) === 'undefined' || args === undefined) { - args = {}; - } - - if (typeof(args.grid) === 'undefined' || args.grid === undefined) { - args.grid = self.grid; - } - - $scope.$broadcast(eventName, args); - }; - - self.innerCompile = function innerCompile(elm) { - $compile(elm)($scope); - }; - - }]); - -/** - * @ngdoc directive - * @name ui.grid.directive:uiGrid - * @element div - * @restrict EA - * @param {Object} uiGrid Options for the grid to use - * @param {Object=} external-scopes Add external-scopes='someScopeObjectYouNeed' attribute so you can access - * your scopes from within any custom templatedirective. You access by $scope.getExternalScopes() function - * - * @description Create a very basic grid. - * - * @example - - - var app = angular.module('app', ['ui.grid']); - - app.controller('MainCtrl', ['$scope', function ($scope) { - $scope.data = [ - { name: 'Bob', title: 'CEO' }, - { name: 'Frank', title: 'Lowly Developer' } - ]; - }]); - - -
    -
    -
    -
    -
    - */ -angular.module('ui.grid').directive('uiGrid', - [ - '$compile', - '$templateCache', - 'gridUtil', - '$window', - function( - $compile, - $templateCache, - gridUtil, - $window - ) { - return { - templateUrl: 'ui-grid/ui-grid', - scope: { - uiGrid: '=', - getExternalScopes: '&?externalScopes' //optional functionwrapper around any needed external scope instances - }, - replace: true, - transclude: true, - controller: 'uiGridController', - compile: function () { - return { - post: function ($scope, $elm, $attrs, uiGridCtrl) { - // gridUtil.logDebug('ui-grid postlink'); - - var grid = uiGridCtrl.grid; - - // Initialize scrollbars (TODO: move to controller??) - uiGridCtrl.scrollbars = []; - - //todo: assume it is ok to communicate that rendering is complete?? - grid.renderingComplete(); - - grid.element = $elm; - - grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm); - - // Default canvasWidth to the grid width, in case we don't get any column definitions to calculate it from - grid.canvasWidth = uiGridCtrl.grid.gridWidth; - - grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm); - - // If the grid isn't tall enough to fit a single row, it's kind of useless. Resize it to fit a minimum number of rows - if (grid.gridHeight < grid.options.rowHeight) { - // Figure out the new height - var contentHeight = grid.options.minRowsToShow * grid.options.rowHeight; - var headerHeight = grid.options.hideHeader ? 0 : grid.options.headerRowHeight; - var footerHeight = grid.options.showFooter ? grid.options.footerRowHeight : 0; - var scrollbarHeight = grid.options.enableScrollbars ? gridUtil.getScrollbarWidth() : 0; - - var maxNumberOfFilters = 0; - // Calculates the maximum number of filters in the columns - angular.forEach(grid.options.columnDefs, function(col) { - if (col.hasOwnProperty('filter')) { - if (maxNumberOfFilters < 1) { - maxNumberOfFilters = 1; - } - } - else if (col.hasOwnProperty('filters')) { - if (maxNumberOfFilters < col.filters.length) { - maxNumberOfFilters = col.filters.length; - } - } - }); - var filterHeight = maxNumberOfFilters * headerHeight; - - var newHeight = headerHeight + contentHeight + footerHeight + scrollbarHeight + filterHeight; - - $elm.css('height', newHeight + 'px'); - - grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm); - } - - // Run initial canvas refresh - grid.refreshCanvas(); - - //add pinned containers for row headers support - //moved from pinning feature - var left = angular.element('
    '); - $elm.prepend(left); - uiGridCtrl.innerCompile(left); - - var right = angular.element('
    '); - $elm.append(right); - uiGridCtrl.innerCompile(right); - - - //if we add a left container after render, we need to watch and react - $scope.$watch(function () { return grid.hasLeftContainer();}, function (newValue, oldValue) { - if (newValue === oldValue) { - return; - } - - //todo: remove this code. it was commented out after moving from pinning because body is already float:left -// var bodyContainer = angular.element($elm[0].querySelectorAll('[container-id="body"]')); -// if (newValue){ -// bodyContainer.attr('style', 'float: left; position: inherit'); -// } -// else { -// bodyContainer.attr('style', 'float: left; position: relative'); -// } - - grid.refreshCanvas(true); - }); - - //if we add a right container after render, we need to watch and react - $scope.$watch(function () { return grid.hasRightContainer();}, function (newValue, oldValue) { - if (newValue === oldValue) { - return; - } - grid.refreshCanvas(true); - }); - - - // Resize the grid on window resize events - function gridResize($event) { - grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm); - grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm); - - grid.queueRefresh(); - } - - angular.element($window).on('resize', gridResize); - - // Unbind from window resize events when the grid is destroyed - $elm.on('$destroy', function () { - angular.element($window).off('resize', gridResize); - }); - } - }; - } - }; - } - ]); - -})(); - -(function(){ - 'use strict'; - - angular.module('ui.grid').directive('uiGridPinnedContainer', ['gridUtil', function (gridUtil) { - return { - restrict: 'EA', - replace: true, - template: '
    ', - scope: { - side: '=uiGridPinnedContainer' - }, - require: '^uiGrid', - compile: function compile() { - return { - post: function ($scope, $elm, $attrs, uiGridCtrl) { - // gridUtil.logDebug('ui-grid-pinned-container ' + $scope.side + ' link'); - - var grid = uiGridCtrl.grid; - - var myWidth = 0; - - $elm.addClass('ui-grid-pinned-container-' + $scope.side); - - function updateContainerWidth() { - if ($scope.side === 'left' || $scope.side === 'right') { - var cols = grid.renderContainers[$scope.side].visibleColumnCache; - var width = 0; - for (var i = 0; i < cols.length; i++) { - var col = cols[i]; - width += col.drawnWidth; - } - - myWidth = width; - } - } - - function updateContainerDimensions() { - // gridUtil.logDebug('update ' + $scope.side + ' dimensions'); - - var ret = ''; - - // Column containers - if ($scope.side === 'left' || $scope.side === 'right') { - updateContainerWidth(); - - // gridUtil.logDebug('myWidth', myWidth); - - // TODO(c0bra): Subtract sum of col widths from grid viewport width and update it - $elm.attr('style', null); - - var myHeight = grid.renderContainers.body.getViewportHeight(); // + grid.horizontalScrollbarHeight; - - ret += '.grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.side + ', .grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.side + ' .ui-grid-render-container-' + $scope.side + ' .ui-grid-viewport { width: ' + myWidth + 'px; height: ' + myHeight + 'px; } '; - } - - return ret; - } - - grid.renderContainers.body.registerViewportAdjuster(function (adjustment) { - if ( myWidth === 0 ){ - updateContainerWidth(); - } - // Subtract our own width - adjustment.width -= myWidth; - - return adjustment; - }); - - // Register style computation to adjust for columns in `side`'s render container - grid.registerStyleComputation({ - priority: 15, - func: updateContainerDimensions - }); - } - }; - } - }; - }]); -})(); -(function(){ - -angular.module('ui.grid') -.factory('Grid', ['$q', '$compile', '$parse', 'gridUtil', 'uiGridConstants', 'GridOptions', 'GridColumn', 'GridRow', 'GridApi', 'rowSorter', 'rowSearcher', 'GridRenderContainer', '$timeout', - function($q, $compile, $parse, gridUtil, uiGridConstants, GridOptions, GridColumn, GridRow, GridApi, rowSorter, rowSearcher, GridRenderContainer, $timeout) { - -/** - * @ngdoc object - * @name ui.grid.core.api:PublicApi - * @description Public Api for the core grid features - * - */ - -/** - * @ngdoc function - * @name ui.grid.class:Grid - * @description Grid is the main viewModel. Any properties or methods needed to maintain state are defined in - * * this prototype. One instance of Grid is created per Grid directive instance. - * @param {object} options Object map of options to pass into the grid. An 'id' property is expected. - */ - var Grid = function Grid(options) { - var self = this; - // Get the id out of the options, then remove it - if (options !== undefined && typeof(options.id) !== 'undefined' && options.id) { - if (!/^[_a-zA-Z0-9-]+$/.test(options.id)) { - throw new Error("Grid id '" + options.id + '" is invalid. It must follow CSS selector syntax rules.'); - } - } - else { - throw new Error('No ID provided. An ID must be given when creating a grid.'); - } - - self.id = options.id; - delete options.id; - - // Get default options - self.options = GridOptions.initialize( options ); - - self.headerHeight = self.options.headerRowHeight; - self.footerHeight = self.options.showFooter === true ? self.options.footerRowHeight : 0; - - self.rtl = false; - self.gridHeight = 0; - self.gridWidth = 0; - self.columnBuilders = []; - self.rowBuilders = []; - self.rowsProcessors = []; - self.columnsProcessors = []; - self.styleComputations = []; - self.viewportAdjusters = []; - self.rowHeaderColumns = []; - self.dataChangeCallbacks = {}; - - // self.visibleRowCache = []; - - // Set of 'render' containers for self grid, which can render sets of rows - self.renderContainers = {}; - - // Create a - self.renderContainers.body = new GridRenderContainer('body', self); - - self.cellValueGetterCache = {}; - - // Cached function to use with custom row templates - self.getRowTemplateFn = null; - - - //representation of the rows on the grid. - //these are wrapped references to the actual data rows (options.data) - self.rows = []; - - //represents the columns on the grid - self.columns = []; - - /** - * @ngdoc boolean - * @name isScrollingVertically - * @propertyOf ui.grid.class:Grid - * @description set to true when Grid is scrolling vertically. Set to false via debounced method - */ - self.isScrollingVertically = false; - - /** - * @ngdoc boolean - * @name isScrollingHorizontally - * @propertyOf ui.grid.class:Grid - * @description set to true when Grid is scrolling horizontally. Set to false via debounced method - */ - self.isScrollingHorizontally = false; - - var debouncedVertical = gridUtil.debounce(function () { - self.isScrollingVertically = false; - }, 300); - - var debouncedHorizontal = gridUtil.debounce(function () { - self.isScrollingHorizontally = false; - }, 300); - - - /** - * @ngdoc function - * @name flagScrollingVertically - * @methodOf ui.grid.class:Grid - * @description sets isScrollingVertically to true and sets it to false in a debounced function - */ - self.flagScrollingVertically = function() { - self.isScrollingVertically = true; - debouncedVertical(); - }; - - /** - * @ngdoc function - * @name flagScrollingHorizontally - * @methodOf ui.grid.class:Grid - * @description sets isScrollingHorizontally to true and sets it to false in a debounced function - */ - self.flagScrollingHorizontally = function() { - self.isScrollingHorizontally = true; - debouncedHorizontal(); - }; - - - - self.api = new GridApi(self); - - /** - * @ngdoc function - * @name refresh - * @methodOf ui.grid.core.api:PublicApi - * @description Refresh the rendered grid on screen. - * - */ - self.api.registerMethod( 'core', 'refresh', this.refresh ); - - /** - * @ngdoc function - * @name refreshRows - * @methodOf ui.grid.core.api:PublicApi - * @description Refresh the rendered grid on screen? Note: not functional at present - * @returns {promise} promise that is resolved when render completes? - * - */ - self.api.registerMethod( 'core', 'refreshRows', this.refreshRows ); - - /** - * @ngdoc function - * @name handleWindowResize - * @methodOf ui.grid.core.api:PublicApi - * @description Trigger a grid resize, normally this would be picked - * up by a watch on window size, but in some circumstances it is necessary - * to call this manually - * @returns {promise} promise that is resolved when render completes? - * - */ - self.api.registerMethod( 'core', 'handleWindowResize', this.handleWindowResize ); - - - /** - * @ngdoc function - * @name addRowHeaderColumn - * @methodOf ui.grid.core.api:PublicApi - * @description adds a row header column to the grid - * @param {object} column def - * - */ - self.api.registerMethod( 'core', 'addRowHeaderColumn', this.addRowHeaderColumn ); - - - /** - * @ngdoc function - * @name sortHandleNulls - * @methodOf ui.grid.core.api:PublicApi - * @description A null handling method that can be used when building custom sort - * functions - * @example - *
    -   *   mySortFn = function(a, b) {
    -   *   var nulls = $scope.gridApi.core.sortHandleNulls(a, b);
    -   *   if ( nulls !== null ){
    -   *     return nulls;
    -   *   } else {
    -   *     // your code for sorting here
    -   *   };
    -   * 
    - * @param {object} a sort value a - * @param {object} b sort value b - * @returns {number} null if there were no nulls/undefineds, otherwise returns - * a sort value that should be passed back from the sort function - * - */ - self.api.registerMethod( 'core', 'sortHandleNulls', rowSorter.handleNulls ); - - - /** - * @ngdoc function - * @name sortChanged - * @methodOf ui.grid.core.api:PublicApi - * @description The sort criteria on one or more columns has - * changed. Provides as parameters the grid and the output of - * getColumnSorting, which is an array of gridColumns - * that have sorting on them, sorted in priority order. - * - * @param {Grid} grid the grid - * @param {array} sortColumns an array of columns with - * sorts on them, in priority order - * - * @example - *
    -   *      gridApi.core.on.sortChanged( grid, sortColumns );
    -   * 
    - */ - self.api.registerEvent( 'core', 'sortChanged' ); - - /** - * @ngdoc method - * @name notifyDataChange - * @methodOf ui.grid.core.api:PublicApi - * @description Notify the grid that a data or config change has occurred, - * where that change isn't something the grid was otherwise noticing. This - * might be particularly relevant where you've changed values within the data - * and you'd like cell classes to be re-evaluated, or changed config within - * the columnDef and you'd like headerCellClasses to be re-evaluated. - * @param {Grid} grid the grid - * @param {string} type one of the - * uiGridConstants.dataChange values (ALL, ROW, EDIT, COLUMN), which tells - * us which refreshes to fire. - * - */ - self.api.registerMethod( 'core', 'notifyDataChange', this.notifyDataChange ); - - self.registerDataChangeCallback( self.columnRefreshCallback, [uiGridConstants.dataChange.COLUMN]); - self.registerDataChangeCallback( self.processRowsCallback, [uiGridConstants.dataChange.EDIT]); -}; - - /** - * @ngdoc function - * @name isRTL - * @methodOf ui.grid.class:Grid - * @description Returns true if grid is RightToLeft - */ - Grid.prototype.isRTL = function () { - return this.rtl; - }; - - - /** - * @ngdoc function - * @name registerColumnBuilder - * @methodOf ui.grid.class:Grid - * @description When the build creates columns from column definitions, the columnbuilders will be called to add - * additional properties to the column. - * @param {function(colDef, col, gridOptions)} columnsProcessor function to be called - */ - Grid.prototype.registerColumnBuilder = function registerColumnBuilder(columnBuilder) { - this.columnBuilders.push(columnBuilder); - }; - - /** - * @ngdoc function - * @name buildColumnDefsFromData - * @methodOf ui.grid.class:Grid - * @description Populates columnDefs from the provided data - * @param {function(colDef, col, gridOptions)} rowBuilder function to be called - */ - Grid.prototype.buildColumnDefsFromData = function (dataRows){ - this.options.columnDefs = gridUtil.getColumnsFromData(dataRows, this.options.excludeProperties); - }; - - /** - * @ngdoc function - * @name registerRowBuilder - * @methodOf ui.grid.class:Grid - * @description When the build creates rows from gridOptions.data, the rowBuilders will be called to add - * additional properties to the row. - * @param {function(row, gridOptions)} rowBuilder function to be called - */ - Grid.prototype.registerRowBuilder = function registerRowBuilder(rowBuilder) { - this.rowBuilders.push(rowBuilder); - }; - - - /** - * @ngdoc function - * @name registerDataChangeCallback - * @methodOf ui.grid.class:Grid - * @description When a data change occurs, the data change callbacks of the specified type - * will be called. The rules are: - * - * - when the data watch fires, that is considered a ROW change (the data watch only notices - * added or removed rows) - * - when the api is called to inform us of a change, the declared type of that change is used - * - when a cell edit completes, the EDIT callbacks are triggered - * - when the columnDef watch fires, the COLUMN callbacks are triggered - * - * For a given event: - * - ALL calls ROW, EDIT, COLUMN and ALL callbacks - * - ROW calls ROW and ALL callbacks - * - EDIT calls EDIT and ALL callbacks - * - COLUMN calls COLUMN and ALL callbacks - * - * @param {function(grid)} callback function to be called - * @param {array} types the types of data change you want to be informed of. Values from - * the uiGridConstants.dataChange values ( ALL, EDIT, ROW, COLUMN ). Optional and defaults to - * ALL - * @returns {string} uid of the callback, can be used to deregister it again - */ - Grid.prototype.registerDataChangeCallback = function registerDataChangeCallback(callback, types) { - var uid = gridUtil.nextUid(); - if ( !types ){ - types = [uiGridConstants.dataChange.ALL]; - } - if ( !Array.isArray(types)){ - gridUtil.logError("Expected types to be an array or null in registerDataChangeCallback, value passed was: " + types ); - } - this.dataChangeCallbacks[uid] = { callback: callback, types: types }; - return uid; - }; - - /** - * @ngdoc function - * @name deregisterDataChangeCallback - * @methodOf ui.grid.class:Grid - * @description Delete the callback identified by the id. - * @param {string} uid the uid of the function that is to be deregistered - */ - Grid.prototype.deregisterDataChangeCallback = function deregisterDataChangeCallback(uid) { - delete this.dataChangeCallbacks[uid]; - }; - - /** - * @ngdoc function - * @name callDataChangeCallbacks - * @methodOf ui.grid.class:Grid - * @description Calls the callbacks based on the type of data change that - * has occurred. Always calls the ALL callbacks, calls the ROW, EDIT, and COLUMN callbacks if the - * event type is matching, or if the type is ALL. - * @param {number} type the type of event that occurred - one of the - * uiGridConstants.dataChange values (ALL, ROW, EDIT, COLUMN) - */ - Grid.prototype.callDataChangeCallbacks = function callDataChangeCallbacks(type, options) { - angular.forEach( this.dataChangeCallbacks, function( callback, uid ){ - if ( callback.types.indexOf( uiGridConstants.dataChange.ALL ) !== -1 || - callback.types.indexOf( type ) !== -1 || - type === uiGridConstants.dataChange.ALL ) { - callback.callback( this ); - } - }, this); - }; - - /** - * @ngdoc function - * @name notifyDataChange - * @methodOf ui.grid.class:Grid - * @description Notifies us that a data change has occurred, used in the public - * api for users to tell us when they've changed data or some other event that - * our watches cannot pick up - * @param {Grid} grid the grid - * @param {string} type the type of event that occurred - one of the - * uiGridConstants.dataChange values (ALL, ROW, EDIT, COLUMN) - */ - Grid.prototype.notifyDataChange = function notifyDataChange(grid, type) { - var constants = uiGridConstants.dataChange; - if ( type === constants.ALL || - type === constants.COLUMN || - type === constants.EDIT || - type === constants.ROW ){ - grid.callDataChangeCallbacks( type ); - } else { - gridUtil.logError("Notified of a data change, but the type was not recognised, so no action taken, type was: " + type); - } - }; - - - /** - * @ngdoc function - * @name columnRefreshCallback - * @methodOf ui.grid.class:Grid - * @description refreshes the grid when a column refresh - * is notified, which triggers handling of the visible flag. - * This is called on uiGridConstants.dataChange.COLUMN, and is - * registered as a dataChangeCallback in grid.js - * @param {string} name column name - */ - Grid.prototype.columnRefreshCallback = function columnRefreshCallback( grid ){ - grid.refresh(); - }; - - - /** - * @ngdoc function - * @name processRowsCallback - * @methodOf ui.grid.class:Grid - * @description calls the row processors, specifically - * intended to reset the sorting when an edit is called, - * registered as a dataChangeCallback on uiGridConstants.dataChange.EDIT - * @param {string} name column name - */ - Grid.prototype.processRowsCallback = function processRowsCallback( grid ){ - grid.refreshRows(); - }; - - - /** - * @ngdoc function - * @name getColumn - * @methodOf ui.grid.class:Grid - * @description returns a grid column for the column name - * @param {string} name column name - */ - Grid.prototype.getColumn = function getColumn(name) { - var columns = this.columns.filter(function (column) { - return column.colDef.name === name; - }); - return columns.length > 0 ? columns[0] : null; - }; - - /** - * @ngdoc function - * @name getColDef - * @methodOf ui.grid.class:Grid - * @description returns a grid colDef for the column name - * @param {string} name column.field - */ - Grid.prototype.getColDef = function getColDef(name) { - var colDefs = this.options.columnDefs.filter(function (colDef) { - return colDef.name === name; - }); - return colDefs.length > 0 ? colDefs[0] : null; - }; - - /** - * @ngdoc function - * @name assignTypes - * @methodOf ui.grid.class:Grid - * @description uses the first row of data to assign colDef.type for any types not defined. - */ - /** - * @ngdoc property - * @name type - * @propertyOf ui.grid.class:GridOptions.columnDef - * @description the type of the column, used in sorting. If not provided then the - * grid will guess the type. Add this only if the grid guessing is not to your - * satisfaction. Refer to {@link ui.grid.service:GridUtil.guessType gridUtil.guessType} for - * a list of values the grid knows about. - * - */ - Grid.prototype.assignTypes = function(){ - var self = this; - self.options.columnDefs.forEach(function (colDef, index) { - - //Assign colDef type if not specified - if (!colDef.type) { - var col = new GridColumn(colDef, index, self); - var firstRow = self.rows.length > 0 ? self.rows[0] : null; - if (firstRow) { - colDef.type = gridUtil.guessType(self.getCellValue(firstRow, col)); - } - else { - gridUtil.logWarn('Unable to assign type from data, so defaulting to string'); - colDef.type = 'string'; - } - } - }); - }; - - /** - * @ngdoc function - * @name addRowHeaderColumn - * @methodOf ui.grid.class:Grid - * @description adds a row header column to the grid - * @param {object} column def - */ - Grid.prototype.addRowHeaderColumn = function addRowHeaderColumn(colDef) { - var self = this; - //self.createLeftContainer(); - var rowHeaderCol = new GridColumn(colDef, self.rowHeaderColumns.length, self); - rowHeaderCol.isRowHeader = true; - if (self.isRTL()) { - self.createRightContainer(); - rowHeaderCol.renderContainer = 'right'; - } - else { - self.createLeftContainer(); - rowHeaderCol.renderContainer = 'left'; - } - - // relies on the default column builder being first in array, as it is instantiated - // as part of grid creation - self.columnBuilders[0](colDef,rowHeaderCol,self.options) - .then(function(){ - rowHeaderCol.enableFiltering = false; - rowHeaderCol.enableSorting = false; - rowHeaderCol.enableHiding = false; - self.rowHeaderColumns.push(rowHeaderCol); - self.buildColumns() - .then( function() { - self.preCompileCellTemplates(); - self.handleWindowResize(); - }); - }); - }; - - /** - * @ngdoc function - * @name buildColumns - * @methodOf ui.grid.class:Grid - * @description creates GridColumn objects from the columnDefinition. Calls each registered - * columnBuilder to further process the column - * @returns {Promise} a promise to load any needed column resources - */ - Grid.prototype.buildColumns = function buildColumns() { - // gridUtil.logDebug('buildColumns'); - var self = this; - var builderPromises = []; - var headerOffset = self.rowHeaderColumns.length; - var i; - - // Remove any columns for which a columnDef cannot be found - // Deliberately don't use forEach, as it doesn't like splice being called in the middle - // Also don't cache columns.length, as it will change during this operation - for (i = 0; i < self.columns.length; i++){ - if (!self.getColDef(self.columns[i].name)) { - self.columns.splice(i, 1); - i--; - } - } - - //add row header columns to the grid columns array _after_ columns without columnDefs have been removed - self.rowHeaderColumns.forEach(function (rowHeaderColumn) { - self.columns.unshift(rowHeaderColumn); - }); - - - // look at each column def, and update column properties to match. If the column def - // doesn't have a column, then splice in a new gridCol - self.options.columnDefs.forEach(function (colDef, index) { - self.preprocessColDef(colDef); - var col = self.getColumn(colDef.name); - - if (!col) { - col = new GridColumn(colDef, gridUtil.nextUid(), self); - self.columns.splice(index + headerOffset, 0, col); - } - else { - col.updateColumnDef(colDef); - } - - self.columnBuilders.forEach(function (builder) { - builderPromises.push(builder.call(self, colDef, col, self.options)); - }); - }); - - return $q.all(builderPromises); - }; - -/** - * @ngdoc function - * @name preCompileCellTemplates - * @methodOf ui.grid.class:Grid - * @description precompiles all cell templates - */ - Grid.prototype.preCompileCellTemplates = function() { - var self = this; - this.columns.forEach(function (col) { - var html = col.cellTemplate.replace(uiGridConstants.MODEL_COL_FIELD, self.getQualifiedColField(col)); - html = html.replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)'); - - - var compiledElementFn = $compile(html); - col.compiledElementFn = compiledElementFn; - - if (col.compiledElementFnDefer) { - col.compiledElementFnDefer.resolve(col.compiledElementFn); - } - }); - }; - - /** - * @ngdoc function - * @name getGridQualifiedColField - * @methodOf ui.grid.class:Grid - * @description Returns the $parse-able accessor for a column within its $scope - * @param {GridColumn} col col object - */ - Grid.prototype.getQualifiedColField = function (col) { - return 'row.entity.' + gridUtil.preEval(col.field); - }; - - /** - * @ngdoc function - * @name createLeftContainer - * @methodOf ui.grid.class:Grid - * @description creates the left render container if it doesn't already exist - */ - Grid.prototype.createLeftContainer = function() { - if (!this.hasLeftContainer()) { - this.renderContainers.left = new GridRenderContainer('left', this, { disableColumnOffset: true }); - } - }; - - /** - * @ngdoc function - * @name createRightContainer - * @methodOf ui.grid.class:Grid - * @description creates the right render container if it doesn't already exist - */ - Grid.prototype.createRightContainer = function() { - if (!this.hasRightContainer()) { - this.renderContainers.right = new GridRenderContainer('right', this, { disableColumnOffset: true }); - } - }; - - /** - * @ngdoc function - * @name hasLeftContainer - * @methodOf ui.grid.class:Grid - * @description returns true if leftContainer exists - */ - Grid.prototype.hasLeftContainer = function() { - return this.renderContainers.left !== undefined; - }; - - /** - * @ngdoc function - * @name hasLeftContainer - * @methodOf ui.grid.class:Grid - * @description returns true if rightContainer exists - */ - Grid.prototype.hasRightContainer = function() { - return this.renderContainers.right !== undefined; - }; - - - /** - * undocumented function - * @name preprocessColDef - * @methodOf ui.grid.class:Grid - * @description defaults the name property from field to maintain backwards compatibility with 2.x - * validates that name or field is present - */ - Grid.prototype.preprocessColDef = function preprocessColDef(colDef) { - if (!colDef.field && !colDef.name) { - throw new Error('colDef.name or colDef.field property is required'); - } - - //maintain backwards compatibility with 2.x - //field was required in 2.x. now name is required - if (colDef.name === undefined && colDef.field !== undefined) { - colDef.name = colDef.field; - } - - }; - - // Return a list of items that exist in the `n` array but not the `o` array. Uses optional property accessors passed as third & fourth parameters - Grid.prototype.newInN = function newInN(o, n, oAccessor, nAccessor) { - var self = this; - - var t = []; - for (var i = 0; i < n.length; i++) { - var nV = nAccessor ? n[i][nAccessor] : n[i]; - - var found = false; - for (var j = 0; j < o.length; j++) { - var oV = oAccessor ? o[j][oAccessor] : o[j]; - if (self.options.rowEquality(nV, oV)) { - found = true; - break; - } - } - if (!found) { - t.push(nV); - } - } - - return t; - }; - - /** - * @ngdoc function - * @name getRow - * @methodOf ui.grid.class:Grid - * @description returns the GridRow that contains the rowEntity - * @param {object} rowEntity the gridOptions.data array element instance - */ - Grid.prototype.getRow = function getRow(rowEntity) { - var rows = this.rows.filter(function (row) { - return row.entity === rowEntity; - }); - return rows.length > 0 ? rows[0] : null; - }; - - - /** - * @ngdoc function - * @name modifyRows - * @methodOf ui.grid.class:Grid - * @description creates or removes GridRow objects from the newRawData array. Calls each registered - * rowBuilder to further process the row - * - * Rows are identified using the gridOptions.rowEquality function - */ - Grid.prototype.modifyRows = function modifyRows(newRawData) { - var self = this, - i, - rowhash, - found, - newRow; - if ((self.options.useExternalSorting || self.getColumnSorting().length === 0) && newRawData.length > 0) { - var oldRowHash = self.rowHashMap; - if (!oldRowHash) { - oldRowHash = {get: function(){return null;}}; - } - self.createRowHashMap(); - rowhash = self.rowHashMap; - var wasEmpty = self.rows.length === 0; - self.rows.length = 0; - for (i = 0; i < newRawData.length; i++) { - var newRawRow = newRawData[i]; - found = oldRowHash.get(newRawRow); - if (found) { - newRow = found.row; - } - else { - newRow = self.processRowBuilders(new GridRow(newRawRow, i, self)); - } - self.rows.push(newRow); - rowhash.put(newRawRow, { - i: i, - entity: newRawRow, - row:newRow - }); - } - //now that we have data, it is save to assign types to colDefs - if (wasEmpty) { - self.assignTypes(); - } - } else { - if (self.rows.length === 0 && newRawData.length > 0) { - if (self.options.enableRowHashing) { - if (!self.rowHashMap) { - self.createRowHashMap(); - } - - for (i = 0; i < newRawData.length; i++) { - newRow = newRawData[i]; - - self.rowHashMap.put(newRow, { - i: i, - entity: newRow - }); - } - } - - self.addRows(newRawData); - //now that we have data, it is save to assign types to colDefs - self.assignTypes(); - } - else if (newRawData.length > 0) { - var unfoundNewRows, unfoundOldRows, unfoundNewRowsToFind; - - // If row hashing is turned on - if (self.options.enableRowHashing) { - // Array of new rows that haven't been found in the old rowset - unfoundNewRows = []; - // Array of new rows that we explicitly HAVE to search for manually in the old row set. They cannot be looked up by their identity (because it doesn't exist). - unfoundNewRowsToFind = []; - // Map of rows that have been found in the new rowset - var foundOldRows = {}; - // Array of old rows that have NOT been found in the new rowset - unfoundOldRows = []; - - // Create the row HashMap if it doesn't exist already - if (!self.rowHashMap) { - self.createRowHashMap(); - } - rowhash = self.rowHashMap; - - // Make sure every new row has a hash - for (i = 0; i < newRawData.length; i++) { - newRow = newRawData[i]; - - // Flag this row as needing to be manually found if it didn't come in with a $$hashKey - var mustFind = false; - if (!self.options.getRowIdentity(newRow)) { - mustFind = true; - } - - // See if the new row is already in the rowhash - found = rowhash.get(newRow); - // If so... - if (found) { - // See if it's already being used by as GridRow - if (found.row) { - // If so, mark this new row as being found - foundOldRows[self.options.rowIdentity(newRow)] = true; - } - } - else { - // Put the row in the hashmap with the index it corresponds to - rowhash.put(newRow, { - i: i, - entity: newRow - }); - - // This row has to be searched for manually in the old row set - if (mustFind) { - unfoundNewRowsToFind.push(newRow); - } - else { - unfoundNewRows.push(newRow); - } - } - } - - // Build the list of unfound old rows - for (i = 0; i < self.rows.length; i++) { - var row = self.rows[i]; - var hash = self.options.rowIdentity(row.entity); - if (!foundOldRows[hash]) { - unfoundOldRows.push(row); - } - } - } - - // Look for new rows - var newRows = unfoundNewRows || []; - - // The unfound new rows is either `unfoundNewRowsToFind`, if row hashing is turned on, or straight `newRawData` if it isn't - var unfoundNew = (unfoundNewRowsToFind || newRawData); - - // Search for real new rows in `unfoundNew` and concat them onto `newRows` - newRows = newRows.concat(self.newInN(self.rows, unfoundNew, 'entity')); - - self.addRows(newRows); - - var deletedRows = self.getDeletedRows((unfoundOldRows || self.rows), newRawData); - - for (i = 0; i < deletedRows.length; i++) { - if (self.options.enableRowHashing) { - self.rowHashMap.remove(deletedRows[i].entity); - } - - self.rows.splice( self.rows.indexOf(deletedRows[i]), 1 ); - } - } - // Empty data set - else { - // Reset the row HashMap - self.createRowHashMap(); - - // Reset the rows length! - self.rows.length = 0; - } - } - - var p1 = $q.when(self.processRowsProcessors(self.rows)) - .then(function (renderableRows) { - return self.setVisibleRows(renderableRows); - }); - - var p2 = $q.when(self.processColumnsProcessors(self.columns)) - .then(function (renderableColumns) { - return self.setVisibleColumns(renderableColumns); - }); - - return $q.all([p1, p2]); - }; - - Grid.prototype.getDeletedRows = function(oldRows, newRows) { - var self = this; - - var olds = oldRows.filter(function (oldRow) { - return !newRows.some(function (newItem) { - return self.options.rowEquality(newItem, oldRow.entity); - }); - }); - // var olds = self.newInN(newRows, oldRows, null, 'entity'); - // dump('olds', olds); - return olds; - }; - - /** - * Private Undocumented Method - * @name addRows - * @methodOf ui.grid.class:Grid - * @description adds the newRawData array of rows to the grid and calls all registered - * rowBuilders. this keyword will reference the grid - */ - Grid.prototype.addRows = function addRows(newRawData) { - var self = this; - - var existingRowCount = self.rows.length; - for (var i = 0; i < newRawData.length; i++) { - var newRow = self.processRowBuilders(new GridRow(newRawData[i], i + existingRowCount, self)); - - if (self.options.enableRowHashing) { - var found = self.rowHashMap.get(newRow.entity); - if (found) { - found.row = newRow; - } - } - - self.rows.push(newRow); - } - }; - - /** - * @ngdoc function - * @name processRowBuilders - * @methodOf ui.grid.class:Grid - * @description processes all RowBuilders for the gridRow - * @param {GridRow} gridRow reference to gridRow - * @returns {GridRow} the gridRow with all additional behavior added - */ - Grid.prototype.processRowBuilders = function processRowBuilders(gridRow) { - var self = this; - - self.rowBuilders.forEach(function (builder) { - builder.call(self, gridRow, self.options); - }); - - return gridRow; - }; - - /** - * @ngdoc function - * @name registerStyleComputation - * @methodOf ui.grid.class:Grid - * @description registered a styleComputation function - * - * If the function returns a value it will be appended into the grid's `
    " - ); - - - $templateCache.put('ui-grid/uiGridCell', - "
    {{COL_FIELD CUSTOM_FILTERS}}
    " - ); - - - $templateCache.put('ui-grid/uiGridColumnFilter', - "
  •  
     
  • " - ); - - - $templateCache.put('ui-grid/uiGridColumnMenu', - "
    " - ); - - - $templateCache.put('ui-grid/uiGridFooterCell', - "
    {{ col.getAggregationValue() }}
    " - ); - - - $templateCache.put('ui-grid/uiGridHeaderCell', - "
     
    {{ col.displayName CUSTOM_FILTERS }}  
     
     
    " - ); - - - $templateCache.put('ui-grid/uiGridMenu', - "
    " - ); - - - $templateCache.put('ui-grid/uiGridMenuItem', - "
  • {{ title }}
  • " - ); - - - $templateCache.put('ui-grid/uiGridRenderContainer', - "
    " - ); - - - $templateCache.put('ui-grid/uiGridViewport', - "
    " - ); - - - $templateCache.put('ui-grid/cellEditor', - "
    " - ); - - - $templateCache.put('ui-grid/dropdownEditor', - "
    " - ); - - - $templateCache.put('ui-grid/expandableRow', - "
    " - ); - - - $templateCache.put('ui-grid/expandableRowHeader', - "
    " - ); - - - $templateCache.put('ui-grid/expandableScrollFiller', - "
    " - ); - - - $templateCache.put('ui-grid/csvLink', - "LINK_LABEL" - ); - - - $templateCache.put('ui-grid/importerMenuItem', - "
  • " - ); - - - $templateCache.put('ui-grid/importerMenuItemContainer', - "
    " - ); - - - $templateCache.put('ui-grid/ui-grid-paging', - "
    0\">/ {{currentMaxPages}}
     {{sizesLabel}}
    0\">{{showingLow}} - {{showingHigh}} of {{grid.options.totalItems}} {{totalItemsLabel}}
    " - ); - - - $templateCache.put('ui-grid/columnResizer', - "
    " - ); - - - $templateCache.put('ui-grid/selectionHeaderCell', - "
     
    " - ); - - - $templateCache.put('ui-grid/selectionRowHeader', - "
    " - ); - - - $templateCache.put('ui-grid/selectionRowHeaderButtons', - "
     
    " - ); - - - $templateCache.put('ui-grid/selectionSelectAllButtons', - "
     
    " - ); - -}]); diff --git a/src/main/resources/META-INF/resources/designer/lib/ui-grid-unstable.min.js b/src/main/resources/META-INF/resources/designer/lib/ui-grid-unstable.min.js deleted file mode 100644 index 680a65a9..00000000 --- a/src/main/resources/META-INF/resources/designer/lib/ui-grid-unstable.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! ui-grid - v3.0.0-rc.16-234dd76 - 2014-11-22 -* Copyright (c) 2014 ; License: MIT */ -!function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{LOG_DEBUG_MESSAGES:!0,LOG_WARN_MESSAGES:!0,LOG_ERROR_MESSAGES:!0,CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,MODEL_COL_FIELD:/MODEL_COL_FIELD/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart"},keymap:{TAB:9,STRG:17,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["ƒ","$","£","$","¤","¥","៛","₩","₱","฿","₫"],dataChange:{ALL:"all",EDIT:"edit",ROW:"row",COLUMN:"column"},scrollbars:{NEVER:0,ALWAYS:1,WHEN_NEEDED:2}})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$parse","gridUtil","uiGridConstants",function(a,b,c,d){var e={priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(b,e,f,g){function h(){var a=b.col.compiledElementFn;a(b,function(a){e.append(a)})}if(g&&b.col.compiledElementFn)h();else if(g&&!b.col.compiledElementFn)b.col.getCompiledElementFn().then(function(a){a(b,function(a){e.append(a)})});else{var i=b.col.cellTemplate.replace(d.MODEL_COL_FIELD,"row.entity."+c.preEval(b.col.field)).replace(d.COL_FIELD,"grid.getCellValue(row, col)"),j=a(i)(b);e.append(j)}},post:function(a,b){b.addClass(a.col.getColClass(!1));var c,e=function(){var d=b;c&&(d.removeClass(c),c=null),c=angular.isFunction(a.col.cellClass)?a.col.cellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.cellClass,d.addClass(c)};a.col.cellClass&&e();var f=a.grid.registerDataChangeCallback(e,[d.dataChange.COLUMN,d.dataChange.EDIT]),g=function(){a.grid.deregisterDataChangeCallback(f)};a.$on("$destroy",g)}}}};return e}]),function(){angular.module("ui.grid").service("uiGridColumnMenuService",["i18nService","uiGridConstants","gridUtil",function(a,b,c){var d={initialize:function(a,b){a.grid=b.grid,b.columnMenuScope=a,a.menuShown=!1},setColMenuItemWatch:function(a){var b=a.$watch("col.menuItems",function(b){"undefined"!=typeof b&&b&&angular.isArray(b)?(b.forEach(function(b){"undefined"!=typeof b.context&&b.context||(b.context={}),b.context.col=a.col}),a.menuItems=a.defaultMenuItems.concat(b)):a.menuItems=a.defaultMenuItems});a.$on("$destroy",b)},sortable:function(a){return a.grid.options.enableSorting&&"undefined"!=typeof a.col&&a.col&&a.col.enableSorting?!0:!1},isActiveSort:function(a,b){return"undefined"!=typeof a.col&&"undefined"!=typeof a.col.sort&&"undefined"!=typeof a.col.sort.direction&&a.col.sort.direction===b},suppressRemoveSort:function(a){return a.col&&a.col.colDef&&a.col.colDef.suppressRemoveSort?!0:!1},hideable:function(a){return"undefined"!=typeof a.col&&a.col&&a.col.colDef&&a.col.colDef.enableHiding===!1?!1:!0},getDefaultMenuItems:function(c){return[{title:a.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(a){a.stopPropagation(),c.sortColumn(a,b.ASC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.ASC)}},{title:a.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(a){a.stopPropagation(),c.sortColumn(a,b.DESC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.DESC)}},{title:a.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),c.unsortColumn()},shown:function(){return d.sortable(c)&&"undefined"!=typeof c.col&&"undefined"!=typeof c.col.sort&&"undefined"!=typeof c.col.sort.direction&&null!==c.col.sort.direction&&!d.suppressRemoveSort(c)}},{title:a.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",shown:function(){return d.hideable(c)},action:function(a){a.stopPropagation(),c.hideColumn()}}]},getColumnElementPosition:function(a,b,d){var e={};return e.left=d[0].offsetLeft,e.top=d[0].offsetTop,e.offset=0,b.grid.options.offsetLeft&&(e.offset=b.grid.options.offsetLeft),e.height=c.elementHeight(d,!0),e.width=c.elementWidth(d,!0),e},repositionMenu:function(a,b,d,e,f){var g=e[0].querySelectorAll(".ui-grid-menu"),h=b.renderContainer?b.renderContainer:"body",i=(b.grid.renderContainers[h],c.closestElm(f,".ui-grid-render-container")),j=i.getBoundingClientRect().left-a.grid.element[0].getBoundingClientRect().left,k=i.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,l=b.lastMenuWidth?b.lastMenuWidth:a.lastMenuWidth?a.lastMenuWidth:170,m=b.lastMenuPaddingRight?b.lastMenuPaddingRight:a.lastMenuPaddingRight?a.lastMenuPaddingRight:10;if(0!==g.length){var n=g[0].querySelectorAll(".ui-grid-menu-mid");0===n.length||angular.element(n).hasClass("ng-hide")||(l=c.elementWidth(g,!0),a.lastMenuWidth=l,b.lastMenuWidth=l,m=parseInt(c.getStyles(angular.element(g)[0]).paddingRight,10),a.lastMenuPaddingRight=m,b.lastMenuPaddingRight=m)}var o=d.left+j-k+d.width-l+m;og||h(a)}),a.$on("$destroy",function(){b.cancel(p)})),a.filterable){var r=[];angular.forEach(a.col.filters,function(b,c){r.push(a.$watch("col.filters["+c+"].term",function(a,b){a!==b&&(i.grid.api.core.raise.filterChanged(),i.grid.refresh().then(function(){i.prevScrollArgs&&i.prevScrollArgs.y&&i.prevScrollArgs.y.percentage&&i.fireScrollingEvent({y:{percentage:i.prevScrollArgs.y.percentage}})}))}))}),a.$on("$destroy",function(){angular.forEach(r,function(a){a()})})}}}}};return h}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d){var e="ui-grid/ui-grid-header",f="ui-grid/ui-grid-no-header";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,c,g,h){var i=h[0],j=h[1];a.grid=i.grid,a.colContainer=j.colContainer,a.getExternalScopes=i.getExternalScopes,j.header=c,j.colContainer.header=c;var k;k=a.grid.options.hideHeader?f:a.grid.options.headerTemplate?a.grid.options.headerTemplate:e,d.getTemplate(k).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.replaceWith(f),j.header=f,j.colContainer.header=f,c=f,j){var g=c[0].getElementsByClassName("ui-grid-header-viewport")[0];g&&(j.headerViewport=g)}})},post:function(a,b,c,e){function f(){var a=h.colContainer.getViewportWidth();"undefined"!=typeof g.grid.verticalScrollbarWidth&&void 0!==g.grid.verticalScrollbarWidth&&g.grid.verticalScrollbarWidth>0&&(a+=g.grid.verticalScrollbarWidth);var b=h.colContainer.visibleColumnCache,c=0,e=0,f=0,j=a,k=!1,l=function(b){return"manual"===b.widthType?+b.width:"percent"===b.widthType?parseInt(b.width.replace(/%/g,""),10)*a/100:"auto"===b.widthType?(0===f&&(f=parseInt(j/e,10)),b.width.length*f):void 0};b.forEach(function(a){a.widthType=null,isFinite(+a.width)?a.widthType="manual":d.endsWith(a.width,"%")?(a.widthType="percent",k=!0):angular.isString(a.width)&&-1!==a.width.indexOf("*")&&(a.widthType="auto",e+=a.width.length,k=!0)});var m=["manual","percent","auto"];if(b.filter(function(a){return a.visible&&a.widthType}).sort(function(a,b){return m.indexOf(a.widthType)-m.indexOf(b.widthType)}).forEach(function(a){var b=l(a);a.minWidth&&(b=Math.max(b,a.minWidth)),a.maxWidth&&(b=Math.min(b,a.maxWidth)),a.drawnWidth=Math.floor(b),c+=a.drawnWidth,j-=a.drawnWidth}),k&&j>0&&c>0&&a>c){var n=function(a){j>0&&("auto"===a.widthType||"percent"===a.widthType)&&(a.drawnWidth=a.drawnWidth+1,c+=1,j--)},o=0;do o=j,b.forEach(n);while(j>0&&j!==o)}c=Math.max(c,a);var p="";return b.forEach(function(a){p+=a.getColClassDefinition()}),i.verticalScrollbarWidth&&(c+=i.verticalScrollbarWidth),b.length>0&&(b[b.length-1].headerWidth=b[b.length-1].drawnWidth-30),h.colContainer.canvasWidth=parseInt(c,10),p}var g=e[0],h=e[1],i=g.grid;d.disableAnimations(b),h.header=b;var j=b[0].getElementsByClassName("ui-grid-header-viewport")[0];j&&(h.headerViewport=j),g&&g.grid.registerStyleComputation({priority:5,func:f})}}}}}])}(),function(){angular.module("ui.grid").service("uiGridGridMenuService",["gridUtil","i18nService",function(a,b){var c={initialize:function(a,b){b.gridMenuScope=a,a.grid=b,a.registeredMenuItems=[],a.$on("$destroy",function(){a.grid&&a.grid.gridMenuScope&&(a.grid.gridMenuScope=null),a.grid&&(a.grid=null),a.registeredMenuItems&&(a.registeredMenuItems=null)}),a.registeredMenuItems=[],b.api.registerMethod("core","addToGridMenu",c.addToGridMenu),b.api.registerMethod("core","removeFromGridMenu",c.removeFromGridMenu)},addToGridMenu:function(b,c){angular.isArray(c)?b.gridMenuScope?(b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems?b.gridMenuScope.registeredMenuItems:[],b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems.concat(c)):a.logError("Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid"):a.logError("addToGridMenu: menuItems must be an array, and is not, not adding any items")},removeFromGridMenu:function(b,c){var d=-1;b&&b.gridMenuScope&&b.gridMenuScope.registeredMenuItems.forEach(function(b,e){b.id===c&&(d>-1?a.logError("removeFromGridMenu: found multiple items with the same id, removing only the last"):d=e)}),d>-1&&b.gridMenuScope.registeredMenuItems.splice(d,1)},getMenuItems:function(b){var d=[];return b.grid.options.gridMenuCustomItems&&(angular.isArray(b.grid.options.gridMenuCustomItems)?d=d.concat(b.grid.options.gridMenuCustomItems):a.logError("gridOptions.gridMenuCustomItems must be an array, and is not")),d=d.concat(b.registeredMenuItems),b.grid.options.gridMenuShowHideColumns!==!1&&(d=d.concat(c.showHideColumns(b))),d},showHideColumns:function(a){var d=[];return a.grid.options.columnDefs&&0!==a.grid.options.columnDefs.length&&0!==a.grid.columns.length?(d.push({title:b.getSafeText("gridMenu.columns")}),a.grid.options.gridMenuTitleFilter=a.grid.options.gridMenuTitleFilter?a.grid.options.gridMenuTitleFilter:function(a){return a},a.grid.options.columnDefs.forEach(function(b){if(b.enableHiding!==!1){var e={icon:"ui-grid-icon-ok",action:function(a){a.stopPropagation(),c.toggleColumnVisibility(this.context.gridCol)},shown:function(){return this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible},context:{gridCol:a.grid.getColumn(b.name||b.field)}};c.setMenuItemTitle(e,b,a.grid),d.push(e),e={icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),c.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!(this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible)},context:{gridCol:a.grid.getColumn(b.name||b.field)}},c.setMenuItemTitle(e,b,a.grid),d.push(e)}}),d):d},setMenuItemTitle:function(b,c,d){var e=d.options.gridMenuTitleFilter(c.displayName||c.name||c.field);"string"==typeof e?b.title=e:e.then?(b.title="",e.then(function(a){b.title=a},function(a){b.title=a})):(a.logError("Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config"),b.title="badconfig")},toggleColumnVisibility:function(a){a.colDef.visible=!(a.colDef.visible===!0||void 0===a.colDef.visible),a.grid.refresh()}};return c}]).directive("uiGridMenuButton",["gridUtil","uiGridConstants","uiGridGridMenuService",function(a,b,c){return{priority:0,scope:!0,require:["?^uiGrid"],templateUrl:"ui-grid/ui-grid-menu-button",replace:!0,link:function(a,b,d,e){var f=e[0];c.initialize(a,f.grid),a.shown=!1,a.toggleMenu=function(){a.shown?(a.$broadcast("hide-menu"),a.shown=!1):(a.menuItems=c.getMenuItems(a),a.$broadcast("show-menu"),a.shown=!0)},a.$on("menu-hidden",function(){a.shown=!1})}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants",function(a,b,c,d,e,f){var g={priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(a){var d=this;d.showMenu=a.showMenu=function(c,d){a.shown?a.shownMid||(a.shownMid=!0,a.$emit("menu-shown")):(a.shown=!0,b(function(){a.shownMid=!0,a.$emit("menu-shown")}));var f="click";d&&d.originalEvent&&d.originalEvent.type&&"touchstart"===d.originalEvent.type&&(f=d.originalEvent.type),angular.element(document).off("click touchstart",e),b(function(){angular.element(document).on(f,e)})},d.hideMenu=a.hideMenu=function(){a.shown&&(a.shownMid=!1,b(function(){a.shownMid||(a.shown=!1,a.$emit("menu-hidden"))},200)),angular.element(document).off("click touchstart",e)},a.$on("hide-menu",function(b,c){a.hideMenu(b,c)}),a.$on("show-menu",function(b,c){a.showMenu(b,c)});var e=function(){a.shown&&a.$apply(function(){a.hideMenu()})};("undefined"==typeof a.autoHide||void 0===a.autoHide)&&(a.autoHide=!0),a.autoHide&&angular.element(c).on("resize",e),a.$on("$destroy",function(){angular.element(document).off("click touchstart",e)}),a.$on("$destroy",function(){angular.element(c).off("resize",e)}),a.$on("$destroy",a.$on(f.events.GRID_SCROLL,e)),a.$on("$destroy",a.$on(f.events.ITEM_DRAGGING,e))},controller:["$scope","$element","$attrs",function(){}]};return g}]).directive("uiGridMenuItem",["gridUtil","$compile","i18nService",function(a,b,c){var d={priority:0,scope:{title:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"="},require:["?^uiGrid","^uiGridMenu"],templateUrl:"ui-grid/uiGridMenuItem",replace:!0,compile:function(){return{pre:function(c,d,e,f){f[0],f[1];c.templateUrl&&a.getTemplate(c.templateUrl).then(function(a){var e=angular.element(a),f=b(e)(c);d.replaceWith(f)})},post:function(a,b,d,e){{var f=e[0];e[1]}("undefined"==typeof a.shown||null===a.shown)&&(a.shown=function(){return!0}),a.itemShown=function(){var b={};return a.context&&(b.context=a.context),"undefined"!=typeof f&&f&&(b.grid=f.grid),a.shown.call(b)},a.itemAction=function(b,c){if(b.stopPropagation(),"function"==typeof a.action){var d={};a.context&&(d.context=a.context),"undefined"!=typeof f&&f&&(d.grid=f.grid),a.action.call(d,b,c),a.$emit("hide-menu")}},a.i18n=c.get()}}}};return d}])}(),function(){angular.module("ui.grid").directive("uiGridNativeScrollbar",["$timeout","$document","uiGridConstants","gridUtil",function(a,b,c,d){var e=d.getScrollbarWidth();angular.isNumber(e)||(e=0);var f=d.detectBrowser();return"ie"===f&&(e+=1),{scope:{type:"@"},require:["^uiGrid","^uiGridRenderContainer"],link:function(a,b,f,g){function h(){var a=n.getViewportHeight(),b=n.getCanvasHeight(),d=o.headerHeight?o.headerHeight:p.headerHeight,e=p.options.enableVerticalScrollbar===c.scrollbars.WHEN_NEEDED?"overflow-y:auto;":"",f=".grid"+p.id+" .ui-grid-render-container-"+m.containerId+" .ui-grid-native-scrollbar.vertical .contents { height: "+b+"px; }";return f+="\n .grid"+p.id+" .ui-grid-render-container-"+m.containerId+" .ui-grid-native-scrollbar.vertical { height: "+a+"px; top: "+d+"px;"+e+"}",s=b,f}function i(){var a=o.getCanvasWidth(),b=u;p.options.showFooter&&(b-=1);var d=o.getViewportAdjustment();b-=d.height;var e=p.options.enableHorizontalScrollbar===c.scrollbars.WHEN_NEEDED?"overflow-x:auto":"",f=".grid"+p.id+" .ui-grid-render-container-"+m.containerId+" .ui-grid-native-scrollbar.horizontal { bottom: "+b+"px;"+e+" }";return f+=".grid"+p.id+" .ui-grid-render-container-"+m.containerId+" .ui-grid-native-scrollbar.horizontal .contents { width: "+a+"px; }",s=a,f}function j(){if("vertical"===a.type){p.flagScrollingVertically();var c=b[0].scrollTop,e=n.getCanvasHeight()-n.getViewportHeight();p.horizontalScrollbarHeight&&p.horizontalScrollbarHeight>0&&(e-=l.grid.horizontalScrollbarHeight);var f=c/e;f>1&&(f=1),0>f&&(f=0);var g={target:b,y:{percentage:f}};a.scrollSource?a.scrollSource=null:l.fireScrollingEvent(g),r=c}else if("horizontal"===a.type){p.flagScrollingHorizontally();var h=d.normalizeScrollLeft(b),i=o.getCanvasWidth()-o.getViewportWidth(),j=h/i,k={target:b,x:{percentage:j}};a.scrollSource?a.scrollSource=null:l.fireScrollingEvent(k),r=h}}function k(c,e){if(!e.target||e.target!==b&&!angular.element(e.target).hasClass("ui-grid-native-scrollbar"))if(a.scrollSource=e.target,"vertical"===a.type){if(e.y&&"undefined"!=typeof e.y.percentage&&void 0!==e.y.percentage){p.flagScrollingVertically();var f=n.getCanvasHeight()-n.getViewportHeight(),g=Math.max(0,e.y.percentage*f);b[0].scrollTop=g}}else if("horizontal"===a.type&&e.x&&"undefined"!=typeof e.x.percentage&&void 0!==e.x.percentage){p.flagScrollingHorizontally();var h=o.getCanvasWidth()-o.getViewportWidth(),i=Math.max(0,e.x.percentage*h);b[0].scrollLeft=d.denormalizeScrollLeft(b,i)}}var l=g[0],m=g[1],n=m.rowContainer,o=m.colContainer,p=l.grid,q=angular.element('
     
    ');b.addClass("ui-grid-native-scrollbar");var r,s=0;"vertical"===a.type?(b.css("width",e+"px"),b.addClass("vertical"),p.verticalScrollbarWidth=p.options.enableVerticalScrollbar===c.scrollbars.WHEN_NEEDED?0:e,o.verticalScrollbarWidth=p.verticalScrollbarWidth,r=b[0].scrollTop):"horizontal"===a.type&&(b.css("height",e+"px"),b.addClass("horizontal"),p.horizontalScrollbarHeight=p.options.enableHorizontalScrollbar===c.scrollbars.WHEN_NEEDED?0:e,n.horizontalScrollbarHeight=p.horizontalScrollbarHeight,r=d.normalizeScrollLeft(b)),b.append(q),"vertical"===a.type?s=d.elementHeight(b):"horizontal"===a.type&&(s=d.elementWidth(b));var t=d.closestElm(b,".ui-grid"),u=d.getBorderSize(t,"bottom");"vertical"===a.type?p.registerStyleComputation({priority:6,func:h}):"horizontal"===a.type&&p.registerStyleComputation({priority:6,func:i}),a.scrollSource=null,b.on("scroll",j),b.on("$destroy",function(){b.off("scroll")});var v=a.$on(c.events.GRID_SCROLL,k);a.$on("$destroy",v)}}}])}(),function(){"use strict";var a=angular.module("ui.grid");a.directive("uiGridRenderContainer",["$timeout","$document","uiGridConstants","gridUtil",function(a,b,c,d){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableVerticalScrollbar:"=",enableHorizontalScrollbar:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=a.grid=e.grid;if(!a.rowContainerName)throw"No row render container name specified";if(!a.colContainerName)throw"No column render container name specified";if(!g.renderContainers[a.rowContainerName])throw"Row render container '"+a.rowContainerName+"' is not registered.";if(!g.renderContainers[a.colContainerName])throw"Column render container '"+a.colContainerName+"' is not registered.";var h=a.rowContainer=g.renderContainers[a.rowContainerName],i=a.colContainer=g.renderContainers[a.colContainerName];f.containerId=a.containerId,f.rowContainer=h,f.colContainer=i},post:function(e,f,g,h){function i(a,b){if(b.y&&e.bindScrollVertical){n.prevScrollArgs=b;var c=p.getCanvasHeight()-p.getViewportHeight();o.horizontalScrollbarHeight&&o.horizontalScrollbarHeight>0&&(c+=o.horizontalScrollbarHeight);var f,g=n.viewport[0].scrollTop;if("undefined"!=typeof b.y.percentage&&void 0!==b.y.percentage)f=b.y.percentage;else{if("undefined"==typeof b.y.pixels||void 0===b.y.pixels)throw new Error("No percentage or pixel value provided for scroll event Y axis");f=b.y.percentage=(g+b.y.pixels)/c}var h=Math.max(0,f*c);n.viewport[0].scrollTop=h,n.prevScrollArgs.y.pixels=h-g}if(b.x&&e.bindScrollHorizontal){n.prevScrollArgs=b;var i,j=q.getCanvasWidth()-q.getViewportWidth(),k=d.normalizeScrollLeft(n.viewport);if("undefined"!=typeof b.x.percentage&&void 0!==b.x.percentage)i=b.x.percentage;else{if("undefined"==typeof b.x.pixels||void 0===b.x.pixels)throw new Error("No percentage or pixel value provided for scroll event X axis");i=b.x.percentage=(k+b.x.pixels)/j}var l=Math.max(0,i*j);n.viewport[0].scrollLeft=d.denormalizeScrollLeft(n.viewport,l),n.prevScrollLeft=l,n.headerViewport&&(n.headerViewport.scrollLeft=d.denormalizeScrollLeft(n.headerViewport,l)),n.footerViewport&&(n.footerViewport.scrollLeft=d.denormalizeScrollLeft(n.footerViewport,l)),n.prevScrollArgs.x.pixels=l-k}}function j(a){a.originalEvent&&(a=a.originalEvent),a.preventDefault();var b,c,d,e;d=a.targetTouches[0].screenX,e=a.targetTouches[0].screenY,b=-(d-v),c=-(e-u),y=1>c?-1:1,z=1>b?-1:1,c*=2,b*=2;var f={target:a.target};if(0!==c){var g=(w+c)/(p.getCanvasHeight()-p.getViewportHeight());g>1?g=1:0>g&&(g=0),f.y={percentage:g,pixels:c}}if(0!==b){var h=(x+b)/(q.getCanvasWidth()-q.getViewportWidth());h>1?h=1:0>h&&(h=0),f.x={percentage:h,pixels:b}}m.fireScrollingEvent(f)}function k(c){function d(){a(function(){var a={target:c.target};if(0!==u){var b=(n.viewport[0].scrollTop+u)/(p.getCanvasHeight()-p.getViewportHeight());a.y={percentage:b,pixels:u}}if(0!==v){var e=(n.viewport[0].scrollLeft+v)/(q.getCanvasWidth()-q.getViewportWidth());a.x={percentage:e,pixels:v}}m.fireScrollingEvent(a),s-=1,u/=2,v/=2,s>0?d():m.scrollbars.forEach(function(a){a.removeClass("ui-grid-scrollbar-visible"),a.removeClass("ui-grid-scrolling")})},r)}c.originalEvent&&(c=c.originalEvent),c.preventDefault(),b.unbind("touchmove",j),b.unbind("touchend",k),b.unbind("touchcancel",k);var e=n.viewport[0].scrollTop,f=n.viewport[0].scrollTop,g=Math.abs(e-w),h=Math.abs(f-x),i=new Date-t,l=g/i,o=h/i,r=63,s=8,u=120*y*l,v=120*z*o;d()}function l(){var a="",b=q.getCanvasWidth(),c=q.getViewportWidth(),d=p.getCanvasHeight(),f=p.getViewportHeight(),g=q.getHeaderViewportWidth(),h=q.getHeaderViewportWidth();return a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-canvas { width: "+b+"px; height: "+d+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-header-canvas { width: "+b+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-viewport { width: "+c+"px; height: "+f+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-header-viewport { width: "+g+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-footer-canvas { width: "+b+"px; }",a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-footer-viewport { width: "+h+"px; }",void 0!==r.explicitHeaderHeight&&null!==r.explicitHeaderHeight&&r.explicitHeaderHeight>0?a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-header-cell { height: "+r.explicitHeaderHeight+"px; }":void 0!==r.innerHeaderHeight&&null!==r.innerHeaderHeight&&r.innerHeaderHeight>0&&(a+="\n .grid"+m.grid.id+" .ui-grid-render-container-"+e.containerId+" .ui-grid-header-cell { height: "+r.innerHeaderHeight+"px; }"),a}var m=h[0],n=h[1],o=m.grid,p=n.rowContainer,q=n.colContainer,r=o.renderContainers[e.containerId];f.addClass("ui-grid-render-container-"+e.containerId);var s;(e.bindScrollHorizontal||e.bindScrollVertical)&&(s=e.$on(c.events.GRID_SCROLL,i)),f.bind("wheel mousewheel DomMouseScroll MozMousePixelScroll",function(a){a.preventDefault();var b=d.normalizeWheelEvent(a),c={target:f};if(0!==b.deltaY){var e=-120*b.deltaY,g=(n.viewport[0].scrollTop+e)/(p.getCanvasHeight()-p.getViewportHeight());0>g?g=0:g>1&&(g=1),c.y={percentage:g,pixels:e}}if(0!==b.deltaX){var h=-120*b.deltaX,i=d.normalizeScrollLeft(n.viewport),j=(i+h)/(q.getCanvasWidth()-q.getViewportWidth());0>j?j=0:j>1&&(j=1),c.x={percentage:j,pixels:h}}m.fireScrollingEvent(c)});var t,u=0,v=0,w=0,x=0,y=1,z=1;d.isTouchEnabled()&&f.bind("touchstart",function(a){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),m.scrollbars.forEach(function(a){a.addClass("ui-grid-scrollbar-visible"),a.addClass("ui-grid-scrolling")}),t=new Date,u=a.targetTouches[0].screenY,v=a.targetTouches[0].screenX,w=n.viewport[0].scrollTop,x=n.viewport[0].scrollLeft,b.on("touchmove",j),b.on("touchend touchcancel",k)}),f.bind("$destroy",function(){s(),f.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(a){f.unbind(a)})}),m.grid.registerStyleComputation({priority:6,func:l})}}}}}]),a.controller("uiGridRenderContainer",["$scope","gridUtil",function(a){var b=this;b.rowStyle=function(c){var d=a.grid.renderContainers[a.containerId],e={};if(!d.disableRowOffset&&0===c&&0!==b.currentTopRow){var f=a.rowContainer.currentTopRow*a.rowContainer.visibleRowCache[a.rowContainer.currentTopRow].height;e["margin-top"]=f+"px"}return d.disableColumnOffset||0===a.colContainer.currentFirstColumn||(a.grid.isRTL()?e["margin-right"]=a.colContainer.columnOffset+"px":e["margin-left"]=a.colContainer.columnOffset+"px"),e},b.columnStyle=function(b){var c=a.grid.renderContainers[a.containerId];if(!c.disableColumnOffset&&0===b&&0!==a.colContainer.currentFirstColumn){var d=a.colContainer.columnOffset;return a.grid.isRTL()?{"margin-right":d+"px"}:{"margin-left":d+"px"}}return null}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["gridUtil",function(){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=e.grid;a.grid=e.grid,a.colContainer=f.colContainer,g.getRowTemplateFn.then(function(c){c(a,function(a){b.replaceWith(a)})})},post:function(a,b,c,d){{var e=d[0];d[1]}a.getExternalScopes=e.getExternalScopes}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["gridUtil","$interpolate",function(a,b){return{link:function(a,c){var d=b(c.text(),!0);d&&a.$watch(d,function(a){c.text(a)})}}}])}(),function(){"use strict"; -angular.module("ui.grid").directive("uiGridViewport",["gridUtil",function(a){return{replace:!0,scope:{},templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(b,c,d,e){var f=e[0],g=e[1];b.containerCtrl=g;{var h=g.rowContainer,i=g.colContainer;f.grid}b.grid=f.grid,b.rowContainer=g.rowContainer,b.colContainer=g.colContainer,g.viewport=c,c.on("scroll",function(){var d=c[0].scrollTop,e=a.normalizeScrollLeft(c),g=-1,j=-1;if(e!==i.prevScrollLeft){var k=(e-i.prevScrollLeft,i.getCanvasWidth()-i.getViewportWidth());g=e/k,i.adjustScrollHorizontal(e,g)}if(d!==h.prevScrollTop){var l=(d-h.prevScrollTop,h.getCanvasHeight()-h.getViewportHeight());j=d/l,j>1&&(j=1),0>j&&(j=0),h.adjustScrollVertical(d,j)}if(!b.grid.isScrollingVertically&&!b.grid.isScrollingHorizontally){var m={};g>-1&&(m.x={percentage:g}),j>-1&&(m.y={percentage:j}),f.fireScrollingEvent(m)}})}}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(a,b,c){a.$watch(c.uiGridVisible,function(a){b[a?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";angular.module("ui.grid").controller("uiGridController",["$scope","$element","$attrs","gridUtil","$q","uiGridConstants","$templateCache","gridClassFactory","$timeout","$parse","$compile",function(a,b,c,d,e,f,g,h,i,j,k){function l(a,b){a&&a!==b&&(n.grid.options.columnDefs=a,n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates(),n.grid.callDataChangeCallbacks(f.dataChange.COLUMN)}))}function m(b){var d=[];b&&(n.grid.columns.length===(n.grid.rowHeaderColumns?n.grid.rowHeaderColumns.length:0)&&!c.uiGridColumns&&0===n.grid.options.columnDefs.length&&b.length>0&&n.grid.buildColumnDefsFromData(b),(n.grid.options.columnDefs.length>0||b.length>0)&&d.push(n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates()})),e.all(d).then(function(){n.grid.modifyRows(b).then(function(){n.grid.redrawInPlace(),a.$evalAsync(function(){n.grid.refreshCanvas(!0),n.grid.callDataChangeCallbacks(f.dataChange.ROW)})})}))}var n=this;n.grid=h.createGrid(a.uiGrid),b.addClass("grid"+n.grid.id),n.grid.rtl="rtl"===d.getStyles(b[0]).direction,n.getExternalScopes=a.getExternalScopes,a.grid=n.grid,c.uiGridColumns&&c.$observe("uiGridColumns",function(a){n.grid.options.columnDefs=a,n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates(),n.grid.refreshCanvas(!0)})});var o;o=angular.isString(a.uiGrid.data)?a.$parent.$watchCollection(a.uiGrid.data,m):a.$parent.$watchCollection(function(){return a.uiGrid.data},m);var p=a.$parent.$watchCollection(function(){return a.uiGrid.columnDefs},l);a.$on("$destroy",function(){o(),p()}),a.$watch(function(){return n.grid.styleComputations},function(){n.grid.refreshCanvas(!0)}),n.fireScrollingEvent=d.throttle(function(b){a.$broadcast(f.events.GRID_SCROLL,b)},n.grid.options.scrollThrottle,{trailing:!0}),n.fireEvent=function(b,c){("undefined"==typeof c||void 0===c)&&(c={}),("undefined"==typeof c.grid||void 0===c.grid)&&(c.grid=n.grid),a.$broadcast(b,c)},n.innerCompile=function(b){k(b)(a)}}]),angular.module("ui.grid").directive("uiGrid",["$compile","$templateCache","gridUtil","$window",function(a,b,c,d){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"=",getExternalScopes:"&?externalScopes"},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(a,b,e,f){function g(){h.gridWidth=a.gridWidth=c.elementWidth(b),h.gridHeight=a.gridHeight=c.elementHeight(b),h.queueRefresh()}var h=f.grid;if(f.scrollbars=[],h.renderingComplete(),h.element=b,h.gridWidth=a.gridWidth=c.elementWidth(b),h.canvasWidth=f.grid.gridWidth,h.gridHeight=a.gridHeight=c.elementHeight(b),h.gridHeightm&&(m=1):a.hasOwnProperty("filters")&&m');b.prepend(p),f.innerCompile(p);var q=angular.element('
    ');b.append(q),f.innerCompile(q),a.$watch(function(){return h.hasLeftContainer()},function(a,b){a!==b&&h.refreshCanvas(!0)}),a.$watch(function(){return h.hasRightContainer()},function(a,b){a!==b&&h.refreshCanvas(!0)}),angular.element(d).on("resize",g),b.on("$destroy",function(){angular.element(d).off("resize",g)})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["gridUtil",function(){return{restrict:"EA",replace:!0,template:'
    ',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(a,b,c,d){function e(){if("left"===a.side||"right"===a.side){for(var b=g.renderContainers[a.side].visibleColumnCache,c=0,d=0;d0?b[0]:null},o.prototype.getColDef=function(a){var b=this.options.columnDefs.filter(function(b){return b.name===a});return b.length>0?b[0]:null},o.prototype.assignTypes=function(){var a=this;a.options.columnDefs.forEach(function(b,c){if(!b.type){var e=new g(b,c,a),f=a.rows.length>0?a.rows[0]:null;f?b.type=d.guessType(a.getCellValue(f,e)):(d.logWarn("Unable to assign type from data, so defaulting to string"),b.type="string")}})},o.prototype.addRowHeaderColumn=function(a){var b=this,c=new g(a,b.rowHeaderColumns.length,b);c.isRowHeader=!0,b.isRTL()?(b.createRightContainer(),c.renderContainer="right"):(b.createLeftContainer(),c.renderContainer="left"),b.columnBuilders[0](a,c,b.options).then(function(){c.enableFiltering=!1,c.enableSorting=!1,c.enableHiding=!1,b.rowHeaderColumns.push(c),b.buildColumns().then(function(){b.preCompileCellTemplates(),b.handleWindowResize()})})},o.prototype.buildColumns=function(){var b,c=this,e=[],f=c.rowHeaderColumns.length;for(b=0;b0?b[0]:null},o.prototype.modifyRows=function(b){var c,d,e,f,g=this;if((g.options.useExternalSorting||0===g.getColumnSorting().length)&&b.length>0){var i=g.rowHashMap;i||(i={get:function(){return null}}),g.createRowHashMap(),d=g.rowHashMap;var j=0===g.rows.length;for(g.rows.length=0,c=0;c0){if(g.options.enableRowHashing)for(g.rowHashMap||g.createRowHashMap(),c=0;c0){var l,m,n;if(g.options.enableRowHashing){l=[],n=[];var o={};for(m=[],g.rowHashMap||g.createRowHashMap(),d=g.rowHashMap,c=0;cd)d+=e.drawnWidth,c++;else{for(var g=0,h=f;h>=f-c;h--)g+=a.columns[h].drawnWidth;b>g&&c++}}),c},o.prototype.getBodyHeight=function(){var a=this.getViewportHeight();return"undefined"!=typeof this.horizontalScrollbarHeight&&void 0!==this.horizontalScrollbarHeight&&this.horizontalScrollbarHeight>0&&(a+=this.horizontalScrollbarHeight),a},o.prototype.getViewportHeight=function(){var a=this,b=this.gridHeight-this.headerHeight-this.footerHeight;"undefined"!=typeof this.horizontalScrollbarHeight&&void 0!==this.horizontalScrollbarHeight&&this.horizontalScrollbarHeight>0&&(b-=this.horizontalScrollbarHeight);var c=a.getViewportAdjustment();return b+=c.height},o.prototype.getViewportWidth=function(){var a=this,b=this.gridWidth;"undefined"!=typeof this.verticalScrollbarWidth&&void 0!==this.verticalScrollbarWidth&&this.verticalScrollbarWidth>0&&(b-=this.verticalScrollbarWidth);var c=a.getViewportAdjustment();return b+=c.width},o.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return"undefined"!=typeof this.verticalScrollbarWidth&&void 0!==this.verticalScrollbarWidth&&this.verticalScrollbarWidth>0&&(a+=this.verticalScrollbarWidth),a},o.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},o.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.viewportAdjusters.splice(b,1)},o.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},o.prototype.getVisibleRowCount=function(){return this.renderContainers.body.visibleRowCache.length},o.prototype.getVisibleRows=function(){return this.renderContainers.body.visibleRowCache},o.prototype.getVisibleColumnCount=function(){return this.renderContainers.body.visibleColumnCache.length},o.prototype.searchRows=function(a){return k.search(this,a,this.columns)},o.prototype.sortByColumn=function(a){return j.sort(this,a,this.columns)},o.prototype.getCellValue=function(a,b){var d=this;return d.cellValueGetterCache[b.colDef.name]||(d.cellValueGetterCache[b.colDef.name]=c(a.getEntityQualifiedColField(b))),d.cellValueGetterCache[b.colDef.name](a)},o.prototype.getNextColumnSortPriority=function(){var a=this,b=0;return a.columns.forEach(function(a){a.sort&&a.sort.priority&&a.sort.priority>b&&(b=a.sort.priority)}),b+1},o.prototype.resetColumnSorting=function(a){var b=this;b.columns.forEach(function(b){b!==a&&(b.sort={})})},o.prototype.getColumnSorting=function(){var a,b=this,c=[];return a=b.columns.slice(0),a.sort(j.prioritySort).forEach(function(a){a.sort&&"undefined"!=typeof a.sort.direction&&a.sort.direction&&(a.sort.direction===e.ASC||a.sort.direction===e.DESC)&&c.push(a)}),c},o.prototype.sortColumn=function(b,c,d){var f=this,g=null;if("undefined"==typeof b||!b)throw new Error("No column parameter provided");return"boolean"==typeof c?d=c:g=c,d?b.sort.priority=f.getNextColumnSortPriority():(f.resetColumnSorting(b),b.sort.priority=0),b.sort.direction=g?g:b.sort.direction&&b.sort.direction===e.ASC?e.DESC:b.sort.direction&&b.sort.direction===e.DESC?b.colDef&&b.colDef.suppressRemoveSort?e.ASC:null:e.ASC,f.api.core.raise.sortChanged(f,f.getColumnSorting()),a.when(b)},o.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},o.prototype.createRowHashMap=function(){var a=this,b=new n;b.grid=a,a.rowHashMap=b},o.prototype.refresh=function(){d.logDebug("grid refresh");var b=this,c=b.processRowsProcessors(b.rows).then(function(a){b.setVisibleRows(a)}),e=b.processColumnsProcessors(b.columns).then(function(a){b.setVisibleColumns(a)});return a.all([c,e]).then(function(){b.redrawInPlace(),b.refreshCanvas(!0)})},o.prototype.refreshRows=function(){var a=this;return a.processRowsProcessors(a.rows).then(function(b){a.setVisibleRows(b),a.redrawInPlace(),a.refreshCanvas(!0)})},o.prototype.refreshCanvas=function(b){var c=this;b&&c.buildStyles();var e=a.defer(),f=[];for(var g in c.renderContainers)if(c.renderContainers.hasOwnProperty(g)){var h=c.renderContainers[g];if(null===h.canvasWidth||isNaN(h.canvasWidth))continue;h.header&&f.push(h)}return m(f.length>0?function(){var a,g,h=!1,i=0;for(a=0;an?0:n,g.innerHeaderHeight=n,n>i&&(i=n)}for(a=0;ac&&e>=0;e--)c+=a.visibleRowCache[e].height,b++;return b},b.prototype.minColumnsToRender=function(){for(var a=this,b=this.getViewportWidth(),c=0,d=0,e=0;ed)d+=f.drawnWidth?f.drawnWidth:0,c++;else{for(var g=0,h=e;h>=e-c;h--)g+=a.visibleColumnCache[h].drawnWidth?a.visibleColumnCache[h].drawnWidth:0;b>g&&c++}}return c},b.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length -},b.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},b.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.viewportAdjusters.splice(b,1)},b.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},b.prototype.getViewportHeight=function(){var a=this,b=a.headerHeight?a.headerHeight:a.grid.headerHeight,c=a.grid.gridHeight-b-a.grid.footerHeight;"undefined"!=typeof a.horizontalScrollbarHeight&&void 0!==a.horizontalScrollbarHeight&&a.horizontalScrollbarHeight>0&&(c-=a.horizontalScrollbarHeight);var d=a.getViewportAdjustment();return c+=d.height},b.prototype.getViewportWidth=function(){var a=this,b=a.grid.gridWidth;"undefined"!=typeof a.grid.verticalScrollbarWidth&&void 0!==a.grid.verticalScrollbarWidth&&a.grid.verticalScrollbarWidth>0&&(b-=a.grid.verticalScrollbarWidth);var c=a.getViewportAdjustment();return b+=c.width},b.prototype.getHeaderViewportWidth=function(){var a=this,b=this.getViewportWidth();return"undefined"!=typeof a.grid.verticalScrollbarWidth&&void 0!==a.grid.verticalScrollbarWidth&&a.grid.verticalScrollbarWidth>0&&(b+=a.grid.verticalScrollbarWidth),b},b.prototype.getCanvasHeight=function(){var a=this,b=0;return a.visibleRowCache.forEach(function(a){b+=a.height}),"undefined"!=typeof a.grid.horizontalScrollbarHeight&&void 0!==a.grid.horizontalScrollbarHeight&&a.grid.horizontalScrollbarHeight>0&&(b-=a.grid.horizontalScrollbarHeight),b},b.prototype.getCanvasWidth=function(){var a=this,b=a.canvasWidth;return"undefined"!=typeof a.verticalScrollbarWidth&&void 0!==a.verticalScrollbarWidth&&a.verticalScrollbarWidth>0&&(b-=a.verticalScrollbarWidth),b},b.prototype.setRenderedRows=function(a){this.renderedRows.length=a.length;for(var b=0;bf&&(g=f);var h=[];if(e.length>c.grid.options.virtualizationThreshold){if(c.prevScrollTopg)return;if(c.prevScrollTop>a&&g>c.prevRowScrollIndex-c.grid.options.scrollThreshold&&f>g)return;var i=Math.max(0,g-c.grid.options.excessRows),j=Math.min(e.length,g+d+c.grid.options.excessRows);h=[i,j]}else{var k=c.visibleRowCache.length;h=[0,Math.max(k,d+c.grid.options.excessRows)]}c.updateViewableRowRange(h),c.prevRowScrollIndex=g},b.prototype.adjustColumns=function(a,b){var c=this,d=c.minColumnsToRender(),e=c.visibleColumnCache,f=e.length-d;"undefined"!=typeof b&&null!==b||!a||(b=a/c.getCanvasWidth());var g=Math.ceil(Math.min(f,f*b));g>f&&(g=f);var h=[];if(e.length>c.grid.options.columnVirtualizationThreshold&&c.getCanvasWidth()>c.getViewportWidth()){if(c.prevScrollLeftg)return;if(c.prevScrollLeft>a&&g>c.prevColumnScrollIndex-c.grid.options.horizontalScrollThreshold&&f>g)return;var i=Math.max(0,g-c.grid.options.excessColumns),j=Math.min(e.length,g+d+c.grid.options.excessColumns);h=[i,j]}else{var k=c.visibleColumnCache.length;h=[0,Math.max(k,d+c.grid.options.excessColumns)]}c.updateViewableColumnRange(h),c.prevColumnScrollIndex=g},b.prototype.updateViewableRowRange=function(a){var b=this.visibleRowCache.slice(a[0],a[1]);this.currentTopRow=a[0],this.setRenderedRows(b)},b.prototype.updateViewableColumnRange=function(a){var b=this.visibleColumnCache.slice(a[0],a[1]);this.currentFirstColumn=a[0],this.setRenderedColumns(b)},b.prototype.rowStyle=function(a){var b=this,c={};if(0===a&&0!==b.currentTopRow){var d=b.currentTopRow*b.grid.options.rowHeight;c["margin-top"]=d+"px"}return 0!==b.currentFirstColumn&&(b.grid.isRTL()?c["margin-right"]=b.columnOffset+"px":c["margin-left"]=b.columnOffset+"px"),c},b.prototype.columnStyle=function(a){var b=this;if(0===a&&0!==b.currentFirstColumn){var c=b.columnOffset;return b.grid.isRTL()?{"margin-right":c+"px"}:{"margin-left":c+"px"}}return null},b.prototype.updateColumnWidths=function(){var b=this,c=[],d=[],e=0,f=b.getViewportWidth();"undefined"!=typeof b.grid.verticalScrollbarWidth&&void 0!==b.grid.verticalScrollbarWidth&&b.grid.verticalScrollbarWidth>0&&(f+=b.grid.verticalScrollbarWidth);var g,h=0,i=0,j="",k=b.visibleColumnCache;k.forEach(function(b){if(b.visible){var f=!1;angular.isNumber(b.width)||(f=isNaN(b.width)&&a.endsWith(b.width,"%")),angular.isString(b.width)&&-1!==b.width.indexOf("*")?(e=parseInt(e+b.width.length,10),c.push(b)):f?d.push(b):angular.isNumber(b.width)&&(h=parseInt(h+b.width,10),i=parseInt(i,10)+parseInt(b.width,10),b.drawnWidth=b.width)}});var l,m,n,o=f-h;if(d.length>0){for(l=0;lm.colDef.maxWidth&&(n=m.colDef.maxWidth,o-=n,i+=n,m.drawnWidth=n,d.splice(l,1))}d.forEach(function(a){var b=parseInt(a.width.replace(/%/g,""),10)/100,c=parseInt(b*o,10);i+=c,a.drawnWidth=c})}if(c.length>0){var q=parseInt(o/e,10);for(l=0;lm.colDef.maxWidth&&(n=m.colDef.maxWidth,o-=n,e--,i+=n,m.drawnWidth=n,c.splice(l,1));q=parseInt(o/e,10),c.forEach(function(a){var b=parseInt(q*a.width.length,10);i+=b,a.drawnWidth=b})}var r=f-parseInt(i,10);if(r>0&&i>0&&f>i){var s=!1;if(k.forEach(function(a){a.width&&!angular.isNumber(a.width)&&(s=!0)}),s)for(var t=function(a){r>0&&(a.drawnWidth=a.drawnWidth+1,i+=1,r--)};r>0;)k.forEach(t)}f>i&&(i=f),k.forEach(function(a){j+=a.getColClassDefinition()}),b.grid.verticalScrollbarWidth&&(i+=b.grid.verticalScrollbarWidth),b.canvasWidth=parseInt(i,10),this.columnStyles=j},b}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil",function(a){function b(b,c,d){this.grid=d,this.entity=b,this.uid=a.nextUid(),this.visible=!0,this.height=d.options.rowHeight}return b.prototype.getQualifiedColField=function(a){return"row."+this.getEntityQualifiedColField(a)},b.prototype.getEntityQualifiedColField=function(b){return a.preEval("entity."+b.field)},b.prototype.setRowInvisible=function(a){null!==a&&(a.forceInvisible=!0,a.visible&&(a.visible=!1,a.grid.refresh(),a.grid.api.core.raise.rowsVisibleChanged()))},b.prototype.clearRowInvisible=function(a){null!==a&&(a.forceInvisible=!1,a.visible||(a.visible=!0,a.grid.refresh(),a.grid.api.core.raise.rowsVisibleChanged()))},b}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","Grid","GridColumn","GridRow",function(a,b,c,d,e,f){var g={createGrid:function(d){d="undefined"!=typeof d?d:{},d.id=a.newId();var e=new f(d);if(e.options.rowTemplate){var h=b.defer();e.getRowTemplateFn=h.promise,a.getTemplate(e.options.rowTemplate).then(function(a){var b=c(a);h.resolve(b)},function(){throw new Error("Couldn't fetch/use row template '"+e.options.rowTemplate+"'")})}return e.registerColumnBuilder(g.defaultColumnBuilder),e.registerRowsProcessor(function(a){return a.forEach(function(a){a.visible=!a.forceInvisible}),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.visible=!0}),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.colDef.visible===!1&&(a.visible=!1)}),a}),e.options.enableFiltering&&e.registerRowsProcessor(e.searchRows),e.registerRowsProcessor(e.options.externalSort&&angular.isFunction(e.options.externalSort)?e.options.externalSort:e.sortByColumn),e},defaultColumnBuilder:function(c,d){var f=[];return d.providedHeaderCellTemplate=c.headerCellTemplate?c.headerCellTemplate:"ui-grid/uiGridHeaderCell",d.providedCellTemplate=c.cellTemplate?c.cellTemplate:"ui-grid/uiGridCell",d.cellTemplatePromise=a.getTemplate(d.providedCellTemplate),f.push(d.cellTemplatePromise.then(function(a){d.cellTemplate=a.replace(e.CUSTOM_FILTERS,d.cellFilter?"|"+d.cellFilter:"")},function(){throw new Error("Couldn't fetch/use colDef.cellTemplate '"+c.cellTemplate+"'")})),f.push(a.getTemplate(d.providedHeaderCellTemplate).then(function(a){d.headerCellTemplate=a.replace(e.CUSTOM_FILTERS,d.headerCellFilter?"|"+d.headerCellFilter:"")},function(){throw new Error("Couldn't fetch/use colDef.headerCellTemplate '"+c.headerCellTemplate+"'")})),d.compiledElementFnDefer=b.defer(),b.all(f)}};return g}])}(),function(){function a(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function b(){var a=function(b,c){return b&&a.cache[b]?a.cache[b]:b&&c?(a.cache[b]=c,a.cache[b]):void 0};return a.cache={},a.clear=function(){a.cache={}},a}var c=angular.module("ui.grid");c.service("rowSearcher",["gridUtil","uiGridConstants",function(c,d){var e=d.filter.STARTS_WITH,f={};return f.getTerm=function(a){if("undefined"==typeof a.term)return a.term;var b=a.term;return"string"==typeof b&&(b=b.trim()),b},f.stripTerm=function(b){var c=f.getTerm(b);return"string"==typeof c?a(c.replace(/(^\*|\*$)/g,"")):c},f.guessCondition=function(a){if("undefined"==typeof a.term||!a.term)return e;var b=f.getTerm(a);if(/\*/.test(b)){var c="";a.flags&&a.flags.caseSensitive||(c+="i");var d=b.replace(/(\\)?\*/g,function(a,b){return b?a:"[\\s\\S]*?"});return new RegExp("^"+d+"$",c)}return e},f.runColumnFilter=function(a,b,c,e,g,h){var i=typeof h.condition;"undefined"!==i&&h.condition||(h.condition=d.filter.CONTAINS);var j=f.stripTerm(h);if(null===j||void 0===j||""===j)return!0;var k=a.getCellValue(b,c),l="";h.flags&&h.flags.caseSensitive||(l+="i");var m=c.field+g;if(h.condition instanceof RegExp){if(!h.condition.test(k))return!1}else{if("function"===i)return h.condition(j,k,b,c);if(h.condition===d.filter.STARTS_WITH){var n=e(m)?e(m):e(m,new RegExp("^"+j,l));if(!n.test(k))return!1}else if(h.condition===d.filter.ENDS_WITH){var o=e(m)?e(m):e(m,new RegExp(j+"$",l));if(!o.test(k))return!1}else if(h.condition===d.filter.CONTAINS){var p=e(m)?e(m):e(m,new RegExp(j,l));if(!p.test(k))return!1}else if(h.condition===d.filter.EXACT){var q=e(m)?e(m):e(m,new RegExp("^"+j+"$",l));if(!q.test(k))return!1}else if(h.condition===d.filter.GREATER_THAN){if(j>=k)return!1}else if(h.condition===d.filter.GREATER_THAN_OR_EQUAL){if(j>k)return!1}else if(h.condition===d.filter.LESS_THAN){if(k>=j)return!1}else if(h.condition===d.filter.LESS_THAN_OR_EQUAL){if(k>j)return!1}else if(h.condition===d.filter.NOT_EQUAL&&!angular.equals(k,j))return!1}return!0},f.searchColumn=function(a,b,c,d){var e=[];if(a.options.useExternalFiltering)return!0;if(!("undefined"!=typeof c.filters&&c.filters&&c.filters.length>0))return!0;e=c.filters;for(var g in e){var h=e[g];if(!h.condition){var i="cond-"+c.field+"-"+h.term,j=d(i)?d(i):d(i,f.guessCondition(h));h={term:h.term,condition:j,flags:angular.extend({caseSensitive:!1},h.flags)}}var k=f.runColumnFilter(a,b,c,d,g,h);if(!k)return!1}return!0},f.search=function(a,c,d){if(c){var e=new b,g=[];return d.forEach(function(a){"undefined"!=typeof a.filters&&a.filters.length>0?g.push(a):"undefined"!=typeof a.filter&&a.filter&&"undefined"!=typeof a.filter.term&&a.filter.term&&g.push(a)}),g.length>0&&(g.forEach(function(b){c.forEach(function(c){(c.forceInvisible||!f.searchColumn(a,c,b,e))&&(c.visible=!1)})}),a.api.core.raise.rowsVisibleChanged&&a.api.core.raise.rowsVisibleChanged()),e.clear(),c}},f}])}(),function(){var a=angular.module("ui.grid");a.service("rowSorter",["$parse","uiGridConstants",function(a,b){var c="("+b.CURRENCY_SYMBOLS.map(function(a){return"\\"+a}).join("|")+")?",d=(new RegExp("^[-+]?"+c+"[\\d,.]+"+c+"%?$"),{colSortFnCache:[]});return d.guessSortFn=function(a){switch(a){case"number":return d.sortNumber;case"boolean":return d.sortBool;case"string":return d.sortAlpha;case"date":return d.sortDate;case"object":return d.basicSort;default:throw new Error("No sorting function found for type:"+a)}},d.handleNulls=function(a,b){if(!a&&0!==a&&a!==!1||!b&&0!==b&&b!==!1){if(!a&&0!==a&&a!==!1&&!b&&0!==b&&b!==!1)return 0;if(!a&&0!==a&&a!==!1)return 1;if(!b&&0!==b&&b!==!1)return-1}return null},d.basicSort=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a===b?0:b>a?-1:1},d.sortNumber=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a-b},d.sortNumberStr=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e,f,g=!1,h=!1;return e=parseFloat(a.replace(/[^0-9.-]/g,"")),isNaN(e)&&(g=!0),f=parseFloat(b.replace(/[^0-9.-]/g,"")),isNaN(f)&&(h=!0),g&&h?0:g?1:h?-1:e-f},d.sortAlpha=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.toLowerCase(),f=b.toLowerCase();return e===f?0:f>e?-1:1},d.sortDate=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.getTime(),f=b.getTime();return e===f?0:f>e?-1:1},d.sortBool=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a&&b?0:a||b?a?1:-1:0},d.getSortFn=function(a,b){var c;return d.colSortFnCache[b.colDef.name]?c=d.colSortFnCache[b.colDef.name]:void 0!==b.sortingAlgorithm?(c=b.sortingAlgorithm,d.colSortFnCache[b.colDef.name]=b.sortingAlgorithm):(c=d.guessSortFn(b.colDef.type),c?d.colSortFnCache[b.colDef.name]=c:c=d.sortAlpha),c},d.prioritySort=function(a,b){return void 0!==a.sort.priority&&void 0!==b.sort.priority?a.sort.priorityf;f+=2){var i=h[f];if("margin"===c){var j=parseFloat(e[c+i]);isNaN(j)||(g+=j)}if(d){if("content"===c){var k=parseFloat(e["padding"+i]);isNaN(k)||(g-=k)}if("margin"!==c){var l=parseFloat(e["border"+i+"Width"]);isNaN(l)||(g-=l)}}else{var m=parseFloat(e["padding"+i]);if(isNaN(m)||(g+=m),"padding"!==c){var n=parseFloat(e["border"+i+"Width"]);isNaN(n)||(g+=n)}}}return g}function c(c,d,f){var g,h=!0,i=a(c),j="border-box"===i.boxSizing;if(0>=g||null==g){if(g=i[d],(0>g||null==g)&&(g=c.style[d]),e.test(g))return g;h=j&&!0,g=parseFloat(g)||0}var k=g+b(c,d,f||(j?"border":"content"),h,i);return k}var d=angular.module("ui.grid"),e=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),f=/^(block|none|table(?!-c[ea]).+)/,g={position:"absolute",visibility:"hidden",display:"block"},h=["0","0","0"],i="uiGrid-";d.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$injector","$q","$interpolate","uiGridConstants",function(b,d,e,j,k,l,m,n,o,p){var q={getStyles:a,createBoundedWrapper:function(a,b){return function(){return b.apply(a,arguments)}},readableColumnName:function(a){return"undefined"==typeof a||void 0===a||null===a?a:("string"!=typeof a&&(a=String(a)),a.replace(/_+/g," ").replace(/^[A-Z]+$/,function(a){return angular.lowercase(angular.uppercase(a.charAt(0))+a.slice(1))}).replace(/(\w+)/g,function(a){return angular.uppercase(a.charAt(0))+a.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(a,b){var c=[];if(!a||"undefined"==typeof a[0]||void 0===a[0])return[];angular.isUndefined(b)&&(b=[]);var d=a[0];return angular.forEach(d,function(a,d){-1===b.indexOf(d)&&c.push({name:d})}),c},newId:function(){var a=(new Date).getTime();return function(){return a+=1}}(),getTemplate:function(a){if(k.get(a))return q.postProcessTemplate(k.get(a));if(a.hasOwnProperty("then"))return a.then(q.postProcessTemplate);try{if(angular.element(a).length>0)return n.when(a).then(q.postProcessTemplate)}catch(b){}return q.logDebug("fetching url",a),j({method:"GET",url:a}).then(function(b){var c=b.data.trim();return k.put(a,c),c},function(b){throw new Error("Could not get template "+a+": "+b)}).then(q.postProcessTemplate)},postProcessTemplate:function(a){var b=o.startSymbol(),c=o.endSymbol();return("{{"!==b||"}}"!==c)&&(a=a.replace(/\{\{/g,b),a=a.replace(/\}\}/g,c)),n.when(a)},guessType:function(a){var b=typeof a;switch(b){case"number":case"boolean":case"string":return b;default:return angular.isDate(a)?"date":"object"}},elementWidth:function(){},elementHeight:function(){},getScrollbarWidth:function(){var a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a);var b=a.offsetWidth;a.style.overflow="scroll";var c=document.createElement("div");c.style.width="100%",a.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),b-d},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},fakeElement:function(a,b,c){var d,e,f=angular.element(a).clone()[0];for(e in b)f.style[e]=b[e];return angular.element(document.body).append(f),d=c.call(f,f),angular.element(f).remove(),d},normalizeWheelEvent:function(a){var b,c,d,e=a||window.event,f=([].slice.call(arguments,1),0),g=0,h=0,i=0,j=0;return e.originalEvent&&(e=e.originalEvent),e.wheelDelta&&(f=e.wheelDelta),e.detail&&(f=-1*e.detail),h=f,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*f),e.deltaY&&(h=-1*e.deltaY,f=h),e.deltaX&&(g=e.deltaX,f=-1*g),void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY),void 0!==e.wheelDeltaX&&(g=e.wheelDeltaX),i=Math.abs(f),(!b||b>i)&&(b=i),j=Math.max(Math.abs(h),Math.abs(g)),(!c||c>j)&&(c=j),d=f>0?"floor":"ceil",f=Math[d](f/b),g=Math[d](g/c),h=Math[d](h/c),{delta:f,deltaX:g,deltaY:h}},isTouchEnabled:function(){var a;return("ontouchstart"in d||d.DocumentTouch&&e instanceof DocumentTouch)&&(a=!0),a},isNullOrUndefined:function(a){return void 0===a||null===a?!0:!1},endsWith:function(a,b){return a&&b&&"string"==typeof a?-1!==a.indexOf(b,a.length-b.length):!1},arrayContainsObjectWithProperty:function(a,b,c){var d=!1;return angular.forEach(a,function(a){a[b]===c&&(d=!0)}),d},requestAnimationFrame:d.requestAnimationFrame&&d.requestAnimationFrame.bind(d)||d.webkitRequestAnimationFrame&&d.webkitRequestAnimationFrame.bind(d)||function(a){return l(a,10,!1)},numericAndNullSort:function(a,b){return null===a?1:null===b?-1:null===a&&null===b?0:a-b},disableAnimations:function(a){var b;try{b=m.get("$animate"),b.enabled(!1,a)}catch(c){}},enableAnimations:function(a){var b;try{return b=m.get("$animate"),b.enabled(!0,a),b}catch(c){}},nextUid:function(){for(var a,b=h.length;b;){if(b--,a=h[b].charCodeAt(0),57===a)return h[b]="A",i+h.join("");if(90!==a)return h[b]=String.fromCharCode(a+1),i+h.join("");h[b]="0"}return h.unshift("0"),i+h.join("")},hashKey:function(a){var b,c=typeof a;return"object"===c&&null!==a?"function"==typeof(b=a.$$hashKey)?b=a.$$hashKey():"undefined"!=typeof a.$$hashKey&&a.$$hashKey?b=a.$$hashKey:void 0===b&&(b=a.$$hashKey=q.nextUid()):b=a,c+":"+b},resetUids:function(){h=["0","0","0"]},logError:function(a){p.LOG_ERROR_MESSAGES&&b.error(a)},logWarn:function(a){p.LOG_WARN_MESSAGES&&b.warn(a)},logDebug:function(){p.LOG_DEBUG_MESSAGES&&b.debug.apply(b,arguments)}};return["width","height"].forEach(function(b){var d=angular.uppercase(b.charAt(0))+b.substr(1);q["element"+d]=function(d,e){var h=d;if(h&&"undefined"!=typeof h.length&&h.length&&(h=d[0]),h){var i=a(h);return 0===h.offsetWidth&&f.test(i.display)?q.fakeElement(h,g,function(a){return c(a,b,e)}):c(h,b,e)}return null},q["outerElement"+d]=function(a,b){return a?q["element"+d].call(this,a,b?"margin":"border"):null}}),q.closestElm=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(a){return"function"==typeof document.body[a]?(c=a,!0):!1});for(var d;null!==a;){if(d=a.parentElement,null!==d&&d[c](b))return d;a=d}return null},q.type=function(a){var b=Function.prototype.toString.call(a.constructor);return b.match(/function (.*?)\(/)[1]},q.getBorderSize=function(b,c){"undefined"!=typeof b.length&&b.length&&(b=b[0]);var d=a(b);c=c?"border"+c.charAt(0).toUpperCase()+c.slice(1):"border",c+="Width";var e=parseInt(d[c],10);return isNaN(e)?0:e},q.detectBrowser=function(){var a=d.navigator.userAgent,b={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var c in b)if(b[c].test(a))return c;return"unknown"},q.normalizeScrollLeft=function(a){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var b=q.detectBrowser(),c=a.scrollLeft,d=q.getStyles(a).direction;if("ie"===b)return c;if("chrome"===b){if("rtl"===d){var e=a.scrollWidth-a.clientWidth;return e-c}return c}return"firefox"===b?Math.abs(c):c},q.denormalizeScrollLeft=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c=q.detectBrowser(),d=q.getStyles(a).direction;if("ie"===c)return b;if("chrome"===c){if("rtl"===d){var e=a.scrollWidth-a.clientWidth;return e-b}return b}return"firefox"===c&&"rtl"===d?-1*b:b},q.preEval=function(a){var b=p.BRACKET_REGEXP.exec(a);if(b)return(b[1]?q.preEval(b[1]):b[1])+b[2]+(b[3]?q.preEval(b[3]):b[3]);a=a.replace(p.APOS_REGEXP,"\\'");var c=a.split(p.DOT_REGEXP),d=[c.shift()];return angular.forEach(c,function(a){d.push(a.replace(p.FUNC_REGEXP,"']$1"))}),d.join("['")},q.debounce=function(a,b,c){function d(){g=this,f=arguments;var d=function(){e=null,c||(h=a.apply(g,f))},i=c&&!e;return e&&l.cancel(e),e=l(d,b),i&&(h=a.apply(g,f)),h}var e,f,g,h;return d.cancel=function(){l.cancel(e),e=null},d},q.throttle=function(a,b,c){function d(){g=+new Date,a.apply(e,f),l(function(){h=null},0)}c=c||{};var e,f,g=0,h=null;return function(){if(e=this,f=arguments,null===h){var a=+new Date-g;a>b?d():c.trailing&&(h=l(d,b-a))}}},q}]),d.filter("px",function(){return function(a){return a.match(/^[\d\.]+$/)?a+"px":a}})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil."},search:{placeholder:"Søg...",showingItems:"Viste rækker:",selectedItems:"Valgte rækker:",totalItems:"Rækker totalt:",size:"Side størrelse:",first:"Første side",next:"Næste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"Vælg kolonner:"},column:{hide:"Skjul kolonne"},aggregation:{count:"samlede rækker: ",sum:"smalede: ",avg:"gns: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("de",{aggregate:{label:"eintrag"},groupPanel:{description:"Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Einträge:",selectedItems:"Ausgewählte Einträge:",totalItems:"Einträge gesamt:",size:"Einträge pro Seite:",first:"Erste Seite",next:"Nächste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten auswählen:"},sort:{ascending:"aufsteigend sortieren",descending:"absteigend sortieren",remove:"Sortierung zurücksetzen"},column:{hide:"Spalte ausblenden"},aggregation:{count:"Zeilen insgesamt: ",sum:"gesamt: ",avg:"Durchschnitt: ",min:"min: ",max:"max: "},gridMenu:{columns:"Spalten:",importerTitle:"Datei importieren",exporterAllAsCsv:"Alle Daten als CSV exportieren",exporterVisibleAsCsv:"sichtbare Daten als CSV exportieren",exporterSelectedAsCsv:"markierte Daten als CSV exportieren",exporterAllAsPdf:"Alle Daten als PDF exportieren",exporterVisibleAsPdf:"sichtbare Daten als PDF exportieren",exporterSelectedAsPdf:"markierte Daten als CSV exportieren"},importer:{noHeaders:"Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?",noObjects:"Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?",invalidCsv:"Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?",invalidJson:"Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?",jsonNotArray:"Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},paging:{sizes:"items per page",totalItems:"items"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("es",{aggregate:{label:"Artículos"},groupPanel:{description:"Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Artículos Mostrados:",selectedItems:"Artículos Seleccionados:",totalItems:"Artículos Totales:",size:"Tamaño de Página:",first:"Primera Página",next:"Página Siguiente",previous:"Página Anterior",last:"Última Página"},menu:{text:"Elegir columnas:"},sort:{ascending:"Orden Ascendente",descending:"Orden Descendente",remove:"Sin Ordenar"},column:{hide:"Ocultar la columna"},aggregation:{count:"filas totales: ",sum:"total: ",avg:"media: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fijar a la Izquierda",pinRight:"Fijar a la Derecha",unpin:"Quitar Fijación"},gridMenu:{columns:"Columnas:",importerTitle:"Importar archivo",exporterAllAsCsv:"Exportar todo como csv",exporterVisibleAsCsv:"Exportar vista como csv",exporterSelectedAsCsv:"Exportar selección como csv",exporterAllAsPdf:"Exportar todo como pdf",exporterVisibleAsPdf:"Exportar vista como pdf",exporterSelectedAsPdf:"Exportar selección como pdf"},importer:{noHeaders:"No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?",noObjects:"No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?",invalidCsv:"No fue posible procesar el archivo, ¿es un CSV válido?",invalidJson:"No fue posible procesar el archivo, ¿es un Json válido?",jsonNotArray:"El archivo json importado debe contener un array, abortando."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fa",{aggregate:{label:"موردها"},groupPanel:{description:"یک عنوان ستون اینجا را بردار و به گروهی از آن ستون بیانداز."},search:{placeholder:"جستجو...",showingItems:"نمایش موردها:",selectedItems:"موردهای انتخاب‌شده:",totalItems:"همهٔ موردها:",size:"اندازهٔ صفحه:",first:"صفحهٔ اول",next:"صفحهٔ بعد",previous:"صفحهٔ قبل",last:"آخرین صفحه"},menu:{text:"انتخاب ستون‌ها:"},column:{hide:"ستون پنهان کن"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fi",{aggregate:{label:"rivit"},groupPanel:{description:"Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan."},search:{placeholder:"Hae...",showingItems:"Näytetään rivejä:",selectedItems:"Valitut rivit:",totalItems:"Rivejä yht.:",size:"Näytä:",first:"Ensimmäinen sivu",next:"Seuraava sivu",previous:"Edellinen sivu",last:"Viimeinen sivu"},menu:{text:"Valitse sarakkeet:"},sort:{ascending:"Järjestä nouseva",descending:"Järjestä laskeva",remove:"Poista järjestys"},column:{hide:"Piilota sarake"},aggregation:{count:"Rivejä yht.: ",sum:"Summa: ",avg:"K.a.: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Lukitse vasemmalle",pinRight:"Lukitse oikealle",unpin:"Poista lukitus"},gridMenu:{columns:"Sarakkeet:",importerTitle:"Tuo tiedosto",exporterAllAsCsv:"Vie tiedot csv-muodossa",exporterVisibleAsCsv:"Vie näkyvä tieto csv-muodossa",exporterSelectedAsCsv:"Vie valittu tieto csv-muodossa",exporterAllAsPdf:"Vie tiedot pdf-muodossa",exporterVisibleAsPdf:"Vie näkyvä tieto pdf-muodossa",exporterSelectedAsPdf:"Vie valittu tieto pdf-muodossa"},importer:{noHeaders:"Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?",noObjects:"Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?",invalidCsv:"Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?",invalidJson:"Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?",jsonNotArray:"Tiedosto ei sisältänyt taulukkoa, lopetetaan."}}),a -}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fr",{aggregate:{label:"articles"},groupPanel:{description:"Faites glisser un en-tête de colonne ici et déposez-le vers un groupe par cette colonne."},search:{placeholder:"Recherche...",showingItems:"Articles Affichage des:",selectedItems:"Éléments Articles:",totalItems:"Nombre total d'articles:",size:"Taille de page:",first:"Première page",next:"Page Suivante",previous:"Page précédente",last:"Dernière page"},menu:{text:"Choisir des colonnes:"},sort:{ascending:"Trier par ordre croissant",descending:"Trier par ordre décroissant",remove:"Enlever le tri"},column:{hide:"Cacher la colonne"},aggregation:{count:"total lignes: ",sum:"total: ",avg:"moy: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Épingler à gauche",pinRight:"Épingler à droite",unpin:"Détacher"},gridMenu:{columns:"Colonnes:",importerTitle:"Importer un fichier",exporterAllAsCsv:"Exporter toutes les données en CSV",exporterVisibleAsCsv:"Exporter les données visibles en CSV",exporterSelectedAsCsv:"Exporter les données sélectionnées en CSV",exporterAllAsPdf:"Exporter toutes les données en PDF",exporterVisibleAsPdf:"Exporter les données visibles en PDF",exporterSelectedAsPdf:"Exporter les données sélectionnées en PDF"},importer:{noHeaders:"Impossible de déterminer le nom des colonnes, le fichier possède-t-il un en-tête ?",noObjects:"Aucun objet trouvé, le fichier possède-t-il des données autres que l'en-tête ?",invalidCsv:"Le fichier n'a pas pu être traité, le CSV est-il valide ?",invalidJson:"Le fichier n'a pas pu être traité, le JSON est-il valide ?",jsonNotArray:"Le fichier JSON importé doit contenir un tableau. Abandon."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("he",{aggregate:{label:"items"},groupPanel:{description:"גרור עמודה לכאן ושחרר בכדי לקבץ עמודה זו."},search:{placeholder:"חפש...",showingItems:"מציג:",selectedItems:'סה"כ נבחרו:',totalItems:'סה"כ רשומות:',size:"תוצאות בדף:",first:"דף ראשון",next:"דף הבא",previous:"דף קודם",last:"דף אחרון"},menu:{text:"בחר עמודות:"},sort:{ascending:"סדר עולה",descending:"סדר יורד",remove:"בטל"},column:{hide:"טור הסתר"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("it",{aggregate:{label:"elementi"},groupPanel:{description:"Trascina un'intestazione all'interno del gruppo della colonna."},search:{placeholder:"Ricerca...",showingItems:"Mostra:",selectedItems:"Selezionati:",totalItems:"Totali:",size:"Tot Pagine:",first:"Prima",next:"Prossima",previous:"Precedente",last:"Ultima"},menu:{text:"Scegli le colonne:"},sort:{ascending:"Asc.",descending:"Desc.",remove:"Annulla ordinamento"},column:{hide:"Nascondi"},aggregation:{count:"righe totali: ",sum:"tot: ",avg:"media: ",min:"minimo: ",max:"massimo: "},pinning:{pinLeft:"Blocca a sx",pinRight:"Blocca a dx",unpin:"Blocca in alto"},gridMenu:{columns:"Colonne:",importerTitle:"Importa",exporterAllAsCsv:"Esporta tutti i dati in CSV",exporterVisibleAsCsv:"Esporta i dati visibili in CSV",exporterSelectedAsCsv:"Esporta i dati selezionati in CSV",exporterAllAsPdf:"Esporta tutti i dati in PDF",exporterVisibleAsPdf:"Esporta i dati visibili in PDF",exporterSelectedAsPdf:"Esporta i dati selezionati in PDF"},importer:{noHeaders:"Impossibile reperire i nomi delle colonne, sicuro che siano indicati all'interno del file?",noObjects:"Impossibile reperire gli oggetti, sicuro che siano indicati all'interno del file?",invalidCsv:"Impossibile elaborare il file, sicuro che sia un CSV?",invalidJson:"Impossibile elaborare il file, sicuro che sia un JSON valido?",jsonNotArray:"Errore! Il file JSON da importare deve contenere un array."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Verberg kolom"},aggregation:{count:"Aantal rijen: ",sum:"Som: ",avg:"Gemiddelde: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Zet links vast",pinRight:"Zet rechts vast",unpin:"Maak los"},gridMenu:{columns:"Kolommen:",importerTitle:"Importeer bestand",exporterAllAsCsv:"Exporteer alle data als csv",exporterVisibleAsCsv:"Exporteer zichtbare data als csv",exporterSelectedAsCsv:"Exporteer geselecteerde data als csv",exporterAllAsPdf:"Exporteer alle data als pdf",exporterVisibleAsPdf:"Exporteer zichtbare data als pdf",exporterSelectedAsPdf:"Exporteer geselecteerde data als pdf"},importer:{noHeaders:"Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?",noObjects:"Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?",invalidCsv:"Het bestand kan niet verwerkt worden. Is het een valide csv bestand?",invalidJson:"Het bestand kan niet verwerkt worden. Is het valide json?",jsonNotArray:"Het json bestand moet een array bevatten. De actie wordt geannuleerd."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt-br",{aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},gridMenu:{columns:"Colunas:",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?",invalidCsv:"Arquivo não pode ser processado. É um CSV válido?",invalidJson:"Arquivo não pode ser processado. É um Json válido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ru",{aggregate:{label:"элементы"},groupPanel:{description:"Для группировки по столбцу перетащите сюда его название."},search:{placeholder:"Поиск...",showingItems:"Показать элементы:",selectedItems:"Выбранные элементы:",totalItems:"Всего элементов:",size:"Размер страницы:",first:"Первая страница",next:"Следующая страница",previous:"Предыдущая страница",last:"Последняя страница"},menu:{text:"Выбрать столбцы:"},sort:{ascending:"По возрастанию",descending:"По убыванию",remove:"Убрать сортировку"},column:{hide:"спрятать столбец"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca."},search:{placeholder:"Hľadaj...",showingItems:"Zobrazujem položky:",selectedItems:"Vybraté položky:",totalItems:"Počet položiek:",size:"Počet:",first:"Prvá strana",next:"Ďalšia strana",previous:"Predchádzajúca strana",last:"Posledná strana"},menu:{text:"Vyberte stĺpce:"},sort:{ascending:"Zotriediť vzostupne",descending:"Zotriediť zostupne",remove:"Vymazať triedenie"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sv",{aggregate:{label:"Artiklar"},groupPanel:{description:"Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen."},search:{placeholder:"Sök...",showingItems:"Visar artiklar:",selectedItems:"Valda artiklar:",totalItems:"Antal artiklar:",size:"Sidstorlek:",first:"Första sidan",next:"Nästa sida",previous:"Föregående sida",last:"Sista sidan"},menu:{text:"Välj kolumner:"},sort:{ascending:"Sortera stigande",descending:"Sortera fallande",remove:"Inaktivera sortering"},column:{hide:"Göm kolumn"},aggregation:{count:"Antal rader: ",sum:"Summa: ",avg:"Genomsnitt: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Fäst vänster",pinRight:"Fäst höger",unpin:"Lösgör"},gridMenu:{columns:"Kolumner:",importerTitle:"Importera fil",exporterAllAsCsv:"Exportera all data som CSV",exporterVisibleAsCsv:"Exportera synlig data som CSV",exporterSelectedAsCsv:"Exportera markerad data som CSV",exporterAllAsPdf:"Exportera all data som PDF",exporterVisibleAsPdf:"Exportera synlig data som PDF",exporterSelectedAsPdf:"Exportera markerad data som PDF"},importer:{noHeaders:"Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?",noObjects:"Objekt kunde inte härledas. Har filen data undantaget sidhuvud?",invalidCsv:"Filen kunde inte behandlas, är den en giltig CSV?",invalidJson:"Filen kunde inte behandlas, är den en giltig JSON?",jsonNotArray:"Importerad JSON-fil måste innehålla ett fält. Import avbruten."},paging:{sizes:"Artiklar per sida",totalItems:"Artiklar"}}),a}])}])}(),function(){var a=["uiT","uiTranslate"],b=["t","uiTranslate"],c=angular.module("ui.grid.i18n");c.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),c.service("i18nService",["$log","i18nConstants","$rootScope",function(a,b,c){var d={_langs:{},current:null,get:function(a){return this._langs[a.toLowerCase()]},add:function(a,b){var c=a.toLowerCase();this._langs[c]||(this._langs[c]={}),angular.extend(this._langs[c],b)},getAllLangs:function(){var a=[];if(!this._langs)return a;for(var b in this._langs)a.push(b);return a},setCurrent:function(a){this.current=a.toLowerCase()},getCurrentLang:function(){return this.current}},e={add:function(a,b){"object"==typeof a?angular.forEach(a,function(a){a&&d.add(a,b)}):d.add(a,b)},getAllLangs:function(){return d.getAllLangs()},get:function(a){var b=a?a:e.getCurrentLang();return d.get(b)},getSafeText:function(a,c){var f=c?c:e.getCurrentLang(),g=d.get(f);if(!g)return b.MISSING;for(var h=a.split("."),i=g,j=0;je?0===f?new a(b,d[g]):new a(this.rows[f-1],d[g]):new a(b,d[g])},e.prototype.getRowColRight=function(b,c){var d=this.getFocusableCols(),e=d.indexOf(c),f=this.rows.indexOf(b);-1===e&&(e=0);var g=e===d.length-1?0:e+1;return e>g?f===this.rows.length-1?new a(b,d[g]):new a(this.rows[f+1],d[g]):new a(b,d[g])},e.prototype.getRowColDown=function(b,c){var d=this.getFocusableCols(),e=d.indexOf(c),f=this.rows.indexOf(b);return-1===e&&(e=0),f===this.rows.length-1?new a(b,d[e]):new a(this.rows[f+1],d[e])},e.prototype.getRowColUp=function(b,c){var d=this.getFocusableCols(),e=d.indexOf(c),f=this.rows.indexOf(b);return-1===e&&(e=0),0===f?new a(b,d[e]):new a(this.rows[f-1],d[e])},e}]),b.service("uiGridCellNavService",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q","uiGridCellNavFactory",function(a,b,c,d,e){var f={initializeGrid:function(a){a.registerColumnBuilder(f.cellNavColumnBuilder),a.cellNav={},a.cellNav.lastRowCol=null;var b={events:{cellNav:{navigate:function(){}}},methods:{cellNav:{scrollTo:function(a,b,c,d){f.scrollTo(a,b,c,d)},getFocusedCell:function(){return a.cellNav.lastRowCol}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},decorateRenderContainers:function(a){var b=a.hasRightContainer()?a.renderContainers.right:null,c=a.hasLeftContainer()?a.renderContainers.left:null;null!==c&&(a.renderContainers.left.cellNav=new e(a.renderContainers.body,c,b,a.renderContainers.body)),null!==b&&(a.renderContainers.right.cellNav=new e(a.renderContainers.body,b,a.renderContainers.body,c)),a.renderContainers.body.cellNav=new e(a.renderContainers.body,a.renderContainers.body,c,b)},getDirection:function(a){return a.keyCode===b.keymap.LEFT||a.keyCode===b.keymap.TAB&&a.shiftKey?c.direction.LEFT:a.keyCode===b.keymap.RIGHT||a.keyCode===b.keymap.TAB?c.direction.RIGHT:a.keyCode===b.keymap.UP||a.keyCode===b.keymap.ENTER&&a.shiftKey?c.direction.UP:a.keyCode===b.keymap.DOWN||a.keyCode===b.keymap.ENTER?c.direction.DOWN:null},cellNavColumnBuilder:function(a){var b=[];return a.allowCellFocus=void 0===a.allowCellFocus?!0:a.allowCellFocus,d.all(b)},scrollTo:function(a,b,c,d){var e=null,f=null;null!==c&&(e=a.getRow(c)),null!==d&&(f=a.getColumn(d.name?d.name:d.field)),this.scrollToInternal(a,b,e,f)},scrollToInternal:function(a,c,d,e){var f={};if(null!==d){var g=a.renderContainers.body.visibleRowCache.indexOf(d),h=a.renderContainers.body.visibleRowCache.length,i=(g+g/(h-1))/h;f.y={percentage:i}}null!==e&&(f.x={percentage:this.getLeftWidth(a,e)/this.getLeftWidth(a,a.renderContainers.body.visibleColumnCache[a.renderContainers.body.visibleColumnCache.length-1])}),(f.y||f.x)&&c.$broadcast(b.events.GRID_SCROLL,f)},scrollToIfNecessary:function(a,c,d,e){var f={},g=a.renderContainers.body.visibleRowCache,h=a.renderContainers.body.visibleColumnCache,i=a.renderContainers.body.prevScrollTop+a.headerHeight;i=0>i?0:i;var j=a.renderContainers.body.prevScrollLeft,k=a.renderContainers.body.prevScrollTop+a.gridHeight-a.headerHeight;a.horizontalScrollbarHeight&&(k-=a.horizontalScrollbarHeight);var l=a.renderContainers.body.prevScrollLeft+a.gridWidth;if(a.verticalScrollbarWidth&&(l-=a.verticalScrollbarWidth),null!==d){var m=g.indexOf(d),n=a.renderContainers.body.getCanvasHeight()-a.renderContainers.body.getViewportHeight();a.horizontalScrollbarHeight&&a.horizontalScrollbarHeight>0&&(n+=a.horizontalScrollbarHeight);var o=(m+1)*a.options.rowHeight;o=0>o?0:o;var p,q;i>o?(p=a.renderContainers.body.prevScrollTop-(i-o),q=p/n,f.y={percentage:q}):o>k&&(p=o-k+a.renderContainers.body.prevScrollTop,q=p/n,f.y={percentage:q})}if(null!==e){for(var r=h.indexOf(e),s=a.renderContainers.body.getCanvasWidth()-a.renderContainers.body.getViewportWidth(),t=0,u=0;r>u;u++){var v=h[u];t+=v.drawnWidth}t=0>t?0:t;var w=t+e.drawnWidth;w=0>w?0:w;var x,y;j>t?(x=a.renderContainers.body.prevScrollLeft-(j-t),y=x/s,y=y>1?1:y,f.x={percentage:y}):w>l&&(x=w-l+a.renderContainers.body.prevScrollLeft,y=x/s,y=y>1?1:y,f.x={percentage:y})}(f.y||f.x)&&c.$broadcast(b.events.GRID_SCROLL,f)},getLeftWidth:function(a,b){var c=0;if(!b)return c;var d=a.renderContainers.body.visibleColumnCache.indexOf(b);a.renderContainers.body.visibleColumnCache.forEach(function(a,b){d>b&&(c+=a.drawnWidth)});var e=0===d?0:(d+1)/a.renderContainers.body.visibleColumnCache.length;return c+=b.drawnWidth*e}};return f}]),b.directive("uiGridCellnav",["gridUtil","uiGridCellNavService","uiGridCellNavConstants",function(b,c,d){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,e,f,g){var h=g.grid;c.initializeGrid(h),g.cellNav={},g.cellNav.focusCell=function(a,b){g.cellNav.broadcastCellNav({row:a,col:b})},g.cellNav.broadcastCellNav=function(a){b.$broadcast(d.CELL_NAV_EVENT,a),g.cellNav.broadcastFocus(a)},g.cellNav.broadcastFocus=function(b){var c=b.row,d=b.col;if(null===h.cellNav.lastRowCol||h.cellNav.lastRowCol.row!==c||h.cellNav.lastRowCol.col!==d){var e=new a(c,d);h.api.cellNav.raise.navigate(e,h.cellNav.lastRowCol),h.cellNav.lastRowCol=e}},g.cellNav.handleKeyDown=function(a){var e=c.getDirection(a);if(null===e)return!0;var f="body";a.uiGridTargetRenderContainerId&&(f=a.uiGridTargetRenderContainerId);var i=g.grid.api.cellNav.getFocusedCell();if(i){var j=g.grid.renderContainers[f].cellNav.getNextRowCol(e,i.row,i.col);return j.eventType=d.EVENT_TYPE.KEYDOWN,g.cellNav.broadcastCellNav(j),c.scrollToIfNecessary(h,b,j.row,j.col),a.stopPropagation(),a.preventDefault(),!1}}},post:function(){}}}}}]),b.directive("uiGridRenderContainer",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","uiGridCellNavConstants",function(a,b,c,d,e){return{replace:!0,priority:-99999,require:["^uiGrid","uiGridRenderContainer"],scope:!1,compile:function(){return{pre:function(){},post:function(c,f,g,h){var i=h[0],j=h[1],k=j.containerId,l=i.grid;e.decorateRenderContainers(l),f.attr("tabindex",-1),f.on("keydown",function(a){return a.uiGridTargetRenderContainerId=k,i.cellNav.handleKeyDown(a)}),c.$on(d.events.GRID_SCROLL,function(){null!=i.grid.api.cellNav.getFocusedCell()&&a(function(){a(function(){var a=i.grid.api.cellNav.getFocusedCell();b.activeElement===b.body&&f[0].focus(),i.cellNav.broadcastCellNav(a)})})})}}}}}]),b.directive("uiGridCell",["$timeout","$document","uiGridCellNavService","gridUtil","uiGridCellNavConstants","uiGridConstants",function(b,c,d,e,f){return{priority:-150,restrict:"A",require:"^uiGrid",scope:!1,link:function(b,c,d,e){function g(){c.find("div").attr("tabindex",-1)}function h(){var a=c.find("div");a.addClass("ui-grid-cell-focus")}function i(){var a=c.find("div");a.removeClass("ui-grid-cell-focus")}b.col.colDef.allowCellFocus&&(g(),c.find("div").on("click",function(c){e.cellNav.broadcastCellNav(new a(b.row,b.col)),c.stopPropagation()}),b.$on(f.CELL_NAV_EVENT,function(a,d){d.row===b.row&&d.col===b.col?(h(),d.hasOwnProperty("eventType")&&d.eventType===f.EVENT_TYPE.KEYDOWN&&c.find("div")[0].focus()):i()}),b.$on("$destroy",function(){c.find("div").off("click")}))}}}])}(),function(){"use strict";var a=angular.module("ui.grid.edit",["ui.grid"]);a.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),a.service("uiGridEditService",["$q","$templateCache","uiGridConstants","gridUtil",function(a,b,c,d){var e={initializeGrid:function(a){e.defaultGridOptions(a.options),a.registerColumnBuilder(e.editColumnBuilder);var b={events:{edit:{afterCellEdit:function(){},beginCellEdit:function(){},cancelCellEdit:function(){}}},methods:{edit:{}}};a.api.registerEventsFromObject(b.events)},defaultGridOptions:function(a){a.cellEditableCondition=void 0===a.cellEditableCondition?!0:a.cellEditableCondition,a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?!1:a.enableCellEditOnFocus},editColumnBuilder:function(b,c,e){var f=[];return b.enableCellEdit=void 0===b.enableCellEdit?void 0===e.enableCellEdit?"object"!==b.type:e.enableCellEdit:b.enableCellEdit,b.cellEditableCondition=void 0===b.cellEditableCondition?e.cellEditableCondition:b.cellEditableCondition,b.enableCellEdit&&(b.editableCellTemplate=b.editableCellTemplate||e.editableCellTemplate||"ui-grid/cellEditor",f.push(d.getTemplate(b.editableCellTemplate).then(function(a){c.editableCellTemplate=a},function(){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+b.editableCellTemplate+"'")}))),b.enableCellEditOnFocus=void 0===b.enableCellEditOnFocus?e.enableCellEditOnFocus:b.enableCellEditOnFocus,a.all(f)},isStartEditKey:function(a){return a.keyCode===c.keymap.LEFT||a.keyCode===c.keymap.TAB&&a.shiftKey||a.keyCode===c.keymap.RIGHT||a.keyCode===c.keymap.TAB||a.keyCode===c.keymap.UP||a.keyCode===c.keymap.ENTER&&a.shiftKey||a.keyCode===c.keymap.DOWN||a.keyCode===c.keymap.ENTER?!1:!0}};return e}]),a.directive("uiGridEdit",["gridUtil","uiGridEditService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(){}}}}}]),a.directive("uiGridCell",["$compile","$injector","uiGridConstants","uiGridEditConstants","gridUtil","$parse","uiGridEditService",function(a,b,c,d,e,f,g){return{priority:-100,restrict:"A",scope:!1,require:"?^uiGrid",link:function(e,h,i,j){function k(){h.on("dblclick",p),h.on("keydown",n),e.col.colDef.enableCellEditOnFocus&&h.find("div").on("focus",m)}function l(){h.off("dblclick",p),h.off("keydown",n),e.col.colDef.enableCellEditOnFocus&&h.find("div").off("focus",m)}function m(a){j&&j.cellNav&&j.cellNav.focusCell(e.row,e.col),a.stopPropagation(),p()}function n(a){g.isStartEditKey(a)&&p()}function o(a,b){return!b.isSaving&&(angular.isFunction(a.colDef.cellEditableCondition)?a.colDef.cellEditableCondition(e):a.colDef.cellEditableCondition)}function p(){if(!v&&o(e.col,e.row)){u=f(e.row.getQualifiedColField(e.col)),t=u(e),s=e.col.editableCellTemplate,s=s.replace(c.MODEL_COL_FIELD,e.row.getQualifiedColField(e.col));var b=e.col.colDef.editDropdownFilter?"|"+e.col.colDef.editDropdownFilter:"";switch(s=s.replace(c.CUSTOM_FILTERS,b),e.inputType="text",e.col.colDef.type){case"boolean":e.inputType="checkbox";break;case"number":e.inputType="number";break;case"date":e.inputType="date"}e.editDropdownOptionsArray=e.col.colDef.editDropdownOptionsArray,e.editDropdownIdLabel=e.col.colDef.editDropdownIdLabel?e.col.colDef.editDropdownIdLabel:"id",e.editDropdownValueLabel=e.col.colDef.editDropdownValueLabel?e.col.colDef.editDropdownValueLabel:"value";e.$apply(function(){v=!0,l();var b=angular.element(s);h.append(b),a(b)(e.$new());var c=angular.element(h.children()[0]);w=c.hasClass("ui-grid-cell-focus"),c.addClass("ui-grid-cell-contents-hidden")});var g=e.$on(c.events.GRID_SCROLL,function(){q(!0),e.grid.api.edit.raise.afterCellEdit(e.row.entity,e.col.colDef,u(e),t),g()}),i=e.$on(d.events.END_CELL_EDIT,function(a,b){q(b),e.grid.api.edit.raise.afterCellEdit(e.row.entity,e.col.colDef,u(e),t),i()}),j=e.$on(d.events.CANCEL_CELL_EDIT,function(){r(),j()});e.$broadcast(d.events.BEGIN_CELL_EDIT),e.grid.api.edit.raise.beginCellEdit(e.row.entity,e.col.colDef)}}function q(a){if(v){var b=angular.element(h.children()[0]);angular.element(h.children()[1]).remove(),b.removeClass("ui-grid-cell-contents-hidden"),a&&w&&b[0].focus(),w=!1,v=!1,k(),e.grid.api.core.notifyDataChange(e.grid,c.dataChange.EDIT)}}function r(){v&&(u.assign(e,t),e.$apply(),e.grid.api.edit.raise.cancelCellEdit(e.row.entity,e.col.colDef),q(!0))}if(e.col.colDef.enableCellEdit){var s,t,u,v=!1,w=!1;k();try{var x=b.get("uiGridCellNavConstants");e.col.colDef.enableCellEditOnFocus&&e.$on(x.CELL_NAV_EVENT,function(a,b){b.row===e.row&&b.col===e.col?p():q()})}catch(y){}}}}}]),a.directive("uiGridEditor",["uiGridConstants","uiGridEditConstants",function(a,b){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer"],compile:function(){return{pre:function(){},post:function(c,d,e,f){var g,h;f[0]&&(g=f[0]),f[1]&&(h=f[1]),c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].select(),d.on("blur",function(a){c.stopEdit(a)})}),c.deepEdit=!1,c.stopEdit=function(a){c.inputForm&&!c.inputForm.$valid?(a.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT)):c.$emit(b.events.END_CELL_EDIT),c.deepEdit=!1},d.on("click",function(){c.deepEdit=!0}),d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT);break;case a.keymap.ENTER:c.stopEdit(d);break;case a.keymap.TAB:c.stopEdit(d)}if(c.deepEdit)switch(d.keyCode){case a.keymap.LEFT:d.stopPropagation();break;case a.keymap.RIGHT:d.stopPropagation();break;case a.keymap.UP:d.stopPropagation();break;case a.keymap.DOWN:d.stopPropagation()}else g&&g.hasOwnProperty("cellNav")&&h&&(d.uiGridTargetRenderContainerId=h.containerId,g.cellNav.handleKeyDown(d));return!0})}}}}}]),a.directive("input",["$filter",function(a){function b(a){if("undefined"==typeof a||""===a)return null;var b=a.split("-");if(3!==b.length)return null;var c=parseInt(b[0],10),d=parseInt(b[1],10),e=parseInt(b[2],10);return 1>d||1>c||1>e?null:new Date(c,d-1,e)}return{restrict:"E",require:"?ngModel",link:function(c,d,e,f){2===angular.version.minor&&e.type&&"date"===e.type&&f&&(f.$formatters.push(function(b){return f.$setValidity(null,!b||!isNaN(b.getTime())),a("date")(b,"yyyy-MM-dd")}),f.$parsers.push(function(a){if(a&&a.length>0){var c=b(a);return f.$setValidity(null,c&&!isNaN(c.getTime())),c}return f.$setValidity(null,!0),null}))}}}]),a.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants",function(a,b){return{scope:!0,compile:function(){return{pre:function(){},post:function(c,d){c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].style.width=d[0].parentElement.offsetWidth-1+"px",d.on("blur",function(a){c.stopEdit(a) -})}),c.stopEdit=function(){c.$emit(b.events.END_CELL_EDIT)},d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT);break;case a.keymap.ENTER:c.stopEdit(d);break;case a.keymap.LEFT:c.stopEdit(d);break;case a.keymap.RIGHT:c.stopEdit(d);break;case a.keymap.UP:d.stopPropagation();break;case a.keymap.DOWN:d.stopPropagation();break;case a.keymap.TAB:c.stopEdit(d)}return!0})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.expandable",["ui.grid"]);a.service("uiGridExpandableService",["gridUtil","$compile",function(a){var b={initializeGrid:function(c){c.options.enableExpandable=c.options.enableExpandable!==!1,c.options.expandableRowHeight=c.options.expandableRowHeight||150,c.options.enableExpandable&&!c.options.expandableRowTemplate&&(a.logError("You have not set the expandableRowTemplate, disabling expandable module"),c.options.enableExpandable=!1);var d={events:{expandable:{rowExpandedStateChanged:function(){}}},methods:{expandable:{toggleRowExpansion:function(a){var d=c.getRow(a);null!==d&&b.toggleRowExpansion(c,d)},expandAllRows:function(){b.expandAllRows(c)},collapseAllRows:function(){b.collapseAllRows(c)}}}};c.api.registerEventsFromObject(d.events),c.api.registerMethodsFromObject(d.methods)},toggleRowExpansion:function(a,b){b.isExpanded=!b.isExpanded,b.height=b.isExpanded?b.grid.options.rowHeight+a.options.expandableRowHeight:b.grid.options.rowHeight,a.api.expandable.raise.rowExpandedStateChanged(b)},expandAllRows:function(a){angular.forEach(a.renderContainers.body.visibleRowCache,function(c){c.isExpanded||b.toggleRowExpansion(a,c)}),a.refresh()},collapseAllRows:function(a){angular.forEach(a.renderContainers.body.visibleRowCache,function(c){c.isExpanded&&b.toggleRowExpansion(a,c)}),a.refresh()}};return b}]),a.directive("uiGridExpandable",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(f.grid.options.enableExpandableRowHeader!==!1){var g={name:"expandableButtons",width:40};g.cellTemplate=b.get("ui-grid/expandableRowHeader"),f.grid.addRowHeaderColumn(g)}a.initializeGrid(f.grid)},post:function(){}}}}}]),a.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$compile","uiGridConstants","gridUtil","$interval","$log",function(a,b,c,d,e){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(a,b){e.getTemplate(a.grid.options.expandableRowTemplate).then(function(d){if(a.grid.options.expandableRowScope){var e=a.grid.options.expandableRowScope;for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])}var g=c(d)(a);b.append(g),a.row.expandedRendered=!0})},post:function(a){a.$on("$destroy",function(){a.row.expandedRendered=!1})}}}}}]),a.directive("uiGridRow",["$compile","gridUtil","$templateCache",function(){return{priority:-200,scope:!1,compile:function(){return{pre:function(a){function b(){var b=a.grid,c=0;return angular.forEach(b.columns,function(a){"left"===a.renderContainer&&(c+=a.width)}),c=Math.floor(c),".grid"+b.id+" .ui-grid-pinned-container-"+a.colContainer.name+", .grid"+b.id+" .ui-grid-pinned-container-"+a.colContainer.name+" .ui-grid-render-container-"+a.colContainer.name+" .ui-grid-viewport .ui-grid-canvas .ui-grid-row { width: "+c+"px; }"}a.expandableRow={},a.expandableRow.shouldRenderExpand=function(){var b="body"===a.colContainer.name&&a.grid.options.enableExpandable!==!1&&a.row.isExpanded&&(!a.grid.isScrollingVertically||a.row.expandedRendered);return b},a.expandableRow.shouldRenderFiller=function(){var b=a.row.isExpanded&&("body"!==a.colContainer.name||a.grid.isScrollingVertically&&!a.row.expandedRendered);return b},"left"===a.colContainer.name&&a.grid.registerStyleComputation({priority:15,func:b})},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]),d=c.get("ui-grid/expandableScrollFiller"),e=c.get("ui-grid/expandableRow");return b.append(e),b.append(d),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.exporter",["ui.grid"]);a.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",LINK_LABEL:"LINK_LABEL",BUTTON_LABEL:"BUTTON_LABEL"}),a.service("uiGridExporterService",["$q","uiGridExporterConstants","uiGridSelectionConstants","gridUtil","$compile","$interval","i18nService",function(a,b,c,d,e,f,g){var h={initializeGrid:function(a){a.exporter={},this.defaultGridOptions(a.options);var b={events:{exporter:{}},methods:{exporter:{csvExport:function(b,c,d){h.csvExport(a,b,c,d)},pdfExport:function(b,c){h.pdfExport(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods),a.api.core.addToGridMenu?h.addToMenu(a):f(function(){a.api.core.addToGridMenu&&h.addToMenu(a)},100,1)},defaultGridOptions:function(a){a.exporterSuppressMenu=a.exporterSuppressMenu===!0,a.exporterLinkTemplate=a.exporterLinkTemplate?a.exporterLinkTemplate:"ui-grid/csvLink",a.exporterHeaderTemplate=a.exporterHeaderTemplate?a.exporterHeaderTemplate:"ui-grid/exporterHeader",a.exporterLinkLabel=a.exporterLinkLabel?a.exporterLinkLabel:"Download CSV",a.exporterMenuLabel=a.exporterMenuLabel?a.exporterMenuLabel:"Export",a.exporterSuppressColumns=a.exporterSuppressColumns?a.exporterSuppressColumns:[],a.exporterCsvColumnSeparator=a.exporterCsvColumnSeparator?a.exporterCsvColumnSeparator:",",a.exporterPdfDefaultStyle=a.exporterPdfDefaultStyle?a.exporterPdfDefaultStyle:{fontSize:11},a.exporterPdfTableStyle=a.exporterPdfTableStyle?a.exporterPdfTableStyle:{margin:[0,5,0,15]},a.exporterPdfTableHeaderStyle=a.exporterPdfTableHeaderStyle?a.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},a.exporterPdfHeader=a.exporterPdfHeader?a.exporterPdfHeader:null,a.exporterPdfFooter=a.exporterPdfFooter?a.exporterPdfFooter:null,a.exporterPdfOrientation=a.exporterPdfOrientation?a.exporterPdfOrientation:"landscape",a.exporterPdfPageSize=a.exporterPdfPageSize?a.exporterPdfPageSize:"A4",a.exporterPdfMaxGridWidth=a.exporterPdfMaxGridWidth?a.exporterPdfMaxGridWidth:720,a.exporterMenuCsv=void 0!==a.exporterMenuCsv?a.exporterMenuCsv:!0,a.exporterMenuPdf=void 0!==a.exporterMenuPdf?a.exporterMenuPdf:!0,a.exporterPdfCustomFormatter=a.exporterPdfCustomFormatter&&"function"==typeof a.exporterPdfCustomFormatter?a.exporterPdfCustomFormatter:function(a){return a},a.exporterFieldCallback=a.exporterFieldCallback?a.exporterFieldCallback:function(a,b,c,d){return d}},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:g.getSafeText("gridMenu.exporterAllAsCsv"),action:function(){this.grid.api.exporter.csvExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuCsv}},{title:g.getSafeText("gridMenu.exporterVisibleAsCsv"),action:function(){this.grid.api.exporter.csvExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv}},{title:g.getSafeText("gridMenu.exporterSelectedAsCsv"),action:function(){this.grid.api.exporter.csvExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0}},{title:g.getSafeText("gridMenu.exporterAllAsPdf"),action:function(){this.grid.api.exporter.pdfExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuPdf}},{title:g.getSafeText("gridMenu.exporterVisibleAsPdf"),action:function(){this.grid.api.exporter.pdfExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf}},{title:g.getSafeText("gridMenu.exporterSelectedAsPdf"),action:function(){this.grid.api.exporter.pdfExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0}}])},csvExport:function(a,b,c,e){var f=this.getColumnHeaders(a,c),g=this.getData(a,b,c),h=this.formatAsCsv(f,g,a.options.exporterCsvColumnSeparator);!e&&a.options.exporterCsvLinkElement&&(e=a.options.exporterCsvLinkElement),e?this.renderCsvLink(a,h,e):d.logError("Exporter asked to export as csv, but no element provided. Perhaps you should set gridOptions.exporterCsvLinkElement?")},getColumnHeaders:function(a,d){var e=[];return angular.forEach(a.columns,function(f){!f.visible&&d!==b.ALL||f.name===c.selectionRowHeaderColName||-1!==a.options.exporterSuppressColumns.indexOf(f.name)||e.push({name:f.field,displayName:a.options.exporterHeaderFilter?a.options.exporterHeaderFilter(f.displayName):f.displayName,width:f.drawnWidth?f.drawnWidth:f.width,align:"number"===f.colDef.type?"right":"left"})}),e},getData:function(a,e,f){var g,h=[];switch(e){case b.ALL:g=a.rows;break;case b.VISIBLE:g=a.getVisibleRows();break;case b.SELECTED:a.api.selection?g=a.api.selection.getSelectedGridRows():d.logError("selection feature must be enabled to allow selected rows to be exported")}return angular.forEach(g,function(d){var e=[];angular.forEach(a.columns,function(g){if((g.visible||f===b.ALL)&&g.name!==c.selectionRowHeaderColName&&-1===a.options.exporterSuppressColumns.indexOf(g.name)){var h={value:a.options.exporterFieldCallback(a,d,g,a.getCellValue(d,g))};g.colDef.exporterPdfAlign&&(h.alignment=g.colDef.exporterPdfAlign),e.push(h)}}),h.push(e)}),h},formatAsCsv:function(a,b,c){var d=this,e=a.map(function(a){return{value:a.displayName}}),f=d.formatRowAsCsv(this,c)(e)+"\n";return f+=b.map(this.formatRowAsCsv(this,c)).join("\n")},formatRowAsCsv:function(a,b){return function(c){return c.map(a.formatFieldAsCsv).join(b)}},formatFieldAsCsv:function(a){return null==a.value?"":"number"==typeof a.value?a.value:"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?'"'+a.value.replace(/"/g,'""')+'"':JSON.stringify(a.value)},renderCsvLink:function(a,c,f){var g=f?f:angular.element(a.exporter.gridElm[0].querySelectorAll(".ui-grid-exporter-csv-link"));angular.element(g[0].querySelectorAll(".ui-grid-exporter-csv-link-span"))&&angular.element(g[0].querySelectorAll(".ui-grid-exporter-csv-link-span")).remove();d.getTemplate(a.options.exporterLinkTemplate).then(function(d){var f=angular.element(d);f.children("a").html(f.children("a").html().replace(b.LINK_LABEL,a.options.exporterLinkLabel)),f.children("a").attr("href",f.children("a").attr("href").replace(b.CSV_CONTENT,encodeURIComponent(c)));var h=e(f)(a.exporter.$scope);g.append(h)})},pdfExport:function(a,b,c){var d=this.getColumnHeaders(a,c),e=this.getData(a,b,c),f=this.prepareAsPdf(a,d,e);pdfMake.createPdf(f).open()},prepareAsPdf:function(a,b,c){var d=this.calculatePdfHeaderWidths(a,b),e=b.map(function(a){return{text:a.displayName,style:"tableHeader"}}),f=c.map(this.formatRowAsPdf(this)),g=[e].concat(f),h={pageOrientation:a.options.exporterPdfOrientation,pageSize:a.options.exporterPdfPageSize,content:[{style:"tableStyle",table:{headerRows:1,widths:d,body:g}}],styles:{tableStyle:a.options.exporterPdfTableStyle,tableHeader:a.options.exporterPdfTableHeaderStyle},defaultStyle:a.options.exporterPdfDefaultStyle};return a.options.exporterPdfLayout&&(h.layout=a.options.exporterPdfLayout),a.options.exporterPdfHeader&&h.content.unshift(a.options.exporterPdfHeader),a.options.exporterPdfFooter&&h.content.push(a.options.exporterPdfFooter),a.options.exporterPdfCustomFormatter&&(h=a.options.exporterPdfCustomFormatter(h)),h},calculatePdfHeaderWidths:function(a,b){var c=0;angular.forEach(b,function(a){"number"==typeof a.width&&(c+=a.width)});var d=0;angular.forEach(b,function(a){if("*"===a.width&&(d+=100),"string"==typeof a.width&&a.width.match(/(\d)*%/)){var b=parseInt(a.width.match(/(\d)*%/)[0]);a.width=c*b/100,d+=a.width}});var e=c+d;return b.map(function(b){return"*"===b.width?b.width:b.width*a.options.exporterPdfMaxGridWidth/e})},formatRowAsPdf:function(a){return function(b){return b.map(a.formatFieldAsPdfString)}},formatFieldAsPdfString:function(a){var b;return b=null==a.value?"":"number"==typeof a.value?a.value.toString():"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?a.value.replace(/"/g,'""'):JSON.stringify(a.value).replace(/^"/,"").replace(/"$/,""),a.alignment&&"string"==typeof a.alignment&&(b={text:b,alignment:a.alignment}),b}};return h}]),a.directive("uiGridExporter",["uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid),e.grid.exporter.$scope=a}}}])}(),function(){"use strict";var a=angular.module("ui.grid.importer",["ui.grid"]);a.constant("uiGridImporterConstants",{featureName:"importer"}),a.service("uiGridImporterService",["$q","uiGridConstants","uiGridImporterConstants","gridUtil","$compile","$interval","i18nService","$window",function(a,b,c,d,e,f,g,h){var i={initializeGrid:function(a,b){b.importer={$scope:a},this.defaultGridOptions(b.options);var c={events:{importer:{}},methods:{importer:{importFile:function(a,b){i.importFile(a,b)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.options.enableImporter&&b.options.importerShowMenu&&(b.api.core.addToGridMenu?i.addToMenu(b):f(function(){b.api.core.addToGridMenu&&i.addToMenu(b)},100,1))},defaultGridOptions:function(a){a.enableImporter||void 0===a.enableImporter?h.hasOwnProperty("File")&&h.hasOwnProperty("FileReader")&&h.hasOwnProperty("FileList")&&h.hasOwnProperty("Blob")?a.enableImporter=!0:(d.logError("The File APIs are not fully supported in this browser, grid importer cannot be used."),a.enableImporter=!1):a.enableImporter=!1,a.importerProcessHeaders=a.importerProcessHeaders||i.processHeaders,a.importerHeaderFilter=a.importerHeaderFilter||function(a){return a},a.importerErrorCallback&&"function"==typeof a.importerErrorCallback||delete a.importerErrorCallback,a.enableImporter!==!0||a.importerDataAddCallback||(d.logError("You have not set an importerDataAddCallback, importer is disabled"),a.enableImporter=!1),a.importerShowMenu=a.importerShowMenu!==!1,a.importerObjectCallback=a.importerObjectCallback||function(a,b){return b}},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:g.getSafeText("gridMenu.importerTitle")},{templateUrl:"ui-grid/importerMenuItemContainer",action:function(){this.grid.api.importer.importAFile(a)}}])},importThisFile:function(a,b){if(!b)return void d.logError("No file object provided to importThisFile, should be impossible, aborting");var c=new FileReader;switch(b.type){case"application/json":c.onload=i.importJsonClosure(a);break;default:c.onload=i.importCsvClosure(a)}c.readAsText(b)},importJsonClosure:function(a){return function(b){var c,d=[];angular.forEach(i.parseJson(a,b),function(b){c=i.newObject(a),angular.extend(c,b),c=a.options.importerObjectCallback(a,c),d.push(c)}),i.addObjects(a,d)}},parseJson:function(a,b){var c;try{c=JSON.parse(b.target.result)}catch(d){return void i.alertError(a,"importer.invalidJson","File could not be processed, is it valid json? Content was: ",b.target.result)}return Array.isArray(c)?c:(i.alertError(a,"importer.jsonNotarray","Import failed, file is not an array, file was: ",b.target.result),[])},importCsvClosure:function(a){return function(b){var c=i.parseCsv(b);if(!c||c.length<1)return void i.alertError(a,"importer.invalidCsv","File could not be processed, is it valid csv? Content was: ",b.target.result);var d=i.createCsvObjects(a,c);return d&&0!==d.length?void i.addObjects(a,d):void i.alertError(a,"importer.noObjects","Objects were not able to be derived, content was: ",b.target.result)}},parseCsv:function(a){var b=a.target.result;return CSV.parse(b)},createCsvObjects:function(a,b){var c=a.options.importerProcessHeaders(a,b.shift());if(!c||0===c.length)return i.alertError(a,"importer.noHeaders","Column names could not be derived, content was: ",b),[];var d,e=[];return angular.forEach(b,function(b){d=i.newObject(a),angular.forEach(b,function(a,b){null!==c[b]&&(d[c[b]]=a)}),d=a.options.importerObjectCallback(a,d),e.push(d)}),e},processHeaders:function(a,b){var c=[];if(a.options.columnDefs&&0!==a.options.columnDefs.length){var d=i.flattenColumnDefs(a,a.options.columnDefs);return angular.forEach(b,function(a){c.push(d[a]?d[a]:d[a.toLowerCase()]?d[a.toLowerCase()]:null)}),c}return angular.forEach(b,function(a){c.push(a.replace(/[^0-9a-zA-Z\-_]/g,"_"))}),c},flattenColumnDefs:function(a,b){var c={};return angular.forEach(b,function(b){b.name&&(c[b.name]=b.field||b.name,c[b.name.toLowerCase()]=b.field||b.name),b.field&&(c[b.field]=b.field||b.name,c[b.field.toLowerCase()]=b.field||b.name),b.displayName&&(c[b.displayName]=b.field||b.name,c[b.displayName.toLowerCase()]=b.field||b.name),b.displayName&&a.options.importerHeaderFilter&&(c[a.options.importerHeaderFilter(b.displayName)]=b.field||b.name,c[a.options.importerHeaderFilter(b.displayName).toLowerCase()]=b.field||b.name)}),c},addObjects:function(a,c){if(a.api.rowEdit){var d=a.registerDataChangeCallback(function(){a.api.rowEdit.setRowsDirty(a,c),a.deregisterDataChangeCallback(d)},[b.dataChange.ROW]),e=function(){a.deregisterDataChangeCallback(d)};a.importer.$scope.$on("$destroy",e)}a.importer.$scope.$apply(a.options.importerDataAddCallback(a,c))},newObject:function(a){return"undefined"!=typeof a.options&&"undefined"!=typeof a.options.importerNewObject?new a.options.importerNewObject:{}},alertError:function(a,b,c,e){a.options.importerErrorCallback?a.options.importerErrorCallback(a,b,c,e):(h.alert(g.getSafeText(b)),d.logError(c+e))}};return i}]),a.directive("uiGridImporter",["uiGridImporterConstants","uiGridImporterService","gridUtil","$compile",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(a,e.grid)}}}]),a.directive("uiGridImporterMenuItem",["uiGridImporterConstants","uiGridImporterService","gridUtil","$compile",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,templateUrl:"ui-grid/importerMenuItem",link:function(a,d,e,f){var g=function(a){if(1===a.srcElement.files.length){var c=a.srcElement.files[0];b.importThisFile(i,c),a.srcElement.form.reset()}},h=d[0].querySelectorAll(".ui-grid-importer-file-chooser"),i=f.grid;1!==h.length?c.logError("Found > 1 or < 1 file choosers within the menu item, error, cannot continue"):h[0].addEventListener("change",g,!1)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.infiniteScroll",["ui.grid"]);a.service("uiGridInfiniteScrollService",["gridUtil","$compile","$timeout",function(){var a={initializeGrid:function(b){a.defaultGridOptions(b.options);var c={events:{infiniteScroll:{needLoadMoreData:function(){}}},methods:{infiniteScroll:{dataLoaded:function(){b.options.loadTimout=!1}}}};b.options.loadTimout=!1,b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableInfiniteScroll=a.enableInfiniteScroll!==!1},loadData:function(a){a.options.loadTimout=!0,a.api.infiniteScroll.raise.needLoadMoreData()},checkScroll:function(a,b){var c=a.options.infiniteScrollPercentage?a.options.infiniteScrollPercentage:20;return!a.options.loadTimout&&c>=b?(this.loadData(a),!0):!1}};return a}]),a.directive("uiGridInfiniteScroll",["uiGridInfiniteScrollService",function(a){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","uiGridInfiniteScrollService","uiGridConstants",function(a,b,c,d){return{priority:-200,scope:!1,link:function(a){a.grid.options.enableInfiniteScroll&&a.$on(d.events.GRID_SCROLL,function(b,d){if(d.y){var e=100-100*d.y.percentage;c.checkScroll(a.grid,e)}})}}}])}(),function(){"use strict";var a=angular.module("ui.grid.moveColumns",["ui.grid"]);a.service("uiGridMoveColumnService",["$q","$timeout","$log",function(a,b){var c={initializeGrid:function(a){var b=this;this.registerPublicApi(a),this.defaultGridOptions(a.options),a.registerColumnBuilder(b.movableColumnBuilder)},registerPublicApi:function(a){var b=this,c={events:{colMovable:{columnPositionChanged:function(){}}},methods:{colMovable:{moveColumn:function(c,d){b.redrawColumnAtPosition(a,c,d)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableColumnMoving=a.enableColumnMoving!==!1},movableColumnBuilder:function(b,c,d){var e=[];return b.enableColumnMoving=void 0===b.enableColumnMoving?d.enableColumnMoving:b.enableColumnMoving,a.all(e)},redrawColumnAtPosition:function(a,c,d){var e=a.columns,f=function(a){for(var b=a,c=0;b>=c;c++)angular.isDefined(e[c].colDef.visible)&&e[c].colDef.visible===!1&&b++;return b};c=f(c),d=f(d);var g=e[c];if(g.colDef.enableColumnMoving){if(c>d)for(var h=c;h>d;h--)e[h]=e[h-1];else if(d>c)for(var i=c;d>i;i++)e[i]=e[i+1];e[d]=g,b(function(){a.refresh(),a.api.colMovable.raise.columnPositionChanged(g.colDef,c,d)})}}};return c}]),a.directive("uiGridMoveColumns",["uiGridMoveColumnService",function(a){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(){}}}}}]),a.directive("uiGridHeaderCell",["$q","gridUtil","uiGridMoveColumnService","$document",function(a,b,c,d){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(e,f,g,h){if(e.col.colDef.enableColumnMoving){var i=function(i){if("ui-grid-icon-angle-down"!==i.target.className&&"I"!==i.target.tagName){var j=f.clone();f.append(j),j.addClass("movingColumn");var k={},l=e.grid.element[0].getBoundingClientRect().left,m=f[0].getBoundingClientRect().left;k.left=m-l+"px";var n,o=e.grid.element[0].getBoundingClientRect().right,p=f[0].getBoundingClientRect().right;p>o&&(n=e.col.drawnWidth+(o-p),k.width=n+"px"),j.css(k);var q=i.pageX,r=0,s=l+e.grid.getViewportWidth()-e.grid.verticalScrollbarWidth,t=function(a){h.fireEvent("hide-menu");var c,d=j[0].getBoundingClientRect().left-1,f=j[0].getBoundingClientRect().right,g=a.pageX-q;c="ie"===b.detectBrowser()?d+g:d-l+g,c=s>c?c:s,(d>=l||g>0)&&(s>=f||0>g)?j.css({visibility:"visible",left:c+"px"}):(g*=5,h.fireScrollingEvent({x:{pixels:2.5*g}})),r+=g,q=a.pageX,nr){for(var l=0,m=f-1;m>=0;m--)if(l+=a[m].drawnWidth,l>Math.abs(r)){c.redrawColumnAtPosition(e.grid,g+f,g+m+1);break}l0){for(var n=0,o=f+1;or){c.redrawColumnAtPosition(e.grid,g+f,g+o-1);break}r>n&&c.redrawColumnAtPosition(e.grid,g+f,g+a.length-1)}else if(0===r&&h.grid.options.enableSorting&&e.col.enableSorting){var p=!1;b.shiftKey&&(p=!0),h.grid.sortColumn(e.col,p).then(function(){h.columnMenuScope&&h.columnMenuScope.hideMenu(),h.grid.refresh()})}d.off("mousemove",t),d.off("mouseup",u)})};d.on("mouseup",u)}};f.on("mousedown",i)}}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pagination",["ui.grid"]);a.service("uiGridPaginationService",function(){var a={initializeGrid:function(b){a.defaultGridOptions(b.options),b.pagination={page:1,totalPages:1};var c={methods:{pagination:{getPage:function(){return b.pagination.page},getTotalPages:function(){return b.pagination.totalPages},nextPage:function(){b.pagination.page++,b.refresh()},previousPage:function(){b.pagination.page=Math.max(1,b.pagination.page-1),b.refresh()},seek:function(a){if(!angular.isNumber(a)||1>a)throw"Invalid page number: "+a;b.pagination.page=a,b.refresh()}}}};b.api.registerMethodsFromObject(c.methods),b.registerRowsProcessor(function(a){if(!b.options.enablePagination)return a;b.pagination.totalPages=Math.max(1,Math.ceil(a.length/b.options.rowsPerPage));var c=(b.pagination.page-1)*b.options.rowsPerPage;return c>=a.length&&(b.pagination.page=b.pagination.totalPages,c=(b.pagination.page-1)*b.options.rowsPerPage),a.slice(c,c+b.options.rowsPerPage)})},defaultGridOptions:function(a){a.enablePagination=a.enablePagination!==!1,a.rowsPerPage=angular.isNumber(a.rowsPerPage)?a.rowsPerPage:10}};return a}),a.directive("uiGridPagination",["uiGridPaginationService",function(a){return{priority:-400,scope:!1,require:"^uiGrid",link:{pre:function(b,c,d,e){a.initializeGrid(e.grid)}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.paging",["ui.grid"]);a.service("uiGridPagingService",["gridUtil",function(a){var b={initializeGrid:function(a){b.defaultGridOptions(a.options);var c={events:{paging:{pagingChanged:function(){}}},methods:{paging:{}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods),a.registerRowsProcessor(function(b){if(a.options.useExternalPaging||!a.options.enablePaging)return b;var c=parseInt(a.options.pagingPageSize,10),d=parseInt(a.options.pagingCurrentPage,10),e=(d-1)*c;return b.slice(e,e+c)})},defaultGridOptions:function(b){b.enablePaging=b.enablePaging!==!1,b.useExternalPaging=b.useExternalPaging===!0,a.isNullOrUndefined(b.totalItems)&&(b.totalItems=0),a.isNullOrUndefined(b.pagingPageSizes)&&(b.pagingPageSizes=[250,500,1e3]),a.isNullOrUndefined(b.pagingPageSize)&&(b.pagingPageSize=b.pagingPageSizes.length>0?b.pagingPageSizes[0]:0),a.isNullOrUndefined(b.pagingCurrentPage)&&(b.pagingCurrentPage=1)},onPagingChanged:function(a,b,c){a.api.paging.raise.pagingChanged(b,c),a.options.useExternalPaging||a.refresh()}};return b}]),a.directive("uiGridPaging",["gridUtil","uiGridPagingService",function(a,b){var c="ui-grid/ui-grid-paging";return{priority:-200,scope:!1,require:"uiGrid",compile:function(){return{pre:function(d,e,f,g){b.initializeGrid(g.grid);var h=g.grid.options.pagingTemplate||c;a.getTemplate(h).then(function(a){var b=angular.element(a);e.append(b),g.innerCompile(b)})},post:function(){}}}}}]),a.directive("uiGridPager",["uiGridPagingService","uiGridConstants","gridUtil","i18nService",function(a,b,c,d){return{priority:-200,scope:!0,require:"^uiGrid",link:function(e,f,g,h){e.sizesLabel=d.getSafeText("paging.sizes"),e.totalItemsLabel=d.getSafeText("paging.totalItems");var i=e.grid.options;h.grid.renderContainers.body.registerViewportAdjuster(function(a){return a.height=a.height-c.elementHeight(f),a}),h.grid.registerDataChangeCallback(function(a){a.options.useExternalPaging||(a.options.totalItems=a.rows.length)},[b.dataChange.ROW]);var j=function(){e.showingLow=(i.pagingCurrentPage-1)*i.pagingPageSize+1,e.showingHigh=Math.min(i.pagingCurrentPage*i.pagingPageSize,i.totalItems)},k=function(){return 0===i.totalItems?1:Math.ceil(i.totalItems/i.pagingPageSize)},l=e.$watch("grid.options.totalItems + grid.options.pagingPageSize",function(){e.currentMaxPages=k(),j()}),m=e.$watch("grid.options.pagingCurrentPage + grid.options.pagingPageSize",function(b,c){if(b!==c){if(!angular.isNumber(i.pagingCurrentPage)||i.pagingCurrentPage<1)return void(i.pagingCurrentPage=1);if(i.totalItems>0&&i.pagingCurrentPage>k())return void(i.pagingCurrentPage=k());j(),a.onPagingChanged(e.grid,i.pagingCurrentPage,i.pagingPageSize)}});e.$on("$destroy",function(){l(),m()}),e.pageForward=function(){i.totalItems>0?i.pagingCurrentPage=Math.min(i.pagingCurrentPage+1,e.currentMaxPages):i.pagingCurrentPage++},e.pageBackward=function(){i.pagingCurrentPage=Math.max(i.pagingCurrentPage-1,1)},e.pageToFirst=function(){i.pagingCurrentPage=1},e.pageToLast=function(){i.pagingCurrentPage=e.currentMaxPages},e.cantPageForward=function(){return i.totalItems>0?i.pagingCurrentPage>=e.currentMaxPages:i.data.length<1},e.cantPageToLast=function(){return i.totalItems>0?e.cantPageForward():!0},e.cantPageBackward=function(){return i.pagingCurrentPage<=1}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pinning",["ui.grid"]);a.service("uiGridPinningService",["gridUtil","GridRenderContainer","i18nService",function(a,b,c){var d={initializeGrid:function(a){d.defaultGridOptions(a.options),a.registerColumnBuilder(d.pinningColumnBuilder)},defaultGridOptions:function(a){a.enablePinning=a.enablePinning!==!1},pinningColumnBuilder:function(b,d,e){if(b.enablePinning=void 0===b.enablePinning?e.enablePinning:b.enablePinning,b.pinnedLeft?"*"===d.width?d.grid.refresh().then(function(){d.renderContainer="left",d.width=d.grid.canvasWidth/d.grid.columns.length,d.grid.createLeftContainer()}):(d.renderContainer="left",d.grid.createLeftContainer()):b.pinnedRight&&("*"===d.width?d.grid.refresh().then(function(){d.renderContainer="right",d.width=d.grid.canvasWidth/d.grid.columns.length,d.grid.createRightContainer()}):(d.renderContainer="right",d.grid.createRightContainer())),b.enablePinning){var f={name:"ui.grid.pinning.pinLeft",title:c.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer="left",this.context.col.width=this.context.col.drawnWidth,this.context.col.grid.createLeftContainer(),d.grid.refresh().then(function(){d.grid.refresh()})}},g={name:"ui.grid.pinning.pinRight",title:c.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer="right",this.context.col.width=this.context.col.drawnWidth,this.context.col.grid.createRightContainer(),d.grid.refresh().then(function(){d.grid.refresh()})}},h={name:"ui.grid.pinning.unpin",title:c.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){this.context.col.renderContainer=null,d.grid.refresh().then(function(){d.grid.refresh()})}};a.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.pinning.pinLeft")||d.menuItems.push(f),a.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.pinning.pinRight")||d.menuItems.push(g),a.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.pinning.unpin")||d.menuItems.push(h)}}};return d}]),a.directive("uiGridPinning",["gridUtil","uiGridPinningService",function(a,b){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.resizeColumns",["ui.grid"]);a.constant("columnBounds",{minWidth:35}),a.service("uiGridResizeColumnsService",["gridUtil","$q","$timeout",function(a,b,c){var d={defaultGridOptions:function(a){a.enableColumnResizing=a.enableColumnResizing!==!1,a.enableColumnResize===!1&&(a.enableColumnResizing=!1)},colResizerColumnBuilder:function(a,c,d){var e=[];return a.enableColumnResizing=void 0===a.enableColumnResizing?d.enableColumnResizing:a.enableColumnResizing,a.enableColumnResize===!1&&(a.enableColumnResizing=!1),b.all(e)},registerPublicApi:function(a){var b={events:{colResizable:{columnSizeChanged:function(){}}}};a.api.registerEventsFromObject(b.events)},fireColumnSizeChanged:function(a,b,d){c(function(){a.api.colResizable.raise.columnSizeChanged(b,d)})}};return d}]),a.directive("uiGridResizeColumns",["gridUtil","uiGridResizeColumnsService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.defaultGridOptions(e.grid.options),e.grid.registerColumnBuilder(b.colResizerColumnBuilder),b.registerPublicApi(e.grid)},post:function(){}}}}}]),a.directive("uiGridHeaderCell",["gridUtil","$templateCache","$compile","$q",function(a,b,c,d){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,e,f,g){if(g.grid.options.enableColumnResizing){var h=d.defer(); -f.$observe("renderIndex",function(b){a.renderIndex=a.$eval(b),h.resolve()}),h.promise.then(function(){var d=b.get("ui-grid/columnResizer"),f=angular.element(d).clone(),g=angular.element(d).clone();f.attr("position","left"),g.attr("position","right");var h=a.col,i=h.getRenderContainer(),j=i.renderedColumns[a.renderIndex-1];j&&0!==i.visibleColumnCache.indexOf(a.col)&&j.colDef.enableColumnResizing!==!1&&(e.prepend(f),c(f)(a)),a.col.colDef.enableColumnResizing!==!1&&(e.append(g),c(g)(a))})}}}}}}]),a.directive("uiGridColumnResizer",["$document","gridUtil","uiGridConstants","columnBounds","uiGridResizeColumnsService",function(a,b,c,d,e){var f=angular.element('
    '),g={priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(g,h,i,j){function k(a){var b=a.getRenderContainer();b.visibleColumnCache.forEach(function(b){if(b!==a){var c=b.colDef;(!c.width||angular.isString(c.width)&&(-1!==c.width.indexOf("*")||-1!==c.width.indexOf("%")))&&(b.width=b.drawnWidth)}})}function l(){j.grid.buildColumns().then(function(){j.grid.refreshCanvas(!0)})}function m(a){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),p=a.clientX-q,0>p?p=0:p>j.grid.gridWidth&&(p=j.grid.gridWidth);var b,e=g.col,h=e.getRenderContainer();if("left"===g.position?(e=h.renderedColumns[g.renderIndex-1],b=g.col):"right"===g.position&&(b=h.renderedColumns[g.renderIndex+1]),e.colDef.enableColumnResizing!==!1){j.grid.element.hasClass("column-resizing")||j.grid.element.addClass("column-resizing");var i=p-o,k=parseInt(e.drawnWidth+i*r,10);e.colDef.minWidth&&ke.colDef.maxWidth&&(p+=(e.colDef.maxWidth-k)*r),f.css({left:p+"px"}),j.fireEvent(c.events.ITEM_DRAGGING)}}function n(b){b.originalEvent&&(b=b.originalEvent),b.preventDefault(),j.grid.element.removeClass("column-resizing"),f.remove(),p=b.clientX-q;var c=p-o;if(0===c)return a.off("mouseup",n),void a.off("mousemove",m);var h,i=g.col,s=i.getRenderContainer();if("left"===g.position?(i=s.renderedColumns[g.renderIndex-1],h=g.col):"right"===g.position&&(h=s.renderedColumns[g.renderIndex+1]),i.colDef.enableColumnResizing!==!1){var t=parseInt(i.drawnWidth+c*r,10);i.colDef.minWidth&&ti.colDef.maxWidth&&(t=i.colDef.maxWidth),i.width=t,k(i),l(c),e.fireColumnSizeChanged(j.grid,i.colDef,c),a.off("mouseup",n),a.off("mousemove",m)}}var o=0,p=0,q=0,r=1;j.grid.isRTL()&&(g.position="left",r=-1),"left"===g.position?h.addClass("left"):"right"===g.position&&h.addClass("right"),h.on("mousedown",function(b){b.originalEvent&&(b=b.originalEvent),b.stopPropagation(),q=j.grid.element[0].getBoundingClientRect().left,o=b.clientX-q,j.grid.element.append(f),f.css({left:o}),a.on("mouseup",n),a.on("mousemove",m)}),h.on("dblclick",function(a){a.stopPropagation();var f,i,m=g.col,n=m.getRenderContainer();"left"===g.position?(m=n.renderedColumns[g.renderIndex-1],f=g.col,i=1):"right"===g.position&&(f=n.renderedColumns[g.renderIndex+1],f=n.renderedColumns[g.renderIndex+1],i=-1);var o=0,p=0,q=b.closestElm(h,".ui-grid-render-container"),r=q.querySelectorAll("."+c.COL_CLASS_PREFIX+m.uid+" .ui-grid-cell-contents");Array.prototype.forEach.call(r,function(a){var c;angular.element(a).parent().hasClass("ui-grid-header-cell")&&(c=angular.element(a).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),b.fakeElement(a,{},function(a){var d=angular.element(a);d.attr("style","float: left");var e=b.elementWidth(d);if(c){var f=b.elementWidth(c);e+=f}e>o&&(o=e,p=o-e)})}),m.colDef.minWidth&&om.colDef.maxWidth&&(o=m.colDef.maxWidth),m.width=parseInt(o,10),k(m),l(p),e.fireColumnSizeChanged(j.grid,m.colDef,p)}),h.on("$destroy",function(){h.off("mousedown"),h.off("dblclick"),a.off("mousemove",m),a.off("mouseup",n)})}};return g}])}(),function(){"use strict";var a=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);a.constant("uiGridRowEditConstants",{}),a.service("uiGridRowEditService",["$interval","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(a,b,c,d,e){var f={initializeGrid:function(a,b){b.rowEdit={};var c={events:{rowEdit:{saveRow:function(){}}},methods:{rowEdit:{setSavePromise:function(a,b,c){f.setSavePromise(a,b,c)},getDirtyRows:function(a){return a.rowEdit.dirtyRows?a.rowEdit.dirtyRows:[]},getErrorRows:function(a){return a.rowEdit.errorRows?a.rowEdit.errorRows:[]},flushDirtyRows:function(a){return f.flushDirtyRows(a)},setRowsDirty:function(a,b){f.setRowsDirty(a,b)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.api.core.on.renderingComplete(a,function(){b.api.edit.on.afterCellEdit(a,f.endEditCell),b.api.edit.on.beginCellEdit(a,f.beginEditCell),b.api.edit.on.cancelCellEdit(a,f.cancelEditCell),b.api.cellNav&&b.api.cellNav.on.navigate(a,f.navigate)})},defaultGridOptions:function(){},saveRow:function(a,b){var c=this;return function(){b.isSaving=!0;var d=a.api.rowEdit.raise.saveRow(b.entity);return b.rowEditSavePromise?b.rowEditSavePromise.then(c.processSuccessPromise(a,b),c.processErrorPromise(a,b)):e.logError("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),d}},setSavePromise:function(a,b,c){var d=a.getRow(b);d.rowEditSavePromise=c},processSuccessPromise:function(a,b){var c=this;return function(){delete b.isSaving,delete b.isDirty,delete b.isError,delete b.rowEditSaveTimer,c.removeRow(a.rowEdit.errorRows,b),c.removeRow(a.rowEdit.dirtyRows,b)}},processErrorPromise:function(a,b){return function(){delete b.isSaving,delete b.rowEditSaveTimer,b.isError=!0,a.rowEdit.errorRows||(a.rowEdit.errorRows=[]),f.isRowPresent(a.rowEdit.errorRows,b)||a.rowEdit.errorRows.push(b)}},removeRow:function(a,b){angular.forEach(a,function(c,d){c.uid===b.uid&&a.splice(d,1)})},isRowPresent:function(a,b){var c=!1;return angular.forEach(a,function(a){a.uid===b.uid&&(c=!0)}),c},flushDirtyRows:function(a){var c=[];return angular.forEach(a.rowEdit.dirtyRows,function(b){f.saveRow(a,b)(),c.push(b.rowEditSavePromise)}),b.all(c)},endEditCell:function(a,b,c,d){var g=this.grid,h=g.getRow(a);return h?void((c!==d||h.isDirty)&&(g.rowEdit.dirtyRows||(g.rowEdit.dirtyRows=[]),h.isDirty||(h.isDirty=!0,g.rowEdit.dirtyRows.push(h)),delete h.isError,f.considerSetTimer(g,h))):void e.logError("Unable to find rowEntity in grid data, dirty flag cannot be set")},beginEditCell:function(a){var b=this.grid,c=b.getRow(a);return c?void f.cancelTimer(b,c):void e.logError("Unable to find rowEntity in grid data, timer cannot be cancelled")},cancelEditCell:function(a){var b=this.grid,c=b.getRow(a);return c?void f.considerSetTimer(b,c):void e.logError("Unable to find rowEntity in grid data, timer cannot be set")},navigate:function(a,b){var c=this.grid;a.row.rowEditSaveTimer&&f.cancelTimer(c,a.row),b&&b.row&&b.row!==a.row&&f.considerSetTimer(c,b.row)},considerSetTimer:function(b,c){if(f.cancelTimer(b,c),c.isDirty&&!c.isSaving&&-1!==b.options.rowEditWaitInterval){var d=b.options.rowEditWaitInterval?b.options.rowEditWaitInterval:2e3;c.rowEditSaveTimer=a(f.saveRow(b,c),d,1)}},cancelTimer:function(b,c){c.rowEditSaveTimer&&!c.isSaving&&(a.cancel(c.rowEditSaveTimer),delete c.rowEditSaveTimer)},setRowsDirty:function(a,b){var c;b.forEach(function(b){c=a.getRow(b),c?(a.rowEdit.dirtyRows||(a.rowEdit.dirtyRows=[]),c.isDirty||(c.isDirty=!0,a.rowEdit.dirtyRows.push(c)),delete c.isError,f.considerSetTimer(a,c)):e.logError("requested row not found in rowEdit.setRowsDirty, row was: "+b)})}};return f}]),a.directive("uiGridRowEdit",["gridUtil","uiGridRowEditService","uiGridEditConstants",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(){}}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]),c=b.attr("ng-class"),d="";return d=c?c.slice(0,-1)+", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}":"{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}",b.attr("ng-class",d),{pre:function(){},post:function(){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.selection",["ui.grid"]);a.constant("uiGridSelectionConstants",{featureName:"selection",selectionRowHeaderColName:"selectionRowHeaderCol"}),a.service("uiGridSelectionService",["$q","$templateCache","uiGridSelectionConstants","gridUtil",function(){var a={initializeGrid:function(b){b.selection={},b.selection.lastSelectedRow=null,b.selection.selectAll=!1,a.defaultGridOptions(b.options);var c={events:{selection:{rowSelectionChanged:function(){},rowSelectionChangedBatch:function(){}}},methods:{selection:{toggleRowSelection:function(c){var d=b.getRow(c);null!==d&&a.toggleRowSelection(b,d,b.options.multiSelect,b.options.noUnselect)},selectRow:function(c){var d=b.getRow(c);null===d||d.isSelected||a.toggleRowSelection(b,d,b.options.multiSelect,b.options.noUnselect)},selectRowByVisibleIndex:function(c){var d=b.renderContainers.body.visibleRowCache[c];null===d||d.isSelected||a.toggleRowSelection(b,d,b.options.multiSelect,b.options.noUnselect)},unSelectRow:function(c){var d=b.getRow(c);null!==d&&d.isSelected&&a.toggleRowSelection(b,d,b.options.multiSelect,b.options.noUnselect)},selectAllRows:function(){if(b.options.multiSelect!==!1){var c=[];b.rows.forEach(function(d){d.isSelected||(d.isSelected=!0,a.decideRaiseSelectionEvent(b,d,c))}),a.decideRaiseSelectionBatchEvent(b,c)}},selectAllVisibleRows:function(){if(b.options.multiSelect!==!1){var c=[];b.rows.forEach(function(d){d.visible?d.isSelected||(d.isSelected=!0,a.decideRaiseSelectionEvent(b,d,c)):d.isSelected&&(d.isSelected=!1,a.decideRaiseSelectionEvent(b,d,c))}),a.decideRaiseSelectionBatchEvent(b,c)}},clearSelectedRows:function(){a.clearSelectedRows(b)},getSelectedRows:function(){return a.getSelectedRows(b).map(function(a){return a.entity})},getSelectedGridRows:function(){return a.getSelectedRows(b)},setMultiSelect:function(a){b.options.multiSelect=a},setModifierKeysToMultiSelect:function(a){b.options.modifierKeysToMultiSelect=a},getSelectAllState:function(){return b.selection.selectAll}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableRowSelection=a.enableRowSelection!==!1,a.multiSelect=a.multiSelect!==!1,a.noUnselect=a.noUnselect===!0,a.modifierKeysToMultiSelect=a.modifierKeysToMultiSelect===!0,a.enableRowHeaderSelection=a.enableRowHeaderSelection!==!1,a.enableSelectAll=a.enableSelectAll!==!1,a.enableSelectionBatchEvent=a.enableSelectionBatchEvent!==!1,a.selectionRowHeaderWidth=angular.isDefined(a.selectionRowHeaderWidth)?a.selectionRowHeaderWidth:30},toggleRowSelection:function(b,c,d,e){var f=c.isSelected;if(d||f){if(!d&&f){var g=a.getSelectedRows(b);g.length>1&&(f=!1,a.clearSelectedRows(b))}}else a.clearSelectedRows(b);f&&e||(c.isSelected=!f,c.isSelected===!0&&(b.selection.lastSelectedRow=c),b.api.selection.raise.rowSelectionChanged(c))},shiftSelect:function(b,c,d){if(d){var e=a.getSelectedRows(b),f=e.length>0?b.renderContainers.body.visibleRowCache.indexOf(b.selection.lastSelectedRow):0,g=b.renderContainers.body.visibleRowCache.indexOf(c);if(f>g){var h=f;f=g,g=h}for(var i=[],j=f;g>=j;j++){var k=b.renderContainers.body.visibleRowCache[j];k&&(k.isSelected||(k.isSelected=!0,b.selection.lastSelectedRow=k,a.decideRaiseSelectionEvent(b,k,i)))}a.decideRaiseSelectionBatchEvent(b,i)}},getSelectedRows:function(a){return a.rows.filter(function(a){return a.isSelected})},clearSelectedRows:function(b){var c=[];a.getSelectedRows(b).forEach(function(d){d.isSelected&&(d.isSelected=!1,a.decideRaiseSelectionEvent(b,d,c))}),a.decideRaiseSelectionBatchEvent(b,c)},decideRaiseSelectionEvent:function(a,b,c){a.options.enableSelectionBatchEvent?c.push(b):a.api.selection.raise.rowSelectionChanged(b)},decideRaiseSelectionBatchEvent:function(a,b){b.length>0&&a.api.selection.raise.rowSelectionChangedBatch(b)}};return a}]),a.directive("uiGridSelection",["uiGridSelectionConstants","uiGridSelectionService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(b.initializeGrid(f.grid),f.grid.options.enableRowHeaderSelection){var g={name:a.selectionRowHeaderColName,displayName:"",width:f.grid.options.selectionRowHeaderWidth,cellTemplate:"ui-grid/selectionRowHeader",headerCellTemplate:"ui-grid/selectionHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1};f.grid.addRowHeaderColumn(g)}},post:function(){}}}}}]),a.directive("uiGridSelectionRowHeaderButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,c,d,e){var f=e.grid;a.selectButtonClick=function(a,c){c.shiftKey?b.shiftSelect(f,a,f.options.multiSelect):c.ctrlKey||c.metaKey?b.toggleRowSelection(f,a,f.options.multiSelect,f.options.noUnselect):b.toggleRowSelection(f,a,f.options.multiSelect&&!f.options.modifierKeysToMultiSelect,f.options.noUnselect)}}}}]),a.directive("uiGridSelectionSelectAllButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionSelectAllButtons"),scope:!1,link:function(a){var c=a.col.grid;a.headerButtonClick=function(){c.selection.selectAll?(b.clearSelectedRows(c),c.options.noUnselect&&c.api.selection.selectRowByVisibleIndex(0),c.selection.selectAll=!1):c.options.multiSelect&&(c.api.selection.selectAllVisibleRows(),c.selection.selectAll=!0)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(){return{priority:-200,scope:!1,compile:function(a){var b=angular.element(a.children().children()[0]),c=b.attr("ng-class"),d="";return d=c?c.slice(0,-1)+",'ui-grid-row-selected': row.isSelected}":"{'ui-grid-row-selected': row.isSelected}",b.attr("ng-class",d),{pre:function(){},post:function(){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(a,b,c,d,e,f){return{priority:-200,restrict:"A",scope:!1,link:function(a,b){function c(){var c=0,d=300,e=function(b){b.shiftKey?f.shiftSelect(a.grid,a.row,a.grid.options.multiSelect):b.ctrlKey||b.metaKey?f.toggleRowSelection(a.grid,a.row,a.grid.options.multiSelect,a.grid.options.noUnselect):f.toggleRowSelection(a.grid,a.row,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply()};b.on("touchstart",function(){c=(new Date).getTime()}),b.on("touchend",function(a){var b=(new Date).getTime(),f=b-c;d>f&&e(a)}),b.on("click",function(a){e(a)})}a.grid.options.enableRowSelection&&!a.grid.options.enableRowHeaderSelection&&(b.addClass("ui-grid-disable-selection"),c())}}}])}(),angular.module("ui.grid").run(["$templateCache",function(a){"use strict";a.put("ui-grid/ui-grid-footer",''),a.put("ui-grid/ui-grid-group-panel",'
    • {{group.displayName}} x
    '),a.put("ui-grid/ui-grid-header",'
    '),a.put("ui-grid/ui-grid-menu-button",'
     
    '),a.put("ui-grid/ui-grid-no-header",'
    '),a.put("ui-grid/ui-grid-row",'
    '),a.put("ui-grid/ui-grid",'
    '),a.put("ui-grid/uiGridCell",'
    {{COL_FIELD CUSTOM_FILTERS}}
    '),a.put("ui-grid/uiGridColumnFilter",'
  •  
     
  • '),a.put("ui-grid/uiGridColumnMenu",'
    '),a.put("ui-grid/uiGridFooterCell",'
    {{ col.getAggregationValue() }}
    '),a.put("ui-grid/uiGridHeaderCell",'
     
    {{ col.displayName CUSTOM_FILTERS }}  
     
     
    '),a.put("ui-grid/uiGridMenu",'
    '),a.put("ui-grid/uiGridMenuItem",'
  • {{ title }}
  • '),a.put("ui-grid/uiGridRenderContainer",'
    '),a.put("ui-grid/uiGridViewport",'
    '),a.put("ui-grid/cellEditor",'
    '),a.put("ui-grid/dropdownEditor",'
    '),a.put("ui-grid/expandableRow",'
    '),a.put("ui-grid/expandableRowHeader",'
    '),a.put("ui-grid/expandableScrollFiller","
    "),a.put("ui-grid/csvLink",'LINK_LABEL'),a.put("ui-grid/importerMenuItem",'
  • '),a.put("ui-grid/importerMenuItemContainer","
    "),a.put("ui-grid/ui-grid-paging",'
    / {{currentMaxPages}}
     {{sizesLabel}}
    {{showingLow}} - {{showingHigh}} of {{grid.options.totalItems}} {{totalItemsLabel}}
    '),a.put("ui-grid/columnResizer",'
    '),a.put("ui-grid/selectionHeaderCell",'
     
    '),a.put("ui-grid/selectionRowHeader",'
    '),a.put("ui-grid/selectionRowHeaderButtons",'
     
    '),a.put("ui-grid/selectionSelectAllButtons",'
     
    ')}]); \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/designer/partials/grid.html b/src/main/resources/META-INF/resources/designer/partials/grid.html deleted file mode 100644 index a63fe7a0..00000000 --- a/src/main/resources/META-INF/resources/designer/partials/grid.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -
    -
    -
    -
    -
    -
    -
    diff --git a/src/main/resources/META-INF/resources/designer/scripts/app.js b/src/main/resources/META-INF/resources/designer/scripts/app.js index 3fb0a242..daa64806 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/app.js +++ b/src/main/resources/META-INF/resources/designer/scripts/app.js @@ -31,16 +31,9 @@ var app = angular.module('clds-app', ['ngRoute', 'angular-loading-bar', 'ngAnimate', 'dialogs.main', - 'ui.grid', - 'ui.grid.resizeColumns', - 'ui.grid.paging', - 'ui.grid.selection', - 'ui.grid.cellNav', - 'ui.grid.pinning', 'ngSanitize', 'ngCookies', - 'ui.bootstrap.modal', - 'ui.grid.exporter' + 'ui.bootstrap.modal' ]) .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) { -- cgit 1.2.3-korg