gina 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/README.md +48 -40
- package/ROADMAP.md +1 -0
- package/bin/cli +33 -4
- package/bin/cli-debug +37 -1
- package/bin/cmd +18 -0
- package/framework/v0.7.4/VERSION +1 -0
- package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.js +1504 -621
- package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js +736 -0
- package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- package/framework/{v0.7.3 → v0.7.4}/core/config.js +13 -3
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.js +268 -14
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-json.js +9 -2
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-nunjucks.js +88 -9
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-swig-async.js +87 -7
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-swig.js +115 -9
- package/framework/{v0.7.3 → v0.7.4}/core/gna.js +44 -2
- package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/src/form-validator.js +43 -4
- package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/src/main.js +847 -515
- package/framework/{v0.7.3 → v0.7.4}/core/router.js +139 -40
- package/framework/{v0.7.3 → v0.7.4}/core/server.express.js +5 -4
- package/framework/{v0.7.3 → v0.7.4}/core/server.isaac.js +93 -10
- package/framework/{v0.7.3 → v0.7.4}/core/server.js +348 -46
- package/framework/{v0.7.3 → v0.7.4}/helpers/context.js +47 -2
- package/framework/{v0.7.3 → v0.7.4}/helpers/data/src/main.js +10 -1
- package/framework/{v0.7.3 → v0.7.4}/helpers/prototypes.js +23 -1
- package/framework/v0.7.4/lib/cmd/bundle/inc/start-status.js +420 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/restart.js +71 -1
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/start.js +207 -41
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/clear.js +39 -8
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/help.txt +3 -4
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/inc/ps-titles.js +62 -6
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/init.js +12 -1
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/restart.js +49 -11
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/status.js +23 -1
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/stop.js +150 -48
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/helper.js +24 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/run.js +6 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/index.js +8 -1
- package/framework/{v0.7.3 → v0.7.4}/lib/collection/src/main.js +373 -74
- package/framework/{v0.7.3 → v0.7.4}/lib/job/src/main.js +49 -5
- package/framework/{v0.7.3 → v0.7.4}/lib/lane/src/main.js +81 -5
- package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/main.js +184 -15
- package/framework/v0.7.4/lib/logger/src/redact.js +1003 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/src/main.js +118 -11
- package/framework/{v0.7.3 → v0.7.4}/lib/proc.js +27 -8
- package/framework/{v0.7.3 → v0.7.4}/lib/render-cache/src/main.js +97 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/routing/src/main.js +140 -14
- package/framework/{v0.7.3 → v0.7.4}/lib/sqlite-driver.js +15 -5
- package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/src/main.js +123 -16
- package/framework/{v0.7.3 → v0.7.4}/package.json +1 -1
- package/gna.js +4 -4
- package/llms.txt +24 -22
- package/package.json +5 -4
- package/schema/settings.json +25 -1
- package/script/smoke_in_container.js +69 -12
- package/types/index.d.ts +3 -2
- package/utils/prototypes.js +37 -2
- package/framework/v0.7.3/VERSION +0 -1
- package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -726
- package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- package/framework/v0.7.3/lib/logger/src/redact.js +0 -391
- /package/framework/{v0.7.3 → v0.7.4}/AUTHORS +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/html/static.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/config.requirements-anchor.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/ai/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/ai/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.v4.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/storage-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/duckdb/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/duckdb/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/job-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mysql/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mysql/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/param-redact.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/postgresql/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/postgresql/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/job-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/kv-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/render-cache-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/settle-once.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sql-parser.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/job-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/kv-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/content.encoding +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-nunjucks-async.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-stream.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-v1.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-xml.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/inline-script.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/inspector-window-emit.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/preload-hints.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/release-banner.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/dev/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/factory.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/currency.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/mime.types +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/model/entity.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/model/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/model/template/entityFactory.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/model/template/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/server.isaac.rapid-reset.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/server.route-candidates.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/status.codes +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/_gitignore +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/connectors.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/watchers.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/locales/en.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/home.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/js/components/x-checklist.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/manifest.webmanifest +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/sw.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/x-checklist.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/command/gina.tpl +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/env.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/settings.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/templates.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/console.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/data/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/data/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/dateFormat.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/json/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/json/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/json/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/path.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/src/api-error.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/task.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/text.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/admin/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/admin/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/async/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/async/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/audit/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/audit/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/audit-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authn/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/lockout.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/totp.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authz-gate/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authz-gate/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cache/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cache/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cache/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cache/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/verify.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/build.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/boot-lines.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/name-rewrite.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/name.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/mcp-start.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/mcp.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/oas.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/openapi.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/types.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/stats.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/infer.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/migrate.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/models.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/test.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/ps.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/stop.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/args.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/namespace.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/reference-rewrite.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/reference-scan.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/scaffold.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/rename.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/get.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/inc/name.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/build.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/dot.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/inc/listen-error.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/link-node-modules.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/link.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/reset.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/start.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/tail.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/version.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/export.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/import.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/scan.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/_host.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/build.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/open.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/man-render.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/kill.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/reset.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/backup.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/build.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/inc/name.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/restore.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/inc/name.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/check.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/scan.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/start.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/gc.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/stats.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/verify.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd-status-format/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd-status-format/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/collection/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/collection/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/collection/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/conf-view/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/conf-view/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/config.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-config/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-config/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-error/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-error/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-registry/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-registry/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cron/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cron/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/domain/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/domain/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/domain/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto-pipe/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto-pipe/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto-types/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto-types/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/duration/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/duration/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/error-ref/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/error-ref/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/generator/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/i18n/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/i18n/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/idempotency/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/idempotency/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/image-build/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/image-build/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-events/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-events/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-redact/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-redact/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/instrument/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/instrument/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/job/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/job-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/json-config-header/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/json-config-header/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/kv/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/kv/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/kv-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/lane/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/loading-state/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/loading-state/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/listener.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/helper.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/maintenance/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/maintenance/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/math/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-dispatch/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-dispatch/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-http/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-http/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-server/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-server/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/merge/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/merge/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/message-validator/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/message-validator/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/metrics/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/metrics/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/model.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/money/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/money/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/multipart/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/multipart/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/net-locality/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/net-locality/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-resolver/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-resolver/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/priority/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/priority/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/push/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/push/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/rate-limit/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/rate-limit/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/release-watch/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/release-watch/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/render-cache/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/render-cache-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing-introspect/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing-introspect/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/env.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/exec.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/file.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/declaration.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/env-file.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/sources.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/security-headers-emitter/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/security-headers-emitter/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/session-lifetime/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/session-lifetime/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/shell.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/sri/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/sri/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/state.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local-cas.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local-stream.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/meta-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/s3.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/util.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/swig-resolver/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/swig-resolver/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/loaders/http.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/loaders/memory.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/url/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/url/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/url/routing.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/uuid/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/uuid/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/validator.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/watcher/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/watcher/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-framing/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-framing/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-query/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-query/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-session/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-session/src/main.js +0 -0
|
@@ -2910,7 +2910,12 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
2910
2910
|
let _key = key[k];
|
|
2911
2911
|
if (i == k) {
|
|
2912
2912
|
// Array or Object ?
|
|
2913
|
-
if ( typeof(obj[ key[k] ]) == 'undefined' || typeof(obj[ key[k] ]) == 'string' ) {
|
|
2913
|
+
// #B792 — was: if ( typeof(obj[ key[k] ]) == 'undefined' || typeof(obj[ key[k] ]) == 'string' ) {
|
|
2914
|
+
// Byte-parity twin of the server helper `helpers/data parseLocalObj`: a slot an
|
|
2915
|
+
// earlier segment set to `null` cannot hold children, so descending into it threw.
|
|
2916
|
+
// Treat null like a string slot — replace with a fresh container and descend. Pinned
|
|
2917
|
+
// identical to the server by test/core/validator-send-formdata-nesting.test.js.
|
|
2918
|
+
if ( obj[ key[k] ] === null || typeof(obj[ key[k] ]) == 'undefined' || typeof(obj[ key[k] ]) == 'string' ) {
|
|
2914
2919
|
if ( Array.isArray(obj) ) {
|
|
2915
2920
|
// index
|
|
2916
2921
|
_key = ~~key[k];
|
|
@@ -5247,10 +5252,23 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
5247
5252
|
, maxWidth = null
|
|
5248
5253
|
, ratio = null
|
|
5249
5254
|
;
|
|
5255
|
+
// #B859 — the staging answer, by file index, on the file input: a reset names the files
|
|
5256
|
+
// it removes from these entries (`originalFilename`, and the preview's own when there is
|
|
5257
|
+
// one), so a file that got no preview <img> — not an image, no `preview` — is removed too.
|
|
5258
|
+
if ( $uploadTriger ) {
|
|
5259
|
+
$uploadTriger.stagedFiles = files;
|
|
5260
|
+
}
|
|
5250
5261
|
for (var f = 0, fLen = files.length; f<fLen; ++f) {
|
|
5251
5262
|
|
|
5252
5263
|
// creating reset link
|
|
5253
|
-
|
|
5264
|
+
// #B861 — the id is `<file input id>-<f>-reset-trigger`, the one that
|
|
5265
|
+
// `bindUploadResetOrDeleteTrigger` binds. It was derived from the preview container's
|
|
5266
|
+
// id by replacing `-preview`, which gives that id only for the default container
|
|
5267
|
+
// `<input id>-preview`: with a custom `data-gina-form-upload-preview` id the result was
|
|
5268
|
+
// the container's own id, so the container was taken for the reset link (« Reset »
|
|
5269
|
+
// written inside it, its classes changed) and no reset control was bound.
|
|
5270
|
+
// was: let resetLinkId = $previewContainer.id.replace(/\-preview/, '-'+f+'-reset-trigger');
|
|
5271
|
+
let resetLinkId = $uploadTriger.id + '-' + f + '-reset-trigger';
|
|
5254
5272
|
let resetLinkNeedToBeAdded = false;
|
|
5255
5273
|
let $resetLink = document.getElementById(resetLinkId);
|
|
5256
5274
|
let defaultClassNameArr = ['reset','js-upload-reset'];
|
|
@@ -5354,10 +5372,28 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
5354
5372
|
|| key == 'preview' && typeof(files[f][key]) == 'undefined'
|
|
5355
5373
|
|| /(height|width)/i.test(key) && !/^image/.test(files[f].mime)
|
|
5356
5374
|
) {
|
|
5375
|
+
// #B791 — the preview slot is a sub-field MAP, not a flat input (since #B459):
|
|
5376
|
+
// it has no `.tagName`, so the getElementById(.id) removal was a silent no-op
|
|
5377
|
+
// on it, and on an EDIT form the declared [preview][*] inputs kept the REPLACED
|
|
5378
|
+
// file's values and were posted with the new file. Detect the slot by SHAPE (an
|
|
5379
|
+
// element has a tagName; the map does not), NOT by the key name — this keeps the
|
|
5380
|
+
// branch a structural sibling of the flat removal and leaves #B459's name-keyed
|
|
5381
|
+
// source/dist pins untouched. For the map, CLEAR every declared sub-field — the
|
|
5382
|
+
// documented "left empty" contract (file-uploads.md § Persisting the preview);
|
|
5383
|
+
// for a flat input (height/width), keep the original removal.
|
|
5357
5384
|
if ( /(preview|height|width)/i.test(key) ) {
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5385
|
+
if ( fieldsObjectList[key] && !fieldsObjectList[key].tagName ) {
|
|
5386
|
+
for (var subFieldToClear in fieldsObjectList[key]) {
|
|
5387
|
+
if ( fieldsObjectList[key][subFieldToClear]
|
|
5388
|
+
&& typeof(fieldsObjectList[key][subFieldToClear].value) != 'undefined' ) {
|
|
5389
|
+
fieldsObjectList[key][subFieldToClear].value = '';
|
|
5390
|
+
}
|
|
5391
|
+
}
|
|
5392
|
+
} else {
|
|
5393
|
+
$elIgnored = document.getElementById(fieldsObjectList[key].id);
|
|
5394
|
+
if ( $elIgnored )
|
|
5395
|
+
$elIgnored.parentNode.removeChild($elIgnored);
|
|
5396
|
+
}
|
|
5361
5397
|
}
|
|
5362
5398
|
continue;
|
|
5363
5399
|
}
|
|
@@ -5373,6 +5409,18 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
5373
5409
|
// handle preview
|
|
5374
5410
|
if ( key == 'preview' ) {
|
|
5375
5411
|
|
|
5412
|
+
// #B791 — clear every DECLARED sub-field the response's preview does NOT
|
|
5413
|
+
// carry, so a PARTIAL preview on an edit form cannot leave a replaced file's
|
|
5414
|
+
// stale value behind (the "left empty" contract); the loop below then fills
|
|
5415
|
+
// the ones it does carry.
|
|
5416
|
+
for (var previewKeyToReset in fieldsObjectList[key]) {
|
|
5417
|
+
if ( fieldsObjectList[key][previewKeyToReset]
|
|
5418
|
+
&& typeof(fieldsObjectList[key][previewKeyToReset].value) != 'undefined'
|
|
5419
|
+
&& typeof(files[f][key][previewKeyToReset]) == 'undefined' ) {
|
|
5420
|
+
fieldsObjectList[key][previewKeyToReset].value = '';
|
|
5421
|
+
}
|
|
5422
|
+
}
|
|
5423
|
+
|
|
5376
5424
|
for (var previewKey in files[f][key]) {
|
|
5377
5425
|
if ( typeof(files[f][key][previewKey]) != 'undefined' && typeof(fieldsObjectList[key][previewKey]) != 'undefined' ) {
|
|
5378
5426
|
fieldsObjectList[key][previewKey].value = files[f][key][previewKey];
|
|
@@ -5472,6 +5520,330 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
5472
5520
|
}
|
|
5473
5521
|
}
|
|
5474
5522
|
|
|
5523
|
+
/**
|
|
5524
|
+
* getUploadFieldPrefix — the prefix of the hidden `<prefix>[i][…]` fields a file input's
|
|
5525
|
+
* staged files write into its form: `data-gina-form-upload-prefix`, else the input's name,
|
|
5526
|
+
* else `files`. The one rule for building those fields and for removing them.
|
|
5527
|
+
*
|
|
5528
|
+
* @inner
|
|
5529
|
+
* @private
|
|
5530
|
+
* @param {HTMLInputElement} $input - the file input
|
|
5531
|
+
* @returns {string} the field prefix
|
|
5532
|
+
*
|
|
5533
|
+
* @example
|
|
5534
|
+
* getUploadFieldPrefix(document.getElementById('avatar')); // 'avatar'
|
|
5535
|
+
*/
|
|
5536
|
+
var getUploadFieldPrefix = function($input) {
|
|
5537
|
+
return $input.getAttribute('data-gina-form-upload-prefix') || $input.name || $input.getAttribute('name') || 'files';
|
|
5538
|
+
};
|
|
5539
|
+
|
|
5540
|
+
/**
|
|
5541
|
+
* getUploadFileNodes — the file nodes of an upload preview container, in document order.
|
|
5542
|
+
*
|
|
5543
|
+
* A file node is an element carrying `data-upload-original-filename` (gina writes it on the
|
|
5544
|
+
* previews it renders, and a page marks its own node for a file shown without an image with
|
|
5545
|
+
* it), or an `<img>` that is a child of the container or of one of its `<li>` children (the
|
|
5546
|
+
* `<li>` gina wraps each preview in when the container is a `<ul>`). A node inside a file node
|
|
5547
|
+
* belongs to it and is not a file of its own.
|
|
5548
|
+
*
|
|
5549
|
+
* @inner
|
|
5550
|
+
* @private
|
|
5551
|
+
* @param {HTMLElement|null} $container - the preview container
|
|
5552
|
+
* @returns {Array<HTMLElement>} a static list, safe to walk while its nodes are removed
|
|
5553
|
+
*
|
|
5554
|
+
* @example
|
|
5555
|
+
* getUploadFileNodes(document.getElementById('avatar-preview')); // [ <img>, <a data-upload-original-filename="cv.pdf"> ]
|
|
5556
|
+
*/
|
|
5557
|
+
var getUploadFileNodes = function($container) {
|
|
5558
|
+
var fileNodes = [];
|
|
5559
|
+
if ( !$container || typeof($container.querySelectorAll) != 'function' ) {
|
|
5560
|
+
return fileNodes;
|
|
5561
|
+
}
|
|
5562
|
+
var $nodes = $container.querySelectorAll('*'), $node = null, $parent = null, isFileNode = false, k = 0;
|
|
5563
|
+
for (var n = 0, nLen = $nodes.length; n < nLen; ++n) {
|
|
5564
|
+
$node = $nodes[n];
|
|
5565
|
+
$parent = $node.parentNode;
|
|
5566
|
+
isFileNode = $node.hasAttribute('data-upload-original-filename')
|
|
5567
|
+
|| /^img$/i.test($node.tagName)
|
|
5568
|
+
&& ( $parent === $container || $parent && /^li$/i.test($parent.tagName) && $parent.parentNode === $container );
|
|
5569
|
+
if ( !isFileNode ) {
|
|
5570
|
+
continue;
|
|
5571
|
+
}
|
|
5572
|
+
for (k = 0; k < fileNodes.length; ++k) {
|
|
5573
|
+
if ( fileNodes[k].contains($node) ) {
|
|
5574
|
+
break;
|
|
5575
|
+
}
|
|
5576
|
+
}
|
|
5577
|
+
if ( k == fileNodes.length ) {
|
|
5578
|
+
fileNodes.push($node);
|
|
5579
|
+
}
|
|
5580
|
+
}
|
|
5581
|
+
return fileNodes;
|
|
5582
|
+
};
|
|
5583
|
+
|
|
5584
|
+
/**
|
|
5585
|
+
* removeUploadEntryFields — #B858/#B862: removes from a file input's form the controls of one
|
|
5586
|
+
* of its files, `<prefix>[index]…` (except those marked `data-gina-form-upload-is-locked`), and
|
|
5587
|
+
* keeps them on the input so that the next selection puts them back
|
|
5588
|
+
* (see restoreRemovedUploadFields): a page's declared fields — `[preview][*]` sub-fields, a
|
|
5589
|
+
* caption — are part of the form, not of the file.
|
|
5590
|
+
*
|
|
5591
|
+
* @inner
|
|
5592
|
+
* @private
|
|
5593
|
+
* @param {HTMLInputElement} $uploadTrigger - the file input
|
|
5594
|
+
* @param {string} fieldPrefix - see getUploadFieldPrefix
|
|
5595
|
+
* @param {number} index - the file's index in the input's selection
|
|
5596
|
+
* @returns {number} the count of removed controls
|
|
5597
|
+
*
|
|
5598
|
+
* @example
|
|
5599
|
+
* removeUploadEntryFields($input, 'avatar', 0); // 10 — avatar[0][name] … avatar[0][mime]
|
|
5600
|
+
*/
|
|
5601
|
+
var removeUploadEntryFields = function($uploadTrigger, fieldPrefix, index) {
|
|
5602
|
+
var $form = $uploadTrigger.form || null;
|
|
5603
|
+
if ( !$form ) {
|
|
5604
|
+
return 0;
|
|
5605
|
+
}
|
|
5606
|
+
var re = new RegExp('^'+ (fieldPrefix +'['+ index +']').replace(/[.*+?^${}()|[\]\\\-]/g, '\\$&'))
|
|
5607
|
+
, removed = 0
|
|
5608
|
+
, $field = null
|
|
5609
|
+
, isLocked = null
|
|
5610
|
+
;
|
|
5611
|
+
if ( !$uploadTrigger.removedUploadFields ) {
|
|
5612
|
+
$uploadTrigger.removedUploadFields = {};
|
|
5613
|
+
}
|
|
5614
|
+
for (var d = 0, dLen = $form.length; d < dLen; d++) {
|
|
5615
|
+
$field = $form[d];
|
|
5616
|
+
// data-gina-form-upload-is-locked
|
|
5617
|
+
// this exception prevent `tagged datas` to be deleted on image delete
|
|
5618
|
+
isLocked = ( $field.dataset ) ? $field.dataset.ginaFormUploadIsLocked || false : false;
|
|
5619
|
+
if ( re.test($field.name) && !/true/i.test(isLocked) ) {
|
|
5620
|
+
if ( !$uploadTrigger.removedUploadFields[index] ) {
|
|
5621
|
+
$uploadTrigger.removedUploadFields[index] = [];
|
|
5622
|
+
}
|
|
5623
|
+
$uploadTrigger.removedUploadFields[index].push({ $field: $field, $parent: $field.parentNode, $next: $field.nextSibling });
|
|
5624
|
+
if ( /^hidden$/i.test($field.type) ) {
|
|
5625
|
+
$field.value = '';
|
|
5626
|
+
}
|
|
5627
|
+
$field.remove();
|
|
5628
|
+
removed++;
|
|
5629
|
+
dLen--;
|
|
5630
|
+
d--;
|
|
5631
|
+
}
|
|
5632
|
+
}
|
|
5633
|
+
return removed;
|
|
5634
|
+
};
|
|
5635
|
+
|
|
5636
|
+
/**
|
|
5637
|
+
* restoreRemovedUploadFields — #B858: puts back into a file input's form the controls of file
|
|
5638
|
+
* `index` that a reset or a delete removed (see removeUploadEntryFields), where they were and
|
|
5639
|
+
* in their order, a hidden one emptied. A control the page has meanwhile put back under the
|
|
5640
|
+
* same name is kept instead.
|
|
5641
|
+
*
|
|
5642
|
+
* @inner
|
|
5643
|
+
* @private
|
|
5644
|
+
* @param {HTMLInputElement} $el - the file input
|
|
5645
|
+
* @param {number} index - the file's index in the new selection
|
|
5646
|
+
* @returns {number} the count of restored controls
|
|
5647
|
+
*
|
|
5648
|
+
* @example
|
|
5649
|
+
* restoreRemovedUploadFields($input, 0); // 4 — the declared avatar[0][preview][…] inputs
|
|
5650
|
+
*/
|
|
5651
|
+
var restoreRemovedUploadFields = function($el, index) {
|
|
5652
|
+
var stash = ( $el.removedUploadFields ) ? $el.removedUploadFields[index] : null;
|
|
5653
|
+
if ( !stash || !$el.form ) {
|
|
5654
|
+
return 0;
|
|
5655
|
+
}
|
|
5656
|
+
delete $el.removedUploadFields[index];
|
|
5657
|
+
var $form = $el.form, restored = 0, entry = null, isTaken = false;
|
|
5658
|
+
// last removed first: each control then goes back before a sibling already in place
|
|
5659
|
+
for (var s = stash.length - 1; s >= 0; --s) {
|
|
5660
|
+
entry = stash[s];
|
|
5661
|
+
isTaken = false;
|
|
5662
|
+
for (var c = 0, cLen = $form.length; c < cLen; ++c) {
|
|
5663
|
+
if ( $form[c].name == entry.$field.name ) {
|
|
5664
|
+
isTaken = true;
|
|
5665
|
+
break;
|
|
5666
|
+
}
|
|
5667
|
+
}
|
|
5668
|
+
if ( isTaken ) {
|
|
5669
|
+
continue;
|
|
5670
|
+
}
|
|
5671
|
+
if ( /^hidden$/i.test(entry.$field.type) ) {
|
|
5672
|
+
entry.$field.value = '';
|
|
5673
|
+
}
|
|
5674
|
+
if ( entry.$parent && entry.$parent.isConnected ) {
|
|
5675
|
+
entry.$parent.insertBefore(entry.$field, ( entry.$next && entry.$next.parentNode === entry.$parent ) ? entry.$next : null);
|
|
5676
|
+
} else {
|
|
5677
|
+
$form.appendChild(entry.$field);
|
|
5678
|
+
}
|
|
5679
|
+
restored++;
|
|
5680
|
+
}
|
|
5681
|
+
return restored;
|
|
5682
|
+
};
|
|
5683
|
+
|
|
5684
|
+
/**
|
|
5685
|
+
* buildUploadHiddenFields — #B858: the hidden `<prefix>[i][…]` fields of a file input's
|
|
5686
|
+
* selection, in its form, by file index: the inputs the form holds are reused (declared by the
|
|
5687
|
+
* page, or written by an earlier selection), the ones a reset removed come back, and the
|
|
5688
|
+
* missing mandatory ones are created, empty, for the staging answer to fill. Run on EVERY
|
|
5689
|
+
* selection: building them only with the input's virtual upload form left a selection made
|
|
5690
|
+
* after a reset with no field in the form, and one with more files than the first with none for
|
|
5691
|
+
* its new files.
|
|
5692
|
+
*
|
|
5693
|
+
* @inner
|
|
5694
|
+
* @private
|
|
5695
|
+
* @param {HTMLInputElement} $el - the file input
|
|
5696
|
+
* @param {string} fieldPrefix - see getUploadFieldPrefix
|
|
5697
|
+
* @param {number} filesLength - the count of files selected
|
|
5698
|
+
* @param {Array<string>} mandatoryFields - the metadata keys every file gets an input for
|
|
5699
|
+
* @param {boolean} bindResetTriggers - binds each file's reset trigger when it is already in
|
|
5700
|
+
* the page (the selection that creates the virtual upload form)
|
|
5701
|
+
* @returns {Array<object>} by file index, the field map the staging answer fills
|
|
5702
|
+
*
|
|
5703
|
+
* @example
|
|
5704
|
+
* buildUploadHiddenFields($input, 'avatar', 1, mandatoryFields, true)[0].location; // <input name="avatar[0][location]">
|
|
5705
|
+
*/
|
|
5706
|
+
var buildUploadHiddenFields = function($el, fieldPrefix, filesLength, mandatoryFields, bindResetTriggers) {
|
|
5707
|
+
var hiddenFields = []
|
|
5708
|
+
, formInputsFields = $el.form.getElementsByTagName('INPUT')
|
|
5709
|
+
, fieldType = null
|
|
5710
|
+
, hiddenField = null
|
|
5711
|
+
, _userName = null
|
|
5712
|
+
, _name = null
|
|
5713
|
+
, _nameRe = null
|
|
5714
|
+
, subPrefix = null
|
|
5715
|
+
, $newVirtualField = null
|
|
5716
|
+
;
|
|
5717
|
+
for (var _f = 0, _fLen = filesLength; _f < _fLen; ++_f) { // for each file
|
|
5718
|
+
// binding upload reset trigger
|
|
5719
|
+
if ( bindResetTriggers ) {
|
|
5720
|
+
bindUploadResetOrDeleteTrigger('reset', $el, _f);
|
|
5721
|
+
}
|
|
5722
|
+
hiddenFields[_f] = null;
|
|
5723
|
+
// the fields a reset or a delete took out of the form come back for this file
|
|
5724
|
+
restoreRemovedUploadFields($el, _f);
|
|
5725
|
+
subPrefix = fieldPrefix + '['+ _f +']';
|
|
5726
|
+
_nameRe = new RegExp('^'+subPrefix.replace(/\[/g, '\\[').replace(/\]/g, '\\]'));
|
|
5727
|
+
// collecting existing DOM fields
|
|
5728
|
+
for (var h = 0, hLen = formInputsFields.length; h < hLen; ++h) {
|
|
5729
|
+
fieldType = formInputsFields[h].getAttribute('type');
|
|
5730
|
+
hiddenField = null;
|
|
5731
|
+
_name = null, _userName = null;
|
|
5732
|
+
// #B731 — read once from the file input, above
|
|
5733
|
+
// was: errorField= formInputsFields[h].getAttribute('data-gina-form-upload-error') || fieldId + '-error' || null;
|
|
5734
|
+
|
|
5735
|
+
if (fieldType && /hidden/i.test(fieldType) ) {
|
|
5736
|
+
hiddenField = formInputsFields[h];
|
|
5737
|
+
|
|
5738
|
+
_name = ( /\[\w+\]$/i.test(hiddenField.name) )
|
|
5739
|
+
? hiddenField.name.match(/\[\w+\]$/)[0].replace(/\[|\]/g, '')
|
|
5740
|
+
: hiddenField.name;
|
|
5741
|
+
_userName = ( /\[\w+\]$/i.test(hiddenField.name) )
|
|
5742
|
+
? hiddenField.name.match(/\[\w+\]$/)[0].replace(/\[|\]/g, '')
|
|
5743
|
+
: hiddenField.name;
|
|
5744
|
+
|
|
5745
|
+
// mandatory informations
|
|
5746
|
+
if (
|
|
5747
|
+
hiddenField
|
|
5748
|
+
&& typeof(_name) != 'undefiend'
|
|
5749
|
+
&& mandatoryFields.indexOf( _name ) > -1
|
|
5750
|
+
&& _nameRe.test( hiddenField.name )
|
|
5751
|
+
) {
|
|
5752
|
+
|
|
5753
|
+
if (!hiddenFields[_f] )
|
|
5754
|
+
hiddenFields[_f] = {};
|
|
5755
|
+
|
|
5756
|
+
if ( /\[preview\]/i.test(hiddenField.name) ) {
|
|
5757
|
+
if ( typeof(hiddenFields[_f].preview) == 'undefined' )
|
|
5758
|
+
hiddenFields[_f].preview = {};
|
|
5759
|
+
|
|
5760
|
+
hiddenFields[_f].preview[_name] = hiddenField;
|
|
5761
|
+
} else {
|
|
5762
|
+
hiddenFields[_f][_name] = hiddenField;
|
|
5763
|
+
}
|
|
5764
|
+
} else if (
|
|
5765
|
+
hiddenField
|
|
5766
|
+
&& typeof(_name) != 'undefiend'
|
|
5767
|
+
&& mandatoryFields.indexOf( _name ) < 0
|
|
5768
|
+
&& _nameRe.test( hiddenField.name )
|
|
5769
|
+
) { // defined by user
|
|
5770
|
+
if (!hiddenFields[_f] )
|
|
5771
|
+
hiddenFields[_f] = {};
|
|
5772
|
+
|
|
5773
|
+
if ( /\[preview\]/i.test(hiddenField.name) ) {
|
|
5774
|
+
if ( typeof(hiddenFields[_f].preview) == 'undefined' )
|
|
5775
|
+
hiddenFields[_f].preview = {};
|
|
5776
|
+
|
|
5777
|
+
hiddenFields[_f].preview[_userName] = hiddenField;
|
|
5778
|
+
} else {
|
|
5779
|
+
hiddenFields[_f][_userName] = hiddenField;
|
|
5780
|
+
}
|
|
5781
|
+
}
|
|
5782
|
+
}
|
|
5783
|
+
}
|
|
5784
|
+
|
|
5785
|
+
// completing by adding non-declared mandatoring fields in the DOM: all but preview
|
|
5786
|
+
for (var m = 0, mLen = mandatoryFields.length; m < mLen; ++m) {
|
|
5787
|
+
// optional, must be set by user
|
|
5788
|
+
// needs recheck
|
|
5789
|
+
if (!hiddenFields[_f] )
|
|
5790
|
+
hiddenFields[_f] = {};
|
|
5791
|
+
|
|
5792
|
+
if ( typeof(hiddenFields[_f][ mandatoryFields[m] ]) == 'undefined' ) {
|
|
5793
|
+
// #B459 — `preview` is the one slot that is never a flat input:
|
|
5794
|
+
// its value is an OBJECT (`{location, uri, tmpUri, width, height}`),
|
|
5795
|
+
// which an input's `.value` can only hold as "[object Object]".
|
|
5796
|
+
// A form that declares no `[preview][...]` sub-fields gets an
|
|
5797
|
+
// EMPTY sub-field map instead, so the fill loop still visits the
|
|
5798
|
+
// key (the nested thumbnail is rendered from there) and posts
|
|
5799
|
+
// nothing for it — the documented field set. Declaring the
|
|
5800
|
+
// sub-fields stays the opt-in for persisting the preview.
|
|
5801
|
+
if ( mandatoryFields[m] == 'preview' ) {
|
|
5802
|
+
hiddenFields[_f].preview = {};
|
|
5803
|
+
continue;
|
|
5804
|
+
}
|
|
5805
|
+
|
|
5806
|
+
_name = fieldPrefix +'['+ _f +']['+ mandatoryFields[m] +']';
|
|
5807
|
+
// create input & add it to the form
|
|
5808
|
+
$newVirtualField = document.createElement('input');
|
|
5809
|
+
$newVirtualField.type = 'hidden';
|
|
5810
|
+
$newVirtualField.id = 'input.' + uuid();
|
|
5811
|
+
$newVirtualField.name = _name;
|
|
5812
|
+
$newVirtualField.value = '';
|
|
5813
|
+
|
|
5814
|
+
$el.form.appendChild($newVirtualField);
|
|
5815
|
+
hiddenFields[_f][ mandatoryFields[m] ] = $el.form[$el.form.length-1];// last added
|
|
5816
|
+
}
|
|
5817
|
+
|
|
5818
|
+
}
|
|
5819
|
+
|
|
5820
|
+
} // EO for files
|
|
5821
|
+
return hiddenFields;
|
|
5822
|
+
};
|
|
5823
|
+
|
|
5824
|
+
/**
|
|
5825
|
+
* dropEmptyUploadPreviewItem — removes the `<li>` a reset or a delete left empty in a `<ul>`
|
|
5826
|
+
* preview container (gina wraps each preview, and each reset link it renders, in one).
|
|
5827
|
+
*
|
|
5828
|
+
* @inner
|
|
5829
|
+
* @private
|
|
5830
|
+
* @param {HTMLElement|null} $item - the parent of the node just removed
|
|
5831
|
+
* @param {HTMLElement|null} $container - the preview container
|
|
5832
|
+
* @returns {void}
|
|
5833
|
+
*/
|
|
5834
|
+
var dropEmptyUploadPreviewItem = function($item, $container) {
|
|
5835
|
+
if (
|
|
5836
|
+
$item
|
|
5837
|
+
&& $container
|
|
5838
|
+
&& $item !== $container
|
|
5839
|
+
&& $item.parentNode === $container
|
|
5840
|
+
&& /^li$/i.test($item.tagName)
|
|
5841
|
+
&& !$item.children.length
|
|
5842
|
+
) {
|
|
5843
|
+
$item.remove();
|
|
5844
|
+
}
|
|
5845
|
+
};
|
|
5846
|
+
|
|
5475
5847
|
/**
|
|
5476
5848
|
* restoreUploadAffordance
|
|
5477
5849
|
*
|
|
@@ -5509,210 +5881,241 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
5509
5881
|
/**
|
|
5510
5882
|
* onUploadResetOrDelete
|
|
5511
5883
|
*
|
|
5512
|
-
* Removes the
|
|
5513
|
-
*
|
|
5514
|
-
*
|
|
5515
|
-
*
|
|
5516
|
-
*
|
|
5517
|
-
*
|
|
5518
|
-
*
|
|
5519
|
-
*
|
|
5520
|
-
*
|
|
5521
|
-
*
|
|
5884
|
+
* Removes the input's file(s): the staged ones (`reset`: its selection) or the stored ones
|
|
5885
|
+
* (`delete`: the entries the bind-time scan recorded). Each file is reached by its index — its
|
|
5886
|
+
* reset or delete link, its preview node(s) (see getUploadFileNodes) and its hidden
|
|
5887
|
+
* `<prefix>[index]…` fields (see removeUploadEntryFields) — and not by walking the preview's
|
|
5888
|
+
* `<img>` children, so a file shown without an image is removed too (#B859). The server is
|
|
5889
|
+
* notified first, in ONE request naming every removed file (the removal XHR is sent BEFORE any
|
|
5890
|
+
* DOM removal), then the link, the preview node(s) and the fields go, the upload input's
|
|
5891
|
+
* add-affordance comes back (see restoreUploadAffordance) and, when defined, the
|
|
5892
|
+
* `data-gina-form-upload-on-reset` / `data-gina-form-upload-on-delete` callback — a bare
|
|
5893
|
+
* identifier registered on `window` — runs once per action with `{ $upload, bindingType, files }`.
|
|
5894
|
+
*
|
|
5895
|
+
* @param {object} $uploadTrigger - the file input
|
|
5522
5896
|
* @param {string} bindingType - `reset` or `delete`
|
|
5523
|
-
* @returns
|
|
5897
|
+
* @returns {void}
|
|
5524
5898
|
*/
|
|
5525
5899
|
var onUploadResetOrDelete = function($uploadTrigger, bindingType) {
|
|
5526
5900
|
console.debug(bindingType + ' input files');
|
|
5527
5901
|
var isOnResetMode = ( /reset/i.test(bindingType) ) ? true : false
|
|
5528
|
-
,
|
|
5902
|
+
// #B861 — the container the input names, resolved as a selection resolves it. It was
|
|
5903
|
+
// always `<input id>-preview`, so with a custom `data-gina-form-upload-preview` id it was
|
|
5904
|
+
// null, and reading its children threw.
|
|
5905
|
+
// was: , uploadPreviewId = $uploadTrigger.id +'-preview'
|
|
5906
|
+
, uploadPreviewId = $uploadTrigger.getAttribute('data-gina-form-upload-preview') || $uploadTrigger.id +'-preview'
|
|
5529
5907
|
, $uploadPreview = document.getElementById(uploadPreviewId);
|
|
5530
5908
|
|
|
5531
5909
|
var childNodeFile = null
|
|
5532
5910
|
, childNodeFilePreview = null
|
|
5533
|
-
// static snapshot of the
|
|
5534
|
-
//
|
|
5535
|
-
//
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
})
|
|
5911
|
+
// #B859 — a static snapshot of the container's FILE nodes (see getUploadFileNodes): the
|
|
5912
|
+
// <img> a `<ul>` container wraps in an <li> counts, and so does the node a page marks for
|
|
5913
|
+
// a file shown without an image. It held the container's direct <img> children only, so
|
|
5914
|
+
// the reset of a `<ul>` container removed nothing.
|
|
5915
|
+
, childNodes = getUploadFileNodes($uploadPreview)
|
|
5539
5916
|
, $resetLink = null
|
|
5540
|
-
, files = $uploadTrigger.customFiles
|
|
5917
|
+
, files = $uploadTrigger.customFiles || []
|
|
5918
|
+
, stagedFiles = $uploadTrigger.stagedFiles || []
|
|
5919
|
+
, fieldPrefix = getUploadFieldPrefix($uploadTrigger)
|
|
5920
|
+
, entries = []
|
|
5921
|
+
, remainingFiles = []
|
|
5541
5922
|
, filesToBeRemoved = []
|
|
5542
5923
|
, onRemoveCbName = $uploadTrigger.getAttribute('data-gina-form-upload-on-' + bindingType)
|
|
5543
5924
|
, uploadHiddenClass = $uploadTrigger.getAttribute('data-gina-form-upload-hidden-class')
|
|
5544
5925
|
, removedCount = 0
|
|
5545
5926
|
;
|
|
5546
5927
|
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5928
|
+
// #B859 — the pass walks the input's FILES, by index (its selection when resetting, the
|
|
5929
|
+
// stored entries when deleting), not the preview's <img> children: a file shown without an
|
|
5930
|
+
// image has no <img>, so its fields and its staged copy were left behind.
|
|
5931
|
+
// #B860 — every file of the input goes, each under its own index, in one pass: the
|
|
5932
|
+
// per-<img> pass re-read the index after each removal and kept the next file's fields, and
|
|
5933
|
+
// on a multi-file reset it threw when it set the input's value to the files still listed.
|
|
5934
|
+
for (let f = 0, fLen = files.length; f < fLen; f++) {
|
|
5935
|
+
// a staged file is reset, not deleted: a delete link left on the page belongs to the
|
|
5936
|
+
// stored file the selection replaced
|
|
5937
|
+
if ( !isOnResetMode && !files[f].deleteLinkId ) {
|
|
5938
|
+
remainingFiles.push(files[f]);
|
|
5939
|
+
continue;
|
|
5940
|
+
}
|
|
5941
|
+
let entry = { index: f, $link: null, nodes: [], names: [] };
|
|
5942
|
+
if (isOnResetMode) {
|
|
5943
|
+
let linkId = $uploadTrigger.id +'-'+ f +'-reset-trigger';
|
|
5944
|
+
entry.$link = document.getElementById(linkId);
|
|
5945
|
+
for (let n = 0, nLen = childNodes.length; n < nLen; n++) {
|
|
5946
|
+
if ( childNodes[n].getAttribute('data-upload-reset-link-id') == linkId ) {
|
|
5947
|
+
entry.nodes.push(childNodes[n]);
|
|
5556
5948
|
}
|
|
5557
|
-
} else {
|
|
5558
|
-
let file = childNodes[i].src.substring(childNodes[i].src.lastIndexOf('/')+1);
|
|
5559
|
-
childNodeFile = file;
|
|
5560
|
-
filesToBeRemoved.push(childNodeFile);
|
|
5561
5949
|
}
|
|
5950
|
+
// the names the staging answer gave — the ones its <img> preview carries
|
|
5951
|
+
childNodeFile = ( stagedFiles[f] && stagedFiles[f].originalFilename )
|
|
5952
|
+
? stagedFiles[f].originalFilename
|
|
5953
|
+
: ( entry.nodes.length ) ? entry.nodes[0].getAttribute('data-upload-original-filename') : files[f].name;
|
|
5954
|
+
childNodeFilePreview = ( stagedFiles[f] && stagedFiles[f].preview && stagedFiles[f].preview.originalFilename )
|
|
5955
|
+
? stagedFiles[f].preview.originalFilename
|
|
5956
|
+
: ( entry.nodes.length ) ? entry.nodes[0].getAttribute('data-upload-preview-original-filename') : null;
|
|
5957
|
+
} else {
|
|
5958
|
+
entry.$link = document.getElementById( files[f].deleteLinkId );
|
|
5959
|
+
if ( childNodes[f] ) {
|
|
5960
|
+
entry.nodes.push(childNodes[f]);
|
|
5961
|
+
}
|
|
5962
|
+
childNodeFile = files[f].name;
|
|
5963
|
+
childNodeFilePreview = null;
|
|
5964
|
+
}
|
|
5965
|
+
if (childNodeFile) {
|
|
5966
|
+
entry.names.push(childNodeFile);
|
|
5967
|
+
filesToBeRemoved.push(childNodeFile);
|
|
5968
|
+
}
|
|
5969
|
+
if (childNodeFilePreview) {
|
|
5970
|
+
entry.names.push(childNodeFilePreview);
|
|
5971
|
+
filesToBeRemoved.push(childNodeFilePreview);
|
|
5972
|
+
}
|
|
5973
|
+
entries.push(entry);
|
|
5974
|
+
} // EO for
|
|
5562
5975
|
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
'X-Requested-With': 'XMLHttpRequest' // in case of cross domain origin
|
|
5640
|
-
}
|
|
5641
|
-
};
|
|
5642
|
-
// #CSRF2 follow-up — inject X-Gina-CSRF-Token on mutating methods (file remove → DELETE/POST)
|
|
5643
|
-
if ( isMutatingMethod(method) ) {
|
|
5644
|
-
let csrfToken = readCsrfCookie();
|
|
5645
|
-
if (csrfToken) {
|
|
5646
|
-
xhrOptions.headers['X-Gina-CSRF-Token'] = csrfToken;
|
|
5647
|
-
}
|
|
5976
|
+
if ( entries.length > 0 ) {
|
|
5977
|
+
// remove file from the server - filesToBeRemoved
|
|
5978
|
+
let url = $uploadTrigger.getAttribute('data-gina-form-upload-'+ bindingType +'-action');
|
|
5979
|
+
if ( !url || typeof(url) == 'undefined' || url == '' || /404/.test(url) ) {
|
|
5980
|
+
throw new Error('input file `'+ $uploadTrigger.id +'` error: `data-gina-form-upload-'+bindingType+'-action` is required. You need to provide a valide url.');
|
|
5981
|
+
}
|
|
5982
|
+
let method = $uploadTrigger.getAttribute('data-gina-form-upload-'+ bindingType +'-method');
|
|
5983
|
+
if ( !method || typeof(method) == 'undefined' || method == '') {
|
|
5984
|
+
if (isOnResetMode) {
|
|
5985
|
+
method = 'POST';
|
|
5986
|
+
} else {
|
|
5987
|
+
method = (filesToBeRemoved.length > 1) ? 'POST': 'DELETE';
|
|
5988
|
+
console.warn('`data-gina-form-upload-'+ bindingType +'-method` was not defined. Switching to `'+ method +'` by default.');
|
|
5989
|
+
}
|
|
5990
|
+
} else {
|
|
5991
|
+
method = method.toUpperCase();
|
|
5992
|
+
}
|
|
5993
|
+
let isSynchrone = $uploadTrigger.getAttribute('data-gina-form-upload-'+ bindingType +'-is-synchrone');
|
|
5994
|
+
if ( /null/i.test(isSynchrone) || typeof(method) == 'undefined' || method == '' ) {
|
|
5995
|
+
isSynchrone = true;
|
|
5996
|
+
}
|
|
5997
|
+
|
|
5998
|
+
let xhrOptions = {
|
|
5999
|
+
url: url,
|
|
6000
|
+
method: method,
|
|
6001
|
+
isSynchrone: isSynchrone,
|
|
6002
|
+
headers : {
|
|
6003
|
+
// #FORMCT — the body sent below is JSON (JSON.stringify({ files })).
|
|
6004
|
+
// Send application/json — NOT the urlencoded default — or the server
|
|
6005
|
+
// url-decodes the JSON body ('+' -> space, decodeURIComponent) and
|
|
6006
|
+
// corrupts '+'/'%' in removed-file keys.
|
|
6007
|
+
'Content-Type': 'application/json; charset=UTF-8',
|
|
6008
|
+
// cross domain is enabled by default, but you need to setup `Access-Control-Allow-Origin`
|
|
6009
|
+
'X-Requested-With': 'XMLHttpRequest' // in case of cross domain origin
|
|
6010
|
+
}
|
|
6011
|
+
};
|
|
6012
|
+
// #CSRF2 follow-up — inject X-Gina-CSRF-Token on mutating methods (file remove → DELETE/POST)
|
|
6013
|
+
if ( isMutatingMethod(method) ) {
|
|
6014
|
+
let csrfToken = readCsrfCookie();
|
|
6015
|
+
if (csrfToken) {
|
|
6016
|
+
xhrOptions.headers['X-Gina-CSRF-Token'] = csrfToken;
|
|
6017
|
+
}
|
|
6018
|
+
}
|
|
6019
|
+
let xhr = setupXhr(xhrOptions);
|
|
6020
|
+
//handleXhr(xhr);
|
|
6021
|
+
if ( /GET|DELETE/i.test(method) ) {
|
|
6022
|
+
xhr.send();
|
|
6023
|
+
} else {
|
|
6024
|
+
xhr.send(JSON.stringify({ files: filesToBeRemoved }));
|
|
6025
|
+
}
|
|
6026
|
+
|
|
6027
|
+
// when there is no more files to preview, restore input file visibility
|
|
6028
|
+
// display upload input
|
|
6029
|
+
restoreUploadAffordance($uploadTrigger, uploadHiddenClass);
|
|
6030
|
+
|
|
6031
|
+
for (let e = 0, eLen = entries.length; e < eLen; e++) {
|
|
6032
|
+
$resetLink = entries[e].$link;
|
|
6033
|
+
childNodeFile = entries[e].names[0] || null;
|
|
6034
|
+
|
|
6035
|
+
// update form files for validation & submit/send: the file's fields leave the form,
|
|
6036
|
+
// kept on the input for the next selection (#B858). They are `<prefix>[index]…`, the
|
|
6037
|
+
// prefix they were built with (#B862: it was the input's name, so with a custom
|
|
6038
|
+
// `data-gina-form-upload-prefix` they stayed while the server was told to drop the file).
|
|
6039
|
+
removeUploadEntryFields($uploadTrigger, fieldPrefix, entries[e].index);
|
|
6040
|
+
|
|
6041
|
+
if ( $resetLink ) {
|
|
6042
|
+
// #A11Y7/U5 — the control about to be removed is the one the user
|
|
6043
|
+
// just activated, so it holds focus; removing a focused element
|
|
6044
|
+
// drops focus to <body> and the user loses their place with no
|
|
6045
|
+
// signal. Move focus first, onto the file input that owns the
|
|
6046
|
+
// staged files — which `restoreUploadAffordance` just made visible
|
|
6047
|
+
// again. Guarded on it actually holding focus, so a programmatic
|
|
6048
|
+
// reset never yanks focus away from wherever the user really is.
|
|
6049
|
+
if ( document.activeElement === $resetLink || $resetLink.contains(document.activeElement) ) {
|
|
6050
|
+
if ( typeof($uploadTrigger.focus) == 'function' ) {
|
|
6051
|
+
$uploadTrigger.focus();
|
|
5648
6052
|
}
|
|
5649
|
-
|
|
5650
|
-
//
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
6053
|
+
// #A11Y5's lesson, applied: `typeof focus == 'function'` is true
|
|
6054
|
+
// for EVERY HTMLElement, and focus() is a silent no-op on one
|
|
6055
|
+
// that cannot take focus (hidden, disabled, detached) — so
|
|
6056
|
+
// confirm the move instead of assuming it. Signal-only: there is
|
|
6057
|
+
// no better fallback than the document, and failing loudly here
|
|
6058
|
+
// would break a removal that otherwise succeeded.
|
|
6059
|
+
if ( document.activeElement !== $uploadTrigger ) {
|
|
6060
|
+
console.debug('[FormValidator][upload]['+ ($uploadTrigger.id || '?') +'] '+ bindingType +': could not move focus to the file input before removing the '+ bindingType +' control; focus falls back to the document.');
|
|
5655
6061
|
}
|
|
6062
|
+
}
|
|
6063
|
+
}
|
|
6064
|
+
// Announce the removal. `aria-live="polite"` queues rather than
|
|
6065
|
+
// interrupts, so this lands after the focus move above has been
|
|
6066
|
+
// announced instead of racing it. Function replacer, not a string:
|
|
6067
|
+
// a file name may contain `$`, and a string replacement would expand
|
|
6068
|
+
// `$&` / `$1` patterns inside it.
|
|
6069
|
+
if ( $uploadTrigger.form && childNodeFile ) {
|
|
6070
|
+
announceA11yStatus(
|
|
6071
|
+
$uploadTrigger.form,
|
|
6072
|
+
a11yLabel('fileRemoved').replace('%s', function () { return childNodeFile; })
|
|
6073
|
+
);
|
|
6074
|
+
}
|
|
5656
6075
|
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
}
|
|
5672
|
-
// #A11Y5's lesson, applied: `typeof focus == 'function'` is true
|
|
5673
|
-
// for EVERY HTMLElement, and focus() is a silent no-op on one
|
|
5674
|
-
// that cannot take focus (hidden, disabled, detached) — so
|
|
5675
|
-
// confirm the move instead of assuming it. Signal-only: there is
|
|
5676
|
-
// no better fallback than the document, and failing loudly here
|
|
5677
|
-
// would break a removal that otherwise succeeded.
|
|
5678
|
-
if ( document.activeElement !== $uploadTrigger ) {
|
|
5679
|
-
console.debug('[FormValidator][upload]['+ ($uploadTrigger.id || '?') +'] '+ bindingType +': could not move focus to the file input before removing the '+ bindingType +' control; focus falls back to the document.');
|
|
5680
|
-
}
|
|
5681
|
-
}
|
|
5682
|
-
// Announce the removal. `aria-live="polite"` queues rather than
|
|
5683
|
-
// interrupts, so this lands after the focus move above has been
|
|
5684
|
-
// announced instead of racing it. Function replacer, not a string:
|
|
5685
|
-
// a file name may contain `$`, and a string replacement would expand
|
|
5686
|
-
// `$&` / `$1` patterns inside it.
|
|
5687
|
-
if ( $uploadTrigger.form && childNodeFile ) {
|
|
5688
|
-
announceA11yStatus(
|
|
5689
|
-
$uploadTrigger.form,
|
|
5690
|
-
a11yLabel('fileRemoved').replace('%s', function () { return childNodeFile; })
|
|
5691
|
-
);
|
|
5692
|
-
}
|
|
6076
|
+
// remove link & preview node(s) - must be done last
|
|
6077
|
+
// (the reset/delete link's own click listener dies with the node)
|
|
6078
|
+
if ( $resetLink ) {
|
|
6079
|
+
let $linkItem = $resetLink.parentNode;
|
|
6080
|
+
$resetLink.remove();
|
|
6081
|
+
dropEmptyUploadPreviewItem($linkItem, $uploadPreview);
|
|
6082
|
+
}
|
|
6083
|
+
for (let i = 0, iLen = entries[e].nodes.length; i < iLen; i++) {
|
|
6084
|
+
let $nodeItem = entries[e].nodes[i].parentNode;
|
|
6085
|
+
entries[e].nodes[i].remove();
|
|
6086
|
+
dropEmptyUploadPreviewItem($nodeItem, $uploadPreview);
|
|
6087
|
+
}
|
|
6088
|
+
removedCount++;
|
|
6089
|
+
} // EO for
|
|
5693
6090
|
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
6091
|
+
// Since `$uploadTrigger.files` isFrozen & isSealed
|
|
6092
|
+
$uploadTrigger.customFiles = remainingFiles;
|
|
6093
|
+
if (isOnResetMode) {
|
|
6094
|
+
// every staged file is gone; a file input's value can only be emptied
|
|
6095
|
+
// was: $uploadTrigger.value = files.join(', C:\\fakepath\\');
|
|
6096
|
+
$uploadTrigger.value = '';
|
|
6097
|
+
$uploadTrigger.stagedFiles = [];
|
|
6098
|
+
}
|
|
6099
|
+
//update toolbar
|
|
6100
|
+
if (gina && envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
|
|
6101
|
+
try {
|
|
6102
|
+
// update toolbar
|
|
6103
|
+
window.ginaToolbar.update('data-xhr', {files: remainingFiles});
|
|
6104
|
+
} catch (err) {
|
|
6105
|
+
throw err
|
|
6106
|
+
}
|
|
5701
6107
|
}
|
|
5702
6108
|
}
|
|
5703
6109
|
|
|
5704
|
-
// #B150 — the
|
|
5705
|
-
//
|
|
5706
|
-
//
|
|
5707
|
-
//
|
|
5708
|
-
//
|
|
5709
|
-
//
|
|
5710
|
-
//
|
|
5711
|
-
// do not line up with the rendered `data-upload-original-filename`s) —
|
|
5712
|
-
// signal it so the otherwise-invisible skip is diagnosable. Signal-only:
|
|
5713
|
-
// the `removedCount>0` gates STAY (no removal => no removal callback, #B94).
|
|
6110
|
+
// #B150 — the input held no file to remove while its preview container shows file nodes,
|
|
6111
|
+
// so NOTHING was removed: the tmp-delete XHR, the #R8 indicator strip, and the removal
|
|
6112
|
+
// callback below are all skipped, silently, leaving any staged tmp files on the server.
|
|
6113
|
+
// That is expected when there was nothing to remove (an empty preview set), but a
|
|
6114
|
+
// NON-EMPTY preview set with no file to remove is a state desync (e.g. a runtime-injected
|
|
6115
|
+
// bind that recorded no file) — signal it so the otherwise-invisible skip is diagnosable.
|
|
6116
|
+
// Signal-only: the `removedCount>0` gates STAY (no removal => no removal callback, #B94).
|
|
5714
6117
|
if (removedCount === 0 && childNodes.length > 0) {
|
|
5715
|
-
console.warn('[FormValidator][upload]['+ ($uploadTrigger.id || '?') +'] '+ bindingType +': '+ childNodes.length +' preview(s) present but none matched the staged input files — nothing removed, cleanup skipped.
|
|
6118
|
+
console.warn('[FormValidator][upload]['+ ($uploadTrigger.id || '?') +'] '+ bindingType +': '+ childNodes.length +' preview(s) present but none matched the staged input files — nothing removed, cleanup skipped. The input holds no file to '+ bindingType +'.');
|
|
5716
6119
|
}
|
|
5717
6120
|
|
|
5718
6121
|
// #R8 — at least one staged file the indicator reported is gone:
|
|
@@ -6066,6 +6469,27 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
6066
6469
|
}
|
|
6067
6470
|
|
|
6068
6471
|
|
|
6472
|
+
/**
|
|
6473
|
+
* destroy
|
|
6474
|
+
*
|
|
6475
|
+
* Unbinds a form and forgets its record. Fires `destroy.<id>` on the form (a `.on('destroy')`
|
|
6476
|
+
* handler runs), then — since #B585 — detaches the handlers consumers registered through
|
|
6477
|
+
* `.on()` as well, so a same-id form bound afterwards starts clean and a fresh `.on()` on it
|
|
6478
|
+
* registers. Only while the form is still in the document: a form destroyed AFTER it left the
|
|
6479
|
+
* document (a popin's content being replaced or cleared) keeps those handlers — they die with
|
|
6480
|
+
* the element, and an answer still on its way to it reaches them (the popin branch of the
|
|
6481
|
+
* send dispatches `success.<id>` on the old form after `loadContent()` has torn it down). Its
|
|
6482
|
+
* registry keys are released either way, so the same-id successor registers its own. A form
|
|
6483
|
+
* taken out of the document, destroyed, put back and bound again therefore keeps its old
|
|
6484
|
+
* `.on()` handlers: destroy it before detaching it when it is meant to come back.
|
|
6485
|
+
*
|
|
6486
|
+
* @param {string|object} [formId] - the form id (`#` tolerated), or an object carrying `.form`;
|
|
6487
|
+
* omitted when called on a form record
|
|
6488
|
+
*
|
|
6489
|
+
* @example
|
|
6490
|
+
* gina.validator.$forms['signup'].destroy();
|
|
6491
|
+
* gina.validator.validateFormById('signup'); // the same element, bound again, once
|
|
6492
|
+
*/
|
|
6069
6493
|
var destroy = function(formId) {
|
|
6070
6494
|
var $form = null, _id = formId;
|
|
6071
6495
|
|
|
@@ -6101,21 +6525,55 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
6101
6525
|
|
|
6102
6526
|
if ($form) {
|
|
6103
6527
|
|
|
6104
|
-
|
|
6528
|
+
// #B585 — named, so it can detach itself by reference once it has run
|
|
6529
|
+
var onDestroyed = function(event) {
|
|
6105
6530
|
|
|
6106
6531
|
cancelEvent(event);
|
|
6107
6532
|
|
|
6108
6533
|
delete instance['$forms'][_id];
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6534
|
+
event.currentTarget.removeEventListener(event.type, onDestroyed, false);
|
|
6535
|
+
if ( typeof(gina.events[event.type]) != 'undefined' ) {
|
|
6536
|
+
delete gina.events[event.type];
|
|
6537
|
+
}
|
|
6538
|
+
};
|
|
6539
|
+
addListener(gina, $form.target, 'destroy.' + _id, onDestroyed);
|
|
6112
6540
|
|
|
6113
|
-
// remove
|
|
6541
|
+
// remove the binding's own listeners
|
|
6114
6542
|
$form = unbindForm($form);
|
|
6115
6543
|
|
|
6116
6544
|
//triggerEvent(gina, instance['$forms'][_id].target, 'destroy.' + _id);
|
|
6117
6545
|
triggerEvent(gina, $form.target, 'destroy.' + _id);
|
|
6118
6546
|
|
|
6547
|
+
// #B585 — then the handlers consumers registered through `.on()` (the declarative
|
|
6548
|
+
// `.hform` hooks included): they outlive a reBind(), not a destroy(). After the
|
|
6549
|
+
// destroy event, so a `.on('destroy')` handler has run first.
|
|
6550
|
+
// Detached by reference only while the form is still in the document — a form
|
|
6551
|
+
// destroyed after it left it (the popin teardown runs after the content was
|
|
6552
|
+
// replaced or cleared) keeps them: they die with the element, and the popin
|
|
6553
|
+
// branch of the send still dispatches `success.<id>` on that old form after
|
|
6554
|
+
// `loadContent()`, so the declared callback reaches it (regression measured on
|
|
6555
|
+
// the first cut: five e2e arms lost their success callback). The keys are
|
|
6556
|
+
// released either way, so the same-id successor registers its own.
|
|
6557
|
+
var isFormDetached = ( typeof($form.target.isConnected) == 'boolean' && !$form.target.isConnected );
|
|
6558
|
+
if ( Array.isArray($form.consumerListeners) ) {
|
|
6559
|
+
for (let i = 0, len = $form.consumerListeners.length; i < len; i++) {
|
|
6560
|
+
let entry = $form.consumerListeners[i];
|
|
6561
|
+
if ( !entry || !entry.el || typeof(entry.fn) != 'function' ) continue;
|
|
6562
|
+
if ( isFormDetached ) {
|
|
6563
|
+
// kept on the element that is going away
|
|
6564
|
+
} else if ( entry.el.removeEventListener ) {
|
|
6565
|
+
entry.el.removeEventListener(entry.evt, entry.fn, false);
|
|
6566
|
+
} else if ( entry.el.detachEvent ) {
|
|
6567
|
+
entry.el.detachEvent('on' + entry.evt, entry.fn);
|
|
6568
|
+
}
|
|
6569
|
+
let eId = ( typeof(entry.el.id) != 'undefined' && typeof(entry.el.id) != 'object' ) ? entry.el.id : ( entry.el.getAttribute ? entry.el.getAttribute('id') : null );
|
|
6570
|
+
if ( typeof(gina.events[entry.evt]) != 'undefined' && gina.events[entry.evt] == eId ) {
|
|
6571
|
+
delete gina.events[entry.evt];
|
|
6572
|
+
}
|
|
6573
|
+
}
|
|
6574
|
+
$form.consumerListeners = [];
|
|
6575
|
+
}
|
|
6576
|
+
|
|
6119
6577
|
} else {
|
|
6120
6578
|
throw new Error('[ FormValidator::destroy(formId) ] `'+_id+'` not found');
|
|
6121
6579
|
}
|
|
@@ -6977,6 +7435,9 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
6977
7435
|
isOtherTagAllowed = false;
|
|
6978
7436
|
}
|
|
6979
7437
|
var rules = $form.rules;
|
|
7438
|
+
// #B585 — the ledger of listeners this binding attaches (created here too, for a record
|
|
7439
|
+
// handed in by a caller that did not go through bindForm)
|
|
7440
|
+
if ( !Array.isArray($form.boundListeners) ) { $form.boundListeners = []; }
|
|
6980
7441
|
var $formInstance = instance.$forms[$el.form.getAttribute('id')];
|
|
6981
7442
|
var isDisabled = ( /^true$/i.test($el.disabled) ) ? true : false;
|
|
6982
7443
|
if (
|
|
@@ -7004,10 +7465,10 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
7004
7465
|
|
|
7005
7466
|
var eventsList = [], _evt = null, _e = 0;
|
|
7006
7467
|
if ( !/^(radio|checkbox)$/i.test($el.type) ) {
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7468
|
+
// #B585 — a call to the browser's own addEventListener (with gina's 4-argument
|
|
7469
|
+
// shape) stood here: it registered nothing useful on `window` and kept every
|
|
7470
|
+
// live-checked field alive there. The `focusout.<id>` handler registered below
|
|
7471
|
+
// clears the live-check timer.
|
|
7011
7472
|
|
|
7012
7473
|
// BO Livecheck local events
|
|
7013
7474
|
_evt = 'change.'+$el.id;
|
|
@@ -7064,6 +7525,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
7064
7525
|
|
|
7065
7526
|
if (eventsList.length > 0) {
|
|
7066
7527
|
var once = false;
|
|
7528
|
+
$form.boundListeners.push({ el: $el, evt: eventsList, fn:
|
|
7067
7529
|
addListener(gina, $el, eventsList, function(event) {
|
|
7068
7530
|
event.preventDefault();
|
|
7069
7531
|
clearTimeout(liveCheckTimer);
|
|
@@ -7347,7 +7809,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
7347
7809
|
console.debug(' change .... '+$el.id);
|
|
7348
7810
|
processEvent();
|
|
7349
7811
|
}
|
|
7350
|
-
});
|
|
7812
|
+
}) });
|
|
7351
7813
|
}
|
|
7352
7814
|
}
|
|
7353
7815
|
}
|
|
@@ -7488,6 +7950,14 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
7488
7950
|
var handleAutoComplete = function($el, liveCheckTimer) {
|
|
7489
7951
|
|
|
7490
7952
|
$el.setAttribute('readonly', 'readonly');
|
|
7953
|
+
// #B585 — the form that owns the field carries the ledger unbindForm drains; resolved
|
|
7954
|
+
// tolerantly, so a harness that hands the handler a bare element still runs it
|
|
7955
|
+
var $ownerForm = ( $el.form && typeof(instance) != 'undefined' && instance && instance.$forms )
|
|
7956
|
+
? ( instance.$forms[$el.form.getAttribute('id')] || null )
|
|
7957
|
+
: null;
|
|
7958
|
+
if ( $ownerForm && !Array.isArray($ownerForm.boundListeners) ) { $ownerForm.boundListeners = []; }
|
|
7959
|
+
var ledger = ( $ownerForm ) ? $ownerForm.boundListeners : [];
|
|
7960
|
+
ledger.push({ el: $el, evt: 'focusout.'+ $el.id, fn:
|
|
7491
7961
|
addListener(gina, $el, 'focusout.'+ $el.id, function(event) {
|
|
7492
7962
|
event.preventDefault();
|
|
7493
7963
|
clearTimeout(liveCheckTimer);
|
|
@@ -7495,14 +7965,22 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
7495
7965
|
var $_el = event.currentTarget;
|
|
7496
7966
|
triggerEvent(gina, $_el, 'change.'+ $_el.id);
|
|
7497
7967
|
$_el.setAttribute('readonly', 'readonly');
|
|
7498
|
-
});
|
|
7968
|
+
}) });
|
|
7969
|
+
ledger.push({ el: $el, evt: 'focusin.'+ $el.id, fn:
|
|
7499
7970
|
addListener(gina, $el, 'focusin.'+ $el.id, function(event) {
|
|
7500
7971
|
event.preventDefault();
|
|
7501
7972
|
event.currentTarget.removeAttribute('readonly');
|
|
7502
7973
|
|
|
7503
7974
|
var evtName = 'keydown.'+ event.currentTarget.id;
|
|
7504
|
-
// add once
|
|
7505
|
-
|
|
7975
|
+
// add once — judged by what is ATTACHED (the ledger) when the owner form is known:
|
|
7976
|
+
// unbind detaches the handler, and a consumer belt restoring the registry key must
|
|
7977
|
+
// not leave the field without its interception (#B585)
|
|
7978
|
+
var isKeydownBound = false;
|
|
7979
|
+
for (let _b = 0, _bLen = ledger.length; _b < _bLen; _b++) {
|
|
7980
|
+
if ( ledger[_b].el === event.currentTarget && ledger[_b].evt === evtName ) { isKeydownBound = true; break; }
|
|
7981
|
+
}
|
|
7982
|
+
if ( ( $ownerForm ) ? !isKeydownBound : typeof(gina.events[evtName]) == 'undefined' ) {
|
|
7983
|
+
ledger.push({ el: event.currentTarget, evt: evtName, fn:
|
|
7506
7984
|
addListener(gina, event.currentTarget, evtName, function(e) {
|
|
7507
7985
|
// #B134 — modifier chords are NOT intercepted: return before
|
|
7508
7986
|
// preventDefault so the native select-all/copy/paste/cut/undo
|
|
@@ -7727,10 +8205,10 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
7727
8205
|
queueCaretRestore($_el);
|
|
7728
8206
|
break;
|
|
7729
8207
|
} //EO Switch
|
|
7730
|
-
});
|
|
8208
|
+
}) });
|
|
7731
8209
|
}
|
|
7732
8210
|
|
|
7733
|
-
});
|
|
8211
|
+
}) });
|
|
7734
8212
|
|
|
7735
8213
|
}
|
|
7736
8214
|
|
|
@@ -7913,6 +8391,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
7913
8391
|
* reBindForm
|
|
7914
8392
|
* Allows form rebinding: it is like reseting validation
|
|
7915
8393
|
*
|
|
8394
|
+
* Since #B585 the unbind half detaches exactly what the previous bind attached (by
|
|
8395
|
+
* reference, through the per-form ledger) and the bind half attaches it again, so a
|
|
8396
|
+
* reBind() never stacks a listener. Handlers registered through `.on()` — and the
|
|
8397
|
+
* declarative `data-gina-form-event-on-*` hooks — survive it; `destroy()` removes them.
|
|
8398
|
+
*
|
|
7916
8399
|
* E.g.:
|
|
7917
8400
|
* $validator
|
|
7918
8401
|
* .getFormById('my-form-id')
|
|
@@ -8041,6 +8524,27 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
8041
8524
|
return bound;
|
|
8042
8525
|
}
|
|
8043
8526
|
|
|
8527
|
+
/**
|
|
8528
|
+
* unbindForm
|
|
8529
|
+
*
|
|
8530
|
+
* Detaches what the form's current binding attached and marks the record unbound. Since
|
|
8531
|
+
* #B585 this is the exact inverse of `bindForm`: the per-form ledger (`$form.boundListeners`)
|
|
8532
|
+
* and the reassociated-control side-table are drained by reference, the registry keys the
|
|
8533
|
+
* binding wrote are released, the live-check registration flags are cleared, and the submit
|
|
8534
|
+
* trigger's marks (`data-gina-form-submit-trigger-for`, the `__ginaSubmitBoundFor` expando)
|
|
8535
|
+
* are released with the record's `submitTrigger` claim, so the next bind — on this record,
|
|
8536
|
+
* or on a fresh same-id record after `destroy()` — claims and binds the trigger again.
|
|
8537
|
+
* Handlers registered through `.on()` (the declarative `data-gina-form-event-on-*` hooks
|
|
8538
|
+
* included) are left in place — they belong to the form, and `destroy()` removes them.
|
|
8539
|
+
*
|
|
8540
|
+
* @param {object} $target - the `<form>` element, or the form record (`$forms[id]`)
|
|
8541
|
+
*
|
|
8542
|
+
* @returns {object} $form - the record, `binded` false
|
|
8543
|
+
*
|
|
8544
|
+
* @example
|
|
8545
|
+
* gina.validator.$forms['signup'].unbind();
|
|
8546
|
+
* gina.validator.$forms['signup'].bind(); // attaches everything again, once
|
|
8547
|
+
*/
|
|
8044
8548
|
var unbindForm = function($target) {
|
|
8045
8549
|
var $form = null
|
|
8046
8550
|
, _id = null
|
|
@@ -8069,160 +8573,63 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
8069
8573
|
return $form
|
|
8070
8574
|
}
|
|
8071
8575
|
|
|
8072
|
-
//
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
// binded elements
|
|
8093
|
-
var $el = null
|
|
8094
|
-
//, evt = null
|
|
8095
|
-
, $els = []
|
|
8096
|
-
, $elTMP = [];
|
|
8097
|
-
|
|
8098
|
-
// submit buttons
|
|
8099
|
-
$elTMP = $form.target.getElementsByTagName('button');
|
|
8100
|
-
if ( $elTMP.length > 0 ) {
|
|
8101
|
-
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
8102
|
-
// if button is != type="submit", you will need to provide : data-gina-form-submit
|
|
8103
|
-
// TODO - On button binding, you can then provide data-gina-form-action & data-gina-form-method
|
|
8104
|
-
$els.push($elTMP[i])
|
|
8105
|
-
}
|
|
8106
|
-
}
|
|
8107
|
-
|
|
8108
|
-
// submit links
|
|
8109
|
-
$elTMP = $form.target.getElementsByTagName('a');
|
|
8110
|
-
if ( $elTMP.length > 0 ) {
|
|
8111
|
-
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
8112
|
-
$els.push($elTMP[i])
|
|
8113
|
-
}
|
|
8114
|
-
}
|
|
8115
|
-
|
|
8116
|
-
// checkbox, radio, file, text, number, hidden, date .. ALL BUT hidden
|
|
8117
|
-
$elTMP = $form.target.getElementsByTagName('input');
|
|
8118
|
-
if ( $elTMP.length > 0 ) {
|
|
8119
|
-
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
8120
|
-
|
|
8121
|
-
if ( !/^(hidden)$/i.test($elTMP[i].type) )
|
|
8122
|
-
$els.push( $elTMP[i] );
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
if (/^(file)$/i.test($elTMP[i].type)) {
|
|
8126
|
-
// special case
|
|
8127
|
-
// vForm has to be handle here, it does not exist in the document context
|
|
8128
|
-
let vFormId = $elTMP[i].getAttribute('data-gina-form-virtual');
|
|
8129
|
-
if ( vFormId ) {
|
|
8130
|
-
let $vForm = getFormById(vFormId).target;
|
|
8131
|
-
if ($vForm) {
|
|
8132
|
-
$els.push( $vForm );
|
|
8133
|
-
// `events` is defined on top of this file
|
|
8134
|
-
// It is the list of allowed events
|
|
8135
|
-
for (let e = 0, eLen = events.length; e < eLen; e++) {
|
|
8136
|
-
let evt = events[e];
|
|
8137
|
-
if ( typeof(gina.events[ evt +'.'+ vFormId + '.hform' ]) != 'undefined' && gina.events[ evt +'.'+ vFormId + '.hform' ] == vFormId ) {
|
|
8138
|
-
removeListener(gina, $vForm, evt +'.'+ vFormId + '.hform')
|
|
8139
|
-
}
|
|
8140
|
-
}
|
|
8141
|
-
}
|
|
8576
|
+
// #B585 — detach exactly what bindForm attached, by reference. The ledger holds every
|
|
8577
|
+
// form-level proxy, the validate/reset/submit listeners, the live-check, autocomplete,
|
|
8578
|
+
// select, file, checkbox and radio handlers and the submit trigger's own listeners.
|
|
8579
|
+
// Handlers a consumer registered through `.on()` — the declarative `.hform` hooks
|
|
8580
|
+
// included, registered the same way at send time — belong to the form, not to one
|
|
8581
|
+
// binding: they stay attached across a reBind(); destroy() removes them.
|
|
8582
|
+
if ( Array.isArray($form.boundListeners) ) {
|
|
8583
|
+
for (let i = 0, len = $form.boundListeners.length; i < len; i++) {
|
|
8584
|
+
let entry = $form.boundListeners[i];
|
|
8585
|
+
if ( !entry || !entry.el || typeof(entry.fn) != 'function' ) continue;
|
|
8586
|
+
let evts = ( Array.isArray(entry.evt) ) ? entry.evt : [ entry.evt ];
|
|
8587
|
+
let eId = ( typeof(entry.el.id) != 'undefined' && typeof(entry.el.id) != 'object' ) ? entry.el.id : ( entry.el.getAttribute ? entry.el.getAttribute('id') : null );
|
|
8588
|
+
for (let e = 0, eLen = evts.length; e < eLen; e++) {
|
|
8589
|
+
if ( entry.el.removeEventListener ) {
|
|
8590
|
+
entry.el.removeEventListener(evts[e], entry.fn, false);
|
|
8591
|
+
} else if ( entry.el.detachEvent ) {
|
|
8592
|
+
entry.el.detachEvent('on' + evts[e], entry.fn);
|
|
8142
8593
|
}
|
|
8143
|
-
|
|
8144
|
-
//
|
|
8145
|
-
//
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
if ( typeof(gina.events[ evt ]) != 'undefined' && gina.events[ evt ] == $elTMP[i].id ) {
|
|
8149
|
-
removeListener(gina, $elTMP[i], evt);
|
|
8150
|
-
}
|
|
8151
|
-
evt = events[e];
|
|
8152
|
-
if ( typeof(gina.events[ evt ]) != 'undefined' && gina.events[ evt ] == $elTMP[i].id ) {
|
|
8153
|
-
removeListener(gina, $elTMP[i], evt);
|
|
8154
|
-
}
|
|
8155
|
-
evt = $elTMP[i].id;
|
|
8156
|
-
if ( typeof(gina.events[ evt ]) != 'undefined' && gina.events[ evt ] == $elTMP[i].id ) {
|
|
8157
|
-
removeListener(gina, $elTMP[i], evt);
|
|
8158
|
-
}
|
|
8594
|
+
// release the registry key this binding wrote: `gina.events` maps a NAME to the
|
|
8595
|
+
// id of the LAST element that registered it, so a bare native name another
|
|
8596
|
+
// element wrote last is left to that element
|
|
8597
|
+
if ( typeof(gina.events[evts[e]]) != 'undefined' && gina.events[evts[e]] == eId ) {
|
|
8598
|
+
delete gina.events[evts[e]];
|
|
8159
8599
|
}
|
|
8160
8600
|
}
|
|
8601
|
+
// the submit trigger's marks: bindForm claims the trigger for the record and stamps
|
|
8602
|
+
// the element with `data-gina-form-submit-trigger-for` as a bind-once guard, and
|
|
8603
|
+
// bindSubmitEl stamps the `__ginaSubmitBoundFor` expando (#B294). Neither was
|
|
8604
|
+
// released, so a record bound again after destroy() — a NEW record, the element
|
|
8605
|
+
// still stamped — never claimed its trigger: its state was never updated and its
|
|
8606
|
+
// click was refused as gated (measured on the first cut of #B585, once the stale
|
|
8607
|
+
// listeners of the destroyed binding no longer answered the click). Released with
|
|
8608
|
+
// the record's claim below, so the next bind claims and binds the trigger exactly
|
|
8609
|
+
// as a first bind does.
|
|
8610
|
+
if ( entry.el.dataset && entry.el.dataset.ginaFormSubmitTriggerFor == _id ) {
|
|
8611
|
+
delete entry.el.dataset.ginaFormSubmitTriggerFor;
|
|
8612
|
+
}
|
|
8613
|
+
if ( typeof(entry.el.__ginaSubmitBoundFor) != 'undefined' ) {
|
|
8614
|
+
delete entry.el.__ginaSubmitBoundFor;
|
|
8615
|
+
}
|
|
8161
8616
|
}
|
|
8617
|
+
$form.boundListeners = [];
|
|
8162
8618
|
}
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
$elTMP = $form.target.getElementsByTagName('textarea');
|
|
8166
|
-
if ( $elTMP.length > 0 ) {
|
|
8167
|
-
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
8168
|
-
$els.push( $elTMP[i] )
|
|
8169
|
-
}
|
|
8619
|
+
if ( typeof($form.submitTrigger) != 'undefined' ) {
|
|
8620
|
+
delete $form.submitTrigger;
|
|
8170
8621
|
}
|
|
8171
8622
|
|
|
8172
|
-
|
|
8173
|
-
//
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8177
|
-
|
|
8623
|
+
// the live-check registration flags (`registerForLiveChecking` is add-once per control),
|
|
8624
|
+
// so the next bind registers every owned control again — reassociated controls and
|
|
8625
|
+
// form-associated custom elements included, through the owner-aware `elements`
|
|
8626
|
+
var $owned = ( $form.target && $form.target.elements ) ? $form.target.elements : [];
|
|
8627
|
+
for (let i = 0, len = $owned.length; i < len; i++) {
|
|
8628
|
+
let ownedId = ( typeof($owned[i].id) == 'string' && $owned[i].id ) ? $owned[i].id : ( $owned[i].getAttribute ? $owned[i].getAttribute('id') : null );
|
|
8629
|
+
if ( ownedId && typeof(gina.events['registered.' + ownedId]) != 'undefined' ) {
|
|
8630
|
+
delete gina.events['registered.' + ownedId];
|
|
8178
8631
|
}
|
|
8179
8632
|
}
|
|
8180
|
-
// main form
|
|
8181
|
-
$els.push( $form.target );
|
|
8182
|
-
for (let i = 0, len = $els.length; i < len; ++i) {
|
|
8183
|
-
|
|
8184
|
-
$el = $els[i];
|
|
8185
|
-
let eId = $el.getAttribute('id');
|
|
8186
|
-
for (let e = 0, eLen = events.length; e < eLen; e++) {
|
|
8187
|
-
let evt = events[e];
|
|
8188
|
-
let eventName = evt;
|
|
8189
|
-
// remove proxy
|
|
8190
|
-
// if ( typeof(gina.events[ evt ]) != 'undefined' ) {
|
|
8191
|
-
// removeListener(gina, $el, evt);
|
|
8192
|
-
// }
|
|
8193
|
-
|
|
8194
|
-
if ( typeof(gina.events[ eventName ]) != 'undefined' && gina.events[ eventName ] == eId ) {
|
|
8195
|
-
removeListener(gina, $el, eventName);
|
|
8196
|
-
}
|
|
8197
|
-
|
|
8198
|
-
// eventName = evt +'._case_'+ $el.name;
|
|
8199
|
-
// if ( typeof(gina.events[ eventName ]) != 'undefined') {
|
|
8200
|
-
// removeListener(gina, $el, eventName);
|
|
8201
|
-
// }
|
|
8202
|
-
|
|
8203
|
-
eventName = eId;
|
|
8204
|
-
if ( typeof(gina.events[ eventName ]) != 'undefined' && gina.events[ eventName ] == eId ) {
|
|
8205
|
-
removeListener(gina, $el, eventName);
|
|
8206
|
-
}
|
|
8207
|
-
|
|
8208
|
-
eventName = evt +'.'+ eId;
|
|
8209
|
-
if ( typeof(gina.events[ eventName ]) != 'undefined' && gina.events[ eventName ] == eId ) {
|
|
8210
|
-
removeListener(gina, $el, eventName);
|
|
8211
|
-
}
|
|
8212
|
-
|
|
8213
|
-
eventName = evt +'.'+ eId;
|
|
8214
|
-
if ( typeof(gina.events[ eventName ]) != 'undefined' && gina.events[ eventName ] == eventName ) {
|
|
8215
|
-
removeListener(gina, $el, eventName);
|
|
8216
|
-
}
|
|
8217
|
-
|
|
8218
|
-
eventName = evt +'.'+ eId + '.hform';
|
|
8219
|
-
if ( typeof(gina.events[ eventName ]) != 'undefined' && gina.events[ eventName ] == eId ) {
|
|
8220
|
-
removeListener(gina, $el, eventName);
|
|
8221
|
-
}
|
|
8222
|
-
}// EO for events
|
|
8223
|
-
} //EO for $els
|
|
8224
|
-
|
|
8225
|
-
$els = null; $el = null; $elTMP = null; evt = null;
|
|
8226
8633
|
|
|
8227
8634
|
// [HTML5 form-reassociation support] Drain per-control listeners attached to
|
|
8228
8635
|
// reassociated controls during bindForm. The element-by-tagName loops above
|
|
@@ -8452,6 +8859,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
8452
8859
|
if (!Array.isArray($form.reassociatedListeners))
|
|
8453
8860
|
$form.reassociatedListeners = [];
|
|
8454
8861
|
|
|
8862
|
+
// #B585 — the ledger of every listener THIS binding attaches, drained by reference in
|
|
8863
|
+
// unbindForm (the side-table above is its older sibling for out-of-tree controls)
|
|
8864
|
+
if (!Array.isArray($form.boundListeners))
|
|
8865
|
+
$form.boundListeners = [];
|
|
8866
|
+
|
|
8455
8867
|
// Helper: collect controls owned by $form, including HTML5 form-reassociated
|
|
8456
8868
|
// controls (those carrying `form="X"` outside the form's DOM subtree). Walks
|
|
8457
8869
|
// $form.elements (HTMLFormControlsCollection — owner-aware) for the primary set,
|
|
@@ -8819,36 +9231,26 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
8819
9231
|
console.debug('preview is visible ...');
|
|
8820
9232
|
$uploadTrigger.customFiles = [];
|
|
8821
9233
|
$uploadTrigger.form = $target;
|
|
8822
|
-
|
|
9234
|
+
// #B859 — the stored files are the container's FILE nodes (see getUploadFileNodes):
|
|
9235
|
+
// an <img> (its file named by its src's last segment, as before) — also inside the
|
|
9236
|
+
// <li> of a `<ul>` container — or a node the page marks with
|
|
9237
|
+
// `data-upload-original-filename` for a file it shows without an image (the
|
|
9238
|
+
// attribute names the file). Only the container's direct <img> children counted,
|
|
9239
|
+
// so the delete link of a file shown without an image was bound to nothing; the
|
|
9240
|
+
// `<ul>` branch that stood here never ran (it read the `length` of an element).
|
|
9241
|
+
var $els = getUploadFileNodes($previewContainer), deleteLinkId = null;
|
|
8823
9242
|
for (let i = 0, len = $els.length; i < len; i++) {
|
|
8824
|
-
let $img =
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
index++;
|
|
8835
|
-
}
|
|
8836
|
-
}
|
|
8837
|
-
|
|
8838
|
-
}
|
|
8839
|
-
} else if ( /img/i.test($els[i].tagName) ) {
|
|
8840
|
-
$img = $els[i];
|
|
8841
|
-
deleteLinkId = uploadTriggerId + '-'+index+'-delete-trigger';
|
|
8842
|
-
let file = $img.src.substring($img.src.lastIndexOf('/')+1);
|
|
8843
|
-
$uploadTrigger.customFiles.push({
|
|
8844
|
-
name: file,
|
|
8845
|
-
deleteLinkId: deleteLinkId
|
|
8846
|
-
});
|
|
8847
|
-
// bind reset trigger
|
|
8848
|
-
bindUploadResetOrDeleteTrigger(bindingType, $uploadTrigger, index);
|
|
9243
|
+
let $img = $els[i];
|
|
9244
|
+
deleteLinkId = uploadTriggerId + '-'+index+'-delete-trigger';
|
|
9245
|
+
let file = $img.getAttribute('data-upload-original-filename') || ( ($img.src) ? $img.src.substring($img.src.lastIndexOf('/')+1) : '' );
|
|
9246
|
+
$uploadTrigger.customFiles.push({
|
|
9247
|
+
name: file,
|
|
9248
|
+
deleteLinkId: deleteLinkId
|
|
9249
|
+
});
|
|
9250
|
+
// bind reset trigger
|
|
9251
|
+
bindUploadResetOrDeleteTrigger(bindingType, $uploadTrigger, index);
|
|
8849
9252
|
|
|
8850
|
-
|
|
8851
|
-
}
|
|
9253
|
+
index++;
|
|
8852
9254
|
}
|
|
8853
9255
|
}
|
|
8854
9256
|
|
|
@@ -8880,6 +9282,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
8880
9282
|
// setTimeout(() => {
|
|
8881
9283
|
// removeListner(gina, $inputs[f], 'change');
|
|
8882
9284
|
// }, 0);
|
|
9285
|
+
$form.boundListeners.push({ el: $inputs[f], evt: 'change', fn:
|
|
8883
9286
|
addListener(gina, $inputs[f], 'change', function(event) {
|
|
8884
9287
|
event.preventDefault();
|
|
8885
9288
|
var $el = event.currentTarget;
|
|
@@ -8993,8 +9396,8 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
8993
9396
|
if ( typeof($el.form) != 'undefined' ) {
|
|
8994
9397
|
|
|
8995
9398
|
// adding virtual fields
|
|
8996
|
-
|
|
8997
|
-
var
|
|
9399
|
+
// #B862 — the prefix rule the reset removes the fields by (see getUploadFieldPrefix)
|
|
9400
|
+
var fieldPrefix = getUploadFieldPrefix($el);
|
|
8998
9401
|
var fieldId = $el.id || $el.getAttribute('id');
|
|
8999
9402
|
|
|
9000
9403
|
var hasPreviewContainer = false;
|
|
@@ -9020,12 +9423,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9020
9423
|
hasPreviewContainer = true;
|
|
9021
9424
|
}
|
|
9022
9425
|
|
|
9023
|
-
if (fieldName) {
|
|
9024
|
-
fieldPrefix = fieldName
|
|
9025
|
-
}
|
|
9026
|
-
|
|
9027
9426
|
var hiddenFields = []
|
|
9028
|
-
, hiddenFieldObject = null
|
|
9029
9427
|
, mandatoryFields = [
|
|
9030
9428
|
'name'
|
|
9031
9429
|
, 'group'
|
|
@@ -9039,117 +9437,10 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9039
9437
|
, 'mime'
|
|
9040
9438
|
, 'preview'
|
|
9041
9439
|
]
|
|
9042
|
-
, formInputsFields = $el.form.getElementsByTagName('INPUT')
|
|
9043
|
-
, fieldType = null
|
|
9044
|
-
, hiddenField = null
|
|
9045
|
-
, _userName = null
|
|
9046
|
-
, _altId = null
|
|
9047
|
-
, _name = null
|
|
9048
|
-
, _nameRe = null
|
|
9049
|
-
, subPrefix = null
|
|
9050
|
-
, uploadFields = {}
|
|
9051
9440
|
;
|
|
9052
9441
|
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
bindUploadResetOrDeleteTrigger('reset', $el, _f);
|
|
9056
|
-
hiddenFields[_f] = null;
|
|
9057
|
-
subPrefix = fieldPrefix + '['+ _f +']';
|
|
9058
|
-
_nameRe = new RegExp('^'+subPrefix.replace(/\[/g, '\\[').replace(/\]/g, '\\]'));
|
|
9059
|
-
// collecting existing DOM fields
|
|
9060
|
-
for (var h = 0, hLen = formInputsFields.length; h < hLen; ++h) {
|
|
9061
|
-
fieldType = formInputsFields[h].getAttribute('type');
|
|
9062
|
-
hiddenField = null;
|
|
9063
|
-
_name = null, _userName = null;
|
|
9064
|
-
// #B731 — read once from the file input, above
|
|
9065
|
-
// was: errorField= formInputsFields[h].getAttribute('data-gina-form-upload-error') || fieldId + '-error' || null;
|
|
9066
|
-
|
|
9067
|
-
if (fieldType && /hidden/i.test(fieldType) ) {
|
|
9068
|
-
hiddenField = formInputsFields[h];
|
|
9069
|
-
|
|
9070
|
-
_name = ( /\[\w+\]$/i.test(hiddenField.name) )
|
|
9071
|
-
? hiddenField.name.match(/\[\w+\]$/)[0].replace(/\[|\]/g, '')
|
|
9072
|
-
: hiddenField.name;
|
|
9073
|
-
_userName = ( /\[\w+\]$/i.test(hiddenField.name) )
|
|
9074
|
-
? hiddenField.name.match(/\[\w+\]$/)[0].replace(/\[|\]/g, '')
|
|
9075
|
-
: hiddenField.name;
|
|
9076
|
-
|
|
9077
|
-
// mandatory informations
|
|
9078
|
-
if (
|
|
9079
|
-
hiddenField
|
|
9080
|
-
&& typeof(_name) != 'undefiend'
|
|
9081
|
-
&& mandatoryFields.indexOf( _name ) > -1
|
|
9082
|
-
&& _nameRe.test( hiddenField.name )
|
|
9083
|
-
) {
|
|
9084
|
-
|
|
9085
|
-
if (!hiddenFields[_f] )
|
|
9086
|
-
hiddenFields[_f] = {};
|
|
9087
|
-
|
|
9088
|
-
if ( /\[preview\]/i.test(hiddenField.name) ) {
|
|
9089
|
-
if ( typeof(hiddenFields[_f].preview) == 'undefined' )
|
|
9090
|
-
hiddenFields[_f].preview = {};
|
|
9091
|
-
|
|
9092
|
-
hiddenFields[_f].preview[_name] = hiddenField;
|
|
9093
|
-
} else {
|
|
9094
|
-
hiddenFields[_f][_name] = hiddenField;
|
|
9095
|
-
}
|
|
9096
|
-
} else if (
|
|
9097
|
-
hiddenField
|
|
9098
|
-
&& typeof(_name) != 'undefiend'
|
|
9099
|
-
&& mandatoryFields.indexOf( _name ) < 0
|
|
9100
|
-
&& _nameRe.test( hiddenField.name )
|
|
9101
|
-
) { // defined by user
|
|
9102
|
-
if (!hiddenFields[_f] )
|
|
9103
|
-
hiddenFields[_f] = {};
|
|
9104
|
-
|
|
9105
|
-
if ( /\[preview\]/i.test(hiddenField.name) ) {
|
|
9106
|
-
if ( typeof(hiddenFields[_f].preview) == 'undefined' )
|
|
9107
|
-
hiddenFields[_f].preview = {};
|
|
9108
|
-
|
|
9109
|
-
hiddenFields[_f].preview[_userName] = hiddenField;
|
|
9110
|
-
} else {
|
|
9111
|
-
hiddenFields[_f][_userName] = hiddenField;
|
|
9112
|
-
}
|
|
9113
|
-
}
|
|
9114
|
-
}
|
|
9115
|
-
}
|
|
9116
|
-
|
|
9117
|
-
// completing by adding non-declared mandatoring fields in the DOM: all but preview
|
|
9118
|
-
for (var m = 0, mLen = mandatoryFields.length; m < mLen; ++m) {
|
|
9119
|
-
// optional, must be set by user
|
|
9120
|
-
// needs recheck
|
|
9121
|
-
if (!hiddenFields[_f] )
|
|
9122
|
-
hiddenFields[_f] = {};
|
|
9123
|
-
|
|
9124
|
-
if ( typeof(hiddenFields[_f][ mandatoryFields[m] ]) == 'undefined' ) {
|
|
9125
|
-
// #B459 — `preview` is the one slot that is never a flat input:
|
|
9126
|
-
// its value is an OBJECT (`{location, uri, tmpUri, width, height}`),
|
|
9127
|
-
// which an input's `.value` can only hold as "[object Object]".
|
|
9128
|
-
// A form that declares no `[preview][...]` sub-fields gets an
|
|
9129
|
-
// EMPTY sub-field map instead, so the fill loop still visits the
|
|
9130
|
-
// key (the nested thumbnail is rendered from there) and posts
|
|
9131
|
-
// nothing for it — the documented field set. Declaring the
|
|
9132
|
-
// sub-fields stays the opt-in for persisting the preview.
|
|
9133
|
-
if ( mandatoryFields[m] == 'preview' ) {
|
|
9134
|
-
hiddenFields[_f].preview = {};
|
|
9135
|
-
continue;
|
|
9136
|
-
}
|
|
9137
|
-
|
|
9138
|
-
_name = fieldPrefix +'['+ _f +']['+ mandatoryFields[m] +']';
|
|
9139
|
-
// create input & add it to the form
|
|
9140
|
-
$newVirtualField = document.createElement('input');
|
|
9141
|
-
$newVirtualField.type = 'hidden';
|
|
9142
|
-
$newVirtualField.id = 'input.' + uuid();
|
|
9143
|
-
$newVirtualField.name = _name;
|
|
9144
|
-
$newVirtualField.value = '';
|
|
9145
|
-
|
|
9146
|
-
$el.form.appendChild($newVirtualField);
|
|
9147
|
-
hiddenFields[_f][ mandatoryFields[m] ] = $el.form[$el.form.length-1];// last added
|
|
9148
|
-
}
|
|
9149
|
-
|
|
9150
|
-
}
|
|
9151
|
-
|
|
9152
|
-
} // EO for files
|
|
9442
|
+
// #B858 — built again on every selection (see buildUploadHiddenFields)
|
|
9443
|
+
hiddenFields = buildUploadHiddenFields($el, fieldPrefix, files.length, mandatoryFields, true);
|
|
9153
9444
|
|
|
9154
9445
|
$uploadForm.uploadProperties = {
|
|
9155
9446
|
id : $el.form.id || $el.getAttribute('id'),
|
|
@@ -9202,6 +9493,18 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9202
9493
|
} else {
|
|
9203
9494
|
document.body.appendChild($uploadForm)
|
|
9204
9495
|
}
|
|
9496
|
+
} else {
|
|
9497
|
+
// #B858 — a selection that finds the input's virtual upload form builds its
|
|
9498
|
+
// own hidden fields: they were built only with that form, so after a reset
|
|
9499
|
+
// (which takes them out of the real form) the next selection filled inputs
|
|
9500
|
+
// no longer in it and the save posted no file, and a selection with more
|
|
9501
|
+
// files than the first had none for its new files. In a popin the lookup
|
|
9502
|
+
// above reads a parsed COPY of the popin, without the upload's properties:
|
|
9503
|
+
// they are on the document's element.
|
|
9504
|
+
$uploadForm = document.getElementById(uploadFormId) || $uploadForm;
|
|
9505
|
+
if ( $el.form && $uploadForm.uploadProperties ) {
|
|
9506
|
+
$uploadForm.uploadProperties.uploadFields = buildUploadHiddenFields($el, getUploadFieldPrefix($el), files.length, $uploadForm.uploadProperties.mandatoryFields, false);
|
|
9507
|
+
}
|
|
9205
9508
|
}
|
|
9206
9509
|
|
|
9207
9510
|
// #R8 — upload-progress kickoff: show activity from selection
|
|
@@ -9308,12 +9611,23 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9308
9611
|
throw formErr;
|
|
9309
9612
|
}
|
|
9310
9613
|
}
|
|
9311
|
-
});
|
|
9614
|
+
}) });
|
|
9312
9615
|
|
|
9313
9616
|
|
|
9314
9617
|
}
|
|
9315
9618
|
}// EO Binding input
|
|
9316
9619
|
|
|
9620
|
+
/**
|
|
9621
|
+
* Live-checks a <select> after its `change`: validates the select alone, then, in that
|
|
9622
|
+
* pass's callback, the whole form, and displays each pass's error for this select only.
|
|
9623
|
+
* The element is always `$el`, never the global `event` (#B781).
|
|
9624
|
+
*
|
|
9625
|
+
* @inner
|
|
9626
|
+
* @private
|
|
9627
|
+
* @param {HTMLSelectElement} $el - The select that changed
|
|
9628
|
+
* @param {object} $form - The form's validator record (`target`, `rules`)
|
|
9629
|
+
* @returns {void}
|
|
9630
|
+
*/
|
|
9317
9631
|
var updateSelect = function($el, $form) {
|
|
9318
9632
|
$el.setAttribute('data-value', $el.value);
|
|
9319
9633
|
// If Live check enabled, proceed to silent validation
|
|
@@ -9333,20 +9647,27 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9333
9647
|
// && typeof($form.isBeingReseted) == 'undefined'
|
|
9334
9648
|
) {
|
|
9335
9649
|
var localField = {}, $localField = {}, $localForm = null;
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9650
|
+
// #B781 — the select is read from `$el`, the element this function is given. It
|
|
9651
|
+
// was read from the global `event` (`window.event`), which is the `change` only
|
|
9652
|
+
// while that dispatch runs: validate() calls back inside its own `validated.<id>`
|
|
9653
|
+
// dispatch on the node it validated, so in the whole-form pass below the target
|
|
9654
|
+
// was the FORM, the touched field's name became the form's own `name`, and the
|
|
9655
|
+
// select's error from the whole-form check was never displayed.
|
|
9656
|
+
// was: localField[event.target.name] = event.target.value; (and each event.target below)
|
|
9657
|
+
$localForm = $el.form;
|
|
9658
|
+
localField[$el.name] = $el.value;
|
|
9659
|
+
$localField[$el.name] = $el;
|
|
9339
9660
|
|
|
9340
9661
|
instance.$forms[$localForm.getAttribute('id')].isValidating = true;
|
|
9341
|
-
validate(
|
|
9662
|
+
validate($el, localField, $localField, $form.rules, function onLiveValidation(result){
|
|
9342
9663
|
instance.$forms[$localForm.getAttribute('id')].isValidating = false;
|
|
9343
9664
|
var isFormValid = result.isValid();
|
|
9344
9665
|
//console.debug('onSilentPreGlobalLiveValidation: '+ isFormValid, result);
|
|
9345
9666
|
if (isFormValid) {
|
|
9346
9667
|
//resetting error display
|
|
9347
|
-
handleErrorsDisplay($localForm, {}, result.data,
|
|
9668
|
+
handleErrorsDisplay($localForm, {}, result.data, $el.name);
|
|
9348
9669
|
} else {
|
|
9349
|
-
handleErrorsDisplay($localForm, result.error, result.data,
|
|
9670
|
+
handleErrorsDisplay($localForm, result.error, result.data, $el.name);
|
|
9350
9671
|
}
|
|
9351
9672
|
//updateSubmitTriggerState( $localForm, isFormValid );
|
|
9352
9673
|
// data-gina-form-required-before-submit
|
|
@@ -9369,7 +9690,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9369
9690
|
if (!isFormValid) {
|
|
9370
9691
|
instance.$forms[formId].errors = gResult.error;
|
|
9371
9692
|
// Fixed on 2026-04-09 - only display errors for the touched field
|
|
9372
|
-
var _touchedField =
|
|
9693
|
+
var _touchedField = $el.name;
|
|
9373
9694
|
if ( typeof(gResult.error[_touchedField]) != 'undefined' ) {
|
|
9374
9695
|
handleErrorsDisplay($gForm, gResult.error, gResult.data, _touchedField);
|
|
9375
9696
|
}
|
|
@@ -9421,13 +9742,14 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9421
9742
|
};
|
|
9422
9743
|
}
|
|
9423
9744
|
|
|
9745
|
+
$form.boundListeners.push({ el: $select[s], evt: 'change', fn:
|
|
9424
9746
|
addListener(gina, $select[s], 'change', function(event) {
|
|
9425
9747
|
var $el = event.target;
|
|
9426
9748
|
|
|
9427
9749
|
if (/select/i.test($el.type) ) {
|
|
9428
9750
|
updateSelect($el, $form);
|
|
9429
9751
|
}
|
|
9430
|
-
});
|
|
9752
|
+
}) });
|
|
9431
9753
|
|
|
9432
9754
|
|
|
9433
9755
|
if ($select[s].options && !$form.fieldsSet[ elId ]) {
|
|
@@ -9844,11 +10166,12 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9844
10166
|
proceed = function ($el, evt) {
|
|
9845
10167
|
|
|
9846
10168
|
// recover default state only on value === true || false
|
|
10169
|
+
$form.boundListeners.push({ el: $el, evt: evt, fn:
|
|
9847
10170
|
addListener(gina, $el, evt, function(event) {
|
|
9848
10171
|
updateCheckBox(event.target);
|
|
9849
10172
|
|
|
9850
10173
|
triggerEvent(gina, event.target, 'changed.'+ event.target.id);
|
|
9851
|
-
});
|
|
10174
|
+
}) });
|
|
9852
10175
|
|
|
9853
10176
|
// default state recovery
|
|
9854
10177
|
updateCheckBox($el, true);
|
|
@@ -9872,12 +10195,13 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
9872
10195
|
|
|
9873
10196
|
proceed = function ($el, evt) {
|
|
9874
10197
|
// recover default state
|
|
10198
|
+
$form.boundListeners.push({ el: $el, evt: evt, fn:
|
|
9875
10199
|
addListener(gina, $el, evt, function(event) {
|
|
9876
10200
|
//cancelEvent(event);
|
|
9877
10201
|
updateRadio(event.target);
|
|
9878
10202
|
|
|
9879
10203
|
triggerEvent(gina, event.target, 'changed.'+ event.target.id);
|
|
9880
|
-
});
|
|
10204
|
+
}) });
|
|
9881
10205
|
|
|
9882
10206
|
// default state recovery
|
|
9883
10207
|
updateRadio($el, true);
|
|
@@ -10299,6 +10623,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10299
10623
|
// handle form reset
|
|
10300
10624
|
subEvent = 'reset.'+$target.id;
|
|
10301
10625
|
if ( typeof(gina.events[subEvent]) == 'undefined' ) {
|
|
10626
|
+
$form.boundListeners.push({ el: $target, evt: subEvent, fn:
|
|
10302
10627
|
addListener(gina, $target, subEvent, function(e) {
|
|
10303
10628
|
e.preventDefault();
|
|
10304
10629
|
|
|
@@ -10320,17 +10645,25 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10320
10645
|
updateSubmitTriggerState( $form.target , isFormValid );
|
|
10321
10646
|
$form.target.dataset.ginaFormIsResetting = false;
|
|
10322
10647
|
});
|
|
10323
|
-
})
|
|
10648
|
+
}) })
|
|
10324
10649
|
}
|
|
10325
10650
|
// Form-level proxies: capture bubbled events from in-tree controls.
|
|
10326
|
-
|
|
10327
|
-
addListener(gina, $target, '
|
|
10328
|
-
|
|
10329
|
-
addListener(gina, $target, '
|
|
10330
|
-
|
|
10331
|
-
addListener(gina, $target, '
|
|
10332
|
-
|
|
10333
|
-
addListener(gina, $target, '
|
|
10651
|
+
$form.boundListeners.push({ el: $target, evt: 'reset', fn:
|
|
10652
|
+
addListener(gina, $target, 'reset', resetProxyHandler) });
|
|
10653
|
+
$form.boundListeners.push({ el: $target, evt: 'keydown', fn:
|
|
10654
|
+
addListener(gina, $target, 'keydown', keydownProxyHandler) });
|
|
10655
|
+
$form.boundListeners.push({ el: $target, evt: 'keyup', fn:
|
|
10656
|
+
addListener(gina, $target, 'keyup', keyupProxyHandler) });
|
|
10657
|
+
$form.boundListeners.push({ el: $target, evt: 'focusin', fn:
|
|
10658
|
+
addListener(gina, $target, 'focusin', focusinProxyHandler) });
|
|
10659
|
+
$form.boundListeners.push({ el: $target, evt: 'focusout', fn:
|
|
10660
|
+
addListener(gina, $target, 'focusout', focusoutProxyHandler) });
|
|
10661
|
+
$form.boundListeners.push({ el: $target, evt: 'change', fn:
|
|
10662
|
+
addListener(gina, $target, 'change', changeProxyHandler) });
|
|
10663
|
+
$form.boundListeners.push({ el: $target, evt: 'click', fn:
|
|
10664
|
+
addListener(gina, $target, 'click', clickProxyHandler) });
|
|
10665
|
+
$form.boundListeners.push({ el: $target, evt: 'animationstart', fn:
|
|
10666
|
+
addListener(gina, $target, 'animationstart', autofillProxyHandler) }); // #B478
|
|
10334
10667
|
}
|
|
10335
10668
|
|
|
10336
10669
|
proceed();
|
|
@@ -10375,6 +10708,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10375
10708
|
evt = 'validate.' + _id;
|
|
10376
10709
|
proceed = function () {
|
|
10377
10710
|
// attach form submit event
|
|
10711
|
+
$form.boundListeners.push({ el: $target, evt: evt, fn:
|
|
10378
10712
|
addListener(gina, $target, evt, function(event) {
|
|
10379
10713
|
cancelEvent(event);
|
|
10380
10714
|
|
|
@@ -10468,13 +10802,8 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10468
10802
|
}
|
|
10469
10803
|
}
|
|
10470
10804
|
}
|
|
10471
|
-
})
|
|
10805
|
+
}) })
|
|
10472
10806
|
}
|
|
10473
|
-
// cannot be binded twice
|
|
10474
|
-
if ( typeof(gina.events[evt]) != 'undefined' && gina.events[evt] == 'validate.' + _id ) {
|
|
10475
|
-
removeListener(gina, $form, evt, proceed)
|
|
10476
|
-
}
|
|
10477
|
-
|
|
10478
10807
|
proceed();
|
|
10479
10808
|
|
|
10480
10809
|
var bindSubmitEl = function (evt, $submit) {
|
|
@@ -10493,6 +10822,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10493
10822
|
// same string `clickProxyHandler` compares against. Read at the :8037
|
|
10494
10823
|
// dispatch gate.
|
|
10495
10824
|
$submit.__ginaSubmitBoundFor = evt;
|
|
10825
|
+
$form.boundListeners.push({ el: $submit, evt: evt, fn:
|
|
10496
10826
|
addListener(gina, $submit, evt, function(event) {
|
|
10497
10827
|
// start validation
|
|
10498
10828
|
cancelEvent(event);
|
|
@@ -10570,7 +10900,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10570
10900
|
triggerEvent(gina, $target, 'validate.' + _id, result)
|
|
10571
10901
|
})
|
|
10572
10902
|
}
|
|
10573
|
-
});
|
|
10903
|
+
}) });
|
|
10574
10904
|
} // EO bindSubmitEl
|
|
10575
10905
|
|
|
10576
10906
|
|
|
@@ -10671,7 +11001,8 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10671
11001
|
// policies). A preventDefault-only listener sets event.defaultPrevented exactly
|
|
10672
11002
|
// as the inline handler did, so the form-level clickProxyHandler's
|
|
10673
11003
|
// `if (event.defaultPrevented) return` guard still short-circuits identically.
|
|
10674
|
-
|
|
11004
|
+
$form.boundListeners.push({ el: $submit, evt: 'click', fn:
|
|
11005
|
+
addListener(gina, $submit, 'click', function(e) { e.preventDefault(); }) });
|
|
10675
11006
|
}
|
|
10676
11007
|
// (an existing onclick is left untouched, as before; the dead else-if append
|
|
10677
11008
|
// branch — it only mutated a local, never written back — was removed.)
|
|
@@ -10707,6 +11038,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10707
11038
|
evt = 'submit';
|
|
10708
11039
|
|
|
10709
11040
|
// submit proxy
|
|
11041
|
+
$form.boundListeners.push({ el: $target, evt: evt, fn:
|
|
10710
11042
|
addListener(gina, $target, evt, function(e) {
|
|
10711
11043
|
|
|
10712
11044
|
var $target = e.target
|
|
@@ -10960,7 +11292,7 @@ function ValidatorPlugin(rules, data, formId, culture) {
|
|
|
10960
11292
|
// }
|
|
10961
11293
|
})
|
|
10962
11294
|
}
|
|
10963
|
-
});
|
|
11295
|
+
}) });
|
|
10964
11296
|
|
|
10965
11297
|
|
|
10966
11298
|
|