@dotglitch/ngx-common 3.0.0-beta.1 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/command-palette/breadcrumb/breadcrumb.component.d.ts +16 -0
- package/command-palette/command-palette.component.d.ts +38 -0
- package/command-palette/command-palette.service.d.ts +128 -0
- package/command-palette/index.d.ts +2 -0
- package/command-palette/shortcut/shortcut.component.d.ts +9 -0
- package/{components → core/components}/menu/menu.component.d.ts +2 -2
- package/{directives → core/components/menu}/menu.directive.d.ts +1 -1
- package/{types/menu.d.ts → core/components/menu/types.d.ts} +1 -1
- package/{components → core/components}/types.d.ts +0 -1
- package/{public-api.d.ts → core/index.d.ts} +8 -4
- package/{services → core/services}/navigation.service.d.ts +1 -1
- package/core/utils/index.d.ts +18 -0
- package/esm2022/command-palette/breadcrumb/breadcrumb.component.mjs +30 -0
- package/esm2022/command-palette/command-palette.component.mjs +257 -0
- package/esm2022/command-palette/command-palette.service.mjs +207 -0
- package/esm2022/command-palette/dotglitch-ngx-common-command-palette.mjs +5 -0
- package/esm2022/command-palette/index.mjs +3 -0
- package/esm2022/command-palette/shortcut/shortcut.component.mjs +19 -0
- package/esm2022/core/components/lazy-loader/lazy-loader.component.mjs +383 -0
- package/esm2022/core/components/lazy-loader/lazy-loader.module.mjs +33 -0
- package/esm2022/core/components/lazy-loader/lazy-loader.service.mjs +216 -0
- package/esm2022/core/components/lazy-loader/types.mjs +26 -0
- package/esm2022/core/components/menu/menu.component.mjs +433 -0
- package/esm2022/core/components/menu/menu.directive.mjs +159 -0
- package/esm2022/core/components/menu/types.mjs +2 -0
- package/esm2022/core/components/parallax-card/parallax-card.component.mjs +138 -0
- package/esm2022/core/components/types.mjs +3 -0
- package/esm2022/core/directives/image-cache.directive.mjs +143 -0
- package/esm2022/core/directives/utils.mjs +120 -0
- package/esm2022/core/dotglitch-ngx-common-core.mjs +5 -0
- package/esm2022/core/index.mjs +50 -0
- package/esm2022/core/pipes/html-bypass.pipe.mjs +27 -0
- package/esm2022/core/pipes/resource-bypass.pipe.mjs +27 -0
- package/esm2022/core/pipes/script-bypass.pipe.mjs +27 -0
- package/esm2022/core/pipes/style-bypass.pipe.mjs +27 -0
- package/esm2022/core/pipes/url-bypass.pipe.mjs +27 -0
- package/esm2022/core/services/dependency.service.mjs +55 -0
- package/esm2022/core/services/dialog.service.mjs +67 -0
- package/esm2022/core/services/fetch.service.mjs +74 -0
- package/esm2022/core/services/file.service.mjs +42 -0
- package/esm2022/core/services/keyboard.service.mjs +128 -0
- package/esm2022/core/services/navigation.service.mjs +50 -0
- package/esm2022/core/services/theme.service.mjs +64 -0
- package/esm2022/core/types/popup.mjs +2 -0
- package/esm2022/core/utils/index.mjs +69 -0
- package/esm2022/dotglitch-ngx-common.mjs +2 -2
- package/esm2022/filemanager/dotglitch-ngx-common-filemanager.mjs +5 -0
- package/esm2022/filemanager/file-grid/file-grid.component.mjs +676 -0
- package/esm2022/filemanager/filemanager.component.mjs +313 -0
- package/esm2022/filemanager/folder-rename/folder-rename.component.mjs +57 -0
- package/esm2022/filemanager/helpers.mjs +26 -0
- package/esm2022/filemanager/icon-resolver.mjs +155 -0
- package/esm2022/filemanager/index.mjs +2 -0
- package/esm2022/filemanager/mat-icons.mjs +5705 -0
- package/esm2022/filemanager/textextensions.mjs +294 -0
- package/esm2022/filemanager/toolbar/breadcrumb/breadcrumb.component.mjs +22 -0
- package/esm2022/filemanager/toolbar/icon-button/icon-button.component.mjs +32 -0
- package/esm2022/filemanager/toolbar/toolbar.component.mjs +165 -0
- package/esm2022/filemanager/tree-view/tree-view.component.mjs +51 -0
- package/esm2022/filemanager/types.mjs +2 -0
- package/esm2022/index.mjs +3 -0
- package/esm2022/monaco-editor/dotglitch-ngx-common-monaco-editor.mjs +5 -0
- package/esm2022/monaco-editor/index.mjs +2 -0
- package/esm2022/monaco-editor/monaco-editor.component.mjs +234 -0
- package/esm2022/monaco-editor/ts-type-resolver/dependency-parser.mjs +91 -0
- package/esm2022/monaco-editor/ts-type-resolver/dummy-source-cache.mjs +15 -0
- package/esm2022/monaco-editor/ts-type-resolver/import-resolver.mjs +311 -0
- package/esm2022/monaco-editor/ts-type-resolver/main.mjs +112 -0
- package/esm2022/monaco-editor/ts-type-resolver/recursion-depth.mjs +21 -0
- package/esm2022/monaco-editor/ts-type-resolver/types.mjs +14 -0
- package/esm2022/monaco-editor/ts-type-resolver/unpkg-source-resolver.mjs +21 -0
- package/esm2022/monaco-editor/ts-type-resolver/update-emitter.mjs +37 -0
- package/esm2022/overlay-wrapper/dotglitch-ngx-common-overlay-wrapper.mjs +5 -0
- package/esm2022/overlay-wrapper/index.mjs +2 -0
- package/esm2022/overlay-wrapper/overlay-wrapper.component.mjs +247 -0
- package/esm2022/tooltip/dotglitch-ngx-common-tooltip.mjs +5 -0
- package/esm2022/tooltip/index.mjs +4 -0
- package/esm2022/tooltip/tooltip.component.mjs +204 -0
- package/esm2022/tooltip/tooltip.directive.mjs +153 -0
- package/esm2022/tooltip/types.mjs +2 -0
- package/fesm2022/dotglitch-ngx-common-command-palette.mjs +508 -0
- package/fesm2022/dotglitch-ngx-common-command-palette.mjs.map +1 -0
- package/fesm2022/dotglitch-ngx-common-core.mjs +2280 -0
- package/fesm2022/dotglitch-ngx-common-core.mjs.map +1 -0
- package/fesm2022/dotglitch-ngx-common-filemanager-folder-rename.component-CnKuU8nn.mjs +60 -0
- package/fesm2022/dotglitch-ngx-common-filemanager-folder-rename.component-CnKuU8nn.mjs.map +1 -0
- package/fesm2022/dotglitch-ngx-common-filemanager.mjs +7403 -0
- package/fesm2022/dotglitch-ngx-common-filemanager.mjs.map +1 -0
- package/fesm2022/dotglitch-ngx-common-monaco-editor.mjs +850 -0
- package/fesm2022/dotglitch-ngx-common-monaco-editor.mjs.map +1 -0
- package/fesm2022/dotglitch-ngx-common-overlay-wrapper.mjs +254 -0
- package/fesm2022/dotglitch-ngx-common-overlay-wrapper.mjs.map +1 -0
- package/fesm2022/dotglitch-ngx-common-tooltip.mjs +357 -0
- package/fesm2022/dotglitch-ngx-common-tooltip.mjs.map +1 -0
- package/fesm2022/dotglitch-ngx-common.mjs +3 -2757
- package/fesm2022/dotglitch-ngx-common.mjs.map +1 -1
- package/filemanager/file-grid/file-grid.component.d.ts +94 -0
- package/filemanager/filemanager.component.d.ts +206 -0
- package/filemanager/folder-rename/folder-rename.component.d.ts +18 -0
- package/filemanager/helpers.d.ts +5 -0
- package/filemanager/icon-resolver.d.ts +13 -0
- package/filemanager/index.d.ts +1 -0
- package/filemanager/mat-icons.d.ts +5705 -0
- package/filemanager/textextensions.d.ts +3 -0
- package/filemanager/toolbar/breadcrumb/breadcrumb.component.d.ts +16 -0
- package/filemanager/toolbar/icon-button/icon-button.component.d.ts +11 -0
- package/filemanager/toolbar/toolbar.component.d.ts +31 -0
- package/filemanager/tree-view/tree-view.component.d.ts +21 -0
- package/filemanager/types.d.ts +1 -0
- package/index.d.ts +1 -5
- package/monaco-editor/README.md +3 -0
- package/monaco-editor/index.d.ts +1 -0
- package/monaco-editor/monaco-editor.component.d.ts +53 -0
- package/monaco-editor/ts-type-resolver/dependency-parser.d.ts +6 -0
- package/monaco-editor/ts-type-resolver/dummy-source-cache.d.ts +7 -0
- package/monaco-editor/ts-type-resolver/import-resolver.d.ts +28 -0
- package/monaco-editor/ts-type-resolver/main.d.ts +22 -0
- package/monaco-editor/ts-type-resolver/recursion-depth.d.ts +11 -0
- package/monaco-editor/ts-type-resolver/types.d.ts +179 -0
- package/monaco-editor/ts-type-resolver/unpkg-source-resolver.d.ts +5 -0
- package/monaco-editor/ts-type-resolver/update-emitter.d.ts +2 -0
- package/overlay-wrapper/index.d.ts +1 -0
- package/overlay-wrapper/overlay-wrapper.component.d.ts +11 -0
- package/package.json +104 -64
- package/tooltip/index.d.ts +3 -0
- package/{components/tooltip → tooltip}/tooltip.component.d.ts +3 -3
- package/{directives → tooltip}/tooltip.directive.d.ts +2 -2
- package/{types/tooltip.d.ts → tooltip/types.d.ts} +1 -1
- package/assets/lib/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.de.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.es.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.fr.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.it.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.ja.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.ko.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.ru.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.zh-cn.js +0 -8
- package/assets/lib/vs/base/common/worker/simpleWorker.nls.zh-tw.js +0 -8
- package/assets/lib/vs/base/worker/workerMain.js +0 -24
- package/assets/lib/vs/basic-languages/abap/abap.js +0 -10
- package/assets/lib/vs/basic-languages/apex/apex.js +0 -10
- package/assets/lib/vs/basic-languages/azcli/azcli.js +0 -10
- package/assets/lib/vs/basic-languages/bat/bat.js +0 -10
- package/assets/lib/vs/basic-languages/bicep/bicep.js +0 -11
- package/assets/lib/vs/basic-languages/cameligo/cameligo.js +0 -10
- package/assets/lib/vs/basic-languages/clojure/clojure.js +0 -10
- package/assets/lib/vs/basic-languages/coffee/coffee.js +0 -10
- package/assets/lib/vs/basic-languages/cpp/cpp.js +0 -10
- package/assets/lib/vs/basic-languages/csharp/csharp.js +0 -10
- package/assets/lib/vs/basic-languages/csp/csp.js +0 -10
- package/assets/lib/vs/basic-languages/css/css.js +0 -12
- package/assets/lib/vs/basic-languages/cypher/cypher.js +0 -10
- package/assets/lib/vs/basic-languages/dart/dart.js +0 -10
- package/assets/lib/vs/basic-languages/dockerfile/dockerfile.js +0 -10
- package/assets/lib/vs/basic-languages/ecl/ecl.js +0 -10
- package/assets/lib/vs/basic-languages/elixir/elixir.js +0 -10
- package/assets/lib/vs/basic-languages/flow9/flow9.js +0 -10
- package/assets/lib/vs/basic-languages/freemarker2/freemarker2.js +0 -12
- package/assets/lib/vs/basic-languages/fsharp/fsharp.js +0 -10
- package/assets/lib/vs/basic-languages/go/go.js +0 -10
- package/assets/lib/vs/basic-languages/graphql/graphql.js +0 -10
- package/assets/lib/vs/basic-languages/handlebars/handlebars.js +0 -10
- package/assets/lib/vs/basic-languages/hcl/hcl.js +0 -10
- package/assets/lib/vs/basic-languages/html/html.js +0 -10
- package/assets/lib/vs/basic-languages/ini/ini.js +0 -10
- package/assets/lib/vs/basic-languages/java/java.js +0 -10
- package/assets/lib/vs/basic-languages/javascript/javascript.js +0 -10
- package/assets/lib/vs/basic-languages/julia/julia.js +0 -10
- package/assets/lib/vs/basic-languages/kotlin/kotlin.js +0 -10
- package/assets/lib/vs/basic-languages/less/less.js +0 -11
- package/assets/lib/vs/basic-languages/lexon/lexon.js +0 -10
- package/assets/lib/vs/basic-languages/liquid/liquid.js +0 -10
- package/assets/lib/vs/basic-languages/lua/lua.js +0 -10
- package/assets/lib/vs/basic-languages/m3/m3.js +0 -10
- package/assets/lib/vs/basic-languages/markdown/markdown.js +0 -10
- package/assets/lib/vs/basic-languages/mips/mips.js +0 -10
- package/assets/lib/vs/basic-languages/msdax/msdax.js +0 -10
- package/assets/lib/vs/basic-languages/mysql/mysql.js +0 -10
- package/assets/lib/vs/basic-languages/objective-c/objective-c.js +0 -10
- package/assets/lib/vs/basic-languages/pascal/pascal.js +0 -10
- package/assets/lib/vs/basic-languages/pascaligo/pascaligo.js +0 -10
- package/assets/lib/vs/basic-languages/perl/perl.js +0 -10
- package/assets/lib/vs/basic-languages/pgsql/pgsql.js +0 -10
- package/assets/lib/vs/basic-languages/php/php.js +0 -10
- package/assets/lib/vs/basic-languages/pla/pla.js +0 -10
- package/assets/lib/vs/basic-languages/postiats/postiats.js +0 -10
- package/assets/lib/vs/basic-languages/powerquery/powerquery.js +0 -10
- package/assets/lib/vs/basic-languages/powershell/powershell.js +0 -10
- package/assets/lib/vs/basic-languages/protobuf/protobuf.js +0 -11
- package/assets/lib/vs/basic-languages/pug/pug.js +0 -10
- package/assets/lib/vs/basic-languages/python/python.js +0 -10
- package/assets/lib/vs/basic-languages/qsharp/qsharp.js +0 -10
- package/assets/lib/vs/basic-languages/r/r.js +0 -10
- package/assets/lib/vs/basic-languages/razor/razor.js +0 -10
- package/assets/lib/vs/basic-languages/redis/redis.js +0 -10
- package/assets/lib/vs/basic-languages/redshift/redshift.js +0 -10
- package/assets/lib/vs/basic-languages/restructuredtext/restructuredtext.js +0 -10
- package/assets/lib/vs/basic-languages/ruby/ruby.js +0 -10
- package/assets/lib/vs/basic-languages/rust/rust.js +0 -10
- package/assets/lib/vs/basic-languages/sb/sb.js +0 -10
- package/assets/lib/vs/basic-languages/scala/scala.js +0 -10
- package/assets/lib/vs/basic-languages/scheme/scheme.js +0 -10
- package/assets/lib/vs/basic-languages/scss/scss.js +0 -12
- package/assets/lib/vs/basic-languages/shell/shell.js +0 -10
- package/assets/lib/vs/basic-languages/solidity/solidity.js +0 -10
- package/assets/lib/vs/basic-languages/sophia/sophia.js +0 -10
- package/assets/lib/vs/basic-languages/sparql/sparql.js +0 -10
- package/assets/lib/vs/basic-languages/sql/sql.js +0 -10
- package/assets/lib/vs/basic-languages/st/st.js +0 -10
- package/assets/lib/vs/basic-languages/swift/swift.js +0 -13
- package/assets/lib/vs/basic-languages/systemverilog/systemverilog.js +0 -10
- package/assets/lib/vs/basic-languages/tcl/tcl.js +0 -10
- package/assets/lib/vs/basic-languages/twig/twig.js +0 -10
- package/assets/lib/vs/basic-languages/typescript/typescript.js +0 -10
- package/assets/lib/vs/basic-languages/vb/vb.js +0 -10
- package/assets/lib/vs/basic-languages/wgsl/wgsl.js +0 -307
- package/assets/lib/vs/basic-languages/xml/xml.js +0 -10
- package/assets/lib/vs/basic-languages/yaml/yaml.js +0 -10
- package/assets/lib/vs/editor/editor.main.css +0 -6
- package/assets/lib/vs/editor/editor.main.js +0 -752
- package/assets/lib/vs/editor/editor.main.nls.de.js +0 -31
- package/assets/lib/vs/editor/editor.main.nls.es.js +0 -31
- package/assets/lib/vs/editor/editor.main.nls.fr.js +0 -29
- package/assets/lib/vs/editor/editor.main.nls.it.js +0 -29
- package/assets/lib/vs/editor/editor.main.nls.ja.js +0 -31
- package/assets/lib/vs/editor/editor.main.nls.js +0 -29
- package/assets/lib/vs/editor/editor.main.nls.ko.js +0 -29
- package/assets/lib/vs/editor/editor.main.nls.ru.js +0 -31
- package/assets/lib/vs/editor/editor.main.nls.zh-cn.js +0 -31
- package/assets/lib/vs/editor/editor.main.nls.zh-tw.js +0 -29
- package/assets/lib/vs/language/css/cssMode.js +0 -13
- package/assets/lib/vs/language/css/cssWorker.js +0 -81
- package/assets/lib/vs/language/html/htmlMode.js +0 -13
- package/assets/lib/vs/language/html/htmlWorker.js +0 -453
- package/assets/lib/vs/language/json/jsonMode.js +0 -15
- package/assets/lib/vs/language/json/jsonWorker.js +0 -36
- package/assets/lib/vs/language/typescript/tsMode.js +0 -20
- package/assets/lib/vs/language/typescript/tsWorker.js +0 -37016
- package/assets/lib/vs/loader.js +0 -11
- package/assets/mat-icons.ts +0 -5704
- package/assets/material/3d.svg +0 -1
- package/assets/material/abc.svg +0 -1
- package/assets/material/actionscript.svg +0 -1
- package/assets/material/ada.svg +0 -1
- package/assets/material/adonis.svg +0 -1
- package/assets/material/advpl_include.svg +0 -1
- package/assets/material/advpl_prw.svg +0 -1
- package/assets/material/advpl_ptm.svg +0 -1
- package/assets/material/advpl_tlpp.svg +0 -1
- package/assets/material/android.svg +0 -1
- package/assets/material/angular-component.svg +0 -1
- package/assets/material/angular-directive.svg +0 -1
- package/assets/material/angular-guard.svg +0 -1
- package/assets/material/angular-pipe.svg +0 -1
- package/assets/material/angular-resolver.svg +0 -1
- package/assets/material/angular-service.svg +0 -1
- package/assets/material/angular.svg +0 -1
- package/assets/material/antlr.svg +0 -1
- package/assets/material/apiblueprint.svg +0 -1
- package/assets/material/apollo.svg +0 -1
- package/assets/material/applescript.svg +0 -1
- package/assets/material/appveyor.svg +0 -1
- package/assets/material/architecture.svg +0 -1
- package/assets/material/arduino.svg +0 -1
- package/assets/material/asciidoc.svg +0 -1
- package/assets/material/assembly.svg +0 -1
- package/assets/material/astro.svg +0 -1
- package/assets/material/astyle.svg +0 -1
- package/assets/material/audio.svg +0 -1
- package/assets/material/aurelia.svg +0 -1
- package/assets/material/authors.svg +0 -1
- package/assets/material/auto.svg +0 -1
- package/assets/material/auto_light.svg +0 -1
- package/assets/material/autohotkey.svg +0 -1
- package/assets/material/autoit.svg +0 -1
- package/assets/material/azure-pipelines.svg +0 -1
- package/assets/material/azure.svg +0 -1
- package/assets/material/babel.svg +0 -1
- package/assets/material/ballerina.svg +0 -1
- package/assets/material/bazel.svg +0 -1
- package/assets/material/bicep.svg +0 -1
- package/assets/material/bitbucket.svg +0 -13
- package/assets/material/bithound.svg +0 -1
- package/assets/material/blink.svg +0 -1
- package/assets/material/blink_light.svg +0 -1
- package/assets/material/blitz.svg +0 -1
- package/assets/material/bower.svg +0 -1
- package/assets/material/brainfuck.svg +0 -1
- package/assets/material/browserlist.svg +0 -1
- package/assets/material/browserlist_light.svg +0 -1
- package/assets/material/buck.svg +0 -1
- package/assets/material/bucklescript.svg +0 -1
- package/assets/material/buildkite.svg +0 -1
- package/assets/material/bun.svg +0 -2
- package/assets/material/bun_light.svg +0 -2
- package/assets/material/c.svg +0 -4
- package/assets/material/cabal.svg +0 -1
- package/assets/material/caddy.svg +0 -1
- package/assets/material/cadence.svg +0 -1
- package/assets/material/cake.svg +0 -1
- package/assets/material/capacitor.svg +0 -1
- package/assets/material/certificate.svg +0 -1
- package/assets/material/changelog.svg +0 -1
- package/assets/material/chess.svg +0 -1
- package/assets/material/chess_light.svg +0 -1
- package/assets/material/circleci.svg +0 -1
- package/assets/material/circleci_light.svg +0 -1
- package/assets/material/clojure.svg +0 -1
- package/assets/material/cloudfoundry.svg +0 -1
- package/assets/material/cmake.svg +0 -1
- package/assets/material/coala.svg +0 -1
- package/assets/material/cobol.svg +0 -1
- package/assets/material/coconut.svg +0 -1
- package/assets/material/code-climate.svg +0 -1
- package/assets/material/code-climate_light.svg +0 -1
- package/assets/material/codecov.svg +0 -1
- package/assets/material/codeowners.svg +0 -1
- package/assets/material/coffee.svg +0 -1
- package/assets/material/coldfusion.svg +0 -1
- package/assets/material/command.svg +0 -1
- package/assets/material/commitlint.svg +0 -1
- package/assets/material/conduct.svg +0 -1
- package/assets/material/console.svg +0 -1
- package/assets/material/contributing.svg +0 -1
- package/assets/material/cpp.svg +0 -4
- package/assets/material/craco.svg +0 -45
- package/assets/material/credits.svg +0 -1
- package/assets/material/crystal.svg +0 -1
- package/assets/material/crystal_light.svg +0 -1
- package/assets/material/csharp.svg +0 -4
- package/assets/material/css-map.svg +0 -1
- package/assets/material/css.svg +0 -1
- package/assets/material/cucumber.svg +0 -1
- package/assets/material/cuda.svg +0 -1
- package/assets/material/cypress.svg +0 -1
- package/assets/material/d.svg +0 -1
- package/assets/material/dart.svg +0 -1
- package/assets/material/dart_generated.svg +0 -1
- package/assets/material/database.svg +0 -1
- package/assets/material/denizenscript.svg +0 -1
- package/assets/material/deno.svg +0 -1
- package/assets/material/deno_light.svg +0 -1
- package/assets/material/dependabot.svg +0 -1
- package/assets/material/dhall.svg +0 -1
- package/assets/material/diff.svg +0 -1
- package/assets/material/dinophp.svg +0 -1
- package/assets/material/disc.svg +0 -1
- package/assets/material/django.svg +0 -1
- package/assets/material/docker.svg +0 -1
- package/assets/material/document.svg +0 -1
- package/assets/material/dotjs.svg +0 -1
- package/assets/material/drawio.svg +0 -1
- package/assets/material/drone.svg +0 -1
- package/assets/material/drone_light.svg +0 -1
- package/assets/material/dune.svg +0 -1
- package/assets/material/edge.svg +0 -1
- package/assets/material/editorconfig.svg +0 -1
- package/assets/material/ejs.svg +0 -1
- package/assets/material/elixir.svg +0 -1
- package/assets/material/elm.svg +0 -1
- package/assets/material/email.svg +0 -1
- package/assets/material/ember.svg +0 -1
- package/assets/material/erlang.svg +0 -1
- package/assets/material/eslint.svg +0 -1
- package/assets/material/exe.svg +0 -1
- package/assets/material/fastlane.svg +0 -1
- package/assets/material/favicon.svg +0 -1
- package/assets/material/figma.svg +0 -1
- package/assets/material/file.svg +0 -1
- package/assets/material/firebase.svg +0 -1
- package/assets/material/flash.svg +0 -1
- package/assets/material/flow.svg +0 -1
- package/assets/material/folder-admin-open.svg +0 -1
- package/assets/material/folder-admin.svg +0 -1
- package/assets/material/folder-android-open.svg +0 -1
- package/assets/material/folder-android.svg +0 -1
- package/assets/material/folder-angular-open.svg +0 -1
- package/assets/material/folder-angular.svg +0 -1
- package/assets/material/folder-animation-open.svg +0 -1
- package/assets/material/folder-animation.svg +0 -1
- package/assets/material/folder-ansible-open.svg +0 -1
- package/assets/material/folder-ansible.svg +0 -1
- package/assets/material/folder-api-open.svg +0 -1
- package/assets/material/folder-api.svg +0 -1
- package/assets/material/folder-apollo-open.svg +0 -1
- package/assets/material/folder-apollo.svg +0 -1
- package/assets/material/folder-app-open.svg +0 -1
- package/assets/material/folder-app.svg +0 -1
- package/assets/material/folder-archive-open.svg +0 -1
- package/assets/material/folder-archive.svg +0 -1
- package/assets/material/folder-audio-open.svg +0 -1
- package/assets/material/folder-audio.svg +0 -1
- package/assets/material/folder-aurelia-open.svg +0 -1
- package/assets/material/folder-aurelia.svg +0 -1
- package/assets/material/folder-aws-open.svg +0 -1
- package/assets/material/folder-aws.svg +0 -1
- package/assets/material/folder-azure-pipelines-open.svg +0 -1
- package/assets/material/folder-azure-pipelines.svg +0 -1
- package/assets/material/folder-base-open.svg +0 -1
- package/assets/material/folder-base.svg +0 -1
- package/assets/material/folder-batch-open.svg +0 -1
- package/assets/material/folder-batch.svg +0 -1
- package/assets/material/folder-benchmark-open.svg +0 -1
- package/assets/material/folder-benchmark.svg +0 -1
- package/assets/material/folder-bower-open.svg +0 -1
- package/assets/material/folder-bower.svg +0 -1
- package/assets/material/folder-buildkite-open.svg +0 -1
- package/assets/material/folder-buildkite.svg +0 -1
- package/assets/material/folder-cart-open.svg +0 -1
- package/assets/material/folder-cart.svg +0 -1
- package/assets/material/folder-changesets-open.svg +0 -5
- package/assets/material/folder-changesets.svg +0 -2
- package/assets/material/folder-ci-open.svg +0 -1
- package/assets/material/folder-ci.svg +0 -1
- package/assets/material/folder-circleci-open.svg +0 -1
- package/assets/material/folder-circleci.svg +0 -1
- package/assets/material/folder-class-open.svg +0 -1
- package/assets/material/folder-class.svg +0 -1
- package/assets/material/folder-client-open.svg +0 -1
- package/assets/material/folder-client.svg +0 -1
- package/assets/material/folder-cluster-open.svg +0 -1
- package/assets/material/folder-cluster.svg +0 -1
- package/assets/material/folder-cobol-open.svg +0 -1
- package/assets/material/folder-cobol.svg +0 -1
- package/assets/material/folder-command-open.svg +0 -1
- package/assets/material/folder-command.svg +0 -1
- package/assets/material/folder-components-open.svg +0 -1
- package/assets/material/folder-components.svg +0 -1
- package/assets/material/folder-config-open.svg +0 -1
- package/assets/material/folder-config.svg +0 -1
- package/assets/material/folder-connection-open.svg +0 -1
- package/assets/material/folder-connection.svg +0 -1
- package/assets/material/folder-constant-open.svg +0 -1
- package/assets/material/folder-constant.svg +0 -1
- package/assets/material/folder-container-open.svg +0 -1
- package/assets/material/folder-container.svg +0 -1
- package/assets/material/folder-content-open.svg +0 -1
- package/assets/material/folder-content.svg +0 -1
- package/assets/material/folder-context-open.svg +0 -1
- package/assets/material/folder-context.svg +0 -1
- package/assets/material/folder-contract-open.svg +0 -1
- package/assets/material/folder-contract.svg +0 -1
- package/assets/material/folder-controller-open.svg +0 -1
- package/assets/material/folder-controller.svg +0 -1
- package/assets/material/folder-core-open.svg +0 -1
- package/assets/material/folder-core.svg +0 -1
- package/assets/material/folder-coverage-open.svg +0 -1
- package/assets/material/folder-coverage.svg +0 -1
- package/assets/material/folder-css-open.svg +0 -1
- package/assets/material/folder-css.svg +0 -1
- package/assets/material/folder-custom-open.svg +0 -1
- package/assets/material/folder-custom.svg +0 -1
- package/assets/material/folder-cypress-open.svg +0 -1
- package/assets/material/folder-cypress.svg +0 -1
- package/assets/material/folder-database-open.svg +0 -1
- package/assets/material/folder-database.svg +0 -1
- package/assets/material/folder-debug-open.svg +0 -1
- package/assets/material/folder-debug.svg +0 -1
- package/assets/material/folder-decorators-open.svg +0 -2
- package/assets/material/folder-decorators.svg +0 -5
- package/assets/material/folder-delta-open.svg +0 -1
- package/assets/material/folder-delta.svg +0 -1
- package/assets/material/folder-dist-open.svg +0 -1
- package/assets/material/folder-dist.svg +0 -1
- package/assets/material/folder-docker-open.svg +0 -1
- package/assets/material/folder-docker.svg +0 -1
- package/assets/material/folder-docs-open.svg +0 -1
- package/assets/material/folder-docs.svg +0 -1
- package/assets/material/folder-download-open.svg +0 -1
- package/assets/material/folder-download.svg +0 -1
- package/assets/material/folder-dump-open.svg +0 -1
- package/assets/material/folder-dump.svg +0 -1
- package/assets/material/folder-environment-open.svg +0 -1
- package/assets/material/folder-environment.svg +0 -1
- package/assets/material/folder-error-open.svg +0 -1
- package/assets/material/folder-error.svg +0 -1
- package/assets/material/folder-event-open.svg +0 -1
- package/assets/material/folder-event.svg +0 -1
- package/assets/material/folder-examples-open.svg +0 -1
- package/assets/material/folder-examples.svg +0 -1
- package/assets/material/folder-expo-open.svg +0 -1
- package/assets/material/folder-expo.svg +0 -1
- package/assets/material/folder-export-open.svg +0 -1
- package/assets/material/folder-export.svg +0 -1
- package/assets/material/folder-fastlane-open.svg +0 -1
- package/assets/material/folder-fastlane.svg +0 -1
- package/assets/material/folder-firebase-open.svg +0 -1
- package/assets/material/folder-firebase.svg +0 -1
- package/assets/material/folder-flow-open.svg +0 -1
- package/assets/material/folder-flow.svg +0 -1
- package/assets/material/folder-font-open.svg +0 -1
- package/assets/material/folder-font.svg +0 -1
- package/assets/material/folder-functions-open.svg +0 -1
- package/assets/material/folder-functions.svg +0 -1
- package/assets/material/folder-gamemaker-open.svg +0 -2
- package/assets/material/folder-gamemaker.svg +0 -2
- package/assets/material/folder-generator-open.svg +0 -1
- package/assets/material/folder-generator.svg +0 -1
- package/assets/material/folder-git-open.svg +0 -1
- package/assets/material/folder-git.svg +0 -1
- package/assets/material/folder-github-open.svg +0 -1
- package/assets/material/folder-github.svg +0 -1
- package/assets/material/folder-gitlab-open.svg +0 -1
- package/assets/material/folder-gitlab.svg +0 -1
- package/assets/material/folder-global-open.svg +0 -1
- package/assets/material/folder-global.svg +0 -1
- package/assets/material/folder-godot-open.svg +0 -2
- package/assets/material/folder-godot.svg +0 -8
- package/assets/material/folder-gradle-open.svg +0 -1
- package/assets/material/folder-gradle.svg +0 -1
- package/assets/material/folder-graphql-open.svg +0 -1
- package/assets/material/folder-graphql.svg +0 -1
- package/assets/material/folder-guard-open.svg +0 -1
- package/assets/material/folder-guard.svg +0 -1
- package/assets/material/folder-gulp-open.svg +0 -1
- package/assets/material/folder-gulp.svg +0 -1
- package/assets/material/folder-helper-open.svg +0 -1
- package/assets/material/folder-helper.svg +0 -1
- package/assets/material/folder-home-open.svg +0 -1
- package/assets/material/folder-home.svg +0 -1
- package/assets/material/folder-hook-open.svg +0 -1
- package/assets/material/folder-hook.svg +0 -1
- package/assets/material/folder-husky-open.svg +0 -1
- package/assets/material/folder-husky.svg +0 -1
- package/assets/material/folder-i18n-open.svg +0 -1
- package/assets/material/folder-i18n.svg +0 -1
- package/assets/material/folder-images-open.svg +0 -1
- package/assets/material/folder-images.svg +0 -1
- package/assets/material/folder-import-open.svg +0 -1
- package/assets/material/folder-import.svg +0 -1
- package/assets/material/folder-include-open.svg +0 -1
- package/assets/material/folder-include.svg +0 -1
- package/assets/material/folder-intellij-open.svg +0 -1
- package/assets/material/folder-intellij-open_light.svg +0 -1
- package/assets/material/folder-intellij.svg +0 -1
- package/assets/material/folder-intellij_light.svg +0 -1
- package/assets/material/folder-interface-open.svg +0 -1
- package/assets/material/folder-interface.svg +0 -1
- package/assets/material/folder-ios-open.svg +0 -1
- package/assets/material/folder-ios.svg +0 -1
- package/assets/material/folder-java-open.svg +0 -1
- package/assets/material/folder-java.svg +0 -1
- package/assets/material/folder-javascript-open.svg +0 -1
- package/assets/material/folder-javascript.svg +0 -1
- package/assets/material/folder-jinja-open.svg +0 -1
- package/assets/material/folder-jinja-open_light.svg +0 -1
- package/assets/material/folder-jinja.svg +0 -1
- package/assets/material/folder-jinja_light.svg +0 -1
- package/assets/material/folder-job-open.svg +0 -1
- package/assets/material/folder-job.svg +0 -1
- package/assets/material/folder-json-open.svg +0 -1
- package/assets/material/folder-json.svg +0 -1
- package/assets/material/folder-keys-open.svg +0 -1
- package/assets/material/folder-keys.svg +0 -1
- package/assets/material/folder-kubernetes-open.svg +0 -1
- package/assets/material/folder-kubernetes.svg +0 -1
- package/assets/material/folder-layout-open.svg +0 -1
- package/assets/material/folder-layout.svg +0 -1
- package/assets/material/folder-less-open.svg +0 -1
- package/assets/material/folder-less.svg +0 -1
- package/assets/material/folder-lib-open.svg +0 -1
- package/assets/material/folder-lib.svg +0 -1
- package/assets/material/folder-log-open.svg +0 -1
- package/assets/material/folder-log.svg +0 -1
- package/assets/material/folder-lua-open.svg +0 -1
- package/assets/material/folder-lua.svg +0 -1
- package/assets/material/folder-mail-open.svg +0 -1
- package/assets/material/folder-mail.svg +0 -1
- package/assets/material/folder-mappings-open.svg +0 -1
- package/assets/material/folder-mappings.svg +0 -1
- package/assets/material/folder-markdown-open.svg +0 -1
- package/assets/material/folder-markdown.svg +0 -1
- package/assets/material/folder-mercurial-open.svg +0 -5
- package/assets/material/folder-mercurial.svg +0 -2
- package/assets/material/folder-messages-open.svg +0 -1
- package/assets/material/folder-messages.svg +0 -1
- package/assets/material/folder-meta-open.svg +0 -1
- package/assets/material/folder-meta.svg +0 -1
- package/assets/material/folder-middleware-open.svg +0 -1
- package/assets/material/folder-middleware.svg +0 -1
- package/assets/material/folder-mjml-open.svg +0 -1
- package/assets/material/folder-mjml.svg +0 -1
- package/assets/material/folder-mobile-open.svg +0 -1
- package/assets/material/folder-mobile.svg +0 -1
- package/assets/material/folder-mock-open.svg +0 -1
- package/assets/material/folder-mock.svg +0 -1
- package/assets/material/folder-netlify-open.svg +0 -5
- package/assets/material/folder-netlify.svg +0 -2
- package/assets/material/folder-next-open.svg +0 -1
- package/assets/material/folder-next.svg +0 -1
- package/assets/material/folder-ngrx-actions-open.svg +0 -1
- package/assets/material/folder-ngrx-actions.svg +0 -1
- package/assets/material/folder-ngrx-effects-open.svg +0 -1
- package/assets/material/folder-ngrx-effects.svg +0 -1
- package/assets/material/folder-ngrx-entities-open.svg +0 -1
- package/assets/material/folder-ngrx-entities.svg +0 -1
- package/assets/material/folder-ngrx-reducer-open.svg +0 -1
- package/assets/material/folder-ngrx-reducer.svg +0 -1
- package/assets/material/folder-ngrx-selectors-open.svg +0 -1
- package/assets/material/folder-ngrx-selectors.svg +0 -1
- package/assets/material/folder-ngrx-state-open.svg +0 -1
- package/assets/material/folder-ngrx-state.svg +0 -1
- package/assets/material/folder-ngrx-store-open.svg +0 -1
- package/assets/material/folder-ngrx-store.svg +0 -1
- package/assets/material/folder-node-open.svg +0 -1
- package/assets/material/folder-node.svg +0 -1
- package/assets/material/folder-nuxt-open.svg +0 -1
- package/assets/material/folder-nuxt.svg +0 -1
- package/assets/material/folder-open.svg +0 -1
- package/assets/material/folder-other-open.svg +0 -1
- package/assets/material/folder-other.svg +0 -1
- package/assets/material/folder-packages-open.svg +0 -1
- package/assets/material/folder-packages.svg +0 -1
- package/assets/material/folder-pdf-open.svg +0 -1
- package/assets/material/folder-pdf.svg +0 -1
- package/assets/material/folder-php-open.svg +0 -1
- package/assets/material/folder-php.svg +0 -1
- package/assets/material/folder-phpmailer-open.svg +0 -1
- package/assets/material/folder-phpmailer.svg +0 -1
- package/assets/material/folder-pipe-open.svg +0 -1
- package/assets/material/folder-pipe.svg +0 -1
- package/assets/material/folder-plastic-open.svg +0 -8
- package/assets/material/folder-plastic.svg +0 -2
- package/assets/material/folder-plugin-open.svg +0 -1
- package/assets/material/folder-plugin.svg +0 -1
- package/assets/material/folder-prisma-open.svg +0 -1
- package/assets/material/folder-prisma.svg +0 -1
- package/assets/material/folder-private-open.svg +0 -1
- package/assets/material/folder-private.svg +0 -1
- package/assets/material/folder-project-open.svg +0 -1
- package/assets/material/folder-project.svg +0 -1
- package/assets/material/folder-proto-open.svg +0 -1
- package/assets/material/folder-proto.svg +0 -1
- package/assets/material/folder-public-open.svg +0 -1
- package/assets/material/folder-public.svg +0 -1
- package/assets/material/folder-python-open.svg +0 -1
- package/assets/material/folder-python.svg +0 -1
- package/assets/material/folder-quasar-open.svg +0 -1
- package/assets/material/folder-quasar.svg +0 -1
- package/assets/material/folder-queue-open.svg +0 -1
- package/assets/material/folder-queue.svg +0 -1
- package/assets/material/folder-react-components-open.svg +0 -1
- package/assets/material/folder-react-components.svg +0 -1
- package/assets/material/folder-redux-actions-open.svg +0 -1
- package/assets/material/folder-redux-actions.svg +0 -1
- package/assets/material/folder-redux-reducer-open.svg +0 -1
- package/assets/material/folder-redux-reducer.svg +0 -1
- package/assets/material/folder-redux-selector-open.svg +0 -1
- package/assets/material/folder-redux-selector.svg +0 -1
- package/assets/material/folder-redux-store-open.svg +0 -1
- package/assets/material/folder-redux-store.svg +0 -1
- package/assets/material/folder-resolver-open.svg +0 -1
- package/assets/material/folder-resolver.svg +0 -1
- package/assets/material/folder-resource-open.svg +0 -1
- package/assets/material/folder-resource.svg +0 -1
- package/assets/material/folder-review-open.svg +0 -1
- package/assets/material/folder-review.svg +0 -1
- package/assets/material/folder-root-open.svg +0 -1
- package/assets/material/folder-root.svg +0 -1
- package/assets/material/folder-routes-open.svg +0 -1
- package/assets/material/folder-routes.svg +0 -1
- package/assets/material/folder-rules-open.svg +0 -1
- package/assets/material/folder-rules.svg +0 -1
- package/assets/material/folder-sass-open.svg +0 -1
- package/assets/material/folder-sass.svg +0 -1
- package/assets/material/folder-scala-open.svg +0 -1
- package/assets/material/folder-scala.svg +0 -1
- package/assets/material/folder-scripts-open.svg +0 -1
- package/assets/material/folder-scripts.svg +0 -1
- package/assets/material/folder-secure-open.svg +0 -1
- package/assets/material/folder-secure.svg +0 -1
- package/assets/material/folder-server-open.svg +0 -1
- package/assets/material/folder-server.svg +0 -1
- package/assets/material/folder-serverless-open.svg +0 -1
- package/assets/material/folder-serverless.svg +0 -1
- package/assets/material/folder-shader-open.svg +0 -1
- package/assets/material/folder-shader.svg +0 -1
- package/assets/material/folder-shared-open.svg +0 -1
- package/assets/material/folder-shared.svg +0 -1
- package/assets/material/folder-src-open.svg +0 -1
- package/assets/material/folder-src.svg +0 -1
- package/assets/material/folder-stack-open.svg +0 -1
- package/assets/material/folder-stack.svg +0 -1
- package/assets/material/folder-stencil-open.svg +0 -1
- package/assets/material/folder-stencil.svg +0 -1
- package/assets/material/folder-storybook-open.svg +0 -1
- package/assets/material/folder-storybook.svg +0 -1
- package/assets/material/folder-stylus-open.svg +0 -1
- package/assets/material/folder-stylus.svg +0 -1
- package/assets/material/folder-sublime-open.svg +0 -1
- package/assets/material/folder-sublime.svg +0 -1
- package/assets/material/folder-supabase-open.svg +0 -5
- package/assets/material/folder-supabase.svg +0 -2
- package/assets/material/folder-svelte-open.svg +0 -1
- package/assets/material/folder-svelte.svg +0 -1
- package/assets/material/folder-svg-open.svg +0 -1
- package/assets/material/folder-svg.svg +0 -1
- package/assets/material/folder-syntax-open.svg +0 -1
- package/assets/material/folder-syntax.svg +0 -1
- package/assets/material/folder-target-open.svg +0 -1
- package/assets/material/folder-target.svg +0 -1
- package/assets/material/folder-tasks-open.svg +0 -1
- package/assets/material/folder-tasks.svg +0 -1
- package/assets/material/folder-temp-open.svg +0 -1
- package/assets/material/folder-temp.svg +0 -1
- package/assets/material/folder-template-open.svg +0 -1
- package/assets/material/folder-template.svg +0 -1
- package/assets/material/folder-terraform-open.svg +0 -1
- package/assets/material/folder-terraform.svg +0 -1
- package/assets/material/folder-test-open.svg +0 -1
- package/assets/material/folder-test.svg +0 -1
- package/assets/material/folder-theme-open.svg +0 -1
- package/assets/material/folder-theme.svg +0 -1
- package/assets/material/folder-tools-open.svg +0 -1
- package/assets/material/folder-tools.svg +0 -1
- package/assets/material/folder-typescript-open.svg +0 -1
- package/assets/material/folder-typescript.svg +0 -1
- package/assets/material/folder-unity-open.svg +0 -1
- package/assets/material/folder-unity.svg +0 -1
- package/assets/material/folder-update-open.svg +0 -1
- package/assets/material/folder-update.svg +0 -1
- package/assets/material/folder-upload-open.svg +0 -1
- package/assets/material/folder-upload.svg +0 -1
- package/assets/material/folder-utils-open.svg +0 -1
- package/assets/material/folder-utils.svg +0 -1
- package/assets/material/folder-vercel-open.svg +0 -1
- package/assets/material/folder-vercel.svg +0 -1
- package/assets/material/folder-verdaccio-open.svg +0 -1
- package/assets/material/folder-verdaccio.svg +0 -1
- package/assets/material/folder-video-open.svg +0 -1
- package/assets/material/folder-video.svg +0 -1
- package/assets/material/folder-views-open.svg +0 -1
- package/assets/material/folder-views.svg +0 -1
- package/assets/material/folder-vm-open.svg +0 -1
- package/assets/material/folder-vm.svg +0 -1
- package/assets/material/folder-vscode-open.svg +0 -1
- package/assets/material/folder-vscode.svg +0 -1
- package/assets/material/folder-vue-directives-open.svg +0 -1
- package/assets/material/folder-vue-directives.svg +0 -1
- package/assets/material/folder-vue-open.svg +0 -1
- package/assets/material/folder-vue.svg +0 -1
- package/assets/material/folder-vuepress-open.svg +0 -1
- package/assets/material/folder-vuepress.svg +0 -1
- package/assets/material/folder-vuex-store-open.svg +0 -1
- package/assets/material/folder-vuex-store.svg +0 -1
- package/assets/material/folder-wakatime-open.svg +0 -1
- package/assets/material/folder-wakatime.svg +0 -1
- package/assets/material/folder-webpack-open.svg +0 -1
- package/assets/material/folder-webpack.svg +0 -1
- package/assets/material/folder-wordpress-open.svg +0 -1
- package/assets/material/folder-wordpress.svg +0 -1
- package/assets/material/folder-yarn-open.svg +0 -1
- package/assets/material/folder-yarn.svg +0 -1
- package/assets/material/folder.svg +0 -1
- package/assets/material/font.svg +0 -1
- package/assets/material/forth.svg +0 -1
- package/assets/material/fortran.svg +0 -1
- package/assets/material/foxpro.svg +0 -1
- package/assets/material/fsharp.svg +0 -1
- package/assets/material/fusebox.svg +0 -1
- package/assets/material/gamemaker.svg +0 -4
- package/assets/material/gatsby.svg +0 -1
- package/assets/material/gcp.svg +0 -1
- package/assets/material/gemfile.svg +0 -1
- package/assets/material/gemini.svg +0 -1
- package/assets/material/git.svg +0 -1
- package/assets/material/gitlab.svg +0 -1
- package/assets/material/gitpod.svg +0 -1
- package/assets/material/gleam.svg +0 -1
- package/assets/material/go-mod.svg +0 -1
- package/assets/material/go.svg +0 -1
- package/assets/material/go_gopher.svg +0 -1
- package/assets/material/godot-assets.svg +0 -7
- package/assets/material/godot.svg +0 -7
- package/assets/material/gradle.svg +0 -1
- package/assets/material/grain.svg +0 -1
- package/assets/material/graphcool.svg +0 -1
- package/assets/material/graphql.svg +0 -1
- package/assets/material/gridsome.svg +0 -1
- package/assets/material/groovy.svg +0 -1
- package/assets/material/grunt.svg +0 -1
- package/assets/material/gulp.svg +0 -1
- package/assets/material/h.svg +0 -1
- package/assets/material/hack.svg +0 -1
- package/assets/material/haml.svg +0 -1
- package/assets/material/handlebars.svg +0 -1
- package/assets/material/hardhat.svg +0 -1
- package/assets/material/haskell.svg +0 -1
- package/assets/material/haxe.svg +0 -1
- package/assets/material/hcl.svg +0 -1
- package/assets/material/hcl_light.svg +0 -1
- package/assets/material/helm.svg +0 -1
- package/assets/material/heroku.svg +0 -1
- package/assets/material/hex.svg +0 -1
- package/assets/material/horusec.svg +0 -1
- package/assets/material/hpp.svg +0 -1
- package/assets/material/html.svg +0 -1
- package/assets/material/http.svg +0 -1
- package/assets/material/husky.svg +0 -1
- package/assets/material/i18n.svg +0 -1
- package/assets/material/idris.svg +0 -1
- package/assets/material/ifanr-cloud.svg +0 -10
- package/assets/material/image.svg +0 -1
- package/assets/material/imba.svg +0 -1
- package/assets/material/ionic.svg +0 -1
- package/assets/material/istanbul.svg +0 -1
- package/assets/material/jar.svg +0 -1
- package/assets/material/java.svg +0 -1
- package/assets/material/javaclass.svg +0 -1
- package/assets/material/javascript-map.svg +0 -1
- package/assets/material/javascript.svg +0 -1
- package/assets/material/jenkins.svg +0 -1
- package/assets/material/jest.svg +0 -1
- package/assets/material/jinja.svg +0 -1
- package/assets/material/jinja_light.svg +0 -1
- package/assets/material/jsconfig.svg +0 -1
- package/assets/material/json.svg +0 -1
- package/assets/material/julia.svg +0 -1
- package/assets/material/jupyter.svg +0 -1
- package/assets/material/karma.svg +0 -1
- package/assets/material/key.svg +0 -1
- package/assets/material/kivy.svg +0 -1
- package/assets/material/kl.svg +0 -1
- package/assets/material/kotlin.svg +0 -1
- package/assets/material/kusto.svg +0 -1
- package/assets/material/laravel.svg +0 -1
- package/assets/material/lerna.svg +0 -1
- package/assets/material/less.svg +0 -1
- package/assets/material/lib.svg +0 -1
- package/assets/material/lighthouse.svg +0 -1
- package/assets/material/lilypond.svg +0 -1
- package/assets/material/liquid.svg +0 -1
- package/assets/material/lisp.svg +0 -1
- package/assets/material/livescript.svg +0 -1
- package/assets/material/lock.svg +0 -1
- package/assets/material/log.svg +0 -1
- package/assets/material/lolcode.svg +0 -1
- package/assets/material/lua.svg +0 -1
- package/assets/material/makefile.svg +0 -1
- package/assets/material/markdown.svg +0 -1
- package/assets/material/markojs.svg +0 -1
- package/assets/material/mathematica.svg +0 -1
- package/assets/material/matlab.svg +0 -1
- package/assets/material/maven.svg +0 -1
- package/assets/material/mdsvex.svg +0 -1
- package/assets/material/mdx.svg +0 -1
- package/assets/material/mercurial.svg +0 -6
- package/assets/material/merlin.svg +0 -1
- package/assets/material/mermaid.svg +0 -4
- package/assets/material/meson.svg +0 -1
- package/assets/material/minecraft.svg +0 -1
- package/assets/material/mint.svg +0 -1
- package/assets/material/mjml.svg +0 -1
- package/assets/material/mocha.svg +0 -1
- package/assets/material/modernizr.svg +0 -1
- package/assets/material/moonscript.svg +0 -1
- package/assets/material/mxml.svg +0 -1
- package/assets/material/nano-staged.svg +0 -1
- package/assets/material/nano-staged_light.svg +0 -1
- package/assets/material/ndst.svg +0 -1
- package/assets/material/nest-controller.svg +0 -1
- package/assets/material/nest-decorator.svg +0 -1
- package/assets/material/nest-filter.svg +0 -1
- package/assets/material/nest-gateway.svg +0 -1
- package/assets/material/nest-guard.svg +0 -1
- package/assets/material/nest-middleware.svg +0 -1
- package/assets/material/nest-module.svg +0 -1
- package/assets/material/nest-pipe.svg +0 -1
- package/assets/material/nest-resolver.svg +0 -1
- package/assets/material/nest-service.svg +0 -1
- package/assets/material/nest.svg +0 -1
- package/assets/material/netlify.svg +0 -7
- package/assets/material/netlify_light.svg +0 -7
- package/assets/material/next.svg +0 -1
- package/assets/material/next_light.svg +0 -1
- package/assets/material/nginx.svg +0 -1
- package/assets/material/ngrx-actions.svg +0 -1
- package/assets/material/ngrx-effects.svg +0 -1
- package/assets/material/ngrx-entity.svg +0 -1
- package/assets/material/ngrx-reducer.svg +0 -1
- package/assets/material/ngrx-selectors.svg +0 -1
- package/assets/material/ngrx-state.svg +0 -1
- package/assets/material/nim.svg +0 -1
- package/assets/material/nix.svg +0 -1
- package/assets/material/nodejs.svg +0 -1
- package/assets/material/nodejs_alt.svg +0 -1
- package/assets/material/nodemon.svg +0 -1
- package/assets/material/npm.svg +0 -1
- package/assets/material/nrwl.svg +0 -1
- package/assets/material/nuget.svg +0 -1
- package/assets/material/nunjucks.svg +0 -1
- package/assets/material/nuxt.svg +0 -1
- package/assets/material/objective-c.svg +0 -4
- package/assets/material/objective-cpp.svg +0 -1
- package/assets/material/ocaml.svg +0 -1
- package/assets/material/odin.svg +0 -1
- package/assets/material/opa.svg +0 -1
- package/assets/material/opam.svg +0 -1
- package/assets/material/otne.svg +0 -1
- package/assets/material/parcel.svg +0 -1
- package/assets/material/pascal.svg +0 -6
- package/assets/material/pawn.svg +0 -1
- package/assets/material/pdf.svg +0 -1
- package/assets/material/percy.svg +0 -1
- package/assets/material/perl.svg +0 -1
- package/assets/material/php-cs-fixer.svg +0 -1
- package/assets/material/php.svg +0 -1
- package/assets/material/php_elephant.svg +0 -1
- package/assets/material/php_elephant_pink.svg +0 -1
- package/assets/material/phpunit.svg +0 -1
- package/assets/material/pinejs.svg +0 -1
- package/assets/material/pipeline.svg +0 -1
- package/assets/material/plastic.svg +0 -7
- package/assets/material/playwright.svg +0 -1
- package/assets/material/plop.svg +0 -1
- package/assets/material/pnpm.svg +0 -1
- package/assets/material/pnpm_light.svg +0 -1
- package/assets/material/poetry.svg +0 -1
- package/assets/material/postcss.svg +0 -1
- package/assets/material/posthtml.svg +0 -1
- package/assets/material/powerpoint.svg +0 -1
- package/assets/material/powershell.svg +0 -1
- package/assets/material/prettier.svg +0 -1
- package/assets/material/prisma.svg +0 -1
- package/assets/material/processing.svg +0 -1
- package/assets/material/prolog.svg +0 -1
- package/assets/material/proto.svg +0 -1
- package/assets/material/protractor.svg +0 -1
- package/assets/material/pug.svg +0 -1
- package/assets/material/puppet.svg +0 -1
- package/assets/material/purescript.svg +0 -1
- package/assets/material/python-misc.svg +0 -1
- package/assets/material/python.svg +0 -1
- package/assets/material/qsharp.svg +0 -1
- package/assets/material/quasar.svg +0 -1
- package/assets/material/qwik.svg +0 -2
- package/assets/material/r.svg +0 -1
- package/assets/material/racket.svg +0 -1
- package/assets/material/raml.svg +0 -1
- package/assets/material/razor.svg +0 -1
- package/assets/material/rc.svg +0 -2
- package/assets/material/react.svg +0 -1
- package/assets/material/react_ts.svg +0 -1
- package/assets/material/readme.svg +0 -1
- package/assets/material/reason.svg +0 -1
- package/assets/material/red.svg +0 -1
- package/assets/material/redux-action.svg +0 -1
- package/assets/material/redux-reducer.svg +0 -1
- package/assets/material/redux-selector.svg +0 -1
- package/assets/material/redux-store.svg +0 -1
- package/assets/material/remix.svg +0 -1
- package/assets/material/remix_light.svg +0 -1
- package/assets/material/renovate.svg +0 -1
- package/assets/material/replit.svg +0 -1
- package/assets/material/rescript-interface.svg +0 -1
- package/assets/material/rescript.svg +0 -1
- package/assets/material/restql.svg +0 -1
- package/assets/material/riot.svg +0 -1
- package/assets/material/roadmap.svg +0 -1
- package/assets/material/robot.svg +0 -1
- package/assets/material/robots.svg +0 -1
- package/assets/material/rollup.svg +0 -1
- package/assets/material/rome.svg +0 -1
- package/assets/material/routing.svg +0 -1
- package/assets/material/rubocop.svg +0 -1
- package/assets/material/rubocop_light.svg +0 -1
- package/assets/material/ruby.svg +0 -1
- package/assets/material/rust.svg +0 -1
- package/assets/material/salesforce.svg +0 -1
- package/assets/material/san.svg +0 -1
- package/assets/material/sas.svg +0 -1
- package/assets/material/sass.svg +0 -1
- package/assets/material/sbt.svg +0 -1
- package/assets/material/scala.svg +0 -1
- package/assets/material/scheme.svg +0 -1
- package/assets/material/search.svg +0 -1
- package/assets/material/semantic-release.svg +0 -1
- package/assets/material/semantic-release_light.svg +0 -1
- package/assets/material/sentry.svg +0 -1
- package/assets/material/sequelize.svg +0 -1
- package/assets/material/serverless.svg +0 -1
- package/assets/material/settings.svg +0 -1
- package/assets/material/shader.svg +0 -1
- package/assets/material/shaderlab.svg +0 -1
- package/assets/material/silverstripe.svg +0 -1
- package/assets/material/siyuan.svg +0 -1
- package/assets/material/sketch.svg +0 -1
- package/assets/material/slim.svg +0 -1
- package/assets/material/slug.svg +0 -1
- package/assets/material/smarty.svg +0 -1
- package/assets/material/sml.svg +0 -1
- package/assets/material/snowpack.svg +0 -1
- package/assets/material/snowpack_light.svg +0 -1
- package/assets/material/snyk.svg +0 -1
- package/assets/material/solidity.svg +0 -1
- package/assets/material/sonarcloud.svg +0 -4
- package/assets/material/steadybit.svg +0 -1
- package/assets/material/stencil.svg +0 -1
- package/assets/material/stitches.svg +0 -1
- package/assets/material/stitches_light.svg +0 -1
- package/assets/material/storybook.svg +0 -1
- package/assets/material/stryker.svg +0 -1
- package/assets/material/stylable.svg +0 -10
- package/assets/material/stylelint.svg +0 -1
- package/assets/material/stylelint_light.svg +0 -1
- package/assets/material/stylus.svg +0 -1
- package/assets/material/sublime.svg +0 -1
- package/assets/material/supabase.svg +0 -4
- package/assets/material/svelte.svg +0 -1
- package/assets/material/svg.svg +0 -1
- package/assets/material/svgo.svg +0 -1
- package/assets/material/svgr.svg +0 -1
- package/assets/material/swc.svg +0 -1
- package/assets/material/swift.svg +0 -1
- package/assets/material/table.svg +0 -1
- package/assets/material/tailwindcss.svg +0 -1
- package/assets/material/tauri.svg +0 -1
- package/assets/material/tcl.svg +0 -1
- package/assets/material/teal.svg +0 -1
- package/assets/material/template.svg +0 -1
- package/assets/material/terraform.svg +0 -1
- package/assets/material/test-js.svg +0 -1
- package/assets/material/test-jsx.svg +0 -1
- package/assets/material/test-ts.svg +0 -1
- package/assets/material/tex.svg +0 -1
- package/assets/material/textlint.svg +0 -1
- package/assets/material/tilt.svg +0 -1
- package/assets/material/tldraw.svg +0 -4
- package/assets/material/tldraw_light.svg +0 -4
- package/assets/material/tobi.svg +0 -1
- package/assets/material/tobimake.svg +0 -1
- package/assets/material/todo.svg +0 -1
- package/assets/material/travis.svg +0 -1
- package/assets/material/tree.svg +0 -1
- package/assets/material/tsconfig.svg +0 -1
- package/assets/material/tune.svg +0 -1
- package/assets/material/turborepo.svg +0 -1
- package/assets/material/turborepo_light.svg +0 -1
- package/assets/material/twig.svg +0 -1
- package/assets/material/twine.svg +0 -1
- package/assets/material/typescript-def.svg +0 -1
- package/assets/material/typescript.svg +0 -1
- package/assets/material/typst.svg +0 -2
- package/assets/material/uml.svg +0 -1
- package/assets/material/uml_light.svg +0 -1
- package/assets/material/url.svg +0 -1
- package/assets/material/vagrant.svg +0 -1
- package/assets/material/vala.svg +0 -1
- package/assets/material/velocity.svg +0 -1
- package/assets/material/vercel.svg +0 -1
- package/assets/material/vercel_light.svg +0 -1
- package/assets/material/verdaccio.svg +0 -1
- package/assets/material/verilog.svg +0 -1
- package/assets/material/vfl.svg +0 -1
- package/assets/material/video.svg +0 -1
- package/assets/material/vim.svg +0 -1
- package/assets/material/virtual.svg +0 -1
- package/assets/material/visualstudio.svg +0 -1
- package/assets/material/vite.svg +0 -1
- package/assets/material/vitest.svg +0 -6
- package/assets/material/vlang.svg +0 -1
- package/assets/material/vscode.svg +0 -1
- package/assets/material/vue-config.svg +0 -1
- package/assets/material/vue.svg +0 -1
- package/assets/material/vuex-store.svg +0 -1
- package/assets/material/wakatime.svg +0 -1
- package/assets/material/wakatime_light.svg +0 -1
- package/assets/material/wallaby.svg +0 -1
- package/assets/material/watchman.svg +0 -1
- package/assets/material/webassembly.svg +0 -1
- package/assets/material/webhint.svg +0 -1
- package/assets/material/webpack.svg +0 -1
- package/assets/material/wepy.svg +0 -1
- package/assets/material/windicss.svg +0 -1
- package/assets/material/wolframlanguage.svg +0 -1
- package/assets/material/word.svg +0 -1
- package/assets/material/xaml.svg +0 -1
- package/assets/material/xml.svg +0 -1
- package/assets/material/yaml.svg +0 -1
- package/assets/material/yang.svg +0 -1
- package/assets/material/yarn.svg +0 -1
- package/assets/material/zig.svg +0 -1
- package/assets/material/zip.svg +0 -1
- package/assets/pop/LICENSE +0 -2
- package/assets/pop/binary.svg +0 -1
- package/assets/pop/compressed.svg +0 -1
- package/assets/pop/database.svg +0 -1
- package/assets/pop/exts/7z.svg +0 -1
- package/assets/pop/exts/apk.svg +0 -1
- package/assets/pop/exts/arc.svg +0 -1
- package/assets/pop/exts/bz.svg +0 -1
- package/assets/pop/exts/deb.svg +0 -1
- package/assets/pop/exts/gz.svg +0 -1
- package/assets/pop/exts/pdf.svg +0 -1
- package/assets/pop/exts/rar.svg +0 -1
- package/assets/pop/exts/rpm.svg +0 -1
- package/assets/pop/exts/tar.svg +0 -1
- package/assets/pop/exts/xar.svg +0 -1
- package/assets/pop/exts/xz.svg +0 -1
- package/assets/pop/exts/zip.svg +0 -1
- package/assets/pop/folder-open.svg +0 -1
- package/assets/pop/folder.svg +0 -1
- package/assets/pop/generic.svg +0 -1
- package/assets/pop/presentation.svg +0 -1
- package/assets/pop/richtext.svg +0 -1
- package/assets/pop/spreadsheet.svg +0 -1
- package/assets/pop/text.svg +0 -1
- package/esm2022/components/lazy-loader/lazy-loader.component.mjs +0 -383
- package/esm2022/components/lazy-loader/lazy-loader.module.mjs +0 -33
- package/esm2022/components/lazy-loader/lazy-loader.service.mjs +0 -217
- package/esm2022/components/lazy-loader/types.mjs +0 -26
- package/esm2022/components/menu/menu.component.mjs +0 -433
- package/esm2022/components/parallax-card/parallax-card.component.mjs +0 -138
- package/esm2022/components/tooltip/tooltip.component.mjs +0 -205
- package/esm2022/components/types.mjs +0 -3
- package/esm2022/directives/image-cache.directive.mjs +0 -143
- package/esm2022/directives/menu.directive.mjs +0 -159
- package/esm2022/directives/tooltip.directive.mjs +0 -154
- package/esm2022/directives/utils.mjs +0 -120
- package/esm2022/pipes/html-bypass.pipe.mjs +0 -27
- package/esm2022/pipes/resource-bypass.pipe.mjs +0 -27
- package/esm2022/pipes/script-bypass.pipe.mjs +0 -27
- package/esm2022/pipes/style-bypass.pipe.mjs +0 -27
- package/esm2022/pipes/url-bypass.pipe.mjs +0 -27
- package/esm2022/public-api.mjs +0 -46
- package/esm2022/services/dependency.service.mjs +0 -55
- package/esm2022/services/dialog.service.mjs +0 -69
- package/esm2022/services/fetch.service.mjs +0 -74
- package/esm2022/services/file.service.mjs +0 -42
- package/esm2022/services/keyboard.service.mjs +0 -128
- package/esm2022/services/navigation.service.mjs +0 -52
- package/esm2022/services/theme.service.mjs +0 -64
- package/esm2022/types/menu.mjs +0 -2
- package/esm2022/types/popup.mjs +0 -2
- package/esm2022/types/tooltip.mjs +0 -2
- package/esm2022/utils/index.mjs +0 -205
- package/utils/index.d.ts +0 -128
- /package/{components → core/components}/lazy-loader/lazy-loader.component.d.ts +0 -0
- /package/{components → core/components}/lazy-loader/lazy-loader.module.d.ts +0 -0
- /package/{components → core/components}/lazy-loader/lazy-loader.service.d.ts +0 -0
- /package/{components → core/components}/lazy-loader/types.d.ts +0 -0
- /package/{components → core/components}/parallax-card/parallax-card.component.d.ts +0 -0
- /package/{directives → core/directives}/image-cache.directive.d.ts +0 -0
- /package/{directives → core/directives}/utils.d.ts +0 -0
- /package/{pipes → core/pipes}/html-bypass.pipe.d.ts +0 -0
- /package/{pipes → core/pipes}/resource-bypass.pipe.d.ts +0 -0
- /package/{pipes → core/pipes}/script-bypass.pipe.d.ts +0 -0
- /package/{pipes → core/pipes}/style-bypass.pipe.d.ts +0 -0
- /package/{pipes → core/pipes}/url-bypass.pipe.d.ts +0 -0
- /package/{services → core/services}/dependency.service.d.ts +0 -0
- /package/{services → core/services}/dialog.service.d.ts +0 -0
- /package/{services → core/services}/fetch.service.d.ts +0 -0
- /package/{services → core/services}/file.service.d.ts +0 -0
- /package/{services → core/services}/keyboard.service.d.ts +0 -0
- /package/{services → core/services}/theme.service.d.ts +0 -0
- /package/{types → core/types}/popup.d.ts +0 -0
|
@@ -1,2763 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { createInstance, INDEXEDDB } from 'localforage';
|
|
4
|
-
import * as i1$1 from '@angular/material/dialog';
|
|
5
|
-
import { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
|
6
|
-
import { NgTemplateOutlet, NgComponentOutlet, DOCUMENT } from '@angular/common';
|
|
7
|
-
import * as i1 from '@angular/platform-browser';
|
|
8
|
-
import { createApplication } from '@angular/platform-browser';
|
|
9
|
-
import * as i4 from '@angular/material/icon';
|
|
10
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
11
|
-
import * as i5 from '@angular/material/progress-spinner';
|
|
12
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
13
|
-
import * as i3 from '@angular/cdk/portal';
|
|
14
|
-
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
15
|
-
import { firstValueFrom, debounceTime, of, Subject, BehaviorSubject } from 'rxjs';
|
|
16
|
-
import { ulid } from 'ulidx';
|
|
17
|
-
import * as i2 from '@angular/cdk/dialog';
|
|
18
|
-
import { retry } from 'rxjs/operators';
|
|
19
|
-
import * as i1$2 from '@angular/common/http';
|
|
20
|
-
import { __decorate, __param } from 'tslib';
|
|
21
|
-
|
|
22
|
-
const storage = createInstance({
|
|
23
|
-
name: "@dotglitch",
|
|
24
|
-
storeName: "image-cache",
|
|
25
|
-
driver: INDEXEDDB,
|
|
26
|
-
version: 1
|
|
27
|
-
});
|
|
28
|
-
const imageCache = {};
|
|
29
|
-
const loadingSvg = `data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="50" cy="50" fill="none" stroke="%2340c4ff" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform></circle><!-- [ldio] generated by https://loading.io/ --></svg>`;
|
|
30
|
-
const brokenSvg = `data:image/svg+xml;utf8,<svg width="800" height="800" viewBox="0 0 24 24" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><line x1="10.08" y1="8.29" x2="10.18" y2="8.29" style="fill:none;stroke:#000000;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round" /><path d="m 10.51,14.8 5.2,5.2 H 20 a 1,1 0 0 0 1,-1 V 15.73 L 15.29,10 Z M 3,16.71 V 19 a 1,1 0 0 0 1,1 h 11.71 l -8,-8 z M 21,5 v 14 a 1,1 0 0 1 -1,1 H 4 A 1,1 0 0 1 3,19 V 5 A 1,1 0 0 1 4,4 h 16 a 1,1 0 0 1 1,1 z" style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" /><path d="M 21.193388,21.193388 2.8066108,2.8066108 m 18.3867772,0 L 2.8066108,21.193388" style="stroke:%23ff0000;stroke-width:2.62668;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" /></svg>`;
|
|
31
|
-
const NGX_IMAGE_CACHE_CONFIG = new InjectionToken('ngx-image-cache-config');
|
|
32
|
-
class NgxImageCacheDirective {
|
|
33
|
-
get el() { return this.element.nativeElement; }
|
|
34
|
-
constructor(element, cacheConfig) {
|
|
35
|
-
this.element = element;
|
|
36
|
-
this.cacheConfig = cacheConfig;
|
|
37
|
-
}
|
|
38
|
-
ngOnChanges() {
|
|
39
|
-
this.getCachedImage();
|
|
40
|
-
}
|
|
41
|
-
async getCachedImage() {
|
|
42
|
-
if (this.el.src?.trim() == this.url?.trim() || // Check that there's an actual change
|
|
43
|
-
this.url?.trim().length == 0 // Check that there's an actual URL
|
|
44
|
-
)
|
|
45
|
-
return;
|
|
46
|
-
// Check if it's in the memory cache
|
|
47
|
-
if (imageCache[this.url]) {
|
|
48
|
-
const image = imageCache[this.url];
|
|
49
|
-
// If the image is currently loading, show the loader
|
|
50
|
-
// and add it to the reflist
|
|
51
|
-
if (image['_loading'] == true) {
|
|
52
|
-
image['_refs'].push(this.el);
|
|
53
|
-
this.el.setAttribute("loading", "true");
|
|
54
|
-
this.el.src = this.cacheConfig?.loadingPlaceholder || loadingSvg;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
// The image is fully loaded, swap out the src with a data-uri
|
|
58
|
-
this.el.setAttribute("loading", "false");
|
|
59
|
-
this.el.src = image.src;
|
|
60
|
-
}
|
|
61
|
-
// If it's already in the image cache, we're going to trust that it loads properly.
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
// Check if it's in indexedDB
|
|
65
|
-
if (this.configuration?.cacheInIndexedDB != false) {
|
|
66
|
-
const cached = await storage.getItem(this.url);
|
|
67
|
-
if (cached) {
|
|
68
|
-
// Attempt to load the base64 data from indexeddb.
|
|
69
|
-
// If this fails, we'll fall back to attempting to download the image
|
|
70
|
-
this.el.src = cached.data;
|
|
71
|
-
const evt = await new Promise(res => {
|
|
72
|
-
this.el.addEventListener('load', res);
|
|
73
|
-
this.el.addEventListener('error', res);
|
|
74
|
-
});
|
|
75
|
-
// If the event isn't an error
|
|
76
|
-
if (evt.type == "load") {
|
|
77
|
-
this.el.setAttribute("loading", "false");
|
|
78
|
-
if (this.configuration?.cacheInMemory != false) {
|
|
79
|
-
// Successfully loaded into element
|
|
80
|
-
// Create an entry in the memory cache
|
|
81
|
-
const image = imageCache[this.url] = new Image();
|
|
82
|
-
image.src = cached.data;
|
|
83
|
-
image['_createdAt'] = Date.now();
|
|
84
|
-
}
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
// Else, we try to load again.
|
|
89
|
-
this.el.src = this.cacheConfig?.loadingPlaceholder || loadingSvg;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const image = (() => {
|
|
94
|
-
if (this.configuration?.cacheInMemory != false) {
|
|
95
|
-
return imageCache[this.url] = new Image();
|
|
96
|
-
}
|
|
97
|
-
return new Image();
|
|
98
|
-
})();
|
|
99
|
-
// const clone = image.cloneNode(true) as HTMLImageElement;
|
|
100
|
-
image['_refs'] = image['_refs'] ?? [];
|
|
101
|
-
image['_refs'].push(this.el);
|
|
102
|
-
image['_loading'] = true;
|
|
103
|
-
image['_createdAt'] = Date.now();
|
|
104
|
-
// Show a loader while the image downloads.
|
|
105
|
-
this.el.setAttribute("loading", "true");
|
|
106
|
-
this.el.src = this.cacheConfig?.loadingPlaceholder || loadingSvg;
|
|
107
|
-
// Fetch the image via JS and cache it as base64
|
|
108
|
-
window.fetch(this.url)
|
|
109
|
-
.then(response => response.blob())
|
|
110
|
-
.then(blob => new Promise((resolve, reject) => {
|
|
111
|
-
const reader = new FileReader();
|
|
112
|
-
reader.onloadend = () => {
|
|
113
|
-
image.src = reader.result;
|
|
114
|
-
storage.setItem(this.url, {
|
|
115
|
-
timestamp: Date.now(),
|
|
116
|
-
data: reader.result
|
|
117
|
-
});
|
|
118
|
-
image['_refs'].forEach((ref) => {
|
|
119
|
-
ref.src = image.src;
|
|
120
|
-
});
|
|
121
|
-
image['_loading'] = false;
|
|
122
|
-
resolve(0);
|
|
123
|
-
};
|
|
124
|
-
reader.onerror = reject;
|
|
125
|
-
reader.readAsDataURL(blob);
|
|
126
|
-
}))
|
|
127
|
-
.catch(err => {
|
|
128
|
-
// If a failure occurs, purge this entry from the cache
|
|
129
|
-
// TODO: Render better "broken" image
|
|
130
|
-
delete imageCache[this.url];
|
|
131
|
-
image['_refs'].forEach((ref) => {
|
|
132
|
-
ref.src = this.cacheConfig?.brokenPlaceholder || brokenSvg;
|
|
133
|
-
ref.setAttribute("loading", "failed");
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxImageCacheDirective, deps: [{ token: i0.ElementRef }, { token: NGX_IMAGE_CACHE_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
138
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NgxImageCacheDirective, isStandalone: true, selector: "img[ngx-cache]", inputs: { url: ["source", "url"], configuration: ["ngx-cache-config", "configuration"] }, usesOnChanges: true, ngImport: i0 }); }
|
|
139
|
-
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxImageCacheDirective, decorators: [{
|
|
141
|
-
type: Directive,
|
|
142
|
-
args: [{
|
|
143
|
-
selector: 'img[ngx-cache]',
|
|
144
|
-
standalone: true
|
|
145
|
-
}]
|
|
146
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
147
|
-
type: Optional
|
|
148
|
-
}, {
|
|
149
|
-
type: Inject,
|
|
150
|
-
args: [NGX_IMAGE_CACHE_CONFIG]
|
|
151
|
-
}] }], propDecorators: { url: [{
|
|
152
|
-
type: Input,
|
|
153
|
-
args: ["source"]
|
|
154
|
-
}, {
|
|
155
|
-
type: Input,
|
|
156
|
-
args: ["ngx-cache"]
|
|
157
|
-
}], configuration: [{
|
|
158
|
-
type: Input,
|
|
159
|
-
args: ["ngx-cache-config"]
|
|
160
|
-
}] } });
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* This utils file exists outside of the strict angular DI zone
|
|
164
|
-
* This enables opening popups without requiring absolute DI bindings.
|
|
165
|
-
*/
|
|
166
|
-
const getPosition = (el, config = {}, bounds) => {
|
|
167
|
-
// Bounds of the popup owner
|
|
168
|
-
const src = !!el['nodeName']
|
|
169
|
-
? el.getBoundingClientRect()
|
|
170
|
-
: {
|
|
171
|
-
// It's a pointer event, so we'll take the X and Y from the pointer.
|
|
172
|
-
x: el['clientX'],
|
|
173
|
-
y: el['clientY'],
|
|
174
|
-
// Set a default tiny size, so we don't divide by zero.
|
|
175
|
-
width: 0.0001,
|
|
176
|
-
height: 0.0001
|
|
177
|
-
};
|
|
178
|
-
// Popup bounds
|
|
179
|
-
const { width, height } = bounds;
|
|
180
|
-
const winh = window.innerHeight;
|
|
181
|
-
const winw = window.innerWidth;
|
|
182
|
-
const cords = {
|
|
183
|
-
top: null,
|
|
184
|
-
left: null
|
|
185
|
-
};
|
|
186
|
-
if (config?.position == "left" || config?.position == "right" || !config?.position) {
|
|
187
|
-
switch (config?.alignment) {
|
|
188
|
-
case "end": {
|
|
189
|
-
// vertically bind to bottom
|
|
190
|
-
cords.top = src.y + src.height - height;
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
case "afterend": {
|
|
194
|
-
// vertically bind below bottom
|
|
195
|
-
cords.top = src.y + src.height;
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
case "beforestart": {
|
|
199
|
-
// vertically bind above top
|
|
200
|
-
cords.top = src.y - height;
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
case "start": {
|
|
204
|
-
// vertically bind to top
|
|
205
|
-
cords.top = src.y;
|
|
206
|
-
break;
|
|
207
|
-
}
|
|
208
|
-
case "center":
|
|
209
|
-
default: {
|
|
210
|
-
// vertically center
|
|
211
|
-
cords.top = (src.y + (src.height / 2)) - (height / 2);
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
// Apply bounds to prevent the dialog from being cut-off screen
|
|
216
|
-
// Lower bound
|
|
217
|
-
cords.top = Math.max(config?.edgePadding || 0, cords.top);
|
|
218
|
-
// Upper bound
|
|
219
|
-
cords.top = Math.min(winh - height, cords.top);
|
|
220
|
-
if (config?.position == "left") {
|
|
221
|
-
cords.left = src.x - (width + (config?.arrowSize || 0) + (config?.arrowPadding || 0));
|
|
222
|
-
}
|
|
223
|
-
if (config?.position == "right" || !config?.position) {
|
|
224
|
-
cords.left = src.x + (src.width + (config?.arrowSize || 0) + (config?.arrowPadding || 0));
|
|
225
|
-
}
|
|
226
|
-
// Lower bound
|
|
227
|
-
cords.left = Math.max(config?.edgePadding || 0, cords.left);
|
|
228
|
-
// Upper bound
|
|
229
|
-
cords.left = Math.min(winw - width, cords.left);
|
|
230
|
-
}
|
|
231
|
-
else if (config?.position == "top" || config?.position == "bottom") {
|
|
232
|
-
switch (config?.alignment) {
|
|
233
|
-
case "end": {
|
|
234
|
-
// vertically bind to right
|
|
235
|
-
cords.left = src.x + src.width - width;
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
case "afterend": {
|
|
239
|
-
// vertically bind past right
|
|
240
|
-
cords.left = src.x + src.width;
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
case "beforestart": {
|
|
244
|
-
// vertically bind before left
|
|
245
|
-
cords.left = src.x - width;
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
case "start": {
|
|
249
|
-
// vertically bind to left
|
|
250
|
-
cords.left = src.x;
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
case "center":
|
|
254
|
-
default: {
|
|
255
|
-
// vertically center
|
|
256
|
-
cords.left = (src.x + (src.width / 2)) - (width / 2);
|
|
257
|
-
break;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
// Apply bounds to prevent the dialog from being cut-off screen
|
|
261
|
-
// Lower bound
|
|
262
|
-
cords.left = Math.max(config?.edgePadding || 0, cords.left);
|
|
263
|
-
// Upper bound
|
|
264
|
-
cords.left = Math.min(winw - width, cords.left);
|
|
265
|
-
if (config?.position == "top") {
|
|
266
|
-
cords.top = src.y - (height + (config?.arrowSize || 0) + (config?.arrowPadding || 0));
|
|
267
|
-
}
|
|
268
|
-
if (config?.position == "bottom") {
|
|
269
|
-
cords.top = src.y + (src.height + (config?.arrowSize || 0) + (config?.arrowPadding || 0));
|
|
270
|
-
}
|
|
271
|
-
// Lower bound
|
|
272
|
-
cords.top = Math.max(config?.edgePadding || 0, cords.top);
|
|
273
|
-
// Upper bound
|
|
274
|
-
cords.top = Math.min(winh - height, cords.top);
|
|
275
|
-
}
|
|
276
|
-
// Assign unit
|
|
277
|
-
cords.top = cords.top + 'px';
|
|
278
|
-
cords.left = cords.left + 'px';
|
|
279
|
-
return cords;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
const zone$1 = new Zone(Zone.current, { name: "@dotglitch_menu", properties: {} });
|
|
283
|
-
const calcMenuItemBounds = async (menuItems, dataObj) => {
|
|
284
|
-
const data = {
|
|
285
|
-
data: dataObj,
|
|
286
|
-
items: menuItems,
|
|
287
|
-
config: {},
|
|
288
|
-
selfCords: { left: "0px", top: "0px" },
|
|
289
|
-
ownerCords: { x: 0, y: 0, width: 0, height: 0 },
|
|
290
|
-
id: null
|
|
291
|
-
};
|
|
292
|
-
return calcComponentBounds(MenuComponent, data);
|
|
293
|
-
};
|
|
294
|
-
const calcComponentBounds = async (component, data) => {
|
|
295
|
-
return new Promise((res, rej) => {
|
|
296
|
-
zone$1.run(async () => {
|
|
297
|
-
const app = await createApplication({
|
|
298
|
-
providers: [
|
|
299
|
-
{ provide: MAT_DIALOG_DATA, useValue: data }
|
|
300
|
-
]
|
|
301
|
-
});
|
|
302
|
-
const del = document.createElement("div");
|
|
303
|
-
del.classList.add("ngx-menu");
|
|
304
|
-
del.style.position = "absolute";
|
|
305
|
-
del.style.left = '-1000vw';
|
|
306
|
-
document.body.append(del);
|
|
307
|
-
const base = app.bootstrap(component, del);
|
|
308
|
-
const { instance } = base;
|
|
309
|
-
await firstValueFrom(app.isStable);
|
|
310
|
-
const el = instance.viewContainer?.element?.nativeElement;
|
|
311
|
-
const rect = el.getBoundingClientRect();
|
|
312
|
-
app.destroy();
|
|
313
|
-
del.remove();
|
|
314
|
-
res(rect);
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
const $data = Symbol("data");
|
|
319
|
-
const $hover = Symbol("hover");
|
|
320
|
-
class MenuComponent {
|
|
321
|
-
constructor(viewContainer, sanitizer, _data, dialog, // optional only for the purpose of estimating dimensions
|
|
322
|
-
dialogRef) {
|
|
323
|
-
this.viewContainer = viewContainer;
|
|
324
|
-
this.sanitizer = sanitizer;
|
|
325
|
-
this._data = _data;
|
|
326
|
-
this.dialog = dialog;
|
|
327
|
-
this.dialogRef = dialogRef;
|
|
328
|
-
this.overlayOverlap = 32;
|
|
329
|
-
this.hoverDelay = 400;
|
|
330
|
-
this.showDebugOverlay = false;
|
|
331
|
-
this.isLockedOpen = false;
|
|
332
|
-
this.hasBootstrapped = false;
|
|
333
|
-
this.pointerIsOnVoid = false;
|
|
334
|
-
this.pointerHasBeenOverMask = false;
|
|
335
|
-
this.parentIsNgxMenu = false;
|
|
336
|
-
this.coverRectCords = {
|
|
337
|
-
top: 0,
|
|
338
|
-
left: 0,
|
|
339
|
-
height: 0,
|
|
340
|
-
width: 0
|
|
341
|
-
};
|
|
342
|
-
// Check if there are any slashes or dots -- that will clearly exclude it from being a mat icon
|
|
343
|
-
this.matIconRx = /[\/\.]/i;
|
|
344
|
-
this.showIconColumn = true;
|
|
345
|
-
this.showShortcutColumn = true;
|
|
346
|
-
this.childDialogs = [];
|
|
347
|
-
// Defaults are set before @Input() hooks evaluate
|
|
348
|
-
this.dialog = this.dialog || this._data?.dialog;
|
|
349
|
-
this.data = this._data?.data;
|
|
350
|
-
this.ownerCords = this._data?.ownerCords;
|
|
351
|
-
this.selfCords = this._data?.selfCords;
|
|
352
|
-
this.items = this._data?.items;
|
|
353
|
-
this.config = this._data?.config;
|
|
354
|
-
this.id = this._data?.id;
|
|
355
|
-
this.parentItem = this._data?.parentItem;
|
|
356
|
-
this.parentContext = this._data?.parentContext;
|
|
357
|
-
this.isLockedOpen = this.isLockedOpen || this._data?.config?.['_isLockedOpen'];
|
|
358
|
-
this.parentIsNgxMenu = this._data?.parentIsNgxMenu;
|
|
359
|
-
this.targetBounds = this._data?.targetBounds;
|
|
360
|
-
this.template = this._data?.template;
|
|
361
|
-
this.templateType = this.template instanceof TemplateRef ? "template" : "component";
|
|
362
|
-
if (this.templateType == "component") {
|
|
363
|
-
this.componentPortal = new ComponentPortal(this.template);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
ngOnInit() {
|
|
367
|
-
this.items?.forEach(i => {
|
|
368
|
-
if (typeof i == "string")
|
|
369
|
-
return;
|
|
370
|
-
// Set defaults
|
|
371
|
-
i['_disabled'] = false;
|
|
372
|
-
i['_visible'] = true;
|
|
373
|
-
i['_context'] = (typeof i.context == "function")
|
|
374
|
-
? i.context(this.data)
|
|
375
|
-
: i.context;
|
|
376
|
-
if (i.label)
|
|
377
|
-
try {
|
|
378
|
-
i['_formattedLabel'] = this.formatLabel(i.label);
|
|
379
|
-
}
|
|
380
|
-
catch (e) {
|
|
381
|
-
console.warn(e);
|
|
382
|
-
}
|
|
383
|
-
if (typeof i.isDisabled == "function")
|
|
384
|
-
try {
|
|
385
|
-
i['_disabled'] = i.isDisabled(this.data || {}, i['_context']);
|
|
386
|
-
}
|
|
387
|
-
catch (e) {
|
|
388
|
-
console.warn(e);
|
|
389
|
-
}
|
|
390
|
-
if (typeof i.isVisible == "function")
|
|
391
|
-
try {
|
|
392
|
-
i['_visible'] = i.isVisible(this.data || {}, i['_context']);
|
|
393
|
-
}
|
|
394
|
-
catch (e) {
|
|
395
|
-
console.warn(e);
|
|
396
|
-
}
|
|
397
|
-
if (typeof i.linkTemplate == "function")
|
|
398
|
-
try {
|
|
399
|
-
i['_link'] = i.linkTemplate(this.data || {}, i['_context']);
|
|
400
|
-
}
|
|
401
|
-
catch (e) {
|
|
402
|
-
console.warn(e);
|
|
403
|
-
}
|
|
404
|
-
if (typeof i.iconTemplate == "function")
|
|
405
|
-
try {
|
|
406
|
-
i['_icon'] = i.iconTemplate(this.data || {}, i['_context']);
|
|
407
|
-
}
|
|
408
|
-
catch (e) {
|
|
409
|
-
console.warn(e);
|
|
410
|
-
}
|
|
411
|
-
});
|
|
412
|
-
// Show the icon column if there are any items with an icon
|
|
413
|
-
this.showIconColumn = !!this.items?.find(i => typeof i == "object" &&
|
|
414
|
-
typeof i['icon'] == "string" &&
|
|
415
|
-
i['icon'].length > 2);
|
|
416
|
-
this.showShortcutColumn = !!this.items?.find(i => typeof i == "object" &&
|
|
417
|
-
typeof i['shortcut'] == "string" &&
|
|
418
|
-
i['shortcut'].length > 2);
|
|
419
|
-
if (this.ownerCords) {
|
|
420
|
-
const selfY = parseInt(this.selfCords.top?.replace('px', '') || '0');
|
|
421
|
-
const selfX = parseInt(this.selfCords.left?.replace('px', '') || '0');
|
|
422
|
-
this.coverRectCords = {
|
|
423
|
-
top: this.ownerCords.y - selfY - (this.overlayOverlap / 2),
|
|
424
|
-
left: this.ownerCords.x - selfX - (this.overlayOverlap / 2),
|
|
425
|
-
height: this.ownerCords.height + this.overlayOverlap,
|
|
426
|
-
width: this.ownerCords.width + this.overlayOverlap
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
if (this.config?.stayOpen)
|
|
430
|
-
this.isLockedOpen = true;
|
|
431
|
-
setTimeout(() => {
|
|
432
|
-
this.hasBootstrapped = true;
|
|
433
|
-
}, 200);
|
|
434
|
-
}
|
|
435
|
-
ngAfterViewInit() {
|
|
436
|
-
const el = this.viewContainer.element.nativeElement;
|
|
437
|
-
el.addEventListener("keydown", evt => {
|
|
438
|
-
this.isLockedOpen = true;
|
|
439
|
-
});
|
|
440
|
-
el.addEventListener("pointerdown", evt => {
|
|
441
|
-
this.isLockedOpen = true;
|
|
442
|
-
});
|
|
443
|
-
el.addEventListener("touch", evt => {
|
|
444
|
-
this.isLockedOpen = true;
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
ngOnDestroy() {
|
|
448
|
-
//
|
|
449
|
-
this.childDialogs.forEach(d => d.close({ [$data]: true }));
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
*
|
|
453
|
-
*/
|
|
454
|
-
async onMenuItemClick(item, row, keepOpen = false) {
|
|
455
|
-
if (typeof item == 'string')
|
|
456
|
-
return null;
|
|
457
|
-
if (item.separator)
|
|
458
|
-
return null;
|
|
459
|
-
const context = await item['_context'];
|
|
460
|
-
// If cache is enabled, only load if we don't have any children.
|
|
461
|
-
const forceLoad = (item.cacheResolvedChildren ? !item.children : true);
|
|
462
|
-
if (item.childrenResolver && forceLoad) {
|
|
463
|
-
item['_isResolving'] = true;
|
|
464
|
-
item['_children'] = await item.childrenResolver(this.data, context);
|
|
465
|
-
item['_isResolving'] = false;
|
|
466
|
-
}
|
|
467
|
-
else if (typeof item.children == "function" && forceLoad) {
|
|
468
|
-
item['_isResolving'] = true;
|
|
469
|
-
item['_children'] = await item.children(this.data, context);
|
|
470
|
-
item['_isResolving'] = false;
|
|
471
|
-
}
|
|
472
|
-
else {
|
|
473
|
-
item['_children'] = item.children;
|
|
474
|
-
}
|
|
475
|
-
if (item['_children'] || item.childTemplate)
|
|
476
|
-
row['_open'] = true;
|
|
477
|
-
if (!item.childTemplate && !item.children) {
|
|
478
|
-
if (typeof item.action == "function") {
|
|
479
|
-
const res = await item.action(this.data, context);
|
|
480
|
-
this.close(res === undefined ? true : res);
|
|
481
|
-
return res;
|
|
482
|
-
}
|
|
483
|
-
// If no action, this is simply a text item.
|
|
484
|
-
return null;
|
|
485
|
-
}
|
|
486
|
-
// Need X pos, Y pos, width and height
|
|
487
|
-
const bounds = row.getBoundingClientRect();
|
|
488
|
-
const cords = {
|
|
489
|
-
top: null,
|
|
490
|
-
left: null,
|
|
491
|
-
bottom: null,
|
|
492
|
-
// right: null
|
|
493
|
-
};
|
|
494
|
-
// Set position coordinates
|
|
495
|
-
const targetBounds = await (item.childTemplate
|
|
496
|
-
? calcComponentBounds(MenuComponent, { template: item.childTemplate })
|
|
497
|
-
: calcMenuItemBounds(item['_children'], this.data));
|
|
498
|
-
const { width, height } = targetBounds;
|
|
499
|
-
if (bounds.y + height > window.innerHeight)
|
|
500
|
-
cords.bottom = "0px";
|
|
501
|
-
if (bounds.x + bounds.width + width > window.innerWidth)
|
|
502
|
-
cords.left = ((bounds.x - width)) + "px";
|
|
503
|
-
if (!cords.bottom)
|
|
504
|
-
cords.top = bounds.y + "px";
|
|
505
|
-
if (!cords.left)
|
|
506
|
-
cords.left = bounds.x + bounds.width + "px";
|
|
507
|
-
const config = structuredClone(this.config);
|
|
508
|
-
config['_isLockedOpen'] = keepOpen;
|
|
509
|
-
// Do not project in the top left corner -- this scenario
|
|
510
|
-
// happens when a dialog opens as the parent is killed.
|
|
511
|
-
if (cords.left == '0px' && cords.top == '0px')
|
|
512
|
-
return;
|
|
513
|
-
const dialogRef = this.dialog.open(MenuComponent, {
|
|
514
|
-
position: cords,
|
|
515
|
-
panelClass: ["ngx-menu"].concat(this.config?.customClass || []),
|
|
516
|
-
backdropClass: "ngx-menu-backdrop",
|
|
517
|
-
hasBackdrop: false,
|
|
518
|
-
data: {
|
|
519
|
-
data: this.data,
|
|
520
|
-
ownerCords: row.getBoundingClientRect(),
|
|
521
|
-
selfCords: cords,
|
|
522
|
-
parentItem: item,
|
|
523
|
-
parentContext: context,
|
|
524
|
-
items: item['_children'],
|
|
525
|
-
template: item.childTemplate,
|
|
526
|
-
config: config,
|
|
527
|
-
parentIsNgxMenu: true,
|
|
528
|
-
targetBounds
|
|
529
|
-
}
|
|
530
|
-
});
|
|
531
|
-
let _s = dialogRef
|
|
532
|
-
.afterClosed()
|
|
533
|
-
.subscribe(async (result) => {
|
|
534
|
-
// Clicked "void" on a submenu
|
|
535
|
-
if (typeof result == "object" && result[$data] == true) {
|
|
536
|
-
this.close(result);
|
|
537
|
-
}
|
|
538
|
-
// Went back to parent menu -- do not close (same as result == null)
|
|
539
|
-
else if (typeof result == "object" && result[$data] == false) {
|
|
540
|
-
}
|
|
541
|
-
// Got some other result value
|
|
542
|
-
else if (result != null) {
|
|
543
|
-
// Perform action callback
|
|
544
|
-
if (typeof item.action == 'function') {
|
|
545
|
-
this.close(await item.action(result, context));
|
|
546
|
-
}
|
|
547
|
-
// Just close.
|
|
548
|
-
else {
|
|
549
|
-
this.close();
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
row['_open'] = false;
|
|
553
|
-
this.childDialogs.splice(this.childDialogs.indexOf(dialogRef), 1);
|
|
554
|
-
_s.unsubscribe();
|
|
555
|
-
});
|
|
556
|
-
this.childDialogs.push(dialogRef);
|
|
557
|
-
return dialogRef;
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
*
|
|
561
|
-
* @param label
|
|
562
|
-
* @returns
|
|
563
|
-
*/
|
|
564
|
-
formatLabel(label) {
|
|
565
|
-
return label.replace(/_([a-z0-9])_/i, (match, group) => `<u>${group}</u>`);
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* Close the context menu under these circumstances
|
|
569
|
-
*/
|
|
570
|
-
// @HostListener("window:resize", ['event'])
|
|
571
|
-
// @HostListener("window:blur", ['event'])
|
|
572
|
-
close(result) {
|
|
573
|
-
this.childDialogs.forEach(d => d.close());
|
|
574
|
-
this.dialogRef?.close(result);
|
|
575
|
-
}
|
|
576
|
-
closeOnVoid(force = false) {
|
|
577
|
-
if (!this.isLockedOpen || force) {
|
|
578
|
-
this.close({ [$data]: force });
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
startHoverTimer(item, row) {
|
|
582
|
-
// Invert check to make the logic simpler
|
|
583
|
-
// TL;DR: if (any) of these are true, we will do the hover action
|
|
584
|
-
if (!(Array.isArray(item.children) && item.children.length > 0 ||
|
|
585
|
-
typeof item.children == "function" ||
|
|
586
|
-
item.childTemplate ||
|
|
587
|
-
item.childrenResolver))
|
|
588
|
-
return;
|
|
589
|
-
item[$hover] = setTimeout(() => {
|
|
590
|
-
delete item[$hover];
|
|
591
|
-
if (!this.pointerIsOnVoid) {
|
|
592
|
-
this.childDialogs.forEach(cd => cd.close());
|
|
593
|
-
row['_open'] = true;
|
|
594
|
-
this.onMenuItemClick(item, row);
|
|
595
|
-
}
|
|
596
|
-
}, this.hoverDelay);
|
|
597
|
-
}
|
|
598
|
-
stopHoverTimer(item) {
|
|
599
|
-
item[$hover] && clearTimeout(item[$hover]);
|
|
600
|
-
delete item[$hover];
|
|
601
|
-
}
|
|
602
|
-
startCloseTimer() {
|
|
603
|
-
this.closeTimer = setTimeout(() => {
|
|
604
|
-
this.closeOnVoid();
|
|
605
|
-
}, 500);
|
|
606
|
-
}
|
|
607
|
-
stopCloseTimer() {
|
|
608
|
-
clearTimeout(this.closeTimer);
|
|
609
|
-
}
|
|
610
|
-
/**
|
|
611
|
-
* Check if the dialog is clipping offscreen
|
|
612
|
-
* if so, move it back into view.
|
|
613
|
-
*/
|
|
614
|
-
onResize() {
|
|
615
|
-
const el = this.viewContainer?.element?.nativeElement;
|
|
616
|
-
if (!el)
|
|
617
|
-
return;
|
|
618
|
-
const { width, height, x, y } = el.getBoundingClientRect();
|
|
619
|
-
const target = document.querySelector(".ngx-menu");
|
|
620
|
-
if (!target)
|
|
621
|
-
return;
|
|
622
|
-
// Move back into view if we're clipping outside of the bottom
|
|
623
|
-
if (y + height > window.innerHeight) {
|
|
624
|
-
const newTop = (window.innerHeight - (height + (this.config.edgePadding || 12))) + "px";
|
|
625
|
-
target.style['margin-top'] = newTop;
|
|
626
|
-
}
|
|
627
|
-
// Move back into view if we're clipping off the right
|
|
628
|
-
if (x + width > window.innerWidth) {
|
|
629
|
-
const newLeft = (window.innerWidth - (width + (this.config.edgePadding || 12))) + "px";
|
|
630
|
-
target.style['margin-left'] = newLeft;
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
// If the void element gets stuck open, make wheel events pass through.
|
|
634
|
-
onWheel(evt) {
|
|
635
|
-
const el = this.viewContainer.element.nativeElement;
|
|
636
|
-
el.style.display = "none";
|
|
637
|
-
const target = document.elementFromPoint(evt.clientX, evt.clientY);
|
|
638
|
-
el.style.display = "block";
|
|
639
|
-
target.scroll({
|
|
640
|
-
top: evt.deltaY + target.scrollTop,
|
|
641
|
-
left: evt.deltaX + target.scrollLeft,
|
|
642
|
-
behavior: "smooth"
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuComponent, deps: [{ token: i0.ViewContainerRef }, { token: i1.DomSanitizer }, { token: MAT_DIALOG_DATA, optional: true }, { token: i1$1.MatDialog, optional: true }, { token: i1$1.MatDialogRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
646
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MenuComponent, isStandalone: true, selector: "ngx-menu", inputs: { data: "data", items: "items", config: "config", id: "id", overlayOverlap: "overlayOverlap", hoverDelay: "hoverDelay", showDebugOverlay: "showDebugOverlay", targetBounds: "targetBounds", ownerCords: "ownerCords", selfCords: "selfCords", parentItem: "parentItem", parentContext: "parentContext", isLockedOpen: "isLockedOpen" }, host: { listeners: { "window:resize": "onResize()" }, properties: { "attr.tx": "targetBounds?.x", "attr.ty": "targetBounds?.y", "attr.th": "targetBounds?.height", "attr.tw": "targetBounds?.width" } }, ngImport: i0, template: "<!-- Mouse event blocker for pointer leave -->\n@if (coverRectCords && !parentIsNgxMenu) {\n <div\n class=\"owner-mask\"\n [style.top]=\"coverRectCords.top + 'px'\"\n [style.left]=\"coverRectCords.left + 'px'\"\n [style.height]=\"coverRectCords.height + 'px'\"\n [style.width]=\"coverRectCords.width + 'px'\"\n [style.background]=\"showDebugOverlay ? '#f004' : '#0000'\"\n style=\"z-index: -1\"\n (pointerenter)=\"pointerHasBeenOverMask=true\"\n (pointerleave)=\"stopCloseTimer()\"\n (pointermove)=\"pointerHasBeenOverMask=true\"\n (click)=\"isLockedOpen = true\"\n ></div>\n}\n\n@if (!parentIsNgxMenu) {\n <div class=\"void\"\n [style.background]=\"showDebugOverlay ? '#00f4' : '#0000'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && !isLockedOpen && startCloseTimer()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"hasBootstrapped && closeOnVoid(true)\"\n (pointermove)=\"hasBootstrapped && !isLockedOpen && startCloseTimer()\"\n (click)=\"closeOnVoid(true)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n}\n\n@if (!template) {\n <table (pointerenter)=\"stopCloseTimer()\">\n <tbody>\n @for (item of items; track item) {\n <!-- A row with a click action -->\n @if (item != 'separator' && item.separator != true && item['_visible']) {\n <tr #row\n [class.disabled]=\"item['_disabled']\"\n (click)=\"!item['_disabled'] && onMenuItemClick(item, row, true)\"\n [class.hover]=\"row['hover']\"\n [class.open]=\"row['_open']\"\n (pointerenter)=\"row['hover'] = true; startHoverTimer(item, row)\"\n (pointerleave)=\"row['hover'] = false; stopHoverTimer(item)\"\n >\n\n @if (showIconColumn) {\n <td class=\"icon\">\n @if (matIconRx.test(item['_icon'] ?? item.icon)) {\n <img [src]=\"item['_icon'] ?? item.icon\"/>\n }\n @else {\n <mat-icon\n [fontIcon]=\"item['_icon'] ?? item.icon\"\n [style.color]=\"item.iconColor\"\n />\n }\n </td>\n }\n\n <!-- 'Normal' action based item -->\n <td class=\"label\"\n [style.padding-left]=\"showIconColumn ? 0 : '16px'\"\n >\n <a\n #anchor\n [attr.target]=\"item.linkTarget\"\n [attr.href]=\"(item['_link'] || item.link) ? sanitizer.bypassSecurityTrustUrl(item['_link'] || item.link) : undefined\"\n >\n @if ($any(item.labelTemplate)?.prototype) {\n <ng-container\n [ngTemplateOutlet]=\"$any(item).labelTemplate\"\n [ngTemplateOutletContext]=\"{\n '$implicit': data,\n 'dialog': dialogRef,\n 'context': item['_context'],\n 'item': item,\n 'element': anchor,\n 'menu': this\n }\"\n />\n }\n @else {\n @if ($any(item)?.labelTemplate) {\n {{$any(item)?.labelTemplate(data || {})}}\n }\n @else {\n <div [innerHTML]=\"item['_formattedLabel']\"></div>\n }\n }\n </a>\n </td>\n\n @if (showShortcutColumn) {\n <td class=\"shortcut\">\n {{item.shortcutLabel}}\n </td>\n }\n\n <td style=\"min-width: 16px\">\n @if ((\n (item['children']?.length > 0) ||\n (item['_children']?.length > 0) ||\n item.childTemplate ||\n item.children?.['call'] ||\n item.childrenResolver\n ) &&\n !item['_isResolving']\n ) {\n <mat-icon\n style=\"transform: translateY(2px)\"\n >\n chevron_right\n </mat-icon>\n }\n\n @if (item['_isResolving']) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n [diameter]=\"20\"\n style=\"margin-right: 4px\"\n />\n }\n </td>\n </tr>\n }\n @else if (item != 'separator' && item.separator == true) {\n <!-- Separator with label -->\n <tr\n class=\"disabled separator\"\n >\n <td\n class=\"center\"\n [attr.colspan]=\"2 + (showIconColumn ? 1 : 0) + (showShortcutColumn ? 1 : 0)\"\n >\n <span class=\"hr\">\n {{item['label'] || ''}}\n </span>\n </td>\n </tr>\n }\n @else if (item == 'separator') {\n <!-- Separator -->\n <tr\n class=\"disabled separator\"\n >\n <td\n [attr.colspan]=\"2 + (showIconColumn ? 1 : 0) + (showShortcutColumn ? 1 : 0)\"\n >\n <hr/>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n}\n@else {\n @if (templateType == 'template') {\n <div style=\"display: contents;\" (pointerenter)=\"stopCloseTimer()\">\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n '$implicit': data,\n 'dialog': dialogRef,\n 'context': parentContext,\n 'item': parentItem,\n 'element': this.viewContainer?.element?.nativeElement,\n 'menu': this\n }\"\n />\n </div>\n }\n @else {\n <div style=\"display: contents;\" (pointerenter)=\"stopCloseTimer()\">\n <ng-container\n [cdkPortalOutlet]=\"componentPortal\"\n />\n </div>\n }\n}\n\n@if (showDebugOverlay) {\n <div>\n <div>hbs: {{hasBootstrapped}}</div>\n <div>pov: {{pointerIsOnVoid}}</div>\n <div>ilo: {{isLockedOpen}}</div>\n <div>hbom: {{pointerHasBeenOverMask}}</div>\n\n <div>type: {{templateType}}</div>\n </div>\n}\n", styles: ["::ng-deep .cdk-overlay-container .ngx-menu{--mdc-dialog-container-color: var(--ngx-menu-background-color, #2f2f2f)}::ng-deep .cdk-overlay-container .ngx-menu .mdc-dialog__container{transform-origin:top left}::ng-deep .cdk-overlay-container .ngx-menu .mdc-dialog--open .mdc-dialog__container{transform:none}::ng-deep .cdk-overlay-pane.ngx-menu .mat-mdc-dialog-surface{overflow:visible}:host{-webkit-user-select:none;user-select:none;z-index:1;position:relative;display:block}table{border-spacing:0;border-radius:5px;padding:4px 0;overflow:hidden}tr{color:var(--ngx-menu-text-color, #ccc);font-size:var(--ngx-menu-font-size, 14px);cursor:pointer;transition:background-color 75ms ease,color 75ms ease}tr:not(.disabled).hover,tr:not(.disabled).open{background-color:var(--ngx-menu-hover-background-color, #94ebeb);color:var(--ngx-menu-hover-text-color, #000)}tr:not(.disabled).hover a,tr:not(.disabled).open a{color:var(--ngx-menu-hover-text-color, #000)}tr:not(.separator){height:36px}tr.disabled .label{color:var(--ngx-menu-disabled-text-color, #919191)}tr .center{text-align:center}tr a{outline:0;display:flex;align-items:center;gap:10px;justify-content:space-between;height:100%;width:100%;position:relative;left:-16px;width:calc(100% + 32px);padding:0 16px}tr .label{min-width:100px}tr img{max-width:100%;max-height:100%;aspect-ratio:1}.hr{height:1px;text-align:center;position:relative}.hr:before,.hr:after{content:\"\";background:var(--ngx-menu-separator-color, #2a2a2a);display:block;position:absolute;top:0;bottom:0;height:1px;margin:auto;width:300px}.hr:before{right:calc(100% + 4px)}.hr:after{left:calc(100% + 4px)}hr{background:var(--ngx-menu-separator-color, #2a2a2a);border:0;height:1px;margin:0}.icon{width:24px;height:24px;padding-left:10px}.icon mat-icon{transform:translateY(2px)}.shortcut{color:var(--ngx-menu-shortcut-text-color, #848484);text-align:end;padding-right:10px;padding-left:12px}.label{height:var(--ngx-menu-item-height, 30px)}td{vertical-align:middle}.void,.owner-mask{position:absolute}.void{top:-100vh;right:-100vw;bottom:-100vh;left:-100vw;z-index:-2}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
|
|
647
|
-
}
|
|
648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuComponent, decorators: [{
|
|
649
|
-
type: Component,
|
|
650
|
-
args: [{ selector: 'ngx-menu', imports: [
|
|
651
|
-
NgTemplateOutlet,
|
|
652
|
-
PortalModule,
|
|
653
|
-
MatIconModule,
|
|
654
|
-
MatProgressSpinnerModule
|
|
655
|
-
], standalone: true, host: {
|
|
656
|
-
"[attr.tx]": "targetBounds?.x",
|
|
657
|
-
"[attr.ty]": "targetBounds?.y",
|
|
658
|
-
"[attr.th]": "targetBounds?.height",
|
|
659
|
-
"[attr.tw]": "targetBounds?.width",
|
|
660
|
-
}, template: "<!-- Mouse event blocker for pointer leave -->\n@if (coverRectCords && !parentIsNgxMenu) {\n <div\n class=\"owner-mask\"\n [style.top]=\"coverRectCords.top + 'px'\"\n [style.left]=\"coverRectCords.left + 'px'\"\n [style.height]=\"coverRectCords.height + 'px'\"\n [style.width]=\"coverRectCords.width + 'px'\"\n [style.background]=\"showDebugOverlay ? '#f004' : '#0000'\"\n style=\"z-index: -1\"\n (pointerenter)=\"pointerHasBeenOverMask=true\"\n (pointerleave)=\"stopCloseTimer()\"\n (pointermove)=\"pointerHasBeenOverMask=true\"\n (click)=\"isLockedOpen = true\"\n ></div>\n}\n\n@if (!parentIsNgxMenu) {\n <div class=\"void\"\n [style.background]=\"showDebugOverlay ? '#00f4' : '#0000'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && !isLockedOpen && startCloseTimer()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"hasBootstrapped && closeOnVoid(true)\"\n (pointermove)=\"hasBootstrapped && !isLockedOpen && startCloseTimer()\"\n (click)=\"closeOnVoid(true)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n}\n\n@if (!template) {\n <table (pointerenter)=\"stopCloseTimer()\">\n <tbody>\n @for (item of items; track item) {\n <!-- A row with a click action -->\n @if (item != 'separator' && item.separator != true && item['_visible']) {\n <tr #row\n [class.disabled]=\"item['_disabled']\"\n (click)=\"!item['_disabled'] && onMenuItemClick(item, row, true)\"\n [class.hover]=\"row['hover']\"\n [class.open]=\"row['_open']\"\n (pointerenter)=\"row['hover'] = true; startHoverTimer(item, row)\"\n (pointerleave)=\"row['hover'] = false; stopHoverTimer(item)\"\n >\n\n @if (showIconColumn) {\n <td class=\"icon\">\n @if (matIconRx.test(item['_icon'] ?? item.icon)) {\n <img [src]=\"item['_icon'] ?? item.icon\"/>\n }\n @else {\n <mat-icon\n [fontIcon]=\"item['_icon'] ?? item.icon\"\n [style.color]=\"item.iconColor\"\n />\n }\n </td>\n }\n\n <!-- 'Normal' action based item -->\n <td class=\"label\"\n [style.padding-left]=\"showIconColumn ? 0 : '16px'\"\n >\n <a\n #anchor\n [attr.target]=\"item.linkTarget\"\n [attr.href]=\"(item['_link'] || item.link) ? sanitizer.bypassSecurityTrustUrl(item['_link'] || item.link) : undefined\"\n >\n @if ($any(item.labelTemplate)?.prototype) {\n <ng-container\n [ngTemplateOutlet]=\"$any(item).labelTemplate\"\n [ngTemplateOutletContext]=\"{\n '$implicit': data,\n 'dialog': dialogRef,\n 'context': item['_context'],\n 'item': item,\n 'element': anchor,\n 'menu': this\n }\"\n />\n }\n @else {\n @if ($any(item)?.labelTemplate) {\n {{$any(item)?.labelTemplate(data || {})}}\n }\n @else {\n <div [innerHTML]=\"item['_formattedLabel']\"></div>\n }\n }\n </a>\n </td>\n\n @if (showShortcutColumn) {\n <td class=\"shortcut\">\n {{item.shortcutLabel}}\n </td>\n }\n\n <td style=\"min-width: 16px\">\n @if ((\n (item['children']?.length > 0) ||\n (item['_children']?.length > 0) ||\n item.childTemplate ||\n item.children?.['call'] ||\n item.childrenResolver\n ) &&\n !item['_isResolving']\n ) {\n <mat-icon\n style=\"transform: translateY(2px)\"\n >\n chevron_right\n </mat-icon>\n }\n\n @if (item['_isResolving']) {\n <mat-progress-spinner\n mode=\"indeterminate\"\n [diameter]=\"20\"\n style=\"margin-right: 4px\"\n />\n }\n </td>\n </tr>\n }\n @else if (item != 'separator' && item.separator == true) {\n <!-- Separator with label -->\n <tr\n class=\"disabled separator\"\n >\n <td\n class=\"center\"\n [attr.colspan]=\"2 + (showIconColumn ? 1 : 0) + (showShortcutColumn ? 1 : 0)\"\n >\n <span class=\"hr\">\n {{item['label'] || ''}}\n </span>\n </td>\n </tr>\n }\n @else if (item == 'separator') {\n <!-- Separator -->\n <tr\n class=\"disabled separator\"\n >\n <td\n [attr.colspan]=\"2 + (showIconColumn ? 1 : 0) + (showShortcutColumn ? 1 : 0)\"\n >\n <hr/>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n}\n@else {\n @if (templateType == 'template') {\n <div style=\"display: contents;\" (pointerenter)=\"stopCloseTimer()\">\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n '$implicit': data,\n 'dialog': dialogRef,\n 'context': parentContext,\n 'item': parentItem,\n 'element': this.viewContainer?.element?.nativeElement,\n 'menu': this\n }\"\n />\n </div>\n }\n @else {\n <div style=\"display: contents;\" (pointerenter)=\"stopCloseTimer()\">\n <ng-container\n [cdkPortalOutlet]=\"componentPortal\"\n />\n </div>\n }\n}\n\n@if (showDebugOverlay) {\n <div>\n <div>hbs: {{hasBootstrapped}}</div>\n <div>pov: {{pointerIsOnVoid}}</div>\n <div>ilo: {{isLockedOpen}}</div>\n <div>hbom: {{pointerHasBeenOverMask}}</div>\n\n <div>type: {{templateType}}</div>\n </div>\n}\n", styles: ["::ng-deep .cdk-overlay-container .ngx-menu{--mdc-dialog-container-color: var(--ngx-menu-background-color, #2f2f2f)}::ng-deep .cdk-overlay-container .ngx-menu .mdc-dialog__container{transform-origin:top left}::ng-deep .cdk-overlay-container .ngx-menu .mdc-dialog--open .mdc-dialog__container{transform:none}::ng-deep .cdk-overlay-pane.ngx-menu .mat-mdc-dialog-surface{overflow:visible}:host{-webkit-user-select:none;user-select:none;z-index:1;position:relative;display:block}table{border-spacing:0;border-radius:5px;padding:4px 0;overflow:hidden}tr{color:var(--ngx-menu-text-color, #ccc);font-size:var(--ngx-menu-font-size, 14px);cursor:pointer;transition:background-color 75ms ease,color 75ms ease}tr:not(.disabled).hover,tr:not(.disabled).open{background-color:var(--ngx-menu-hover-background-color, #94ebeb);color:var(--ngx-menu-hover-text-color, #000)}tr:not(.disabled).hover a,tr:not(.disabled).open a{color:var(--ngx-menu-hover-text-color, #000)}tr:not(.separator){height:36px}tr.disabled .label{color:var(--ngx-menu-disabled-text-color, #919191)}tr .center{text-align:center}tr a{outline:0;display:flex;align-items:center;gap:10px;justify-content:space-between;height:100%;width:100%;position:relative;left:-16px;width:calc(100% + 32px);padding:0 16px}tr .label{min-width:100px}tr img{max-width:100%;max-height:100%;aspect-ratio:1}.hr{height:1px;text-align:center;position:relative}.hr:before,.hr:after{content:\"\";background:var(--ngx-menu-separator-color, #2a2a2a);display:block;position:absolute;top:0;bottom:0;height:1px;margin:auto;width:300px}.hr:before{right:calc(100% + 4px)}.hr:after{left:calc(100% + 4px)}hr{background:var(--ngx-menu-separator-color, #2a2a2a);border:0;height:1px;margin:0}.icon{width:24px;height:24px;padding-left:10px}.icon mat-icon{transform:translateY(2px)}.shortcut{color:var(--ngx-menu-shortcut-text-color, #848484);text-align:end;padding-right:10px;padding-left:12px}.label{height:var(--ngx-menu-item-height, 30px)}td{vertical-align:middle}.void,.owner-mask{position:absolute}.void{top:-100vh;right:-100vw;bottom:-100vh;left:-100vw;z-index:-2}\n"] }]
|
|
661
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1.DomSanitizer }, { type: undefined, decorators: [{
|
|
662
|
-
type: Optional
|
|
663
|
-
}, {
|
|
664
|
-
type: Inject,
|
|
665
|
-
args: [MAT_DIALOG_DATA]
|
|
666
|
-
}] }, { type: i1$1.MatDialog, decorators: [{
|
|
667
|
-
type: Optional
|
|
668
|
-
}] }, { type: i1$1.MatDialogRef, decorators: [{
|
|
669
|
-
type: Optional
|
|
670
|
-
}] }], propDecorators: { data: [{
|
|
671
|
-
type: Input
|
|
672
|
-
}], items: [{
|
|
673
|
-
type: Input
|
|
674
|
-
}], config: [{
|
|
675
|
-
type: Input
|
|
676
|
-
}], id: [{
|
|
677
|
-
type: Input
|
|
678
|
-
}], overlayOverlap: [{
|
|
679
|
-
type: Input
|
|
680
|
-
}], hoverDelay: [{
|
|
681
|
-
type: Input
|
|
682
|
-
}], showDebugOverlay: [{
|
|
683
|
-
type: Input
|
|
684
|
-
}], targetBounds: [{
|
|
685
|
-
type: Input
|
|
686
|
-
}], ownerCords: [{
|
|
687
|
-
type: Input
|
|
688
|
-
}], selfCords: [{
|
|
689
|
-
type: Input
|
|
690
|
-
}], parentItem: [{
|
|
691
|
-
type: Input
|
|
692
|
-
}], parentContext: [{
|
|
693
|
-
type: Input
|
|
694
|
-
}], isLockedOpen: [{
|
|
695
|
-
type: Input
|
|
696
|
-
}], onResize: [{
|
|
697
|
-
type: HostListener,
|
|
698
|
-
args: ["window:resize"]
|
|
699
|
-
}] } });
|
|
700
|
-
|
|
701
|
-
class MenuDirective {
|
|
702
|
-
constructor(dialog, viewContainer) {
|
|
703
|
-
this.dialog = dialog;
|
|
704
|
-
this.viewContainer = viewContainer;
|
|
705
|
-
/**
|
|
706
|
-
* Configuration for opening the app menu
|
|
707
|
-
*/
|
|
708
|
-
this.config = {};
|
|
709
|
-
this.triggers = [];
|
|
710
|
-
}
|
|
711
|
-
ngOnInit() {
|
|
712
|
-
this.ngOnChanges();
|
|
713
|
-
}
|
|
714
|
-
ngOnChanges() {
|
|
715
|
-
if (this.config.trigger) {
|
|
716
|
-
this.triggers = Array.isArray(this.config.trigger) ? this.config.trigger : [this.config.trigger];
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
ngAfterViewInit() {
|
|
720
|
-
// const el = this.viewContainer.element.nativeElement as HTMLElement;
|
|
721
|
-
// // Automatically attach context menu items to
|
|
722
|
-
// // the contextmenu event
|
|
723
|
-
// if (this.ctxMenuItems) {
|
|
724
|
-
// el.addEventListener('contextmenu', (e) => {
|
|
725
|
-
// e.preventDefault();
|
|
726
|
-
// this.openMenu(e as any, this.ctxMenuItems, true);
|
|
727
|
-
// });
|
|
728
|
-
// }
|
|
729
|
-
// if (this.menuItems?.length > 0) {
|
|
730
|
-
// if (!this.config?.trigger) {
|
|
731
|
-
// el.addEventListener('click', (e) => {
|
|
732
|
-
// this.openMenu(e as any, this.menuItems, true);
|
|
733
|
-
// });
|
|
734
|
-
// }
|
|
735
|
-
// else {
|
|
736
|
-
// triggers.forEach(t => {
|
|
737
|
-
// if (["contextmenu", "click"].includes(t)) {
|
|
738
|
-
// el.addEventListener(t, (e) => {
|
|
739
|
-
// e.preventDefault();
|
|
740
|
-
// this.openMenu(e as any, this.ctxMenuItems, true);
|
|
741
|
-
// });
|
|
742
|
-
// }
|
|
743
|
-
// else {
|
|
744
|
-
// el.addEventListener(t, this.openMenu.bind(this));
|
|
745
|
-
// }
|
|
746
|
-
// });
|
|
747
|
-
// }
|
|
748
|
-
// }
|
|
749
|
-
}
|
|
750
|
-
async openMenu(evt, items = this.menuItems, keepOpen = false) {
|
|
751
|
-
const el = this.viewContainer.element.nativeElement;
|
|
752
|
-
el.classList.add("ngx-menu-open");
|
|
753
|
-
const isCtxEvent = evt.button == 2;
|
|
754
|
-
const config = structuredClone(this.config);
|
|
755
|
-
config['_isLockedOpen'] = keepOpen;
|
|
756
|
-
return openMenu(this.dialog, items, this.data, evt, this.config, isCtxEvent ? null : el)
|
|
757
|
-
.then((...res) => {
|
|
758
|
-
el.classList.remove("ngx-menu-open");
|
|
759
|
-
return res;
|
|
760
|
-
})
|
|
761
|
-
.catch((ex) => {
|
|
762
|
-
el.classList.remove("ngx-menu-open");
|
|
763
|
-
throw ex;
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
onCtxMenu(e) {
|
|
767
|
-
if (this.ctxMenuItems || this.triggers.includes("contextmenu")) {
|
|
768
|
-
e.preventDefault();
|
|
769
|
-
this.openMenu(e, this.ctxMenuItems, true);
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
onClick(e) {
|
|
773
|
-
if (this.menuItems &&
|
|
774
|
-
(this.triggers.length == 0 ||
|
|
775
|
-
this.triggers.includes("click"))) {
|
|
776
|
-
e.preventDefault();
|
|
777
|
-
this.openMenu(e, this.menuItems, true);
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
onDblClick(e) {
|
|
781
|
-
if (this.menuItems && this.triggers.length == 0 ||
|
|
782
|
-
this.menuItems && this.triggers.includes("dblclick")) {
|
|
783
|
-
e.preventDefault();
|
|
784
|
-
this.openMenu(e, this.menuItems, true);
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDirective, deps: [{ token: i1$1.MatDialog }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
788
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: MenuDirective, isStandalone: true, selector: "[ngx-contextmenu],[ngx-menu]", inputs: { data: ["ngx-menu-context", "data"], ctxMenuItems: ["ngx-contextmenu", "ctxMenuItems"], menuItems: ["ngx-menu", "menuItems"], config: ["ngx-menu-config", "config"] }, host: { listeners: { "contextmenu": "onCtxMenu($event)", "click": "onClick($event)", "dblclick": "onDblClick($event)" } }, providers: [
|
|
789
|
-
MatDialog
|
|
790
|
-
], usesOnChanges: true, ngImport: i0 }); }
|
|
791
|
-
}
|
|
792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuDirective, decorators: [{
|
|
793
|
-
type: Directive,
|
|
794
|
-
args: [{
|
|
795
|
-
selector: '[ngx-contextmenu],[ngx-menu]',
|
|
796
|
-
providers: [
|
|
797
|
-
MatDialog
|
|
798
|
-
],
|
|
799
|
-
standalone: true
|
|
800
|
-
}]
|
|
801
|
-
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i0.ViewContainerRef }], propDecorators: { data: [{
|
|
802
|
-
type: Input,
|
|
803
|
-
args: ["ngx-menu-context"]
|
|
804
|
-
}], ctxMenuItems: [{
|
|
805
|
-
type: Input,
|
|
806
|
-
args: ["ngx-contextmenu"]
|
|
807
|
-
}], menuItems: [{
|
|
808
|
-
type: Input,
|
|
809
|
-
args: ["ngx-menu"]
|
|
810
|
-
}], config: [{
|
|
811
|
-
type: Input,
|
|
812
|
-
args: ["ngx-menu-config"]
|
|
813
|
-
}], onCtxMenu: [{
|
|
814
|
-
type: HostListener,
|
|
815
|
-
args: ["contextmenu", ['$event']]
|
|
816
|
-
}], onClick: [{
|
|
817
|
-
type: HostListener,
|
|
818
|
-
args: ["click", ['$event']]
|
|
819
|
-
}], onDblClick: [{
|
|
820
|
-
type: HostListener,
|
|
821
|
-
args: ["dblclick", ['$event']]
|
|
822
|
-
}] } });
|
|
823
|
-
// Helper to open the menu without using the directive.
|
|
824
|
-
const openMenu = async (dialog, menuItems, data, evt, config = {}, el) => {
|
|
825
|
-
// console.log({ dialog, menuItems, data, evt, config, el });
|
|
826
|
-
evt.preventDefault();
|
|
827
|
-
evt.stopPropagation();
|
|
828
|
-
// Apply defaults.
|
|
829
|
-
if (!config.alignment)
|
|
830
|
-
config.alignment = "start";
|
|
831
|
-
const initialBounds = await calcMenuItemBounds(menuItems, data);
|
|
832
|
-
const cords = getPosition(el || evt, config, initialBounds);
|
|
833
|
-
const specificId = ulid();
|
|
834
|
-
return firstValueFrom(dialog.open(MenuComponent, {
|
|
835
|
-
data: {
|
|
836
|
-
dialog,
|
|
837
|
-
data: data,
|
|
838
|
-
ownerCords: el?.getBoundingClientRect(),
|
|
839
|
-
selfCords: cords,
|
|
840
|
-
items: menuItems,
|
|
841
|
-
config: config,
|
|
842
|
-
id: specificId,
|
|
843
|
-
targetBounds: initialBounds
|
|
844
|
-
},
|
|
845
|
-
panelClass: ["ngx-menu", 'ngx-' + specificId].concat(config?.customClass || []),
|
|
846
|
-
position: cords,
|
|
847
|
-
backdropClass: "ngx-menu-backdrop"
|
|
848
|
-
})
|
|
849
|
-
.afterClosed());
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
const zone = new Zone(Zone.current, { name: "@dotglitch_menu", properties: {} });
|
|
853
|
-
const calcTooltipBounds = async (template, data, matDialogConfig) => {
|
|
854
|
-
const args = {
|
|
855
|
-
data: data || {},
|
|
856
|
-
template,
|
|
857
|
-
config: {},
|
|
858
|
-
selfCords: { left: "0px", top: "0px" },
|
|
859
|
-
ownerCords: { x: 0, y: 0, width: 0, height: 0 },
|
|
860
|
-
id: null
|
|
861
|
-
};
|
|
862
|
-
// dimensions should be in px... Might need to handle vw/v
|
|
863
|
-
if (matDialogConfig?.width && matDialogConfig?.height) {
|
|
864
|
-
return {
|
|
865
|
-
width: parseInt(matDialogConfig.width),
|
|
866
|
-
height: parseInt(matDialogConfig.height),
|
|
867
|
-
top: 0,
|
|
868
|
-
left: 0,
|
|
869
|
-
right: 0,
|
|
870
|
-
bottom: 0
|
|
871
|
-
};
|
|
872
|
-
}
|
|
873
|
-
return new Promise((res, rej) => {
|
|
874
|
-
zone.run(async () => {
|
|
875
|
-
// Forcibly bootstrap the ctx menu outside of the client application's zone.
|
|
876
|
-
const app = await createApplication({
|
|
877
|
-
providers: [
|
|
878
|
-
{ provide: MAT_DIALOG_DATA, useValue: args }
|
|
879
|
-
]
|
|
880
|
-
});
|
|
881
|
-
const del = document.createElement("div");
|
|
882
|
-
del.style.position = "absolute";
|
|
883
|
-
del.style.left = '-1000vw';
|
|
884
|
-
document.body.append(del);
|
|
885
|
-
const base = app.bootstrap(TooltipComponent, del);
|
|
886
|
-
const { instance } = base;
|
|
887
|
-
await firstValueFrom(app.isStable);
|
|
888
|
-
const el = instance.viewContainer?.element?.nativeElement;
|
|
889
|
-
const rect = el.getBoundingClientRect();
|
|
890
|
-
app.destroy();
|
|
891
|
-
del.remove();
|
|
892
|
-
res(rect);
|
|
893
|
-
});
|
|
894
|
-
});
|
|
895
|
-
};
|
|
896
|
-
class TooltipComponent {
|
|
897
|
-
constructor(viewContainer, _data, dialog, // optional only for the purpose of estimating dimensions
|
|
898
|
-
dialogRef) {
|
|
899
|
-
this.viewContainer = viewContainer;
|
|
900
|
-
this._data = _data;
|
|
901
|
-
this.dialog = dialog;
|
|
902
|
-
this.dialogRef = dialogRef;
|
|
903
|
-
this.isTemplate = false;
|
|
904
|
-
this.isMenu = false;
|
|
905
|
-
this.hasBootstrapped = false;
|
|
906
|
-
this.pointerIsOnVoid = false;
|
|
907
|
-
this.isLockedOpen = false;
|
|
908
|
-
this.clientWidth = window.innerWidth;
|
|
909
|
-
this.clientHeight = window.innerHeight;
|
|
910
|
-
this.coverRectCords = {
|
|
911
|
-
top: 0,
|
|
912
|
-
left: 0,
|
|
913
|
-
height: 0,
|
|
914
|
-
width: 0
|
|
915
|
-
};
|
|
916
|
-
// Defaults are set before @Input() hooks evaluate
|
|
917
|
-
this.data = this.data || this._data?.data || {};
|
|
918
|
-
this.config = this.config || this._data?.config;
|
|
919
|
-
this.dialog = this.dialog || this._data?.dialog;
|
|
920
|
-
this.template = this.template || this._data?.template;
|
|
921
|
-
this.ownerCords = this.ownerCords || this._data?.ownerCords;
|
|
922
|
-
this.selfCords = this.selfCords || this._data?.selfCords;
|
|
923
|
-
this.isLockedOpen = this._data?.isLockedOpen || this.config?.stayOpen;
|
|
924
|
-
}
|
|
925
|
-
ngOnInit() {
|
|
926
|
-
const selfY = parseInt(this.selfCords.top.replace('px', ''));
|
|
927
|
-
const selfX = parseInt(this.selfCords.left.replace('px', ''));
|
|
928
|
-
this.coverRectCords = {
|
|
929
|
-
top: this.ownerCords.y - selfY - 16,
|
|
930
|
-
left: this.ownerCords.x - selfX - 16,
|
|
931
|
-
height: this.ownerCords.height + 32,
|
|
932
|
-
width: this.ownerCords.width + 32
|
|
933
|
-
};
|
|
934
|
-
if (Array.isArray(this.template))
|
|
935
|
-
this.isMenu = true;
|
|
936
|
-
else if (this.template instanceof TemplateRef)
|
|
937
|
-
this.isTemplate = true;
|
|
938
|
-
else if (typeof this.template == "function")
|
|
939
|
-
this.isTemplate = false;
|
|
940
|
-
else
|
|
941
|
-
throw new Error("Unrecognized template object provided.");
|
|
942
|
-
// TODO: resolve the event hook with the .void element
|
|
943
|
-
setTimeout(() => {
|
|
944
|
-
this.hasBootstrapped = true;
|
|
945
|
-
if (this.pointerIsOnVoid && !this.isLockedOpen)
|
|
946
|
-
this.dialogRef.close();
|
|
947
|
-
}, 200);
|
|
948
|
-
}
|
|
949
|
-
ngAfterViewInit() {
|
|
950
|
-
const el = this.viewContainer.element.nativeElement;
|
|
951
|
-
el.addEventListener("keydown", evt => {
|
|
952
|
-
this.isLockedOpen = true;
|
|
953
|
-
});
|
|
954
|
-
el.addEventListener("pointerdown", evt => {
|
|
955
|
-
this.isLockedOpen = true;
|
|
956
|
-
});
|
|
957
|
-
el.addEventListener("touch", evt => {
|
|
958
|
-
this.isLockedOpen = true;
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
onKeyDown(evt) {
|
|
962
|
-
if (this.config?.freezeOnKeyCode) {
|
|
963
|
-
if (evt.code == this.config.freezeOnKeyCode)
|
|
964
|
-
this.isLockedOpen = true;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
onVoidPointerDown(evt) {
|
|
968
|
-
if (!this.isLockedOpen) {
|
|
969
|
-
const el = this.viewContainer.element.nativeElement;
|
|
970
|
-
el.querySelector(".void").remove();
|
|
971
|
-
setTimeout(() => {
|
|
972
|
-
const clonedEvt = new PointerEvent("pointerdown", evt);
|
|
973
|
-
const target = document.elementFromPoint(evt.clientX, evt.clientY);
|
|
974
|
-
console.log("DEBUG EVENTS", { evt, clonedEvt });
|
|
975
|
-
target.dispatchEvent(clonedEvt);
|
|
976
|
-
}, 15);
|
|
977
|
-
}
|
|
978
|
-
this.closeOnVoid(true);
|
|
979
|
-
}
|
|
980
|
-
// If the void element gets stuck open, make wheel events pass through.
|
|
981
|
-
onWheel(evt) {
|
|
982
|
-
const el = this.viewContainer.element.nativeElement;
|
|
983
|
-
el.style.display = "none";
|
|
984
|
-
const target = document.elementFromPoint(evt.clientX, evt.clientY);
|
|
985
|
-
el.style.display = "block";
|
|
986
|
-
target.scroll({
|
|
987
|
-
top: evt.deltaY + target.scrollTop,
|
|
988
|
-
left: evt.deltaX + target.scrollLeft,
|
|
989
|
-
behavior: "smooth"
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
/**
|
|
993
|
-
* Close the tooltip if these actions occur
|
|
994
|
-
*/
|
|
995
|
-
onClose() {
|
|
996
|
-
if (!this.isLockedOpen)
|
|
997
|
-
this.dialogRef?.close();
|
|
998
|
-
this.clientWidth = window.innerWidth;
|
|
999
|
-
this.clientHeight = window.innerHeight;
|
|
1000
|
-
}
|
|
1001
|
-
closeOnVoid(force = false) {
|
|
1002
|
-
if (!this.isLockedOpen || force)
|
|
1003
|
-
this.dialogRef.close();
|
|
1004
|
-
}
|
|
1005
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ViewContainerRef }, { token: MAT_DIALOG_DATA, optional: true }, { token: i1$1.MatDialog, optional: true }, { token: i1$1.MatDialogRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1006
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: TooltipComponent, isStandalone: true, selector: "ngx-tooltip", inputs: { data: "data", config: "config", ownerCords: "ownerCords", selfCords: "selfCords", template: "template" }, host: { listeners: { "window:keydown": "onKeyDown($event)", "window:resize": "onClose()", "window:blur": "onClose()", "pointerleave": "onClose()" } }, ngImport: i0, template: "<!-- Mouse event blocker for pointer leave -->\n@if (coverRectCords) {\n <!-- <div\n class=\"owner-mask\"\n [style.top]=\"coverRectCords.top + 'px'\"\n [style.left]=\"coverRectCords.left + 'px'\"\n [style.height]=\"coverRectCords.height + 'px'\"\n [style.width]=\"coverRectCords.width + 'px'\"\n style=\"z-index: -1;\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n ></div> -->\n\n <div class=\"void left\"\n [style.top]=\"'0px'\"\n [style.left]=\"'0px'\"\n [style.height]=\"'100%'\"\n [style.width]=\"(ownerCords.left) + 'px'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && closeOnVoid()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n <div class=\"void top\"\n [style.top]=\"'0px'\"\n [style.left]=\"ownerCords.left + 'px'\"\n [style.height]=\"ownerCords.top + 'px'\"\n [style.width]=\"ownerCords.width + 'px'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && closeOnVoid()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n <div class=\"void right\"\n [style.top]=\"'0px'\"\n [style.left]=\"(ownerCords.left + ownerCords.width) + 'px'\"\n [style.height]=\"'100%'\"\n [style.width]=\"(clientWidth - (ownerCords.left + ownerCords.width)) + 'px'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && closeOnVoid()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n <div class=\"void\"\n [style.top]=\"(ownerCords.top + ownerCords.height) + 'px'\"\n [style.left]=\"ownerCords.left + 'px'\"\n [style.height]=\"(clientHeight - (ownerCords.top + ownerCords.height)) + 'px'\"\n [style.width]=\"ownerCords.width + 'px'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && closeOnVoid()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n}\n\n\n<div\n #container\n class=\"container\"\n>\n @if (isMenu) {\n <ngx-menu\n [config]=\"config\"\n [data]=\"data\"\n [ownerCords]=\"ownerCords\"\n [selfCords]=\"selfCords\"\n [items]=\"$any(template)\"\n [isLockedOpen]=\"config.stayOpen\"\n />\n }\n @else if (isTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"$any(template)\"\n [ngTemplateOutletContext]=\"{\n '$implicit': data,\n 'dialog': dialogRef,\n 'element': container,\n 'tooltip': this\n }\"\n ></ng-container>\n }\n @else {\n <ng-container\n [ngComponentOutlet]=\"$any(template)\"\n >\n </ng-container>\n }\n</div>\n", styles: ["::ng-deep .cdk-overlay-container .ngx-tooltip{--mdc-dialog-container-color: var(--ngx-tooltip-background-color, #2f2f2f)}::ng-deep .cdk-overlay-container .ngx-tooltip .mdc-dialog__container{transform-origin:top left}::ng-deep .cdk-overlay-container .ngx-tooltip .mdc-dialog--open .mdc-dialog__container{transform:none}::ng-deep .cdk-overlay-container .ngx-tooltip .mdc-dialog__surface{overflow:visible;background-color:#0000}::ng-deep .cdk-overlay-container .context-menu-backdrop.cdk-overlay-backdrop-showing{opacity:0}::ng-deep .cdk-overlay-pane.ngx-tooltip .mat-dialog-container{padding:0}:host{min-width:2px;min-height:2px;display:block}.void,.owner-mask{position:absolute}.void{top:-100vh;right:-100vw;bottom:-100vh;left:-100vw;z-index:-2;position:fixed}.container{width:100%;height:100%;background:var(--ngx-tooltip-background-color, #333);border-radius:6px;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: MenuComponent, selector: "ngx-menu", inputs: ["data", "items", "config", "id", "overlayOverlap", "hoverDelay", "showDebugOverlay", "targetBounds", "ownerCords", "selfCords", "parentItem", "parentContext", "isLockedOpen"] }] }); }
|
|
1007
|
-
}
|
|
1008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
1009
|
-
type: Component,
|
|
1010
|
-
args: [{ selector: 'ngx-tooltip', imports: [
|
|
1011
|
-
NgTemplateOutlet,
|
|
1012
|
-
NgComponentOutlet,
|
|
1013
|
-
MenuComponent
|
|
1014
|
-
], standalone: true, template: "<!-- Mouse event blocker for pointer leave -->\n@if (coverRectCords) {\n <!-- <div\n class=\"owner-mask\"\n [style.top]=\"coverRectCords.top + 'px'\"\n [style.left]=\"coverRectCords.left + 'px'\"\n [style.height]=\"coverRectCords.height + 'px'\"\n [style.width]=\"coverRectCords.width + 'px'\"\n style=\"z-index: -1;\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n ></div> -->\n\n <div class=\"void left\"\n [style.top]=\"'0px'\"\n [style.left]=\"'0px'\"\n [style.height]=\"'100%'\"\n [style.width]=\"(ownerCords.left) + 'px'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && closeOnVoid()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n <div class=\"void top\"\n [style.top]=\"'0px'\"\n [style.left]=\"ownerCords.left + 'px'\"\n [style.height]=\"ownerCords.top + 'px'\"\n [style.width]=\"ownerCords.width + 'px'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && closeOnVoid()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n <div class=\"void right\"\n [style.top]=\"'0px'\"\n [style.left]=\"(ownerCords.left + ownerCords.width) + 'px'\"\n [style.height]=\"'100%'\"\n [style.width]=\"(clientWidth - (ownerCords.left + ownerCords.width)) + 'px'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && closeOnVoid()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n <div class=\"void\"\n [style.top]=\"(ownerCords.top + ownerCords.height) + 'px'\"\n [style.left]=\"ownerCords.left + 'px'\"\n [style.height]=\"(clientHeight - (ownerCords.top + ownerCords.height)) + 'px'\"\n [style.width]=\"ownerCords.width + 'px'\"\n (pointerenter)=\"pointerIsOnVoid = true; hasBootstrapped && closeOnVoid()\"\n (pointerleave)=\"pointerIsOnVoid = false\"\n (pointerdown)=\"onVoidPointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n ></div>\n}\n\n\n<div\n #container\n class=\"container\"\n>\n @if (isMenu) {\n <ngx-menu\n [config]=\"config\"\n [data]=\"data\"\n [ownerCords]=\"ownerCords\"\n [selfCords]=\"selfCords\"\n [items]=\"$any(template)\"\n [isLockedOpen]=\"config.stayOpen\"\n />\n }\n @else if (isTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"$any(template)\"\n [ngTemplateOutletContext]=\"{\n '$implicit': data,\n 'dialog': dialogRef,\n 'element': container,\n 'tooltip': this\n }\"\n ></ng-container>\n }\n @else {\n <ng-container\n [ngComponentOutlet]=\"$any(template)\"\n >\n </ng-container>\n }\n</div>\n", styles: ["::ng-deep .cdk-overlay-container .ngx-tooltip{--mdc-dialog-container-color: var(--ngx-tooltip-background-color, #2f2f2f)}::ng-deep .cdk-overlay-container .ngx-tooltip .mdc-dialog__container{transform-origin:top left}::ng-deep .cdk-overlay-container .ngx-tooltip .mdc-dialog--open .mdc-dialog__container{transform:none}::ng-deep .cdk-overlay-container .ngx-tooltip .mdc-dialog__surface{overflow:visible;background-color:#0000}::ng-deep .cdk-overlay-container .context-menu-backdrop.cdk-overlay-backdrop-showing{opacity:0}::ng-deep .cdk-overlay-pane.ngx-tooltip .mat-dialog-container{padding:0}:host{min-width:2px;min-height:2px;display:block}.void,.owner-mask{position:absolute}.void{top:-100vh;right:-100vw;bottom:-100vh;left:-100vw;z-index:-2;position:fixed}.container{width:100%;height:100%;background:var(--ngx-tooltip-background-color, #333);border-radius:6px;overflow:hidden}\n"] }]
|
|
1015
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
|
1016
|
-
type: Optional
|
|
1017
|
-
}, {
|
|
1018
|
-
type: Inject,
|
|
1019
|
-
args: [MAT_DIALOG_DATA]
|
|
1020
|
-
}] }, { type: i1$1.MatDialog, decorators: [{
|
|
1021
|
-
type: Optional
|
|
1022
|
-
}] }, { type: i1$1.MatDialogRef, decorators: [{
|
|
1023
|
-
type: Optional
|
|
1024
|
-
}] }], propDecorators: { data: [{
|
|
1025
|
-
type: Input
|
|
1026
|
-
}], config: [{
|
|
1027
|
-
type: Input
|
|
1028
|
-
}], ownerCords: [{
|
|
1029
|
-
type: Input
|
|
1030
|
-
}], selfCords: [{
|
|
1031
|
-
type: Input
|
|
1032
|
-
}], template: [{
|
|
1033
|
-
type: Input
|
|
1034
|
-
}], onKeyDown: [{
|
|
1035
|
-
type: HostListener,
|
|
1036
|
-
args: ["window:keydown", ['$event']]
|
|
1037
|
-
}], onClose: [{
|
|
1038
|
-
type: HostListener,
|
|
1039
|
-
args: ["window:resize"]
|
|
1040
|
-
}, {
|
|
1041
|
-
type: HostListener,
|
|
1042
|
-
args: ["window:blur"]
|
|
1043
|
-
}, {
|
|
1044
|
-
type: HostListener,
|
|
1045
|
-
args: ["pointerleave"]
|
|
1046
|
-
}] } });
|
|
1047
|
-
|
|
1048
|
-
class TooltipDirective {
|
|
1049
|
-
constructor(dialog, viewContainer) {
|
|
1050
|
-
this.dialog = dialog;
|
|
1051
|
-
this.viewContainer = viewContainer;
|
|
1052
|
-
/**
|
|
1053
|
-
* Configuration for opening the app menu
|
|
1054
|
-
*/
|
|
1055
|
-
this.config = {};
|
|
1056
|
-
/**
|
|
1057
|
-
* Arbitrary data to pass into the template
|
|
1058
|
-
*/
|
|
1059
|
-
this.data = {};
|
|
1060
|
-
this.isCursorOverTarget = false;
|
|
1061
|
-
this.dialogIsOpen = false;
|
|
1062
|
-
}
|
|
1063
|
-
ngAfterViewInit() {
|
|
1064
|
-
const el = this.viewContainer.element.nativeElement;
|
|
1065
|
-
this.config?.triggers?.forEach(t => {
|
|
1066
|
-
el.addEventListener(t, () => {
|
|
1067
|
-
if (t == "click")
|
|
1068
|
-
this.config.stayOpen = true;
|
|
1069
|
-
this.open();
|
|
1070
|
-
});
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
async open() {
|
|
1074
|
-
if (!this.dialogIsOpen) {
|
|
1075
|
-
const el = this.viewContainer.element.nativeElement;
|
|
1076
|
-
this.dialogIsOpen = true;
|
|
1077
|
-
await openTooltip(this.dialog, this.template, this.data, el, this.config);
|
|
1078
|
-
this.dialogIsOpen = false;
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
async onPointerEnter(evt) {
|
|
1082
|
-
// If the template is not a template ref, do nothing.
|
|
1083
|
-
if (!(this.template instanceof TemplateRef))
|
|
1084
|
-
return;
|
|
1085
|
-
if (Array.isArray(this.config?.triggers) && !this.config.triggers.includes("hover")) {
|
|
1086
|
-
return;
|
|
1087
|
-
}
|
|
1088
|
-
this.isCursorOverTarget = true;
|
|
1089
|
-
setTimeout(async () => {
|
|
1090
|
-
// If the cursor moved away in the time
|
|
1091
|
-
if (!this.isCursorOverTarget)
|
|
1092
|
-
return;
|
|
1093
|
-
this.open();
|
|
1094
|
-
}, this.config.delay ?? 250);
|
|
1095
|
-
}
|
|
1096
|
-
async onPointerLeave(evt) {
|
|
1097
|
-
this.isCursorOverTarget = false;
|
|
1098
|
-
}
|
|
1099
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TooltipDirective, deps: [{ token: i1$1.MatDialog }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1100
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: TooltipDirective, isStandalone: true, selector: "[ngx-tooltip]", inputs: { template: ["ngx-tooltip", "template"], config: ["ngx-tooltip-config", "config"], data: ["ngx-tooltip-context", "data"] }, host: { listeners: { "pointerenter": "onPointerEnter($event)", "pointerleave": "onPointerLeave($event)" } }, providers: [
|
|
1101
|
-
MatDialog
|
|
1102
|
-
], ngImport: i0 }); }
|
|
1103
|
-
}
|
|
1104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
1105
|
-
type: Directive,
|
|
1106
|
-
args: [{
|
|
1107
|
-
selector: '[ngx-tooltip]',
|
|
1108
|
-
providers: [
|
|
1109
|
-
MatDialog
|
|
1110
|
-
],
|
|
1111
|
-
standalone: true
|
|
1112
|
-
}]
|
|
1113
|
-
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i0.ViewContainerRef }], propDecorators: { template: [{
|
|
1114
|
-
type: Input,
|
|
1115
|
-
args: ["ngx-tooltip"]
|
|
1116
|
-
}], config: [{
|
|
1117
|
-
type: Input,
|
|
1118
|
-
args: ["ngx-tooltip-config"]
|
|
1119
|
-
}], data: [{
|
|
1120
|
-
type: Input,
|
|
1121
|
-
args: ["ngx-tooltip-context"]
|
|
1122
|
-
}], onPointerEnter: [{
|
|
1123
|
-
type: HostListener,
|
|
1124
|
-
args: ['pointerenter', ['$event']]
|
|
1125
|
-
}], onPointerLeave: [{
|
|
1126
|
-
type: HostListener,
|
|
1127
|
-
args: ['pointerleave', ['$event']]
|
|
1128
|
-
}] } });
|
|
1129
|
-
// Helper to open the context menu without using the directive.
|
|
1130
|
-
const openTooltip = async (dialog, template, data, el, config, focusTrap = false, matPopupOptions) => {
|
|
1131
|
-
const component = Array.isArray(template) ? MenuComponent : template;
|
|
1132
|
-
const rect = await calcTooltipBounds(component, data, matPopupOptions);
|
|
1133
|
-
const ownerCords = el.getBoundingClientRect();
|
|
1134
|
-
const cords = getPosition(el, config, rect);
|
|
1135
|
-
const specificId = ulid();
|
|
1136
|
-
return firstValueFrom(dialog.open(TooltipComponent, {
|
|
1137
|
-
autoFocus: focusTrap,
|
|
1138
|
-
restoreFocus: focusTrap,
|
|
1139
|
-
data: {
|
|
1140
|
-
dialog,
|
|
1141
|
-
data: data,
|
|
1142
|
-
template: template,
|
|
1143
|
-
config: config,
|
|
1144
|
-
matPopupOptions,
|
|
1145
|
-
ownerCords: ownerCords,
|
|
1146
|
-
selfCords: cords,
|
|
1147
|
-
id: specificId
|
|
1148
|
-
},
|
|
1149
|
-
panelClass: ["ngx-tooltip", 'ngx-' + specificId].concat(config?.customClass || []),
|
|
1150
|
-
position: cords,
|
|
1151
|
-
hasBackdrop: false,
|
|
1152
|
-
...matPopupOptions
|
|
1153
|
-
})
|
|
1154
|
-
.afterClosed());
|
|
1155
|
-
};
|
|
1156
|
-
class DropdownDirective extends TooltipDirective {
|
|
1157
|
-
constructor() {
|
|
1158
|
-
super(...arguments);
|
|
1159
|
-
/**
|
|
1160
|
-
* Configuration for opening the app menu
|
|
1161
|
-
*/
|
|
1162
|
-
this._config = {};
|
|
1163
|
-
}
|
|
1164
|
-
ngOnInit() {
|
|
1165
|
-
// Set default values
|
|
1166
|
-
this._config.position = this._config.position ?? "bottom";
|
|
1167
|
-
this._config.alignment = this._config.alignment ?? "start";
|
|
1168
|
-
this._config.stayOpen = this._config.stayOpen ?? true;
|
|
1169
|
-
this.config = this._config;
|
|
1170
|
-
}
|
|
1171
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1172
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DropdownDirective, isStandalone: true, selector: "[ngx-dropdown],[ngx-dropdown-config]", inputs: { template: ["ngx-dropdown", "template"], _config: ["ngx-dropdown-config", "_config"] }, providers: [
|
|
1173
|
-
MatDialog
|
|
1174
|
-
], usesInheritance: true, ngImport: i0 }); }
|
|
1175
|
-
}
|
|
1176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownDirective, decorators: [{
|
|
1177
|
-
type: Directive,
|
|
1178
|
-
args: [{
|
|
1179
|
-
selector: '[ngx-dropdown],[ngx-dropdown-config]',
|
|
1180
|
-
providers: [
|
|
1181
|
-
MatDialog
|
|
1182
|
-
],
|
|
1183
|
-
standalone: true
|
|
1184
|
-
}]
|
|
1185
|
-
}], propDecorators: { template: [{
|
|
1186
|
-
type: Input,
|
|
1187
|
-
args: ["ngx-dropdown"]
|
|
1188
|
-
}], _config: [{
|
|
1189
|
-
type: Input,
|
|
1190
|
-
args: ["ngx-dropdown-config"]
|
|
1191
|
-
}] } });
|
|
1192
|
-
|
|
1193
|
-
/**
|
|
1194
|
-
* Url Sanitizer pipe.
|
|
1195
|
-
*
|
|
1196
|
-
* This trusts URLs that exist in a safe list defined in our environments.ts file.
|
|
1197
|
-
* Any other URLs will NOT be trusted, thus will not be loaded.
|
|
1198
|
-
*/
|
|
1199
|
-
class HtmlBypass {
|
|
1200
|
-
constructor(sanitizer) {
|
|
1201
|
-
this.sanitizer = sanitizer;
|
|
1202
|
-
}
|
|
1203
|
-
transform(url) {
|
|
1204
|
-
return this.sanitizer.bypassSecurityTrustHtml(url);
|
|
1205
|
-
}
|
|
1206
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HtmlBypass, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1207
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: HtmlBypass, isStandalone: true, name: "htmlbypass" }); }
|
|
1208
|
-
}
|
|
1209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HtmlBypass, decorators: [{
|
|
1210
|
-
type: Pipe,
|
|
1211
|
-
args: [{
|
|
1212
|
-
name: 'htmlbypass',
|
|
1213
|
-
standalone: true
|
|
1214
|
-
}]
|
|
1215
|
-
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
|
1216
|
-
|
|
1217
|
-
/**
|
|
1218
|
-
* Url Sanitizer pipe.
|
|
1219
|
-
*
|
|
1220
|
-
* This trusts URLs that exist in a safe list defined in our environments.ts file.
|
|
1221
|
-
* Any other URLs will NOT be trusted, thus will not be loaded.
|
|
1222
|
-
*/
|
|
1223
|
-
class ResourceBypass {
|
|
1224
|
-
constructor(sanitizer) {
|
|
1225
|
-
this.sanitizer = sanitizer;
|
|
1226
|
-
}
|
|
1227
|
-
transform(url) {
|
|
1228
|
-
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
1229
|
-
}
|
|
1230
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResourceBypass, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1231
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ResourceBypass, isStandalone: true, name: "resourcebypass" }); }
|
|
1232
|
-
}
|
|
1233
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResourceBypass, decorators: [{
|
|
1234
|
-
type: Pipe,
|
|
1235
|
-
args: [{
|
|
1236
|
-
name: 'resourcebypass',
|
|
1237
|
-
standalone: true
|
|
1238
|
-
}]
|
|
1239
|
-
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
|
1240
|
-
|
|
1241
|
-
/**
|
|
1242
|
-
* Url Sanitizer pipe.
|
|
1243
|
-
*
|
|
1244
|
-
* This trusts URLs that exist in a safe list defined in our environments.ts file.
|
|
1245
|
-
* Any other URLs will NOT be trusted, thus will not be loaded.
|
|
1246
|
-
*/
|
|
1247
|
-
class ScriptBypass {
|
|
1248
|
-
constructor(sanitizer) {
|
|
1249
|
-
this.sanitizer = sanitizer;
|
|
1250
|
-
}
|
|
1251
|
-
transform(url) {
|
|
1252
|
-
return this.sanitizer.bypassSecurityTrustScript(url);
|
|
1253
|
-
}
|
|
1254
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ScriptBypass, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1255
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ScriptBypass, isStandalone: true, name: "scriptbypass" }); }
|
|
1256
|
-
}
|
|
1257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ScriptBypass, decorators: [{
|
|
1258
|
-
type: Pipe,
|
|
1259
|
-
args: [{
|
|
1260
|
-
name: 'scriptbypass',
|
|
1261
|
-
standalone: true
|
|
1262
|
-
}]
|
|
1263
|
-
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
|
1264
|
-
|
|
1265
|
-
/**
|
|
1266
|
-
* Url Sanitizer pipe.
|
|
1267
|
-
*
|
|
1268
|
-
* This trusts URLs that exist in a safe list defined in our environments.ts file.
|
|
1269
|
-
* Any other URLs will NOT be trusted, thus will not be loaded.
|
|
1270
|
-
*/
|
|
1271
|
-
class StyleBypass {
|
|
1272
|
-
constructor(sanitizer) {
|
|
1273
|
-
this.sanitizer = sanitizer;
|
|
1274
|
-
}
|
|
1275
|
-
transform(url) {
|
|
1276
|
-
return this.sanitizer.bypassSecurityTrustStyle(url);
|
|
1277
|
-
}
|
|
1278
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StyleBypass, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1279
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: StyleBypass, isStandalone: true, name: "stylebypass" }); }
|
|
1280
|
-
}
|
|
1281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StyleBypass, decorators: [{
|
|
1282
|
-
type: Pipe,
|
|
1283
|
-
args: [{
|
|
1284
|
-
name: 'stylebypass',
|
|
1285
|
-
standalone: true
|
|
1286
|
-
}]
|
|
1287
|
-
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
|
1288
|
-
|
|
1289
|
-
/**
|
|
1290
|
-
* Url Sanitizer pipe.
|
|
1291
|
-
*
|
|
1292
|
-
* This trusts URLs that exist in a safe list defined in our environments.ts file.
|
|
1293
|
-
* Any other URLs will NOT be trusted, thus will not be loaded.
|
|
1294
|
-
*/
|
|
1295
|
-
class UrlBypass {
|
|
1296
|
-
constructor(sanitizer) {
|
|
1297
|
-
this.sanitizer = sanitizer;
|
|
1298
|
-
}
|
|
1299
|
-
transform(url) {
|
|
1300
|
-
return this.sanitizer.bypassSecurityTrustUrl(url);
|
|
1301
|
-
}
|
|
1302
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UrlBypass, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1303
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: UrlBypass, isStandalone: true, name: "urlbypass" }); }
|
|
1304
|
-
}
|
|
1305
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UrlBypass, decorators: [{
|
|
1306
|
-
type: Pipe,
|
|
1307
|
-
args: [{
|
|
1308
|
-
name: 'urlbypass',
|
|
1309
|
-
standalone: true
|
|
1310
|
-
}]
|
|
1311
|
-
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
|
1312
|
-
|
|
1313
|
-
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
|
1314
|
-
/**
|
|
1315
|
-
* Prompt the user to save a json file of the given object.
|
|
1316
|
-
*/
|
|
1317
|
-
const saveObjectAsFile = (name, data) => {
|
|
1318
|
-
const a = document.createElement("a");
|
|
1319
|
-
const file = new Blob([JSON.stringify(data)], { type: "application/json" });
|
|
1320
|
-
a.href = URL.createObjectURL(file);
|
|
1321
|
-
a.download = name;
|
|
1322
|
-
a.click();
|
|
1323
|
-
a.remove();
|
|
1324
|
-
};
|
|
1325
|
-
/**
|
|
1326
|
-
* Construct an emoticon with any unicode icon you specify
|
|
1327
|
-
*/
|
|
1328
|
-
class Emoticon {
|
|
1329
|
-
constructor(icon) {
|
|
1330
|
-
this.icon = icon;
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
/**
|
|
1334
|
-
* authorization 🔐 \
|
|
1335
|
-
* navigation 🧭 \
|
|
1336
|
-
* user 🪪 \
|
|
1337
|
-
* security 🛡 \
|
|
1338
|
-
* system 🖥 \
|
|
1339
|
-
* toolbox 🧰 \
|
|
1340
|
-
* chore ⚙ \
|
|
1341
|
-
* config 🛠 \
|
|
1342
|
-
* renderer 📐 \
|
|
1343
|
-
* package 📦 \
|
|
1344
|
-
* time ⏳ \
|
|
1345
|
-
* download 📥 \
|
|
1346
|
-
* upload 📤 \
|
|
1347
|
-
* bug 🦠 \
|
|
1348
|
-
* bomb 💣 \
|
|
1349
|
-
* tnt 🧨 \
|
|
1350
|
-
* warning ⚠️ \
|
|
1351
|
-
* chart 📊 \
|
|
1352
|
-
* chart_up 📈 \
|
|
1353
|
-
* chart_down 📉 \
|
|
1354
|
-
* circle_red 🔴 \
|
|
1355
|
-
* circle_orange 🟠 \
|
|
1356
|
-
* circle_yellow 🟡 \
|
|
1357
|
-
* circle_green 🟢 \
|
|
1358
|
-
* circle_blue 🔵 \
|
|
1359
|
-
* circle_violet 🟣 \
|
|
1360
|
-
* circle_black ⚫️ \
|
|
1361
|
-
* circle_white ⚪️ \
|
|
1362
|
-
* circle_brown 🟤 \
|
|
1363
|
-
* square_red 🟥 \
|
|
1364
|
-
* square_orange 🟧 \
|
|
1365
|
-
* square_yellow 🟨 \
|
|
1366
|
-
* square_green 🟩 \
|
|
1367
|
-
* square_blue 🟦 \
|
|
1368
|
-
* square_violet 🟪 \
|
|
1369
|
-
* square_black ⬛️ \
|
|
1370
|
-
* square_white ⬜️ \
|
|
1371
|
-
* square_brown 🟫
|
|
1372
|
-
*/
|
|
1373
|
-
const LogIcon = {
|
|
1374
|
-
authorization: new Emoticon("🔐"),
|
|
1375
|
-
navigation: new Emoticon("🧭"),
|
|
1376
|
-
user: new Emoticon("🪪"),
|
|
1377
|
-
security: new Emoticon("🛡"),
|
|
1378
|
-
system: new Emoticon("🖥"),
|
|
1379
|
-
toolbox: new Emoticon("🧰"),
|
|
1380
|
-
chore: new Emoticon("⚙"),
|
|
1381
|
-
config: new Emoticon("🛠"),
|
|
1382
|
-
renderer: new Emoticon("📐"),
|
|
1383
|
-
package: new Emoticon("📦"),
|
|
1384
|
-
time: new Emoticon("⏳"),
|
|
1385
|
-
download: new Emoticon("📥"),
|
|
1386
|
-
upload: new Emoticon("📤"),
|
|
1387
|
-
bug: new Emoticon("🦠"),
|
|
1388
|
-
bomb: new Emoticon("💣"),
|
|
1389
|
-
tnt: new Emoticon("🧨"),
|
|
1390
|
-
stop: new Emoticon("🛑"),
|
|
1391
|
-
police: new Emoticon("🚨"),
|
|
1392
|
-
rocket: new Emoticon("🚀"),
|
|
1393
|
-
warning: new Emoticon("⚠️"),
|
|
1394
|
-
chart: new Emoticon("📊"),
|
|
1395
|
-
chart_up: new Emoticon("📈"),
|
|
1396
|
-
chart_down: new Emoticon("📉"),
|
|
1397
|
-
circle_red: new Emoticon("🔴"),
|
|
1398
|
-
circle_orange: new Emoticon("🟠"),
|
|
1399
|
-
circle_yellow: new Emoticon("🟡"),
|
|
1400
|
-
circle_green: new Emoticon("🟢"),
|
|
1401
|
-
circle_blue: new Emoticon("🔵"),
|
|
1402
|
-
circle_violet: new Emoticon("🟣"),
|
|
1403
|
-
circle_black: new Emoticon("⚫️"),
|
|
1404
|
-
circle_white: new Emoticon("⚪️"),
|
|
1405
|
-
circle_brown: new Emoticon("🟤"),
|
|
1406
|
-
square_red: new Emoticon("🟥"),
|
|
1407
|
-
square_orange: new Emoticon("🟧"),
|
|
1408
|
-
square_yellow: new Emoticon("🟨"),
|
|
1409
|
-
square_green: new Emoticon("🟩"),
|
|
1410
|
-
square_blue: new Emoticon("🟦"),
|
|
1411
|
-
square_violet: new Emoticon("🟪"),
|
|
1412
|
-
square_black: new Emoticon("⬛️"),
|
|
1413
|
-
square_white: new Emoticon("⬜️"),
|
|
1414
|
-
square_brown: new Emoticon("🟫")
|
|
1415
|
-
};
|
|
1416
|
-
class Log {
|
|
1417
|
-
constructor(context, contextColor, textColor) {
|
|
1418
|
-
this.context = context;
|
|
1419
|
-
this.contextColor = contextColor;
|
|
1420
|
-
this.textColor = textColor;
|
|
1421
|
-
// Force the bindings to stay intact with overloads.
|
|
1422
|
-
this.log = this.log.bind(this);
|
|
1423
|
-
this.warn = this.warn.bind(this);
|
|
1424
|
-
this.err = this.err.bind(this);
|
|
1425
|
-
this.error = this.error.bind(this);
|
|
1426
|
-
}
|
|
1427
|
-
log(iconOrMessage, messageText, ...args) {
|
|
1428
|
-
if (iconOrMessage instanceof Emoticon) {
|
|
1429
|
-
console.log(`${iconOrMessage.icon} %c[${this.context}] %c${messageText}`, 'color: ' + this.contextColor, 'color: ' + this.textColor, ...args);
|
|
1430
|
-
}
|
|
1431
|
-
else {
|
|
1432
|
-
console.log(`%c[${this.context}] %c${iconOrMessage}`, 'color: ' + this.contextColor, 'color: ' + this.textColor, ...args);
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
warn(iconOrMessage, messageText, ...args) {
|
|
1436
|
-
if (iconOrMessage instanceof Emoticon) {
|
|
1437
|
-
console.warn(`${iconOrMessage.icon} %c[${this.context}] %c${messageText}`, 'color: ' + this.contextColor, 'color: ' + this.textColor, ...args);
|
|
1438
|
-
}
|
|
1439
|
-
else {
|
|
1440
|
-
console.warn(`%c[${this.context}] %c${iconOrMessage}`, 'color: ' + this.contextColor, 'color: ' + this.textColor, ...args);
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
err(iconOrMessage, messageText, ...args) {
|
|
1444
|
-
if (iconOrMessage instanceof Emoticon) {
|
|
1445
|
-
console.error(`${iconOrMessage.icon} %c[${this.context}] %c${messageText}`, 'color: ' + this.contextColor, 'color: ' + this.textColor, ...args);
|
|
1446
|
-
}
|
|
1447
|
-
else {
|
|
1448
|
-
console.error(`%c[${this.context}] %c${iconOrMessage}`, 'color: ' + this.contextColor, 'color: ' + this.textColor, ...args);
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
error(iconOrMessage, messageText, ...args) {
|
|
1452
|
-
// @ts-ignore
|
|
1453
|
-
this.err(iconOrMessage, messageText, ...args);
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
/**
|
|
1457
|
-
* Formatted logger that will print a bit of context before the message.
|
|
1458
|
-
* @returns
|
|
1459
|
-
*/
|
|
1460
|
-
const ConsoleLogger = (context, contextColor, textColor = "#03a9f4") => new Log(context, contextColor, textColor);
|
|
1461
|
-
/**
|
|
1462
|
-
* Convert a string `fooBAR baz_160054''"1]"` into a slug: `foobar-baz-1600541`
|
|
1463
|
-
*/
|
|
1464
|
-
const stringToSlug = (text) => (text || '')
|
|
1465
|
-
.trim()
|
|
1466
|
-
.toLowerCase()
|
|
1467
|
-
.replace(/[\-_+ ]/g, '-')
|
|
1468
|
-
.replace(/[^a-z0-9\-\/]/g, '');
|
|
1469
|
-
/**
|
|
1470
|
-
* Helper to update the page URL.
|
|
1471
|
-
* @param page component page ID to load.
|
|
1472
|
-
* @param data string or JSON data for query params.
|
|
1473
|
-
*/
|
|
1474
|
-
const updateUrl = (page, data = {}, replaceState = false) => {
|
|
1475
|
-
const [oldHash, qstring] = location.hash.split('?');
|
|
1476
|
-
if (!page)
|
|
1477
|
-
page = oldHash.split('/')[1];
|
|
1478
|
-
const hash = `#/${page}`;
|
|
1479
|
-
// Convert the data object to JSON.
|
|
1480
|
-
if (data instanceof URLSearchParams) {
|
|
1481
|
-
data = [...data.entries()].map(([k, v]) => ({ [k]: v })).reduce((a, b) => ({ ...a, ...b }), {});
|
|
1482
|
-
}
|
|
1483
|
-
const query = new URLSearchParams(data);
|
|
1484
|
-
const prevParams = new URLSearchParams(qstring);
|
|
1485
|
-
// If the hash is the same, retain params.
|
|
1486
|
-
if (hash == oldHash) {
|
|
1487
|
-
replaceState = true;
|
|
1488
|
-
for (const [key, value] of prevParams.entries())
|
|
1489
|
-
if (!query.has(key))
|
|
1490
|
-
query.set(key, prevParams.get(key));
|
|
1491
|
-
}
|
|
1492
|
-
for (const [key, val] of query.entries()) {
|
|
1493
|
-
if (val == null ||
|
|
1494
|
-
val == undefined ||
|
|
1495
|
-
val == '' ||
|
|
1496
|
-
val == 'null' ||
|
|
1497
|
-
Number.isNaN(val) ||
|
|
1498
|
-
val == 'NaN')
|
|
1499
|
-
query.delete(key);
|
|
1500
|
-
}
|
|
1501
|
-
if (!(hash.toLowerCase() == "#/frame") || data['id'] == -1)
|
|
1502
|
-
query.delete('id');
|
|
1503
|
-
const strQuery = query.toString();
|
|
1504
|
-
console.log(data, hash, strQuery);
|
|
1505
|
-
if (replaceState) {
|
|
1506
|
-
window.history.replaceState(data, '', hash + (strQuery ? ('?' + strQuery) : ''));
|
|
1507
|
-
}
|
|
1508
|
-
else {
|
|
1509
|
-
window.history.pushState(data, '', hash + (strQuery ? ('?' + strQuery) : ''));
|
|
1510
|
-
}
|
|
1511
|
-
};
|
|
1512
|
-
const getUrlData = (source = window.location.hash) => {
|
|
1513
|
-
const [hash, query] = source.split('?');
|
|
1514
|
-
let data = new URLSearchParams(query);
|
|
1515
|
-
return [...data.entries()].map(([k, v]) => ({ [k]: v })).reduce((a, b) => ({ ...a, ...b }), {});
|
|
1516
|
-
};
|
|
1517
|
-
|
|
1518
|
-
const SCRIPT_INIT_TIMEOUT = 500; // ms
|
|
1519
|
-
/**
|
|
1520
|
-
* Service that installs CSS/JS dynamically
|
|
1521
|
-
*/
|
|
1522
|
-
class DependencyService {
|
|
1523
|
-
constructor(document) {
|
|
1524
|
-
this.document = document;
|
|
1525
|
-
}
|
|
1526
|
-
/**
|
|
1527
|
-
* Install a Javascript file into the webpage on-demand
|
|
1528
|
-
* @param id Unique identifier for the JS script
|
|
1529
|
-
* @param src URL of the script
|
|
1530
|
-
* @param globalkey A global object the script will provide.
|
|
1531
|
-
* Providing this will ensure a promise only resolves after the
|
|
1532
|
-
* specified global object is provided, with a timeout of 500ms
|
|
1533
|
-
*/
|
|
1534
|
-
loadScript(id, src, globalkey = null) {
|
|
1535
|
-
return new Promise((res, rej) => {
|
|
1536
|
-
if (this.document.getElementById(id))
|
|
1537
|
-
return res();
|
|
1538
|
-
const script = this.document.createElement('script');
|
|
1539
|
-
script.id = id;
|
|
1540
|
-
script.setAttribute("async", '');
|
|
1541
|
-
script.setAttribute("src", src);
|
|
1542
|
-
script.onload = async () => {
|
|
1543
|
-
if (typeof globalkey == "string") {
|
|
1544
|
-
let i = 0;
|
|
1545
|
-
for (; !window[globalkey] && i < SCRIPT_INIT_TIMEOUT; i += 10)
|
|
1546
|
-
await sleep(10);
|
|
1547
|
-
if (i >= SCRIPT_INIT_TIMEOUT) {
|
|
1548
|
-
return rej(new Error("Timed out waiting for script to self-initialize."));
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
res();
|
|
1552
|
-
};
|
|
1553
|
-
this.document.body.appendChild(script);
|
|
1554
|
-
});
|
|
1555
|
-
}
|
|
1556
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DependencyService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1557
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DependencyService, providedIn: 'root' }); }
|
|
1558
|
-
}
|
|
1559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DependencyService, decorators: [{
|
|
1560
|
-
type: Injectable,
|
|
1561
|
-
args: [{
|
|
1562
|
-
providedIn: 'root'
|
|
1563
|
-
}]
|
|
1564
|
-
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
1565
|
-
type: Inject,
|
|
1566
|
-
args: [DOCUMENT]
|
|
1567
|
-
}] }] });
|
|
1568
|
-
|
|
1569
|
-
var ComponentResolveStrategy;
|
|
1570
|
-
(function (ComponentResolveStrategy) {
|
|
1571
|
-
/**
|
|
1572
|
-
* Match the fist component we find
|
|
1573
|
-
* (best used for standalone components)
|
|
1574
|
-
* @default
|
|
1575
|
-
*/
|
|
1576
|
-
ComponentResolveStrategy[ComponentResolveStrategy["PickFirst"] = 0] = "PickFirst";
|
|
1577
|
-
/**
|
|
1578
|
-
* Perform an Exact ID to Classname of the Component
|
|
1579
|
-
* case sensitive, zero tolerance.
|
|
1580
|
-
*/
|
|
1581
|
-
ComponentResolveStrategy[ComponentResolveStrategy["MatchIdToClassName"] = 1] = "MatchIdToClassName";
|
|
1582
|
-
/**
|
|
1583
|
-
* Perform a fuzzy ID to classname match
|
|
1584
|
-
* case insensitive, mutes symbols
|
|
1585
|
-
* ignores "Component" and "Module" postfixes on class
|
|
1586
|
-
* names
|
|
1587
|
-
*/
|
|
1588
|
-
ComponentResolveStrategy[ComponentResolveStrategy["FuzzyIdClassName"] = 2] = "FuzzyIdClassName";
|
|
1589
|
-
/**
|
|
1590
|
-
* Use a user-provided component match function
|
|
1591
|
-
*/
|
|
1592
|
-
ComponentResolveStrategy[ComponentResolveStrategy["Custom"] = 3] = "Custom";
|
|
1593
|
-
})(ComponentResolveStrategy || (ComponentResolveStrategy = {}));
|
|
1594
|
-
|
|
1595
|
-
// Monkey-patch the type of these symbols.
|
|
1596
|
-
const $id = Symbol("id");
|
|
1597
|
-
const $group = Symbol("group");
|
|
1598
|
-
const NGX_LAZY_LOADER_CONFIG = new InjectionToken('lazyloader-config');
|
|
1599
|
-
class LazyLoaderService {
|
|
1600
|
-
get err() { return LazyLoaderService.config.logger.err; }
|
|
1601
|
-
get log() { return LazyLoaderService.config.logger.log; }
|
|
1602
|
-
get warn() { return LazyLoaderService.config.logger.warn; }
|
|
1603
|
-
// A proxied registry that mutates reference keys
|
|
1604
|
-
static { this.registry = {}; }
|
|
1605
|
-
constructor(config = {}) {
|
|
1606
|
-
// Ensure this is singleton and works regardless of special instancing requirements.
|
|
1607
|
-
LazyLoaderService.configure(config);
|
|
1608
|
-
}
|
|
1609
|
-
static configure(config) {
|
|
1610
|
-
const { log, warn, err } = ConsoleLogger("ngx-lazy-loader", "#009688");
|
|
1611
|
-
this.config = {
|
|
1612
|
-
componentResolveStrategy: ComponentResolveStrategy.PickFirst,
|
|
1613
|
-
logger: {
|
|
1614
|
-
log,
|
|
1615
|
-
warn,
|
|
1616
|
-
err
|
|
1617
|
-
},
|
|
1618
|
-
...config
|
|
1619
|
-
};
|
|
1620
|
-
config?.entries?.forEach(e => this.addComponentToRegistry(e));
|
|
1621
|
-
// If a custom resolution strategy is provided but no resolution function is passed,
|
|
1622
|
-
// we throw an error
|
|
1623
|
-
if (this.config.componentResolveStrategy == ComponentResolveStrategy.Custom &&
|
|
1624
|
-
!this.config.customResolver) {
|
|
1625
|
-
throw new Error("Cannot initialize. Configuration specifies a custom resolve matcher but none was provided");
|
|
1626
|
-
}
|
|
1627
|
-
if (this.config.loaderDistractorComponent && this.config.loaderDistractorTemplate)
|
|
1628
|
-
throw new Error("Cannot have both a Component and Template for Distractor view.");
|
|
1629
|
-
if (this.config.errorComponent && this.config.errorTemplate)
|
|
1630
|
-
throw new Error("Cannot have both a Component and Template for Error view.");
|
|
1631
|
-
if (this.config.notFoundComponent && this.config.notFoundTemplate)
|
|
1632
|
-
throw new Error("Cannot have both a Component and Template for NotFound view.");
|
|
1633
|
-
}
|
|
1634
|
-
static addComponentToRegistry(registration) {
|
|
1635
|
-
if (!registration)
|
|
1636
|
-
throw new Error("Cannot add <undefined> component into registry.");
|
|
1637
|
-
// Clone the object into our repository and transfer the id into a standardized slug format
|
|
1638
|
-
const id = stringToSlug(registration.id ?? Date.now().toString()); // purge non-basic ASCII chars
|
|
1639
|
-
const group = registration.group || "default";
|
|
1640
|
-
registration[$id] = id;
|
|
1641
|
-
registration[$group] = id;
|
|
1642
|
-
if (!this.registry[group])
|
|
1643
|
-
this.registry[group] = [];
|
|
1644
|
-
// Check if we already have a registration for the component
|
|
1645
|
-
// if (this.registry[group] && typeof this.registry[group]['load'] == "function") {
|
|
1646
|
-
// // Warn the developer that the state is problematic
|
|
1647
|
-
// this.config.logger.warn(
|
|
1648
|
-
// `A previous entry already exists for ${id}! The old registration will be overridden.` +
|
|
1649
|
-
// `Please ensure you use groups if you intend to have duplicate component ids. ` +
|
|
1650
|
-
// `If this was intentional, first remove the old component from the registry before adding a new instance`
|
|
1651
|
-
// );
|
|
1652
|
-
// // If we're in dev mode, break the loader surface
|
|
1653
|
-
// if (isDevMode())
|
|
1654
|
-
// return;
|
|
1655
|
-
// }
|
|
1656
|
-
this.registry[group].push(registration);
|
|
1657
|
-
}
|
|
1658
|
-
/**
|
|
1659
|
-
* Register an Angular component
|
|
1660
|
-
* @param id identifier that is used to resolve the component
|
|
1661
|
-
* @param group
|
|
1662
|
-
* @param component Angular Component Class constructor
|
|
1663
|
-
*/
|
|
1664
|
-
registerComponent(args) {
|
|
1665
|
-
if (this.isComponentRegistered(args.id, args.group)) {
|
|
1666
|
-
this.log(`Will not re-register component '${args.id}' in group '${args.group || 'default'}' `);
|
|
1667
|
-
return;
|
|
1668
|
-
}
|
|
1669
|
-
LazyLoaderService.addComponentToRegistry({
|
|
1670
|
-
id: stringToSlug(args.id),
|
|
1671
|
-
matcher: args.matcher,
|
|
1672
|
-
group: stringToSlug(args.group || "default"),
|
|
1673
|
-
load: args.load || (() => args.component)
|
|
1674
|
-
});
|
|
1675
|
-
}
|
|
1676
|
-
/**
|
|
1677
|
-
*
|
|
1678
|
-
* @param id
|
|
1679
|
-
* @param group
|
|
1680
|
-
*/
|
|
1681
|
-
unregisterComponent(id, group = "default") {
|
|
1682
|
-
const _id = stringToSlug(id);
|
|
1683
|
-
const _group = stringToSlug(group);
|
|
1684
|
-
if (!this.resolveRegistrationEntry(id, group))
|
|
1685
|
-
throw new Error("Cannot unregister component ${}! Component is not present in registry");
|
|
1686
|
-
// TODO: handle clearing running instances
|
|
1687
|
-
delete LazyLoaderService.registry[_group][_id];
|
|
1688
|
-
}
|
|
1689
|
-
/**
|
|
1690
|
-
* Get the registration entry for a component.
|
|
1691
|
-
* Returns null if component is not in the registry.
|
|
1692
|
-
*/
|
|
1693
|
-
resolveRegistrationEntry(value, group = "default") {
|
|
1694
|
-
const _id = stringToSlug(value);
|
|
1695
|
-
const _group = stringToSlug(group);
|
|
1696
|
-
const targetGroup = (LazyLoaderService.registry[_group] || []);
|
|
1697
|
-
let items = targetGroup.filter(t => {
|
|
1698
|
-
if (!t)
|
|
1699
|
-
return false;
|
|
1700
|
-
// No matcher, check id
|
|
1701
|
-
if (!t.matcher)
|
|
1702
|
-
return t.id == value || t[$id] == _id;
|
|
1703
|
-
// Matcher is regex
|
|
1704
|
-
if (t.matcher instanceof RegExp)
|
|
1705
|
-
return t.matcher.test(value) || t.matcher.test(_id);
|
|
1706
|
-
// Matcher is string => regex
|
|
1707
|
-
if (typeof t.matcher == 'string') {
|
|
1708
|
-
const rx = new RegExp(t.matcher, 'ui');
|
|
1709
|
-
return rx.test(value) || rx.test(_id);
|
|
1710
|
-
}
|
|
1711
|
-
// Matcher is array
|
|
1712
|
-
if (Array.isArray(t.matcher)) {
|
|
1713
|
-
return !!t.matcher.find(e => stringToSlug(e) == _id);
|
|
1714
|
-
}
|
|
1715
|
-
// Custom matcher function
|
|
1716
|
-
if (typeof t.matcher == "function")
|
|
1717
|
-
return t.matcher(_id);
|
|
1718
|
-
return false;
|
|
1719
|
-
});
|
|
1720
|
-
if (items.length > 1) {
|
|
1721
|
-
this.warn("Resolved multiple components for the provided `[component]` binding. This may cause UI conflicts.");
|
|
1722
|
-
}
|
|
1723
|
-
if (items.length == 0) {
|
|
1724
|
-
return null;
|
|
1725
|
-
}
|
|
1726
|
-
const out = items[0];
|
|
1727
|
-
if (out.matcher instanceof RegExp) {
|
|
1728
|
-
const result = value.match(out.matcher) || _id.match(out.matcher);
|
|
1729
|
-
return {
|
|
1730
|
-
entry: out,
|
|
1731
|
-
matchGroups: result?.groups
|
|
1732
|
-
};
|
|
1733
|
-
}
|
|
1734
|
-
return { entry: out };
|
|
1735
|
-
}
|
|
1736
|
-
/**
|
|
1737
|
-
* Check if a component is currently registered
|
|
1738
|
-
* Can be used to validate regex matchers and aliases.
|
|
1739
|
-
*/
|
|
1740
|
-
isComponentRegistered(value, group = "default") {
|
|
1741
|
-
return !!this.resolveRegistrationEntry(value, group);
|
|
1742
|
-
}
|
|
1743
|
-
/**
|
|
1744
|
-
*
|
|
1745
|
-
* @param bundle
|
|
1746
|
-
* @returns The component `Object` if a component was resolved, `null` if no component was found
|
|
1747
|
-
* `false` if the specified strategy was an invalid selection
|
|
1748
|
-
*/
|
|
1749
|
-
resolveComponent(id, group, modules) {
|
|
1750
|
-
switch (LazyLoaderService.config.componentResolveStrategy) {
|
|
1751
|
-
case ComponentResolveStrategy.PickFirst: {
|
|
1752
|
-
return modules[0];
|
|
1753
|
-
}
|
|
1754
|
-
// Exact id -> classname match
|
|
1755
|
-
case ComponentResolveStrategy.MatchIdToClassName: {
|
|
1756
|
-
const matches = modules
|
|
1757
|
-
.filter(k => k.name == id);
|
|
1758
|
-
if (matches.length == 0)
|
|
1759
|
-
return null;
|
|
1760
|
-
return matches[0];
|
|
1761
|
-
}
|
|
1762
|
-
// Fuzzy id -> classname match
|
|
1763
|
-
case ComponentResolveStrategy.FuzzyIdClassName: {
|
|
1764
|
-
const _id = id.replace(/[^a-z0-9_\-]/ig, '');
|
|
1765
|
-
if (_id.length == 0) {
|
|
1766
|
-
LazyLoaderService.config.logger.err("Fuzzy classname matching stripped all symbols from the ID specified!");
|
|
1767
|
-
return false;
|
|
1768
|
-
}
|
|
1769
|
-
const rx = new RegExp(`^${id}(component|module)?$`, "i");
|
|
1770
|
-
const matches = modules
|
|
1771
|
-
.filter(mod => {
|
|
1772
|
-
let kid = mod.name.replace(/[^a-z0-9_\-]/ig, '');
|
|
1773
|
-
return rx.test(kid);
|
|
1774
|
-
});
|
|
1775
|
-
if (matches.length > 1) {
|
|
1776
|
-
LazyLoaderService.config.logger.err("Fuzzy classname matching resolved multiple targets!");
|
|
1777
|
-
return false;
|
|
1778
|
-
}
|
|
1779
|
-
if (matches.length == 0) {
|
|
1780
|
-
LazyLoaderService.config.logger.err("Fuzzy classname matching resolved no targets!");
|
|
1781
|
-
return null;
|
|
1782
|
-
}
|
|
1783
|
-
return matches[0];
|
|
1784
|
-
}
|
|
1785
|
-
case ComponentResolveStrategy.Custom: {
|
|
1786
|
-
return LazyLoaderService.config.customResolver(modules);
|
|
1787
|
-
}
|
|
1788
|
-
default: {
|
|
1789
|
-
return false;
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderService, deps: [{ token: NGX_LAZY_LOADER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1794
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderService, providedIn: 'root' }); }
|
|
1795
|
-
}
|
|
1796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderService, decorators: [{
|
|
1797
|
-
type: Injectable,
|
|
1798
|
-
args: [{
|
|
1799
|
-
providedIn: 'root'
|
|
1800
|
-
}]
|
|
1801
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1802
|
-
type: Optional
|
|
1803
|
-
}, {
|
|
1804
|
-
type: Inject,
|
|
1805
|
-
args: [NGX_LAZY_LOADER_CONFIG]
|
|
1806
|
-
}] }] });
|
|
1807
|
-
|
|
1808
|
-
class LazyLoaderComponent {
|
|
1809
|
-
/**
|
|
1810
|
-
* The id of the component that will be lazy loaded
|
|
1811
|
-
*/
|
|
1812
|
-
set id(data) {
|
|
1813
|
-
this.originalId = data;
|
|
1814
|
-
const id = stringToSlug(data);
|
|
1815
|
-
// Check if there is a change to the loaded component's id
|
|
1816
|
-
// if it's updated, we destroy and rehydrate the entire container
|
|
1817
|
-
if (this.initialized && this._id != id) {
|
|
1818
|
-
this._id = id;
|
|
1819
|
-
this.ngAfterViewInit();
|
|
1820
|
-
}
|
|
1821
|
-
else {
|
|
1822
|
-
this._id = id;
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
;
|
|
1826
|
-
set group(data) {
|
|
1827
|
-
this.originalGroup = data;
|
|
1828
|
-
const group = stringToSlug(data);
|
|
1829
|
-
if (typeof group != "string" || !group)
|
|
1830
|
-
return;
|
|
1831
|
-
// If the group was updated, retry to bootstrap something into the container.
|
|
1832
|
-
if (this.initialized && this._group != group) {
|
|
1833
|
-
this._group = group;
|
|
1834
|
-
this.ngAfterViewInit();
|
|
1835
|
-
return;
|
|
1836
|
-
}
|
|
1837
|
-
this._group = group;
|
|
1838
|
-
}
|
|
1839
|
-
get group() { return this._group; }
|
|
1840
|
-
/**
|
|
1841
|
-
* A map of inputs to bind to the child.
|
|
1842
|
-
* Supports change detection. (May fail on deep JSON changes)
|
|
1843
|
-
*
|
|
1844
|
-
* ```html
|
|
1845
|
-
* <lazy-loader component="MyLazyComponent"
|
|
1846
|
-
* [inputs]="{
|
|
1847
|
-
* prop1: true,
|
|
1848
|
-
* prop2: false,
|
|
1849
|
-
* complex: {
|
|
1850
|
-
* a: true,
|
|
1851
|
-
* b: 0
|
|
1852
|
-
* }
|
|
1853
|
-
* }"
|
|
1854
|
-
* >
|
|
1855
|
-
* </lazy-loader>
|
|
1856
|
-
* ```
|
|
1857
|
-
*/
|
|
1858
|
-
set inputs(data) {
|
|
1859
|
-
if (data == undefined)
|
|
1860
|
-
return;
|
|
1861
|
-
let previous = this._inputs;
|
|
1862
|
-
this._inputs = data;
|
|
1863
|
-
if (data == undefined)
|
|
1864
|
-
console.trace(data);
|
|
1865
|
-
if (this.targetComponentFactory) {
|
|
1866
|
-
const { inputs } = this.targetComponentFactory.ɵcmp;
|
|
1867
|
-
const currentKeys = Object.keys(inputs);
|
|
1868
|
-
const oldKeys = Object.keys(previous).filter(key => currentKeys.includes(key));
|
|
1869
|
-
const newKeys = Object.keys(data).filter(key => currentKeys.includes(key));
|
|
1870
|
-
const removed = oldKeys.filter(key => !newKeys.includes(key));
|
|
1871
|
-
// ? perhaps set to null or undefined instead
|
|
1872
|
-
removed.forEach(k => this.targetComponentInstance[k] = null);
|
|
1873
|
-
this.bindInputs();
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
/**
|
|
1877
|
-
* A map of outputs to bind from the child.
|
|
1878
|
-
* Should support change detection.
|
|
1879
|
-
* ```html
|
|
1880
|
-
* <lazy-loader component="MyLazyComponent"
|
|
1881
|
-
* [outputs]="{
|
|
1882
|
-
* prop3: onOutputFire
|
|
1883
|
-
* }"
|
|
1884
|
-
* >
|
|
1885
|
-
* </lazy-loader>
|
|
1886
|
-
* ```
|
|
1887
|
-
*/
|
|
1888
|
-
set outputs(data) {
|
|
1889
|
-
let previous = this._outputs;
|
|
1890
|
-
this._outputs = data;
|
|
1891
|
-
if (this.targetComponentFactory) {
|
|
1892
|
-
const { inputs } = this.targetComponentFactory.ɵcmp;
|
|
1893
|
-
const currentKeys = Object.keys(inputs);
|
|
1894
|
-
const removed = Object.keys(previous).filter(key => !currentKeys.includes(key));
|
|
1895
|
-
removed.forEach(k => {
|
|
1896
|
-
// Unsubscribe from observable
|
|
1897
|
-
this.outputSubscriptions[k]?.unsubscribe();
|
|
1898
|
-
delete this.targetComponentInstance[k];
|
|
1899
|
-
});
|
|
1900
|
-
this.bindOutputs();
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
constructor(service, viewContainerRef, dialog, dialogArguments) {
|
|
1904
|
-
this.service = service;
|
|
1905
|
-
this.viewContainerRef = viewContainerRef;
|
|
1906
|
-
this.dialog = dialog;
|
|
1907
|
-
this.dialogArguments = dialogArguments;
|
|
1908
|
-
this._group = "default";
|
|
1909
|
-
this.outputSubscriptions = {};
|
|
1910
|
-
/**
|
|
1911
|
-
* Emits errors encountered when loading components
|
|
1912
|
-
*/
|
|
1913
|
-
this.componentLoadError = new EventEmitter();
|
|
1914
|
-
/**
|
|
1915
|
-
* Emits when the component is fully constructed
|
|
1916
|
-
* and had it's inputs and outputs bound
|
|
1917
|
-
* > before `OnInit`
|
|
1918
|
-
*
|
|
1919
|
-
* Returns the active class instance of the lazy-loaded component
|
|
1920
|
-
*/
|
|
1921
|
-
this.componentLoaded = new EventEmitter();
|
|
1922
|
-
// Force 500ms delay before revealing the spinner
|
|
1923
|
-
this.clearEmitter = new EventEmitter();
|
|
1924
|
-
this.clearLoader$ = this.clearEmitter.pipe(debounceTime(300));
|
|
1925
|
-
this.showEmitter = new EventEmitter();
|
|
1926
|
-
this.showLoader$ = this.showEmitter.pipe(debounceTime(1));
|
|
1927
|
-
this.subscriptions = [
|
|
1928
|
-
this.clearLoader$.subscribe(() => {
|
|
1929
|
-
this.isClearingLoader = true;
|
|
1930
|
-
setTimeout(() => {
|
|
1931
|
-
this.renderSpinner = false;
|
|
1932
|
-
}, 300);
|
|
1933
|
-
}),
|
|
1934
|
-
this.showLoader$.subscribe(() => {
|
|
1935
|
-
this.isClearingLoader = false;
|
|
1936
|
-
this.renderSpinner = true;
|
|
1937
|
-
})
|
|
1938
|
-
];
|
|
1939
|
-
this.renderSpinner = true; // whether we render the DOM for the spinner
|
|
1940
|
-
this.isClearingLoader = false; // should the spinner start fading out
|
|
1941
|
-
this.initialized = false;
|
|
1942
|
-
this.config = LazyLoaderService.config;
|
|
1943
|
-
this.err = LazyLoaderService.config.logger.err;
|
|
1944
|
-
this.warn = LazyLoaderService.config.logger.warn;
|
|
1945
|
-
this.log = LazyLoaderService.config.logger.log;
|
|
1946
|
-
// First, check for dialog arguments
|
|
1947
|
-
if (this.dialogArguments) {
|
|
1948
|
-
this.inputs = this.dialogArguments.inputs || this.dialogArguments.data;
|
|
1949
|
-
this.outputs = this.dialogArguments.outputs;
|
|
1950
|
-
this.id = this.dialogArguments.id;
|
|
1951
|
-
this.group = this.dialogArguments.group;
|
|
1952
|
-
}
|
|
1953
|
-
}
|
|
1954
|
-
async ngAfterViewInit() {
|
|
1955
|
-
this.ngOnDestroy(false);
|
|
1956
|
-
this.isClearingLoader = false;
|
|
1957
|
-
this.renderSpinner = true;
|
|
1958
|
-
this.initialized = true;
|
|
1959
|
-
if (!this._id) {
|
|
1960
|
-
this.warn("No component was specified!");
|
|
1961
|
-
return this.loadDefault();
|
|
1962
|
-
}
|
|
1963
|
-
try {
|
|
1964
|
-
const _entry = this.service.resolveRegistrationEntry(this.originalId, this.originalGroup);
|
|
1965
|
-
if (!_entry || !_entry.entry) {
|
|
1966
|
-
this.err(`Failed to find Component '${this._id}' in group '${this._group}' in registry!`);
|
|
1967
|
-
return this.loadDefault();
|
|
1968
|
-
}
|
|
1969
|
-
const { entry, matchGroups } = _entry;
|
|
1970
|
-
this._matchGroups = matchGroups;
|
|
1971
|
-
// Download the "module" (the standalone component)
|
|
1972
|
-
const bundle = this.targetModule = await entry.load();
|
|
1973
|
-
// Check if there is some corruption on the bundle.
|
|
1974
|
-
if (!bundle || typeof bundle != 'object') {
|
|
1975
|
-
this.err(`Failed to load component/module for '${this._id}'! Parsed resource is invalid.`);
|
|
1976
|
-
return this.loadError();
|
|
1977
|
-
}
|
|
1978
|
-
const modules = Object.keys(bundle)
|
|
1979
|
-
.map(k => {
|
|
1980
|
-
const entry = bundle[k];
|
|
1981
|
-
// Strictly check for exported modules or standalone components
|
|
1982
|
-
if (typeof entry == "function" && typeof entry["ɵfac"] == "function")
|
|
1983
|
-
return entry;
|
|
1984
|
-
return null;
|
|
1985
|
-
})
|
|
1986
|
-
.filter(e => e != null)
|
|
1987
|
-
.filter(entry => {
|
|
1988
|
-
entry['_isModule'] = !!entry['ɵmod']; // module
|
|
1989
|
-
entry['_isComponent'] = !!entry['ɵcmp']; // component
|
|
1990
|
-
return (entry['_isModule'] || entry['_isComponent']);
|
|
1991
|
-
});
|
|
1992
|
-
if (modules.length == 0) {
|
|
1993
|
-
this.err(`Component/Module loaded for '${this._id}' has no exported components or modules!`);
|
|
1994
|
-
return this.loadError();
|
|
1995
|
-
}
|
|
1996
|
-
const component = this.targetComponentFactory = this.service.resolveComponent(this._id, "default", modules);
|
|
1997
|
-
if (!component) {
|
|
1998
|
-
this.err(`Component '${this._id}' is invalid or corrupted!`);
|
|
1999
|
-
return this.loadError();
|
|
2000
|
-
}
|
|
2001
|
-
// const componentRef = this.targetComponentContainerRef = createComponent(component as any, {
|
|
2002
|
-
// environmentInjector: this.appRef.injector,
|
|
2003
|
-
// elementInjector: this.injector,
|
|
2004
|
-
// hostElement: this.viewContainerRef.element.nativeElement,
|
|
2005
|
-
// // projectableNodes:
|
|
2006
|
-
// });
|
|
2007
|
-
// // this.targetRef = this.targetContainer.insert(this.targetComponentContainerRef.hostView);
|
|
2008
|
-
// this.appRef.attachView(componentRef.hostView);
|
|
2009
|
-
// Bootstrap the component into the container
|
|
2010
|
-
const componentRef = this.targetComponentContainerRef = this.targetContainer.createComponent(component);
|
|
2011
|
-
this.targetRef = this.targetContainer.insert(this.targetComponentContainerRef.hostView);
|
|
2012
|
-
const instance = this.targetComponentInstance = componentRef['instance'];
|
|
2013
|
-
this.bindInputs();
|
|
2014
|
-
this.bindOutputs();
|
|
2015
|
-
this.componentLoaded.next(instance);
|
|
2016
|
-
this.instance = instance;
|
|
2017
|
-
// Look for an observable called isLoading$ that will make us show/hide
|
|
2018
|
-
// the same distractor that is used on basic loading
|
|
2019
|
-
const isLoading$ = instance['ngxShowDistractor$'];
|
|
2020
|
-
if (isLoading$ && typeof isLoading$.subscribe == "function") {
|
|
2021
|
-
this.distractorSubscription = isLoading$.subscribe(loading => {
|
|
2022
|
-
loading ? this.showEmitter.emit() : this.clearEmitter.emit();
|
|
2023
|
-
});
|
|
2024
|
-
}
|
|
2025
|
-
else {
|
|
2026
|
-
this.clearEmitter.emit();
|
|
2027
|
-
}
|
|
2028
|
-
const name = Object.keys(bundle)[0];
|
|
2029
|
-
this.log(`Loaded '${name}'`);
|
|
2030
|
-
this.clearEmitter.emit();
|
|
2031
|
-
return componentRef;
|
|
2032
|
-
}
|
|
2033
|
-
catch (ex) {
|
|
2034
|
-
if (isDevMode()) {
|
|
2035
|
-
console.warn("Component DDD " + this._id + " threw an error on mount!");
|
|
2036
|
-
console.warn("This will cause you to see a 404 panel.");
|
|
2037
|
-
console.error(ex);
|
|
2038
|
-
}
|
|
2039
|
-
// Network errors throw a toast and return an error component
|
|
2040
|
-
if (ex && !isDevMode()) {
|
|
2041
|
-
console.error("Uncaught error when loading component");
|
|
2042
|
-
throw ex;
|
|
2043
|
-
}
|
|
2044
|
-
return this.loadDefault();
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
ngOnDestroy(clearAll = true) {
|
|
2048
|
-
// unsubscribe from all subscriptions
|
|
2049
|
-
Object.entries(this.outputSubscriptions).forEach(([key, sub]) => {
|
|
2050
|
-
sub.unsubscribe();
|
|
2051
|
-
});
|
|
2052
|
-
this.outputSubscriptions = {};
|
|
2053
|
-
// Clear all things
|
|
2054
|
-
if (clearAll) {
|
|
2055
|
-
Object.entries(this.subscriptions).forEach(([key, sub]) => {
|
|
2056
|
-
sub.unsubscribe();
|
|
2057
|
-
});
|
|
2058
|
-
}
|
|
2059
|
-
this.distractorSubscription?.unsubscribe();
|
|
2060
|
-
// Clear target container
|
|
2061
|
-
this.targetRef?.destroy();
|
|
2062
|
-
this.targetComponentContainerRef?.destroy();
|
|
2063
|
-
this.targetContainer?.clear();
|
|
2064
|
-
// Wipe the rest of the state clean
|
|
2065
|
-
this.targetRef = null;
|
|
2066
|
-
this.targetComponentContainerRef = null;
|
|
2067
|
-
}
|
|
2068
|
-
/**
|
|
2069
|
-
* Bind the input values to the child component.
|
|
2070
|
-
*/
|
|
2071
|
-
bindInputs() {
|
|
2072
|
-
if (!this._inputs || !this.targetComponentInstance)
|
|
2073
|
-
return;
|
|
2074
|
-
// Merge match groups
|
|
2075
|
-
if (typeof this._matchGroups == "object") {
|
|
2076
|
-
Object.entries(this._matchGroups).forEach(([key, val]) => {
|
|
2077
|
-
if (typeof this._inputs[key] == 'undefined')
|
|
2078
|
-
this._inputs[key] = val;
|
|
2079
|
-
});
|
|
2080
|
-
}
|
|
2081
|
-
// forward-bind inputs
|
|
2082
|
-
const { inputs } = this.targetComponentFactory.ɵcmp;
|
|
2083
|
-
// Returns a list of entries that need to be set
|
|
2084
|
-
// This makes it so that unnecessary setters are not invoked.
|
|
2085
|
-
const updated = Object.entries(inputs).filter(([parentKey, childKey]) => {
|
|
2086
|
-
return this.targetComponentInstance[childKey] != this._inputs[parentKey];
|
|
2087
|
-
});
|
|
2088
|
-
updated.forEach(([parentKey, childKey]) => {
|
|
2089
|
-
if (this._inputs.hasOwnProperty(parentKey)) {
|
|
2090
|
-
// Angular 19.2+
|
|
2091
|
-
if (Array.isArray(childKey)) {
|
|
2092
|
-
this.targetComponentInstance[childKey[0]] = this._inputs[parentKey];
|
|
2093
|
-
}
|
|
2094
|
-
else {
|
|
2095
|
-
this.targetComponentInstance[childKey] = this._inputs[parentKey];
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
});
|
|
2099
|
-
}
|
|
2100
|
-
/**
|
|
2101
|
-
* Bind the output handlers to the loaded child component
|
|
2102
|
-
*/
|
|
2103
|
-
bindOutputs() {
|
|
2104
|
-
if (!this._outputs || !this.targetComponentInstance)
|
|
2105
|
-
return;
|
|
2106
|
-
const { outputs } = this.targetComponentFactory.ɵcmp;
|
|
2107
|
-
// Get a list of unregistered outputs
|
|
2108
|
-
const newOutputs = Object.entries(outputs).filter(([parentKey, childKey]) => {
|
|
2109
|
-
return !this.outputSubscriptions[parentKey];
|
|
2110
|
-
});
|
|
2111
|
-
// Reverse bind via subscription
|
|
2112
|
-
newOutputs.forEach(([parentKey, childKey]) => {
|
|
2113
|
-
if (this._outputs.hasOwnProperty(parentKey)) {
|
|
2114
|
-
const target = this.targetComponentInstance[childKey];
|
|
2115
|
-
const outputs = this._outputs;
|
|
2116
|
-
// Angular folks, stop making this so difficult.
|
|
2117
|
-
const ctx = this.viewContainerRef['_hostLView'][8];
|
|
2118
|
-
const sub = target.subscribe(outputs[parentKey].bind(ctx)); // Subscription
|
|
2119
|
-
this.outputSubscriptions[parentKey] = sub;
|
|
2120
|
-
}
|
|
2121
|
-
});
|
|
2122
|
-
}
|
|
2123
|
-
/**
|
|
2124
|
-
* Load the "Default" component (404) screen normally.
|
|
2125
|
-
* This is shown when the component id isn't in the
|
|
2126
|
-
* registry or otherwise doesn't match
|
|
2127
|
-
*
|
|
2128
|
-
* This
|
|
2129
|
-
*/
|
|
2130
|
-
loadDefault() {
|
|
2131
|
-
if (this.config.notFoundComponent)
|
|
2132
|
-
this.targetContainer.createComponent(this.config.notFoundComponent);
|
|
2133
|
-
this.clearEmitter.emit();
|
|
2134
|
-
}
|
|
2135
|
-
/**
|
|
2136
|
-
* Load the "Error" component.
|
|
2137
|
-
* This is shown when we are able to resolve the component
|
|
2138
|
-
* in the registry, but have some issue boostrapping the
|
|
2139
|
-
* component into the viewContainer
|
|
2140
|
-
*/
|
|
2141
|
-
loadError() {
|
|
2142
|
-
if (this.config.errorComponent)
|
|
2143
|
-
this.targetContainer.createComponent(this.config.errorComponent);
|
|
2144
|
-
this.clearEmitter.emit();
|
|
2145
|
-
}
|
|
2146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderComponent, deps: [{ token: LazyLoaderService }, { token: i0.ViewContainerRef, optional: true }, { token: i2.DialogRef, optional: true }, { token: MAT_DIALOG_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2147
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: LazyLoaderComponent, isStandalone: true, selector: "ngx-lazy-loader", inputs: { id: ["component", "id"], group: "group", inputs: "inputs", outputs: "outputs" }, outputs: { componentLoadError: "componentLoadError", componentLoaded: "componentLoaded" }, viewQueries: [{ propertyName: "targetContainer", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<ng-container #content></ng-container>\n\n@if (renderSpinner) {\n <div\n class=\"ngx-lazy-loader-distractor\"\n [class.destroying]=\"isClearingLoader\"\n >\n @if (config.loaderDistractorComponent) {\n <ng-container\n [ngComponentOutlet]=\"config.loaderDistractorComponent\"\n />\n }\n @if (config.loaderDistractorTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"config.loaderDistractorTemplate\"\n [ngTemplateOutletContext]=\"{ '$implicit': inputs }\"\n />\n }\n </div>\n}\n", styles: [":host{display:contents;contain:content;z-index:1;position:relative}.ngx-lazy-loader-distractor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background-color:var(--background-color, #212121);opacity:1;transition:opacity .3s ease;z-index:999999;animation:fade-in .3s ease}.ngx-lazy-loader-distractor.destroying{opacity:0;pointer-events:none}@keyframes fade-in{0%{opacity:0;pointer-events:none}to{opacity:1;pointer-events:all}}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
2148
|
-
}
|
|
2149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderComponent, decorators: [{
|
|
2150
|
-
type: Component,
|
|
2151
|
-
args: [{ selector: 'ngx-lazy-loader', imports: [NgComponentOutlet, NgTemplateOutlet], standalone: true, template: "<ng-container #content></ng-container>\n\n@if (renderSpinner) {\n <div\n class=\"ngx-lazy-loader-distractor\"\n [class.destroying]=\"isClearingLoader\"\n >\n @if (config.loaderDistractorComponent) {\n <ng-container\n [ngComponentOutlet]=\"config.loaderDistractorComponent\"\n />\n }\n @if (config.loaderDistractorTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"config.loaderDistractorTemplate\"\n [ngTemplateOutletContext]=\"{ '$implicit': inputs }\"\n />\n }\n </div>\n}\n", styles: [":host{display:contents;contain:content;z-index:1;position:relative}.ngx-lazy-loader-distractor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background-color:var(--background-color, #212121);opacity:1;transition:opacity .3s ease;z-index:999999;animation:fade-in .3s ease}.ngx-lazy-loader-distractor.destroying{opacity:0;pointer-events:none}@keyframes fade-in{0%{opacity:0;pointer-events:none}to{opacity:1;pointer-events:all}}\n"] }]
|
|
2152
|
-
}], ctorParameters: () => [{ type: LazyLoaderService }, { type: i0.ViewContainerRef, decorators: [{
|
|
2153
|
-
type: Optional
|
|
2154
|
-
}] }, { type: i2.DialogRef, decorators: [{
|
|
2155
|
-
type: Optional
|
|
2156
|
-
}] }, { type: undefined, decorators: [{
|
|
2157
|
-
type: Optional
|
|
2158
|
-
}, {
|
|
2159
|
-
type: Inject,
|
|
2160
|
-
args: [MAT_DIALOG_DATA]
|
|
2161
|
-
}] }], propDecorators: { targetContainer: [{
|
|
2162
|
-
type: ViewChild,
|
|
2163
|
-
args: ["content", { read: ViewContainerRef }]
|
|
2164
|
-
}], id: [{
|
|
2165
|
-
type: Input,
|
|
2166
|
-
args: ["component"]
|
|
2167
|
-
}], group: [{
|
|
2168
|
-
type: Input,
|
|
2169
|
-
args: ["group"]
|
|
2170
|
-
}], inputs: [{
|
|
2171
|
-
type: Input,
|
|
2172
|
-
args: ["inputs"]
|
|
2173
|
-
}], outputs: [{
|
|
2174
|
-
type: Input,
|
|
2175
|
-
args: ["outputs"]
|
|
2176
|
-
}], componentLoadError: [{
|
|
2177
|
-
type: Output
|
|
2178
|
-
}], componentLoaded: [{
|
|
2179
|
-
type: Output
|
|
2180
|
-
}] } });
|
|
2181
|
-
|
|
2182
|
-
const { log: log$1, warn: warn$1, err: err$1 } = ConsoleLogger("DialogService", "#607d8b");
|
|
2183
|
-
class DialogService {
|
|
2184
|
-
constructor(dialog, lazyLoader) {
|
|
2185
|
-
this.dialog = dialog;
|
|
2186
|
-
this.lazyLoader = lazyLoader;
|
|
2187
|
-
this.dialogs = [];
|
|
2188
|
-
}
|
|
2189
|
-
open(name, groupOrOptions, opts = {}) {
|
|
2190
|
-
const group = typeof groupOrOptions == "string" ? groupOrOptions : 'default';
|
|
2191
|
-
if (typeof groupOrOptions == 'object')
|
|
2192
|
-
opts = groupOrOptions;
|
|
2193
|
-
return new Promise((resolve, reject) => {
|
|
2194
|
-
const registration = this.lazyLoader.resolveRegistrationEntry(name, group);
|
|
2195
|
-
if (!registration)
|
|
2196
|
-
return reject(new Error("Cannot open dialog for " + name + ". Could not find in registry."));
|
|
2197
|
-
const args = {
|
|
2198
|
-
closeOnNavigation: true,
|
|
2199
|
-
restoreFocus: true,
|
|
2200
|
-
width: registration['width'],
|
|
2201
|
-
height: registration['height'],
|
|
2202
|
-
...opts,
|
|
2203
|
-
data: {
|
|
2204
|
-
id: name,
|
|
2205
|
-
inputs: opts.inputs || {},
|
|
2206
|
-
outputs: opts.outputs || {},
|
|
2207
|
-
group: group
|
|
2208
|
-
},
|
|
2209
|
-
panelClass: [
|
|
2210
|
-
"dialog-" + name,
|
|
2211
|
-
...(Array.isArray(opts.panelClass) ? opts.panelClass : [opts.panelClass])
|
|
2212
|
-
]
|
|
2213
|
-
};
|
|
2214
|
-
let dialog = this.dialog.open(LazyLoaderComponent, args);
|
|
2215
|
-
dialog['idx'] = name;
|
|
2216
|
-
this.dialogs.push(dialog);
|
|
2217
|
-
dialog.afterClosed().subscribe(result => {
|
|
2218
|
-
log$1("Dialog closed " + name, result);
|
|
2219
|
-
resolve(result);
|
|
2220
|
-
});
|
|
2221
|
-
});
|
|
2222
|
-
}
|
|
2223
|
-
// Close all dialogs matching the given name
|
|
2224
|
-
close(name) {
|
|
2225
|
-
const dialogs = this.dialogs.filter(d => d['idx'] == name);
|
|
2226
|
-
dialogs.forEach(dialog => dialog.close());
|
|
2227
|
-
}
|
|
2228
|
-
/**
|
|
2229
|
-
* Method to close _all_ dialogs.
|
|
2230
|
-
* Should be used sparingly.
|
|
2231
|
-
*/
|
|
2232
|
-
clearDialog() {
|
|
2233
|
-
this.dialogs.forEach(dialog => dialog.close());
|
|
2234
|
-
}
|
|
2235
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DialogService, deps: [{ token: i1$1.MatDialog }, { token: LazyLoaderService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2236
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DialogService, providedIn: 'root' }); }
|
|
2237
|
-
}
|
|
2238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DialogService, decorators: [{
|
|
2239
|
-
type: Injectable,
|
|
2240
|
-
args: [{
|
|
2241
|
-
providedIn: 'root'
|
|
2242
|
-
}]
|
|
2243
|
-
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: LazyLoaderService }] });
|
|
2244
|
-
|
|
2245
|
-
// Total number of _retries_ if there is a 429 response code.
|
|
2246
|
-
const retryCount = 2;
|
|
2247
|
-
class Fetch {
|
|
2248
|
-
constructor(http) {
|
|
2249
|
-
this.http = http;
|
|
2250
|
-
}
|
|
2251
|
-
// Public interface for making AJAX transactions
|
|
2252
|
-
get(url, options = {}, returnError = false) {
|
|
2253
|
-
return this.request("get", url, options, returnError);
|
|
2254
|
-
}
|
|
2255
|
-
put(url, body, options = {}, returnError = false) {
|
|
2256
|
-
options.body = (options.body && Object.keys(options.body).length > 0 ? options.body : body) || {};
|
|
2257
|
-
return this.request("put", url, options, returnError);
|
|
2258
|
-
}
|
|
2259
|
-
post(url, body, options = {}, returnError = false) {
|
|
2260
|
-
options.body = (options.body && Object.keys(options.body).length > 0 ? options.body : body) || {};
|
|
2261
|
-
return this.request("post", url, options, returnError);
|
|
2262
|
-
}
|
|
2263
|
-
patch(url, body, options = {}, returnError = false) {
|
|
2264
|
-
options.body = (options.body && Object.keys(options.body).length > 0 ? options.body : body) || {};
|
|
2265
|
-
return this.request("patch", url, options, returnError);
|
|
2266
|
-
}
|
|
2267
|
-
delete(url, options = {}, returnError = false) {
|
|
2268
|
-
return this.request("delete", url, options, returnError);
|
|
2269
|
-
}
|
|
2270
|
-
// Internally, handle the observable as a promise.
|
|
2271
|
-
request(method, url, options = {}, returnError = false) {
|
|
2272
|
-
options.reportProgress = true;
|
|
2273
|
-
// Allow support for different response types.
|
|
2274
|
-
// Generally we shouldn't need this to be anything other than JSON.
|
|
2275
|
-
options.responseType = options.responseType || "json";
|
|
2276
|
-
options.withCredentials = true;
|
|
2277
|
-
let abort = false;
|
|
2278
|
-
const p = new Promise((resolve, reject) => {
|
|
2279
|
-
const o = this.http.request(method, url, options)
|
|
2280
|
-
.pipe(retry({
|
|
2281
|
-
delay(error, retryCount) {
|
|
2282
|
-
// 429 and 502 are most common for overloaded
|
|
2283
|
-
// backends -- so we'll retry if we get these errors
|
|
2284
|
-
if (error.status == 429 || error.status == 502)
|
|
2285
|
-
return of({});
|
|
2286
|
-
if (error.status == 504 && isDevMode())
|
|
2287
|
-
alert("It looks like you can't reach your development backend anymore");
|
|
2288
|
-
abort = true;
|
|
2289
|
-
reject(error);
|
|
2290
|
-
throw error;
|
|
2291
|
-
},
|
|
2292
|
-
count: retryCount
|
|
2293
|
-
}))
|
|
2294
|
-
.subscribe(data => {
|
|
2295
|
-
resolve(data);
|
|
2296
|
-
// provide 3ms slacktime before releasing observable.
|
|
2297
|
-
setTimeout(() => {
|
|
2298
|
-
o.unsubscribe();
|
|
2299
|
-
}, 3);
|
|
2300
|
-
});
|
|
2301
|
-
});
|
|
2302
|
-
return p;
|
|
2303
|
-
}
|
|
2304
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Fetch, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2305
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Fetch, providedIn: "root" }); }
|
|
2306
|
-
}
|
|
2307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Fetch, decorators: [{
|
|
2308
|
-
type: Injectable,
|
|
2309
|
-
args: [{
|
|
2310
|
-
providedIn: "root"
|
|
2311
|
-
}]
|
|
2312
|
-
}], ctorParameters: () => [{ type: i1$2.HttpClient }] });
|
|
2313
|
-
|
|
2314
|
-
/**
|
|
2315
|
-
* Service that listens for global keyboard events
|
|
2316
|
-
*/
|
|
2317
|
-
class FileService {
|
|
2318
|
-
constructor(fetch) {
|
|
2319
|
-
this.fetch = fetch;
|
|
2320
|
-
this.chooseFile = (accept, multiple = false, formMetadata = {}) => {
|
|
2321
|
-
return new Promise(r => {
|
|
2322
|
-
const inEl = document.createElement('input');
|
|
2323
|
-
inEl.setAttribute('type', 'file');
|
|
2324
|
-
if (multiple)
|
|
2325
|
-
inEl.setAttribute('multiple', '');
|
|
2326
|
-
if (accept)
|
|
2327
|
-
inEl.setAttribute('accept', accept);
|
|
2328
|
-
inEl.click();
|
|
2329
|
-
let formData = new FormData();
|
|
2330
|
-
inEl.addEventListener('change', () => {
|
|
2331
|
-
Object.keys(inEl.files).forEach(k => {
|
|
2332
|
-
const file = inEl.files[k];
|
|
2333
|
-
const name = file.name;
|
|
2334
|
-
formData.append(name, file);
|
|
2335
|
-
});
|
|
2336
|
-
formData.append("data", JSON.stringify(formMetadata));
|
|
2337
|
-
inEl.remove();
|
|
2338
|
-
r(formData);
|
|
2339
|
-
});
|
|
2340
|
-
});
|
|
2341
|
-
};
|
|
2342
|
-
}
|
|
2343
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FileService, deps: [{ token: Fetch }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2344
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FileService, providedIn: 'root' }); }
|
|
2345
|
-
}
|
|
2346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FileService, decorators: [{
|
|
2347
|
-
type: Injectable,
|
|
2348
|
-
args: [{
|
|
2349
|
-
providedIn: 'root'
|
|
2350
|
-
}]
|
|
2351
|
-
}], ctorParameters: () => [{ type: Fetch }] });
|
|
2352
|
-
|
|
2353
|
-
/**
|
|
2354
|
-
* Service that listens for global keyboard events
|
|
2355
|
-
*/
|
|
2356
|
-
class KeyboardService {
|
|
2357
|
-
constructor() {
|
|
2358
|
-
this.heldKeys = {};
|
|
2359
|
-
this.keyCommands = [];
|
|
2360
|
-
window.addEventListener("keydown", (evt) => this.onKeyDown(evt));
|
|
2361
|
-
window.addEventListener("keyup", (evt) => this.onKeyUp(evt));
|
|
2362
|
-
}
|
|
2363
|
-
onKeyDown(evt) {
|
|
2364
|
-
// console.log("keydown", evt.key)
|
|
2365
|
-
this.heldKeys[evt.key.toLowerCase()] = true;
|
|
2366
|
-
// Do a general filter where all of the modifiers must be matched if specified
|
|
2367
|
-
// Then check that the actual keys match what was specified
|
|
2368
|
-
let commands = this.keyCommands
|
|
2369
|
-
.filter(kc => (kc.ctrl == undefined || kc.ctrl === evt.ctrlKey) &&
|
|
2370
|
-
(kc.alt == undefined || kc.alt === evt.altKey) &&
|
|
2371
|
-
(kc.shift == undefined || kc.shift === evt.shiftKey) &&
|
|
2372
|
-
(kc.super == undefined || kc.super === evt.metaKey) &&
|
|
2373
|
-
kc.keys.length == kc.keys.filter(k => this.heldKeys[k])?.length);
|
|
2374
|
-
if (evt.ctrlKey && commands.length > 0 || commands.find(c => c.interrupt)) {
|
|
2375
|
-
evt.stopPropagation();
|
|
2376
|
-
evt.preventDefault();
|
|
2377
|
-
}
|
|
2378
|
-
if (evt.key == "Pause")
|
|
2379
|
-
debugger;
|
|
2380
|
-
commands.forEach(kc => kc.sub.next(evt));
|
|
2381
|
-
/**
|
|
2382
|
-
* Prevent CTRL+P and other standard key events from being handled by the browser.
|
|
2383
|
-
* Allow specific combonations:
|
|
2384
|
-
* CTRL+W
|
|
2385
|
-
* CTRL+T
|
|
2386
|
-
* CTRL+F5
|
|
2387
|
-
*/
|
|
2388
|
-
// if (evt.ctrlKey && !['w', 't', 'F5'].includes(evt.key)) {
|
|
2389
|
-
// evt.preventDefault();
|
|
2390
|
-
// }
|
|
2391
|
-
}
|
|
2392
|
-
onKeyUp(evt) {
|
|
2393
|
-
this.heldKeys[evt.key.toLowerCase()] = false;
|
|
2394
|
-
}
|
|
2395
|
-
onKeyPress(evt) {
|
|
2396
|
-
// this.heldKeys[evt.key] = false;
|
|
2397
|
-
}
|
|
2398
|
-
/**
|
|
2399
|
-
* Use this to subscribe to keyboard events throughout
|
|
2400
|
-
* the application. This is a passive listener and will
|
|
2401
|
-
* **NOT** interrupt the event chain.
|
|
2402
|
-
*/
|
|
2403
|
-
onKeyCommand(key) {
|
|
2404
|
-
const sub = new Subject();
|
|
2405
|
-
let item = {
|
|
2406
|
-
...key,
|
|
2407
|
-
keys: (Array.isArray(key.key) ? key.key : [key.key]),
|
|
2408
|
-
sub: sub
|
|
2409
|
-
};
|
|
2410
|
-
this.keyCommands.push(item);
|
|
2411
|
-
return {
|
|
2412
|
-
...sub,
|
|
2413
|
-
subscribe: ((...args) => {
|
|
2414
|
-
const s = sub.subscribe(...args);
|
|
2415
|
-
return {
|
|
2416
|
-
...s,
|
|
2417
|
-
unsubscribe: () => {
|
|
2418
|
-
s.unsubscribe();
|
|
2419
|
-
// Remove the keycommand from the list of listeners.
|
|
2420
|
-
const i = this.keyCommands.findIndex(c => c == item);
|
|
2421
|
-
this.keyCommands.splice(i, 1);
|
|
2422
|
-
}
|
|
2423
|
-
};
|
|
2424
|
-
})
|
|
2425
|
-
};
|
|
2426
|
-
}
|
|
2427
|
-
/**
|
|
2428
|
-
* Return `true` if shift is currently pressed.
|
|
2429
|
-
*/
|
|
2430
|
-
get isShiftPressed() {
|
|
2431
|
-
return !!this.heldKeys["shift"];
|
|
2432
|
-
}
|
|
2433
|
-
/**
|
|
2434
|
-
* Return `true` if ctrl is currently pressed.
|
|
2435
|
-
*/
|
|
2436
|
-
get isCtrlPressed() {
|
|
2437
|
-
return !!this.heldKeys["control"];
|
|
2438
|
-
}
|
|
2439
|
-
/**
|
|
2440
|
-
* Return `true` if alt is currently pressed.
|
|
2441
|
-
*/
|
|
2442
|
-
get isAltPressed() {
|
|
2443
|
-
return !!this.heldKeys["alt"];
|
|
2444
|
-
}
|
|
2445
|
-
/**
|
|
2446
|
-
* Return `true` if super (mac/linux) or the windows key is currently pressed.
|
|
2447
|
-
*/
|
|
2448
|
-
get isSuperPressed() {
|
|
2449
|
-
return !!this.heldKeys["super"];
|
|
2450
|
-
}
|
|
2451
|
-
/**
|
|
2452
|
-
* Return `true` if tab is currently pressed.
|
|
2453
|
-
*/
|
|
2454
|
-
get isTabPressed() {
|
|
2455
|
-
return !!this.heldKeys["tab"];
|
|
2456
|
-
}
|
|
2457
|
-
clearKeys() {
|
|
2458
|
-
Object.keys(this.heldKeys).forEach(k => {
|
|
2459
|
-
this.heldKeys[k] = false;
|
|
2460
|
-
});
|
|
2461
|
-
}
|
|
2462
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: KeyboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2463
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: KeyboardService, providedIn: 'root' }); }
|
|
2464
|
-
}
|
|
2465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: KeyboardService, decorators: [{
|
|
2466
|
-
type: Injectable,
|
|
2467
|
-
args: [{
|
|
2468
|
-
providedIn: 'root'
|
|
2469
|
-
}]
|
|
2470
|
-
}], ctorParameters: () => [], propDecorators: { clearKeys: [{
|
|
2471
|
-
type: HostListener,
|
|
2472
|
-
args: ["window:blur"]
|
|
2473
|
-
}, {
|
|
2474
|
-
type: HostListener,
|
|
2475
|
-
args: ["window:resize"]
|
|
2476
|
-
}] } });
|
|
2477
|
-
|
|
2478
|
-
const { log, warn, err } = ConsoleLogger("NavigationService", "#ff9800");
|
|
2479
|
-
class NavigationService {
|
|
2480
|
-
constructor(lazyLoader) {
|
|
2481
|
-
this.lazyLoader = lazyLoader;
|
|
2482
|
-
this.virtualPath$ = new BehaviorSubject(null);
|
|
2483
|
-
// @ts-ignore
|
|
2484
|
-
window.onhashchange = () => this.loadRootPageFromUrl();
|
|
2485
|
-
this.loadRootPageFromUrl();
|
|
2486
|
-
}
|
|
2487
|
-
loadRootPageFromUrl() {
|
|
2488
|
-
const hash = location.hash.split("?")[0];
|
|
2489
|
-
const root = hash.replace(/^\/?#\//, '');
|
|
2490
|
-
// If the URL is imprecisely set, we restore it to the landing page
|
|
2491
|
-
if (!root || !root.trim())
|
|
2492
|
-
return this.loadRootPage("#/Landing");
|
|
2493
|
-
this.loadRootPage(location.hash);
|
|
2494
|
-
}
|
|
2495
|
-
loadRootPage(url, data = {}) {
|
|
2496
|
-
const [path, query] = url.split('?');
|
|
2497
|
-
const hash = path.replace(/^\/?#\/?/, '');
|
|
2498
|
-
const chunks = hash.split('/');
|
|
2499
|
-
// Get query params and pass them as @Input arguments.
|
|
2500
|
-
const params = query?.split('&')
|
|
2501
|
-
.reduce((pars, par) => {
|
|
2502
|
-
const [key, value] = par.split("=");
|
|
2503
|
-
const decoded = decodeURIComponent(value);
|
|
2504
|
-
pars[key] = decoded;
|
|
2505
|
-
return pars;
|
|
2506
|
-
}, {}) || {};
|
|
2507
|
-
log(`Root page navigate to '${hash}'`, { params, chunks });
|
|
2508
|
-
const root = hash.replace(/^\/?#\//, '');
|
|
2509
|
-
this.virtualPath$.next({
|
|
2510
|
-
root: hash,
|
|
2511
|
-
chunks: chunks,
|
|
2512
|
-
args: params
|
|
2513
|
-
});
|
|
2514
|
-
}
|
|
2515
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationService, deps: [{ token: LazyLoaderService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2516
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationService, providedIn: 'root' }); }
|
|
2517
|
-
}
|
|
2518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationService, decorators: [{
|
|
2519
|
-
type: Injectable,
|
|
2520
|
-
args: [{
|
|
2521
|
-
providedIn: 'root'
|
|
2522
|
-
}]
|
|
2523
|
-
}], ctorParameters: () => [{ type: LazyLoaderService }] });
|
|
2524
|
-
|
|
2525
|
-
const verifyTheme = (theme) => {
|
|
2526
|
-
if (theme == 'dark' || theme == 'light')
|
|
2527
|
-
return theme;
|
|
2528
|
-
return 'auto';
|
|
2529
|
-
};
|
|
2530
|
-
const initialTheme = verifyTheme(localStorage['fiq.theme']);
|
|
2531
|
-
const initialDiscreteTheme = initialTheme != 'auto'
|
|
2532
|
-
? initialTheme
|
|
2533
|
-
: window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
2534
|
-
? 'dark'
|
|
2535
|
-
: 'light';
|
|
2536
|
-
const getAutoTheme = () => {
|
|
2537
|
-
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
2538
|
-
? 'dark'
|
|
2539
|
-
: 'light';
|
|
2540
|
-
};
|
|
2541
|
-
class ThemeService {
|
|
2542
|
-
constructor() {
|
|
2543
|
-
this.themes = [
|
|
2544
|
-
{ label: "Dark", id: 'dark' },
|
|
2545
|
-
{ label: "Light", id: 'light' },
|
|
2546
|
-
{ label: "Automatic", id: 'auto' },
|
|
2547
|
-
];
|
|
2548
|
-
this.selectedTheme = initialTheme;
|
|
2549
|
-
/**
|
|
2550
|
-
* This theme will always only be 'dark' or 'light'.
|
|
2551
|
-
* For use with canvases and similar libraries.
|
|
2552
|
-
*/
|
|
2553
|
-
this.theme = new BehaviorSubject(initialDiscreteTheme);
|
|
2554
|
-
this.theme.subscribe(t => {
|
|
2555
|
-
document.body.parentElement.classList.remove("theme-dark");
|
|
2556
|
-
document.body.parentElement.classList.remove("theme-light");
|
|
2557
|
-
document.body.parentElement.classList.add("theme-" + t);
|
|
2558
|
-
});
|
|
2559
|
-
// The system theme changed (either due to timed color themes or the user changing the mode)
|
|
2560
|
-
window.matchMedia('(prefers-color-scheme: dark)').addEventListener("change", ev => {
|
|
2561
|
-
if (localStorage['fiq.theme'] == "auto")
|
|
2562
|
-
this.theme.next(getAutoTheme());
|
|
2563
|
-
});
|
|
2564
|
-
}
|
|
2565
|
-
setTheme(t) {
|
|
2566
|
-
const theme = verifyTheme(t);
|
|
2567
|
-
localStorage['fiq.theme'] = theme;
|
|
2568
|
-
this.selectedTheme = theme;
|
|
2569
|
-
if (theme == 'auto') {
|
|
2570
|
-
this.theme.next(getAutoTheme());
|
|
2571
|
-
}
|
|
2572
|
-
else {
|
|
2573
|
-
this.theme.next(theme);
|
|
2574
|
-
}
|
|
2575
|
-
}
|
|
2576
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2577
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
|
|
2578
|
-
}
|
|
2579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ThemeService, decorators: [{
|
|
2580
|
-
type: Injectable,
|
|
2581
|
-
args: [{
|
|
2582
|
-
providedIn: 'root'
|
|
2583
|
-
}]
|
|
2584
|
-
}], ctorParameters: () => [] });
|
|
2585
|
-
|
|
2586
|
-
class LazyLoaderModule {
|
|
2587
|
-
static forRoot(config) {
|
|
2588
|
-
return ({
|
|
2589
|
-
ngModule: LazyLoaderModule,
|
|
2590
|
-
providers: [
|
|
2591
|
-
{
|
|
2592
|
-
provide: NGX_LAZY_LOADER_CONFIG,
|
|
2593
|
-
useValue: config
|
|
2594
|
-
},
|
|
2595
|
-
LazyLoaderService
|
|
2596
|
-
]
|
|
2597
|
-
});
|
|
2598
|
-
}
|
|
2599
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2600
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderModule, imports: [LazyLoaderComponent], exports: [LazyLoaderComponent] }); }
|
|
2601
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderModule }); }
|
|
2602
|
-
}
|
|
2603
|
-
__decorate([
|
|
2604
|
-
__param(0, Optional())
|
|
2605
|
-
], LazyLoaderModule, "forRoot", null);
|
|
2606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyLoaderModule, decorators: [{
|
|
2607
|
-
type: NgModule,
|
|
2608
|
-
args: [{
|
|
2609
|
-
imports: [LazyLoaderComponent],
|
|
2610
|
-
exports: [LazyLoaderComponent]
|
|
2611
|
-
}]
|
|
2612
|
-
}] });
|
|
2613
|
-
|
|
2614
|
-
class ParallaxCardComponent {
|
|
2615
|
-
get wrapper() { return this.element.nativeElement; }
|
|
2616
|
-
get cardFront() { return this.wrapper.querySelector('.card.front'); }
|
|
2617
|
-
get cardBack() { return this.wrapper.querySelector('.card.backface'); }
|
|
2618
|
-
get backgroundElement() { return this.cardFront.querySelector('.card-bg'); }
|
|
2619
|
-
get backfaceBackgroundElement() { return this.cardBack.querySelector('.card-bg'); }
|
|
2620
|
-
constructor(element, ngZone) {
|
|
2621
|
-
this.element = element;
|
|
2622
|
-
this.ngZone = ngZone;
|
|
2623
|
-
/**
|
|
2624
|
-
*
|
|
2625
|
-
*/
|
|
2626
|
-
this.loaded = new EventEmitter();
|
|
2627
|
-
/**
|
|
2628
|
-
* Width of the card
|
|
2629
|
-
* @default `240px`
|
|
2630
|
-
*/
|
|
2631
|
-
this.width = '240px';
|
|
2632
|
-
/**
|
|
2633
|
-
* Height of the card
|
|
2634
|
-
* @default `320px`
|
|
2635
|
-
*/
|
|
2636
|
-
this.height = '320px';
|
|
2637
|
-
/**
|
|
2638
|
-
* Inset padding of the parallax
|
|
2639
|
-
* @default 80
|
|
2640
|
-
*/
|
|
2641
|
-
this.bgInset = 80;
|
|
2642
|
-
/**
|
|
2643
|
-
* Duration for the flip animation in ms
|
|
2644
|
-
* @default 1200
|
|
2645
|
-
*/
|
|
2646
|
-
this.flipAnimationDuration = 1200;
|
|
2647
|
-
this.renderCardFront = true;
|
|
2648
|
-
this.renderCardBack = true;
|
|
2649
|
-
this.showBackOfCard = false;
|
|
2650
|
-
this.pointerX = 0;
|
|
2651
|
-
this.pointerY = 0;
|
|
2652
|
-
this.pointerLeave = 0;
|
|
2653
|
-
this.render = () => {
|
|
2654
|
-
const { width, height } = this.wrapper.getBoundingClientRect();
|
|
2655
|
-
const mousePX = this.pointerX / width;
|
|
2656
|
-
const mousePY = this.pointerY / height;
|
|
2657
|
-
// Rotation factors
|
|
2658
|
-
const rX = mousePX * this.bgInset / 1.75;
|
|
2659
|
-
const rY = mousePY * -this.bgInset / 1.75;
|
|
2660
|
-
// Translation factors
|
|
2661
|
-
const tX = mousePX * -this.bgInset * 2;
|
|
2662
|
-
const tY = mousePY * -this.bgInset * 2;
|
|
2663
|
-
if (this.renderCardFront) {
|
|
2664
|
-
this.backgroundElement.style.transform = `translateX(${tX}px) translateY(${tY}px)`;
|
|
2665
|
-
}
|
|
2666
|
-
if (this.renderCardBack) {
|
|
2667
|
-
this.backfaceBackgroundElement.style.transform = `translateX(${tX}px) translateY(${tY}px)`;
|
|
2668
|
-
}
|
|
2669
|
-
if (this.showBackOfCard) {
|
|
2670
|
-
this.cardFront.style.transform = `rotateY(180deg) rotateX(${-rY}deg)`;
|
|
2671
|
-
this.cardBack.style.transform = `rotateY(${-rX}deg) rotateX(${-rY}deg)`;
|
|
2672
|
-
}
|
|
2673
|
-
else {
|
|
2674
|
-
this.cardFront.style.transform = `rotateY(${rX}deg) rotateX(${rY}deg)`;
|
|
2675
|
-
this.cardBack.style.transform = `rotateY(180deg) rotateX(${-rY}deg)`;
|
|
2676
|
-
}
|
|
2677
|
-
};
|
|
2678
|
-
}
|
|
2679
|
-
ngAfterViewInit() {
|
|
2680
|
-
const el = this.wrapper;
|
|
2681
|
-
this.ngZone.runOutsideAngular(() => {
|
|
2682
|
-
// Directly attach events to the wrapper
|
|
2683
|
-
el.onpointermove = (e) => this.onPointerMove(e);
|
|
2684
|
-
el.onpointerenter = () => this.onPointerEnter();
|
|
2685
|
-
el.onpointerleave = () => this.onPointerLeave();
|
|
2686
|
-
});
|
|
2687
|
-
el.onclick = () => this.onClick();
|
|
2688
|
-
this.loaded.emit();
|
|
2689
|
-
}
|
|
2690
|
-
onPointerMove(e) {
|
|
2691
|
-
const { width, height, left, top } = this.wrapper.getBoundingClientRect();
|
|
2692
|
-
this.pointerX = e.pageX - left - (width / 2);
|
|
2693
|
-
this.pointerY = e.pageY - top - (height / 2);
|
|
2694
|
-
this.render();
|
|
2695
|
-
}
|
|
2696
|
-
onPointerEnter() {
|
|
2697
|
-
clearTimeout(this.pointerLeave);
|
|
2698
|
-
}
|
|
2699
|
-
onPointerLeave() {
|
|
2700
|
-
this.pointerLeave = setTimeout(() => {
|
|
2701
|
-
this.pointerX = 0;
|
|
2702
|
-
this.pointerY = 0;
|
|
2703
|
-
this.render();
|
|
2704
|
-
}, 600);
|
|
2705
|
-
}
|
|
2706
|
-
// TODO: This can get intercepted in some states
|
|
2707
|
-
onClick() {
|
|
2708
|
-
this.showBackOfCard = !this.showBackOfCard;
|
|
2709
|
-
this.render();
|
|
2710
|
-
}
|
|
2711
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ParallaxCardComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2712
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ParallaxCardComponent, isStandalone: true, selector: "ngx-parallax-card", inputs: { width: "width", height: "height", bgInset: "bgInset", flipAnimationDuration: "flipAnimationDuration" }, outputs: { loaded: "loaded" }, host: { properties: { "style.width": "width", "style.height": "height", "style.--card-bg-inset": "-bgInset+\"px\"", "style.--flip-animation-duration": "flipAnimationDuration+\"ms\"", "class.flip": "showBackOfCard" } }, queries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: TemplateRef }, { propertyName: "background", first: true, predicate: ["background"], descendants: true, read: TemplateRef }, { propertyName: "backContent", first: true, predicate: ["backContent"], descendants: true, read: TemplateRef }, { propertyName: "backBackground", first: true, predicate: ["backBackground"], descendants: true, read: TemplateRef }], ngImport: i0, template: "@if (renderCardBack) {\n <div class=\"card backface\">\n <div class=\"card-bg\" style=\"transform: translateX(0) translateY(0)\">\n <ng-template [ngTemplateOutlet]=\"backBackground\" />\n </div>\n <div class=\"card-content\">\n <ng-template [ngTemplateOutlet]=\"backContent\" />\n </div>\n </div>\n}\n\n@if (renderCardFront) {\n <div class=\"card front\">\n <div class=\"card-bg\" style=\"transform: translateX(0) translateY(0)\">\n <ng-template [ngTemplateOutlet]=\"background\" />\n </div>\n <div class=\"card-content\">\n @if (content) {\n <ng-template [ngTemplateOutlet]=\"content\"/>\n }\n @else {\n <ng-content/>\n }\n </div>\n </div>\n}\n\n\n", styles: [":host{display:block;position:relative;cursor:pointer;--easing-function: cubic-bezier(.23, 1, .32, 1);--border-radius: 9px}.card{position:absolute;height:100%;width:100%;background-color:#333;backface-visibility:hidden;overflow:hidden;box-shadow:#0000 0 0 40px 5px,#000000a8 0 30px 60px,inset #333 0 0 0 5px;border-radius:var(--border-radius);transition:transform var(--flip-animation-duration) var(--easing-function),box-shadow 2s var(--easing-function);transform-style:preserve-3d;will-change:transform}.card:hover{box-shadow:#fff6 0 0 40px 5px,#000000a8 0 30px 60px,inset #333 0 0 0 5px}.card:hover .card-content{border:2px solid #fff}.card-bg{inset:var(--card-bg-inset);position:absolute;pointer-events:none;transition:transform .6s var(--easing-function)}.card-content{position:absolute;top:0;color:#fff;height:100%;width:100%;z-index:1;border:2px solid rgba(255,255,255,0);border-radius:var(--border-radius);transition:transform .6s var(--easing-function),border-color .6s var(--easing-function)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
2713
|
-
}
|
|
2714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ParallaxCardComponent, decorators: [{
|
|
2715
|
-
type: Component,
|
|
2716
|
-
args: [{ selector: 'ngx-parallax-card', imports: [
|
|
2717
|
-
NgTemplateOutlet
|
|
2718
|
-
], host: {
|
|
2719
|
-
'[style.width]': 'width',
|
|
2720
|
-
'[style.height]': 'height',
|
|
2721
|
-
'[style.--card-bg-inset]': '-bgInset+"px"',
|
|
2722
|
-
'[style.--flip-animation-duration]': 'flipAnimationDuration+"ms"',
|
|
2723
|
-
'[class.flip]': 'showBackOfCard'
|
|
2724
|
-
}, standalone: true, template: "@if (renderCardBack) {\n <div class=\"card backface\">\n <div class=\"card-bg\" style=\"transform: translateX(0) translateY(0)\">\n <ng-template [ngTemplateOutlet]=\"backBackground\" />\n </div>\n <div class=\"card-content\">\n <ng-template [ngTemplateOutlet]=\"backContent\" />\n </div>\n </div>\n}\n\n@if (renderCardFront) {\n <div class=\"card front\">\n <div class=\"card-bg\" style=\"transform: translateX(0) translateY(0)\">\n <ng-template [ngTemplateOutlet]=\"background\" />\n </div>\n <div class=\"card-content\">\n @if (content) {\n <ng-template [ngTemplateOutlet]=\"content\"/>\n }\n @else {\n <ng-content/>\n }\n </div>\n </div>\n}\n\n\n", styles: [":host{display:block;position:relative;cursor:pointer;--easing-function: cubic-bezier(.23, 1, .32, 1);--border-radius: 9px}.card{position:absolute;height:100%;width:100%;background-color:#333;backface-visibility:hidden;overflow:hidden;box-shadow:#0000 0 0 40px 5px,#000000a8 0 30px 60px,inset #333 0 0 0 5px;border-radius:var(--border-radius);transition:transform var(--flip-animation-duration) var(--easing-function),box-shadow 2s var(--easing-function);transform-style:preserve-3d;will-change:transform}.card:hover{box-shadow:#fff6 0 0 40px 5px,#000000a8 0 30px 60px,inset #333 0 0 0 5px}.card:hover .card-content{border:2px solid #fff}.card-bg{inset:var(--card-bg-inset);position:absolute;pointer-events:none;transition:transform .6s var(--easing-function)}.card-content{position:absolute;top:0;color:#fff;height:100%;width:100%;z-index:1;border:2px solid rgba(255,255,255,0);border-radius:var(--border-radius);transition:transform .6s var(--easing-function),border-color .6s var(--easing-function)}\n"] }]
|
|
2725
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { content: [{
|
|
2726
|
-
type: ContentChild,
|
|
2727
|
-
args: ['content', { read: TemplateRef }]
|
|
2728
|
-
}], background: [{
|
|
2729
|
-
type: ContentChild,
|
|
2730
|
-
args: ['background', { read: TemplateRef }]
|
|
2731
|
-
}], backContent: [{
|
|
2732
|
-
type: ContentChild,
|
|
2733
|
-
args: ['backContent', { read: TemplateRef }]
|
|
2734
|
-
}], backBackground: [{
|
|
2735
|
-
type: ContentChild,
|
|
2736
|
-
args: ['backBackground', { read: TemplateRef }]
|
|
2737
|
-
}], loaded: [{
|
|
2738
|
-
type: Output
|
|
2739
|
-
}], width: [{
|
|
2740
|
-
type: Input
|
|
2741
|
-
}], height: [{
|
|
2742
|
-
type: Input
|
|
2743
|
-
}], bgInset: [{
|
|
2744
|
-
type: Input
|
|
2745
|
-
}], flipAnimationDuration: [{
|
|
2746
|
-
type: Input
|
|
2747
|
-
}] } });
|
|
2748
|
-
|
|
2749
|
-
const NGX_WEB_COMPONENTS_CONFIG = new InjectionToken('webcomponents-config');
|
|
2750
|
-
|
|
2751
|
-
/*
|
|
2752
|
-
* Public API Surface of package
|
|
2753
|
-
*/
|
|
2754
|
-
/**
|
|
2755
|
-
** Types
|
|
2756
|
-
*/
|
|
1
|
+
// Singular export to trick angular builder to build subpaths.
|
|
2
|
+
const LIB_MAJOR_VERSION = 3;
|
|
2757
3
|
|
|
2758
4
|
/**
|
|
2759
5
|
* Generated bundle index. Do not edit.
|
|
2760
6
|
*/
|
|
2761
7
|
|
|
2762
|
-
export {
|
|
8
|
+
export { LIB_MAJOR_VERSION };
|
|
2763
9
|
//# sourceMappingURL=dotglitch-ngx-common.mjs.map
|