@stratusjs/angular 0.11.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular.bundle.js +588 -270
- package/dist/angular.bundle.min.js +1 -1
- package/package.json +1 -1
- package/src/app.module.js +3 -3
- package/src/app.module.js.map +1 -1
- package/src/app.module.min.js +1 -1
- package/src/backend.service.js +4 -1
- package/src/backend.service.js.map +1 -1
- package/src/backend.service.min.js +1 -1
- package/src/base/base.component.js +16 -2
- package/src/base/base.component.js.map +1 -1
- package/src/base/base.component.min.js +1 -1
- package/src/base/base.component.ts +0 -1
- package/src/confirm-dialog/confirm-dialog.component.js +2 -0
- package/src/confirm-dialog/confirm-dialog.component.js.map +1 -1
- package/src/confirm-dialog/confirm-dialog.component.min.js +1 -1
- package/src/core/responsive.component.js +5 -5
- package/src/core/responsive.component.js.map +1 -1
- package/src/core/responsive.component.min.js +1 -1
- package/src/editor/citation-dialog.component.js +23 -7
- package/src/editor/citation-dialog.component.js.map +1 -1
- package/src/editor/citation-dialog.component.min.js +1 -1
- package/src/editor/citation-dialog.component.ts +0 -1
- package/src/editor/code-mirror-bridge.js +4 -0
- package/src/editor/code-mirror-bridge.js.map +1 -1
- package/src/editor/code-mirror-bridge.min.js +1 -1
- package/src/editor/code-view-dialog.component.js +18 -10
- package/src/editor/code-view-dialog.component.js.map +1 -1
- package/src/editor/code-view-dialog.component.min.js +1 -1
- package/src/editor/code-view-dialog.component.ts +0 -1
- package/src/editor/editor.component.js +548 -525
- package/src/editor/editor.component.js.map +1 -1
- package/src/editor/editor.component.min.js +1 -1
- package/src/editor/editor.component.ts +0 -1
- package/src/editor/link-dialog.component.js +39 -20
- package/src/editor/link-dialog.component.js.map +1 -1
- package/src/editor/link-dialog.component.min.js +1 -1
- package/src/editor/link-dialog.component.ts +0 -1
- package/src/editor/media-dialog.component.js +26 -11
- package/src/editor/media-dialog.component.js.map +1 -1
- package/src/editor/media-dialog.component.min.js +1 -1
- package/src/editor/media-dialog.component.ts +2 -2
- package/src/froala/plugins/inputButton.js +11 -7
- package/src/froala/plugins/inputButton.js.map +1 -1
- package/src/froala/plugins/inputButton.min.js +1 -1
- package/src/froala/plugins/linkManager.ts +1 -1
- package/src/media-selector/media-selector.component.js +76 -46
- package/src/media-selector/media-selector.component.js.map +1 -1
- package/src/media-selector/media-selector.component.min.js +1 -1
- package/src/media-selector/media-selector.component.ts +0 -1
- package/src/quill-plugins/quill-image-format.plugin.js +2 -5
- package/src/quill-plugins/quill-image-format.plugin.js.map +1 -1
- package/src/quill-plugins/quill-image-format.plugin.min.js +1 -1
- package/src/quill-plugins/quill-input-button.plugin.js +6 -5
- package/src/quill-plugins/quill-input-button.plugin.js.map +1 -1
- package/src/quill-plugins/quill-input-button.plugin.min.js +1 -1
- package/src/selector/selector.component.js +34 -12
- package/src/selector/selector.component.js.map +1 -1
- package/src/selector/selector.component.min.js +1 -1
- package/src/selector/selector.component.ts +0 -1
- package/src/test/test.directive.js +2 -0
- package/src/test/test.directive.js.map +1 -1
- package/src/test/test.directive.min.js +1 -1
- package/src/timezone-selector/timezone-selector.component.js +31 -9
- package/src/timezone-selector/timezone-selector.component.js.map +1 -1
- package/src/timezone-selector/timezone-selector.component.min.js +1 -1
- package/src/timezone-selector/timezone-selector.component.ts +0 -1
- package/src/tree/tree-dialog.component.js +31 -18
- package/src/tree/tree-dialog.component.js.map +1 -1
- package/src/tree/tree-dialog.component.min.js +1 -1
- package/src/tree/tree-dialog.component.ts +0 -1
- package/src/tree/tree-node.component.js +13 -7
- package/src/tree/tree-node.component.js.map +1 -1
- package/src/tree/tree-node.component.min.js +1 -1
- package/src/tree/tree-node.component.ts +0 -1
- package/src/tree/tree.component.js +50 -22
- package/src/tree/tree.component.js.map +1 -1
- package/src/tree/tree.component.min.js +1 -1
- package/src/tree/tree.component.ts +0 -1
package/dist/angular.bundle.js
CHANGED
|
@@ -94401,7 +94401,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
94401
94401
|
this.elementRef = elementRef;
|
|
94402
94402
|
this.title = moduleName$e + '_component';
|
|
94403
94403
|
Stratus.Instances[_.uniqueId('sa_base_component_')] = this;
|
|
94404
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "
|
|
94404
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "sanitizer", "ref", "elementRef", "ngOnInit", "ngOnChanges", "hydrate", "uid", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
94405
94405
|
}
|
|
94406
94406
|
ngOnInit() {
|
|
94407
94407
|
console.info('selector.ngOnInit');
|
|
@@ -95583,6 +95583,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
95583
95583
|
this._ = _;
|
|
95584
95584
|
this.Stratus = Stratus;
|
|
95585
95585
|
this.apiBase = '/Api/Media';
|
|
95586
|
+
this.apiParams = 'forceContext=context';
|
|
95586
95587
|
this.mediaEntities = [];
|
|
95587
95588
|
this.isMediaLoading = true;
|
|
95588
95589
|
this.limit = 20;
|
|
@@ -95631,7 +95632,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
95631
95632
|
paging = this.pageEvent.pageIndex + 1;
|
|
95632
95633
|
}
|
|
95633
95634
|
query = (_.isString(query) && !_.isEmpty(query)) ? `"${query}"` : '';
|
|
95634
|
-
return `${this.apiBase}?limit=${limit}&p=${paging}&q=${query}`;
|
|
95635
|
+
return `${this.apiBase}?limit=${limit}&p=${paging}&q=${query}&${this.apiParams}`;
|
|
95635
95636
|
}
|
|
95636
95637
|
getQuery(query) {
|
|
95637
95638
|
this.lastMediaQuery = query;
|
|
@@ -123043,7 +123044,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
123043
123044
|
this.styled = true;
|
|
123044
123045
|
this.refresh();
|
|
123045
123046
|
});
|
|
123046
|
-
this.hydrate(elementRef, sanitizer, ["title", "
|
|
123047
|
+
this.hydrate(elementRef, sanitizer, ["title", "dev", "debug", "editor", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "property", "classes", "_", "has", "log", "Stratus", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "svgIcons", "initialized", "styled", "blurred", "focused", "codeViewIsOpen", "form", "dataChangeLog", "incomingData", "outgoingData", "debounceSave", "debounceTime", "forceSave", "froalaEditorDirective", "froalaStandardButtons", "froalaConfig", "sanitizer", "ref", "elementRef", "fb", "dialog", "ngOnInit", "modelSave", "listDuplicates", "normalizeIn", "normalizeOut", "changeImgSize", "handleError", "fetchData", "dataDefer", "dataRef", "onDataChange", "created", "changedEditor", "onChangeEvent", "onFocus", "onBlur", "bypassHTML", "trigger", "openCitationDialog", "openLinkDialog", "openMediaDialog", "openCodeViewDialog", "hydrate", "uid", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
123047
123048
|
this.fetchData()
|
|
123048
123049
|
.then(data => {
|
|
123049
123050
|
if (!data || !(data instanceof EventManager$1)) {
|
|
@@ -123545,7 +123546,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
123545
123546
|
this.styled = true;
|
|
123546
123547
|
this.refresh();
|
|
123547
123548
|
});
|
|
123548
|
-
this.hydrate(elementRef, sanitizer, ["title", "
|
|
123549
|
+
this.hydrate(elementRef, sanitizer, ["title", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "_", "has", "log", "Stratus", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "eventID", "svgIcons", "styled", "empty", "libraryDisplay", "isSelector", "isGrid", "listGroup", "placeholder", "targetList", "targetIndex", "sourceList", "sourceIndex", "activeContainer", "iconRegistry", "sanitizer", "ref", "elementRef", "viewportRuler", "drop", "moveModel", "goToUrl", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "toggleLibrary", "showDetails", "deleteMedia", "removeFromSelected", "dragEntered", "move", "moveItemInGrid", "enterPredicate", "getPointerPositionOnPage", "hydrate", "uid", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
123549
123550
|
this.eventID = `${this.target}:${this.id}:${this.property}`;
|
|
123550
123551
|
this.fetchData()
|
|
123551
123552
|
.then(data => {
|
|
@@ -123902,7 +123903,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
123902
123903
|
this.styled = true;
|
|
123903
123904
|
this.refresh().then();
|
|
123904
123905
|
});
|
|
123905
|
-
this.hydrate(elementRef, sanitizer, ["title", "
|
|
123906
|
+
this.hydrate(elementRef, sanitizer, ["title", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "ignorePriority", "get", "has", "log", "Stratus", "selectCtrl", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "svgIcons", "styled", "empty", "iconRegistry", "sanitizer", "ref", "elementRef", "drop", "goToUrl", "toggleStatus", "remove", "fetchData", "dataDefer", "dataRef", "getString", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "hydrate", "uid", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
123906
123907
|
this.fetchData()
|
|
123907
123908
|
.then(data => {
|
|
123908
123909
|
if (!data || !(data instanceof EventManager$1)) {
|
|
@@ -124178,7 +124179,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
124178
124179
|
Stratus.Instances[this.uid] = this;
|
|
124179
124180
|
this.timezoneList = Intl.supportedValuesOf('timeZone');
|
|
124180
124181
|
this.currentTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
124181
|
-
this.hydrate(elementRef, sanitizer, ["title", "
|
|
124182
|
+
this.hydrate(elementRef, sanitizer, ["title", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "Stratus", "registry", "fetched", "data", "model", "dataSub", "onChange", "subscriber", "label", "timezone", "currentTimezone", "inputTimezone", "timezoneList", "filteredTimezones", "initialized", "elementRef", "ref", "sanitizer", "ngOnInit", "updateLabel", "_filter", "fetchData", "dataDefer", "dataRef", "valueChanged", "handleObservableError", "timezoneSelected", "hydrate", "uid", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
124182
124183
|
this.filteredTimezones = this.inputTimezone.valueChanges.pipe(startWith(''), map(value => this._filter(value || '')));
|
|
124183
124184
|
this.fetchData()
|
|
124184
124185
|
.then(data => {
|
|
@@ -124396,7 +124397,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
124396
124397
|
ngOnInit() {
|
|
124397
124398
|
this.uid = safeUniqueId('sa', moduleName$3, 'component');
|
|
124398
124399
|
Stratus.Instances[this.uid] = this;
|
|
124399
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "
|
|
124400
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "isInitialized", "isDestroyed", "isStyled", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "Stratus", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "unsettled", "svgIcons", "isSingleClick", "dblClickWait", "dropLists", "dropListIdMap", "dropListMap", "expandedNodeSet", "dragging", "expandTimeout", "expandDelay", "dropData", "cdkDropListSortingDisabled", "tree", "treeMap", "metaMap", "dataSource", "treeControl", "isBorder", "isDebug", "iconRegistry", "sanitizer", "backend", "ref", "elementRef", "document", "ngOnInit", "ngOnDestroy", "refresh", "remove", "removeNode", "nodeIsEqual", "fetchData", "dataDefer", "dataRef", "trackDropLists", "setExpanded", "setExpandedClick", "setExpandedDblClick", "onDragDrop", "onDragMove", "showDragData", "clearDragData", "buildNodePatch", "getSvg", "addSvgIcon", "hydrate", "uid", "disableRefresh", "stagger", "reloading"]);
|
|
124400
124401
|
Stratus.Internals.CssLoader(`${localDir$7}/${moduleName$3}/${moduleName$3}.component${min$6}.css`)
|
|
124401
124402
|
.then(() => {
|
|
124402
124403
|
this.isStyled = true;
|
|
@@ -128275,7 +128276,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
128275
128276
|
console.error('CSS Failed to load for Component:', this);
|
|
128276
128277
|
this.styled = false;
|
|
128277
128278
|
});
|
|
128278
|
-
this.hydrate(this.elementRef, this.sanitizer, ["gMap", "map", "info", "title", "
|
|
128279
|
+
this.hydrate(this.elementRef, this.sanitizer, ["gMap", "map", "info", "title", "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", "uid", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
128279
128280
|
if ('Safari' === Stratus.Client.name) {
|
|
128280
128281
|
this.disableMarkerAnimations = true;
|
|
128281
128282
|
}
|
|
@@ -128773,6 +128774,205 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
128773
128774
|
}
|
|
128774
128775
|
};
|
|
128775
128776
|
|
|
128777
|
+
function _typeof(obj) {
|
|
128778
|
+
"@babel/helpers - typeof";
|
|
128779
|
+
|
|
128780
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
128781
|
+
_typeof = function (obj) {
|
|
128782
|
+
return typeof obj;
|
|
128783
|
+
};
|
|
128784
|
+
} else {
|
|
128785
|
+
_typeof = function (obj) {
|
|
128786
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
128787
|
+
};
|
|
128788
|
+
}
|
|
128789
|
+
|
|
128790
|
+
return _typeof(obj);
|
|
128791
|
+
}
|
|
128792
|
+
|
|
128793
|
+
var V3_URL = 'https://js.stripe.com/v3';
|
|
128794
|
+
var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
|
|
128795
|
+
var EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
|
|
128796
|
+
var findScript = function findScript() {
|
|
128797
|
+
var scripts = document.querySelectorAll("script[src^=\"".concat(V3_URL, "\"]"));
|
|
128798
|
+
|
|
128799
|
+
for (var i = 0; i < scripts.length; i++) {
|
|
128800
|
+
var script = scripts[i];
|
|
128801
|
+
|
|
128802
|
+
if (!V3_URL_REGEX.test(script.src)) {
|
|
128803
|
+
continue;
|
|
128804
|
+
}
|
|
128805
|
+
|
|
128806
|
+
return script;
|
|
128807
|
+
}
|
|
128808
|
+
|
|
128809
|
+
return null;
|
|
128810
|
+
};
|
|
128811
|
+
|
|
128812
|
+
var injectScript = function injectScript(params) {
|
|
128813
|
+
var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';
|
|
128814
|
+
var script = document.createElement('script');
|
|
128815
|
+
script.src = "".concat(V3_URL).concat(queryString);
|
|
128816
|
+
var headOrBody = document.head || document.body;
|
|
128817
|
+
|
|
128818
|
+
if (!headOrBody) {
|
|
128819
|
+
throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
|
|
128820
|
+
}
|
|
128821
|
+
|
|
128822
|
+
headOrBody.appendChild(script);
|
|
128823
|
+
return script;
|
|
128824
|
+
};
|
|
128825
|
+
|
|
128826
|
+
var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
128827
|
+
if (!stripe || !stripe._registerWrapper) {
|
|
128828
|
+
return;
|
|
128829
|
+
}
|
|
128830
|
+
|
|
128831
|
+
stripe._registerWrapper({
|
|
128832
|
+
name: 'stripe-js',
|
|
128833
|
+
version: "4.0.0",
|
|
128834
|
+
startTime: startTime
|
|
128835
|
+
});
|
|
128836
|
+
};
|
|
128837
|
+
|
|
128838
|
+
var stripePromise = null;
|
|
128839
|
+
var onErrorListener = null;
|
|
128840
|
+
var onLoadListener = null;
|
|
128841
|
+
|
|
128842
|
+
var onError = function onError(reject) {
|
|
128843
|
+
return function () {
|
|
128844
|
+
reject(new Error('Failed to load Stripe.js'));
|
|
128845
|
+
};
|
|
128846
|
+
};
|
|
128847
|
+
|
|
128848
|
+
var onLoad = function onLoad(resolve, reject) {
|
|
128849
|
+
return function () {
|
|
128850
|
+
if (window.Stripe) {
|
|
128851
|
+
resolve(window.Stripe);
|
|
128852
|
+
} else {
|
|
128853
|
+
reject(new Error('Stripe.js not available'));
|
|
128854
|
+
}
|
|
128855
|
+
};
|
|
128856
|
+
};
|
|
128857
|
+
|
|
128858
|
+
var loadScript = function loadScript(params) {
|
|
128859
|
+
// Ensure that we only attempt to load Stripe.js at most once
|
|
128860
|
+
if (stripePromise !== null) {
|
|
128861
|
+
return stripePromise;
|
|
128862
|
+
}
|
|
128863
|
+
|
|
128864
|
+
stripePromise = new Promise(function (resolve, reject) {
|
|
128865
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
128866
|
+
// Resolve to null when imported server side. This makes the module
|
|
128867
|
+
// safe to import in an isomorphic code base.
|
|
128868
|
+
resolve(null);
|
|
128869
|
+
return;
|
|
128870
|
+
}
|
|
128871
|
+
|
|
128872
|
+
if (window.Stripe && params) {
|
|
128873
|
+
console.warn(EXISTING_SCRIPT_MESSAGE);
|
|
128874
|
+
}
|
|
128875
|
+
|
|
128876
|
+
if (window.Stripe) {
|
|
128877
|
+
resolve(window.Stripe);
|
|
128878
|
+
return;
|
|
128879
|
+
}
|
|
128880
|
+
|
|
128881
|
+
try {
|
|
128882
|
+
var script = findScript();
|
|
128883
|
+
|
|
128884
|
+
if (script && params) {
|
|
128885
|
+
console.warn(EXISTING_SCRIPT_MESSAGE);
|
|
128886
|
+
} else if (!script) {
|
|
128887
|
+
script = injectScript(params);
|
|
128888
|
+
} else if (script && onLoadListener !== null && onErrorListener !== null) {
|
|
128889
|
+
var _script$parentNode;
|
|
128890
|
+
|
|
128891
|
+
// remove event listeners
|
|
128892
|
+
script.removeEventListener('load', onLoadListener);
|
|
128893
|
+
script.removeEventListener('error', onErrorListener); // if script exists, but we are reloading due to an error,
|
|
128894
|
+
// reload script to trigger 'load' event
|
|
128895
|
+
|
|
128896
|
+
(_script$parentNode = script.parentNode) === null || _script$parentNode === void 0 ? void 0 : _script$parentNode.removeChild(script);
|
|
128897
|
+
script = injectScript(params);
|
|
128898
|
+
}
|
|
128899
|
+
|
|
128900
|
+
onLoadListener = onLoad(resolve, reject);
|
|
128901
|
+
onErrorListener = onError(reject);
|
|
128902
|
+
script.addEventListener('load', onLoadListener);
|
|
128903
|
+
script.addEventListener('error', onErrorListener);
|
|
128904
|
+
} catch (error) {
|
|
128905
|
+
reject(error);
|
|
128906
|
+
return;
|
|
128907
|
+
}
|
|
128908
|
+
}); // Resets stripePromise on error
|
|
128909
|
+
|
|
128910
|
+
return stripePromise["catch"](function (error) {
|
|
128911
|
+
stripePromise = null;
|
|
128912
|
+
return Promise.reject(error);
|
|
128913
|
+
});
|
|
128914
|
+
};
|
|
128915
|
+
var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
128916
|
+
if (maybeStripe === null) {
|
|
128917
|
+
return null;
|
|
128918
|
+
}
|
|
128919
|
+
|
|
128920
|
+
var stripe = maybeStripe.apply(undefined, args);
|
|
128921
|
+
registerWrapper(stripe, startTime);
|
|
128922
|
+
return stripe;
|
|
128923
|
+
}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
128924
|
+
|
|
128925
|
+
var validateLoadParams = function validateLoadParams(params) {
|
|
128926
|
+
var errorMessage = "invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(params), "\n");
|
|
128927
|
+
|
|
128928
|
+
if (params === null || _typeof(params) !== 'object') {
|
|
128929
|
+
throw new Error(errorMessage);
|
|
128930
|
+
}
|
|
128931
|
+
|
|
128932
|
+
if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === 'boolean') {
|
|
128933
|
+
return params;
|
|
128934
|
+
}
|
|
128935
|
+
|
|
128936
|
+
throw new Error(errorMessage);
|
|
128937
|
+
};
|
|
128938
|
+
|
|
128939
|
+
var loadParams;
|
|
128940
|
+
var loadStripeCalled = false;
|
|
128941
|
+
var loadStripe = function loadStripe() {
|
|
128942
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
128943
|
+
args[_key] = arguments[_key];
|
|
128944
|
+
}
|
|
128945
|
+
|
|
128946
|
+
loadStripeCalled = true;
|
|
128947
|
+
var startTime = Date.now();
|
|
128948
|
+
return loadScript(loadParams).then(function (maybeStripe) {
|
|
128949
|
+
return initStripe(maybeStripe, args, startTime);
|
|
128950
|
+
});
|
|
128951
|
+
};
|
|
128952
|
+
|
|
128953
|
+
loadStripe.setLoadParameters = function (params) {
|
|
128954
|
+
// we won't throw an error if setLoadParameters is called with the same values as before
|
|
128955
|
+
if (loadStripeCalled && loadParams) {
|
|
128956
|
+
var validatedParams = validateLoadParams(params);
|
|
128957
|
+
var parameterKeys = Object.keys(validatedParams);
|
|
128958
|
+
var sameParameters = parameterKeys.reduce(function (previousValue, currentValue) {
|
|
128959
|
+
var _loadParams;
|
|
128960
|
+
|
|
128961
|
+
return previousValue && params[currentValue] === ((_loadParams = loadParams) === null || _loadParams === void 0 ? void 0 : _loadParams[currentValue]);
|
|
128962
|
+
}, true);
|
|
128963
|
+
|
|
128964
|
+
if (sameParameters) {
|
|
128965
|
+
return;
|
|
128966
|
+
}
|
|
128967
|
+
}
|
|
128968
|
+
|
|
128969
|
+
if (loadStripeCalled) {
|
|
128970
|
+
throw new Error('You cannot change load parameters after calling loadStripe');
|
|
128971
|
+
}
|
|
128972
|
+
|
|
128973
|
+
loadParams = validateLoadParams(params);
|
|
128974
|
+
};
|
|
128975
|
+
|
|
128776
128976
|
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
128777
128977
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
128778
128978
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -128807,62 +129007,60 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
128807
129007
|
let StripeService = class StripeService {
|
|
128808
129008
|
constructor() {
|
|
128809
129009
|
this.publishKey = '';
|
|
128810
|
-
this.Stripe = {};
|
|
128811
129010
|
this.instanceOnEmitters = {};
|
|
128812
129011
|
this.collections = {};
|
|
128813
129012
|
this.initializing = false;
|
|
128814
129013
|
this.initialized = false;
|
|
128815
129014
|
Stratus.Services.Stripe = this;
|
|
128816
129015
|
}
|
|
128817
|
-
initialize() {
|
|
129016
|
+
initialize(key) {
|
|
128818
129017
|
return __awaiter$6(this, void 0, void 0, function* () {
|
|
128819
|
-
|
|
128820
|
-
|
|
128821
|
-
|
|
128822
|
-
|
|
129018
|
+
this.publishKey = key;
|
|
129019
|
+
if (this.initialized || this.initializing) {
|
|
129020
|
+
return yield this.waitForInitialization();
|
|
129021
|
+
}
|
|
129022
|
+
this.initializing = true;
|
|
129023
|
+
try {
|
|
129024
|
+
yield Stratus.Internals.JsLoader('https://js.stripe.com/v3/');
|
|
129025
|
+
const stripe = yield loadStripe(key);
|
|
129026
|
+
if (!Object.prototype.hasOwnProperty.call(window, 'Stripe')) {
|
|
129027
|
+
console.warn('Stripe Api was not initialized yet, waiting...');
|
|
129028
|
+
yield this.delay(3000);
|
|
128823
129029
|
if (!Object.prototype.hasOwnProperty.call(window, 'Stripe')) {
|
|
128824
|
-
|
|
128825
|
-
|
|
128826
|
-
|
|
128827
|
-
|
|
128828
|
-
|
|
128829
|
-
|
|
128830
|
-
|
|
128831
|
-
|
|
128832
|
-
|
|
128833
|
-
|
|
128834
|
-
|
|
128835
|
-
|
|
128836
|
-
|
|
128837
|
-
}
|
|
128838
|
-
}).showToast();
|
|
128839
|
-
return;
|
|
128840
|
-
}
|
|
129030
|
+
const error = 'Stripe Api was not initialized, payment widgets cannot load.';
|
|
129031
|
+
console.error(error);
|
|
129032
|
+
this.initializing = false;
|
|
129033
|
+
Toastify({
|
|
129034
|
+
text: error,
|
|
129035
|
+
duration: 3000,
|
|
129036
|
+
close: true,
|
|
129037
|
+
stopOnFocus: true,
|
|
129038
|
+
style: {
|
|
129039
|
+
background: '#E14D45',
|
|
129040
|
+
}
|
|
129041
|
+
}).showToast();
|
|
129042
|
+
return;
|
|
128841
129043
|
}
|
|
128842
129044
|
}
|
|
128843
|
-
|
|
128844
|
-
const error = 'Stripe Api could not be fetched, payment widgets cannot load.';
|
|
128845
|
-
console.error(error);
|
|
128846
|
-
this.initializing = false;
|
|
128847
|
-
Toastify({
|
|
128848
|
-
text: error,
|
|
128849
|
-
duration: 3000,
|
|
128850
|
-
close: true,
|
|
128851
|
-
stopOnFocus: true,
|
|
128852
|
-
style: {
|
|
128853
|
-
background: '#E14D45',
|
|
128854
|
-
}
|
|
128855
|
-
}).showToast();
|
|
128856
|
-
return;
|
|
128857
|
-
}
|
|
128858
|
-
this.Stripe.stripe = window.Stripe(this.publishKey);
|
|
128859
|
-
this.Stripe.stripeElements = this.Stripe.stripe.elements();
|
|
128860
|
-
this.initialized = true;
|
|
128861
|
-
this.initializing = false;
|
|
129045
|
+
this.stripe = stripe;
|
|
128862
129046
|
}
|
|
128863
|
-
|
|
128864
|
-
|
|
129047
|
+
catch (e) {
|
|
129048
|
+
const error = 'Stripe Api could not be fetched, payment widgets cannot load.';
|
|
129049
|
+
console.error(error);
|
|
129050
|
+
this.initializing = false;
|
|
129051
|
+
Toastify({
|
|
129052
|
+
text: error,
|
|
129053
|
+
duration: 3000,
|
|
129054
|
+
close: true,
|
|
129055
|
+
stopOnFocus: true,
|
|
129056
|
+
style: {
|
|
129057
|
+
background: '#E14D45',
|
|
129058
|
+
}
|
|
129059
|
+
}).showToast();
|
|
129060
|
+
return;
|
|
128865
129061
|
}
|
|
129062
|
+
this.initialized = true;
|
|
129063
|
+
this.initializing = false;
|
|
128866
129064
|
});
|
|
128867
129065
|
}
|
|
128868
129066
|
delay(ms) {
|
|
@@ -128890,37 +129088,30 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
128890
129088
|
return;
|
|
128891
129089
|
});
|
|
128892
129090
|
}
|
|
128893
|
-
|
|
129091
|
+
getElements(key) {
|
|
128894
129092
|
return __awaiter$6(this, void 0, void 0, function* () {
|
|
128895
|
-
this.
|
|
128896
|
-
|
|
128897
|
-
return this.Stripe.stripeElements;
|
|
129093
|
+
yield this.initialize(key);
|
|
129094
|
+
return this.stripe.elements;
|
|
128898
129095
|
});
|
|
128899
129096
|
}
|
|
128900
|
-
|
|
129097
|
+
confirmSetup(id, clientSecret, confirmParams) {
|
|
128901
129098
|
return __awaiter$6(this, void 0, void 0, function* () {
|
|
128902
129099
|
if (isEmpty(this.currentElement) ||
|
|
128903
129100
|
this.currentElement.id !== id) {
|
|
128904
129101
|
const error = {
|
|
128905
129102
|
type: 'invalid_request_error',
|
|
128906
129103
|
charge: null,
|
|
128907
|
-
message: 'The Element for ' + id + 'no longer exists. Cannot attach
|
|
129104
|
+
message: 'The Element for ' + id + 'no longer exists. Cannot attach confirmSetup'
|
|
128908
129105
|
};
|
|
128909
129106
|
return { error };
|
|
128910
129107
|
}
|
|
128911
|
-
const
|
|
128912
|
-
|
|
128913
|
-
|
|
128914
|
-
|
|
128915
|
-
|
|
128916
|
-
if (data
|
|
128917
|
-
&& !isEmpty(data.payment_method)
|
|
128918
|
-
&& !isString(data.payment_method)
|
|
128919
|
-
&& !isEmpty(data.payment_method.billing_details)
|
|
128920
|
-
&& !isString(stripeData.payment_method)) {
|
|
128921
|
-
stripeData.payment_method.billing_details = data.payment_method.billing_details;
|
|
129108
|
+
const elements = this.currentElement.elements;
|
|
129109
|
+
const possibleError = yield elements.submit();
|
|
129110
|
+
if (possibleError.error) {
|
|
129111
|
+
console.warn('submit error', possibleError.error);
|
|
129112
|
+
return { setupIntent: null, error: possibleError.error };
|
|
128922
129113
|
}
|
|
128923
|
-
return this.
|
|
129114
|
+
return this.stripe.confirmSetup({ elements, clientSecret, confirmParams, redirect: 'if_required' });
|
|
128924
129115
|
});
|
|
128925
129116
|
}
|
|
128926
129117
|
registerCollection(component, collection) {
|
|
@@ -128948,17 +129139,20 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
128948
129139
|
yield Promise.all(uidList.map(fn => fn()));
|
|
128949
129140
|
});
|
|
128950
129141
|
}
|
|
128951
|
-
createElement(id, publishKey,
|
|
129142
|
+
createElement(id, publishKey, clientSecret, options, mountElement) {
|
|
128952
129143
|
return __awaiter$6(this, void 0, void 0, function* () {
|
|
128953
|
-
if (
|
|
129144
|
+
if (this.currentElement) {
|
|
128954
129145
|
console.warn('StripeElement for', this.currentElement.id, 'already exists. Destroying existing (consider cleaning up first)');
|
|
128955
129146
|
this.destroyElement();
|
|
128956
129147
|
}
|
|
128957
|
-
const
|
|
129148
|
+
const elementType = 'payment';
|
|
129149
|
+
const elements = yield this.getElements(publishKey);
|
|
129150
|
+
const stripeElements = elements({ clientSecret });
|
|
129151
|
+
const element = stripeElements.create(elementType, options);
|
|
128958
129152
|
this.currentElement = {
|
|
128959
129153
|
id: safeUniqueId(id),
|
|
128960
|
-
|
|
128961
|
-
|
|
129154
|
+
element,
|
|
129155
|
+
elements: stripeElements
|
|
128962
129156
|
};
|
|
128963
129157
|
if (mountElement) {
|
|
128964
129158
|
this.mountElement(this.currentElement.id, mountElement);
|
|
@@ -128996,10 +129190,10 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
128996
129190
|
}).showToast();
|
|
128997
129191
|
return;
|
|
128998
129192
|
}
|
|
128999
|
-
return this.currentElement.element.
|
|
129193
|
+
return this.currentElement.element.on(event, handler);
|
|
129000
129194
|
}
|
|
129001
129195
|
destroyElement(id) {
|
|
129002
|
-
if (
|
|
129196
|
+
if (this.currentElement &&
|
|
129003
129197
|
(isNil(id) ||
|
|
129004
129198
|
(isString(id) && this.currentElement.id === id))) {
|
|
129005
129199
|
if (this.currentElement.element) {
|
|
@@ -129102,12 +129296,15 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129102
129296
|
this.paymentMethodApiPath = 'PaymentMethod';
|
|
129103
129297
|
this.cardComplete = false;
|
|
129104
129298
|
this.cardSaved = false;
|
|
129299
|
+
this.pmNotVerified = false;
|
|
129300
|
+
this.cardNextAction = null;
|
|
129105
129301
|
this.formPending = false;
|
|
129106
129302
|
this.publishKey = '';
|
|
129107
129303
|
this.formMessage = '';
|
|
129108
129304
|
this.billingInfo = {
|
|
129109
129305
|
address: {}
|
|
129110
129306
|
};
|
|
129307
|
+
this.verifyCode = 'SM';
|
|
129111
129308
|
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
129112
129309
|
Stratus.Instances[this.uid] = this;
|
|
129113
129310
|
this.elementId = this.elementId || this.uid;
|
|
@@ -129119,9 +129316,9 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129119
129316
|
console.error('CSS Failed to load for Component:', this);
|
|
129120
129317
|
this.styled = false;
|
|
129121
129318
|
});
|
|
129122
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "
|
|
129319
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "urlRoot", "paymentMethodApiPath", "cardComplete", "cardSaved", "pmNotVerified", "cardNextAction", "formPending", "clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo", "billingInfo", "paymentMethodId", "verifyCode", "cardId", "elementRef", "sanitizer", "Stripe", "dialogRef", "dialogData", "ngOnInit", "isEditable", "isSubmittable", "saveCard", "verifyPM", "dialogClose", "ngOnDestroy", "elementId", "styled", "initialized", "hydrate", "uid", "ref", "disableRefresh", "stagger", "reloading", "refresh"]);
|
|
129123
129320
|
if (!isEmpty(this.dialogData)) {
|
|
129124
|
-
const keysPossible = ["clientSecret", "publishKey", "formMessage", "urlRoot", "paymentMethodApiPath", "detailedBillingInfo", "defaultBillingInfo"];
|
|
129321
|
+
const keysPossible = ["clientSecret", "publishKey", "formMessage", "urlRoot", "paymentMethodApiPath", "detailedBillingInfo", "defaultBillingInfo", "pmNotVerified", "paymentMethodId"];
|
|
129125
129322
|
Object.keys(this.dialogData).forEach((attr) => {
|
|
129126
129323
|
if (!isEmpty(attr) && includes(keysPossible, attr)) {
|
|
129127
129324
|
set(this, attr, this.dialogData[attr]);
|
|
@@ -129129,45 +129326,59 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129129
129326
|
});
|
|
129130
129327
|
}
|
|
129131
129328
|
if (isObject$2(this.defaultBillingInfo)) {
|
|
129329
|
+
if (Object.hasOwn(this.defaultBillingInfo, 'phone') &&
|
|
129330
|
+
isNumber(this.defaultBillingInfo.phone) &&
|
|
129331
|
+
this.defaultBillingInfo.phone) {
|
|
129332
|
+
this.defaultBillingInfo.phone = this.defaultBillingInfo.phone.toString();
|
|
129333
|
+
}
|
|
129334
|
+
if (Object.hasOwn(this.defaultBillingInfo, 'address') &&
|
|
129335
|
+
Object.hasOwn(this.defaultBillingInfo.address, 'postal_code') &&
|
|
129336
|
+
isNumber(this.defaultBillingInfo.address.postal_code) &&
|
|
129337
|
+
this.defaultBillingInfo.address.postal_code) {
|
|
129338
|
+
this.defaultBillingInfo.address.postal_code = this.defaultBillingInfo.address.postal_code.toString();
|
|
129339
|
+
}
|
|
129132
129340
|
assignIn(this.billingInfo, this.defaultBillingInfo);
|
|
129133
129341
|
}
|
|
129134
129342
|
}
|
|
129135
129343
|
ngOnInit() {
|
|
129136
129344
|
return __awaiter$5(this, void 0, void 0, function* () {
|
|
129137
129345
|
const options = {
|
|
129138
|
-
|
|
129346
|
+
defaultValues: {
|
|
129347
|
+
billingDetails: this.billingInfo
|
|
129348
|
+
},
|
|
129139
129349
|
};
|
|
129140
|
-
|
|
129141
|
-
|
|
129142
|
-
|
|
129143
|
-
|
|
129144
|
-
|
|
129145
|
-
|
|
129146
|
-
|
|
129147
|
-
|
|
129148
|
-
|
|
129149
|
-
|
|
129150
|
-
|
|
129151
|
-
|
|
129152
|
-
|
|
129153
|
-
|
|
129154
|
-
|
|
129350
|
+
if (this.publishKey && this.clientSecret) {
|
|
129351
|
+
this.cardId = yield this.Stripe.createElement(this.uid, this.publishKey, this.clientSecret, options, `#${this.elementId}-mount`);
|
|
129352
|
+
this.Stripe.elementAddEventListener(this.cardId, 'ready', (event) => {
|
|
129353
|
+
this.initialized = true;
|
|
129354
|
+
});
|
|
129355
|
+
this.Stripe.elementAddEventListener(this.cardId, 'change', (event) => {
|
|
129356
|
+
const displayError = document.getElementById(`${this.elementId}-errors`);
|
|
129357
|
+
if (Object.prototype.hasOwnProperty.call(event, 'complete') &&
|
|
129358
|
+
this.cardComplete !== event.complete) {
|
|
129359
|
+
this.cardComplete = event.complete;
|
|
129360
|
+
}
|
|
129361
|
+
if (event.error) {
|
|
129362
|
+
displayError.textContent = event.error.message;
|
|
129363
|
+
}
|
|
129364
|
+
else {
|
|
129365
|
+
displayError.textContent = '';
|
|
129366
|
+
}
|
|
129367
|
+
});
|
|
129368
|
+
}
|
|
129369
|
+
else if (this.paymentMethodId) {
|
|
129370
|
+
this.initialized = true;
|
|
129371
|
+
}
|
|
129372
|
+
else {
|
|
129373
|
+
console.warn('PaymentMethodComponent is missing required fields');
|
|
129374
|
+
}
|
|
129155
129375
|
});
|
|
129156
129376
|
}
|
|
129157
129377
|
isEditable() {
|
|
129158
129378
|
return !this.formPending && this.initialized;
|
|
129159
129379
|
}
|
|
129160
|
-
isBillingDetailsFilled() {
|
|
129161
|
-
if (!isEmpty(this.billingInfo.name) &&
|
|
129162
|
-
!isEmpty(this.billingInfo.email) &&
|
|
129163
|
-
!isEmpty(this.billingInfo.address.line1) &&
|
|
129164
|
-
!isEmpty(this.billingInfo.address.city) &&
|
|
129165
|
-
!isEmpty(this.billingInfo.address.state) &&
|
|
129166
|
-
!isEmpty(this.billingInfo.address.postal_code)) ;
|
|
129167
|
-
return this.isEditable();
|
|
129168
|
-
}
|
|
129169
129380
|
isSubmittable() {
|
|
129170
|
-
return this.cardComplete && this.isEditable()
|
|
129381
|
+
return this.cardComplete && this.isEditable();
|
|
129171
129382
|
}
|
|
129172
129383
|
saveCard(ev) {
|
|
129173
129384
|
return __awaiter$5(this, void 0, void 0, function* () {
|
|
@@ -129178,20 +129389,18 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129178
129389
|
return;
|
|
129179
129390
|
}
|
|
129180
129391
|
this.formPending = true;
|
|
129181
|
-
const { setupIntent, error } = yield this.Stripe.
|
|
129182
|
-
|
|
129183
|
-
billing_details: this.billingInfo
|
|
129184
|
-
}
|
|
129392
|
+
const { setupIntent, error } = yield this.Stripe.confirmSetup(this.cardId, this.clientSecret, {
|
|
129393
|
+
return_url: '',
|
|
129185
129394
|
});
|
|
129186
129395
|
if (error) {
|
|
129187
129396
|
console.error('error:', error, setupIntent);
|
|
129188
129397
|
this.formPending = false;
|
|
129189
|
-
const
|
|
129398
|
+
const displaySaveError = document.getElementById(`${this.elementId}-errors`);
|
|
129190
129399
|
let errorMessage = 'An Unknown Error has occurred';
|
|
129191
129400
|
if (Object.prototype.hasOwnProperty.call(error, 'message')) {
|
|
129192
129401
|
errorMessage = error.message;
|
|
129193
129402
|
}
|
|
129194
|
-
|
|
129403
|
+
displaySaveError.textContent = errorMessage;
|
|
129195
129404
|
return;
|
|
129196
129405
|
}
|
|
129197
129406
|
if (setupIntent.status === 'succeeded'
|
|
@@ -129216,13 +129425,75 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129216
129425
|
email: this.billingInfo.email
|
|
129217
129426
|
};
|
|
129218
129427
|
this.Stripe.emitManual('paymentMethodCreated', 'Stripe', this, cardDetails);
|
|
129428
|
+
return;
|
|
129219
129429
|
}
|
|
129220
|
-
|
|
129430
|
+
if (setupIntent.status === 'requires_action'
|
|
129431
|
+
&& isString(setupIntent.payment_method)
|
|
129432
|
+
&& setupIntent.next_action != null
|
|
129433
|
+
&& [
|
|
129434
|
+
'redirect_to_url',
|
|
129435
|
+
'verify_with_microdeposits'
|
|
129436
|
+
].includes(setupIntent.next_action.type)) {
|
|
129437
|
+
const apiOptions = {
|
|
129438
|
+
target: this.paymentMethodApiPath
|
|
129439
|
+
};
|
|
129440
|
+
if (this.urlRoot) {
|
|
129441
|
+
apiOptions.urlRoot = this.urlRoot;
|
|
129442
|
+
}
|
|
129443
|
+
const model = new Model(apiOptions);
|
|
129444
|
+
model.data = {
|
|
129445
|
+
status: 0,
|
|
129446
|
+
next_action: setupIntent.next_action,
|
|
129447
|
+
payment_method: setupIntent.payment_method,
|
|
129448
|
+
setup_intent: setupIntent.id,
|
|
129449
|
+
};
|
|
129450
|
+
this.paymentMethodId = setupIntent.payment_method;
|
|
129451
|
+
yield model.save();
|
|
129452
|
+
this.cardSaved = true;
|
|
129453
|
+
this.pmNotVerified = true;
|
|
129221
129454
|
this.formPending = false;
|
|
129222
|
-
|
|
129223
|
-
|
|
129224
|
-
|
|
129455
|
+
this.cardNextAction = clone(setupIntent.next_action);
|
|
129456
|
+
yield this.Stripe.fetchCollections();
|
|
129457
|
+
const cardDetails = {
|
|
129458
|
+
type: 'us_bank_account',
|
|
129459
|
+
name: this.billingInfo.name,
|
|
129460
|
+
email: this.billingInfo.email
|
|
129461
|
+
};
|
|
129462
|
+
this.Stripe.emitManual('paymentMethodCreated', 'Stripe', this, cardDetails);
|
|
129463
|
+
return;
|
|
129464
|
+
}
|
|
129465
|
+
this.formPending = false;
|
|
129466
|
+
console.error('something went wrong. no error, no success', setupIntent);
|
|
129467
|
+
const displayError = document.getElementById(`${this.elementId}-errors`);
|
|
129468
|
+
displayError.textContent = 'An unknown Error has occurred';
|
|
129469
|
+
});
|
|
129470
|
+
}
|
|
129471
|
+
verifyPM(ev) {
|
|
129472
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
129473
|
+
if (ev) {
|
|
129474
|
+
ev.preventDefault();
|
|
129225
129475
|
}
|
|
129476
|
+
if (this.formPending ||
|
|
129477
|
+
!this.paymentMethodId ||
|
|
129478
|
+
this.verifyCode.length !== 6) {
|
|
129479
|
+
return;
|
|
129480
|
+
}
|
|
129481
|
+
this.formPending = true;
|
|
129482
|
+
const apiOptions = {
|
|
129483
|
+
target: this.paymentMethodApiPath
|
|
129484
|
+
};
|
|
129485
|
+
if (this.urlRoot) {
|
|
129486
|
+
apiOptions.urlRoot = this.urlRoot;
|
|
129487
|
+
}
|
|
129488
|
+
const model = new Model(apiOptions);
|
|
129489
|
+
model.data = {
|
|
129490
|
+
payment_method: this.paymentMethodId,
|
|
129491
|
+
verify_value: this.verifyCode
|
|
129492
|
+
};
|
|
129493
|
+
yield model.save();
|
|
129494
|
+
this.cardSaved = true;
|
|
129495
|
+
this.formPending = false;
|
|
129496
|
+
yield this.Stripe.fetchCollections();
|
|
129226
129497
|
});
|
|
129227
129498
|
}
|
|
129228
129499
|
dialogClose() {
|
|
@@ -129245,6 +129516,10 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129245
129516
|
Input(),
|
|
129246
129517
|
__metadata$6("design:type", String)
|
|
129247
129518
|
], StripePaymentMethodComponent.prototype, "paymentMethodApiPath", void 0);
|
|
129519
|
+
__decorate$7([
|
|
129520
|
+
Input(),
|
|
129521
|
+
__metadata$6("design:type", Object)
|
|
129522
|
+
], StripePaymentMethodComponent.prototype, "pmNotVerified", void 0);
|
|
129248
129523
|
__decorate$7([
|
|
129249
129524
|
Input(),
|
|
129250
129525
|
__metadata$6("design:type", String)
|
|
@@ -129265,6 +129540,10 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129265
129540
|
Input(),
|
|
129266
129541
|
__metadata$6("design:type", Object)
|
|
129267
129542
|
], StripePaymentMethodComponent.prototype, "defaultBillingInfo", void 0);
|
|
129543
|
+
__decorate$7([
|
|
129544
|
+
Input(),
|
|
129545
|
+
__metadata$6("design:type", String)
|
|
129546
|
+
], StripePaymentMethodComponent.prototype, "paymentMethodId", void 0);
|
|
129268
129547
|
StripePaymentMethodComponent = __decorate$7([
|
|
129269
129548
|
Component({
|
|
129270
129549
|
selector: `sa-${packageName$5}-${componentName$5}`,
|
|
@@ -129312,6 +129591,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129312
129591
|
this.editable = false;
|
|
129313
129592
|
this.templateStyle = 'default';
|
|
129314
129593
|
this.urlRoot = '/Api';
|
|
129594
|
+
this.paymentMethodApiPath = 'PaymentMethod';
|
|
129315
129595
|
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
129316
129596
|
Stratus.Instances[this.uid] = this;
|
|
129317
129597
|
this.elementId = this.elementId || this.uid;
|
|
@@ -129323,7 +129603,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129323
129603
|
console.error('CSS Failed to load for Component:', this);
|
|
129324
129604
|
this.styled = false;
|
|
129325
129605
|
});
|
|
129326
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "model", "editable", "templateStyle", "urlRoot", "dialog", "elementRef", "sanitizer", "Stripe", "ngOnInit", "getCardLogoUrl", "isExpired", "isExpiring", "deletePM", "
|
|
129606
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "model", "editable", "templateStyle", "urlRoot", "paymentMethodApiPath", "dialog", "elementRef", "sanitizer", "Stripe", "ngOnInit", "getCardLogoUrl", "isExpired", "isExpiring", "isUnverified", "deletePM", "verifyPaymentMethod", "deletePMConfirmation", "elementId", "styled", "initialized", "hydrate", "uid", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
129327
129607
|
}
|
|
129328
129608
|
ngOnInit() {
|
|
129329
129609
|
return __awaiter$4(this, void 0, void 0, function* () {
|
|
@@ -129340,6 +129620,9 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129340
129620
|
if (this.model.pending) {
|
|
129341
129621
|
return false;
|
|
129342
129622
|
}
|
|
129623
|
+
if (this.model.data.type !== 'card') {
|
|
129624
|
+
return false;
|
|
129625
|
+
}
|
|
129343
129626
|
const d = new Date();
|
|
129344
129627
|
const month = d.getMonth() + 1;
|
|
129345
129628
|
const year = d.getFullYear();
|
|
@@ -129355,6 +129638,9 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129355
129638
|
if (this.model.pending) {
|
|
129356
129639
|
return false;
|
|
129357
129640
|
}
|
|
129641
|
+
if (this.model.data.type !== 'card') {
|
|
129642
|
+
return false;
|
|
129643
|
+
}
|
|
129358
129644
|
const d = new Date();
|
|
129359
129645
|
const month = d.getMonth() + 1;
|
|
129360
129646
|
const year = d.getFullYear();
|
|
@@ -129366,6 +129652,15 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129366
129652
|
}
|
|
129367
129653
|
return this.model.data.exp_month <= month;
|
|
129368
129654
|
}
|
|
129655
|
+
isUnverified() {
|
|
129656
|
+
if (this.model.pending) {
|
|
129657
|
+
return false;
|
|
129658
|
+
}
|
|
129659
|
+
if (this.model.data.type !== 'us_bank_account') {
|
|
129660
|
+
return false;
|
|
129661
|
+
}
|
|
129662
|
+
return this.model.data.status === 0;
|
|
129663
|
+
}
|
|
129369
129664
|
deletePM(event) {
|
|
129370
129665
|
if (event) {
|
|
129371
129666
|
event.stopPropagation();
|
|
@@ -129373,6 +129668,25 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129373
129668
|
this.deletePMConfirmation();
|
|
129374
129669
|
return false;
|
|
129375
129670
|
}
|
|
129671
|
+
verifyPaymentMethod(ev) {
|
|
129672
|
+
if (ev) {
|
|
129673
|
+
ev.preventDefault();
|
|
129674
|
+
}
|
|
129675
|
+
const dialogRef = this.dialog.open(StripePaymentMethodComponent, {
|
|
129676
|
+
width: '1000px',
|
|
129677
|
+
data: {
|
|
129678
|
+
urlRoot: this.urlRoot,
|
|
129679
|
+
paymentMethodApiPath: this.paymentMethodApiPath,
|
|
129680
|
+
paymentMethodId: this.model.data.paymentMethodId,
|
|
129681
|
+
pmNotVerified: true
|
|
129682
|
+
}
|
|
129683
|
+
});
|
|
129684
|
+
dialogRef.afterClosed().subscribe((result) => {
|
|
129685
|
+
if (!result || isEmpty(result)) {
|
|
129686
|
+
return;
|
|
129687
|
+
}
|
|
129688
|
+
});
|
|
129689
|
+
}
|
|
129376
129690
|
deletePMConfirmation() {
|
|
129377
129691
|
const dialog = this.dialog
|
|
129378
129692
|
.open(ConfirmDialogComponent, {
|
|
@@ -129410,6 +129724,10 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129410
129724
|
Input(),
|
|
129411
129725
|
__metadata$5("design:type", Object)
|
|
129412
129726
|
], StripePaymentMethodItemComponent.prototype, "urlRoot", void 0);
|
|
129727
|
+
__decorate$6([
|
|
129728
|
+
Input(),
|
|
129729
|
+
__metadata$5("design:type", Object)
|
|
129730
|
+
], StripePaymentMethodItemComponent.prototype, "paymentMethodApiPath", void 0);
|
|
129413
129731
|
StripePaymentMethodItemComponent = __decorate$6([
|
|
129414
129732
|
Component({
|
|
129415
129733
|
selector: `sa-${packageName$4}-${componentName$4}`,
|
|
@@ -129453,7 +129771,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129453
129771
|
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
129454
129772
|
Stratus.Instances[this.uid] = this;
|
|
129455
129773
|
this.elementId = this.elementId || this.uid;
|
|
129456
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "model", "name", "brand", "last4", "expMonth", "expYear", "templateStyle", "elementRef", "sanitizer", "ngOnInit", "
|
|
129774
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "model", "name", "brand", "last4", "expMonth", "expYear", "templateStyle", "elementRef", "sanitizer", "ngOnInit", "elementId", "styled", "initialized", "hydrate", "uid", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
129457
129775
|
}
|
|
129458
129776
|
ngOnInit() {
|
|
129459
129777
|
return __awaiter$3(this, void 0, void 0, function* () {
|
|
@@ -129574,7 +129892,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129574
129892
|
console.error('CSS Failed to load for Component:', this);
|
|
129575
129893
|
this.styled = false;
|
|
129576
129894
|
});
|
|
129577
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "urlRoot", "paymentMethodApiPath", "addCardButtonText", "addCardDisabled", "disabled", "property", "detailedBillingInfo", "defaultBillingName", "defaultBillingEmail", "defaultBillingPhone", "defaultBillingZip", "defaultBillingState", "defaultBillingCity", "defaultBillingAddress1", "defaultBillingAddress2", "defaultBillingInfo", "elementRef", "ref", "sanitizer", "Stripe", "ngOnInit", "collection", "
|
|
129895
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "urlRoot", "paymentMethodApiPath", "addCardButtonText", "addCardDisabled", "disabled", "property", "detailedBillingInfo", "defaultBillingName", "defaultBillingEmail", "defaultBillingPhone", "defaultBillingZip", "defaultBillingState", "defaultBillingCity", "defaultBillingAddress1", "defaultBillingAddress2", "defaultBillingInfo", "elementRef", "ref", "sanitizer", "Stripe", "ngOnInit", "collection", "elementId", "styled", "initialized", "hydrate", "uid", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
129578
129896
|
const apiOptions = {
|
|
129579
129897
|
autoSave: false,
|
|
129580
129898
|
target: this.paymentMethodApiPath,
|
|
@@ -129750,7 +130068,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
129750
130068
|
this.styled = false;
|
|
129751
130069
|
this.refresh().then();
|
|
129752
130070
|
});
|
|
129753
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "registryModel", "paymentMethodApiPath", "addCardButtonText", "selectCardButtonText", "selectedTemplateStyle", "disabled", "property", "detailedBillingInfo", "defaultBillingName", "defaultBillingEmail", "defaultBillingPhone", "defaultBillingZip", "defaultBillingState", "defaultBillingCity", "defaultBillingAddress1", "defaultBillingAddress2", "defaultBillingInfo", "fieldName", "fieldNameId", "registry", "fetched", "model", "dataSub", "subscriber", "form", "paymentSelect", "elementRef", "fb", "ref", "sanitizer", "Stripe", "ngOnInit", "valueChanged", "normalizeOut", "normalizeIn", "fetchData", "objectComparisonFunction", "dataDefer", "dataRef", "handleObservableError", "isPMExpired", "selectorListClose", "selectorListOpen", "collection", "
|
|
130071
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "registryModel", "paymentMethodApiPath", "addCardButtonText", "selectCardButtonText", "selectedTemplateStyle", "disabled", "property", "detailedBillingInfo", "defaultBillingName", "defaultBillingEmail", "defaultBillingPhone", "defaultBillingZip", "defaultBillingState", "defaultBillingCity", "defaultBillingAddress1", "defaultBillingAddress2", "defaultBillingInfo", "fieldName", "fieldNameId", "registry", "fetched", "model", "dataSub", "subscriber", "form", "paymentSelect", "elementRef", "fb", "ref", "sanitizer", "Stripe", "ngOnInit", "valueChanged", "normalizeOut", "normalizeIn", "fetchData", "objectComparisonFunction", "dataDefer", "dataRef", "handleObservableError", "isPMExpired", "selectorListClose", "selectorListOpen", "collection", "elementId", "styled", "initialized", "hydrate", "uid", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
129754
130072
|
const apiOptions = {
|
|
129755
130073
|
autoSave: false,
|
|
129756
130074
|
target: this.paymentMethodApiPath,
|
|
@@ -130089,7 +130407,7 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
130089
130407
|
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
130090
130408
|
Stratus.Instances[this.uid] = this;
|
|
130091
130409
|
this.elementId = this.elementId || this.uid;
|
|
130092
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "styled", "initialized", "newPaymentMethodPrompt", "newPaymentMethodPending", "urlRoot", "paymentMethodApiPath", "addCardButtonText", "detailedBillingInfo", "defaultBillingInfo", "elementRef", "sanitizer", "dialog", "ngOnInit", "addPaymentMethod", "inputPaymentMethod", "
|
|
130410
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "styled", "initialized", "newPaymentMethodPrompt", "newPaymentMethodPending", "urlRoot", "paymentMethodApiPath", "addCardButtonText", "detailedBillingInfo", "defaultBillingInfo", "elementRef", "sanitizer", "dialog", "ngOnInit", "addPaymentMethod", "inputPaymentMethod", "elementId", "hydrate", "uid", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
130093
130411
|
}
|
|
130094
130412
|
ngOnInit() {
|
|
130095
130413
|
this.initialized = true;
|
|
@@ -161591,6 +161909,54 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
161591
161909
|
};
|
|
161592
161910
|
});
|
|
161593
161911
|
|
|
161912
|
+
System.register(["quill"], function (exports_1, context_1) {
|
|
161913
|
+
var quill_1, BaseImage, ATTRIBUTES, QuillImageFormatPlugin;
|
|
161914
|
+
context_1 && context_1.id;
|
|
161915
|
+
return {
|
|
161916
|
+
setters: [
|
|
161917
|
+
function (quill_1_1) {
|
|
161918
|
+
quill_1 = quill_1_1;
|
|
161919
|
+
}
|
|
161920
|
+
],
|
|
161921
|
+
execute: function () {
|
|
161922
|
+
BaseImage = quill_1.default.import('formats/image');
|
|
161923
|
+
ATTRIBUTES = [
|
|
161924
|
+
'alt',
|
|
161925
|
+
'height',
|
|
161926
|
+
'width',
|
|
161927
|
+
'stratus-src',
|
|
161928
|
+
'stratusSrc'
|
|
161929
|
+
];
|
|
161930
|
+
QuillImageFormatPlugin = class QuillImageFormatPlugin extends BaseImage {
|
|
161931
|
+
constructor() {
|
|
161932
|
+
super(...arguments);
|
|
161933
|
+
this.blotName = 'imageCustom';
|
|
161934
|
+
this.tagName = 'IMG';
|
|
161935
|
+
}
|
|
161936
|
+
format(name, value) {
|
|
161937
|
+
console.log('format:', name, value, this.domNode.getAttribute('src'));
|
|
161938
|
+
if (ATTRIBUTES.indexOf(name) === -1) {
|
|
161939
|
+
super.format(name, value);
|
|
161940
|
+
return;
|
|
161941
|
+
}
|
|
161942
|
+
if (!value) {
|
|
161943
|
+
this.domNode.removeAttribute(name);
|
|
161944
|
+
return;
|
|
161945
|
+
}
|
|
161946
|
+
if (name === 'stratus-src') {
|
|
161947
|
+
console.log('stratus-src:', value);
|
|
161948
|
+
}
|
|
161949
|
+
if (name === 'stratusSrc') {
|
|
161950
|
+
console.log('stratusSrc:', value);
|
|
161951
|
+
}
|
|
161952
|
+
this.domNode.setAttribute(name, value);
|
|
161953
|
+
}
|
|
161954
|
+
};
|
|
161955
|
+
exports_1("QuillImageFormatPlugin", QuillImageFormatPlugin);
|
|
161956
|
+
}
|
|
161957
|
+
};
|
|
161958
|
+
});
|
|
161959
|
+
|
|
161594
161960
|
System.register(["@stratusjs/runtime/stratus", "lodash", "quill"], function (exports_1, context_1) {
|
|
161595
161961
|
var stratus_1, lodash_1, quill_1, QuillInputButtonPlugin;
|
|
161596
161962
|
context_1 && context_1.id;
|
|
@@ -161687,54 +162053,6 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
161687
162053
|
};
|
|
161688
162054
|
});
|
|
161689
162055
|
|
|
161690
|
-
System.register(["quill"], function (exports_1, context_1) {
|
|
161691
|
-
var quill_1, BaseImage, ATTRIBUTES, QuillImageFormatPlugin;
|
|
161692
|
-
context_1 && context_1.id;
|
|
161693
|
-
return {
|
|
161694
|
-
setters: [
|
|
161695
|
-
function (quill_1_1) {
|
|
161696
|
-
quill_1 = quill_1_1;
|
|
161697
|
-
}
|
|
161698
|
-
],
|
|
161699
|
-
execute: function () {
|
|
161700
|
-
BaseImage = quill_1.default.import('formats/image');
|
|
161701
|
-
ATTRIBUTES = [
|
|
161702
|
-
'alt',
|
|
161703
|
-
'height',
|
|
161704
|
-
'width',
|
|
161705
|
-
'stratus-src',
|
|
161706
|
-
'stratusSrc'
|
|
161707
|
-
];
|
|
161708
|
-
QuillImageFormatPlugin = class QuillImageFormatPlugin extends BaseImage {
|
|
161709
|
-
constructor() {
|
|
161710
|
-
super(...arguments);
|
|
161711
|
-
this.blotName = 'imageCustom';
|
|
161712
|
-
this.tagName = 'IMG';
|
|
161713
|
-
}
|
|
161714
|
-
format(name, value) {
|
|
161715
|
-
console.log('format:', name, value, this.domNode.getAttribute('src'));
|
|
161716
|
-
if (ATTRIBUTES.indexOf(name) === -1) {
|
|
161717
|
-
super.format(name, value);
|
|
161718
|
-
return;
|
|
161719
|
-
}
|
|
161720
|
-
if (!value) {
|
|
161721
|
-
this.domNode.removeAttribute(name);
|
|
161722
|
-
return;
|
|
161723
|
-
}
|
|
161724
|
-
if (name === 'stratus-src') {
|
|
161725
|
-
console.log('stratus-src:', value);
|
|
161726
|
-
}
|
|
161727
|
-
if (name === 'stratusSrc') {
|
|
161728
|
-
console.log('stratusSrc:', value);
|
|
161729
|
-
}
|
|
161730
|
-
this.domNode.setAttribute(name, value);
|
|
161731
|
-
}
|
|
161732
|
-
};
|
|
161733
|
-
exports_1("QuillImageFormatPlugin", QuillImageFormatPlugin);
|
|
161734
|
-
}
|
|
161735
|
-
};
|
|
161736
|
-
});
|
|
161737
|
-
|
|
161738
162056
|
System.register(["reflect-metadata", "lodash", "@angular/core"], function (exports_1, context_1) {
|
|
161739
162057
|
var lodash_1, core_1, RootComponent;
|
|
161740
162058
|
context_1 && context_1.id;
|
|
@@ -162154,6 +162472,108 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
162154
162472
|
};
|
|
162155
162473
|
});
|
|
162156
162474
|
|
|
162475
|
+
System.register(["@angular/core"], function (exports_1, context_1) {
|
|
162476
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
162477
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
162478
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
162479
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
162480
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
162481
|
+
};
|
|
162482
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
162483
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
162484
|
+
};
|
|
162485
|
+
var core_1, FroalaViewDirective;
|
|
162486
|
+
context_1 && context_1.id;
|
|
162487
|
+
return {
|
|
162488
|
+
setters: [
|
|
162489
|
+
function (core_1_1) {
|
|
162490
|
+
core_1 = core_1_1;
|
|
162491
|
+
}
|
|
162492
|
+
],
|
|
162493
|
+
execute: function () {
|
|
162494
|
+
FroalaViewDirective = class FroalaViewDirective {
|
|
162495
|
+
constructor(renderer, element) {
|
|
162496
|
+
this.renderer = renderer;
|
|
162497
|
+
this._element = element.nativeElement;
|
|
162498
|
+
}
|
|
162499
|
+
set froalaView(content) {
|
|
162500
|
+
this._element.innerHTML = content;
|
|
162501
|
+
}
|
|
162502
|
+
ngAfterViewInit() {
|
|
162503
|
+
this.renderer.addClass(this._element, 'fr-view');
|
|
162504
|
+
}
|
|
162505
|
+
};
|
|
162506
|
+
__decorate([
|
|
162507
|
+
core_1.Input(),
|
|
162508
|
+
__metadata("design:type", String),
|
|
162509
|
+
__metadata("design:paramtypes", [String])
|
|
162510
|
+
], FroalaViewDirective.prototype, "froalaView", null);
|
|
162511
|
+
FroalaViewDirective = __decorate([
|
|
162512
|
+
core_1.Directive({
|
|
162513
|
+
selector: '[froalaView]'
|
|
162514
|
+
}),
|
|
162515
|
+
__metadata("design:paramtypes", [core_1.Renderer2, core_1.ElementRef])
|
|
162516
|
+
], FroalaViewDirective);
|
|
162517
|
+
exports_1("FroalaViewDirective", FroalaViewDirective);
|
|
162518
|
+
}
|
|
162519
|
+
};
|
|
162520
|
+
});
|
|
162521
|
+
|
|
162522
|
+
System.register(["@angular/core", "@stratusjs/angular/froala/view/froala-view.directive"], function (exports_1, context_1) {
|
|
162523
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
162524
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
162525
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
162526
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
162527
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
162528
|
+
};
|
|
162529
|
+
var FroalaViewModule_1, core_1, froala_view_directive_1, FroalaViewModule;
|
|
162530
|
+
context_1 && context_1.id;
|
|
162531
|
+
return {
|
|
162532
|
+
setters: [
|
|
162533
|
+
function (core_1_1) {
|
|
162534
|
+
core_1 = core_1_1;
|
|
162535
|
+
},
|
|
162536
|
+
function (froala_view_directive_1_1) {
|
|
162537
|
+
froala_view_directive_1 = froala_view_directive_1_1;
|
|
162538
|
+
}
|
|
162539
|
+
],
|
|
162540
|
+
execute: function () {
|
|
162541
|
+
FroalaViewModule = FroalaViewModule_1 = class FroalaViewModule {
|
|
162542
|
+
static forRoot() {
|
|
162543
|
+
return { ngModule: FroalaViewModule_1, providers: [] };
|
|
162544
|
+
}
|
|
162545
|
+
};
|
|
162546
|
+
FroalaViewModule = FroalaViewModule_1 = __decorate([
|
|
162547
|
+
core_1.NgModule({
|
|
162548
|
+
declarations: [froala_view_directive_1.FroalaViewDirective],
|
|
162549
|
+
exports: [froala_view_directive_1.FroalaViewDirective]
|
|
162550
|
+
})
|
|
162551
|
+
], FroalaViewModule);
|
|
162552
|
+
exports_1("FroalaViewModule", FroalaViewModule);
|
|
162553
|
+
}
|
|
162554
|
+
};
|
|
162555
|
+
});
|
|
162556
|
+
|
|
162557
|
+
System.register(["@stratusjs/angular/froala/view/froala-view.directive", "@stratusjs/angular/froala/view/froala-view.module"], function (exports_1, context_1) {
|
|
162558
|
+
context_1 && context_1.id;
|
|
162559
|
+
return {
|
|
162560
|
+
setters: [
|
|
162561
|
+
function (froala_view_directive_1_1) {
|
|
162562
|
+
exports_1({
|
|
162563
|
+
"FroalaViewDirective": froala_view_directive_1_1["FroalaViewDirective"]
|
|
162564
|
+
});
|
|
162565
|
+
},
|
|
162566
|
+
function (froala_view_module_1_1) {
|
|
162567
|
+
exports_1({
|
|
162568
|
+
"FroalaViewModule": froala_view_module_1_1["FroalaViewModule"]
|
|
162569
|
+
});
|
|
162570
|
+
}
|
|
162571
|
+
],
|
|
162572
|
+
execute: function () {
|
|
162573
|
+
}
|
|
162574
|
+
};
|
|
162575
|
+
});
|
|
162576
|
+
|
|
162157
162577
|
/*!
|
|
162158
162578
|
* froala_editor v3.2.3 (https://www.froala.com/wysiwyg-editor)
|
|
162159
162579
|
* License https://froala.com/wysiwyg-editor/terms/
|
|
@@ -162516,88 +162936,6 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
162516
162936
|
};
|
|
162517
162937
|
});
|
|
162518
162938
|
|
|
162519
|
-
System.register(["@angular/core"], function (exports_1, context_1) {
|
|
162520
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
162521
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
162522
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
162523
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
162524
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
162525
|
-
};
|
|
162526
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
162527
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
162528
|
-
};
|
|
162529
|
-
var core_1, FroalaViewDirective;
|
|
162530
|
-
context_1 && context_1.id;
|
|
162531
|
-
return {
|
|
162532
|
-
setters: [
|
|
162533
|
-
function (core_1_1) {
|
|
162534
|
-
core_1 = core_1_1;
|
|
162535
|
-
}
|
|
162536
|
-
],
|
|
162537
|
-
execute: function () {
|
|
162538
|
-
FroalaViewDirective = class FroalaViewDirective {
|
|
162539
|
-
constructor(renderer, element) {
|
|
162540
|
-
this.renderer = renderer;
|
|
162541
|
-
this._element = element.nativeElement;
|
|
162542
|
-
}
|
|
162543
|
-
set froalaView(content) {
|
|
162544
|
-
this._element.innerHTML = content;
|
|
162545
|
-
}
|
|
162546
|
-
ngAfterViewInit() {
|
|
162547
|
-
this.renderer.addClass(this._element, 'fr-view');
|
|
162548
|
-
}
|
|
162549
|
-
};
|
|
162550
|
-
__decorate([
|
|
162551
|
-
core_1.Input(),
|
|
162552
|
-
__metadata("design:type", String),
|
|
162553
|
-
__metadata("design:paramtypes", [String])
|
|
162554
|
-
], FroalaViewDirective.prototype, "froalaView", null);
|
|
162555
|
-
FroalaViewDirective = __decorate([
|
|
162556
|
-
core_1.Directive({
|
|
162557
|
-
selector: '[froalaView]'
|
|
162558
|
-
}),
|
|
162559
|
-
__metadata("design:paramtypes", [core_1.Renderer2, core_1.ElementRef])
|
|
162560
|
-
], FroalaViewDirective);
|
|
162561
|
-
exports_1("FroalaViewDirective", FroalaViewDirective);
|
|
162562
|
-
}
|
|
162563
|
-
};
|
|
162564
|
-
});
|
|
162565
|
-
|
|
162566
|
-
System.register(["@angular/core", "@stratusjs/angular/froala/view/froala-view.directive"], function (exports_1, context_1) {
|
|
162567
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
162568
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
162569
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
162570
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
162571
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
162572
|
-
};
|
|
162573
|
-
var FroalaViewModule_1, core_1, froala_view_directive_1, FroalaViewModule;
|
|
162574
|
-
context_1 && context_1.id;
|
|
162575
|
-
return {
|
|
162576
|
-
setters: [
|
|
162577
|
-
function (core_1_1) {
|
|
162578
|
-
core_1 = core_1_1;
|
|
162579
|
-
},
|
|
162580
|
-
function (froala_view_directive_1_1) {
|
|
162581
|
-
froala_view_directive_1 = froala_view_directive_1_1;
|
|
162582
|
-
}
|
|
162583
|
-
],
|
|
162584
|
-
execute: function () {
|
|
162585
|
-
FroalaViewModule = FroalaViewModule_1 = class FroalaViewModule {
|
|
162586
|
-
static forRoot() {
|
|
162587
|
-
return { ngModule: FroalaViewModule_1, providers: [] };
|
|
162588
|
-
}
|
|
162589
|
-
};
|
|
162590
|
-
FroalaViewModule = FroalaViewModule_1 = __decorate([
|
|
162591
|
-
core_1.NgModule({
|
|
162592
|
-
declarations: [froala_view_directive_1.FroalaViewDirective],
|
|
162593
|
-
exports: [froala_view_directive_1.FroalaViewDirective]
|
|
162594
|
-
})
|
|
162595
|
-
], FroalaViewModule);
|
|
162596
|
-
exports_1("FroalaViewModule", FroalaViewModule);
|
|
162597
|
-
}
|
|
162598
|
-
};
|
|
162599
|
-
});
|
|
162600
|
-
|
|
162601
162939
|
FroalaEditor.DEFAULTS = Object.assign(FroalaEditor.DEFAULTS, {});
|
|
162602
162940
|
FroalaEditor.PLUGINS.menuButton = function menuButton(editor) {
|
|
162603
162941
|
let inputButton;
|
|
@@ -162662,26 +163000,6 @@ System.register(['lodash', '@stratusjs/runtime/stratus', '@stratusjs/core/enviro
|
|
|
162662
163000
|
undo: true
|
|
162663
163001
|
});
|
|
162664
163002
|
|
|
162665
|
-
System.register(["@stratusjs/angular/froala/view/froala-view.directive", "@stratusjs/angular/froala/view/froala-view.module"], function (exports_1, context_1) {
|
|
162666
|
-
context_1 && context_1.id;
|
|
162667
|
-
return {
|
|
162668
|
-
setters: [
|
|
162669
|
-
function (froala_view_directive_1_1) {
|
|
162670
|
-
exports_1({
|
|
162671
|
-
"FroalaViewDirective": froala_view_directive_1_1["FroalaViewDirective"]
|
|
162672
|
-
});
|
|
162673
|
-
},
|
|
162674
|
-
function (froala_view_module_1_1) {
|
|
162675
|
-
exports_1({
|
|
162676
|
-
"FroalaViewModule": froala_view_module_1_1["FroalaViewModule"]
|
|
162677
|
-
});
|
|
162678
|
-
}
|
|
162679
|
-
],
|
|
162680
|
-
execute: function () {
|
|
162681
|
-
}
|
|
162682
|
-
};
|
|
162683
|
-
});
|
|
162684
|
-
|
|
162685
163003
|
})
|
|
162686
163004
|
};
|
|
162687
163005
|
}));
|