@tsed/tailwind-formio 1.11.1 → 1.13.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.
- package/dist/tailwind.js +1 -1
- package/gulpfile.js +24 -22
- package/lib/index.d.ts +19 -0
- package/lib/templates/index.d.ts +19 -0
- package/lib/templates/tailwind/address/form.ejs.js +3 -1
- package/lib/templates/tailwind/address/html.ejs.js +16 -0
- package/lib/templates/tailwind/alert/form.ejs.js +27 -0
- package/lib/templates/tailwind/alert/index.d.ts +6 -0
- package/lib/templates/tailwind/alert/index.js +4 -0
- package/lib/templates/tailwind/builderComponent/form.ejs.js +6 -6
- package/lib/templates/tailwind/builderEditForm/form.ejs.js +20 -20
- package/lib/templates/tailwind/builderSidebarGroup/form.ejs.js +3 -3
- package/lib/templates/tailwind/button/form.ejs.js +12 -2
- package/lib/templates/tailwind/checkbox/form.ejs.js +12 -2
- package/lib/templates/tailwind/columns/form.ejs.js +1 -1
- package/lib/templates/tailwind/componentModal/form.ejs.js +31 -3
- package/lib/templates/tailwind/datagrid/form.ejs.js +29 -13
- package/lib/templates/tailwind/datagrid/html.ejs.js +3 -3
- package/lib/templates/tailwind/day/form.ejs.js +21 -1
- package/lib/templates/tailwind/dialog/form.ejs.js +1 -1
- package/lib/templates/tailwind/editgrid/form.ejs.js +4 -4
- package/lib/templates/tailwind/editgrid/html.ejs.js +2 -2
- package/lib/templates/tailwind/editgridTable/form.ejs.js +69 -0
- package/lib/templates/tailwind/editgridTable/html.ejs.js +59 -0
- package/lib/templates/tailwind/editgridTable/index.d.ts +5 -0
- package/lib/templates/tailwind/editgridTable/index.js +5 -0
- package/lib/templates/tailwind/errorsList/form.ejs.js +25 -0
- package/lib/templates/tailwind/errorsList/index.d.ts +4 -0
- package/lib/templates/tailwind/errorsList/index.js +4 -0
- package/lib/templates/tailwind/field/align.ejs.js +1 -1
- package/lib/templates/tailwind/field/form.ejs.js +6 -2
- package/lib/templates/tailwind/fieldset/form.ejs.js +6 -6
- package/lib/templates/tailwind/file/form.ejs.js +37 -13
- package/lib/templates/tailwind/iconClass.d.ts +1 -0
- package/lib/templates/tailwind/iconClass.js +2 -1
- package/lib/templates/tailwind/index.d.ts +19 -0
- package/lib/templates/tailwind/index.js +14 -4
- package/lib/templates/tailwind/input/form.ejs.js +62 -32
- package/lib/templates/tailwind/label/form.ejs.js +14 -4
- package/lib/templates/tailwind/message/form.ejs.js +6 -2
- package/lib/templates/tailwind/modalPreview/form.ejs.js +16 -4
- package/lib/templates/tailwind/multiValueTable/form.ejs.js +1 -1
- package/lib/templates/tailwind/panel/form.ejs.js +18 -4
- package/lib/templates/tailwind/pdfBuilder/form.ejs.js +1 -1
- package/lib/templates/tailwind/radio/form.ejs.js +32 -6
- package/lib/templates/tailwind/radio/html.ejs.js +2 -2
- package/lib/templates/tailwind/resourceAdd/form.ejs.js +1 -1
- package/lib/templates/tailwind/select/form.ejs.js +14 -2
- package/lib/templates/tailwind/selectOption/form.ejs.js +3 -3
- package/lib/templates/tailwind/selectOption/html.ejs.js +1 -1
- package/lib/templates/tailwind/signature/form.ejs.js +3 -3
- package/lib/templates/tailwind/survey/form.ejs.js +26 -6
- package/lib/templates/tailwind/tab/flat.ejs.js +1 -1
- package/lib/templates/tailwind/tab/form.ejs.js +14 -8
- package/lib/templates/tailwind/table/form.ejs.js +3 -1
- package/lib/templates/tailwind/tableComponents/form.ejs.js +15 -0
- package/lib/templates/tailwind/tableComponents/index.d.ts +4 -0
- package/lib/templates/tailwind/tableComponents/index.js +4 -0
- package/lib/templates/tailwind/webform/builder.ejs.js +1 -1
- package/lib/templates/tailwind/wizard/builder.ejs.js +1 -1
- package/lib/templates/tailwind/wizard/form.ejs.js +33 -6
- package/lib/templates/tailwind/wizardHeader/form.ejs.js +21 -7
- package/lib/templates/tailwind/wizardHeaderClassic/form.ejs.js +29 -0
- package/lib/templates/tailwind/wizardHeaderClassic/index.d.ts +4 -0
- package/lib/templates/tailwind/wizardHeaderClassic/index.js +4 -0
- package/lib/templates/tailwind/wizardHeaderVertical/form.ejs.js +31 -0
- package/lib/templates/tailwind/wizardHeaderVertical/index.d.ts +4 -0
- package/lib/templates/tailwind/wizardHeaderVertical/index.js +4 -0
- package/lib/templates/tailwind/wizardNav/form.ejs.js +44 -20
- package/package.json +2 -5
- package/readme.md +96 -115
- package/src/templates/stories/builder.stories.js +8 -23
- package/src/templates/stories/pagination.stories.js +1 -6
- package/src/templates/stories/wizard.stories.js +8 -23
- package/src/templates/tailwind/address/form.ejs +1 -0
- package/src/templates/tailwind/address/html.ejs +1 -0
- package/src/templates/tailwind/alert/form.ejs +10 -0
- package/src/templates/tailwind/alert/index.js +3 -0
- package/src/templates/tailwind/builderComponent/form.ejs +42 -6
- package/src/templates/tailwind/builderEditForm/form.ejs +53 -49
- package/src/templates/tailwind/builderSidebarGroup/form.ejs +3 -3
- package/src/templates/tailwind/button/form.ejs +6 -3
- package/src/templates/tailwind/checkbox/form.ejs +5 -1
- package/src/templates/tailwind/columns/form.ejs +1 -1
- package/src/templates/tailwind/componentModal/form.ejs +12 -3
- package/src/templates/tailwind/datagrid/form.ejs +13 -12
- package/src/templates/tailwind/datagrid/html.ejs +2 -2
- package/src/templates/tailwind/day/form.ejs +10 -1
- package/src/templates/tailwind/dialog/form.ejs +2 -2
- package/src/templates/tailwind/editgrid/form.ejs +3 -3
- package/src/templates/tailwind/editgrid/html.ejs +2 -2
- package/src/templates/tailwind/editgridTable/form.ejs +55 -0
- package/src/templates/tailwind/editgridTable/html.ejs +49 -0
- package/src/templates/tailwind/editgridTable/index.ts +4 -0
- package/src/templates/tailwind/errorsList/form.ejs +19 -0
- package/src/templates/tailwind/errorsList/index.ts +3 -0
- package/src/templates/tailwind/field/align.ejs +1 -1
- package/src/templates/tailwind/field/form.ejs +1 -1
- package/src/templates/tailwind/fieldset/form.ejs +5 -4
- package/src/templates/tailwind/file/form.ejs +35 -11
- package/src/templates/tailwind/iconClass.ts +3 -6
- package/src/templates/tailwind/index.ts +14 -4
- package/src/templates/tailwind/input/form.ejs +47 -34
- package/src/templates/tailwind/label/form.ejs +7 -2
- package/src/templates/tailwind/message/form.ejs +1 -1
- package/src/templates/tailwind/modalPreview/form.ejs +13 -2
- package/src/templates/tailwind/multiValueTable/form.ejs +1 -1
- package/src/templates/tailwind/panel/form.ejs +12 -4
- package/src/templates/tailwind/pdfBuilder/form.ejs +0 -1
- package/src/templates/tailwind/radio/form.ejs +16 -6
- package/src/templates/tailwind/radio/html.ejs +2 -2
- package/src/templates/tailwind/resourceAdd/form.ejs +1 -1
- package/src/templates/tailwind/select/form.ejs +5 -0
- package/src/templates/tailwind/selectOption/form.ejs +2 -2
- package/src/templates/tailwind/selectOption/html.ejs +1 -1
- package/src/templates/tailwind/signature/form.ejs +3 -3
- package/src/templates/tailwind/survey/form.ejs +13 -3
- package/src/templates/tailwind/tab/flat.ejs +1 -1
- package/src/templates/tailwind/tab/form.ejs +11 -5
- package/src/templates/tailwind/table/form.ejs +1 -0
- package/src/templates/tailwind/tableComponents/form.ejs +5 -0
- package/src/templates/tailwind/tableComponents/index.ts +3 -0
- package/src/templates/tailwind/webform/builder.ejs +1 -1
- package/src/templates/tailwind/wizard/builder.ejs +1 -1
- package/src/templates/tailwind/wizard/form.ejs +28 -7
- package/src/templates/tailwind/wizardHeader/form.ejs +9 -4
- package/src/templates/tailwind/wizardHeaderClassic/form.ejs +16 -0
- package/src/templates/tailwind/wizardHeaderClassic/index.ts +3 -0
- package/src/templates/tailwind/wizardHeaderVertical/form.ejs +14 -0
- package/src/templates/tailwind/wizardHeaderVertical/index.ts +3 -0
- package/src/templates/tailwind/wizardNav/form.ejs +27 -21
- package/styles/alert.css +9 -0
- package/styles/choices.css +3 -0
- package/styles/fieldset.css +5 -0
- package/styles/form.css +3 -0
- package/styles/index.css +1 -0
- package/styles/tables.css +9 -1
- package/tsconfig.json +3 -14
- package/.eslintrc +0 -40
- package/.prettierrc +0 -10
|
@@ -1,22 +1,58 @@
|
|
|
1
1
|
<div class="builder-component" ref="dragComponent">
|
|
2
2
|
{% if (!ctx.disableBuilderActions) { %}
|
|
3
3
|
<div class="component-btn-group" data-noattach="true">
|
|
4
|
-
<button
|
|
4
|
+
<button
|
|
5
|
+
role="button"
|
|
6
|
+
aria-label="Remove button. Click to remove component from the form"
|
|
7
|
+
tabindex="-1"
|
|
8
|
+
class="btn btn-xxs btn-danger component-settings-button component-settings-button-remove"
|
|
9
|
+
ref="removeComponent"
|
|
10
|
+
>
|
|
5
11
|
<i class="{{ctx.iconClass('remove')}}"></i>
|
|
6
12
|
</button>
|
|
7
|
-
<button
|
|
13
|
+
<button
|
|
14
|
+
role="button"
|
|
15
|
+
aria-label="Copy button. Click to copy component"
|
|
16
|
+
tabindex="-1"
|
|
17
|
+
class="btn btn-xxs btn-default component-settings-button component-settings-button-copy"
|
|
18
|
+
ref="copyComponent"
|
|
19
|
+
>
|
|
8
20
|
<i class="{{ctx.iconClass('copy')}}"></i>
|
|
9
21
|
</button>
|
|
10
|
-
<button
|
|
22
|
+
<button
|
|
23
|
+
role="button"
|
|
24
|
+
aria-label="Paste below button. Click to paste component below the current component"
|
|
25
|
+
tabindex="-1"
|
|
26
|
+
class="btn btn-xxs btn-default component-settings-button component-settings-button-paste"
|
|
27
|
+
ref="pasteComponent"
|
|
28
|
+
>
|
|
11
29
|
<i class="{{ctx.iconClass('save')}}"></i>
|
|
12
30
|
</button>
|
|
13
|
-
<button
|
|
31
|
+
<button
|
|
32
|
+
role="button"
|
|
33
|
+
aria-label="Edit json button. Click to edit json of the current component"
|
|
34
|
+
tabindex="-1"
|
|
35
|
+
class="btn btn-xxs btn-default component-settings-button component-settings-button-edit-json"
|
|
36
|
+
ref="editJson"
|
|
37
|
+
>
|
|
14
38
|
<i class="{{ctx.iconClass('wrench')}}"></i>
|
|
15
39
|
</button>
|
|
16
|
-
<button
|
|
40
|
+
<button
|
|
41
|
+
role="button"
|
|
42
|
+
aria-label="Move button"
|
|
43
|
+
tabindex="-1"
|
|
44
|
+
class="btn btn-xxs btn-default component-settings-button component-settings-button-move"
|
|
45
|
+
ref="moveComponent"
|
|
46
|
+
>
|
|
17
47
|
<i class="{{ctx.iconClass('move')}}"></i>
|
|
18
48
|
</button>
|
|
19
|
-
<button
|
|
49
|
+
<button
|
|
50
|
+
role="button"
|
|
51
|
+
aria-label="Edit button. Click to open component settings modal window"
|
|
52
|
+
tabindex="-1"
|
|
53
|
+
class="btn btn-xxs btn-secondary component-settings-button component-settings-button-edit"
|
|
54
|
+
ref="editComponent"
|
|
55
|
+
>
|
|
20
56
|
<i class="{{ctx.iconClass('cog')}}"></i>
|
|
21
57
|
</button>
|
|
22
58
|
</div>
|
|
@@ -1,58 +1,62 @@
|
|
|
1
1
|
<div class="flex flex-col w-full h-full">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<div class="col-span-6 flex justify-end items-center pr-15">
|
|
9
|
-
<a class="reset-link inline-flex items-center text-secondary text-decoration-none hover:text-primary" href="{{ctx.t(ctx.helplinks + ctx.componentInfo.documentation)}}" target="_blank">
|
|
10
|
-
<i class="{{ctx.iconClass('new-window')}} mr-1"></i> {{ctx.t('Help')}}
|
|
11
|
-
</a>
|
|
12
|
-
</div>
|
|
13
|
-
{% } %}
|
|
2
|
+
<div>
|
|
3
|
+
<div class="grid grid-cols-12 gap-4">
|
|
4
|
+
<div class="col-span-6">
|
|
5
|
+
<div class="text-md px-3 py-3">
|
|
6
|
+
{{ctx.t(ctx.componentInfo.title, { _userInput: true })}}
|
|
7
|
+
{{ctx.t('Component')}}
|
|
14
8
|
</div>
|
|
9
|
+
</div>
|
|
10
|
+
{% if (ctx.helplinks) { %}
|
|
11
|
+
<div class="col-span-6 flex justify-end items-center pr-15">
|
|
12
|
+
<a class="reset-link inline-flex items-center text-secondary text-decoration-none hover:text-primary"
|
|
13
|
+
href="{{ctx.t(ctx.helplinks + ctx.componentInfo.documentation)}}" target="_blank">
|
|
14
|
+
<i class="{{ctx.iconClass('new-window')}} mr-1"></i> {{ctx.t('Help')}}
|
|
15
|
+
</a>
|
|
16
|
+
</div>
|
|
17
|
+
{% } %}
|
|
15
18
|
</div>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
{% if (ctx.componentInfo.help) { %}
|
|
36
|
-
<div class="card card-body bg-light formio-settings-help">
|
|
37
|
-
{{ ctx.t(ctx.componentInfo.help) }}
|
|
38
|
-
</div>
|
|
39
|
-
{% } %}
|
|
19
|
+
</div>
|
|
20
|
+
<div class="overflow-auto flex-1 p-3 pt-0" style="max-height: calc(90vh - 95px)">
|
|
21
|
+
<div class="grid grid-cols-12 gap-4">
|
|
22
|
+
<div class="{% if (ctx.preview) { %}col-span-12 sm:col-span-6{% } else { %}col-span-12{% } %}">
|
|
23
|
+
<div ref="editForm">
|
|
24
|
+
{{ctx.editForm}}
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
{% if (ctx.preview) { %}
|
|
28
|
+
<div class="col-span-12 sm:col-span-6">
|
|
29
|
+
<div class="card panel preview-panel">
|
|
30
|
+
<div class="card-header">
|
|
31
|
+
<div class="text-sm">{{ctx.t('Preview')}}</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="card-body">
|
|
34
|
+
<div class="component-preview" ref="preview">
|
|
35
|
+
{{ctx.preview}}
|
|
40
36
|
</div>
|
|
41
|
-
|
|
37
|
+
</div>
|
|
42
38
|
</div>
|
|
39
|
+
{% if (ctx.componentInfo.help) { %}
|
|
40
|
+
<div class="card card-body bg-light formio-settings-help">
|
|
41
|
+
{{ ctx.t(ctx.componentInfo.help) }}
|
|
42
|
+
</div>
|
|
43
|
+
{% } %}
|
|
44
|
+
</div>
|
|
45
|
+
{% } %}
|
|
43
46
|
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</
|
|
47
|
+
</div>
|
|
48
|
+
<div class="bg-white p-2 flex justify-center">
|
|
49
|
+
<button class="btn btn-primary mx-2" ref="saveButton">
|
|
50
|
+
{{ctx.t('Save')}}
|
|
51
|
+
</button>
|
|
52
|
+
<button class="btn btn-dark mx-2" ref="cancelButton">
|
|
53
|
+
{{ctx.t('Cancel')}}
|
|
54
|
+
</button>
|
|
55
|
+
<button class="btn btn-danger mx-2" ref="removeButton">
|
|
56
|
+
<i class="{{ctx.iconClass('remove')}} sm:mr-2"></i>
|
|
57
|
+
<span class="hidden sm:inline">{{ctx.t('Remove')}}</span>
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
56
60
|
</div>
|
|
57
61
|
|
|
58
62
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<div id="group-container-{{ctx.groupKey}}" class="card-body no-drop p-2" ref="sidebar-container">
|
|
27
27
|
{% if (ctx.group.componentOrder.length || ctx.subgroups.length) { %}
|
|
28
28
|
{% !ctx.group.componentOrder || ctx.group.componentOrder.forEach(function(componentKey) { %}
|
|
29
|
-
<
|
|
29
|
+
<span
|
|
30
30
|
data-group="{{ctx.groupKey}}"
|
|
31
31
|
data-key="{{ctx.group.components[componentKey].key}}"
|
|
32
32
|
data-type="{{ctx.group.components[componentKey].schema.type}}"
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
{% if (ctx.group.components[componentKey].icon) { %}
|
|
36
36
|
<i class="{{ctx.iconClass(ctx.group.components[componentKey].icon)}}" style="margin-right: 5px;"></i>
|
|
37
37
|
{% } %}
|
|
38
|
-
{{ctx.t(ctx.group.components[componentKey].title)}}
|
|
39
|
-
</
|
|
38
|
+
{{ctx.t(ctx.group.components[componentKey].title, { _userInput: true })}}
|
|
39
|
+
</span>
|
|
40
40
|
{% }) %}
|
|
41
41
|
{{ctx.subgroups.join('')}}
|
|
42
42
|
{% } else { %}
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
{% for (var attr in ctx.input.attr) { %}
|
|
4
4
|
{{attr}}="{{ctx.input.attr[attr]}}"
|
|
5
5
|
{% } %}
|
|
6
|
+
{% if (ctx.component.description) { %}
|
|
7
|
+
aria-describedby="d-{{ctx.instance.id}}-{{ctx.component.key}}"
|
|
8
|
+
{% } %}
|
|
6
9
|
>
|
|
7
|
-
{% if (ctx.component.leftIcon) { %}<span class="{{ctx.component.leftIcon}}"></span
|
|
10
|
+
{% if (ctx.component.leftIcon) { %}<span class="{{ctx.component.leftIcon}}"></span> {% } %}
|
|
8
11
|
{% if (ctx.input.content) { %}<span>{{ctx.input.content}}</span> {% } %}
|
|
9
12
|
{% if (ctx.component.tooltip) { %}
|
|
10
|
-
<i ref="tooltip" class="{{ctx.iconClass('question-sign')}}"></i>
|
|
13
|
+
<i ref="tooltip" class="{{ctx.iconClass('question-sign')}} text-muted" data-tooltip="{{ctx.component.tooltip}}"></i>
|
|
11
14
|
{% } %}
|
|
12
|
-
{% if (ctx.component.rightIcon) { %}
|
|
15
|
+
{% if (ctx.component.rightIcon) { %} <span class="{{ctx.component.rightIcon}}"></span>{% } %}
|
|
13
16
|
</{{ctx.input.type}}>
|
|
14
17
|
<div ref="buttonMessageContainer">
|
|
15
18
|
<span class="help-block" ref="buttonMessage"></span>
|
|
@@ -6,10 +6,14 @@
|
|
|
6
6
|
{{attr}}="{{ctx.input.attr[attr]}}"
|
|
7
7
|
{% } %}
|
|
8
8
|
{% if (ctx.checked) { %}checked=true{% } %}
|
|
9
|
+
aria-required="{{ctx.component.validate.required}}"
|
|
10
|
+
{% if (ctx.component.description) { %}
|
|
11
|
+
aria-describedby="d-{{ctx.instance.id}}-{{ctx.component.key}}"
|
|
12
|
+
{% } %}
|
|
9
13
|
>
|
|
10
14
|
{% if (!ctx.self.labelIsHidden()) { %}<span>{{ctx.input.label}}</span>{% } %}
|
|
11
15
|
{% if (ctx.component.tooltip) { %}
|
|
12
|
-
<i ref="tooltip" class="{{ctx.iconClass('question-sign')}}" data-tooltip="{{ctx.component.tooltip}}"></i>
|
|
16
|
+
<i ref="tooltip" tabindex="0" class="{{ctx.iconClass('question-sign')}} text-muted" data-tooltip="{{ctx.component.tooltip}}"></i>
|
|
13
17
|
{% } %}
|
|
14
18
|
{{ctx.input.content}}
|
|
15
19
|
</{{ctx.input.type}}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{% ctx.component.columns.forEach(function(column, index) { %}
|
|
2
2
|
<div class="
|
|
3
|
-
col-{{column.size}}-{{column.width}}
|
|
3
|
+
col-{{column.size}}-{{column.currentWidth || column.width}}
|
|
4
4
|
col-{{column.size}}-offset-{{column.offset}}
|
|
5
5
|
col-{{column.size}}-push-{{column.push}}
|
|
6
6
|
col-{{column.size}}-pull-{{column.pull}}
|
|
@@ -2,16 +2,25 @@
|
|
|
2
2
|
<div ref="openModalWrapper"></div>
|
|
3
3
|
<div class="formio-dialog formio-dialog-theme-default component-rendering-hidden" ref="modalWrapper">
|
|
4
4
|
<div class="formio-dialog-overlay" ref="modalOverlay"></div>
|
|
5
|
-
<div class="formio-dialog-content" ref="modalContents">
|
|
5
|
+
<div class="formio-dialog-content" aria-labelledby="ml-{{ctx.instance.id}}-{{ctx.component.key}}" {% if (!ctx.self.isIE()) { %} role="dialog" {% } %} ref="modalContents">
|
|
6
|
+
<label class="sr-only" id="ml-{{ctx.instance.id}}-{{ctx.component.key}}">{{ ctx.t(ctx.component.label) }}{{ctx.self.isIE() ? ', dialog' : ''}}</label>
|
|
7
|
+
{% if (ctx.options.vpat) { %}
|
|
8
|
+
<button class="formio-dialog-close float-right" title="Close" aria-label="Close button. Click to get back to the form" ref="modalCloseButton"></button>
|
|
9
|
+
{% } else { %}
|
|
10
|
+
<button class="formio-dialog-close float-right btn btn-secondary btn-sm" aria-label="Close button. Click to get back to the form" ref="modalClose"></button>
|
|
11
|
+
{% } %}
|
|
6
12
|
<div ref="modalContents">
|
|
7
13
|
{% if (ctx.visible) { %}
|
|
8
14
|
{{ctx.children}}
|
|
9
15
|
{% } %}
|
|
10
16
|
<div class="formio-dialog-buttons">
|
|
11
|
-
|
|
17
|
+
{% if (ctx.options.vpat) { %}
|
|
18
|
+
<button class="btn btn-secondary formio-dialog-button" aria-label="Cancel button. Click to cancel the changes and get back to the form." ref="modalClose">{{ctx.t('Cancel')}}</button>
|
|
19
|
+
{% } %}
|
|
20
|
+
<button class="btn btn-success formio-dialog-button" ref="modalSave" aria-label="Save button. Click to save the changes and get back to the form.">{{ctx.t('Save')}}</button>
|
|
12
21
|
</div>
|
|
13
22
|
</div>
|
|
14
|
-
<button class="formio-dialog-close float-right btn btn-secondary btn-sm" aria-label="close" ref="modalClose"></button>
|
|
15
23
|
</div>
|
|
24
|
+
<span class="sr-only" ref="modalLiveRegion" aria-live="assertive"></span>
|
|
16
25
|
</div>
|
|
17
26
|
</div>
|
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
{% if (ctx.component.reorder) { %}<th></th>{% } %}
|
|
10
10
|
{% ctx.columns.forEach(function(col) { %}
|
|
11
11
|
<th class="{{col.validate && col.validate.required ? 'field-required' : ''}}">
|
|
12
|
-
{{ col.hideLabel ? '' : ctx.t(col.label || col.title) }}
|
|
13
|
-
{% if (col.tooltip) { %} <i ref="tooltip" data-title="{{col.tooltip}}" class="{{ctx.iconClass('question-sign')}}" data-tooltip="{{col.tooltip}}"></i>{% } %}
|
|
12
|
+
{{ col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) }}
|
|
13
|
+
{% if (col.tooltip) { %} <i ref="tooltip" tabindex="0" data-title="{{col.tooltip}}" class="{{ctx.iconClass('question-sign')}} text-muted" data-tooltip="{{col.tooltip}}"></i>{% } %}
|
|
14
14
|
</th>
|
|
15
15
|
{% }) %}
|
|
16
16
|
{% if (ctx.hasExtraColumn) { %}
|
|
17
17
|
<th>
|
|
18
|
+
<span class="sr-only">{{ ctx.t('Add/Remove') }}</span>
|
|
18
19
|
{% if (!ctx.builder && ctx.hasAddButton && ctx.hasTopSubmit) { %}
|
|
19
20
|
<button class="btn btn-primary formio-button-add-row" ref="{{ctx.datagridKey}}-addRow" tabindex="{{ctx.tabIndex}}">
|
|
20
|
-
<i class="{{ctx.iconClass('plus')}}
|
|
21
|
+
<i class="{{ctx.iconClass('plus')}}"></i>{{ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true })}}
|
|
21
22
|
</button>
|
|
22
23
|
{% } %}
|
|
23
24
|
</th>
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
</tr>
|
|
26
27
|
</thead>
|
|
27
28
|
{% } %}
|
|
28
|
-
<tbody ref="{{ctx.datagridKey}}-tbody">
|
|
29
|
+
<tbody ref="{{ctx.datagridKey}}-tbody" data-key="{{ctx.datagridKey}}">
|
|
29
30
|
{% ctx.rows.forEach(function(row, index) { %}
|
|
30
31
|
{% if (ctx.hasGroups && ctx.groups[index]) { %}
|
|
31
32
|
<tr ref="{{ctx.datagridKey}}-group-header" class="datagrid-group-header{{ctx.hasToggle ? ' clickable' : ''}}">
|
|
@@ -37,19 +38,19 @@
|
|
|
37
38
|
{% } %}
|
|
38
39
|
<tr ref="{{ctx.datagridKey}}-row">
|
|
39
40
|
{% if (ctx.component.reorder) { %}
|
|
40
|
-
<td>
|
|
41
|
-
<button type="button" class="formio-drag-button btn btn-
|
|
41
|
+
<td class="align-middle">
|
|
42
|
+
<button type="button" class="formio-drag-button btn btn-sm btn-light {{ctx.iconClass('bars')}}" data-key="{{ctx.datagridKey}}"></button>
|
|
42
43
|
</td>
|
|
43
44
|
{% } %}
|
|
44
45
|
{% ctx.columns.forEach(function(col) { %}
|
|
45
|
-
<td ref="{{ctx.datagridKey}}">
|
|
46
|
+
<td ref="{{ctx.datagridKey}}" {% if (col.key && col.overlay && col.overlay.width) { %} style="width: {{col.overlay.width + 'px'}}"{% } %} >
|
|
46
47
|
{{row[col.key]}}
|
|
47
48
|
</td>
|
|
48
49
|
{% }) %}
|
|
49
50
|
{% if (ctx.hasExtraColumn) { %}
|
|
50
|
-
{% if (
|
|
51
|
-
<td>
|
|
52
|
-
<button type="button" class="btn btn-
|
|
51
|
+
{% if (ctx.hasRemoveButtons) { %}
|
|
52
|
+
<td class="align-middle">
|
|
53
|
+
<button type="button" class="btn btn-light btn-sm formio-button-remove-row" ref="{{ctx.datagridKey}}-removeRow" tabindex="{{ctx.tabIndex}}" aria-label="{{ctx.t('remove')}}">
|
|
53
54
|
<i class="{{ctx.iconClass('remove-circle')}}"></i>
|
|
54
55
|
</button>
|
|
55
56
|
</td>
|
|
@@ -66,9 +67,9 @@
|
|
|
66
67
|
{% if (!ctx.builder && ctx.hasAddButton && ctx.hasBottomSubmit) { %}
|
|
67
68
|
<tfoot>
|
|
68
69
|
<tr>
|
|
69
|
-
<td colspan="{{ctx.numColumns + 1}}">
|
|
70
|
+
<td colspan="{{ctx.component.layoutFixed ? ctx.numColumns : ctx.numColumns + 1}}">
|
|
70
71
|
<button class="btn btn-primary formio-button-add-row" ref="{{ctx.datagridKey}}-addRow" tabindex="{{ctx.tabIndex}}">
|
|
71
|
-
<i class="{{ctx.iconClass('plus')}} mr-1"></i> {{ctx.t(ctx.component.addAnother || 'Add Another')}}
|
|
72
|
+
<i class="{{ctx.iconClass('plus')}} mr-1"></i> {{ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true })}}
|
|
72
73
|
</button>
|
|
73
74
|
</td>
|
|
74
75
|
</tr>
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<tr>
|
|
9
9
|
{% ctx.columns.forEach(function(col) { %}
|
|
10
10
|
<th class="{{col.validate && col.validate.required ? 'field-required' : ''}}">
|
|
11
|
-
{{ col.hideLabel ? '' : ctx.t(col.label || col.title) }}
|
|
12
|
-
{% if (col.tooltip) { %} <i ref="tooltip" data-title="{{col.tooltip}}" class="{{ctx.iconClass('question-sign')}}" data-tooltip="{{col.tooltip}}"></i>{% } %}
|
|
11
|
+
{{ col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) }}
|
|
12
|
+
{% if (col.tooltip) { %} <i ref="tooltip" tabindex="0" data-title="{{col.tooltip}}" class="{{ctx.iconClass('question-sign')}} text-muted" data-tooltip="{{col.tooltip}}"></i>{% } %}
|
|
13
13
|
</th>
|
|
14
14
|
{% }) %}
|
|
15
15
|
</tr>
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
<div class="grid grid-cols-12 gap-4"
|
|
1
|
+
<div class="grid grid-cols-12 gap-4"
|
|
2
|
+
{% if (ctx.component.hideLabel) { %}
|
|
3
|
+
aria-label="{{ctx.component.label}}"
|
|
4
|
+
{% } else { %}
|
|
5
|
+
aria-labelledby="l-{{ctx.instance.id}}-{{ctx.component.key}}"
|
|
6
|
+
{% } %}
|
|
7
|
+
{% if (ctx.component.description) { %}
|
|
8
|
+
aria-describedby="d-{{ctx.instance.id}}-{{ctx.component.key}}"
|
|
9
|
+
{% } %}
|
|
10
|
+
>
|
|
2
11
|
{% if (ctx.dayFirst && ctx.showDay) { %}
|
|
3
12
|
<div class="col-span-3">
|
|
4
13
|
{% if (!ctx.component.hideInputLabels) { %}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div class="formio-dialog formio-dialog-theme-default component-settings">
|
|
2
2
|
<div class="formio-dialog-overlay" ref="dialogOverlay"></div>
|
|
3
|
-
<div class="formio-dialog-content" ref="dialogContents">
|
|
3
|
+
<div class="formio-dialog-content" ref="dialogContents" role="dialog">
|
|
4
4
|
<div ref="dialogContents"></div>
|
|
5
|
-
<button class="formio-dialog-close float-right btn btn-secondary btn-sm" aria-label="
|
|
5
|
+
<button class="formio-dialog-close float-right btn btn-secondary btn-sm" aria-label="Close modal window." ref="dialogClose"></button>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
{{row}}
|
|
15
15
|
{% if (ctx.openRows[rowIndex] && !ctx.readOnly) { %}
|
|
16
16
|
<div class="editgrid-actions">
|
|
17
|
-
<button class="btn btn-primary" ref="{{ctx.ref.saveRow}}">{{ctx.t(ctx.component.saveRow || 'Save')}}</button>
|
|
17
|
+
<button class="btn btn-primary" ref="{{ctx.ref.saveRow}}">{{ctx.t(ctx.component.saveRow || 'Save', { _userInput: true })}}</button>
|
|
18
18
|
{% if (ctx.component.removeRow) { %}
|
|
19
|
-
<button class="btn btn-danger" ref="{{ctx.ref.cancelRow}}">{{ctx.t(ctx.component.removeRow || 'Cancel')}}</button>
|
|
19
|
+
<button class="btn btn-danger" ref="{{ctx.ref.cancelRow}}">{{ctx.t(ctx.component.removeRow || 'Cancel', { _userInput: true })}}</button>
|
|
20
20
|
{% } %}
|
|
21
21
|
</div>
|
|
22
22
|
{% } %}
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
</ul>
|
|
36
36
|
{% if (!ctx.readOnly && ctx.hasAddButton) { %}
|
|
37
37
|
<button class="btn btn-primary" ref="{{ctx.ref.addRow}}">
|
|
38
|
-
<i class="{{ctx.iconClass('plus')}}
|
|
38
|
+
<i class="{{ctx.iconClass('plus')}}"></i> {{ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true })}}
|
|
39
39
|
</button>
|
|
40
40
|
{% } %}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
{{row}}
|
|
15
15
|
{% if (ctx.openRows[rowIndex] && !ctx.readOnly) { %}
|
|
16
16
|
<div class="editgrid-actions">
|
|
17
|
-
<button class="btn btn-primary" ref="{{ctx.ref.saveRow}}">{{ctx.t(ctx.component.saveRow || 'Save')}}</button>
|
|
17
|
+
<button class="btn btn-primary" ref="{{ctx.ref.saveRow}}">{{ctx.t(ctx.component.saveRow || 'Save', { _userInput: true })}}</button>
|
|
18
18
|
{% if (ctx.component.removeRow) { %}
|
|
19
|
-
<button class="btn btn-danger" ref="{{ctx.ref.cancelRow}}">{{ctx.t(ctx.component.removeRow || 'Cancel')}}</button>
|
|
19
|
+
<button class="btn btn-danger" ref="{{ctx.ref.cancelRow}}">{{ctx.t(ctx.component.removeRow || 'Cancel', { _userInput: true })}}</button>
|
|
20
20
|
{% } %}
|
|
21
21
|
</div>
|
|
22
22
|
{% } %}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<div class="editgrid-table-container">
|
|
2
|
+
<div class="table-responsive">
|
|
3
|
+
<table class="table
|
|
4
|
+
{{ ctx.component.striped ? 'table-striped' : ''}}
|
|
5
|
+
{{ ctx.component.bordered ? 'table-bordered' : ''}}
|
|
6
|
+
{{ ctx.component.hover ? 'table-hover' : ''}}
|
|
7
|
+
{{ ctx.component.condensed ? 'table-sm' : ''}}
|
|
8
|
+
">
|
|
9
|
+
{% if (ctx.header) { %}
|
|
10
|
+
<thead class="editgrid-table-head">
|
|
11
|
+
{{ctx.header}}
|
|
12
|
+
</thead>
|
|
13
|
+
{% } %}
|
|
14
|
+
<tbody class="editgrid-table-body">
|
|
15
|
+
{% ctx.rows.forEach(function(row, rowIndex) { %}
|
|
16
|
+
<tr ref="{{ctx.ref.row}}">
|
|
17
|
+
{{row}}
|
|
18
|
+
{% if (ctx.openRows[rowIndex] && !ctx.readOnly) { %}
|
|
19
|
+
<td class="editgrid-table-column">
|
|
20
|
+
<div class="editgrid-actions">
|
|
21
|
+
<button class="btn btn-primary" ref="{{ctx.ref.saveRow}}">{{ctx.t(ctx.component.saveRow || 'Save', { _userInput: true })}}</button>
|
|
22
|
+
{% if (ctx.component.removeRow) { %}
|
|
23
|
+
<button class="btn btn-danger" ref="{{ctx.ref.cancelRow}}">{{ctx.t(ctx.component.removeRow || 'Cancel', { _userInput: true })}}</button>
|
|
24
|
+
{% } %}
|
|
25
|
+
</div>
|
|
26
|
+
</td>
|
|
27
|
+
{% } %}
|
|
28
|
+
{% if (ctx.errors[rowIndex]) { %}
|
|
29
|
+
<td class="editgrid-table-column">
|
|
30
|
+
<div class="has-error">
|
|
31
|
+
<div class="editgrid-row-error help-block">
|
|
32
|
+
{{ctx.errors[rowIndex]}}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</td>
|
|
36
|
+
{% } %}
|
|
37
|
+
</tr>
|
|
38
|
+
{% }) %}
|
|
39
|
+
</tbody>
|
|
40
|
+
{% if (ctx.footer) { %}
|
|
41
|
+
<tfoot>
|
|
42
|
+
<tr>
|
|
43
|
+
{{ctx.footer}}
|
|
44
|
+
</tr>
|
|
45
|
+
<tfoot>
|
|
46
|
+
{% } %}
|
|
47
|
+
</table>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
{% if (!ctx.readOnly && ctx.hasAddButton) { %}
|
|
51
|
+
<button class="btn btn-primary" ref="{{ctx.ref.addRow}}">
|
|
52
|
+
<i class="{{ctx.iconClass('plus')}}"></i>
|
|
53
|
+
{{ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true })}}
|
|
54
|
+
</button>
|
|
55
|
+
{% } %}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<div class="editgrid-table-container">
|
|
2
|
+
<div class="table-responsive">
|
|
3
|
+
<table class="table
|
|
4
|
+
{{ ctx.component.striped ? 'table-striped' : ''}}
|
|
5
|
+
{{ ctx.component.bordered ? 'table-bordered' : ''}}
|
|
6
|
+
{{ ctx.component.hover ? 'table-hover' : ''}}
|
|
7
|
+
{{ ctx.component.condensed ? 'table-sm' : ''}}
|
|
8
|
+
">
|
|
9
|
+
{% if (ctx.header) { %}
|
|
10
|
+
<thead class="editgrid-table-head">
|
|
11
|
+
{{ctx.header}}
|
|
12
|
+
</thead>
|
|
13
|
+
{% } %}
|
|
14
|
+
<tbody class="editgrid-table-body">
|
|
15
|
+
{% ctx.rows.forEach(function(row, rowIndex) { %}
|
|
16
|
+
<tr ref="{{ctx.ref.row}}">
|
|
17
|
+
{{row}}
|
|
18
|
+
{% if (ctx.openRows[rowIndex] && !ctx.readOnly) { %}
|
|
19
|
+
<td class="editgrid-table-column">
|
|
20
|
+
<div class="editgrid-actions">
|
|
21
|
+
<button class="btn btn-primary" ref="{{ctx.ref.saveRow}}">{{ctx.t(ctx.component.saveRow || 'Save', { _userInput: true })}}</button>
|
|
22
|
+
{% if (ctx.component.removeRow) { %}
|
|
23
|
+
<button class="btn btn-danger" ref="{{ctx.ref.cancelRow}}">{{ctx.t(ctx.component.removeRow || 'Cancel', { _userInput: true })}}</button>
|
|
24
|
+
{% } %}
|
|
25
|
+
</div>
|
|
26
|
+
</td>
|
|
27
|
+
{% } %}
|
|
28
|
+
{% if (ctx.errors[rowIndex]) { %}
|
|
29
|
+
<td class="editgrid-table-column">
|
|
30
|
+
<div class="has-error">
|
|
31
|
+
<div class="editgrid-row-error help-block">
|
|
32
|
+
{{ctx.errors[rowIndex]}}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</td>
|
|
36
|
+
{% } %}
|
|
37
|
+
</tr>
|
|
38
|
+
{% }) %}
|
|
39
|
+
</tbody>
|
|
40
|
+
{% if (ctx.footer) { %}
|
|
41
|
+
<tfoot>
|
|
42
|
+
<tr>
|
|
43
|
+
{{ctx.footer}}
|
|
44
|
+
</tr>
|
|
45
|
+
<tfoot>
|
|
46
|
+
{% } %}
|
|
47
|
+
</table>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<p>{{ctx.t('error')}}
|
|
2
|
+
{% if (ctx.options.vpat) { %}
|
|
3
|
+
<span ref="errorTooltip" class="{{ctx.iconClass('question-sign')}}" tabindex="0"></span>
|
|
4
|
+
{% } %}
|
|
5
|
+
</p>
|
|
6
|
+
<ul>
|
|
7
|
+
{% ctx.errors.forEach(function(err) { %}
|
|
8
|
+
<li>
|
|
9
|
+
<span
|
|
10
|
+
data-component-key = "{{err.keyOrPath}}"
|
|
11
|
+
ref = "errorRef"
|
|
12
|
+
tabIndex = "0"
|
|
13
|
+
role="link"
|
|
14
|
+
>
|
|
15
|
+
{{err.message}}
|
|
16
|
+
</span>
|
|
17
|
+
</li>
|
|
18
|
+
{% }) %}
|
|
19
|
+
</ul>
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
{{ ctx.labelMarkup }}
|
|
13
13
|
{% } %}
|
|
14
14
|
{% if (ctx.component.description) { %}
|
|
15
|
-
<div class="form-text text-muted">{{ctx.t(ctx.component.description)}}</div>
|
|
15
|
+
<div id="d-{{ctx.instance.id}}-{{ctx.component.key}}" class="form-text text-muted">{{ctx.t(ctx.component.description, { _userInput: true })}}</div>
|
|
16
16
|
{% } %}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<fieldset
|
|
1
|
+
<fieldset>
|
|
2
2
|
{% if (ctx.component.legend) { %}
|
|
3
|
-
<legend
|
|
4
|
-
{{ctx.t(ctx.component.legend)}}
|
|
3
|
+
<legend ref="header" class="{{ctx.component.collapsible ? 'formio-clickable' : ''}}">
|
|
4
|
+
{{ctx.t(ctx.component.legend, { _userInput: true })}}
|
|
5
5
|
{% if (ctx.component.tooltip) { %}
|
|
6
|
-
<i ref="tooltip" class="{{ctx.iconClass('question-sign')}}" data-tooltip="{{ctx.component.tooltip}}"></i>
|
|
6
|
+
<i ref="tooltip" tabindex="0" class="{{ctx.iconClass('question-sign')}} text-muted" data-tooltip="{{ctx.component.tooltip}}"></i>
|
|
7
7
|
{% } %}
|
|
8
8
|
</legend>
|
|
9
9
|
{% } %}
|
|
@@ -13,3 +13,4 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
{% } %}
|
|
15
15
|
</fieldset>
|
|
16
|
+
|