{"_id":"@12luckydev/ng-essentials-services","_rev":"5-2de1ec7020a5e1501bcdfa21e77da3a6","name":"@12luckydev/ng-essentials-services","dist-tags":{"latest":"2.0.0"},"versions":{"0.0.1":{"name":"@12luckydev/ng-essentials-services","version":"0.0.1","_id":"@12luckydev/ng-essentials-services@0.0.1","maintainers":[{"name":"12luckydev","email":"12luckydev@gmail.com"}],"dist":{"shasum":"2bfc40505ac7ee6d84b88eed86d1467749ffc67e","tarball":"https://registry.npmjs.org/@12luckydev/ng-essentials-services/-/ng-essentials-services-0.0.1.tgz","fileCount":27,"integrity":"sha512-pedif/LAS7N+oTYMZzDosyqTYjNa0j3I7orZvK6Cr1f/wFtvhqF5piGNNMxN17SF6W1qDNfHwxJP1yBNQ06whA==","signatures":[{"sig":"MEQCIAWtcjf43woVooka+VTdajdcM8lYHs4tZ2e8HklxVE8PAiBC98/+q4Iv/X1cjSPm+rS3280PR3QU9LhMhIs78QB7+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41791},"module":"fesm2022/12luckydev-ng-essentials-services.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/12luckydev-ng-essentials-services.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"27be1f20249a10176272ee7fd93b785b24705717","typings":"index.d.ts","_npmUser":{"name":"12luckydev","email":"12luckydev@gmail.com"},"_npmVersion":"10.9.2","description":"This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.","directories":{},"sideEffects":false,"_nodeVersion":"22.2.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":">=17.0.0","@angular/common":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-essentials-services_0.0.1_1744974042484_0.5035057808148187","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@12luckydev/ng-essentials-services","version":"0.0.2","_id":"@12luckydev/ng-essentials-services@0.0.2","maintainers":[{"name":"12luckydev","email":"12luckydev@gmail.com"}],"dist":{"shasum":"92547a5a1c96927a3039df89a1e97d6b9b4a68a7","tarball":"https://registry.npmjs.org/@12luckydev/ng-essentials-services/-/ng-essentials-services-0.0.2.tgz","fileCount":27,"integrity":"sha512-X7KteFEQD0xmpIAHLA6BbdZKKnsuBrL3elQa+E5VjwSO06RH/LItXxYE8ej1lNkQNvUqVn4y8LT0FF9zyPDIXQ==","signatures":[{"sig":"MEUCIQCVoobf0EM/3IId+rdtV6ZQf1QI3ZHQTi6ETNxwLVZwKgIgXEa38uZP/x4f0WZoELMT3LJoYIqh3X0RyyNw7pojyyY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41791},"module":"fesm2022/12luckydev-ng-essentials-services.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/12luckydev-ng-essentials-services.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"2e339e42756c7283194b53df568875d1b44b11a3","typings":"index.d.ts","_npmUser":{"name":"12luckydev","email":"12luckydev@gmail.com"},"_npmVersion":"10.9.2","description":"This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.","directories":{},"sideEffects":false,"_nodeVersion":"22.2.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":">=17.0.0","@angular/common":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-essentials-services_0.0.2_1744976383468_0.8551054647467797","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@12luckydev/ng-essentials-services","version":"0.0.3","_id":"@12luckydev/ng-essentials-services@0.0.3","maintainers":[{"name":"12luckydev","email":"12luckydev@gmail.com"}],"dist":{"shasum":"4856a03916226df9d440090ebaa18d3c6de67c54","tarball":"https://registry.npmjs.org/@12luckydev/ng-essentials-services/-/ng-essentials-services-0.0.3.tgz","fileCount":27,"integrity":"sha512-dVXWknEbgHE/IZy9C8/HW6ReiEQJDrgr11XFdvbXYc7ruDqzK32hnpq/aFOy+IaVZwi1+Fywdu6KbfJyiyHRfA==","signatures":[{"sig":"MEQCID4wScDlPNPlgeaGcWmSZpJvczKKeYpB1MjgdUuxjF1MAiAgjPV3t4H93og6vwWsRFm2fHgK/5o4j7gpp5keDDJL6g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44931},"module":"fesm2022/12luckydev-ng-essentials-services.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/12luckydev-ng-essentials-services.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"33c5b070a7edfaf33eb059aa6e053c90542a219e","typings":"index.d.ts","_npmUser":{"name":"12luckydev","email":"12luckydev@gmail.com"},"_npmVersion":"10.9.2","description":"Collection of abstract classes to build 'smart' services for toasts, info and confirm dialogs. Makes it easier to use these features with internationalization","directories":{},"sideEffects":false,"_nodeVersion":"22.2.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":">=17.0.0","@angular/common":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-essentials-services_0.0.3_1744976635567_0.23711106768121315","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@12luckydev/ng-essentials-services","version":"1.0.0","_id":"@12luckydev/ng-essentials-services@1.0.0","maintainers":[{"name":"12luckydev","email":"12luckydev@gmail.com"}],"dist":{"shasum":"94c3891479a86cb0a9bcaaf04d8299b70b9718c9","tarball":"https://registry.npmjs.org/@12luckydev/ng-essentials-services/-/ng-essentials-services-1.0.0.tgz","fileCount":27,"integrity":"sha512-UqMlX4ZCScn0lgN9voZugEzLpe2Q9OZm7R2kPsLR4Xo8YGy18z1H1GlIiFXW5id8nTK8uIuXTnEp3TLkMFbUjQ==","signatures":[{"sig":"MEQCIGWOIpuodlnpG7r3IVKKVfGRua/YdAgMy7g+MvLiws8ZAiB5gJLYO27nOKG7QxmBL4qWGOJCySp/4jYbPN5rCu9g8w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52577},"module":"fesm2022/12luckydev-ng-essentials-services.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/12luckydev-ng-essentials-services.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"5219e2fc1c6ffa38e8485c4f5409a2d745bf109a","typings":"index.d.ts","_npmUser":{"name":"12luckydev","email":"12luckydev@gmail.com"},"_npmVersion":"10.9.2","description":"Collection of abstract classes to build 'smart' services for toasts, info and confirm dialogs. Makes it easier to use these features with internationalization","directories":{},"sideEffects":false,"_nodeVersion":"22.2.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"rxjs":">=7.4.0","@angular/core":">=17.0.0","@angular/common":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-essentials-services_1.0.0_1744998454947_0.2990102601983211","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@12luckydev/ng-essentials-services","version":"2.0.0","peerDependencies":{"@angular/common":">=17.0.0","@angular/core":">=17.0.0","rxjs":">=7.4.0"},"dependencies":{"tslib":"^2.3.0"},"sideEffects":false,"module":"fesm2022/12luckydev-ng-essentials-services.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/12luckydev-ng-essentials-services.mjs"}},"_id":"@12luckydev/ng-essentials-services@2.0.0","gitHead":"d8d8a9f940c4c91d620aef80b75f49433863881b","description":"Collection of abstract classes to build 'smart' services for toasts, info and confirm dialogs. Makes it easier to use these features with internationalization. Assuming that your dialogs and toasts always have a title and a message :D.","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-4s6R5zoMa6xUYH7Z9UuKRGiDQmJD3karyxRpsQFtSxyBNnDvd6sdMHYF9ZlpLBDz1SVckXkAF3nRmOWzB4DqKQ==","shasum":"4bd5c1cb73d799d95f33e63d7742b01fb560c5a9","tarball":"https://registry.npmjs.org/@12luckydev/ng-essentials-services/-/ng-essentials-services-2.0.0.tgz","fileCount":32,"unpackedSize":55665,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIENHX5qplOVLCDGimnKiymCrvysgmPL+3WZJge4tnBJuAiBhgx4owFboKMyn1T0Pi31VOQVIed3r17hd6L2Ihu7gJA=="}]},"_npmUser":{"name":"12luckydev","email":"12luckydev@gmail.com"},"directories":{},"maintainers":[{"name":"12luckydev","email":"12luckydev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ng-essentials-services_2.0.0_1754389847691_0.8825094285259267"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-18T11:00:42.398Z","modified":"2025-08-05T10:30:48.050Z","0.0.1":"2025-04-18T11:00:42.657Z","0.0.2":"2025-04-18T11:39:43.646Z","0.0.3":"2025-04-18T11:43:55.764Z","1.0.0":"2025-04-18T17:47:35.137Z","2.0.0":"2025-08-05T10:30:47.899Z"},"description":"Collection of abstract classes to build 'smart' services for toasts, info and confirm dialogs. Makes it easier to use these features with internationalization. Assuming that your dialogs and toasts always have a title and a message :D.","maintainers":[{"name":"12luckydev","email":"12luckydev@gmail.com"}],"readme":"# @12luckydev/ng-essentials-services\r\n\r\nCollection of abstract classes to build 'smart' services for toasts, info and confirm dialogs. Makes it easier to use these features with internationalization. Assuming that your dialogs and toasts always have a title and a message :D.\r\n\r\nWhat do i mean by 'smart'?\r\nInstead of providing e.g. for Toast the title and message body text, you can provide only the primary key for the translation.\r\n\r\nSo instead od this:\r\n\r\n```javascript\r\nthis._toastService.success(\"COMMON.SUCCESS.TITLE\", \"COMMON.SUCCESS.MESSAGE\");\r\n```\r\n\r\nYou can use that:\r\n\r\n```javascript\r\nthis._toastService.smartSuccess(\"COMMON.SUCCESS\");\r\n```\r\n\r\n'Smart' method will add 'TITLE' and 'MESSAGE' (or any other values ​​depending on the configuration) to primary key and pass it to orginal success method.\r\n\r\n## Configuration\r\n\r\nThe passed parameters \"title\" and \"message\" in the 'toast', 'info' and 'confirm' subobjects are more important than those passed in the root of config object.\r\n\r\n```javascript\r\nimport { provideNgEssentialsServices } from \"@12luckydev/ng-essentials-services\";\r\n\r\nproviders: [\r\n  provideNgEssentialsServices({\r\n    title: \"title\",\r\n    message: \"message\",\r\n    toast: {\r\n      success: \"success\",\r\n      error: \"error\",\r\n    },\r\n  }),\r\n];\r\n```\r\n\r\nOR\r\n\r\n```javascript\r\nimport { NG_ESSENTIALS_SERVICES, buildFullSettings } from \"@12luckydev/ng-essentials-services\";\r\n\r\nproviders: [\r\n  {\r\n    provide: NG_ESSENTIALS_SERVICES,\r\n    useFactory: () =>\r\n      buildFullSettings({\r\n        title: \"title\",\r\n        message: \"message\",\r\n        toast: {\r\n          success: \"success\",\r\n          error: \"error\",\r\n        },\r\n      }),\r\n  },\r\n];\r\n```\r\n\r\nbuildFullSettings function will build full settings model based on provided partial model.\r\n\r\n## Contexted service\r\n\r\nThanks to context services, calls with long keys do not take up half the screen :)\r\n\r\n```javascript\r\nclass Component{\r\n    private _toastService = inject(ToastService);\r\n\r\n    showToast(){\r\n        this._toastService.success(\"VERY.LONG.I18N.KEY.COMMON.SUCCESS.TITLE\", \"VERY.LONG.I18N.KEY.COMMON.SUCCESS.MESSAGE\");\r\n    }\r\n\r\n    private _contextedToastService = inject(ToastService).withContext(\"VERY.LONG.I18N.KEY.COMMON\");\r\n\r\n    showContextedToast(){\r\n        this._contextedToastService.success(\"SUCCESS.TITLE\", \"SUCCESS.MESSAGE\");\r\n        // or even shorter\r\n        this._contextedToastService.smartSuccess(\"SUCCESS\");\r\n\r\n    }\r\n}\r\n```\r\n\r\n## Toast service base\r\n\r\n| Abstraction name        | Description                                                                                                      |\r\n| ----------------------- | ---------------------------------------------------------------------------------------------------------------- |\r\n| `ToastBaseMethods`      | Interface with methods definitions for toasts service                                                            |\r\n| `ToastBase`             | Base class with smart methods implementation                                                                     |\r\n| `ContextedToastService` | A class that contains the context and passes it to the base class. Useful for services that support translations |\r\n| `ToastBaseWithContext`  | Base class with smart methods implementation and context support                                                 |\r\n\r\n## Confirm Dialog service base\r\n\r\n| Abstraction name                | Description                                                                                                      |\r\n| ------------------------------- | ---------------------------------------------------------------------------------------------------------------- |\r\n| `ConfirmDialogBaseMethods`      | Interface with methods definitions for confirm dialog service                                                    |\r\n| `ConfirmDialogBase`             | Base class with smart methods implementation                                                                     |\r\n| `ContextedConfirmDialogService` | A class that contains the context and passes it to the base class. Useful for services that support translations |\r\n| `ConfirmDialogBaseWithContext`  | Base class with smart methods implementation and context support                                                 |\r\n\r\n## Info Dialog service base\r\n\r\n| Abstraction name             | Description                                                                                                      |\r\n| ---------------------------- | ---------------------------------------------------------------------------------------------------------------- |\r\n| `InfoDialogBaseMethods`      | Interface with methods definitions for info dialog service                                                       |\r\n| `InfoDialogBase`             | Base class with smart methods implementation                                                                     |\r\n| `ContextedInfoDialogService` | A class that contains the context and passes it to the base class. Useful for services that support translations |\r\n| `InfoDialogBaseWithContext`  | Base class with smart methods implementation and context support                                                 |\r\n","readmeFilename":"README.md"}