gina 0.1.6-alpha.16 → 0.1.6-alpha.160

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 (410) hide show
  1. package/LICENSE +1 -1
  2. package/README-4Contributors.md +14 -8
  3. package/README.md +13 -4
  4. package/bin/cli +16 -2
  5. package/bin/gina +29 -1
  6. package/framework/{v0.1.6-alpha.16/lib/inherits → v0.1.6-alpha.160}/LICENSE +1 -1
  7. package/framework/v0.1.6-alpha.160/VERSION +1 -0
  8. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/plugin/README.md +1 -0
  9. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  10. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  11. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
  12. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +1 -1
  13. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/html/toolbar.html.br +0 -0
  14. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/html/toolbar.html.gz +0 -0
  15. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/plugin/dist/vendor/gina/js/gina.js +6441 -5612
  16. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/js/gina.min.js +790 -0
  17. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  18. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  19. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +8 -0
  20. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +9 -0
  21. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  22. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  23. package/framework/v0.1.6-alpha.160/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +8 -0
  24. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/config.js +149 -57
  25. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/connectors/couchbase/index.js +108 -26
  26. package/framework/{v0.1.6-alpha.16/core/connectors/couchbase/lib/connector.v4.js → v0.1.6-alpha.160/core/connectors/couchbase/lib/connector.v3.js} +170 -69
  27. package/framework/v0.1.6-alpha.160/core/connectors/couchbase/lib/connector.v4.js +470 -0
  28. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/connectors/couchbase/lib/session-store.v4.js +5 -2
  29. package/framework/v0.1.6-alpha.160/core/content.encoding +9 -0
  30. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/controller/controller.js +847 -1274
  31. package/framework/v0.1.6-alpha.160/core/controller/controller.render-json.js +262 -0
  32. package/framework/v0.1.6-alpha.160/core/controller/controller.render-swig.js +1080 -0
  33. package/framework/v0.1.6-alpha.160/core/controller/controller.render-v1.js +911 -0
  34. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/controller/index.js +2 -2
  35. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/.github/workflows/ci.yml +24 -0
  36. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/.github/workflows/lint.yml +23 -0
  37. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/README.md +191 -0
  38. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +149 -0
  39. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +143 -0
  40. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +154 -0
  41. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +148 -0
  42. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +101 -0
  43. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +84 -0
  44. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/lib/index.js +57 -0
  45. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/lib/types/multipart.js +680 -0
  46. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/lib/types/urlencoded.js +350 -0
  47. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/lib/utils.js +596 -0
  48. package/framework/v0.1.6-alpha.160/core/deps/busboy-1.6.0/package.json +22 -0
  49. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/.travis.yml +4 -0
  50. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/LICENSE +21 -0
  51. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/bool.js +10 -0
  52. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/boolean_double.js +7 -0
  53. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/boolean_single.js +7 -0
  54. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/default_hash.js +8 -0
  55. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/default_singles.js +7 -0
  56. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/divide.js +8 -0
  57. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/line_count.js +20 -0
  58. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/line_count_options.js +29 -0
  59. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/line_count_wrap.js +29 -0
  60. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/nonopt.js +4 -0
  61. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/reflect.js +2 -0
  62. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/short.js +3 -0
  63. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/string.js +11 -0
  64. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/usage-options.js +19 -0
  65. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/example/xup.js +10 -0
  66. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/index.js +343 -0
  67. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/package.json +31 -0
  68. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/package.json.dist +39 -0
  69. package/framework/v0.1.6-alpha.160/core/deps/optimist-0.6.1/readme.markdown +513 -0
  70. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/HISTORY.md +498 -0
  71. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/LICENSE +7 -0
  72. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/README.md +88 -0
  73. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/bin/swig.js +161 -0
  74. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/bin/swig.js.dist +161 -0
  75. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/dist/swig.min.js +7 -0
  76. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/dist/swig.min.js.map +8 -0
  77. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/index.js +1 -0
  78. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/dateformatter.js +198 -0
  79. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/filters.js +630 -0
  80. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/lexer.js +306 -0
  81. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/loaders/filesystem.js +59 -0
  82. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/loaders/index.js +53 -0
  83. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/loaders/memory.js +63 -0
  84. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/parser.js +744 -0
  85. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/swig.js +740 -0
  86. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/autoescape.js +37 -0
  87. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/block.js +25 -0
  88. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/else.js +25 -0
  89. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/elseif.js +28 -0
  90. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/extends.js +19 -0
  91. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/filter.js +68 -0
  92. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/for.js +130 -0
  93. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/if.js +86 -0
  94. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/import.js +91 -0
  95. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/include.js +100 -0
  96. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/index.js +16 -0
  97. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/macro.js +79 -0
  98. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/parent.js +51 -0
  99. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/raw.js +23 -0
  100. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/set.js +109 -0
  101. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/tags/spaceless.js +42 -0
  102. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/lib/utils.js +184 -0
  103. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/package.json +57 -0
  104. package/framework/v0.1.6-alpha.160/core/deps/swig-1.4.2/package.json.dist +61 -0
  105. package/framework/v0.1.6-alpha.160/core/deps/swig-client/swig.js +5031 -0
  106. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/dev/index.js +1 -1
  107. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/dev/lib/factory.js +1 -1
  108. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/gna.js +123 -23
  109. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/index.js +3 -3
  110. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/src/make.js +1 -1
  111. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/mime.types +1 -0
  112. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/model/entity.js +5 -5
  113. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/model/index.js +30 -26
  114. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/model/template/entityFactory.js +1 -1
  115. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/model/template/index.js +1 -1
  116. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/index.js +3 -3
  117. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/file/package.json +2 -2
  118. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/intl/package.json +2 -2
  119. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/storage/package.json +2 -2
  120. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/validator/package.json +2 -2
  121. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/validator/src/form-validator.js +39 -27
  122. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/validator/src/main.js +496 -119
  123. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/router.js +100 -49
  124. package/framework/v0.1.6-alpha.160/core/server.isaac.js +790 -0
  125. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/server.js +437 -160
  126. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/status.codes +1 -11
  127. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/controllers/setup.js +2 -2
  128. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/command/gina.tpl +1 -1
  129. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/conf/env.json +28 -2
  130. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/conf/settings.json +4 -1
  131. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/conf/templates.json +4 -2
  132. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/console.js +1 -1
  133. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/context.js +30 -13
  134. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/data/package.json +2 -2
  135. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/data/src/main.js +1 -1
  136. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/dateFormat.js +1 -1
  137. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/index.js +1 -1
  138. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/json/package.json +2 -2
  139. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/json/src/main.js +7 -4
  140. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/path.js +32 -16
  141. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/plugins/package.json +2 -2
  142. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/plugins/src/api-error.js +2 -2
  143. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/plugins/src/main.js +1 -1
  144. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/prototypes.js +8 -1
  145. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/task.js +2 -2
  146. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/text.js +1 -1
  147. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/archiver/package.json +2 -2
  148. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/archiver/src/main.js +11 -11
  149. package/framework/v0.1.6-alpha.160/lib/cache/README.md +19 -0
  150. package/framework/v0.1.6-alpha.160/lib/cache/package.json +20 -0
  151. package/framework/v0.1.6-alpha.160/lib/cache/src/main.js +239 -0
  152. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/add.js +2 -1
  153. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/restart.js +2 -2
  154. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/start.js +26 -11
  155. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/get.js +1 -1
  156. package/framework/v0.1.6-alpha.160/lib/cmd/env/help.js +30 -0
  157. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/set.js +21 -0
  158. package/framework/v0.1.6-alpha.160/lib/cmd/framework/arguments.json +7 -0
  159. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/build.js +1 -1
  160. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/dot.js +21 -0
  161. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/init.js +21 -3
  162. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/link-node-modules.js +2 -3
  163. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/link.js +3 -2
  164. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/restart.js +3 -3
  165. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/start.js +1 -1
  166. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/tail.js +29 -12
  167. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/version.js +15 -1
  168. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/helper.js +44 -15
  169. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/index.js +1 -1
  170. package/framework/v0.1.6-alpha.160/lib/cmd/minion/help.txt +18 -0
  171. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/port/reset.js +1 -1
  172. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/add.js +7 -2
  173. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/arguments.json +1 -0
  174. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/build.js +32 -7
  175. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/help.txt +4 -0
  176. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/list.js +1 -1
  177. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/protocol/list.js +71 -50
  178. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/collection/package.json +2 -2
  179. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/collection/src/main.js +62 -23
  180. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/config.js +1 -1
  181. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cron/package.json +2 -2
  182. package/framework/v0.1.6-alpha.160/lib/domain/dist/2025-03-14_13-41-20_UTC.dat +15754 -0
  183. package/framework/v0.1.6-alpha.160/lib/domain/dist/public_suffix_list.dat +15754 -0
  184. package/framework/v0.1.6-alpha.160/lib/domain/dist/public_suffix_list.dat.br +0 -0
  185. package/framework/v0.1.6-alpha.160/lib/domain/dist/public_suffix_list.dat.gz +0 -0
  186. package/framework/v0.1.6-alpha.160/lib/domain/exemples/backend.js +12 -0
  187. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/domain/package.json +2 -2
  188. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/domain/src/main.js +75 -13
  189. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/generator/index.js +1 -1
  190. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/index.js +3 -2
  191. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160/lib/inherits}/LICENSE +1 -1
  192. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/inherits/package.json +2 -2
  193. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/inherits/src/main.js +1 -1
  194. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/package.json +2 -2
  195. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/containers/file/index.js +2 -0
  196. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/containers/mq/listener.js +10 -2
  197. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/helper.js +1 -1
  198. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/main.js +1 -1
  199. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/math/index.js +1 -1
  200. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/merge/package.json +2 -2
  201. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/model.js +3 -3
  202. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/proc.js +10 -2
  203. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/routing/package.json +2 -2
  204. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/routing/src/main.js +204 -35
  205. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/session-store.js +3 -3
  206. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/shell.js +7 -6
  207. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/swig-filters/package.json +2 -2
  208. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/swig-filters/src/main.js +98 -92
  209. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/validator.js +2 -2
  210. package/framework/v0.1.6-alpha.160/package.json +11 -0
  211. package/package.json +3 -3
  212. package/resources/package.json.template +1 -1
  213. package/script/post_install.js +4 -4
  214. package/script/pre_install.js +3 -3
  215. package/utils/helper.js +38 -14
  216. package/framework/v0.1.6-alpha.16/VERSION +0 -1
  217. package/framework/v0.1.6-alpha.16/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +0 -1
  218. package/framework/v0.1.6-alpha.16/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -766
  219. package/framework/v0.1.6-alpha.16/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +0 -8
  220. package/framework/v0.1.6-alpha.16/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -7
  221. package/framework/v0.1.6-alpha.16/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +0 -8
  222. package/framework/v0.1.6-alpha.16/core/connectors/couchbase/lib/connector.v3.js +0 -432
  223. package/framework/v0.1.6-alpha.16/core/deps/busboy/.travis.yml +0 -17
  224. package/framework/v0.1.6-alpha.16/core/deps/busboy/README.md +0 -225
  225. package/framework/v0.1.6-alpha.16/core/deps/busboy/deps/encoding/encoding-indexes.js +0 -73
  226. package/framework/v0.1.6-alpha.16/core/deps/busboy/deps/encoding/encoding.js +0 -2391
  227. package/framework/v0.1.6-alpha.16/core/deps/busboy/lib/main.js +0 -89
  228. package/framework/v0.1.6-alpha.16/core/deps/busboy/lib/types/multipart.js +0 -328
  229. package/framework/v0.1.6-alpha.16/core/deps/busboy/lib/types/urlencoded.js +0 -214
  230. package/framework/v0.1.6-alpha.16/core/deps/busboy/lib/utils.js +0 -191
  231. package/framework/v0.1.6-alpha.16/core/deps/busboy/package.json +0 -69
  232. package/framework/v0.1.6-alpha.16/core/server.isaac.js +0 -480
  233. package/framework/v0.1.6-alpha.16/lib/domain/dist/public_suffix_list.dat +0 -14186
  234. package/framework/v0.1.6-alpha.16/package.json +0 -14
  235. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/AUTHORS +0 -0
  236. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/html/nolayout.html +0 -0
  237. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/html/static.html +0 -0
  238. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/img/android-chrome-192x192.png +0 -0
  239. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/img/android-chrome-512x512.png +0 -0
  240. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/img/apple-touch-icon.png +0 -0
  241. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/img/favicon-16x16.png +0 -0
  242. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/img/favicon-32x32.png +0 -0
  243. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/img/favicon.ico +0 -0
  244. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  245. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/asset/plugin/uuid.json +0 -0
  246. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/connectors/couchbase/lib/connector.js +0 -0
  247. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/connectors/couchbase/lib/connector.v2.js +0 -0
  248. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/connectors/couchbase/lib/n1ql.js +0 -0
  249. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/connectors/couchbase/lib/session-store.js +0 -0
  250. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  251. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  252. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/controller/controller.framework.js +0 -0
  253. /package/framework/{v0.1.6-alpha.16/core/deps/busboy → v0.1.6-alpha.160/core/deps/busboy-1.6.0}/LICENSE +0 -0
  254. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
  255. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/dev/lib/class.js +0 -0
  256. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/dev/lib/tools.js +0 -0
  257. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/README.md +0 -0
  258. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/currency.json +0 -0
  259. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/dist/language/en.json +0 -0
  260. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/dist/language/fr.json +0 -0
  261. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/dist/region/en.json +0 -0
  262. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/dist/region/fr.json +0 -0
  263. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/src/resources/currency.csv +0 -0
  264. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/src/resources/region.csv +0 -0
  265. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/locales/src/resources/region.mapping.json +0 -0
  266. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/README.md +0 -0
  267. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/file/README.md +0 -0
  268. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/file/build.json +0 -0
  269. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/intl/README.md +0 -0
  270. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/intl/build.json +0 -0
  271. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/intl/src/main.js +0 -0
  272. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/storage/README.md +0 -0
  273. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/storage/build.json +0 -0
  274. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/storage/src/main.js +0 -0
  275. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/validator/README.md +0 -0
  276. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/plugins/lib/validator/build.json +0 -0
  277. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/server.express.js +0 -0
  278. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/_gitignore +0 -0
  279. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/config/app.json +0 -0
  280. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/config/routing.json +0 -0
  281. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/config/settings.json +0 -0
  282. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  283. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/config/templates.json +0 -0
  284. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  285. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  286. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle/index.js +0 -0
  287. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  288. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  289. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  290. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  291. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  292. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_public/readme.md +0 -0
  293. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  294. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  295. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  296. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  297. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  298. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/command/gina.bat.tpl +0 -0
  299. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/conf/manifest.json +0 -0
  300. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/conf/package.json +0 -0
  301. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/conf/statics.json +0 -0
  302. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/error/client/json/401.json +0 -0
  303. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/error/client/json/403.json +0 -0
  304. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/error/client/json/404.json +0 -0
  305. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/error/server/html/50x.html +0 -0
  306. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/error/server/json/500.json +0 -0
  307. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/error/server/json/503.json +0 -0
  308. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/core/template/extensions/logger/config.json +0 -0
  309. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/data/LICENSE +0 -0
  310. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/data/README.md +0 -0
  311. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/json/LICENSE +0 -0
  312. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/json/README.md +0 -0
  313. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/helpers/plugins/README.md +0 -0
  314. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/archiver/README.md +0 -0
  315. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/archiver/build.json +0 -0
  316. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/archiver/src/dep/jszip.min.js +0 -0
  317. /package/framework/{v0.1.6-alpha.16/lib/collection → v0.1.6-alpha.160/lib/cache}/build.json +0 -0
  318. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/aliases.json +0 -0
  319. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/arguments.json +0 -0
  320. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/copy.js +0 -0
  321. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/cp.js +0 -0
  322. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/help.js +0 -0
  323. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/help.txt +0 -0
  324. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/list.js +0 -0
  325. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/remove.js +0 -0
  326. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/rename.js +0 -0
  327. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/rm.js +0 -0
  328. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/status.js +0 -0
  329. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/bundle/stop.js +0 -0
  330. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/add.js +0 -0
  331. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/help.txt +0 -0
  332. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/link-dev.js +0 -0
  333. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/list.js +0 -0
  334. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/remove.js +0 -0
  335. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/rm.js +0 -0
  336. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/unset.js +0 -0
  337. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/env/use.js +0 -0
  338. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/get.js +0 -0
  339. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/help.js +0 -0
  340. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/help.txt +0 -0
  341. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/msg.json +0 -0
  342. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/open.js +0 -0
  343. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/set.js +0 -0
  344. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/status.js +0 -0
  345. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/stop.js +0 -0
  346. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/framework/update.js +0 -0
  347. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/gina-dev.1.md +0 -0
  348. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/gina-framework.1.md +0 -0
  349. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/gina.1.md +0 -0
  350. /package/framework/{v0.1.6-alpha.16/lib/cmd/env → v0.1.6-alpha.160/lib/cmd/minion}/help.js +0 -0
  351. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/msg.json +0 -0
  352. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/port/help.js +0 -0
  353. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/port/help.txt +0 -0
  354. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/port/inc/scan.js +0 -0
  355. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/port/list.js +0 -0
  356. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/port/set.js +0 -0
  357. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/help.js +0 -0
  358. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/import.js +0 -0
  359. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/move.js +0 -0
  360. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/remove.js +0 -0
  361. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/rename.js +0 -0
  362. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/restart.js +0 -0
  363. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/rm.js +0 -0
  364. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/start.js +0 -0
  365. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/status.js +0 -0
  366. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/project/stop.js +0 -0
  367. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/protocol/help.js +0 -0
  368. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/protocol/help.txt +0 -0
  369. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/protocol/set.js +0 -0
  370. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/add.js +0 -0
  371. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/help.js +0 -0
  372. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/help.txt +0 -0
  373. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/link-local.js +0 -0
  374. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/link-production.js +0 -0
  375. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/list.js +0 -0
  376. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/remove.js +0 -0
  377. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/rm.js +0 -0
  378. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/scope/use.js +0 -0
  379. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cmd/view/add.js +0 -0
  380. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/collection/README.md +0 -0
  381. /package/framework/{v0.1.6-alpha.16/lib/routing → v0.1.6-alpha.160/lib/collection}/build.json +0 -0
  382. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cron/README.md +0 -0
  383. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/cron/src/main.js +0 -0
  384. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/domain/LICENSE +0 -0
  385. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/domain/README.md +0 -0
  386. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/domain/exemples/frontend.html +0 -0
  387. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/inherits/README.md +0 -0
  388. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/inherits/example/inheriting_eventemitter.js +0 -0
  389. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/inherits/example/protected_inheritance.js +0 -0
  390. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/inherits/example/simple_inheritance.js +0 -0
  391. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
  392. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/README.md +0 -0
  393. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/containers/default/index.js +0 -0
  394. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  395. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  396. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/containers/mq/index.js +0 -0
  397. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/logger/src/containers/mq/speaker.js +0 -0
  398. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/merge/README.md +0 -0
  399. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/merge/example/merge.js +0 -0
  400. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/merge/example/merge_2_literal objects.js +0 -0
  401. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/merge/example/merge_and_preserve_first.js +0 -0
  402. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/merge/src/main.js +0 -0
  403. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/routing/README.md +0 -0
  404. /package/framework/{v0.1.6-alpha.16/lib/domain/exemples/backend.js → v0.1.6-alpha.160/lib/routing/build.json} +0 -0
  405. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/swig-filters/README.md +0 -0
  406. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/url/README.md +0 -0
  407. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/url/index.js +0 -0
  408. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/url/mocks.json +0 -0
  409. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/url/routing.json +0 -0
  410. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.160}/lib/url/test.js +0 -0
