@rolatech/angular-billing 20.1.6-beta.1 → 20.1.6-beta.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.
@@ -41,6 +41,7 @@ var InvoiceType;
41
41
  var InvoiceStatus;
42
42
  (function (InvoiceStatus) {
43
43
  InvoiceStatus["DRAFT"] = "Draft";
44
+ InvoiceStatus["CREATED"] = "Created";
44
45
  InvoiceStatus["ISSUED"] = "Issued";
45
46
  InvoiceStatus["PARTIALLY_PAID"] = "Partially paid";
46
47
  InvoiceStatus["PAID"] = "Paid";
@@ -190,11 +191,11 @@ class InvoiceLineItem {
190
191
  }, ...(ngDevMode ? [{ debugName: "thumbnail" }] : []));
191
192
  }
192
193
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: InvoiceLineItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
193
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: InvoiceLineItem, isStandalone: true, selector: "rolatech-invoice-line-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex justify-between py-2\">\n <div class=\"flex w-full\">\n <div\n class=\"min-w-24 w-36 aspect-video bg-[--rt-raised-background] hover:rounded-none rounded-lg h-fit cursor-pointer\"\n [routerLink]=\"link()\"\n >\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"thumbnail()\" size=\"medium\" mode=\"clip\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n\n <div class=\"w-full ml-3 flex flex-col justify-between\">\n <!-- info -->\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <span class=\"text-lg font-bold hover:text-[--rt-brand-color] cursor-pointer\" [routerLink]=\"link()\"\n >{{ item().title }}</span\n >\n <ng-content></ng-content>\n </div>\n <div class=\"text-right p-1\">\n <div class=\"text-sm\">\u00A3{{ item().amount }}</div>\n </div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\"></div>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], deferBlockDependencies: [() => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)]] }); }
194
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: InvoiceLineItem, isStandalone: true, selector: "rolatech-invoice-line-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex justify-between py-2\">\n <div class=\"flex w-full\">\n <div\n class=\"min-w-24 w-36 aspect-video bg-[--rt-raised-background] hover:rounded-none rounded-lg h-fit cursor-pointer\"\n [routerLink]=\"link()\"\n >\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"thumbnail()\" size=\"medium\" mode=\"clip\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n\n <div class=\"w-full ml-3 flex flex-col justify-between\">\n <!-- info -->\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <span class=\"text-lg font-bold hover:text-[--rt-brand-color] cursor-pointer\" [routerLink]=\"link()\"\n >{{ item().title }}</span\n >\n <ng-content></ng-content>\n </div>\n <div class=\"text-right p-1\">\n <div class=\"text-sm\">\u00A3{{ item().amount.toFixed(2) }}</div>\n </div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\"></div>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], deferBlockDependencies: [() => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)]] }); }
194
195
  }
195
196
  i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "20.3.4", ngImport: i0, type: InvoiceLineItem, resolveDeferredDeps: () => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)], resolveMetadata: ThumbnailComponent => ({ decorators: [{
196
197
  type: Component,
197
- args: [{ selector: 'rolatech-invoice-line-item', imports: [RouterLink, ThumbnailComponent], template: "<div class=\"flex justify-between py-2\">\n <div class=\"flex w-full\">\n <div\n class=\"min-w-24 w-36 aspect-video bg-[--rt-raised-background] hover:rounded-none rounded-lg h-fit cursor-pointer\"\n [routerLink]=\"link()\"\n >\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"thumbnail()\" size=\"medium\" mode=\"clip\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n\n <div class=\"w-full ml-3 flex flex-col justify-between\">\n <!-- info -->\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <span class=\"text-lg font-bold hover:text-[--rt-brand-color] cursor-pointer\" [routerLink]=\"link()\"\n >{{ item().title }}</span\n >\n <ng-content></ng-content>\n </div>\n <div class=\"text-right p-1\">\n <div class=\"text-sm\">\u00A3{{ item().amount }}</div>\n </div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\"></div>\n </div>\n </div>\n </div>\n</div>\n" }]
198
+ args: [{ selector: 'rolatech-invoice-line-item', imports: [RouterLink, ThumbnailComponent], template: "<div class=\"flex justify-between py-2\">\n <div class=\"flex w-full\">\n <div\n class=\"min-w-24 w-36 aspect-video bg-[--rt-raised-background] hover:rounded-none rounded-lg h-fit cursor-pointer\"\n [routerLink]=\"link()\"\n >\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"thumbnail()\" size=\"medium\" mode=\"clip\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n\n <div class=\"w-full ml-3 flex flex-col justify-between\">\n <!-- info -->\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <span class=\"text-lg font-bold hover:text-[--rt-brand-color] cursor-pointer\" [routerLink]=\"link()\"\n >{{ item().title }}</span\n >\n <ng-content></ng-content>\n </div>\n <div class=\"text-right p-1\">\n <div class=\"text-sm\">\u00A3{{ item().amount.toFixed(2) }}</div>\n </div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\"></div>\n </div>\n </div>\n </div>\n</div>\n" }]
198
199
  }], ctorParameters: null, propDecorators: null }) });
