unipo-ui 1.4.0 → 1.5.0

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 (70) hide show
  1. package/dist/{EditorBlok-CarZErBW.d.cts → LembarSurat-CShVDBwp.d.cts} +67 -3
  2. package/dist/{EditorBlok-CarZErBW.d.ts → LembarSurat-CShVDBwp.d.ts} +67 -3
  3. package/dist/{chunk-BCHB7R6D.cjs → chunk-4YZB47GC.cjs} +421 -9
  4. package/dist/chunk-4YZB47GC.cjs.map +1 -0
  5. package/dist/chunk-5BRCBOYC.cjs +2550 -0
  6. package/dist/chunk-5BRCBOYC.cjs.map +1 -0
  7. package/dist/{chunk-DHQFANBE.js → chunk-5T2FWP5A.js} +57 -444
  8. package/dist/chunk-5T2FWP5A.js.map +1 -0
  9. package/dist/{chunk-QHVQ6R55.cjs → chunk-AYBCFK4E.cjs} +51 -51
  10. package/dist/{chunk-QHVQ6R55.cjs.map → chunk-AYBCFK4E.cjs.map} +1 -1
  11. package/dist/{chunk-PYMN25WD.js → chunk-CM4EFDV7.js} +4 -4
  12. package/dist/{chunk-PYMN25WD.js.map → chunk-CM4EFDV7.js.map} +1 -1
  13. package/dist/{chunk-CIVK5JDV.cjs → chunk-FK24GBNJ.cjs} +4 -4
  14. package/dist/{chunk-CIVK5JDV.cjs.map → chunk-FK24GBNJ.cjs.map} +1 -1
  15. package/dist/{chunk-NCRYPHOJ.cjs → chunk-HGQGB7ET.cjs} +115 -115
  16. package/dist/{chunk-NCRYPHOJ.cjs.map → chunk-HGQGB7ET.cjs.map} +1 -1
  17. package/dist/{chunk-UA6AUXMY.js → chunk-ITIQ2IHX.js} +3 -3
  18. package/dist/{chunk-UA6AUXMY.js.map → chunk-ITIQ2IHX.js.map} +1 -1
  19. package/dist/{chunk-PC4G2C4M.js → chunk-KF7SZPEH.js} +4 -4
  20. package/dist/{chunk-PC4G2C4M.js.map → chunk-KF7SZPEH.js.map} +1 -1
  21. package/dist/chunk-NA23226U.js +2475 -0
  22. package/dist/chunk-NA23226U.js.map +1 -0
  23. package/dist/{chunk-PYYLKWNZ.js → chunk-OLQKRLWL.js} +395 -10
  24. package/dist/chunk-OLQKRLWL.js.map +1 -0
  25. package/dist/{chunk-TITKMSUS.cjs → chunk-UC2H3PKQ.cjs} +122 -536
  26. package/dist/chunk-UC2H3PKQ.cjs.map +1 -0
  27. package/dist/editor.cjs +831 -1888
  28. package/dist/editor.cjs.map +1 -1
  29. package/dist/editor.d.cts +269 -3
  30. package/dist/editor.d.ts +269 -3
  31. package/dist/editor.js +586 -1834
  32. package/dist/editor.js.map +1 -1
  33. package/dist/index.cjs +266 -266
  34. package/dist/index.js +6 -6
  35. package/dist/katalog.cjs +103 -103
  36. package/dist/katalog.js +4 -4
  37. package/dist/registry.json +256 -4
  38. package/dist/scss/components/_dokumen.scss +850 -0
  39. package/dist/scss/index.scss +1 -0
  40. package/dist/siakad.cjs +1359 -804
  41. package/dist/siakad.cjs.map +1 -1
  42. package/dist/siakad.d.cts +153 -3
  43. package/dist/siakad.d.ts +153 -3
  44. package/dist/siakad.js +558 -12
  45. package/dist/siakad.js.map +1 -1
  46. package/dist/ui-unipo.css +988 -0
  47. package/dist/ui-unipo.min.css +1 -1
  48. package/package.json +2 -2
  49. package/src/editor/EditorBlok.tsx +5 -3
  50. package/src/editor/Penyisip.tsx +3 -2
  51. package/src/editor/blok/Teks.tsx +2 -1
  52. package/src/editor/dokumen/EditorDokumen.tsx +323 -0
  53. package/src/editor/dokumen/EditorSkripsi.tsx +681 -0
  54. package/src/editor/dokumen/EditorTemplatSurat.tsx +194 -0
  55. package/src/editor/dokumen/LembarSurat.tsx +168 -0
  56. package/src/editor/dokumen/index.ts +8 -0
  57. package/src/editor/dokumen/pustaka.ts +118 -0
  58. package/src/editor/dokumen/saring.ts +92 -0
  59. package/src/editor/dokumen/sisip.ts +42 -0
  60. package/src/editor/dokumen/templat.ts +73 -0
  61. package/src/editor/index.ts +1 -0
  62. package/src/editor/konteks.tsx +3 -0
  63. package/src/editor/tipe.ts +102 -32
  64. package/src/siakad/index.ts +1 -0
  65. package/src/siakad/status-layanan.tsx +75 -1
  66. package/src/siakad/surat.tsx +759 -0
  67. package/dist/chunk-BCHB7R6D.cjs.map +0 -1
  68. package/dist/chunk-DHQFANBE.js.map +0 -1
  69. package/dist/chunk-PYYLKWNZ.js.map +0 -1
  70. package/dist/chunk-TITKMSUS.cjs.map +0 -1
