Commit f4d1f2e Valerio Como
committed
1 parent 9935cc1 commit f4d1f2e Copy full SHA for f4d1f2e
File tree 2 files changed +100
-0
lines changed
components/kup-input-panel
2 files changed +100
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ const data = {
30
30
title : 'Campionato vinto' ,
31
31
visible : true ,
32
32
} ,
33
+ {
34
+ name : 'BUT' ,
35
+ title : 'Buttons list' ,
36
+ visible : true ,
37
+ } ,
33
38
] ,
34
39
rows : [
35
40
{
@@ -110,6 +115,64 @@ const data = {
110
115
mandatory : true ,
111
116
// shape: 'CHK',
112
117
} ,
118
+ BUT : {
119
+ cssClass : 'strong-text' ,
120
+ data : {
121
+ data : [
122
+ {
123
+ children : [
124
+ {
125
+ children : [ ] ,
126
+ disabled : false ,
127
+ expandable : false ,
128
+ icon : 'lightbulb-outline' ,
129
+ isExpanded : false ,
130
+ obj : {
131
+ k : '000050' ,
132
+ p : 'COD_VER' ,
133
+ t : 'VO' ,
134
+ } ,
135
+ options : false ,
136
+ value : 'Collaboratore' ,
137
+ } ,
138
+ {
139
+ children : [ ] ,
140
+ disabled : false ,
141
+ expandable : false ,
142
+ icon : 'briefcase' ,
143
+ isExpanded : false ,
144
+ obj : {
145
+ k : '000050' ,
146
+ p : 'COD_VER' ,
147
+ t : 'VO' ,
148
+ } ,
149
+ options : false ,
150
+ value : 'Azienda' ,
151
+ } ,
152
+ ] ,
153
+ data : {
154
+ dropdownOnly : true ,
155
+ } ,
156
+ disabled : false ,
157
+ expandable : false ,
158
+ isExpanded : false ,
159
+ options : false ,
160
+ } ,
161
+ ] ,
162
+ customStyle :
163
+ ' #kup-component button { padding: 0; font-size: 0.65em; } ' ,
164
+ icon : 'settings' ,
165
+ className : 'kup-slim' ,
166
+ } ,
167
+ editable : true ,
168
+ obj : {
169
+ k : '000050' ,
170
+ p : 'COD_VER' ,
171
+ t : 'VO' ,
172
+ } ,
173
+ shape : 'BTN' ,
174
+ value : '' ,
175
+ } ,
113
176
} ,
114
177
} ,
115
178
] ,
Original file line number Diff line number Diff line change @@ -197,13 +197,50 @@ export class KupInputPanel {
197
197
[ FCellTypes . COLOR_PICKER , this . #CLPAdapter] ,
198
198
[ FCellTypes . COMBOBOX , this . #CMBandACPAdapter] ,
199
199
[ FCellTypes . STRING , this . #ITXAdapter] ,
200
+ [ FCellTypes . BUTTON_LIST , this . #BTNAdapter] ,
200
201
] ) ;
201
202
202
203
const adapter = dataAdapterMap . get ( cellType ) ;
204
+ console . log ( cellType , cell . shape , adapter === null ) ;
203
205
204
206
return adapter ? adapter ( options , fieldLabel , currentValue ) : null ;
205
207
}
206
208
209
+ #BTNAdapter(
210
+ _options : {
211
+ id : string ;
212
+ label : string ;
213
+ } [ ] ,
214
+ _fieldLabel : string ,
215
+ _currentValue : string
216
+ ) {
217
+ //TODO: come gestire i button list dal protocollo?
218
+ return {
219
+ data : [
220
+ {
221
+ // children: [
222
+ // {
223
+ // children: [],
224
+ // disabled: false,
225
+ // expandable: false,
226
+ // icon: 'lightbulb-outline',
227
+ // isExpanded: false,
228
+ // obj: {
229
+ // k: '000050',
230
+ // p: 'COD_VER',
231
+ // t: 'VO',
232
+ // },
233
+ // options: false,
234
+ // value: 'Collaboratore',
235
+ // },
236
+ // ],
237
+ data : { dropdownOnly : false , label : 'Pier' } ,
238
+ } ,
239
+ { data : { dropdownOnly : false , label : 'Valerio' } } ,
240
+ ] ,
241
+ } ;
242
+ }
243
+
207
244
#CMBandACPAdapter(
208
245
options : {
209
246
id : string ;
You can’t perform that action at this time.
0 commit comments