199
200
 
200
201
  class InvoiceDetailComponent extends BaseComponent {
@@ -258,8 +259,8 @@ class InvoiceDetailComponent extends BaseComponent {
258
259
  .subscribe({
259
260
  next: (res) => {
260
261
  this.paying = false;
261
- const { redirectUrl } = res.data;
262
- window.open(redirectUrl, '_blank');
262
+ const { checkoutUrl } = res.data;
263
+ window.open(checkoutUrl, '_blank');
263
264
  },
264
265
  error: (error) => {
265
266
  this.paying = false;
@@ -267,11 +268,11 @@ class InvoiceDetailComponent extends BaseComponent {
267
268
  });
268
269
  }
269
270
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: InvoiceDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
270
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: InvoiceDetailComponent, isStandalone: true, selector: "rolatech-invoice-detail", usesInheritance: true, ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar [title]=\"invoice() ? status[invoice()!.status] : ''\" large link=\"../\"> </rolatech-toolbar>\n @if (invoice(); as invoice) {\n <div>\n <div>\n <div>\n @for (item of invoice.lines; track $index) {\n <rolatech-invoice-line-item [item]=\"item\" [link]=\"'/properties/' + item.extId\"></rolatech-invoice-line-item>\n }\n </div>\n <div class=\"mt-3\">\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Profile</span>\n <span class=\"text-sm\"> {{ invoice.firstName }},{{ invoice.lastName }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Email</span>\n <span class=\"text-sm\"> {{ invoice.email }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Phone</span>\n <span class=\"text-sm\"> {{ invoice.phone }}</span>\n </div>\n\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Total</span>\n <span class=\"text-sm\">\u00A3{{ invoice.total }}</span>\n </div>\n <div class=\"flex items-baseline justify-between py-1\">\n <span class=\"font-medium min-w-20\" i18n>Note</span>\n <span class=\"text-sm\">{{ invoice.note || '\u65E0' }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Created at</span>\n <span class=\"text-sm\"> {{ invoice.createdAt }}</span>\n </div>\n </div>\n @if (invoice.status.toString() === 'CREATED' || invoice.status.toString() === 'PAID') {\n <div class=\"mt-6\">\n <div class=\"text-lg pb-3 font-medium\" i18n>Payment method</div>\n <div class=\"flex items-center\">\n <span class=\"ml-1\">Stripe</span>\n </div>\n </div>\n }\n </div>\n\n <!-- safe area -->\n <div class=\"pb-16 sm:pb-3\"></div>\n <div class=\"\">\n <div class=\"flex items-center justify-end\">\n <button mat-flat-button [disabled]=\"paying\" class=\"w-32 min-h-11\" (click)=\"pay()\" i18n>\n {{ paying ? 'Processing' : 'Pay' }}\n </button>\n </div>\n </div>\n </div>\n }\n</rolatech-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: InvoiceLineItem, selector: "rolatech-invoice-line-item", inputs: ["item", "link"] }] }); }
271
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: InvoiceDetailComponent, isStandalone: true, selector: "rolatech-invoice-detail", usesInheritance: true, ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar [title]=\"invoice() ? status[invoice()!.status] : ''\" large link=\"../\"> </rolatech-toolbar>\n @if (invoice(); as invoice) {\n <div>\n <div>\n <div>\n @for (item of invoice.lines; track $index) {\n <rolatech-invoice-line-item [item]=\"item\" [link]=\"'/properties/' + item.extId\"></rolatech-invoice-line-item>\n }\n </div>\n <div class=\"mt-3\">\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Profile</span>\n <span class=\"text-sm\"> {{ invoice.firstName }},{{ invoice.lastName }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Email</span>\n <span class=\"text-sm\"> {{ invoice.email }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Phone</span>\n <span class=\"text-sm\"> {{ invoice.phone }}</span>\n </div>\n\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Total</span>\n <span class=\"text-sm\">\u00A3{{ invoice.total.toFixed(2) }}</span>\n </div>\n <div class=\"flex items-baseline justify-between py-1\">\n <span class=\"font-medium min-w-20\" i18n>Note</span>\n <span class=\"text-sm\">{{ invoice.note || '\u65E0' }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Created at</span>\n <span class=\"text-sm\"> {{ invoice.createdAt }}</span>\n </div>\n </div>\n @if (invoice.status.toString() === 'CREATED' || invoice.status.toString() === 'PAID') {\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Payment method</span>\n <span class=\"text-sm\"> Stripe</span>\n </div>\n }\n </div>\n\n <!-- safe area -->\n <div class=\"pb-16 sm:pb-3\"></div>\n @if (invoice.status.toString() === 'CREATED') {\n <div class=\"\">\n <div class=\"flex items-center justify-end\">\n <button mat-flat-button [disabled]=\"paying\" class=\"w-32 min-h-11\" (click)=\"pay()\" i18n>\n {{ paying ? 'Processing' : 'Pay' }}\n </button>\n </div>\n </div>\n }\n </div>\n }\n</rolatech-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: InvoiceLineItem, selector: "rolatech-invoice-line-item", inputs: ["item", "link"] }] }); }
271
272
  }
272
273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: InvoiceDetailComponent, decorators: [{
273
274
  type: Component,
274
- args: [{ selector: 'rolatech-invoice-detail', imports: [MatButtonModule, MatIconModule, ContainerComponent, ToolbarComponent, InvoiceLineItem], template: "<rolatech-container>\n <rolatech-toolbar [title]=\"invoice() ? status[invoice()!.status] : ''\" large link=\"../\"> </rolatech-toolbar>\n @if (invoice(); as invoice) {\n <div>\n <div>\n <div>\n @for (item of invoice.lines; track $index) {\n <rolatech-invoice-line-item [item]=\"item\" [link]=\"'/properties/' + item.extId\"></rolatech-invoice-line-item>\n }\n </div>\n <div class=\"mt-3\">\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Profile</span>\n <span class=\"text-sm\"> {{ invoice.firstName }},{{ invoice.lastName }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Email</span>\n <span class=\"text-sm\"> {{ invoice.email }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Phone</span>\n <span class=\"text-sm\"> {{ invoice.phone }}</span>\n </div>\n\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Total</span>\n <span class=\"text-sm\">\u00A3{{ invoice.total }}</span>\n </div>\n <div class=\"flex items-baseline justify-between py-1\">\n <span class=\"font-medium min-w-20\" i18n>Note</span>\n <span class=\"text-sm\">{{ invoice.note || '\u65E0' }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Created at</span>\n <span class=\"text-sm\"> {{ invoice.createdAt }}</span>\n </div>\n </div>\n @if (invoice.status.toString() === 'CREATED' || invoice.status.toString() === 'PAID') {\n <div class=\"mt-6\">\n <div class=\"text-lg pb-3 font-medium\" i18n>Payment method</div>\n <div class=\"flex items-center\">\n <span class=\"ml-1\">Stripe</span>\n </div>\n </div>\n }\n </div>\n\n <!-- safe area -->\n <div class=\"pb-16 sm:pb-3\"></div>\n <div class=\"\">\n <div class=\"flex items-center justify-end\">\n <button mat-flat-button [disabled]=\"paying\" class=\"w-32 min-h-11\" (click)=\"pay()\" i18n>\n {{ paying ? 'Processing' : 'Pay' }}\n </button>\n </div>\n </div>\n </div>\n }\n</rolatech-container>\n" }]
275
+ args: [{ selector: 'rolatech-invoice-detail', imports: [MatButtonModule, MatIconModule, ContainerComponent, ToolbarComponent, InvoiceLineItem], template: "<rolatech-container>\n <rolatech-toolbar [title]=\"invoice() ? status[invoice()!.status] : ''\" large link=\"../\"> </rolatech-toolbar>\n @if (invoice(); as invoice) {\n <div>\n <div>\n <div>\n @for (item of invoice.lines; track $index) {\n <rolatech-invoice-line-item [item]=\"item\" [link]=\"'/properties/' + item.extId\"></rolatech-invoice-line-item>\n }\n </div>\n <div class=\"mt-3\">\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Profile</span>\n <span class=\"text-sm\"> {{ invoice.firstName }},{{ invoice.lastName }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Email</span>\n <span class=\"text-sm\"> {{ invoice.email }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Phone</span>\n <span class=\"text-sm\"> {{ invoice.phone }}</span>\n </div>\n\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Total</span>\n <span class=\"text-sm\">\u00A3{{ invoice.total.toFixed(2) }}</span>\n </div>\n <div class=\"flex items-baseline justify-between py-1\">\n <span class=\"font-medium min-w-20\" i18n>Note</span>\n <span class=\"text-sm\">{{ invoice.note || '\u65E0' }}</span>\n </div>\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Created at</span>\n <span class=\"text-sm\"> {{ invoice.createdAt }}</span>\n </div>\n </div>\n @if (invoice.status.toString() === 'CREATED' || invoice.status.toString() === 'PAID') {\n <div class=\"flex items-center justify-between py-1\">\n <span class=\"font-medium\" i18n>Payment method</span>\n <span class=\"text-sm\"> Stripe</span>\n </div>\n }\n </div>\n\n <!-- safe area -->\n <div class=\"pb-16 sm:pb-3\"></div>\n @if (invoice.status.toString() === 'CREATED') {\n <div class=\"\">\n <div class=\"flex items-center justify-end\">\n <button mat-flat-button [disabled]=\"paying\" class=\"w-32 min-h-11\" (click)=\"pay()\" i18n>\n {{ paying ? 'Processing' : 'Pay' }}\n </button>\n </div>\n </div>\n }\n </div>\n }\n</rolatech-container>\n" }]
275
276
  }] });
276
277
 
277
278
  const invoiceRoutes = [