gina 0.1.6-alpha.16 → 0.1.6-alpha.161

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.161}/LICENSE +1 -1
  7. package/framework/v0.1.6-alpha.161/VERSION +1 -0
  8. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/plugin/README.md +1 -0
  9. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  10. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  11. package/framework/v0.1.6-alpha.161/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.161}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +1 -1
  13. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/html/toolbar.html.br +0 -0
  14. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/html/toolbar.html.gz +0 -0
  15. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/plugin/dist/vendor/gina/js/gina.js +6444 -5613
  16. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/js/gina.min.js +790 -0
  17. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  18. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  19. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +8 -0
  20. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +9 -0
  21. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  22. package/framework/v0.1.6-alpha.161/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  23. package/framework/v0.1.6-alpha.161/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.161}/core/config.js +149 -57
  25. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/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.161/core/connectors/couchbase/lib/connector.v3.js} +170 -69
  27. package/framework/v0.1.6-alpha.161/core/connectors/couchbase/lib/connector.v4.js +470 -0
  28. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/connectors/couchbase/lib/session-store.v4.js +5 -2
  29. package/framework/v0.1.6-alpha.161/core/content.encoding +9 -0
  30. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/controller/controller.js +847 -1274
  31. package/framework/v0.1.6-alpha.161/core/controller/controller.render-json.js +262 -0
  32. package/framework/v0.1.6-alpha.161/core/controller/controller.render-swig.js +1080 -0
  33. package/framework/v0.1.6-alpha.161/core/controller/controller.render-v1.js +911 -0
  34. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/controller/index.js +2 -2
  35. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/.github/workflows/ci.yml +24 -0
  36. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/.github/workflows/lint.yml +23 -0
  37. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/README.md +191 -0
  38. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +149 -0
  39. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +143 -0
  40. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +154 -0
  41. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +148 -0
  42. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +101 -0
  43. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +84 -0
  44. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/lib/index.js +57 -0
  45. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/lib/types/multipart.js +680 -0
  46. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/lib/types/urlencoded.js +350 -0
  47. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/lib/utils.js +596 -0
  48. package/framework/v0.1.6-alpha.161/core/deps/busboy-1.6.0/package.json +22 -0
  49. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/.travis.yml +4 -0
  50. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/LICENSE +21 -0
  51. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/bool.js +10 -0
  52. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/boolean_double.js +7 -0
  53. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/boolean_single.js +7 -0
  54. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/default_hash.js +8 -0
  55. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/default_singles.js +7 -0
  56. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/divide.js +8 -0
  57. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/line_count.js +20 -0
  58. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/line_count_options.js +29 -0
  59. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/line_count_wrap.js +29 -0
  60. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/nonopt.js +4 -0
  61. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/reflect.js +2 -0
  62. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/short.js +3 -0
  63. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/string.js +11 -0
  64. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/usage-options.js +19 -0
  65. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/example/xup.js +10 -0
  66. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/index.js +343 -0
  67. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/package.json +31 -0
  68. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/package.json.dist +39 -0
  69. package/framework/v0.1.6-alpha.161/core/deps/optimist-0.6.1/readme.markdown +513 -0
  70. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/HISTORY.md +498 -0
  71. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/LICENSE +7 -0
  72. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/README.md +88 -0
  73. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/bin/swig.js +161 -0
  74. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/bin/swig.js.dist +161 -0
  75. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/dist/swig.min.js +7 -0
  76. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/dist/swig.min.js.map +8 -0
  77. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/index.js +1 -0
  78. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/dateformatter.js +198 -0
  79. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/filters.js +630 -0
  80. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/lexer.js +306 -0
  81. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/loaders/filesystem.js +59 -0
  82. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/loaders/index.js +53 -0
  83. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/loaders/memory.js +63 -0
  84. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/parser.js +744 -0
  85. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/swig.js +740 -0
  86. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/autoescape.js +37 -0
  87. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/block.js +25 -0
  88. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/else.js +25 -0
  89. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/elseif.js +28 -0
  90. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/extends.js +19 -0
  91. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/filter.js +68 -0
  92. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/for.js +130 -0
  93. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/if.js +86 -0
  94. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/import.js +91 -0
  95. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/include.js +100 -0
  96. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/index.js +16 -0
  97. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/macro.js +79 -0
  98. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/parent.js +51 -0
  99. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/raw.js +23 -0
  100. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/set.js +109 -0
  101. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/tags/spaceless.js +42 -0
  102. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/lib/utils.js +184 -0
  103. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/package.json +57 -0
  104. package/framework/v0.1.6-alpha.161/core/deps/swig-1.4.2/package.json.dist +61 -0
  105. package/framework/v0.1.6-alpha.161/core/deps/swig-client/swig.js +5031 -0
  106. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/dev/index.js +1 -1
  107. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/dev/lib/factory.js +1 -1
  108. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/gna.js +123 -23
  109. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/index.js +3 -3
  110. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/src/make.js +1 -1
  111. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/mime.types +1 -0
  112. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/model/entity.js +5 -5
  113. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/model/index.js +30 -26
  114. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/model/template/entityFactory.js +1 -1
  115. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/model/template/index.js +1 -1
  116. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/index.js +3 -3
  117. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/file/package.json +2 -2
  118. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/intl/package.json +2 -2
  119. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/storage/package.json +2 -2
  120. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/validator/package.json +2 -2
  121. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/validator/src/form-validator.js +39 -27
  122. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/validator/src/main.js +499 -120
  123. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/router.js +100 -49
  124. package/framework/v0.1.6-alpha.161/core/server.isaac.js +790 -0
  125. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/server.js +437 -160
  126. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/status.codes +1 -11
  127. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/controllers/setup.js +2 -2
  128. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/command/gina.tpl +1 -1
  129. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/conf/env.json +28 -2
  130. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/conf/settings.json +4 -1
  131. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/conf/templates.json +4 -2
  132. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/console.js +1 -1
  133. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/context.js +30 -13
  134. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/data/package.json +2 -2
  135. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/data/src/main.js +1 -1
  136. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/dateFormat.js +1 -1
  137. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/index.js +1 -1
  138. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/json/package.json +2 -2
  139. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/json/src/main.js +7 -4
  140. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/path.js +32 -16
  141. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/plugins/package.json +2 -2
  142. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/plugins/src/api-error.js +2 -2
  143. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/plugins/src/main.js +1 -1
  144. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/prototypes.js +8 -1
  145. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/task.js +2 -2
  146. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/text.js +1 -1
  147. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/archiver/package.json +2 -2
  148. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/archiver/src/main.js +11 -11
  149. package/framework/v0.1.6-alpha.161/lib/cache/README.md +19 -0
  150. package/framework/v0.1.6-alpha.161/lib/cache/package.json +20 -0
  151. package/framework/v0.1.6-alpha.161/lib/cache/src/main.js +239 -0
  152. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/add.js +2 -1
  153. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/restart.js +2 -2
  154. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/start.js +26 -11
  155. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/get.js +1 -1
  156. package/framework/v0.1.6-alpha.161/lib/cmd/env/help.js +30 -0
  157. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/set.js +21 -0
  158. package/framework/v0.1.6-alpha.161/lib/cmd/framework/arguments.json +7 -0
  159. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/build.js +1 -1
  160. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/dot.js +21 -0
  161. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/init.js +21 -3
  162. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/link-node-modules.js +2 -3
  163. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/link.js +3 -2
  164. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/restart.js +3 -3
  165. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/start.js +1 -1
  166. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/tail.js +29 -12
  167. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/version.js +15 -1
  168. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/helper.js +44 -15
  169. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/index.js +1 -1
  170. package/framework/v0.1.6-alpha.161/lib/cmd/minion/help.txt +18 -0
  171. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/port/reset.js +1 -1
  172. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/add.js +7 -2
  173. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/arguments.json +1 -0
  174. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/build.js +32 -7
  175. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/help.txt +4 -0
  176. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/list.js +1 -1
  177. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/protocol/list.js +71 -50
  178. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/collection/package.json +2 -2
  179. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/collection/src/main.js +62 -23
  180. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/config.js +1 -1
  181. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cron/package.json +2 -2
  182. package/framework/v0.1.6-alpha.161/lib/domain/dist/2025-03-14_13-41-20_UTC.dat +15754 -0
  183. package/framework/v0.1.6-alpha.161/lib/domain/dist/public_suffix_list.dat +15754 -0
  184. package/framework/v0.1.6-alpha.161/lib/domain/dist/public_suffix_list.dat.br +0 -0
  185. package/framework/v0.1.6-alpha.161/lib/domain/dist/public_suffix_list.dat.gz +0 -0
  186. package/framework/v0.1.6-alpha.161/lib/domain/exemples/backend.js +12 -0
  187. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/domain/package.json +2 -2
  188. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/domain/src/main.js +75 -13
  189. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/generator/index.js +1 -1
  190. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/index.js +3 -2
  191. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161/lib/inherits}/LICENSE +1 -1
  192. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/inherits/package.json +2 -2
  193. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/inherits/src/main.js +1 -1
  194. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/package.json +2 -2
  195. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/containers/file/index.js +2 -0
  196. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/containers/mq/listener.js +10 -2
  197. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/helper.js +1 -1
  198. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/main.js +1 -1
  199. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/math/index.js +1 -1
  200. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/merge/package.json +2 -2
  201. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/model.js +3 -3
  202. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/proc.js +10 -2
  203. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/routing/package.json +2 -2
  204. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/routing/src/main.js +204 -35
  205. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/session-store.js +3 -3
  206. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/shell.js +7 -6
  207. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/swig-filters/package.json +2 -2
  208. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/swig-filters/src/main.js +98 -92
  209. package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/validator.js +2 -2
  210. package/framework/v0.1.6-alpha.161/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.161}/AUTHORS +0 -0
  236. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/html/nolayout.html +0 -0
  237. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/html/static.html +0 -0
  238. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/img/android-chrome-192x192.png +0 -0
  239. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/img/android-chrome-512x512.png +0 -0
  240. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/img/apple-touch-icon.png +0 -0
  241. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/img/favicon-16x16.png +0 -0
  242. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/img/favicon-32x32.png +0 -0
  243. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/img/favicon.ico +0 -0
  244. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  245. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/asset/plugin/uuid.json +0 -0
  246. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/connectors/couchbase/lib/connector.js +0 -0
  247. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/connectors/couchbase/lib/connector.v2.js +0 -0
  248. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/connectors/couchbase/lib/n1ql.js +0 -0
  249. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/connectors/couchbase/lib/session-store.js +0 -0
  250. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  251. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  252. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/controller/controller.framework.js +0 -0
  253. /package/framework/{v0.1.6-alpha.16/core/deps/busboy → v0.1.6-alpha.161/core/deps/busboy-1.6.0}/LICENSE +0 -0
  254. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
  255. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/dev/lib/class.js +0 -0
  256. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/dev/lib/tools.js +0 -0
  257. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/README.md +0 -0
  258. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/currency.json +0 -0
  259. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/dist/language/en.json +0 -0
  260. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/dist/language/fr.json +0 -0
  261. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/dist/region/en.json +0 -0
  262. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/dist/region/fr.json +0 -0
  263. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/src/resources/currency.csv +0 -0
  264. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/src/resources/region.csv +0 -0
  265. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/locales/src/resources/region.mapping.json +0 -0
  266. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/README.md +0 -0
  267. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/file/README.md +0 -0
  268. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/file/build.json +0 -0
  269. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/intl/README.md +0 -0
  270. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/intl/build.json +0 -0
  271. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/intl/src/main.js +0 -0
  272. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/storage/README.md +0 -0
  273. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/storage/build.json +0 -0
  274. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/storage/src/main.js +0 -0
  275. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/validator/README.md +0 -0
  276. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/plugins/lib/validator/build.json +0 -0
  277. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/server.express.js +0 -0
  278. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/_gitignore +0 -0
  279. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/config/app.json +0 -0
  280. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/config/routing.json +0 -0
  281. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/config/settings.json +0 -0
  282. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  283. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/config/templates.json +0 -0
  284. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  285. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  286. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle/index.js +0 -0
  287. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  288. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  289. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  290. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  291. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  292. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle_public/readme.md +0 -0
  293. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  294. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  295. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/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.161}/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.161}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  298. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/command/gina.bat.tpl +0 -0
  299. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/conf/manifest.json +0 -0
  300. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/conf/package.json +0 -0
  301. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/conf/statics.json +0 -0
  302. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/error/client/json/401.json +0 -0
  303. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/error/client/json/403.json +0 -0
  304. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/error/client/json/404.json +0 -0
  305. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/error/server/html/50x.html +0 -0
  306. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/error/server/json/500.json +0 -0
  307. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/error/server/json/503.json +0 -0
  308. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/core/template/extensions/logger/config.json +0 -0
  309. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/data/LICENSE +0 -0
  310. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/data/README.md +0 -0
  311. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/json/LICENSE +0 -0
  312. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/json/README.md +0 -0
  313. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/helpers/plugins/README.md +0 -0
  314. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/archiver/README.md +0 -0
  315. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/archiver/build.json +0 -0
  316. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/archiver/src/dep/jszip.min.js +0 -0
  317. /package/framework/{v0.1.6-alpha.16/lib/collection → v0.1.6-alpha.161/lib/cache}/build.json +0 -0
  318. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/aliases.json +0 -0
  319. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/arguments.json +0 -0
  320. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/copy.js +0 -0
  321. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/cp.js +0 -0
  322. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/help.js +0 -0
  323. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/help.txt +0 -0
  324. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/list.js +0 -0
  325. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/remove.js +0 -0
  326. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/rename.js +0 -0
  327. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/rm.js +0 -0
  328. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/status.js +0 -0
  329. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/bundle/stop.js +0 -0
  330. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/add.js +0 -0
  331. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/help.txt +0 -0
  332. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/link-dev.js +0 -0
  333. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/list.js +0 -0
  334. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/remove.js +0 -0
  335. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/rm.js +0 -0
  336. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/unset.js +0 -0
  337. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/env/use.js +0 -0
  338. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/get.js +0 -0
  339. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/help.js +0 -0
  340. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/help.txt +0 -0
  341. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/msg.json +0 -0
  342. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/open.js +0 -0
  343. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/set.js +0 -0
  344. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/status.js +0 -0
  345. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/stop.js +0 -0
  346. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/framework/update.js +0 -0
  347. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/gina-dev.1.md +0 -0
  348. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/gina-framework.1.md +0 -0
  349. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/gina.1.md +0 -0
  350. /package/framework/{v0.1.6-alpha.16/lib/cmd/env → v0.1.6-alpha.161/lib/cmd/minion}/help.js +0 -0
  351. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/msg.json +0 -0
  352. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/port/help.js +0 -0
  353. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/port/help.txt +0 -0
  354. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/port/inc/scan.js +0 -0
  355. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/port/list.js +0 -0
  356. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/port/set.js +0 -0
  357. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/help.js +0 -0
  358. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/import.js +0 -0
  359. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/move.js +0 -0
  360. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/remove.js +0 -0
  361. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/rename.js +0 -0
  362. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/restart.js +0 -0
  363. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/rm.js +0 -0
  364. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/start.js +0 -0
  365. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/status.js +0 -0
  366. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/project/stop.js +0 -0
  367. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/protocol/help.js +0 -0
  368. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/protocol/help.txt +0 -0
  369. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/protocol/set.js +0 -0
  370. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/add.js +0 -0
  371. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/help.js +0 -0
  372. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/help.txt +0 -0
  373. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/link-local.js +0 -0
  374. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/link-production.js +0 -0
  375. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/list.js +0 -0
  376. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/remove.js +0 -0
  377. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/rm.js +0 -0
  378. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/scope/use.js +0 -0
  379. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cmd/view/add.js +0 -0
  380. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/collection/README.md +0 -0
  381. /package/framework/{v0.1.6-alpha.16/lib/routing → v0.1.6-alpha.161/lib/collection}/build.json +0 -0
  382. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cron/README.md +0 -0
  383. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/cron/src/main.js +0 -0
  384. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/domain/LICENSE +0 -0
  385. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/domain/README.md +0 -0
  386. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/domain/exemples/frontend.html +0 -0
  387. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/inherits/README.md +0 -0
  388. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/inherits/example/inheriting_eventemitter.js +0 -0
  389. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/inherits/example/protected_inheritance.js +0 -0
  390. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/inherits/example/simple_inheritance.js +0 -0
  391. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/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.161}/lib/logger/README.md +0 -0
  393. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/containers/default/index.js +0 -0
  394. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  395. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  396. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/containers/mq/index.js +0 -0
  397. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/logger/src/containers/mq/speaker.js +0 -0
  398. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/merge/README.md +0 -0
  399. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/merge/example/merge.js +0 -0
  400. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/merge/example/merge_2_literal objects.js +0 -0
  401. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/merge/example/merge_and_preserve_first.js +0 -0
  402. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/merge/src/main.js +0 -0
  403. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/routing/README.md +0 -0
  404. /package/framework/{v0.1.6-alpha.16/lib/domain/exemples/backend.js → v0.1.6-alpha.161/lib/routing/build.json} +0 -0
  405. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/swig-filters/README.md +0 -0
  406. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/url/README.md +0 -0
  407. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/url/index.js +0 -0
  408. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/url/mocks.json +0 -0
  409. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/lib/url/routing.json +0 -0
  410. /package/framework/{v0.1.6-alpha.16 → v0.1.6-alpha.161}/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
  }
