@tsed/tailwind-formio 1.11.0 → 1.12.0

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.
Files changed (139) hide show
  1. package/dist/tailwind.js +1 -1
  2. package/gulpfile.js +24 -22
  3. package/lib/index.d.ts +19 -0
  4. package/lib/templates/index.d.ts +19 -0
  5. package/lib/templates/tailwind/address/form.ejs.js +3 -1
  6. package/lib/templates/tailwind/address/html.ejs.js +16 -0
  7. package/lib/templates/tailwind/alert/form.ejs.js +27 -0
  8. package/lib/templates/tailwind/alert/index.d.ts +6 -0
  9. package/lib/templates/tailwind/alert/index.js +4 -0
  10. package/lib/templates/tailwind/builderComponent/form.ejs.js +6 -6
  11. package/lib/templates/tailwind/builderEditForm/form.ejs.js +20 -20
  12. package/lib/templates/tailwind/builderSidebarGroup/form.ejs.js +3 -3
  13. package/lib/templates/tailwind/button/form.ejs.js +12 -2
  14. package/lib/templates/tailwind/checkbox/form.ejs.js +12 -2
  15. package/lib/templates/tailwind/columns/form.ejs.js +1 -1
  16. package/lib/templates/tailwind/componentModal/form.ejs.js +31 -3
  17. package/lib/templates/tailwind/datagrid/form.ejs.js +29 -13
  18. package/lib/templates/tailwind/datagrid/html.ejs.js +3 -3
  19. package/lib/templates/tailwind/day/form.ejs.js +21 -1
  20. package/lib/templates/tailwind/dialog/form.ejs.js +1 -1
  21. package/lib/templates/tailwind/editgrid/form.ejs.js +4 -4
  22. package/lib/templates/tailwind/editgrid/html.ejs.js +2 -2
  23. package/lib/templates/tailwind/editgridTable/form.ejs.js +69 -0
  24. package/lib/templates/tailwind/editgridTable/html.ejs.js +59 -0
  25. package/lib/templates/tailwind/editgridTable/index.d.ts +5 -0
  26. package/lib/templates/tailwind/editgridTable/index.js +5 -0
  27. package/lib/templates/tailwind/errorsList/form.ejs.js +25 -0
  28. package/lib/templates/tailwind/errorsList/index.d.ts +4 -0
  29. package/lib/templates/tailwind/errorsList/index.js +4 -0
  30. package/lib/templates/tailwind/field/align.ejs.js +1 -1
  31. package/lib/templates/tailwind/field/form.ejs.js +6 -2
  32. package/lib/templates/tailwind/fieldset/form.ejs.js +6 -6
  33. package/lib/templates/tailwind/file/form.ejs.js +37 -13
  34. package/lib/templates/tailwind/iconClass.d.ts +1 -0
  35. package/lib/templates/tailwind/iconClass.js +2 -1
  36. package/lib/templates/tailwind/index.d.ts +19 -0
  37. package/lib/templates/tailwind/index.js +14 -4
  38. package/lib/templates/tailwind/input/form.ejs.js +62 -32
  39. package/lib/templates/tailwind/label/form.ejs.js +14 -4
  40. package/lib/templates/tailwind/message/form.ejs.js +6 -2
  41. package/lib/templates/tailwind/modalPreview/form.ejs.js +16 -4
  42. package/lib/templates/tailwind/multiValueTable/form.ejs.js +1 -1
  43. package/lib/templates/tailwind/panel/form.ejs.js +18 -4
  44. package/lib/templates/tailwind/pdfBuilder/form.ejs.js +1 -1
  45. package/lib/templates/tailwind/radio/form.ejs.js +32 -6
  46. package/lib/templates/tailwind/radio/html.ejs.js +2 -2
  47. package/lib/templates/tailwind/resourceAdd/form.ejs.js +1 -1
  48. package/lib/templates/tailwind/select/form.ejs.js +14 -2
  49. package/lib/templates/tailwind/selectOption/form.ejs.js +3 -3
  50. package/lib/templates/tailwind/selectOption/html.ejs.js +1 -1
  51. package/lib/templates/tailwind/signature/form.ejs.js +3 -3
  52. package/lib/templates/tailwind/survey/form.ejs.js +26 -6
  53. package/lib/templates/tailwind/tab/flat.ejs.js +1 -1
  54. package/lib/templates/tailwind/tab/form.ejs.js +14 -8
  55. package/lib/templates/tailwind/table/form.ejs.js +3 -1
  56. package/lib/templates/tailwind/tableComponents/form.ejs.js +15 -0
  57. package/lib/templates/tailwind/tableComponents/index.d.ts +4 -0
  58. package/lib/templates/tailwind/tableComponents/index.js +4 -0
  59. package/lib/templates/tailwind/webform/builder.ejs.js +1 -1
  60. package/lib/templates/tailwind/wizard/builder.ejs.js +1 -1
  61. package/lib/templates/tailwind/wizard/form.ejs.js +33 -6
  62. package/lib/templates/tailwind/wizardHeader/form.ejs.js +21 -7
  63. package/lib/templates/tailwind/wizardHeaderClassic/form.ejs.js +29 -0
  64. package/lib/templates/tailwind/wizardHeaderClassic/index.d.ts +4 -0
  65. package/lib/templates/tailwind/wizardHeaderClassic/index.js +4 -0
  66. package/lib/templates/tailwind/wizardHeaderVertical/form.ejs.js +31 -0
  67. package/lib/templates/tailwind/wizardHeaderVertical/index.d.ts +4 -0
  68. package/lib/templates/tailwind/wizardHeaderVertical/index.js +4 -0
  69. package/lib/templates/tailwind/wizardNav/form.ejs.js +44 -20
  70. package/package.json +2 -5
  71. package/readme.md +96 -115
  72. package/src/templates/stories/builder.stories.js +8 -23
  73. package/src/templates/stories/pagination.stories.js +1 -6
  74. package/src/templates/stories/wizard.stories.js +8 -23
  75. package/src/templates/tailwind/address/form.ejs +1 -0
  76. package/src/templates/tailwind/address/html.ejs +1 -0
  77. package/src/templates/tailwind/alert/form.ejs +10 -0
  78. package/src/templates/tailwind/alert/index.js +3 -0
  79. package/src/templates/tailwind/builderComponent/form.ejs +42 -6
  80. package/src/templates/tailwind/builderEditForm/form.ejs +53 -49
  81. package/src/templates/tailwind/builderSidebarGroup/form.ejs +3 -3
  82. package/src/templates/tailwind/button/form.ejs +6 -3
  83. package/src/templates/tailwind/checkbox/form.ejs +5 -1
  84. package/src/templates/tailwind/columns/form.ejs +1 -1
  85. package/src/templates/tailwind/componentModal/form.ejs +12 -3
  86. package/src/templates/tailwind/datagrid/form.ejs +13 -12
  87. package/src/templates/tailwind/datagrid/html.ejs +2 -2
  88. package/src/templates/tailwind/day/form.ejs +10 -1
  89. package/src/templates/tailwind/dialog/form.ejs +2 -2
  90. package/src/templates/tailwind/editgrid/form.ejs +3 -3
  91. package/src/templates/tailwind/editgrid/html.ejs +2 -2
  92. package/src/templates/tailwind/editgridTable/form.ejs +55 -0
  93. package/src/templates/tailwind/editgridTable/html.ejs +49 -0
  94. package/src/templates/tailwind/editgridTable/index.ts +4 -0
  95. package/src/templates/tailwind/errorsList/form.ejs +19 -0
  96. package/src/templates/tailwind/errorsList/index.ts +3 -0
  97. package/src/templates/tailwind/field/align.ejs +1 -1
  98. package/src/templates/tailwind/field/form.ejs +1 -1
  99. package/src/templates/tailwind/fieldset/form.ejs +5 -4
  100. package/src/templates/tailwind/file/form.ejs +35 -11
  101. package/src/templates/tailwind/iconClass.ts +3 -6
  102. package/src/templates/tailwind/index.ts +14 -4
  103. package/src/templates/tailwind/input/form.ejs +47 -34
  104. package/src/templates/tailwind/label/form.ejs +7 -2
  105. package/src/templates/tailwind/message/form.ejs +1 -1
  106. package/src/templates/tailwind/modalPreview/form.ejs +13 -2
  107. package/src/templates/tailwind/multiValueTable/form.ejs +1 -1
  108. package/src/templates/tailwind/panel/form.ejs +12 -4
  109. package/src/templates/tailwind/pdfBuilder/form.ejs +0 -1
  110. package/src/templates/tailwind/radio/form.ejs +16 -6
  111. package/src/templates/tailwind/radio/html.ejs +2 -2
  112. package/src/templates/tailwind/resourceAdd/form.ejs +1 -1
  113. package/src/templates/tailwind/select/form.ejs +5 -0
  114. package/src/templates/tailwind/selectOption/form.ejs +2 -2
  115. package/src/templates/tailwind/selectOption/html.ejs +1 -1
  116. package/src/templates/tailwind/signature/form.ejs +3 -3
  117. package/src/templates/tailwind/survey/form.ejs +13 -3
  118. package/src/templates/tailwind/tab/flat.ejs +1 -1
  119. package/src/templates/tailwind/tab/form.ejs +11 -5
  120. package/src/templates/tailwind/table/form.ejs +1 -0
  121. package/src/templates/tailwind/tableComponents/form.ejs +5 -0
  122. package/src/templates/tailwind/tableComponents/index.ts +3 -0
  123. package/src/templates/tailwind/webform/builder.ejs +1 -1
  124. package/src/templates/tailwind/wizard/builder.ejs +1 -1
  125. package/src/templates/tailwind/wizard/form.ejs +28 -7
  126. package/src/templates/tailwind/wizardHeader/form.ejs +9 -4
  127. package/src/templates/tailwind/wizardHeaderClassic/form.ejs +16 -0
  128. package/src/templates/tailwind/wizardHeaderClassic/index.ts +3 -0
  129. package/src/templates/tailwind/wizardHeaderVertical/form.ejs +14 -0
  130. package/src/templates/tailwind/wizardHeaderVertical/index.ts +3 -0
  131. package/src/templates/tailwind/wizardNav/form.ejs +27 -21
  132. package/styles/choices.css +3 -0
  133. package/styles/fieldset.css +5 -0
  134. package/styles/form.css +3 -0
  135. package/styles/index.css +1 -0
  136. package/styles/tables.css +9 -1
  137. package/tsconfig.json +3 -14
  138. package/.eslintrc +0 -40
  139. package/.prettierrc +0 -10
