@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.
- 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/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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<nav aria-label="navigation" id="{{ ctx.wizardKey }}-header">
|
|
2
|
+
<div class="classic-pagination row justify-content-center" style="border-bottom:0;">
|
|
3
|
+
{% ctx.panels.forEach(function(panel, index) { %}
|
|
4
|
+
<div class="classic-pagination-page col-xs-12 col-sm-6 col-md-3
|
|
5
|
+
{{ctx.currentPage < index ? ' disabled' : ''}}
|
|
6
|
+
{{ctx.currentPage === index ? ' active' : ''}}
|
|
7
|
+
{{ctx.currentPage > index ? ' complete' : ''}}">
|
|
8
|
+
<div class="text-center classic-pagination-title">{{ctx.t(panel.title, { _userInput: true })}}</div>
|
|
9
|
+
{% if (ctx.panels.length > 1) { %}
|
|
10
|
+
<div class="progress"><div class="progress-bar"></div></div>
|
|
11
|
+
{% } %}
|
|
12
|
+
<span ref="{{ctx.wizardKey}}-link" class="classic-pagination-dot"></span>
|
|
13
|
+
</div>
|
|
14
|
+
{% }) %}
|
|
15
|
+
</div>
|
|
16
|
+
</nav>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<nav aria-label="navigation" id="{{ ctx.wizardKey }}-header">
|
|
2
|
+
<ul class="pagination flex-column">
|
|
3
|
+
{% ctx.panels.forEach(function(panel, index) { %}
|
|
4
|
+
<li class="col-xs-12 page-item{{ctx.currentPage === index ? ' active' : ''}}" style="cursor: pointer;">
|
|
5
|
+
<span class="page-link" ref="{{ctx.wizardKey}}-link" style="margin-left: 0px;">
|
|
6
|
+
{{ctx.t(panel.title, { _userInput: true })}}
|
|
7
|
+
{% if (panel.tooltip && ctx.currentPage === index) { %}
|
|
8
|
+
<i ref="{{ctx.wizardKey}}-tooltip" class="{{ctx.iconClass('question-sign')}} text-muted" data-tooltip="{{panel.tooltip}}"></i>
|
|
9
|
+
{% } %}
|
|
10
|
+
</span>
|
|
11
|
+
</li>
|
|
12
|
+
{% }) %}
|
|
13
|
+
</ul>
|
|
14
|
+
</nav>
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
<ul class="list-inline" id="{{ ctx.wizardKey }}-nav">
|
|
2
|
-
{%
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
<ul class="formio-wizard-nav-container list-inline" id="{{ ctx.wizardKey }}-nav">
|
|
2
|
+
{% ctx.buttonOrder.forEach(function(button) { %}
|
|
3
|
+
{% if (button === 'cancel' && ctx.buttons.cancel) { %}
|
|
4
|
+
<li>
|
|
5
|
+
<button class="btn btn-secondary btn-wizard-nav-cancel" ref="{{ctx.wizardKey}}-cancel" aria-label="{{ctx.t('cancelButtonAriaLabel')}}">{{ctx.t('cancel')}}</button>
|
|
6
|
+
</li>
|
|
7
|
+
{% } %}
|
|
8
|
+
{% if (button === 'previous' && ctx.buttons.previous) { %}
|
|
9
|
+
<li>
|
|
10
|
+
<button class="btn btn-primary btn-wizard-nav-previous" ref="{{ctx.wizardKey}}-previous" aria-label="{{ctx.t('previousButtonAriaLabel')}}">{{ctx.t('previous')}}</button>
|
|
11
|
+
</li>
|
|
12
|
+
{% } %}
|
|
13
|
+
{% if (button === 'next' && ctx.buttons.next) { %}
|
|
14
|
+
<li>
|
|
15
|
+
<button class="btn btn-primary btn-wizard-nav-next" ref="{{ctx.wizardKey}}-next" aria-label="{{ctx.t('nextButtonAriaLabel')}}">{{ctx.t('next')}}</button>
|
|
16
|
+
</li>
|
|
17
|
+
{% } %}
|
|
18
|
+
{% if (button === 'submit' && ctx.buttons.submit) { %}
|
|
19
|
+
<li>
|
|
20
|
+
{% if (ctx.disableWizardSubmit){ %}
|
|
21
|
+
<button disabled class="btn btn-primary btn-wizard-nav-submit" ref="{{ctx.wizardKey}}-submit" aria-label="{{ctx.t('submitButtonAriaLabel')}}">{{ctx.t('submit')}}</button>
|
|
22
|
+
{% } else { %}
|
|
23
|
+
<button class="btn btn-primary btn-wizard-nav-submit" ref="{{ctx.wizardKey}}-submit" aria-label="{{ctx.t('submitButtonAriaLabel')}}">{{ctx.t('submit')}}</button>
|
|
24
|
+
{% } %}
|
|
25
|
+
</li>
|
|
26
|
+
{% } %}
|
|
27
|
+
{% }) %}
|
|
22
28
|
</ul>
|
package/styles/choices.css
CHANGED
package/styles/form.css
CHANGED
package/styles/index.css
CHANGED
package/styles/tables.css
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
th,
|
|
7
7
|
td {
|
|
8
8
|
@apply p-3 align-top text-left border-t-1 border-solid border-gray-300;
|
|
9
|
+
|
|
10
|
+
&.align-middle {
|
|
11
|
+
vertical-align: middle;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&.align-bottom {
|
|
15
|
+
vertical-align: bottom;
|
|
16
|
+
}
|
|
9
17
|
}
|
|
10
18
|
|
|
11
19
|
thead th {
|
|
@@ -144,4 +152,4 @@
|
|
|
144
152
|
}
|
|
145
153
|
}
|
|
146
154
|
}
|
|
147
|
-
*/
|
|
155
|
+
*/
|
package/tsconfig.json
CHANGED
|
@@ -10,10 +10,7 @@
|
|
|
10
10
|
"rootDir": "src",
|
|
11
11
|
"allowJs": true,
|
|
12
12
|
"noEmit": true,
|
|
13
|
-
"lib": [
|
|
14
|
-
"dom",
|
|
15
|
-
"esnext"
|
|
16
|
-
],
|
|
13
|
+
"lib": ["dom", "esnext"],
|
|
17
14
|
"noImplicitReturns": true,
|
|
18
15
|
"noImplicitThis": true,
|
|
19
16
|
"strictNullChecks": false,
|
|
@@ -24,14 +21,6 @@
|
|
|
24
21
|
"forceConsistentCasingInFileNames": true,
|
|
25
22
|
"noFallthroughCasesInSwitch": true
|
|
26
23
|
},
|
|
27
|
-
"include": [
|
|
28
|
-
|
|
29
|
-
"src/*.ejs",
|
|
30
|
-
"src/**/*.ts",
|
|
31
|
-
"src/**/*.ejs"
|
|
32
|
-
],
|
|
33
|
-
"exclude": [
|
|
34
|
-
"node_modules",
|
|
35
|
-
"**/*.spec.ts"
|
|
36
|
-
]
|
|
24
|
+
"include": ["src/*.ts", "src/*.ejs", "src/**/*.ts", "src/**/*.ejs"],
|
|
25
|
+
"exclude": ["node_modules", "**/*.spec.ts"]
|
|
37
26
|
}
|
package/.eslintrc
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@typescript-eslint/parser",
|
|
3
|
-
"extends": [
|
|
4
|
-
"standard",
|
|
5
|
-
"standard-react",
|
|
6
|
-
"prettier/standard",
|
|
7
|
-
"prettier/react",
|
|
8
|
-
"plugin:@typescript-eslint/recommended",
|
|
9
|
-
"prettier/@typescript-eslint",
|
|
10
|
-
"plugin:prettier/recommended"
|
|
11
|
-
],
|
|
12
|
-
"env": {
|
|
13
|
-
"node": true,
|
|
14
|
-
"jest": true
|
|
15
|
-
},
|
|
16
|
-
"parserOptions": {
|
|
17
|
-
"ecmaVersion": 2020,
|
|
18
|
-
"ecmaFeatures": {
|
|
19
|
-
"legacyDecorators": true,
|
|
20
|
-
"jsx": true
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"settings": {
|
|
24
|
-
"react": {
|
|
25
|
-
"version": "16"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"rules": {
|
|
29
|
-
"semi": ["error", "always"],
|
|
30
|
-
"space-before-function-paren": 0,
|
|
31
|
-
"react/prop-types": 0,
|
|
32
|
-
"react/jsx-handler-names": 0,
|
|
33
|
-
"react/jsx-fragments": 0,
|
|
34
|
-
"react/no-unused-prop-types": 0,
|
|
35
|
-
"no-unused-vars": "off",
|
|
36
|
-
"@typescript-eslint/no-explicit-any": 0,
|
|
37
|
-
"@typescript-eslint/explicit-function-return-type": 0,
|
|
38
|
-
"import/export": 0
|
|
39
|
-
}
|
|
40
|
-
}
|