formiojs-eorion 0.1.0 → 0.1.2

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 (45) hide show
  1. package/Formio.js +1 -1
  2. package/components/CustomTabs/Tabs.form.js +22 -0
  3. package/components/CustomTabs/Tabs.js +355 -0
  4. package/components/CustomTabs/Tabs.unit.js +43 -0
  5. package/components/CustomTabs/editForm/Tabs.edit.display.js +112 -0
  6. package/components/CustomTabs/fixtures/comp1.js +33 -0
  7. package/components/CustomTabs/fixtures/index.js +13 -0
  8. package/components/DataChinaGrid/Data.form.js +19 -0
  9. package/components/DataChinaGrid/Data.js +261 -0
  10. package/components/DataChinaGrid/editForm/Data.edit.display.js +478 -0
  11. package/components/DataChinaGridRow/Data.form.js +19 -0
  12. package/components/DataChinaGridRow/Data.js +266 -0
  13. package/components/DataChinaGridRow/editForm/Data.edit.display.js +485 -0
  14. package/components/FileDownload/FileDownload.js +1 -1
  15. package/components/Flex/editForm/Flex.edit.display.js +12 -0
  16. package/components/builder.js +6 -0
  17. package/components/index.js +7 -1
  18. package/dist/formio.builder.css +23 -0
  19. package/dist/formio.builder.min.css +1 -1
  20. package/dist/formio.contrib.js +76 -3
  21. package/dist/formio.contrib.min.js +1 -1
  22. package/dist/formio.contrib.min.js.LICENSE.txt +1 -1
  23. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  24. package/dist/formio.form.js +179 -7
  25. package/dist/formio.form.min.js +1 -1
  26. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  27. package/dist/formio.full.css +23 -0
  28. package/dist/formio.full.js +179 -7
  29. package/dist/formio.full.min.css +1 -1
  30. package/dist/formio.full.min.js +1 -1
  31. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  32. package/dist/formio.js +1 -1
  33. package/dist/formio.min.js +1 -1
  34. package/dist/formio.min.js.LICENSE.txt +1 -1
  35. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  36. package/package.json +1 -1
  37. package/templates/bootstrap/customTab/flat.ejs.js +19 -0
  38. package/templates/bootstrap/customTab/form.ejs.js +41 -0
  39. package/templates/bootstrap/customTab/index.js +14 -0
  40. package/templates/bootstrap/dataChinaGrid/form.ejs.js +61 -0
  41. package/templates/bootstrap/dataChinaGrid/index.js +12 -0
  42. package/templates/bootstrap/dataChinaGridRow/form.ejs.js +63 -0
  43. package/templates/bootstrap/dataChinaGridRow/index.js +12 -0
  44. package/templates/bootstrap/flex/form.ejs.js +27 -3
  45. package/templates/bootstrap/index.js +7 -1
@@ -17,7 +17,7 @@
17
17
  MIT License: http://getify.mit-license.org
18
18
  */
19
19
 
20
- /*! formiojs v0.1.0 | https://unpkg.com/formiojs@0.1.0/LICENSE.txt */
20
+ /*! formiojs v0.1.2 | https://unpkg.com/formiojs@0.1.2/LICENSE.txt */
21
21
 
22
22
  /**
23
23
  * @license
@@ -17,7 +17,7 @@
17
17
  MIT License: http://getify.mit-license.org
18
18
  */
19
19
 
20
- /*! formiojs v0.1.0 | https://unpkg.com/formiojs@0.1.0/LICENSE.txt */
20
+ /*! formiojs v0.1.2 | https://unpkg.com/formiojs@0.1.2/LICENSE.txt */
21
21
 
