@stratusjs/angular 0.6.3 → 0.6.5

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.
@@ -127529,6 +127529,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
127529
127529
  this.scrollwheel = false;
127530
127530
  this.disableDoubleClickZoom = false;
127531
127531
  this.center = { lat: 37.4220656, lng: -122.0862784 };
127532
+ this.disableMarkerAnimations = false;
127532
127533
  this.options = {
127533
127534
  mapTypeId: this.mapType,
127534
127535
  center: this.center,
@@ -127549,7 +127550,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
127549
127550
  console.error('CSS Failed to load for Component:', this);
127550
127551
  this.styled = false;
127551
127552
  });
127552
- this.hydrate(this.elementRef, this.sanitizer, ["gMap", "map", "info", "title", "uid", "initializing", "initialized", "styled", "watcher", "height", "width", "referenceParent", "fullHeight", "fullHeightMinusElements", "fullHeightMinusElementNames", "googleMapsKey", "markers", "callback", "zoom", "mapType", "zoomControl", "scrollwheel", "disableDoubleClickZoom", "center", "defaultIcon", "defaultIconHover", "defaultIconLabelOriginX", "defaultIconLabelOriginY", "options", "storedMarkers", "highestMarkerZIndex", "resizeDebounce", "fitMarkerBoundsDebounce", "Differ", "window", "sanitizer", "elementRef", "ngDoCheck", "ngOnInit", "ngAfterViewInit", "onResize", "resize", "getWindowSize", "getDocumentSize", "getElementSize", "getParentSize", "updateWidgetSize", "fitMarkerBounds", "decodeHTML", "processOptions", "processProvidedMarkersPath", "processProvidedCallback", "getMarkerBounds", "fitBounds", "initGoogleMapsApi", "getCurrentPosition", "centerAtPosition", "panToPosition", "getHighestMarkerZIndex", "addMarker", "removeMarkers", "googleMaps", "mapClick", "openMarkerInfo", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
127553
+ this.hydrate(this.elementRef, this.sanitizer, ["gMap", "map", "info", "title", "uid", "initializing", "initialized", "styled", "watcher", "height", "width", "referenceParent", "fullHeight", "fullHeightMinusElements", "fullHeightMinusElementNames", "googleMapsKey", "markers", "callback", "zoom", "mapType", "zoomControl", "scrollwheel", "disableDoubleClickZoom", "center", "defaultIcon", "defaultIconHover", "defaultIconLabelOriginX", "defaultIconLabelOriginY", "disableMarkerAnimations", "options", "storedMarkers", "highestMarkerZIndex", "resizeDebounce", "fitMarkerBoundsDebounce", "Differ", "window", "sanitizer", "elementRef", "ngDoCheck", "ngOnInit", "ngAfterViewInit", "onResize", "resize", "getWindowSize", "getDocumentSize", "getElementSize", "getParentSize", "updateWidgetSize", "fitMarkerBounds", "decodeHTML", "processOptions", "processProvidedMarkersPath", "processProvidedCallback", "getMarkerBounds", "fitBounds", "initGoogleMapsApi", "getCurrentPosition", "centerAtPosition", "panToPosition", "getHighestMarkerZIndex", "addMarker", "removeMarkers", "googleMaps", "mapClick", "openMarkerInfo", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
127554
+ if ('Safari' === Stratus.Client.name) {
127555
+ this.disableMarkerAnimations = true;
127556
+ }
127553
127557
  this.processOptions();
127554
127558
  this.updateWidgetSize();
127555
127559
  if (isEmpty(this.googleMapsKey)) {
@@ -127585,17 +127589,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
127585
127589
  this.initializing = false;
127586
127590
  }
127587
127591
  };
127588
- const stopListeningForIdle = this.map.addListener('idle', () => {
127589
- stopListeningForIdle.remove();
127590
- initialize();
127591
- });
127592
- setTimeout(() => {
127593
- if (stopListeningForIdle) {
127594
- stopListeningForIdle.remove();
127595
- console.warn(this.uid, 'Google maps may be getting blocked. Forcing initialization anyways.');
127596
- initialize();
127597
- }
127598
- }, 6000);
127592
+ initialize();
127599
127593
  }
127600
127594
  catch (e) {
127601
127595
  console.error(this.uid, 'could not Init', e);
@@ -127875,6 +127869,9 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
127875
127869
  this.mapClick(realMarker, marker);
127876
127870
  });
127877
127871
  }