@@ -3304,7 +3556,8 @@
3304
3556
  * @param {object} $el HTMLElement
3305
3557
  */
3306
3558
  var handleAutoComplete = function($el, liveCheckTimer) {
3307
- $el.setAttribute('readonly', 'readonly');
3559
+
3560
+ // $el.setAttribute('readonly', 'readonly');
3308
3561
  addListener(gina, $el, 'focusout.'+ $el.id, function(event) {
3309
3562
  event.preventDefault();
3310
3563
  clearTimeout(liveCheckTimer);
@@ -3331,16 +3584,42 @@
3331
3584
  //console.debug('pressed: '+ e.key+'('+ e.keyCode+')', ' S:'+posStart, ' E:'+posEnd, ' MAP: '+ JSON.stringify(keyboardMapping));
3332
3585
  switch (e.keyCode) {
3333
3586
  case 46: //Delete
3587
+ if (posStart != posEnd) {
3588
+ $_el.value = str.substring(0, posStart) + str.substring(posEnd);
3589
+ if (posStart == 0) {
3590
+ $_el.value = str.substring(posEnd+1);
3591
+ }
3592
+ } else if (posStart == 0) {
3593
+ $_el.value = str.substring(posStart+1);
3594
+ } else {
3595
+ $_el.value = str.substring(0, posStart) + str.substring(posEnd+1);
3596
+ }
3597
+
3598
+ e.currentTarget.setAttribute('readonly', 'readonly');
3599
+ setTimeout(() => {
3600
+ $_el.removeAttribute('readonly');
3601
+ setTimeout(() => {
3602
+ if (posStart != posEnd) {
3603
+ setCaretToPos($_el, posStart);
3604
+ } else if (posStart == 0) {
3605
+ setCaretToPos($_el, posStart);
3606
+ } else {
3607
+ setCaretToPos($_el, posStart);
3608
+ }
3609
+ }, 0)
3610
+
3611
+ }, 0);
3612
+ break
3334
3613
  case 8: //Backspace
3335
3614
  if (posStart != posEnd) {
3336
- $_el.value = str.substr(0, posStart) + str.substr(posEnd);
3615
+ $_el.value = str.substring(0, posStart) + str.substring(posEnd);
3337
3616
  if (posStart == 0) {
3338
- $_el.value = str.substr(posEnd);
3617
+ $_el.value = str.substring(posEnd);
3339
3618
  }
3340
3619
  } else if (posStart == 0) {
3341
3620
  $_el.value = str.substring(posStart+1);
3342
3621
  } else {
3343
- $_el.value = str.substr(0, posStart-1) + str.substr(posEnd);
3622
+ $_el.value = str.substring(0, posStart-1) + str.substring(posEnd);
3344
3623
  }
3345
3624
 
3346
3625
  e.currentTarget.setAttribute('readonly', 'readonly');
@@ -3378,9 +3657,9 @@
3378
3657
  }
3379
3658
  break;
3380
3659
  // Shortcuts
3381
- case 17: //CTRL
3382
- case 91: //CMD
3383
- console.debug("CMD hit");
3660
+ case 17: // CTRL
3661
+ case 91: // CMD
3662
+ console.debug("CMD, CTRL hit");
3384
3663
  e.preventDefault();
3385
3664
  break;
3386
3665
  case 67: // to handle CMD+C (copy)
@@ -3427,15 +3706,18 @@
3427
3706
  }
3428
3707
  default:
3429
3708
  // Replace selection
3709
+ if (e.key.length > 1) {
3710
+ break;
3711
+ }
3430
3712
  if (posStart != posEnd) {
3431
- $_el.value = str.substr(0, posStart) + e.key;
3713
+ $_el.value = str.substring(0, posStart) + e.key;
3432
3714
  if (posEnd-1 < str.length) {
3433
3715
  $_el.value += str.substring(posEnd)
3434
3716
  }
3435
3717
  } else if (posStart == 0) {
3436
3718
  $_el.value = e.key + str.substring(posStart);
3437
3719
  } else {
3438
- $_el.value = str.substr(0, posStart) + e.key + str.substr(posEnd);
3720
+ $_el.value = str.substring(0, posStart) + e.key + str.substring(posEnd);
3439
3721
  }
3440
3722
  e.currentTarget.setAttribute('readonly', 'readonly');
3441
3723
  // Force restore last caret position
@@ -3452,6 +3734,7 @@
3452
3734
  }
3453
3735
 
3454
3736
  });
