From 6a9a8d2a59f1bfa891a502492d185dfcba328067 Mon Sep 17 00:00:00 2001 From: Konstantin Dinev Date: Thu, 22 Feb 2024 13:32:58 +0200 Subject: [PATCH] refactor(*): tree shaking enums and tokens (#13943) --- package-lock.json | 203 +++++++++--------- package.json | 2 +- projects/bundle-test/src/app/app.routes.ts | 5 +- .../src/app/form/form.component.html | 7 + .../src/app/form/form.component.ts | 7 +- projects/bundle-test/src/styles.scss | 1 + .../src/lib/avatar/avatar.component.ts | 10 +- .../src/lib/badge/badge.component.ts | 2 +- .../src/lib/banner/banner.component.ts | 5 - .../src/lib/calendar/calendar.ts | 28 +-- .../src/lib/card/card.component.ts | 6 +- .../src/lib/carousel/carousel-base.ts | 9 +- .../lib/carousel/carousel.component.spec.ts | 5 +- .../src/lib/carousel/carousel.component.ts | 12 +- .../src/lib/carousel/enums.ts | 14 ++ .../src/lib/carousel/public_api.ts | 3 +- .../src/lib/carousel/slide.component.ts | 1 - .../src/lib/checkbox/checkbox.component.ts | 2 +- .../src/lib/chips/chip.component.ts | 2 +- .../src/lib/combo/combo.common.ts | 4 +- .../src/lib/data-operations/data-util.ts | 2 +- .../src/lib/date-common/types.ts | 4 +- .../src/lib/directives/button/button-base.ts | 4 +- .../lib/directives/button/button.directive.ts | 2 +- .../directives/divider/divider.directive.ts | 2 +- .../src/lib/directives/mask/mask.directive.ts | 2 - .../src/lib/drop-down/drop-down.common.ts | 4 +- .../expansion-panel-header.component.ts | 2 +- .../expansion-panel/expansion-panel.common.ts | 2 +- .../src/lib/grids/grid-base.directive.ts | 2 +- .../lib/input-group/input-group.component.ts | 2 +- .../src/lib/input-group/inputGroupType.ts | 4 +- .../lib/progressbar/progressbar.component.ts | 4 +- .../lib/services/direction/directionality.ts | 2 +- .../src/lib/splitter/splitter.component.ts | 6 +- .../src/lib/stepper/step/step.component.ts | 3 +- .../src/lib/stepper/stepper.common.ts | 7 +- .../src/lib/stepper/stepper.component.spec.ts | 2 +- .../src/lib/stepper/stepper.component.ts | 3 +- .../src/lib/tabs/tabs/tabs.component.ts | 4 +- .../igniteui-angular/src/lib/tree/common.ts | 6 +- 41 files changed, 207 insertions(+), 190 deletions(-) create mode 100644 projects/igniteui-angular/src/lib/carousel/enums.ts diff --git a/package-lock.json b/package-lock.json index f892853e38d..83b192950a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,7 +81,7 @@ "ng-packagr": "^17.2.0", "postcss": "^8.4.31", "postcss-scss": "^4.0.6", - "puppeteer": "^22.0.0", + "puppeteer": "^22.1.0", "sass-embedded": "^1.69.1", "sass-true": "^6.0.1", "sassdoc": "^2.7.4", @@ -4811,16 +4811,16 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.0.0.tgz", - "integrity": "sha512-3PS82/5+tnpEaUWonjAFFvlf35QHF15xqyGd34GBa5oP5EPVfFXRsbSxIGYf1M+vZlqBZ3oxT1kRg9OYhtt8ng==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.0.1.tgz", + "integrity": "sha512-IQj/rJY1MNfZ6Z2ERu+6S0LkIPBSXRGddgmvODqjm1afHy04aJIiWmoohuFtL78SPSlbjpIMuFVfhyqsR5Ng4A==", "dev": true, "dependencies": { "debug": "4.3.4", "extract-zip": "2.0.1", "progress": "2.0.3", - "proxy-agent": "6.3.1", - "tar-fs": "3.0.4", + "proxy-agent": "6.4.0", + "tar-fs": "3.0.5", "unbzip2-stream": "1.4.3", "yargs": "17.7.2" }, @@ -6814,9 +6814,9 @@ } }, "node_modules/b4a": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", - "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==", + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", + "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==", "dev": true }, "node_modules/babel-loader": { @@ -6942,6 +6942,43 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/bare-events": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.0.tgz", + "integrity": "sha512-Yyyqff4PIFfSuthCZqLlPISTWHmnQxoPuAvkmgzsJEmG3CesdIv6Xweayl0JkCZJSB2yYIdJyEz97tpxNhgjbg==", + "dev": true, + "optional": true + }, + "node_modules/bare-fs": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.1.5.tgz", + "integrity": "sha512-5t0nlecX+N2uJqdxe9d18A98cp2u9BETelbjKpiVgQqzzmVNFYWEAjQHqS+2Khgto1vcwhik9cXucaj5ve2WWA==", + "dev": true, + "optional": true, + "dependencies": { + "bare-events": "^2.0.0", + "bare-os": "^2.0.0", + "bare-path": "^2.0.0", + "streamx": "^2.13.0" + } + }, + "node_modules/bare-os": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.2.0.tgz", + "integrity": "sha512-hD0rOPfYWOMpVirTACt4/nK8mC55La12K5fY1ij8HAdfQakD62M+H4o4tpfKzVGLgRDTuk3vjA4GqGXXCeFbag==", + "dev": true, + "optional": true + }, + "node_modules/bare-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.0.tgz", + "integrity": "sha512-DIIg7ts8bdRKwJRJrUMy/PICEaQZaPGZ26lsSx9MJSwIhSrcdHn7/C8W+XmnG/rKi6BaRcz+JO00CjZteybDtw==", + "dev": true, + "optional": true, + "dependencies": { + "bare-os": "^2.1.0" + } + }, "node_modules/base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", @@ -7686,9 +7723,9 @@ } }, "node_modules/chromium-bidi": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.8.tgz", - "integrity": "sha512-blqh+1cEQbHBKmok3rVJkBlBxt9beKBgOsxbFgs7UJcoVbbeZ+K7+6liAsjgpc8l1Xd55cQUy14fXZdGSb4zIw==", + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.9.tgz", + "integrity": "sha512-wOTX3m2zuHX0zRX4h7Ol1DAGz0cqHzo2IrAPvOqBxdd4ZR32vxg4FKNjmBihi1oP9b1QGSBBG5VNUUXUCsxDfg==", "dev": true, "dependencies": { "mitt": "3.0.1", @@ -8721,9 +8758,9 @@ } }, "node_modules/data-uri-to-buffer": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", - "integrity": "sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", "dev": true, "engines": { "node": ">= 14" @@ -11242,9 +11279,9 @@ "dev": true }, "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -11376,52 +11413,20 @@ } }, "node_modules/get-uri": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", - "integrity": "sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", "dev": true, "dependencies": { "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.0", + "data-uri-to-buffer": "^6.0.2", "debug": "^4.3.4", - "fs-extra": "^8.1.0" + "fs-extra": "^11.2.0" }, "engines": { "node": ">= 14" } }, - "node_modules/get-uri/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/get-uri/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/get-uri/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -12891,9 +12896,9 @@ } }, "node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { "agent-base": "^7.1.0", @@ -16264,12 +16269,6 @@ "mkdirp": "bin/cmd.js" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, "node_modules/mrmime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", @@ -18075,25 +18074,18 @@ } }, "node_modules/pac-resolver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.0.tgz", - "integrity": "sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", "dev": true, "dependencies": { "degenerator": "^5.0.0", - "ip": "^1.1.8", "netmask": "^2.0.2" }, "engines": { "node": ">= 14" } }, - "node_modules/pac-resolver/node_modules/ip": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz", - "integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==", - "dev": true - }, "node_modules/package-json": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", @@ -18948,15 +18940,15 @@ } }, "node_modules/proxy-agent": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz", - "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", "dev": true, "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", "lru-cache": "^7.14.1", "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", @@ -18966,6 +18958,19 @@ "node": ">= 14" } }, + "node_modules/proxy-agent/node_modules/https-proxy-agent": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/proxy-agent/node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -19041,15 +19046,15 @@ } }, "node_modules/puppeteer": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.0.0.tgz", - "integrity": "sha512-zYVnjwJngnSB4dbkWp7DHFSIc3nqHvZzrdHyo9+ugV1nq1Lm8obOMcmCFaGfR3PJs0EmYNz+/skBeO45yvASCQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.1.0.tgz", + "integrity": "sha512-suatHy6A48YkoykjrJNkJaixWVrvnPtzIgngK17V/P0MvgSyJzuu21PyR+0lWIK0cfZqKqmR8CHZvHzOCd4MIg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@puppeteer/browsers": "2.0.0", + "@puppeteer/browsers": "2.0.1", "cosmiconfig": "9.0.0", - "puppeteer-core": "22.0.0" + "puppeteer-core": "22.1.0" }, "bin": { "puppeteer": "lib/esm/puppeteer/node/cli.js" @@ -19059,13 +19064,13 @@ } }, "node_modules/puppeteer-core": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.0.0.tgz", - "integrity": "sha512-S3s91rLde0A86PWVeNY82h+P0fdS7CTiNWAicCVH/bIspRP4nS2PnO5j+VTFqCah0ZJizGzpVPAmxVYbLxTc9w==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.1.0.tgz", + "integrity": "sha512-LdsQxslPf0Rpk6gLvkyyrraad2S4PUjGCT2CAKS2EnrRPpzIb6fsrFnoPNZxLlMkU7apU1g4Nf5wYePdSjxLkQ==", "dev": true, "dependencies": { - "@puppeteer/browsers": "2.0.0", - "chromium-bidi": "0.5.8", + "@puppeteer/browsers": "2.0.1", + "chromium-bidi": "0.5.9", "cross-fetch": "4.0.0", "debug": "4.3.4", "devtools-protocol": "0.0.1232444", @@ -21925,13 +21930,16 @@ } }, "node_modules/streamx": { - "version": "2.15.7", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.7.tgz", - "integrity": "sha512-NPEKS5+yjyo597eafGbKW5ujh7Sm6lDLHZQd/lRSz6S0VarpADBJItqfB4PnwpS+472oob1GX5cCY9vzfJpHUA==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz", + "integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==", "dev": true, "dependencies": { "fast-fifo": "^1.1.0", "queue-tick": "^1.0.1" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" } }, "node_modules/string_decoder": { @@ -22358,14 +22366,17 @@ } }, "node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", + "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", "dev": true, "dependencies": { - "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" } }, "node_modules/tar-fs/node_modules/tar-stream": { diff --git a/package.json b/package.json index 886a6fd1265..105bbe5a0ad 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "ng-packagr": "^17.2.0", "postcss-scss": "^4.0.6", "postcss": "^8.4.31", - "puppeteer": "^22.0.0", + "puppeteer": "^22.1.0", "sass-embedded": "^1.69.1", "sass-true": "^6.0.1", "sassdoc-plugin-localization": "^1.4.3", diff --git a/projects/bundle-test/src/app/app.routes.ts b/projects/bundle-test/src/app/app.routes.ts index 00dc1935ec0..9e62525be18 100644 --- a/projects/bundle-test/src/app/app.routes.ts +++ b/projects/bundle-test/src/app/app.routes.ts @@ -1,12 +1,13 @@ import { Routes } from '@angular/router'; import { ChipComponent } from './chip/chip.component'; import { ButtonGroupComponent } from './button-group/button-group.component'; +import { FormComponent } from './form/form.component'; export const routes: Routes = [ { path: '', redirectTo: '/chip', pathMatch: 'full' }, { path: 'chip', component: ChipComponent }, - { path: 'button-group', component: ButtonGroupComponent} - // { path: 'form', loadComponent: () => import('./form/form.component').then(m => m.FormComponent) }, + { path: 'button-group', component: ButtonGroupComponent}, + { path: 'form', component: FormComponent }, // { path: 'stepper', loadComponent: () => import('./stepper/stepper.component').then(m => m.StepperComponent) }, // { path: 'grid', loadComponent: () => import('./grid/grid.component').then(m => m.GridComponent) } ]; diff --git a/projects/bundle-test/src/app/form/form.component.html b/projects/bundle-test/src/app/form/form.component.html index 0ff7303c56d..e8e9bd872a0 100644 --- a/projects/bundle-test/src/app/form/form.component.html +++ b/projects/bundle-test/src/app/form/form.component.html @@ -6,5 +6,12 @@ 3 Switch + + Prefix + + + Suffix + Hint + diff --git a/projects/bundle-test/src/app/form/form.component.ts b/projects/bundle-test/src/app/form/form.component.ts index f1c3360a29f..c84fad545f7 100644 --- a/projects/bundle-test/src/app/form/form.component.ts +++ b/projects/bundle-test/src/app/form/form.component.ts @@ -1,11 +1,11 @@ import { Component } from '@angular/core'; import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; -import { IGX_RADIO_GROUP_DIRECTIVES, IgxButtonDirective, IgxCheckboxComponent, IgxSwitchComponent } from 'igniteui-angular'; +import { IGX_INPUT_GROUP_DIRECTIVES, IGX_RADIO_GROUP_DIRECTIVES, IgxButtonDirective, IgxCheckboxComponent, IgxSwitchComponent } from 'igniteui-angular'; @Component({ selector: 'app-form', standalone: true, - imports: [IgxCheckboxComponent, IgxSwitchComponent, IGX_RADIO_GROUP_DIRECTIVES, IgxButtonDirective, ReactiveFormsModule], + imports: [IgxCheckboxComponent, IgxSwitchComponent, IGX_RADIO_GROUP_DIRECTIVES, IgxButtonDirective, IGX_INPUT_GROUP_DIRECTIVES, ReactiveFormsModule], templateUrl: './form.component.html', styleUrls: ['./form.component.scss'] }) @@ -16,7 +16,8 @@ export class FormComponent { this.form = this.fb.group({ 'radio': [2, Validators.required], 'checkbox': [false, Validators.required], - 'switch': [false, Validators.required] + 'switch': [false, Validators.required], + 'input': ['', Validators.required], }); } } diff --git a/projects/bundle-test/src/styles.scss b/projects/bundle-test/src/styles.scss index 783aab82c74..4bc302a1ab1 100644 --- a/projects/bundle-test/src/styles.scss +++ b/projects/bundle-test/src/styles.scss @@ -19,6 +19,7 @@ $app-palette: palette( $include: ( igx-chip, igx-buttongroup, +// igx-input-group, // igx-checkbox, // igx-radio, // igx-switch, diff --git a/projects/igniteui-angular/src/lib/avatar/avatar.component.ts b/projects/igniteui-angular/src/lib/avatar/avatar.component.ts index 956914c30f0..7daa727a4f0 100644 --- a/projects/igniteui-angular/src/lib/avatar/avatar.component.ts +++ b/projects/igniteui-angular/src/lib/avatar/avatar.component.ts @@ -13,14 +13,14 @@ import { mkenum } from '../core/utils'; import { IgxIconComponent } from '../icon/icon.component'; let NEXT_ID = 0; -export const IgxAvatarSize = mkenum({ +export const IgxAvatarSize = /*@__PURE__*/mkenum({ SMALL: 'small', MEDIUM: 'medium', LARGE: 'large' }); export type IgxAvatarSize = (typeof IgxAvatarSize)[keyof typeof IgxAvatarSize]; -export const IgxAvatarType = mkenum({ +export const IgxAvatarType = /*@__PURE__*/mkenum({ INITIALS: 'initials', IMAGE: 'image', ICON: 'icon', @@ -121,7 +121,7 @@ export class IgxAvatarComponent implements OnInit { * @deprecated in version 15.1.0. * Sets a circular shape to the avatar, if `[roundShape]` is set to `true`. * By default the shape of the avatar is a square. - * + * * @example * ```html * @@ -136,7 +136,7 @@ export class IgxAvatarComponent implements OnInit { public set roundShape(value: boolean) { this.shape = value === true ? 'circle' : 'square'; - } + } /** * Sets square, rounded or circular shape to the avatar. @@ -317,7 +317,7 @@ export class IgxAvatarComponent implements OnInit { protected get componentSize() { if (this._size) { return `var(--ig-size-${this._size})`; - } + } } /** diff --git a/projects/igniteui-angular/src/lib/badge/badge.component.ts b/projects/igniteui-angular/src/lib/badge/badge.component.ts index 6383ac79113..3693446e467 100644 --- a/projects/igniteui-angular/src/lib/badge/badge.component.ts +++ b/projects/igniteui-angular/src/lib/badge/badge.component.ts @@ -8,7 +8,7 @@ let NEXT_ID = 0; /** * Determines the igxBadge type */ -export const IgxBadgeType = mkenum({ +export const IgxBadgeType = /*@__PURE__*/mkenum({ PRIMARY: 'primary', INFO: 'info', SUCCESS: 'success', diff --git a/projects/igniteui-angular/src/lib/banner/banner.component.ts b/projects/igniteui-angular/src/lib/banner/banner.component.ts index d03734a43c1..a50d366f298 100644 --- a/projects/igniteui-angular/src/lib/banner/banner.component.ts +++ b/projects/igniteui-angular/src/lib/banner/banner.component.ts @@ -296,8 +296,3 @@ export class IgxBannerComponent implements IToggleView { this.closed.emit(this._bannerEvent); } } - -/** - * @hidden - */ - diff --git a/projects/igniteui-angular/src/lib/calendar/calendar.ts b/projects/igniteui-angular/src/lib/calendar/calendar.ts index b504fe18e13..196d7dfb49a 100644 --- a/projects/igniteui-angular/src/lib/calendar/calendar.ts +++ b/projects/igniteui-angular/src/lib/calendar/calendar.ts @@ -4,14 +4,14 @@ import { mkenum } from '../core/utils'; /** * Sets the selection type - single, multi or range. */ -export const CalendarSelection = mkenum({ +export const CalendarSelection = /*@__PURE__*/mkenum({ SINGLE: 'single', MULTI: 'multi', RANGE: 'range' }); export type CalendarSelection = (typeof CalendarSelection)[keyof typeof CalendarSelection]; -export enum ScrollMonth { +export const enum ScrollMonth { PREV = 'prev', NEXT = 'next', NONE = 'none' @@ -22,7 +22,7 @@ export interface IViewDateChangeEventArgs { currentValue: Date; } -export const IgxCalendarView = mkenum({ +export const IgxCalendarView = /*@__PURE__*/mkenum({ Month: 'month', Year: 'year', Decade: 'decade' @@ -36,7 +36,7 @@ export type IgxCalendarView = (typeof IgxCalendarView)[keyof typeof IgxCalendarV /** * @hidden */ -enum TimeDeltaInterval { +const enum TimeDeltaInterval { Month = 'month', Year = 'year' } @@ -177,13 +177,13 @@ export interface IFormattingViews { } export enum WEEKDAYS { - SUNDAY = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6 + SUNDAY, + MONDAY, + TUESDAY, + WEDNESDAY, + THURSDAY, + FRIDAY, + SATURDAY } export class Calendar { @@ -396,10 +396,10 @@ export class Calendar { firstDayOfTheYear = firstDayOfTheYear >= 0 ? firstDayOfTheYear : firstDayOfTheYear + 7; const dayInMilSeconds = 86400000; // day number in the year - const dayNumber = Math.floor((date.getTime() - yearStart.getTime() - + const dayNumber = Math.floor((date.getTime() - yearStart.getTime() - (date.getTimezoneOffset() - yearStart.getTimezoneOffset()) * 60000) / dayInMilSeconds) + 1; let weekNumber; - // if 01 Jan is Monday to Thursday, is considered 1st week of the year + // if 01 Jan is Monday to Thursday, is considered 1st week of the year // if 01 Jan starts Friday to Sunday, is considered last week of previous year if (firstDayOfTheYear < 4) { // when calculating the week number we add 1 for the 1st week @@ -415,7 +415,7 @@ export class Calendar { // first day of the next year let nextYearFirstDay = nextYear.getDay() - weekStart; nextYearFirstDay = nextYearFirstDay >= 0 ? nextYearFirstDay : nextYearFirstDay + 7; - // if 01 Jan of the next year is Monday to Thursday, is considered 1st week of the next year + // if 01 Jan of the next year is Monday to Thursday, is considered 1st week of the next year // if 01 Jan is Friday to Sunday, is considered 53rd week of the current year weekNumber = nextYearFirstDay < 4 ? 1 : 53; } diff --git a/projects/igniteui-angular/src/lib/card/card.component.ts b/projects/igniteui-angular/src/lib/card/card.component.ts index 5c5b0fef647..8935cb0b1fa 100644 --- a/projects/igniteui-angular/src/lib/card/card.component.ts +++ b/projects/igniteui-angular/src/lib/card/card.component.ts @@ -199,7 +199,7 @@ export class IgxCardFooterDirective { * @deprecated in 17.0.0. To switch betweet `outlined` and `elevated` card use the `elevated` property. * Since version 17.0.0 the card component is `outlined` by default. */ -export const IgxCardType = mkenum({ +export const IgxCardType = /*@__PURE__*/mkenum({ ELEVATED: 'elevated', OUTLINED: 'outlined' }); @@ -253,7 +253,7 @@ export class IgxCardComponent { /** * @deprecated in version 17.0.0. Use `elevated` property instead. - * + * * An @Input property that sets the value of the `type` attribute of the card. * By default the value is set to `outlined`. You can make the card use the * elevated style by setting the value to `elevated`. @@ -324,7 +324,7 @@ export class IgxCardComponent { private _elevated = false; } -export const IgxCardActionsLayout = mkenum({ +export const IgxCardActionsLayout = /*@__PURE__*/mkenum({ START: 'start', JUSTIFY: 'justify' }); diff --git a/projects/igniteui-angular/src/lib/carousel/carousel-base.ts b/projects/igniteui-angular/src/lib/carousel/carousel-base.ts index 43ec3edc560..638170a6204 100644 --- a/projects/igniteui-angular/src/lib/carousel/carousel-base.ts +++ b/projects/igniteui-angular/src/lib/carousel/carousel-base.ts @@ -1,19 +1,12 @@ import { AnimationReferenceMetadata, useAnimation } from '@angular/animations'; import { ChangeDetectorRef, EventEmitter, Inject } from '@angular/core'; -import { mkenum } from '../core/utils'; import { IgxAngularAnimationService } from '../services/animation/angular-animation-service'; import { AnimationPlayer, AnimationService } from '../services/animation/animation'; import { fadeIn, slideInLeft } from 'igniteui-angular/animations'; +import { HorizontalAnimationType } from './enums'; export enum Direction { NONE, NEXT, PREV } -export const HorizontalAnimationType = mkenum({ - none: 'none', - slide: 'slide', - fade: 'fade' -}); -export type HorizontalAnimationType = (typeof HorizontalAnimationType)[keyof typeof HorizontalAnimationType]; - export interface CarouselAnimationSettings { enterAnimation: AnimationReferenceMetadata; leaveAnimation: AnimationReferenceMetadata; diff --git a/projects/igniteui-angular/src/lib/carousel/carousel.component.spec.ts b/projects/igniteui-angular/src/lib/carousel/carousel.component.spec.ts index dc7926d28f3..2e0e7bd3a66 100644 --- a/projects/igniteui-angular/src/lib/carousel/carousel.component.spec.ts +++ b/projects/igniteui-angular/src/lib/carousel/carousel.component.spec.ts @@ -3,16 +3,15 @@ import { TestBed, fakeAsync, tick, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { IgxCarouselComponent, - ISlideEventArgs, - CarouselIndicatorsOrientation + ISlideEventArgs } from './carousel.component'; import { UIInteractions, wait } from '../test-utils/ui-interactions.spec'; import { configureTestSuite } from '../test-utils/configure-suite'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { IgxSlideComponent } from './slide.component'; -import { HorizontalAnimationType } from './carousel-base'; import { IgxCarouselIndicatorDirective, IgxCarouselNextButtonDirective, IgxCarouselPrevButtonDirective } from './carousel.directives'; import { NgFor, NgIf } from '@angular/common'; +import { CarouselIndicatorsOrientation, HorizontalAnimationType } from './enums'; describe('Carousel', () => { configureTestSuite(); diff --git a/projects/igniteui-angular/src/lib/carousel/carousel.component.ts b/projects/igniteui-angular/src/lib/carousel/carousel.component.ts index e629892af04..b4a1edbb939 100644 --- a/projects/igniteui-angular/src/lib/carousel/carousel.component.ts +++ b/projects/igniteui-angular/src/lib/carousel/carousel.component.ts @@ -26,25 +26,20 @@ import { HammerGestureConfig, HAMMER_GESTURE_CONFIG } from '@angular/platform-br import { merge, Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { CarouselResourceStringsEN, ICarouselResourceStrings } from '../core/i18n/carousel-resources'; -import { IBaseEventArgs, mkenum, PlatformUtil } from '../core/utils'; +import { IBaseEventArgs, PlatformUtil } from '../core/utils'; import { IgxAngularAnimationService } from '../services/animation/angular-animation-service'; import { AnimationService } from '../services/animation/animation'; -import { Direction, HorizontalAnimationType, IgxCarouselComponentBase } from './carousel-base'; +import { Direction, IgxCarouselComponentBase } from './carousel-base'; import { IgxCarouselIndicatorDirective, IgxCarouselNextButtonDirective, IgxCarouselPrevButtonDirective } from './carousel.directives'; import { IgxSlideComponent } from './slide.component'; import { IgxIconComponent } from '../icon/icon.component'; import { getCurrentResourceStrings } from '../core/i18n/resources'; import { HammerGesturesManager } from '../core/touch'; +import { CarouselIndicatorsOrientation, HorizontalAnimationType } from './enums'; let NEXT_ID = 0; -export const CarouselIndicatorsOrientation = mkenum({ - bottom: 'bottom', - top: 'top' -}); -export type CarouselIndicatorsOrientation = (typeof CarouselIndicatorsOrientation)[keyof typeof CarouselIndicatorsOrientation]; - @Injectable() export class CarouselHammerConfig extends HammerGestureConfig { public override overrides = { @@ -89,7 +84,6 @@ export class CarouselHammerConfig extends HammerGestureConfig { standalone: true, imports: [IgxIconComponent, NgIf, NgClass, NgFor, NgTemplateOutlet] }) - export class IgxCarouselComponent extends IgxCarouselComponentBase implements OnDestroy, AfterContentInit { /** diff --git a/projects/igniteui-angular/src/lib/carousel/enums.ts b/projects/igniteui-angular/src/lib/carousel/enums.ts new file mode 100644 index 00000000000..d8a6292a122 --- /dev/null +++ b/projects/igniteui-angular/src/lib/carousel/enums.ts @@ -0,0 +1,14 @@ +import { mkenum } from '../core/utils'; + +export const HorizontalAnimationType = /*@__PURE__*/mkenum({ + none: 'none', + slide: 'slide', + fade: 'fade' +}); +export type HorizontalAnimationType = (typeof HorizontalAnimationType)[keyof typeof HorizontalAnimationType]; + +export const CarouselIndicatorsOrientation = /*@__PURE__*/mkenum({ + bottom: 'bottom', + top: 'top' +}); +export type CarouselIndicatorsOrientation = (typeof CarouselIndicatorsOrientation)[keyof typeof CarouselIndicatorsOrientation]; diff --git a/projects/igniteui-angular/src/lib/carousel/public_api.ts b/projects/igniteui-angular/src/lib/carousel/public_api.ts index e9d09055084..477c5f932bc 100644 --- a/projects/igniteui-angular/src/lib/carousel/public_api.ts +++ b/projects/igniteui-angular/src/lib/carousel/public_api.ts @@ -2,10 +2,11 @@ import { IgxCarouselComponent } from './carousel.component'; import { IgxCarouselIndicatorDirective, IgxCarouselNextButtonDirective, IgxCarouselPrevButtonDirective } from './carousel.directives'; import { IgxSlideComponent } from './slide.component'; -export { Direction, HorizontalAnimationType, CarouselAnimationSettings } from './carousel-base'; +export { Direction, CarouselAnimationSettings } from './carousel-base'; export * from './carousel.component'; export * from './slide.component'; export * from './carousel.directives'; +export { CarouselIndicatorsOrientation, HorizontalAnimationType } from './enums'; /* NOTE: Carousel directives collection for ease-of-use import in standalone components scenario */ export const IGX_CAROUSEL_DIRECTIVES = [ diff --git a/projects/igniteui-angular/src/lib/carousel/slide.component.ts b/projects/igniteui-angular/src/lib/carousel/slide.component.ts index d4a1707b114..6a3e2325560 100644 --- a/projects/igniteui-angular/src/lib/carousel/slide.component.ts +++ b/projects/igniteui-angular/src/lib/carousel/slide.component.ts @@ -19,7 +19,6 @@ import { Direction, IgxSlideComponentBase } from './carousel-base'; templateUrl: 'slide.component.html', standalone: true }) - export class IgxSlideComponent implements AfterContentChecked, OnDestroy, IgxSlideComponentBase { /** * Gets/sets the `index` of the slide inside the carousel. diff --git a/projects/igniteui-angular/src/lib/checkbox/checkbox.component.ts b/projects/igniteui-angular/src/lib/checkbox/checkbox.component.ts index 2cd3e8156ab..5a384ba2631 100644 --- a/projects/igniteui-angular/src/lib/checkbox/checkbox.component.ts +++ b/projects/igniteui-angular/src/lib/checkbox/checkbox.component.ts @@ -21,7 +21,7 @@ import { EditorProvider, EDITOR_PROVIDER } from '../core/edit-provider'; import { noop, Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -export const LabelPosition = mkenum({ +export const LabelPosition = /*@__PURE__*/mkenum({ BEFORE: 'before', AFTER: 'after' }); diff --git a/projects/igniteui-angular/src/lib/chips/chip.component.ts b/projects/igniteui-angular/src/lib/chips/chip.component.ts index 641b7e6741c..2bb32776e1a 100644 --- a/projects/igniteui-angular/src/lib/chips/chip.component.ts +++ b/projects/igniteui-angular/src/lib/chips/chip.component.ts @@ -24,7 +24,7 @@ import { IgxIconComponent } from '../icon/icon.component'; import { NgClass, NgTemplateOutlet, NgIf } from '@angular/common'; import { getCurrentResourceStrings } from '../core/i18n/resources'; -export const IgxChipTypeVariant = mkenum({ +export const IgxChipTypeVariant = /*@__PURE__*/mkenum({ PRIMARY: 'primary', INFO: 'info', SUCCESS: 'success', diff --git a/projects/igniteui-angular/src/lib/combo/combo.common.ts b/projects/igniteui-angular/src/lib/combo/combo.common.ts index 34e6788949d..8d81f47fdd9 100644 --- a/projects/igniteui-angular/src/lib/combo/combo.common.ts +++ b/projects/igniteui-angular/src/lib/combo/combo.common.ts @@ -47,7 +47,7 @@ import { IComboItemAdditionEvent, IComboSearchInputEventArgs } from './public_ap import { ComboResourceStringsEN, IComboResourceStrings } from '../core/i18n/combo-resources'; import { getCurrentResourceStrings } from '../core/i18n/resources'; -export const IGX_COMBO_COMPONENT = new InjectionToken('IgxComboComponentToken'); +export const IGX_COMBO_COMPONENT = /*@__PURE__*/new InjectionToken('IgxComboComponentToken'); /** @hidden @internal TODO: Evaluate */ export interface IgxComboBase { @@ -96,7 +96,7 @@ const ItemHeights = { }; /** @hidden @internal */ -export enum DataTypes { +export const enum DataTypes { EMPTY = 'empty', PRIMITIVE = 'primitive', COMPLEX = 'complex', diff --git a/projects/igniteui-angular/src/lib/data-operations/data-util.ts b/projects/igniteui-angular/src/lib/data-operations/data-util.ts index 081db332e47..e460cc395a1 100644 --- a/projects/igniteui-angular/src/lib/data-operations/data-util.ts +++ b/projects/igniteui-angular/src/lib/data-operations/data-util.ts @@ -24,7 +24,7 @@ import { IGroupingExpression } from './grouping-expression.interface'; /** * @hidden */ - export const DataType = mkenum({ + export const DataType = /*@__PURE__*/mkenum({ String: 'string', Number: 'number', Boolean: 'boolean', diff --git a/projects/igniteui-angular/src/lib/date-common/types.ts b/projects/igniteui-angular/src/lib/date-common/types.ts index 05047d5a1e7..2bddd910d25 100644 --- a/projects/igniteui-angular/src/lib/date-common/types.ts +++ b/projects/igniteui-angular/src/lib/date-common/types.ts @@ -1,6 +1,6 @@ import { mkenum } from '../core/utils'; /** Header orientation in `dialog` mode. */ -export const PickerHeaderOrientation = mkenum({ +export const PickerHeaderOrientation = /*@__PURE__*/mkenum({ Horizontal: 'horizontal', Vertical: 'vertical' }); @@ -10,7 +10,7 @@ export type PickerHeaderOrientation = (typeof PickerHeaderOrientation)[keyof typ * This enumeration is used to configure whether the date/time picker has an editable input with drop down * or is readonly - the date/time is selected only through a dialog. */ -export const PickerInteractionMode = mkenum({ +export const PickerInteractionMode = /*@__PURE__*/mkenum({ DropDown: 'dropdown', Dialog: 'dialog' }); diff --git a/projects/igniteui-angular/src/lib/directives/button/button-base.ts b/projects/igniteui-angular/src/lib/directives/button/button-base.ts index 75022367a18..6de354e28c6 100644 --- a/projects/igniteui-angular/src/lib/directives/button/button-base.ts +++ b/projects/igniteui-angular/src/lib/directives/button/button-base.ts @@ -2,7 +2,7 @@ import { Directive, ElementRef, EventEmitter, HostBinding, HostListener, Inject, import { DisplayDensityBase, DisplayDensityToken, IDisplayDensityOptions } from '../../core/density'; import { mkenum } from '../../core/utils'; -export const IgxBaseButtonType = mkenum({ +export const IgxBaseButtonType = /*@__PURE__*/mkenum({ Flat: 'flat', Contained: 'contained', Outlined: 'outlined' @@ -62,7 +62,7 @@ export abstract class IgxButtonBaseDirective extends DisplayDensityBase { public element: ElementRef, @Optional() @Inject(DisplayDensityToken) protected _displayDensityOptions: IDisplayDensityOptions - ) { + ) { super(_displayDensityOptions, element); } diff --git a/projects/igniteui-angular/src/lib/directives/button/button.directive.ts b/projects/igniteui-angular/src/lib/directives/button/button.directive.ts index 90e280a92aa..b0f2fa33711 100644 --- a/projects/igniteui-angular/src/lib/directives/button/button.directive.ts +++ b/projects/igniteui-angular/src/lib/directives/button/button.directive.ts @@ -16,7 +16,7 @@ import { mkenum } from '../../core/utils'; import { IBaseEventArgs } from '../../core/utils'; import { IgxBaseButtonType, IgxButtonBaseDirective } from './button-base'; -const IgxButtonType = mkenum({ +const IgxButtonType = /*@__PURE__*/mkenum({ ...IgxBaseButtonType, FAB: 'fab' }); diff --git a/projects/igniteui-angular/src/lib/directives/divider/divider.directive.ts b/projects/igniteui-angular/src/lib/directives/divider/divider.directive.ts index b7704acf25a..6b12bcbe8cb 100644 --- a/projects/igniteui-angular/src/lib/directives/divider/divider.directive.ts +++ b/projects/igniteui-angular/src/lib/directives/divider/divider.directive.ts @@ -1,7 +1,7 @@ import { Directive, HostBinding, Input, booleanAttribute } from '@angular/core'; import { mkenum } from '../../core/utils'; -export const IgxDividerType = mkenum({ +export const IgxDividerType = /*@__PURE__*/mkenum({ SOLID: 'solid', DASHED: 'dashed' }); diff --git a/projects/igniteui-angular/src/lib/directives/mask/mask.directive.ts b/projects/igniteui-angular/src/lib/directives/mask/mask.directive.ts index 157c432a151..af182977b9a 100644 --- a/projects/igniteui-angular/src/lib/directives/mask/mask.directive.ts +++ b/projects/igniteui-angular/src/lib/directives/mask/mask.directive.ts @@ -423,5 +423,3 @@ export interface IMaskEventArgs extends IBaseEventArgs { formattedValue: string; } -/** @hidden */ - diff --git a/projects/igniteui-angular/src/lib/drop-down/drop-down.common.ts b/projects/igniteui-angular/src/lib/drop-down/drop-down.common.ts index 0876f1a6998..f2f4a404cd5 100644 --- a/projects/igniteui-angular/src/lib/drop-down/drop-down.common.ts +++ b/projects/igniteui-angular/src/lib/drop-down/drop-down.common.ts @@ -11,7 +11,7 @@ export enum Navigate { } /** Key actions that have designated handlers in IgxDropDownComponent */ -export const DropDownActionKey = mkenum({ +export const DropDownActionKey = /*@__PURE__*/mkenum({ ESCAPE: 'escape', ENTER: 'enter', SPACE: 'space' @@ -42,7 +42,7 @@ export interface IDropDownNavigationDirective { onHomeKeyDown(event?: KeyboardEvent): void; } -export const IGX_DROPDOWN_BASE = new InjectionToken('IgxDropDownBaseToken'); +export const IGX_DROPDOWN_BASE = /*@__PURE__*/new InjectionToken('IgxDropDownBaseToken'); /** * @hidden diff --git a/projects/igniteui-angular/src/lib/expansion-panel/expansion-panel-header.component.ts b/projects/igniteui-angular/src/lib/expansion-panel/expansion-panel-header.component.ts index d6457f435c6..524f49bc48e 100644 --- a/projects/igniteui-angular/src/lib/expansion-panel/expansion-panel-header.component.ts +++ b/projects/igniteui-angular/src/lib/expansion-panel/expansion-panel-header.component.ts @@ -22,7 +22,7 @@ import { NgIf } from '@angular/common'; /** * @hidden */ -export const ExpansionPanelHeaderIconPosition = mkenum({ +export const ExpansionPanelHeaderIconPosition = /*@__PURE__*/mkenum({ LEFT: 'left', NONE: 'none', RIGHT: 'right' diff --git a/projects/igniteui-angular/src/lib/expansion-panel/expansion-panel.common.ts b/projects/igniteui-angular/src/lib/expansion-panel/expansion-panel.common.ts index 763bdb0cba3..d1499fc70e6 100644 --- a/projects/igniteui-angular/src/lib/expansion-panel/expansion-panel.common.ts +++ b/projects/igniteui-angular/src/lib/expansion-panel/expansion-panel.common.ts @@ -19,7 +19,7 @@ export interface IgxExpansionPanelBase { } /** @hidden */ -export const IGX_EXPANSION_PANEL_COMPONENT = new InjectionToken('IgxExpansionPanelToken'); +export const IGX_EXPANSION_PANEL_COMPONENT = /*@__PURE__*/new InjectionToken('IgxExpansionPanelToken'); export interface IExpansionPanelEventArgs extends IBaseEventArgs { event: Event; diff --git a/projects/igniteui-angular/src/lib/grids/grid-base.directive.ts b/projects/igniteui-angular/src/lib/grids/grid-base.directive.ts index e26bd4a1893..189032c1c12 100644 --- a/projects/igniteui-angular/src/lib/grids/grid-base.directive.ts +++ b/projects/igniteui-angular/src/lib/grids/grid-base.directive.ts @@ -178,7 +178,7 @@ import { IgxGridCellComponent } from './cell.component'; import { IgxGridValidationService } from './grid/grid-validation.service'; import { getCurrentResourceStrings } from '../core/i18n/resources'; -IgcTrialWatermark.register(); +/*@__PURE__*/IgcTrialWatermark.register(); interface IMatchInfoCache { row: any; diff --git a/projects/igniteui-angular/src/lib/input-group/input-group.component.ts b/projects/igniteui-angular/src/lib/input-group/input-group.component.ts index 1da171ddd5c..70fc9ef736e 100644 --- a/projects/igniteui-angular/src/lib/input-group/input-group.component.ts +++ b/projects/igniteui-angular/src/lib/input-group/input-group.component.ts @@ -28,7 +28,7 @@ import { IgxInputGroupType, IGX_INPUT_GROUP_TYPE } from './inputGroupType'; import { IgxIconComponent } from '../icon/icon.component'; import { getCurrentResourceStrings } from '../core/i18n/resources'; -const IgxInputGroupTheme = mkenum({ +const IgxInputGroupTheme = /*@__PURE__*/mkenum({ Material: 'material', Fluent: 'fluent', Bootstrap: 'bootstrap', diff --git a/projects/igniteui-angular/src/lib/input-group/inputGroupType.ts b/projects/igniteui-angular/src/lib/input-group/inputGroupType.ts index 4202bba1ca5..6915facb66d 100644 --- a/projects/igniteui-angular/src/lib/input-group/inputGroupType.ts +++ b/projects/igniteui-angular/src/lib/input-group/inputGroupType.ts @@ -1,7 +1,7 @@ import { InjectionToken } from '@angular/core'; import { mkenum } from '../core/utils'; -const IgxInputGroupEnum = mkenum({ +const IgxInputGroupEnum = /*@__PURE__*/mkenum({ Line: 'line', Box: 'box', Border: 'border', @@ -12,7 +12,7 @@ const IgxInputGroupEnum = mkenum({ * Defines the InputGroupType DI token. */ // Should this go trough Interface https://angular.io/api/core/InjectionToken - export const IGX_INPUT_GROUP_TYPE = new InjectionToken('InputGroupType'); + export const IGX_INPUT_GROUP_TYPE = /*@__PURE__*/new InjectionToken('InputGroupType'); /** * Determines the InputGroupType. diff --git a/projects/igniteui-angular/src/lib/progressbar/progressbar.component.ts b/projects/igniteui-angular/src/lib/progressbar/progressbar.component.ts index bc864c84230..9dee05ed595 100644 --- a/projects/igniteui-angular/src/lib/progressbar/progressbar.component.ts +++ b/projects/igniteui-angular/src/lib/progressbar/progressbar.component.ts @@ -23,14 +23,14 @@ import { IgxDirectionality } from '../services/direction/directionality'; const ONE_PERCENT = 0.01; const MIN_VALUE = 0; -export const IgxTextAlign = mkenum({ +export const IgxTextAlign = /*@__PURE__*/mkenum({ START: 'start', CENTER: 'center', END: 'end' }); export type IgxTextAlign = (typeof IgxTextAlign)[keyof typeof IgxTextAlign]; -export const IgxProgressType = mkenum({ +export const IgxProgressType = /*@__PURE__*/mkenum({ ERROR: 'error', INFO: 'info', WARNING: 'warning', diff --git a/projects/igniteui-angular/src/lib/services/direction/directionality.ts b/projects/igniteui-angular/src/lib/services/direction/directionality.ts index 6e17b21e1e7..808a1b1a5f9 100644 --- a/projects/igniteui-angular/src/lib/services/direction/directionality.ts +++ b/projects/igniteui-angular/src/lib/services/direction/directionality.ts @@ -23,7 +23,7 @@ export function DIR_DOCUMENT_FACTORY(): Document { * * @hidden */ -export const DIR_DOCUMENT = new InjectionToken('dir-doc', { +export const DIR_DOCUMENT = /*@__PURE__*/new InjectionToken('dir-doc', { providedIn: 'root', factory: DIR_DOCUMENT_FACTORY }); diff --git a/projects/igniteui-angular/src/lib/splitter/splitter.component.ts b/projects/igniteui-angular/src/lib/splitter/splitter.component.ts index f353a92f99d..9c1c94fd8de 100644 --- a/projects/igniteui-angular/src/lib/splitter/splitter.component.ts +++ b/projects/igniteui-angular/src/lib/splitter/splitter.component.ts @@ -349,8 +349,6 @@ export class IgxSplitterComponent implements AfterContentInit { } } -export const SPLITTER_INTERACTION_KEYS = new Set('right down left up arrowright arrowdown arrowleft arrowup'.split(' ')); - /** * @hidden @internal * Represents the draggable bar that visually separates panes and allows for changing their sizes. @@ -444,6 +442,8 @@ export class IgxSplitBarComponent { */ private startPoint!: number; + private interactionKeys = new Set('right down left up arrowright arrowdown arrowleft arrowup'.split(' ')); + /** * @hidden @internal */ @@ -459,7 +459,7 @@ export class IgxSplitBarComponent { const key = event.key.toLowerCase(); const ctrl = event.ctrlKey; event.stopPropagation(); - if (SPLITTER_INTERACTION_KEYS.has(key)) { + if (this.interactionKeys.has(key)) { event.preventDefault(); } switch (key) { diff --git a/projects/igniteui-angular/src/lib/stepper/step/step.component.ts b/projects/igniteui-angular/src/lib/stepper/step/step.component.ts index 41a2345732c..8983b176272 100644 --- a/projects/igniteui-angular/src/lib/stepper/step/step.component.ts +++ b/projects/igniteui-angular/src/lib/stepper/step/step.component.ts @@ -18,7 +18,7 @@ import { ViewChild } from '@angular/core'; import { takeUntil } from 'rxjs/operators'; -import { Direction, HorizontalAnimationType, IgxSlideComponentBase } from '../../carousel/carousel-base'; +import { Direction, IgxSlideComponentBase } from '../../carousel/carousel-base'; import { PlatformUtil } from '../../core/utils'; import { ToggleAnimationPlayer, ToggleAnimationSettings } from '../../expansion-panel/toggle-animation-component'; import { IgxAngularAnimationService } from '../../services/animation/angular-animation-service'; @@ -29,6 +29,7 @@ import { IgxStepContentDirective, IgxStepIndicatorDirective } from '../stepper.d import { IgxStepperService } from '../stepper.service'; import { IgxRippleDirective } from '../../directives/ripple/ripple.directive'; import { NgIf, NgClass, NgTemplateOutlet } from '@angular/common'; +import { HorizontalAnimationType } from '../../carousel/enums'; let NEXT_ID = 0; diff --git a/projects/igniteui-angular/src/lib/stepper/stepper.common.ts b/projects/igniteui-angular/src/lib/stepper/stepper.common.ts index 9254027d85e..72a3f0b2dbc 100644 --- a/projects/igniteui-angular/src/lib/stepper/stepper.common.ts +++ b/projects/igniteui-angular/src/lib/stepper/stepper.common.ts @@ -6,8 +6,9 @@ import { IgxStepActiveIndicatorDirective, IgxStepCompletedIndicatorDirective, IgxStepContentDirective, IgxStepIndicatorDirective, IgxStepInvalidIndicatorDirective } from './stepper.directive'; -import { Direction, HorizontalAnimationType, IgxCarouselComponentBase } from '../carousel/carousel-base'; +import { Direction, IgxCarouselComponentBase } from '../carousel/carousel-base'; import { ToggleAnimationPlayer, ToggleAnimationSettings } from '../expansion-panel/toggle-animation-component'; +import { HorizontalAnimationType } from '../carousel/enums'; // Component interfaces export interface IgxStepper extends IgxCarouselComponentBase { @@ -143,5 +144,5 @@ export const VerticalAnimationType = { export type VerticalAnimationType = (typeof VerticalAnimationType)[keyof typeof VerticalAnimationType]; // Token -export const IGX_STEPPER_COMPONENT = new InjectionToken('IgxStepperToken'); -export const IGX_STEP_COMPONENT = new InjectionToken('IgxStepToken'); +export const IGX_STEPPER_COMPONENT = /*@__PURE__*/new InjectionToken('IgxStepperToken'); +export const IGX_STEP_COMPONENT = /*@__PURE__*/new InjectionToken('IgxStepToken'); diff --git a/projects/igniteui-angular/src/lib/stepper/stepper.component.spec.ts b/projects/igniteui-angular/src/lib/stepper/stepper.component.spec.ts index 452bc8a808f..9267ccb3f81 100644 --- a/projects/igniteui-angular/src/lib/stepper/stepper.component.spec.ts +++ b/projects/igniteui-angular/src/lib/stepper/stepper.component.spec.ts @@ -5,7 +5,6 @@ import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angul import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { take } from 'rxjs/operators'; -import { HorizontalAnimationType } from '../carousel/carousel-base'; import { IgxIconComponent } from '../icon/icon.component'; import { IgxInputDirective, IgxInputGroupComponent } from '../input-group/public_api'; import { Direction } from '../services/direction/directionality'; @@ -23,6 +22,7 @@ import { import { IgxStepperComponent } from './stepper.component'; import { IgxStepActiveIndicatorDirective, IgxStepCompletedIndicatorDirective, IgxStepContentDirective, IgxStepIndicatorDirective, IgxStepInvalidIndicatorDirective, IgxStepSubtitleDirective, IgxStepTitleDirective } from './stepper.directive'; import { IgxStepperService } from './stepper.service'; +import { HorizontalAnimationType } from '../carousel/enums'; const STEPPER_CLASS = 'igx-stepper'; const STEPPER_HEADER = 'igx-stepper__header'; diff --git a/projects/igniteui-angular/src/lib/stepper/stepper.component.ts b/projects/igniteui-angular/src/lib/stepper/stepper.component.ts index d8892aec46c..91d9f602d85 100644 --- a/projects/igniteui-angular/src/lib/stepper/stepper.component.ts +++ b/projects/igniteui-angular/src/lib/stepper/stepper.component.ts @@ -7,7 +7,7 @@ import { } from '@angular/core'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { HorizontalAnimationType, IgxCarouselComponentBase } from '../carousel/carousel-base'; +import { IgxCarouselComponentBase } from '../carousel/carousel-base'; import { ToggleAnimationSettings } from '../expansion-panel/toggle-animation-component'; import { IgxAngularAnimationService } from '../services/animation/angular-animation-service'; @@ -24,6 +24,7 @@ import { } from './stepper.directive'; import { IgxStepperService } from './stepper.service'; import { fadeIn, growVerIn, growVerOut } from 'igniteui-angular/animations'; +import { HorizontalAnimationType } from '../carousel/enums'; // TODO: common interface between IgxCarouselComponentBase and ToggleAnimationPlayer? diff --git a/projects/igniteui-angular/src/lib/tabs/tabs/tabs.component.ts b/projects/igniteui-angular/src/lib/tabs/tabs/tabs.component.ts index 4fa54edebfe..a3c42125468 100644 --- a/projects/igniteui-angular/src/lib/tabs/tabs/tabs.component.ts +++ b/projects/igniteui-angular/src/lib/tabs/tabs/tabs.component.ts @@ -9,7 +9,7 @@ import { NgClass, NgFor, NgTemplateOutlet, NgIf } from '@angular/common'; import { IgxIconComponent } from '../../icon/icon.component'; import { IgxRippleDirective } from '../../directives/ripple/ripple.directive'; -export const IgxTabsAlignment = mkenum({ +export const IgxTabsAlignment = /*@__PURE__*/mkenum({ start: 'start', end: 'end', center: 'center', @@ -17,7 +17,7 @@ export const IgxTabsAlignment = mkenum({ }); /** @hidden */ -enum TabScrollButtonStyle { +const enum TabScrollButtonStyle { Enabled = 'enabled', Disabled = 'disabled', NotDisplayed = 'not_displayed' diff --git a/projects/igniteui-angular/src/lib/tree/common.ts b/projects/igniteui-angular/src/lib/tree/common.ts index 0ad49b670c0..b0d073de8f6 100644 --- a/projects/igniteui-angular/src/lib/tree/common.ts +++ b/projects/igniteui-angular/src/lib/tree/common.ts @@ -102,7 +102,7 @@ export interface ITreeNodeToggledEventArgs extends IBaseEventArgs { } // Enums -export const IgxTreeSelectionType = mkenum({ +export const IgxTreeSelectionType = /*@__PURE__*/mkenum({ None: 'None', BiState: 'BiState', Cascading: 'Cascading' @@ -110,5 +110,5 @@ export const IgxTreeSelectionType = mkenum({ export type IgxTreeSelectionType = (typeof IgxTreeSelectionType)[keyof typeof IgxTreeSelectionType]; // Token -export const IGX_TREE_COMPONENT = new InjectionToken('IgxTreeToken'); -export const IGX_TREE_NODE_COMPONENT = new InjectionToken>('IgxTreeNodeToken'); +export const IGX_TREE_COMPONENT = /*@__PURE__*/new InjectionToken('IgxTreeToken'); +export const IGX_TREE_NODE_COMPONENT = /*@__PURE__*/new InjectionToken>('IgxTreeNodeToken');