127872
+ if (this.disableMarkerAnimations) {
127873
+ realMarker.setAnimation(null);
127874
+ }
127878
127875
  realMarker.set('originalZIndex', realMarker.getZIndex());
127879
127876
  realMarker.addListener('mouseover', () => {
127880
127877
  realMarker.setZIndex(this.getHighestMarkerZIndex() + 1);
@@ -128257,6 +128254,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128257
128254
  this.dialogRef = dialogRef;
128258
128255
  this.dialogData = dialogData;
128259
128256
  this.title = `${packageName$4}_${componentName$4}_component`;
128257
+ this.urlRoot = '/Api';
128260
128258
  this.styled = false;
128261
128259
  this.initialized = false;
128262
128260
  this.cardComplete = false;
@@ -128279,7 +128277,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128279
128277
  console.error('CSS Failed to load for Component:', this);
128280
128278
  this.styled = false;
128281
128279
  });
128282
- this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "_", "styled", "initialized", "cardComplete", "cardSaved", "formPending", "clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo", "paymentMethodApiPath", "billingInfo", "cardId", "elementRef", "sanitizer", "Stripe", "dialogRef", "dialogData", "ngOnInit", "isEditable", "isBillingDetailsFilled", "isSubmittable", "saveCard", "dialogClose", "ngOnDestroy", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh"]);
128280
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "_", "urlRoot", "styled", "initialized", "cardComplete", "cardSaved", "formPending", "clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo", "paymentMethodApiPath", "billingInfo", "cardId", "elementRef", "sanitizer", "Stripe", "dialogRef", "dialogData", "ngOnInit", "isEditable", "isBillingDetailsFilled", "isSubmittable", "saveCard", "dialogClose", "ngOnDestroy", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh"]);
128283
128281
  if (!isEmpty(this.dialogData)) {
128284
128282
  const keysPossible = ["clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo"];
128285
128283
  Object.keys(this.dialogData).forEach((attr) => {
@@ -128353,9 +128351,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128353
128351
  }
128354
128352
  if (setupIntent.status === 'succeeded'
128355
128353
  && isString(setupIntent.payment_method)) {
128356
- const model = new Model({
128354
+ const apiOptions = {
128357
128355
  target: this.paymentMethodApiPath
128358
- });
128356
+ };
128357
+ if (this.urlRoot) {
128358
+ apiOptions.urlRoot = this.urlRoot;
128359
+ }
128360
+ const model = new Model(apiOptions);
128359
128361
  model.data = {
128360
128362
  payment_method: setupIntent.payment_method
128361
128363
  };
@@ -128388,6 +128390,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128388
128390
  Input(),
128389
128391
  __metadata$5("design:type", String)
128390
128392
  ], StripePaymentMethodComponent.prototype, "elementId", void 0);
128393
+ __decorate$6([
128394
+ Input(),
128395
+ __metadata$5("design:type", Object)
128396
+ ], StripePaymentMethodComponent.prototype, "urlRoot", void 0);
128391
128397
  __decorate$6([
128392
128398
  Input(),
128393
128399
  __metadata$5("design:type", String)
@@ -128408,6 +128414,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128408
128414
  Input(),
128409
128415
  __metadata$5("design:type", Object)
128410
128416
  ], StripePaymentMethodComponent.prototype, "defaultBillingInfo", void 0);
128417
+ __decorate$6([
128418
+ Input(),
128419
+ __metadata$5("design:type", Object)
128420
+ ], StripePaymentMethodComponent.prototype, "paymentMethodApiPath", void 0);
128411
128421
  StripePaymentMethodComponent = __decorate$6([
128412
128422
  Component({
128413
128423
  selector: `sa-${packageName$4}-${componentName$4}`,
@@ -128584,15 +128594,20 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128584
128594
  const componentName$2 = 'payment-method-list';
128585
128595
  const localDir$1 = `${Stratus.BaseUrl}${Stratus.DeploymentPath}@stratusjs/${packageName$2}/src/`;
128586
128596
  let StripePaymentMethodListComponent = class StripePaymentMethodListComponent extends RootComponent {
128587
- constructor(elementRef, sanitizer, Stripe) {
128597
+ constructor(elementRef, ref, sanitizer, Stripe) {
128588
128598
  super();
128589
128599
  this.elementRef = elementRef;
128600
+ this.ref = ref;
128590
128601
  this.sanitizer = sanitizer;
128591
128602
  this.Stripe = Stripe;
128592
128603
  this.title = `${packageName$2}_${componentName$2}_component`;
128593
128604
  this.styled = false;
128594
128605
  this.initialized = false;
128606
+ this.urlRoot = '/Api';
128595
128607
  this.paymentMethodApiPath = 'PaymentMethod';
128608
+ this.addCardButtonText = 'Add Payment Method';
128609
+ this.disabled = false;
128610
+ this.defaultBillingInfo = { address: {} };
128596
128611
  this.uid = uniqueId$3(`sa_${snakeCase(this.title)}_`);
128597
128612
  Stratus.Instances[this.uid] = this;
128598
128613
  this.elementId = this.elementId || this.uid;
@@ -128604,25 +128619,52 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128604
128619
  console.error('CSS Failed to load for Component:', this);
128605
128620
  this.styled = false;
128606
128621
  });
128607
- this.collection = new Collection({
128622
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "urlRoot", "paymentMethodApiPath", "addCardButtonText", "disabled", "property", "detailedBillingInfo", "defaultBillingName", "defaultBillingEmail", "defaultBillingPhone", "defaultBillingZip", "defaultBillingState", "defaultBillingCity", "defaultBillingAddress1", "defaultBillingAddress2", "defaultBillingInfo", "paymentCollection", "elementRef", "ref", "sanitizer", "Stripe", "ngOnInit", "fetchPaymentMethods", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
128623
+ const apiOptions = {
128608
128624
  autoSave: false,
128609
128625
  target: this.paymentMethodApiPath,
128610
128626
  watch: true
128611
- });
128612
- this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "collection", "detailedBillingInfo", "paymentMethodApiPath", "elementRef", "sanitizer", "Stripe", "ngOnInit", "ngAfterViewInit", "fetchPaymentMethods", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
128627
+ };
128628
+ if (this.urlRoot) {
128629
+ apiOptions.urlRoot = this.urlRoot;
128630
+ }
128631
+ this.paymentCollection = new Collection(apiOptions);
128632
+ if (this.defaultBillingName) {
128633
+ this.defaultBillingInfo.name = this.defaultBillingName;
128634
+ }
128635
+ if (this.defaultBillingEmail) {
128636
+ this.defaultBillingInfo.email = this.defaultBillingEmail;
128637
+ }
128638
+ if (this.defaultBillingPhone) {
128639
+ this.defaultBillingInfo.phone = this.defaultBillingPhone;
128640
+ }
128641
+ if (this.defaultBillingZip) {
128642
+ this.defaultBillingInfo.address.postal_code = this.defaultBillingZip;
128643
+ }
128644
+ if (this.defaultBillingState) {
128645
+ this.defaultBillingInfo.address.state = this.defaultBillingState;
128646
+ }
128647
+ if (this.defaultBillingCity) {
128648
+ this.defaultBillingInfo.address.city = this.defaultBillingCity;
128649
+ }
128650
+ if (this.defaultBillingAddress1) {
128651
+ this.defaultBillingInfo.address.line1 = this.defaultBillingAddress1;
128652
+ }
128653
+ if (this.defaultBillingAddress2) {
128654
+ this.defaultBillingInfo.address.line2 = this.defaultBillingAddress2;
128655
+ }
128613
128656
  }
128614
128657
  ngOnInit() {
128615
128658
  return __awaiter$2(this, void 0, void 0, function* () {
128616
128659
  yield this.fetchPaymentMethods();
128617
- this.Stripe.registerCollection(this.collection);
128660
+ this.Stripe.registerCollection(this.paymentCollection);
128618
128661
  this.initialized = true;
128619
128662
  });
128620
128663
  }
128621
- ngAfterViewInit() {
128622
- }
128623
128664
  fetchPaymentMethods() {
128624
128665
  return __awaiter$2(this, void 0, void 0, function* () {
128625
- yield this.collection.fetch();
128666
+ yield this.paymentCollection.fetch();
128667
+ yield this.refresh();
128626
128668
  });
128627
128669
  }
128628
128670
  };
@@ -128630,16 +128672,69 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128630
128672
  Input(),
128631
128673
  __metadata$3("design:type", String)
128632
128674
  ], StripePaymentMethodListComponent.prototype, "elementId", void 0);
128675
+ __decorate$4([
128676
+ Input(),
128677
+ __metadata$3("design:type", String)
128678
+ ], StripePaymentMethodListComponent.prototype, "urlRoot", void 0);
128679
+ __decorate$4([
128680
+ Input(),
128681
+ __metadata$3("design:type", String)
128682
+ ], StripePaymentMethodListComponent.prototype, "paymentMethodApiPath", void 0);
128683
+ __decorate$4([
128684
+ Input(),
128685
+ __metadata$3("design:type", String)
128686
+ ], StripePaymentMethodListComponent.prototype, "addCardButtonText", void 0);
128687
+ __decorate$4([
128688
+ Input(),
128689
+ __metadata$3("design:type", Object)
128690
+ ], StripePaymentMethodListComponent.prototype, "disabled", void 0);
128691
+ __decorate$4([
128692
+ Input(),
128693
+ __metadata$3("design:type", String)
128694
+ ], StripePaymentMethodListComponent.prototype, "property", void 0);
128633
128695
  __decorate$4([
128634
128696
  Input(),
128635
128697
  __metadata$3("design:type", Boolean)
128636
128698
  ], StripePaymentMethodListComponent.prototype, "detailedBillingInfo", void 0);
128699
+ __decorate$4([
128700
+ Input(),
128701
+ __metadata$3("design:type", String)
128702
+ ], StripePaymentMethodListComponent.prototype, "defaultBillingName", void 0);
128703
+ __decorate$4([
128704
+ Input(),
128705
+ __metadata$3("design:type", String)
128706
+ ], StripePaymentMethodListComponent.prototype, "defaultBillingEmail", void 0);
128707
+ __decorate$4([
128708
+ Input(),
128709
+ __metadata$3("design:type", String)
128710
+ ], StripePaymentMethodListComponent.prototype, "defaultBillingPhone", void 0);
128711
+ __decorate$4([
128712
+ Input(),
128713
+ __metadata$3("design:type", String)
128714
+ ], StripePaymentMethodListComponent.prototype, "defaultBillingZip", void 0);
128715
+ __decorate$4([
128716
+ Input(),
128717
+ __metadata$3("design:type", String)
128718
+ ], StripePaymentMethodListComponent.prototype, "defaultBillingState", void 0);
128719
+ __decorate$4([
128720
+ Input(),
128721
+ __metadata$3("design:type", String)
128722
+ ], StripePaymentMethodListComponent.prototype, "defaultBillingCity", void 0);
128723
+ __decorate$4([
128724
+ Input(),
128725
+ __metadata$3("design:type", String)
128726
+ ], StripePaymentMethodListComponent.prototype, "defaultBillingAddress1", void 0);
128727
+ __decorate$4([
128728
+ Input(),
128729
+ __metadata$3("design:type", String)
128730
+ ], StripePaymentMethodListComponent.prototype, "defaultBillingAddress2", void 0);
128637
128731
  StripePaymentMethodListComponent = __decorate$4([
128638
128732
  Component({
128639
128733
  selector: `sa-${packageName$2}-${componentName$2}`,
128640
128734
  templateUrl: `${localDir$1}${componentName$2}.component${min$1}.html`,
128641
128735
  }),
128642
128736
  __metadata$3("design:paramtypes", [ElementRef,
128737
+ ChangeDetectorRef,
128643
128738
  DomSanitizer,
128644
128739
  StripeService])
128645
128740
  ], StripePaymentMethodListComponent);
@@ -128677,6 +128772,9 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128677
128772
  this.title = `${packageName$1}_${componentName$1}_component`;
128678
128773
  this.styled = false;
128679
128774
  this.initialized = false;
128775
+ this.urlRoot = '/Api';
128776
+ this.paymentMethodApiPath = 'PaymentMethod';
128777
+ this.addCardButtonText = 'Add Payment Method';
128680
128778
  this.disabled = false;
128681
128779
  this.defaultBillingInfo = { address: {} };
128682
128780
  this.fieldName = 'paymentSelection';
@@ -128686,26 +128784,29 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128686
128784
  [this.fieldName]: new FormControl(),
128687
128785
  [this.fieldNameId]: new FormControl({ disabled: true })
128688
128786
  });