@@ -42,7 +42,11 @@ declare const hitungKata: (daftar: Blok[]) => number;
42
42
  declare function cariBlok(daftar: Blok[], id: string): Blok | null;
43
43
  /** Ganti satu blok (di tingkat mana pun) lewat fungsi. */
44
44
  declare function ubahBlok(daftar: Blok[], id: string, f: (b: Blok) => Blok): Blok[];
45
- /** Ubah isi HTML konten lama (sebelum ada editor blok) menjadi blok supaya bisa disunting. */
45
+ /**
46
+ * HTML ke blok. Mengenali kembali HTML `ub-*` hasil blokKeHtml (perataan, paragraf pembuka, kolom, tabel, sorotan,
47
+ * spasi, tombol, galeri, berkas, akordion), jadi isi surat/templat yang disimpan server bisa disunting ulang tanpa
48
+ * kehilangan tata letak. HTML lain (impor lama) diubah sebaik mungkin.
49
+ */
46
50
  declare function htmlKeBlok(html?: string | null): Blok[];
47
51
  /** Semua blok (termasuk anak kolom) yang memenuhi syarat. */
48
52
  declare function cariSemua(daftar: Blok[], syarat: (b: Blok) => boolean): Blok[];
@@ -86,6 +90,8 @@ interface KonteksEditor {
86
90
  pilihMedia: (opsi?: OpsiPilihMedia) => Promise<MediaEditor[] | null>;
87
91
  pola: PolaBlok[] | undefined;
88
92
  baca: boolean;
93
+ /** Tipe blok yang boleh disisipkan (bawaan semua). */
94
+ tipe?: TipeBlok[];
89
95
  }
90
96
  declare const useEditor: () => KonteksEditor;
91
97
 
@@ -143,6 +149,8 @@ interface EditorBlokProps {
143
149
  kepala?: React.ReactNode;
144
150
  /** Mode baca: tanpa bilah, tidak bisa diketik. */
145
151
  baca?: boolean;
152
+ /** Batasi tipe blok yang bisa disisipkan, mis. untuk surat. */
153
+ tipe?: TipeBlok[];
146
154
  className?: string;
147
155
  }
148
156
  /**
@@ -150,6 +158,62 @@ interface EditorBlokProps {
150
158
  * seret untuk memindah, bilah format (tebal, miring, tautan, sorot, kode), dan Ctrl+Z / Ctrl+Shift+Z.
151
159
  * Format blok sama dengan Blok.php di SIAKAD.
152
160
  */
