{"version":3,"sources":["app.module.js","layout/root.controller.js","layout/root.routes.js","components/examples/examples.controller.js","components/examples/examples.routes.js","components/live-editor/live-editor.controller.js","components/live-editor/live-editor.routes.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"app.min.js","sourcesContent":["(function () {\r\n \"use strict\";\r\n\r\n var myApp = angular.module(\"fancy.schema-form-builder-studio\", [\"ui.router\", \"schemaForm\", \"ui.ace\"]);\r\n\r\n myApp.config([\"$urlRouterProvider\", function ($urlRouterProvider) {\r\n\r\n // For any unmatched url, redirect to /home\r\n $urlRouterProvider.otherwise(\"/live-editor\");\r\n\r\n }]);\r\n\r\n})();","(function () {\r\n \"use strict\";\r\n\r\n // Define the root controller of the app\r\n angular.module(\"fancy.schema-form-builder-studio\")\r\n .controller(\"RootController\", [\"$log\", function ($log) {\r\n $log.info(\"Running root controller\");\r\n }]);\r\n\r\n})();","(function () {\r\n \"use strict\";\r\n\r\n angular.module(\"fancy.schema-form-builder-studio\")\r\n .config([\"$stateProvider\", function ($stateProvider) {\r\n\r\n $stateProvider\r\n .state(\"root\", {\r\n abstract: true,\r\n controller: \"RootController\",\r\n controllerAs: \"rootVm\",\r\n templateUrl: \"/app/layout/root.tpl.html\"\r\n });\r\n\r\n }]);\r\n\r\n})();","(function () {\r\n \"use strict\";\r\n\r\n angular.module(\"fancy.schema-form-builder-studio\")\r\n .controller(\"HomeController\", [\"$http\", function ($http) {\r\n \r\n var vm = this; \r\n \r\n }]);\r\n\r\n})();","(function () {\r\n \"use strict\";\r\n\r\n angular.module(\"fancy.schema-form-builder-studio\")\r\n .config([\"$stateProvider\", function ($stateProvider) {\r\n\r\n $stateProvider\r\n .state(\"home\", {\r\n parent: \"root\",\r\n url: \"/home\",\r\n controller: \"HomeController\",\r\n controllerAs: \"vm\",\r\n templateUrl: \"/app/components/home/home.tpl.html\"\r\n });\r\n\r\n }]);\r\n\r\n})();","(function () {\r\n \"use strict\";\r\n\r\n angular.module(\"fancy.schema-form-builder-studio\")\r\n .controller(\"LiveEditorController\", [\"$http\", function ($http) {\r\n \r\n var localDtoStorageKeyPrefix = \"ShemaFormBuilderStudio_\";\r\n \r\n var vm = this;\r\n vm.showDtoExplorer = false;\r\n\r\n loadLocalDtoNames();\r\n \r\n // Get all example names\r\n $http.get(\"/api/examples\").success(function(exampleNames) {\r\n vm.exampleNames = exampleNames;\r\n vm.selectedExample = exampleNames[0];\r\n vm.loadExample();\r\n });\r\n \r\n // Loads an example dto from the server into editor\r\n vm.loadExample = function() {\r\n $http.get(\"/api/examples/\" + vm.selectedExample).success(function(exampleCode) {\r\n vm.code = exampleCode;\r\n });\r\n };\r\n \r\n // Sends code in editor to server to compile it\r\n vm.compileAndRender = function() { \r\n // Send editor content to backend to compile the C# code\r\n $http.put(\"/api/forms/code\", { csharpCode: vm.code }).success(function(compileResult) {\r\n // Set up the resulting form description to render it\r\n vm.compileResult = compileResult;\r\n }); \r\n };\r\n \r\n // Saves a dto into the local browser storage\r\n vm.saveLocalDto = function() {\r\n localStorage.setItem(localDtoStorageKeyPrefix + vm.dtoName, vm.code);\r\n loadLocalDtoNames();\r\n };\r\n \r\n // Loads a dto into the editor from the local browser storage\r\n vm.loadLocalDto = function(key) {\r\n vm.code = localStorage.getItem(localDtoStorageKeyPrefix + key);\r\n vm.selectedExample = null;\r\n vm.dtoName = key;\r\n };\r\n \r\n // Deletes a dto form the local browser storage\r\n vm.deleteLocalDto = function(key) {\r\n localStorage.removeItem(localDtoStorageKeyPrefix + key);\r\n loadLocalDtoNames();\r\n };\r\n \r\n // Load all locally saved dto names\r\n function loadLocalDtoNames() {\r\n vm.localDtoNames = new Array();\r\n for(var key in localStorage) {\r\n // All items with the key prefix belog to us\r\n if(key.substring(0, localDtoStorageKeyPrefix.length) === localDtoStorageKeyPrefix){\r\n vm.localDtoNames.push(key.substring(localDtoStorageKeyPrefix.length, key.length));\r\n }\r\n }\r\n }\r\n \r\n }]);\r\n\r\n})();","(function () {\r\n \"use strict\";\r\n\r\n angular.module(\"fancy.schema-form-builder-studio\")\r\n .config([\"$stateProvider\", function ($stateProvider) {\r\n\r\n $stateProvider\r\n .state(\"live-editor\", {\r\n parent: \"root\",\r\n url: \"/live-editor\",\r\n controller: \"LiveEditorController\",\r\n controllerAs: \"vm\",\r\n templateUrl: \"/app/components/live-editor/live-editor.tpl.html\"\r\n });\r\n\r\n }]);\r\n\r\n})();"],"sourceRoot":"/source/"}