128689
- this.paymentMethodApiPath = 'PaymentMethod';
128690
128787
  this.uid = uniqueId$3(`sa_${snakeCase(this.title)}_`);
128691
128788
  Stratus.Instances[this.uid] = this;
128692
128789
  this.elementId = this.elementId || this.uid;
128693
128790
  Stratus.Internals.CssLoader(`${localDir}${componentName$1}.component${min}.css`)
128694
128791
  .then(() => {
128695
128792
  this.styled = true;
128696
- this.refresh();
128793
+ this.refresh().then();
128697
128794
  })
128698
128795
  .catch(() => {
128699
128796
  console.error('CSS Failed to load for Component:', this);
128700
128797
  this.styled = false;
128701
- this.refresh();
128798
+ this.refresh().then();
128702
128799
  });
128703
- this.paymentCollection = new Collection({
128800
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "registryModel", "paymentMethodApiPath", "addCardButtonText", "disabled", "property", "detailedBillingInfo", "defaultBillingName", "defaultBillingEmail", "defaultBillingPhone", "defaultBillingZip", "defaultBillingState", "defaultBillingCity", "defaultBillingAddress1", "defaultBillingAddress2", "defaultBillingInfo", "fieldName", "fieldNameId", "registry", "fetched", "model", "dataSub", "subscriber", "form", "paymentCollection", "elementRef", "fb", "ref", "sanitizer", "Stripe", "ngOnInit", "fetchPaymentMethods", "valueChanged", "normalizeOut", "normalizeIn", "fetchData", "objectComparisonFunction", "dataDefer", "dataRef", "handleObservableError", "isPMExpired", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
128801
+ const apiOptions = {
128704
128802
  autoSave: false,
128705
128803
  target: this.paymentMethodApiPath,
128706
128804
  watch: true
128707
- });
128708
- this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "registryModel", "disabled", "property", "detailedBillingInfo", "defaultBillingName", "defaultBillingEmail", "defaultBillingPhone", "defaultBillingZip", "defaultBillingState", "defaultBillingCity", "defaultBillingAddress1", "defaultBillingAddress2", "defaultBillingInfo", "fieldName", "fieldNameId", "registry", "fetched", "model", "dataSub", "subscriber", "form", "paymentCollection", "paymentMethodApiPath", "elementRef", "fb", "ref", "sanitizer", "Stripe", "ngOnInit", "fetchPaymentMethods", "valueChanged", "normalizeOut", "normalizeIn", "fetchData", "objectComparisonFunction", "dataDefer", "dataRef", "handleObservableError", "isPMExpired", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
128805
+ };
128806
+ if (this.urlRoot) {
128807
+ apiOptions.urlRoot = this.urlRoot;
128808
+ }
128809
+ this.paymentCollection = new Collection(apiOptions);
128709
128810
  if (this.defaultBillingName) {
128710
128811
  this.defaultBillingInfo.name = this.defaultBillingName;
128711
128812
  }
