@decaf-ts/for-angular 0.1.0 → 0.1.3
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/{dist/lib/fesm2022 → fesm2022}/decaf-ts-for-angular.mjs +93 -109
- package/fesm2022/decaf-ts-for-angular.mjs.map +1 -0
- package/{dist/lib/index.d.ts → index.d.ts} +6 -5
- package/package.json +15 -86
- package/.editorconfig +0 -31
- package/.gitlab-ci.yml +0 -197
- package/.hintrc +0 -19
- package/.prettierrc +0 -49
- package/.snyk +0 -13
- package/LICENSE.md +0 -260
- package/angular.json +0 -274
- package/bs-config.json +0 -5
- package/cli-module.js.map +0 -1
- package/dist/for-angular/cli/cli-module.d.ts +0 -22
- package/dist/for-angular/cli/cli-module.d.ts.map +0 -1
- package/dist/for-angular/cli/cli-module.js +0 -131
- package/dist/for-angular/cli/cli-module.js.map +0 -1
- package/dist/lib/README.md +0 -117
- package/dist/lib/fesm2022/decaf-ts-for-angular.mjs.map +0 -1
- package/eslint.config.mjs +0 -101
- package/ionic.config.json +0 -14
- package/jest.config.ts +0 -52
- package/jest.setup.ts +0 -50
- package/karma.conf.js +0 -50
- package/ng-package.json +0 -17
- package/ngsw-config.json +0 -30
- package/playwright.config.ts +0 -80
- package/resources/favicon.png +0 -0
- package/resources/favicon.svg +0 -29
- package/resources/icon-background.png +0 -0
- package/resources/icon-foreground.png +0 -0
- package/resources/icon-only.png +0 -0
- package/resources/icon-only.svg +0 -29
- package/resources/splash-dark.png +0 -0
- package/resources/splash-dark2.png +0 -0
- package/resources/splash.png +0 -0
- package/resources/splash2.png +0 -0
- package/resources/touch-icon.svg +0 -29
- package/schematics/README.md +0 -28
- package/schematics/collection.json +0 -20
- package/schematics/package-lock.json +0 -1501
- package/schematics/package.json +0 -37
- package/schematics/src/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.__style__.template +0 -0
- package/schematics/src/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.html.template +0 -3
- package/schematics/src/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +0 -40
- package/schematics/src/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +0 -37
- package/schematics/src/component/files/__name@dasherize@if-flat__/__name@dasherize__.module.ts.template +0 -14
- package/schematics/src/component/index.js +0 -146
- package/schematics/src/component/schema.js +0 -2
- package/schematics/src/component/schema.json +0 -101
- package/schematics/src/page/files/__name@dasherize__.page.html.template +0 -15
- package/schematics/src/page/files/__name@dasherize__.page.scss.template +0 -0
- package/schematics/src/page/files/__name@dasherize__.page.ts.template +0 -19
- package/schematics/src/page/index.js +0 -71
- package/schematics/src/page/schema.json +0 -87
- package/schematics/src/schematics/index.js +0 -11
- package/schematics/src/schematics/index_spec.js +0 -13
- package/schematics/src/util/ast-util.js +0 -517
- package/schematics/src/util/change.js +0 -96
- package/schematics/src/util/index.js +0 -14
- package/settings.json +0 -112
- package/tsconfig.app.json +0 -22
- package/tsconfig.cli.json +0 -82
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -22
- package/webpack.config.js +0 -10
- package/workdocs/1-Header.md +0 -5
- package/workdocs/2-Badges.md +0 -30
- package/workdocs/4-Description.md +0 -4
- package/workdocs/5-HowToUse.md +0 -27
- package/workdocs/6-Related.md +0 -7
- package/workdocs/7-Social.md +0 -5
- package/workdocs/99-Footer.md +0 -28
- package/workdocs/Readme.md +0 -12
- package/workdocs/assets/apple-touch-icon.png +0 -0
- package/workdocs/assets/decaf-logo.svg +0 -54
- package/workdocs/assets/favicon.png +0 -0
- package/workdocs/assets/slogans.json +0 -182
- package/workdocs/confluence/.markdown-confluence.template.json +0 -6
- package/workdocs/confluence/Angular Module.md +0 -5
- package/workdocs/drawings/diagram.drawio +0 -24
- package/workdocs/prompts/bulk.md +0 -122
- package/workdocs/prompts/code.md +0 -47
- package/workdocs/prompts/documentation.md +0 -146
- package/workdocs/prompts/uml.md +0 -11
- package/workdocs/readme-md.json +0 -6
- package/workdocs/reports/CHANGELOG.md +0 -12
- package/workdocs/reports/DEPENDENCIES.md +0 -213
- package/workdocs/reports/RELEASE_NOTES.md +0 -24
- package/workdocs/reports/coverage/.gitkeep +0 -0
- package/workdocs/reports/coverage/clover.xml +0 -4107
- package/workdocs/reports/coverage/coverage-final.json +0 -76
- package/workdocs/reports/coverage/lcov-report/base.css +0 -224
- package/workdocs/reports/coverage/lcov-report/block-navigation.js +0 -87
- package/workdocs/reports/coverage/lcov-report/favicon.png +0 -0
- package/workdocs/reports/coverage/lcov-report/index.html +0 -551
- package/workdocs/reports/coverage/lcov-report/prettify.css +0 -1
- package/workdocs/reports/coverage/lcov-report/prettify.js +0 -2
- package/workdocs/reports/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/workdocs/reports/coverage/lcov-report/sorter.js +0 -210
- package/workdocs/reports/coverage/lcov-report/src/app/models/CategoryModel.ts.html +0 -277
- package/workdocs/reports/coverage/lcov-report/src/app/models/DemoModel.ts.html +0 -427
- package/workdocs/reports/coverage/lcov-report/src/app/models/UserModel.ts.html +0 -226
- package/workdocs/reports/coverage/lcov-report/src/app/models/index.html +0 -146
- package/workdocs/reports/coverage/lcov-report/src/cli-module.ts.html +0 -502
- package/workdocs/reports/coverage/lcov-report/src/environments/environment.ts.html +0 -166
- package/workdocs/reports/coverage/lcov-report/src/environments/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/index.html +0 -191
- package/workdocs/reports/coverage/lcov-report/src/karma-test.ts.html +0 -121
- package/workdocs/reports/coverage/lcov-report/src/lib/components/card/card.component.ts.html +0 -625
- package/workdocs/reports/coverage/lcov-report/src/lib/components/card/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/component-renderer/component-renderer.component.ts.html +0 -772
- package/workdocs/reports/coverage/lcov-report/src/lib/components/component-renderer/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/crud-field/crud-field.component.ts.html +0 -2698
- package/workdocs/reports/coverage/lcov-report/src/lib/components/crud-field/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/crud-form/constants.ts.html +0 -133
- package/workdocs/reports/coverage/lcov-report/src/lib/components/crud-form/crud-form.component.ts.html +0 -346
- package/workdocs/reports/coverage/lcov-report/src/lib/components/crud-form/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/empty-state/empty-state.component.ts.html +0 -1264
- package/workdocs/reports/coverage/lcov-report/src/lib/components/empty-state/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/fieldset/fieldset.component.ts.html +0 -2965
- package/workdocs/reports/coverage/lcov-report/src/lib/components/fieldset/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/file-upload/file-upload.component.ts.html +0 -2263
- package/workdocs/reports/coverage/lcov-report/src/lib/components/file-upload/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/filter/filter.component.ts.html +0 -2485
- package/workdocs/reports/coverage/lcov-report/src/lib/components/filter/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/for-angular-components.module.ts.html +0 -259
- package/workdocs/reports/coverage/lcov-report/src/lib/components/icon/icon.component.ts.html +0 -358
- package/workdocs/reports/coverage/lcov-report/src/lib/components/icon/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/index.html +0 -131
- package/workdocs/reports/coverage/lcov-report/src/lib/components/index.ts.html +0 -181
- package/workdocs/reports/coverage/lcov-report/src/lib/components/layout/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/layout/layout.component.ts.html +0 -943
- package/workdocs/reports/coverage/lcov-report/src/lib/components/list/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/list/list.component.ts.html +0 -4420
- package/workdocs/reports/coverage/lcov-report/src/lib/components/list-item/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/list-item/list-item.component.ts.html +0 -1741
- package/workdocs/reports/coverage/lcov-report/src/lib/components/modal/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/modal/modal.component.ts.html +0 -1984
- package/workdocs/reports/coverage/lcov-report/src/lib/components/model-renderer/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/model-renderer/model-renderer.component.ts.html +0 -373
- package/workdocs/reports/coverage/lcov-report/src/lib/components/pagination/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/pagination/pagination.component.ts.html +0 -1165
- package/workdocs/reports/coverage/lcov-report/src/lib/components/searchbar/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/searchbar/searchbar.component.ts.html +0 -1774
- package/workdocs/reports/coverage/lcov-report/src/lib/components/stepped-form/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/stepped-form/stepped-form.component.ts.html +0 -1219
- package/workdocs/reports/coverage/lcov-report/src/lib/components/table/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/lib/components/table/table.component.ts.html +0 -1054
- package/workdocs/reports/coverage/lcov-report/src/lib/directives/NgxSvgDirective.ts.html +0 -163
- package/workdocs/reports/coverage/lcov-report/src/lib/directives/collapsable.directive.ts.html +0 -268
- package/workdocs/reports/coverage/lcov-report/src/lib/directives/index.html +0 -131
- package/workdocs/reports/coverage/lcov-report/src/lib/directives/index.ts.html +0 -91
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/DynamicModule.ts.html +0 -133
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/MediaService.ts.html +0 -142
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxBaseComponent.ts.html +0 -2194
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxComponentDirective.ts.html +0 -3430
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxCrudFormField.ts.html +0 -721
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxDecafComponentDirective.ts.html +0 -1864
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxDecafFormFieldDirective.ts.html +0 -952
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxDecafFormService.ts.html +0 -3211
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxEventHandler.ts.html +0 -307
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxFormDirective.ts.html +0 -1366
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxFormFieldDirective.ts.html +0 -1960
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxFormService.ts.html +0 -3004
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxModelPageDirective.ts.html +0 -1672
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxPageDirective.ts.html +0 -748
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxParentComponentDirective.ts.html +0 -775
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxRenderableComponentDirective.ts.html +0 -727
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxRenderingEngine.ts.html +0 -2005
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/NgxRepositoryDirective.ts.html +0 -1546
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/ValidatorFactory.ts.html +0 -817
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/constants.ts.html +0 -1120
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/decorators.ts.html +0 -376
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/helpers.ts.html +0 -694
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/index.html +0 -356
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/index.ts.html +0 -160
- package/workdocs/reports/coverage/lcov-report/src/lib/engine/overrides.ts.html +0 -502
- package/workdocs/reports/coverage/lcov-report/src/lib/for-angular-common.module.ts.html +0 -298
- package/workdocs/reports/coverage/lcov-report/src/lib/helpers/index.html +0 -131
- package/workdocs/reports/coverage/lcov-report/src/lib/helpers/index.ts.html +0 -121
- package/workdocs/reports/coverage/lcov-report/src/lib/helpers/utils.ts.html +0 -1603
- package/workdocs/reports/coverage/lcov-report/src/lib/i18n/FakeLoader.ts.html +0 -157
- package/workdocs/reports/coverage/lcov-report/src/lib/i18n/Loader.ts.html +0 -826
- package/workdocs/reports/coverage/lcov-report/src/lib/i18n/index.html +0 -146
- package/workdocs/reports/coverage/lcov-report/src/lib/i18n/index.ts.html +0 -91
- package/workdocs/reports/coverage/lcov-report/src/lib/index.html +0 -131
- package/workdocs/reports/coverage/lcov-report/src/lib/public-apis.ts.html +0 -157
- package/workdocs/reports/coverage/lcov-report/src/lib/services/NgxFormService.ts.html +0 -3460
- package/workdocs/reports/coverage/lcov-report/src/lib/services/NgxMediaService.ts.html +0 -1420
- package/workdocs/reports/coverage/lcov-report/src/lib/services/NgxRouterService.ts.html +0 -1243
- package/workdocs/reports/coverage/lcov-report/src/lib/services/NgxTranslateService.ts.html +0 -214
- package/workdocs/reports/coverage/lcov-report/src/lib/services/index.html +0 -176
- package/workdocs/reports/coverage/lcov-report/src/lib/services/index.ts.html +0 -91
- package/workdocs/reports/coverage/lcov-report/src/lib/utils/DecafFakerRepository.ts.html +0 -571
- package/workdocs/reports/coverage/lcov-report/src/lib/utils/helpers.ts.html +0 -1711
- package/workdocs/reports/coverage/lcov-report/src/lib/utils/index.html +0 -146
- package/workdocs/reports/coverage/lcov-report/src/lib/utils/index.ts.html +0 -124
- package/workdocs/reports/coverage/lcov-report/src/main.ts.html +0 -100
- package/workdocs/reports/coverage/lcov-report/src/polyfills.ts.html +0 -271
- package/workdocs/reports/coverage/lcov-report/src/stories/Configure.stories.ts.html +0 -1156
- package/workdocs/reports/coverage/lcov-report/src/stories/button.component.ts.html +0 -229
- package/workdocs/reports/coverage/lcov-report/src/stories/button.stories.ts.html +0 -235
- package/workdocs/reports/coverage/lcov-report/src/stories/crud-field.stories.ts.html +0 -325
- package/workdocs/reports/coverage/lcov-report/src/stories/header.stories.ts.html +0 -181
- package/workdocs/reports/coverage/lcov-report/src/stories/index.html +0 -281
- package/workdocs/reports/coverage/lcov-report/src/stories/list.stories.ts.html +0 -289
- package/workdocs/reports/coverage/lcov-report/src/stories/login.page.stories.ts.html +0 -175
- package/workdocs/reports/coverage/lcov-report/src/stories/model-renderer.stories.ts.html +0 -259
- package/workdocs/reports/coverage/lcov-report/src/stories/page.component.ts.html +0 -331
- package/workdocs/reports/coverage/lcov-report/src/stories/page.stories.ts.html +0 -193
- package/workdocs/reports/coverage/lcov-report/src/stories/setup.ts.html +0 -127
- package/workdocs/reports/coverage/lcov-report/src/stories/utils.ts.html +0 -247
- package/workdocs/reports/coverage/lcov-report/src/tests/index.html +0 -116
- package/workdocs/reports/coverage/lcov-report/src/tests/karmaErrorParser.ts.html +0 -190
- package/workdocs/reports/coverage/lcov-report/src/typings.d.ts.html +0 -88
- package/workdocs/reports/coverage/lcov-report/src/zone-flags.ts.html +0 -103
- package/workdocs/reports/coverage/lcov.info +0 -7898
- package/workdocs/reports/data/.gitkeep +0 -1
- package/workdocs/reports/html/.gitkeep +0 -0
- package/workdocs/reports/html/jest-html-reporters-attach/test-report/index.js +0 -3
- package/workdocs/reports/html/jest-html-reporters-attach/test-report/result.js +0 -1
- package/workdocs/reports/html/test-report.html +0 -1
- package/workdocs/reports/images/.gitkeep +0 -1
- package/workdocs/reports/jest.coverage.config.ts +0 -43
- package/workdocs/reports/junit/junit-report.xml +0 -91
- package/workdocs/resources/.gitlock +0 -0
- package/workdocs/resources/diagram-Actor.png +0 -0
- package/workdocs/resources/diagram-banner.png +0 -0
- package/workdocs/resources/diagram.png +0 -0
- package/workdocs/tutorials/Contributing.md +0 -64
- package/workdocs/tutorials/Documentation.md +0 -340
- package/workdocs/tutorials/For Developers.md +0 -337
- package/workdocs/uml/diagram.puml +0 -11
- package/www/1049.10b030f0de36543b.js +0 -1
- package/www/1102.67cedfb3e29f0a05.js +0 -1
- package/www/1107.6b592a1672821270.js +0 -1
- package/www/1459.cabc18e941afa5d7.js +0 -1
- package/www/1577.5221deebe3501e43.js +0 -1
- package/www/2075.b6dc4fbb89dd6afc.js +0 -1
- package/www/2348.c4cc27dadbec70ec.js +0 -1
- package/www/2375.318d0b24ab346271.js +0 -1
- package/www/2415.618d6968ffda319c.js +0 -1
- package/www/2460.1d97c6f48b898ee2.js +0 -1
- package/www/2560.2e7000dcf80b6b2c.js +0 -1
- package/www/2585.274d59d52bafc7ed.js +0 -1
- package/www/2885.d99b86afd1ff7aa8.js +0 -1
- package/www/3162.bbc401f4a5f82460.js +0 -1
- package/www/323.f64c512be5c8d797.js +0 -1
- package/www/3238.a3e7e8004c6b6667.js +0 -1
- package/www/3506.8c03f5589b33a4a6.js +0 -1
- package/www/3511.56b7e49bb6c2c936.js +0 -1
- package/www/3519.84fbb67dc803f702.js +0 -1
- package/www/3675.7ebfdcf145052232.js +0 -1
- package/www/3814.765c1794e1be63de.js +0 -1
- package/www/3rdpartylicenses.txt +0 -1344
- package/www/4171.a974bdbf9c97e4e1.js +0 -1
- package/www/4183.41ef1def450a2cc0.js +0 -1
- package/www/4406.0b2dd3839b8c1417.js +0 -1
- package/www/441.e1031657c7e5f0ff.js +0 -1
- package/www/4463.6ad7b857e5f34009.js +0 -1
- package/www/4591.42f34534d38b9b31.js +0 -1
- package/www/4699.8df8ea9806163d4c.js +0 -1
- package/www/5100.ed6483c55a157d67.js +0 -1
- package/www/5193.15ea6938534eceb1.js +0 -1
- package/www/5197.6733853529768a45.js +0 -1
- package/www/5222.8439a641c2c4b1c1.js +0 -1
- package/www/5373.d7878f708309f038.js +0 -1
- package/www/5467.f0e21031db47308c.js +0 -1
- package/www/5712.b08cf436ee8145ce.js +0 -1
- package/www/5887.3d038f564e925abb.js +0 -1
- package/www/5949.37330f20e95dee79.js +0 -1
- package/www/6024.c10cc3d1b341c748.js +0 -1
- package/www/6433.360fcff952bde822.js +0 -1
- package/www/6499.60169da9869db697.js +0 -1
- package/www/6521.fab1f34bfe6b8200.js +0 -1
- package/www/6631.eaa711da6e0aeed9.js +0 -1
- package/www/6717.9d970c383bb0cf1c.js +0 -1
- package/www/6840.7317cd962ab23932.js +0 -1
- package/www/7030.d115d82ca7468a4e.js +0 -1
- package/www/7076.cce20ed5c79ff305.js +0 -1
- package/www/7179.c0545989ce869b3d.js +0 -1
- package/www/7240.69aeb484d78eb24d.js +0 -1
- package/www/7372.94c62459e34f7303.js +0 -1
- package/www/7402.983a5ecff61e9a5d.js +0 -1
- package/www/7428.527ac48035a2f915.js +0 -1
- package/www/7676.d7db23d350e4b096.js +0 -1
- package/www/770.80af87d5eb0075d3.js +0 -1
- package/www/7720.0701576cb9966779.js +0 -1
- package/www/7927.ee869d0dc478250a.js +0 -1
- package/www/8066.894688fbb2e5c832.js +0 -1
- package/www/8193.7f09ecd40b6d42c2.js +0 -1
- package/www/8255.158098a6302c91c2.js +0 -1
- package/www/8314.596c1ccf26b9c93a.js +0 -1
- package/www/8357.c5406b92e6933d7a.js +0 -1
- package/www/8477.a3ccc11c25a642d3.js +0 -1
- package/www/8487.93b6f7465ae1b7ac.js +0 -1
- package/www/8584.b77ad478a5a7ac2a.js +0 -1
- package/www/8805.a87413652185ff8f.js +0 -1
- package/www/8814.b489a78ae8e926c4.js +0 -1
- package/www/8970.234b3db1f97528fe.js +0 -1
- package/www/9013.c2e6ba17a915bdd6.js +0 -1
- package/www/9073.16c4e42482d55a3c.js +0 -1
- package/www/9344.7d2d24b194b794e2.js +0 -1
- package/www/9364.9a028036dd89e3e7.js +0 -1
- package/www/944.7e4317348c48d4f4.js +0 -1
- package/www/964.9a979e1c1aad0f5b.js +0 -1
- package/www/9657.fbb680ad1064e91a.js +0 -1
- package/www/9956.2d00a2153e9a7799.js +0 -1
- package/www/9977.068cd5561462bc99.js +0 -1
- package/www/assets/i18n/en.json +0 -210
- package/www/assets/i18n/ew/en.json +0 -346
- package/www/assets/i18n/pt.json +0 -186
- package/www/assets/icons/icon-128.webp +0 -0
- package/www/assets/icons/icon-192.webp +0 -0
- package/www/assets/icons/icon-256.webp +0 -0
- package/www/assets/icons/icon-48.webp +0 -0
- package/www/assets/icons/icon-512.webp +0 -0
- package/www/assets/icons/icon-72.webp +0 -0
- package/www/assets/icons/icon-96.webp +0 -0
- package/www/assets/images/angular-logo.svg +0 -45
- package/www/assets/images/apple-touch-icon.png +0 -0
- package/www/assets/images/decaf-logo-black.svg +0 -22
- package/www/assets/images/decaf-logo-contrast.svg +0 -54
- package/www/assets/images/decaf-logo-white.svg +0 -22
- package/www/assets/images/decaf-logo.svg +0 -54
- package/www/assets/images/ew/product.txt +0 -1
- package/www/assets/images/favicon-contrast.svg +0 -7
- package/www/assets/images/favicon.png +0 -0
- package/www/assets/images/favicon.svg +0 -29
- package/www/assets/images/icons/document.svg +0 -7
- package/www/assets/images/icons/edit.svg +0 -1
- package/www/assets/images/icons/logout.svg +0 -4
- package/www/assets/images/icons/menu-collapse.svg +0 -5
- package/www/assets/images/icons/menu.svg +0 -3
- package/www/assets/images/icons/moon-stars.svg +0 -5
- package/www/assets/images/icons/trash.svg +0 -1
- package/www/cli-module.ts +0 -139
- package/www/common.e50b5f8708aca9a5.js +0 -1
- package/www/index.html +0 -29
- package/www/main.7814262e404641fd.js +0 -1
- package/www/polyfills.4c1e087fffe784e8.js +0 -1
- package/www/runtime.e81aa7ecff7177cd.js +0 -1
- package/www/styles.5a3cd83eba16afc9.css +0 -4
- package/www/tabler-icons.bfabe54eef86ae62.woff +0 -0
- package/www/tabler-icons.d9f65ab9439b4ffc.ttf +0 -0
- package/www/tabler-icons.f17d2c3b34a5deaa.woff2 +0 -0
- /package/{dist/lib/assets → assets}/i18n/en.json +0 -0
- /package/{dist/lib/assets → assets}/i18n/ew/en.json +0 -0
- /package/{dist/lib/assets → assets}/i18n/pt.json +0 -0
- /package/{dist/lib/assets → assets}/icons/icon-128.webp +0 -0
- /package/{dist/lib/assets → assets}/icons/icon-192.webp +0 -0
- /package/{dist/lib/assets → assets}/icons/icon-256.webp +0 -0
- /package/{dist/lib/assets → assets}/icons/icon-48.webp +0 -0
- /package/{dist/lib/assets → assets}/icons/icon-512.webp +0 -0
- /package/{dist/lib/assets → assets}/icons/icon-72.webp +0 -0
- /package/{dist/lib/assets → assets}/icons/icon-96.webp +0 -0
- /package/{dist/lib/assets → assets}/images/angular-logo.svg +0 -0
- /package/{dist/lib/assets → assets}/images/apple-touch-icon.png +0 -0
- /package/{dist/lib/assets → assets}/images/decaf-logo-black.svg +0 -0
- /package/{dist/lib/assets → assets}/images/decaf-logo-contrast.svg +0 -0
- /package/{dist/lib/assets → assets}/images/decaf-logo-white.svg +0 -0
- /package/{dist/lib/assets → assets}/images/decaf-logo.svg +0 -0
- /package/{dist/lib/assets → assets}/images/ew/product.txt +0 -0
- /package/{dist/lib/assets → assets}/images/favicon-contrast.svg +0 -0
- /package/{dist/lib/assets → assets}/images/favicon.png +0 -0
- /package/{dist/lib/assets → assets}/images/favicon.svg +0 -0
- /package/{dist/lib/assets → assets}/images/icons/document.svg +0 -0
- /package/{dist/lib/assets → assets}/images/icons/edit.svg +0 -0
- /package/{dist/lib/assets → assets}/images/icons/logout.svg +0 -0
- /package/{dist/lib/assets → assets}/images/icons/menu-collapse.svg +0 -0
- /package/{dist/lib/assets → assets}/images/icons/menu.svg +0 -0
- /package/{dist/lib/assets → assets}/images/icons/moon-stars.svg +0 -0
- /package/{dist/lib/assets → assets}/images/icons/trash.svg +0 -0
package/schematics/package.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "schematics",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"description": "A blank schematics",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "tsc -p tsconfig.json",
|
|
7
|
-
"test": "npm run build && jasmine src/**/*_spec.js",
|
|
8
|
-
"schematics": "schematics",
|
|
9
|
-
"prepare-pr": "npm run repo:pr && npm run lint-fix && npm run build:prod && npm run coverage && npm run docs",
|
|
10
|
-
"repo:init": "codex exec \"$(cat ./.codex/prompts/repo-setup.md)\nbase_path is `./`, initialize the repository\"",
|
|
11
|
-
"repo:setup": "codex exec \"$(cat ./.codex/prompts/repo-setup.md)\nbase_path is ./\"",
|
|
12
|
-
"repo:doc": "codex exec \"$(cat ./.codex/prompts/doc.md) $(cat ./.codex/prompts/bulk-docs.md)\nbase_path is ./\"",
|
|
13
|
-
"repo:tests": "codex exec \"$(cat ./.codex/prompts/bulk-tests.md)\nbase_path is ./ and coverage is 95%\" -s workspace-write",
|
|
14
|
-
"repo:readme": "codex exec \"$(cat ./.codex/prompts/update-readme.md)\nbase_path is ./\"",
|
|
15
|
-
"repo:pr": "npm run repo:doc && npm run repo:tests && npm run repo:readme",
|
|
16
|
-
"sync-codex": "./bin/sync-codex.sh",
|
|
17
|
-
"do-install": "NPM_TOKEN=$(cat .npmtoken) npm install"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"schematics"
|
|
21
|
-
],
|
|
22
|
-
"author": "Tiago Venceslau and Contributors",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"schematics": "./collection.json",
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@angular-devkit/core": "^20.3.0",
|
|
27
|
-
"@angular-devkit/schematics": "^20.3.0",
|
|
28
|
-
"@schematics/angular": "^20.3.0",
|
|
29
|
-
"typescript": "~5.8.3"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@angular-devkit/schematics-cli": "^20.3.0",
|
|
33
|
-
"@types/jasmine": "~5.1.0",
|
|
34
|
-
"@types/node": "^18.18.0",
|
|
35
|
-
"jasmine": "^5.0.0"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
File without changes
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
-
<% if(!standalone) {%>import { IonicModule } from '@ionic/angular';<%} %>
|
|
3
|
-
<% if(standalone) {%>import { ForAngularCommonModule } from '../../for-angular-common.module';<%} %>
|
|
4
|
-
import { <%= classify(name) %><%= classify(type) %> } from './<%= dasherize(name) %>.<%= dasherize(type) %>';
|
|
5
|
-
import { Model, ModelBuilderFunction } from '@decaf-ts/decorator-validation';
|
|
6
|
-
import { NgxRenderingEngine } from '../../engine';
|
|
7
|
-
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
|
8
|
-
import { I18nFakeLoader } from 'src/lib/i18n';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const imports = [
|
|
12
|
-
ForAngularCommonModule,
|
|
13
|
-
<%= classify(name) %><%= classify(type) %>,
|
|
14
|
-
TranslateModule.forRoot({
|
|
15
|
-
loader: {
|
|
16
|
-
provide: TranslateLoader,
|
|
17
|
-
useClass: I18nFakeLoader
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
];
|
|
21
|
-
describe('<%= classify(name) %><%= classify(type) %>', () => {
|
|
22
|
-
let component: <%= classify(name) %><%= classify(type) %>;
|
|
23
|
-
let fixture: ComponentFixture<<%= classify(name) %><%= classify(type) %>>;
|
|
24
|
-
|
|
25
|
-
beforeEach(waitForAsync(() => {
|
|
26
|
-
TestBed.configureTestingModule({<% if(!standalone) {%>
|
|
27
|
-
declarations: [ <%= classify(name) %><%= classify(type) %> ],
|
|
28
|
-
imports: [IonicModule.forRoot()]<%} %><% if(standalone) {%>
|
|
29
|
-
imports,<%} %>
|
|
30
|
-
}).compileComponents();
|
|
31
|
-
|
|
32
|
-
fixture = TestBed.createComponent(<%= classify(name) %><%= classify(type) %>);
|
|
33
|
-
component = fixture.componentInstance;
|
|
34
|
-
fixture.detectChanges();
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
|
-
it('should create', () => {
|
|
38
|
-
expect(component).toBeTruthy();
|
|
39
|
-
});
|
|
40
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit<% if(standalone){ %> <%} %> } from '@angular/core';
|
|
2
|
-
<% if(standalone){ %>import { ForAngularCommonModule } from '../../for-angular-common.module';<%} %>
|
|
3
|
-
import { NgxBaseComponentDirective } from '../../engine/NgxBaseComponentDirective';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: '<%= selector %>',
|
|
8
|
-
templateUrl: './<%= dasherize(name) %>.<%= dasherize(type) %>.html',
|
|
9
|
-
styleUrls: ['./<%= dasherize(name) %>.<%= dasherize(type) %>.<%= style %>'],
|
|
10
|
-
<% if(standalone) {%> imports: [ForAngularCommonModule],
|
|
11
|
-
standalone: true,
|
|
12
|
-
<%} %>
|
|
13
|
-
})
|
|
14
|
-
export class <%= classify(name) %><%= classify(type) %> extends NgxBaseComponentDirective implements OnInit {
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @constructor
|
|
18
|
-
* @description Initializes a new instance of the <%= classify(name) %><%= classify(type) %>.
|
|
19
|
-
* Calls the parent constructor with the component name for generate base locale string.
|
|
20
|
-
*/
|
|
21
|
-
constructor() {
|
|
22
|
-
super("<%= classify(name) %><%= classify(type) %>")
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Lifecycle hook that is called after data-bound properties of a directive are initialized.
|
|
27
|
-
* This method is part of Angular's component lifecycle and is used for any additional initialization tasks.
|
|
28
|
-
*
|
|
29
|
-
* @returns {void} This method does not return a value.
|
|
30
|
-
*/
|
|
31
|
-
async ngOnInit(): void {
|
|
32
|
-
|
|
33
|
-
// set component as initilizad, trigger change to get locale string
|
|
34
|
-
await this.initialize();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormsModule } from '@angular/forms';
|
|
4
|
-
|
|
5
|
-
import { IonicModule } from '@ionic/angular';
|
|
6
|
-
|
|
7
|
-
import { <%= classify(name) %><%= classify(type) %> } from './<%= dasherize(name) %>.component';
|
|
8
|
-
|
|
9
|
-
@NgModule({
|
|
10
|
-
imports: [ CommonModule, FormsModule, IonicModule,],
|
|
11
|
-
declarations: [<%= classify(name) %><%= classify(type) %> ],
|
|
12
|
-
exports: [<%= classify(name) %><%= classify(type) %> ]
|
|
13
|
-
})
|
|
14
|
-
export class <%= classify(name) %><%= classify(type) %> Module {}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.test = test;
|
|
4
|
-
exports.default = default_1;
|
|
5
|
-
const core_1 = require("@angular-devkit/core");
|
|
6
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
|
-
const find_module_1 = require("@schematics/angular/utility/find-module");
|
|
8
|
-
const parse_name_1 = require("@schematics/angular/utility/parse-name");
|
|
9
|
-
const validation_1 = require("@schematics/angular/utility/validation");
|
|
10
|
-
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
11
|
-
const ts = require("typescript");
|
|
12
|
-
const util_1 = require("../util");
|
|
13
|
-
const ast_util_1 = require("../util/ast-util");
|
|
14
|
-
const change_1 = require("../util/change");
|
|
15
|
-
function test(_options) {
|
|
16
|
-
return (tree, _context) => {
|
|
17
|
-
console.log("Testing Decaf component schematics...");
|
|
18
|
-
return tree;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function readIntoSourceFile(host, modulePath) {
|
|
22
|
-
const text = host.read(modulePath);
|
|
23
|
-
if (text === null) {
|
|
24
|
-
throw new schematics_1.SchematicsException(`File ${modulePath} does not exist.`);
|
|
25
|
-
}
|
|
26
|
-
const sourceText = text.toString('utf-8');
|
|
27
|
-
return ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true);
|
|
28
|
-
}
|
|
29
|
-
function addImportToNgModule(options) {
|
|
30
|
-
return (host) => {
|
|
31
|
-
if (!options.module) {
|
|
32
|
-
return host;
|
|
33
|
-
}
|
|
34
|
-
if (!options.createModule && options.module) {
|
|
35
|
-
addImportToDeclarations(host, options);
|
|
36
|
-
}
|
|
37
|
-
if (options.createModule && options.module) {
|
|
38
|
-
addImportToImports(host, options);
|
|
39
|
-
}
|
|
40
|
-
return host;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function addImportToDeclarations(host, options) {
|
|
44
|
-
if (options.module) {
|
|
45
|
-
const modulePath = options.module;
|
|
46
|
-
let source = readIntoSourceFile(host, modulePath);
|
|
47
|
-
const componentPath = `/${options.path}/` +
|
|
48
|
-
(options.flat ? '' : core_1.strings.dasherize(options.name) + '/') +
|
|
49
|
-
core_1.strings.dasherize(options.name) +
|
|
50
|
-
'.component';
|
|
51
|
-
const relativePath = (0, find_module_1.buildRelativePath)(modulePath, componentPath);
|
|
52
|
-
const classifiedName = core_1.strings.classify(`${options.name}Component`);
|
|
53
|
-
const declarationChanges = (0, ast_util_1.addDeclarationToModule)(source, modulePath, classifiedName, relativePath);
|
|
54
|
-
const declarationRecorder = host.beginUpdate(modulePath);
|
|
55
|
-
for (const change of declarationChanges) {
|
|
56
|
-
if (change instanceof change_1.InsertChange) {
|
|
57
|
-
declarationRecorder.insertLeft(change.pos, change.toAdd);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
host.commitUpdate(declarationRecorder);
|
|
61
|
-
if (options.export) {
|
|
62
|
-
// Need to refresh the AST because we overwrote the file in the host.
|
|
63
|
-
source = readIntoSourceFile(host, modulePath);
|
|
64
|
-
const exportRecorder = host.beginUpdate(modulePath);
|
|
65
|
-
const exportChanges = (0, ast_util_1.addExportToModule)(source, modulePath, core_1.strings.classify(`${options.name}Component`), relativePath);
|
|
66
|
-
for (const change of exportChanges) {
|
|
67
|
-
if (change instanceof change_1.InsertChange) {
|
|
68
|
-
exportRecorder.insertLeft(change.pos, change.toAdd);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
host.commitUpdate(exportRecorder);
|
|
72
|
-
}
|
|
73
|
-
if (options.entryComponent) {
|
|
74
|
-
// Need to refresh the AST because we overwrote the file in the host.
|
|
75
|
-
source = readIntoSourceFile(host, modulePath);
|
|
76
|
-
const entryComponentRecorder = host.beginUpdate(modulePath);
|
|
77
|
-
const entryComponentChanges = (0, ast_util_1.addEntryComponentToModule)(source, modulePath, core_1.strings.classify(`${options.name}Component`), relativePath);
|
|
78
|
-
for (const change of entryComponentChanges) {
|
|
79
|
-
if (change instanceof change_1.InsertChange) {
|
|
80
|
-
entryComponentRecorder.insertLeft(change.pos, change.toAdd);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
host.commitUpdate(entryComponentRecorder);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function addImportToImports(host, options) {
|
|
88
|
-
if (options.module) {
|
|
89
|
-
const modulePath = options.module;
|
|
90
|
-
const moduleSource = readIntoSourceFile(host, modulePath);
|
|
91
|
-
const componentModulePath = `/${options.path}/` +
|
|
92
|
-
(options.flat ? '' : core_1.strings.dasherize(options.name) + '/') +
|
|
93
|
-
core_1.strings.dasherize(options.name) +
|
|
94
|
-
'.module';
|
|
95
|
-
const relativePath = (0, find_module_1.buildRelativePath)(modulePath, componentModulePath);
|
|
96
|
-
const classifiedName = core_1.strings.classify(`${options.name}ComponentModule`);
|
|
97
|
-
const importChanges = (0, ast_util_1.addSymbolToNgModuleMetadata)(moduleSource, modulePath, 'imports', classifiedName, relativePath);
|
|
98
|
-
const importRecorder = host.beginUpdate(modulePath);
|
|
99
|
-
for (const change of importChanges) {
|
|
100
|
-
if (change instanceof change_1.InsertChange) {
|
|
101
|
-
importRecorder.insertLeft(change.pos, change.toAdd);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
host.commitUpdate(importRecorder);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function default_1(options) {
|
|
108
|
-
return async (host) => {
|
|
109
|
-
var _a;
|
|
110
|
-
console.log(`Generating Decaf custom component schematic...`);
|
|
111
|
-
const workspace = await (0, workspace_1.getWorkspace)(host);
|
|
112
|
-
const project = workspace.projects.get(options.project);
|
|
113
|
-
if (!project) {
|
|
114
|
-
throw new schematics_1.SchematicsException(`Project "${options.project}" does not exist.`);
|
|
115
|
-
}
|
|
116
|
-
if (project && options.path === undefined) {
|
|
117
|
-
options.path = (0, workspace_1.buildDefaultPath)(project);
|
|
118
|
-
}
|
|
119
|
-
const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
|
|
120
|
-
options.name = parsedPath.name;
|
|
121
|
-
options.path = parsedPath.path;
|
|
122
|
-
options.selector = options.selector ? options.selector : (0, util_1.buildSelector)(options, (_a = project === null || project === void 0 ? void 0 : project.prefix) !== null && _a !== void 0 ? _a : 'app');
|
|
123
|
-
(0, validation_1.validateHtmlSelector)(options.selector);
|
|
124
|
-
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
125
|
-
options.spec ? (0, schematics_1.noop)() : (0, schematics_1.filter)((p) => !p.endsWith('.spec.ts.template')),
|
|
126
|
-
options.createModule ? (0, schematics_1.noop)() : (0, schematics_1.filter)((p) => !p.endsWith('.module.ts.template')),
|
|
127
|
-
(0, schematics_1.applyTemplates)({
|
|
128
|
-
...core_1.strings,
|
|
129
|
-
'if-flat': (s) => (options.flat ? '' : s),
|
|
130
|
-
...options,
|
|
131
|
-
}),
|
|
132
|
-
!options.type
|
|
133
|
-
? (0, schematics_1.forEach)(((file) => {
|
|
134
|
-
return file.path.includes('..')
|
|
135
|
-
? {
|
|
136
|
-
content: file.content,
|
|
137
|
-
path: file.path.replace('..', '.'),
|
|
138
|
-
}
|
|
139
|
-
: file;
|
|
140
|
-
}))
|
|
141
|
-
: (0, schematics_1.noop)(),
|
|
142
|
-
(0, schematics_1.move)(parsedPath.path),
|
|
143
|
-
]);
|
|
144
|
-
return (0, schematics_1.chain)([(0, schematics_1.branchAndMerge)((0, schematics_1.chain)([addImportToNgModule(options), (0, schematics_1.mergeWith)(templateSource)]))]);
|
|
145
|
-
};
|
|
146
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "DecafSchematicsAngularComponent",
|
|
4
|
-
"title": "@decaf-ts/for-angular Component Options Schema",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"path": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"format": "path",
|
|
10
|
-
"description": "The path to create the component",
|
|
11
|
-
"visible": false,
|
|
12
|
-
"$default": {
|
|
13
|
-
"$source": "workingDirectory"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"project": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "The name of the project",
|
|
19
|
-
"$default": {
|
|
20
|
-
"$source": "projectName"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"name": {
|
|
24
|
-
"type": "string",
|
|
25
|
-
"description": "The name of the component",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "argv",
|
|
28
|
-
"index": 0
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"prefix": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "The prefix to apply to generated selectors",
|
|
34
|
-
"alias": "p",
|
|
35
|
-
"oneOf": [
|
|
36
|
-
{
|
|
37
|
-
"maxLength": 0
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"minLength": 1,
|
|
41
|
-
"format": "html-selector"
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
"styleext": {
|
|
46
|
-
"type": "string",
|
|
47
|
-
"description": "The file extension of the style file for the component",
|
|
48
|
-
"default": "scss"
|
|
49
|
-
},
|
|
50
|
-
"style": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"description": "The file extension of the style file for the component",
|
|
53
|
-
"default": "scss"
|
|
54
|
-
},
|
|
55
|
-
"spec": {
|
|
56
|
-
"type": "boolean",
|
|
57
|
-
"description": "Specifies if a spec file is generated",
|
|
58
|
-
"default": false
|
|
59
|
-
},
|
|
60
|
-
"flat": {
|
|
61
|
-
"type": "boolean",
|
|
62
|
-
"description": "Flag to indicate if a dir is created",
|
|
63
|
-
"default": false
|
|
64
|
-
},
|
|
65
|
-
"selector": {
|
|
66
|
-
"type": "string",
|
|
67
|
-
"format": "html-selector",
|
|
68
|
-
"description": "The selector to use for the component"
|
|
69
|
-
},
|
|
70
|
-
"createModule": {
|
|
71
|
-
"type": "boolean",
|
|
72
|
-
"description": "Allows creating an NgModule for the component",
|
|
73
|
-
"default": false
|
|
74
|
-
},
|
|
75
|
-
"module": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"description": "Allows adding to an NgModule's imports or declarations"
|
|
78
|
-
},
|
|
79
|
-
"export": {
|
|
80
|
-
"type": "boolean",
|
|
81
|
-
"default": false,
|
|
82
|
-
"description": "When true, the declaring NgModule exports this component."
|
|
83
|
-
},
|
|
84
|
-
"entryComponent": {
|
|
85
|
-
"type": "boolean",
|
|
86
|
-
"default": false,
|
|
87
|
-
"description": "When true, the new component is the entry component of the declaring NgModule."
|
|
88
|
-
},
|
|
89
|
-
"type": {
|
|
90
|
-
"type": "string",
|
|
91
|
-
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
|
|
92
|
-
"default": "Component"
|
|
93
|
-
},
|
|
94
|
-
"standalone": {
|
|
95
|
-
"type": "boolean",
|
|
96
|
-
"description": "Specifies if the component should be standalone",
|
|
97
|
-
"default": true
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"required": []
|
|
101
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<app-header
|
|
2
|
-
[title]="title"
|
|
3
|
-
</app-header>
|
|
4
|
-
|
|
5
|
-
<ion-content [fullscreen]="true">
|
|
6
|
-
<main>
|
|
7
|
-
<app-container>
|
|
8
|
-
<ion-card>
|
|
9
|
-
<ion-card-content>
|
|
10
|
-
Page content goes here!
|
|
11
|
-
</ion-card-content>
|
|
12
|
-
</ion-card>
|
|
13
|
-
</app-container>
|
|
14
|
-
</main>
|
|
15
|
-
</ion-content>
|
|
File without changes
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { IonCard, IonCardContent, IonContent } from '@ionic/angular/standalone';
|
|
3
|
-
import { HeaderComponent } from 'src/app/components/header/header.component';
|
|
4
|
-
import { ContainerComponent } from 'src/app/components/container/container.component';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
standalone: true,
|
|
8
|
-
selector: 'app-<%= dasherize(name) %>',
|
|
9
|
-
templateUrl: './<%= dasherize(name) %>.page.html',
|
|
10
|
-
styleUrls: ['./<%= dasherize(name) %>.page.scss'],
|
|
11
|
-
imports: [HeaderComponent, ContainerComponent, IonContent, IonCard, IonCardContent]
|
|
12
|
-
})
|
|
13
|
-
export class <%= classify(name) %>Page implements OnInit {
|
|
14
|
-
|
|
15
|
-
constructor() {}
|
|
16
|
-
|
|
17
|
-
ngOnInit() {}
|
|
18
|
-
|
|
19
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.page = page;
|
|
4
|
-
const core_1 = require("@angular-devkit/core");
|
|
5
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
-
function addRouteToAppRoutes(options) {
|
|
7
|
-
return (tree) => {
|
|
8
|
-
// Skip route addition if requested
|
|
9
|
-
if (options.skipRoute) {
|
|
10
|
-
return tree;
|
|
11
|
-
}
|
|
12
|
-
const name = core_1.strings.dasherize(options.name);
|
|
13
|
-
const className = core_1.strings.classify(options.name) + 'Page';
|
|
14
|
-
const routePath = options.routePath || name;
|
|
15
|
-
const pagePath = options.path || 'src/app/pages';
|
|
16
|
-
// Path to app.routes.ts
|
|
17
|
-
const routesPath = 'src/app/app.routes.ts';
|
|
18
|
-
if (!tree.exists(routesPath)) {
|
|
19
|
-
console.warn(`Could not find ${routesPath}. Route not added.`);
|
|
20
|
-
return tree;
|
|
21
|
-
}
|
|
22
|
-
const routesContent = tree.read(routesPath).toString();
|
|
23
|
-
// Create the new route entry
|
|
24
|
-
const relativePath = `${pagePath}/${name}/${name}.page`.replace('src/app/', './');
|
|
25
|
-
const newRoute = ` {\n path: '${routePath}',\n loadComponent: () => import('${relativePath}').then( m => m.${className})\n }`;
|
|
26
|
-
// Find the position to insert the new route (before the last closing bracket)
|
|
27
|
-
const routesArrayMatch = routesContent.match(/export const routes: Routes = \[([\s\S]*)\];/);
|
|
28
|
-
if (!routesArrayMatch) {
|
|
29
|
-
console.warn('Could not parse routes array. Route not added.');
|
|
30
|
-
return tree;
|
|
31
|
-
}
|
|
32
|
-
const routesArrayContent = routesArrayMatch[1];
|
|
33
|
-
const lastRouteMatch = routesArrayContent.trim().match(/.*\}(?!.*\})/s);
|
|
34
|
-
let updatedContent;
|
|
35
|
-
if (lastRouteMatch) {
|
|
36
|
-
// Add comma after the last route and insert new route
|
|
37
|
-
const insertPosition = routesContent.lastIndexOf('}', routesContent.lastIndexOf('];'));
|
|
38
|
-
updatedContent = routesContent.slice(0, insertPosition + 1) +
|
|
39
|
-
',\n' + newRoute +
|
|
40
|
-
routesContent.slice(insertPosition + 1);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
// Empty routes array, just add the route
|
|
44
|
-
const insertPosition = routesContent.indexOf('[') + 1;
|
|
45
|
-
updatedContent = routesContent.slice(0, insertPosition) +
|
|
46
|
-
'\n' + newRoute + '\n' +
|
|
47
|
-
routesContent.slice(insertPosition);
|
|
48
|
-
}
|
|
49
|
-
tree.overwrite(routesPath, updatedContent);
|
|
50
|
-
console.log(`Route added to ${routesPath}: ${routePath} -> ${className}`);
|
|
51
|
-
return tree;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function page(options) {
|
|
55
|
-
return () => {
|
|
56
|
-
const name = core_1.strings.dasherize(options.name);
|
|
57
|
-
const path = options.path || 'src/app/pages';
|
|
58
|
-
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
59
|
-
(0, schematics_1.applyTemplates)({
|
|
60
|
-
...core_1.strings,
|
|
61
|
-
...options,
|
|
62
|
-
name,
|
|
63
|
-
}),
|
|
64
|
-
(0, schematics_1.move)(`${path}/${name}`),
|
|
65
|
-
]);
|
|
66
|
-
return (0, schematics_1.chain)([
|
|
67
|
-
(0, schematics_1.mergeWith)(templateSource),
|
|
68
|
-
addRouteToAppRoutes(options)
|
|
69
|
-
]);
|
|
70
|
-
};
|
|
71
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "SchematicsDecafIonicAngularPage",
|
|
4
|
-
"title": "@ionic/angular Page Options Schema",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"path": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"format": "path",
|
|
10
|
-
"description": "The path to create the page",
|
|
11
|
-
"visible": false,
|
|
12
|
-
"$default": {
|
|
13
|
-
"$source": "workingDirectory"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"project": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "The name of the project",
|
|
19
|
-
"$default": {
|
|
20
|
-
"$source": "projectName"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"name": {
|
|
24
|
-
"type": "string",
|
|
25
|
-
"description": "The name of the page",
|
|
26
|
-
"$default": {
|
|
27
|
-
"$source": "argv",
|
|
28
|
-
"index": 0
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"prefix": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "The prefix to apply to generated selectors",
|
|
34
|
-
"alias": "p",
|
|
35
|
-
"oneOf": [
|
|
36
|
-
{
|
|
37
|
-
"maxLength": 0
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"minLength": 1,
|
|
41
|
-
"format": "html-selector"
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
"styleext": {
|
|
46
|
-
"type": "string",
|
|
47
|
-
"description": "The file extension of the style file for the page",
|
|
48
|
-
"default": "scss"
|
|
49
|
-
},
|
|
50
|
-
"spec": {
|
|
51
|
-
"type": "boolean",
|
|
52
|
-
"description": "Specifies if a spec file is generated",
|
|
53
|
-
"default": false
|
|
54
|
-
},
|
|
55
|
-
"flat": {
|
|
56
|
-
"type": "boolean",
|
|
57
|
-
"description": "Flag to indicate if a dir is created",
|
|
58
|
-
"default": false
|
|
59
|
-
},
|
|
60
|
-
"selector": {
|
|
61
|
-
"type": "string",
|
|
62
|
-
"format": "html-selector",
|
|
63
|
-
"description": "The selector to use for the page"
|
|
64
|
-
},
|
|
65
|
-
"module": {
|
|
66
|
-
"type": "string",
|
|
67
|
-
"description": "Allows specification of the declaring module",
|
|
68
|
-
"alias": "m"
|
|
69
|
-
},
|
|
70
|
-
"routePath": {
|
|
71
|
-
"type": "string",
|
|
72
|
-
"description": "The path to use for the route of the page (defaults to page name)",
|
|
73
|
-
"default": ""
|
|
74
|
-
},
|
|
75
|
-
"skipRoute": {
|
|
76
|
-
"type": "boolean",
|
|
77
|
-
"description": "Skip adding the route to app.routes.ts",
|
|
78
|
-
"default": false
|
|
79
|
-
},
|
|
80
|
-
"standalone": {
|
|
81
|
-
"type": "boolean",
|
|
82
|
-
"description": "Specifies if the page should be standalone",
|
|
83
|
-
"default": true
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"required": []
|
|
87
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.test = test;
|
|
4
|
-
// You don't have to export the function as default. You can also have more than one rule factory
|
|
5
|
-
// per file.
|
|
6
|
-
function test(_options) {
|
|
7
|
-
return (tree, _context) => {
|
|
8
|
-
console.log("Testing Decaf sample schematics...");
|
|
9
|
-
return tree;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
|
-
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const collectionPath = path.join(__dirname, '../collection.json');
|
|
7
|
-
describe('schematics', () => {
|
|
8
|
-
it('works', async () => {
|
|
9
|
-
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
10
|
-
const tree = await runner.runSchematic('main', {}, schematics_1.Tree.empty());
|
|
11
|
-
expect(tree.files).toEqual([]);
|
|
12
|
-
});
|
|
13
|
-
});
|