@ucme-ui/angular 0.9.0 → 0.10.1

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/API.md CHANGED
@@ -15,7 +15,7 @@ yuvaları (slot). Kurulum ve genel kullanım için [README](README.md)'ye bakın
15
15
  ## İçindekiler
16
16
 
17
17
  - **Layout:** [hu-shell](#hu-shell) · [hu-breadcrumb](#hu-breadcrumb) · [hu-theme-toggle](#hu-theme-toggle) · [Grid](#grid)
18
- - **Form:** [hu-button](#hu-button) · [hu-button-group](#hu-button-group) · [huInput](#huinput) · [hu-form-field](#hu-form-field) · [hu-checkbox](#hu-checkbox) · [hu-switch](#hu-switch) · [hu-date-picker](#hu-date-picker) · [hu-editor](#hu-editor) · [hu-input-number](#hu-input-number) · [hu-select](#hu-select) · [hu-multi-select](#hu-multi-select) · [hu-password](#hu-password) · [huMask](#humask-inputmask) · [hu-radio-group](#hu-radio-group--hu-radio) · [hu-rating](#hu-rating) · [hu-file-upload](#hu-file-upload)
18
+ - **Form:** [hu-button](#hu-button) · [hu-button-group](#hu-button-group) · [huInput](#huinput) · [hu-form-field](#hu-form-field) · [hu-checkbox](#hu-checkbox) · [hu-switch](#hu-switch) · [hu-date-picker](#hu-date-picker) · [hu-editor](#hu-editor) · [hu-input-number](#hu-input-number) · [hu-select](#hu-select) · [hu-multi-select](#hu-multi-select) · [hu-password](#hu-password) · [huMask](#humask-inputmask) · [hu-radio-group](#hu-radio-group--hu-radio) · [hu-rating](#hu-rating) · [hu-file-upload](#hu-file-upload) · [hu-file-input](#hu-file-input)
19
19
  - **Tarih:** [hu-agenda](#hu-agenda) · [hu-calendar](#hu-calendar) · [tarih yardımcıları](#tarih-yardımcıları)
20
20
  - **Veri:** [hu-table](#hu-table) · [hu-paginator](#hu-paginator) · [hu-tabs](#hu-tabs--hu-tab) · [hu-stepper](#hu-stepper--hu-step) · [ContextMenu](#contextmenu-hucontextmenu) · [hu-card](#hu-card) · [hu-dropdown](#hu-dropdown)
21
21
  - **Geri bildirim:** [hu-dialog](#hu-dialog) · [ConfirmPopup](#confirmpopup-huconfirm) · [huTooltip](#hutooltip) · [HuToastService + hu-toaster](#hutoastservice--hu-toaster) · [hu-alert](#hu-alert) · [hu-badge](#hu-badge) · [hu-avatar](#hu-avatar) · [hu-spinner](#hu-spinner)
@@ -734,6 +734,61 @@ upload: HuFileUploader = (file, progress) =>
734
734
  <hu-file-upload multiple [uploader]="upload" (uploaded)="onUploaded($event.result)" />
735
735
  ```
736
736
 
737
+ ### hu-file-input
738
+
739
+ Tek dosyalık, satır biçiminde dosya alanı: etiket, seçilen dosya, "Dosya seç / Değiştir" ve "Kaldır".
740
+ Başvuru evrakı gibi belge listeleri için. Dosya satırın üzerine sürüklenebilir; satırın boş yerine
741
+ tıklamak da seçme penceresini açar. Değer `File`, sunucuda kayıtlı dosya için `HuStoredFile`
742
+ (`{ name, size?, url? }`) veya `null`'dır. `label` verilmezse huInput yüksekliğinde sade bir alana
743
+ dönüşür ve `hu-form-field` içinde kullanılır.
744
+
745
+ | Input | Tip | Varsayılan | Açıklama |
746
+ | --- | --- | --- | --- |
747
+ | `label` | `string` | — | Satırın etiketi. `hu-form-field` içinde vermeyin |
748
+ | `required` | `boolean` | `false` | Etikette yıldız (doğrulama için `Validators.required`) |
749
+ | `hint` | `string` | otomatik | Dosya yokken görünen bilgi; verilmezse `accept` ve boyuttan üretilir |
750
+ | `placeholder` | `string` | `'Dosya seçilmedi'` | Dosya yokken metin |
751
+ | `accept` | `string` | `''` | Kabul edilen türler: `'.pdf,.docx'` |
752
+ | `maxFileSize` | `number` (bayt) | `null` | En büyük boyut |
753
+ | `uploader` | `HuFileUploader` | `null` | Verilirse dosya seçilince yüklenir; alt kenarda ilerleme çubuğu, hata olursa "tekrar dene" |
754
+ | `removable` | `boolean` | `true` | Kaldır düğmesi |
755
+ | `browseLabel` / `changeLabel` | `string` | `'Dosya seç'` / `'Değiştir'` | Düğme metinleri |
756
+ | `disabled` | `boolean` | `false` | Devre dışı |
757
+
758
+ | Model | Tip | Varsayılan | Açıklama |
759
+ | --- | --- | --- | --- |
760
+ | `value` | `File \| HuStoredFile \| null` | `null` | Seçilen dosya (form kontrolü olarak da çalışır) |
761
+
762
+ | Output | Değer | Ne zaman |
763
+ | --- | --- | --- |
764
+ | `rejected` | `HuFileRejection` | Tür veya boyut kuralına uymayan dosya; mesaj satırın altında da gösterilir |
765
+ | `uploaded` | `{ file, result }` | `uploader` başarıyla bitince |
766
+ | `uploadError` | `{ file, error }` | `uploader` hata verince |
767
+ | `removed` | `File \| HuStoredFile` | Kullanıcı dosyayı kaldırınca |
768
+
769
+ Metotlar: `browse()`, `clear()`.
770
+
771
+ ```ts
772
+ form = this.fb.group({
773
+ // Düzenleme ekranında sunucudaki dosya; url verilirse ad indirme bağlantısı olur
774
+ summary: [{ name: 'basvuru-formu.pdf', size: 48640, url: '/files/12' } as HuFileInputValue, Validators.required],
775
+ decision: [null as HuFileInputValue],
776
+ });
777
+
778
+ // Gönderirken: File ise yeni seçildi, değilse sunucudaki dosya olduğu gibi kaldı
779
+ const { summary } = this.form.getRawValue();
780
+ if (summary instanceof File) body.append('summary', summary);
781
+ ```
782
+
783
+ ```html
784
+ <hu-file-input label="Proje başvuru formu" required accept=".pdf,.docx" formControlName="summary" />
785
+ <hu-file-input label="Destek mektubu" accept=".pdf" formControlName="decision" />
786
+
787
+ <hu-form-field label="Özgeçmiş">
788
+ <hu-file-input accept=".pdf" [(value)]="cv" />
789
+ </hu-form-field>
790
+ ```
791
+
737
792
  ---
738
793
 
739
794
  ## Tarih