@@ -128751,12 +128852,12 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128751
128852
  const dataControl = this.form.get(this.fieldName);
128752
128853
  if (dataControl.value === evt) {
128753
128854
  if (this.initialized) {
128754
- this.refresh();
128855
+ this.refresh().then();
128755
128856
  }
128756
128857
  return;
128757
128858
  }
128758
128859
  dataControl.patchValue(evt);
128759
- this.refresh();
128860
+ this.refresh().then();
128760
128861
  });
128761
128862
  }
128762
128863
  }
@@ -128780,7 +128881,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128780
128881
  fetchPaymentMethods() {
128781
128882
  return __awaiter$1(this, void 0, void 0, function* () {
128782
128883
  yield this.paymentCollection.fetch();
128783
- this.refresh();
128884
+ yield this.refresh();
128784
128885
  });
128785
128886
  }
128786
128887
  valueChanged(value) {
@@ -128888,6 +128989,14 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128888
128989
  Input(),
128889
128990
  __metadata$2("design:type", Object)
128890
128991
  ], StripePaymentMethodSelectorComponent.prototype, "registryModel", void 0);
128992
+ __decorate$3([
128993
+ Input(),
128994
+ __metadata$2("design:type", String)
128995
+ ], StripePaymentMethodSelectorComponent.prototype, "paymentMethodApiPath", void 0);
128996
+ __decorate$3([
128997
+ Input(),
128998
+ __metadata$2("design:type", String)
128999
+ ], StripePaymentMethodSelectorComponent.prototype, "addCardButtonText", void 0);
128891
129000
  __decorate$3([
128892
129001
  Input(),
128893
129002
  __metadata$2("design:type", Object)
@@ -128976,11 +129085,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128976
129085
  this.initialized = false;
128977
129086
  this.newPaymentMethodPrompt = false;
128978
129087
  this.newPaymentMethodPending = false;
129088
+ this.urlRoot = '/Api';
128979
129089
  this.paymentMethodApiPath = 'PaymentMethod';
129090
+ this.addCardButtonText = 'Add Payment Method';
128980
129091
  this.uid = uniqueId$3(`sa_${snakeCase(this.title)}_`);
128981
129092
  Stratus.Instances[this.uid] = this;
128982
129093
  this.elementId = this.elementId || this.uid;
128983
- this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "newPaymentMethodPrompt", "newPaymentMethodPending", "detailedBillingInfo", "defaultBillingInfo", "paymentMethodApiPath", "elementRef", "sanitizer", "dialog", "ngOnInit", "addPaymentMethod", "inputPaymentMethod", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
129094
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "newPaymentMethodPrompt", "newPaymentMethodPending", "urlRoot", "paymentMethodApiPath", "addCardButtonText", "detailedBillingInfo", "defaultBillingInfo", "elementRef", "sanitizer", "dialog", "ngOnInit", "addPaymentMethod", "inputPaymentMethod", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
128984
129095
  }
128985
129096
  ngOnInit() {
128986
129097
  this.initialized = true;
@@ -128992,9 +129103,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
128992
129103
  let publishKey = '';
128993
129104
  let formMessage = '';
128994
129105
  this.newPaymentMethodPending = true;
128995
- const model = new Model({
129106
+ const apiOptions = {
128996
129107
  target: this.paymentMethodApiPath
128997
- });
129108
+ };
129109
+ if (this.urlRoot) {
129110
+ apiOptions.urlRoot = this.urlRoot;
129111
+ }
129112
+ const model = new Model(apiOptions);
128998
129113
  model.data.setupIntent = true;
128999
129114
  yield model.save();
129000
129115
  if (Object.prototype.hasOwnProperty.call(model, 'meta') &&
@@ -129048,6 +129163,18 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
129048
129163
  Input(),
129049
129164
  __metadata$1("design:type", String)
129050
129165
  ], StripeSetupIntentComponent.prototype, "elementId", void 0);
129166
+ __decorate$2([
129167
+ Input(),
129168
+ __metadata$1("design:type", String)
129169
+ ], StripeSetupIntentComponent.prototype, "urlRoot", void 0);
129170
+ __decorate$2([
129171
+ Input(),
129172
+ __metadata$1("design:type", String)
129173
+ ], StripeSetupIntentComponent.prototype, "paymentMethodApiPath", void 0);
129174
+ __decorate$2([
129175
+ Input(),
129176
+ __metadata$1("design:type", String)
129177
+ ], StripeSetupIntentComponent.prototype, "addCardButtonText", void 0);
129051
129178
  __decorate$2([
129052
129179
  Input(),
129053
129180
  __metadata$1("design:type", Boolean)
@@ -129059,7 +129186,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
129059
129186
  StripeSetupIntentComponent = __decorate$2([
129060
129187
  Component({
129061
129188
  selector: `sa-${packageName}-${componentName}`,
129062
- template: '<button mat-raised-button (click)="addPaymentMethod($event)" [disabled]="newPaymentMethodPending || newPaymentMethodPrompt">Add Payment Method</button>',
129189
+ template: '<button mat-raised-button (click)="addPaymentMethod($event)" [disabled]="newPaymentMethodPending || newPaymentMethodPrompt" [textContent]="addCardButtonText"></button>',
129063
129190
  }),
129064
129191
  __metadata$1("design:paramtypes", [ElementRef,
129065
129192
  DomSanitizer,
@@ -129113,7 +129240,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
129113
129240
  stratusModule: StripeModule,
129114
129241
  stratusComponents: {
129115
129242
  'sa-stripe-payment-method-list': StripePaymentMethodListComponent,
129116
- 'sa-stripe-payment-method-selector': StripePaymentMethodSelectorComponent,
129243
+ 'sa-stripe-payment-method-selector': StripePaymentMethodSelectorComponent
129117
129244
  }
129118
129245
  };
129119
129246