@@ -0,0 +1,69 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.default=function(ctx) {
5
+ var __t, __p = '', __j = Array.prototype.join;
6
+ function print() { __p += __j.call(arguments, '') }
7
+ __p += '<div class="editgrid-table-container">\n <div class="table-responsive">\n <table class="table\n ' +
8
+ ((__t = ( ctx.component.striped ? 'table-striped' : '')) == null ? '' : __t) +
9
+ '\n ' +
10
+ ((__t = ( ctx.component.bordered ? 'table-bordered' : '')) == null ? '' : __t) +
11
+ '\n ' +
12
+ ((__t = ( ctx.component.hover ? 'table-hover' : '')) == null ? '' : __t) +
13
+ '\n ' +
14
+ ((__t = ( ctx.component.condensed ? 'table-sm' : '')) == null ? '' : __t) +
15
+ '\n ">\n ';
16
+ if (ctx.header) { ;
17
+ __p += '\n <thead class="editgrid-table-head">\n ' +
18
+ ((__t = (ctx.header)) == null ? '' : __t) +
19
+ '\n </thead>\n ';
20
+ } ;
21
+ __p += '\n <tbody class="editgrid-table-body">\n ';
22
+ ctx.rows.forEach(function(row, rowIndex) { ;
23
+ __p += '\n <tr ref="' +
24
+ ((__t = (ctx.ref.row)) == null ? '' : __t) +
25
+ '">\n ' +
26
+ ((__t = (row)) == null ? '' : __t) +
27
+ '\n ';
28
+ if (ctx.openRows[rowIndex] && !ctx.readOnly) { ;
29
+ __p += '\n <td class="editgrid-table-column">\n <div class="editgrid-actions">\n <button class="btn btn-primary" ref="' +
30
+ ((__t = (ctx.ref.saveRow)) == null ? '' : __t) +
31
+ '">' +
32
+ ((__t = (ctx.t(ctx.component.saveRow || 'Save', { _userInput: true }))) == null ? '' : __t) +
33
+ '</button>\n ';
34
+ if (ctx.component.removeRow) { ;
35
+ __p += '\n <button class="btn btn-danger" ref="' +
36
+ ((__t = (ctx.ref.cancelRow)) == null ? '' : __t) +
37
+ '">' +
38
+ ((__t = (ctx.t(ctx.component.removeRow || 'Cancel', { _userInput: true }))) == null ? '' : __t) +
39
+ '</button>\n ';
40
+ } ;
41
+ __p += '\n </div>\n </td>\n ';
42
+ } ;
43
+ __p += '\n ';
44
+ if (ctx.errors[rowIndex]) { ;
45
+ __p += '\n <td class="editgrid-table-column">\n <div class="has-error">\n <div class="editgrid-row-error help-block">\n ' +
46
+ ((__t = (ctx.errors[rowIndex])) == null ? '' : __t) +
47
+ '\n </div>\n </div>\n </td>\n ';
48
+ } ;
49
+ __p += '\n </tr>\n ';
50
+ }) ;
51
+ __p += '\n </tbody>\n ';
52
+ if (ctx.footer) { ;
53
+ __p += '\n <tfoot>\n <tr>\n ' +
54
+ ((__t = (ctx.footer)) == null ? '' : __t) +
55
+ '\n </tr>\n <tfoot>\n ';
56
+ } ;
57
+ __p += '\n </table>\n </div>\n</div>\n';
58
+ if (!ctx.readOnly && ctx.hasAddButton) { ;
59
+ __p += '\n<button class="btn btn-primary" ref="' +
60
+ ((__t = (ctx.ref.addRow)) == null ? '' : __t) +
61
+ '">\n <i class="' +
62
+ ((__t = (ctx.iconClass('plus'))) == null ? '' : __t) +
63
+ '"></i>\n ' +
64
+ ((__t = (ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true }))) == null ? '' : __t) +
65
+ '\n</button>\n';
66
+ } ;
67
+ __p += '\n';
68
+ return __p
69
+ }
@@ -0,0 +1,59 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.default=function(ctx) {
5
+ var __t, __p = '', __j = Array.prototype.join;
6
+ function print() { __p += __j.call(arguments, '') }
7
+ __p += '<div class="editgrid-table-container">\n <div class="table-responsive">\n <table class="table\n ' +
8
+ ((__t = ( ctx.component.striped ? 'table-striped' : '')) == null ? '' : __t) +
9
+ '\n ' +
10
+ ((__t = ( ctx.component.bordered ? 'table-bordered' : '')) == null ? '' : __t) +
11
+ '\n ' +
12
+ ((__t = ( ctx.component.hover ? 'table-hover' : '')) == null ? '' : __t) +
13
+ '\n ' +
14
+ ((__t = ( ctx.component.condensed ? 'table-sm' : '')) == null ? '' : __t) +
15
+ '\n ">\n ';
16
+ if (ctx.header) { ;
17
+ __p += '\n <thead class="editgrid-table-head">\n ' +
18
+ ((__t = (ctx.header)) == null ? '' : __t) +
19
+ '\n </thead>\n ';
20
+ } ;
21
+ __p += '\n <tbody class="editgrid-table-body">\n ';
22
+ ctx.rows.forEach(function(row, rowIndex) { ;
23
+ __p += '\n <tr ref="' +
24
+ ((__t = (ctx.ref.row)) == null ? '' : __t) +
25
+ '">\n ' +
26
+ ((__t = (row)) == null ? '' : __t) +
27
+ '\n ';
28
+ if (ctx.openRows[rowIndex] && !ctx.readOnly) { ;
29
+ __p += '\n <td class="editgrid-table-column">\n <div class="editgrid-actions">\n <button class="btn btn-primary" ref="' +
30
+ ((__t = (ctx.ref.saveRow)) == null ? '' : __t) +
31
+ '">' +
32
+ ((__t = (ctx.t(ctx.component.saveRow || 'Save', { _userInput: true }))) == null ? '' : __t) +
33
+ '</button>\n ';
34
+ if (ctx.component.removeRow) { ;
35
+ __p += '\n <button class="btn btn-danger" ref="' +
36
+ ((__t = (ctx.ref.cancelRow)) == null ? '' : __t) +
37
+ '">' +
38
+ ((__t = (ctx.t(ctx.component.removeRow || 'Cancel', { _userInput: true }))) == null ? '' : __t) +
39
+ '</button>\n ';
40
+ } ;
41
+ __p += '\n </div>\n </td>\n ';
42
+ } ;
43
+ __p += '\n ';
44
+ if (ctx.errors[rowIndex]) { ;
45
+ __p += '\n <td class="editgrid-table-column">\n <div class="has-error">\n <div class="editgrid-row-error help-block">\n ' +
46
+ ((__t = (ctx.errors[rowIndex])) == null ? '' : __t) +
47
+ '\n </div>\n </div>\n </td>\n ';
48
+ } ;
49
+ __p += '\n </tr>\n ';
50
+ }) ;
51
+ __p += '\n </tbody>\n ';
52
+ if (ctx.footer) { ;
53
+ __p += '\n <tfoot>\n <tr>\n ' +
54
+ ((__t = (ctx.footer)) == null ? '' : __t) +
55
+ '\n </tr>\n <tfoot>\n ';
56
+ } ;
57
+ __p += '\n </table>\n </div>\n</div>\n';
58
+ return __p
59
+ }
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ form: string;
3
+ html: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var form_ejs_1 = require("./form.ejs");
4
+ var html_ejs_1 = require("./html.ejs");
5
+ exports.default = { form: form_ejs_1.default, html: html_ejs_1.default };
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.default=function(ctx) {
5
+ var __t, __p = '', __j = Array.prototype.join;
6
+ function print() { __p += __j.call(arguments, '') }
7
+ __p += '<p>' +
8
+ ((__t = (ctx.t('error'))) == null ? '' : __t) +
9
+ '\n ';
10
+ if (ctx.options.vpat) { ;
11
+ __p += '\n <span ref="errorTooltip" class="' +
12
+ ((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) +
13
+ '" tabindex="0"></span>\n ';
14
+ } ;
15
+ __p += '\n</p>\n<ul>\n ';
16
+ ctx.errors.forEach(function(err) { ;
17
+ __p += '\n <li>\n <span\n data-component-key = "' +
18
+ ((__t = (err.keyOrPath)) == null ? '' : __t) +
19
+ '"\n ref = "errorRef"\n tabIndex = "0"\n role="link"\n >\n ' +
20
+ ((__t = (err.message)) == null ? '' : __t) +
21
+ '\n </span>\n </li>\n ';
22
+ }) ;
23
+ __p += '\n</ul>\n';
24
+ return __p
25
+ }
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ form: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var form_ejs_1 = require("./form.ejs");
4
+ exports.default = { form: form_ejs_1.default };
@@ -33,7 +33,7 @@ __p += '\n\n <div class="field-content" style="' +
33
33
  '\n </div>\n</div>\n\n';
34
34
  if (ctx.component.description) { ;
35
35
  __p += '\n <div class="form-text text-muted">' +
36
- ((__t = (ctx.t(ctx.component.description))) == null ? '' : __t) +
36
+ ((__t = (ctx.t(ctx.component.description, { _userInput: true }))) == null ? '' : __t) +
37
37
  '</div>\n';
38
38
  } ;
39
39
  __p += '\n';
@@ -26,8 +26,12 @@ __p += '\n ' +
26
26
  } ;
