This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
MauNgSelect.cs
156 lines (110 loc) · 4.84 KB
/
MauNgSelect.cs
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
using System.Collections.Generic;
using MAU.Attributes;
using MAU.Core;
using MAU.Helper.Types;
using static MAU.Attributes.MauMethod;
using static MAU.Attributes.MauProperty;
using static MAU.Events.MauEventHandlers;
namespace MAU.ReadyComponents.Angular
{
// Todo: Make MauValues
/*
public class NgSelectNgOption
{
[MauProperty("disabled", MauPropertyType.ComponentProperty)]
public bool Disabled { get; set; }
[MauProperty("htmlId", MauPropertyType.ComponentProperty)]
public string HtmlId { get; set; }
[MauProperty("index", MauPropertyType.ComponentProperty)]
public int Index { get; set; }
[MauProperty("label", MauPropertyType.ComponentProperty)]
public string Label { get; set; }
[MauProperty("marked", MauPropertyType.ComponentProperty)]
public bool Marked { get; set; }
[MauProperty("selected", MauPropertyType.ComponentProperty)]
public bool Selected { get; set; }
[MauProperty("value", MauPropertyType.ComponentProperty)]
public string Value { get; set; }
}
public class NgSelectItemsList
{
[MauProperty("_items", MauPropertyType.ComponentProperty)]
public List<NgSelectNgOption> Items { get; set; }
}
*/
public class MauNgSelect : MauComponent
{
#region [ Mau Events ]
[MauEvent("addEvent")]
public event MauEventHandlerAsync OnAdd;
[MauEvent("blurEvent")]
public event MauEventHandlerAsync OnBlur;
[MauEvent("changeEvent")]
public event MauEventHandlerAsync OnChange;
[MauEvent("closeEvent")]
public event MauEventHandlerAsync OnClose;
[MauEvent("clearEvent")]
public event MauEventHandlerAsync OnClear;
[MauEvent("focusEvent")]
public event MauEventHandlerAsync OnFocus;
[MauEvent("searchEvent")]
public event MauEventHandlerAsync OnSearch;
[MauEvent("openEvent")]
public event MauEventHandlerAsync OnOpen;
[MauEvent("removeEvent")]
public event MauEventHandlerAsync OnRemove;
[MauEvent("scroll")]
public event MauEventHandlerAsync OnScroll;
[MauEvent("scrollToEnd")]
public event MauEventHandlerAsync OnScrollToEnd;
#endregion
#region [ Mau Variable ]
[MauVariable("Options")]
public MauDataList<string> Options { get; set; }
#endregion
#region [ Mau Properties ]
[MauProperty("readonly", MauPropertyType.ComponentProperty)]
public bool Readonly { get; set; }
/*[MauProperty("itemsList", MauPropertyType.ComponentProperty)]
public NgSelectItemsList ItemsList { get; set; }*/
[MauProperty("selectedValues", MauPropertyType.ComponentProperty)]
public List<string> SelectedValues { get; set; }
[MauProperty("appearance", MauPropertyType.ComponentProperty)]
public string Appearance { get; set; }
[MauProperty("appendTo", MauPropertyType.ComponentProperty)]
public string AppendTo { get; set; }
[MauProperty("bindValue", MauPropertyType.ComponentProperty)]
public string BindValue { get; set; }
[MauProperty("bindLabel", MauPropertyType.ComponentProperty)]
public string BindLabel { get; set; }
[MauProperty("closeOnSelect", MauPropertyType.ComponentProperty)]
public bool CloseOnSelect { get; set; }
[MauProperty("clearAllText", MauPropertyType.ComponentProperty)]
public string ClearAllText { get; set; }
[MauProperty("focused", MauPropertyType.ComponentProperty)]
public bool Focused { get; set; }
[MauProperty("clearable", MauPropertyType.ComponentProperty)]
public bool Clearable { get; set; }
[MauProperty("clearOnBackspace", MauPropertyType.ComponentProperty)]
public bool ClearOnBackspace { get; set; }
[MauProperty("notFoundText", MauPropertyType.ComponentProperty)]
public string NotFoundText { get; set; }
#endregion
#region [ Mau Methods ]
[MauMethod("close", MauMethodType.ComponentMethod, MauMethodCallType.ExecuteInAngular)]
public void Close() { }
[MauMethod("focus", MauMethodType.ComponentMethod, MauMethodCallType.ExecuteInAngular)]
public void Focus() { }
[MauMethod("open", MauMethodType.ComponentMethod, MauMethodCallType.ExecuteInAngular)]
public void Open() { }
[MauMethod("blur", MauMethodType.ComponentMethod, MauMethodCallType.ExecuteInAngular)]
public void Blur() { }
[MauMethod("select", MauMethodType.ComponentMethod, MauMethodCallType.ExecuteInAngular)]
public void Select(bool state) { }
#endregion
public MauNgSelect(string mauId) : base(mauId)
{
Options = new MauDataList<string>(this, nameof(Options));
}
}
}