diff --git a/build/ng-admin-only.min.js b/build/ng-admin-only.min.js index 26ab3642..97e03eae 100644 --- a/build/ng-admin-only.min.js +++ b/build/ng-admin-only.min.js @@ -15,7 +15,7 @@ t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this }},{key:"menu",value:function(e){return arguments.length?(this._menu=e,this):(this._menu||(this._menu=this.buildMenuFromEntities()),this._menu)}},{key:"buildMenuFromEntities",value:function(){return(new s["default"]).children(this.entities.filter(function(e){return e.menuView().enabled}).sort(function(e,t){return e.menuView().order()-t.menuView().order()}).map(function(e){return(new s["default"]).populateFromEntity(e)}))}},{key:"customTemplate",value:function(e){return arguments.length?(this._customTemplate=e,this):this._customTemplate}},{key:"baseApiUrl",value:function(e){return arguments.length?(this._baseApiUrl=e,this):this._baseApiUrl}},{key:"addEntity",value:function(e){if(!e)throw new Error("No entity given");return this._entities.push(e),this}},{key:"getEntity",value:function(e){var t=this._entities.filter(function(t){return t.name()===e})[0];if(!t)throw new Error('Unable to find entity "'+e+'"');return t}},{key:"hasEntity",value:function(e){return!!this._entities.filter(function(t){return t.name()===e}).length}},{key:"getViewByEntityAndType",value:function(e,t){return this._entities.filter(function(t){return t.name()===e})[0].views[t]}},{key:"getErrorMessage",value:function(e){return"function"==typeof this._errorMessage?this._errorMessage(e):this._errorMessage}},{key:"errorMessage",value:function(e){return arguments.length?(this._errorMessage=e,this):this._errorMessage}},{key:"getErrorMessageFor",value:function(e,t){return e.getErrorMessage(t)||e.getEntity().getErrorMessage(t)||this.getErrorMessage(t)}},{key:"getEntityNames",value:function(){return this.entities.map(function(e){return e.name()})}}]),e}();t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nr;r++)e[r]=this.fillReferencesValuesFromEntry(e[r],t,n);return e}},{key:"fillReferencesValuesFromEntry",value:function(e,t,n){for(var r in t){var i=t[r],o=this.getReferenceChoicesById(i),a=[],s=i.getMappedValue(e.values[r],e.values);if("reference_many"===i.type()){for(var l in s){var u=s[l];a.push(o[u])}e.listValues[r]=a}else n&&s&&s in o&&(e.listValues[r]=i.getMappedValue(o[s],e.values))}return e}},{key:"getReferenceChoicesById",value:function(e){for(var t={},n=e.targetField().name(),r=e.targetEntity().identifier().name(),i=this.getEntries(e.targetEntity().uniqueId+"_values"),o=0,a=i.length;a>o;o++){var s=i[o];t[s.values[r]]=s.values[n]}return t}}]),e}();t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nt;t++){var r=this._targetFields[t];e.push({field:r,label:r.label()})}return e}},{key:"getSortFieldName",value:function(){return this._targetEntity.name()+"_ListView."+(this.sortField()||this._targetReferenceField)}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n':this._icon}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;s=u=l=void 0,r=!1;var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(i);if(null===u)return void 0;e=u,t=o,n=a,r=!0}},s=n(2),l=r(s),u=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this._type="ShowView"}return o(t,e),t}(l["default"]);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";n(122),n(47);var r=n(21),i=angular.module("AdminDescriptionModule",[]);i.constant("AdminDescription",new r);var o=angular.module("ng-admin",["main","crud","AdminDescriptionModule"]);o.config(["NgAdminConfigurationProvider","AdminDescription",function(e,t){e.setAdminDescription(t)}])},function(e,t,n){"use strict";var r=n(4),i=r.module("crud",["ui.router","ui.bootstrap","ngSanitize","textAngular","ngInflection","ui.codemirror","angularFileUpload","ngNumeraljs"]);i.controller("ListController",n(104)),i.controller("ShowController",n(120)),i.controller("FormController",n(101)),i.controller("DeleteController",n(70)),i.controller("BatchDeleteController",n(69)),i.service("EntryFormatter",n(112)),i.service("PromisesResolver",n(113)),i.service("ReadQueries",n(117)),i.service("WriteQueries",n(118)),i.service("RestWrapper",n(114)),i.directive("maJsonValidator",n(121)),i.directive("maField",n(76)),i.directive("maButtonField",n(71)),i.directive("maChoiceField",n(73)),i.directive("maChoicesField",n(74)),i.directive("maDateField",n(75)),i.directive("maInputField",n(78)),i.directive("maJsonField",n(79)),i.directive("maFileField",n(77)),i.directive("maCheckboxField",n(72)),i.directive("maTextField",n(81)),i.directive("maWysiwygField",n(82)),i.directive("maTemplateField",n(80)),i.provider("FieldViewConfiguration",n(87)),i.directive("listActions",n(103)),i.directive("maDatagrid",n(105)),i.directive("maDatagridPagination",n(109)),i.directive("maDatagridInfinitePagination",n(106)),i.directive("maDatagridItemSelector",n(107)),i.directive("maDatagridMultiSelector",n(108)),i.directive("maFilter",n(99)),i.directive("maColumn",n(59)),i.directive("maBooleanColumn",n(57)),i.directive("maChoicesColumn",n(58)),i.directive("maDateColumn",n(60)),i.directive("maJsonColumn",n(61)),i.directive("maNumberColumn",n(62)),i.directive("maReferenceManyColumn",n(63)),i.directive("maReferenceManyLinkColumn",n(64)),i.directive("maStringColumn",n(65)),i.directive("maTemplateColumn",n(66)),i.directive("maWysiwygColumn",n(67)),i.directive("maBackButton",n(48)),i.directive("maCreateButton",n(50)),i.directive("maEditButton",n(52)),i.directive("maFilteredListButton",n(54)),i.directive("maShowButton",n(56)),i.directive("maListButton",n(55)),i.directive("maDeleteButton",n(51)),i.directive("maBatchDeleteButton",n(49)),i.directive("maExportToCsvButton",n(53)),i.directive("maViewActions",n(115)),i.directive("maViewBatchActions",n(116)),i.directive("compile",n(111)),i.config(n(119)),i.config(n(68)),i.factory("Papa",function(){return n(163)}),i.factory("notification",function(){var e=n(159);return e.timeout=5e3,e.clickToClose=!0,e}),i.factory("progression",function(){return n(162)}),e.exports=i},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{size:"@",label:"@"},link:function(t){t.label=t.label||"Back",t.back=function(){e.history.back()}},template:' {{ ::label }}'}}return e.$inject=["$window"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",selection:"&",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoBatchDelete=function(){var n=(t.entity(),t.selection().map(function(e){return e.identifierValue}));e.go("batchDelete",angular.extend({ids:n,entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Create",t.gotoCreate=function(){e.go(e.get("create"),angular.extend({entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoDelete=function(){e.go(e.get("delete"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Edit",t.gotoEdit=function(){e.go(e.get("edit"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r,i){return{restrict:"E",scope:{entity:"&",label:"@",datastore:"&",search:"&"},template:'',link:function(o){o.label=o.label||"Export",o.datastore=o.datastore(),o.entity=o.entity();var a=o.entity.exportView(),s=o.entity.listView();if(0===a.fields().length){var l=s.exportFields();null===l&&(l=s.fields()),a.fields(l),a.filters(s.filters())}o.has_export=a.fields().length>0;var u=r.getFormatter(a.fields());o.exportToCsv=function(){var r,s,l;i.getAll(a,-1,o.search(),e.sortField,e.sortDir).then(function(e){return r=e.data},function(e){n.log(e.message,{addnCls:"humane-flatty-error"})}).then(function(e){return i.getFilteredReferenceData(a.getNonOptimizedReferences(),e)}).then(function(e){return s=e,i.getOptimizedReferencedData(a.getOptimizedReferences(),r)}).then(function(e){l=e;var t,n=a.getReferences(),r=angular.extend(s,l);for(var i in r)t=o.datastore.mapEntries(n[i].targetEntity().name(),n[i].targetEntity().identifier(),[n[i].targetField()],r[i]),o.datastore.setEntries(n[i].targetEntity().uniqueId+"_values",t)}).then(function(){var e=o.datastore.mapEntries(a.entity.name(),a.identifier(),a.getFields(),r);o.datastore.fillReferencesValuesFromCollection(e,a.getReferences(),!0);for(var n=[],i=e.length-1;i>=0;i--)n[i]=u(e[i]);var s=t.unparse(n),l=document.createElement("a");document.body.appendChild(l),l.setAttribute("href","data:application/octet-stream;charset=utf-8,"+encodeURIComponent(s)),l.setAttribute("download",o.entity.name()+".csv"),l.click()})}}}}return e.$inject=["$stateParams","Papa","notification","EntryFormatter","ReadQueries"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entityName:"@",filter:"&",label:"@",size:"@"},link:function(t){t.label=t.label||"See all related "+t.entityName,t.gotoList=function(){e.go(e.get("list"),{entity:t.entityName,search:t.filter()})}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"List";var n=t.$parent.entity?t.$parent.entity.name():null,r=t.entity().name(),i={entity:r};r===n&&angular.extend(i,e.params),t.gotoList=function(){e.go(e.get("list"),i)}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Show",t.gotoShow=function(){e.go(e.get("show"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},link:function(e){e.isOk=!!e.value()},template:""}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n,r,i){function o(e){if(e.isDetailLink()===!1)return!1;if("reference"!=e.type()&&"reference_many"!=e.type())return!0;var t=e.targetEntity().name(),n=r().getEntity(t);return n?n.isReadOnly?n.showView().enabled:n.editionView().enabled:!1}return{restrict:"E",scope:{field:"&",entry:"&",entity:"&",datastore:"&"},link:function(a,s,l){a.datastore=a.datastore(),a.field=a.field(),a.entry=a.entry();var u=a.field.type();o(a.field)?s.append(i[u].getLinkWidget()):s.append(i[u].getReadWidget()),n(s.contents())(a),a.gotoDetail=function(){this.clearRouteParams();var n=a.field.detailLinkRoute();"edit"!=n||a.entity().editionView().enabled||(n="show"),e.path("/"+a.entry.entityName+"/"+n+"/"+a.entry.identifierValue),t(0)},a.gotoReference=function(){this.clearRouteParams();var t=a.field.targetEntity().name(),n=r().getEntity(t),i=a.entry.values[a.field.name()],o=n.isReadOnly?"show":a.field.detailLinkRoute();e.path("/"+t+"/"+o+"/"+i)},a.clearRouteParams=function(){e.search("q",null),e.search("page",null),e.search("sortField",null),e.search("sortDir",null)}}}}return t.$inject=["$location","$anchorScroll","$compile","NgAdminConfiguration","FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | date:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&"},link:function(t,n){t.guessType=function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t?"Object":"[object Array]"===t?"Array":"Literal"};var r='
{{ val }}
{{ key }}{{ val }}
',i=angular.element(r);e(i)(t),n.replaceWith(i)}}}return t.$inject=["$compile"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | numeraljs:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{restrict:"E",scope:{field:"&",values:"&",ids:"&"},link:function(n){n.field=n.field(),n.values=n.values(),n.ids=n.ids();var r=n.field.targetEntity().name(),i=t().getEntity(r);n.gotoReference=function(t){var n=i.isReadOnly?"show":"edit";e.path("/"+r+"/"+n+"/"+t)}},template:'{{ ref }}'}}return t.$inject=["$location","NgAdminConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},template:"{{ value() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&",field:"&"},link:function(t){var n=t.value();t.field().stripTags()&&(n=e("stripTags")(n)),t.htmlValue=n},template:''}}return t.$inject=["$filter"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){e.registerFieldView("boolean",n(83)),e.registerFieldView("choice",n(84)),e.registerFieldView("choices",n(85)),e.registerFieldView("date",n(16)),e.registerFieldView("datetime",n(16)),e.registerFieldView("email",n(86)),e.registerFieldView("file",n(88)),e.registerFieldView("json",n(89)),e.registerFieldView("number",n(90)),e.registerFieldView("password",n(91)),e.registerFieldView("referenced_list",n(94)),e.registerFieldView("reference",n(92)),e.registerFieldView("reference_many",n(93)),e.registerFieldView("string",n(95)),e.registerFieldView("template",n(96)),e.registerFieldView("text",n(97)),e.registerFieldView("wysiwyg",n(98))}r.$inject=["FieldViewConfigurationProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i){this.$scope=e,this.$state=t,this.WriteQueries=n,this.notification=r,this.view=i,this.entity=i.getEntity(),this.entityIds=t.params.ids,this.selection=[],this.title=i.title(),this.description=i.description(),this.actions=i.actions(),this.loadingPage=!1,this.fields=i.fields(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.batchDelete=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.batchDelete(this.view,this.entityIds).then(function(){t.go(t.get("list"),angular.extend({entity:n},t.params)),e.log("Elements successfully deleted.",{addnCls:"humane-flatty-success"})},function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){this.$state.go(this.$state.get("list"),angular.extend({entity:this.entity().name()},this.$state.params))},e.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0},e.$inject=["$scope","$state","WriteQueries","notification","view"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i,o,a){this.$scope=e,this.$state=t,this.WriteQueries=n,this.entityLabel=i.entity,this.entityId=i.id,this.view=o,this.title=o.title(),this.description=o.description(),this.actions=o.actions(),this.entity=o.getEntity(),this.notification=r,this.$scope.entry=a,this.$scope.view=o,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.deleteOne=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.deleteOne(this.view,this.entityId).then(function(){t.go(t.get("list"),angular.extend({entity:n,id:this.entityId},t.params)),e.log("Element successfully deleted.",{addnCls:"humane-flatty-success"})}.bind(this),function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){var e=this.$state;e.go(e.get("edit"),angular.extend({entity:this.entity.name(),id:this.entityId},e.params))},e.prototype.destroy=function(){this.$scope=void 0,this.WriteQueries=void 0,this.$state=void 0,this.view=void 0,this.entity=void 0},e.$inject=["$scope","$state","WriteQueries","notification","params","view","entry"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.label=n.label(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.toggle=function(){this.value=!this.value},e.isActive=function(){return!!this.value}},template:'{{ label }}'}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.rawValue=e.value,e.$watch("rawValue",function(t){e.value=n.parse()(t)}),e.format=n.format(),e.v=n.validation(),e.isOpen=!1;var r=t.find("input").eq(0),i=n.attributes();for(var o in i)r.attr(o,i[o]);e.toggleDatePicker=function(t){t.preventDefault(),t.stopPropagation(),e.isOpen=!e.isOpen}},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=r(e).map(function(e,t){return''+e.getWriteWidget()+""}).join(""),n='
'+t+'

';return{restrict:"E",scope:{field:"&",entry:"=",entity:"&",form:"&",datastore:"&"},link:function(e){e.field=e.field(),e.type=e.field.type(),e.entity=e.entity(),e.form=e.form(),e.datastore=e.datastore(),e.getClassesForField=function(e,t){return"ng-admin-field-"+e.name()+" "+(e.getCssClasses(t)||"col-sm-10 col-md-8 col-lg-7")},e.getInputForField=function(t){return e.form[t.name()]},e.fieldHasValidation=function(e){var t=this.getInputForField(e);return t&&t.$dirty},e.fieldIsValid=function(e){var t=this.getInputForField(e);return t&&t.$valid},e.getFieldValidationClass=function(e){return this.fieldHasValidation(e)?this.fieldIsValid(e)?"has-success":"has-error":void 0}},template:n}}var r=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{scope:{field:"&",value:"="},restrict:"E",link:{pre:function(e){var t=e.field().uploadInformation();if(!t.hasOwnProperty("url"))throw new Error("You must provide a URL property to allow the upload of files.");e.multiple=t.hasOwnProperty("multiple")?t.multiple:!1,e.accept=t.hasOwnProperty("accept")?t.accept:"*",e.apifilename=t.hasOwnProperty("apifilename")?t.apifilename:!1;var n=e.value?e.value.split(","):[];e.files={};for(var r in n)e.files[n[r]]={name:n[r],progress:0}},post:function(n,r){var i=n.field();n.name=i.name(),n.v=i.validation(),n.value&&(n.v.required=!1);var o=r.find("input")[0],a=i.attributes();for(var s in a)o[s]=a[s];n.fileSelected=function(t){if(t){var r;n.files={};for(var i in t)r=angular.copy(n.field().uploadInformation()),r.file=t[i],e.upload(r).progress(function(e){n.files[e.config.file.name]={name:e.config.file.name,progress:Math.min(100,parseInt(100*e.loaded/e.total))}}).success(function(e,t,r,i){if(n.files[i.file.name]={name:n.apifilename?e[n.apifilename]:i.file.name,progress:0},n.apifilename){var o=Object.keys(n.files).map(function(e){return n.files[e].name});n.value=o.join(",")}else n.value=Object.keys(n.files).join(",")}).error(function(e,t,r,i){delete n.files[i.file.name],n.value=Object.keys(n.files).join(",")})}},n.selectFile=function(){t(function(){o.click()},0)}}},template:'
{{ file.progress }}% Complete
{{ file.name }}
'}}return t.$inject=["$upload","$timeout"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{type:"@",field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){(function(t){"use strict";function r(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.jsonValue=null===e.value?"":angular.toJson(e.value,!0);var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.$watch("jsonValue",function(t){if(""==t||"undefined"==typeof t)return void(e.value=null);try{var n=angular.fromJson(t);e.value=n}catch(r){}})},template:''}}var i=n(3);t.jsonlint=n(160),n(153),n(154),n(156),n(155),n(157),n(158),i.defineOption("matchBrackets",!0),i.defineOption("autoCloseBrackets",!0),i.defineOption("lineWrapping",!0),i.defineOption("tabSize",2),i.defineOption("mode","application/json"),i.defineOption("gutters",["CodeMirror-lint-markers"]),i.defineOption("lint",!0),i.defineOption("styleActiveLine",!0),t.CodeMirror=i,r.$inject=[],e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:'' }}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name()},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){this.fieldViews={}}return e.prototype.registerFieldView=function(e,t){this.fieldViews[e]=t},e.prototype.$get=function(){return this.fieldViews},e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display file field as readable"}function n(){return"error: cannot display file field as linkable"}function r(){return"error: cannot display file field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display a json field as linkable"}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display password field as readable"}function n(){return"error: cannot display password field as linkable"}function r(){return"error: cannot display password field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display referenced_list field as linkable"}function r(){return"error: cannot display referenced_list field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(){return''}function i(){return''+r()+""}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){"use strict";function r(){return''}function i(){return"error: cannot display wysiwyg field as linkable"}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=i(e).map(function(e,t){return''+e.getFilterWidget()+""}).join(""),n='';return{restrict:"E",template:n,scope:{filters:"&",datastore:"&"},controllerAs:"filterCtrl",controller:r}}var r=n(100),i=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,n,r){this.$scope=e,this.$state=n,this.$stateParams=r,this.$scope.values=this.$stateParams.search||{},this.$scope.filters=this.$scope.filters(),this.$scope.datastore=this.$scope.datastore(),this.isFilterEmpty=t(this.$scope.values)}function t(e){for(var t in e)if(""!=e[t])return!1;return!0}return e.prototype.filter=function(){var e,t,n,r={},i=this.$scope.filters;for(n in i)t=i[n],e=t.name(),this.$scope.values[e]&&(r[e]=this.$scope.values[e]);this.$stateParams.search=r,this.$stateParams.page=1,this.$state.go(this.$state.current,this.$stateParams,{reload:!0,inherit:!1,notify:!0})},e.prototype.shouldFilter=function(){return Object.keys(this.$scope.filters).length},e.prototype.clearFilters=function(){var e;for(e in this.$scope.values)this.$scope.values[e]=null;this.filter()},e.prototype.destroy=function(){this.$scope=void 0},e.$inject=["$scope","$state","$stateParams"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){this.$scope=e,this.$state=t,this.WriteQueries=n,this.dataStore=s,this.progression=i,this.notification=o,this.title=a.title(),this.description=a.description(),this.actions=a.actions(),this.fields=a.fields(),this.config=r(),this.view=a,this.entity=this.view.getEntity(),this.$scope.entry=s.getFirstEntry(this.entity.uniqueId),this.$scope.view=a,this.$scope.entity=this.entity,this.originEntityId=this.$scope.entry.values[this.entity.identifier().name()],e.$on("$destroy",this.destroy.bind(this))};r.prototype.validateEntry=function(){var e,t,n,r,i=this.form,o=this.$scope.entry,a=this.view.getFields(),s=this.entity.identifier(),l={};if(!i.$valid)return this.notification.log("invalid form",{addnCls:"humane-flatty-error"}),!1;l[s.name()]=o.identifierValue;for(r in a)n=a[r],e=o.values[n.name()],l[n.name()]=e;t=this.dataStore.mapEntry(this.view.entity.name(),this.view.identifier(),this.view.getFields(),l);try{this.view.validate(t)}catch(u){return this.notification.log(u,{addnCls:"humane-flatty-error"}),!1}return l},r.prototype.submitCreation=function(e){e.preventDefault();var t=this.validateEntry(),n=this.entity,r=n.editionView().enabled?"edit":"show";if(t){var i=this.progression,o=this.notification,a=this.$state;i.start(),this.WriteQueries.createOne(this.view,t).then(function(e){var t=this.dataStore.mapEntry(n.name(),this.view.identifier(),this.view.getFields(),e);i.done(),o.log("Element successfully created.",{addnCls:"humane-flatty-success"}),a.go(a.get(r),{entity:n.name(),id:t.identifierValue})}.bind(this),this.handleError.bind(this))}},r.prototype.submitEdition=function(e){e.preventDefault();var t=this.validateEntry();if(t){var n=this.progression,r=this.notification;n.start(),this.WriteQueries.updateOne(this.view,t,this.originEntityId).then(function(){n.done(),r.log("Changes successfully saved.",{addnCls:"humane-flatty-success"})},this.handleError.bind(this))}},r.prototype.handleError=function(e){var t=this.config.getErrorMessageFor(this.view,e);this.progression.done(),this.notification.log(t,{addnCls:"humane-flatty-error"})},r.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0,this.dataStore=void 0,this.view=void 0,this.entity=void 0},r.$inject=["$scope","$state","WriteQueries","NgAdminConfiguration","progression","notification","view","dataStore"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.entity=e.entity(),this.$scope=e,this.$location=t,this.$anchorScroll=n,this.filters={},this.shouldDisplayActions=this.$scope.listActions()&&this.$scope.listActions().length>0,e.toggleSelect=this.toggleSelect.bind(this),e.toggleSelectAll=this.toggleSelectAll.bind(this),this.$scope.gotoDetail=this.gotoDetail.bind(this);var r=this.$location.search();this.sortField="sortField"in r?r.sortField:this.$scope.sortField,this.sortDir="sortDir"in r?r.sortDir:this.$scope.sortDir}return e.prototype.gotoDetail=function(e){this.clearRouteParams();var t=this.$scope.entity,n=t.editionView().enabled?"edit":"show";this.$location.path("/"+e.entityName+"/"+n+"/"+e.identifierValue),this.$anchorScroll(0)},e.prototype.clearRouteParams=function(){this.$location.search("q",null),this.$location.search("page",null),this.$location.search("sortField",null),this.$location.search("sortDir",null)},e.prototype.isSorting=function(e){return this.sortField===this.getSortName(e)},e.prototype.itemClass=function(e){return e%2===0?"even":"odd"},e.prototype.sort=function(e){var t="ASC",n=this.getSortName(e);this.sortField===n&&(t="ASC"===this.sortDir?"DESC":"ASC"),this.$location.search("sortField",n),this.$location.search("sortDir",t)},e.prototype.getSortName=function(e){return this.$scope.name+"."+e.name()},e.prototype.toggleSelect=function(e){var t=this.$scope.selection.slice(),n=t.indexOf(e);return-1===n?void(this.$scope.selection=t.concat(e)):(t.splice(n,1),void(this.$scope.selection=t))},e.prototype.toggleSelectAll=function(){return this.$scope.selection.length0,this.dataStore=s,this.fields=a.fields(),this.listActions=a.listActions(),this.totalItems=l,this.page=t.page||1,this.infinitePagination=this.view.infinitePagination(),this.nextPageCallback=this.nextPage.bind(this),this.setPageCallback=this.setPage.bind(this),this.selection=this.batchActions.length?[]:null,this.sortField=this.$stateParams.sortField||this.view.getSortFieldName(),this.sortDir=this.$stateParams.sortDir||this.view.sortDir(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.nextPage=function(e){if(!this.loadingPage){var t=this.progression,n=this;t.start(),this.ReadQueries.getAll(this.view,e,!0,this.search,this.sortField,this.sortDir).then(function(e){t.done(),n.entries=n.entries.concat(e.entries),n.loadingPage=!1})}},e.prototype.setPage=function(e){this.$location.search("page",e),this.$anchorScroll(0)},e.prototype.destroy=function(){this.$scope=void 0,this.$stateParams=void 0,this.$location=void 0,this.$anchorScroll=void 0,this.dataStore=void 0},e.$inject=["$scope","$stateParams","$location","$anchorScroll","ReadQueries","progression","view","dataStore","totalItems"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",template:r,scope:{name:"@",entries:"=",selection:"=",fields:"&",listActions:"&",entity:"&",sortField:"=",sortDir:"="},controllerAs:"datagrid",controller:i}}var r=n(140),i=n(102);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){var n=r.element(e),i=100,o=t[0].body;return{restrict:"E",scope:{perPage:"@",totalItems:"@",nextPage:"&"},link:function(t){function r(){if(o.offsetHeight-e.innerHeight-e.scrollY=l)return;u++,t.nextPage()(u)}}var a=parseInt(t.perPage,10)||1,s=parseInt(t.totalItems,10),l=Math.ceil(s/a)||1,u=1;n.bind("scroll",r),t.$on("$destroy",function(){n.unbind("scroll",r)})}}}var r=n(4);return t.$inject=["$window","$document"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entry:"=",selection:"=",toggleSelect:"&"},template:'',link:function(e){e.toggle=function(t){e.toggleSelect({entry:t})}}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entries:"=",selection:"=",toggleSelectAll:"&"},template:'',link:function(e,t){e.$watch("selection",function(n){t.children()[0].indeterminate=n.length>0&&n.length!=e.entries.length}),e.$watch("entries",function(n){t.children()[0].indeterminate=e.selection.length>0&&e.selection.length!=n.length})}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{page:"@",perPage:"@",totalItems:"@",setPage:"&"},template:r,controllerAs:"paginationCtrl",controller:i}}var r=n(143),i=n(110);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){this.$scope=e;var t=parseInt(this.$scope.perPage,10)||1,n=parseInt(this.$scope.totalItems,10),r=Math.max(parseInt(this.$scope.page,10),1);this.nbPages=Math.ceil(n/t)||1,this.page=Math.min(this.nbPages,r),this.offsetEnd=Math.min(this.page*t,n),this.offsetBegin=Math.min((this.page-1)*t+1,this.offsetEnd),this.totalItems=n,this.displayPagination=n>t,e.$on("$destroy",this.destroy.bind(this))}n(4);return t.prototype.range=function(e){var t=[],n=this.nbPages;return e>2&&t.push("1"),4==e&&t.push("2"),e>4&&t.push("."),e>1&&t.push(e-1),t.push(e),n>e&&t.push(e+1),e==n-3&&t.push(n-1),n-3>e&&t.push("."),n-1>e&&t.push(n),t},t.prototype.setPage=function(e){0>=e||e>this.nbPages||this.$scope.setPage()(e)},t.prototype.destroy=function(){this.$scope=void 0},t.$inject=["$scope"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){var t=e.get("$compile");return{transclude:!0,link:function(e,n,r,i,o){var a=e.$watch(function(e){return e.$eval(r.compile)},function(i){return!1===i?void o(e,function(e){n.append(e)}):(n.html(i),t(n.contents())(e),void("true"==r.compileOnce&&a()))})}}}return e.$inject=["$injector"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.formatDate=function(t){return function(n){return e("date")(n,t)}}}return e.prototype.formatField=function(e){var t=e.label()||e.name();switch(e.type()){case"boolean":case"choice":case"choices":case"number":case"string":case"text":case"wysiwyg":case"email":case"json":case"file":case"template":return function(n){return{name:t,value:n.values[e.name()]}};case"date":var n=this.formatDate(e.format());return function(r){return{name:t,value:n(r.values[e.name()])}};case"reference":return function(n){return{name:t,value:n.listValues[e.name()]}};case"referenced_list":return}},e.prototype.getFormatter=function(e){var t=e.map(this.formatField.bind(this));return function(e){var n={};return t.map(function(t){return t?t(e):void 0}).forEach(function(e){e&&(n[e.name]=e.value)}),n}},e.$inject=["$filter"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return e.getPromisesResolver()}return e.$inject=["AdminDescription"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.Restangular=e,e.setFullResponse(!0)}return e.prototype.getOne=function(e,t){return this.Restangular.oneUrl(e,t).get().then(function(e){return e.data})},e.prototype.getList=function(e,t,n){return this.Restangular.allUrl(t,n).getList(e)},e.prototype.createOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPOST(e).then(function(e){return e.data})},e.prototype.updateOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPUT(e).then(function(e){return e.data})},e.prototype.deleteOne=function(e,t){return this.Restangular.oneUrl(e,t).customDELETE()},e.$inject=["Restangular"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=e.get("$compile");return{restrict:"E",transclude:!0,scope:{override:"&",entry:"=",entity:"=",selection:"=",batchButtons:"&",datastore:"=",search:"="},template:r,link:function(e,n,r,i,o){var a=e.override();return a?"string"==typeof a?(n.html(a),void t(n.contents())(e)):void(e.buttons=a):void o(e,function(e){n.append(e)})}}}var r=n(144);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){e.get("$compile");return{restrict:"E",scope:{entity:"=",selection:"=",buttons:"&"},template:r,link:function(e){e.isopen=!1,e.toggleDropdown=function(t){t.preventDefault(),t.stopPropagation(),e.isopen=!e.isopen},e.buttons=e.buttons(),"string"==typeof e.buttons&&(e.customTemplate=e.buttons,e.buttons=null)}}}var r=n(145);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getReadQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getWriteQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){return["$stateParams","NgAdminConfiguration",function(n,r){var i,o=r().getViewByEntityAndType(n.entity,e);return(i=o.template())?i:(i=r().customTemplate()(e),i?i:t)}]}function i(e){return["$stateParams","NgAdminConfiguration",function(t,n){var r;try{r=n().getViewByEntityAndType(t.entity,e)}catch(i){var o=new Error("Unknown view or entity name");throw o.status=404,o}if(!r.enabled)throw new Error("The "+e+" is disabled for this entity");return r}]}function o(){return["AdminDescription",function(e){return e.getDataStore()}]}function a(e){e.state("list",{parent:"main",url:"/:entity/list?{search:json}&page&sortField&sortDir",params:{entity:null,page:null,search:null,sortField:null,sortDir:null},controller:"ListController",controllerAs:"listController",templateProvider:r("ListView",s),resolve:{dataStore:o(),view:i("ListView"),response:["$stateParams","ReadQueries","view",function(e,t,n){var r=e.page,i=e.search,o=e.sortField,a=e.sortDir;return t.getAll(n,r,i,o,a)}],totalItems:["response",function(e){return e.totalItems}],nonOptimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),n.data)}],optimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),n.data)}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],entries:["dataStore","view","response","referencedEntries",function(e,t,n,r){var i=e.mapEntries(t.entity.name(),t.identifier(),t.getFields(),n.data);return e.fillReferencesValuesFromCollection(i,t.getReferences(),!0),e.setEntries(t.getEntity().uniqueId,i),!0}],filterData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getFilterReferences())}],filterEntries:["dataStore","view","filterData",function(e,t,n){var r,i=t.getFilterReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("show",{parent:"main",url:"/:entity/show/:id?sortField&sortDir",controller:"ShowController",controllerAs:"showController",templateProvider:r("ShowView",l),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("ShowView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}]}}),e.state("create",{parent:"main",url:"/:entity/create",controller:"FormController",controllerAs:"formController",templateProvider:r("CreateView",u),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("CreateView"),entry:["dataStore","view",function(e,t){var n=e.createEntry(t.entity.name(),t.identifier(),t.getFields());return e.addEntry(t.getEntity().uniqueId,n),n}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("edit",{parent:"main",url:"/:entity/edit/:id?sortField&sortDir",controller:"FormController",controllerAs:"formController",templateProvider:r("EditView",c),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("EditView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("delete",{parent:"main",url:"/:entity/delete/:id",controller:"DeleteController",controllerAs:"deleteController",templateProvider:r("DeleteView",f),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("DeleteView"),params:["$stateParams",function(e){return e}],entry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl()); -}]}}),e.state("batchDelete",{parent:"main",url:"/:entity/batch-delete/{ids:json}",controller:"BatchDeleteController",controllerAs:"batchDeleteController",templateProvider:r("BatchDeleteView",d),params:{entity:null,ids:[],page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("BatchDeleteView"),params:["$stateParams",function(e){return e}]}})}var s=n(142),l=n(146),u=n(138),c=n(139),f=n(137),d=n(136);a.$inject=["$stateProvider"],e.exports=a},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r){this.$scope=e,this.$location=t,this.title=n.title(),this.description=n.description(),this.actions=n.actions(),this.fields=n.fields(),this.$scope.entry=r.getFirstEntry(n.getEntity().uniqueId),this.$scope.view=n,this.view=n,this.entity=this.view.getEntity(),this.dataStore=r,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.view=void 0,this.entity=void 0,this.dataStore=void 0},e.$inject=["$scope","$location","view","dataStore"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{require:"ngModel",link:function(e,t,n,r){r.$validators.json=function(e){if(r.$isEmpty(e))return!0;try{return angular.fromJson(e),!0}catch(t){return!1}}}}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=n(4);n(18),n(164);var i=r.module("main",["ui.router","restangular"]);i.controller("AppController",n(123)),i.controller("DashboardController",n(124)),i.service("PanelBuilder",n(130)),i.provider("NgAdminConfiguration",n(129)),i.filter("orderElement",n(127)),i.filter("stripTags",n(128)),i.directive("maDashboardPanel",n(125)),i.directive("maMenuBar",n(126)),i.config(n(131)),i.config(n(132)),i.run(n(133)),i.run(n(134))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n){var r=n();this.$scope=e,this.$location=t,this.menu=r.menu(),this.applicationName=r.title(),this.header=r.header(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.displayHome=function(){this.$location.path("dashboard")},e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0},e.$inject=["$scope","$location","NgAdminConfiguration"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n){this.$scope=e,this.$location=t,this.PanelBuilder=n,this.$scope.edit=this.edit.bind(this),this.retrievePanels(),e.$on("$destroy",this.destroy.bind(this))}return t.prototype.retrievePanels=function(){var e=this;this.panels=[],this.PanelBuilder.getPanelsData().then(function(t){e.panels=t})},t.prototype.edit=function(e){this.$location.path(e.entityName+"/edit/"+e.identifierValue)},t.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.PanelBuilder=void 0},t.$inject=["$scope","$location","PanelBuilder"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){return{restrict:"E",scope:{label:"@",viewName:"@",entries:"=",fields:"&",entity:"&",perPage:"=",sortDir:"=",sortField:"="},link:function(t){t.gotoList=function(){e.path(t.entity().name()+"/list/")}},template:i}}var i=n(148);r.$inject=["$location"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return{restrict:"E",scope:{menu:"&"},link:function(r,a){function s(){a.html(i),n(a.contents())(r)}r.menu=r.menu(),r.path=e.path();var l=[],u=t.$on("$locationChangeSuccess",function(){r.path=e.path(),s()});t.$on("$destroy",u),r.gotoLink=function(t){if(t.hasChild()){var n;o.forEach(a.find("li"),function(e){var r=o.element(e);r.attr("data-menu-id")==t.uuid&&(n=r)});var i=o.element(n.find("a")[0].getElementsByClassName("arrow")[0]),s=n.find("ul").eq(0);if(-1!==l.indexOf(t)){if(t.isChildActive(r.path))return;l.splice(l.indexOf(t),1),s.addClass("collapsed"),i.removeClass("glyphicon-menu-down"),i.addClass("glyphicon-menu-right")}else l.push(t),s.removeClass("collapsed"),i.removeClass("glyphicon-menu-right"),i.addClass("glyphicon-menu-down")}else t.link()&&(e.search({}),e.path(t.link()))},r.isOpen=function(e){return e.isChildActive(r.path)||-1!==l.indexOf(e)},s()}}}var i=n(151),o=n(4);r.$inject=["$location","$rootScope","$compile","$timeout"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()}),n}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){return e.replace(/(<([^>]+)>)/gi,"")}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){this.config=null,this.adminDescription=null,this.$compileProvider=e}r.prototype.setAdminDescription=function(e){this.adminDescription=e},r.prototype.configure=function(e){this.config=e,this.$compileProvider.debugInfoEnabled(this.config.debug())},r.prototype.$get=function(){var e=this.config;return function(){return e}},r.prototype.application=function(e,t){return this.adminDescription.application(e,t)},r.prototype.entity=function(e){return this.adminDescription.entity(e)},r.prototype.field=function(e,t){return this.adminDescription.field(e,t)},r.prototype.registerFieldType=function(e,t){return this.adminDescription.registerFieldType(e,t)},r.prototype.menu=function(e){return this.adminDescription.menu(e)},r.$inject=["$compileProvider"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){this.$q=e,this.$location=t,this.ReadQueries=n,this.dataStore=i.getDataStore(),this.Configuration=r()}r.prototype.getPanelsData=function(){var e,t,n=this.Configuration.getViewsOfType("DashboardView"),r=this.dataStore,i=[],o=this;for(t in n)e=n[t],i.push(o.ReadQueries.getAll(e,1,{},e.getSortFieldName(),e.sortDir()));return this.$q.all(i).then(function(e){var t,i,o,a,s,l=[];for(t in e)i=e[t],o=n[t],a=o.getEntity(),s=o.fields(),l.push({label:o.title()||o.getEntity().label(),viewName:o.name(),fields:s,entity:a,perPage:o.perPage(),entries:r.mapEntries(a.name(),a.identifier(),s,i.data),sortField:o.getSortFieldName(),sortDir:o.sortDir()});return l})},r.$inject=["$q","$location","ReadQueries","NgAdminConfiguration","AdminDescription"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e){e.useApplyAsync(!0)}return e.$inject=["$httpProvider"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){e.state("main",{"abstract":!0,controller:"AppController",controllerAs:"appController",templateProvider:["NgAdminConfiguration",function(e){return e().layout()||i}]}),e.state("dashboard",{parent:"main",url:"/dashboard?sortField&sortDir",params:{sortField:null,sortDir:null},controller:"DashboardController",controllerAs:"dashboardController",template:o}),e.state("ma-404",{parent:"main",template:a}),t.when("","/dashboard"),t.otherwise(function(e,t){var n=e.get("$state");return n.go("ma-404"),t.path()})}var i=n(150),o=n(149),a=n(147);r.$inject=["$stateProvider","$urlRouterProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeError",function(e,r,i,o,a,s){if(404!=s.status)throw n.log("State change error: "+s.message,{addnCls:"humane-flatty-error"}),s;t.go("ma-404"),e.preventDefault()})}return e.$inject=["$rootScope","$state","notification"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeStart",function(){n.start()}),e.$on("$stateChangeSuccess",function(){n.done(),t.scrollTo(0,0)}),e.$on("$stateChangeError",function(){n.done()})}return e.$inject=["$rootScope","$window","progression"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
{{ field.label() }}Actions
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports="
The page you are looking for cannot be found. Take a break before trying again.



\n\n       |\\      _,,,---,,_\n       /,`.-'`'    -.  ;-;;,_\n      |,4-  ) )-,_..;\\ (  `'-'\n     '---''(_/--'  `-'\\_)\n\n    
"},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){/** +}]}}),e.state("batchDelete",{parent:"main",url:"/:entity/batch-delete/{ids:json}",controller:"BatchDeleteController",controllerAs:"batchDeleteController",templateProvider:r("BatchDeleteView",d),params:{entity:null,ids:[],page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("BatchDeleteView"),params:["$stateParams",function(e){return e}]}})}var s=n(142),l=n(146),u=n(138),c=n(139),f=n(137),d=n(136);a.$inject=["$stateProvider"],e.exports=a},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r){this.$scope=e,this.$location=t,this.title=n.title(),this.description=n.description(),this.actions=n.actions(),this.fields=n.fields(),this.$scope.entry=r.getFirstEntry(n.getEntity().uniqueId),this.$scope.view=n,this.view=n,this.entity=this.view.getEntity(),this.dataStore=r,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.view=void 0,this.entity=void 0,this.dataStore=void 0},e.$inject=["$scope","$location","view","dataStore"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{require:"ngModel",link:function(e,t,n,r){r.$validators.json=function(e){if(r.$isEmpty(e))return!0;try{return angular.fromJson(e),!0}catch(t){return!1}}}}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=n(4);n(18),n(164);var i=r.module("main",["ui.router","restangular"]);i.controller("AppController",n(123)),i.controller("DashboardController",n(124)),i.service("PanelBuilder",n(130)),i.provider("NgAdminConfiguration",n(129)),i.filter("orderElement",n(127)),i.filter("stripTags",n(128)),i.directive("maDashboardPanel",n(125)),i.directive("maMenuBar",n(126)),i.config(n(131)),i.config(n(132)),i.run(n(133)),i.run(n(134))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n){var r=n();this.$scope=e,this.$location=t,this.menu=r.menu(),this.applicationName=r.title(),this.header=r.header(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.displayHome=function(){this.$location.path("dashboard")},e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0},e.$inject=["$scope","$location","NgAdminConfiguration"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n){this.$scope=e,this.$location=t,this.PanelBuilder=n,this.$scope.edit=this.edit.bind(this),this.retrievePanels(),e.$on("$destroy",this.destroy.bind(this))}return t.prototype.retrievePanels=function(){var e=this;this.panels=[],this.PanelBuilder.getPanelsData().then(function(t){e.panels=t})},t.prototype.edit=function(e){this.$location.path(e.entityName+"/edit/"+e.identifierValue)},t.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.PanelBuilder=void 0},t.$inject=["$scope","$location","PanelBuilder"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){return{restrict:"E",scope:{label:"@",viewName:"@",entries:"=",fields:"&",entity:"&",perPage:"=",sortDir:"=",sortField:"="},link:function(t){t.gotoList=function(){e.path(t.entity().name()+"/list")}},template:i}}var i=n(148);r.$inject=["$location"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return{restrict:"E",scope:{menu:"&"},link:function(r,a){function s(){a.html(i),n(a.contents())(r)}r.menu=r.menu(),r.path=e.path();var l=[],u=t.$on("$locationChangeSuccess",function(){r.path=e.path(),s()});t.$on("$destroy",u),r.gotoLink=function(t){if(t.hasChild()){var n;o.forEach(a.find("li"),function(e){var r=o.element(e);r.attr("data-menu-id")==t.uuid&&(n=r)});var i=o.element(n.find("a")[0].getElementsByClassName("arrow")[0]),s=n.find("ul").eq(0);if(-1!==l.indexOf(t)){if(t.isChildActive(r.path))return;l.splice(l.indexOf(t),1),s.addClass("collapsed"),i.removeClass("glyphicon-menu-down"),i.addClass("glyphicon-menu-right")}else l.push(t),s.removeClass("collapsed"),i.removeClass("glyphicon-menu-right"),i.addClass("glyphicon-menu-down")}else t.link()&&(e.search({}),e.path(t.link()))},r.isOpen=function(e){return e.isChildActive(r.path)||-1!==l.indexOf(e)},s()}}}var i=n(151),o=n(4);r.$inject=["$location","$rootScope","$compile","$timeout"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()}),n}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){return e.replace(/(<([^>]+)>)/gi,"")}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){this.config=null,this.adminDescription=null,this.$compileProvider=e}r.prototype.setAdminDescription=function(e){this.adminDescription=e},r.prototype.configure=function(e){this.config=e,this.$compileProvider.debugInfoEnabled(this.config.debug())},r.prototype.$get=function(){var e=this.config;return function(){return e}},r.prototype.application=function(e,t){return this.adminDescription.application(e,t)},r.prototype.entity=function(e){return this.adminDescription.entity(e)},r.prototype.field=function(e,t){return this.adminDescription.field(e,t)},r.prototype.registerFieldType=function(e,t){return this.adminDescription.registerFieldType(e,t)},r.prototype.menu=function(e){return this.adminDescription.menu(e)},r.$inject=["$compileProvider"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){this.$q=e,this.$location=t,this.ReadQueries=n,this.dataStore=i.getDataStore(),this.Configuration=r()}r.prototype.getPanelsData=function(){var e,t,n=this.Configuration.getViewsOfType("DashboardView"),r=this.dataStore,i=[],o=this;for(t in n)e=n[t],i.push(o.ReadQueries.getAll(e,1,{},e.getSortFieldName(),e.sortDir()));return this.$q.all(i).then(function(e){var t,i,o,a,s,l=[];for(t in e)i=e[t],o=n[t],a=o.getEntity(),s=o.fields(),l.push({label:o.title()||o.getEntity().label(),viewName:o.name(),fields:s,entity:a,perPage:o.perPage(),entries:r.mapEntries(a.name(),a.identifier(),s,i.data),sortField:o.getSortFieldName(),sortDir:o.sortDir()});return l})},r.$inject=["$q","$location","ReadQueries","NgAdminConfiguration","AdminDescription"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e){e.useApplyAsync(!0)}return e.$inject=["$httpProvider"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){e.state("main",{"abstract":!0,controller:"AppController",controllerAs:"appController",templateProvider:["NgAdminConfiguration",function(e){return e().layout()||i}]}),e.state("dashboard",{parent:"main",url:"/dashboard?sortField&sortDir",params:{sortField:null,sortDir:null},controller:"DashboardController",controllerAs:"dashboardController",template:o}),e.state("ma-404",{parent:"main",template:a}),t.when("","/dashboard"),t.otherwise(function(e,t){var n=e.get("$state");return n.go("ma-404"),t.path()})}var i=n(150),o=n(149),a=n(147);r.$inject=["$stateProvider","$urlRouterProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeError",function(e,r,i,o,a,s){if(404!=s.status)throw n.log("State change error: "+s.message,{addnCls:"humane-flatty-error"}),s;t.go("ma-404"),e.preventDefault()})}return e.$inject=["$rootScope","$state","notification"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeStart",function(){n.start()}),e.$on("$stateChangeSuccess",function(){n.done(),t.scrollTo(0,0)}),e.$on("$stateChangeError",function(){n.done()})}return e.$inject=["$rootScope","$window","progression"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
{{ field.label() }}Actions
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports="
The page you are looking for cannot be found. Take a break before trying again.



\n\n       |\\      _,,,---,,_\n       /,`.-'`'    -.  ;-;;,_\n      |,4-  ) )-,_..;\\ (  `'-'\n     '---''(_/--'  `-'\\_)\n\n    
"},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){/** * @license AngularJS v1.4.0 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT diff --git a/build/ng-admin.min.js b/build/ng-admin.min.js index b9b42ba3..3814d8c8 100644 --- a/build/ng-admin.min.js +++ b/build/ng-admin.min.js @@ -15,7 +15,7 @@ t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this }},{key:"menu",value:function(e){return arguments.length?(this._menu=e,this):(this._menu||(this._menu=this.buildMenuFromEntities()),this._menu)}},{key:"buildMenuFromEntities",value:function(){return(new s["default"]).children(this.entities.filter(function(e){return e.menuView().enabled}).sort(function(e,t){return e.menuView().order()-t.menuView().order()}).map(function(e){return(new s["default"]).populateFromEntity(e)}))}},{key:"customTemplate",value:function(e){return arguments.length?(this._customTemplate=e,this):this._customTemplate}},{key:"baseApiUrl",value:function(e){return arguments.length?(this._baseApiUrl=e,this):this._baseApiUrl}},{key:"addEntity",value:function(e){if(!e)throw new Error("No entity given");return this._entities.push(e),this}},{key:"getEntity",value:function(e){var t=this._entities.filter(function(t){return t.name()===e})[0];if(!t)throw new Error('Unable to find entity "'+e+'"');return t}},{key:"hasEntity",value:function(e){return!!this._entities.filter(function(t){return t.name()===e}).length}},{key:"getViewByEntityAndType",value:function(e,t){return this._entities.filter(function(t){return t.name()===e})[0].views[t]}},{key:"getErrorMessage",value:function(e){return"function"==typeof this._errorMessage?this._errorMessage(e):this._errorMessage}},{key:"errorMessage",value:function(e){return arguments.length?(this._errorMessage=e,this):this._errorMessage}},{key:"getErrorMessageFor",value:function(e,t){return e.getErrorMessage(t)||e.getEntity().getErrorMessage(t)||this.getErrorMessage(t)}},{key:"getEntityNames",value:function(){return this.entities.map(function(e){return e.name()})}}]),e}();t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nr;r++)e[r]=this.fillReferencesValuesFromEntry(e[r],t,n);return e}},{key:"fillReferencesValuesFromEntry",value:function(e,t,n){for(var r in t){var i=t[r],o=this.getReferenceChoicesById(i),a=[],s=i.getMappedValue(e.values[r],e.values);if("reference_many"===i.type()){for(var l in s){var u=s[l];a.push(o[u])}e.listValues[r]=a}else n&&s&&s in o&&(e.listValues[r]=i.getMappedValue(o[s],e.values))}return e}},{key:"getReferenceChoicesById",value:function(e){for(var t={},n=e.targetField().name(),r=e.targetEntity().identifier().name(),i=this.getEntries(e.targetEntity().uniqueId+"_values"),o=0,a=i.length;a>o;o++){var s=i[o];t[s.values[r]]=s.values[n]}return t}}]),e}();t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nt;t++){var r=this._targetFields[t];e.push({field:r,label:r.label()})}return e}},{key:"getSortFieldName",value:function(){return this._targetEntity.name()+"_ListView."+(this.sortField()||this._targetReferenceField)}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n':this._icon}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;s=u=l=void 0,r=!1;var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(i);if(null===u)return void 0;e=u,t=o,n=a,r=!0}},s=n(2),l=r(s),u=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this._type="ShowView"}return o(t,e),t}(l["default"]);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";n(122),n(47);var r=n(21),i=angular.module("AdminDescriptionModule",[]);i.constant("AdminDescription",new r);var o=angular.module("ng-admin",["main","crud","AdminDescriptionModule"]);o.config(["NgAdminConfigurationProvider","AdminDescription",function(e,t){e.setAdminDescription(t)}])},function(e,t,n){"use strict";var r=n(4),i=r.module("crud",["ui.router","ui.bootstrap","ngSanitize","textAngular","ngInflection","ui.codemirror","angularFileUpload","ngNumeraljs"]);i.controller("ListController",n(104)),i.controller("ShowController",n(120)),i.controller("FormController",n(101)),i.controller("DeleteController",n(70)),i.controller("BatchDeleteController",n(69)),i.service("EntryFormatter",n(112)),i.service("PromisesResolver",n(113)),i.service("ReadQueries",n(117)),i.service("WriteQueries",n(118)),i.service("RestWrapper",n(114)),i.directive("maJsonValidator",n(121)),i.directive("maField",n(76)),i.directive("maButtonField",n(71)),i.directive("maChoiceField",n(73)),i.directive("maChoicesField",n(74)),i.directive("maDateField",n(75)),i.directive("maInputField",n(78)),i.directive("maJsonField",n(79)),i.directive("maFileField",n(77)),i.directive("maCheckboxField",n(72)),i.directive("maTextField",n(81)),i.directive("maWysiwygField",n(82)),i.directive("maTemplateField",n(80)),i.provider("FieldViewConfiguration",n(87)),i.directive("listActions",n(103)),i.directive("maDatagrid",n(105)),i.directive("maDatagridPagination",n(109)),i.directive("maDatagridInfinitePagination",n(106)),i.directive("maDatagridItemSelector",n(107)),i.directive("maDatagridMultiSelector",n(108)),i.directive("maFilter",n(99)),i.directive("maColumn",n(59)),i.directive("maBooleanColumn",n(57)),i.directive("maChoicesColumn",n(58)),i.directive("maDateColumn",n(60)),i.directive("maJsonColumn",n(61)),i.directive("maNumberColumn",n(62)),i.directive("maReferenceManyColumn",n(63)),i.directive("maReferenceManyLinkColumn",n(64)),i.directive("maStringColumn",n(65)),i.directive("maTemplateColumn",n(66)),i.directive("maWysiwygColumn",n(67)),i.directive("maBackButton",n(48)),i.directive("maCreateButton",n(50)),i.directive("maEditButton",n(52)),i.directive("maFilteredListButton",n(54)),i.directive("maShowButton",n(56)),i.directive("maListButton",n(55)),i.directive("maDeleteButton",n(51)),i.directive("maBatchDeleteButton",n(49)),i.directive("maExportToCsvButton",n(53)),i.directive("maViewActions",n(115)),i.directive("maViewBatchActions",n(116)),i.directive("compile",n(111)),i.config(n(119)),i.config(n(68)),i.factory("Papa",function(){return n(163)}),i.factory("notification",function(){var e=n(159);return e.timeout=5e3,e.clickToClose=!0,e}),i.factory("progression",function(){return n(162)}),e.exports=i},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{size:"@",label:"@"},link:function(t){t.label=t.label||"Back",t.back=function(){e.history.back()}},template:' {{ ::label }}'}}return e.$inject=["$window"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",selection:"&",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoBatchDelete=function(){var n=(t.entity(),t.selection().map(function(e){return e.identifierValue}));e.go("batchDelete",angular.extend({ids:n,entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Create",t.gotoCreate=function(){e.go(e.get("create"),angular.extend({entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoDelete=function(){e.go(e.get("delete"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Edit",t.gotoEdit=function(){e.go(e.get("edit"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r,i){return{restrict:"E",scope:{entity:"&",label:"@",datastore:"&",search:"&"},template:'',link:function(o){o.label=o.label||"Export",o.datastore=o.datastore(),o.entity=o.entity();var a=o.entity.exportView(),s=o.entity.listView();if(0===a.fields().length){var l=s.exportFields();null===l&&(l=s.fields()),a.fields(l),a.filters(s.filters())}o.has_export=a.fields().length>0;var u=r.getFormatter(a.fields());o.exportToCsv=function(){var r,s,l;i.getAll(a,-1,o.search(),e.sortField,e.sortDir).then(function(e){return r=e.data},function(e){n.log(e.message,{addnCls:"humane-flatty-error"})}).then(function(e){return i.getFilteredReferenceData(a.getNonOptimizedReferences(),e)}).then(function(e){return s=e,i.getOptimizedReferencedData(a.getOptimizedReferences(),r)}).then(function(e){l=e;var t,n=a.getReferences(),r=angular.extend(s,l);for(var i in r)t=o.datastore.mapEntries(n[i].targetEntity().name(),n[i].targetEntity().identifier(),[n[i].targetField()],r[i]),o.datastore.setEntries(n[i].targetEntity().uniqueId+"_values",t)}).then(function(){var e=o.datastore.mapEntries(a.entity.name(),a.identifier(),a.getFields(),r);o.datastore.fillReferencesValuesFromCollection(e,a.getReferences(),!0);for(var n=[],i=e.length-1;i>=0;i--)n[i]=u(e[i]);var s=t.unparse(n),l=document.createElement("a");document.body.appendChild(l),l.setAttribute("href","data:application/octet-stream;charset=utf-8,"+encodeURIComponent(s)),l.setAttribute("download",o.entity.name()+".csv"),l.click()})}}}}return e.$inject=["$stateParams","Papa","notification","EntryFormatter","ReadQueries"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entityName:"@",filter:"&",label:"@",size:"@"},link:function(t){t.label=t.label||"See all related "+t.entityName,t.gotoList=function(){e.go(e.get("list"),{entity:t.entityName,search:t.filter()})}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"List";var n=t.$parent.entity?t.$parent.entity.name():null,r=t.entity().name(),i={entity:r};r===n&&angular.extend(i,e.params),t.gotoList=function(){e.go(e.get("list"),i)}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Show",t.gotoShow=function(){e.go(e.get("show"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},link:function(e){e.isOk=!!e.value()},template:""}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n,r,i){function o(e){if(e.isDetailLink()===!1)return!1;if("reference"!=e.type()&&"reference_many"!=e.type())return!0;var t=e.targetEntity().name(),n=r().getEntity(t);return n?n.isReadOnly?n.showView().enabled:n.editionView().enabled:!1}return{restrict:"E",scope:{field:"&",entry:"&",entity:"&",datastore:"&"},link:function(a,s,l){a.datastore=a.datastore(),a.field=a.field(),a.entry=a.entry();var u=a.field.type();o(a.field)?s.append(i[u].getLinkWidget()):s.append(i[u].getReadWidget()),n(s.contents())(a),a.gotoDetail=function(){this.clearRouteParams();var n=a.field.detailLinkRoute();"edit"!=n||a.entity().editionView().enabled||(n="show"),e.path("/"+a.entry.entityName+"/"+n+"/"+a.entry.identifierValue),t(0)},a.gotoReference=function(){this.clearRouteParams();var t=a.field.targetEntity().name(),n=r().getEntity(t),i=a.entry.values[a.field.name()],o=n.isReadOnly?"show":a.field.detailLinkRoute();e.path("/"+t+"/"+o+"/"+i)},a.clearRouteParams=function(){e.search("q",null),e.search("page",null),e.search("sortField",null),e.search("sortDir",null)}}}}return t.$inject=["$location","$anchorScroll","$compile","NgAdminConfiguration","FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | date:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&"},link:function(t,n){t.guessType=function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t?"Object":"[object Array]"===t?"Array":"Literal"};var r='
{{ val }}
{{ key }}{{ val }}
',i=angular.element(r);e(i)(t),n.replaceWith(i)}}}return t.$inject=["$compile"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | numeraljs:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{restrict:"E",scope:{field:"&",values:"&",ids:"&"},link:function(n){n.field=n.field(),n.values=n.values(),n.ids=n.ids();var r=n.field.targetEntity().name(),i=t().getEntity(r);n.gotoReference=function(t){var n=i.isReadOnly?"show":"edit";e.path("/"+r+"/"+n+"/"+t)}},template:'{{ ref }}'}}return t.$inject=["$location","NgAdminConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},template:"{{ value() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&",field:"&"},link:function(t){var n=t.value();t.field().stripTags()&&(n=e("stripTags")(n)),t.htmlValue=n},template:''}}return t.$inject=["$filter"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){e.registerFieldView("boolean",n(83)),e.registerFieldView("choice",n(84)),e.registerFieldView("choices",n(85)),e.registerFieldView("date",n(16)),e.registerFieldView("datetime",n(16)),e.registerFieldView("email",n(86)),e.registerFieldView("file",n(88)),e.registerFieldView("json",n(89)),e.registerFieldView("number",n(90)),e.registerFieldView("password",n(91)),e.registerFieldView("referenced_list",n(94)),e.registerFieldView("reference",n(92)),e.registerFieldView("reference_many",n(93)),e.registerFieldView("string",n(95)),e.registerFieldView("template",n(96)),e.registerFieldView("text",n(97)),e.registerFieldView("wysiwyg",n(98))}r.$inject=["FieldViewConfigurationProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i){this.$scope=e,this.$state=t,this.WriteQueries=n,this.notification=r,this.view=i,this.entity=i.getEntity(),this.entityIds=t.params.ids,this.selection=[],this.title=i.title(),this.description=i.description(),this.actions=i.actions(),this.loadingPage=!1,this.fields=i.fields(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.batchDelete=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.batchDelete(this.view,this.entityIds).then(function(){t.go(t.get("list"),angular.extend({entity:n},t.params)),e.log("Elements successfully deleted.",{addnCls:"humane-flatty-success"})},function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){this.$state.go(this.$state.get("list"),angular.extend({entity:this.entity().name()},this.$state.params))},e.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0},e.$inject=["$scope","$state","WriteQueries","notification","view"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i,o,a){this.$scope=e,this.$state=t,this.WriteQueries=n,this.entityLabel=i.entity,this.entityId=i.id,this.view=o,this.title=o.title(),this.description=o.description(),this.actions=o.actions(),this.entity=o.getEntity(),this.notification=r,this.$scope.entry=a,this.$scope.view=o,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.deleteOne=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.deleteOne(this.view,this.entityId).then(function(){t.go(t.get("list"),angular.extend({entity:n,id:this.entityId},t.params)),e.log("Element successfully deleted.",{addnCls:"humane-flatty-success"})}.bind(this),function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){var e=this.$state;e.go(e.get("edit"),angular.extend({entity:this.entity.name(),id:this.entityId},e.params))},e.prototype.destroy=function(){this.$scope=void 0,this.WriteQueries=void 0,this.$state=void 0,this.view=void 0,this.entity=void 0},e.$inject=["$scope","$state","WriteQueries","notification","params","view","entry"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.label=n.label(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.toggle=function(){this.value=!this.value},e.isActive=function(){return!!this.value}},template:'{{ label }}'}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.rawValue=e.value,e.$watch("rawValue",function(t){e.value=n.parse()(t)}),e.format=n.format(),e.v=n.validation(),e.isOpen=!1;var r=t.find("input").eq(0),i=n.attributes();for(var o in i)r.attr(o,i[o]);e.toggleDatePicker=function(t){t.preventDefault(),t.stopPropagation(),e.isOpen=!e.isOpen}},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=r(e).map(function(e,t){return''+e.getWriteWidget()+""}).join(""),n='
'+t+'

';return{restrict:"E",scope:{field:"&",entry:"=",entity:"&",form:"&",datastore:"&"},link:function(e){e.field=e.field(),e.type=e.field.type(),e.entity=e.entity(),e.form=e.form(),e.datastore=e.datastore(),e.getClassesForField=function(e,t){return"ng-admin-field-"+e.name()+" "+(e.getCssClasses(t)||"col-sm-10 col-md-8 col-lg-7")},e.getInputForField=function(t){return e.form[t.name()]},e.fieldHasValidation=function(e){var t=this.getInputForField(e);return t&&t.$dirty},e.fieldIsValid=function(e){var t=this.getInputForField(e);return t&&t.$valid},e.getFieldValidationClass=function(e){return this.fieldHasValidation(e)?this.fieldIsValid(e)?"has-success":"has-error":void 0}},template:n}}var r=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{scope:{field:"&",value:"="},restrict:"E",link:{pre:function(e){var t=e.field().uploadInformation();if(!t.hasOwnProperty("url"))throw new Error("You must provide a URL property to allow the upload of files.");e.multiple=t.hasOwnProperty("multiple")?t.multiple:!1,e.accept=t.hasOwnProperty("accept")?t.accept:"*",e.apifilename=t.hasOwnProperty("apifilename")?t.apifilename:!1;var n=e.value?e.value.split(","):[];e.files={};for(var r in n)e.files[n[r]]={name:n[r],progress:0}},post:function(n,r){var i=n.field();n.name=i.name(),n.v=i.validation(),n.value&&(n.v.required=!1);var o=r.find("input")[0],a=i.attributes();for(var s in a)o[s]=a[s];n.fileSelected=function(t){if(t){var r;n.files={};for(var i in t)r=angular.copy(n.field().uploadInformation()),r.file=t[i],e.upload(r).progress(function(e){n.files[e.config.file.name]={name:e.config.file.name,progress:Math.min(100,parseInt(100*e.loaded/e.total))}}).success(function(e,t,r,i){if(n.files[i.file.name]={name:n.apifilename?e[n.apifilename]:i.file.name,progress:0},n.apifilename){var o=Object.keys(n.files).map(function(e){return n.files[e].name});n.value=o.join(",")}else n.value=Object.keys(n.files).join(",")}).error(function(e,t,r,i){delete n.files[i.file.name],n.value=Object.keys(n.files).join(",")})}},n.selectFile=function(){t(function(){o.click()},0)}}},template:'
{{ file.progress }}% Complete
{{ file.name }}
'}}return t.$inject=["$upload","$timeout"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{type:"@",field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){(function(t){"use strict";function r(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.jsonValue=null===e.value?"":angular.toJson(e.value,!0);var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.$watch("jsonValue",function(t){if(""==t||"undefined"==typeof t)return void(e.value=null);try{var n=angular.fromJson(t);e.value=n}catch(r){}})},template:''}}var i=n(3);t.jsonlint=n(160),n(153),n(154),n(156),n(155),n(157),n(158),i.defineOption("matchBrackets",!0),i.defineOption("autoCloseBrackets",!0),i.defineOption("lineWrapping",!0),i.defineOption("tabSize",2),i.defineOption("mode","application/json"),i.defineOption("gutters",["CodeMirror-lint-markers"]),i.defineOption("lint",!0),i.defineOption("styleActiveLine",!0),t.CodeMirror=i,r.$inject=[],e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:'' }}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name()},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){this.fieldViews={}}return e.prototype.registerFieldView=function(e,t){this.fieldViews[e]=t},e.prototype.$get=function(){return this.fieldViews},e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display file field as readable"}function n(){return"error: cannot display file field as linkable"}function r(){return"error: cannot display file field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display a json field as linkable"}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display password field as readable"}function n(){return"error: cannot display password field as linkable"}function r(){return"error: cannot display password field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display referenced_list field as linkable"}function r(){return"error: cannot display referenced_list field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(){return''}function i(){return''+r()+""}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){"use strict";function r(){return''}function i(){return"error: cannot display wysiwyg field as linkable"}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=i(e).map(function(e,t){return''+e.getFilterWidget()+""}).join(""),n='';return{restrict:"E",template:n,scope:{filters:"&",datastore:"&"},controllerAs:"filterCtrl",controller:r}}var r=n(100),i=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,n,r){this.$scope=e,this.$state=n,this.$stateParams=r,this.$scope.values=this.$stateParams.search||{},this.$scope.filters=this.$scope.filters(),this.$scope.datastore=this.$scope.datastore(),this.isFilterEmpty=t(this.$scope.values)}function t(e){for(var t in e)if(""!=e[t])return!1;return!0}return e.prototype.filter=function(){var e,t,n,r={},i=this.$scope.filters;for(n in i)t=i[n],e=t.name(),this.$scope.values[e]&&(r[e]=this.$scope.values[e]);this.$stateParams.search=r,this.$stateParams.page=1,this.$state.go(this.$state.current,this.$stateParams,{reload:!0,inherit:!1,notify:!0})},e.prototype.shouldFilter=function(){return Object.keys(this.$scope.filters).length},e.prototype.clearFilters=function(){var e;for(e in this.$scope.values)this.$scope.values[e]=null;this.filter()},e.prototype.destroy=function(){this.$scope=void 0},e.$inject=["$scope","$state","$stateParams"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){this.$scope=e,this.$state=t,this.WriteQueries=n,this.dataStore=s,this.progression=i,this.notification=o,this.title=a.title(),this.description=a.description(),this.actions=a.actions(),this.fields=a.fields(),this.config=r(),this.view=a,this.entity=this.view.getEntity(),this.$scope.entry=s.getFirstEntry(this.entity.uniqueId),this.$scope.view=a,this.$scope.entity=this.entity,this.originEntityId=this.$scope.entry.values[this.entity.identifier().name()],e.$on("$destroy",this.destroy.bind(this))};r.prototype.validateEntry=function(){var e,t,n,r,i=this.form,o=this.$scope.entry,a=this.view.getFields(),s=this.entity.identifier(),l={};if(!i.$valid)return this.notification.log("invalid form",{addnCls:"humane-flatty-error"}),!1;l[s.name()]=o.identifierValue;for(r in a)n=a[r],e=o.values[n.name()],l[n.name()]=e;t=this.dataStore.mapEntry(this.view.entity.name(),this.view.identifier(),this.view.getFields(),l);try{this.view.validate(t)}catch(u){return this.notification.log(u,{addnCls:"humane-flatty-error"}),!1}return l},r.prototype.submitCreation=function(e){e.preventDefault();var t=this.validateEntry(),n=this.entity,r=n.editionView().enabled?"edit":"show";if(t){var i=this.progression,o=this.notification,a=this.$state;i.start(),this.WriteQueries.createOne(this.view,t).then(function(e){var t=this.dataStore.mapEntry(n.name(),this.view.identifier(),this.view.getFields(),e);i.done(),o.log("Element successfully created.",{addnCls:"humane-flatty-success"}),a.go(a.get(r),{entity:n.name(),id:t.identifierValue})}.bind(this),this.handleError.bind(this))}},r.prototype.submitEdition=function(e){e.preventDefault();var t=this.validateEntry();if(t){var n=this.progression,r=this.notification;n.start(),this.WriteQueries.updateOne(this.view,t,this.originEntityId).then(function(){n.done(),r.log("Changes successfully saved.",{addnCls:"humane-flatty-success"})},this.handleError.bind(this))}},r.prototype.handleError=function(e){var t=this.config.getErrorMessageFor(this.view,e);this.progression.done(),this.notification.log(t,{addnCls:"humane-flatty-error"})},r.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0,this.dataStore=void 0,this.view=void 0,this.entity=void 0},r.$inject=["$scope","$state","WriteQueries","NgAdminConfiguration","progression","notification","view","dataStore"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.entity=e.entity(),this.$scope=e,this.$location=t,this.$anchorScroll=n,this.filters={},this.shouldDisplayActions=this.$scope.listActions()&&this.$scope.listActions().length>0,e.toggleSelect=this.toggleSelect.bind(this),e.toggleSelectAll=this.toggleSelectAll.bind(this),this.$scope.gotoDetail=this.gotoDetail.bind(this);var r=this.$location.search();this.sortField="sortField"in r?r.sortField:this.$scope.sortField,this.sortDir="sortDir"in r?r.sortDir:this.$scope.sortDir}return e.prototype.gotoDetail=function(e){this.clearRouteParams();var t=this.$scope.entity,n=t.editionView().enabled?"edit":"show";this.$location.path("/"+e.entityName+"/"+n+"/"+e.identifierValue),this.$anchorScroll(0)},e.prototype.clearRouteParams=function(){this.$location.search("q",null),this.$location.search("page",null),this.$location.search("sortField",null),this.$location.search("sortDir",null)},e.prototype.isSorting=function(e){return this.sortField===this.getSortName(e)},e.prototype.itemClass=function(e){return e%2===0?"even":"odd"},e.prototype.sort=function(e){var t="ASC",n=this.getSortName(e);this.sortField===n&&(t="ASC"===this.sortDir?"DESC":"ASC"),this.$location.search("sortField",n),this.$location.search("sortDir",t)},e.prototype.getSortName=function(e){return this.$scope.name+"."+e.name()},e.prototype.toggleSelect=function(e){var t=this.$scope.selection.slice(),n=t.indexOf(e);return-1===n?void(this.$scope.selection=t.concat(e)):(t.splice(n,1),void(this.$scope.selection=t))},e.prototype.toggleSelectAll=function(){return this.$scope.selection.length0,this.dataStore=s,this.fields=a.fields(),this.listActions=a.listActions(),this.totalItems=l,this.page=t.page||1,this.infinitePagination=this.view.infinitePagination(),this.nextPageCallback=this.nextPage.bind(this),this.setPageCallback=this.setPage.bind(this),this.selection=this.batchActions.length?[]:null,this.sortField=this.$stateParams.sortField||this.view.getSortFieldName(),this.sortDir=this.$stateParams.sortDir||this.view.sortDir(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.nextPage=function(e){if(!this.loadingPage){var t=this.progression,n=this;t.start(),this.ReadQueries.getAll(this.view,e,!0,this.search,this.sortField,this.sortDir).then(function(e){t.done(),n.entries=n.entries.concat(e.entries),n.loadingPage=!1})}},e.prototype.setPage=function(e){this.$location.search("page",e),this.$anchorScroll(0)},e.prototype.destroy=function(){this.$scope=void 0,this.$stateParams=void 0,this.$location=void 0,this.$anchorScroll=void 0,this.dataStore=void 0},e.$inject=["$scope","$stateParams","$location","$anchorScroll","ReadQueries","progression","view","dataStore","totalItems"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",template:r,scope:{name:"@",entries:"=",selection:"=",fields:"&",listActions:"&",entity:"&",sortField:"=",sortDir:"="},controllerAs:"datagrid",controller:i}}var r=n(140),i=n(102);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){var n=r.element(e),i=100,o=t[0].body;return{restrict:"E",scope:{perPage:"@",totalItems:"@",nextPage:"&"},link:function(t){function r(){if(o.offsetHeight-e.innerHeight-e.scrollY=l)return;u++,t.nextPage()(u)}}var a=parseInt(t.perPage,10)||1,s=parseInt(t.totalItems,10),l=Math.ceil(s/a)||1,u=1;n.bind("scroll",r),t.$on("$destroy",function(){n.unbind("scroll",r)})}}}var r=n(4);return t.$inject=["$window","$document"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entry:"=",selection:"=",toggleSelect:"&"},template:'',link:function(e){e.toggle=function(t){e.toggleSelect({entry:t})}}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entries:"=",selection:"=",toggleSelectAll:"&"},template:'',link:function(e,t){e.$watch("selection",function(n){t.children()[0].indeterminate=n.length>0&&n.length!=e.entries.length}),e.$watch("entries",function(n){t.children()[0].indeterminate=e.selection.length>0&&e.selection.length!=n.length})}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{page:"@",perPage:"@",totalItems:"@",setPage:"&"},template:r,controllerAs:"paginationCtrl",controller:i}}var r=n(143),i=n(110);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){this.$scope=e;var t=parseInt(this.$scope.perPage,10)||1,n=parseInt(this.$scope.totalItems,10),r=Math.max(parseInt(this.$scope.page,10),1);this.nbPages=Math.ceil(n/t)||1,this.page=Math.min(this.nbPages,r),this.offsetEnd=Math.min(this.page*t,n),this.offsetBegin=Math.min((this.page-1)*t+1,this.offsetEnd),this.totalItems=n,this.displayPagination=n>t,e.$on("$destroy",this.destroy.bind(this))}n(4);return t.prototype.range=function(e){var t=[],n=this.nbPages;return e>2&&t.push("1"),4==e&&t.push("2"),e>4&&t.push("."),e>1&&t.push(e-1),t.push(e),n>e&&t.push(e+1),e==n-3&&t.push(n-1),n-3>e&&t.push("."),n-1>e&&t.push(n),t},t.prototype.setPage=function(e){0>=e||e>this.nbPages||this.$scope.setPage()(e)},t.prototype.destroy=function(){this.$scope=void 0},t.$inject=["$scope"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){var t=e.get("$compile");return{transclude:!0,link:function(e,n,r,i,o){var a=e.$watch(function(e){return e.$eval(r.compile)},function(i){return!1===i?void o(e,function(e){n.append(e)}):(n.html(i),t(n.contents())(e),void("true"==r.compileOnce&&a()))})}}}return e.$inject=["$injector"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.formatDate=function(t){return function(n){return e("date")(n,t)}}}return e.prototype.formatField=function(e){var t=e.label()||e.name();switch(e.type()){case"boolean":case"choice":case"choices":case"number":case"string":case"text":case"wysiwyg":case"email":case"json":case"file":case"template":return function(n){return{name:t,value:n.values[e.name()]}};case"date":var n=this.formatDate(e.format());return function(r){return{name:t,value:n(r.values[e.name()])}};case"reference":return function(n){return{name:t,value:n.listValues[e.name()]}};case"referenced_list":return}},e.prototype.getFormatter=function(e){var t=e.map(this.formatField.bind(this));return function(e){var n={};return t.map(function(t){return t?t(e):void 0}).forEach(function(e){e&&(n[e.name]=e.value)}),n}},e.$inject=["$filter"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return e.getPromisesResolver()}return e.$inject=["AdminDescription"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.Restangular=e,e.setFullResponse(!0)}return e.prototype.getOne=function(e,t){return this.Restangular.oneUrl(e,t).get().then(function(e){return e.data})},e.prototype.getList=function(e,t,n){return this.Restangular.allUrl(t,n).getList(e)},e.prototype.createOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPOST(e).then(function(e){return e.data})},e.prototype.updateOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPUT(e).then(function(e){return e.data})},e.prototype.deleteOne=function(e,t){return this.Restangular.oneUrl(e,t).customDELETE()},e.$inject=["Restangular"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=e.get("$compile");return{restrict:"E",transclude:!0,scope:{override:"&",entry:"=",entity:"=",selection:"=",batchButtons:"&",datastore:"=",search:"="},template:r,link:function(e,n,r,i,o){var a=e.override();return a?"string"==typeof a?(n.html(a),void t(n.contents())(e)):void(e.buttons=a):void o(e,function(e){n.append(e)})}}}var r=n(144);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){e.get("$compile");return{restrict:"E",scope:{entity:"=",selection:"=",buttons:"&"},template:r,link:function(e){e.isopen=!1,e.toggleDropdown=function(t){t.preventDefault(),t.stopPropagation(),e.isopen=!e.isopen},e.buttons=e.buttons(),"string"==typeof e.buttons&&(e.customTemplate=e.buttons,e.buttons=null)}}}var r=n(145);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getReadQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getWriteQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){return["$stateParams","NgAdminConfiguration",function(n,r){var i,o=r().getViewByEntityAndType(n.entity,e);return(i=o.template())?i:(i=r().customTemplate()(e),i?i:t)}]}function i(e){return["$stateParams","NgAdminConfiguration",function(t,n){var r;try{r=n().getViewByEntityAndType(t.entity,e)}catch(i){var o=new Error("Unknown view or entity name");throw o.status=404,o}if(!r.enabled)throw new Error("The "+e+" is disabled for this entity");return r}]}function o(){return["AdminDescription",function(e){return e.getDataStore()}]}function a(e){e.state("list",{parent:"main",url:"/:entity/list?{search:json}&page&sortField&sortDir",params:{entity:null,page:null,search:null,sortField:null,sortDir:null},controller:"ListController",controllerAs:"listController",templateProvider:r("ListView",s),resolve:{dataStore:o(),view:i("ListView"),response:["$stateParams","ReadQueries","view",function(e,t,n){var r=e.page,i=e.search,o=e.sortField,a=e.sortDir;return t.getAll(n,r,i,o,a)}],totalItems:["response",function(e){return e.totalItems}],nonOptimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),n.data)}],optimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),n.data)}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],entries:["dataStore","view","response","referencedEntries",function(e,t,n,r){var i=e.mapEntries(t.entity.name(),t.identifier(),t.getFields(),n.data);return e.fillReferencesValuesFromCollection(i,t.getReferences(),!0),e.setEntries(t.getEntity().uniqueId,i),!0}],filterData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getFilterReferences())}],filterEntries:["dataStore","view","filterData",function(e,t,n){var r,i=t.getFilterReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("show",{parent:"main",url:"/:entity/show/:id?sortField&sortDir",controller:"ShowController",controllerAs:"showController",templateProvider:r("ShowView",l),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("ShowView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}]}}),e.state("create",{parent:"main",url:"/:entity/create",controller:"FormController",controllerAs:"formController",templateProvider:r("CreateView",u),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("CreateView"),entry:["dataStore","view",function(e,t){var n=e.createEntry(t.entity.name(),t.identifier(),t.getFields());return e.addEntry(t.getEntity().uniqueId,n),n}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("edit",{parent:"main",url:"/:entity/edit/:id?sortField&sortDir",controller:"FormController",controllerAs:"formController",templateProvider:r("EditView",c),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("EditView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("delete",{parent:"main",url:"/:entity/delete/:id",controller:"DeleteController",controllerAs:"deleteController",templateProvider:r("DeleteView",f),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("DeleteView"),params:["$stateParams",function(e){return e}],entry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl()); -}]}}),e.state("batchDelete",{parent:"main",url:"/:entity/batch-delete/{ids:json}",controller:"BatchDeleteController",controllerAs:"batchDeleteController",templateProvider:r("BatchDeleteView",d),params:{entity:null,ids:[],page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("BatchDeleteView"),params:["$stateParams",function(e){return e}]}})}var s=n(142),l=n(146),u=n(138),c=n(139),f=n(137),d=n(136);a.$inject=["$stateProvider"],e.exports=a},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r){this.$scope=e,this.$location=t,this.title=n.title(),this.description=n.description(),this.actions=n.actions(),this.fields=n.fields(),this.$scope.entry=r.getFirstEntry(n.getEntity().uniqueId),this.$scope.view=n,this.view=n,this.entity=this.view.getEntity(),this.dataStore=r,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.view=void 0,this.entity=void 0,this.dataStore=void 0},e.$inject=["$scope","$location","view","dataStore"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{require:"ngModel",link:function(e,t,n,r){r.$validators.json=function(e){if(r.$isEmpty(e))return!0;try{return angular.fromJson(e),!0}catch(t){return!1}}}}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=n(4);n(18),n(164);var i=r.module("main",["ui.router","restangular"]);i.controller("AppController",n(123)),i.controller("DashboardController",n(124)),i.service("PanelBuilder",n(130)),i.provider("NgAdminConfiguration",n(129)),i.filter("orderElement",n(127)),i.filter("stripTags",n(128)),i.directive("maDashboardPanel",n(125)),i.directive("maMenuBar",n(126)),i.config(n(131)),i.config(n(132)),i.run(n(133)),i.run(n(134))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n){var r=n();this.$scope=e,this.$location=t,this.menu=r.menu(),this.applicationName=r.title(),this.header=r.header(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.displayHome=function(){this.$location.path("dashboard")},e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0},e.$inject=["$scope","$location","NgAdminConfiguration"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n){this.$scope=e,this.$location=t,this.PanelBuilder=n,this.$scope.edit=this.edit.bind(this),this.retrievePanels(),e.$on("$destroy",this.destroy.bind(this))}return t.prototype.retrievePanels=function(){var e=this;this.panels=[],this.PanelBuilder.getPanelsData().then(function(t){e.panels=t})},t.prototype.edit=function(e){this.$location.path(e.entityName+"/edit/"+e.identifierValue)},t.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.PanelBuilder=void 0},t.$inject=["$scope","$location","PanelBuilder"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){return{restrict:"E",scope:{label:"@",viewName:"@",entries:"=",fields:"&",entity:"&",perPage:"=",sortDir:"=",sortField:"="},link:function(t){t.gotoList=function(){e.path(t.entity().name()+"/list/")}},template:i}}var i=n(148);r.$inject=["$location"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return{restrict:"E",scope:{menu:"&"},link:function(r,a){function s(){a.html(i),n(a.contents())(r)}r.menu=r.menu(),r.path=e.path();var l=[],u=t.$on("$locationChangeSuccess",function(){r.path=e.path(),s()});t.$on("$destroy",u),r.gotoLink=function(t){if(t.hasChild()){var n;o.forEach(a.find("li"),function(e){var r=o.element(e);r.attr("data-menu-id")==t.uuid&&(n=r)});var i=o.element(n.find("a")[0].getElementsByClassName("arrow")[0]),s=n.find("ul").eq(0);if(-1!==l.indexOf(t)){if(t.isChildActive(r.path))return;l.splice(l.indexOf(t),1),s.addClass("collapsed"),i.removeClass("glyphicon-menu-down"),i.addClass("glyphicon-menu-right")}else l.push(t),s.removeClass("collapsed"),i.removeClass("glyphicon-menu-right"),i.addClass("glyphicon-menu-down")}else t.link()&&(e.search({}),e.path(t.link()))},r.isOpen=function(e){return e.isChildActive(r.path)||-1!==l.indexOf(e)},s()}}}var i=n(151),o=n(4);r.$inject=["$location","$rootScope","$compile","$timeout"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()}),n}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){return e.replace(/(<([^>]+)>)/gi,"")}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){this.config=null,this.adminDescription=null,this.$compileProvider=e}r.prototype.setAdminDescription=function(e){this.adminDescription=e},r.prototype.configure=function(e){this.config=e,this.$compileProvider.debugInfoEnabled(this.config.debug())},r.prototype.$get=function(){var e=this.config;return function(){return e}},r.prototype.application=function(e,t){return this.adminDescription.application(e,t)},r.prototype.entity=function(e){return this.adminDescription.entity(e)},r.prototype.field=function(e,t){return this.adminDescription.field(e,t)},r.prototype.registerFieldType=function(e,t){return this.adminDescription.registerFieldType(e,t)},r.prototype.menu=function(e){return this.adminDescription.menu(e)},r.$inject=["$compileProvider"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){this.$q=e,this.$location=t,this.ReadQueries=n,this.dataStore=i.getDataStore(),this.Configuration=r()}r.prototype.getPanelsData=function(){var e,t,n=this.Configuration.getViewsOfType("DashboardView"),r=this.dataStore,i=[],o=this;for(t in n)e=n[t],i.push(o.ReadQueries.getAll(e,1,{},e.getSortFieldName(),e.sortDir()));return this.$q.all(i).then(function(e){var t,i,o,a,s,l=[];for(t in e)i=e[t],o=n[t],a=o.getEntity(),s=o.fields(),l.push({label:o.title()||o.getEntity().label(),viewName:o.name(),fields:s,entity:a,perPage:o.perPage(),entries:r.mapEntries(a.name(),a.identifier(),s,i.data),sortField:o.getSortFieldName(),sortDir:o.sortDir()});return l})},r.$inject=["$q","$location","ReadQueries","NgAdminConfiguration","AdminDescription"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e){e.useApplyAsync(!0)}return e.$inject=["$httpProvider"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){e.state("main",{"abstract":!0,controller:"AppController",controllerAs:"appController",templateProvider:["NgAdminConfiguration",function(e){return e().layout()||i}]}),e.state("dashboard",{parent:"main",url:"/dashboard?sortField&sortDir",params:{sortField:null,sortDir:null},controller:"DashboardController",controllerAs:"dashboardController",template:o}),e.state("ma-404",{parent:"main",template:a}),t.when("","/dashboard"),t.otherwise(function(e,t){var n=e.get("$state");return n.go("ma-404"),t.path()})}var i=n(150),o=n(149),a=n(147);r.$inject=["$stateProvider","$urlRouterProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeError",function(e,r,i,o,a,s){if(404!=s.status)throw n.log("State change error: "+s.message,{addnCls:"humane-flatty-error"}),s;t.go("ma-404"),e.preventDefault()})}return e.$inject=["$rootScope","$state","notification"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeStart",function(){n.start()}),e.$on("$stateChangeSuccess",function(){n.done(),t.scrollTo(0,0)}),e.$on("$stateChangeError",function(){n.done()})}return e.$inject=["$rootScope","$window","progression"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
{{ field.label() }}Actions
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports="
The page you are looking for cannot be found. Take a break before trying again.



\n\n       |\\      _,,,---,,_\n       /,`.-'`'    -.  ;-;;,_\n      |,4-  ) )-,_..;\\ (  `'-'\n     '---''(_/--'  `-'\\_)\n\n    
"},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){/** +}]}}),e.state("batchDelete",{parent:"main",url:"/:entity/batch-delete/{ids:json}",controller:"BatchDeleteController",controllerAs:"batchDeleteController",templateProvider:r("BatchDeleteView",d),params:{entity:null,ids:[],page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("BatchDeleteView"),params:["$stateParams",function(e){return e}]}})}var s=n(142),l=n(146),u=n(138),c=n(139),f=n(137),d=n(136);a.$inject=["$stateProvider"],e.exports=a},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r){this.$scope=e,this.$location=t,this.title=n.title(),this.description=n.description(),this.actions=n.actions(),this.fields=n.fields(),this.$scope.entry=r.getFirstEntry(n.getEntity().uniqueId),this.$scope.view=n,this.view=n,this.entity=this.view.getEntity(),this.dataStore=r,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.view=void 0,this.entity=void 0,this.dataStore=void 0},e.$inject=["$scope","$location","view","dataStore"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{require:"ngModel",link:function(e,t,n,r){r.$validators.json=function(e){if(r.$isEmpty(e))return!0;try{return angular.fromJson(e),!0}catch(t){return!1}}}}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=n(4);n(18),n(164);var i=r.module("main",["ui.router","restangular"]);i.controller("AppController",n(123)),i.controller("DashboardController",n(124)),i.service("PanelBuilder",n(130)),i.provider("NgAdminConfiguration",n(129)),i.filter("orderElement",n(127)),i.filter("stripTags",n(128)),i.directive("maDashboardPanel",n(125)),i.directive("maMenuBar",n(126)),i.config(n(131)),i.config(n(132)),i.run(n(133)),i.run(n(134))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n){var r=n();this.$scope=e,this.$location=t,this.menu=r.menu(),this.applicationName=r.title(),this.header=r.header(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.displayHome=function(){this.$location.path("dashboard")},e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0},e.$inject=["$scope","$location","NgAdminConfiguration"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n){this.$scope=e,this.$location=t,this.PanelBuilder=n,this.$scope.edit=this.edit.bind(this),this.retrievePanels(),e.$on("$destroy",this.destroy.bind(this))}return t.prototype.retrievePanels=function(){var e=this;this.panels=[],this.PanelBuilder.getPanelsData().then(function(t){e.panels=t})},t.prototype.edit=function(e){this.$location.path(e.entityName+"/edit/"+e.identifierValue)},t.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.PanelBuilder=void 0},t.$inject=["$scope","$location","PanelBuilder"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){return{restrict:"E",scope:{label:"@",viewName:"@",entries:"=",fields:"&",entity:"&",perPage:"=",sortDir:"=",sortField:"="},link:function(t){t.gotoList=function(){e.path(t.entity().name()+"/list")}},template:i}}var i=n(148);r.$inject=["$location"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return{restrict:"E",scope:{menu:"&"},link:function(r,a){function s(){a.html(i),n(a.contents())(r)}r.menu=r.menu(),r.path=e.path();var l=[],u=t.$on("$locationChangeSuccess",function(){r.path=e.path(),s()});t.$on("$destroy",u),r.gotoLink=function(t){if(t.hasChild()){var n;o.forEach(a.find("li"),function(e){var r=o.element(e);r.attr("data-menu-id")==t.uuid&&(n=r)});var i=o.element(n.find("a")[0].getElementsByClassName("arrow")[0]),s=n.find("ul").eq(0);if(-1!==l.indexOf(t)){if(t.isChildActive(r.path))return;l.splice(l.indexOf(t),1),s.addClass("collapsed"),i.removeClass("glyphicon-menu-down"),i.addClass("glyphicon-menu-right")}else l.push(t),s.removeClass("collapsed"),i.removeClass("glyphicon-menu-right"),i.addClass("glyphicon-menu-down")}else t.link()&&(e.search({}),e.path(t.link()))},r.isOpen=function(e){return e.isChildActive(r.path)||-1!==l.indexOf(e)},s()}}}var i=n(151),o=n(4);r.$inject=["$location","$rootScope","$compile","$timeout"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()}),n}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){return e.replace(/(<([^>]+)>)/gi,"")}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){this.config=null,this.adminDescription=null,this.$compileProvider=e}r.prototype.setAdminDescription=function(e){this.adminDescription=e},r.prototype.configure=function(e){this.config=e,this.$compileProvider.debugInfoEnabled(this.config.debug())},r.prototype.$get=function(){var e=this.config;return function(){return e}},r.prototype.application=function(e,t){return this.adminDescription.application(e,t)},r.prototype.entity=function(e){return this.adminDescription.entity(e)},r.prototype.field=function(e,t){return this.adminDescription.field(e,t)},r.prototype.registerFieldType=function(e,t){return this.adminDescription.registerFieldType(e,t)},r.prototype.menu=function(e){return this.adminDescription.menu(e)},r.$inject=["$compileProvider"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){this.$q=e,this.$location=t,this.ReadQueries=n,this.dataStore=i.getDataStore(),this.Configuration=r()}r.prototype.getPanelsData=function(){var e,t,n=this.Configuration.getViewsOfType("DashboardView"),r=this.dataStore,i=[],o=this;for(t in n)e=n[t],i.push(o.ReadQueries.getAll(e,1,{},e.getSortFieldName(),e.sortDir()));return this.$q.all(i).then(function(e){var t,i,o,a,s,l=[];for(t in e)i=e[t],o=n[t],a=o.getEntity(),s=o.fields(),l.push({label:o.title()||o.getEntity().label(),viewName:o.name(),fields:s,entity:a,perPage:o.perPage(),entries:r.mapEntries(a.name(),a.identifier(),s,i.data),sortField:o.getSortFieldName(),sortDir:o.sortDir()});return l})},r.$inject=["$q","$location","ReadQueries","NgAdminConfiguration","AdminDescription"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e){e.useApplyAsync(!0)}return e.$inject=["$httpProvider"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){e.state("main",{"abstract":!0,controller:"AppController",controllerAs:"appController",templateProvider:["NgAdminConfiguration",function(e){return e().layout()||i}]}),e.state("dashboard",{parent:"main",url:"/dashboard?sortField&sortDir",params:{sortField:null,sortDir:null},controller:"DashboardController",controllerAs:"dashboardController",template:o}),e.state("ma-404",{parent:"main",template:a}),t.when("","/dashboard"),t.otherwise(function(e,t){var n=e.get("$state");return n.go("ma-404"),t.path()})}var i=n(150),o=n(149),a=n(147);r.$inject=["$stateProvider","$urlRouterProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeError",function(e,r,i,o,a,s){if(404!=s.status)throw n.log("State change error: "+s.message,{addnCls:"humane-flatty-error"}),s;t.go("ma-404"),e.preventDefault()})}return e.$inject=["$rootScope","$state","notification"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeStart",function(){n.start()}),e.$on("$stateChangeSuccess",function(){n.done(),t.scrollTo(0,0)}),e.$on("$stateChangeError",function(){n.done()})}return e.$inject=["$rootScope","$window","progression"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
{{ field.label() }}Actions
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports="
The page you are looking for cannot be found. Take a break before trying again.



\n\n       |\\      _,,,---,,_\n       /,`.-'`'    -.  ;-;;,_\n      |,4-  ) )-,_..;\\ (  `'-'\n     '---''(_/--'  `-'\\_)\n\n    
"},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){/** * @license AngularJS v1.4.0 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT diff --git a/src/javascripts/ng-admin/Main/component/directive/maDashboardPanel.js b/src/javascripts/ng-admin/Main/component/directive/maDashboardPanel.js index ab9c7153..a5f03243 100644 --- a/src/javascripts/ng-admin/Main/component/directive/maDashboardPanel.js +++ b/src/javascripts/ng-admin/Main/component/directive/maDashboardPanel.js @@ -15,7 +15,7 @@ function maDashboardPanel($location) { }, link: function(scope) { scope.gotoList = function () { - $location.path(scope.entity().name() + '/list/'); + $location.path(scope.entity().name() + '/list'); }; }, template: dashboardPanelView