aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/ng1.module.ts
blob: 4aba999eed66d8bce60a55e1bad121e1aed10772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import { downgradeComponent, downgradeInjectable } from "@angular/upgrade/static";
import * as Components from './components';
import * as Services from './services';
declare const angular: any;

let SdcUiComponentsNg1Module = null;

if (typeof angular !== "undefined") {

    SdcUiComponentsNg1Module = angular.module('SdcUiComponentsNg1', []);

    // // Form Elements
    SdcUiComponentsNg1Module.directive('sdcInput', downgradeComponent({
        component: Components.InputComponent,
        inputs: ['label', 'value', 'pattern', 'disabled', 'placeHolder', 'required', 'minLength', 'maxLength', 'debounceTime'],
        outputs: ['valueChange']
    }));
    SdcUiComponentsNg1Module.directive('sdcDropdown', downgradeComponent({
        component: Components.DropDownComponent,
        inputs: ['label', 'options', 'disabled', 'placeHolder', 'required', 'validate', 'headless', 'maxHeight', 'selectedOption'],
        outputs: ['changeEmitter']
    }));
    SdcUiComponentsNg1Module.directive('sdcCheckbox', downgradeComponent({
        component: Components.CheckboxComponent,
        inputs: ['label', 'checked', 'disabled'],
        outputs: ['checkedChange']
    }));
    SdcUiComponentsNg1Module.directive('sdcRadioGroup', downgradeComponent({
        component: Components.RadioGroupComponent,
        inputs: ['legend', 'options', 'disabled', 'value', 'direction'],
        outputs: ['valueChange']
    }));

    // Buttons
    SdcUiComponentsNg1Module.directive('sdcButton', downgradeComponent({
        component: Components.ButtonComponent,
        inputs: ['text', 'disabled', 'type', 'size', 'preventDoubleClick', 'icon_name', 'icon_positon']
    }));

    // Modals
    SdcUiComponentsNg1Module.service('SdcModalService', downgradeInjectable(Services.ModalService));
    SdcUiComponentsNg1Module.directive('sdcModal', downgradeComponent({
        component: Components.ModalComponent,
        inputs: ['size', 'title', 'message', 'buttons', 'type'],
        outputs: ['closeAnimationComplete']
    }));
    SdcUiComponentsNg1Module.directive('sdcModalButton', downgradeComponent({
        component: Components.ModalButtonComponent,
        inputs: ['callback', 'closeModal']
    }));

    // Notifications
    SdcUiComponentsNg1Module.service('SdcNotificationService', downgradeInjectable(Services.NotificationsService));
    SdcUiComponentsNg1Module.directive('sdcNotificationContainer', downgradeComponent({
        component: Components.NotificationContainerComponent
    }));
    SdcUiComponentsNg1Module.directive('sdcNotification', downgradeComponent({
        component: Components.NotificationComponent,
        inputs: ['notificationSetting'],
        outputs: ['destroyComponent']
    }));

    // Popup Menu
    SdcUiComponentsNg1Module.directive('popupMenuList', downgradeComponent({
        component: Components.PopupMenuListComponent,
        inputs: ['open', 'position', 'className', 'relative'],
        outputs: ['openChange', 'positionChange']
    }));
    SdcUiComponentsNg1Module.directive('popupMenuItem', downgradeComponent({
        component: Components.PopupMenuItemComponent,
        inputs: ['className', 'type'],
        outputs: ['action']
    }));

    // Tiles
    SdcUiComponentsNg1Module.directive('sdcTile', downgradeComponent({
        component: Components.TileComponent
    }));
    SdcUiComponentsNg1Module.directive('sdcTileHeader', downgradeComponent({
        component: Components.TileHeaderComponent
    }));
    SdcUiComponentsNg1Module.directive('sdcTileContent', downgradeComponent({
        component: Components.TileContentComponent
    }));
    SdcUiComponentsNg1Module.directive('sdcTileFooter', downgradeComponent({
        component: Components.TileFooterComponent
    }));

    // Check List
    SdcUiComponentsNg1Module.directive('sdcChecklist', downgradeComponent({
        component: Components.ChecklistComponent,
        inputs: ['checklistModel'],
        outputs: ['checkedChange']
    }));

    // Tag Cloud
    SdcUiComponentsNg1Module.directive('sdcTagCloud', downgradeComponent({
        component: Components.TagCloudComponent,
        inputs: ['list', 'isViewOnly', 'isUniqueList', 'uniqueErrorMessage', 'label', 'placeholder'],
        outputs: ['listChanged']
    }));
    SdcUiComponentsNg1Module.directive('sdcTagItem', downgradeComponent({
        component: Components.TagItemComponent,
        inputs: ['text', 'isViewOnly', 'index'],
        outputs: ['clickOnDelete']
    }));

    // Tabs
    SdcUiComponentsNg1Module.directive('sdcTabs', downgradeComponent({
        component: Components.TabsComponent
    }));
    SdcUiComponentsNg1Module.directive('sdcTab', downgradeComponent({
        component: Components.TabComponent,
        inputs: ['title', 'active']
    }));

    // Svg Icons
    SdcUiComponentsNg1Module.directive('svgIcon', downgradeComponent({
        component: Components.SvgIconComponent,
        inputs: ['name', 'mode', 'size', 'disabled', 'clickable', 'className']
    }));
    SdcUiComponentsNg1Module.directive('svgIconLabel', downgradeComponent({
        component: Components.SvgIconLabelComponent,
        inputs: ['name', 'mode', 'size', 'disabled', 'clickable', 'className', 'label', 'labelPlacement', 'labelClassName']
    }));

    // Accordion
    SdcUiComponentsNg1Module.directive('sdcAccordion', downgradeComponent({
        component: Components.AccordionComponent,
        inputs: ['arrow-direction', 'css-class', 'title', 'open'],
        outputs: ['accordionChanged']
    }));

    // Multiline Ellipsis
    SdcUiComponentsNg1Module.directive('multilineEllipsis', downgradeComponent({
        component: Components.MultilineEllipsisComponent,
        inputs: ['lines', 'line-height', 'className'],
        outputs: ['hasEllipsisChanged']
    }));
}

export { SdcUiComponentsNg1Module };