@stratusjs/angular 0.6.5 → 0.6.7
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 +283 -264
- package/dist/angular.bundle.min.js +1 -1
- package/package.json +2 -2
package/dist/angular.bundle.js
CHANGED
|
@@ -128082,9 +128082,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128082
128082
|
try {
|
|
128083
128083
|
yield Stratus.Internals.JsLoader('https://js.stripe.com/v3/');
|
|
128084
128084
|
if (!Object.prototype.hasOwnProperty.call(window, 'Stripe')) {
|
|
128085
|
-
console.
|
|
128086
|
-
this.
|
|
128087
|
-
|
|
128085
|
+
console.warn('Stripe Api was not initialized yet, waiting...');
|
|
128086
|
+
yield this.delay(3000);
|
|
128087
|
+
if (!Object.prototype.hasOwnProperty.call(window, 'Stripe')) {
|
|
128088
|
+
console.error('Stripe Api was not initialized, cannot continue');
|
|
128089
|
+
this.initializing = false;
|
|
128090
|
+
return;
|
|
128091
|
+
}
|
|
128088
128092
|
}
|
|
128089
128093
|
}
|
|
128090
128094
|
catch (e) {
|
|
@@ -128102,6 +128106,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128102
128106
|
}
|
|
128103
128107
|
});
|
|
128104
128108
|
}
|
|
128109
|
+
delay(ms) {
|
|
128110
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
|
128111
|
+
return new Promise((resolve) => {
|
|
128112
|
+
return setTimeout(resolve, ms);
|
|
128113
|
+
});
|
|
128114
|
+
});
|
|
128115
|
+
}
|
|
128105
128116
|
waitForInitialization() {
|
|
128106
128117
|
return __awaiter$5(this, void 0, void 0, function* () {
|
|
128107
128118
|
yield new Promise(() => {
|
|
@@ -128169,7 +128180,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128169
128180
|
}
|
|
128170
128181
|
const element = (yield this.elements(publishKey)).create(paymentMethodType, options);
|
|
128171
128182
|
this.currentElement = {
|
|
128172
|
-
id:
|
|
128183
|
+
id: safeUniqueId(id),
|
|
128173
128184
|
paymentMethodType,
|
|
128174
128185
|
element
|
|
128175
128186
|
};
|
|
@@ -128255,6 +128266,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128255
128266
|
this.dialogData = dialogData;
|
|
128256
128267
|
this.title = `${packageName$4}_${componentName$4}_component`;
|
|
128257
128268
|
this.urlRoot = '/Api';
|
|
128269
|
+
this.paymentMethodApiPath = 'PaymentMethod';
|
|
128258
128270
|
this.styled = false;
|
|
128259
128271
|
this.initialized = false;
|
|
128260
128272
|
this.cardComplete = false;
|
|
@@ -128262,11 +128274,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128262
128274
|
this.formPending = false;
|
|
128263
128275
|
this.publishKey = '';
|
|
128264
128276
|
this.formMessage = '';
|
|
128265
|
-
this.paymentMethodApiPath = 'PaymentMethod';
|
|
128266
128277
|
this.billingInfo = {
|
|
128267
128278
|
address: {}
|
|
128268
128279
|
};
|
|
128269
|
-
this.uid =
|
|
128280
|
+
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
128270
128281
|
Stratus.Instances[this.uid] = this;
|
|
128271
128282
|
this.elementId = this.elementId || this.uid;
|
|
128272
128283
|
Stratus.Internals.CssLoader(`${localDir$3}${componentName$4}.component${min$3}.css`)
|
|
@@ -128277,9 +128288,9 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128277
128288
|
console.error('CSS Failed to load for Component:', this);
|
|
128278
128289
|
this.styled = false;
|
|
128279
128290
|
});
|
|
128280
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "_", "urlRoot", "styled", "initialized", "cardComplete", "cardSaved", "formPending", "clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo", "
|
|
128291
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "_", "urlRoot", "paymentMethodApiPath", "styled", "initialized", "cardComplete", "cardSaved", "formPending", "clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo", "billingInfo", "cardId", "elementRef", "sanitizer", "Stripe", "dialogRef", "dialogData", "ngOnInit", "isEditable", "isBillingDetailsFilled", "isSubmittable", "saveCard", "dialogClose", "ngOnDestroy", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh"]);
|
|
128281
128292
|
if (!isEmpty(this.dialogData)) {
|
|
128282
|
-
const keysPossible = ["clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo"];
|
|
128293
|
+
const keysPossible = ["clientSecret", "publishKey", "formMessage", "urlRoot", "paymentMethodApiPath", "detailedBillingInfo", "defaultBillingInfo"];
|
|
128283
128294
|
Object.keys(this.dialogData).forEach((attr) => {
|
|
128284
128295
|
if (!isEmpty(attr) && includes(keysPossible, attr)) {
|
|
128285
128296
|
set(this, attr, this.dialogData[attr]);
|
|
@@ -128327,8 +128338,11 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128327
128338
|
isSubmittable() {
|
|
128328
128339
|
return this.cardComplete && this.isEditable() && this.isBillingDetailsFilled();
|
|
128329
128340
|
}
|
|
128330
|
-
saveCard() {
|
|
128341
|
+
saveCard(ev) {
|
|
128331
128342
|
return __awaiter$4(this, void 0, void 0, function* () {
|
|
128343
|
+
if (ev) {
|
|
128344
|
+
ev.preventDefault();
|
|
128345
|
+
}
|
|
128332
128346
|
if (!this.isSubmittable()) {
|
|
128333
128347
|
return;
|
|
128334
128348
|
}
|
|
@@ -128392,8 +128406,12 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128392
128406
|
], StripePaymentMethodComponent.prototype, "elementId", void 0);
|
|
128393
128407
|
__decorate$6([
|
|
128394
128408
|
Input(),
|
|
128395
|
-
__metadata$5("design:type",
|
|
128409
|
+
__metadata$5("design:type", String)
|
|
128396
128410
|
], StripePaymentMethodComponent.prototype, "urlRoot", void 0);
|
|
128411
|
+
__decorate$6([
|
|
128412
|
+
Input(),
|
|
128413
|
+
__metadata$5("design:type", String)
|
|
128414
|
+
], StripePaymentMethodComponent.prototype, "paymentMethodApiPath", void 0);
|
|
128397
128415
|
__decorate$6([
|
|
128398
128416
|
Input(),
|
|
128399
128417
|
__metadata$5("design:type", String)
|
|
@@ -128414,10 +128432,6 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128414
128432
|
Input(),
|
|
128415
128433
|
__metadata$5("design:type", Object)
|
|
128416
128434
|
], StripePaymentMethodComponent.prototype, "defaultBillingInfo", void 0);
|
|
128417
|
-
__decorate$6([
|
|
128418
|
-
Input(),
|
|
128419
|
-
__metadata$5("design:type", Object)
|
|
128420
|
-
], StripePaymentMethodComponent.prototype, "paymentMethodApiPath", void 0);
|
|
128421
128435
|
StripePaymentMethodComponent = __decorate$6([
|
|
128422
128436
|
Component({
|
|
128423
128437
|
selector: `sa-${packageName$4}-${componentName$4}`,
|
|
@@ -128464,7 +128478,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128464
128478
|
this.editable = false;
|
|
128465
128479
|
this.styled = false;
|
|
128466
128480
|
this.initialized = false;
|
|
128467
|
-
this.uid =
|
|
128481
|
+
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
128468
128482
|
Stratus.Instances[this.uid] = this;
|
|
128469
128483
|
this.elementId = this.elementId || this.uid;
|
|
128470
128484
|
Stratus.Internals.CssLoader(`${localDir$2}${componentName$3}.component${min$2}.css`)
|
|
@@ -128608,7 +128622,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128608
128622
|
this.addCardButtonText = 'Add Payment Method';
|
|
128609
128623
|
this.disabled = false;
|
|
128610
128624
|
this.defaultBillingInfo = { address: {} };
|
|
128611
|
-
this.uid =
|
|
128625
|
+
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
128612
128626
|
Stratus.Instances[this.uid] = this;
|
|
128613
128627
|
this.elementId = this.elementId || this.uid;
|
|
128614
128628
|
Stratus.Internals.CssLoader(`${localDir$1}${componentName$2}.component${min$1}.css`)
|
|
@@ -128784,7 +128798,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
128784
128798
|
[this.fieldName]: new FormControl(),
|
|
128785
128799
|
[this.fieldNameId]: new FormControl({ disabled: true })
|
|
128786
128800
|
});
|
|
128787
|
-
this.uid =
|
|
128801
|
+
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
128788
128802
|
Stratus.Instances[this.uid] = this;
|
|
128789
128803
|
this.elementId = this.elementId || this.uid;
|
|
128790
128804
|
Stratus.Internals.CssLoader(`${localDir}${componentName$1}.component${min}.css`)
|
|
@@ -129088,7 +129102,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
129088
129102
|
this.urlRoot = '/Api';
|
|
129089
129103
|
this.paymentMethodApiPath = 'PaymentMethod';
|
|
129090
129104
|
this.addCardButtonText = 'Add Payment Method';
|
|
129091
|
-
this.uid =
|
|
129105
|
+
this.uid = safeUniqueId('sa', snakeCase(this.title));
|
|
129092
129106
|
Stratus.Instances[this.uid] = this;
|
|
129093
129107
|
this.elementId = this.elementId || this.uid;
|
|
129094
129108
|
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"]);
|
|
@@ -129098,6 +129112,9 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
129098
129112
|
}
|
|
129099
129113
|
addPaymentMethod(ev) {
|
|
129100
129114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129115
|
+
if (ev) {
|
|
129116
|
+
ev.preventDefault();
|
|
129117
|
+
}
|
|
129101
129118
|
if (!this.newPaymentMethodPending && !this.newPaymentMethodPrompt) {
|
|
129102
129119
|
let clientSecret = '';
|
|
129103
129120
|
let publishKey = '';
|
|
@@ -129147,6 +129164,8 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
129147
129164
|
clientSecret,
|
|
129148
129165
|
publishKey,
|
|
129149
129166
|
formMessage,
|
|
129167
|
+
urlRoot: this.urlRoot,
|
|
129168
|
+
paymentMethodApiPath: this.paymentMethodApiPath,
|
|
129150
129169
|
detailedBillingInfo: this.detailedBillingInfo,
|
|
129151
129170
|
defaultBillingInfo: this.defaultBillingInfo
|
|
129152
129171
|
}
|
|
@@ -160855,6 +160874,150 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
160855
160874
|
};
|
|
160856
160875
|
});
|
|
160857
160876
|
|
|
160877
|
+
System.register(["quill"], function (exports_1, context_1) {
|
|
160878
|
+
var quill_1, BaseImage, ATTRIBUTES, QuillImageFormatPlugin;
|
|
160879
|
+
context_1 && context_1.id;
|
|
160880
|
+
return {
|
|
160881
|
+
setters: [
|
|
160882
|
+
function (quill_1_1) {
|
|
160883
|
+
quill_1 = quill_1_1;
|
|
160884
|
+
}
|
|
160885
|
+
],
|
|
160886
|
+
execute: function () {
|
|
160887
|
+
BaseImage = quill_1.default.import('formats/image');
|
|
160888
|
+
ATTRIBUTES = [
|
|
160889
|
+
'alt',
|
|
160890
|
+
'height',
|
|
160891
|
+
'width',
|
|
160892
|
+
'stratus-src',
|
|
160893
|
+
'stratusSrc'
|
|
160894
|
+
];
|
|
160895
|
+
QuillImageFormatPlugin = class QuillImageFormatPlugin extends BaseImage {
|
|
160896
|
+
constructor() {
|
|
160897
|
+
super(...arguments);
|
|
160898
|
+
this.blotName = 'imageCustom';
|
|
160899
|
+
this.tagName = 'IMG';
|
|
160900
|
+
}
|
|
160901
|
+
format(name, value) {
|
|
160902
|
+
console.log('format:', name, value, this.domNode.getAttribute('src'));
|
|
160903
|
+
if (ATTRIBUTES.indexOf(name) === -1) {
|
|
160904
|
+
super.format(name, value);
|
|
160905
|
+
return;
|
|
160906
|
+
}
|
|
160907
|
+
if (!value) {
|
|
160908
|
+
this.domNode.removeAttribute(name);
|
|
160909
|
+
return;
|
|
160910
|
+
}
|
|
160911
|
+
if (name === 'stratus-src') {
|
|
160912
|
+
console.log('stratus-src:', value);
|
|
160913
|
+
}
|
|
160914
|
+
if (name === 'stratusSrc') {
|
|
160915
|
+
console.log('stratusSrc:', value);
|
|
160916
|
+
}
|
|
160917
|
+
this.domNode.setAttribute(name, value);
|
|
160918
|
+
}
|
|
160919
|
+
};
|
|
160920
|
+
exports_1("QuillImageFormatPlugin", QuillImageFormatPlugin);
|
|
160921
|
+
}
|
|
160922
|
+
};
|
|
160923
|
+
});
|
|
160924
|
+
|
|
160925
|
+
System.register(["@stratusjs/runtime/stratus", "lodash", "quill"], function (exports_1, context_1) {
|
|
160926
|
+
var stratus_1, lodash_1, quill_1, QuillInputButtonPlugin;
|
|
160927
|
+
context_1 && context_1.id;
|
|
160928
|
+
return {
|
|
160929
|
+
setters: [
|
|
160930
|
+
function (stratus_1_1) {
|
|
160931
|
+
stratus_1 = stratus_1_1;
|
|
160932
|
+
},
|
|
160933
|
+
function (lodash_1_1) {
|
|
160934
|
+
lodash_1 = lodash_1_1;
|
|
160935
|
+
},
|
|
160936
|
+
function (quill_1_1) {
|
|
160937
|
+
quill_1 = quill_1_1;
|
|
160938
|
+
}
|
|
160939
|
+
],
|
|
160940
|
+
execute: function () {
|
|
160941
|
+
QuillInputButtonPlugin = class QuillInputButtonPlugin {
|
|
160942
|
+
constructor(quill, options) {
|
|
160943
|
+
this.debug = false;
|
|
160944
|
+
this.buttonHTML = '<i class="fas fa-carrot"></i>';
|
|
160945
|
+
this.buttonTitle = 'Input Button';
|
|
160946
|
+
this.name = 'inputButton';
|
|
160947
|
+
this.eventName = 'input-button';
|
|
160948
|
+
this.uid = lodash_1.default.uniqueId(`quill_input_button_`);
|
|
160949
|
+
stratus_1.Stratus.Instances[this.uid] = this;
|
|
160950
|
+
this.debug = options && options.debug;
|
|
160951
|
+
if (!options || typeof options !== 'object') {
|
|
160952
|
+
options = {};
|
|
160953
|
+
}
|
|
160954
|
+
this.buttonHTML = options.buttonHTML || this.buttonHTML;
|
|
160955
|
+
this.buttonTitle = options.buttonTitle || this.buttonTitle;
|
|
160956
|
+
this.name = options.name || this.name;
|
|
160957
|
+
this.eventName = options.eventName || this.eventName;
|
|
160958
|
+
this.createToolbarModule(quill);
|
|
160959
|
+
}
|
|
160960
|
+
createToolbarModule(quill) {
|
|
160961
|
+
const toolbarModule = quill.getModule('toolbar');
|
|
160962
|
+
if (!toolbarModule) {
|
|
160963
|
+
throw new Error(`quill.${this.name} requires the "toolbar" module`);
|
|
160964
|
+
}
|
|
160965
|
+
this.registerDivModule();
|
|
160966
|
+
const toolbarEl = toolbarModule.container;
|
|
160967
|
+
const buttonContainer = document.createElement('span');
|
|
160968
|
+
buttonContainer.setAttribute('class', 'ql-formats');
|
|
160969
|
+
const button = document.createElement('button');
|
|
160970
|
+
button.innerHTML = this.buttonHTML;
|
|
160971
|
+
button.title = this.buttonTitle;
|
|
160972
|
+
button.onclick = (e) => {
|
|
160973
|
+
e.preventDefault();
|
|
160974
|
+
this.onClick(quill);
|
|
160975
|
+
};
|
|
160976
|
+
buttonContainer.appendChild(button);
|
|
160977
|
+
toolbarEl.appendChild(buttonContainer);
|
|
160978
|
+
}
|
|
160979
|
+
registerDivModule() {
|
|
160980
|
+
const Block = quill_1.default.import('blots/block');
|
|
160981
|
+
class Div extends Block {
|
|
160982
|
+
}
|
|
160983
|
+
Div.tagName = 'div';
|
|
160984
|
+
Div.blotName = 'div';
|
|
160985
|
+
Div.allowedChildren = Block.allowedChildren;
|
|
160986
|
+
Div.allowedChildren.push(Block);
|
|
160987
|
+
quill_1.default.register(Div);
|
|
160988
|
+
}
|
|
160989
|
+
findUID(el) {
|
|
160990
|
+
if ('uid' in el.dataset) {
|
|
160991
|
+
return el.dataset.uid;
|
|
160992
|
+
}
|
|
160993
|
+
return this.findUID(el.parentElement);
|
|
160994
|
+
}
|
|
160995
|
+
getInstance(uid) {
|
|
160996
|
+
if (!(uid in stratus_1.Stratus.Instances)) {
|
|
160997
|
+
return undefined;
|
|
160998
|
+
}
|
|
160999
|
+
return stratus_1.Stratus.Instances[uid];
|
|
161000
|
+
}
|
|
161001
|
+
onClick(quill) {
|
|
161002
|
+
const container = quill.container;
|
|
161003
|
+
const uid = this.findUID(container);
|
|
161004
|
+
const instance = this.getInstance(uid);
|
|
161005
|
+
if (!instance) {
|
|
161006
|
+
return;
|
|
161007
|
+
}
|
|
161008
|
+
instance.trigger(this.eventName, null, this);
|
|
161009
|
+
}
|
|
161010
|
+
trigger(name, data, callee) {
|
|
161011
|
+
if (this.debug) {
|
|
161012
|
+
console.log(`quill.${this.name}.trigger:`, name, data, callee);
|
|
161013
|
+
}
|
|
161014
|
+
}
|
|
161015
|
+
};
|
|
161016
|
+
exports_1("QuillInputButtonPlugin", QuillInputButtonPlugin);
|
|
161017
|
+
}
|
|
161018
|
+
};
|
|
161019
|
+
});
|
|
161020
|
+
|
|
160858
161021
|
System.register(["quill"], function (exports_1, context_1) {
|
|
160859
161022
|
var quill_1, debug, Logger, QuillHtmlEditPlugin;
|
|
160860
161023
|
context_1 && context_1.id;
|
|
@@ -161014,150 +161177,6 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
161014
161177
|
};
|
|
161015
161178
|
});
|
|
161016
161179
|
|
|
161017
|
-
System.register(["quill"], function (exports_1, context_1) {
|
|
161018
|
-
var quill_1, BaseImage, ATTRIBUTES, QuillImageFormatPlugin;
|
|
161019
|
-
context_1 && context_1.id;
|
|
161020
|
-
return {
|
|
161021
|
-
setters: [
|
|
161022
|
-
function (quill_1_1) {
|
|
161023
|
-
quill_1 = quill_1_1;
|
|
161024
|
-
}
|
|
161025
|
-
],
|
|
161026
|
-
execute: function () {
|
|
161027
|
-
BaseImage = quill_1.default.import('formats/image');
|
|
161028
|
-
ATTRIBUTES = [
|
|
161029
|
-
'alt',
|
|
161030
|
-
'height',
|
|
161031
|
-
'width',
|
|
161032
|
-
'stratus-src',
|
|
161033
|
-
'stratusSrc'
|
|
161034
|
-
];
|
|
161035
|
-
QuillImageFormatPlugin = class QuillImageFormatPlugin extends BaseImage {
|
|
161036
|
-
constructor() {
|
|
161037
|
-
super(...arguments);
|
|
161038
|
-
this.blotName = 'imageCustom';
|
|
161039
|
-
this.tagName = 'IMG';
|
|
161040
|
-
}
|
|
161041
|
-
format(name, value) {
|
|
161042
|
-
console.log('format:', name, value, this.domNode.getAttribute('src'));
|
|
161043
|
-
if (ATTRIBUTES.indexOf(name) === -1) {
|
|
161044
|
-
super.format(name, value);
|
|
161045
|
-
return;
|
|
161046
|
-
}
|
|
161047
|
-
if (!value) {
|
|
161048
|
-
this.domNode.removeAttribute(name);
|
|
161049
|
-
return;
|
|
161050
|
-
}
|
|
161051
|
-
if (name === 'stratus-src') {
|
|
161052
|
-
console.log('stratus-src:', value);
|
|
161053
|
-
}
|
|
161054
|
-
if (name === 'stratusSrc') {
|
|
161055
|
-
console.log('stratusSrc:', value);
|
|
161056
|
-
}
|
|
161057
|
-
this.domNode.setAttribute(name, value);
|
|
161058
|
-
}
|
|
161059
|
-
};
|
|
161060
|
-
exports_1("QuillImageFormatPlugin", QuillImageFormatPlugin);
|
|
161061
|
-
}
|
|
161062
|
-
};
|
|
161063
|
-
});
|
|
161064
|
-
|
|
161065
|
-
System.register(["@stratusjs/runtime/stratus", "lodash", "quill"], function (exports_1, context_1) {
|
|
161066
|
-
var stratus_1, lodash_1, quill_1, QuillInputButtonPlugin;
|
|
161067
|
-
context_1 && context_1.id;
|
|
161068
|
-
return {
|
|
161069
|
-
setters: [
|
|
161070
|
-
function (stratus_1_1) {
|
|
161071
|
-
stratus_1 = stratus_1_1;
|
|
161072
|
-
},
|
|
161073
|
-
function (lodash_1_1) {
|
|
161074
|
-
lodash_1 = lodash_1_1;
|
|
161075
|
-
},
|
|
161076
|
-
function (quill_1_1) {
|
|
161077
|
-
quill_1 = quill_1_1;
|
|
161078
|
-
}
|
|
161079
|
-
],
|
|
161080
|
-
execute: function () {
|
|
161081
|
-
QuillInputButtonPlugin = class QuillInputButtonPlugin {
|
|
161082
|
-
constructor(quill, options) {
|
|
161083
|
-
this.debug = false;
|
|
161084
|
-
this.buttonHTML = '<i class="fas fa-carrot"></i>';
|
|
161085
|
-
this.buttonTitle = 'Input Button';
|
|
161086
|
-
this.name = 'inputButton';
|
|
161087
|
-
this.eventName = 'input-button';
|
|
161088
|
-
this.uid = lodash_1.default.uniqueId(`quill_input_button_`);
|
|
161089
|
-
stratus_1.Stratus.Instances[this.uid] = this;
|
|
161090
|
-
this.debug = options && options.debug;
|
|
161091
|
-
if (!options || typeof options !== 'object') {
|
|
161092
|
-
options = {};
|
|
161093
|
-
}
|
|
161094
|
-
this.buttonHTML = options.buttonHTML || this.buttonHTML;
|
|
161095
|
-
this.buttonTitle = options.buttonTitle || this.buttonTitle;
|
|
161096
|
-
this.name = options.name || this.name;
|
|
161097
|
-
this.eventName = options.eventName || this.eventName;
|
|
161098
|
-
this.createToolbarModule(quill);
|
|
161099
|
-
}
|
|
161100
|
-
createToolbarModule(quill) {
|
|
161101
|
-
const toolbarModule = quill.getModule('toolbar');
|
|
161102
|
-
if (!toolbarModule) {
|
|
161103
|
-
throw new Error(`quill.${this.name} requires the "toolbar" module`);
|
|
161104
|
-
}
|
|
161105
|
-
this.registerDivModule();
|
|
161106
|
-
const toolbarEl = toolbarModule.container;
|
|
161107
|
-
const buttonContainer = document.createElement('span');
|
|
161108
|
-
buttonContainer.setAttribute('class', 'ql-formats');
|
|
161109
|
-
const button = document.createElement('button');
|
|
161110
|
-
button.innerHTML = this.buttonHTML;
|
|
161111
|
-
button.title = this.buttonTitle;
|
|
161112
|
-
button.onclick = (e) => {
|
|
161113
|
-
e.preventDefault();
|
|
161114
|
-
this.onClick(quill);
|
|
161115
|
-
};
|
|
161116
|
-
buttonContainer.appendChild(button);
|
|
161117
|
-
toolbarEl.appendChild(buttonContainer);
|
|
161118
|
-
}
|
|
161119
|
-
registerDivModule() {
|
|
161120
|
-
const Block = quill_1.default.import('blots/block');
|
|
161121
|
-
class Div extends Block {
|
|
161122
|
-
}
|
|
161123
|
-
Div.tagName = 'div';
|
|
161124
|
-
Div.blotName = 'div';
|
|
161125
|
-
Div.allowedChildren = Block.allowedChildren;
|
|
161126
|
-
Div.allowedChildren.push(Block);
|
|
161127
|
-
quill_1.default.register(Div);
|
|
161128
|
-
}
|
|
161129
|
-
findUID(el) {
|
|
161130
|
-
if ('uid' in el.dataset) {
|
|
161131
|
-
return el.dataset.uid;
|
|
161132
|
-
}
|
|
161133
|
-
return this.findUID(el.parentElement);
|
|
161134
|
-
}
|
|
161135
|
-
getInstance(uid) {
|
|
161136
|
-
if (!(uid in stratus_1.Stratus.Instances)) {
|
|
161137
|
-
return undefined;
|
|
161138
|
-
}
|
|
161139
|
-
return stratus_1.Stratus.Instances[uid];
|
|
161140
|
-
}
|
|
161141
|
-
onClick(quill) {
|
|
161142
|
-
const container = quill.container;
|
|
161143
|
-
const uid = this.findUID(container);
|
|
161144
|
-
const instance = this.getInstance(uid);
|
|
161145
|
-
if (!instance) {
|
|
161146
|
-
return;
|
|
161147
|
-
}
|
|
161148
|
-
instance.trigger(this.eventName, null, this);
|
|
161149
|
-
}
|
|
161150
|
-
trigger(name, data, callee) {
|
|
161151
|
-
if (this.debug) {
|
|
161152
|
-
console.log(`quill.${this.name}.trigger:`, name, data, callee);
|
|
161153
|
-
}
|
|
161154
|
-
}
|
|
161155
|
-
};
|
|
161156
|
-
exports_1("QuillInputButtonPlugin", QuillInputButtonPlugin);
|
|
161157
|
-
}
|
|
161158
|
-
};
|
|
161159
|
-
});
|
|
161160
|
-
|
|
161161
161180
|
System.register(["reflect-metadata", "lodash", "@angular/core"], function (exports_1, context_1) {
|
|
161162
161181
|
var lodash_1, core_1, RootComponent;
|
|
161163
161182
|
context_1 && context_1.id;
|
|
@@ -161577,108 +161596,6 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
161577
161596
|
};
|
|
161578
161597
|
});
|
|
161579
161598
|
|
|
161580
|
-
System.register(["@angular/core"], function (exports_1, context_1) {
|
|
161581
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
161582
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
161583
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
161584
|
-
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;
|
|
161585
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
161586
|
-
};
|
|
161587
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
161588
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
161589
|
-
};
|
|
161590
|
-
var core_1, FroalaViewDirective;
|
|
161591
|
-
context_1 && context_1.id;
|
|
161592
|
-
return {
|
|
161593
|
-
setters: [
|
|
161594
|
-
function (core_1_1) {
|
|
161595
|
-
core_1 = core_1_1;
|
|
161596
|
-
}
|
|
161597
|
-
],
|
|
161598
|
-
execute: function () {
|
|
161599
|
-
FroalaViewDirective = class FroalaViewDirective {
|
|
161600
|
-
constructor(renderer, element) {
|
|
161601
|
-
this.renderer = renderer;
|
|
161602
|
-
this._element = element.nativeElement;
|
|
161603
|
-
}
|
|
161604
|
-
set froalaView(content) {
|
|
161605
|
-
this._element.innerHTML = content;
|
|
161606
|
-
}
|
|
161607
|
-
ngAfterViewInit() {
|
|
161608
|
-
this.renderer.addClass(this._element, 'fr-view');
|
|
161609
|
-
}
|
|
161610
|
-
};
|
|
161611
|
-
__decorate([
|
|
161612
|
-
core_1.Input(),
|
|
161613
|
-
__metadata("design:type", String),
|
|
161614
|
-
__metadata("design:paramtypes", [String])
|
|
161615
|
-
], FroalaViewDirective.prototype, "froalaView", null);
|
|
161616
|
-
FroalaViewDirective = __decorate([
|
|
161617
|
-
core_1.Directive({
|
|
161618
|
-
selector: '[froalaView]'
|
|
161619
|
-
}),
|
|
161620
|
-
__metadata("design:paramtypes", [core_1.Renderer2, core_1.ElementRef])
|
|
161621
|
-
], FroalaViewDirective);
|
|
161622
|
-
exports_1("FroalaViewDirective", FroalaViewDirective);
|
|
161623
|
-
}
|
|
161624
|
-
};
|
|
161625
|
-
});
|
|
161626
|
-
|
|
161627
|
-
System.register(["@angular/core", "@stratusjs/angular/froala/view/froala-view.directive"], function (exports_1, context_1) {
|
|
161628
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
161629
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
161630
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
161631
|
-
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;
|
|
161632
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
161633
|
-
};
|
|
161634
|
-
var FroalaViewModule_1, core_1, froala_view_directive_1, FroalaViewModule;
|
|
161635
|
-
context_1 && context_1.id;
|
|
161636
|
-
return {
|
|
161637
|
-
setters: [
|
|
161638
|
-
function (core_1_1) {
|
|
161639
|
-
core_1 = core_1_1;
|
|
161640
|
-
},
|
|
161641
|
-
function (froala_view_directive_1_1) {
|
|
161642
|
-
froala_view_directive_1 = froala_view_directive_1_1;
|
|
161643
|
-
}
|
|
161644
|
-
],
|
|
161645
|
-
execute: function () {
|
|
161646
|
-
FroalaViewModule = FroalaViewModule_1 = class FroalaViewModule {
|
|
161647
|
-
static forRoot() {
|
|
161648
|
-
return { ngModule: FroalaViewModule_1, providers: [] };
|
|
161649
|
-
}
|
|
161650
|
-
};
|
|
161651
|
-
FroalaViewModule = FroalaViewModule_1 = __decorate([
|
|
161652
|
-
core_1.NgModule({
|
|
161653
|
-
declarations: [froala_view_directive_1.FroalaViewDirective],
|
|
161654
|
-
exports: [froala_view_directive_1.FroalaViewDirective]
|
|
161655
|
-
})
|
|
161656
|
-
], FroalaViewModule);
|
|
161657
|
-
exports_1("FroalaViewModule", FroalaViewModule);
|
|
161658
|
-
}
|
|
161659
|
-
};
|
|
161660
|
-
});
|
|
161661
|
-
|
|
161662
|
-
System.register(["@stratusjs/angular/froala/view/froala-view.directive", "@stratusjs/angular/froala/view/froala-view.module"], function (exports_1, context_1) {
|
|
161663
|
-
context_1 && context_1.id;
|
|
161664
|
-
return {
|
|
161665
|
-
setters: [
|
|
161666
|
-
function (froala_view_directive_1_1) {
|
|
161667
|
-
exports_1({
|
|
161668
|
-
"FroalaViewDirective": froala_view_directive_1_1["FroalaViewDirective"]
|
|
161669
|
-
});
|
|
161670
|
-
},
|
|
161671
|
-
function (froala_view_module_1_1) {
|
|
161672
|
-
exports_1({
|
|
161673
|
-
"FroalaViewModule": froala_view_module_1_1["FroalaViewModule"]
|
|
161674
|
-
});
|
|
161675
|
-
}
|
|
161676
|
-
],
|
|
161677
|
-
execute: function () {
|
|
161678
|
-
}
|
|
161679
|
-
};
|
|
161680
|
-
});
|
|
161681
|
-
|
|
161682
161599
|
/*!
|
|
161683
161600
|
* froala_editor v3.2.3 (https://www.froala.com/wysiwyg-editor)
|
|
161684
161601
|
* License https://froala.com/wysiwyg-editor/terms/
|
|
@@ -162041,6 +161958,53 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
162041
161958
|
};
|
|
162042
161959
|
});
|
|
162043
161960
|
|
|
161961
|
+
System.register(["@angular/core"], function (exports_1, context_1) {
|
|
161962
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
161963
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
161964
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
161965
|
+
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;
|
|
161966
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
161967
|
+
};
|
|
161968
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
161969
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
161970
|
+
};
|
|
161971
|
+
var core_1, FroalaViewDirective;
|
|
161972
|
+
context_1 && context_1.id;
|
|
161973
|
+
return {
|
|
161974
|
+
setters: [
|
|
161975
|
+
function (core_1_1) {
|
|
161976
|
+
core_1 = core_1_1;
|
|
161977
|
+
}
|
|
161978
|
+
],
|
|
161979
|
+
execute: function () {
|
|
161980
|
+
FroalaViewDirective = class FroalaViewDirective {
|
|
161981
|
+
constructor(renderer, element) {
|
|
161982
|
+
this.renderer = renderer;
|
|
161983
|
+
this._element = element.nativeElement;
|
|
161984
|
+
}
|
|
161985
|
+
set froalaView(content) {
|
|
161986
|
+
this._element.innerHTML = content;
|
|
161987
|
+
}
|
|
161988
|
+
ngAfterViewInit() {
|
|
161989
|
+
this.renderer.addClass(this._element, 'fr-view');
|
|
161990
|
+
}
|
|
161991
|
+
};
|
|
161992
|
+
__decorate([
|
|
161993
|
+
core_1.Input(),
|
|
161994
|
+
__metadata("design:type", String),
|
|
161995
|
+
__metadata("design:paramtypes", [String])
|
|
161996
|
+
], FroalaViewDirective.prototype, "froalaView", null);
|
|
161997
|
+
FroalaViewDirective = __decorate([
|
|
161998
|
+
core_1.Directive({
|
|
161999
|
+
selector: '[froalaView]'
|
|
162000
|
+
}),
|
|
162001
|
+
__metadata("design:paramtypes", [core_1.Renderer2, core_1.ElementRef])
|
|
162002
|
+
], FroalaViewDirective);
|
|
162003
|
+
exports_1("FroalaViewDirective", FroalaViewDirective);
|
|
162004
|
+
}
|
|
162005
|
+
};
|
|
162006
|
+
});
|
|
162007
|
+
|
|
162044
162008
|
FroalaEditor.DEFAULTS = Object.assign(FroalaEditor.DEFAULTS, {});
|
|
162045
162009
|
FroalaEditor.PLUGINS.menuButton = function menuButton(editor) {
|
|
162046
162010
|
let inputButton;
|
|
@@ -162105,6 +162069,61 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
162105
162069
|
undo: true
|
|
162106
162070
|
});
|
|
162107
162071
|
|
|
162072
|
+
System.register(["@angular/core", "@stratusjs/angular/froala/view/froala-view.directive"], function (exports_1, context_1) {
|
|
162073
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
162074
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
162075
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
162076
|
+
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;
|
|
162077
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
162078
|
+
};
|
|
162079
|
+
var FroalaViewModule_1, core_1, froala_view_directive_1, FroalaViewModule;
|
|
162080
|
+
context_1 && context_1.id;
|
|
162081
|
+
return {
|
|
162082
|
+
setters: [
|
|
162083
|
+
function (core_1_1) {
|
|
162084
|
+
core_1 = core_1_1;
|
|
162085
|
+
},
|
|
162086
|
+
function (froala_view_directive_1_1) {
|
|
162087
|
+
froala_view_directive_1 = froala_view_directive_1_1;
|
|
162088
|
+
}
|
|
162089
|
+
],
|
|
162090
|
+
execute: function () {
|
|
162091
|
+
FroalaViewModule = FroalaViewModule_1 = class FroalaViewModule {
|
|
162092
|
+
static forRoot() {
|
|
162093
|
+
return { ngModule: FroalaViewModule_1, providers: [] };
|
|
162094
|
+
}
|
|
162095
|
+
};
|
|
162096
|
+
FroalaViewModule = FroalaViewModule_1 = __decorate([
|
|
162097
|
+
core_1.NgModule({
|
|
162098
|
+
declarations: [froala_view_directive_1.FroalaViewDirective],
|
|
162099
|
+
exports: [froala_view_directive_1.FroalaViewDirective]
|
|
162100
|
+
})
|
|
162101
|
+
], FroalaViewModule);
|
|
162102
|
+
exports_1("FroalaViewModule", FroalaViewModule);
|
|
162103
|
+
}
|
|
162104
|
+
};
|
|
162105
|
+
});
|
|
162106
|
+
|
|
162107
|
+
System.register(["@stratusjs/angular/froala/view/froala-view.directive", "@stratusjs/angular/froala/view/froala-view.module"], function (exports_1, context_1) {
|
|
162108
|
+
context_1 && context_1.id;
|
|
162109
|
+
return {
|
|
162110
|
+
setters: [
|
|
162111
|
+
function (froala_view_directive_1_1) {
|
|
162112
|
+
exports_1({
|
|
162113
|
+
"FroalaViewDirective": froala_view_directive_1_1["FroalaViewDirective"]
|
|
162114
|
+
});
|
|
162115
|
+
},
|
|
162116
|
+
function (froala_view_module_1_1) {
|
|
162117
|
+
exports_1({
|
|
162118
|
+
"FroalaViewModule": froala_view_module_1_1["FroalaViewModule"]
|
|
162119
|
+
});
|
|
162120
|
+
}
|
|
162121
|
+
],
|
|
162122
|
+
execute: function () {
|
|
162123
|
+
}
|
|
162124
|
+
};
|
|
162125
|
+
});
|
|
162126
|
+
|
|
162108
162127
|
})
|
|
162109
162128
|
};
|
|
162110
162129
|
}));
|