fix(app): remove immutable from the project, use basic arrays instead

This commit is contained in:
tibing 2017-09-06 16:18:17 +03:00
parent f7b26d8c26
commit d33dbb6029
5 changed files with 198 additions and 170 deletions

5
package-lock.json generated
View file

@ -4225,11 +4225,6 @@
"xmldom": "0.1.27" "xmldom": "0.1.27"
} }
}, },
"immutable": {
"version": "3.8.1",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.1.tgz",
"integrity": "sha1-IAgH8Rqw9ycQ6khVQt4IgHX2jNI="
},
"imurmurhash": { "imurmurhash": {
"version": "0.1.4", "version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",

View file

@ -47,7 +47,6 @@
"d3": "4.8.0", "d3": "4.8.0",
"echarts": "3.5.4", "echarts": "3.5.4",
"font-awesome": "4.7.0", "font-awesome": "4.7.0",
"immutable": "3.8.1",
"intl": "1.2.5", "intl": "1.2.5",
"ionicons": "2.0.1", "ionicons": "2.0.1",
"leaflet": "1.0.3", "leaflet": "1.0.3",

View file

@ -1,5 +1,4 @@
import { Component, Input, OnDestroy } from '@angular/core'; import { Component, OnDestroy } from '@angular/core';
import { List } from 'immutable';
import { NbMenuItem } from '@nebular/theme'; import { NbMenuItem } from '@nebular/theme';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs/Subscription';
@ -55,49 +54,47 @@ import { StateService } from '../../../@core/data/state.service';
}) })
export class SampleLayoutComponent implements OnDestroy { export class SampleLayoutComponent implements OnDestroy {
subMenu: List<NbMenuItem> = List( subMenu: NbMenuItem[] = [
[ {
{ title: 'PAGE LEVEL MENU',
title: 'PAGE LEVEL MENU', group: true,
group: true, },
}, {
{ title: 'Buttons',
title: 'Buttons', icon: 'ion ion-android-radio-button-off',
icon: 'ion ion-android-radio-button-off', link: '/pages/ui-features/buttons',
link: '/pages/ui-features/buttons', },
}, {
{ title: 'Grid',
title: 'Grid', icon: 'ion ion-android-radio-button-off',
icon: 'ion ion-android-radio-button-off', link: '/pages/ui-features/grid',
link: '/pages/ui-features/grid', },
}, {
{ title: 'Icons',
title: 'Icons', icon: 'ion ion-android-radio-button-off',
icon: 'ion ion-android-radio-button-off', link: '/pages/ui-features/icons',
link: '/pages/ui-features/icons', },
}, {
{ title: 'Modals',
title: 'Modals', icon: 'ion ion-android-radio-button-off',
icon: 'ion ion-android-radio-button-off', link: '/pages/ui-features/modals',
link: '/pages/ui-features/modals', },
}, {
{ title: 'Typography',
title: 'Typography', icon: 'ion ion-android-radio-button-off',
icon: 'ion ion-android-radio-button-off', link: '/pages/ui-features/typography',
link: '/pages/ui-features/typography', },
}, {
{ title: 'Animated Searches',
title: 'Animated Searches', icon: 'ion ion-android-radio-button-off',
icon: 'ion ion-android-radio-button-off', link: '/pages/ui-features/search-fields',
link: '/pages/ui-features/search-fields', },
}, {
{ title: 'Tabs',
title: 'Tabs', icon: 'ion ion-android-radio-button-off',
icon: 'ion ion-android-radio-button-off', link: '/pages/ui-features/tabs',
link: '/pages/ui-features/tabs', },
}, ];
],
);
layout: any = {}; layout: any = {};
sidebar: any = {}; sidebar: any = {};

View file

@ -1,118 +1,158 @@
import { NbMenuItem } from '@nebular/theme'; import { NbMenuItem } from '@nebular/theme';
import { List } from 'immutable'; export const MENU_ITEMS: NbMenuItem[] = [
{
export const MENU_ITEMS: List<NbMenuItem> = List([{ title: 'Dashboard',
title: 'Dashboard', icon: 'nb-home',
icon: 'nb-home', link: '/pages/dashboard',
link: '/pages/dashboard', home: true,
home: true, },
}, { {
title: 'FEATURES', title: 'FEATURES',
group: true, group: true,
}, { },
title: 'UI Features', {
icon: 'nb-keypad', title: 'UI Features',
link: '/pages/ui-features', icon: 'nb-keypad',
children: List<NbMenuItem>([{ link: '/pages/ui-features',
title: 'Buttons', children: [
link: '/pages/ui-features/buttons', {
}, { title: 'Buttons',
title: 'Grid', link: '/pages/ui-features/buttons',
link: '/pages/ui-features/grid', },
}, { {
title: 'Icons', title: 'Grid',
link: '/pages/ui-features/icons', link: '/pages/ui-features/grid',
}, { },
title: 'Modals', {
link: '/pages/ui-features/modals', title: 'Icons',
}, { link: '/pages/ui-features/icons',
title: 'Typography', },
link: '/pages/ui-features/typography', {
}, { title: 'Modals',
title: 'Animated Searches', link: '/pages/ui-features/modals',
link: '/pages/ui-features/search-fields', },
}, { {
title: 'Tabs', title: 'Typography',
link: '/pages/ui-features/tabs', link: '/pages/ui-features/typography',
}]), },
}, { {
title: 'Forms', title: 'Animated Searches',
icon: 'nb-compose', link: '/pages/ui-features/search-fields',
children: List<NbMenuItem>([{ },
title: 'Form Inputs', {
link: '/pages/forms/inputs', title: 'Tabs',
}, { link: '/pages/ui-features/tabs',
title: 'Form Layouts', },
link: '/pages/forms/layouts', ],
}]), },
}, { {
title: 'Components', title: 'Forms',
icon: 'nb-gear', icon: 'nb-compose',
children: List<NbMenuItem>([{ children: [
title: 'Tree', {
link: '/pages/components/tree', title: 'Form Inputs',
}, { link: '/pages/forms/inputs',
title: 'Notifications', },
link: '/pages/components/notifications', {
}]), title: 'Form Layouts',
}, { link: '/pages/forms/layouts',
title: 'Maps', },
icon: 'nb-location', ],
children: List<NbMenuItem>([{ },
title: 'Google Maps', {
link: '/pages/maps/gmaps', title: 'Components',
}, { icon: 'nb-gear',
title: 'Leaflet Maps', children: [
link: '/pages/maps/leaflet', {
}, { title: 'Tree',
title: 'Bubble Maps', link: '/pages/components/tree',
link: '/pages/maps/bubble', }, {
}]), title: 'Notifications',
}, { link: '/pages/components/notifications',
title: 'Charts', },
icon: 'nb-bar-chart', ],
children: List<NbMenuItem>([{ },
title: 'Echarts', {
link: '/pages/charts/echarts', title: 'Maps',
}, { icon: 'nb-location',
title: 'Charts.js', children: [
link: '/pages/charts/chartjs', {
}, { title: 'Google Maps',
title: 'D3', link: '/pages/maps/gmaps',
link: '/pages/charts/d3', },
}]), {
}, { title: 'Leaflet Maps',
title: 'Editors', link: '/pages/maps/leaflet',
icon: 'nb-title', },
children: List<NbMenuItem>([{ {
title: 'TinyMCE', title: 'Bubble Maps',
link: '/pages/editors/tinymce', link: '/pages/maps/bubble',
}, { },
title: 'CKEditor', ],
link: '/pages/editors/ckeditor', },
}]), {
}, { title: 'Charts',
title: 'Tables', icon: 'nb-bar-chart',
icon: 'nb-tables', children: [
children: List<NbMenuItem>([{ {
title: 'Smart Table', title: 'Echarts',
link: '/pages/tables/smart-table', link: '/pages/charts/echarts',
}]), },
}, { {
title: 'Auth', title: 'Charts.js',
icon: 'nb-locked', link: '/pages/charts/chartjs',
children: List<NbMenuItem>([{ },
title: 'Login', {
link: '/auth/login', title: 'D3',
}, { link: '/pages/charts/d3',
title: 'Register', },
link: '/auth/register', ],
}, { },
title: 'Request Password', {
link: '/auth/request-password', title: 'Editors',
}, { icon: 'nb-title',
title: 'Reset Password', children: [
link: '/auth/reset-password', {
}]), title: 'TinyMCE',
}]); link: '/pages/editors/tinymce',
},
{
title: 'CKEditor',
link: '/pages/editors/ckeditor',
},
],
},
{
title: 'Tables',
icon: 'nb-tables',
children: [
{
title: 'Smart Table',
link: '/pages/tables/smart-table',
},
],
},
{
title: 'Auth',
icon: 'nb-locked',
children: [
{
title: 'Login',
link: '/auth/login',
},
{
title: 'Register',
link: '/auth/register',
},
{
title: 'Request Password',
link: '/auth/request-password',
},
{
title: 'Reset Password',
link: '/auth/reset-password',
},
],
},
];

View file

@ -11,9 +11,6 @@
], ],
"@nebular/*": [ "@nebular/*": [
"../node_modules/@nebular/*" "../node_modules/@nebular/*"
],
"immutable/*": [
"../node_modules/immutable/*"
] ]
} }
}, },