@@ -18,7 +18,7 @@
18
18
  * @param {object} [ data ] // from request
19
19
  * @param {string} [ formId ]
20
20
  * */
21
- function ValidatorPlugin(rules, data, formId) {
21
+ function ValidatorPlugin(rules, data, formId) {
22
22
 
23
23
  this.plugin = 'validator';
24
24
 
@@ -99,6 +99,7 @@
99
99
  //var Collection = (isGFFCtx) ? require('lib/collection') : require('../../../../../lib/collection');
100
100
  var routing = (isGFFCtx) ? require('lib/routing') : require('../../../../../lib/routing');
101
101
 
102
+
102
103
  /** definitions */
103
104
  var instance = {
104
105
  'id' : 'validator-' + uuid.v4(),
@@ -128,6 +129,7 @@
128
129
  'eventData' : {},
129
130
  'target' : (isGFFCtx) ? document : null, // by default
130
131
  'cachedErrors' : {},
132
+ 'lastFocused' : (isGFFCtx) ? [] : null,
131
133
  'binded' : false,
132
134
  'unbinded' : false,
133
135
  'withUserBindings' : false,
@@ -153,16 +155,16 @@
153
155
  * */
154
156
  var xhr = null;
155
157
  var xhrOptions = {
156
- 'url' : '',
157
- 'method' : 'GET',
158
- 'isSynchrone' : false,
159
- 'withCredentials': false,
160
- 'headers' : {
158
+ 'url' : '',
159
+ 'method' : 'GET',
160
+ 'isSynchrone' : false,
161
+ 'withCredentials' : false,
162
+ 'withRateLimit' : true,
163
+ 'headers' : {
161
164
  // to upload, use `multipart/form-data` for `enctype`
162
165
  'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
163
166
  // cross domain is enabled by default, but you need to setup `Access-Control-Allow-Origin`
164
167
  'X-Requested-With': 'XMLHttpRequest' // in case of cross domain origin
165
-
166
168
  }
167
169
  };
168
170
 
@@ -229,6 +231,8 @@
229
231
  var setOptions = function (options) {
230
232
  options = merge(options, xhrOptions);
231
233
  xhrOptions = options;
234
+
235
+ return this;
232
236
  }
233
237
 
234
238
 
@@ -408,22 +412,34 @@
408
412
  }
409
413
 
410
414
  var refreshWarning = function($el) {
411
- var formId = $el.form.getAttribute('id');
415
+ var formId = $el.form.id || $el.form.getAttribute('id');
416
+ var elName = $el.name || $el.form.getAttribute('name');
417
+ var currentElName = document.activeElement.name;
412
418
  if ( /^true$/i.test(instance.$forms[formId].isValidating) ) {
413
419
  return;
414
420
  }
415
421
 
416
- var $parent = $el.parentNode, isErrorMessageHidden = false;
417
- var $children = $parent.getElementsByTagName('div');
422
+ var $parent = $el.parentNode
423
+ , isErrorMessageHidden = false
424
+ , $children = $parent.getElementsByTagName('div')
425
+ ;
418
426
 
419
- if ( /form\-item\-warning/.test($parent.className) ) {
427
+ if ( /form\-item\-warning/.test($parent.className) && currentElName != elName ) {
420
428
  $parent.className = $parent.className.replace(/form\-item\-warning/, 'form-item-error');
421
429
 
422
- } else if (/form\-item\-error/.test($parent.className) ) {
430
+ } else if (/form\-item\-error/.test($parent.className) && currentElName == elName ) {
423
431
  $parent.className = $parent.className.replace(/form\-item\-error/, 'form-item-warning');
424
432
  isErrorMessageHidden = true;
425
433
  }
426
434
 
435
+ // Fixed on 2025-03-16
436
+ if (
437
+ /^true$/i.test(instance.$forms[formId].isValidating)
438
+ && !isErrorMessageHidden
439
+ ) {
440
+ return;
441
+ }
442
+
427
443
 
428
444
  for (var c = 0, cLen = $children.length; c<cLen; ++c) {
429
445
  if ( /form\-item\-error\-message/.test($children[c].className) ) {
@@ -445,7 +461,7 @@
445
461
  * @param {object} $form - Target (HTMLFormElement)
446
462
  * @param {object} errors
447
463
  * @param {object|null} data
448
- * @param {object|null} [fileName]
464
+ * @param {string|null} [fileName]
449
465
  */
450
466
  var liveCheckErrors = {}; // Per Form & Per Element
451
467
  var handleErrorsDisplay = function($form, errors, data, fieldName) {
@@ -476,7 +492,7 @@
476
492
  if ( typeof(liveCheckErrors[formId]) == 'undefined') {
477
493
  liveCheckErrors[formId] = {};
478
494
  }
479
- if (errors.count() > 0) {
495
+ if (errors && errors.count() > 0) {
480
496
  // reset field name
481
497
  liveCheckErrors[formId][fieldName] = {};
482
498
  // override
@@ -486,8 +502,29 @@
486
502
  }
487
503
  errors = liveCheckErrors[formId];
488
504
  // only if the form has not been sent yet
489
- if (!instance.$forms[formId].sent || instance.$forms[formId].isValidating) {
505
+ if (
506
+ !instance.$forms[formId].sent
507
+ ||
508
+ instance.$forms[formId].isValidating
509
+ ) {
490
510
  isWarning = true;
511
+ // Fixed on 2025-03-16
512
+ var lastFocused = instance.$forms[formId].lastFocused;
513
+ // console.debug('fieldName: '+ fieldName + '\nactiveElement: '+ document.activeElement.getAttribute('name') +'\nlastFocused: ', lastFocused);
514
+ if (
515
+ lastFocused.length > 0
516
+ && typeof(lastFocused[1]) != 'undefined'
517
+ && lastFocused[1].name == fieldName
518
+ ||
519
+ lastFocused.length > 0
520
+ && !lastFocused[1]
521
+ && document.activeElement.getAttribute('name') != lastFocused[0].name
522
+ ||
523
+ document.activeElement.getAttribute('name') != fieldName
524
+ ) {
525
+ isWarning = false;
526
+ }
527
+ // console.debug('isWarning: '+isWarning);
491
528
  }
492
529
  } else {
493
530
  if ( typeof(liveCheckErrors[formId][fieldName]) != 'undefined') {
@@ -551,7 +588,11 @@
551
588
 
552
589
  if (!name) continue;
553
590
 
554
- if ( typeof(errors[name]) != 'undefined' && !/(form\-item\-error|form\-item\-warning)/.test($parent.className) ) {
591
+ if (
592
+ errors
593
+ && typeof(errors[name]) != 'undefined'
594
+ && !/(form\-item\-error|form\-item\-warning)/.test($parent.className)
595
+ ) {
555
596
 
556
597
  if (isWarning) {
557
598
  // adding warning class
@@ -592,7 +633,24 @@
592
633
 
593
634
 
594
635
 
595
- } else if ( typeof(errors[name]) == 'undefined' && /(form\-item\-error|form\-item\-warning)/.test($parent.className) || typeof(errors[name]) != 'undefined' && errors[name].count() == 0 && /(form\-item\-error|form\-item\-warning)/.test($parent.className) ) {
636
+ } else if (
637
+ errors
638
+ && typeof(errors[name]) == 'undefined'
639
+ && /(form\-item\-error|form\-item\-warning)/.test($parent.className)
640
+ ||
641
+ errors
642
+ && typeof(errors[name]) != 'undefined' && errors[name].count() == 0
643
+ && /(form\-item\-error|form\-item\-warning)/.test($parent.className)
644
+ ) {
645
+ // Fixed on 2025-03-10
646
+ // targeted field must be the active element
647
+ // if (
648
+ // document.activeElement.getAttribute('name') != fieldName
649
+ // && errors.count() > 0
650
+ // ) {
651
+ // break
652
+ // }
653
+ console.debug('[handleErrorsDisplay] Resetting when not in error');
596
654
  // reset when not in error
597
655
  // remove child elements
598
656
  var $children = $parent.getElementsByTagName('div');
@@ -606,16 +664,34 @@
606
664
 
607
665
  $parent.className = $parent.className.replace(/(\s+form\-item\-error|form\-item\-error|\s+form\-item\-warning|form\-item\-warning)/, '');
608
666
 
609
- } else if ( typeof(errors[name]) != 'undefined' && errAttr) {
667
+ } else if (
668
+ errors.count() > 0
669
+ && typeof(errors[name]) != 'undefined'
670
+ && errAttr
671
+ ) {
610
672
  // refreshing already displayed error on msg update
611
673
  var $divs = $parent.getElementsByTagName('div');
612
674
  for (var d = 0, dLen = $divs.length; d<dLen; ++d) {
613
- if ($divs[d].className == 'form-item-error-message') {
675
+ // Fixed on 2025-03-05: className can have more than one !!
676
+ let foundMessage = $divs[d].className.match("form-item-error-message");
677
+ if (
678
+ foundMessage
679
+ && typeof(foundMessage.length) != 'undefined'
680
+ && foundMessage.length > 0
681
+ ) {
614
682
 
615
683
  $divs[d].parentElement.removeChild($divs[d]);
616
684
  $err = document.createElement('div');
617
685
  $err.setAttribute('class', 'form-item-error-message');
618
686
 
687
+ // Fixed on 2025-03-09: className cleanup
688
+ if (
689
+ !isWarning
690
+ && /(\s+form\-item\-warning|form\-item\-warning)/.test($parent.className)
691
+ ) {
692
+ $parent.className = $parent.className.replace(/(\s+form\-item\-warning|form\-item\-warning)/, ' form-item-error');
693
+ }
694
+
619
695
  // injecting error messages
620
696
  // {
621
697
  // field: {
@@ -640,12 +716,17 @@
640
716
  }
641
717
  }
642
718
 
643
- if ($err && $target.type != 'hidden')
719
+ if ($err && $target.type != 'hidden') {
644
720
  insertAfter($target, $err);
645
-
721
+ }
646
722
  }
647
723
 
648
- if (typeof(fieldName) != 'undefined' && fieldName === $el.name) break;
724
+ if (
725
+ typeof(fieldName) != 'undefined'
726
+ && fieldName === $el.name
727
+ ) {
728
+ break;
729
+ }
649
730
  }
650
731
 
651
732
 
@@ -769,7 +850,7 @@
769
850
  , value = null // current value
770
851
  , defaultValue = null
771
852
  ;
772
-
853
+ $form.isBeingReseted = true;
773
854
  for (var f in $form.fieldsSet) {
774
855
 
775
856
  $element = document.getElementById(f);
@@ -806,6 +887,7 @@
806
887
  }
807
888
 
808
889
  }
890
+ delete $form.isBeingReseted;
809
891
  }
810
892
 
811
893
  return $form
@@ -840,31 +922,41 @@
840
922
  *
841
923
  *
842
924
  * @param {object} data - FormData object (https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects)
843
- * @param {object} [ options ] : { isSynchrone: true, withCredentials: true }
925
+ * @param {object} [ options ] : { isSynchrone: false, withCredentials: true, withRateLimit: true }
844
926
  * */
845
927
  var send = function(data, options) {
846
928
 
847
929
 
848
930
  var $target = this.target , id = $target.getAttribute('id');
849
931
  var $form = instance.$forms[id] || this;
932
+ var $submitTrigger = document.getElementById($form.submitTrigger) || null;
850
933
  var result = null;
851
934
  var XHRData = null;
852
935
  var isAttachment = null; // handle download
853
936
  var hFormIsRequired = null;
854
937
 
938
+ options = (typeof (options) != 'undefined') ? merge(options, xhrOptions) : xhrOptions;
939
+
940
+ // Rate Limit to one request at the time
941
+ // Attention: this should be an option
942
+ // the request needs to be completed before another can be made
943
+ // TODO - Check same url
855
944
  if (
856
- typeof($form.isSending) != 'undefined'
945
+ /^true$/i.test(options.withRateLimit)
946
+ && typeof($form.isSending) != 'undefined'
857
947
  && /^true$/i.test($form.isSending)
858
948
  ||
859
- typeof($form.sent) != 'undefined'
949
+ /^true$/i.test(options.withRateLimit)
950
+ && typeof($form.sent) != 'undefined'
860
951
  && /^true$/i.test($form.sent)
861
952
  ) {
862
953
  return;
863
954
  }
955
+
864
956
  instance.$forms[id].isSending = true;
865
957
 
866
958
 
867
- options = (typeof (options) != 'undefined') ? merge(options, xhrOptions) : xhrOptions;
959
+
868
960
  // `x-gina-form`definition
869
961
  //options.headers['X-Gina-Form-Location'] = gina.config.bundle;
870
962
  if ( typeof($form.id) != 'undefined' ) {
@@ -968,20 +1060,45 @@
968
1060
 
969
1061
  if (xhr) {
970
1062
  // catching ready state cb
1063
+ // Data loading ...
1064
+ if ( /^(1|3)$/.test(xhr.readyState) ) {
1065
+ $form.target.setAttribute('data-gina-form-loading', true);
1066
+ if ($submitTrigger) {
1067
+ // For A tag: aria-disabled=true
1068
+ if ( /^A$/i.test($submitTrigger.tagName) ) {
1069
+ $submitTrigger.setAttribute('aria-disabled', true);
1070
+ } else {
1071
+ $submitTrigger.setAttribute('disabled', true);
1072
+ }
1073
+ }
1074
+ }
971
1075
  //handleXhrResponse(xhr, $target, id, $form, hFormIsRequired);
972
1076
  xhr.onreadystatechange = function onValidationCallback(event) {
973
1077
  $form.isSubmitting = false;
974
1078
  $form.isSending = false;
975
1079
 
976
1080
  // limit send trigger to 1 sec to prevent from double clicks
977
- setTimeout( function onSent() {
978
- $form.sent = false;
979
- }, 1000);
980
-
1081
+ // setTimeout( function onSent() {
1082
+ // $form.sent = false;
1083
+ // }, 1000); // 1000
1084
+
1085
+ // Data loading ...
1086
+ if ( /^(1|3)$/.test(xhr.readyState) ) {
1087
+ $form.target.setAttribute('data-gina-form-loading', true);
1088
+ if ($submitTrigger) {
1089
+ // For A tag: aria-disabled=true
1090
+ if ( /^A$/i.test($submitTrigger.tagName) ) {
1091
+ $submitTrigger.setAttribute('aria-disabled', true);
1092
+ } else {
1093
+ $submitTrigger.setAttribute('disabled', true);
1094
+ }
1095
+ }
1096
+ }
981
1097
  // In case the user is also redirecting
982
1098
  var redirectDelay = (/Google Inc/i.test(navigator.vendor)) ? 50 : 0;
983
1099
 
984
- if (xhr.readyState == 2) { // responseType interception
1100
+ // responseType interception
1101
+ if (xhr.readyState == 2) {
985
1102
  isAttachment = ( /^attachment\;/.test( xhr.getResponseHeader("Content-Disposition") ) ) ? true : false;
986
1103
  // force blob response type
987
1104
  if ( !xhr.responseType && isAttachment ) {
@@ -990,6 +1107,18 @@
990
1107
  }
991
1108
 
992
1109
  if (xhr.readyState == 4) {
1110
+
1111
+ $form.sent = false;
1112
+ if ($submitTrigger) {
1113
+ // For A tag: aria-disabled=true
1114
+ if ( /^A$/i.test($submitTrigger.tagName) ) {
1115
+ $submitTrigger.removeAttribute('aria-disabled', true);
1116
+ } else {
1117
+ $submitTrigger.removeAttribute('disabled', true);
1118
+ }
1119
+ }
1120
+ $form.target.removeAttribute('data-gina-form-loading');
1121
+
993
1122
  var $popin = null;
994
1123
  var blob = null;
995
1124
  var contentType = xhr.getResponseHeader("Content-Type");
@@ -1015,7 +1144,7 @@
1015
1144
  var url = window.URL.createObjectURL(blob);
1016
1145
  a.href = url;
1017
1146
  var contentDisposition = xhr.getResponseHeader("Content-Disposition");
1018
- a.download = contentDisposition.match('\=(.*)')[0].substr(1);
1147
+ a.download = contentDisposition.match('\=(.*)')[0].substring(1);
1019
1148
  //programatically click the link to trigger the download
1020
1149
  a.click();
1021
1150
 
@@ -1034,7 +1163,9 @@
1034
1163
  size : blob.size
1035
1164
  }
1036
1165
 
1037
- } else { // normal case
1166
+ }
1167
+ // normal case
1168
+ else {
1038
1169
  result = xhr.responseText;
1039
1170
  }
1040
1171
 
@@ -1043,9 +1174,14 @@
1043
1174
  if ( /\/json/.test( contentType ) ) {
1044
1175
  result = JSON.parse(xhr.responseText);
1045
1176
 
1046
- if ( typeof(result.status) == 'undefined' )
1177
+ if ( typeof(result.status) == 'undefined' ) {
1047
1178
  result.status = xhr.status;
1048
-
1179
+ }
1180
+ // Fixed on 2025-03-13 Allowing toolbar to ubdate after xhr results
1181
+ // TODO - Allowing to revert to previously loaded data via a close button
1182
+ if (gina && envIsDev && typeof(window.ginaToolbar) && typeof(result) != 'undefined') {
1183
+ window.ginaToolbar.update('data-xhr', result);
1184
+ }
1049
1185
  }
1050
1186
 
1051
1187
  if ( /\/html/.test( contentType ) ) {
@@ -1276,6 +1412,13 @@
1276
1412
  // } else { // external - need to remove `X-Requested-With` from `options.headers`
1277
1413
  result.location = (!/^http/.test(result.location) && !/^\//.test(result.location) ) ? location.protocol +'//' + result.location : result.location;
1278
1414
  //}
1415
+ // isProxyHost ?
1416
+ if (
1417
+ result.location.replace(/^http(.*)\:\d+/, '$1').replace(/^\:\/\//, '').split(/\//g)[0] == gina.config.hostname
1418
+ && gina.config.hostname == window.location.host
1419
+ ) {
1420
+ result.location = location.protocol + result.location.replace(/^http(.*)\:\d+/, '$1').replace(/^\:/, '')
1421
+ }
1279
1422
 
1280
1423
  return setTimeout(() => {
1281
1424
  window.location.href = result.location;
@@ -1487,9 +1630,12 @@
1487
1630
 
1488
1631
  $form.eventData.ontimeout = result;
1489
1632
 
1633
+ $form.target.setAttribute('data-gina-form-loading', false);
1634
+
1490
1635
  // intercept upload
1491
- if ( /^gina\-upload/i.test(id) )
1636
+ if ( /^gina\-upload/i.test(id) ) {
1492
1637
  onUpload(gina, $target, 'error', id, result);
1638
+ }
1493
1639
 
1494
1640
  triggerEvent(gina, $target, 'error.' + id, result);
1495
1641
 
@@ -1905,7 +2051,7 @@
1905
2051
  filesToBeRemoved.push(childNodeFilePreview);
1906
2052
  }
1907
2053
  } else {
1908
- let file = childNodes[i].src.substr(childNodes[i].src.lastIndexOf('/')+1);
2054
+ let file = childNodes[i].src.substring(childNodes[i].src.lastIndexOf('/')+1);
1909
2055
  childNodeFile = file;
1910
2056
  filesToBeRemoved.push(childNodeFile);
1911
2057
  }
@@ -2341,7 +2487,7 @@
2341
2487
  for (let m = 0, mLen = mergingRules.length; m < mLen; m++) {
2342
2488
  if ( re.test(mergingRules[m]) ) {
2343
2489
  let tmpStr = JSON.stringify(rule);
2344
- tmpStr = tmpStr.substr(1, tmpStr.length-1);// removing ->{ ... }<-
2490
+ tmpStr = tmpStr.substring(1, tmpStr.length-1);// removing ->{ ... }<-
2345
2491
  // is last ?
2346
2492
  if (m < mLen-1) {
2347
2493
  tmpStr += ','
@@ -3108,7 +3254,14 @@
3108
3254
 
3109
3255
  var processEvent = function() {
3110
3256
 
3111
- console.debug('processing: ' + event.target.name+ '/'+ event.target.id);
3257
+ // if ( typeof($form.isBeingReseted) != 'undefined' && /^true$/.test($form.isBeingReseted) ) {
3258
+ // handleErrorsDisplay(event.target.form, {}, null, event.target.name);
3259
+ // return cancelEvent(event);
3260
+ // }
3261
+
3262
+ if ( !/^(password)$/i.test(event.target.type) ) {
3263
+ console.debug('processing: ' + event.target.name+ '/'+ event.target.id);
3264
+ }
3112
3265
 
3113
3266
  // Do not validate `onChange` if `input value` === `orignal value`
3114
3267
  // Or else, you will get an endless loop
@@ -3126,7 +3279,6 @@
3126
3279
  } else {
3127
3280
  handleErrorsDisplay(event.target.form, errors, null, event.target.name);
3128
3281
  }
3129
- //return cancelEvent(event);
3130
3282
  }
3131
3283
 
3132
3284
 
@@ -3136,7 +3288,7 @@
3136
3288
 
3137
3289
  instance.$forms[event.target.form.getAttribute('id')].isValidating = true;
3138
3290
  validate(event.target, localField, $localField, $form.rules, function onLiveValidation(result){
3139
- instance.$forms[event.target.form.getAttribute('id')].isValidating = false;
3291
+ // instance.$forms[event.target.form.getAttribute('id')].isValidating = false;
3140
3292
  //console.debug('validation on processEvent(...) ', result);
3141
3293
 
3142
3294
  var isFormValid = result.isValid();
@@ -3162,8 +3314,10 @@
3162
3314
  instance.$forms[formId].isValidating = true;
3163
3315
  validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
3164
3316
  instance.$forms[formId].isValidating = false;
3165
- console.debug('['+ formId +'] onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult);
3317
+ console.debug('['+ formId +'] onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult, gFields);
3318
+ // var isFormValid = ( gResult.isValid() && instance.$forms[formId].errors && instance.$forms[formId].errors.count() == 0 )? true : false;
3166
3319
  var isFormValid = gResult.isValid();
3320
+ // var isFormValid = gResult.isValid();
3167
3321
  if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
3168
3322
  // update toolbar
3169
3323
  if (!gina.forms.errors)
@@ -3178,6 +3332,27 @@
3178
3332
  }
3179
3333
 
3180
3334
 
3335
+ if ( !isFormValid && gResult.error ) {
3336
+ // Fixed on 2025-03-16 - we need past and live errors
3337
+ instance.$forms[ $el.form.getAttribute('id') ].errors = merge(result.error, gResult.error);
3338
+ // Fixed on 2025-03-16
3339
+ for (let eField in gResult.error) {
3340
+ refreshWarning($gFields[eField]);
3341
+ handleErrorsDisplay($gForm, gResult.error, gResult.data, eField);
3342
+ }
3343
+ }
3344
+ // Fixed on 2025-03-16
3345
+ // Eg.: input select change impacting another element: solve `no more errors`
3346
+ else if ( instance.$forms[formId].errors && !instance.$forms[formId].errors.count() ) {
3347
+ // recheck if valid
3348
+ //resetting error display
3349
+ instance.$forms[ formId ].errors = {};
3350
+ console.debug('resetting field: '+ $el.name);
3351
+ liveCheckErrors[formId] = {};
3352
+ // $form.dataset.ginaFormIsResetting = true;
3353
+ handleErrorsDisplay($gForm, {}, null, $el.name);
3354
+ }
3355
+
3181
3356
  updateSubmitTriggerState( $gForm, isFormValid);
3182
3357
 
3183
3358
  once = false;
@@ -3211,13 +3386,16 @@
3211
3386
  // other inputs & textareas
3212
3387
  else if ( /^focusin\./i.test(event.type) ) {
3213
3388
  if ( /\-error/.test($el.parentNode.className) ) {
3214
- console.debug('#1 you just focusin ....'+$el.id, $el.value);
3389
+ console.debug('#1 you just focusin ....'+$el.id, $el.value, instance.$forms[ $el.form.getAttribute('id') ].isValidating);
3215
3390
  refreshWarning($el);
3216
3391
  }
3217
3392
  }
3218
3393
  else if ( /^focusout\./i.test(event.type) ) {
3219
3394
  if ( /\-warning/.test($el.parentNode.className) ) {
3220
3395
  console.debug('#1 you just focusout ....'+$el.id, $el.value);
3396
+ // Removed on 2025-03-16
3397
+ instance.$forms[ $el.form.getAttribute('id') ].isValidating = false;
3398
+
3221
3399
  refreshWarning($el);
3222
3400
  // in case error context is changed by another task
3223
3401
  handleErrorsDisplay($el.form, instance.$forms[ $el.form.getAttribute('id') ].errors, null, $el.name);
@@ -3226,12 +3404,86 @@
3226
3404
  else if ( /^keyup\./i.test(event.type) ) {
3227
3405
  $el.ginaFormValidatorTestedValue = $el.value;
3228
3406
  liveCheckTimer = setTimeout( function onLiveCheckTimer() {
3229
- // do not trigger for copy/paste event
3230
- if ( ['91', '17'].indexOf(''+event.keyCode) > -1 && keyboardMapping.count() == 0) {
3407
+ // Do not trigger for copy/paste events
3408
+ if ( ['91', '17', '16'].indexOf(''+event.keyCode) > -1 && keyboardMapping.count() == 0) {
3231
3409
  //console.debug('mapping ', keyboardMapping);
3232
3410
  return;
3233
3411
  }
3234
- console.debug(' keyup ('+ event.keyCode +') .... '+$el.id, $el.value, ' VS ',$el.ginaFormValidatorTestedValue + '(old)');
3412
+
3413
+ // Fixed on 2025-03-16:
3414
+ // Treat TAB as focus in/out
3415
+ // if ( ['9'].indexOf(''+event.keyCode) > -1 ) {
3416
+
3417
+ // console.debug('[TAB] you just focusout from "'+ instance.$forms[ $el.form.getAttribute('id') ].lastFocused[1].id +'" to "'+ $el.id +'"');
3418
+ // var $gForm = event.target.form, gFields = null, $gFields = null, gRules = null;
3419
+ // var gValidatorInfos = getFormValidationInfos($gForm, rules);
3420
+ // gFields = gValidatorInfos.fields;
3421
+ // $gFields = gValidatorInfos.$fields;
3422
+ // var formId = $gForm.getAttribute('id');
3423
+ // gRules = instance.$forms[formId].rules;
3424
+ // // Don't be tempted to revome fields that has already been validated
3425
+ // instance.$forms[formId].isValidating = true;
3426
+ // validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
3427
+ // instance.$forms[formId].isValidating = false;
3428
+ // console.debug('['+ formId +'] [9] onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult, gFields);
3429
+ // var isFormValid = ( gResult.isValid() && instance.$forms[formId].errors && instance.$forms[formId].errors.count() == 0 )? true : false;
3430
+ // // var isFormValid = gResult.isValid();
3431
+ // if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
3432
+ // // update toolbar
3433
+ // if (!gina.forms.errors)
3434
+ // gina.forms.errors = {};
3435
+
3436
+ // var objCallback = {
3437
+ // id : formId,
3438
+ // errors : gResult.error || {}
3439
+ // };
3440
+
3441
+ // window.ginaToolbar.update('forms', objCallback);
3442
+ // }
3443
+
3444
+
3445
+ // if ( !isFormValid && gResult.error ) {
3446
+ // // Fixed on 2025-03-16 - we need past and live errors
3447
+ // instance.$forms[ $el.form.getAttribute('id') ].errors = merge(result.error, gResult.error);
3448
+ // // Fixed on 2025-03-16
3449
+ // for (let eField in instance.$forms[ $el.form.getAttribute('id') ].errors) {
3450
+ // refreshWarning($gFields[eField]);
3451
+ // handleErrorsDisplay($gForm, instance.$forms[ $el.form.getAttribute('id') ].errors, gResult.data, eField);
3452
+ // }
3453
+ // }
3454
+ // // Fixed on 2025-03-16
3455
+ // // Eg.: input select change impacting another element: solve `no more errors`
3456
+ // else if ( instance.$forms[formId].errors && !instance.$forms[formId].errors.count() ) {
3457
+ // // recheck if valid
3458
+ // //resetting error display
3459
+ // instance.$forms[ formId ].errors = {};
3460
+ // console.debug('resetting field: '+ $el.name);
3461
+ // liveCheckErrors[formId] = {};
3462
+ // // $form.dataset.ginaFormIsResetting = true;
3463
+ // handleErrorsDisplay($gForm, {}, null, $el.name);
3464
+ // }
3465
+
3466
+ // updateSubmitTriggerState( $gForm, isFormValid);
3467
+
3468
+ // once = false;
3469
+ // });
3470
+ // // var $previeousEl = document.getElementById(instance.$forms[ $el.form.getAttribute('id') ].lastFocused[1].id);
3471
+ // // var errors = instance.$forms[ $previeousEl.form.getAttribute('id') ].errors;
3472
+ // // var isFormValid = (!errors[$previeousEl.name]) ? true : false;
3473
+ // // console.debug('[TAB] you just focusout from "'+ instance.$forms[ $el.form.getAttribute('id') ].lastFocused[1].id +'" to "'+ $el.id +'"', "errors: ", errors);
3474
+ // // if (errors && errors.count() > 0 ) {
3475
+ // // instance.$forms[ $previeousEl.form.getAttribute('id') ].isValidating = false;
3476
+ // // isFormValid = false;
3477
+ // // }
3478
+ // // refreshWarning($previeousEl);
3479
+ // // // // in case error context is changed by another task
3480
+ // // handleErrorsDisplay($previeousEl.form, errors, null, $previeousEl.name);
3481
+ // // updateSubmitTriggerState( $el.form, isFormValid);
3482
+ // return;
3483
+ // }
3484
+
3485
+
3486
+ console.debug('[A]['+keyboardMapping.count()+'] keyup ('+ event.keyCode +') .... '+$el.id, $el.value, ' VS ',$el.ginaFormValidatorTestedValue + '(old)');
3235
3487
  processEvent();
3236
3488
  }, 1000);
3237
3489
  }
@@ -3331,16 +3583,42 @@
3331
3583
  //console.debug('pressed: '+ e.key+'('+ e.keyCode+')', ' S:'+posStart, ' E:'+posEnd, ' MAP: '+ JSON.stringify(keyboardMapping));
3332
3584
  switch (e.keyCode) {
3333
3585
  case 46: //Delete
3586
+ if (posStart != posEnd) {
3587
+ $_el.value = str.substring(0, posStart) + str.substring(posEnd);
3588
+ if (posStart == 0) {
3589
+ $_el.value = str.substring(posEnd+1);
3590
+ }
3591
+ } else if (posStart == 0) {
3592
+ $_el.value = str.substring(posStart+1);
3593
+ } else {
3594
+ $_el.value = str.substring(0, posStart) + str.substring(posEnd+1);
3595
+ }
3596
+
3597
+ e.currentTarget.setAttribute('readonly', 'readonly');
3598
+ setTimeout(() => {
3599
+ $_el.removeAttribute('readonly');
3600
+ setTimeout(() => {
3601
+ if (posStart != posEnd) {
3602
+ setCaretToPos($_el, posStart);
3603
+ } else if (posStart == 0) {
3604
+ setCaretToPos($_el, posStart);
3605
+ } else {
3606
+ setCaretToPos($_el, posStart);
3607
+ }
3608
+ }, 0)
3609
+
3610
+ }, 0);
3611
+ break
3334
3612
  case 8: //Backspace
3335
3613
  if (posStart != posEnd) {
3336
- $_el.value = str.substr(0, posStart) + str.substr(posEnd);
3614
+ $_el.value = str.substring(0, posStart) + str.substring(posEnd);
3337
3615
  if (posStart == 0) {
3338
- $_el.value = str.substr(posEnd);
3616
+ $_el.value = str.substring(posEnd);
3339
3617
  }
3340
3618
  } else if (posStart == 0) {
3341
3619
  $_el.value = str.substring(posStart+1);
3342
3620
  } else {
3343
- $_el.value = str.substr(0, posStart-1) + str.substr(posEnd);
3621
+ $_el.value = str.substring(0, posStart-1) + str.substring(posEnd);
3344
3622
  }
3345
3623
 
3346
3624
  e.currentTarget.setAttribute('readonly', 'readonly');
@@ -3378,9 +3656,9 @@
3378
3656
  }
3379
3657
  break;
3380
3658
  // Shortcuts
3381
- case 17: //CTRL
3382
- case 91: //CMD
3383
- console.debug("CMD hit");
3659
+ case 17: // CTRL
3660
+ case 91: // CMD
3661
+ console.debug("CMD, CTRL hit");
3384
3662
  e.preventDefault();
3385
3663
  break;
3386
3664
  case 67: // to handle CMD+C (copy)
@@ -3427,15 +3705,18 @@
3427
3705
  }
3428
3706
  default:
3429
3707
  // Replace selection
3708
+ if (e.key.length > 1) {
3709
+ break;
3710
+ }
3430
3711
  if (posStart != posEnd) {
3431
- $_el.value = str.substr(0, posStart) + e.key;
3712
+ $_el.value = str.substring(0, posStart) + e.key;
3432
3713
  if (posEnd-1 < str.length) {
3433
3714
  $_el.value += str.substring(posEnd)
3434
3715
  }
3435
3716
  } else if (posStart == 0) {
3436
3717
  $_el.value = e.key + str.substring(posStart);
3437
3718
  } else {
3438
- $_el.value = str.substr(0, posStart) + e.key + str.substr(posEnd);
3719
+ $_el.value = str.substring(0, posStart) + e.key + str.substring(posEnd);
3439
3720
  }
3440
3721
  e.currentTarget.setAttribute('readonly', 'readonly');
3441
3722
  // Force restore last caret position
@@ -3577,24 +3858,53 @@
3577
3858
  }
3578
3859
 
3579
3860
  /**
3580
- * reBindForm - This is a WIP
3861
+ * reBindForm
3862
+ * Allows form rebinding: it is like reseting validation
3581
3863
  *
3582
- * @param {object} HTMLElement
3583
- * @param {object} rules
3584
- * @returns {object} formValidatorInstance
3864
+ * E.g.:
3865
+ * $validator
3866
+ * .getFormById('my-form-id')
3867
+ * .reBind();
3868
+ *
3869
+ * @param {string} [formId]
3870
+ * @param {string} [rules]
3871
+ * @param {callback} [cb]
3585
3872
  */
3586
- var reBindForm = function($target, rules, cb) {
3587
- // Unbind form
3588
- var formInstance = unbindForm($target);
3873
+ var reBindForm = function(formId, rules, cb) {
3874
+ var $form = null
3875
+ , _id = null
3876
+ ;
3877
+ if (
3878
+ typeof(this.target) != 'undefined'
3879
+ && /FORM/i.test(this.target.tagName)
3880
+ ) {
3881
+ _id = formId = this.target.getAttribute('id')
3882
+ } else if ( /string/i.test(typeof(formId)) ) {
3883
+ _id = formId
3884
+ }
3885
+
3886
+ if ( typeof(instance.$forms[_id]) != 'undefined') {
3887
+ $form = instance.$forms[_id];
3888
+ } else {
3889
+ throw new Error('form instance `'+ _id +'` not found');
3890
+ }
3891
+
3589
3892
  // reset errors
3590
- //resetErrorsDisplay(formInstance.id);
3893
+ resetErrorsDisplay(_id);
3894
+ // Unbind form
3895
+ unbindForm($form.target);
3591
3896
  // Bind
3592
- bindForm(formInstance.target, rules);
3897
+ if ( typeof(rule) != 'undefined' ) {
3898
+ bindForm($form.target, rules);
3899
+ } else {
3900
+ bindForm($form.target);
3901
+ }
3593
3902
 
3594
3903
  if ( cb ) {
3595
- return cb(formInstance);
3904
+ return cb($form);
3596
3905
  }
3597
- return formInstance;
3906
+
3907
+ return $form;
3598
3908
  }
3599
3909
 
3600
3910
  var unbindForm = function($target) {
@@ -3612,7 +3922,7 @@
3612
3922
 
3613
3923
  } else if ( typeof($target.target) != 'undefined' ) {
3614
3924
  $form = $target;
3615
- _id = $form.id;
3925
+ _id = ( $target.getAttribute && $target.getAttribute('id') ) ? $form.getAttribute('id') : $form.id;
3616
3926
  } else {
3617
3927
  throw new Error('Validator::unbindForm($target): `$target` must be a DOM element\n'+err.stack )
3618
3928
  }
@@ -3651,7 +3961,7 @@
3651
3961
  // submit buttons
3652
3962
  $elTMP = $form.target.getElementsByTagName('button');
3653
3963
  if ( $elTMP.length > 0 ) {
3654
- for(let i = 0, len = $elTMP.length; i < len; ++i) {
3964
+ for (let i = 0, len = $elTMP.length; i < len; ++i) {
3655
3965
  // if button is != type="submit", you will need to provide : data-gina-form-submit
3656
3966
  // TODO - On button binding, you can then provide data-gina-form-action & data-gina-form-method
3657
3967
  $els.push($elTMP[i])
@@ -3661,7 +3971,7 @@
3661
3971
  // submit links
3662
3972
  $elTMP = $form.target.getElementsByTagName('a');
3663
3973
  if ( $elTMP.length > 0 ) {
3664
- for(let i = 0, len = $elTMP.length; i < len; ++i) {
3974
+ for (let i = 0, len = $elTMP.length; i < len; ++i) {
3665
3975
  $els.push($elTMP[i])
3666
3976
  }
3667
3977
  }
@@ -3717,7 +4027,7 @@
3717
4027
  // textarea
3718
4028
  $elTMP = $form.target.getElementsByTagName('textarea');
3719
4029
  if ( $elTMP.length > 0 ) {
3720
- for(let i = 0, len = $elTMP.length; i < len; ++i) {
4030
+ for (let i = 0, len = $elTMP.length; i < len; ++i) {
3721
4031
  $els.push( $elTMP[i] )
3722
4032
  }
3723
4033
  }
@@ -3726,7 +4036,7 @@
3726
4036
  // forms inside main form
3727
4037
  $elTMP = $form.target.getElementsByTagName('form');
3728
4038
  if ( $elTMP.length > 0 ) {
3729
- for(let i = 0, len = $elTMP.length; i < len; ++i) {
4039
+ for (let i = 0, len = $elTMP.length; i < len; ++i) {
3730
4040
  $els.push( $elTMP[i] )
3731
4041
  }
3732
4042
  }
@@ -3811,8 +4121,10 @@
3811
4121
  /**
3812
4122
  * bindForm
3813
4123
  *
3814
- * @param {object} $target - DOM element
3815
- * @param {object} [customRule]
4124
+ * @param {object} [$target] - DOM element
4125
+ * @param {object|string} [customRule]
4126
+ *
4127
+ * @return {object} bindedForm
3816
4128
  * */
3817
4129
  var bindForm = function($target, customRule) {
3818
4130
 
@@ -3821,28 +4133,35 @@
3821
4133
  , rules = ( typeof(local.rules.count() > 0 ) ) ? local.rules : instance.rules
3822
4134
  ;
3823
4135
 
3824
- try {
3825
- if ( $target.getAttribute && $target.getAttribute('id') ) {
3826
- _id = $target.getAttribute('id');
3827
- if ( typeof(instance.$forms[_id]) != 'undefined')
3828
- $form = instance.$forms[_id];
3829
- else
3830
- throw new Error('form instance `'+ _id +'` not found');
4136
+ if (
4137
+ typeof($target) == 'undefined'
4138
+ && typeof(this.target) != 'undefined'
4139
+ && /FORM/i.test(this.target.tagName)
4140
+ ||
4141
+ !/object/i.test( typeof($target) )
4142
+ ) {
4143
+ _id = this.target.id || this.target.getAttribute('id');
4144
+ } else if ( /string/i.test(typeof($target)) ) {
4145
+ _id = $target
4146
+ } else {
4147
+ _id = $target.getAttribute('id')
4148
+ }
3831
4149
 
4150
+ try {
4151
+ if ( typeof(instance.$forms[_id]) != 'undefined') {
4152
+ $form = instance.$forms[_id];
4153
+ if ( typeof($form.target) == 'undefined' ) {
4154
+ throw new Error('Validator::bindForm($target, customRule): `$target` must be a DOM element\n');
4155
+ }
4156
+ $target = $form.target;
3832
4157
  } else {
3833
- throw new Error('Validator::bindForm($target, customRule): `$target` must be a DOM element\n'+err.stack )
4158
+ throw new Error('form instance `'+ _id +'` not found');
3834
4159
  }
3835
4160
  } catch(err) {
3836
- throw new Error('Validator::bindForm($target, customRule) could not bind form `'+ $target +'`\n'+err.stack )
4161
+ throw new Error('Validator::bindForm($target, customRule) could not bind form `'+ $target +'`\n'+err.stack );
3837
4162
  }
3838
4163
 
3839
- if ( typeof($form) != 'undefined' && $form.binded) {
3840
- return false
3841
- }
3842
-
3843
- console.debug('binding for: '+ _id);
3844
-
3845
-
4164
+ // console.debug('binding for: '+ _id);
3846
4165
  var withRules = false, rule = null, evt = '', proceed = null;
3847
4166
 
3848
4167
  if (
@@ -4143,7 +4462,7 @@
4143
4462
  } else if ( /img/i.test($els[i].tagName) ) {
4144
4463
  $img = $els[i];
4145
4464
  deleteLinkId = uploadTriggerId + '-'+index+'-delete-trigger';
4146
- let file = $img.src.substr($img.src.lastIndexOf('/')+1);
4465
+ let file = $img.src.substring($img.src.lastIndexOf('/')+1);
4147
4466
  $uploadTrigger.customFiles.push({
4148
4467
  name: file,
4149
4468
  deleteLinkId: deleteLinkId
@@ -4502,7 +4821,10 @@
4502
4821
  var updateSelect = function($el, $form) {
4503
4822
  $el.setAttribute('data-value', $el.value);
4504
4823
  // If Live check enabled, proceed to silent validation
4505
- if ( /^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled && $form.rules.count() > 0) ) {
4824
+ if (
4825
+ /^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled && $form.rules.count() > 0)
4826
+ // && typeof($form.isBeingReseted) == 'undefined'
4827
+ ) {
4506
4828
  var localField = {}, $localField = {}, $localForm = null;
4507
4829
  $localForm = $el.form;//event.target.form
4508
4830
  localField[event.target.name] = event.target.value;
@@ -4535,7 +4857,16 @@
4535
4857
  validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
4536
4858
  instance.$forms[formId].isValidating = false;
4537
4859
  console.debug('[updateSelect]: onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult);
4860
+ // Fixed on 2025-03-16
4538
4861
  var isFormValid = gResult.isValid();
4862
+ if (!isFormValid) {
4863
+ instance.$forms[formId].errors = gResult.error;
4864
+ for (let eField in gResult.error) {
4865
+ // refreshWarning($gFields[eField]);
4866
+ handleErrorsDisplay($gForm, gResult.error, gResult.data, eField);
4867
+ }
4868
+ }
4869
+
4539
4870
  updateSubmitTriggerState( $gForm, isFormValid);
4540
4871
  once = false;
4541
4872
  })
@@ -5129,6 +5460,25 @@
5129
5460
  if (gina.events[_evt]) {
5130
5461
  cancelEvent(event);
5131
5462
 
5463
+ // Fixed on 2025-03-05 - "last focus" vs "current focus"
5464
+ // To get active element: document.activeElement
5465
+ var formId = event.target.form.getAttribute('id') || event.currentTarget.getAttribute('id');
5466
+ var lastFocused = {
5467
+ id : $el.id,
5468
+ name: $el.name
5469
+ };
5470
+ if (!instance.$forms[formId].lastFocused.length) {
5471
+ instance.$forms[formId].lastFocused[0] = lastFocused;
5472
+ } else {
5473
+ instance.$forms[formId].lastFocused.splice(0,0,lastFocused);
5474
+ }
5475
+ lastFocused = ( typeof(instance.$forms[formId].lastFocused[1]) != 'undefined' ) ? instance.$forms[formId].lastFocused[1].id : null;
5476
+
5477
+ // cleanup
5478
+ instance.$forms[formId].lastFocused.splice(2);
5479
+
5480
+ // console.debug('lastFocused: ', lastFocused, ' VS current: ', $el.id);
5481
+
5132
5482
  triggerEvent(gina, $el, _evt, event.detail);
5133
5483
  }
5134
5484
  });
@@ -5302,7 +5652,9 @@
5302
5652
  ||
5303
5653
  isCustomSubmit && !/^submit\./i.test(_evt)
5304
5654
  ) {
5305
- _evt = 'submit.'+_evt
5655
+ _evt = 'submit.'+_evt;
5656
+ // Updating submitTrigger in case it has been changed on the fly
5657
+ instance.$forms[$form.id].submitTrigger = $form.submitTrigger = $el.id;
5306
5658
  }
5307
5659
  // in case we have multiple reset type buttons
5308
5660
  if ( $el.type == 'reset' && !/^reset\./i.test(_evt) ) {
@@ -5394,10 +5746,11 @@
5394
5746
  , isDisabled = null
5395
5747
  ;
5396
5748
 
5397
- // stop there if form has already been sent
5398
- if (instance.$forms[id].sent) {
5399
- return;
5400
- }
5749
+
5750
+ // stop there if form has already been sent - anti spam
5751
+ // if (instance.$forms[id].sent) {
5752
+ // return;
5753
+ // }
5401
5754
 
5402
5755
  var validatorInfos = getFormValidationInfos($target, rules);
5403
5756
  fields = validatorInfos.fields;
@@ -5445,7 +5798,7 @@
5445
5798
  ;
5446
5799
  $buttonsTMP = $target.getElementsByTagName('button');
5447
5800
  if ( $buttonsTMP.length > 0 ) {
5448
- for(let b = 0, len = $buttonsTMP.length; b < len; ++b) {
5801
+ for (let b = 0, len = $buttonsTMP.length; b < len; ++b) {
5449
5802
  if ($buttonsTMP[b].type == 'submit') {
5450
5803
  $buttons.push($buttonsTMP[b])
5451
5804
  }
@@ -5455,7 +5808,7 @@
5455
5808
  // binding links
5456
5809
  $buttonsTMP = $target.getElementsByTagName('a');
5457
5810
  if ( $buttonsTMP.length > 0 ) {
5458
- for(let b = 0, len = $buttonsTMP.length; b < len; ++b) {
5811
+ for (let b = 0, len = $buttonsTMP.length; b < len; ++b) {
5459
5812
  if ( $buttonsTMP[b].attributes.getNamedItem('data-gina-form-submit') ) {
5460
5813
  $buttons.push($buttonsTMP[b])
5461
5814
  } else if (
@@ -5513,7 +5866,7 @@
5513
5866
  && typeof($submit.form.id) != 'undefined'
5514
5867
  && $form.id == $submit.form.id
5515
5868
  ) {
5516
- console.debug('attching submitTrigger: '+ $submit.id, ' \ form id: '+ $form.id);
5869
+ // console.debug('attaching submitTrigger: '+ $submit.id, ' \ form id: '+ $form.id);
5517
5870
  instance.$forms[$form.id].submitTrigger = $form.submitTrigger = $submit.id || $submit.getAttribute('id');
5518
5871
  // mark submitTrigger
5519
5872
  $submit.dataset.ginaFormSubmitTriggerFor = $form.id;
@@ -5571,8 +5924,9 @@
5571
5924
  }
5572
5925
 
5573
5926
  // prevent event to be triggered twice
5574
- if ( typeof(e.defaultPrevented) != 'undefined' && e.defaultPrevented )
5927
+ if ( typeof(e.defaultPrevented) != 'undefined' && e.defaultPrevented ) {
5575
5928
  return false;
5929
+ }
5576
5930
 
5577
5931
  if (withRules || isBinded) {
5578
5932
  cancelEvent(e);
@@ -5712,7 +6066,8 @@
5712
6066
  }
5713
6067
  updateSubmitTriggerState( $form, result.isValid() );
5714
6068
  });
5715
- } else if (!/^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled) ) {
6069
+ }
6070
+ else if (!/^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled) ) {
5716
6071
  updateSubmitTriggerState( $form , true );
5717
6072
  }
5718
6073
 
@@ -5729,10 +6084,18 @@
5729
6084
  }
5730
6085
  //if (!$formInstance) return;
5731
6086
 
5732
- if ( typeof($formInstance.submitTrigger) == 'undefined') {
6087
+
6088
+ if (
6089
+ typeof($formInstance.submitTrigger) == 'undefined'
6090
+ && /^(true)$/i.test($formInstance.target.dataset.ginaFormLiveCheckEnabled)
6091
+ ) {
5733
6092
  console.warn('This might be normal, so do not worry if this form is handled by your javascript: `'+ $formInstance.id +'`\nGina could not complete `updateSubmitTriggerState()`: `submitTrigger` might not be attached to form instance `'+ $formInstance.id +'`\nTo disable this warning, You just need to disable `Form Live Checking on your form by adding to your <form>: `data-gina-form-live-check-enabled=false``')
5734
6093
  } else if ( document.getElementById($formInstance.submitTrigger) ) {
5735
- if ( /true/i.test(isFormValid) ) { // show submitTrigge
6094
+ if (
6095
+ /^true$/i.test(isFormValid)
6096
+ ||
6097
+ !/^(true)$/i.test($formInstance.target.dataset.ginaFormLiveCheckEnabled)
6098
+ ) { // show submitTrigge
5736
6099
  document.getElementById($formInstance.submitTrigger).disabled = false;
5737
6100
  } else { // hide submitTrigger
5738
6101
  document.getElementById($formInstance.submitTrigger).disabled = true;
@@ -6175,7 +6538,8 @@
6175
6538
  if ( !/^form$/i.test($formOrElement.tagName) ) {
6176
6539
  $currentForm = $formOrElement.form;
6177
6540
  }
6178
- var formId = $currentForm.getAttribute('id');
6541
+ var formId = $currentForm.getAttribute('id');
6542
+ var isFormValid = null;
6179
6543
 
6180
6544
  if (
6181
6545
  hasParsedAllRules
@@ -6196,10 +6560,16 @@
6196
6560
  if ( typeof(instance.$forms[formId].errors) == 'undefined' ) {
6197
6561
  instance.$forms[formId].errors = {}
6198
6562
  }
6563
+ // Fixed on 2025-03-16
6564
+ if ( typeof(cb._errors[field]) != 'undefined' ) {
6565
+ instance.$forms[formId].errors[field] = cb._errors[field];
6566
+ }
6567
+ console.debug('[A] Refreshing warning/error on field '+ field);
6568
+ if (
6569
+ !isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating)
6570
+ || d[field].target.value != ''
6199
6571
 
6200
- instance.$forms[formId].errors[field] = cb._errors[field];
6201
-
6202
- if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating) || d[field].target.value != '' ) {
6572
+ ) {
6203
6573
  refreshWarning($allFields[field]);
6204
6574
  handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
6205
6575
  updateSubmitTriggerState( $currentForm, isFormValid);
@@ -6207,8 +6577,9 @@
6207
6577
 
6208
6578
  if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
6209
6579
  // update toolbar
6210
- if (!gina.forms.errors)
6580
+ if (!gina.forms.errors) {
6211
6581
  gina.forms.errors = {};
6582
+ }
6212
6583
 
6213
6584
  var objCallback = {
6214
6585
  id : formId,
@@ -6225,13 +6596,13 @@
6225
6596
  }
6226
6597
 
6227
6598
  // is this the last or the only field to be validated ?
6228
- var needsGlobalReValidation = false, isFormValid = null;
6599
+ var needsGlobalReValidation = false;
6229
6600
  if ( listedFields.length == 1 || listedFields[listedFields.length-1] == field) {
6230
6601
  // trigger end of validation
6231
6602
  // console.debug(field +' is the last element to be validated for formId: '+ formId, cb._errors, instance.$forms[formId].errors);
6232
6603
  isFormValid = ( cb._errors.count() > 0 ) ? false : true;
6233
6604
  if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating)) {
6234
- //console.debug('should update error display now ', cb._errors);
6605
+ console.debug('[1] Should update error display now ', cb._errors);
6235
6606
  instance.$forms[formId].errors = merge(cb._errors, instance.$forms[formId].errors);
6236
6607
  refreshWarning($allFields[field]);
6237
6608
  handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
@@ -6263,8 +6634,6 @@
6263
6634
  window.ginaToolbar.update('forms', objCallback);
6264
6635
  }
6265
6636
 
6266
-
6267
-
6268
6637
  handleErrorsDisplay($currentForm, gResult.error, gResult.data, field);
6269
6638
  updateSubmitTriggerState( $currentForm, isFormValid);
6270
6639
  })
@@ -6408,7 +6777,7 @@
6408
6777
 
6409
6778
  for (var c in rules) {
6410
6779
  if (!/^\_case\_/.test(c) ) continue;
6411
- if ( typeof(rules[c].conditions) == 'undefined' || Array.isArray(rules[c].conditions) && !rules[c].conditions.length ) continue;
6780
+ if ( typeof(rules[c].conditions) == 'undefined' || Array.isArray(rules[c].conditions) && !rules[c].conditions.length ) continue;
6412
6781
  if ( typeof(rules[c].conditions[0].rules) == 'undefined' ) continue;
6413
6782
 
6414
6783
 
@@ -6590,7 +6959,14 @@
6590
6959
  // filtering conditions
6591
6960
  for (var _c = 0, _cLen = rules[c].conditions.length; _c < _cLen; ++_c) {
6592
6961
 
6593
- if (rules[c].conditions[_c].case != caseValue) {
6962
+ if (
6963
+ Array.isArray(rules[c].conditions[_c].case)
6964
+ && rules[c].conditions[_c].case.indexOf(caseValue) == -1
6965
+ ||
6966
+ !Array.isArray(rules[c].conditions[_c].case)
6967
+ && rules[c].conditions[_c].case != caseValue
6968
+
6969
+ ) {
6594
6970
  continue;
6595
6971
  }
6596
6972
 
@@ -6735,7 +7111,8 @@
6735
7111
  if (
6736
7112
  conditions[c]['case'] === caseValue
6737
7113
  ||
6738
- Array.isArray(conditions[c]['case']) && conditions[c]['case'].indexOf(caseValue) > -1
7114
+ Array.isArray(conditions[c]['case'])
7115
+ && conditions[c]['case'].indexOf(caseValue) > -1
6739
7116
  ||
6740
7117
  /^\//.test(conditions[c]['case'])
6741
7118
  ) {
@@ -6852,8 +7229,6 @@
6852
7229
  }
6853
7230
  --i;
6854
7231
  }
6855
-
6856
-
6857
7232
  } // EO for
6858
7233
  }
6859
7234
 
@@ -6874,7 +7249,7 @@
6874
7249
  }
6875
7250
 
6876
7251
  if (isGFFCtx)
6877
- $fields[field].setAttribute('data-gina-form-errors', fieldErrorsAttributes[field].substr(0, fieldErrorsAttributes[field].length-1))
7252
+ $fields[field].setAttribute('data-gina-form-errors', fieldErrorsAttributes[field].substring(0, fieldErrorsAttributes[field].length-1))
6878
7253
  }
6879
7254
 
6880
7255
  //calling back
@@ -6945,6 +7320,8 @@
6945
7320
  'data' : formatData( _data )
6946
7321
  });
6947
7322
  removeListener(gina, event.target, 'validated.' + event.target.id);
7323
+
7324
+
6948
7325
  return
6949
7326
  }
6950
7327
  });
@@ -6983,5 +7360,5 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
6983
7360
  module.exports = ValidatorPlugin
6984
7361
  } else if ( typeof(define) === 'function' && define.amd) {
6985
7362
  // Publish as AMD module
6986
- define('gina/validator', ['utils/events', 'utils/dom', 'utils/effects', 'utils/data', 'lib/form-validator'], function(){ return ValidatorPlugin })
7363
+ define('gina/validator', ['utils/events', 'utils/dom', 'utils/effects', 'utils/data', 'lib/form-validator', 'lib/routing'], function(){ return ValidatorPlugin })
6987
7364
  }