@shival99/z-ui 1.3.16 → 1.3.18

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.
Files changed (27) hide show
  1. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +5 -0
  2. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  3. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +8 -2
  4. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  5. package/fesm2022/shival99-z-ui-components-z-empty.mjs +1 -0
  6. package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-icon.mjs +2 -1
  8. package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-modal.mjs +8 -3
  10. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-services.mjs +20 -1
  12. package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/types/shival99-z-ui-components-z-breadcrumb.d.ts +2 -2
  15. package/types/shival99-z-ui-components-z-button.d.ts +1 -1
  16. package/types/shival99-z-ui-components-z-drawer.d.ts +1 -0
  17. package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +1 -1
  18. package/types/shival99-z-ui-components-z-editor.d.ts +1 -1
  19. package/types/shival99-z-ui-components-z-empty.d.ts +1 -1
  20. package/types/shival99-z-ui-components-z-filter.d.ts +1 -1
  21. package/types/shival99-z-ui-components-z-icon.d.ts +2 -1
  22. package/types/shival99-z-ui-components-z-input.d.ts +2 -2
  23. package/types/shival99-z-ui-components-z-modal.d.ts +2 -1
  24. package/types/shival99-z-ui-components-z-select.d.ts +2 -2
  25. package/types/shival99-z-ui-components-z-timeline.d.ts +6 -6
  26. package/types/shival99-z-ui-components-z-upload.d.ts +3 -3
  27. package/types/shival99-z-ui-services.d.ts +15 -1
@@ -1,6 +1,6 @@
1
1
  import { ZFormatNumExcelOptions } from '@shival99/z-ui/utils';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken } from '@angular/core';
3
+ import { Signal, InjectionToken } from '@angular/core';
4
4
  import { HttpHeaders, HttpContext, HttpParams, HttpClient } from '@angular/common/http';
5
5
  import { Router } from '@angular/router';
6
6
  import { Observable } from 'rxjs';
@@ -369,6 +369,20 @@ declare class ZTranslateService {
369
369
  use(lang: string): void;
370
370
  getLang(): string;
371
371
  instant(key: string, params?: Record<string, unknown>): string;
372
+ /**
373
+ * Returns a computed signal that automatically updates when language changes.
374
+ * Use this instead of instant() when you need reactive translations.
375
+ *
376
+ * @example
377
+ * ```typescript
378
+ * // In component
379
+ * protected readonly title = this._zTranslate.translate('my_title_key');
380
+ *
381
+ * // In template
382
+ * <h1>{{ title() }}</h1>
383
+ * ```
384
+ */
385
+ translate(key: string, params?: Record<string, unknown>): Signal<string>;
372
386
  get(key: string, params?: Record<string, unknown>): Promise<string>;
373
387
  get$(key: string, params?: Record<string, unknown>): Observable<string>;
374
388
  stream$(key: string, params?: Record<string, unknown>): Observable<string>;