27
27
  __p += '\n';
28
28
  if (ctx.component.description) { ;
29
- __p += '\n <div class="form-text text-muted">' +
30
- ((__t = (ctx.t(ctx.component.description))) == null ? '' : __t) +
29
+ __p += '\n <div id="d-' +
30
+ ((__t = (ctx.instance.id)) == null ? '' : __t) +
31
+ '-' +
32
+ ((__t = (ctx.component.key)) == null ? '' : __t) +
33
+ '" class="form-text text-muted">' +
34
+ ((__t = (ctx.t(ctx.component.description, { _userInput: true }))) == null ? '' : __t) +
31
35
  '</div>\n';
32
36
  } ;
33
37
  __p += '\n';
@@ -4,17 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  exports.default=function(ctx) {
5
5
  var __t, __p = '', __j = Array.prototype.join;
6
6
  function print() { __p += __j.call(arguments, '') }
7
- __p += '<fieldset class="mb-5 mt-5">\n ';
7
+ __p += '<fieldset>\n ';
8
8
  if (ctx.component.legend) { ;
9
- __p += '\n <legend class="text-lg border-b-1 border-solid border-gray-300 w-full mb-3 pb-1" ref="header" class="' +
9
+ __p += '\n <legend ref="header" class="' +
10
10
  ((__t = (ctx.component.collapsible ? 'formio-clickable' : '')) == null ? '' : __t) +
11
11
  '">\n ' +
12
- ((__t = (ctx.t(ctx.component.legend))) == null ? '' : __t) +
12
+ ((__t = (ctx.t(ctx.component.legend, { _userInput: true }))) == null ? '' : __t) +
13
13
  '\n ';
14
14
  if (ctx.component.tooltip) { ;
15
- __p += '\n <i ref="tooltip" class="' +
15
+ __p += '\n <i ref="tooltip" tabindex="0" class="' +
16
16
  ((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) +
17
- '" data-tooltip="' +
17
+ ' text-muted" data-tooltip="' +
18
18
  ((__t = (ctx.component.tooltip)) == null ? '' : __t) +
19
19
  '"></i>\n ';
20
20
  } ;
@@ -28,6 +28,6 @@ __p += '\n <div class="fieldset-body" ref="' +
28
28
  ((__t = (ctx.children)) == null ? '' : __t) +
29
29
  '\n </div>\n ';
30
30
  } ;
31
- __p += '\n</fieldset>\n';
31
+ __p += '\n</fieldset>\n\n';
32
32
  return __p
33
33
  }
@@ -5,7 +5,21 @@ exports.default=function(ctx) {
5
5
  var __t, __p = '', __j = Array.prototype.join;
6
6
  function print() { __p += __j.call(arguments, '') }
7
7
 
8
+ if (ctx.options.vpat) { ;
9
+ __p += '\n <span tabindex="-1" class="sr-only" id="invisible-' +
10
+ ((__t = (ctx.instance.id)) == null ? '' : __t) +
11
+ '-' +
12
+ ((__t = (ctx.component.key)) == null ? '' : __t) +
13
+ '"></span>\n';
14
+ } ;
15
+ __p += '\n';
8
16
  if (!ctx.self.imageUpload) { ;
17
+ __p += '\n ';
18
+ if (ctx.options.vpat) { ;
19
+ __p += '\n <div>' +
20
+ ((__t = ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)) == null ? '' : __t) +
21
+ '</div>\n ';
22
+ } ;
9
23
  __p += '\n <ul class="list-group list-group-striped">\n <li class="list-group-item list-group-header hidden-xs hidden-sm">\n <div class="grid grid-cols-12 gap-4">\n ';
10
24
  if (!ctx.disabled) { ;
11
25
  __p += '\n <div class="md:col-span-1"></div>\n ';
@@ -30,7 +44,7 @@ __p += '\n </div>\n </li>\n ';
30
44
  ctx.files.forEach(function(file) { ;
31
45
  __p += '\n <li class="list-group-item">\n <div class="grid grid-cols-12 gap-4">\n ';
32
46
  if (!ctx.disabled) { ;
33
- __p += '\n <div class="md:col-span-1"><i class="' +
47
+ __p += '\n <div class="md:col-span-1"><i tabindex="0" class="' +
34
48
  ((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +
35
49
  '" ref="removeLink"></i></div>\n ';
36
50
  } ;
@@ -48,9 +62,11 @@ __p += '\n ' +
48
62
  } else { ;
49
63
  __p += '\n <a href="' +
50
64
  ((__t = (file.url || '#')) == null ? '' : __t) +
51
- '" target="_blank" ref="fileLink">' +
65
+ '" target="_blank" ref="fileLink">\n <span class="sr-only">' +
66
+ ((__t = (ctx.t('Press to open '))) == null ? '' : __t) +
67
+ '</span>' +
52
68
  ((__t = (file.originalName || file.name)) == null ? '' : __t) +
53
- '</a>\n ';
69
+ '\n </a>\n ';
54
70
  } ;
55
71
  __p += '\n </div>\n <div class="md:col-span-2">' +
56
72
  ((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +
@@ -65,7 +81,7 @@ __p += '\n <option class="test" value="' +
65
81
  __p += 'selected="selected"';
66
82
  } ;
67
83
  __p += '>' +
68
- ((__t = ( type.label )) == null ? '' : __t) +
84
+ ((__t = (ctx.t(type.label))) == null ? '' : __t) +
69
85
  '</option>\n ';
70
86
  }); ;
71
87
  __p += '\n </select>\n </div>\n ';
@@ -88,7 +104,7 @@ __p += '\n <div>\n <span>\n <img ref="fileImage" src="" alt
88
104
  ((__t = (ctx.component.imageSize)) == null ? '' : __t) +
89
105
  'px">\n ';
90
106
  if (!ctx.disabled) { ;
91
- __p += '\n <i class="' +
107
+ __p += '\n <i tabindex="0" class="' +
92
108
  ((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +
93
109
  '" ref="removeLink"></i>\n ';
94
110
  } ;
@@ -107,26 +123,30 @@ __p += '\n <div class="fileSelector">\n <button class="btn btn-primary"
107
123
  '</button>\n </div>\n ';
108
124
  } else if (!ctx.self.cameraMode) { ;
109
125
  __p += '\n <div class="fileSelector" ref="fileDrop" ' +
110
- ((__t = (ctx.fileDropHidden ? 'hidden' : '')) == null ? '' : __t) +
126
+ ((__t = (ctx.fileDropHidden ?'hidden' : '')) == null ? '' : __t) +
111
127
  '>\n <i class="' +
112
128
  ((__t = (ctx.iconClass('cloud-upload'))) == null ? '' : __t) +
113
129
  '"></i> ' +
114
130
  ((__t = (ctx.t('Drop files to attach,'))) == null ? '' : __t) +
115
131
  '\n ';
116
- if (ctx.self.imageUpload) { ;
132
+ if (ctx.self.imageUpload && ctx.component.webcam) { ;
117
133
  __p += '\n <a href="#" ref="toggleCameraMode"><i class="' +
118
134
  ((__t = (ctx.iconClass('camera'))) == null ? '' : __t) +
119
135
  '"></i> ' +
120
- ((__t = (ctx.t('Use Camera,'))) == null ? '' : __t) +
136
+ ((__t = (ctx.t('use camera'))) == null ? '' : __t) +
121
137
  '</a>\n ';
122
138
  } ;
123
139
  __p += '\n ' +
124
140
  ((__t = (ctx.t('or'))) == null ? '' : __t) +
125
- ' <a href="#" ref="fileBrowse" class="browse">' +
141
+ '\n <a href="#" ref="fileBrowse" class="browse">\n ' +
126
142
  ((__t = (ctx.t('browse'))) == null ? '' : __t) +
127
- '</a>\n </div>\n ';
143
+ '\n <span class="sr-only">\n ' +
144
+ ((__t = (ctx.t('Browse to attach file for ' + ctx.component.label + '. ' +
145
+ (ctx.component.description ? ctx.component.description + '. ' : '') +
146
+ ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)))) == null ? '' : __t) +
147
+ '\n </span>\n </a>\n <div ref="fileProcessingLoader" class="loader-wrapper">\n <div class="loader text-center"></div>\n </div>\n </div>\n ';
128
148
  } else { ;
129
- __p += '\n <div>\n <video class="video" autoplay="true" ref="videoPlayer"></video>\n </div>\n <button class="btn btn-primary" ref="takePictureButton"><i class="fa fa-camera"></i> ' +
149
+ __p += '\n <div class="video-container">\n <video class="video" autoplay="true" ref="videoPlayer" tabindex="-1"></video>\n </div>\n <button class="btn btn-primary" ref="takePictureButton"><i class="fa fa-camera"></i> ' +
130
150
  ((__t = (ctx.t('Take Picture'))) == null ? '' : __t) +
131
151
  '</button>\n <button class="btn btn-primary" ref="toggleCameraMode">' +
132
152
  ((__t = (ctx.t('Switch to file upload'))) == null ? '' : __t) +
@@ -140,9 +160,13 @@ __p += '\n <div class="file ' +
140
160
  ((__t = (ctx.statuses.status === 'error' ? ' has-error' : '')) == null ? '' : __t) +
141
161
  '">\n <div class="grid grid-cols-12 gap-4">\n <div class="fileName col-form-label sm:col-span-10">' +
142
162
  ((__t = (status.originalName)) == null ? '' : __t) +
143
- ' <i class="' +
163
+ '\n <i class="' +
144
164
  ((__t = (ctx.iconClass('remove'))) == null ? '' : __t) +
145
- '" ref="fileStatusRemove"></i></div>\n <div class="fileSize col-form-label sm:col-span-2 text-right">' +
165
+ '" ref="fileStatusRemove">\n <span class="sr-only">' +
166
+ ((__t = (ctx.t('Remove button. Press to remove ' + status.originalName || status.name + '.'))) == null ? '' : __t) +
167
+ '</span>\n <span class="sr-only">' +
168
+ ((__t = (status.message ? status.message.replace(';', '.') : '')) == null ? '' : __t) +
169
+ '</span>\n </i>\n </div>\n <div class="fileSize col-form-label sm:col-span-2 text-right">' +
146
170
  ((__t = (ctx.fileSize(status.size))) == null ? '' : __t) +
147
171
  '</div>\n </div>\n <div class="grid grid-cols-12 gap-4">\n <div class="sm:col-span-12">\n ';
148
172
  if (status.status === 'progress') { ;
@@ -48,6 +48,7 @@ export declare const ICONS: {
48
48
  stop: string;
49
49
  "check-square": string;
50
50
  "remove-circle": string;
51
+ bars: string;
51
52
  };
52
53
  declare const _default: (iconset: string | undefined, name: string, spinning?: boolean) => string;
53
54
  export default _default;
@@ -50,7 +50,8 @@ exports.ICONS = {
50
50
  cubes: "bxs-cube",
51
51
  stop: "bx-stop",
52
52
  "check-square": "bx-checkbox-checked",
53
- "remove-circle": "bx-x-circle"
53
+ "remove-circle": "bx-x",
54
+ bars: "bx-menu"
54
55
  };
55
56
  exports.default = (function (iconset, name, spinning) {
56
57
  if (iconset === "bx") {
@@ -13,9 +13,21 @@ declare const _default: {
13
13
  wizardHeader: {
14
14
  form: string;
15
15
  };
16
+ wizardHeaderClassic: {
17
+ form: string;
18
+ };
19
+ wizardHeaderVertical: {
20
+ form: string;
21
+ };
16
22
  wizardNav: {
17
23
  form: string;
18
24
  };
25
+ errorsList: {
26
+ form: string;
27
+ };
28
+ alert: {
29
+ form: string;
30
+ };
19
31
  treeView: {
20
32
  form: string;
21
33
  };
@@ -78,6 +90,9 @@ declare const _default: {
78
90
  components: {
79
91
  form: string;
80
92
  };
93
+ tableComponents: {
94
+ form: string;
95
+ };
81
96
  container: {
82
97
  form: string;
83
98
  };
@@ -95,6 +110,10 @@ declare const _default: {
95
110
  form: string;
96
111
  html: string;
97
112
  };
113
+ editgridTable: {
114
+ form: string;
115
+ html: string;
116
+ };
98
117
  field: {
99
118
  form: string;
100
119
  align: string;
@@ -26,11 +26,13 @@ var columns_1 = require("./columns");
26
26
  var component_1 = require("./component");
27
27
  var componentModal_1 = require("./componentModal");
28
28
  var components_1 = require("./components");
29
+ var tableComponents_1 = require("./tableComponents");
29
30
  var container_1 = require("./container");
30
31
  var datagrid_1 = require("./datagrid");
31
32
  var day_1 = require("./day");
32
33
  var dialog_1 = require("./dialog");
33
34
  var editgrid_1 = require("./editgrid");
35
+ var editgridTable_1 = require("./editgridTable");
34
36
  var field_1 = require("./field");
35
37
  var fieldset_1 = require("./fieldset");
36
38
  var file_1 = require("./file");
@@ -67,8 +69,12 @@ var webform_1 = require("./webform");
67
69
  var well_1 = require("./well");
68
70
  var wizard_1 = require("./wizard");
69
71
  var wizardHeader_1 = require("./wizardHeader");
72
+ var wizardHeaderClassic_1 = require("./wizardHeaderClassic");
73
+ var wizardHeaderVertical_1 = require("./wizardHeaderVertical");
70
74
  var wizardNav_1 = require("./wizardNav");
71
75
  var cssClasses_1 = require("./cssClasses");
76
+ var errorsList_1 = require("./errorsList");
77
+ var alert_1 = require("./alert");
72
78
  exports.default = __assign(__assign({ transform: function (type, text) {
73
79
  if (!text) {
74
80
  return text;
@@ -76,9 +82,7 @@ exports.default = __assign(__assign({ transform: function (type, text) {
76
82
  switch (type) {
77
83
  case "class":
78
84
  // eslint-disable-next-line no-prototype-builtins
79
- return this.cssClasses.hasOwnProperty(text.toString())
80
- ? this.cssClasses[text.toString()]
81
- : text;
85
+ return this.cssClasses.hasOwnProperty(text.toString()) ? this.cssClasses[text.toString()] : text;
82
86
  }
83
87
  return text;
84
88
  }, defaultIconset: "bx", iconClass: iconClass_1.default,
@@ -98,11 +102,13 @@ exports.default = __assign(__assign({ transform: function (type, text) {
98
102
  component: component_1.default,
99
103
  componentModal: componentModal_1.default,
100
104
  components: components_1.default,
105
+ tableComponents: tableComponents_1.default,
101
106
  container: container_1.default,
102
107
  datagrid: datagrid_1.default,
103
108
  day: day_1.default,
104
109
  dialog: dialog_1.default,
105
110
  editgrid: editgrid_1.default,
111
+ editgridTable: editgridTable_1.default,
106
112
  field: field_1.default,
107
113
  fieldset: fieldset_1.default,
108
114
  file: file_1.default,
@@ -136,4 +142,8 @@ exports.default = __assign(__assign({ transform: function (type, text) {
136
142
  well: well_1.default,
137
143
  wizard: wizard_1.default,
138
144
  wizardHeader: wizardHeader_1.default,
139
- wizardNav: wizardNav_1.default });
145
+ wizardHeaderClassic: wizardHeaderClassic_1.default,
146
+ wizardHeaderVertical: wizardHeaderVertical_1.default,
147
+ wizardNav: wizardNav_1.default,
148
+ errorsList: errorsList_1.default,
149
+ alert: alert_1.default });
@@ -6,74 +6,104 @@ var __t, __p = '', __j = Array.prototype.join;
6
6
  function print() { __p += __j.call(arguments, '') }
7
7
 
8
8
  if (ctx.prefix || ctx.suffix) { ;
9
- __p += '\n<div class="input-group">\n';
9
+ __p += '\n<div class="input-group">\n ';
10
10
  } ;
11
- __p += '\n';
11
+ __p += '\n ';
12
12
  if (ctx.prefix) { ;
13
- __p += '\n<div class="input-group-prepend" ref="prefix">\n <span class="input-group-text">\n ';
13
+ __p += '\n <div class="input-group-prepend" ref="prefix">\n <span class="input-group-text">\n ';
14
14
  if(ctx.prefix instanceof HTMLElement){ ;
15
- __p += '\n ' +
16
- ((__t = ( ctx.t(ctx.prefix.outerHTML) )) == null ? '' : __t) +
17
- '\n ';
15
+ __p += '\n ' +
16
+ ((__t = ( ctx.t(ctx.prefix.outerHTML, { _userInput: true }) )) == null ? '' : __t) +
17
+ '\n ';
18
18
  } else{ ;
19
- __p += '\n ' +
20
- ((__t = ( ctx.t(ctx.prefix) )) == null ? '' : __t) +
21
- '\n ';
19
+ __p += '\n ' +
20
+ ((__t = ( ctx.t(ctx.prefix, { _userInput: true }) )) == null ? '' : __t) +
21
+ '\n ';
22
22
  } ;
23
- __p += '\n </span>\n</div>\n';
23
+ __p += '\n </span>\n </div>\n ';
24
24
  } ;
25
25
  __p += '\n ';
26
26
  if (!ctx.component.editor && !ctx.component.wysiwyg) { ;
27
- __p += '\n<' +
27
+ __p += '\n <' +
28
28
  ((__t = (ctx.input.type)) == null ? '' : __t) +
29
- '\n ref="' +
29
+ '\n ref="' +
30
30
  ((__t = (ctx.input.ref ? ctx.input.ref : 'input')) == null ? '' : __t) +
31
- '"\n ';
31
+ '"\n ';
32
32
  for (var attr in ctx.input.attr) { ;
33
- __p += '\n ' +
33
+ __p += '\n ' +
34
34
  ((__t = (attr)) == null ? '' : __t) +
35
35
  '="' +
36
36
  ((__t = (ctx.input.attr[attr])) == null ? '' : __t) +
37
- '"\n ';
37
+ '"\n ';
38
38
  } ;
39
- __p += '\n id="' +
39
+ __p += '\n id="' +
40
+ ((__t = (ctx.instance.id)) == null ? '' : __t) +
41
+ '-' +
42
+ ((__t = (ctx.component.key)) == null ? '' : __t) +
43
+ '"\n aria-labelledby="l-' +
40
44
  ((__t = (ctx.instance.id)) == null ? '' : __t) +
41
45
  '-' +
42
46
  ((__t = (ctx.component.key)) == null ? '' : __t) +
43
- '"\n>' +
47
+ ' ';
48
+ if (ctx.component.description) { ;
49
+ __p += 'd-' +
50
+ ((__t = (ctx.instance.id)) == null ? '' : __t) +
51
+ '-' +
52
+ ((__t = (ctx.component.key)) == null ? '' : __t);
53
+ } ;
54
+ __p += '"\n aria-required="' +
55
+ ((__t = (ctx.input.ref === 'input' || !ctx.input.ref ? ctx.component.validate.required :
56
+ ctx.component.fields && ctx.component.fields[ctx.input.ref] && ctx.component.fields[ctx.input.ref].required || false)) == null ? '' : __t) +
57
+ '"\n >' +
44
58
  ((__t = (ctx.input.content)) == null ? '' : __t) +
45
59
  '</' +
46
60
  ((__t = (ctx.input.type)) == null ? '' : __t) +
47
- '>\n';
61
+ '>\n ';
62
+ if (ctx.hasValueMaskInput) { ;
63
+ __p += '\n <input ref="valueMaskInput" />\n ';
48
64
  } ;
49
65
  __p += '\n';
50
- if (ctx.component.editor || ctx.component.wysiwyg) { ;
51
- __p += '\n<div ref="input"></div>\n';
52
66
  } ;
53
67
  __p += '\n';
54
- if (ctx.component.showCharCount) { ;
55
- __p += '\n<span class="text-muted pull-right" ref="charcount"></span>\n';
68
+ if (ctx.component.editor || ctx.component.wysiwyg) { ;
69
+ __p += '\n <div ref="input"></div>\n';
56
70
  } ;
57
71
  __p += '\n';
58
- if (ctx.component.showWordCount) { ;
59
- __p += '\n<span class="text-muted pull-right" ref="wordcount"></span>\n';
72
+ if (ctx.component.type === 'datetime') { ;
73
+ __p += '\n<span aria-live="assertive" id="' +
74
+ ((__t = (ctx.instance.id)) == null ? '' : __t) +
75
+ '-liveRegion" class="sr-only" ref="liveRegion"></span>\n';
60
76
  } ;
61
77
  __p += '\n';
62
78
  if (ctx.suffix) { ;
63
- __p += '\n<div class="input-group-append" ref="suffix">\n <span class="input-group-text">\n ';
79
+ __p += '\n <div class="input-group-append" ref="suffix">\n <span class="input-group-text">\n ';
64
80
  if(ctx.suffix instanceof HTMLElement){ ;
65
- __p += '\n ' +
66
- ((__t = ( ctx.t(ctx.suffix.outerHTML) )) == null ? '' : __t) +
67
- '\n ';
81
+ __p += '\n ' +
82
+ ((__t = ( ctx.t(ctx.suffix.outerHTML, { _userInput: true }) )) == null ? '' : __t) +
83
+ '\n ';
68
84
  } else{ ;
69
- __p += '\n ' +
70
- ((__t = ( ctx.t(ctx.suffix) )) == null ? '' : __t) +
71
- '\n ';
85
+ __p += '\n ' +
86
+ ((__t = ( ctx.t(ctx.suffix, { _userInput: true }) )) == null ? '' : __t) +
87
+ '\n ';
72
88
  } ;
73
- __p += '\n </span>\n</div>\n';
89
+ __p += '\n </span>\n </div>\n';
74
90
  } ;
75
91
  __p += '\n';
76
92
  if (ctx.prefix || ctx.suffix) { ;
93
+ __p += '\n </div>\n';
94
+ } ;
95
+ __p += '\n';
96
+ if (ctx.component.showCharCount || ctx.component.showWordCount) { ;
97
+ __p += '\n<div class="form-text ' +
98
+ ((__t = (ctx.component.description ? 'pull-right' : 'text-right')) == null ? '' : __t) +
99
+ '">\n ';
100
+ if (ctx.component.showCharCount) { ;
101
+ __p += '\n <span class="text-muted" ref="charcount" aria-live="polite"></span>\n ';
102
+ } ;
103
+ __p += '\n ';
104
+ if (ctx.component.showWordCount) { ;
105
+ __p += '\n <span class="text-muted" ref="wordcount" aria-live="polite"></span>\n ';
106
+ } ;
77
107
  __p += '\n</div>\n';
78
108
  } ;
79
109
  __p += '\n';
@@ -4,19 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  exports.default=function(ctx) {
5
5
  var __t, __p = '', __j = Array.prototype.join;
6
6
  function print() { __p += __j.call(arguments, '') }
7
- __p += '<label\n class="col-form-label ' +
7
+ __p += '<label\n ref="label"\n class="col-form-label ' +
8
8
  ((__t = (ctx.label.className)) == null ? '' : __t) +
9
9
  '"\n for="' +
10
10
  ((__t = (ctx.instance.id)) == null ? '' : __t) +
11
11
  '-' +
12
12
  ((__t = (ctx.component.key)) == null ? '' : __t) +
13
+ '"\n id="l-' +
14
+ ((__t = (ctx.instance.id)) == null ? '' : __t) +
15
+ '-' +
16
+ ((__t = (ctx.component.key)) == null ? '' : __t) +
13
17
  '"\n>\n ' +
14
- ((__t = ( ctx.t(ctx.component.label) )) == null ? '' : __t) +
18
+ ((__t = ( ctx.t(ctx.component.label, { _userInput: true }) )) == null ? '' : __t) +
15
19
  '\n ';
20
+ if (ctx.component.type === 'number' || ctx.component.type === 'phoneNumber' || ctx.component.type === 'currency') { ;
21
+ __p += '\n <span class=\'sr-only\'>, ' +
22
+ ((__t = (ctx.t('numeric only'))) == null ? '' : __t) +
23
+ ',</span>\n ';
24
+ } ;
25
+ __p += '\n ';
16
26
  if (ctx.component.tooltip) { ;
17
- __p += '\n <i ref="tooltip" class="' +
27
+ __p += '\n <i ref="tooltip" tabindex="0" class="' +
18
28
  ((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) +
19
- '" data-tooltip="' +
29
+ ' text-muted" data-tooltip="' +
20
30
  ((__t = (ctx.component.tooltip)) == null ? '' : __t) +
21
31
  '"></i>\n ';
22
32
  } ;