limitng 0.24.2 → 0.24.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/fesm2022/limitng-alt-buyuk-kart.mjs +191 -37
- package/fesm2022/limitng-alt-buyuk-kart.mjs.map +1 -1
- package/fesm2022/limitng-alt-kucuk-kart.mjs +157 -32
- package/fesm2022/limitng-alt-kucuk-kart.mjs.map +1 -1
- package/fesm2022/limitng-api-models-bildirimler.mjs +41 -45
- package/fesm2022/limitng-api-models-bildirimler.mjs.map +1 -1
- package/fesm2022/limitng-api-models-enums.mjs +345 -350
- package/fesm2022/limitng-api-models-enums.mjs.map +1 -1
- package/fesm2022/limitng-api-models-fourDConstants.mjs +84 -88
- package/fesm2022/limitng-api-models-fourDConstants.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-izinislemleri-izindetaylari.mjs +25 -30
- package/fesm2022/limitng-api-models-kisisel-izinislemleri-izindetaylari.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-izinislemleri-izinfiltre.mjs +17 -22
- package/fesm2022/limitng-api-models-kisisel-izinislemleri-izinfiltre.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-izinislemleri-izinguncelle.mjs +0 -4
- package/fesm2022/limitng-api-models-kisisel-izinislemleri-izinliste.mjs +28 -32
- package/fesm2022/limitng-api-models-kisisel-izinislemleri-izinliste.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-izinislemleri.mjs +1 -5
- package/fesm2022/limitng-api-models-kisisel-izinislemleri.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri-masrafdetaylari.mjs +61 -66
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri-masrafdetaylari.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri-masraffiltre.mjs +18 -23
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri-masraffiltre.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri-masrafguncelle.mjs +0 -4
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri-masrafliste.mjs +47 -51
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri-masrafliste.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri.mjs +1 -5
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-onayislemleri-onaydetaylari.mjs +47 -51
- package/fesm2022/limitng-api-models-kisisel-onayislemleri-onaydetaylari.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-onayislemleri-onayfiltre.mjs +37 -42
- package/fesm2022/limitng-api-models-kisisel-onayislemleri-onayfiltre.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-onayislemleri-onayguncelle.mjs +11 -15
- package/fesm2022/limitng-api-models-kisisel-onayislemleri-onayguncelle.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-onayislemleri-onayliste.mjs +37 -41
- package/fesm2022/limitng-api-models-kisisel-onayislemleri-onayliste.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel-onayislemleri.mjs +1 -5
- package/fesm2022/limitng-api-models-kisisel-onayislemleri.mjs.map +1 -1
- package/fesm2022/limitng-api-models-kisisel.mjs +1 -5
- package/fesm2022/limitng-api-models-kisisel.mjs.map +1 -1
- package/fesm2022/limitng-api-models-logbook.mjs +130 -135
- package/fesm2022/limitng-api-models-logbook.mjs.map +1 -1
- package/fesm2022/limitng-api-models-login.mjs +61 -79
- package/fesm2022/limitng-api-models-login.mjs.map +1 -1
- package/fesm2022/limitng-api-models-onay-onayagonderdetaylari.mjs +57 -61
- package/fesm2022/limitng-api-models-onay-onayagonderdetaylari.mjs.map +1 -1
- package/fesm2022/limitng-api-models-onay-onaybilgi.mjs +0 -4
- package/fesm2022/limitng-api-models-onay.mjs +1 -5
- package/fesm2022/limitng-api-models-onay.mjs.map +1 -1
- package/fesm2022/limitng-api-models-ortak.mjs +169 -178
- package/fesm2022/limitng-api-models-ortak.mjs.map +1 -1
- package/fesm2022/limitng-api-models-ozet-ozetdata.mjs +0 -4
- package/fesm2022/limitng-api-models-ozet-ozetkartalan.mjs +0 -4
- package/fesm2022/limitng-api-models-ozet.mjs +1 -5
- package/fesm2022/limitng-api-models-ozet.mjs.map +1 -1
- package/fesm2022/limitng-api-models-raporlar-izinraporu-izinrapordetaylari.mjs +9 -13
- package/fesm2022/limitng-api-models-raporlar-izinraporu-izinrapordetaylari.mjs.map +1 -1
- package/fesm2022/limitng-api-models-raporlar-izinraporu-izinraporliste.mjs +21 -26
- package/fesm2022/limitng-api-models-raporlar-izinraporu-izinraporliste.mjs.map +1 -1
- package/fesm2022/limitng-api-models-raporlar-izinraporu.mjs +1 -5
- package/fesm2022/limitng-api-models-raporlar-izinraporu.mjs.map +1 -1
- package/fesm2022/limitng-api-models-raporlar-listedensec.mjs +32 -30
- package/fesm2022/limitng-api-models-raporlar-listedensec.mjs.map +1 -1
- package/fesm2022/limitng-api-models-raporlar-rapordetaylari.mjs +75 -79
- package/fesm2022/limitng-api-models-raporlar-rapordetaylari.mjs.map +1 -1
- package/fesm2022/limitng-api-models-raporlar-raporzamanlama.mjs +43 -47
- package/fesm2022/limitng-api-models-raporlar-raporzamanlama.mjs.map +1 -1
- package/fesm2022/limitng-api-models-raporlar-tablodansec.mjs +22 -26
- package/fesm2022/limitng-api-models-raporlar-tablodansec.mjs.map +1 -1
- package/fesm2022/limitng-api-models-raporlar.mjs +1 -5
- package/fesm2022/limitng-api-models-raporlar.mjs.map +1 -1
- package/fesm2022/limitng-api-models-sistemozet.mjs +192 -196
- package/fesm2022/limitng-api-models-sistemozet.mjs.map +1 -1
- package/fesm2022/limitng-api-models-sistemraporlari.mjs +9 -14
- package/fesm2022/limitng-api-models-sistemraporlari.mjs.map +1 -1
- package/fesm2022/limitng-api-models-timeSheet-timeSheetGirisListeler.mjs +315 -320
- package/fesm2022/limitng-api-models-timeSheet-timeSheetGirisListeler.mjs.map +1 -1
- package/fesm2022/limitng-api-models-timeSheet-timeSheetLog.mjs +15 -19
- package/fesm2022/limitng-api-models-timeSheet-timeSheetLog.mjs.map +1 -1
- package/fesm2022/limitng-api-models-timeSheet-timeSheetOzetListe.mjs +24 -29
- package/fesm2022/limitng-api-models-timeSheet-timeSheetOzetListe.mjs.map +1 -1
- package/fesm2022/limitng-api-models-timeSheet-timeSheetSecenekler.mjs +32 -36
- package/fesm2022/limitng-api-models-timeSheet-timeSheetSecenekler.mjs.map +1 -1
- package/fesm2022/limitng-api-models-timeSheet.mjs +1 -5
- package/fesm2022/limitng-api-models-timeSheet.mjs.map +1 -1
- package/fesm2022/limitng-api-models-xl-xlConfig.mjs +376 -420
- package/fesm2022/limitng-api-models-xl-xlConfig.mjs.map +1 -1
- package/fesm2022/limitng-api-models-xl-xlConstants.mjs +60 -64
- package/fesm2022/limitng-api-models-xl-xlConstants.mjs.map +1 -1
- package/fesm2022/limitng-api-models-xl-xlOptions.mjs +35 -39
- package/fesm2022/limitng-api-models-xl-xlOptions.mjs.map +1 -1
- package/fesm2022/limitng-api-models-xl-xlTools.mjs +3 -8
- package/fesm2022/limitng-api-models-xl-xlTools.mjs.map +1 -1
- package/fesm2022/limitng-api-models-xl.mjs +1 -5
- package/fesm2022/limitng-api-models-xl.mjs.map +1 -1
- package/fesm2022/limitng-api-models.mjs +1 -5
- package/fesm2022/limitng-api-models.mjs.map +1 -1
- package/fesm2022/limitng-api.mjs +731 -862
- package/fesm2022/limitng-api.mjs.map +1 -1
- package/fesm2022/limitng-blob-response-handler.mjs +1359 -1615
- package/fesm2022/limitng-blob-response-handler.mjs.map +1 -1
- package/fesm2022/limitng-dikey-baslikli-panel-sol.mjs +121 -27
- package/fesm2022/limitng-dikey-baslikli-panel-sol.mjs.map +1 -1
- package/fesm2022/limitng-dikey-baslikli-panel.mjs +121 -27
- package/fesm2022/limitng-dikey-baslikli-panel.mjs.map +1 -1
- package/fesm2022/limitng-directives-adAlani.directive.mjs +100 -83
- package/fesm2022/limitng-directives-adAlani.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-adresAlani.directive.mjs +101 -84
- package/fesm2022/limitng-directives-adresAlani.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-buyukHarf.directive.mjs +83 -69
- package/fesm2022/limitng-directives-buyukHarf.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-ciftBoslukTek.directive.mjs +83 -69
- package/fesm2022/limitng-directives-ciftBoslukTek.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-dirty.directive.mjs +70 -34
- package/fesm2022/limitng-directives-dirty.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-disable.directive.mjs +289 -155
- package/fesm2022/limitng-directives-disable.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-flexBasis.directive.mjs +187 -63
- package/fesm2022/limitng-directives-flexBasis.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-ilkHarfBuyuk.directive.mjs +83 -69
- package/fesm2022/limitng-directives-ilkHarfBuyuk.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-imleciBasaAl.directive.mjs +56 -45
- package/fesm2022/limitng-directives-imleciBasaAl.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-kodAlani.directive.mjs +106 -93
- package/fesm2022/limitng-directives-kodAlani.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-maksimumUzunluk.directive.mjs +106 -71
- package/fesm2022/limitng-directives-maksimumUzunluk.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-okTuslariylaIcerdeGezin.directive.mjs +44 -28
- package/fesm2022/limitng-directives-okTuslariylaIcerdeGezin.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-sagSolBoslukSil.directive.mjs +82 -68
- package/fesm2022/limitng-directives-sagSolBoslukSil.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-standartAlan.directive.mjs +100 -83
- package/fesm2022/limitng-directives-standartAlan.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-sutunGenisligi.directive.mjs +255 -96
- package/fesm2022/limitng-directives-sutunGenisligi.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-translate-key.directive.ts.mjs +52 -37
- package/fesm2022/limitng-directives-translate-key.directive.ts.mjs.map +1 -1
- package/fesm2022/limitng-directives-tumBoslukSil.directive.mjs +83 -69
- package/fesm2022/limitng-directives-tumBoslukSil.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives-tumIlkHarfBuyuk.directive.mjs +93 -70
- package/fesm2022/limitng-directives-tumIlkHarfBuyuk.directive.mjs.map +1 -1
- package/fesm2022/limitng-directives.mjs +1747 -1046
- package/fesm2022/limitng-directives.mjs.map +1 -1
- package/fesm2022/limitng-filtre-bar.mjs +241 -90
- package/fesm2022/limitng-filtre-bar.mjs.map +1 -1
- package/fesm2022/limitng-geri-ileri-detay.mjs +331 -229
- package/fesm2022/limitng-geri-ileri-detay.mjs.map +1 -1
- package/fesm2022/limitng-geri-ileri-liste.mjs +378 -281
- package/fesm2022/limitng-geri-ileri-liste.mjs.map +1 -1
- package/fesm2022/limitng-pipes-ayAdiPipe.mjs +54 -40
- package/fesm2022/limitng-pipes-ayAdiPipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-boolToPlus.pipe.mjs +42 -23
- package/fesm2022/limitng-pipes-boolToPlus.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-boolToPlusMinus.pipe.mjs +42 -23
- package/fesm2022/limitng-pipes-boolToPlusMinus.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-dateToText.pipe.mjs +43 -24
- package/fesm2022/limitng-pipes-dateToText.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-evetHayir.pipe.mjs +50 -33
- package/fesm2022/limitng-pipes-evetHayir.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-global-filter-formatter.pipe.mjs +51 -36
- package/fesm2022/limitng-pipes-global-filter-formatter.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-mecraTuru.pipe.mjs +43 -24
- package/fesm2022/limitng-pipes-mecraTuru.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-safe.pipe.mjs +53 -34
- package/fesm2022/limitng-pipes-safe.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-toSeverity.pipe.mjs +50 -30
- package/fesm2022/limitng-pipes-toSeverity.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes-tooltip-formatter.pipe.mjs +56 -47
- package/fesm2022/limitng-pipes-tooltip-formatter.pipe.mjs.map +1 -1
- package/fesm2022/limitng-pipes.mjs +1 -5
- package/fesm2022/limitng-pipes.mjs.map +1 -1
- package/fesm2022/limitng-rapor-kart-models.mjs +18 -23
- package/fesm2022/limitng-rapor-kart-models.mjs.map +1 -1
- package/fesm2022/limitng-rapor-kart.mjs +215 -58
- package/fesm2022/limitng-rapor-kart.mjs.map +1 -1
- package/fesm2022/limitng-sol-buyuk-kart.mjs +184 -37
- package/fesm2022/limitng-sol-buyuk-kart.mjs.map +1 -1
- package/fesm2022/limitng-sol-kucuk-kart.mjs +150 -32
- package/fesm2022/limitng-sol-kucuk-kart.mjs.map +1 -1
- package/fesm2022/limitng-yatay-baslikli-panel.mjs +231 -49
- package/fesm2022/limitng-yatay-baslikli-panel.mjs.map +1 -1
- package/fesm2022/limitng.mjs +6 -11
- package/package.json +1 -1
- package/types/limitng-alt-buyuk-kart.d.ts +48 -20
- package/types/limitng-alt-buyuk-kart.d.ts.map +1 -1
- package/types/limitng-alt-kucuk-kart.d.ts +43 -15
- package/types/limitng-alt-kucuk-kart.d.ts.map +1 -1
- package/types/limitng-api-models-bildirimler.d.ts +29 -32
- package/types/limitng-api-models-bildirimler.d.ts.map +1 -1
- package/types/limitng-api-models-enums.d.ts +389 -391
- package/types/limitng-api-models-enums.d.ts.map +1 -1
- package/types/limitng-api-models-fourDConstants.d.ts +83 -85
- package/types/limitng-api-models-fourDConstants.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-izinislemleri-izindetaylari.d.ts +23 -27
- package/types/limitng-api-models-kisisel-izinislemleri-izindetaylari.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-izinislemleri-izinfiltre.d.ts +10 -13
- package/types/limitng-api-models-kisisel-izinislemleri-izinfiltre.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-izinislemleri-izinguncelle.d.ts +5 -8
- package/types/limitng-api-models-kisisel-izinislemleri-izinguncelle.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-izinislemleri-izinliste.d.ts +24 -27
- package/types/limitng-api-models-kisisel-izinislemleri-izinliste.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-izinislemleri.d.ts +3 -3
- package/types/limitng-api-models-kisisel-izinislemleri.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-masrafislemleri-masrafdetaylari.d.ts +57 -61
- package/types/limitng-api-models-kisisel-masrafislemleri-masrafdetaylari.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-masrafislemleri-masraffiltre.d.ts +11 -14
- package/types/limitng-api-models-kisisel-masrafislemleri-masraffiltre.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-masrafislemleri-masrafguncelle.d.ts +6 -9
- package/types/limitng-api-models-kisisel-masrafislemleri-masrafguncelle.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-masrafislemleri-masrafliste.d.ts +70 -74
- package/types/limitng-api-models-kisisel-masrafislemleri-masrafliste.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-masrafislemleri.d.ts +3 -3
- package/types/limitng-api-models-kisisel-masrafislemleri.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-onayislemleri-onaydetaylari.d.ts +71 -74
- package/types/limitng-api-models-kisisel-onayislemleri-onaydetaylari.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-onayislemleri-onayfiltre.d.ts +30 -33
- package/types/limitng-api-models-kisisel-onayislemleri-onayfiltre.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-onayislemleri-onayguncelle.d.ts +7 -9
- package/types/limitng-api-models-kisisel-onayislemleri-onayguncelle.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-onayislemleri-onayliste.d.ts +30 -32
- package/types/limitng-api-models-kisisel-onayislemleri-onayliste.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel-onayislemleri.d.ts +3 -3
- package/types/limitng-api-models-kisisel-onayislemleri.d.ts.map +1 -1
- package/types/limitng-api-models-kisisel.d.ts +3 -3
- package/types/limitng-api-models-kisisel.d.ts.map +1 -1
- package/types/limitng-api-models-logbook.d.ts +100 -103
- package/types/limitng-api-models-logbook.d.ts.map +1 -1
- package/types/limitng-api-models-login.d.ts +52 -55
- package/types/limitng-api-models-login.d.ts.map +1 -1
- package/types/limitng-api-models-onay-onayagonderdetaylari.d.ts +61 -65
- package/types/limitng-api-models-onay-onayagonderdetaylari.d.ts.map +1 -1
- package/types/limitng-api-models-onay-onaybilgi.d.ts +3 -5
- package/types/limitng-api-models-onay-onaybilgi.d.ts.map +1 -1
- package/types/limitng-api-models-onay.d.ts +3 -3
- package/types/limitng-api-models-onay.d.ts.map +1 -1
- package/types/limitng-api-models-ortak.d.ts +240 -244
- package/types/limitng-api-models-ortak.d.ts.map +1 -1
- package/types/limitng-api-models-ozet-ozetdata.d.ts +16 -19
- package/types/limitng-api-models-ozet-ozetdata.d.ts.map +1 -1
- package/types/limitng-api-models-ozet-ozetkartalan.d.ts +11 -13
- package/types/limitng-api-models-ozet-ozetkartalan.d.ts.map +1 -1
- package/types/limitng-api-models-ozet.d.ts +3 -3
- package/types/limitng-api-models-ozet.d.ts.map +1 -1
- package/types/limitng-api-models-raporlar-izinraporu-izinrapordetaylari.d.ts +13 -16
- package/types/limitng-api-models-raporlar-izinraporu-izinrapordetaylari.d.ts.map +1 -1
- package/types/limitng-api-models-raporlar-izinraporu-izinraporliste.d.ts +14 -17
- package/types/limitng-api-models-raporlar-izinraporu-izinraporliste.d.ts.map +1 -1
- package/types/limitng-api-models-raporlar-izinraporu.d.ts +3 -3
- package/types/limitng-api-models-raporlar-izinraporu.d.ts.map +1 -1
- package/types/limitng-api-models-raporlar-listedensec.d.ts +21 -24
- package/types/limitng-api-models-raporlar-listedensec.d.ts.map +1 -1
- package/types/limitng-api-models-raporlar-rapordetaylari.d.ts +53 -55
- package/types/limitng-api-models-raporlar-rapordetaylari.d.ts.map +1 -1
- package/types/limitng-api-models-raporlar-raporzamanlama.d.ts +41 -44
- package/types/limitng-api-models-raporlar-raporzamanlama.d.ts.map +1 -1
- package/types/limitng-api-models-raporlar-tablodansec.d.ts +23 -26
- package/types/limitng-api-models-raporlar-tablodansec.d.ts.map +1 -1
- package/types/limitng-api-models-raporlar.d.ts +3 -3
- package/types/limitng-api-models-raporlar.d.ts.map +1 -1
- package/types/limitng-api-models-sistemozet.d.ts +169 -173
- package/types/limitng-api-models-sistemozet.d.ts.map +1 -1
- package/types/limitng-api-models-sistemraporlari.d.ts +9 -13
- package/types/limitng-api-models-sistemraporlari.d.ts.map +1 -1
- package/types/limitng-api-models-timeSheet-timeSheetGirisListeler.d.ts +295 -299
- package/types/limitng-api-models-timeSheet-timeSheetGirisListeler.d.ts.map +1 -1
- package/types/limitng-api-models-timeSheet-timeSheetLog.d.ts +12 -15
- package/types/limitng-api-models-timeSheet-timeSheetLog.d.ts.map +1 -1
- package/types/limitng-api-models-timeSheet-timeSheetOzetListe.d.ts +17 -20
- package/types/limitng-api-models-timeSheet-timeSheetOzetListe.d.ts.map +1 -1
- package/types/limitng-api-models-timeSheet-timeSheetSecenekler.d.ts +28 -30
- package/types/limitng-api-models-timeSheet-timeSheetSecenekler.d.ts.map +1 -1
- package/types/limitng-api-models-timeSheet.d.ts +3 -3
- package/types/limitng-api-models-timeSheet.d.ts.map +1 -1
- package/types/limitng-api-models-xl-xlConfig.d.ts +196 -199
- package/types/limitng-api-models-xl-xlConfig.d.ts.map +1 -1
- package/types/limitng-api-models-xl-xlConstants.d.ts +59 -61
- package/types/limitng-api-models-xl-xlConstants.d.ts.map +1 -1
- package/types/limitng-api-models-xl-xlOptions.d.ts +23 -26
- package/types/limitng-api-models-xl-xlOptions.d.ts.map +1 -1
- package/types/limitng-api-models-xl-xlTools.d.ts +2 -5
- package/types/limitng-api-models-xl-xlTools.d.ts.map +1 -1
- package/types/limitng-api-models-xl.d.ts +3 -3
- package/types/limitng-api-models-xl.d.ts.map +1 -1
- package/types/limitng-api-models.d.ts +3 -3
- package/types/limitng-api-models.d.ts.map +1 -1
- package/types/limitng-api.d.ts +69 -76
- package/types/limitng-api.d.ts.map +1 -1
- package/types/limitng-blob-response-handler.d.ts +324 -330
- package/types/limitng-blob-response-handler.d.ts.map +1 -1
- package/types/limitng-dikey-baslikli-panel-sol.d.ts +30 -12
- package/types/limitng-dikey-baslikli-panel-sol.d.ts.map +1 -1
- package/types/limitng-dikey-baslikli-panel.d.ts +30 -12
- package/types/limitng-dikey-baslikli-panel.d.ts.map +1 -1
- package/types/limitng-directives-adAlani.directive.d.ts +26 -27
- package/types/limitng-directives-adAlani.directive.d.ts.map +1 -1
- package/types/limitng-directives-adresAlani.directive.d.ts +26 -27
- package/types/limitng-directives-adresAlani.directive.d.ts.map +1 -1
- package/types/limitng-directives-buyukHarf.directive.d.ts +24 -25
- package/types/limitng-directives-buyukHarf.directive.d.ts.map +1 -1
- package/types/limitng-directives-ciftBoslukTek.directive.d.ts +24 -25
- package/types/limitng-directives-ciftBoslukTek.directive.d.ts.map +1 -1
- package/types/limitng-directives-dirty.directive.d.ts +15 -12
- package/types/limitng-directives-dirty.directive.d.ts.map +1 -1
- package/types/limitng-directives-disable.directive.d.ts +40 -38
- package/types/limitng-directives-disable.directive.d.ts.map +1 -1
- package/types/limitng-directives-flexBasis.directive.d.ts +39 -24
- package/types/limitng-directives-flexBasis.directive.d.ts.map +1 -1
- package/types/limitng-directives-ilkHarfBuyuk.directive.d.ts +24 -25
- package/types/limitng-directives-ilkHarfBuyuk.directive.d.ts.map +1 -1
- package/types/limitng-directives-imleciBasaAl.directive.d.ts +11 -14
- package/types/limitng-directives-imleciBasaAl.directive.d.ts.map +1 -1
- package/types/limitng-directives-kodAlani.directive.d.ts +26 -29
- package/types/limitng-directives-kodAlani.directive.d.ts.map +1 -1
- package/types/limitng-directives-maksimumUzunluk.directive.d.ts +31 -26
- package/types/limitng-directives-maksimumUzunluk.directive.d.ts.map +1 -1
- package/types/limitng-directives-okTuslariylaIcerdeGezin.directive.d.ts +6 -9
- package/types/limitng-directives-okTuslariylaIcerdeGezin.directive.d.ts.map +1 -1
- package/types/limitng-directives-sagSolBoslukSil.directive.d.ts +24 -25
- package/types/limitng-directives-sagSolBoslukSil.directive.d.ts.map +1 -1
- package/types/limitng-directives-standartAlan.directive.d.ts +26 -27
- package/types/limitng-directives-standartAlan.directive.d.ts.map +1 -1
- package/types/limitng-directives-sutunGenisligi.directive.d.ts +53 -32
- package/types/limitng-directives-sutunGenisligi.directive.d.ts.map +1 -1
- package/types/limitng-directives-translate-key.directive.ts.d.ts +9 -12
- package/types/limitng-directives-translate-key.directive.ts.d.ts.map +1 -1
- package/types/limitng-directives-tumBoslukSil.directive.d.ts +24 -25
- package/types/limitng-directives-tumBoslukSil.directive.d.ts.map +1 -1
- package/types/limitng-directives-tumIlkHarfBuyuk.directive.d.ts +26 -26
- package/types/limitng-directives-tumIlkHarfBuyuk.directive.d.ts.map +1 -1
- package/types/limitng-directives.d.ts +386 -323
- package/types/limitng-directives.d.ts.map +1 -1
- package/types/limitng-filtre-bar.d.ts +55 -30
- package/types/limitng-filtre-bar.d.ts.map +1 -1
- package/types/limitng-geri-ileri-detay.d.ts +59 -57
- package/types/limitng-geri-ileri-detay.d.ts.map +1 -1
- package/types/limitng-geri-ileri-liste.d.ts +66 -64
- package/types/limitng-geri-ileri-liste.d.ts.map +1 -1
- package/types/limitng-pipes-ayAdiPipe.d.ts +8 -11
- package/types/limitng-pipes-ayAdiPipe.d.ts.map +1 -1
- package/types/limitng-pipes-boolToPlus.pipe.d.ts +7 -10
- package/types/limitng-pipes-boolToPlus.pipe.d.ts.map +1 -1
- package/types/limitng-pipes-boolToPlusMinus.pipe.d.ts +7 -10
- package/types/limitng-pipes-boolToPlusMinus.pipe.d.ts.map +1 -1
- package/types/limitng-pipes-dateToText.pipe.d.ts +7 -10
- package/types/limitng-pipes-dateToText.pipe.d.ts.map +1 -1
- package/types/limitng-pipes-evetHayir.pipe.d.ts +9 -12
- package/types/limitng-pipes-evetHayir.pipe.d.ts.map +1 -1
- package/types/limitng-pipes-global-filter-formatter.pipe.d.ts +8 -11
- package/types/limitng-pipes-global-filter-formatter.pipe.d.ts.map +1 -1
- package/types/limitng-pipes-mecraTuru.pipe.d.ts +7 -10
- package/types/limitng-pipes-mecraTuru.pipe.d.ts.map +1 -1
- package/types/limitng-pipes-safe.pipe.d.ts +9 -12
- package/types/limitng-pipes-safe.pipe.d.ts.map +1 -1
- package/types/limitng-pipes-toSeverity.pipe.d.ts +8 -12
- package/types/limitng-pipes-toSeverity.pipe.d.ts.map +1 -1
- package/types/limitng-pipes-tooltip-formatter.pipe.d.ts +8 -11
- package/types/limitng-pipes-tooltip-formatter.pipe.d.ts.map +1 -1
- package/types/limitng-pipes.d.ts +3 -3
- package/types/limitng-pipes.d.ts.map +1 -1
- package/types/limitng-rapor-kart-models.d.ts +14 -17
- package/types/limitng-rapor-kart-models.d.ts.map +1 -1
- package/types/limitng-rapor-kart.d.ts +36 -24
- package/types/limitng-rapor-kart.d.ts.map +1 -1
- package/types/limitng-sol-buyuk-kart.d.ts +47 -19
- package/types/limitng-sol-buyuk-kart.d.ts.map +1 -1
- package/types/limitng-sol-kucuk-kart.d.ts +42 -14
- package/types/limitng-sol-kucuk-kart.d.ts.map +1 -1
- package/types/limitng-yatay-baslikli-panel.d.ts +66 -22
- package/types/limitng-yatay-baslikli-panel.d.ts.map +1 -1
- package/types/limitng.d.ts +6 -7
- package/fesm2022/limitng-api-models-kisisel-izinislemleri-izinguncelle.mjs.map +0 -1
- package/fesm2022/limitng-api-models-kisisel-masrafislemleri-masrafguncelle.mjs.map +0 -1
- package/fesm2022/limitng-api-models-onay-onaybilgi.mjs.map +0 -1
- package/fesm2022/limitng-api-models-ozet-ozetdata.mjs.map +0 -1
- package/fesm2022/limitng-api-models-ozet-ozetkartalan.mjs.map +0 -1
- package/fesm2022/limitng.mjs.map +0 -1
- package/types/limitng.d.ts.map +0 -1
|
@@ -1,1619 +1,1363 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { saveAs } from
|
|
4
|
-
import { TranslateService } from
|
|
5
|
-
import { GlobalFunctions } from
|
|
6
|
-
import { Workbook } from
|
|
7
|
-
import JSZip from
|
|
8
|
-
import {
|
|
9
|
-
import { XLHAlign, XLVAlign } from
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
displayGridLines: false
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable, inject } from "@angular/core";
|
|
3
|
+
import { saveAs } from "file-saver";
|
|
4
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
5
|
+
import { GlobalFunctions } from "limitng/api";
|
|
6
|
+
import { Workbook } from "exceljs";
|
|
7
|
+
import JSZip from "jszip";
|
|
8
|
+
import { FontStyle, NumberFormatlar, VariableType } from "limitng/api/models/fourDConstants";
|
|
9
|
+
import { XLHAlign, XLVAlign } from "limitng/api/models/xl/xlConstants";
|
|
10
|
+
var ExcelRaporuSonuc = class {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.book = {
|
|
13
|
+
author: "MedPlan",
|
|
14
|
+
activeSheetNo: 1
|
|
15
|
+
};
|
|
16
|
+
this.defaultFont = {
|
|
17
|
+
name: "Calibri",
|
|
18
|
+
size: 11
|
|
19
|
+
};
|
|
20
|
+
this.currentTableStyle = "";
|
|
21
|
+
this.sifirlariBasmaSayi = false;
|
|
22
|
+
this.sifirlariBasmaTarih = false;
|
|
23
|
+
this.sheets = [];
|
|
24
|
+
this.window = { displayGridLines: false };
|
|
25
|
+
}
|
|
26
|
+
};
|
|
32
27
|
const TOKEN_DESENI = /\s*(\d+(?:\.\d+)?|[A-Za-z_]+|[()+\-*/,])/gy;
|
|
33
|
-
class ToplamFormuluHesaplayici {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
if (fontSize && fontSize > 0) {
|
|
1254
|
-
excelFont.size = fontSize;
|
|
1255
|
-
}
|
|
1256
|
-
if (font?.color) {
|
|
1257
|
-
const color = this.argbDonustur(font.color);
|
|
1258
|
-
if (color) {
|
|
1259
|
-
excelFont.color = { argb: color };
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
excelFont.bold = Boolean(style & FontStyle.bold);
|
|
1263
|
-
excelFont.italic = Boolean(style & FontStyle.italic);
|
|
1264
|
-
excelFont.underline = Boolean(style & FontStyle.underline);
|
|
1265
|
-
cell.font = excelFont;
|
|
1266
|
-
}
|
|
1267
|
-
static gecerliTableStyleVer(tableStyle) {
|
|
1268
|
-
if (!tableStyle) {
|
|
1269
|
-
return undefined;
|
|
1270
|
-
}
|
|
1271
|
-
const style = tableStyle.trim();
|
|
1272
|
-
if (/^TableStyleLight([1-9]|1\d|2[0-1])$/.test(style)) {
|
|
1273
|
-
return style;
|
|
1274
|
-
}
|
|
1275
|
-
if (/^TableStyleMedium([1-9]|1\d|2[0-1])$/.test(style)) {
|
|
1276
|
-
return style;
|
|
1277
|
-
}
|
|
1278
|
-
if (/^TableStyleDark([1-9]|10|11)$/.test(style)) {
|
|
1279
|
-
return style;
|
|
1280
|
-
}
|
|
1281
|
-
return undefined;
|
|
1282
|
-
}
|
|
1283
|
-
static tableStyleDonustur(theme) {
|
|
1284
|
-
if (!theme) {
|
|
1285
|
-
return undefined;
|
|
1286
|
-
}
|
|
1287
|
-
return {
|
|
1288
|
-
theme: theme,
|
|
1289
|
-
showRowStripes: true
|
|
1290
|
-
};
|
|
1291
|
-
}
|
|
1292
|
-
static tabloAdiOlustur(sheetName, startRow, startCol) {
|
|
1293
|
-
const temizSheetName = sheetName.replaceAll(/[^A-Za-z0-9]/g, '_');
|
|
1294
|
-
return `T_${temizSheetName}_R${startRow}C${startCol}`;
|
|
1295
|
-
}
|
|
1296
|
-
static yatayHizaDonustur(value) {
|
|
1297
|
-
switch (value) {
|
|
1298
|
-
case XLHAlign.xlHAlignCenter: return 'center';
|
|
1299
|
-
case XLHAlign.xlHAlignCenterAcrossSelection: return 'centerContinuous';
|
|
1300
|
-
case XLHAlign.xlHAlignDistributed: return 'distributed';
|
|
1301
|
-
case XLHAlign.xlHAlignFill: return 'fill';
|
|
1302
|
-
case XLHAlign.xlHAlignGeneral: return 'left';
|
|
1303
|
-
case XLHAlign.xlHAlignJustify: return 'justify';
|
|
1304
|
-
case XLHAlign.xlHAlignLeft: return 'left';
|
|
1305
|
-
case XLHAlign.xlHAlignRight: return 'right';
|
|
1306
|
-
default: return 'left';
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
static dikeyHizaDonustur(value) {
|
|
1310
|
-
switch (value) {
|
|
1311
|
-
case XLVAlign.xlVAlignTop: return 'top';
|
|
1312
|
-
case XLVAlign.xlVAlignBottom: return 'bottom';
|
|
1313
|
-
case XLVAlign.xlVAlignDistributed: return 'distributed';
|
|
1314
|
-
case XLVAlign.xlVAlignJustify: return 'justify';
|
|
1315
|
-
default: return 'middle';
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
static argbDonustur(color) {
|
|
1319
|
-
if (!color) {
|
|
1320
|
-
return undefined;
|
|
1321
|
-
}
|
|
1322
|
-
const cssColor = color.trim().toLowerCase();
|
|
1323
|
-
const rgbMatch = cssColor.match(/^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);
|
|
1324
|
-
if (rgbMatch) {
|
|
1325
|
-
const rgbDegerleri = rgbMatch.slice(1).map(value => Number(value));
|
|
1326
|
-
if (rgbDegerleri.every(value => Number.isInteger(value) && value >= 0 && value <= 255)) {
|
|
1327
|
-
return `FF${rgbDegerleri.map(value => value.toString(16).padStart(2, '0')).join('').toUpperCase()}`;
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
const namedColors = {
|
|
1331
|
-
black: 'FF000000',
|
|
1332
|
-
blue: 'FF0000FF',
|
|
1333
|
-
cyan: 'FF00FFFF',
|
|
1334
|
-
gray: 'FF808080',
|
|
1335
|
-
green: 'FF008000',
|
|
1336
|
-
grey: 'FF808080',
|
|
1337
|
-
magenta: 'FFFF00FF',
|
|
1338
|
-
orange: 'FFFFA500',
|
|
1339
|
-
purple: 'FF800080',
|
|
1340
|
-
red: 'FFFF0000',
|
|
1341
|
-
white: 'FFFFFFFF',
|
|
1342
|
-
yellow: 'FFFFFF00'
|
|
1343
|
-
};
|
|
1344
|
-
if (namedColors[cssColor]) {
|
|
1345
|
-
return namedColors[cssColor];
|
|
1346
|
-
}
|
|
1347
|
-
const hexColor = cssColor.replace('#', '');
|
|
1348
|
-
if (/^[0-9a-f]{6}$/i.test(hexColor)) {
|
|
1349
|
-
return `FF${hexColor.toUpperCase()}`;
|
|
1350
|
-
}
|
|
1351
|
-
if (/^[0-9A-Fa-f]{8}$/.test(color)) {
|
|
1352
|
-
return color.toUpperCase();
|
|
1353
|
-
}
|
|
1354
|
-
const numericColor = Number(color);
|
|
1355
|
-
if (!Number.isFinite(numericColor)) {
|
|
1356
|
-
return undefined;
|
|
1357
|
-
}
|
|
1358
|
-
const r = numericColor & 255;
|
|
1359
|
-
const g = (numericColor >> 8) & 255;
|
|
1360
|
-
const b = (numericColor >> 16) & 255;
|
|
1361
|
-
return `FF${[r, g, b].map(value => value.toString(16).padStart(2, '0')).join('').toUpperCase()}`;
|
|
1362
|
-
}
|
|
1363
|
-
static kolonRenginiBul(kolonRenkleri, colIndex) {
|
|
1364
|
-
const kolonRengi = kolonRenkleri?.[colIndex];
|
|
1365
|
-
if (typeof kolonRengi === 'string') {
|
|
1366
|
-
return kolonRengi;
|
|
1367
|
-
}
|
|
1368
|
-
const kolonNo = colIndex + 1;
|
|
1369
|
-
for (const kolon of kolonRenkleri ?? []) {
|
|
1370
|
-
if (typeof kolon === 'object' && kolon.columnNo === kolonNo) {
|
|
1371
|
-
return kolon.color;
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
return undefined;
|
|
1375
|
-
}
|
|
1376
|
-
static excelFormuluneDonustur(formul) {
|
|
1377
|
-
const ceviriler = {
|
|
1378
|
-
'TOPLA': 'SUM',
|
|
1379
|
-
'EĞER': 'IF',
|
|
1380
|
-
'VE': 'AND',
|
|
1381
|
-
'VEYA': 'OR',
|
|
1382
|
-
'YUVARLA': 'ROUND',
|
|
1383
|
-
'EĞERSAY': 'COUNTIF',
|
|
1384
|
-
'ETOPLA': 'SUMIF',
|
|
1385
|
-
'ORTALAMA': 'AVERAGE',
|
|
1386
|
-
'MİN': 'MIN',
|
|
1387
|
-
'MAK': 'MAX'
|
|
1388
|
-
};
|
|
1389
|
-
let sonuc = formul.slice(1).replaceAll(';', ',');
|
|
1390
|
-
for (const [kaynak, hedef] of Object.entries(ceviriler)) {
|
|
1391
|
-
const pattern = new RegExp(`\\b${kaynak}\\b`, 'g');
|
|
1392
|
-
sonuc = sonuc.replace(pattern, hedef);
|
|
1393
|
-
}
|
|
1394
|
-
return sonuc;
|
|
1395
|
-
}
|
|
1396
|
-
static footerFormulunuOlustur(column, colIndex, startRow, startCol, veriSatirSayisi) {
|
|
1397
|
-
if (!veriSatirSayisi) {
|
|
1398
|
-
return undefined;
|
|
1399
|
-
}
|
|
1400
|
-
const fonksiyon = String(column.footer?.function ?? '').trim().toUpperCase();
|
|
1401
|
-
if (!fonksiyon) {
|
|
1402
|
-
return undefined;
|
|
1403
|
-
}
|
|
1404
|
-
const kolonHarf = worksheetColumnName(startCol + colIndex);
|
|
1405
|
-
const ilkVeriSatiri = startRow + 1;
|
|
1406
|
-
const sonVeriSatiri = startRow + veriSatirSayisi;
|
|
1407
|
-
const aralik = `${kolonHarf}${ilkVeriSatiri}:${kolonHarf}${sonVeriSatiri}`;
|
|
1408
|
-
if (fonksiyon === 'SUBTOTAL') {
|
|
1409
|
-
return `SUBTOTAL(9,${aralik})`;
|
|
1410
|
-
}
|
|
1411
|
-
const desteklenenFonksiyonlar = ['SUM', 'AVERAGE', 'COUNT', 'COUNTA', 'MAX', 'MIN'];
|
|
1412
|
-
if (desteklenenFonksiyonlar.includes(fonksiyon)) {
|
|
1413
|
-
return `${fonksiyon}(${aralik})`;
|
|
1414
|
-
}
|
|
1415
|
-
return undefined;
|
|
1416
|
-
}
|
|
1417
|
-
static sayfaAdiDuzenle(sheetName, index) {
|
|
1418
|
-
const temizAd = sheetName
|
|
1419
|
-
.replaceAll(/[\\/*?:[\]]/g, ' ')
|
|
1420
|
-
.trim()
|
|
1421
|
-
.slice(0, 31);
|
|
1422
|
-
if (temizAd) {
|
|
1423
|
-
return temizAd;
|
|
1424
|
-
}
|
|
1425
|
-
return `Sheet${index}`;
|
|
1426
|
-
}
|
|
1427
|
-
static dosyaAdiDuzenle(dosyaAdi) {
|
|
1428
|
-
const temizAd = dosyaAdi
|
|
1429
|
-
.replaceAll(/[<>:"/\\|?*]/g, ' ')
|
|
1430
|
-
.trim()
|
|
1431
|
-
.replaceAll(/\s+/g, ' ');
|
|
1432
|
-
if (temizAd) {
|
|
1433
|
-
return temizAd;
|
|
1434
|
-
}
|
|
1435
|
-
return 'Rapor';
|
|
1436
|
-
}
|
|
1437
|
-
static numberFormatDonustur(format) {
|
|
1438
|
-
switch (format) {
|
|
1439
|
-
case NumberFormatlar.long:
|
|
1440
|
-
case 2:
|
|
1441
|
-
case 5:
|
|
1442
|
-
case 11:
|
|
1443
|
-
return '#,##0';
|
|
1444
|
-
case NumberFormatlar.real:
|
|
1445
|
-
case 7:
|
|
1446
|
-
case 12:
|
|
1447
|
-
return '#,##0.00';
|
|
1448
|
-
case 8:
|
|
1449
|
-
return 'hh:mm';
|
|
1450
|
-
case NumberFormatlar.tarih:
|
|
1451
|
-
return 'dd.mm.yyyy';
|
|
1452
|
-
case NumberFormatlar.tarih_yyyymmdd_tireli:
|
|
1453
|
-
return 'yyyy-mm-dd';
|
|
1454
|
-
case NumberFormatlar.tarih_AAAAYYYY:
|
|
1455
|
-
return 'mmmm yyyy';
|
|
1456
|
-
case NumberFormatlar.tarih_GGAAAAYYYY:
|
|
1457
|
-
return 'dd mmmm yyyy';
|
|
1458
|
-
case NumberFormatlar.tarih_YYYYMMDD:
|
|
1459
|
-
return 'yyyy/mm/dd';
|
|
1460
|
-
case NumberFormatlar.tarih_LongDate:
|
|
1461
|
-
return 'dd mmmm yyyy dddd';
|
|
1462
|
-
case NumberFormatlar.tarih_ga:
|
|
1463
|
-
return 'd.m;@';
|
|
1464
|
-
case NumberFormatlar.tarih_ggaa:
|
|
1465
|
-
return 'dd.mm';
|
|
1466
|
-
case NumberFormatlar.tarih_gaaaa:
|
|
1467
|
-
return 'd.mmmm';
|
|
1468
|
-
case NumberFormatlar.tarih_ggaaa:
|
|
1469
|
-
return 'dd.mmm';
|
|
1470
|
-
case NumberFormatlar.tarih_ggaaaa:
|
|
1471
|
-
return 'dd.mmmm';
|
|
1472
|
-
case NumberFormatlar.yuzde_BirHane:
|
|
1473
|
-
return '0.0%';
|
|
1474
|
-
case NumberFormatlar.genel:
|
|
1475
|
-
return 'General';
|
|
1476
|
-
case NumberFormatlar.metin:
|
|
1477
|
-
return '@';
|
|
1478
|
-
case NumberFormatlar.imp:
|
|
1479
|
-
return '#,##0 "imp"';
|
|
1480
|
-
case NumberFormatlar.clicks:
|
|
1481
|
-
return '#,##0 "Clicks"';
|
|
1482
|
-
case NumberFormatlar.gun:
|
|
1483
|
-
return '#,##0 "Gün"';
|
|
1484
|
-
case NumberFormatlar.view:
|
|
1485
|
-
return '#,##0 "View"';
|
|
1486
|
-
case NumberFormatlar.session:
|
|
1487
|
-
return '#,##0 "Session"';
|
|
1488
|
-
case NumberFormatlar.kisi:
|
|
1489
|
-
return '#,##0 "Kişi"';
|
|
1490
|
-
case NumberFormatlar.okunma:
|
|
1491
|
-
return '#,##0 "Okunma"';
|
|
1492
|
-
case NumberFormatlar.dinlenme:
|
|
1493
|
-
return '#,##0 "Dinlenme"';
|
|
1494
|
-
case NumberFormatlar.lead:
|
|
1495
|
-
return '#,##0 "Lead"';
|
|
1496
|
-
case NumberFormatlar.gizli:
|
|
1497
|
-
return ';;;';
|
|
1498
|
-
case 28:
|
|
1499
|
-
return '#,##0.00 "₺"';
|
|
1500
|
-
default:
|
|
1501
|
-
return undefined;
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
28
|
+
var ToplamFormuluHesaplayici = class ToplamFormuluHesaplayici {
|
|
29
|
+
constructor(formul) {
|
|
30
|
+
this.konum = 0;
|
|
31
|
+
this.tokenlar = ToplamFormuluHesaplayici.tokenlaraAyir(formul);
|
|
32
|
+
}
|
|
33
|
+
static hesapla(formul) {
|
|
34
|
+
try {
|
|
35
|
+
const hesaplayici = new ToplamFormuluHesaplayici(formul);
|
|
36
|
+
const sonuc = hesaplayici.ifade();
|
|
37
|
+
return hesaplayici.konum === hesaplayici.tokenlar.length && Number.isFinite(sonuc) ? sonuc : void 0;
|
|
38
|
+
} catch {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
static tokenlaraAyir(formul) {
|
|
43
|
+
const tokenlar = [];
|
|
44
|
+
TOKEN_DESENI.lastIndex = 0;
|
|
45
|
+
let eslesme = TOKEN_DESENI.exec(formul);
|
|
46
|
+
let okunan = 0;
|
|
47
|
+
while (eslesme) {
|
|
48
|
+
const deger = eslesme[1];
|
|
49
|
+
okunan = TOKEN_DESENI.lastIndex;
|
|
50
|
+
if (/^\d/.test(deger)) tokenlar.push({
|
|
51
|
+
deger,
|
|
52
|
+
tur: "sayi"
|
|
53
|
+
});
|
|
54
|
+
else if (/^[A-Za-z_]/.test(deger)) tokenlar.push({
|
|
55
|
+
deger: deger.toUpperCase(),
|
|
56
|
+
tur: "ad"
|
|
57
|
+
});
|
|
58
|
+
else tokenlar.push({
|
|
59
|
+
deger,
|
|
60
|
+
tur: "op"
|
|
61
|
+
});
|
|
62
|
+
eslesme = TOKEN_DESENI.exec(formul);
|
|
63
|
+
}
|
|
64
|
+
if (formul.slice(okunan).trim()) throw new Error("Geçersiz formül");
|
|
65
|
+
return tokenlar;
|
|
66
|
+
}
|
|
67
|
+
ifade() {
|
|
68
|
+
let sonuc = this.terim();
|
|
69
|
+
while (this.sonrakiOperatorMu("+", "-")) {
|
|
70
|
+
const islem = this.tokenlar[this.konum++].deger;
|
|
71
|
+
const sag = this.terim();
|
|
72
|
+
sonuc = islem === "+" ? sonuc + sag : sonuc - sag;
|
|
73
|
+
}
|
|
74
|
+
return sonuc;
|
|
75
|
+
}
|
|
76
|
+
terim() {
|
|
77
|
+
let sonuc = this.birim();
|
|
78
|
+
while (this.sonrakiOperatorMu("*", "/")) {
|
|
79
|
+
const islem = this.tokenlar[this.konum++].deger;
|
|
80
|
+
const sag = this.birim();
|
|
81
|
+
if (islem === "/" && sag === 0) throw new Error("Sıfıra bölme");
|
|
82
|
+
sonuc = islem === "*" ? sonuc * sag : sonuc / sag;
|
|
83
|
+
}
|
|
84
|
+
return sonuc;
|
|
85
|
+
}
|
|
86
|
+
birim() {
|
|
87
|
+
const token = this.tokenlar[this.konum++];
|
|
88
|
+
if (!token) throw new Error("Beklenmeyen son");
|
|
89
|
+
if (token.tur === "sayi") return Number(token.deger);
|
|
90
|
+
if (token.tur === "op" && token.deger === "-") return -this.birim();
|
|
91
|
+
if (token.tur === "op" && token.deger === "(") {
|
|
92
|
+
const sonuc = this.ifade();
|
|
93
|
+
this.operatorBekle(")");
|
|
94
|
+
return sonuc;
|
|
95
|
+
}
|
|
96
|
+
if (token.tur === "ad") return this.fonksiyon(token.deger);
|
|
97
|
+
throw new Error("Geçersiz token");
|
|
98
|
+
}
|
|
99
|
+
fonksiyon(ad) {
|
|
100
|
+
this.operatorBekle("(");
|
|
101
|
+
if (ad === "ABS") {
|
|
102
|
+
const sonuc = Math.abs(this.ifade());
|
|
103
|
+
this.operatorBekle(")");
|
|
104
|
+
return sonuc;
|
|
105
|
+
}
|
|
106
|
+
if (ad === "IFERROR") {
|
|
107
|
+
const baslangic = this.konum;
|
|
108
|
+
let sonuc;
|
|
109
|
+
try {
|
|
110
|
+
sonuc = this.ifade();
|
|
111
|
+
} catch {
|
|
112
|
+
this.konum = baslangic;
|
|
113
|
+
this.virguleKadarAtla();
|
|
114
|
+
}
|
|
115
|
+
this.operatorBekle(",");
|
|
116
|
+
const yedek = this.ifade();
|
|
117
|
+
this.operatorBekle(")");
|
|
118
|
+
return sonuc ?? yedek;
|
|
119
|
+
}
|
|
120
|
+
throw new Error(`Desteklenmeyen fonksiyon: ${ad}`);
|
|
121
|
+
}
|
|
122
|
+
virguleKadarAtla() {
|
|
123
|
+
let derinlik = 0;
|
|
124
|
+
while (this.konum < this.tokenlar.length) {
|
|
125
|
+
const { deger, tur } = this.tokenlar[this.konum];
|
|
126
|
+
if (tur === "op" && deger === "(") derinlik++;
|
|
127
|
+
else if (tur === "op" && deger === ")") derinlik--;
|
|
128
|
+
else if (tur === "op" && deger === "," && derinlik === 0) return;
|
|
129
|
+
this.konum++;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
sonrakiOperatorMu(...operatorler) {
|
|
133
|
+
const token = this.tokenlar[this.konum];
|
|
134
|
+
return token?.tur === "op" && operatorler.includes(token.deger);
|
|
135
|
+
}
|
|
136
|
+
operatorBekle(operator) {
|
|
137
|
+
const token = this.tokenlar[this.konum++];
|
|
138
|
+
if (token?.tur !== "op" || token.deger !== operator) throw new Error(`Beklenen: ${operator}`);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
var JsonToExcelTableBuilder = class {
|
|
142
|
+
constructor(table) {
|
|
143
|
+
this.table = table;
|
|
144
|
+
}
|
|
145
|
+
addColumn(column) {
|
|
146
|
+
this.table.columns.push({
|
|
147
|
+
arrayType: VariableType.text,
|
|
148
|
+
...column
|
|
149
|
+
});
|
|
150
|
+
return this;
|
|
151
|
+
}
|
|
152
|
+
setRows(rows) {
|
|
153
|
+
this.table.collection = rows;
|
|
154
|
+
return this;
|
|
155
|
+
}
|
|
156
|
+
setStartColumn(sol) {
|
|
157
|
+
this.table.sol = sol;
|
|
158
|
+
return this;
|
|
159
|
+
}
|
|
160
|
+
setStartRow(ust) {
|
|
161
|
+
this.table.ust = ust;
|
|
162
|
+
return this;
|
|
163
|
+
}
|
|
164
|
+
getColumnSayisi() {
|
|
165
|
+
return this.table.columns.length;
|
|
166
|
+
}
|
|
167
|
+
addOutlineGroup(groupStart, groupEnd, collapsed = false) {
|
|
168
|
+
this.table.outlineGroups ??= [];
|
|
169
|
+
this.table.outlineGroups.push({
|
|
170
|
+
groupStart,
|
|
171
|
+
groupEnd,
|
|
172
|
+
collapsed
|
|
173
|
+
});
|
|
174
|
+
return this;
|
|
175
|
+
}
|
|
176
|
+
setOutlineSummaryPosition(position) {
|
|
177
|
+
this.table.outlineSummaryPosition = position;
|
|
178
|
+
return this;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
var JsonToExcelSheetBuilder = class {
|
|
182
|
+
constructor(sheet) {
|
|
183
|
+
this.sheet = sheet;
|
|
184
|
+
}
|
|
185
|
+
addTable(rows, options = {}) {
|
|
186
|
+
const table = {
|
|
187
|
+
collection: rows,
|
|
188
|
+
columns: [],
|
|
189
|
+
...options.autoFit !== void 0 && { autoFit: options.autoFit },
|
|
190
|
+
...options.data && { data: options.data },
|
|
191
|
+
...options.footer && { footer: options.footer },
|
|
192
|
+
...options.header && { header: options.header },
|
|
193
|
+
...options.sol !== void 0 && { sol: options.sol },
|
|
194
|
+
...options.toplamEtiketi !== void 0 && { toplamEtiketi: options.toplamEtiketi },
|
|
195
|
+
...options.toplamSatiri !== void 0 && { toplamSatiri: options.toplamSatiri },
|
|
196
|
+
...options.ust !== void 0 && { ust: options.ust }
|
|
197
|
+
};
|
|
198
|
+
this.sheet.tables ??= [];
|
|
199
|
+
this.sheet.tables.push(table);
|
|
200
|
+
return new JsonToExcelTableBuilder(table);
|
|
201
|
+
}
|
|
202
|
+
addUstBilgi(ustBilgi, font) {
|
|
203
|
+
this.sheet.ustBilgiler ??= [];
|
|
204
|
+
this.sheet.ustBilgiler.push(JsonToExcelParser.ustBilgiEkle(ustBilgi, font));
|
|
205
|
+
return this;
|
|
206
|
+
}
|
|
207
|
+
getUstBilgiSayisi() {
|
|
208
|
+
return this.sheet.ustBilgiler?.length ?? 0;
|
|
209
|
+
}
|
|
210
|
+
getSheetNo() {
|
|
211
|
+
return this.sheet.sheetNo;
|
|
212
|
+
}
|
|
213
|
+
setSheetName(sheetName) {
|
|
214
|
+
this.sheet.sheetName = sheetName;
|
|
215
|
+
return this;
|
|
216
|
+
}
|
|
217
|
+
setZoom(zoom) {
|
|
218
|
+
this.sheet.zoom = zoom;
|
|
219
|
+
return this;
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
var JsonToExcelReportBuilder = class {
|
|
223
|
+
constructor() {
|
|
224
|
+
this.sonuc = new ExcelRaporuSonuc();
|
|
225
|
+
}
|
|
226
|
+
addSheet(sheetName, options = {}) {
|
|
227
|
+
const sheet = {
|
|
228
|
+
sheetName,
|
|
229
|
+
sheetNo: this.sonuc.sheets.length + 1,
|
|
230
|
+
...options.pageSetup && { pageSetup: options.pageSetup },
|
|
231
|
+
...options.zoom !== void 0 && { zoom: options.zoom }
|
|
232
|
+
};
|
|
233
|
+
this.sonuc.sheets.push(sheet);
|
|
234
|
+
return new JsonToExcelSheetBuilder(sheet);
|
|
235
|
+
}
|
|
236
|
+
build() {
|
|
237
|
+
return this.sonuc;
|
|
238
|
+
}
|
|
239
|
+
setAuthor(author) {
|
|
240
|
+
this.sonuc.book.author = author;
|
|
241
|
+
return this;
|
|
242
|
+
}
|
|
243
|
+
setCurrentTableStyle(currentTableStyle) {
|
|
244
|
+
this.sonuc.currentTableStyle = currentTableStyle;
|
|
245
|
+
return this;
|
|
246
|
+
}
|
|
247
|
+
setSubject(subject) {
|
|
248
|
+
this.sonuc.book.subject = subject;
|
|
249
|
+
return this;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
var JsonToExcelParser = class {
|
|
253
|
+
static async indir(sonuc, dosyaAdi) {
|
|
254
|
+
const blob = await this.blobOlustur(sonuc);
|
|
255
|
+
const normalizeDosyaAdi = this.dosyaAdiDuzenle(dosyaAdi);
|
|
256
|
+
saveAs(blob, `${normalizeDosyaAdi}.xlsx`);
|
|
257
|
+
}
|
|
258
|
+
static async blobOlustur(sonuc) {
|
|
259
|
+
const workbook = this.workbookOlustur(sonuc);
|
|
260
|
+
const buffer = await workbook.xlsx.writeBuffer();
|
|
261
|
+
const toplamFormulluBuffer = await this.toplamSatiriFormulleriniYaz(workbook, buffer);
|
|
262
|
+
const duzeltilmisBuffer = await this.sheetOzellikSiralariniDuzelt(workbook, toplamFormulluBuffer);
|
|
263
|
+
return new Blob([duzeltilmisBuffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" });
|
|
264
|
+
}
|
|
265
|
+
static async toplamSatiriFormulleriniYaz(workbook, buffer) {
|
|
266
|
+
const tabloFormulleri = /* @__PURE__ */ new Map();
|
|
267
|
+
for (const worksheet of workbook.worksheets) for (const tablo of worksheet.getTables()) {
|
|
268
|
+
const formuller = /* @__PURE__ */ new Map();
|
|
269
|
+
for (const [index, kolon] of tablo.table.columns.entries()) if (kolon.totalsRowFunction === "custom" && kolon.totalsRowFormula) formuller.set(index + 1, kolon.totalsRowFormula);
|
|
270
|
+
if (formuller.size) tabloFormulleri.set(tablo.table.name, formuller);
|
|
271
|
+
}
|
|
272
|
+
if (!tabloFormulleri.size) return buffer;
|
|
273
|
+
const zip = await JSZip.loadAsync(buffer);
|
|
274
|
+
const tabloDosyalari = Object.keys(zip.files).filter((ad) => /^xl\/tables\/table\d+\.xml$/.test(ad));
|
|
275
|
+
await Promise.all(tabloDosyalari.map(async (dosyaAdi) => {
|
|
276
|
+
const xml = await zip.file(dosyaAdi).async("string");
|
|
277
|
+
const tabloAdi = /<table [^>]*?\bname="([^"]*)"/.exec(xml)?.[1];
|
|
278
|
+
const formuller = tabloAdi ? tabloFormulleri.get(tabloAdi) : void 0;
|
|
279
|
+
if (!formuller) return;
|
|
280
|
+
const yeniXml = xml.replaceAll(/<tableColumn id="(\d+)"([^>]*?) totalsRowFunction="custom"([^>]*?)\/>/g, (eslesme, id, once, sonra) => {
|
|
281
|
+
const formul = formuller.get(Number(id));
|
|
282
|
+
return formul ? `<tableColumn id="${id}"${once} totalsRowFunction="custom"${sonra}><totalsRowFormula>${this.xmlKacis(formul)}</totalsRowFormula></tableColumn>` : eslesme;
|
|
283
|
+
});
|
|
284
|
+
zip.file(dosyaAdi, yeniXml);
|
|
285
|
+
}));
|
|
286
|
+
return zip.generateAsync({ type: "arraybuffer" });
|
|
287
|
+
}
|
|
288
|
+
static async sheetOzellikSiralariniDuzelt(workbook, buffer) {
|
|
289
|
+
if (!workbook.worksheets.some((worksheet) => worksheet.properties.outlineProperties !== void 0)) return buffer;
|
|
290
|
+
const sheetPrSirasi = [
|
|
291
|
+
"tabColor",
|
|
292
|
+
"outlinePr",
|
|
293
|
+
"pageSetUpPr"
|
|
294
|
+
];
|
|
295
|
+
const zip = await JSZip.loadAsync(buffer);
|
|
296
|
+
const sheetDosyalari = Object.keys(zip.files).filter((ad) => /^xl\/worksheets\/sheet\d+\.xml$/.test(ad));
|
|
297
|
+
await Promise.all(sheetDosyalari.map(async (dosyaAdi) => {
|
|
298
|
+
const xml = await zip.file(dosyaAdi).async("string");
|
|
299
|
+
const yeniXml = xml.replace(/<sheetPr>(.*?)<\/sheetPr>/s, (eslesme, icerik) => {
|
|
300
|
+
const cocuklar = icerik.match(/<(?:tabColor|outlinePr|pageSetUpPr)\b[^>]*\/>/g);
|
|
301
|
+
if (!cocuklar) return eslesme;
|
|
302
|
+
const sira = (cocuk) => sheetPrSirasi.indexOf(/^<(\w+)/.exec(cocuk)[1]);
|
|
303
|
+
return `<sheetPr>${[...cocuklar].sort((a, b) => sira(a) - sira(b)).join("")}</sheetPr>`;
|
|
304
|
+
});
|
|
305
|
+
if (yeniXml !== xml) zip.file(dosyaAdi, yeniXml);
|
|
306
|
+
}));
|
|
307
|
+
return zip.generateAsync({ type: "arraybuffer" });
|
|
308
|
+
}
|
|
309
|
+
static xmlKacis(metin) {
|
|
310
|
+
return metin.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
311
|
+
}
|
|
312
|
+
static standartPageSetupOlustur() {
|
|
313
|
+
return {
|
|
314
|
+
bottomMargin: 1,
|
|
315
|
+
centerHorizontally: true,
|
|
316
|
+
centerVertically: true,
|
|
317
|
+
fitToPagesTall: 1,
|
|
318
|
+
fitToPagesWide: 1,
|
|
319
|
+
leftMargin: 1,
|
|
320
|
+
orientation: 2,
|
|
321
|
+
rightMargin: 1,
|
|
322
|
+
topMargin: 1
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
static ustBilgiEkle(ustBilgi, font) {
|
|
326
|
+
return font ? {
|
|
327
|
+
font,
|
|
328
|
+
ustBilgi
|
|
329
|
+
} : { ustBilgi };
|
|
330
|
+
}
|
|
331
|
+
static raporOlustur() {
|
|
332
|
+
return new JsonToExcelReportBuilder();
|
|
333
|
+
}
|
|
334
|
+
static workbookOlustur(sonuc) {
|
|
335
|
+
const workbook = new Workbook();
|
|
336
|
+
workbook.created = /* @__PURE__ */ new Date();
|
|
337
|
+
workbook.calcProperties.fullCalcOnLoad = true;
|
|
338
|
+
const gridLinesGorunur = sonuc.window.displayGridLines;
|
|
339
|
+
if (this.yeniYapiMi(sonuc)) {
|
|
340
|
+
workbook.creator = sonuc.book.author || "MedPlan";
|
|
341
|
+
workbook.subject = "";
|
|
342
|
+
workbook.description = "";
|
|
343
|
+
this.yeniFormatSheetsYaz(workbook, sonuc, gridLinesGorunur);
|
|
344
|
+
} else {
|
|
345
|
+
workbook.creator = sonuc.book.author || "MedPlan";
|
|
346
|
+
workbook.subject = this.konuVer(sonuc.book, sonuc.ustBilgiler?.[0]?.ustBilgi);
|
|
347
|
+
workbook.description = sonuc.book.comments || "";
|
|
348
|
+
this.eskiFormatSheetsYaz(workbook, sonuc, gridLinesGorunur);
|
|
349
|
+
}
|
|
350
|
+
this.aktifSayfayiAyarla(workbook, sonuc.book.activeSheetNo, workbook.worksheets.length);
|
|
351
|
+
return workbook;
|
|
352
|
+
}
|
|
353
|
+
static yeniYapiMi(sonuc) {
|
|
354
|
+
const ilkSheet = sonuc.sheets[0];
|
|
355
|
+
if (Array.isArray(ilkSheet?.tables)) return true;
|
|
356
|
+
const runtimeSonuc = sonuc;
|
|
357
|
+
return !Array.isArray(runtimeSonuc.tables);
|
|
358
|
+
}
|
|
359
|
+
static yeniFormatSheetsYaz(workbook, sonuc, gridLinesGorunur) {
|
|
360
|
+
for (let index = 0; index < sonuc.sheets.length; index++) {
|
|
361
|
+
const sheet = sonuc.sheets[index];
|
|
362
|
+
const sheetAdi = this.sayfaAdiDuzenle(sheet.sheetName || "Rapor", index + 1);
|
|
363
|
+
const worksheet = workbook.addWorksheet(sheetAdi);
|
|
364
|
+
const zoomScale = sheet.zoom && sheet.zoom > 0 ? sheet.zoom : void 0;
|
|
365
|
+
worksheet.views = [{
|
|
366
|
+
showGridLines: gridLinesGorunur,
|
|
367
|
+
...zoomScale !== void 0 && { zoomScale }
|
|
368
|
+
}];
|
|
369
|
+
this.sayfaDuzeniniBelirle(worksheet, sheet);
|
|
370
|
+
const ustBilgiler = sheet.ustBilgiler ?? [];
|
|
371
|
+
this.yeniFormatUstBilgileriYaz(worksheet, ustBilgiler, sonuc.defaultFont);
|
|
372
|
+
let sonSatir = ustBilgiler.length + 1;
|
|
373
|
+
for (const table of sheet.tables ?? []) sonSatir = Math.max(sonSatir, this.tabloyuYaz(worksheet, sonuc, table));
|
|
374
|
+
if (sheet.notlar?.length) this.notlariYazList(worksheet, sheet.notlar, sheet.not?.font, sonSatir + 2, sonuc.defaultFont);
|
|
375
|
+
}
|
|
376
|
+
if (sonuc.sheets.length === 0) {
|
|
377
|
+
const worksheet = workbook.addWorksheet("Rapor");
|
|
378
|
+
worksheet.views = [{ showGridLines: gridLinesGorunur }];
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
static eskiFormatSheetsYaz(workbook, sonuc, gridLinesGorunur) {
|
|
382
|
+
const tablesBySheet = this.sheetBazliTablolar(sonuc);
|
|
383
|
+
const ustBilgiler = sonuc.ustBilgiler ?? [];
|
|
384
|
+
const notlar = sonuc.notlar ?? [];
|
|
385
|
+
for (const sheetGrup of tablesBySheet) {
|
|
386
|
+
const worksheet = workbook.addWorksheet(sheetGrup.sheetName);
|
|
387
|
+
worksheet.views = [{ showGridLines: gridLinesGorunur }];
|
|
388
|
+
this.ustBilgileriYaz(worksheet, ustBilgiler, sonuc.defaultFont);
|
|
389
|
+
let sonSatir = 1;
|
|
390
|
+
for (const table of sheetGrup.tables) sonSatir = Math.max(sonSatir, this.tabloyuYaz(worksheet, sonuc, table));
|
|
391
|
+
this.notlariYazList(worksheet, notlar, sonuc.not?.font, sonSatir + 2, sonuc.defaultFont);
|
|
392
|
+
}
|
|
393
|
+
if (tablesBySheet.length === 0) {
|
|
394
|
+
const worksheet = workbook.addWorksheet(this.bosRaporSheetAdiniVer(sonuc));
|
|
395
|
+
worksheet.views = [{ showGridLines: gridLinesGorunur }];
|
|
396
|
+
this.ustBilgileriYaz(worksheet, ustBilgiler, sonuc.defaultFont);
|
|
397
|
+
this.notlariYazList(worksheet, notlar, sonuc.not?.font, ustBilgiler.length + 2, sonuc.defaultFont);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
static sheetBazliTablolar(sonuc) {
|
|
401
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
402
|
+
for (const table of sonuc.tables ?? []) {
|
|
403
|
+
const sheetNo = this.tableSheetNoVer(table);
|
|
404
|
+
const sheetKey = this.sheetKeyVer(table, sheetNo, grouped.size + 1);
|
|
405
|
+
const existing = grouped.get(sheetKey);
|
|
406
|
+
if (existing) {
|
|
407
|
+
existing.tables.push(table);
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
grouped.set(sheetKey, {
|
|
411
|
+
sheetName: this.sheetAdiniBelirle(sonuc, table, grouped.size + 1, sheetNo),
|
|
412
|
+
...sheetNo !== void 0 && { sheetNo },
|
|
413
|
+
tables: [table]
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
return Array.from(grouped.values()).sort((a, b) => this.sheetGrupSirasiVer(a) - this.sheetGrupSirasiVer(b));
|
|
417
|
+
}
|
|
418
|
+
static tableSheetNoVer(table) {
|
|
419
|
+
return table.sheetNo;
|
|
420
|
+
}
|
|
421
|
+
static sheetKeyVer(table, sheetNo, index) {
|
|
422
|
+
if (sheetNo !== void 0) return `sheet-no-${sheetNo}`;
|
|
423
|
+
const eskiSheetName = table.sheetName?.trim();
|
|
424
|
+
if (eskiSheetName) return `sheet-name-${eskiSheetName}`;
|
|
425
|
+
return `sheet-index-${index}`;
|
|
426
|
+
}
|
|
427
|
+
static sheetAdiniBelirle(sonuc, table, index, sheetNo) {
|
|
428
|
+
const jsonSheet = this.jsonSheetBul(sonuc.sheets, sheetNo, index);
|
|
429
|
+
if (jsonSheet?.sheetName?.trim()) return this.sayfaAdiDuzenle(jsonSheet.sheetName, index);
|
|
430
|
+
return this.sayfaAdiDuzenle(table.sheetName || "Rapor", index);
|
|
431
|
+
}
|
|
432
|
+
static jsonSheetBul(sheets, sheetNo, index) {
|
|
433
|
+
if (sheetNo !== void 0) return sheets.find((sheet) => sheet.sheetNo === sheetNo);
|
|
434
|
+
return sheets.find((sheet) => sheet.sheetNo === index) ?? sheets[index - 1];
|
|
435
|
+
}
|
|
436
|
+
static konuVer(book, ilkUstBilgi) {
|
|
437
|
+
return book.subject || ilkUstBilgi || "Rapor";
|
|
438
|
+
}
|
|
439
|
+
static bosRaporSheetAdiniVer(sonuc) {
|
|
440
|
+
const ilkSheetAdi = sonuc.sheets[0]?.sheetName;
|
|
441
|
+
return this.sayfaAdiDuzenle(ilkSheetAdi || "Rapor", 1);
|
|
442
|
+
}
|
|
443
|
+
static aktifSayfayiAyarla(workbook, activeSheetNo, toplamSheetSayisi) {
|
|
444
|
+
const aktifTab = this.aktifTabNoVer(activeSheetNo, toplamSheetSayisi);
|
|
445
|
+
if (aktifTab === void 0) return;
|
|
446
|
+
workbook.views = [{
|
|
447
|
+
activeTab: aktifTab,
|
|
448
|
+
firstSheet: aktifTab,
|
|
449
|
+
height: 2e4,
|
|
450
|
+
visibility: "visible",
|
|
451
|
+
width: 2e4,
|
|
452
|
+
x: 0,
|
|
453
|
+
y: 0
|
|
454
|
+
}];
|
|
455
|
+
}
|
|
456
|
+
static aktifTabNoVer(activeSheetNo, toplamSheetSayisi) {
|
|
457
|
+
if (toplamSheetSayisi <= 0) return;
|
|
458
|
+
return Math.min((Number.isFinite(activeSheetNo) && activeSheetNo > 0 ? activeSheetNo : 1) - 1, toplamSheetSayisi - 1);
|
|
459
|
+
}
|
|
460
|
+
static sheetGrupSirasiVer(sheetGrup) {
|
|
461
|
+
return sheetGrup.sheetNo ?? Number.MAX_SAFE_INTEGER;
|
|
462
|
+
}
|
|
463
|
+
static yeniFormatUstBilgileriYaz(worksheet, ustBilgiler, defaultFont) {
|
|
464
|
+
for (let index = 0; index < ustBilgiler.length; index++) {
|
|
465
|
+
const ustBilgi = ustBilgiler[index];
|
|
466
|
+
const hucre = worksheet.getCell(index + 1, 1);
|
|
467
|
+
hucre.value = ustBilgi.ustBilgi;
|
|
468
|
+
this.hucreFontunuUygula(hucre, ustBilgi.font, defaultFont);
|
|
469
|
+
hucre.alignment = {
|
|
470
|
+
horizontal: "left",
|
|
471
|
+
vertical: "middle",
|
|
472
|
+
wrapText: false
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
static ustBilgileriYaz(worksheet, ustBilgiler, defaultFont) {
|
|
477
|
+
for (const ustBilgi of ustBilgiler) {
|
|
478
|
+
const hucre = worksheet.getCell(ustBilgi.rowNo ?? 1, 1);
|
|
479
|
+
hucre.value = ustBilgi.ustBilgi;
|
|
480
|
+
this.hucreFontunuUygula(hucre, ustBilgi.font, defaultFont);
|
|
481
|
+
hucre.alignment = {
|
|
482
|
+
horizontal: "left",
|
|
483
|
+
vertical: "middle",
|
|
484
|
+
wrapText: false
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
static notlariYazList(worksheet, notlar, notFont, baslangicSatiri, defaultFont) {
|
|
489
|
+
let satirNo = baslangicSatiri;
|
|
490
|
+
for (const not of notlar) {
|
|
491
|
+
const cell = worksheet.getCell(satirNo, 1);
|
|
492
|
+
cell.value = not;
|
|
493
|
+
this.hucreFontunuUygula(cell, notFont, defaultFont);
|
|
494
|
+
cell.alignment = {
|
|
495
|
+
vertical: "middle",
|
|
496
|
+
wrapText: true
|
|
497
|
+
};
|
|
498
|
+
satirNo++;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
static sayfaDuzeniniBelirle(worksheet, sheet) {
|
|
502
|
+
const { pageSetup } = sheet;
|
|
503
|
+
if (!pageSetup) return;
|
|
504
|
+
if (pageSetup.orientation === 2) worksheet.pageSetup.orientation = "landscape";
|
|
505
|
+
else if (pageSetup.orientation === 1) worksheet.pageSetup.orientation = "portrait";
|
|
506
|
+
if (pageSetup.leftMargin !== void 0 || pageSetup.rightMargin !== void 0 || pageSetup.topMargin !== void 0 || pageSetup.bottomMargin !== void 0 || pageSetup.headerMargin !== void 0 || pageSetup.footerMargin !== void 0) worksheet.pageSetup.margins = {
|
|
507
|
+
left: pageSetup.leftMargin ?? .7,
|
|
508
|
+
right: pageSetup.rightMargin ?? .7,
|
|
509
|
+
top: pageSetup.topMargin ?? .75,
|
|
510
|
+
bottom: pageSetup.bottomMargin ?? .75,
|
|
511
|
+
header: pageSetup.headerMargin ?? .3,
|
|
512
|
+
footer: pageSetup.footerMargin ?? .3
|
|
513
|
+
};
|
|
514
|
+
if (pageSetup.centerHorizontally !== void 0) worksheet.pageSetup.horizontalCentered = pageSetup.centerHorizontally;
|
|
515
|
+
if (pageSetup.centerVertically !== void 0) worksheet.pageSetup.verticalCentered = pageSetup.centerVertically;
|
|
516
|
+
const fitTall = pageSetup.fitToPagesTall;
|
|
517
|
+
const fitWide = pageSetup.fitToPagesWide;
|
|
518
|
+
if (fitTall !== void 0 || fitWide !== void 0 || pageSetup.fitToPagesTAut || pageSetup.fitToPagesWAut) {
|
|
519
|
+
worksheet.pageSetup.fitToPage = true;
|
|
520
|
+
worksheet.pageSetup.fitToHeight = pageSetup.fitToPagesTAut ? 0 : fitTall ?? 1;
|
|
521
|
+
worksheet.pageSetup.fitToWidth = pageSetup.fitToPagesWAut ? 0 : fitWide ?? 1;
|
|
522
|
+
}
|
|
523
|
+
if (typeof pageSetup.zoom === "number" && pageSetup.zoom > 0) worksheet.pageSetup.scale = pageSetup.zoom;
|
|
524
|
+
if (pageSetup.printArea) worksheet.pageSetup.printArea = pageSetup.printArea;
|
|
525
|
+
const pageHeader = this.baslikAltbilgiMetniOlustur(pageSetup.leftHeader, pageSetup.centerHeader, pageSetup.rightHeader);
|
|
526
|
+
const pageFooter = this.baslikAltbilgiMetniOlustur(pageSetup.leftFooter, pageSetup.centerFooter, pageSetup.rightFooter);
|
|
527
|
+
if (pageHeader) worksheet.headerFooter.oddHeader = pageHeader;
|
|
528
|
+
if (pageFooter) worksheet.headerFooter.oddFooter = pageFooter;
|
|
529
|
+
}
|
|
530
|
+
static baslikAltbilgiMetniOlustur(sol, orta, sag) {
|
|
531
|
+
const parcalar = [];
|
|
532
|
+
if (sol) parcalar.push(`&L${sol}`);
|
|
533
|
+
if (orta) parcalar.push(`&C${orta}`);
|
|
534
|
+
if (sag) parcalar.push(`&R${sag}`);
|
|
535
|
+
return parcalar.length ? parcalar.join("") : void 0;
|
|
536
|
+
}
|
|
537
|
+
static tabloyuYaz(worksheet, sonuc, kaynakTable) {
|
|
538
|
+
const table = kaynakTable;
|
|
539
|
+
const toplamSatiriVar = table.toplamSatiri === true && table.collection.length > 0 && table.columns.length > 0;
|
|
540
|
+
if (!table.columns.length) return table.ust ?? 1;
|
|
541
|
+
const startRow = Math.max(1, table.ust ?? 1);
|
|
542
|
+
const startCol = Math.max(1, table.sol ?? 1);
|
|
543
|
+
const gecerliTableStyle = this.gecerliTableStyleVer(sonuc.currentTableStyle);
|
|
544
|
+
const gorunenBaslikMetinleri = table.columns.map((column) => this.baslikMetniniHazirla(column.header.title || "")).map((title) => title.replaceAll("\n", " "));
|
|
545
|
+
const tabloKolonAdlari = this.benzersizKolonAdlariOlustur(gorunenBaslikMetinleri);
|
|
546
|
+
const tabloAdi = this.tabloAdiOlustur(worksheet.name, startRow, startCol);
|
|
547
|
+
const headerFont = table.header?.font;
|
|
548
|
+
const uygulanacakHeaderFont = headerFont?.color ? headerFont : {
|
|
549
|
+
...headerFont,
|
|
550
|
+
color: "FFFFFFFF"
|
|
551
|
+
};
|
|
552
|
+
const dataFont = table.data?.font;
|
|
553
|
+
const hiddenRowSet = new Set(table.hiddenRows ?? []);
|
|
554
|
+
const formulCeller = [];
|
|
555
|
+
const hucreFontRenkleri = [];
|
|
556
|
+
const satirlar = table.collection.map((rowData, rowIndex) => table.columns.map((column, colIndex) => {
|
|
557
|
+
const hazirHucre = this.hucreDegeriniHazirla(rowData, column, sonuc.sifirlariBasmaSayi);
|
|
558
|
+
hucreFontRenkleri[rowIndex] ??= [];
|
|
559
|
+
hucreFontRenkleri[rowIndex][colIndex] = hazirHucre.fontColorArgb;
|
|
560
|
+
if (hazirHucre.deger !== null && typeof hazirHucre.deger === "object" && "formula" in hazirHucre.deger) {
|
|
561
|
+
formulCeller.push({
|
|
562
|
+
rowIndex,
|
|
563
|
+
colIndex,
|
|
564
|
+
column,
|
|
565
|
+
formula: hazirHucre.deger
|
|
566
|
+
});
|
|
567
|
+
return "";
|
|
568
|
+
}
|
|
569
|
+
return hazirHucre.deger;
|
|
570
|
+
}));
|
|
571
|
+
const toplamHucreleri = toplamSatiriVar ? this.toplamHucreleriniHazirla(table) : [];
|
|
572
|
+
this.kolonGrubuYaz(worksheet, startRow, startCol, table);
|
|
573
|
+
const headerRow = worksheet.getRow(startRow);
|
|
574
|
+
const tableStyle = this.tableStyleDonustur(gecerliTableStyle);
|
|
575
|
+
const bosSatirEklendi = satirlar.length === 0;
|
|
576
|
+
const tabloSatirlari = bosSatirEklendi ? [table.columns.map(() => "")] : satirlar;
|
|
577
|
+
worksheet.addTable({
|
|
578
|
+
name: tabloAdi,
|
|
579
|
+
ref: worksheet.getCell(startRow, startCol).address,
|
|
580
|
+
headerRow: true,
|
|
581
|
+
totalsRow: toplamSatiriVar,
|
|
582
|
+
...tableStyle && { style: tableStyle },
|
|
583
|
+
columns: tabloKolonAdlari.map((ad, index) => ({
|
|
584
|
+
name: ad,
|
|
585
|
+
filterButton: true,
|
|
586
|
+
...toplamSatiriVar && this.toplamSatiriKolonuVer(toplamHucreleri[index]?.deger, index, this.toplamFonksiyonuVer(table.columns[index]), table.columns[index].toplamFormulu ? this.toplamFormuluExcelMetniVer(table, table.columns[index].toplamFormulu, tabloAdi, tabloKolonAdlari) : void 0)
|
|
587
|
+
})),
|
|
588
|
+
rows: tabloSatirlari
|
|
589
|
+
});
|
|
590
|
+
if (bosSatirEklendi) worksheet.getRow(startRow + 1).hidden = true;
|
|
591
|
+
this.kolonGenislikleriniUygula(worksheet, startCol, table.columns, satirlar, table.autoFit, toplamHucreleri.map((hucre) => hucre.deger));
|
|
592
|
+
this.kolonGruplariniUygula(worksheet, startCol, table);
|
|
593
|
+
for (let colIndex = 0; colIndex < table.columns.length; colIndex++) {
|
|
594
|
+
const column = table.columns[colIndex];
|
|
595
|
+
const cell = headerRow.getCell(startCol + colIndex);
|
|
596
|
+
cell.alignment = {
|
|
597
|
+
horizontal: this.yatayHizaDonustur(column.header.horizontalAlignment),
|
|
598
|
+
vertical: "bottom",
|
|
599
|
+
wrapText: false
|
|
600
|
+
};
|
|
601
|
+
this.hucreFontunuUygula(cell, uygulanacakHeaderFont, sonuc.defaultFont);
|
|
602
|
+
}
|
|
603
|
+
for (let rowIndex = 0; rowIndex < table.collection.length; rowIndex++) {
|
|
604
|
+
const wsRow = worksheet.getRow(startRow + 1 + rowIndex);
|
|
605
|
+
const satir1Bazli = rowIndex + 1;
|
|
606
|
+
if (hiddenRowSet.has(satir1Bazli)) wsRow.hidden = true;
|
|
607
|
+
const rowHeight = table.rowHeights?.find((rh) => rh.rowNo === satir1Bazli);
|
|
608
|
+
if (rowHeight?.height) wsRow.height = rowHeight.height;
|
|
609
|
+
for (let colIndex = 0; colIndex < table.columns.length; colIndex++) {
|
|
610
|
+
const column = table.columns[colIndex];
|
|
611
|
+
const cell = wsRow.getCell(startCol + colIndex);
|
|
612
|
+
const hucreDegeri = satirlar[rowIndex][colIndex];
|
|
613
|
+
cell.value = hucreDegeri;
|
|
614
|
+
this.hucreFontunuUygula(cell, dataFont, sonuc.defaultFont);
|
|
615
|
+
const hucreFontRengi = hucreFontRenkleri[rowIndex]?.[colIndex];
|
|
616
|
+
if (hucreFontRengi) cell.font = {
|
|
617
|
+
...cell.font ?? {},
|
|
618
|
+
color: { argb: hucreFontRengi }
|
|
619
|
+
};
|
|
620
|
+
const numFmt = this.numberFormatDonustur(this.kolonFormatiniBelirle(column));
|
|
621
|
+
if (numFmt) cell.numFmt = numFmt;
|
|
622
|
+
else if (hucreDegeri instanceof Date) cell.numFmt = this.varsayilanTarihFormatiniVer();
|
|
623
|
+
const hucreHizasi = this.hucreYatayHizasiniBelirle(column);
|
|
624
|
+
cell.alignment = {
|
|
625
|
+
...hucreHizasi !== void 0 && { horizontal: hucreHizasi },
|
|
626
|
+
vertical: this.dikeyHizaDonustur(column.verticalAlignment),
|
|
627
|
+
wrapText: false
|
|
628
|
+
};
|
|
629
|
+
const colFontColor = table.columnFontColors?.[colIndex];
|
|
630
|
+
if (colFontColor) {
|
|
631
|
+
const argb = this.argbDonustur(colFontColor);
|
|
632
|
+
if (argb) cell.font = {
|
|
633
|
+
...cell.font ?? {},
|
|
634
|
+
color: { argb }
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
const colIntColor = this.kolonRenginiBul(table.columnInteriorColors, colIndex);
|
|
638
|
+
if (colIntColor) {
|
|
639
|
+
const argb = this.argbDonustur(colIntColor);
|
|
640
|
+
if (argb) cell.fill = {
|
|
641
|
+
type: "pattern",
|
|
642
|
+
pattern: "solid",
|
|
643
|
+
fgColor: { argb }
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
const rowFontColor = table.rowFontColors?.find((rc) => rc.rowNo === satir1Bazli);
|
|
647
|
+
if (rowFontColor) {
|
|
648
|
+
const argb = this.argbDonustur(rowFontColor.color);
|
|
649
|
+
if (argb) cell.font = {
|
|
650
|
+
...cell.font ?? {},
|
|
651
|
+
color: { argb }
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
const rowIntColor = table.rowInteriorColors?.find((rc) => rc.rowNo === satir1Bazli);
|
|
655
|
+
if (rowIntColor) {
|
|
656
|
+
const argb = this.argbDonustur(rowIntColor.color);
|
|
657
|
+
if (argb) cell.fill = {
|
|
658
|
+
type: "pattern",
|
|
659
|
+
pattern: "solid",
|
|
660
|
+
fgColor: { argb }
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
for (const { rowIndex, colIndex, column, formula } of formulCeller) {
|
|
666
|
+
const cell = worksheet.getRow(startRow + 1 + rowIndex).getCell(startCol + colIndex);
|
|
667
|
+
cell.value = formula;
|
|
668
|
+
const formulHizasi = this.hucreYatayHizasiniBelirle(column);
|
|
669
|
+
cell.alignment = {
|
|
670
|
+
...cell.alignment ?? {},
|
|
671
|
+
...formulHizasi !== void 0 && { horizontal: formulHizasi }
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
let sonSatir = startRow + table.collection.length;
|
|
675
|
+
if (toplamSatiriVar) {
|
|
676
|
+
sonSatir++;
|
|
677
|
+
this.toplamSatiriniYaz(worksheet, sonuc, table, toplamHucreleri, sonSatir, startCol);
|
|
678
|
+
}
|
|
679
|
+
this.farkRenkleriniUygula(worksheet, table, startRow + 1, sonSatir, startCol);
|
|
680
|
+
const footer = table.footer;
|
|
681
|
+
if (footer?.basilacak) {
|
|
682
|
+
const ustBosluk = footer.ustBosluk ?? 0;
|
|
683
|
+
const satirSayisi = footer.satirSayisi ?? 1;
|
|
684
|
+
const footerBasSatir = sonSatir + 1 + ustBosluk;
|
|
685
|
+
for (let fi = 0; fi < satirSayisi; fi++) {
|
|
686
|
+
const footerRow = worksheet.getRow(footerBasSatir + fi);
|
|
687
|
+
for (let colIndex = 0; colIndex < table.columns.length; colIndex++) {
|
|
688
|
+
const column = table.columns[colIndex];
|
|
689
|
+
const cell = footerRow.getCell(startCol + colIndex);
|
|
690
|
+
this.hucreFontunuUygula(cell, footer.font, sonuc.defaultFont);
|
|
691
|
+
const colFooter = column.footer;
|
|
692
|
+
if (colFooter?.isFunction) {
|
|
693
|
+
const footerFormula = this.footerFormulunuOlustur(column, colIndex, startRow, startCol, table.collection.length);
|
|
694
|
+
if (footerFormula) {
|
|
695
|
+
cell.value = { formula: footerFormula };
|
|
696
|
+
const numFmt = this.numberFormatDonustur(this.kolonFormatiniBelirle(column));
|
|
697
|
+
if (numFmt) cell.numFmt = numFmt;
|
|
698
|
+
}
|
|
699
|
+
} else if (colFooter?.title) cell.value = colFooter.title;
|
|
700
|
+
const footerHizasi = colFooter?.isFunction ? this.hucreYatayHizasiniBelirle(column) : this.yatayHizaDonustur(colFooter?.horizontalAlignment);
|
|
701
|
+
cell.alignment = {
|
|
702
|
+
...footerHizasi !== void 0 && { horizontal: footerHizasi },
|
|
703
|
+
vertical: "middle",
|
|
704
|
+
wrapText: false
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
sonSatir = footerBasSatir + satirSayisi - 1;
|
|
709
|
+
}
|
|
710
|
+
return sonSatir;
|
|
711
|
+
}
|
|
712
|
+
static farkRenkleriniUygula(worksheet, table, ilkSatir, sonSatir, startCol) {
|
|
713
|
+
if (!table.collection.length) return;
|
|
714
|
+
for (let colIndex = 0; colIndex < table.columns.length; colIndex++) {
|
|
715
|
+
if (!table.columns[colIndex].farkRenkli) continue;
|
|
716
|
+
const ilkHucre = worksheet.getCell(ilkSatir, startCol + colIndex).address;
|
|
717
|
+
const sonHucre = worksheet.getCell(sonSatir, startCol + colIndex).address;
|
|
718
|
+
worksheet.addConditionalFormatting({
|
|
719
|
+
ref: `${ilkHucre}:${sonHucre}`,
|
|
720
|
+
rules: [{
|
|
721
|
+
type: "cellIs",
|
|
722
|
+
operator: "greaterThan",
|
|
723
|
+
formulae: [0],
|
|
724
|
+
priority: 1,
|
|
725
|
+
style: { font: { color: { argb: "FF16A34A" } } }
|
|
726
|
+
}, {
|
|
727
|
+
type: "cellIs",
|
|
728
|
+
operator: "lessThan",
|
|
729
|
+
formulae: [0],
|
|
730
|
+
priority: 2,
|
|
731
|
+
style: { font: { color: { argb: "FFDC2626" } } }
|
|
732
|
+
}]
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
static toplamHucreleriniHazirla(table) {
|
|
737
|
+
return table.columns.map((column, colIndex) => {
|
|
738
|
+
if (colIndex === 0) return { deger: table.toplamEtiketi ?? "Toplam" };
|
|
739
|
+
if (column.toplamFormulu) return { deger: this.toplamFormuluSonucuVer(table, column.toplamFormulu) ?? null };
|
|
740
|
+
const fonksiyon = this.toplamFonksiyonuVer(column);
|
|
741
|
+
if (!fonksiyon) return { deger: null };
|
|
742
|
+
const { adet, toplam } = this.kolonToplaminiVer(table, column.property);
|
|
743
|
+
if (fonksiyon === "average") return { deger: adet ? toplam / adet : 0 };
|
|
744
|
+
return { deger: toplam };
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
static kolonToplaminiVer(table, property) {
|
|
748
|
+
let toplam = 0;
|
|
749
|
+
let adet = 0;
|
|
750
|
+
for (const row of table.collection) {
|
|
751
|
+
const hamDeger = row[property];
|
|
752
|
+
const sayi = Number(hamDeger);
|
|
753
|
+
if (hamDeger !== null && hamDeger !== void 0 && hamDeger !== "" && Number.isFinite(sayi)) {
|
|
754
|
+
toplam += sayi;
|
|
755
|
+
adet++;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
return {
|
|
759
|
+
adet,
|
|
760
|
+
toplam
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
static toplamFormulundekiKolonlariVer(table, formul) {
|
|
764
|
+
const properties = [...formul.matchAll(/\{([^{}]+)\}/g)].map((eslesme) => eslesme[1]);
|
|
765
|
+
const tumKolonlarVar = properties.every((property) => table.columns.some((kolon) => kolon.property === property));
|
|
766
|
+
return properties.length && tumKolonlarVar ? properties : void 0;
|
|
767
|
+
}
|
|
768
|
+
static toplamFormuluSonucuVer(table, formul) {
|
|
769
|
+
if (!this.toplamFormulundekiKolonlariVer(table, formul)) return;
|
|
770
|
+
const sayisalFormul = formul.replaceAll(/\{([^{}]+)\}/g, (_eslesme, property) => {
|
|
771
|
+
const { toplam } = this.kolonToplaminiVer(table, property);
|
|
772
|
+
return toplam < 0 ? `(${toplam})` : String(toplam);
|
|
773
|
+
});
|
|
774
|
+
return ToplamFormuluHesaplayici.hesapla(sayisalFormul);
|
|
775
|
+
}
|
|
776
|
+
static toplamFormuluExcelMetniVer(table, formul, tabloAdi, kolonAdlari) {
|
|
777
|
+
if (!this.toplamFormulundekiKolonlariVer(table, formul)) return;
|
|
778
|
+
return formul.replaceAll(/\{([^{}]+)\}/g, (_eslesme, property) => {
|
|
779
|
+
return `SUBTOTAL(109,${tabloAdi}[${kolonAdlari[table.columns.findIndex((kolon) => kolon.property === property)].replaceAll(/[[\]#']/g, "'$&")}])`;
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
static toplamFonksiyonuVer(column) {
|
|
783
|
+
if (column.toplamFonksiyonu === "none" || column.toplamFormulu) return;
|
|
784
|
+
return column.toplamFonksiyonu ?? (this.sayisalKolonMu(column.arrayType) ? "sum" : void 0);
|
|
785
|
+
}
|
|
786
|
+
static toplamSatiriKolonuVer(deger, kolonIndex, fonksiyon, excelFormulu) {
|
|
787
|
+
if (kolonIndex === 0) return { totalsRowLabel: typeof deger === "string" ? deger : "" };
|
|
788
|
+
if (excelFormulu) return {
|
|
789
|
+
totalsRowFormula: excelFormulu,
|
|
790
|
+
totalsRowFunction: "custom",
|
|
791
|
+
...typeof deger === "number" && { totalsRowResult: deger }
|
|
792
|
+
};
|
|
793
|
+
return fonksiyon ? { totalsRowFunction: fonksiyon } : void 0;
|
|
794
|
+
}
|
|
795
|
+
static toplamSatiriniYaz(worksheet, sonuc, table, toplamHucreleri, satirNo, startCol) {
|
|
796
|
+
const wsRow = worksheet.getRow(satirNo);
|
|
797
|
+
for (let colIndex = 0; colIndex < table.columns.length; colIndex++) {
|
|
798
|
+
const column = table.columns[colIndex];
|
|
799
|
+
const cell = wsRow.getCell(startCol + colIndex);
|
|
800
|
+
const deger = toplamHucreleri[colIndex]?.deger;
|
|
801
|
+
if (colIndex > 0 && typeof deger === "number" && typeof cell.value === "object" && cell.value !== null && "formula" in cell.value) cell.value = {
|
|
802
|
+
...cell.value,
|
|
803
|
+
result: deger
|
|
804
|
+
};
|
|
805
|
+
this.hucreFontunuUygula(cell, table.data?.font, sonuc.defaultFont);
|
|
806
|
+
cell.font = {
|
|
807
|
+
...cell.font ?? {},
|
|
808
|
+
bold: true
|
|
809
|
+
};
|
|
810
|
+
if (column.farkRenkli && typeof deger === "number" && deger !== 0) cell.font = {
|
|
811
|
+
...cell.font,
|
|
812
|
+
color: { argb: deger > 0 ? "FF16A34A" : "FFDC2626" }
|
|
813
|
+
};
|
|
814
|
+
cell.fill = {
|
|
815
|
+
type: "pattern",
|
|
816
|
+
pattern: "solid",
|
|
817
|
+
fgColor: { argb: "FFDDEBF7" }
|
|
818
|
+
};
|
|
819
|
+
const numFmt = this.numberFormatDonustur(this.kolonFormatiniBelirle(column));
|
|
820
|
+
if (numFmt) cell.numFmt = numFmt;
|
|
821
|
+
const hucreHizasi = this.hucreYatayHizasiniBelirle(column);
|
|
822
|
+
cell.alignment = {
|
|
823
|
+
...hucreHizasi !== void 0 && { horizontal: hucreHizasi },
|
|
824
|
+
vertical: this.dikeyHizaDonustur(column.verticalAlignment),
|
|
825
|
+
wrapText: false
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
static kolonGenislikleriniUygula(worksheet, startCol, columns, satirlar, autoFit, ekSatir) {
|
|
830
|
+
const filtreButonuBoslukPayi = 1.25;
|
|
831
|
+
const veriSagBoslukPayi = 1;
|
|
832
|
+
const autoFitAktif = autoFit !== false;
|
|
833
|
+
for (let index = 0; index < columns.length; index++) {
|
|
834
|
+
const worksheetColumn = worksheet.getColumn(startCol + index);
|
|
835
|
+
const tasarimGenisligi = (columns[index].width ?? 0) > 0 ? Math.round(columns[index].width / 7) : 0;
|
|
836
|
+
if (!autoFitAktif) {
|
|
837
|
+
worksheetColumn.width = tasarimGenisligi > 0 ? tasarimGenisligi : 10;
|
|
838
|
+
continue;
|
|
839
|
+
}
|
|
840
|
+
const baslikUzunlugu = this.metinUzunlugu(this.baslikMetniniHazirla(columns[index].header.title));
|
|
841
|
+
let veriUzunlugu = ekSatir ? this.hucreMetinUzunlugu(ekSatir[index]) : 0;
|
|
842
|
+
for (const satir of satirlar) veriUzunlugu = Math.max(veriUzunlugu, this.hucreMetinUzunlugu(satir[index]));
|
|
843
|
+
worksheetColumn.width = Math.max(10, tasarimGenisligi, baslikUzunlugu + 2 + filtreButonuBoslukPayi, veriUzunlugu + 2 + veriSagBoslukPayi);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
static baslikMetniniHazirla(metin) {
|
|
847
|
+
return metin.replaceAll("\r\n", " ").replaceAll("\r", " ").replaceAll("\n", " ").trim();
|
|
848
|
+
}
|
|
849
|
+
static hucreMetinUzunlugu(deger) {
|
|
850
|
+
if (deger === null || deger === void 0) return 0;
|
|
851
|
+
if (typeof deger === "string") return this.metinUzunlugu(deger);
|
|
852
|
+
if (typeof deger === "number" || typeof deger === "boolean") return String(deger).length;
|
|
853
|
+
if (deger instanceof Date) return 19;
|
|
854
|
+
if (typeof deger === "object" && "formula" in deger) return this.metinUzunlugu(String(deger.formula));
|
|
855
|
+
return this.metinUzunlugu(String(deger));
|
|
856
|
+
}
|
|
857
|
+
static hucreYatayHizasiniBelirle(column) {
|
|
858
|
+
if (this.sayisalKolonMu(column.arrayType)) return "right";
|
|
859
|
+
if (this.booleanKolonMu(column.arrayType)) return "center";
|
|
860
|
+
if (column.horizontalAlignment === void 0) return;
|
|
861
|
+
return this.yatayHizaDonustur(column.horizontalAlignment);
|
|
862
|
+
}
|
|
863
|
+
static kolonFormatiniBelirle(column) {
|
|
864
|
+
if (column.format !== void 0 && column.format !== NumberFormatlar.belirsiz) return column.format;
|
|
865
|
+
switch (column.arrayType) {
|
|
866
|
+
case VariableType.integer:
|
|
867
|
+
case VariableType.longint: return NumberFormatlar.long;
|
|
868
|
+
case VariableType.real: return NumberFormatlar.real;
|
|
869
|
+
case VariableType.date: return NumberFormatlar.tarih;
|
|
870
|
+
default: return column.format;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
static sayisalKolonMu(arrayType) {
|
|
874
|
+
switch (arrayType) {
|
|
875
|
+
case VariableType.integer:
|
|
876
|
+
case VariableType.longint:
|
|
877
|
+
case VariableType.real: return true;
|
|
878
|
+
default: return false;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
static booleanKolonMu(arrayType) {
|
|
882
|
+
return arrayType === VariableType.boolean;
|
|
883
|
+
}
|
|
884
|
+
static metinUzunlugu(metin) {
|
|
885
|
+
return metin.replaceAll("\r", "").split("\n").reduce((max, parca) => Math.max(max, parca.trim().length), 0);
|
|
886
|
+
}
|
|
887
|
+
static kolonGruplariniUygula(worksheet, startCol, table) {
|
|
888
|
+
const gruplar = this.gecerliKolonGruplariniVer(table);
|
|
889
|
+
if (!gruplar.length) return;
|
|
890
|
+
const kolonSayisi = table.columns.length;
|
|
891
|
+
const ozetSolda = table.outlineSummaryPosition === "left";
|
|
892
|
+
const seviyeler = new Array(kolonSayisi).fill(0);
|
|
893
|
+
const gizliler = new Array(kolonSayisi).fill(false);
|
|
894
|
+
const kapaliOzetler = /* @__PURE__ */ new Set();
|
|
895
|
+
for (const grup of gruplar) {
|
|
896
|
+
for (let index = grup.baslangic; index <= grup.bitis; index++) {
|
|
897
|
+
seviyeler[index] = Math.min(seviyeler[index] + 1, this.enYuksekKolonGrupSeviyesi);
|
|
898
|
+
if (grup.kapali) gizliler[index] = true;
|
|
899
|
+
}
|
|
900
|
+
const ozetIndex = ozetSolda ? grup.baslangic - 1 : grup.bitis + 1;
|
|
901
|
+
if (grup.kapali && ozetIndex >= 0 && ozetIndex < kolonSayisi) kapaliOzetler.add(ozetIndex);
|
|
902
|
+
}
|
|
903
|
+
worksheet.properties.outlineLevelCol = Math.max(worksheet.properties.outlineLevelCol ?? 0, ...seviyeler);
|
|
904
|
+
worksheet.properties.outlineProperties = {
|
|
905
|
+
summaryBelow: true,
|
|
906
|
+
summaryRight: !ozetSolda
|
|
907
|
+
};
|
|
908
|
+
for (let index = 0; index < kolonSayisi; index++) {
|
|
909
|
+
const worksheetColumn = worksheet.getColumn(startCol + index);
|
|
910
|
+
worksheetColumn.outlineLevel = seviyeler[index];
|
|
911
|
+
if (gizliler[index]) worksheetColumn.hidden = true;
|
|
912
|
+
Object.defineProperty(worksheetColumn, "collapsed", {
|
|
913
|
+
value: kapaliOzetler.has(index),
|
|
914
|
+
configurable: true
|
|
915
|
+
});
|
|
916
|
+
Object.defineProperty(worksheetColumn, "equivalentTo", {
|
|
917
|
+
value: () => false,
|
|
918
|
+
configurable: true
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
static {
|
|
923
|
+
this.enYuksekKolonGrupSeviyesi = 7;
|
|
924
|
+
}
|
|
925
|
+
static gecerliKolonGruplariniVer(table) {
|
|
926
|
+
const adaylar = (table.outlineGroups ?? []).map((grup) => ({
|
|
927
|
+
baslangic: table.columns.findIndex((column) => column.property === grup.groupStart),
|
|
928
|
+
bitis: table.columns.findIndex((column) => column.property === grup.groupEnd),
|
|
929
|
+
kapali: grup.collapsed === true
|
|
930
|
+
})).filter((grup) => grup.baslangic >= 0 && grup.bitis >= grup.baslangic).sort((a, b) => a.baslangic - b.baslangic || b.bitis - a.bitis);
|
|
931
|
+
const kabulEdilenler = [];
|
|
932
|
+
for (const aday of adaylar) if (!kabulEdilenler.some((grup) => aday.baslangic <= grup.bitis && aday.bitis > grup.bitis)) kabulEdilenler.push(aday);
|
|
933
|
+
return kabulEdilenler;
|
|
934
|
+
}
|
|
935
|
+
static kolonGrubuYaz(worksheet, startRow, startCol, table) {
|
|
936
|
+
const columnGroups = table.columnGroup;
|
|
937
|
+
if (!columnGroups?.length || startRow <= 1) return;
|
|
938
|
+
const grupSatiri = startRow - 1;
|
|
939
|
+
for (const columnGroup of columnGroups) {
|
|
940
|
+
const baslangicIndex = table.columns.findIndex((column) => column.property === columnGroup.groupStart);
|
|
941
|
+
const bitisIndex = table.columns.findIndex((column) => column.property === columnGroup.groupEnd);
|
|
942
|
+
const baslangicKolonu = baslangicIndex >= 0 ? startCol + baslangicIndex : void 0;
|
|
943
|
+
const bitisKolonu = bitisIndex >= 0 ? startCol + bitisIndex : void 0;
|
|
944
|
+
if (!baslangicKolonu || !bitisKolonu || bitisKolonu < baslangicKolonu) continue;
|
|
945
|
+
worksheet.mergeCells(grupSatiri, baslangicKolonu, grupSatiri, bitisKolonu);
|
|
946
|
+
const grupHucre = worksheet.getCell(grupSatiri, baslangicKolonu);
|
|
947
|
+
grupHucre.value = columnGroup.groupName;
|
|
948
|
+
grupHucre.alignment = {
|
|
949
|
+
horizontal: "center",
|
|
950
|
+
vertical: "middle"
|
|
951
|
+
};
|
|
952
|
+
grupHucre.font = {
|
|
953
|
+
bold: true,
|
|
954
|
+
size: 11,
|
|
955
|
+
color: { argb: "FFF79646" }
|
|
956
|
+
};
|
|
957
|
+
grupHucre.fill = {
|
|
958
|
+
type: "pattern",
|
|
959
|
+
pattern: "solid",
|
|
960
|
+
fgColor: { argb: "FFFFFFFF" }
|
|
961
|
+
};
|
|
962
|
+
for (let col = baslangicKolonu; col <= bitisKolonu; col++) {
|
|
963
|
+
const hucre = worksheet.getCell(grupSatiri, col);
|
|
964
|
+
hucre.border = {
|
|
965
|
+
...hucre.border,
|
|
966
|
+
top: {
|
|
967
|
+
style: "medium",
|
|
968
|
+
color: { argb: "FFF79646" }
|
|
969
|
+
},
|
|
970
|
+
...col === baslangicKolonu ? { left: {
|
|
971
|
+
style: "medium",
|
|
972
|
+
color: { argb: "FFF79646" }
|
|
973
|
+
} } : hucre.border?.left ? { left: hucre.border.left } : {},
|
|
974
|
+
...col === bitisKolonu ? { right: {
|
|
975
|
+
style: "medium",
|
|
976
|
+
color: { argb: "FFF79646" }
|
|
977
|
+
} } : hucre.border?.right ? { right: hucre.border.right } : {}
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
static hucreDegeriniHazirla(row, column, sifirlariBasmaSayi) {
|
|
983
|
+
const value = row[column.property];
|
|
984
|
+
if (typeof value === "string" && value.startsWith("=")) return { deger: { formula: this.excelFormuluneDonustur(value) } };
|
|
985
|
+
if ((typeof value === "number" && value === 0 || typeof value === "string" && this.sayisalKolonMu(column.arrayType) && value.trim() !== "" && Number(value) === 0) && sifirlariBasmaSayi) return { deger: null };
|
|
986
|
+
if (value === null || value === void 0) return { deger: "" };
|
|
987
|
+
const htmlHucre = column.htmlKoduGelebilir === true && typeof value === "string" ? this.htmlHucreIceriginiHazirla(value) : void 0;
|
|
988
|
+
const normallesenDeger = htmlHucre?.deger ?? value;
|
|
989
|
+
if (typeof normallesenDeger === "string" && normallesenDeger.startsWith("=")) return this.hazirHucreDegeriOlustur({ formula: this.excelFormuluneDonustur(normallesenDeger) }, htmlHucre?.fontColorArgb);
|
|
990
|
+
if (typeof value === "string" && typeof normallesenDeger === "string") {
|
|
991
|
+
const tarihMetni = this.tarihStringiniExcelMetnineDonustur(normallesenDeger, column);
|
|
992
|
+
if (tarihMetni) return this.hazirHucreDegeriOlustur(tarihMetni, htmlHucre?.fontColorArgb);
|
|
993
|
+
const tarihDegeri = this.tarihStringiniDateeDonustur(normallesenDeger);
|
|
994
|
+
if (tarihDegeri) return this.hazirHucreDegeriOlustur(tarihDegeri, htmlHucre?.fontColorArgb);
|
|
995
|
+
}
|
|
996
|
+
if (normallesenDeger instanceof Date) return this.hazirHucreDegeriOlustur(this.excelIcinTarihiNormalizeEt(normallesenDeger), htmlHucre?.fontColorArgb);
|
|
997
|
+
if (this.booleanKolonMu(column.arrayType)) return this.hazirHucreDegeriOlustur(normallesenDeger === true ? "+" : "", htmlHucre?.fontColorArgb);
|
|
998
|
+
if (typeof normallesenDeger === "number" || typeof normallesenDeger === "string") return this.hazirHucreDegeriOlustur(normallesenDeger, htmlHucre?.fontColorArgb);
|
|
999
|
+
return this.hazirHucreDegeriOlustur(String(normallesenDeger), htmlHucre?.fontColorArgb);
|
|
1000
|
+
}
|
|
1001
|
+
static hazirHucreDegeriOlustur(deger, fontColorArgb) {
|
|
1002
|
+
return {
|
|
1003
|
+
deger,
|
|
1004
|
+
...fontColorArgb ? { fontColorArgb } : {}
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
static htmlHucreIceriginiHazirla(value) {
|
|
1008
|
+
if (!/[<>]/.test(value)) return;
|
|
1009
|
+
const deger = value.replaceAll(/<br\s*\/?>/gi, "\n").replaceAll(/<\/p\s*>/gi, "\n").replaceAll(/<p\b[^>]*>/gi, "").replaceAll(/<\/div\s*>/gi, "\n").replaceAll(/<div\b[^>]*>/gi, "").replaceAll(/<[^>]+>/g, "").replaceAll(/ /gi, " ").trim();
|
|
1010
|
+
const colorValue = this.htmlFontRenginiBul(value);
|
|
1011
|
+
const fontColorArgb = this.argbDonustur(colorValue);
|
|
1012
|
+
if (deger === value && !fontColorArgb) return;
|
|
1013
|
+
return {
|
|
1014
|
+
deger,
|
|
1015
|
+
...fontColorArgb && { fontColorArgb }
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1018
|
+
static htmlFontRenginiBul(value) {
|
|
1019
|
+
const fontColorMatch = /<font\b[^>]*\bcolor\s*=\s*["']?([^"' >]+)["']?[^>]*>/i.exec(value);
|
|
1020
|
+
if (fontColorMatch?.[1]) return fontColorMatch[1].trim();
|
|
1021
|
+
const styleColorMatch = /<(?:font|span)\b[^>]*\bstyle\s*=\s*["'][^"']*\bcolor\s*:\s*([^;"']+)/i.exec(value);
|
|
1022
|
+
if (styleColorMatch?.[1]) return styleColorMatch[1].trim();
|
|
1023
|
+
}
|
|
1024
|
+
static tarihStringiniDateeDonustur(value) {
|
|
1025
|
+
const trimmedValue = value.trim();
|
|
1026
|
+
const isoDateMatch = /^(\d{4})-(\d{2})-(\d{2})(?:$|[T\s])/.exec(trimmedValue);
|
|
1027
|
+
if (!isoDateMatch) return;
|
|
1028
|
+
const year = Number(isoDateMatch[1]);
|
|
1029
|
+
const month = Number(isoDateMatch[2]);
|
|
1030
|
+
const day = Number(isoDateMatch[3]);
|
|
1031
|
+
if (!Number.isInteger(year) || !Number.isInteger(month) || !Number.isInteger(day)) return;
|
|
1032
|
+
const date = new Date(year, month - 1, day);
|
|
1033
|
+
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) return;
|
|
1034
|
+
return new Date(Date.UTC(year, month - 1, day, 12, 0, 0, 0));
|
|
1035
|
+
}
|
|
1036
|
+
static tarihStringiniExcelMetnineDonustur(value, column) {
|
|
1037
|
+
if (!this.sadeceTarihKolonuMu(column)) return;
|
|
1038
|
+
const trimmedValue = value.trim();
|
|
1039
|
+
const isoDateMatch = /^(\d{4})-(\d{2})-(\d{2})$/.exec(trimmedValue);
|
|
1040
|
+
if (!isoDateMatch) return;
|
|
1041
|
+
const year = Number(isoDateMatch[1]);
|
|
1042
|
+
const month = Number(isoDateMatch[2]);
|
|
1043
|
+
const day = Number(isoDateMatch[3]);
|
|
1044
|
+
if (!Number.isInteger(year) || !Number.isInteger(month) || !Number.isInteger(day)) return;
|
|
1045
|
+
const date = new Date(year, month - 1, day);
|
|
1046
|
+
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) return;
|
|
1047
|
+
return `${String(day).padStart(2, "0")}.${String(month).padStart(2, "0")}.${year}`;
|
|
1048
|
+
}
|
|
1049
|
+
static excelIcinTarihiNormalizeEt(value) {
|
|
1050
|
+
if (value.getHours() !== 0 || value.getMinutes() !== 0 || value.getSeconds() !== 0 || value.getMilliseconds() !== 0) return value;
|
|
1051
|
+
return new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate(), 12, 0, 0, 0));
|
|
1052
|
+
}
|
|
1053
|
+
static varsayilanTarihFormatiniVer() {
|
|
1054
|
+
return "dd.mm.yyyy";
|
|
1055
|
+
}
|
|
1056
|
+
static sadeceTarihKolonuMu(column) {
|
|
1057
|
+
return this.kolonFormatiniBelirle(column) === NumberFormatlar.tarih;
|
|
1058
|
+
}
|
|
1059
|
+
static benzersizKolonAdlariOlustur(adlar) {
|
|
1060
|
+
const sayaclar = /* @__PURE__ */ new Map();
|
|
1061
|
+
return adlar.map((ad) => {
|
|
1062
|
+
const temelAd = ad || " ";
|
|
1063
|
+
const sayi = sayaclar.get(temelAd) ?? 0;
|
|
1064
|
+
sayaclar.set(temelAd, sayi + 1);
|
|
1065
|
+
return sayi === 0 ? temelAd : `${temelAd}_${sayi}`;
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
static hucreFontunuUygula(cell, font, defaultFont) {
|
|
1069
|
+
const style = font?.style ?? 0;
|
|
1070
|
+
const excelFont = {};
|
|
1071
|
+
const fontName = font?.name || defaultFont?.name;
|
|
1072
|
+
if (fontName) excelFont.name = fontName;
|
|
1073
|
+
const fontSize = font?.size && font.size > 0 ? font.size : defaultFont?.size;
|
|
1074
|
+
if (fontSize && fontSize > 0) excelFont.size = fontSize;
|
|
1075
|
+
if (font?.color) {
|
|
1076
|
+
const color = this.argbDonustur(font.color);
|
|
1077
|
+
if (color) excelFont.color = { argb: color };
|
|
1078
|
+
}
|
|
1079
|
+
excelFont.bold = Boolean(style & FontStyle.bold);
|
|
1080
|
+
excelFont.italic = Boolean(style & FontStyle.italic);
|
|
1081
|
+
excelFont.underline = Boolean(style & FontStyle.underline);
|
|
1082
|
+
cell.font = excelFont;
|
|
1083
|
+
}
|
|
1084
|
+
static gecerliTableStyleVer(tableStyle) {
|
|
1085
|
+
if (!tableStyle) return;
|
|
1086
|
+
const style = tableStyle.trim();
|
|
1087
|
+
if (/^TableStyleLight([1-9]|1\d|2[0-1])$/.test(style)) return style;
|
|
1088
|
+
if (/^TableStyleMedium([1-9]|1\d|2[0-1])$/.test(style)) return style;
|
|
1089
|
+
if (/^TableStyleDark([1-9]|10|11)$/.test(style)) return style;
|
|
1090
|
+
}
|
|
1091
|
+
static tableStyleDonustur(theme) {
|
|
1092
|
+
if (!theme) return;
|
|
1093
|
+
return {
|
|
1094
|
+
theme,
|
|
1095
|
+
showRowStripes: true
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
static tabloAdiOlustur(sheetName, startRow, startCol) {
|
|
1099
|
+
return `T_${sheetName.replaceAll(/[^A-Za-z0-9]/g, "_")}_R${startRow}C${startCol}`;
|
|
1100
|
+
}
|
|
1101
|
+
static yatayHizaDonustur(value) {
|
|
1102
|
+
switch (value) {
|
|
1103
|
+
case XLHAlign.xlHAlignCenter: return "center";
|
|
1104
|
+
case XLHAlign.xlHAlignCenterAcrossSelection: return "centerContinuous";
|
|
1105
|
+
case XLHAlign.xlHAlignDistributed: return "distributed";
|
|
1106
|
+
case XLHAlign.xlHAlignFill: return "fill";
|
|
1107
|
+
case XLHAlign.xlHAlignGeneral: return "left";
|
|
1108
|
+
case XLHAlign.xlHAlignJustify: return "justify";
|
|
1109
|
+
case XLHAlign.xlHAlignLeft: return "left";
|
|
1110
|
+
case XLHAlign.xlHAlignRight: return "right";
|
|
1111
|
+
default: return "left";
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
static dikeyHizaDonustur(value) {
|
|
1115
|
+
switch (value) {
|
|
1116
|
+
case XLVAlign.xlVAlignTop: return "top";
|
|
1117
|
+
case XLVAlign.xlVAlignBottom: return "bottom";
|
|
1118
|
+
case XLVAlign.xlVAlignDistributed: return "distributed";
|
|
1119
|
+
case XLVAlign.xlVAlignJustify: return "justify";
|
|
1120
|
+
default: return "middle";
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
static argbDonustur(color) {
|
|
1124
|
+
if (!color) return;
|
|
1125
|
+
const cssColor = color.trim().toLowerCase();
|
|
1126
|
+
const rgbMatch = cssColor.match(/^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);
|
|
1127
|
+
if (rgbMatch) {
|
|
1128
|
+
const rgbDegerleri = rgbMatch.slice(1).map((value) => Number(value));
|
|
1129
|
+
if (rgbDegerleri.every((value) => Number.isInteger(value) && value >= 0 && value <= 255)) return `FF${rgbDegerleri.map((value) => value.toString(16).padStart(2, "0")).join("").toUpperCase()}`;
|
|
1130
|
+
}
|
|
1131
|
+
const namedColors = {
|
|
1132
|
+
black: "FF000000",
|
|
1133
|
+
blue: "FF0000FF",
|
|
1134
|
+
cyan: "FF00FFFF",
|
|
1135
|
+
gray: "FF808080",
|
|
1136
|
+
green: "FF008000",
|
|
1137
|
+
grey: "FF808080",
|
|
1138
|
+
magenta: "FFFF00FF",
|
|
1139
|
+
orange: "FFFFA500",
|
|
1140
|
+
purple: "FF800080",
|
|
1141
|
+
red: "FFFF0000",
|
|
1142
|
+
white: "FFFFFFFF",
|
|
1143
|
+
yellow: "FFFFFF00"
|
|
1144
|
+
};
|
|
1145
|
+
if (namedColors[cssColor]) return namedColors[cssColor];
|
|
1146
|
+
const hexColor = cssColor.replace("#", "");
|
|
1147
|
+
if (/^[0-9a-f]{6}$/i.test(hexColor)) return `FF${hexColor.toUpperCase()}`;
|
|
1148
|
+
if (/^[0-9A-Fa-f]{8}$/.test(color)) return color.toUpperCase();
|
|
1149
|
+
const numericColor = Number(color);
|
|
1150
|
+
if (!Number.isFinite(numericColor)) return;
|
|
1151
|
+
return `FF${[
|
|
1152
|
+
numericColor & 255,
|
|
1153
|
+
numericColor >> 8 & 255,
|
|
1154
|
+
numericColor >> 16 & 255
|
|
1155
|
+
].map((value) => value.toString(16).padStart(2, "0")).join("").toUpperCase()}`;
|
|
1156
|
+
}
|
|
1157
|
+
static kolonRenginiBul(kolonRenkleri, colIndex) {
|
|
1158
|
+
const kolonRengi = kolonRenkleri?.[colIndex];
|
|
1159
|
+
if (typeof kolonRengi === "string") return kolonRengi;
|
|
1160
|
+
const kolonNo = colIndex + 1;
|
|
1161
|
+
for (const kolon of kolonRenkleri ?? []) if (typeof kolon === "object" && kolon.columnNo === kolonNo) return kolon.color;
|
|
1162
|
+
}
|
|
1163
|
+
static excelFormuluneDonustur(formul) {
|
|
1164
|
+
const ceviriler = {
|
|
1165
|
+
"TOPLA": "SUM",
|
|
1166
|
+
"EĞER": "IF",
|
|
1167
|
+
"VE": "AND",
|
|
1168
|
+
"VEYA": "OR",
|
|
1169
|
+
"YUVARLA": "ROUND",
|
|
1170
|
+
"EĞERSAY": "COUNTIF",
|
|
1171
|
+
"ETOPLA": "SUMIF",
|
|
1172
|
+
"ORTALAMA": "AVERAGE",
|
|
1173
|
+
"MİN": "MIN",
|
|
1174
|
+
"MAK": "MAX"
|
|
1175
|
+
};
|
|
1176
|
+
let sonuc = formul.slice(1).replaceAll(";", ",");
|
|
1177
|
+
for (const [kaynak, hedef] of Object.entries(ceviriler)) {
|
|
1178
|
+
const pattern = new RegExp(`\\b${kaynak}\\b`, "g");
|
|
1179
|
+
sonuc = sonuc.replace(pattern, hedef);
|
|
1180
|
+
}
|
|
1181
|
+
return sonuc;
|
|
1182
|
+
}
|
|
1183
|
+
static footerFormulunuOlustur(column, colIndex, startRow, startCol, veriSatirSayisi) {
|
|
1184
|
+
if (!veriSatirSayisi) return;
|
|
1185
|
+
const fonksiyon = String(column.footer?.function ?? "").trim().toUpperCase();
|
|
1186
|
+
if (!fonksiyon) return;
|
|
1187
|
+
const kolonHarf = worksheetColumnName(startCol + colIndex);
|
|
1188
|
+
const aralik = `${kolonHarf}${startRow + 1}:${kolonHarf}${startRow + veriSatirSayisi}`;
|
|
1189
|
+
if (fonksiyon === "SUBTOTAL") return `SUBTOTAL(9,${aralik})`;
|
|
1190
|
+
if ([
|
|
1191
|
+
"SUM",
|
|
1192
|
+
"AVERAGE",
|
|
1193
|
+
"COUNT",
|
|
1194
|
+
"COUNTA",
|
|
1195
|
+
"MAX",
|
|
1196
|
+
"MIN"
|
|
1197
|
+
].includes(fonksiyon)) return `${fonksiyon}(${aralik})`;
|
|
1198
|
+
}
|
|
1199
|
+
static sayfaAdiDuzenle(sheetName, index) {
|
|
1200
|
+
const temizAd = sheetName.replaceAll(/[\\/*?:[\]]/g, " ").trim().slice(0, 31);
|
|
1201
|
+
if (temizAd) return temizAd;
|
|
1202
|
+
return `Sheet${index}`;
|
|
1203
|
+
}
|
|
1204
|
+
static dosyaAdiDuzenle(dosyaAdi) {
|
|
1205
|
+
const temizAd = dosyaAdi.replaceAll(/[<>:"/\\|?*]/g, " ").trim().replaceAll(/\s+/g, " ");
|
|
1206
|
+
if (temizAd) return temizAd;
|
|
1207
|
+
return "Rapor";
|
|
1208
|
+
}
|
|
1209
|
+
static numberFormatDonustur(format) {
|
|
1210
|
+
switch (format) {
|
|
1211
|
+
case NumberFormatlar.long:
|
|
1212
|
+
case 2:
|
|
1213
|
+
case 5:
|
|
1214
|
+
case 11: return "#,##0";
|
|
1215
|
+
case NumberFormatlar.real:
|
|
1216
|
+
case 7:
|
|
1217
|
+
case 12: return "#,##0.00";
|
|
1218
|
+
case 8: return "hh:mm";
|
|
1219
|
+
case NumberFormatlar.tarih: return "dd.mm.yyyy";
|
|
1220
|
+
case NumberFormatlar.tarih_yyyymmdd_tireli: return "yyyy-mm-dd";
|
|
1221
|
+
case NumberFormatlar.tarih_AAAAYYYY: return "mmmm yyyy";
|
|
1222
|
+
case NumberFormatlar.tarih_GGAAAAYYYY: return "dd mmmm yyyy";
|
|
1223
|
+
case NumberFormatlar.tarih_YYYYMMDD: return "yyyy/mm/dd";
|
|
1224
|
+
case NumberFormatlar.tarih_LongDate: return "dd mmmm yyyy dddd";
|
|
1225
|
+
case NumberFormatlar.tarih_ga: return "d.m;@";
|
|
1226
|
+
case NumberFormatlar.tarih_ggaa: return "dd.mm";
|
|
1227
|
+
case NumberFormatlar.tarih_gaaaa: return "d.mmmm";
|
|
1228
|
+
case NumberFormatlar.tarih_ggaaa: return "dd.mmm";
|
|
1229
|
+
case NumberFormatlar.tarih_ggaaaa: return "dd.mmmm";
|
|
1230
|
+
case NumberFormatlar.yuzde_BirHane: return "0.0%";
|
|
1231
|
+
case NumberFormatlar.genel: return "General";
|
|
1232
|
+
case NumberFormatlar.metin: return "@";
|
|
1233
|
+
case NumberFormatlar.imp: return "#,##0 \"imp\"";
|
|
1234
|
+
case NumberFormatlar.clicks: return "#,##0 \"Clicks\"";
|
|
1235
|
+
case NumberFormatlar.gun: return "#,##0 \"Gün\"";
|
|
1236
|
+
case NumberFormatlar.view: return "#,##0 \"View\"";
|
|
1237
|
+
case NumberFormatlar.session: return "#,##0 \"Session\"";
|
|
1238
|
+
case NumberFormatlar.kisi: return "#,##0 \"Kişi\"";
|
|
1239
|
+
case NumberFormatlar.okunma: return "#,##0 \"Okunma\"";
|
|
1240
|
+
case NumberFormatlar.dinlenme: return "#,##0 \"Dinlenme\"";
|
|
1241
|
+
case NumberFormatlar.lead: return "#,##0 \"Lead\"";
|
|
1242
|
+
case NumberFormatlar.gizli: return ";;;";
|
|
1243
|
+
case 28: return "#,##0.00 \"₺\"";
|
|
1244
|
+
default: return;
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1505
1248
|
function worksheetColumnName(columnNumber) {
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
class BlobResponseHandlerService {
|
|
1517
|
-
constructor() {
|
|
1518
|
-
this.translateService = inject(TranslateService);
|
|
1519
|
-
}
|
|
1520
|
-
handleReportResponse(response, successDetailKey, htmlTitle = 'Rapor Sonucu') {
|
|
1521
|
-
const body = response.body;
|
|
1522
|
-
if (!body) {
|
|
1523
|
-
return null;
|
|
1524
|
-
}
|
|
1525
|
-
const contentDisposition = response.headers.get('content-disposition');
|
|
1526
|
-
const contentType = response.headers.get('Content-Type') ?? body.type;
|
|
1527
|
-
if (contentDisposition) {
|
|
1528
|
-
return this.handleDownload(body, contentDisposition, contentType, successDetailKey);
|
|
1529
|
-
}
|
|
1530
|
-
this.handleViewHtml(body, htmlTitle);
|
|
1531
|
-
return null;
|
|
1532
|
-
}
|
|
1533
|
-
downloadResponse(response) {
|
|
1534
|
-
const body = response.body;
|
|
1535
|
-
if (!body) {
|
|
1536
|
-
return false;
|
|
1537
|
-
}
|
|
1538
|
-
const contentDisposition = response.headers.get('content-disposition');
|
|
1539
|
-
if (!contentDisposition) {
|
|
1540
|
-
return false;
|
|
1541
|
-
}
|
|
1542
|
-
const contentType = response.headers.get('Content-Type') ?? (body instanceof Blob ? body.type : 'application/octet-stream');
|
|
1543
|
-
this.downloadBlob(body, contentDisposition, contentType);
|
|
1544
|
-
return true;
|
|
1545
|
-
}
|
|
1546
|
-
viewHtmlBody(body, htmlTitle = 'Rapor Sonucu') {
|
|
1547
|
-
if (!body) {
|
|
1548
|
-
return;
|
|
1549
|
-
}
|
|
1550
|
-
this.handleViewHtml(body, htmlTitle);
|
|
1551
|
-
}
|
|
1552
|
-
async handleJsonExcelResponse(body, options) {
|
|
1553
|
-
if (!body) {
|
|
1554
|
-
return null;
|
|
1555
|
-
}
|
|
1556
|
-
try {
|
|
1557
|
-
const jsonStr = await body.text();
|
|
1558
|
-
const result = Object.assign(options.createResult(), JSON.parse(jsonStr));
|
|
1559
|
-
const fileName = options.getFileName?.(result) ?? options.fileName;
|
|
1560
|
-
if (!fileName) {
|
|
1561
|
-
return null;
|
|
1562
|
-
}
|
|
1563
|
-
await JsonToExcelParser.indir(result, fileName);
|
|
1564
|
-
return {
|
|
1565
|
-
severity: 'success',
|
|
1566
|
-
summary: this.translateService.instant('genel.bilgi'),
|
|
1567
|
-
detail: options.successDetail ?? this.translateService.instant(options.successDetailKey ?? '')
|
|
1568
|
-
};
|
|
1569
|
-
}
|
|
1570
|
-
catch (error) {
|
|
1571
|
-
console.error(options.errorLogMessage, error);
|
|
1572
|
-
return null;
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
handleDownload(body, contentDisposition, contentType, successDetailKey) {
|
|
1576
|
-
this.downloadBlob(body, contentDisposition, contentType);
|
|
1577
|
-
return {
|
|
1578
|
-
severity: 'success',
|
|
1579
|
-
summary: this.translateService.instant('genel.bilgi'),
|
|
1580
|
-
detail: this.translateService.instant(successDetailKey)
|
|
1581
|
-
};
|
|
1582
|
-
}
|
|
1583
|
-
downloadBlob(body, contentDisposition, contentType) {
|
|
1584
|
-
const decodedContentDisposition = contentDisposition.replaceAll(/\\u([0-9A-Fa-f]{4})/g, (_, code) => String.fromCodePoint(Number.parseInt(code, 16)));
|
|
1585
|
-
const filename = GlobalFunctions.getFilenameFromContentDisposition(decodedContentDisposition);
|
|
1586
|
-
const blob = new Blob([body], { type: contentType });
|
|
1587
|
-
saveAs(blob, filename);
|
|
1588
|
-
}
|
|
1589
|
-
handleViewHtml(body, htmlTitle) {
|
|
1590
|
-
body.text().then((html) => {
|
|
1591
|
-
const wnd = window.open('', '_blank');
|
|
1592
|
-
if (!wnd) {
|
|
1593
|
-
return;
|
|
1594
|
-
}
|
|
1595
|
-
wnd.document.title = htmlTitle;
|
|
1596
|
-
const iframe = wnd.document.createElement('iframe');
|
|
1597
|
-
iframe.style.width = '100%';
|
|
1598
|
-
iframe.style.height = '100%';
|
|
1599
|
-
iframe.style.border = 'none';
|
|
1600
|
-
iframe.setAttribute('srcdoc', html);
|
|
1601
|
-
wnd.document.body.style.margin = '0';
|
|
1602
|
-
wnd.document.body.style.padding = '0';
|
|
1603
|
-
wnd.document.body.appendChild(iframe);
|
|
1604
|
-
});
|
|
1605
|
-
}
|
|
1606
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: BlobResponseHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1607
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: BlobResponseHandlerService, providedIn: 'root' }); }
|
|
1249
|
+
let kalan = columnNumber;
|
|
1250
|
+
let sonuc = "";
|
|
1251
|
+
while (kalan > 0) {
|
|
1252
|
+
const mod = (kalan - 1) % 26;
|
|
1253
|
+
sonuc = String.fromCharCode(65 + mod) + sonuc;
|
|
1254
|
+
kalan = Math.floor((kalan - 1) / 26);
|
|
1255
|
+
}
|
|
1256
|
+
return sonuc;
|
|
1608
1257
|
}
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1258
|
+
var BlobResponseHandlerService = class BlobResponseHandlerService {
|
|
1259
|
+
constructor() {
|
|
1260
|
+
this.translateService = inject(TranslateService);
|
|
1261
|
+
}
|
|
1262
|
+
handleReportResponse(response, successDetailKey, htmlTitle = "Rapor Sonucu") {
|
|
1263
|
+
const body = response.body;
|
|
1264
|
+
if (!body) return null;
|
|
1265
|
+
const contentDisposition = response.headers.get("content-disposition");
|
|
1266
|
+
const contentType = response.headers.get("Content-Type") ?? body.type;
|
|
1267
|
+
if (contentDisposition) return this.handleDownload(body, contentDisposition, contentType, successDetailKey);
|
|
1268
|
+
this.handleViewHtml(body, htmlTitle);
|
|
1269
|
+
return null;
|
|
1270
|
+
}
|
|
1271
|
+
downloadResponse(response) {
|
|
1272
|
+
const body = response.body;
|
|
1273
|
+
if (!body) return false;
|
|
1274
|
+
const contentDisposition = response.headers.get("content-disposition");
|
|
1275
|
+
if (!contentDisposition) return false;
|
|
1276
|
+
const contentType = response.headers.get("Content-Type") ?? (body instanceof Blob ? body.type : "application/octet-stream");
|
|
1277
|
+
this.downloadBlob(body, contentDisposition, contentType);
|
|
1278
|
+
return true;
|
|
1279
|
+
}
|
|
1280
|
+
viewHtmlBody(body, htmlTitle = "Rapor Sonucu") {
|
|
1281
|
+
if (!body) return;
|
|
1282
|
+
this.handleViewHtml(body, htmlTitle);
|
|
1283
|
+
}
|
|
1284
|
+
async handleJsonExcelResponse(body, options) {
|
|
1285
|
+
if (!body) return null;
|
|
1286
|
+
try {
|
|
1287
|
+
const jsonStr = await body.text();
|
|
1288
|
+
const result = Object.assign(options.createResult(), JSON.parse(jsonStr));
|
|
1289
|
+
const fileName = options.getFileName?.(result) ?? options.fileName;
|
|
1290
|
+
if (!fileName) return null;
|
|
1291
|
+
await JsonToExcelParser.indir(result, fileName);
|
|
1292
|
+
return {
|
|
1293
|
+
severity: "success",
|
|
1294
|
+
summary: this.translateService.instant("genel.bilgi"),
|
|
1295
|
+
detail: options.successDetail ?? this.translateService.instant(options.successDetailKey ?? "")
|
|
1296
|
+
};
|
|
1297
|
+
} catch (error) {
|
|
1298
|
+
console.error(options.errorLogMessage, error);
|
|
1299
|
+
return null;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
handleDownload(body, contentDisposition, contentType, successDetailKey) {
|
|
1303
|
+
this.downloadBlob(body, contentDisposition, contentType);
|
|
1304
|
+
return {
|
|
1305
|
+
severity: "success",
|
|
1306
|
+
summary: this.translateService.instant("genel.bilgi"),
|
|
1307
|
+
detail: this.translateService.instant(successDetailKey)
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
downloadBlob(body, contentDisposition, contentType) {
|
|
1311
|
+
const decodedContentDisposition = contentDisposition.replaceAll(/\\u([0-9A-Fa-f]{4})/g, (_, code) => String.fromCodePoint(Number.parseInt(code, 16)));
|
|
1312
|
+
const filename = GlobalFunctions.getFilenameFromContentDisposition(decodedContentDisposition);
|
|
1313
|
+
const blob = new Blob([body], { type: contentType });
|
|
1314
|
+
saveAs(blob, filename);
|
|
1315
|
+
}
|
|
1316
|
+
handleViewHtml(body, htmlTitle) {
|
|
1317
|
+
body.text().then((html) => {
|
|
1318
|
+
const wnd = window.open("", "_blank");
|
|
1319
|
+
if (!wnd) return;
|
|
1320
|
+
wnd.document.title = htmlTitle;
|
|
1321
|
+
const iframe = wnd.document.createElement("iframe");
|
|
1322
|
+
iframe.style.width = "100%";
|
|
1323
|
+
iframe.style.height = "100%";
|
|
1324
|
+
iframe.style.border = "none";
|
|
1325
|
+
iframe.setAttribute("srcdoc", html);
|
|
1326
|
+
wnd.document.body.style.margin = "0";
|
|
1327
|
+
wnd.document.body.style.padding = "0";
|
|
1328
|
+
wnd.document.body.appendChild(iframe);
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
static {
|
|
1332
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1333
|
+
minVersion: "12.0.0",
|
|
1334
|
+
version: "22.2.3",
|
|
1335
|
+
ngImport: i0,
|
|
1336
|
+
type: BlobResponseHandlerService,
|
|
1337
|
+
deps: [],
|
|
1338
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
static {
|
|
1342
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1343
|
+
minVersion: "12.0.0",
|
|
1344
|
+
version: "22.2.3",
|
|
1345
|
+
ngImport: i0,
|
|
1346
|
+
type: BlobResponseHandlerService,
|
|
1347
|
+
providedIn: "root"
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
};
|
|
1351
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1352
|
+
minVersion: "12.0.0",
|
|
1353
|
+
version: "22.2.3",
|
|
1354
|
+
ngImport: i0,
|
|
1355
|
+
type: BlobResponseHandlerService,
|
|
1356
|
+
decorators: [{
|
|
1357
|
+
type: Injectable,
|
|
1358
|
+
args: [{ providedIn: "root" }]
|
|
1359
|
+
}]
|
|
1360
|
+
});
|
|
1618
1361
|
export { BlobResponseHandlerService, ExcelRaporuSonuc, JsonToExcelParser, JsonToExcelReportBuilder, JsonToExcelSheetBuilder, JsonToExcelTableBuilder };
|
|
1619
|
-
|
|
1362
|
+
|
|
1363
|
+
//# sourceMappingURL=limitng-blob-response-handler.mjs.map
|