153
- declare function EditorBlok({ blok, set, urung, ulang, pilih: pilihProp, setPilih: setPilihProp, pilihMedia: pilihMediaProp, unggah, sumberMedia, pola, kepala, baca, className }: EditorBlokProps): React.JSX.Element;
161
+ declare function EditorBlok({ blok, set, urung, ulang, pilih: pilihProp, setPilih: setPilihProp, pilihMedia: pilihMediaProp, unggah, sumberMedia, pola, kepala, baca, tipe, className }: EditorBlokProps): React.JSX.Element;
162
+
163
+ type UkuranKertas = 'a4' | 'f4' | 'letter';
164
+ /** Kop surat: logo, nama instansi, unit, dan alamat. */
165
+ interface KopSurat {
166
+ logo?: string;
167
+ instansi: string;
168
+ /** Unit pengirim, mis. "Fakultas Teknik". */
169
+ unit?: string;
170
+ alamat?: string;
171
+ /** Telepon, surel, situs dalam satu baris. */
172
+ kontak?: string;
173
+ }
174
+ interface TujuanSurat {
175
+ nama: string;
176
+ jabatan?: string | null;
177
+ instansi?: string | null;
178
+ alamat?: string | null;
179
+ tembusan?: boolean;
180
+ }
181
+ interface PenandatanganSurat {
182
+ jabatan: string;
183
+ nama: string;
184
+ /** NIP/NIDN/NIK, ditulis apa adanya, mis. "NIDN 0912078501". */
185
+ nomorInduk?: string;
186
+ /** Gambar tanda tangan atau QR tanda tangan elektronik. */
187
+ ttd?: string;
188
+ /** Tautan cek keaslian (GET /v1/arsip/verifikasi/{kode}); tampil di bawah tanda tangan. */
189
+ verifikasi?: string;
190
+ }
191
+ interface LembarSuratProps {
192
+ kop?: KopSurat | React.ReactNode;
193
+ nomor?: string | null;
194
+ lampiran?: string | null;
195
+ perihal?: string | null;
196
+ sifat?: string | null;
197
+ /** Tanggal surat (YYYY-MM-DD) atau teks jadi. */
198
+ tanggal?: string | Date | null;
199
+ /** Tempat di depan tanggal, mis. "Marisa". */
200
+ tempat?: string;
201
+ tujuan?: TujuanSurat[] | React.ReactNode;
202
+ /** Isi surat (HTML). Disaring seperti server sebelum ditampilkan. */
203
+ isi: string;
204
+ penandatangan?: PenandatanganSurat;
205
+ /** Daftar tembusan; tanpa ini diambil dari `tujuan` yang bertanda tembusan. */
206
+ tembusan?: string[];
207
+ kertas?: UkuranKertas;
208
+ /** Tampilkan bayangan kertas di layar (bawaan true). Saat dicetak selalu polos. */
209
+ bayangan?: boolean;
210
+ className?: string;
211
+ }
212
+ /**
213
+ * Satu lembar surat dinas siap cetak: kop, nomor/lampiran/perihal, tanggal, tujuan, isi, tanda tangan, dan
214
+ * tembusan. Ukuran kertas A4/F4/Letter dengan margin surat dinas; `window.print()` mencetak lembarnya saja bila
215
+ * dibungkus `.u-cetak-saja` (lihat dokumentasi).
216
+ */
217
+ declare function LembarSurat({ kop, nomor, lampiran, perihal, sifat, tanggal, tempat, tujuan, isi, penandatangan, tembusan, kertas, bayangan, className }: LembarSuratProps): React.JSX.Element;
154
218
 