3737
+
3455
3738
  }
3456
3739
 
3457
3740
  var registerForLiveChecking = function($form, $el) {
@@ -3577,24 +3860,53 @@
3577
3860
  }
3578
3861
 
3579
3862
  /**
3580
- * reBindForm - This is a WIP
3863
+ * reBindForm
3864
+ * Allows form rebinding: it is like reseting validation
3581
3865
  *
3582
- * @param {object} HTMLElement
3583
- * @param {object} rules
3584
- * @returns {object} formValidatorInstance
3866
+ * E.g.:
3867
+ * $validator
3868
+ * .getFormById('my-form-id')
3869
+ * .reBind();
3870
+ *
3871
+ * @param {string} [formId]
3872
+ * @param {string} [rules]
3873
+ * @param {callback} [cb]
3585
3874
  */
3586
- var reBindForm = function($target, rules, cb) {
3587
- // Unbind form
3588
- var formInstance = unbindForm($target);
3875
+ var reBindForm = function(formId, rules, cb) {
3876
+ var $form = null
3877
+ , _id = null
3878
+ ;
3879
+ if (
3880
+ typeof(this.target) != 'undefined'
3881
+ && /FORM/i.test(this.target.tagName)
3882
+ ) {
3883
+ _id = formId = this.target.getAttribute('id')
3884
+ } else if ( /string/i.test(typeof(formId)) ) {
3885
+ _id = formId
3886
+ }
3887
+
3888
+ if ( typeof(instance.$forms[_id]) != 'undefined') {
3889
+ $form = instance.$forms[_id];
3890
+ } else {
3891
+ throw new Error('form instance `'+ _id +'` not found');
3892
+ }
3893
+
3589
3894
  // reset errors
3590
- //resetErrorsDisplay(formInstance.id);
3895
+ resetErrorsDisplay(_id);
3896
+ // Unbind form
3897
+ unbindForm($form.target);
3591
3898
  // Bind
3592
- bindForm(formInstance.target, rules);
3899
+ if ( typeof(rule) != 'undefined' ) {
3900
+ bindForm($form.target, rules);
3901
+ } else {
3902
+ bindForm($form.target);
3903
+ }
3593
3904
 
3594
3905
  if ( cb ) {
3595
- return cb(formInstance);
3906
+ return cb($form);
3596
3907
  }
3597
- return formInstance;
3908
+
3909
+ return $form;
3598
3910
  }
3599
3911
 
3600
3912
  var unbindForm = function($target) {
@@ -3612,7 +3924,7 @@
3612
3924
 
3613
3925
  } else if ( typeof($target.target) != 'undefined' ) {
3614
3926
  $form = $target;
3615
- _id = $form.id;
3927
+ _id = ( $target.getAttribute && $target.getAttribute('id') ) ? $form.getAttribute('id') : $form.id;
3616
3928
  } else {
3617
3929
  throw new Error('Validator::unbindForm($target): `$target` must be a DOM element\n'+err.stack )
3618
3930
  }
@@ -3651,7 +3963,7 @@
3651
3963
  // submit buttons
3652
3964
  $elTMP = $form.target.getElementsByTagName('button');
3653
3965
  if ( $elTMP.length > 0 ) {
3654
- for(let i = 0, len = $elTMP.length; i < len; ++i) {
3966
+ for (let i = 0, len = $elTMP.length; i < len; ++i) {
3655
3967
  // if button is != type="submit", you will need to provide : data-gina-form-submit
3656
3968
  // TODO - On button binding, you can then provide data-gina-form-action & data-gina-form-method
3657
3969
  $els.push($elTMP[i])
@@ -3661,7 +3973,7 @@
3661
3973
  // submit links
3662
3974
  $elTMP = $form.target.getElementsByTagName('a');
3663
3975
  if ( $elTMP.length > 0 ) {
3664
- for(let i = 0, len = $elTMP.length; i < len; ++i) {
3976
+ for (let i = 0, len = $elTMP.length; i < len; ++i) {
3665
3977
  $els.push($elTMP[i])
3666
3978
  }
3667
3979
  }
@@ -3717,7 +4029,7 @@
3717
4029
  // textarea
3718
4030
  $elTMP = $form.target.getElementsByTagName('textarea');
3719
4031
  if ( $elTMP.length > 0 ) {
3720
- for(let i = 0, len = $elTMP.length; i < len; ++i) {
4032
+ for (let i = 0, len = $elTMP.length; i < len; ++i) {
3721
4033
  $els.push( $elTMP[i] )
3722
4034
  }
3723
4035
  }
@@ -3726,7 +4038,7 @@
3726
4038
  // forms inside main form
3727
4039
  $elTMP = $form.target.getElementsByTagName('form');
3728
4040
  if ( $elTMP.length > 0 ) {
3729
- for(let i = 0, len = $elTMP.length; i < len; ++i) {
4041
+ for (let i = 0, len = $elTMP.length; i < len; ++i) {
3730
4042
  $els.push( $elTMP[i] )
3731
4043
  }
3732
4044
  }
@@ -3811,8 +4123,10 @@
3811
4123
  /**
3812
4124
  * bindForm
3813
4125
  *
3814
- * @param {object} $target - DOM element
3815
- * @param {object} [customRule]
4126
+ * @param {object} [$target] - DOM element
4127
+ * @param {object|string} [customRule]
4128
+ *
4129
+ * @return {object} bindedForm
3816
4130
  * */
3817
4131
  var bindForm = function($target, customRule) {
3818
4132
 
@@ -3821,28 +4135,35 @@
3821
4135
  , rules = ( typeof(local.rules.count() > 0 ) ) ? local.rules : instance.rules
3822
4136
  ;
3823
4137
 
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');
4138
+ if (
4139
+ typeof($target) == 'undefined'
4140
+ && typeof(this.target) != 'undefined'
4141
+ && /FORM/i.test(this.target.tagName)
4142
+ ||
4143
+ !/object/i.test( typeof($target) )
4144
+ ) {
4145
+ _id = this.target.id || this.target.getAttribute('id');
4146
+ } else if ( /string/i.test(typeof($target)) ) {
4147
+ _id = $target
4148
+ } else {
4149
+ _id = $target.getAttribute('id')
4150
+ }
3831
4151
 
4152
+ try {
4153
+ if ( typeof(instance.$forms[_id]) != 'undefined') {
4154
+ $form = instance.$forms[_id];
4155
+ if ( typeof($form.target) == 'undefined' ) {
4156
+ throw new Error('Validator::bindForm($target, customRule): `$target` must be a DOM element\n');
4157
+ }
4158
+ $target = $form.target;
3832
4159
  } else {
3833
- throw new Error('Validator::bindForm($target, customRule): `$target` must be a DOM element\n'+err.stack )
4160
+ throw new Error('form instance `'+ _id +'` not found');
3834
4161
  }
3835
4162
  } catch(err) {
3836
- throw new Error('Validator::bindForm($target, customRule) could not bind form `'+ $target +'`\n'+err.stack )
4163
+ throw new Error('Validator::bindForm($target, customRule) could not bind form `'+ $target +'`\n'+err.stack );
3837
4164
  }
3838
4165
 
3839
- if ( typeof($form) != 'undefined' && $form.binded) {
3840
- return false
3841
- }
3842
-
3843
- console.debug('binding for: '+ _id);
3844
-
3845
-
4166
+ // console.debug('binding for: '+ _id);
3846
4167
  var withRules = false, rule = null, evt = '', proceed = null;
3847
4168
 
3848
4169
  if (
@@ -4143,7 +4464,7 @@
4143
4464
  } else if ( /img/i.test($els[i].tagName) ) {
4144
4465
  $img = $els[i];
4145
4466
  deleteLinkId = uploadTriggerId + '-'+index+'-delete-trigger';
4146
- let file = $img.src.substr($img.src.lastIndexOf('/')+1);
4467
+ let file = $img.src.substring($img.src.lastIndexOf('/')+1);
4147
4468
  $uploadTrigger.customFiles.push({
4148
4469
  name: file,
4149
4470
  deleteLinkId: deleteLinkId
@@ -4502,7 +4823,10 @@
4502
4823
  var updateSelect = function($el, $form) {
4503
4824
  $el.setAttribute('data-value', $el.value);
4504
4825
  // If Live check enabled, proceed to silent validation
4505
- if ( /^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled && $form.rules.count() > 0) ) {
4826
+ if (
4827
+ /^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled && $form.rules.count() > 0)
4828
+ // && typeof($form.isBeingReseted) == 'undefined'
4829
+ ) {
4506
4830
  var localField = {}, $localField = {}, $localForm = null;
4507
4831
  $localForm = $el.form;//event.target.form
4508
4832
  localField[event.target.name] = event.target.value;
@@ -4535,7 +4859,16 @@
4535
4859
  validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
4536
4860
  instance.$forms[formId].isValidating = false;
4537
4861
  console.debug('[updateSelect]: onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult);
4862
+ // Fixed on 2025-03-16
4538
4863
  var isFormValid = gResult.isValid();
4864
+ if (!isFormValid) {
4865
+ instance.$forms[formId].errors = gResult.error;
4866
+ for (let eField in gResult.error) {
4867
+ // refreshWarning($gFields[eField]);
4868
+ handleErrorsDisplay($gForm, gResult.error, gResult.data, eField);
4869
+ }
4870
+ }
4871
+
4539
4872
  updateSubmitTriggerState( $gForm, isFormValid);
4540
4873
  once = false;
4541
4874
  })
@@ -5129,6 +5462,25 @@
5129
5462
  if (gina.events[_evt]) {
5130
5463
  cancelEvent(event);
5131
5464
 
5465
+ // Fixed on 2025-03-05 - "last focus" vs "current focus"
5466
+ // To get active element: document.activeElement
5467
+ var formId = event.target.form.getAttribute('id') || event.currentTarget.getAttribute('id');
5468
+ var lastFocused = {
5469
+ id : $el.id,
5470
+ name: $el.name
5471
+ };
5472
+ if (!instance.$forms[formId].lastFocused.length) {
5473
+ instance.$forms[formId].lastFocused[0] = lastFocused;
5474
+ } else {
5475
+ instance.$forms[formId].lastFocused.splice(0,0,lastFocused);
5476
+ }
5477
+ lastFocused = ( typeof(instance.$forms[formId].lastFocused[1]) != 'undefined' ) ? instance.$forms[formId].lastFocused[1].id : null;
5478
+
5479
+ // cleanup
5480
+ instance.$forms[formId].lastFocused.splice(2);
5481
+
5482
+ // console.debug('lastFocused: ', lastFocused, ' VS current: ', $el.id);
5483
+
5132
5484
  triggerEvent(gina, $el, _evt, event.detail);
5133
5485
  }
5134
5486
  });
@@ -5302,7 +5654,9 @@
5302
5654
  ||
5303
5655
  isCustomSubmit && !/^submit\./i.test(_evt)
5304
5656
  ) {
5305
- _evt = 'submit.'+_evt
5657
+ _evt = 'submit.'+_evt;
5658
+ // Updating submitTrigger in case it has been changed on the fly
5659
+ instance.$forms[$form.id].submitTrigger = $form.submitTrigger = $el.id;
5306
5660
  }
5307
5661
  // in case we have multiple reset type buttons
5308
5662
  if ( $el.type == 'reset' && !/^reset\./i.test(_evt) ) {
@@ -5394,10 +5748,11 @@
5394
5748
  , isDisabled = null
5395
5749
  ;
5396
5750
 
5397
- // stop there if form has already been sent
5398
- if (instance.$forms[id].sent) {
5399
- return;
5400
- }
5751
+
5752
+ // stop there if form has already been sent - anti spam
5753
+ // if (instance.$forms[id].sent) {
5754
+ // return;
5755
+ // }
5401
5756
 
5402
5757
  var validatorInfos = getFormValidationInfos($target, rules);
5403
5758
  fields = validatorInfos.fields;
@@ -5445,7 +5800,7 @@
5445
5800
  ;
5446
5801
  $buttonsTMP = $target.getElementsByTagName('button');
5447
5802
  if ( $buttonsTMP.length > 0 ) {
5448
- for(let b = 0, len = $buttonsTMP.length; b < len; ++b) {
5803
+ for (let b = 0, len = $buttonsTMP.length; b < len; ++b) {
5449
5804
  if ($buttonsTMP[b].type == 'submit') {
5450
5805
  $buttons.push($buttonsTMP[b])
5451
5806
  }
@@ -5455,7 +5810,7 @@
5455
5810
  // binding links
5456
5811
  $buttonsTMP = $target.getElementsByTagName('a');
5457
5812
  if ( $buttonsTMP.length > 0 ) {
5458
- for(let b = 0, len = $buttonsTMP.length; b < len; ++b) {
5813
+ for (let b = 0, len = $buttonsTMP.length; b < len; ++b) {
5459
5814
  if ( $buttonsTMP[b].attributes.getNamedItem('data-gina-form-submit') ) {
5460
5815
  $buttons.push($buttonsTMP[b])
5461
5816
  } else if (
@@ -5513,7 +5868,7 @@
5513
5868
  && typeof($submit.form.id) != 'undefined'
5514
5869
  && $form.id == $submit.form.id
5515
5870
  ) {
5516
- console.debug('attching submitTrigger: '+ $submit.id, ' \ form id: '+ $form.id);
5871
+ // console.debug('attaching submitTrigger: '+ $submit.id, ' \ form id: '+ $form.id);
5517
5872
  instance.$forms[$form.id].submitTrigger = $form.submitTrigger = $submit.id || $submit.getAttribute('id');
5518
5873
  // mark submitTrigger
5519
5874
  $submit.dataset.ginaFormSubmitTriggerFor = $form.id;
@@ -5571,8 +5926,9 @@
5571
5926
  }
5572
5927
 
5573
5928
  // prevent event to be triggered twice
5574
- if ( typeof(e.defaultPrevented) != 'undefined' && e.defaultPrevented )
5929
+ if ( typeof(e.defaultPrevented) != 'undefined' && e.defaultPrevented ) {
5575
5930
  return false;
5931
+ }
5576
5932
 
5577
5933
  if (withRules || isBinded) {
5578
5934
  cancelEvent(e);
@@ -5712,7 +6068,8 @@
5712
6068
  }
5713
6069
  updateSubmitTriggerState( $form, result.isValid() );
5714
6070
  });
5715
- } else if (!/^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled) ) {
6071
+ }
6072
+ else if (!/^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled) ) {
5716
6073
  updateSubmitTriggerState( $form , true );
5717
6074
  }
5718
6075
 
@@ -5729,10 +6086,18 @@
5729
6086
  }
5730
6087
  //if (!$formInstance) return;
5731
6088
 
5732
- if ( typeof($formInstance.submitTrigger) == 'undefined') {
6089
+
6090
+ if (
6091
+ typeof($formInstance.submitTrigger) == 'undefined'
6092
+ && /^(true)$/i.test($formInstance.target.dataset.ginaFormLiveCheckEnabled)
6093
+ ) {
5733
6094
  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
6095
  } else if ( document.getElementById($formInstance.submitTrigger) ) {
5735
- if ( /true/i.test(isFormValid) ) { // show submitTrigge
6096
+ if (
6097
+ /^true$/i.test(isFormValid)
6098
+ ||
6099
+ !/^(true)$/i.test($formInstance.target.dataset.ginaFormLiveCheckEnabled)
6100
+ ) { // show submitTrigge
5736
6101
  document.getElementById($formInstance.submitTrigger).disabled = false;
5737
6102
  } else { // hide submitTrigger
5738
6103
  document.getElementById($formInstance.submitTrigger).disabled = true;
@@ -6175,7 +6540,8 @@
6175
6540
  if ( !/^form$/i.test($formOrElement.tagName) ) {
6176
6541
  $currentForm = $formOrElement.form;
6177
6542
  }
6178
- var formId = $currentForm.getAttribute('id');
6543
+ var formId = $currentForm.getAttribute('id');
6544
+ var isFormValid = null;
6179
6545
 
6180
6546
  if (
6181
6547
  hasParsedAllRules
@@ -6196,10 +6562,16 @@
6196
6562
  if ( typeof(instance.$forms[formId].errors) == 'undefined' ) {
6197
6563
  instance.$forms[formId].errors = {}
6198
6564
  }
6565
+ // Fixed on 2025-03-16
6566
+ if ( typeof(cb._errors[field]) != 'undefined' ) {
6567
+ instance.$forms[formId].errors[field] = cb._errors[field];
6568
+ }
6569
+ console.debug('[A] Refreshing warning/error on field '+ field);
6570
+ if (
6571
+ !isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating)
6572
+ || d[field].target.value != ''
6199
6573
 
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 != '' ) {
6574
+ ) {
6203
6575
  refreshWarning($allFields[field]);
6204
6576
  handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
6205
6577
  updateSubmitTriggerState( $currentForm, isFormValid);
@@ -6207,8 +6579,9 @@
6207
6579
 
6208
6580
  if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
6209
6581
  // update toolbar
6210
- if (!gina.forms.errors)
6582
+ if (!gina.forms.errors) {
6211
6583
  gina.forms.errors = {};
6584
+ }
6212
6585
 
6213
6586
  var objCallback = {
6214
6587
  id : formId,
@@ -6225,13 +6598,13 @@
6225
6598
  }
6226
6599
 
6227
6600
  // is this the last or the only field to be validated ?
6228
- var needsGlobalReValidation = false, isFormValid = null;
6601
+ var needsGlobalReValidation = false;
6229
6602
  if ( listedFields.length == 1 || listedFields[listedFields.length-1] == field) {
6230
6603
  // trigger end of validation
6231
6604
  // console.debug(field +' is the last element to be validated for formId: '+ formId, cb._errors, instance.$forms[formId].errors);
6232
6605
  isFormValid = ( cb._errors.count() > 0 ) ? false : true;
6233
6606
  if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating)) {
6234
- //console.debug('should update error display now ', cb._errors);
6607
+ console.debug('[1] Should update error display now ', cb._errors);
6235
6608
  instance.$forms[formId].errors = merge(cb._errors, instance.$forms[formId].errors);
6236
6609
  refreshWarning($allFields[field]);
6237
6610
  handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
@@ -6263,8 +6636,6 @@
6263
6636
  window.ginaToolbar.update('forms', objCallback);
6264
6637
  }
6265
6638
 
6266
-
6267
-
6268
6639
  handleErrorsDisplay($currentForm, gResult.error, gResult.data, field);
6269
6640
  updateSubmitTriggerState( $currentForm, isFormValid);
6270
6641
  })
@@ -6408,7 +6779,7 @@
6408
6779
 
6409
6780
  for (var c in rules) {
6410
6781
  if (!/^\_case\_/.test(c) ) continue;
6411
- if ( typeof(rules[c].conditions) == 'undefined' || Array.isArray(rules[c].conditions) && !rules[c].conditions.length ) continue;
6782
+ if ( typeof(rules[c].conditions) == 'undefined' || Array.isArray(rules[c].conditions) && !rules[c].conditions.length ) continue;
6412
6783
  if ( typeof(rules[c].conditions[0].rules) == 'undefined' ) continue;
6413
6784
 
6414
6785
 
@@ -6590,7 +6961,14 @@
6590
6961
  // filtering conditions
6591
6962
  for (var _c = 0, _cLen = rules[c].conditions.length; _c < _cLen; ++_c) {
6592
6963
 
6593
- if (rules[c].conditions[_c].case != caseValue) {
6964
+ if (
6965
+ Array.isArray(rules[c].conditions[_c].case)
6966
+ && rules[c].conditions[_c].case.indexOf(caseValue) == -1
6967
+ ||
6968
+ !Array.isArray(rules[c].conditions[_c].case)
6969
+ && rules[c].conditions[_c].case != caseValue
6970
+
6971
+ ) {
6594
6972
  continue;
6595
6973
  }
6596
6974
 
@@ -6735,7 +7113,8 @@
6735
7113
  if (
6736
7114
  conditions[c]['case'] === caseValue
6737
7115
  ||
6738
- Array.isArray(conditions[c]['case']) && conditions[c]['case'].indexOf(caseValue) > -1
7116
+ Array.isArray(conditions[c]['case'])
7117
+ && conditions[c]['case'].indexOf(caseValue) > -1
6739
7118
  ||
6740
7119
  /^\//.test(conditions[c]['case'])
6741
7120
  ) {
@@ -6852,8 +7231,6 @@
6852
7231
  }
6853
7232
  --i;
6854
7233
  }
6855
-
6856
-
6857
7234
  } // EO for
6858
7235
  }
6859
7236
 
@@ -6874,7 +7251,7 @@
6874
7251
  }
6875
7252
 
6876
7253
  if (isGFFCtx)
6877
- $fields[field].setAttribute('data-gina-form-errors', fieldErrorsAttributes[field].substr(0, fieldErrorsAttributes[field].length-1))
7254
+ $fields[field].setAttribute('data-gina-form-errors', fieldErrorsAttributes[field].substring(0, fieldErrorsAttributes[field].length-1))
6878
7255
  }
6879
7256
 
6880
7257
  //calling back
@@ -6945,6 +7322,8 @@
6945
7322
  'data' : formatData( _data )
6946
7323
  });
6947
7324
  removeListener(gina, event.target, 'validated.' + event.target.id);
7325
+
7326
+
6948
7327
  return
6949
7328
  }
6950
7329
  });
@@ -6983,5 +7362,5 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
6983
7362
  module.exports = ValidatorPlugin
6984
7363
  } else if ( typeof(define) === 'function' && define.amd) {
6985
7364
  // Publish as AMD module
6986
- define('gina/validator', ['utils/events', 'utils/dom', 'utils/effects', 'utils/data', 'lib/form-validator'], function(){ return ValidatorPlugin })
7365
+ define('gina/validator', ['utils/events', 'utils/dom', 'utils/effects', 'utils/data', 'lib/form-validator', 'lib/routing'], function(){ return ValidatorPlugin })
6987
7366
  }