django-handyhelpers 0.3.20__py3-none-any.whl → 0.3.36__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.36.dist-info}/METADATA +16 -6
- {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.36.dist-info}/RECORD +562 -75
- {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.36.dist-info}/WHEEL +1 -1
- handyhelpers/__init__.py +6 -6
- handyhelpers/forms.py +9 -1
- handyhelpers/mixins/form_mixins.py +61 -0
- handyhelpers/mixins/model_mixins.py +21 -0
- handyhelpers/mixins/serializer_mixins.py +35 -0
- handyhelpers/mixins/view_mixins.py +5 -2
- handyhelpers/serializers.py +23 -3
- handyhelpers/static/handyhelpers/css/table_sortable.css +17 -0
- handyhelpers/static/handyhelpers/js/sidebar.js +8 -4
- handyhelpers/static/handyhelpers/js/table_sortable.js +119 -0
- handyhelpers/static/node_modules/.bin/acorn +4 -0
- handyhelpers/static/node_modules/.bin/css-b64-images +13 -0
- handyhelpers/static/node_modules/.bin/esbuild +0 -0
- handyhelpers/static/node_modules/.bin/html-minifier-terser +308 -0
- handyhelpers/static/node_modules/.bin/minify +98 -0
- handyhelpers/static/node_modules/.bin/terser +21 -0
- handyhelpers/static/node_modules/.bin/uglifyjs +624 -0
- handyhelpers/static/node_modules/.package-lock.json +750 -0
- handyhelpers/static/node_modules/@esbuild/linux-x64/README.md +3 -0
- handyhelpers/static/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- handyhelpers/static/node_modules/@esbuild/linux-x64/package.json +20 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/LICENSE +19 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/README.md +227 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +230 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js +246 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +88 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +12 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts +36 -0
- handyhelpers/static/node_modules/@jridgewell/gen-mapping/package.json +76 -0
- handyhelpers/static/node_modules/@jridgewell/resolve-uri/LICENSE +19 -0
- handyhelpers/static/node_modules/@jridgewell/resolve-uri/README.md +40 -0
- handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +232 -0
- handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +240 -0
- handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +4 -0
- handyhelpers/static/node_modules/@jridgewell/resolve-uri/package.json +69 -0
- handyhelpers/static/node_modules/@jridgewell/set-array/LICENSE +19 -0
- handyhelpers/static/node_modules/@jridgewell/set-array/README.md +37 -0
- handyhelpers/static/node_modules/@jridgewell/set-array/dist/set-array.mjs +69 -0
- handyhelpers/static/node_modules/@jridgewell/set-array/dist/set-array.mjs.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js +83 -0
- handyhelpers/static/node_modules/@jridgewell/set-array/dist/set-array.umd.js.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/set-array/dist/types/set-array.d.ts +32 -0
- handyhelpers/static/node_modules/@jridgewell/set-array/package.json +65 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/LICENSE +19 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/README.md +184 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.cjs +95 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.cjs.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.mjs +90 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.mjs.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js +1242 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/dist/source-map.umd.js.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/dist/types/source-map.d.ts +35 -0
- handyhelpers/static/node_modules/@jridgewell/source-map/package.json +71 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/LICENSE +21 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/README.md +264 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +424 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +439 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts +49 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts +8 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts +15 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts +6 -0
- handyhelpers/static/node_modules/@jridgewell/sourcemap-codec/package.json +75 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/LICENSE +19 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/README.md +257 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +580 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +600 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +1 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +8 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +32 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +7 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +1 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +2 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +4 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +79 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +99 -0
- handyhelpers/static/node_modules/@jridgewell/trace-mapping/package.json +77 -0
- handyhelpers/static/node_modules/@popperjs/core/dist/cjs/enums.js +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper-base.js +12 -170
- handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper-base.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper-lite.js +14 -184
- handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper-lite.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper.js +14 -197
- handyhelpers/static/node_modules/@popperjs/core/dist/cjs/popper.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/esm/createPopper.js +6 -66
- handyhelpers/static/node_modules/@popperjs/core/dist/esm/modifiers/arrow.js +1 -12
- handyhelpers/static/node_modules/@popperjs/core/dist/esm/modifiers/computeStyles.js +2 -14
- handyhelpers/static/node_modules/@popperjs/core/dist/esm/utils/computeAutoPlacement.js +0 -4
- handyhelpers/static/node_modules/@popperjs/core/dist/esm/utils/userAgent.js +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/enums.js +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/enums.min.js +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-base.js +12 -170
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-base.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-base.min.js +2 -2
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-base.min.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-lite.js +14 -184
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-lite.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-lite.min.js +2 -2
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper-lite.min.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper.js +14 -197
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper.min.js +2 -2
- handyhelpers/static/node_modules/@popperjs/core/dist/umd/popper.min.js.map +1 -1
- handyhelpers/static/node_modules/@popperjs/core/lib/createPopper.js +6 -66
- handyhelpers/static/node_modules/@popperjs/core/lib/createPopper.js.flow +2 -80
- handyhelpers/static/node_modules/@popperjs/core/lib/modifiers/arrow.js +1 -12
- handyhelpers/static/node_modules/@popperjs/core/lib/modifiers/arrow.js.flow +0 -22
- handyhelpers/static/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +2 -14
- handyhelpers/static/node_modules/@popperjs/core/lib/modifiers/computeStyles.js.flow +3 -33
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +0 -4
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js.flow +0 -12
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/userAgent.js +1 -1
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/userAgent.js.flow +1 -1
- handyhelpers/static/node_modules/@popperjs/core/package.json +1 -1
- handyhelpers/static/node_modules/@putout/minify/LICENSE +21 -0
- handyhelpers/static/node_modules/@putout/minify/README.md +110 -0
- handyhelpers/static/node_modules/@putout/minify/bundle/minify.min.js +52 -0
- handyhelpers/static/node_modules/@putout/minify/package.json +112 -0
- handyhelpers/static/node_modules/@swc/core/Visitor.d.ts +218 -0
- handyhelpers/static/node_modules/@swc/core/Visitor.js +1407 -0
- handyhelpers/static/node_modules/@swc/core/binding.d.ts +56 -0
- handyhelpers/static/node_modules/@swc/core/binding.js +351 -0
- handyhelpers/static/node_modules/@swc/core/index.d.ts +118 -0
- handyhelpers/static/node_modules/@swc/core/index.js +439 -0
- handyhelpers/static/node_modules/@swc/core/package.json +114 -0
- handyhelpers/static/node_modules/@swc/core/postinstall.js +148 -0
- handyhelpers/static/node_modules/@swc/core/spack.d.ts +51 -0
- handyhelpers/static/node_modules/@swc/core/spack.js +87 -0
- handyhelpers/static/node_modules/@swc/core/util.d.ts +1 -0
- handyhelpers/static/node_modules/@swc/core/util.js +104 -0
- handyhelpers/static/node_modules/@swc/core-linux-x64-gnu/README.md +3 -0
- handyhelpers/static/node_modules/@swc/core-linux-x64-gnu/package.json +45 -0
- handyhelpers/static/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
- handyhelpers/static/node_modules/@swc/counter/CHANGELOG.md +7 -0
- handyhelpers/static/node_modules/@swc/counter/README.md +7 -0
- handyhelpers/static/node_modules/@swc/counter/index.js +1 -0
- handyhelpers/static/node_modules/@swc/counter/package.json +27 -0
- handyhelpers/static/node_modules/@swc/types/LICENSE +201 -0
- handyhelpers/static/node_modules/@swc/types/README.md +4 -0
- handyhelpers/static/node_modules/@swc/types/assumptions.d.ts +92 -0
- handyhelpers/static/node_modules/@swc/types/assumptions.js +2 -0
- handyhelpers/static/node_modules/@swc/types/index.d.ts +1977 -0
- handyhelpers/static/node_modules/@swc/types/index.js +2 -0
- handyhelpers/static/node_modules/@swc/types/package.json +39 -0
- handyhelpers/static/node_modules/acorn/CHANGELOG.md +928 -0
- handyhelpers/static/node_modules/acorn/LICENSE +21 -0
- handyhelpers/static/node_modules/acorn/README.md +282 -0
- handyhelpers/static/node_modules/acorn/bin/acorn +4 -0
- handyhelpers/static/node_modules/acorn/dist/acorn.d.mts +866 -0
- handyhelpers/static/node_modules/acorn/dist/acorn.d.ts +866 -0
- handyhelpers/static/node_modules/acorn/dist/acorn.js +6174 -0
- handyhelpers/static/node_modules/acorn/dist/acorn.mjs +6145 -0
- handyhelpers/static/node_modules/acorn/dist/bin.js +90 -0
- handyhelpers/static/node_modules/acorn/package.json +50 -0
- handyhelpers/static/node_modules/buffer-from/LICENSE +21 -0
- handyhelpers/static/node_modules/buffer-from/index.js +72 -0
- handyhelpers/static/node_modules/buffer-from/package.json +19 -0
- handyhelpers/static/node_modules/buffer-from/readme.md +69 -0
- handyhelpers/static/node_modules/camel-case/LICENSE +21 -0
- handyhelpers/static/node_modules/camel-case/README.md +47 -0
- handyhelpers/static/node_modules/camel-case/dist/index.d.ts +5 -0
- handyhelpers/static/node_modules/camel-case/dist/index.js +23 -0
- handyhelpers/static/node_modules/camel-case/dist/index.js.map +1 -0
- handyhelpers/static/node_modules/camel-case/dist/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/camel-case/dist/index.spec.js +26 -0
- handyhelpers/static/node_modules/camel-case/dist/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/camel-case/dist.es2015/index.d.ts +5 -0
- handyhelpers/static/node_modules/camel-case/dist.es2015/index.js +17 -0
- handyhelpers/static/node_modules/camel-case/dist.es2015/index.js.map +1 -0
- handyhelpers/static/node_modules/camel-case/dist.es2015/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/camel-case/dist.es2015/index.spec.js +24 -0
- handyhelpers/static/node_modules/camel-case/dist.es2015/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/camel-case/package.json +89 -0
- handyhelpers/static/node_modules/clean-css/History.md +1504 -0
- handyhelpers/static/node_modules/clean-css/LICENSE +19 -0
- handyhelpers/static/node_modules/clean-css/README.md +987 -0
- handyhelpers/static/node_modules/clean-css/index.js +1 -0
- handyhelpers/static/node_modules/clean-css/package.json +48 -0
- handyhelpers/static/node_modules/commander/LICENSE +22 -0
- handyhelpers/static/node_modules/commander/Readme.md +1134 -0
- handyhelpers/static/node_modules/commander/esm.mjs +16 -0
- handyhelpers/static/node_modules/commander/index.js +27 -0
- handyhelpers/static/node_modules/commander/package-support.json +16 -0
- handyhelpers/static/node_modules/commander/package.json +80 -0
- handyhelpers/static/node_modules/commander/typings/index.d.ts +889 -0
- handyhelpers/static/node_modules/css-b64-images/.npmignore +15 -0
- handyhelpers/static/node_modules/css-b64-images/.travis.yml +5 -0
- handyhelpers/static/node_modules/css-b64-images/README.md +78 -0
- handyhelpers/static/node_modules/css-b64-images/bin/css-b64-images +13 -0
- handyhelpers/static/node_modules/css-b64-images/draft.png +0 -0
- handyhelpers/static/node_modules/css-b64-images/draft.xcf +0 -0
- handyhelpers/static/node_modules/css-b64-images/package.json +30 -0
- handyhelpers/static/node_modules/css-b64-images/test/css-b64-images-test.js +38 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/css/style.css +52 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/callunasansregular-webfont.eot +0 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/callunasansregular-webfont.svg +248 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/callunasansregular-webfont.ttf +0 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/callunasansregular-webfont.woff +0 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/maven_pro_medium-webfont.eot +0 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/maven_pro_medium-webfont.svg +245 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/maven_pro_medium-webfont.ttf +0 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/fonts/maven_pro_medium-webfont.woff +0 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/img/background-pattern.gif +0 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/img/dots.svg +6 -0
- handyhelpers/static/node_modules/css-b64-images/test/fixture/img/mixit-banner.png +0 -0
- handyhelpers/static/node_modules/debug/LICENSE +20 -0
- handyhelpers/static/node_modules/debug/README.md +481 -0
- handyhelpers/static/node_modules/debug/package.json +65 -0
- handyhelpers/static/node_modules/debug/src/browser.js +272 -0
- handyhelpers/static/node_modules/debug/src/common.js +292 -0
- handyhelpers/static/node_modules/debug/src/index.js +10 -0
- handyhelpers/static/node_modules/debug/src/node.js +263 -0
- handyhelpers/static/node_modules/dot-case/LICENSE +21 -0
- handyhelpers/static/node_modules/dot-case/README.md +37 -0
- handyhelpers/static/node_modules/dot-case/dist/index.d.ts +3 -0
- handyhelpers/static/node_modules/dot-case/dist/index.js +11 -0
- handyhelpers/static/node_modules/dot-case/dist/index.js.map +1 -0
- handyhelpers/static/node_modules/dot-case/dist/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/dot-case/dist/index.spec.js +26 -0
- handyhelpers/static/node_modules/dot-case/dist/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/dot-case/dist.es2015/index.d.ts +3 -0
- handyhelpers/static/node_modules/dot-case/dist.es2015/index.js +7 -0
- handyhelpers/static/node_modules/dot-case/dist.es2015/index.js.map +1 -0
- handyhelpers/static/node_modules/dot-case/dist.es2015/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/dot-case/dist.es2015/index.spec.js +24 -0
- handyhelpers/static/node_modules/dot-case/dist.es2015/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/dot-case/package.json +89 -0
- handyhelpers/static/node_modules/entities/LICENSE +11 -0
- handyhelpers/static/node_modules/entities/package.json +90 -0
- handyhelpers/static/node_modules/entities/readme.md +122 -0
- handyhelpers/static/node_modules/esbuild/LICENSE.md +21 -0
- handyhelpers/static/node_modules/esbuild/README.md +3 -0
- handyhelpers/static/node_modules/esbuild/bin/esbuild +0 -0
- handyhelpers/static/node_modules/esbuild/install.js +286 -0
- handyhelpers/static/node_modules/esbuild/package.json +47 -0
- handyhelpers/static/node_modules/find-up/index.d.ts +247 -0
- handyhelpers/static/node_modules/find-up/index.js +107 -0
- handyhelpers/static/node_modules/find-up/license +9 -0
- handyhelpers/static/node_modules/find-up/package.json +61 -0
- handyhelpers/static/node_modules/find-up/readme.md +160 -0
- handyhelpers/static/node_modules/fun-effects/LICENSE +674 -0
- handyhelpers/static/node_modules/fun-effects/README.md +10 -0
- handyhelpers/static/node_modules/fun-effects/dist/css/background_icons.min.css +1 -0
- handyhelpers/static/node_modules/fun-effects/dist/css/blur_group.min.css +1 -0
- handyhelpers/static/node_modules/fun-effects/dist/css/fades.min.css +1 -0
- handyhelpers/static/node_modules/fun-effects/dist/css/marquee.min.css +1 -0
- handyhelpers/static/node_modules/fun-effects/dist/css/scroller.min.css +1 -0
- handyhelpers/static/node_modules/fun-effects/dist/index.js +15 -0
- handyhelpers/static/node_modules/fun-effects/dist/js/background_icons.min.js +1 -0
- handyhelpers/static/node_modules/fun-effects/dist/js/marquee.min.js +1 -0
- handyhelpers/static/node_modules/fun-effects/dist/js/scroller.min.js +1 -0
- handyhelpers/static/node_modules/fun-effects/package.json +39 -0
- handyhelpers/static/node_modules/fun-effects/src/css/background_icons.css +39 -0
- handyhelpers/static/node_modules/fun-effects/src/css/blur_group.css +22 -0
- handyhelpers/static/node_modules/fun-effects/src/css/fades.css +94 -0
- handyhelpers/static/node_modules/fun-effects/src/css/marquee.css +45 -0
- handyhelpers/static/node_modules/fun-effects/src/css/scroller.css +144 -0
- handyhelpers/static/node_modules/fun-effects/src/index.js +15 -0
- handyhelpers/static/node_modules/fun-effects/src/js/background_icons.js +101 -0
- handyhelpers/static/node_modules/fun-effects/src/js/marquee.js +81 -0
- handyhelpers/static/node_modules/fun-effects/src/js/scroller.js +37 -0
- handyhelpers/static/node_modules/html-minifier-terser/LICENSE +22 -0
- handyhelpers/static/node_modules/html-minifier-terser/README.md +168 -0
- handyhelpers/static/node_modules/html-minifier-terser/cli.js +308 -0
- handyhelpers/static/node_modules/html-minifier-terser/dist/htmlminifier.cjs +1857 -0
- handyhelpers/static/node_modules/html-minifier-terser/dist/htmlminifier.esm.bundle.js +57509 -0
- handyhelpers/static/node_modules/html-minifier-terser/dist/htmlminifier.umd.bundle.js +57520 -0
- handyhelpers/static/node_modules/html-minifier-terser/dist/htmlminifier.umd.bundle.min.js +9 -0
- handyhelpers/static/node_modules/html-minifier-terser/package.json +105 -0
- handyhelpers/static/node_modules/html-minifier-terser/src/htmlminifier.js +1366 -0
- handyhelpers/static/node_modules/html-minifier-terser/src/htmlparser.js +565 -0
- handyhelpers/static/node_modules/html-minifier-terser/src/tokenchain.js +68 -0
- handyhelpers/static/node_modules/html-minifier-terser/src/utils.js +11 -0
- handyhelpers/static/node_modules/jju/LICENSE +21 -0
- handyhelpers/static/node_modules/jju/Makefile +20 -0
- handyhelpers/static/node_modules/jju/README.md +249 -0
- handyhelpers/static/node_modules/jju/index.js +32 -0
- handyhelpers/static/node_modules/jju/package.json +34 -0
- handyhelpers/static/node_modules/jju/package.yaml +36 -0
- handyhelpers/static/node_modules/locate-path/index.d.ts +92 -0
- handyhelpers/static/node_modules/locate-path/index.js +77 -0
- handyhelpers/static/node_modules/locate-path/license +9 -0
- handyhelpers/static/node_modules/locate-path/package.json +48 -0
- handyhelpers/static/node_modules/locate-path/readme.md +123 -0
- handyhelpers/static/node_modules/lower-case/LICENSE +21 -0
- handyhelpers/static/node_modules/lower-case/README.md +35 -0
- handyhelpers/static/node_modules/lower-case/dist/index.d.ts +8 -0
- handyhelpers/static/node_modules/lower-case/dist/index.js +53 -0
- handyhelpers/static/node_modules/lower-case/dist/index.js.map +1 -0
- handyhelpers/static/node_modules/lower-case/dist/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/lower-case/dist/index.spec.js +36 -0
- handyhelpers/static/node_modules/lower-case/dist/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/lower-case/dist.es2015/index.d.ts +8 -0
- handyhelpers/static/node_modules/lower-case/dist.es2015/index.js +48 -0
- handyhelpers/static/node_modules/lower-case/dist.es2015/index.js.map +1 -0
- handyhelpers/static/node_modules/lower-case/dist.es2015/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/lower-case/dist.es2015/index.spec.js +34 -0
- handyhelpers/static/node_modules/lower-case/dist.es2015/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/lower-case/package.json +87 -0
- handyhelpers/static/node_modules/minify/ChangeLog +1307 -0
- handyhelpers/static/node_modules/minify/LICENSE +22 -0
- handyhelpers/static/node_modules/minify/README.md +177 -0
- handyhelpers/static/node_modules/minify/bin/minify.js +98 -0
- handyhelpers/static/node_modules/minify/deno.json +5 -0
- handyhelpers/static/node_modules/minify/help.json +8 -0
- handyhelpers/static/node_modules/minify/package.json +65 -0
- handyhelpers/static/node_modules/ms/index.js +162 -0
- handyhelpers/static/node_modules/ms/license.md +21 -0
- handyhelpers/static/node_modules/ms/package.json +38 -0
- handyhelpers/static/node_modules/ms/readme.md +59 -0
- handyhelpers/static/node_modules/no-case/LICENSE +21 -0
- handyhelpers/static/node_modules/no-case/README.md +37 -0
- handyhelpers/static/node_modules/no-case/dist/index.d.ts +10 -0
- handyhelpers/static/node_modules/no-case/dist/index.js +35 -0
- handyhelpers/static/node_modules/no-case/dist/index.js.map +1 -0
- handyhelpers/static/node_modules/no-case/dist/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/no-case/dist/index.spec.js +59 -0
- handyhelpers/static/node_modules/no-case/dist/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/no-case/dist.es2015/index.d.ts +10 -0
- handyhelpers/static/node_modules/no-case/dist.es2015/index.js +31 -0
- handyhelpers/static/node_modules/no-case/dist.es2015/index.js.map +1 -0
- handyhelpers/static/node_modules/no-case/dist.es2015/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/no-case/dist.es2015/index.spec.js +57 -0
- handyhelpers/static/node_modules/no-case/dist.es2015/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/no-case/package.json +85 -0
- handyhelpers/static/node_modules/p-limit/index.d.ts +40 -0
- handyhelpers/static/node_modules/p-limit/index.js +68 -0
- handyhelpers/static/node_modules/p-limit/license +9 -0
- handyhelpers/static/node_modules/p-limit/package.json +54 -0
- handyhelpers/static/node_modules/p-limit/readme.md +99 -0
- handyhelpers/static/node_modules/p-locate/index.d.ts +49 -0
- handyhelpers/static/node_modules/p-locate/index.js +48 -0
- handyhelpers/static/node_modules/p-locate/license +9 -0
- handyhelpers/static/node_modules/p-locate/package.json +56 -0
- handyhelpers/static/node_modules/p-locate/readme.md +91 -0
- handyhelpers/static/node_modules/param-case/LICENSE +21 -0
- handyhelpers/static/node_modules/param-case/README.md +37 -0
- handyhelpers/static/node_modules/param-case/dist/index.d.ts +3 -0
- handyhelpers/static/node_modules/param-case/dist/index.js +11 -0
- handyhelpers/static/node_modules/param-case/dist/index.js.map +1 -0
- handyhelpers/static/node_modules/param-case/dist/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/param-case/dist/index.spec.js +24 -0
- handyhelpers/static/node_modules/param-case/dist/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/param-case/dist.es2015/index.d.ts +3 -0
- handyhelpers/static/node_modules/param-case/dist.es2015/index.js +7 -0
- handyhelpers/static/node_modules/param-case/dist.es2015/index.js.map +1 -0
- handyhelpers/static/node_modules/param-case/dist.es2015/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/param-case/dist.es2015/index.spec.js +22 -0
- handyhelpers/static/node_modules/param-case/dist.es2015/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/param-case/package.json +91 -0
- handyhelpers/static/node_modules/pascal-case/LICENSE +21 -0
- handyhelpers/static/node_modules/pascal-case/README.md +47 -0
- handyhelpers/static/node_modules/pascal-case/dist/index.d.ts +5 -0
- handyhelpers/static/node_modules/pascal-case/dist/index.js +24 -0
- handyhelpers/static/node_modules/pascal-case/dist/index.js.map +1 -0
- handyhelpers/static/node_modules/pascal-case/dist/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/pascal-case/dist/index.spec.js +25 -0
- handyhelpers/static/node_modules/pascal-case/dist/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/pascal-case/dist.es2015/index.d.ts +5 -0
- handyhelpers/static/node_modules/pascal-case/dist.es2015/index.js +18 -0
- handyhelpers/static/node_modules/pascal-case/dist.es2015/index.js.map +1 -0
- handyhelpers/static/node_modules/pascal-case/dist.es2015/index.spec.d.ts +1 -0
- handyhelpers/static/node_modules/pascal-case/dist.es2015/index.spec.js +23 -0
- handyhelpers/static/node_modules/pascal-case/dist.es2015/index.spec.js.map +1 -0
- handyhelpers/static/node_modules/pascal-case/package.json +90 -0
- handyhelpers/static/node_modules/path-exists/index.d.ts +31 -0
- handyhelpers/static/node_modules/path-exists/index.js +19 -0
- handyhelpers/static/node_modules/path-exists/license +9 -0
- handyhelpers/static/node_modules/path-exists/package.json +41 -0
- handyhelpers/static/node_modules/path-exists/readme.md +52 -0
- handyhelpers/static/node_modules/readjson/ChangeLog +110 -0
- handyhelpers/static/node_modules/readjson/LICENSE +21 -0
- handyhelpers/static/node_modules/readjson/README.md +36 -0
- handyhelpers/static/node_modules/readjson/package.json +46 -0
- handyhelpers/static/node_modules/relateurl/README.md +159 -0
- handyhelpers/static/node_modules/relateurl/license +21 -0
- handyhelpers/static/node_modules/relateurl/package.json +46 -0
- handyhelpers/static/node_modules/simport/ChangeLog +77 -0
- handyhelpers/static/node_modules/simport/LICENSE +21 -0
- handyhelpers/static/node_modules/simport/README.md +81 -0
- handyhelpers/static/node_modules/simport/fixture/context.js +3 -0
- handyhelpers/static/node_modules/simport/fixture/default-frozen-function.mjs +2 -0
- handyhelpers/static/node_modules/simport/fixture/default-frozen-object.mjs +2 -0
- handyhelpers/static/node_modules/simport/package.json +65 -0
- handyhelpers/static/node_modules/simport/simport.js +84 -0
- handyhelpers/static/node_modules/simport/simport.mjs +22 -0
- handyhelpers/static/node_modules/source-map/CHANGELOG.md +301 -0
- handyhelpers/static/node_modules/source-map/LICENSE +28 -0
- handyhelpers/static/node_modules/source-map/README.md +742 -0
- handyhelpers/static/node_modules/source-map/dist/source-map.debug.js +3234 -0
- handyhelpers/static/node_modules/source-map/dist/source-map.js +3233 -0
- handyhelpers/static/node_modules/source-map/dist/source-map.min.js +2 -0
- handyhelpers/static/node_modules/source-map/dist/source-map.min.js.map +1 -0
- handyhelpers/static/node_modules/source-map/package.json +73 -0
- handyhelpers/static/node_modules/source-map/source-map.d.ts +98 -0
- handyhelpers/static/node_modules/source-map/source-map.js +8 -0
- handyhelpers/static/node_modules/source-map-support/LICENSE.md +21 -0
- handyhelpers/static/node_modules/source-map-support/README.md +284 -0
- handyhelpers/static/node_modules/source-map-support/browser-source-map-support.js +114 -0
- handyhelpers/static/node_modules/source-map-support/package.json +31 -0
- handyhelpers/static/node_modules/source-map-support/register-hook-require.js +1 -0
- handyhelpers/static/node_modules/source-map-support/register.js +1 -0
- handyhelpers/static/node_modules/source-map-support/source-map-support.js +625 -0
- handyhelpers/static/node_modules/terser/CHANGELOG.md +783 -0
- handyhelpers/static/node_modules/terser/LICENSE +27 -0
- handyhelpers/static/node_modules/terser/PATRONS.md +15 -0
- handyhelpers/static/node_modules/terser/README.md +1421 -0
- handyhelpers/static/node_modules/terser/bin/package.json +10 -0
- handyhelpers/static/node_modules/terser/bin/terser +21 -0
- handyhelpers/static/node_modules/terser/bin/uglifyjs +10 -0
- handyhelpers/static/node_modules/terser/dist/.gitkeep +0 -0
- handyhelpers/static/node_modules/terser/dist/bundle.min.js +32962 -0
- handyhelpers/static/node_modules/terser/dist/package.json +10 -0
- handyhelpers/static/node_modules/terser/main.js +27 -0
- handyhelpers/static/node_modules/terser/node_modules/commander/CHANGELOG.md +419 -0
- handyhelpers/static/node_modules/terser/node_modules/commander/LICENSE +22 -0
- handyhelpers/static/node_modules/terser/node_modules/commander/Readme.md +428 -0
- handyhelpers/static/node_modules/terser/node_modules/commander/index.js +1224 -0
- handyhelpers/static/node_modules/terser/node_modules/commander/package.json +38 -0
- handyhelpers/static/node_modules/terser/node_modules/commander/typings/index.d.ts +310 -0
- handyhelpers/static/node_modules/terser/package.json +153 -0
- handyhelpers/static/node_modules/terser/tools/domprops.js +9026 -0
- handyhelpers/static/node_modules/terser/tools/exit.cjs +7 -0
- handyhelpers/static/node_modules/terser/tools/props.html +68 -0
- handyhelpers/static/node_modules/terser/tools/terser.d.ts +216 -0
- handyhelpers/static/node_modules/tippy.js/LICENSE +21 -0
- handyhelpers/static/node_modules/tippy.js/README.md +63 -0
- handyhelpers/static/node_modules/tippy.js/animations/perspective-extreme.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/perspective-subtle.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/perspective.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/scale-extreme.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/scale-subtle.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/scale.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/shift-away-extreme.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/shift-away-subtle.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/shift-away.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/shift-toward-extreme.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/shift-toward-subtle.css +1 -0
- handyhelpers/static/node_modules/tippy.js/animations/shift-toward.css +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/backdrop.css +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/border.css +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/svg-arrow.css +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy-bundle.umd.js +2516 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy-bundle.umd.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy-bundle.umd.min.js +2 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy-bundle.umd.min.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.cjs.js +2497 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.cjs.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.css +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.esm.js +2486 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.esm.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.umd.js +2496 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.umd.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.umd.min.js +2 -0
- handyhelpers/static/node_modules/tippy.js/dist/tippy.umd.min.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.cjs.js +2388 -0
- handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.cjs.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.esm.js +2377 -0
- handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.esm.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.umd.js +2382 -0
- handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.umd.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.umd.min.js +2 -0
- handyhelpers/static/node_modules/tippy.js/headless/dist/tippy-headless.umd.min.js.map +1 -0
- handyhelpers/static/node_modules/tippy.js/headless/package.json +16 -0
- handyhelpers/static/node_modules/tippy.js/index.d.ts +260 -0
- handyhelpers/static/node_modules/tippy.js/package.json +157 -0
- handyhelpers/static/node_modules/tippy.js/themes/light-border.css +1 -0
- handyhelpers/static/node_modules/tippy.js/themes/light.css +1 -0
- handyhelpers/static/node_modules/tippy.js/themes/material.css +1 -0
- handyhelpers/static/node_modules/tippy.js/themes/translucent.css +1 -0
- handyhelpers/static/node_modules/try-catch/ChangeLog +55 -0
- handyhelpers/static/node_modules/try-catch/LICENSE +21 -0
- handyhelpers/static/node_modules/try-catch/README.md +38 -0
- handyhelpers/static/node_modules/try-catch/package.json +34 -0
- handyhelpers/static/node_modules/try-to-catch/ChangeLog +64 -0
- handyhelpers/static/node_modules/try-to-catch/LICENSE +21 -0
- handyhelpers/static/node_modules/try-to-catch/README.md +74 -0
- handyhelpers/static/node_modules/try-to-catch/package.json +47 -0
- handyhelpers/static/node_modules/tslib/CopyrightNotice.txt +15 -0
- handyhelpers/static/node_modules/tslib/LICENSE.txt +12 -0
- handyhelpers/static/node_modules/tslib/README.md +164 -0
- handyhelpers/static/node_modules/tslib/SECURITY.md +41 -0
- handyhelpers/static/node_modules/tslib/modules/index.d.ts +38 -0
- handyhelpers/static/node_modules/tslib/modules/index.js +70 -0
- handyhelpers/static/node_modules/tslib/modules/package.json +3 -0
- handyhelpers/static/node_modules/tslib/package.json +47 -0
- handyhelpers/static/node_modules/tslib/tslib.d.ts +460 -0
- handyhelpers/static/node_modules/tslib/tslib.es6.html +1 -0
- handyhelpers/static/node_modules/tslib/tslib.es6.js +402 -0
- handyhelpers/static/node_modules/tslib/tslib.es6.mjs +401 -0
- handyhelpers/static/node_modules/tslib/tslib.html +1 -0
- handyhelpers/static/node_modules/tslib/tslib.js +484 -0
- handyhelpers/static/node_modules/uglify-js/LICENSE +29 -0
- handyhelpers/static/node_modules/uglify-js/README.md +1479 -0
- handyhelpers/static/node_modules/uglify-js/bin/uglifyjs +624 -0
- handyhelpers/static/node_modules/uglify-js/package.json +56 -0
- handyhelpers/static/node_modules/uglify-js/tools/domprops.html +456 -0
- handyhelpers/static/node_modules/uglify-js/tools/domprops.json +8327 -0
- handyhelpers/static/node_modules/uglify-js/tools/exports.js +8 -0
- handyhelpers/static/node_modules/uglify-js/tools/node.js +115 -0
- handyhelpers/static/node_modules/uglify-js/tools/tty.js +22 -0
- handyhelpers/static/node_modules/unicorn-magic/default.js +14 -0
- handyhelpers/static/node_modules/unicorn-magic/index.d.ts +29 -0
- handyhelpers/static/node_modules/unicorn-magic/license +9 -0
- handyhelpers/static/node_modules/unicorn-magic/node.js +7 -0
- handyhelpers/static/node_modules/unicorn-magic/package.json +49 -0
- handyhelpers/static/node_modules/unicorn-magic/readme.md +25 -0
- handyhelpers/static/node_modules/yocto-queue/index.d.ts +61 -0
- handyhelpers/static/node_modules/yocto-queue/index.js +78 -0
- handyhelpers/static/node_modules/yocto-queue/license +9 -0
- handyhelpers/static/node_modules/yocto-queue/package.json +48 -0
- handyhelpers/static/node_modules/yocto-queue/readme.md +70 -0
- handyhelpers/static/package.json +3 -1
- handyhelpers/static/yarn.lock +393 -20
- handyhelpers/templates/handyhelpers/generic/bs5/generic_index.html +5 -8
- handyhelpers/templates/handyhelpers/handyhelpers_base_bs5.htm +5 -1
- handyhelpers/templates/handyhelpers/handyhelpers_with_sidebar.htm +50 -3
- handyhelpers/templates/handyhelpers/htmx/bs5/filter_form/generic_modal_swap.htm +48 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/form/form_wrapper.htm +48 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/form/inline_form.htm +166 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/form/inline_form_disabled.htm +125 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/generic_modal_swap.htm +2 -3
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/content_title.htm +38 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/controls.htm +21 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/examples/card.htm +17 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/examples/list.htm +11 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/examples/table.htm +21 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/filter_form_modal_swap.htm +48 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/full.html +6 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/wrapper_card.htm +7 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/wrapper_list.htm +7 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/wrapper_minimal.htm +7 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/htmx_option_multi_filter_view/wrapper_table.htm +18 -0
- handyhelpers/templates/handyhelpers/htmx/bs5/index.htm +34 -0
- handyhelpers/templates/handyhelpers/report/annual_stats.html +6 -0
- handyhelpers/templates/handyhelpers/report/annual_stats_content.htm +43 -0
- handyhelpers/templates/handyhelpers/report/chartjs/annual_progress_chart.htm +1 -1
- handyhelpers/templates/handyhelpers/report/chartjs/annual_progress_content.htm +40 -39
- handyhelpers/templates/handyhelpers/report/chartjs/annual_stats.html +25 -36
- handyhelpers/templates/handyhelpers/report/chartjs/annual_trends_content.htm +35 -34
- handyhelpers/templates/handyhelpers/report/chartjs/day_count_chart.htm +1 -1
- handyhelpers/templates/handyhelpers/report/chartjs/month_count_chart.htm +1 -1
- handyhelpers/templates/handyhelpers/report/chartjs/week_count_chart.htm +1 -1
- handyhelpers/templates/handyhelpers/report/chartjs/year_count_chart.htm +1 -1
- handyhelpers/templatetags/form_tags.py +47 -0
- handyhelpers/templatetags/htmx_tags.py +21 -0
- handyhelpers/views/action.py +3 -1
- handyhelpers/views/calendar.py +33 -14
- handyhelpers/views/htmx.py +396 -4
- handyhelpers/views/report.py +12 -5
- handyhelpers/management/commands/generate_admin.py +0 -110
- handyhelpers/static/node_modules/@popperjs/core/dist/esm/utils/format.js +0 -9
- handyhelpers/static/node_modules/@popperjs/core/dist/esm/utils/validateModifiers.js +0 -81
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/format.d.ts +0 -1
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/format.js +0 -9
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/format.js.flow +0 -5
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/validateModifiers.d.ts +0 -1
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/validateModifiers.js +0 -81
- handyhelpers/static/node_modules/@popperjs/core/lib/utils/validateModifiers.js.flow +0 -151
- {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.36.dist-info}/LICENSE +0 -0
- {django_handyhelpers-0.3.20.dist-info → django_handyhelpers-0.3.36.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
document.addEventListener('DOMContentLoaded', function() {
|
2
|
+
const scrollers = document.querySelectorAll(".scroller");
|
3
|
+
|
4
|
+
// If a user hasn't opted in for reduced motion, then we add the animation
|
5
|
+
if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
6
|
+
addAnimation();
|
7
|
+
}
|
8
|
+
|
9
|
+
function addAnimation() {
|
10
|
+
scrollers.forEach((scroller) => {
|
11
|
+
// add data-animated="true" to every `.scroller` on the page
|
12
|
+
scroller.setAttribute("data-animated", true);
|
13
|
+
|
14
|
+
// Make an array from the elements within `.scroller-inner`
|
15
|
+
const scrollerInner = scroller.querySelector(".scroller__inner");
|
16
|
+
const scrollerContent = Array.from(scrollerInner.children);
|
17
|
+
|
18
|
+
// For each item in the array, clone it
|
19
|
+
// add aria-hidden to it
|
20
|
+
// add it into the `.scroller-inner`
|
21
|
+
scrollerContent.forEach((item) => {
|
22
|
+
const duplicatedItem = item.cloneNode(true);
|
23
|
+
duplicatedItem.setAttribute("aria-hidden", true);
|
24
|
+
scrollerInner.appendChild(duplicatedItem);
|
25
|
+
});
|
26
|
+
|
27
|
+
// Add event listeners to pause/resume animation on hover
|
28
|
+
scrollerInner.addEventListener('mouseenter', () => {
|
29
|
+
scrollerInner.setAttribute('paused', '');
|
30
|
+
});
|
31
|
+
|
32
|
+
scrollerInner.addEventListener('mouseleave', () => {
|
33
|
+
scrollerInner.removeAttribute('paused');
|
34
|
+
});
|
35
|
+
});
|
36
|
+
}
|
37
|
+
});
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2010-2019 Juriy "kangax" Zaytsev
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# HTMLMinifier
|
2
|
+
|
3
|
+
[![NPM version](https://img.shields.io/npm/v/html-minifier-terser.svg)](https://www.npmjs.com/package/html-minifier-terser)
|
4
|
+
[![Build Status](https://github.com/terser/html-minifier-terser/workflows/CI/badge.svg)](https://github.com/terser/html-minifier-terser/actions?workflow=CI)
|
5
|
+
|
6
|
+
[HTMLMinifier](https://terser.org/html-minifier-terser/) is a highly **configurable**, **well-tested**, JavaScript-based HTML minifier.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
From NPM for use as a command line app:
|
11
|
+
|
12
|
+
```shell
|
13
|
+
npm install html-minifier-terser -g
|
14
|
+
```
|
15
|
+
|
16
|
+
From NPM for programmatic use:
|
17
|
+
|
18
|
+
```shell
|
19
|
+
npm install html-minifier-terser
|
20
|
+
```
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
**Note** that almost all options are disabled by default. Experiment and find what works best for you and your project.
|
25
|
+
|
26
|
+
For command line usage please see `html-minifier-terser --help` for a list of available options.
|
27
|
+
|
28
|
+
**Sample command line:**
|
29
|
+
|
30
|
+
```bash
|
31
|
+
html-minifier-terser --collapse-whitespace --remove-comments --minify-js true
|
32
|
+
```
|
33
|
+
|
34
|
+
### Node.js
|
35
|
+
|
36
|
+
```js
|
37
|
+
const { minify } = require('html-minifier-terser');
|
38
|
+
|
39
|
+
const result = await minify('<p title="blah" id="moo">foo</p>', {
|
40
|
+
removeAttributeQuotes: true,
|
41
|
+
});
|
42
|
+
result; // '<p title=blah id=moo>foo</p>'
|
43
|
+
```
|
44
|
+
|
45
|
+
See [corresponding blog post](http://perfectionkills.com/experimenting-with-html-minifier) for all the gory details of [how it works](http://perfectionkills.com/experimenting-with-html-minifier#how_it_works), [description of each option](http://perfectionkills.com/experimenting-with-html-minifier#options), [testing results](http://perfectionkills.com/experimenting-with-html-minifier#field_testing) and [conclusions](http://perfectionkills.com/experimenting-with-html-minifier#cost_and_benefits).
|
46
|
+
|
47
|
+
Also see corresponding [Ruby wrapper](https://github.com/stereobooster/html_minifier), and for Node.js, [Grunt plugin](https://github.com/gruntjs/grunt-contrib-htmlmin), [Gulp plugin](https://github.com/pioug/gulp-html-minifier-terser), [Koa middleware wrapper](https://github.com/koajs/html-minifier) and [Express middleware wrapper](https://github.com/melonmanchan/express-minify-html).
|
48
|
+
|
49
|
+
For lint-like capabilities take a look at [HTMLLint](https://github.com/kangax/html-lint).
|
50
|
+
|
51
|
+
## Minification comparison
|
52
|
+
|
53
|
+
How does HTMLMinifier compare to other solutions — [HTML Minifier from Will Peavy](http://www.willpeavy.com/minifier/) (1st result in [Google search for "html minifier"](https://www.google.com/#q=html+minifier)) as well as [htmlcompressor.com](http://htmlcompressor.com) and [minimize](https://github.com/Swaagie/minimize)?
|
54
|
+
|
55
|
+
| Site | Original size *(KB)* | HTMLMinifier | minimize | Will Peavy | htmlcompressor.com |
|
56
|
+
| ---------------------------------------------------------------------------- |:--------------------:| ------------:| --------:| ----------:| ------------------:|
|
57
|
+
| [Google](https://www.google.com/) | 52 | **48** | 52 | 54 | n/a |
|
58
|
+
| [Stack Overflow](https://stackoverflow.com/) | 177 | **143** | 154 | 154 | n/a |
|
59
|
+
| [HTMLMinifier](https://github.com/kangax/html-minifier) | 252 | **171** | 230 | 250 | n/a |
|
60
|
+
| [Bootstrap CSS](https://getbootstrap.com/docs/3.3/css/) | 271 | **260** | 269 | 229 | n/a |
|
61
|
+
| [BBC](https://www.bbc.co.uk/) | 355 | **324** | 353 | 344 | n/a |
|
62
|
+
| [Amazon](https://www.amazon.co.uk/) | 466 | **430** | 456 | 474 | n/a |
|
63
|
+
| [Twitter](https://twitter.com/) | 469 | **394** | 462 | 513 | n/a |
|
64
|
+
| [Wikipedia](https://en.wikipedia.org/wiki/President_of_the_United_States) | 703 | **569** | 682 | 708 | n/a |
|
65
|
+
| [Eloquent Javascript](https://eloquentjavascript.net/1st_edition/print.html) | 870 | **815** | 840 | 864 | n/a |
|
66
|
+
| [NBC](https://www.nbc.com/) | 1701 | **1566** | 1689 | 1705 | n/a |
|
67
|
+
| [New York Times](https://www.nytimes.com/) | 1731 | **1583** | 1726 | 1680 | n/a |
|
68
|
+
| [ES draft](https://tc39.github.io/ecma262/) | 6296 | **5538** | 5733 | n/a | n/a |
|
69
|
+
|
70
|
+
## Options Quick Reference
|
71
|
+
|
72
|
+
Most of the options are disabled by default.
|
73
|
+
|
74
|
+
| Option | Description | Default |
|
75
|
+
|--------------------------------|-----------------|---------|
|
76
|
+
| `caseSensitive` | Treat attributes in case sensitive manner (useful for custom HTML tags) | `false` |
|
77
|
+
| `collapseBooleanAttributes` | [Omit attribute values from boolean attributes](http://perfectionkills.com/experimenting-with-html-minifier#collapse_boolean_attributes) | `false` |
|
78
|
+
| `collapseInlineTagWhitespace` | Don't leave any spaces between `display:inline;` elements when collapsing. Must be used in conjunction with `collapseWhitespace=true` | `false` |
|
79
|
+
| `collapseWhitespace` | [Collapse white space that contributes to text nodes in a document tree](http://perfectionkills.com/experimenting-with-html-minifier#collapse_whitespace) | `false` |
|
80
|
+
| `conservativeCollapse` | Always collapse to 1 space (never remove it entirely). Must be used in conjunction with `collapseWhitespace=true` | `false` |
|
81
|
+
| `continueOnParseError` | [Handle parse errors](https://html.spec.whatwg.org/multipage/parsing.html#parse-errors) instead of aborting. | `false` |
|
82
|
+
| `customAttrAssign` | Arrays of regex'es that allow to support custom attribute assign expressions (e.g. `'<div flex?="{{mode != cover}}"></div>'`) | `[ ]` |
|
83
|
+
| `customAttrCollapse` | Regex that specifies custom attribute to strip newlines from (e.g. `/ng-class/`) | |
|
84
|
+
| `customAttrSurround` | Arrays of regex'es that allow to support custom attribute surround expressions (e.g. `<input {{#if value}}checked="checked"{{/if}}>`) | `[ ]` |
|
85
|
+
| `customEventAttributes` | Arrays of regex'es that allow to support custom event attributes for `minifyJS` (e.g. `ng-click`) | `[ /^on[a-z]{3,}$/ ]` |
|
86
|
+
| `decodeEntities` | Use direct Unicode characters whenever possible | `false` |
|
87
|
+
| `html5` | Parse input according to HTML5 specifications | `true` |
|
88
|
+
| `ignoreCustomComments` | Array of regex'es that allow to ignore certain comments, when matched | `[ /^!/, /^\s*#/ ]` |
|
89
|
+
| `ignoreCustomFragments` | Array of regex'es that allow to ignore certain fragments, when matched (e.g. `<?php ... ?>`, `{{ ... }}`, etc.) | `[ /<%[\s\S]*?%>/, /<\?[\s\S]*?\?>/ ]` |
|
90
|
+
| `includeAutoGeneratedTags` | Insert tags generated by HTML parser | `true` |
|
91
|
+
| `keepClosingSlash` | Keep the trailing slash on singleton elements | `false` |
|
92
|
+
| `maxLineLength` | Specify a maximum line length. Compressed output will be split by newlines at valid HTML split-points |
|
93
|
+
| `minifyCSS` | Minify CSS in style elements and style attributes (uses [clean-css](https://github.com/jakubpawlowicz/clean-css)) | `false` (could be `true`, `Object`, `Function(text, type)`) |
|
94
|
+
| `minifyJS` | Minify JavaScript in script elements and event attributes (uses [Terser](https://github.com/terser/terser)) | `false` (could be `true`, `Object`, `Function(text, inline)`) |
|
95
|
+
| `minifyURLs` | Minify URLs in various attributes (uses [relateurl](https://github.com/stevenvachon/relateurl)) | `false` (could be `String`, `Object`, `Function(text)`) |
|
96
|
+
| `noNewlinesBeforeTagClose` | Never add a newline before a tag that closes an element | `false` |
|
97
|
+
| `preserveLineBreaks` | Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break. Must be used in conjunction with `collapseWhitespace=true` | `false` |
|
98
|
+
| `preventAttributesEscaping` | Prevents the escaping of the values of attributes | `false` |
|
99
|
+
| `processConditionalComments` | Process contents of conditional comments through minifier | `false` |
|
100
|
+
| `processScripts` | Array of strings corresponding to types of script elements to process through minifier (e.g. `text/ng-template`, `text/x-handlebars-template`, etc.) | `[ ]` |
|
101
|
+
| `quoteCharacter` | Type of quote to use for attribute values (' or ") | |
|
102
|
+
| `removeAttributeQuotes` | [Remove quotes around attributes when possible](http://perfectionkills.com/experimenting-with-html-minifier#remove_attribute_quotes) | `false` |
|
103
|
+
| `removeComments` | [Strip HTML comments](http://perfectionkills.com/experimenting-with-html-minifier#remove_comments) | `false` |
|
104
|
+
| `removeEmptyAttributes` | [Remove all attributes with whitespace-only values](http://perfectionkills.com/experimenting-with-html-minifier#remove_empty_or_blank_attributes) | `false` (could be `true`, `Function(attrName, tag)`) |
|
105
|
+
| `removeEmptyElements` | [Remove all elements with empty contents](http://perfectionkills.com/experimenting-with-html-minifier#remove_empty_elements) | `false` |
|
106
|
+
| `removeOptionalTags` | [Remove optional tags](http://perfectionkills.com/experimenting-with-html-minifier#remove_optional_tags) | `false` |
|
107
|
+
| `removeRedundantAttributes` | [Remove attributes when value matches default.](http://perfectionkills.com/experimenting-with-html-minifier#remove_redundant_attributes) | `false` |
|
108
|
+
| `removeScriptTypeAttributes` | Remove `type="text/javascript"` from `script` tags. Other `type` attribute values are left intact | `false` |
|
109
|
+
| `removeStyleLinkTypeAttributes`| Remove `type="text/css"` from `style` and `link` tags. Other `type` attribute values are left intact | `false` |
|
110
|
+
| `removeTagWhitespace` | Remove space between attributes whenever possible. **Note that this will result in invalid HTML!** | `false` |
|
111
|
+
| `sortAttributes` | [Sort attributes by frequency](#sorting-attributes--style-classes) | `false` |
|
112
|
+
| `sortClassName` | [Sort style classes by frequency](#sorting-attributes--style-classes) | `false` |
|
113
|
+
| `trimCustomFragments` | Trim white space around `ignoreCustomFragments`. | `false` |
|
114
|
+
| `useShortDoctype` | [Replaces the `doctype` with the short (HTML5) doctype](http://perfectionkills.com/experimenting-with-html-minifier#use_short_doctype) | `false` |
|
115
|
+
|
116
|
+
### Sorting attributes / style classes
|
117
|
+
|
118
|
+
Minifier options like `sortAttributes` and `sortClassName` won't impact the plain-text size of the output. However, they form long repetitive chains of characters that should improve compression ratio of gzip used in HTTP compression.
|
119
|
+
|
120
|
+
## Special cases
|
121
|
+
|
122
|
+
### Ignoring chunks of markup
|
123
|
+
|
124
|
+
If you have chunks of markup you would like preserved, you can wrap them `<!-- htmlmin:ignore -->`.
|
125
|
+
|
126
|
+
### Minifying JSON-LD
|
127
|
+
|
128
|
+
You can minify script tags with JSON-LD by setting the option `{ processScripts: ['application/ld+json'] }`. Note that this minification is very rudimentary, it is mainly useful for removing newlines and excessive whitespace.
|
129
|
+
|
130
|
+
### Preserving SVG tags
|
131
|
+
|
132
|
+
SVG tags are automatically recognized, and when they are minified, both case-sensitivity and closing-slashes are preserved, regardless of the minification settings used for the rest of the file.
|
133
|
+
|
134
|
+
### Working with invalid markup
|
135
|
+
|
136
|
+
HTMLMinifier **can't work with invalid or partial chunks of markup**. This is because it parses markup into a tree structure, then modifies it (removing anything that was specified for removal, ignoring anything that was specified to be ignored, etc.), then it creates a markup out of that tree and returns it.
|
137
|
+
|
138
|
+
Input markup (e.g. `<p id="">foo`)
|
139
|
+
|
140
|
+
↓
|
141
|
+
|
142
|
+
Internal representation of markup in a form of tree (e.g. `{ tag: "p", attr: "id", children: ["foo"] }`)
|
143
|
+
|
144
|
+
↓
|
145
|
+
|
146
|
+
Transformation of internal representation (e.g. removal of `id` attribute)
|
147
|
+
|
148
|
+
↓
|
149
|
+
|
150
|
+
Output of resulting markup (e.g. `<p>foo</p>`)
|
151
|
+
|
152
|
+
HTMLMinifier can't know that original markup was only half of the tree; it does its best to try to parse it as a full tree and it loses information about tree being malformed or partial in the beginning. As a result, it can't create a partial/malformed tree at the time of the output.
|
153
|
+
|
154
|
+
## Running benchmarks
|
155
|
+
|
156
|
+
Benchmarks for minified HTML:
|
157
|
+
|
158
|
+
```shell
|
159
|
+
cd benchmarks
|
160
|
+
npm install
|
161
|
+
npm run benchmark
|
162
|
+
```
|
163
|
+
|
164
|
+
## Running local server
|
165
|
+
|
166
|
+
```shell
|
167
|
+
npm run serve
|
168
|
+
```
|
@@ -0,0 +1,308 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
/**
|
3
|
+
* html-minifier-terser CLI tool
|
4
|
+
*
|
5
|
+
* The MIT License (MIT)
|
6
|
+
*
|
7
|
+
* Copyright (c) 2014-2016 Zoltan Frombach
|
8
|
+
*
|
9
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
10
|
+
* this software and associated documentation files (the "Software"), to deal in
|
11
|
+
* the Software without restriction, including without limitation the rights to
|
12
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
13
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
14
|
+
* subject to the following conditions:
|
15
|
+
*
|
16
|
+
* The above copyright notice and this permission notice shall be included in all
|
17
|
+
* copies or substantial portions of the Software.
|
18
|
+
*
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
20
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
21
|
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
22
|
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
23
|
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
24
|
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
25
|
+
*
|
26
|
+
*/
|
27
|
+
|
28
|
+
import fs from 'fs';
|
29
|
+
import path from 'path';
|
30
|
+
import { createRequire } from 'module';
|
31
|
+
import { camelCase } from 'camel-case';
|
32
|
+
import { paramCase } from 'param-case';
|
33
|
+
import { Command } from 'commander';
|
34
|
+
import { minify } from './src/htmlminifier.js';
|
35
|
+
|
36
|
+
const require = createRequire(import.meta.url);
|
37
|
+
|
38
|
+
const pkg = require('./package.json');
|
39
|
+
|
40
|
+
const program = new Command();
|
41
|
+
program.name(pkg.name);
|
42
|
+
program.version(pkg.version);
|
43
|
+
|
44
|
+
function fatal(message) {
|
45
|
+
console.error(message);
|
46
|
+
process.exit(1);
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* JSON does not support regexes, so, e.g., JSON.parse() will not create
|
51
|
+
* a RegExp from the JSON value `[ "/matchString/" ]`, which is
|
52
|
+
* technically just an array containing a string that begins and end with
|
53
|
+
* a forward slash. To get a RegExp from a JSON string, it must be
|
54
|
+
* constructed explicitly in JavaScript.
|
55
|
+
*
|
56
|
+
* The likelihood of actually wanting to match text that is enclosed in
|
57
|
+
* forward slashes is probably quite rare, so if forward slashes were
|
58
|
+
* included in an argument that requires a regex, the user most likely
|
59
|
+
* thought they were part of the syntax for specifying a regex.
|
60
|
+
*
|
61
|
+
* In the unlikely case that forward slashes are indeed desired in the
|
62
|
+
* search string, the user would need to enclose the expression in a
|
63
|
+
* second set of slashes:
|
64
|
+
*
|
65
|
+
* --customAttrSrround "[\"//matchString//\"]"
|
66
|
+
*/
|
67
|
+
function parseRegExp(value) {
|
68
|
+
if (value) {
|
69
|
+
return new RegExp(value.replace(/^\/(.*)\/$/, '$1'));
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
function parseJSON(value) {
|
74
|
+
if (value) {
|
75
|
+
try {
|
76
|
+
return JSON.parse(value);
|
77
|
+
} catch (e) {
|
78
|
+
if (/^{/.test(value)) {
|
79
|
+
fatal('Could not parse JSON value \'' + value + '\'');
|
80
|
+
}
|
81
|
+
return value;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
function parseJSONArray(value) {
|
87
|
+
if (value) {
|
88
|
+
value = parseJSON(value);
|
89
|
+
return Array.isArray(value) ? value : [value];
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
function parseJSONRegExpArray(value) {
|
94
|
+
value = parseJSONArray(value);
|
95
|
+
return value && value.map(parseRegExp);
|
96
|
+
}
|
97
|
+
|
98
|
+
function parseString(value) {
|
99
|
+
return value;
|
100
|
+
}
|
101
|
+
|
102
|
+
const mainOptions = {
|
103
|
+
caseSensitive: 'Treat attributes in case sensitive manner (useful for SVG; e.g. viewBox)',
|
104
|
+
collapseBooleanAttributes: 'Omit attribute values from boolean attributes',
|
105
|
+
collapseInlineTagWhitespace: 'Collapse white space around inline tag',
|
106
|
+
collapseWhitespace: 'Collapse white space that contributes to text nodes in a document tree.',
|
107
|
+
conservativeCollapse: 'Always collapse to 1 space (never remove it entirely)',
|
108
|
+
continueOnParseError: 'Handle parse errors instead of aborting',
|
109
|
+
customAttrAssign: ['Arrays of regex\'es that allow to support custom attribute assign expressions (e.g. \'<div flex?="{{mode != cover}}"></div>\')', parseJSONRegExpArray],
|
110
|
+
customAttrCollapse: ['Regex that specifies custom attribute to strip newlines from (e.g. /ng-class/)', parseRegExp],
|
111
|
+
customAttrSurround: ['Arrays of regex\'es that allow to support custom attribute surround expressions (e.g. <input {{#if value}}checked="checked"{{/if}}>)', parseJSONRegExpArray],
|
112
|
+
customEventAttributes: ['Arrays of regex\'es that allow to support custom event attributes for minifyJS (e.g. ng-click)', parseJSONRegExpArray],
|
113
|
+
decodeEntities: 'Use direct Unicode characters whenever possible',
|
114
|
+
html5: 'Parse input according to HTML5 specifications',
|
115
|
+
ignoreCustomComments: ['Array of regex\'es that allow to ignore certain comments, when matched', parseJSONRegExpArray],
|
116
|
+
ignoreCustomFragments: ['Array of regex\'es that allow to ignore certain fragments, when matched (e.g. <?php ... ?>, {{ ... }})', parseJSONRegExpArray],
|
117
|
+
includeAutoGeneratedTags: 'Insert tags generated by HTML parser',
|
118
|
+
keepClosingSlash: 'Keep the trailing slash on singleton elements',
|
119
|
+
maxLineLength: ['Max line length', parseInt],
|
120
|
+
minifyCSS: ['Minify CSS in style elements and style attributes (uses clean-css)', parseJSON],
|
121
|
+
minifyJS: ['Minify Javascript in script elements and on* attributes (uses terser)', parseJSON],
|
122
|
+
minifyURLs: ['Minify URLs in various attributes (uses relateurl)', parseJSON],
|
123
|
+
noNewlinesBeforeTagClose: 'Never add a newline before a tag that closes an element',
|
124
|
+
preserveLineBreaks: 'Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break.',
|
125
|
+
preventAttributesEscaping: 'Prevents the escaping of the values of attributes.',
|
126
|
+
processConditionalComments: 'Process contents of conditional comments through minifier',
|
127
|
+
processScripts: ['Array of strings corresponding to types of script elements to process through minifier (e.g. "text/ng-template", "text/x-handlebars-template", etc.)', parseJSONArray],
|
128
|
+
quoteCharacter: ['Type of quote to use for attribute values (\' or ")', parseString],
|
129
|
+
removeAttributeQuotes: 'Remove quotes around attributes when possible.',
|
130
|
+
removeComments: 'Strip HTML comments',
|
131
|
+
removeEmptyAttributes: 'Remove all attributes with whitespace-only values',
|
132
|
+
removeEmptyElements: 'Remove all elements with empty contents',
|
133
|
+
removeOptionalTags: 'Remove unrequired tags',
|
134
|
+
removeRedundantAttributes: 'Remove attributes when value matches default.',
|
135
|
+
removeScriptTypeAttributes: 'Removes the following attributes from script tags: text/javascript, text/ecmascript, text/jscript, application/javascript, application/x-javascript, application/ecmascript. Other type attribute values are left intact',
|
136
|
+
removeStyleLinkTypeAttributes: 'Remove type="text/css" from style and link tags. Other type attribute values are left intact.',
|
137
|
+
removeTagWhitespace: 'Remove space between attributes whenever possible',
|
138
|
+
sortAttributes: 'Sort attributes by frequency',
|
139
|
+
sortClassName: 'Sort style classes by frequency',
|
140
|
+
trimCustomFragments: 'Trim white space around ignoreCustomFragments.',
|
141
|
+
useShortDoctype: 'Replaces the doctype with the short (HTML5) doctype'
|
142
|
+
};
|
143
|
+
|
144
|
+
// configure commandline flags
|
145
|
+
const mainOptionKeys = Object.keys(mainOptions);
|
146
|
+
mainOptionKeys.forEach(function (key) {
|
147
|
+
const option = mainOptions[key];
|
148
|
+
if (Array.isArray(option)) {
|
149
|
+
key = key === 'minifyURLs' ? '--minify-urls' : '--' + paramCase(key);
|
150
|
+
key += option[1] === parseJSON ? ' [value]' : ' <value>';
|
151
|
+
program.option(key, option[0], option[1]);
|
152
|
+
} else if (~['html5', 'includeAutoGeneratedTags'].indexOf(key)) {
|
153
|
+
program.option('--no-' + paramCase(key), option);
|
154
|
+
} else {
|
155
|
+
program.option('--' + paramCase(key), option);
|
156
|
+
}
|
157
|
+
});
|
158
|
+
program.option('-o --output <file>', 'Specify output file (if not specified STDOUT will be used for output)');
|
159
|
+
|
160
|
+
function readFile(file) {
|
161
|
+
try {
|
162
|
+
return fs.readFileSync(file, { encoding: 'utf8' });
|
163
|
+
} catch (e) {
|
164
|
+
fatal('Cannot read ' + file + '\n' + e.message);
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
let config = {};
|
169
|
+
program.option('-c --config-file <file>', 'Use config file', function (configPath) {
|
170
|
+
const data = readFile(configPath);
|
171
|
+
try {
|
172
|
+
config = JSON.parse(data);
|
173
|
+
} catch (je) {
|
174
|
+
try {
|
175
|
+
config = require(path.resolve(configPath));
|
176
|
+
} catch (ne) {
|
177
|
+
fatal('Cannot read the specified config file.\nAs JSON: ' + je.message + '\nAs module: ' + ne.message);
|
178
|
+
}
|
179
|
+
}
|
180
|
+
mainOptionKeys.forEach(function (key) {
|
181
|
+
if (key in config) {
|
182
|
+
const option = mainOptions[key];
|
183
|
+
if (Array.isArray(option)) {
|
184
|
+
const value = config[key];
|
185
|
+
config[key] = option[1](typeof value === 'string' ? value : JSON.stringify(value));
|
186
|
+
}
|
187
|
+
}
|
188
|
+
});
|
189
|
+
});
|
190
|
+
program.option('--input-dir <dir>', 'Specify an input directory');
|
191
|
+
program.option('--output-dir <dir>', 'Specify an output directory');
|
192
|
+
program.option('--file-ext <text>', 'Specify an extension to be read, ex: html');
|
193
|
+
|
194
|
+
let content;
|
195
|
+
program.arguments('[files...]').action(function (files) {
|
196
|
+
content = files.map(readFile).join('');
|
197
|
+
}).parse(process.argv);
|
198
|
+
|
199
|
+
const programOptions = program.opts();
|
200
|
+
|
201
|
+
function createOptions() {
|
202
|
+
const options = {};
|
203
|
+
|
204
|
+
mainOptionKeys.forEach(function (key) {
|
205
|
+
const param = programOptions[key === 'minifyURLs' ? 'minifyUrls' : camelCase(key)];
|
206
|
+
|
207
|
+
if (typeof param !== 'undefined') {
|
208
|
+
options[key] = param;
|
209
|
+
} else if (key in config) {
|
210
|
+
options[key] = config[key];
|
211
|
+
}
|
212
|
+
});
|
213
|
+
return options;
|
214
|
+
}
|
215
|
+
|
216
|
+
function mkdir(outputDir, callback) {
|
217
|
+
fs.mkdir(outputDir, { recursive: true }, function (err) {
|
218
|
+
if (err) {
|
219
|
+
fatal('Cannot create directory ' + outputDir + '\n' + err.message);
|
220
|
+
}
|
221
|
+
callback();
|
222
|
+
});
|
223
|
+
}
|
224
|
+
|
225
|
+
function processFile(inputFile, outputFile) {
|
226
|
+
fs.readFile(inputFile, { encoding: 'utf8' }, async function (err, data) {
|
227
|
+
if (err) {
|
228
|
+
fatal('Cannot read ' + inputFile + '\n' + err.message);
|
229
|
+
}
|
230
|
+
let minified;
|
231
|
+
try {
|
232
|
+
minified = await minify(data, createOptions());
|
233
|
+
} catch (e) {
|
234
|
+
fatal('Minification error on ' + inputFile + '\n' + e.message);
|
235
|
+
}
|
236
|
+
fs.writeFile(outputFile, minified, { encoding: 'utf8' }, function (err) {
|
237
|
+
if (err) {
|
238
|
+
fatal('Cannot write ' + outputFile + '\n' + err.message);
|
239
|
+
}
|
240
|
+
});
|
241
|
+
});
|
242
|
+
}
|
243
|
+
|
244
|
+
function processDirectory(inputDir, outputDir, fileExt) {
|
245
|
+
fs.readdir(inputDir, function (err, files) {
|
246
|
+
if (err) {
|
247
|
+
fatal('Cannot read directory ' + inputDir + '\n' + err.message);
|
248
|
+
}
|
249
|
+
|
250
|
+
files.forEach(function (file) {
|
251
|
+
const inputFile = path.join(inputDir, file);
|
252
|
+
const outputFile = path.join(outputDir, file);
|
253
|
+
|
254
|
+
fs.stat(inputFile, function (err, stat) {
|
255
|
+
if (err) {
|
256
|
+
fatal('Cannot read ' + inputFile + '\n' + err.message);
|
257
|
+
} else if (stat.isDirectory()) {
|
258
|
+
processDirectory(inputFile, outputFile, fileExt);
|
259
|
+
} else if (!fileExt || path.extname(file) === '.' + fileExt) {
|
260
|
+
mkdir(outputDir, function () {
|
261
|
+
processFile(inputFile, outputFile);
|
262
|
+
});
|
263
|
+
}
|
264
|
+
});
|
265
|
+
});
|
266
|
+
});
|
267
|
+
}
|
268
|
+
|
269
|
+
const writeMinify = async () => {
|
270
|
+
const minifierOptions = createOptions();
|
271
|
+
let minified;
|
272
|
+
|
273
|
+
try {
|
274
|
+
minified = await minify(content, minifierOptions);
|
275
|
+
} catch (e) {
|
276
|
+
fatal('Minification error:\n' + e.message);
|
277
|
+
}
|
278
|
+
|
279
|
+
let stream = process.stdout;
|
280
|
+
|
281
|
+
if (programOptions.output) {
|
282
|
+
stream = fs.createWriteStream(programOptions.output)
|
283
|
+
.on('error', (e) => {
|
284
|
+
fatal('Cannot write ' + programOptions.output + '\n' + e.message);
|
285
|
+
});
|
286
|
+
}
|
287
|
+
|
288
|
+
stream.write(minified);
|
289
|
+
};
|
290
|
+
|
291
|
+
const { inputDir, outputDir, fileExt } = programOptions;
|
292
|
+
|
293
|
+
if (inputDir || outputDir) {
|
294
|
+
if (!inputDir) {
|
295
|
+
fatal('The option output-dir needs to be used with the option input-dir. If you are working with a single file, use -o.');
|
296
|
+
} else if (!outputDir) {
|
297
|
+
fatal('You need to specify where to write the output files with the option --output-dir');
|
298
|
+
}
|
299
|
+
processDirectory(inputDir, outputDir, fileExt);
|
300
|
+
} else if (content) { // Minifying one or more files specified on the CMD line
|
301
|
+
writeMinify();
|
302
|
+
} else { // Minifying input coming from STDIN
|
303
|
+
content = '';
|
304
|
+
process.stdin.setEncoding('utf8');
|
305
|
+
process.stdin.on('data', function (data) {
|
306
|
+
content += data;
|
307
|
+
}).on('end', writeMinify);
|
308
|
+
}
|