blob: 4039a7683aaf1236904380c726b5210d7df86bdc [file] [log] [blame]
Michael Landodd603392017-07-12 00:54:52 +03001/*-
2 * ============LICENSE_START=======================================================
3 * SDC
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20
Michael Landoed64b5e2017-06-09 03:19:04 +030021import {ClickedOutsideDirective} from "../directives/clicked-outside/clicked-outside-directive";
22import {LoaderDirective} from "../directives/loader/loader-directive";
23import {UserHeaderDetailsDirective} from "../directives/user-header-details/user-header-details-directive";
24import {FileTypeDirective} from "../directives/file-type/file-type";
25import {DownloadArtifactDirective} from "../directives/download-artifact/download-artifact";
26import {EllipsisDirective} from "../directives/ellipsis/ellipsis-directive";
27import {InvalidCharactersDirective} from "../directives/invalid-characters/invalid-characters";
28import {ExpandCollapseDirective} from "../directives/utils/expand-collapse/expand-collapse";
29import {PerfectScrollerDirective} from "../directives/perfect-scrollbar/angular-perfect-scrollbar";
30import {SdcModalDirective} from "../directives/modal/sdc-modal";
31import {FileOpenerDirective} from "../directives/file-opener/file-opener";
32import {FileUploadDirective} from "../directives/file-upload/file-upload";
33import {StructureTreeDirective} from "../directives/structure-tree/structure-tree-directive";
34import {SmartTooltipDirective} from "../directives/utils/smart-tooltip/smart-tooltip";
35import {PrintGraphScreenDirective} from "../directives/print-graph-screen/print-graph-screen";
36import {TagDirective} from "../directives/tag/tag-directive";
37import {SdcTagsDirective} from "../directives/utils/sdc-tags/sdc-tags";
38import {SdcKeyboardEventsDirective} from "../directives/utils/sdc-keyboard-events/sdc-keyboard-events";
39import {ExpandCollapseMenuBoxDirective} from "../directives/utils/expand-collapse-menu-box/expand-collaps-menu-box";
40import {PunchOutDirective} from "../directives/punch-out/punch-out";
41import {CustomValidationDirective} from "../directives/custom-validation/custom-validation";
42import {EcompHeaderDirective} from "../directives/ecomp-header/ecomp-header";
Michael Landoed64b5e2017-06-09 03:19:04 +030043import {EditNamePopoverDirective} from "../directives/edit-name-popover/edit-name-popover-directive";
44import {DataTypeFieldsStructureDirective} from "../directives/property-types/data-type-fields-structure/data-type-fields-structure";
45import {TypeMapDirective} from "../directives/property-types/type-map/type-map-directive";
46import {TypeListDirective} from "../directives/property-types/type-list/type-list-directive";
47import {SelectDataTypeFieldsStructureDirective} from "../directives/select-property-types/select-data-type-fields-structure/select-data-type-fields-structure";
48import {SelectTypeMapDirective} from "../directives/select-property-types/select-type-map/select-type-map-directive";
49import {SelectTypeListDirective} from "../directives/select-property-types/select-type-list/select-type-list-directive";
50import {ValidationOnLoadDirective} from "../directives/utils/validation-on-load/validation-on-load";
51import {InfoTooltipDirective} from "../directives/info-tooltip/info-tooltip";
52import {SdcTabsDirective} from "../directives/sdc-tabs/sdc-tabs-directive";
53import {SdcSingleTabDirective, InnerSdcSingleTabDirective} from "../directives/sdc-tabs/sdc-single-tab/sdc-single-tab-directive";
54import {ExpandCollapseListHeaderDirective} from "../directives/utils/expand-collapse-list-header/expand-collapse-list-header";
55import {JsonExportExcelDirective} from "../directives/export-json-to-excel/export-json-to-excel";
Michael Landoed64b5e2017-06-09 03:19:04 +030056import {TopProgressDirective} from "../directives/layout/top-progress/top-progress";
57import {CheckboxElementDirective} from "../directives/elements/checkbox/checkbox";
58import {RadiobuttonElementDirective} from "../directives/elements/radiobutton/radiobutton";
59import {OnLastRepeatDirective} from "../directives/events/on-last-repeat/on-last-repeat";
60import {InputRowDirective} from "../directives/inputs-and-properties/inputs/input-row-directive";
61import {PropertyRowDirective} from "../directives/inputs-and-properties/properties/property-row-directive";
62import {NodesFactory} from "../models/graph/nodes/nodes-factory";
63import {LinksFactory} from "../models/graph/graph-links/links-factory";
64import {ImageCreatorService} from "../directives/graphs-v2/image-creator/image-creator.service";
65import {Palette} from "../directives/graphs-v2/palette/palette.directive";
66import {CompositionGraph} from "../directives/graphs-v2/composition-graph/composition-graph.directive";
67import {RelationMenuDirective} from "../directives/graphs-v2/relation-menu/relation-menu";
68import {DeploymentGraph} from "../directives/graphs-v2/deployment-graph/deployment-graph.directive";
69import {CommonGraphUtils} from "../directives/graphs-v2/common/common-graph-utils";
70import {CompositionGraphNodesUtils} from "../directives/graphs-v2/composition-graph/utils/composition-graph-nodes-utils";
71import {CompositionGraphGeneralUtils} from "../directives/graphs-v2/composition-graph/utils/composition-graph-general-utils";
72import {CompositionGraphLinkUtils} from "../directives/graphs-v2/composition-graph/utils/composition-graph-links-utils";
73import {DeploymentGraphGeneralUtils} from "../directives/graphs-v2/deployment-graph/deployment-utils/deployment-graph-general-utils";
74import {CompositionGraphPaletteUtils} from "../directives/graphs-v2/composition-graph/utils/composition-graph-palette-utils";
75import {MatchCapabilitiesRequirementsUtils} from "../directives/graphs-v2/composition-graph/utils/match-capability-requierment-utils";
76import {AssetPopoverDirective} from "../directives/graphs-v2/asset-popover/asset-popover";
77import {downgradeComponent} from "@angular/upgrade/static";
78import {CapabilitiesListDirective} from "../directives/capabilities-and-requirements/capability/capabilities-list-directive";
79import {RequirementsListDirective} from "../directives/capabilities-and-requirements/requirement/requirements-list-directive";
80
81let moduleName:string = 'Sdc.Directives';
82let directiveModule:ng.IModule = angular.module(moduleName, []);
83
84directiveModule.directive('clickedOutside', ClickedOutsideDirective.factory);
85directiveModule.directive('loader', LoaderDirective.factory);
86directiveModule.directive('userHeaderDetails', UserHeaderDetailsDirective.factory);
87directiveModule.directive('ellipsis', EllipsisDirective.factory);
88directiveModule.directive('downloadArtifact', DownloadArtifactDirective.factory);
89directiveModule.directive('fileType', FileTypeDirective.factory);
90directiveModule.directive('invalidCharacters', InvalidCharactersDirective.factory);
91directiveModule.directive('perfectScrollbar', PerfectScrollerDirective.factory);
92directiveModule.directive('expandCollapse', ExpandCollapseDirective.factory);
93directiveModule.directive('sdcModal', SdcModalDirective.factory);
94directiveModule.directive('fileOpener', FileOpenerDirective.factory);
95directiveModule.directive('fileUpload', FileUploadDirective.factory);
96directiveModule.directive('structureTree', StructureTreeDirective.factory);
97directiveModule.directive('sdcSmartTooltip', SmartTooltipDirective.factory);
98directiveModule.directive('printGraphScreen', PrintGraphScreenDirective.factory);
99directiveModule.directive('sdcTag', TagDirective.factory);
100directiveModule.directive('sdcTags', SdcTagsDirective.factory);
101directiveModule.directive('sdcKeyboardEvents', SdcKeyboardEventsDirective.factory);
102directiveModule.directive('expandCollapseMenuBox', ExpandCollapseMenuBoxDirective.factory);
103directiveModule.directive('punchOut', PunchOutDirective.factory);
104directiveModule.directive('customValidation', CustomValidationDirective.factory);
105directiveModule.directive('ecompHeader', EcompHeaderDirective.factory);
Michael Landoed64b5e2017-06-09 03:19:04 +0300106directiveModule.directive('editNamePopover', EditNamePopoverDirective.factory);
107directiveModule.directive('fieldsStructure', DataTypeFieldsStructureDirective.factory);
108directiveModule.directive('typeMap', TypeMapDirective.factory);
109directiveModule.directive('typeList', TypeListDirective.factory);
110directiveModule.directive('selectFieldsStructure', SelectDataTypeFieldsStructureDirective.factory);
111directiveModule.directive('selectTypeMap', SelectTypeMapDirective.factory);
112directiveModule.directive('selectTypeList', SelectTypeListDirective.factory);
113directiveModule.directive('infoTooltip', InfoTooltipDirective.factory);
114directiveModule.directive('validationOnLoad', ValidationOnLoadDirective.factory);
115directiveModule.directive('sdcTabs', SdcTabsDirective.factory);
116directiveModule.directive('sdcSingleTab', SdcSingleTabDirective.factory);
117directiveModule.directive('innerSdcSingleTab', InnerSdcSingleTabDirective.factory);
118directiveModule.directive('jsonExportExcel', JsonExportExcelDirective.factory);
119directiveModule.directive('expandCollapseListHeader', ExpandCollapseListHeaderDirective.factory);
120//
121// // Layouts
Michael Landoed64b5e2017-06-09 03:19:04 +0300122directiveModule.directive('topProgress', TopProgressDirective.factory);
123//
124// // Elements
125directiveModule.directive('sdcCheckbox', CheckboxElementDirective.factory);
126directiveModule.directive('sdcRadioButton', RadiobuttonElementDirective.factory);
127//
128// // Events
129directiveModule.directive('onLastRepeat', OnLastRepeatDirective.factory);
130//
131// //Inputs & Properties
132directiveModule.directive('inputRow', InputRowDirective.factory);
133directiveModule.directive('propertyRow', PropertyRowDirective.factory);
134//
135//
136// // ------------------------------------------- Composition & Deployment Graphs------------------------------------------//
137//
138// //Util service for Graph
139directiveModule.service('NodesFactory', NodesFactory);
140directiveModule.service('LinksFactory', LinksFactory);
141directiveModule.service('ImageCreatorService', ImageCreatorService);
142//
143// //composition
144directiveModule.directive('palette', Palette.factory);
145directiveModule.directive('compositionGraph', CompositionGraph.factory);
146directiveModule.directive('relationMenu', RelationMenuDirective.factory);
147 //directiveModule.directive('assetPopover', AssetPopoverDirective.factory);
148//
149// //deployment
150directiveModule.directive('deploymentGraph', DeploymentGraph.factory);
151//
152// //Graph Utils - Common
153directiveModule.service('CommonGraphUtils', CommonGraphUtils);
154//
155// //Composition Graph Utils
156directiveModule.service('CompositionGraphNodesUtils', CompositionGraphNodesUtils);
157directiveModule.service('CompositionGraphGeneralUtils', CompositionGraphGeneralUtils);
158directiveModule.service('CompositionGraphLinkUtils', CompositionGraphLinkUtils);
159directiveModule.service('CompositionGraphPaletteUtils', CompositionGraphPaletteUtils);
160directiveModule.service('MatchCapabilitiesRequirementsUtils', MatchCapabilitiesRequirementsUtils);
161//
162// //Deployment Graph Utils
163directiveModule.service('DeploymentGraphGeneralUtils', DeploymentGraphGeneralUtils);
164
165
166//Compoisiton right tab directives
167directiveModule.directive('capabilitiesList', CapabilitiesListDirective.factory);
168directiveModule.directive('requirementsList', RequirementsListDirective.factory);
Tal Gitelman51d50f02017-12-10 18:55:03 +0200169
170
171// *** NG2 Components (downgraded) *** //
172import {MenuListNg2Component} from "../ng2/components/downgrade-wrappers/menu-list-ng2/menu-list-ng2.component";
173import {TopNavComponent} from "../ng2/components/layout/top-nav/top-nav.component";
174
175directiveModule.directive('menuListNg2', downgradeComponent({
176 component: MenuListNg2Component,
177 inputs: ['props']
178}) as angular.IDirectiveFactory);
179directiveModule.directive('topNav', downgradeComponent({
180 component: TopNavComponent,
181 inputs: ['version', 'menuModel', 'topLvlSelectedIndex', 'hideSearch', 'searchTerm', 'notificationIconCallback'],
182 outputs: ['searchTermChange']
183}) as ng.IDirectiveFactory);