@stratusjs/angular 0.5.0 → 0.5.2
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 +30609 -2673
- package/dist/angular.bundle.min.js +1 -1
- package/package.json +5 -4
- package/src/angular.modules.js +18 -33
- package/src/angular.modules.js.map +1 -1
- package/src/app.module.js +181 -227
- package/src/app.module.js.map +1 -1
- package/src/app.module.min.js +1 -1
- package/src/app.module.ts +17 -17
- package/src/backend.service.js +66 -87
- package/src/backend.service.js.map +1 -1
- package/src/base/base.component.js +101 -124
- package/src/base/base.component.js.map +1 -1
- package/src/boot.js +42 -55
- package/src/boot.js.map +1 -1
- package/src/confirm-dialog/confirm-dialog.component.js +41 -60
- package/src/confirm-dialog/confirm-dialog.component.js.map +1 -1
- package/src/core/base.interface.js +1 -9
- package/src/core/base.interface.js.map +1 -1
- package/src/core/dialog.interface.js.map +1 -0
- package/src/core/refresh.interface.js +1 -9
- package/src/core/refresh.interface.js.map +1 -1
- package/src/core/responsive.component.js +40 -58
- package/src/core/responsive.component.js.map +1 -1
- package/src/core/responsive.interface.js +1 -9
- package/src/core/responsive.interface.js.map +1 -1
- package/src/core/root.component.js +24 -43
- package/src/core/root.component.js.map +1 -1
- package/src/core/trigger.interface.js +1 -9
- package/src/core/trigger.interface.js.map +1 -1
- package/src/data/contact-meta.interface.js +1 -9
- package/src/data/contact-meta.interface.js.map +1 -1
- package/src/data/content.interface.js +1 -9
- package/src/data/content.interface.js.map +1 -1
- package/src/data/convoy.interface.js +1 -9
- package/src/data/convoy.interface.js.map +1 -1
- package/src/editor/citation-dialog.component.js +174 -207
- package/src/editor/citation-dialog.component.js.map +1 -1
- package/src/editor/code-mirror-bridge.js +63 -0
- package/src/editor/code-mirror-bridge.js.map +1 -0
- package/src/editor/code-mirror-bridge.min.js +1 -0
- package/src/editor/code-mirror-bridge.ts +85 -0
- package/src/editor/code-view-dialog.component.js +87 -116
- package/src/editor/code-view-dialog.component.js.map +1 -1
- package/src/editor/editor.component.js +903 -925
- package/src/editor/editor.component.js.map +1 -1
- package/src/editor/editor.component.min.js +1 -1
- package/src/editor/editor.component.ts +60 -21
- package/src/editor/link-dialog.component.js +356 -395
- package/src/editor/link-dialog.component.js.map +1 -1
- package/src/editor/media-dialog.component.js +270 -303
- package/src/editor/media-dialog.component.js.map +1 -1
- package/src/froala/plugins/citationManager.js +170 -191
- package/src/froala/plugins/citationManager.js.map +1 -1
- package/src/froala/plugins/inputButton.js +122 -138
- package/src/froala/plugins/inputButton.js.map +1 -1
- package/src/froala/plugins/linkManager.js +89 -104
- package/src/froala/plugins/linkManager.js.map +1 -1
- package/src/froala/plugins/mediaManager.js +72 -87
- package/src/froala/plugins/mediaManager.js.map +1 -1
- package/src/froala/plugins/menuButton.js +71 -86
- package/src/froala/plugins/menuButton.js.map +1 -1
- package/src/main.js +13 -33
- package/src/main.js.map +1 -1
- package/src/material.js +99 -194
- package/src/material.js.map +1 -1
- package/src/media-selector/media-selector.component.js +406 -441
- package/src/media-selector/media-selector.component.js.map +1 -1
- package/src/polyfills.js +3 -16
- package/src/polyfills.js.map +1 -1
- package/src/quill-plugins/quill-break-blot.plugin.js +19 -35
- package/src/quill-plugins/quill-break-blot.plugin.js.map +1 -1
- package/src/quill-plugins/quill-html-edit.plugin.js +140 -153
- package/src/quill-plugins/quill-html-edit.plugin.js.map +1 -1
- package/src/quill-plugins/quill-image-format.plugin.js +33 -47
- package/src/quill-plugins/quill-image-format.plugin.js.map +1 -1
- package/src/quill-plugins/quill-input-button.plugin.js +77 -95
- package/src/quill-plugins/quill-input-button.plugin.js.map +1 -1
- package/src/selector/selector.component.js +241 -276
- package/src/selector/selector.component.js.map +1 -1
- package/src/test/test.directive.js +49 -66
- package/src/test/test.directive.js.map +1 -1
- package/src/tree/tree-dialog.component.js +202 -231
- package/src/tree/tree-dialog.component.js.map +1 -1
- package/src/tree/tree-node.component.js +253 -279
- 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 +10 -18
- package/src/tree/tree.component.js +531 -568
- package/src/tree/tree.component.js.map +1 -1
- package/src/tree/tree.component.min.js +1 -1
- package/src/tree/tree.component.ts +7 -10
package/src/app.module.ts
CHANGED
|
@@ -43,11 +43,11 @@ import {EditorComponent} from './editor/editor.component'
|
|
|
43
43
|
import {MapComponent} from '../../map/src/map.component'
|
|
44
44
|
import {MediaSelectorComponent} from './media-selector/media-selector.component'
|
|
45
45
|
import {SelectorComponent} from './selector/selector.component'
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
import {StripePaymentMethodComponent} from '../../stripe/src/payment-method.component'
|
|
47
|
+
import {StripePaymentMethodItemComponent} from '../../stripe/src/payment-method-item.component'
|
|
48
|
+
import {StripePaymentMethodListComponent} from '../../stripe/src/payment-method-list.component'
|
|
49
|
+
import {StripePaymentMethodSelectorComponent} from '../../stripe/src/payment-method-selector.component'
|
|
50
|
+
import {StripeSetupIntentComponent} from '../../stripe/src/setup-intent.component'
|
|
51
51
|
import {TreeComponent} from './tree/tree.component'
|
|
52
52
|
import {TreeDialogComponent} from './tree/tree-dialog.component'
|
|
53
53
|
import {TreeNodeComponent} from './tree/tree-node.component'
|
|
@@ -397,11 +397,11 @@ const monacoConfig: NgxMonacoEditorConfig = {
|
|
|
397
397
|
MediaDialogComponent,
|
|
398
398
|
MediaSelectorComponent,
|
|
399
399
|
SelectorComponent,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
400
|
+
StripePaymentMethodComponent,
|
|
401
|
+
StripePaymentMethodItemComponent,
|
|
402
|
+
StripePaymentMethodListComponent,
|
|
403
|
+
StripePaymentMethodSelectorComponent,
|
|
404
|
+
StripeSetupIntentComponent,
|
|
405
405
|
TreeComponent,
|
|
406
406
|
TreeDialogComponent,
|
|
407
407
|
TreeNodeComponent,
|
|
@@ -418,11 +418,11 @@ const monacoConfig: NgxMonacoEditorConfig = {
|
|
|
418
418
|
MediaDialogComponent,
|
|
419
419
|
MediaSelectorComponent,
|
|
420
420
|
SelectorComponent,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
421
|
+
StripePaymentMethodComponent,
|
|
422
|
+
StripePaymentMethodItemComponent,
|
|
423
|
+
StripePaymentMethodListComponent,
|
|
424
|
+
StripePaymentMethodSelectorComponent,
|
|
425
|
+
StripeSetupIntentComponent,
|
|
426
426
|
TreeComponent,
|
|
427
427
|
TreeDialogComponent,
|
|
428
428
|
TreeNodeComponent,
|
|
@@ -443,8 +443,8 @@ export class AppModule {
|
|
|
443
443
|
'sa-map': MapComponent,
|
|
444
444
|
'sa-media-selector': MediaSelectorComponent,
|
|
445
445
|
'sa-selector': SelectorComponent,
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
'sa-stripe-payment-method-list': StripePaymentMethodListComponent,
|
|
447
|
+
'sa-stripe-payment-method-selector': StripePaymentMethodSelectorComponent,
|
|
448
448
|
'sa-tree': TreeComponent
|
|
449
449
|
}
|
|
450
450
|
|
package/src/backend.service.js
CHANGED
|
@@ -1,90 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
function (lodash_1_1) {
|
|
29
|
-
lodash_1 = lodash_1_1;
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
execute: function () {
|
|
33
|
-
BackendService = class BackendService {
|
|
34
|
-
constructor(http) {
|
|
35
|
-
this.http = http;
|
|
36
|
-
this.title = 'backend';
|
|
37
|
-
this.uid = lodash_1.default.uniqueId('sa_backend_service_');
|
|
38
|
-
stratus_1.Stratus.Instances[this.uid] = this;
|
|
39
|
-
this.cache = {};
|
|
40
|
-
}
|
|
41
|
-
get(url) {
|
|
42
|
-
if (!lodash_1.default.isString(url)) {
|
|
43
|
-
console.error('url is not a string:', url);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (url in this.cache) {
|
|
47
|
-
return this.cache[url].observable;
|
|
48
|
-
}
|
|
49
|
-
const now = new Date();
|
|
50
|
-
const query = this.cache[url] = {
|
|
51
|
-
fetched: now.valueOf(),
|
|
52
|
-
observable: new rxjs_1.Observable((subscriber) => this.getData(url, subscriber))
|
|
53
|
-
};
|
|
54
|
-
return query.observable;
|
|
55
|
-
}
|
|
56
|
-
getData(url, subscriber) {
|
|
57
|
-
if (!lodash_1.default.isString(url)) {
|
|
58
|
-
console.error('url is not a string:', url);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (!(url in this.cache)) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const query = this.cache[url];
|
|
65
|
-
if ('data' in query) {
|
|
66
|
-
subscriber.next(query.data);
|
|
67
|
-
subscriber.complete();
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
this.http
|
|
71
|
-
.get(url, { observe: 'response' })
|
|
72
|
-
.subscribe((response) => {
|
|
73
|
-
query.data = response;
|
|
74
|
-
subscriber.next(response);
|
|
75
|
-
subscriber.complete();
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
BackendService = __decorate([
|
|
80
|
-
core_1.Injectable({
|
|
81
|
-
providedIn: 'root'
|
|
82
|
-
}),
|
|
83
|
-
__metadata("design:paramtypes", [http_1.HttpClient])
|
|
84
|
-
], BackendService);
|
|
85
|
-
exports_1("BackendService", BackendService);
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Injectable } from '@angular/core';
|
|
11
|
+
import { HttpClient } from '@angular/common/http';
|
|
12
|
+
import { Observable } from 'rxjs';
|
|
13
|
+
import { Stratus } from '@stratusjs/runtime/stratus';
|
|
14
|
+
import _ from 'lodash';
|
|
15
|
+
let BackendService = class BackendService {
|
|
16
|
+
constructor(http) {
|
|
17
|
+
this.http = http;
|
|
18
|
+
this.title = 'backend';
|
|
19
|
+
this.uid = _.uniqueId('sa_backend_service_');
|
|
20
|
+
Stratus.Instances[this.uid] = this;
|
|
21
|
+
this.cache = {};
|
|
22
|
+
}
|
|
23
|
+
get(url) {
|
|
24
|
+
if (!_.isString(url)) {
|
|
25
|
+
console.error('url is not a string:', url);
|
|
26
|
+
return;
|
|
86
27
|
}
|
|
87
|
-
|
|
88
|
-
|
|
28
|
+
if (url in this.cache) {
|
|
29
|
+
return this.cache[url].observable;
|
|
30
|
+
}
|
|
31
|
+
const now = new Date();
|
|
32
|
+
const query = this.cache[url] = {
|
|
33
|
+
fetched: now.valueOf(),
|
|
34
|
+
observable: new Observable((subscriber) => this.getData(url, subscriber))
|
|
35
|
+
};
|
|
36
|
+
return query.observable;
|
|
37
|
+
}
|
|
38
|
+
getData(url, subscriber) {
|
|
39
|
+
if (!_.isString(url)) {
|
|
40
|
+
console.error('url is not a string:', url);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (!(url in this.cache)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const query = this.cache[url];
|
|
47
|
+
if ('data' in query) {
|
|
48
|
+
subscriber.next(query.data);
|
|
49
|
+
subscriber.complete();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.http
|
|
53
|
+
.get(url, { observe: 'response' })
|
|
54
|
+
.subscribe((response) => {
|
|
55
|
+
query.data = response;
|
|
56
|
+
subscriber.next(response);
|
|
57
|
+
subscriber.complete();
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
BackendService = __decorate([
|
|
62
|
+
Injectable({
|
|
63
|
+
providedIn: 'root'
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:paramtypes", [HttpClient])
|
|
66
|
+
], BackendService);
|
|
67
|
+
export { BackendService };
|
|
89
68
|
|
|
90
69
|
//# sourceMappingURL=backend.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["backend.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["backend.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAC,UAAU,EAAe,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAC,UAAU,EAAa,MAAM,MAAM,CAAA;AAG3C,OAAO,EAAC,OAAO,EAAC,MAAM,4BAA4B,CAAA;AAClD,OAAO,CAAC,MAAM,QAAQ,CAAA;AAgBtB,IAAa,cAAc,GAA3B,MAAa,cAAc;IASvB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QANpC,UAAK,GAAG,SAAS,CAAA;QAQb,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC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;SACT;QAED,IAAI,CAAC,IAAI;aACJ,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;aACjC,SAAS,CAAC,CAAC,QAA2B,EAAE,EAAE;YACvC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAA;YACrB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAA;QACzB,CAAC,CAAC,CAAA;IACV,CAAC;CACJ,CAAA;AA7DY,cAAc;IAH1B,UAAU,CAAC;QACR,UAAU,EAAE,MAAM;KACrB,CAAC;qCAU4B,UAAU;GAT3B,cAAc,CA6D1B;SA7DY,cAAc","file":"backend.service.js"}
|
|
@@ -1,127 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
systemDir = '@stratusjs/angular';
|
|
37
|
-
moduleName = 'base';
|
|
38
|
-
min = !environment_1.cookie('env') ? '.min' : '';
|
|
39
|
-
localDir = `${stratus_1.Stratus.BaseUrl}${boot.configuration.paths[`${systemDir}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
|
|
40
|
-
BaseComponent = class BaseComponent extends root_component_1.RootComponent {
|
|
41
|
-
constructor(sanitizer, ref, elementRef) {
|
|
42
|
-
super();
|
|
43
|
-
this.sanitizer = sanitizer;
|
|
44
|
-
this.ref = ref;
|
|
45
|
-
this.elementRef = elementRef;
|
|
46
|
-
this.title = moduleName + '_component';
|
|
47
|
-
stratus_1.Stratus.Instances[lodash_1.default.uniqueId('sa_base_component_')] = this;
|
|
48
|
-
this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "sanitizer", "ref", "elementRef", "ngOnInit", "ngOnChanges", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
49
|
-
}
|
|
50
|
-
ngOnInit() {
|
|
51
|
-
console.info('selector.ngOnInit');
|
|
52
|
-
}
|
|
53
|
-
ngOnChanges() {
|
|
54
|
-
if (!environment_1.cookie('env')) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
console.log('inputs:', {
|
|
58
|
-
target: this.target,
|
|
59
|
-
targetSuffix: this.targetSuffix,
|
|
60
|
-
id: this.id,
|
|
61
|
-
manifest: this.manifest,
|
|
62
|
-
decouple: this.decouple,
|
|
63
|
-
direct: this.direct,
|
|
64
|
-
api: this.api,
|
|
65
|
-
urlRoot: this.urlRoot,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
__decorate([
|
|
70
|
-
core_1.Input(),
|
|
71
|
-
__metadata("design:type", String)
|
|
72
|
-
], BaseComponent.prototype, "target", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
core_1.Input(),
|
|
75
|
-
__metadata("design:type", String)
|
|
76
|
-
], BaseComponent.prototype, "targetSuffix", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
core_1.Input(),
|
|
79
|
-
__metadata("design:type", Number)
|
|
80
|
-
], BaseComponent.prototype, "id", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
core_1.Input(),
|
|
83
|
-
__metadata("design:type", Boolean)
|
|
84
|
-
], BaseComponent.prototype, "manifest", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
core_1.Input(),
|
|
87
|
-
__metadata("design:type", Boolean)
|
|
88
|
-
], BaseComponent.prototype, "decouple", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
core_1.Input(),
|
|
91
|
-
__metadata("design:type", Boolean)
|
|
92
|
-
], BaseComponent.prototype, "direct", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
core_1.Input(),
|
|
95
|
-
__metadata("design:type", Object)
|
|
96
|
-
], BaseComponent.prototype, "api", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
core_1.Input(),
|
|
99
|
-
__metadata("design:type", String)
|
|
100
|
-
], BaseComponent.prototype, "urlRoot", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
core_1.Input(),
|
|
103
|
-
__metadata("design:type", String)
|
|
104
|
-
], BaseComponent.prototype, "type", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
core_1.Input(),
|
|
107
|
-
__metadata("design:type", String)
|
|
108
|
-
], BaseComponent.prototype, "property", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
core_1.Input(),
|
|
111
|
-
__metadata("design:type", String)
|
|
112
|
-
], BaseComponent.prototype, "endpoint", void 0);
|
|
113
|
-
BaseComponent = __decorate([
|
|
114
|
-
core_1.Component({
|
|
115
|
-
selector: 'sa-base',
|
|
116
|
-
templateUrl: `${localDir}/${moduleName}/${moduleName}.component${min}.html`,
|
|
117
|
-
}),
|
|
118
|
-
__metadata("design:paramtypes", [platform_browser_1.DomSanitizer,
|
|
119
|
-
core_1.ChangeDetectorRef,
|
|
120
|
-
core_1.ElementRef])
|
|
121
|
-
], BaseComponent);
|
|
122
|
-
exports_1("BaseComponent", BaseComponent);
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ChangeDetectorRef, Component, ElementRef, Input } from '@angular/core';
|
|
11
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
12
|
+
import { Stratus } from '@stratusjs/runtime/stratus';
|
|
13
|
+
import _ from 'lodash';
|
|
14
|
+
import { cookie } from '@stratusjs/core/environment';
|
|
15
|
+
import { RootComponent } from '../core/root.component';
|
|
16
|
+
const systemDir = '@stratusjs/angular';
|
|
17
|
+
const moduleName = 'base';
|
|
18
|
+
const min = !cookie('env') ? '.min' : '';
|
|
19
|
+
const localDir = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
|
|
20
|
+
let BaseComponent = class BaseComponent extends RootComponent {
|
|
21
|
+
constructor(sanitizer, ref, elementRef) {
|
|
22
|
+
super();
|
|
23
|
+
this.sanitizer = sanitizer;
|
|
24
|
+
this.ref = ref;
|
|
25
|
+
this.elementRef = elementRef;
|
|
26
|
+
this.title = moduleName + '_component';
|
|
27
|
+
Stratus.Instances[_.uniqueId('sa_base_component_')] = this;
|
|
28
|
+
this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "sanitizer", "ref", "elementRef", "ngOnInit", "ngOnChanges", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
29
|
+
}
|
|
30
|
+
ngOnInit() {
|
|
31
|
+
console.info('selector.ngOnInit');
|
|
32
|
+
}
|
|
33
|
+
ngOnChanges() {
|
|
34
|
+
if (!cookie('env')) {
|
|
35
|
+
return;
|
|
123
36
|
}
|
|
124
|
-
|
|
125
|
-
|
|
37
|
+
console.log('inputs:', {
|
|
38
|
+
target: this.target,
|
|
39
|
+
targetSuffix: this.targetSuffix,
|
|
40
|
+
id: this.id,
|
|
41
|
+
manifest: this.manifest,
|
|
42
|
+
decouple: this.decouple,
|
|
43
|
+
direct: this.direct,
|
|
44
|
+
api: this.api,
|
|
45
|
+
urlRoot: this.urlRoot,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
__decorate([
|
|
50
|
+
Input(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], BaseComponent.prototype, "target", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Input(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], BaseComponent.prototype, "targetSuffix", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
Input(),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], BaseComponent.prototype, "id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
Input(),
|
|
63
|
+
__metadata("design:type", Boolean)
|
|
64
|
+
], BaseComponent.prototype, "manifest", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
Input(),
|
|
67
|
+
__metadata("design:type", Boolean)
|
|
68
|
+
], BaseComponent.prototype, "decouple", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
Input(),
|
|
71
|
+
__metadata("design:type", Boolean)
|
|
72
|
+
], BaseComponent.prototype, "direct", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
Input(),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], BaseComponent.prototype, "api", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
Input(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], BaseComponent.prototype, "urlRoot", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
Input(),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], BaseComponent.prototype, "type", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
Input(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], BaseComponent.prototype, "property", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
Input(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], BaseComponent.prototype, "endpoint", void 0);
|
|
93
|
+
BaseComponent = __decorate([
|
|
94
|
+
Component({
|
|
95
|
+
selector: 'sa-base',
|
|
96
|
+
templateUrl: `${localDir}/${moduleName}/${moduleName}.component${min}.html`,
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:paramtypes", [DomSanitizer,
|
|
99
|
+
ChangeDetectorRef,
|
|
100
|
+
ElementRef])
|
|
101
|
+
], BaseComponent);
|
|
102
|
+
export { BaseComponent };
|
|
126
103
|
|
|
127
104
|
//# sourceMappingURL=base.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["base.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["base.component.ts"],"names":[],"mappings":";;;;;;;;;AAWA,OAAO,EAEH,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,KAAK,EAGR,MAAM,eAAe,CAAA;AACtB,OAAO,EACH,YAAY,EACf,MAAM,2BAA2B,CAAA;AAMlC,OAAO,EAAC,OAAO,EAAC,MAAM,4BAA4B,CAAA;AAClD,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAC,MAAM,EAAC,MAAM,6BAA6B,CAAA;AAGlD,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAMpD,MAAM,SAAS,GAAG,oBAAoB,CAAA;AACtC,MAAM,UAAU,GAAG,MAAM,CAAA;AAGzB,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC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,EAAE;;6CAAe;AACd;IAAR,KAAK,EAAE;;mDAAqB;AACpB;IAAR,KAAK,EAAE;;yCAAW;AACV;IAAR,KAAK,EAAE;;+CAAkB;AACjB;IAAR,KAAK,EAAE;;+CAAkB;AACjB;IAAR,KAAK,EAAE;;6CAAgB;AACf;IAAR,KAAK,EAAE;;0CAAY;AACX;IAAR,KAAK,EAAE;;8CAAgB;AAGf;IAAR,KAAK,EAAE;;2CAAa;AACZ;IAAR,KAAK,EAAE;;+CAAiB;AAChB;IAAR,KAAK,EAAE;;+CAAiB;AAnBhB,aAAa;IATzB,SAAS,CAAC;QACP,QAAQ,EAAE,SAAS;QAEnB,WAAW,EAAE,GAAG,QAAQ,IAAI,UAAU,IAAI,UAAU,aAAa,GAAG,OAAO;KAI9E,CAAC;qCAwByB,YAAY;QAChB,iBAAiB;QACZ,UAAU;GAxBzB,aAAa,CAuDzB;SAvDY,aAAa","file":"base.component.js"}
|
package/src/boot.js
CHANGED
|
@@ -1,63 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { DOMComplete } from '@stratusjs/core/dom';
|
|
2
|
+
let initialTimeout = 1000;
|
|
3
|
+
const limitTimeout = 5000;
|
|
4
|
+
function exponentialTimeout() {
|
|
5
|
+
if (initialTimeout > limitTimeout) {
|
|
6
|
+
return limitTimeout;
|
|
7
|
+
}
|
|
8
|
+
const currentTimeout = initialTimeout;
|
|
9
|
+
initialTimeout = initialTimeout * 1.2;
|
|
10
|
+
return currentTimeout;
|
|
11
|
+
}
|
|
12
|
+
let boot = false;
|
|
13
|
+
function angularBoot() {
|
|
14
|
+
if (boot) {
|
|
15
|
+
console.log('stopped angular boot attempt after successful boot.');
|
|
16
|
+
return;
|
|
12
17
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
const sa = [
|
|
19
|
+
'sa-boot',
|
|
20
|
+
'sa-editor',
|
|
21
|
+
'sa-map',
|
|
22
|
+
'sa-media-selector',
|
|
23
|
+
'sa-selector',
|
|
24
|
+
'sa-stripe-payment-method-list',
|
|
25
|
+
'sa-stripe-payment-method-selector',
|
|
26
|
+
'sa-tree'
|
|
27
|
+
];
|
|
28
|
+
let detected = false;
|
|
29
|
+
sa.forEach(component => {
|
|
30
|
+
if (detected) {
|
|
16
31
|
return;
|
|
17
32
|
}
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
'sa-editor',
|
|
21
|
-
'sa-map',
|
|
22
|
-
'sa-media-selector',
|
|
23
|
-
'sa-selector',
|
|
24
|
-
'sa-stripe-payment-method-list',
|
|
25
|
-
'sa-stripe-payment-method-selector',
|
|
26
|
-
'sa-tree'
|
|
27
|
-
];
|
|
28
|
-
let detected = false;
|
|
29
|
-
sa.forEach(component => {
|
|
30
|
-
if (detected) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const elements = document.getElementsByTagName(component);
|
|
34
|
-
if (!elements || !elements.length) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
detected = true;
|
|
38
|
-
});
|
|
39
|
-
if (!detected) {
|
|
40
|
-
setTimeout(() => {
|
|
41
|
-
angularBoot();
|
|
42
|
-
}, exponentialTimeout());
|
|
33
|
+
const elements = document.getElementsByTagName(component);
|
|
34
|
+
if (!elements || !elements.length) {
|
|
43
35
|
return;
|
|
44
36
|
}
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
detected = true;
|
|
38
|
+
});
|
|
39
|
+
if (!detected) {
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
angularBoot();
|
|
42
|
+
}, exponentialTimeout());
|
|
43
|
+
return;
|
|
47
44
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
execute: function () {
|
|
55
|
-
initialTimeout = 1000;
|
|
56
|
-
limitTimeout = 5000;
|
|
57
|
-
boot = false;
|
|
58
|
-
dom_1.DOMComplete().then(() => angularBoot());
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
});
|
|
45
|
+
boot = true;
|
|
46
|
+
require('@stratusjs/angular/main');
|
|
47
|
+
}
|
|
48
|
+
DOMComplete().then(() => angularBoot());
|
|
62
49
|
|
|
63
50
|
//# sourceMappingURL=boot.js.map
|
package/src/boot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["boot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["boot.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAG/C,IAAI,cAAc,GAAG,IAAI,CAAA;AACzB,MAAM,YAAY,GAAG,IAAI,CAAA;AACzB,SAAS,kBAAkB;IACvB,IAAI,cAAc,GAAG,YAAY,EAAE;QAC/B,OAAO,YAAY,CAAA;KACtB;IACD,MAAM,cAAc,GAAG,cAAc,CAAA;IACrC,cAAc,GAAG,cAAc,GAAG,GAAG,CAAA;IACrC,OAAO,cAAc,CAAA;AACzB,CAAC;AAID,IAAI,IAAI,GAAG,KAAK,CAAA;AAChB,SAAS,WAAW;IAEhB,IAAI,IAAI,EAAE;QACN,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAA;QAClE,OAAM;KACT;IAID,MAAM,EAAE,GAAG;QAEP,SAAS;QACT,WAAW;QACX,QAAQ;QACR,mBAAmB;QACnB,aAAa;QACb,+BAA+B;QAC/B,mCAAmC;QACnC,SAAS;KAEZ,CAAA;IAED,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QACnB,IAAI,QAAQ,EAAE;YACV,OAAM;SACT;QACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAA;QACzD,IAAI,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