@bookmypuja-tech/bmp-pdf 0.3.41 → 0.3.43

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/dist/index.d.ts CHANGED
@@ -300,6 +300,17 @@ interface InvoiceLevelReportProps {
300
300
  data: InvoiceLevelData[];
301
301
  }
302
302
 
303
+ interface IPujaCountData {
304
+ name: string;
305
+ quantity: number;
306
+ }
307
+ interface IPujaCountReportProps {
308
+ startDate: Date;
309
+ endDate: Date;
310
+ templeName: string;
311
+ data: IPujaCountData[];
312
+ }
313
+
303
314
  type sizeOptions = "A4" | "2Inch";
304
315
  declare const getPrintBlob: ({ size, data, dates, }: {
305
316
  size: sizeOptions;
@@ -311,7 +322,7 @@ declare const printDevoteeReceipt2Inch: (data: IPujaReceipt) => Promise<void>;
311
322
  declare const printTotalReceipt2Inch: (data: ITotalReceipt) => Promise<void>;
312
323
  declare const printePujaReport2Inch: (data: IPujaReport) => Promise<void>;
313
324
  declare const printQuickPrintReceipt2Inch: (data: IQuickReport) => Promise<void>;
314
- type IReportOptions = "kitchen" | "transaction" | "prasad-delivery" | "prasad" | "puja-detailed" | "puja-summary" | "combined-report" | "multi-temple-payment" | "settlements-report" | "invoice" | "postal-report" | "payment-settlement-report" | "invoice-breakup";
325
+ type IReportOptions = "kitchen" | "transaction" | "prasad-delivery" | "prasad" | "puja-detailed" | "puja-summary" | "combined-report" | "multi-temple-payment" | "settlements-report" | "invoice" | "postal-report" | "payment-settlement-report" | "invoice-breakup" | "puja-count";
315
326
  type IReportSize = "A4";
316
327
  type ReportDataTypes = {
317
328
  kitchen: KitchenReportProps;
@@ -327,6 +338,7 @@ type ReportDataTypes = {
327
338
  "postal-report": IPostalReportProps;
328
339
  "payment-settlement-report": PaymentSettlementProps;
329
340
  "invoice-breakup": InvoiceLevelReportProps;
341
+ "puja-count": IPujaCountReportProps;
330
342
  };
331
343
  declare class reportPrinter<T extends IReportOptions> {
332
344
  option: T;
@@ -336,4 +348,4 @@ declare class reportPrinter<T extends IReportOptions> {
336
348
  getBlob(data: ReportDataTypes[T]): Promise<Blob>;
337
349
  }
338
350
 
339
- export { A4Print, type IInvoiceData, type IInvoiceProps, type KitchenReportProps as IKitchenReport, type IMultiTemplePaymentReport, type IPostalReportProps, type IPrasadDelivery, type IPrasadReport, type IPrintablePuja, type IPujaReceipt, type IPujaList as IPujaReport, type ISettlementRow, type ISettlementsReport, type ISummaryPujaList as ISummaryPujaReport, type ITransactionReport, type InvoiceLevelData, type InvoiceLevelReportProps, type PaymentSettlementData, type PaymentSettlementProps, T2Inch, getA4SummaryBlob, getPrintBlob, printDevoteeReceipt2Inch, printQuickPrintReceipt2Inch, printTotalReceipt2Inch, printePujaReport2Inch, reportPrinter };
351
+ export { A4Print, type IInvoiceData, type IInvoiceProps, type KitchenReportProps as IKitchenReport, type IMultiTemplePaymentReport, type IPostalReportProps, type IPrasadDelivery, type IPrasadReport, type IPrintablePuja, type IPujaCountData, type IPujaCountReportProps, type IPujaReceipt, type IPujaList as IPujaReport, type ISettlementRow, type ISettlementsReport, type ISummaryPujaList as ISummaryPujaReport, type ITransactionReport, type InvoiceLevelData, type InvoiceLevelReportProps, type PaymentSettlementData, type PaymentSettlementProps, T2Inch, getA4SummaryBlob, getPrintBlob, printDevoteeReceipt2Inch, printQuickPrintReceipt2Inch, printTotalReceipt2Inch, printePujaReport2Inch, reportPrinter };
package/dist/index.js CHANGED
@@ -222,7 +222,7 @@ var A4Print = ({
222
222
  var A4Print_default = A4Print;
223
223
 
224
224
  // src/index.tsx
225
- import React22 from "react";
225
+ import React23 from "react";
226
226
 
227
227
  // src/sizes/T2Inch.tsx
228
228
  import React2 from "react";
@@ -4367,6 +4367,152 @@ var A4InvoiceLevelBreakup = ({
4367
4367
  };
4368
4368
  var A4InvoiceLevelBreakup_default = A4InvoiceLevelBreakup;
4369
4369
 
4370
+ // src/sizes/a4/A4PujaCountReport.tsx
4371
+ import { Document as Document17, Image as Image18, Page as Page17, View as View17 } from "@react-pdf/renderer";
4372
+ import React22 from "react";
4373
+ var A4PujaCountReport = ({
4374
+ startDate,
4375
+ endDate,
4376
+ templeName,
4377
+ data
4378
+ }) => {
4379
+ return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Document17, null, /* @__PURE__ */ React22.createElement(Page17, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React22.createElement(
4380
+ Image18,
4381
+ {
4382
+ fixed: true,
4383
+ style: {
4384
+ height: 15,
4385
+ width: 75,
4386
+ marginBottom: 10
4387
+ },
4388
+ src: bmpLogo
4389
+ }
4390
+ ), /* @__PURE__ */ React22.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Dates: ", startDate.toDateString(), " - ", endDate.toDateString()), /* @__PURE__ */ React22.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Total Puja Count Report"), /* @__PURE__ */ React22.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React22.createElement(
4391
+ View17,
4392
+ {
4393
+ style: {
4394
+ display: "flex",
4395
+ flexDirection: "column",
4396
+ marginTop: 20
4397
+ }
4398
+ },
4399
+ /* @__PURE__ */ React22.createElement(
4400
+ View17,
4401
+ {
4402
+ style: {
4403
+ display: "flex",
4404
+ flexDirection: "row",
4405
+ border: "1px solid #000",
4406
+ fontSize: 10,
4407
+ fontWeight: "semibold"
4408
+ }
4409
+ },
4410
+ /* @__PURE__ */ React22.createElement(
4411
+ View17,
4412
+ {
4413
+ style: {
4414
+ padding: 6,
4415
+ borderRight: "1px solid #000",
4416
+ width: "10%"
4417
+ }
4418
+ },
4419
+ /* @__PURE__ */ React22.createElement(Text_default, null, "Sr no")
4420
+ ),
4421
+ /* @__PURE__ */ React22.createElement(
4422
+ View17,
4423
+ {
4424
+ style: {
4425
+ padding: 6,
4426
+ borderRight: "1px solid #000",
4427
+ width: "40%"
4428
+ }
4429
+ },
4430
+ /* @__PURE__ */ React22.createElement(Text_default, null, "Puja Name")
4431
+ ),
4432
+ /* @__PURE__ */ React22.createElement(
4433
+ View17,
4434
+ {
4435
+ style: {
4436
+ padding: 6,
4437
+ borderRight: "1px solid #000",
4438
+ width: "15%"
4439
+ }
4440
+ },
4441
+ /* @__PURE__ */ React22.createElement(Text_default, null, "Total Count")
4442
+ ),
4443
+ /* @__PURE__ */ React22.createElement(
4444
+ View17,
4445
+ {
4446
+ style: {
4447
+ padding: 6,
4448
+ borderRight: "none",
4449
+ width: "35%"
4450
+ }
4451
+ },
4452
+ /* @__PURE__ */ React22.createElement(Text_default, null, "Remarks")
4453
+ )
4454
+ ),
4455
+ data.map((item, index) => {
4456
+ return /* @__PURE__ */ React22.createElement(
4457
+ View17,
4458
+ {
4459
+ style: {
4460
+ display: "flex",
4461
+ flexDirection: "row",
4462
+ border: "1px solid #000",
4463
+ borderTop: "none",
4464
+ fontSize: 10
4465
+ }
4466
+ },
4467
+ /* @__PURE__ */ React22.createElement(
4468
+ View17,
4469
+ {
4470
+ style: {
4471
+ padding: 6,
4472
+ borderRight: "1px solid #000",
4473
+ width: "10%"
4474
+ }
4475
+ },
4476
+ /* @__PURE__ */ React22.createElement(Text_default, null, index + 1)
4477
+ ),
4478
+ /* @__PURE__ */ React22.createElement(
4479
+ View17,
4480
+ {
4481
+ style: {
4482
+ padding: 6,
4483
+ borderRight: "1px solid #000",
4484
+ width: "40%"
4485
+ }
4486
+ },
4487
+ /* @__PURE__ */ React22.createElement(Text_default, null, item.name)
4488
+ ),
4489
+ /* @__PURE__ */ React22.createElement(
4490
+ View17,
4491
+ {
4492
+ style: {
4493
+ padding: 6,
4494
+ borderRight: "1px solid #000",
4495
+ width: "15%"
4496
+ }
4497
+ },
4498
+ /* @__PURE__ */ React22.createElement(Text_default, null, item.quantity)
4499
+ ),
4500
+ /* @__PURE__ */ React22.createElement(
4501
+ View17,
4502
+ {
4503
+ style: {
4504
+ padding: 6,
4505
+ borderRight: "none",
4506
+ width: "35%"
4507
+ }
4508
+ }
4509
+ )
4510
+ );
4511
+ })
4512
+ ))));
4513
+ };
4514
+ var A4PujaCountReport_default = A4PujaCountReport;
4515
+
4370
4516
  // src/index.tsx
4371
4517
  var getPrintBlob = ({
4372
4518
  size,
@@ -4374,15 +4520,15 @@ var getPrintBlob = ({
4374
4520
  dates
4375
4521
  }) => {
4376
4522
  if (size === "A4") {
4377
- const blob = pdf(/* @__PURE__ */ React22.createElement(A4Print_default, { data, dates })).toBlob();
4523
+ const blob = pdf(/* @__PURE__ */ React23.createElement(A4Print_default, { data, dates })).toBlob();
4378
4524
  return blob;
4379
4525
  } else {
4380
- const blob = pdf(/* @__PURE__ */ React22.createElement(T2Inch_default, { data, dates })).toBlob();
4526
+ const blob = pdf(/* @__PURE__ */ React23.createElement(T2Inch_default, { data, dates })).toBlob();
4381
4527
  return blob;
4382
4528
  }
4383
4529
  };
4384
4530
  var getA4SummaryBlob = async () => {
4385
- const blob = await pdf(/* @__PURE__ */ React22.createElement(A4Print_default, { data: [], dates: ["", ""] })).toBlob();
4531
+ const blob = await pdf(/* @__PURE__ */ React23.createElement(A4Print_default, { data: [], dates: ["", ""] })).toBlob();
4386
4532
  return blob;
4387
4533
  };
4388
4534
  var printDevoteeReceipt2Inch = async (data) => {
@@ -4448,6 +4594,9 @@ var options = {
4448
4594
  },
4449
4595
  "invoice-breakup": {
4450
4596
  A4: A4InvoiceLevelBreakup_default
4597
+ },
4598
+ "puja-count": {
4599
+ A4: A4PujaCountReport_default
4451
4600
  }
4452
4601
  };
4453
4602
  var reportPrinter = class {
@@ -4662,7 +4811,7 @@ var reportPrinter = class {
4662
4811
  }
4663
4812
  async print(data) {
4664
4813
  const ReportComponent = options[this.option][this.size];
4665
- const document = /* @__PURE__ */ React22.createElement(ReportComponent, { ...data });
4814
+ const document = /* @__PURE__ */ React23.createElement(ReportComponent, { ...data });
4666
4815
  const blob = pdf(document).toBlob();
4667
4816
  blob.then((blob2) => {
4668
4817
  var blobURL = URL.createObjectURL(blob2);
@@ -4677,7 +4826,7 @@ var reportPrinter = class {
4677
4826
  }
4678
4827
  async getBlob(data) {
4679
4828
  const ReportComponent = options[this.option][this.size];
4680
- const document = /* @__PURE__ */ React22.createElement(ReportComponent, { ...data });
4829
+ const document = /* @__PURE__ */ React23.createElement(ReportComponent, { ...data });
4681
4830
  const blob = pdf(document).toBlob();
4682
4831
  return blob;
4683
4832
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bookmypuja-tech/bmp-pdf",
3
3
  "description": "PDF Report Generation for Temple360 and T-360 by BookMyPuja",
4
- "version": "0.3.41",
4
+ "version": "0.3.43",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",