declarative-spec 1.0.0 → 1.2.1

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.
@@ -0,0 +1,1571 @@
1
+ {
2
+ "tableSearchBar": {
3
+ "tagName": "div",
4
+ "attributes": {
5
+ "class": "row mb-3 align-items-center"
6
+ },
7
+ "children": [
8
+ {
9
+ "tagName": "div",
10
+ "attributes": {
11
+ "class": "col-md-4 d-flex align-items-center"
12
+ },
13
+ "children": [
14
+ {
15
+ "tagName": "h6",
16
+ "attributes": {
17
+ "class": "mb-0 fw-semibold text-secondary",
18
+ "id": "table-title"
19
+ },
20
+ "textContent": "Items"
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "tagName": "div",
26
+ "attributes": {
27
+ "class": "col-md-4 text-center d-flex align-items-center justify-content-center"
28
+ },
29
+ "children": [
30
+ {
31
+ "tagName": "span",
32
+ "attributes": {
33
+ "id": "search-feedback",
34
+ "class": "badge bg-white text-secondary border px-3 py-2 small fw-normal shadow-sm"
35
+ },
36
+ "textContent": "Showing all records"
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "tagName": "div",
42
+ "attributes": {
43
+ "class": "col-md-4"
44
+ },
45
+ "children": [
46
+ {
47
+ "tagName": "div",
48
+ "attributes": {
49
+ "class": "input-group"
50
+ },
51
+ "children": [
52
+ {
53
+ "tagName": "span",
54
+ "attributes": {
55
+ "class": "input-group-text bg-white"
56
+ },
57
+ "children": [
58
+ {
59
+ "tagName": "i",
60
+ "attributes": {
61
+ "class": "bi bi-search"
62
+ },
63
+ "textContent": "🔍"
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "tagName": "input",
69
+ "attributes": {
70
+ "type": "text",
71
+ "id": "tableSearch",
72
+ "class": "form-control",
73
+ "placeholder": "Search table..."
74
+ }
75
+ }
76
+ ]
77
+ }
78
+ ]
79
+ }
80
+ ]
81
+ },
82
+ "buildBodyTr": {
83
+ "tagName": "tr",
84
+ "attributes": {
85
+ "class": "align-middle"
86
+ },
87
+ "children": []
88
+ },
89
+ "buildColGroup": {
90
+ "tagName": "col",
91
+ "attributes": {
92
+ "width": "${width}"
93
+ }
94
+ },
95
+ "buildHeader": {
96
+ "tagName": "th",
97
+ "textContent": "${columnName}",
98
+ "attributes": {
99
+ "class": "py-3 px-3 fw-semibold text-uppercase small"
100
+ }
101
+ },
102
+ "buildFooter": {
103
+ "tagName": "td",
104
+ "children": [
105
+ {
106
+ "tagName": "input",
107
+ "attributes": {
108
+ "type": "text",
109
+ "placeholder": "enter ${columnName}",
110
+ "name": "${columnName}",
111
+ "id": "${columnName}",
112
+ "list": "${columnName}",
113
+ "class": "form-control"
114
+ }
115
+ }
116
+ ]
117
+ },
118
+ "buildBodyCell": {
119
+ "tagName": "td",
120
+ "textContent": "${rowValue}",
121
+ "attributes": {
122
+ "class": "py-3 px-3 text-secondary"
123
+ }
124
+ },
125
+ "button": {
126
+ "tagName": "button",
127
+ "textContent": "${columnName}",
128
+ "attributes": {
129
+ "class": "btn btn-primary btn-sm"
130
+ }
131
+ },
132
+ "buttonCell": {
133
+ "tagName": "td",
134
+ "attributes": {
135
+ "class": "py-2 px-3 text-center"
136
+ },
137
+ "children": [
138
+ {
139
+ "tagName": "button",
140
+ "textContent": "${agg:count}",
141
+ "attributes": {
142
+ "class": "btn btn-primary btn-sm"
143
+ }
144
+ }
145
+ ]
146
+ },
147
+ "optionsButtonCell": {
148
+ "tagName": "td",
149
+ "attributes": {
150
+ "class": "py-2 px-3 text-center"
151
+ },
152
+ "children": [
153
+ {
154
+ "tagName": "button",
155
+ "textContent": "show",
156
+ "attributes": {
157
+ "class": "btn btn-primary btn-sm ks-btn-show"
158
+ }
159
+ }
160
+ ]
161
+ },
162
+ "buildOption": {
163
+ "tagName": "option",
164
+ "textContent": "${rowValue}",
165
+ "attributes": {
166
+ "value": "${rowValue}"
167
+ }
168
+ },
169
+ "buildSelect": {
170
+ "tagName": "select",
171
+ "attributes": {
172
+ "id": "${columnName}",
173
+ "name": "${columnName}",
174
+ "data-name": "${columnName}",
175
+ "class": "form-select shadow-sm mb-3"
176
+ },
177
+ "children": []
178
+ },
179
+ "buildDataList": {
180
+ "tagName": "datalist",
181
+ "attributes": {
182
+ "id": "${columnName}",
183
+ "data-name": "${columnName}"
184
+ },
185
+ "children": []
186
+ },
187
+ "buildFormField": {
188
+ "tagName": "div",
189
+ "attributes": {
190
+ "class": "mb-3"
191
+ },
192
+ "children": [
193
+ {
194
+ "tagName": "label",
195
+ "textContent": "${columnName}",
196
+ "attributes": {
197
+ "for": "${columnName}",
198
+ "class": "form-label fw-semibold text-capitalize"
199
+ }
200
+ },
201
+ {
202
+ "tagName": "input",
203
+ "attributes": {
204
+ "type": "text",
205
+ "id": "${columnName}",
206
+ "name": "${columnName}",
207
+ "placeholder": "Enter ${columnName}...",
208
+ "class": "form-control"
209
+ }
210
+ }
211
+ ]
212
+ },
213
+ "emptyCell": {
214
+ "tagName": "td",
215
+ "children": []
216
+ },
217
+ "headerSerialCell": {
218
+ "tagName": "th",
219
+ "textContent": "#",
220
+ "attributes": {
221
+ "class": "py-3 px-3 fw-semibold text-uppercase small"
222
+ }
223
+ },
224
+ "colGroupForSerial": {
225
+ "tagName": "col",
226
+ "attributes": {
227
+ "width": "50px"
228
+ }
229
+ },
230
+ "colGroupForOption": {
231
+ "tagName": "col",
232
+ "attributes": {
233
+ "width": "100px"
234
+ }
235
+ },
236
+ "headerForOption": {
237
+ "tagName": "th",
238
+ "textContent": "options",
239
+ "attributes": {
240
+ "class": "py-3 px-3 fw-semibold text-uppercase small"
241
+ }
242
+ },
243
+ "tdWithButtonSaveWarning": {
244
+ "tagName": "td",
245
+ "attributes": {
246
+ "class": "py-2 px-3 text-center"
247
+ },
248
+ "children": [
249
+ {
250
+ "tagName": "button",
251
+ "textContent": "save",
252
+ "attributes": {
253
+ "class": "btn btn-warning btn-sm ks-btn-save"
254
+ }
255
+ }
256
+ ]
257
+ },
258
+ "tableSearch": {
259
+ "tagName": "div",
260
+ "attributes": {
261
+ "class": "row mb-3 justify-content-end"
262
+ },
263
+ "children": [
264
+ {
265
+ "tagName": "div",
266
+ "attributes": {
267
+ "class": "col-md-4"
268
+ },
269
+ "children": [
270
+ {
271
+ "tagName": "div",
272
+ "attributes": {
273
+ "class": "input-group"
274
+ },
275
+ "children": [
276
+ {
277
+ "tagName": "span",
278
+ "attributes": {
279
+ "class": "input-group-text bg-white"
280
+ },
281
+ "children": [
282
+ {
283
+ "tagName": "i",
284
+ "attributes": {
285
+ "class": "bi bi-search"
286
+ },
287
+ "textContent": "🔍"
288
+ }
289
+ ]
290
+ },
291
+ {
292
+ "tagName": "input",
293
+ "attributes": {
294
+ "type": "text",
295
+ "id": "tableSearch",
296
+ "class": "form-control",
297
+ "placeholder": "Search table..."
298
+ }
299
+ }
300
+ ]
301
+ }
302
+ ]
303
+ }
304
+ ]
305
+ },
306
+ "tableWithSearch": {
307
+ "tagName": "div",
308
+ "attributes": {
309
+ "data-role": "table-parent",
310
+ "id": "table-withSearch-id"
311
+ },
312
+ "children": [
313
+ {
314
+ "tagName": "div",
315
+ "attributes": {
316
+ "class": "row mb-3 align-items-center",
317
+ "data-role": "search-toolbar"
318
+ },
319
+ "children": [
320
+ {
321
+ "tagName": "div",
322
+ "attributes": {
323
+ "class": "col-md-4 d-flex align-items-center",
324
+ "data-role": "search-label-slot"
325
+ },
326
+ "children": []
327
+ },
328
+ {
329
+ "tagName": "div",
330
+ "attributes": {
331
+ "class": "col-md-4 text-center d-flex align-items-center justify-content-center",
332
+ "data-role": "search-helper-slot"
333
+ },
334
+ "children": []
335
+ },
336
+ {
337
+ "tagName": "div",
338
+ "attributes": {
339
+ "class": "col-md-4",
340
+ "data-role": "search-input-slot"
341
+ },
342
+ "children": []
343
+ }
344
+ ]
345
+ },
346
+ {
347
+ "tagName": "div",
348
+ "attributes": {
349
+ "id": "table-content-container"
350
+ },
351
+ "children": [
352
+ {
353
+ "tagName": "table",
354
+ "attributes": {
355
+ "class": "table table-hover table-striped align-middle border mb-0",
356
+ "id": "table-withSearch-table-id"
357
+ },
358
+ "children": [
359
+ {
360
+ "tagName": "colgroup",
361
+ "attributes": {
362
+ "data-role": "table-colgroup",
363
+ "id": "table-simple-colgroup-id"
364
+ },
365
+ "children": []
366
+ },
367
+ {
368
+ "tagName": "thead",
369
+ "attributes": {
370
+ "class": "table-dark",
371
+ "data-role": "table-header",
372
+ "id": "table-simple-header-id"
373
+ },
374
+ "children": [
375
+ {
376
+ "tagName": "tr",
377
+ "attributes": {
378
+ "data-role": "table-header-row",
379
+ "id": "table-simple-header-row-id"
380
+ },
381
+ "children": []
382
+ }
383
+ ]
384
+ },
385
+ {
386
+ "tagName": "tbody",
387
+ "attributes": {
388
+ "data-role": "table-body",
389
+ "id": "table-simple-body-id"
390
+ },
391
+ "children": []
392
+ }
393
+ ]
394
+ }
395
+ ]
396
+ }
397
+ ]
398
+ },
399
+ "tableSimple": {
400
+ "tagName": "div",
401
+ "attributes": {
402
+ "data-role": "table-parent",
403
+ "id": "table-parent-id"
404
+ },
405
+ "children": [
406
+ {
407
+ "tagName": "table",
408
+ "attributes": {
409
+ "class": "table table-hover table-striped align-middle border mb-0",
410
+ "id": "table-tag-id"
411
+ },
412
+ "children": [
413
+ {
414
+ "tagName": "colgroup",
415
+ "attributes": {
416
+ "data-role": "table-colgroup",
417
+ "id": "table-colgroup-id"
418
+ },
419
+ "children": []
420
+ },
421
+ {
422
+ "tagName": "thead",
423
+ "attributes": {
424
+ "class": "table-dark",
425
+ "data-role": "table-header",
426
+ "id": "table-header-id"
427
+ },
428
+ "children": [
429
+ {
430
+ "tagName": "tr",
431
+ "attributes": {
432
+ "data-role": "table-header-row",
433
+ "id": "table-header-row-id"
434
+ },
435
+ "children": []
436
+ }
437
+ ]
438
+ },
439
+ {
440
+ "tagName": "tbody",
441
+ "attributes": {
442
+ "data-role": "table-body",
443
+ "id": "table-body-id"
444
+ },
445
+ "children": []
446
+ }
447
+ ]
448
+ }
449
+ ]
450
+ },
451
+ "tableWithFooter": {
452
+ "tagName": "div",
453
+ "attributes": {
454
+ "data-role": "table-parent",
455
+ "id": "table-parent-id"
456
+ },
457
+ "children": [
458
+ {
459
+ "tagName": "table",
460
+ "attributes": {
461
+ "class": "table table-hover table-striped align-middle border mb-0",
462
+ "id": "table-tag-id"
463
+ },
464
+ "children": [
465
+ {
466
+ "tagName": "colgroup",
467
+ "attributes": {
468
+ "data-role": "table-colgroup",
469
+ "id": "table-colgroup-id"
470
+ },
471
+ "children": []
472
+ },
473
+ {
474
+ "tagName": "thead",
475
+ "attributes": {
476
+ "class": "table-dark",
477
+ "data-role": "table-header",
478
+ "id": "table-header-id"
479
+ },
480
+ "children": [
481
+ {
482
+ "tagName": "tr",
483
+ "attributes": {
484
+ "data-role": "table-header-row",
485
+ "id": "table-header-row-id"
486
+ },
487
+ "children": []
488
+ }
489
+ ]
490
+ },
491
+ {
492
+ "tagName": "tbody",
493
+ "attributes": {
494
+ "data-role": "table-body",
495
+ "id": "table-body-id"
496
+ },
497
+ "children": []
498
+ },
499
+ {
500
+ "tagName": "tfoot",
501
+ "attributes": {
502
+ "data-role": "table-footer",
503
+ "id": "table-footer-id"
504
+ },
505
+ "children": [
506
+ {
507
+ "tagName": "tr",
508
+ "attributes": {
509
+ "data-role": "table-footer-row",
510
+ "id": "table-footer-row-id"
511
+ },
512
+ "children": []
513
+ }
514
+ ]
515
+ }
516
+ ]
517
+ }
518
+ ]
519
+ },
520
+ "tableBodyOnly": {
521
+ "tagName": "table",
522
+ "attributes": {
523
+ "class": "table table-hover table-striped align-middle border mb-0",
524
+ "id": "table-tag-id"
525
+ },
526
+ "children": [
527
+ {
528
+ "tagName": "tbody",
529
+ "attributes": {
530
+ "data-role": "table-body",
531
+ "id": "table-body-id"
532
+ },
533
+ "children": []
534
+ }
535
+ ]
536
+ },
537
+ "tableBodyOnly1": {
538
+ "tagName": "tbody",
539
+ "attributes": {
540
+ "data-role": "table-body",
541
+ "id": "table-body-only-id"
542
+ },
543
+ "children": []
544
+ },
545
+ "tableFooterOnly": {
546
+ "tagName": "tfoot",
547
+ "attributes": {
548
+ "data-role": "table-footer",
549
+ "id": "table-footer-only-id"
550
+ },
551
+ "children": [
552
+ {
553
+ "tagName": "tr",
554
+ "attributes": {
555
+ "data-role": "table-footer-row",
556
+ "id": "table-footer-only-footer-row-id"
557
+ },
558
+ "children": []
559
+ }
560
+ ]
561
+ },
562
+ "tableHeaderOnly": {
563
+ "tagName": "div",
564
+ "attributes": {
565
+ "data-role": "table-parent",
566
+ "id": "table-parent-id"
567
+ },
568
+ "children": [
569
+ {
570
+ "tagName": "table",
571
+ "attributes": {
572
+ "class": "table table-hover table-striped align-middle border mb-0",
573
+ "id": "table-tag-id"
574
+ },
575
+ "children": [
576
+ {
577
+ "tagName": "colgroup",
578
+ "attributes": {
579
+ "data-role": "table-colgroup",
580
+ "id": "table-colgroup-id"
581
+ },
582
+ "children": []
583
+ },
584
+ {
585
+ "tagName": "thead",
586
+ "attributes": {
587
+ "class": "table-dark",
588
+ "data-role": "table-header",
589
+ "id": "table-header-id"
590
+ },
591
+ "children": [
592
+ {
593
+ "tagName": "tr",
594
+ "attributes": {
595
+ "data-role": "table-header-row",
596
+ "id": "table-header-row-id"
597
+ },
598
+ "children": []
599
+ }
600
+ ]
601
+ }
602
+ ]
603
+ }
604
+ ]
605
+ },
606
+ "tableHeaderOnly1": {
607
+ "tagName": "table",
608
+ "attributes": {
609
+ "class": "table table-hover table-striped align-middle border mb-0",
610
+ "id": "table-header-only-id"
611
+ },
612
+ "children": [
613
+ {
614
+ "tagName": "colgroup",
615
+ "attributes": {
616
+ "data-role": "table-colgroup",
617
+ "id": "table-header-only-colgroup-id"
618
+ },
619
+ "children": []
620
+ },
621
+ {
622
+ "tagName": "thead",
623
+ "attributes": {
624
+ "class": "table-dark",
625
+ "data-role": "table-header",
626
+ "id": "table-header-only-header-id"
627
+ },
628
+ "children": [
629
+ {
630
+ "tagName": "tr",
631
+ "attributes": {
632
+ "data-role": "table-header-row",
633
+ "id": "table-header-only-header-row-id"
634
+ },
635
+ "children": []
636
+ }
637
+ ]
638
+ },
639
+ {
640
+ "tagName": "tbody",
641
+ "attributes": {
642
+ "data-role": "table-body",
643
+ "id": "table-header-only-body-id"
644
+ },
645
+ "children": []
646
+ }
647
+ ]
648
+ },
649
+ "tableHeaderAndFooter": {
650
+ "tagName": "div",
651
+ "attributes": {
652
+ "data-role": "table-parent",
653
+ "id": "table-simple-id"
654
+ },
655
+ "children": [
656
+ {
657
+ "tagName": "table",
658
+ "attributes": {
659
+ "class": "table table-hover table-striped align-middle border mb-0",
660
+ "id": "table-simple-table-id"
661
+ },
662
+ "children": [
663
+ {
664
+ "tagName": "colgroup",
665
+ "attributes": {
666
+ "data-role": "table-colgroup",
667
+ "id": "table-simple-colgroup-id"
668
+ },
669
+ "children": []
670
+ },
671
+ {
672
+ "tagName": "thead",
673
+ "attributes": {
674
+ "class": "table-dark",
675
+ "data-role": "table-header",
676
+ "id": "table-simple-header-id"
677
+ },
678
+ "children": [
679
+ {
680
+ "tagName": "tr",
681
+ "attributes": {
682
+ "data-role": "table-header-row",
683
+ "id": "table-simple-header-row-id"
684
+ },
685
+ "children": []
686
+ }
687
+ ]
688
+ },
689
+ {
690
+ "tagName": "tbody",
691
+ "attributes": {
692
+ "data-role": "table-body",
693
+ "id": "table-simple-body-id"
694
+ },
695
+ "children": []
696
+ },
697
+ {
698
+ "tagName": "tfoot",
699
+ "attributes": {
700
+ "data-role": "table-footer",
701
+ "id": "table-simple-footer-id"
702
+ },
703
+ "children": [
704
+ {
705
+ "tagName": "tr",
706
+ "attributes": {
707
+ "data-role": "table-footer-row",
708
+ "id": "table-simple-footer-row-id"
709
+ },
710
+ "children": []
711
+ }
712
+ ]
713
+ }
714
+ ]
715
+ }
716
+ ]
717
+ },
718
+ "selectBase": {
719
+ "tagName": "div",
720
+ "attributes": {
721
+ "data-role": "select-container",
722
+ "id": "select-base-id"
723
+ },
724
+ "children": []
725
+ },
726
+ "dataListBase": {
727
+ "tagName": "div",
728
+ "attributes": {
729
+ "data-role": "datalist-container",
730
+ "id": "data-list-base-id"
731
+ },
732
+ "children": []
733
+ },
734
+ "dataListSimple": {
735
+ "tagName": "div",
736
+ "attributes": {
737
+ "data-role": "datalist-container",
738
+ "id": "data-list-simple-id"
739
+ },
740
+ "children": []
741
+ },
742
+ "selectOptionsOnlyBase": [],
743
+ "searchInputBase": {
744
+ "tagName": "div",
745
+ "attributes": {
746
+ "class": "d-flex align-items-center gap-2",
747
+ "id": "search-input-base-id"
748
+ },
749
+ "children": [
750
+ {
751
+ "tagName": "label",
752
+ "textContent": "${label}",
753
+ "attributes": {
754
+ "class": "form-label mb-0 text-nowrap fw-semibold",
755
+ "for": "${id}",
756
+ "id": "search-input-label-id"
757
+ }
758
+ },
759
+ {
760
+ "tagName": "input",
761
+ "attributes": {
762
+ "type": "search",
763
+ "placeholder": "${placeholder}",
764
+ "class": "form-control",
765
+ "id": "search-input-field-id"
766
+ }
767
+ }
768
+ ]
769
+ },
770
+ "formBase": {
771
+ "tagName": "div",
772
+ "attributes": {
773
+ "class": "card shadow-sm border-0",
774
+ "id": "form-base-id"
775
+ },
776
+ "children": [
777
+ {
778
+ "tagName": "div",
779
+ "attributes": {
780
+ "class": "card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center",
781
+ "id": "form-base-header-id"
782
+ },
783
+ "children": [
784
+ {
785
+ "tagName": "h2",
786
+ "textContent": "Data Entry Form",
787
+ "attributes": {
788
+ "class": "h5 fw-bold mb-0 text-dark",
789
+ "id": "form-base-title-id"
790
+ }
791
+ }
792
+ ]
793
+ },
794
+ {
795
+ "tagName": "div",
796
+ "attributes": {
797
+ "class": "card-body p-4",
798
+ "id": "form-base-body-id"
799
+ },
800
+ "children": [
801
+ {
802
+ "tagName": "form",
803
+ "attributes": {
804
+ "id": "form-base-form-id",
805
+ "data-role": "form-body"
806
+ },
807
+ "children": []
808
+ }
809
+ ]
810
+ },
811
+ {
812
+ "tagName": "div",
813
+ "attributes": {
814
+ "class": "card-footer bg-light px-4 py-3 d-flex justify-content-end gap-2",
815
+ "id": "form-base-footer-id"
816
+ },
817
+ "children": [
818
+ {
819
+ "tagName": "button",
820
+ "textContent": "Reset",
821
+ "attributes": {
822
+ "type": "reset",
823
+ "class": "btn btn-outline-secondary",
824
+ "id": "form-base-reset-button-id"
825
+ }
826
+ },
827
+ {
828
+ "tagName": "button",
829
+ "textContent": "Submit",
830
+ "attributes": {
831
+ "type": "submit",
832
+ "class": "btn btn-primary",
833
+ "id": "form-base-submit-button-id"
834
+ }
835
+ }
836
+ ]
837
+ }
838
+ ]
839
+ },
840
+ "formSimple": {
841
+ "tagName": "div",
842
+ "attributes": {
843
+ "class": "card shadow-sm border-0",
844
+ "id": "form-simple-id"
845
+ },
846
+ "children": [
847
+ {
848
+ "tagName": "div",
849
+ "attributes": {
850
+ "class": "card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center",
851
+ "id": "form-simple-header-id"
852
+ },
853
+ "children": [
854
+ {
855
+ "tagName": "h2",
856
+ "textContent": "Data Entry Form",
857
+ "attributes": {
858
+ "class": "h5 fw-bold mb-0 text-dark",
859
+ "id": "form-simple-title-id"
860
+ }
861
+ }
862
+ ]
863
+ },
864
+ {
865
+ "tagName": "div",
866
+ "attributes": {
867
+ "class": "card-body p-4",
868
+ "id": "form-simple-body-id"
869
+ },
870
+ "children": [
871
+ {
872
+ "tagName": "form",
873
+ "attributes": {
874
+ "id": "form-simple-form-id",
875
+ "data-role": "form-body"
876
+ },
877
+ "children": []
878
+ }
879
+ ]
880
+ },
881
+ {
882
+ "tagName": "div",
883
+ "attributes": {
884
+ "class": "card-footer bg-light px-4 py-3 d-flex justify-content-end gap-2",
885
+ "id": "form-simple-footer-id"
886
+ },
887
+ "children": [
888
+ {
889
+ "tagName": "button",
890
+ "textContent": "Reset",
891
+ "attributes": {
892
+ "type": "reset",
893
+ "class": "btn btn-outline-secondary",
894
+ "id": "form-simple-reset-button-id"
895
+ }
896
+ },
897
+ {
898
+ "tagName": "button",
899
+ "textContent": "Submit",
900
+ "attributes": {
901
+ "type": "submit",
902
+ "class": "btn btn-primary",
903
+ "id": "form-simple-submit-button-id"
904
+ }
905
+ }
906
+ ]
907
+ }
908
+ ]
909
+ },
910
+ "searchToolbar": {
911
+ "tagName": "div",
912
+ "attributes": {
913
+ "class": "row mb-3 align-items-center",
914
+ "data-role": "search-toolbar"
915
+ },
916
+ "children": [
917
+ {
918
+ "tagName": "div",
919
+ "attributes": {
920
+ "class": "col-md-4 d-flex align-items-center",
921
+ "data-role": "search-label-slot"
922
+ },
923
+ "children": []
924
+ },
925
+ {
926
+ "tagName": "div",
927
+ "attributes": {
928
+ "class": "col-md-4 text-center d-flex align-items-center justify-content-center",
929
+ "data-role": "search-helper-slot"
930
+ },
931
+ "children": []
932
+ },
933
+ {
934
+ "tagName": "div",
935
+ "attributes": {
936
+ "class": "col-md-4",
937
+ "data-role": "search-input-slot"
938
+ },
939
+ "children": []
940
+ }
941
+ ]
942
+ },
943
+ "searchLabel": {
944
+ "tagName": "h6",
945
+ "textContent": "Items",
946
+ "attributes": {
947
+ "class": "mb-0 fw-semibold text-secondary",
948
+ "id": "table-title"
949
+ }
950
+ },
951
+ "searchHelper": {
952
+ "tagName": "span",
953
+ "textContent": "Showing all records",
954
+ "attributes": {
955
+ "id": "search-feedback",
956
+ "class": "badge bg-white text-secondary border px-3 py-2 small fw-normal shadow-sm"
957
+ }
958
+ },
959
+ "searchInput": {
960
+ "tagName": "div",
961
+ "attributes": {
962
+ "class": "input-group"
963
+ },
964
+ "children": [
965
+ {
966
+ "tagName": "span",
967
+ "attributes": {
968
+ "class": "input-group-text bg-white"
969
+ },
970
+ "children": [
971
+ {
972
+ "tagName": "i",
973
+ "attributes": {
974
+ "class": "bi bi-search"
975
+ },
976
+ "textContent": "🔍"
977
+ }
978
+ ]
979
+ },
980
+ {
981
+ "tagName": "input",
982
+ "attributes": {
983
+ "type": "text",
984
+ "id": "tableSearch",
985
+ "class": "form-control",
986
+ "placeholder": "Search table..."
987
+ }
988
+ }
989
+ ]
990
+ },
991
+ "optionsEditButtonCell": {
992
+ "tagName": "td",
993
+ "attributes": {
994
+ "class": "py-2 px-3 text-center"
995
+ },
996
+ "children": [
997
+ {
998
+ "tagName": "button",
999
+ "textContent": "edit",
1000
+ "attributes": {
1001
+ "class": "btn btn-secondary btn-sm ks-btn-edit"
1002
+ }
1003
+ }
1004
+ ]
1005
+ },
1006
+ "optionsDeleteButtonCell": {
1007
+ "tagName": "td",
1008
+ "attributes": {
1009
+ "class": "py-2 px-3 text-center"
1010
+ },
1011
+ "children": [
1012
+ {
1013
+ "tagName": "button",
1014
+ "textContent": "delete",
1015
+ "attributes": {
1016
+ "class": "btn btn-danger btn-sm ks-btn-delete"
1017
+ }
1018
+ }
1019
+ ]
1020
+ },
1021
+ "headerForEditOption": {
1022
+ "tagName": "th",
1023
+ "textContent": "edit",
1024
+ "attributes": {
1025
+ "class": "py-3 px-3 fw-semibold text-uppercase small"
1026
+ }
1027
+ },
1028
+ "headerForDeleteOption": {
1029
+ "tagName": "th",
1030
+ "textContent": "delete",
1031
+ "attributes": {
1032
+ "class": "py-3 px-3 fw-semibold text-uppercase small"
1033
+ }
1034
+ },
1035
+ "colGroupForEditOption": {
1036
+ "tagName": "col",
1037
+ "attributes": {
1038
+ "width": "80px"
1039
+ }
1040
+ },
1041
+ "colGroupForDeleteOption": {
1042
+ "tagName": "col",
1043
+ "attributes": {
1044
+ "width": "90px"
1045
+ }
1046
+ },
1047
+ "tableWithFooterParent": {
1048
+ "tagName": "div",
1049
+ "attributes": {
1050
+ "data-role": "table-parent",
1051
+ "id": "table-with-footer-parent-id"
1052
+ },
1053
+ "children": [
1054
+ {
1055
+ "tagName": "table",
1056
+ "attributes": {
1057
+ "class": "table table-hover table-striped align-middle border mb-0",
1058
+ "id": "table-with-footer-id"
1059
+ },
1060
+ "children": [
1061
+ {
1062
+ "tagName": "colgroup",
1063
+ "attributes": {
1064
+ "data-role": "table-colgroup",
1065
+ "id": "table-with-footer-colgroup-id"
1066
+ },
1067
+ "children": []
1068
+ },
1069
+ {
1070
+ "tagName": "thead",
1071
+ "attributes": {
1072
+ "class": "table-dark",
1073
+ "data-role": "table-header",
1074
+ "id": "table-with-footer-header-id"
1075
+ },
1076
+ "children": [
1077
+ {
1078
+ "tagName": "tr",
1079
+ "attributes": {
1080
+ "data-role": "table-header-row",
1081
+ "id": "table-with-footer-header-row-id"
1082
+ },
1083
+ "children": []
1084
+ }
1085
+ ]
1086
+ },
1087
+ {
1088
+ "tagName": "tbody",
1089
+ "attributes": {
1090
+ "data-role": "table-body",
1091
+ "id": "table-with-footer-body-id"
1092
+ },
1093
+ "children": []
1094
+ },
1095
+ {
1096
+ "tagName": "tfoot",
1097
+ "attributes": {
1098
+ "data-role": "table-footer",
1099
+ "id": "table-with-footer-footer-id"
1100
+ },
1101
+ "children": [
1102
+ {
1103
+ "tagName": "tr",
1104
+ "attributes": {
1105
+ "data-role": "table-footer-row",
1106
+ "id": "table-with-footer-footer-row-id"
1107
+ },
1108
+ "children": []
1109
+ }
1110
+ ]
1111
+ }
1112
+ ]
1113
+ }
1114
+ ]
1115
+ },
1116
+ "tableWithSearchAndFooter": {
1117
+ "tagName": "div",
1118
+ "attributes": {
1119
+ "data-role": "table-parent",
1120
+ "id": "table-with-search-footer-parent-id"
1121
+ },
1122
+ "children": [
1123
+ {
1124
+ "tagName": "div",
1125
+ "attributes": {
1126
+ "class": "row mb-3 align-items-center",
1127
+ "data-role": "search-toolbar"
1128
+ },
1129
+ "children": [
1130
+ {
1131
+ "tagName": "div",
1132
+ "attributes": {
1133
+ "class": "col-md-4 d-flex align-items-center",
1134
+ "data-role": "search-label-slot"
1135
+ },
1136
+ "children": []
1137
+ },
1138
+ {
1139
+ "tagName": "div",
1140
+ "attributes": {
1141
+ "class": "col-md-4 text-center d-flex align-items-center justify-content-center",
1142
+ "data-role": "search-helper-slot"
1143
+ },
1144
+ "children": []
1145
+ },
1146
+ {
1147
+ "tagName": "div",
1148
+ "attributes": {
1149
+ "class": "col-md-4",
1150
+ "data-role": "search-input-slot"
1151
+ },
1152
+ "children": []
1153
+ }
1154
+ ]
1155
+ },
1156
+ {
1157
+ "tagName": "div",
1158
+ "attributes": {
1159
+ "id": "table-content-container"
1160
+ },
1161
+ "children": [
1162
+ {
1163
+ "tagName": "table",
1164
+ "attributes": {
1165
+ "class": "table table-hover table-striped align-middle border mb-0",
1166
+ "id": "table-with-footer-id"
1167
+ },
1168
+ "children": [
1169
+ {
1170
+ "tagName": "colgroup",
1171
+ "attributes": {
1172
+ "data-role": "table-colgroup",
1173
+ "id": "table-with-footer-colgroup-id"
1174
+ },
1175
+ "children": []
1176
+ },
1177
+ {
1178
+ "tagName": "thead",
1179
+ "attributes": {
1180
+ "class": "table-dark",
1181
+ "data-role": "table-header",
1182
+ "id": "table-with-footer-header-id"
1183
+ },
1184
+ "children": [
1185
+ {
1186
+ "tagName": "tr",
1187
+ "attributes": {
1188
+ "data-role": "table-header-row",
1189
+ "id": "table-with-footer-header-row-id"
1190
+ },
1191
+ "children": []
1192
+ }
1193
+ ]
1194
+ },
1195
+ {
1196
+ "tagName": "tbody",
1197
+ "attributes": {
1198
+ "data-role": "table-body",
1199
+ "id": "table-with-footer-body-id"
1200
+ },
1201
+ "children": []
1202
+ },
1203
+ {
1204
+ "tagName": "tfoot",
1205
+ "attributes": {
1206
+ "data-role": "table-footer",
1207
+ "id": "table-with-footer-footer-id"
1208
+ },
1209
+ "children": [
1210
+ {
1211
+ "tagName": "tr",
1212
+ "attributes": {
1213
+ "data-role": "table-footer-row",
1214
+ "id": "table-with-footer-footer-row-id"
1215
+ },
1216
+ "children": []
1217
+ }
1218
+ ]
1219
+ }
1220
+ ]
1221
+ }
1222
+ ]
1223
+ }
1224
+ ]
1225
+ },
1226
+ "accordionSimple": {
1227
+ "tagName": "div",
1228
+ "attributes": {
1229
+ "class": "accordion shadow-sm rounded-3 border",
1230
+ "id": "accordion-parent-id",
1231
+ "data-role": "accordion-parent"
1232
+ },
1233
+ "children": []
1234
+ },
1235
+ "accordionFlush": {
1236
+ "tagName": "div",
1237
+ "attributes": {
1238
+ "class": "accordion accordion-flush shadow-sm rounded-3 border",
1239
+ "id": "accordion-parent-id",
1240
+ "data-role": "accordion-parent"
1241
+ },
1242
+ "children": []
1243
+ },
1244
+ "buildAccordionItem": {
1245
+ "tagName": "div",
1246
+ "attributes": {
1247
+ "class": "accordion-item",
1248
+ "data-role": "accordion-item"
1249
+ },
1250
+ "children": [
1251
+ {
1252
+ "tagName": "h2",
1253
+ "attributes": {
1254
+ "class": "accordion-header",
1255
+ "id": "heading-${id}"
1256
+ },
1257
+ "children": [
1258
+ {
1259
+ "tagName": "button",
1260
+ "attributes": {
1261
+ "class": "accordion-button collapsed",
1262
+ "type": "button",
1263
+ "data-bs-toggle": "collapse",
1264
+ "data-bs-target": "#collapse-${id}",
1265
+ "aria-expanded": "false",
1266
+ "aria-controls": "collapse-${id}"
1267
+ },
1268
+ "textContent": "${title}"
1269
+ }
1270
+ ]
1271
+ },
1272
+ {
1273
+ "tagName": "div",
1274
+ "attributes": {
1275
+ "id": "collapse-${id}",
1276
+ "class": "accordion-collapse collapse",
1277
+ "aria-labelledby": "heading-${id}",
1278
+ "data-bs-parent": "#accordion-parent-id",
1279
+ "data-role": "accordion-collapse"
1280
+ },
1281
+ "children": [
1282
+ {
1283
+ "tagName": "div",
1284
+ "attributes": {
1285
+ "class": "accordion-body text-secondary"
1286
+ },
1287
+ "textContent": "${content}"
1288
+ }
1289
+ ]
1290
+ }
1291
+ ]
1292
+ },
1293
+ "cardSimple": {
1294
+ "tagName": "div",
1295
+ "attributes": {
1296
+ "class": "card shadow-sm border rounded-3",
1297
+ "id": "card-parent-id",
1298
+ "data-role": "card-parent"
1299
+ },
1300
+ "children": [
1301
+ {
1302
+ "tagName": "div",
1303
+ "attributes": {
1304
+ "class": "card-body p-4",
1305
+ "data-role": "card-body"
1306
+ },
1307
+ "children": []
1308
+ }
1309
+ ]
1310
+ },
1311
+ "cardWithHeader": {
1312
+ "tagName": "div",
1313
+ "attributes": {
1314
+ "class": "card shadow-sm border rounded-3",
1315
+ "id": "card-parent-id",
1316
+ "data-role": "card-parent"
1317
+ },
1318
+ "children": [
1319
+ {
1320
+ "tagName": "div",
1321
+ "attributes": {
1322
+ "class": "card-header bg-white py-3 fw-bold border-bottom",
1323
+ "data-role": "card-header"
1324
+ },
1325
+ "children": []
1326
+ },
1327
+ {
1328
+ "tagName": "div",
1329
+ "attributes": {
1330
+ "class": "card-body p-4",
1331
+ "data-role": "card-body"
1332
+ },
1333
+ "children": []
1334
+ }
1335
+ ]
1336
+ },
1337
+ "cardWithFooter": {
1338
+ "tagName": "div",
1339
+ "attributes": {
1340
+ "class": "card shadow-sm border rounded-3",
1341
+ "id": "card-parent-id",
1342
+ "data-role": "card-parent"
1343
+ },
1344
+ "children": [
1345
+ {
1346
+ "tagName": "div",
1347
+ "attributes": {
1348
+ "class": "card-header bg-white py-3 fw-bold border-bottom",
1349
+ "data-role": "card-header"
1350
+ },
1351
+ "children": []
1352
+ },
1353
+ {
1354
+ "tagName": "div",
1355
+ "attributes": {
1356
+ "class": "card-body p-4",
1357
+ "data-role": "card-body"
1358
+ },
1359
+ "children": []
1360
+ },
1361
+ {
1362
+ "tagName": "div",
1363
+ "attributes": {
1364
+ "class": "card-footer bg-light py-3 border-top",
1365
+ "data-role": "card-footer"
1366
+ },
1367
+ "children": []
1368
+ }
1369
+ ]
1370
+ },
1371
+ "cardImageTop": {
1372
+ "tagName": "div",
1373
+ "attributes": {
1374
+ "class": "card shadow-sm border rounded-3 overflow-hidden",
1375
+ "id": "card-parent-id",
1376
+ "data-role": "card-parent"
1377
+ },
1378
+ "children": [
1379
+ {
1380
+ "tagName": "img",
1381
+ "attributes": {
1382
+ "class": "card-img-top",
1383
+ "src": "${imageSrc}",
1384
+ "alt": "${imageAlt}",
1385
+ "data-role": "card-img"
1386
+ }
1387
+ },
1388
+ {
1389
+ "tagName": "div",
1390
+ "attributes": {
1391
+ "class": "card-body p-4",
1392
+ "data-role": "card-body"
1393
+ },
1394
+ "children": []
1395
+ }
1396
+ ]
1397
+ },
1398
+ "buildCardBodyTemplate": {
1399
+ "tagName": "div",
1400
+ "attributes": {
1401
+ "class": "card-content"
1402
+ },
1403
+ "children": [
1404
+ {
1405
+ "tagName": "h5",
1406
+ "attributes": {
1407
+ "class": "card-title fw-bold text-dark mb-2"
1408
+ },
1409
+ "textContent": "${title}"
1410
+ },
1411
+ {
1412
+ "tagName": "p",
1413
+ "attributes": {
1414
+ "class": "card-text text-secondary mb-3"
1415
+ },
1416
+ "textContent": "${text}"
1417
+ }
1418
+ ]
1419
+ },
1420
+ "buildCardHeaderTemplate": {
1421
+ "tagName": "span",
1422
+ "attributes": {
1423
+ "class": "card-header-title text-dark"
1424
+ },
1425
+ "textContent": "${headerTitle}"
1426
+ },
1427
+ "buildCardFooterTemplate": {
1428
+ "tagName": "small",
1429
+ "attributes": {
1430
+ "class": "text-muted"
1431
+ },
1432
+ "textContent": "${footerText}"
1433
+ },
1434
+ "listSimple": {
1435
+ "tagName": "ul",
1436
+ "attributes": {
1437
+ "class": "list-unstyled mb-0",
1438
+ "id": "list-parent-id",
1439
+ "data-role": "list-parent"
1440
+ },
1441
+ "children": []
1442
+ },
1443
+ "listGroup": {
1444
+ "tagName": "ul",
1445
+ "attributes": {
1446
+ "class": "list-group shadow-sm",
1447
+ "id": "list-group-parent-id",
1448
+ "data-role": "list-group-parent"
1449
+ },
1450
+ "children": []
1451
+ },
1452
+ "listOrdered": {
1453
+ "tagName": "ol",
1454
+ "attributes": {
1455
+ "class": "list-group list-group-numbered shadow-sm",
1456
+ "id": "list-ordered-parent-id",
1457
+ "data-role": "list-group-parent"
1458
+ },
1459
+ "children": []
1460
+ },
1461
+ "menuSimple": {
1462
+ "tagName": "ul",
1463
+ "attributes": {
1464
+ "class": "nav nav-pills flex-column bg-white p-3 rounded-3 shadow-sm border",
1465
+ "id": "menu-parent-id",
1466
+ "data-role": "menu-parent"
1467
+ },
1468
+ "children": []
1469
+ },
1470
+ "menuCardsBase": {
1471
+ "tagName": "div",
1472
+ "attributes": {
1473
+ "class": "row g-4",
1474
+ "id": "menu-cards-parent-id",
1475
+ "data-role": "menu-cards-parent"
1476
+ },
1477
+ "children": []
1478
+ },
1479
+ "buildListItemTemplate": {
1480
+ "tagName": "li",
1481
+ "attributes": {
1482
+ "class": "py-2 px-3 border-bottom d-flex align-items-center text-secondary",
1483
+ "data-role": "list-item"
1484
+ },
1485
+ "textContent": "${text}"
1486
+ },
1487
+ "buildListGroupItemTemplate": {
1488
+ "tagName": "li",
1489
+ "attributes": {
1490
+ "class": "list-group-item d-flex justify-content-between align-items-center py-3",
1491
+ "data-role": "list-group-item"
1492
+ },
1493
+ "children": [
1494
+ {
1495
+ "tagName": "span",
1496
+ "textContent": "${text}"
1497
+ },
1498
+ {
1499
+ "tagName": "span",
1500
+ "attributes": {
1501
+ "class": "badge bg-primary rounded-pill px-3 py-2"
1502
+ },
1503
+ "textContent": "${badge}"
1504
+ }
1505
+ ]
1506
+ },
1507
+ "buildMenuItemTemplate": {
1508
+ "tagName": "li",
1509
+ "attributes": {
1510
+ "class": "nav-item mb-1",
1511
+ "data-role": "menu-item"
1512
+ },
1513
+ "children": [
1514
+ {
1515
+ "tagName": "a",
1516
+ "attributes": {
1517
+ "class": "nav-link text-dark fw-medium",
1518
+ "href": "${href}"
1519
+ },
1520
+ "textContent": "${text}"
1521
+ }
1522
+ ]
1523
+ },
1524
+ "buildMenuCardItemTemplate": {
1525
+ "tagName": "div",
1526
+ "attributes": {
1527
+ "class": "col-md-4 col-sm-6",
1528
+ "data-role": "menu-card-col"
1529
+ },
1530
+ "children": [
1531
+ {
1532
+ "tagName": "div",
1533
+ "attributes": {
1534
+ "class": "card h-100 shadow-sm border rounded-3"
1535
+ },
1536
+ "children": [
1537
+ {
1538
+ "tagName": "div",
1539
+ "attributes": {
1540
+ "class": "card-body p-4 d-flex flex-column"
1541
+ },
1542
+ "children": [
1543
+ {
1544
+ "tagName": "h5",
1545
+ "attributes": {
1546
+ "class": "card-title fw-bold text-primary mb-2"
1547
+ },
1548
+ "textContent": "${title}"
1549
+ },
1550
+ {
1551
+ "tagName": "p",
1552
+ "attributes": {
1553
+ "class": "card-text text-muted small flex-grow-1"
1554
+ },
1555
+ "textContent": "${description}"
1556
+ },
1557
+ {
1558
+ "tagName": "a",
1559
+ "attributes": {
1560
+ "class": "btn btn-outline-primary btn-sm mt-3",
1561
+ "href": "${href}"
1562
+ },
1563
+ "textContent": "${actionText}"
1564
+ }
1565
+ ]
1566
+ }
1567
+ ]
1568
+ }
1569
+ ]
1570
+ }
1571
+ }