/**
 * Created with index.js
 * @Description:
 * @Author: maxsmu
 * @Date: 2016-02-29 5:24 PM
 */
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import utils from '../../common/utils';
import $menus from './MenuService';

import './_menu.scss';
import menuBarTemplate from './menus.tpl.html';
import MenusCtrl from './MenusCtrl';

import menuNodeTemplate from './menus-node.tpl.html';
import MenusNodeCtrl from './MenusNodeCtrl';

import './_shop-selector.scss';
import shopSelectTemplate from './shop-selects.tpl.html';
import ShopSelectsCtrl from './ShopSelectsCtrl';

const
	menusBarDDO = {
		template: menuBarTemplate,
		controller: MenusCtrl,
		controllerAs: 'menus',
		bindings: {
			unfold: '=',
			onUnfold: '=',
			menuSource: '<?',
			shopSource: '<?',
			searchPlaceholder: '='
		}
	},
	menusNodeDDO = {
		template: menuNodeTemplate,
		controller: MenusNodeCtrl,
		controllerAs: 'childNode',
		bindings: {
			list: '=',
			toggle: '=',
			level: '='
		}
	},
	shopSelectDDO = {
		template: shopSelectTemplate,
		controller: ShopSelectsCtrl,
		controllerAs: 'shops',
		bindings: {
			shopSource: '<?',
			shopInfo: '=',
			retract: '<?',
			onRetract: '&?',
			isInit: '<?',
			placeholder: '<?'
		}
	};

export default angular
	.module('ccms.components.menus', [uiRouter, utils])
	.component('ccMenuBar', menusBarDDO)
	.deprecatedComponent('menuBar', menusBarDDO)
	.component('ccMenuNode', menusNodeDDO)
	.deprecatedComponent('menuNode', menusNodeDDO)
	.component('ccShopSelect', shopSelectDDO)
	.deprecatedComponent('shopSelect', shopSelectDDO)
	.value('$ccMenus', $menus)
	.deprecatedValue('$menus', $menus, '$menus 服务将在8.30之后废弃,请尽早使用 $ccGrid 服务代替!')
	.name;

@@ -1353,339 +1353,115 @@
 )%0A%09.
-deprecatedComponent('menuBar', menusBarDDO)%0A%09.component('ccMenuNode', menusNodeDDO)%0A%09.deprecatedComponent('menuNode', menusNodeDDO)%0A%09.component('ccShopSelect', shopSelectDDO)%0A%09.deprecatedComponent('shopSelect', shopSelectDDO)%0A%09.value('$ccMenus', $menus)%0A%09.deprecatedValue('$menus', $menus, '$menus %E6%9C%8D%E5%8A%A1%E5%B0%86%E5%9C%A88.30%E4%B9%8B%E5%90%8E%E5%BA%9F%E5%BC%83,%E8%AF%B7%E5%B0%BD%E6%97%A9%E4%BD%BF%E7%94%A8 $ccGrid %E6%9C%8D%E5%8A%A1%E4%BB%A3%E6%9B%BF!'
+component('ccMenuNode', menusNodeDDO)%0A%09.component('ccShopSelect', shopSelectDDO)%0A%09.value('$ccMenus', $menus
 )%0A%09.

删除兼容代码 (#223)