155
- export { type Blok as B, DEF as D, EditorBlok as E, type Grup as G, type MediaEditor as M, type OpsiPilihMedia as O, type PolaBlok as P, RASIO as R, type SumberMedia as S, type TipeBlok as T, URUTAN_GRUP as U, type PilihMedia as a, type DefBlok as b, type EditorBlokProps as c, type MintaFokus as d, baru as e, cariBlok as f, cariSemua as g, hitungKata as h, htmlKeBlok as i, idBaru as j, useEditor as k, usePemilihMediaBawaan as l, useRiwayatBlok as m, rapikan as r, salinBaru as s, teksBlok as t, ubahBlok as u };
219
+ export { type Blok as B, DEF as D, EditorBlok as E, type Grup as G, type KopSurat as K, LembarSurat as L, type MediaEditor as M, type OpsiPilihMedia as O, type PolaBlok as P, RASIO as R, type SumberMedia as S, type TipeBlok as T, type UkuranKertas as U, type PilihMedia as a, type PenandatanganSurat as b, type DefBlok as c, type EditorBlokProps as d, type LembarSuratProps as e, type MintaFokus as f, type TujuanSurat as g, URUTAN_GRUP as h, baru as i, cariBlok as j, cariSemua as k, hitungKata as l, htmlKeBlok as m, idBaru as n, useEditor as o, usePemilihMediaBawaan as p, useRiwayatBlok as q, rapikan as r, salinBaru as s, teksBlok as t, ubahBlok as u };
@@ -42,7 +42,11 @@ declare const hitungKata: (daftar: Blok[]) => number;
42
42
  declare function cariBlok(daftar: Blok[], id: string): Blok | null;
43
43
  /** Ganti satu blok (di tingkat mana pun) lewat fungsi. */
44
44
  declare function ubahBlok(daftar: Blok[], id: string, f: (b: Blok) => Blok): Blok[];
45
- /** Ubah isi HTML konten lama (sebelum ada editor blok) menjadi blok supaya bisa disunting. */
45
+ /**
46
+ * HTML ke blok. Mengenali kembali HTML `ub-*` hasil blokKeHtml (perataan, paragraf pembuka, kolom, tabel, sorotan,
47
+ * spasi, tombol, galeri, berkas, akordion), jadi isi surat/templat yang disimpan server bisa disunting ulang tanpa
48
+ * kehilangan tata letak. HTML lain (impor lama) diubah sebaik mungkin.
49
+ */
46
50
  declare function htmlKeBlok(html?: string | null): Blok[];
47
51
  /** Semua blok (termasuk anak kolom) yang memenuhi syarat. */
48
52
  declare function cariSemua(daftar: Blok[], syarat: (b: Blok) => boolean): Blok[];
@@ -86,6 +90,8 @@ interface KonteksEditor {
86
90
  pilihMedia: (opsi?: OpsiPilihMedia) => Promise<MediaEditor[] | null>;
87
91
  pola: PolaBlok[] | undefined;
88
92
  baca: boolean;
93
+ /** Tipe blok yang boleh disisipkan (bawaan semua). */
94
+ tipe?: TipeBlok[];
89
95
  }
90
96
  declare const useEditor: () => KonteksEditor;
91
97
 
@@ -143,6 +149,8 @@ interface EditorBlokProps {
143
149
  kepala?: React.ReactNode;
144
150
  /** Mode baca: tanpa bilah, tidak bisa diketik. */
145
151
  baca?: boolean;
152
+ /** Batasi tipe blok yang bisa disisipkan, mis. untuk surat. */
153
+ tipe?: TipeBlok[];
146
154
  className?: string;
147
155
  }
148
156
  /**
@@ -150,6 +158,62 @@ interface EditorBlokProps {
150
158
  * seret untuk memindah, bilah format (tebal, miring, tautan, sorot, kode), dan Ctrl+Z / Ctrl+Shift+Z.
151
159
  * Format blok sama dengan Blok.php di SIAKAD.
152
160
  */