22
22
  /**
23
23
  * @license
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formiojs-eorion",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Common js library for client side interaction with <form.io>",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -0,0 +1,19 @@
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
+
8
+ ctx.component.components.forEach(function(tab, index) { ;
9
+ __p += '\n <div class="mb-2 card border">\n <div class="card-header bg-default">\n <h4 class="mb-0 card-title">' +
10
+ ((__t = ( ctx.t(tab.label, { _userInput: true }) )) == null ? '' : __t) +
11
+ '</h4>\n </div>\n <div\n class="card-body"\n ref="' +
12
+ ((__t = (ctx.tabKey)) == null ? '' : __t) +
13
+ '"\n >\n ' +
14
+ ((__t = ( ctx.tabComponents[index] )) == null ? '' : __t) +
15
+ '\n </div>\n </div>\n';
16
+ }) ;
17
+ __p += '\n';
18
+ return __p
19
+ }
@@ -0,0 +1,41 @@
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 style="width: 100%;">\n ';
8
+ if (!ctx.component['hideHeader']) { ;
9
+ __p += '\n <div class="tab-header" style="background-color: ' +
10
+ ((__t = (ctx.component['headerBackgroundColor'])) == null ? '' : __t) +
11
+ ';padding: 10px 15px">\n <div style="display: flex;flex-direction: row;width: 100%;justify-content: ' +
12
+ ((__t = (ctx.component['headerAlign'])) == null ? '' : __t) +
13
+ ';gap: 10px">\n ';
14
+ ctx.component.components.forEach(function(tab, index) { ;
15
+ __p += '\n <div class="tab-item ' +
16
+ ((__t = ( ctx.currentTab === index ? ' active' : '')) == null ? '' : __t) +
17
+ '" ref="' +
18
+ ((__t = (ctx.tabLinkKey)) == null ? '' : __t) +
19
+ '">' +
20
+ ((__t = (ctx.t(tab.label, { _userInput: true }))) == null ? '' : __t) +
21
+ '</div>\n ';
22
+ }) ;
23
+ __p += '\n </div>\n <span\n class="tab-line"\n ref="tabLine"\n style="width: 46px; transform: translateX(77px);background: ' +
24
+ ((__t = (ctx.component['headerColor'])) == null ? '' : __t) +
25
+ '"\n ></span>\n </div>\n ';
26
+ } ;
27
+ __p += '\n ';
28
+ ctx.component.components.forEach(function(tab, index) { ;
29
+ __p += '\n <div\n role="tabpanel"\n class="tab-pane' +
30
+ ((__t = ( ctx.currentTab === index ? ' active' : '')) == null ? '' : __t) +
31
+ '"\n style="display: ' +
32
+ ((__t = (ctx.currentTab === index ? 'block' : 'none')) == null ? '' : __t) +
33
+ '"\n ref="' +
34
+ ((__t = (ctx.tabKey)) == null ? '' : __t) +
35
+ '"\n >\n ' +
36
+ ((__t = (ctx.tabComponents[index])) == null ? '' : __t) +
37
+ '\n </div>\n ';
38
+ }) ;
39
+ __p += '\n</div>\n';
40
+ return __p
41
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _flat = _interopRequireDefault(require("./flat.ejs"));
8
+ var _form = _interopRequireDefault(require("./form.ejs"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ var _default = {
11
+ flat: _flat.default,
12
+ form: _form.default
13
+ };
14
+ exports.default = _default;
@@ -0,0 +1,61 @@
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="data-container ' +
8
+ ((__t = ((ctx.component.type||'').toLowerCase())) == null ? '' : __t) +
9
+ '"\n ref="dataContainer"\n style="cursor:' +
10
+ ((__t = (ctx.component['click-event-type']?'pointer':'default')) == null ? '' : __t) +
11
+ ';\n border-radius: 6px;\n background-color: ' +
12
+ ((__t = (ctx.component.bgColor||'#ffffff')) == null ? '' : __t) +
13
+ ';\n border: 1px solid #E6E4E6;padding: 16px;display: flex;flex-direction: column;height: 100%;">\n <div style="display: flex;flex-direction: row;justify-content: ' +
14
+ ((__t = (ctx.component['title-align']||'center')) == null ? '' : __t) +
15
+ ';margin-bottom: 15px;">\n <div class="title-container"\n style="color: ' +
16
+ ((__t = ( ctx.component['title-color']||'#312651' )) == null ? '' : __t) +
17
+ ';font-size: ' +
18
+ ((__t = (ctx.component['title-font-size']||'10px')) == null ? '' : __t) +
19
+ ';font-weight: ' +
20
+ ((__t = (ctx.component['title-font-weight']||'bold')) == null ? '' : __t) +
21
+ ';">\n </div>\n </div>\n <div class="value-container"\n style="display: flex;flex-direction: row;justify-content: ' +
22
+ ((__t = (ctx.component['value-align']||'center')) == null ? '' : __t) +
23
+ ';color: ' +
24
+ ((__t = (ctx.component['value-color']||'#000000')) == null ? '' : __t) +
25
+ ';font-size: ' +
26
+ ((__t = (ctx.component['value-size']||'#000000')) == null ? '' : __t) +
27
+ ';align-items: baseline;margin-bottom: 8px;font-weight: ' +
28
+ ((__t = (ctx.component['value-font-weight'])) == null ? '' : __t) +
29
+ ';">\n </div>\n <div style="display: flex;flex-direction: row;justify-content: ' +
30
+ ((__t = (ctx.component['footer-align']||'center')) == null ? '' : __t) +
31
+ '">\n <div style="display: flex;flex-direction: row;flex: 1;width: 0;justify-content: ' +
32
+ ((__t = (ctx.component['footer-align']||'center')) == null ? '' : __t) +
33
+ ';color: ' +
34
+ ((__t = (ctx.component['footer-color']||'#000000')) == null ? '' : __t) +
35
+ ';font-size: ' +
36
+ ((__t = (ctx.component['footer-size']||'#000000')) == null ? '' : __t) +
37
+ ';align-items: baseline">\n <div class="footer-container-value1"></div>\n <div class="footer-container-value2" style="margin-left: 5px;margin-right: 5px"></div>\n ';
38
+ if (ctx.component['footer-content3']) { ;
39
+ __p += '\n ';
40
+ if (ctx.component['footer-content3-style']=='text') { ;
41
+ __p += '\n <div class="footer-container-value3" style="color: ' +
42
+ ((__t = (ctx.component['footer-content3-color'])) == null ? '' : __t) +
43
+ ';">\n </div>\n ';
44
+ } else { ;
45
+ __p += '\n <div class="footer-container-value3" style="border: 1px solid ' +
46
+ ((__t = (ctx.component['footer-content3-color'])) == null ? '' : __t) +
47
+ ';color: ' +
48
+ ((__t = (ctx.component['footer-content3-color'])) == null ? '' : __t) +
49
+ ';border-radius: ' +
50
+ ((__t = (ctx.component['footer-content3-radius']||'10px')) == null ? '' : __t) +
51
+ ';text-align: center;padding-left: 10px;padding-right: 10px">\n </div>\n ';
52
+ } ;
53
+ __p += '\n ';
54
+ } ;
55
+ __p += '\n </div>\n ';
56
+ if (ctx.component['enable-sparkline']) { ;
57
+ __p += '\n <div style="display: flex;flex-direction: column;justify-content: end">\n <div class="sparkline-container"\n style="z-index: 0;margin-top: auto;width: fit-content;"></div>\n </div>\n ';
58
+ } ;
59
+ __p += '\n </div>\n</div>\n';
60
+ return __p
61
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _form = _interopRequireDefault(require("./form.ejs"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ var _default = {
10
+ form: _form.default
11
+ };
12
+ exports.default = _default;
@@ -0,0 +1,63 @@
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="data-container ' +
8
+ ((__t = ((ctx.component.type||'').toLowerCase())) == null ? '' : __t) +
9
+ '"\n ref="dataContainer"\n style="cursor:' +
10
+ ((__t = (ctx.component['click-event-type']?'pointer':'default')) == null ? '' : __t) +
11
+ ';\n border-radius: 6px;\n background-color: ' +
12
+ ((__t = (ctx.component.bgColor||'#ffffff')) == null ? '' : __t) +
13
+ ';\n border: 1px solid #E6E4E6;padding: 16px;display: flex;flex-direction: row;height: 100%;align-items: end">\n\n <div style="display: flex;flex-direction: column;height: 100%;flex: 1;width: 0">\n <div style="display: flex;flex-direction: row;justify-content: ' +
14
+ ((__t = (ctx.component['title-align']||'center')) == null ? '' : __t) +
15
+ ';margin-bottom: 15px;">\n <div class="title-container"\n style="color: ' +
16
+ ((__t = ( ctx.component['title-color']||'#312651' )) == null ? '' : __t) +
17
+ ';font-size: ' +
18
+ ((__t = (ctx.component['title-font-size']||'10px')) == null ? '' : __t) +
19
+ ';font-weight: ' +
20
+ ((__t = (ctx.component['title-font-weight']||'bold')) == null ? '' : __t) +
21
+ ';">\n </div>\n </div>\n <div class="value-container"\n style="display: flex;flex-direction: row;justify-content: ' +
22
+ ((__t = (ctx.component['value-align']||'center')) == null ? '' : __t) +
23
+ ';color: ' +
24
+ ((__t = (ctx.component['value-color']||'#000000')) == null ? '' : __t) +
25
+ ';margin-bottom: 8px;font-size: ' +
26
+ ((__t = (ctx.component['value-size']||'#000000')) == null ? '' : __t) +
27
+ ';align-items: baseline;font-weight: ' +
28
+ ((__t = (ctx.component['value-font-weight'])) == null ? '' : __t) +
29
+ ';">\n </div>\n <div style="display: flex;flex-direction: row;justify-content: ' +
30
+ ((__t = (ctx.component['footer-align']||'center')) == null ? '' : __t) +
31
+ '">\n <div style="display: flex;flex-direction: row;flex: 1;width: 0;justify-content: ' +
32
+ ((__t = (ctx.component['footer-align']||'center')) == null ? '' : __t) +
33
+ ';color: ' +
34
+ ((__t = (ctx.component['footer-color']||'#000000')) == null ? '' : __t) +
35
+ ';font-size: ' +
36
+ ((__t = (ctx.component['footer-size']||'#000000')) == null ? '' : __t) +
37
+ ';align-items: baseline">\n <div class="footer-container-value1"></div>\n <div class="footer-container-value2" style="margin-left: 5px;margin-right: 5px"></div>\n ';
38
+ if (ctx.component['footer-content3']) { ;
39
+ __p += '\n ';
40
+ if (ctx.component['footer-content3-style']=='text') { ;
41
+ __p += '\n <div class="footer-container-value3" style="color: ' +
42
+ ((__t = (ctx.component['footer-content3-color'])) == null ? '' : __t) +
43
+ ';">\n </div>\n ';
44
+ } else { ;
45
+ __p += '\n <div class="footer-container-value3" style="border: 1px solid ' +
46
+ ((__t = (ctx.component['footer-content3-color'])) == null ? '' : __t) +
47
+ ';color: ' +
48
+ ((__t = (ctx.component['footer-content3-color'])) == null ? '' : __t) +
49
+ ';border-radius: ' +
50
+ ((__t = (ctx.component['footer-content3-radius']||'10px')) == null ? '' : __t) +
51
+ ';text-align: center;padding-left: 10px;padding-right: 10px">\n </div>\n ';
52
+ } ;
53
+ __p += '\n ';
54
+ } ;
55
+ __p += '\n </div>\n </div>\n </div>\n\n ';
56
+ if (ctx.component['enable-sparkline']) { ;
57
+ __p += '\n <div id="sparkline-container-parent" style="flex: ' +
58
+ ((__t = ( ctx.component['sparkLine-flex-width'] )) == null ? '' : __t) +
59
+ ';width: 0;height: 100%;display: flex;justify-content: end;flex-direction: row">\n <div class="sparkline-container"\n style="z-index: 0;margin-top: auto;width: fit-content;"></div>\n </div>\n ';
60
+ } ;
61
+ __p += '\n\n</div>\n';
62
+ return __p
63
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _form = _interopRequireDefault(require("./form.ejs"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ var _default = {
10
+ form: _form.default
11
+ };
12
+ exports.default = _default;
@@ -4,15 +4,39 @@ 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 += '<div class="flex-container"\n style="display: flex;flex-direction: row;flex-wrap: wrap;width: 100%;min-height: 11rem;gap: 10px">\n ';
7
+ __p += '<div class="flex-container"\n style="display: flex;flex-direction: row;\n flex-wrap: ' +
8
+ ((__t = ( ctx.component['flex-wrap']?'wrap':'nowrap' )) == null ? '' : __t) +
9
+ ';\n width: 100%;\n overflow-x: ' +
10
+ ((__t = ( ctx.component['flex-scrollable']?'auto':'hidden' )) == null ? '' : __t) +
11
+ ';\n min-height: ' +
12
+ ((__t = ( ctx.component['column-height']||10 )) == null ? '' : __t) +
13
+ 'rem;gap: 10px">\n ';
8
14
  ctx.component.columns.forEach(function(column, index) { ;
15
+ __p += '\n ';
16
+ if (!ctx.component['flex-wrap'] && !ctx.component['flex-scrollable']) { ;
9
17
  __p += '\n <div ref="' +
10
18
  ((__t = (ctx.columnKey)) == null ? '' : __t) +
11
- '"\n class="flex-child-container"\n style="height:11rem;width:' +
12
- ((__t = ( column['ratio']=='1'?'13':'22' )) == null ? '' : __t) +
19
+ '"\n class="flex-child-container"\n style="height:' +
20
+ ((__t = ( ctx.component['column-height'] || 10)) == null ? '' : __t) +
21
+ 'rem;\n flex: ' +
22
+ ((__t = ( column['ratio']=='1'?1:2 )) == null ? '' : __t) +
23
+ ';\n width:0">\n ' +
24
+ ((__t = (ctx.columnComponents[index])) == null ? '' : __t) +
25
+ '\n </div>\n ';
26
+ } ;
27
+ __p += '\n ';
28
+ if(ctx.component['flex-wrap'] || ctx.component['flex-scrollable']){ ;
29
+ __p += '\n <div ref="' +
30
+ ((__t = (ctx.columnKey)) == null ? '' : __t) +
31
+ '"\n class="flex-child-container"\n style="height:' +
32
+ ((__t = ( ctx.component['column-height'] || 10)) == null ? '' : __t) +
33
+ 'rem;\n width:' +
34
+ ((__t = ( column['ratio']=='1'? ctx.component['column-height']:ctx.component['column-height']*2 )) == null ? '' : __t) +
13
35
  'rem">\n ' +
14
36
  ((__t = (ctx.columnComponents[index])) == null ? '' : __t) +
15
37
  '\n </div>\n ';
38
+ } ;
39
+ __p += '\n ';
16
40
  }) ;
17
41
  __p += '\n</div>\n\n';
18
42
  return __p
@@ -79,6 +79,9 @@ var _newsData = _interopRequireDefault(require("./newsData"));
79
79
  var _qrCode = _interopRequireDefault(require("./qrCode"));
80
80
  var _fileDownload = _interopRequireDefault(require("./fileDownload"));
81
81
  var _customMap = _interopRequireDefault(require("./customMap"));
82
+ var _dataChinaGrid = _interopRequireDefault(require("./dataChinaGrid"));
83
+ var _dataChinaGridRow = _interopRequireDefault(require("./dataChinaGridRow"));
84
+ var _customTab = _interopRequireDefault(require("./customTab"));
82
85
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
83
86
  var _default = {
84
87
  transform: function transform(type, text) {
@@ -165,6 +168,9 @@ var _default = {
165
168
  qrCode: _qrCode.default,
166
169
  actionButton: _button.default,
167
170
  fileDownload: _fileDownload.default,
168
- customMap: _customMap.default
171
+ customMap: _customMap.default,
172
+ dataChinaGrid: _dataChinaGrid.default,
173
+ dataChinaGridRow: _dataChinaGridRow.default,
174
+ customTab: _customTab.default
169
175
  };
170
176
  exports.default = _default;