capibara 1.2.0 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app.js CHANGED
@@ -31,7 +31,7 @@
31
31
  }
32
32
  s.item.data.push(dataDay);
33
33
  }
34
- dataDay.message.value = "test saved";
34
+ //dataDay.message.value = "test saved";
35
35
  capibara.redraw({
36
36
  floatBox: true,
37
37
  });
package/config.js CHANGED
@@ -177,6 +177,27 @@ var config = {
177
177
  ],
178
178
  },
179
179
  inputs: [
180
+ {
181
+ label:"test custom",
182
+ type: "custom",
183
+ key:"custom_input_test",
184
+ render({
185
+ props,
186
+ dataDay,
187
+ daySelected,
188
+ selected
189
+ }){
190
+ let domElement = document.createElement("div");
191
+ domElement.classList.add("classname-test")
192
+ domElement.appendChild(document.createTextNode("test node"))
193
+ return domElement;
194
+ },
195
+ getValue({
196
+ elem, props
197
+ }){
198
+ return 5;
199
+ }
200
+ },
180
201
  {
181
202
  label: "Horas de Riego",
182
203
  type: "time",
@@ -199,7 +220,7 @@ var config = {
199
220
  {
200
221
  label: "test button",
201
222
  type: "button",
202
- key: "con_fertilizacion",
223
+ key: "test_btn",
203
224
  onClick(){
204
225
  alert("test button on click");
205
226
  }
@@ -345,6 +366,172 @@ var config = {
345
366
  key: "calicata",
346
367
  varName: "values.calicata",
347
368
  },
369
+ {
370
+ label:"inputList",
371
+ type:"inputList",
372
+ key:"inputListTest",
373
+ inputList:"inputListItems", // se obtiene desde data, para crear lista
374
+ valuesPath: "values.inputListValues",
375
+ toRight: true,
376
+
377
+ },
378
+ {
379
+ label: "inputBox",
380
+ type: "input-box",
381
+ key: "inputBoxTest",
382
+ varName: "values.inputBoxValues",
383
+ varNameInput: "valueBox",
384
+ tabs:[
385
+ {
386
+ key: "tab1",
387
+ name: "tab 1",
388
+ },
389
+ {
390
+ key: "tab2",
391
+ name: "tab 1",
392
+ }
393
+ ],
394
+ inputs:[
395
+ {
396
+ label: "header 1",
397
+ isTitle:true,
398
+ tooltip:"tooltip",
399
+ suffix: "suff",
400
+ preffix: "pref",
401
+ colorIcon:"red",
402
+ tabKey: "tab1",
403
+
404
+ },{
405
+ id: 1,
406
+ tooltip: "tooltip input",
407
+ colorIcon: "green",
408
+ link: "https://www.google.com",
409
+ tabKey: "tab1",
410
+ label: "input 1",
411
+ suffix: "suff",
412
+ preffix: "pref",
413
+ },
414
+ {
415
+ id: 2,
416
+ tooltip: "tooltip input",
417
+ colorIcon: "#FF0000",
418
+ link: "https://www.google.com",
419
+ tabKey: "tab1",
420
+ label: "input 1",
421
+ suffix: "suff",
422
+ preffix: "pref",
423
+ },
424
+ {
425
+ label: "header 2",
426
+ isTitle:true,
427
+ tooltip:"tooltip",
428
+ suffix: "suff",
429
+ preffix: "pref",
430
+ colorIcon:"red",
431
+ tabKey: "tab2",
432
+
433
+ },{
434
+ id: 3,
435
+ tooltip: "tooltip input",
436
+ colorIcon: "green",
437
+ link: "https://www.google.com",
438
+ tabKey: "tab2",
439
+ label: "input 3",
440
+ suffix: "suff",
441
+ preffix: "pref",
442
+ }
443
+ ]
444
+ },
445
+
446
+ {
447
+ label: "list",
448
+ type: "list",
449
+ key: "listTest",
450
+ varName: "values.listValues",
451
+ tabs:[
452
+ {
453
+ key: "tab1",
454
+ name: "tab 1",
455
+ },
456
+ {
457
+ key: "tab2",
458
+ name: "tab 1",
459
+ }
460
+ ],
461
+ inputs:[
462
+ {
463
+ label: "header 1",
464
+ isTitle:true,
465
+ tooltip:"tooltip",
466
+ suffix: "suff",
467
+ preffix: "pref",
468
+ colorIcon:"red",
469
+ tabKey: "tab1",
470
+
471
+ },{
472
+ id: 1,
473
+ tooltip: "tooltip input",
474
+ colorIcon: "green",
475
+ link: "https://www.google.com",
476
+ tabKey: "tab1",
477
+ label: "input 1",
478
+ suffix: "suff",
479
+ preffix: "pref",
480
+ },
481
+ {
482
+ id: 2,
483
+ tooltip: "tooltip input",
484
+ colorIcon: "#FF0000",
485
+ link: "https://www.google.com",
486
+ tabKey: "tab1",
487
+ label: "input 1",
488
+ suffix: "suff",
489
+ preffix: "pref",
490
+ },
491
+ {
492
+ label: "header 2",
493
+ isTitle:true,
494
+ tooltip:"tooltip",
495
+ suffix: "suff",
496
+ preffix: "pref",
497
+ colorIcon:"red",
498
+ tabKey: "tab2",
499
+
500
+ },{
501
+ id: 3,
502
+ tooltip: "tooltip input",
503
+ colorIcon: "green",
504
+ link: "https://www.google.com",
505
+ tabKey: "tab2",
506
+ label: "input 3",
507
+ suffix: "suff",
508
+ preffix: "pref",
509
+ }
510
+ ]
511
+ },
512
+
513
+
514
+
515
+ {
516
+ label: "data list test",
517
+ type: "data-list",
518
+ key: "dataListTest",
519
+ varName: "values.dataListValues",
520
+ varNameInput: "value",
521
+ varNameLabel: "label",
522
+ varNameValueText:"valueText",
523
+ varNameSubText: "subText",
524
+ varNameSuffix: "suffix",
525
+ varNameLink: "link",
526
+ varNameTooltip: "tooltip",
527
+ editButton: {
528
+ label: "Edit",
529
+ key: "edit_button",
530
+ onClick() {
531
+ alert("clickEdit")
532
+ },
533
+ },
534
+ }
348
535
  ],
349
536
  },
350
537
  {
package/data.js CHANGED
@@ -14,7 +14,7 @@
14
14
  "children":[
15
15
  {
16
16
  "id":1,
17
- isHidden: true,
17
+ //isHidden: true,
18
18
  "label":"Sector Demo con un nombre super largo de prueba test test",
19
19
  "type":"sector",
20
20
  "clickeable":true,
@@ -35,6 +35,9 @@
35
35
  "rep_hoy":18.64,
36
36
  "et_acum_mm":55,
37
37
  "limite_scholander":10,
38
+
39
+
40
+
38
41
  "estadosFenologicos":[
39
42
  {
40
43
  "id_estado":6026,
@@ -239,12 +242,95 @@
239
242
  "ks":1,
240
243
  "dtx_inf":0,
241
244
  "dtx_sup":null
242
- }
245
+ },
246
+
247
+ inputListVar:"inputListItems",
248
+ inputListItems:[
249
+ {
250
+ id: 1,
251
+ label:"input Row 1",
252
+ inputs:[
253
+ {
254
+ "label":"test",
255
+ varName: "value1"
256
+ },
257
+ {
258
+ "label":"test2",
259
+ varName: "value2"
260
+ },
261
+ {
262
+ "label":"test3",
263
+ varName: "value3"
264
+ },
265
+ ]
266
+ },
267
+
268
+ {
269
+ id: 2,
270
+ label:"input Row 2",
271
+ inputs:[
272
+ {
273
+ "label":"test",
274
+ varName: "value4"
275
+ },
276
+ {
277
+ "label":"test2",
278
+ varName: "value5"
279
+ },
280
+ {
281
+ "label":"test3",
282
+ varName: "value6"
283
+ },
284
+ ]
285
+ },
286
+
287
+ ],
288
+
289
+
243
290
  },
244
291
  "data":[
245
292
  {
246
293
  "date":"2020-11-27",
247
294
  "values":{
295
+
296
+ inputListValues:[
297
+ {
298
+ id: 1,
299
+ value1: 3
300
+ },
301
+ {
302
+ id: 2,
303
+ value4: 3
304
+ },
305
+ ],
306
+ inputBoxValues:[
307
+ {
308
+ id: 1,
309
+ valueBox: 1
310
+ },
311
+ {
312
+ id: 2,
313
+ valueBox: 2
314
+ },
315
+ {
316
+ id: 3,
317
+ valueBox: 3
318
+ }
319
+ ],
320
+
321
+ dataListValues:[
322
+ {
323
+ label: "test",
324
+ value: 2,
325
+ valueText:"value text",
326
+ suffix: "suff",
327
+ preffix: "pref",
328
+ link: "https://www.google.com",
329
+ tooltip: "tooltip text",
330
+ subText: "sub text",
331
+ }
332
+ ],
333
+
248
334
  "riego":{
249
335
  "mm":6,
250
336
  "hh":"3:00",