153
- declare function EditorBlok({ blok, set, urung, ulang, pilih: pilihProp, setPilih: setPilihProp, pilihMedia: pilihMediaProp, unggah, sumberMedia, pola, kepala, baca, className }: EditorBlokProps): React.JSX.Element;
161
+ declare function EditorBlok({ blok, set, urung, ulang, pilih: pilihProp, setPilih: setPilihProp, pilihMedia: pilihMediaProp, unggah, sumberMedia, pola, kepala, baca, tipe, className }: EditorBlokProps): React.JSX.Element;
162
+
163
+ type UkuranKertas = 'a4' | 'f4' | 'letter';
164
+ /** Kop surat: logo, nama instansi, unit, dan alamat. */
165
+ interface KopSurat {
166
+ logo?: string;
167
+ instansi: string;
168
+ /** Unit pengirim, mis. "Fakultas Teknik". */
169
+ unit?: string;
170
+ alamat?: string;
171
+ /** Telepon, surel, situs dalam satu baris. */
172
+ kontak?: string;
173
+ }
174
+ interface TujuanSurat {
175
+ nama: string;
176
+ jabatan?: string | null;
177
+ instansi?: string | null;
178
+ alamat?: string | null;
179
+ tembusan?: boolean;
180
+ }
181
+ interface PenandatanganSurat {
182
+ jabatan: string;
183
+ nama: string;
184
+ /** NIP/NIDN/NIK, ditulis apa adanya, mis. "NIDN 0912078501". */
185
+ nomorInduk?: string;
186
+ /** Gambar tanda tangan atau QR tanda tangan elektronik. */
187
+ ttd?: string;
188
+ /** Tautan cek keaslian (GET /v1/arsip/verifikasi/{kode}); tampil di bawah tanda tangan. */
189
+ verifikasi?: string;
190
+ }
191
+ interface LembarSuratProps {
192
+ kop?: KopSurat | React.ReactNode;
193
+ nomor?: string | null;
194
+ lampiran?: string | null;
195
+ perihal?: string | null;
196
+ sifat?: string | null;
197
+ /** Tanggal surat (YYYY-MM-DD) atau teks jadi. */
198
+ tanggal?: string | Date | null;
199
+ /** Tempat di depan tanggal, mis. "Marisa". */
200
+ tempat?: string;
201
+ tujuan?: TujuanSurat[] | React.ReactNode;
202
+ /** Isi surat (HTML). Disaring seperti server sebelum ditampilkan. */
203
+ isi: string;
204
+ penandatangan?: PenandatanganSurat;
205
+ /** Daftar tembusan; tanpa ini diambil dari `tujuan` yang bertanda tembusan. */
206
+ tembusan?: string[];
207
+ kertas?: UkuranKertas;
208
+ /** Tampilkan bayangan kertas di layar (bawaan true). Saat dicetak selalu polos. */
209
+ bayangan?: boolean;
210
+ className?: string;
211
+ }
212
+ /**
213
+ * Satu lembar surat dinas siap cetak: kop, nomor/lampiran/perihal, tanggal, tujuan, isi, tanda tangan, dan
214
+ * tembusan. Ukuran kertas A4/F4/Letter dengan margin surat dinas; `window.print()` mencetak lembarnya saja bila
215
+ * dibungkus `.u-cetak-saja` (lihat dokumentasi).
216
+ */
217
+ declare function LembarSurat({ kop, nomor, lampiran, perihal, sifat, tanggal, tempat, tujuan, isi, penandatangan, tembusan, kertas, bayangan, className }: LembarSuratProps): React.JSX.Element;
154
218
 
155
- export { type Blok as B, DEF as D, EditorBlok as E, type Grup as G, type MediaEditor as M, type OpsiPilihMedia as O, type PolaBlok as P, RASIO as R, type SumberMedia as S, type TipeBlok as T, URUTAN_GRUP as U, type PilihMedia as a, type DefBlok as b, type EditorBlokProps as c, type MintaFokus as d, baru as e, cariBlok as f, cariSemua as g, hitungKata as h, htmlKeBlok as i, idBaru as j, useEditor as k, usePemilihMediaBawaan as l, useRiwayatBlok as m, rapikan as r, salinBaru as s, teksBlok as t, ubahBlok as u };
219
+ export { type Blok as B, DEF as D, EditorBlok as E, type Grup as G, type KopSurat as K, LembarSurat as L, type MediaEditor as M, type OpsiPilihMedia as O, type PolaBlok as P, RASIO as R, type SumberMedia as S, type TipeBlok as T, type UkuranKertas as U, type PilihMedia as a, type PenandatanganSurat as b, type DefBlok as c, type EditorBlokProps as d, type LembarSuratProps as e, type MintaFokus as f, type TujuanSurat as g, URUTAN_GRUP as h, baru as i, cariBlok as j, cariSemua as k, hitungKata as l, htmlKeBlok as m, idBaru as n, useEditor as o, usePemilihMediaBawaan as p, useRiwayatBlok as q, rapikan as r, salinBaru as s, teksBlok as t, ubahBlok as u };