@rxap/directives 12.3.0 → 13.0.0-next.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/esm2020/index.mjs +13 -0
- package/esm2020/lib/avatar-background-image.directive.mjs +58 -0
- package/esm2020/lib/background-image.directive.mjs +134 -0
- package/esm2020/lib/confirm-click.mjs +34 -0
- package/esm2020/lib/contenteditable.directive.mjs +81 -0
- package/esm2020/lib/full-width.directive.mjs +31 -0
- package/esm2020/lib/if-truthy.directive.mjs +72 -0
- package/esm2020/lib/method.directive.mjs +118 -0
- package/esm2020/lib/movable-divider.directive.mjs +101 -0
- package/esm2020/lib/prevent-default.directive.mjs +31 -0
- package/esm2020/lib/share-button.directive.mjs +75 -0
- package/esm2020/lib/stop-immediate-propagation.directive.mjs +31 -0
- package/esm2020/lib/stop-propagation.directive.mjs +31 -0
- package/esm2020/rxap-directives.mjs +5 -0
- package/fesm2015/{rxap-directives.js → rxap-directives.mjs} +111 -107
- package/fesm2015/rxap-directives.mjs.map +1 -0
- package/fesm2020/rxap-directives.mjs +773 -0
- package/fesm2020/rxap-directives.mjs.map +1 -0
- package/package.json +29 -15
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
- package/bundles/rxap-directives.umd.js +0 -1273
- package/bundles/rxap-directives.umd.js.map +0 -1
- package/esm2015/index.js +0 -13
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/avatar-background-image.directive.js +0 -58
- package/esm2015/lib/avatar-background-image.directive.js.map +0 -1
- package/esm2015/lib/background-image.directive.js +0 -137
- package/esm2015/lib/background-image.directive.js.map +0 -1
- package/esm2015/lib/confirm-click.js +0 -34
- package/esm2015/lib/confirm-click.js.map +0 -1
- package/esm2015/lib/contenteditable.directive.js +0 -84
- package/esm2015/lib/contenteditable.directive.js.map +0 -1
- package/esm2015/lib/full-width.directive.js +0 -31
- package/esm2015/lib/full-width.directive.js.map +0 -1
- package/esm2015/lib/if-truthy.directive.js +0 -75
- package/esm2015/lib/if-truthy.directive.js.map +0 -1
- package/esm2015/lib/method.directive.js +0 -122
- package/esm2015/lib/method.directive.js.map +0 -1
- package/esm2015/lib/movable-divider.directive.js +0 -102
- package/esm2015/lib/movable-divider.directive.js.map +0 -1
- package/esm2015/lib/prevent-default.directive.js +0 -31
- package/esm2015/lib/prevent-default.directive.js.map +0 -1
- package/esm2015/lib/share-button.directive.js +0 -77
- package/esm2015/lib/share-button.directive.js.map +0 -1
- package/esm2015/lib/stop-immediate-propagation.directive.js +0 -31
- package/esm2015/lib/stop-immediate-propagation.directive.js.map +0 -1
- package/esm2015/lib/stop-propagation.directive.js +0 -31
- package/esm2015/lib/stop-propagation.directive.js.map +0 -1
- package/esm2015/rxap-directives.js +0 -5
- package/esm2015/rxap-directives.js.map +0 -1
- package/fesm2015/rxap-directives.js.map +0 -1
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
import { ChangeDetectorRef, Directive, Input, NgModule, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
// TODO : mv to rxap package
|
|
5
|
-
export class IfTruthyDirective {
|
|
6
|
-
constructor(templateRef, viewContainerRef, cdr) {
|
|
7
|
-
this.templateRef = templateRef;
|
|
8
|
-
this.viewContainerRef = viewContainerRef;
|
|
9
|
-
this.cdr = cdr;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
13
|
-
*
|
|
14
|
-
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
15
|
-
* `NgForOf` structural directive renders its template with a specific context type.
|
|
16
|
-
*/
|
|
17
|
-
static ngTemplateContextGuard(dir, ctx) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
ngOnChanges(changes) {
|
|
21
|
-
if (this.method && this.parameters) {
|
|
22
|
-
this.execute();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
execute() {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const result = yield this.method.call(this.parameters);
|
|
28
|
-
if (this.hasChanged(result)) {
|
|
29
|
-
this.viewContainerRef.clear();
|
|
30
|
-
if (result) {
|
|
31
|
-
this.viewContainerRef.createEmbeddedView(this.templateRef, { $implicit: result });
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
this.cdr.detectChanges();
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
hasChanged(current) {
|
|
38
|
-
if (this._last !== undefined) {
|
|
39
|
-
const currentTrackBy = this.trackBy ? this.trackBy(current) : current;
|
|
40
|
-
const lastTrackBy = this.trackBy ? this.trackBy(this._last) : this._last;
|
|
41
|
-
return currentTrackBy !== lastTrackBy;
|
|
42
|
-
}
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
IfTruthyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: IfTruthyDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
47
|
-
IfTruthyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: IfTruthyDirective, selector: "[rxapIfTruthy]", inputs: { method: ["rxapIfTruthy", "method"], parameters: ["rxapIfTruthyParameters", "parameters"], trackBy: ["rxapIfTruthyTrackBy", "trackBy"] }, usesOnChanges: true, ngImport: i0 });
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: IfTruthyDirective, decorators: [{
|
|
49
|
-
type: Directive,
|
|
50
|
-
args: [{
|
|
51
|
-
selector: '[rxapIfTruthy]'
|
|
52
|
-
}]
|
|
53
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { method: [{
|
|
54
|
-
type: Input,
|
|
55
|
-
args: ['rxapIfTruthy']
|
|
56
|
-
}], parameters: [{
|
|
57
|
-
type: Input,
|
|
58
|
-
args: ['rxapIfTruthyParameters']
|
|
59
|
-
}], trackBy: [{
|
|
60
|
-
type: Input,
|
|
61
|
-
args: ['rxapIfTruthyTrackBy']
|
|
62
|
-
}] } });
|
|
63
|
-
export class IfTruthyDirectiveModule {
|
|
64
|
-
}
|
|
65
|
-
IfTruthyDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: IfTruthyDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
66
|
-
IfTruthyDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: IfTruthyDirectiveModule, declarations: [IfTruthyDirective], exports: [IfTruthyDirective] });
|
|
67
|
-
IfTruthyDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: IfTruthyDirectiveModule });
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: IfTruthyDirectiveModule, decorators: [{
|
|
69
|
-
type: NgModule,
|
|
70
|
-
args: [{
|
|
71
|
-
declarations: [IfTruthyDirective],
|
|
72
|
-
exports: [IfTruthyDirective]
|
|
73
|
-
}]
|
|
74
|
-
}] });
|
|
75
|
-
//# sourceMappingURL=if-truthy.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"if-truthy.directive.js","sourceRoot":"","sources":["../../../../../libs/directives/src/lib/if-truthy.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,QAAQ,EAGR,WAAW,EACX,gBAAgB,EACjB,MAAM,eAA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CAAC,KAAK,CAAC;YACzE,OAAO,cAAc,KAAK,WAAW,CAAC;SACvC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;;8GAhEU,iBAAiB;kGAAjB,iBAAiB;2FAAjB,iBAAiB;kBAH7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;iBAC3B;iKAiBQ,MAAM;sBADZ,KAAK;uBAAC,cAAc;gBAGd,UAAU;sBADhB,KAAK;uBAAC,wBAAwB;gBAGxB,OAAO;sBADb,KAAK;uBAAC,qBAAqB;;AAsD9B,MAAM,OAAO,uBAAuB;;oHAAvB,uBAAuB;qHAAvB,uBAAuB,iBAzEvB,iBAAiB,aAAjB,iBAAiB;qHAyEjB,uBAAuB;2FAAvB,uBAAuB;kBAJnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,iBAAiB,CAAE;oBACnC,OAAO,EAAE,CAAE,iBAAiB,CAAE;iBAC/B","sourcesContent":["import {\n ChangeDetectorRef,\n Directive,\n Input,\n NgModule,\n OnChanges,\n SimpleChanges,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\nimport { Method } from '@rxap/utilities/rxjs';\n\nexport interface IfTruthyDirectiveTemplateContext<Data> {\n $implicit: Data;\n}\n\n// TODO : mv to rxap package\n\n@Directive({\n selector: '[rxapIfTruthy]'\n})\nexport class IfTruthyDirective<Data, Parameters = any> implements OnChanges {\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard<T>(\n dir: IfTruthyDirective<T>,\n ctx: any\n ): ctx is IfTruthyDirectiveTemplateContext<T> {\n return true;\n }\n\n @Input('rxapIfTruthy')\n public method!: Method<Data, Parameters>;\n @Input('rxapIfTruthyParameters')\n public parameters!: Parameters;\n @Input('rxapIfTruthyTrackBy')\n public trackBy!: (data: Data) => any;\n private _last?: Data;\n\n constructor(\n private readonly templateRef: TemplateRef<IfTruthyDirectiveTemplateContext<Data>>,\n private readonly viewContainerRef: ViewContainerRef,\n private readonly cdr: ChangeDetectorRef\n ) {\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n\n if (this.method && this.parameters) {\n this.execute();\n }\n\n }\n\n protected async execute() {\n\n const result = await this.method.call(this.parameters);\n\n if (this.hasChanged(result)) {\n\n this.viewContainerRef.clear();\n\n if (result) {\n this.viewContainerRef.createEmbeddedView(this.templateRef, { $implicit: result });\n }\n\n }\n\n this.cdr.detectChanges();\n\n }\n\n protected hasChanged(current: Data) {\n if (this._last !== undefined) {\n const currentTrackBy = this.trackBy ? this.trackBy(current) : current;\n const lastTrackBy = this.trackBy ? this.trackBy(this._last) : this._last;\n return currentTrackBy !== lastTrackBy;\n }\n\n return true;\n }\n\n\n}\n\n@NgModule({\n declarations: [ IfTruthyDirective ],\n exports: [ IfTruthyDirective ]\n})\nexport class IfTruthyDirectiveModule {\n}\n"]}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { __awaiter } from "tslib";
|
|
2
|
-
import { Directive, NgModule, Input, Output, EventEmitter, HostListener, isDevMode } from '@angular/core';
|
|
3
|
-
import { coerceBoolean } from '@rxap/utilities';
|
|
4
|
-
import { ToggleSubject } from '@rxap/utilities/rxjs';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export class MethodDirective {
|
|
7
|
-
constructor() {
|
|
8
|
-
this._hasConfirmDirective = false;
|
|
9
|
-
this.immediately = false;
|
|
10
|
-
this.executed$ = new EventEmitter();
|
|
11
|
-
this.failure$ = new EventEmitter();
|
|
12
|
-
this.successful$ = new EventEmitter();
|
|
13
|
-
/**
|
|
14
|
-
* true - a remote method call is in progress
|
|
15
|
-
*/
|
|
16
|
-
this.executing$ = new ToggleSubject();
|
|
17
|
-
}
|
|
18
|
-
set hasConfirmDirective(value) {
|
|
19
|
-
this._hasConfirmDirective = coerceBoolean(value);
|
|
20
|
-
}
|
|
21
|
-
ngOnInit() {
|
|
22
|
-
if (this.immediately) {
|
|
23
|
-
this.execute();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
onConfirmed() {
|
|
27
|
-
return this.execute();
|
|
28
|
-
}
|
|
29
|
-
onClick() {
|
|
30
|
-
if (!this._hasConfirmDirective) {
|
|
31
|
-
return this.execute();
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
if (isDevMode()) {
|
|
35
|
-
console.debug('Skip method call. Wait for confirmation.');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return Promise.resolve();
|
|
39
|
-
}
|
|
40
|
-
execute() {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
this.executing$.enable();
|
|
43
|
-
try {
|
|
44
|
-
const result = yield this.method.call(this.parameters);
|
|
45
|
-
this.executed(result);
|
|
46
|
-
this.successful(result);
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
if (isDevMode()) {
|
|
50
|
-
console.error(`Method directive execution failed:`, error.message);
|
|
51
|
-
}
|
|
52
|
-
this.failure(error);
|
|
53
|
-
}
|
|
54
|
-
finally {
|
|
55
|
-
this.executing$.disable();
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
setParameter(parameterKey, value) {
|
|
60
|
-
this.updateParameters({ [parameterKey]: value });
|
|
61
|
-
}
|
|
62
|
-
updateParameters(parameters) {
|
|
63
|
-
var _a;
|
|
64
|
-
this.parameters = Object.assign(Object.assign({}, ((_a = this.parameters) !== null && _a !== void 0 ? _a : {})), parameters);
|
|
65
|
-
}
|
|
66
|
-
executed(result) {
|
|
67
|
-
this.executed$.emit(result);
|
|
68
|
-
}
|
|
69
|
-
failure(error) {
|
|
70
|
-
this.failure$.emit(error);
|
|
71
|
-
}
|
|
72
|
-
successful(result) {
|
|
73
|
-
this.successful$.emit(result);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
MethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MethodDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
77
|
-
MethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: MethodDirective, selector: "[rxapMethod]", inputs: { hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"], method: ["rxapMethod", "method"], parameters: "parameters", immediately: "immediately" }, outputs: { executed$: "executed", failure$: "failure", successful$: "successful" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick()" } }, exportAs: ["rxapMethod"], ngImport: i0 });
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MethodDirective, decorators: [{
|
|
79
|
-
type: Directive,
|
|
80
|
-
args: [{
|
|
81
|
-
selector: '[rxapMethod]',
|
|
82
|
-
exportAs: 'rxapMethod'
|
|
83
|
-
}]
|
|
84
|
-
}], ctorParameters: function () { return []; }, propDecorators: { hasConfirmDirective: [{
|
|
85
|
-
type: Input,
|
|
86
|
-
args: ['rxapConfirm']
|
|
87
|
-
}], method: [{
|
|
88
|
-
type: Input,
|
|
89
|
-
args: ['rxapMethod']
|
|
90
|
-
}], parameters: [{
|
|
91
|
-
type: Input
|
|
92
|
-
}], immediately: [{
|
|
93
|
-
type: Input
|
|
94
|
-
}], executed$: [{
|
|
95
|
-
type: Output,
|
|
96
|
-
args: ['executed']
|
|
97
|
-
}], failure$: [{
|
|
98
|
-
type: Output,
|
|
99
|
-
args: ['failure']
|
|
100
|
-
}], successful$: [{
|
|
101
|
-
type: Output,
|
|
102
|
-
args: ['successful']
|
|
103
|
-
}], onConfirmed: [{
|
|
104
|
-
type: HostListener,
|
|
105
|
-
args: ['confirmed']
|
|
106
|
-
}], onClick: [{
|
|
107
|
-
type: HostListener,
|
|
108
|
-
args: ['click']
|
|
109
|
-
}] } });
|
|
110
|
-
export class MethodDirectiveModule {
|
|
111
|
-
}
|
|
112
|
-
MethodDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
113
|
-
MethodDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MethodDirectiveModule, declarations: [MethodDirective], exports: [MethodDirective] });
|
|
114
|
-
MethodDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MethodDirectiveModule });
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MethodDirectiveModule, decorators: [{
|
|
116
|
-
type: NgModule,
|
|
117
|
-
args: [{
|
|
118
|
-
declarations: [MethodDirective],
|
|
119
|
-
exports: [MethodDirective]
|
|
120
|
-
}]
|
|
121
|
-
}] });
|
|
122
|
-
//# sourceMappingURL=method.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"method.directive.js","sourceRoot":"","sources":["../../../../../libs/directives/src/lib/method.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,KAAK,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,SAAS,EAEV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAEL,aAAa,EACd,MAAM,sBAAsB,CAAC;;AAM9B,MAAM,OAAO,eAAe;IA0B1B;QAxBQ,yBAAoB,GAAG,KAAK,CAAC;QAY9B,gBAAW,GAAY,KAAK,CAAC;QAE7B,cAAS,GAAc,IAAI,YAAY,EAAE,CAAC;QAE1C,aAAQ,GAAe,IAAI,YAAY,EAAS,CAAC;QAEjD,gBAAW,GAAY,IAAI,YAAY,EAAc,CAAC;QAC7D;;WAEG;QACI,eAAU,GAAa,IAAI,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ular/core';\nimport { coerceBoolean } from '@rxap/utilities';\nimport {\n Method,\n ToggleSubject\n} from '@rxap/utilities/rxjs';\n\n@Directive({\n selector: '[rxapMethod]',\n exportAs: 'rxapMethod'\n})\nexport class MethodDirective<ReturnType = any, Parameters = any> implements OnInit {\n\n private _hasConfirmDirective = false;\n\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\n }\n\n @Input('rxapMethod')\n public method!: Method<ReturnType, Parameters>;\n @Input()\n public parameters?: Parameters;\n @Input()\n public immediately: boolean = false;\n @Output('executed')\n public executed$ = new EventEmitter();\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n @Output('successful')\n public successful$ = new EventEmitter<ReturnType>();\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new ToggleSubject();\n\n constructor() { }\n\n public ngOnInit() {\n if (this.immediately) {\n this.execute();\n }\n }\n\n @HostListener('confirmed')\n public onConfirmed() {\n return this.execute();\n }\n\n @HostListener('click')\n public onClick() {\n if (!this._hasConfirmDirective) {\n return this.execute();\n } else {\n if (isDevMode()) {\n console.debug('Skip method call. Wait for confirmation.');\n }\n }\n return Promise.resolve();\n }\n\n public async execute(): Promise<void> {\n this.executing$.enable();\n try {\n const result = await this.method.call(this.parameters);\n this.executed(result);\n this.successful(result);\n } catch (error) {\n if (isDevMode()) {\n console.error(`Method directive execution failed:`, error.message);\n }\n this.failure(error);\n } finally {\n this.executing$.disable();\n }\n }\n\n public setParameter<Key extends keyof Parameters>(parameterKey: Key, value: Parameters[Key]): void {\n this.updateParameters({ [ parameterKey ]: value } as any);\n }\n\n public updateParameters(parameters: Partial<Parameters>): void {\n this.parameters = { ...(this.parameters ?? {}), ...parameters } as any;\n }\n\n protected executed(result: any) {\n this.executed$.emit(result);\n }\n\n protected failure(error: Error) {\n this.failure$.emit(error);\n }\n\n protected successful(result: ReturnType) {\n this.successful$.emit(result);\n }\n\n}\n\n@NgModule({\n declarations: [ MethodDirective ],\n exports: [ MethodDirective ]\n})\nexport class MethodDirectiveModule {}\n"]}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Directive, HostBinding, HostListener, Input, NgModule, Renderer2 } from '@angular/core';
|
|
3
|
-
import { Required } from '@rxap/utilities';
|
|
4
|
-
import { fromEvent, Subscription } from 'rxjs';
|
|
5
|
-
import { tap } from 'rxjs/operators';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export class MovableDividerDirective {
|
|
8
|
-
constructor(renderer) {
|
|
9
|
-
this.renderer = renderer;
|
|
10
|
-
this.origin = 'right';
|
|
11
|
-
this.cursor = 'ew-resize';
|
|
12
|
-
this._subscription = new Subscription();
|
|
13
|
-
/**
|
|
14
|
-
* Indicates that the divider is moved with mouse down
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
this._moveDivider = false;
|
|
18
|
-
/**
|
|
19
|
-
* Holds the current fixed element width.
|
|
20
|
-
* If null the move divider feature was not yet used and the initial
|
|
21
|
-
* fixed element width is not calculated
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
this._fixedElementWidth = null;
|
|
25
|
-
}
|
|
26
|
-
ngOnDestroy() {
|
|
27
|
-
var _a;
|
|
28
|
-
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
29
|
-
}
|
|
30
|
-
ngOnInit() {
|
|
31
|
-
this._subscription.add(fromEvent(this.containerElement, 'mousemove').pipe(tap(($event) => {
|
|
32
|
-
if (this._moveDivider) {
|
|
33
|
-
if (!this._fixedElementWidth) {
|
|
34
|
-
this._fixedElementWidth = this.fixedElement.clientWidth;
|
|
35
|
-
}
|
|
36
|
-
if (this.origin === 'right') {
|
|
37
|
-
this._fixedElementWidth = $event.clientX - this.containerElement.getBoundingClientRect().left;
|
|
38
|
-
}
|
|
39
|
-
else if (this.origin === 'left') {
|
|
40
|
-
console.log({
|
|
41
|
-
clientWidth: this.containerElement.clientWidth,
|
|
42
|
-
clientX: $event.clientX,
|
|
43
|
-
clientLeft: this.containerElement.getBoundingClientRect().left
|
|
44
|
-
});
|
|
45
|
-
this._fixedElementWidth = this.containerElement.clientWidth - $event.clientX + this.containerElement.getBoundingClientRect().left;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
throw new Error(`The origin '${this.origin}' is not supported.`);
|
|
49
|
-
}
|
|
50
|
-
const width = this._fixedElementWidth + 'px';
|
|
51
|
-
this.renderer.setStyle(this.fixedElement, 'max-width', width);
|
|
52
|
-
this.renderer.setStyle(this.fixedElement, 'min-width', width);
|
|
53
|
-
this.renderer.setStyle(this.fixedElement, 'flex-basis', width);
|
|
54
|
-
}
|
|
55
|
-
})).subscribe());
|
|
56
|
-
this._subscription.add(fromEvent(this.containerElement, 'mouseup').pipe(tap(() => this._moveDivider = false)).subscribe());
|
|
57
|
-
}
|
|
58
|
-
onMousedown() {
|
|
59
|
-
this._moveDivider = true;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
MovableDividerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MovableDividerDirective, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
63
|
-
MovableDividerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: MovableDividerDirective, selector: "[rxapMovableDivider]", inputs: { containerElement: "containerElement", fixedElement: "fixedElement", origin: "origin" }, host: { listeners: { "mousedown": "onMousedown()" }, properties: { "style.cursor": "this.cursor" } }, ngImport: i0 });
|
|
64
|
-
__decorate([
|
|
65
|
-
Required,
|
|
66
|
-
__metadata("design:type", HTMLDivElement)
|
|
67
|
-
], MovableDividerDirective.prototype, "containerElement", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
Required,
|
|
70
|
-
__metadata("design:type", HTMLDivElement)
|
|
71
|
-
], MovableDividerDirective.prototype, "fixedElement", void 0);
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MovableDividerDirective, decorators: [{
|
|
73
|
-
type: Directive,
|
|
74
|
-
args: [{
|
|
75
|
-
selector: '[rxapMovableDivider]'
|
|
76
|
-
}]
|
|
77
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { containerElement: [{
|
|
78
|
-
type: Input
|
|
79
|
-
}], fixedElement: [{
|
|
80
|
-
type: Input
|
|
81
|
-
}], origin: [{
|
|
82
|
-
type: Input
|
|
83
|
-
}], cursor: [{
|
|
84
|
-
type: HostBinding,
|
|
85
|
-
args: ['style.cursor']
|
|
86
|
-
}], onMousedown: [{
|
|
87
|
-
type: HostListener,
|
|
88
|
-
args: ['mousedown']
|
|
89
|
-
}] } });
|
|
90
|
-
export class MovableDividerDirectiveModule {
|
|
91
|
-
}
|
|
92
|
-
MovableDividerDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MovableDividerDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
93
|
-
MovableDividerDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MovableDividerDirectiveModule, declarations: [MovableDividerDirective], exports: [MovableDividerDirective] });
|
|
94
|
-
MovableDividerDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MovableDividerDirectiveModule });
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MovableDividerDirectiveModule, decorators: [{
|
|
96
|
-
type: NgModule,
|
|
97
|
-
args: [{
|
|
98
|
-
declarations: [MovableDividerDirective],
|
|
99
|
-
exports: [MovableDividerDirective]
|
|
100
|
-
}]
|
|
101
|
-
}] });
|
|
102
|
-
//# sourceMappingURL=movable-divider.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"movable-divider.directive.js","sourceRoot":"","sources":["../../../../../libs/directives/src/lib/movable-divider.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,YAAY,EACZ,KAAK,EACL,QAAQ,EAGR,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,SAAS,EACT,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;;AAKrC,MAAM,OAAO,uBAAuB;IA4BlC,YAA6B,QAAmB;QAAnB,aAAQ,GAAR,QAAQ,CAAW;QAjBzC,WAAM,GAA+B,OAAO,CAAC;QAE7C,WAAM,GAA+B,WAAW,CAAC;QAChD,kBAAa,GAAuB,IAAI,YAAY,EAAE,CAAC;QAC/D;;;WAGG;QACK,iBAAY,GAAwB,KAAK,CAAC;QAClD;;;;;WAKG;QACK,uBAAkB,GAAkB,IAAI,CAAC;IAEG,CAAC;IAE9C,WAAW;;QAChB,MAAA,IAAI,CAAC,aAAa,0CAAE,WAAW,EAAE,CAAC;IACpC,CAAC;IAEM,QAAQ;QACb,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAa,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,IAAI,CACnF,GAAG,CAAC,CAAC,MAAkB,EAAE,EAAE;YACzB,IAAI,IAAI,CAAC,YAAY,EAAE;gBACrB,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;oBAC5B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,YAAY,CAAC,WAAqB,CAAC;iBACnE;gBACD,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE;oBAC3B,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC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B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3B,CAAC;;oHApEU,uBAAuB;wGAAvB,uBAAuB;AAIlC;IADC,QAAQ;8BACiB,cAAc;iEAAC;AAIzC;IADC,QAAQ;8BACa,cAAc;6DAAC;2FAR1B,uBAAuB;kBAHnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;iBACjC;gGAKQ,gBAAgB;sBAFtB,KAAK;gBAMC,YAAY;sBAFlB,KAAK;gBAKC,MAAM;sBADZ,KAAK;gBAGC,MAAM;sBADZ,WAAW;uBAAC,cAAc;gBAsDpB,WAAW;sBADjB,YAAY;uBAAC,WAAW;;AAW3B,MAAM,OAAO,6BAA6B;;0HAA7B,6BAA6B;2HAA7B,6BAA6B,iBA5E7B,uBAAuB,aAAvB,uBAAuB;2HA4EvB,6BAA6B;2FAA7B,6BAA6B;kBAJzC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,uBAAuB,CAAE;oBACzC,OAAO,EAAO,CAAE,uBAAuB,CAAE;iBAC1C","sourcesContent":["import {\n Directive,\n HostBinding,\n HostListener,\n Input,\n NgModule,\n OnDestroy,\n OnInit,\n Renderer2\n} from '@angular/core';\nimport { Required } from '@rxap/utilities';\nimport {\n fromEvent,\n Subscription\n} from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n@Directive({\n selector: '[rxapMovableDivider]'\n})\nexport class MovableDividerDirective implements OnDestroy, OnInit {\n\n @Input()\n @Required\n public containerElement!: HTMLDivElement;\n\n @Input()\n @Required\n public fixedElement!: HTMLDivElement;\n\n @Input()\n public origin: 'right' | 'left' = 'right';\n @HostBinding('style.cursor')\n public cursor = 'ew-resize';\n private _subscription = new Subscription();\n /**\n * Indicates that the divider is moved with mouse down\n * @private\n */\n private _moveDivider = false;\n /**\n * Holds the current fixed element width.\n * If null the move divider feature was not yet used and the initial\n * fixed element width is not calculated\n * @private\n */\n private _fixedElementWidth: number | null = null;\n\n constructor(private readonly renderer: Renderer2) { }\n\n public ngOnDestroy() {\n this._subscription?.unsubscribe();\n }\n\n public ngOnInit() {\n this._subscription.add(fromEvent<MouseEvent>(this.containerElement, 'mousemove').pipe(\n tap(($event: MouseEvent) => {\n if (this._moveDivider) {\n if (!this._fixedElementWidth) {\n this._fixedElementWidth = this.fixedElement.clientWidth as number;\n }\n if (this.origin === 'right') {\n this._fixedElementWidth = $event.clientX - this.containerElement.getBoundingClientRect().left;\n } else if (this.origin === 'left') {\n console.log({\n clientWidth: this.containerElement.clientWidth,\n clientX: $event.clientX,\n clientLeft: this.containerElement.getBoundingClientRect().left\n });\n this._fixedElementWidth = this.containerElement.clientWidth - $event.clientX + this.containerElement.getBoundingClientRect().left;\n } else {\n throw new Error(`The origin '${this.origin}' is not supported.`);\n }\n const width = this._fixedElementWidth + 'px';\n this.renderer.setStyle(this.fixedElement, 'max-width', width);\n this.renderer.setStyle(this.fixedElement, 'min-width', width);\n this.renderer.setStyle(this.fixedElement, 'flex-basis', width);\n }\n })\n ).subscribe());\n this._subscription.add(fromEvent(this.containerElement, 'mouseup').pipe(\n tap(() => this._moveDivider = false)\n ).subscribe());\n }\n\n @HostListener('mousedown')\n public onMousedown() {\n this._moveDivider = true;\n }\n\n}\n\n@NgModule({\n declarations: [ MovableDividerDirective ],\n exports: [ MovableDividerDirective ]\n})\nexport class MovableDividerDirectiveModule {}\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Directive, NgModule, HostListener } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class PreventDefaultDirective {
|
|
4
|
-
onClick($event) {
|
|
5
|
-
$event.preventDefault();
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
PreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: PreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
-
PreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: PreventDefaultDirective, selector: "[rxapPreventDefault]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: PreventDefaultDirective, decorators: [{
|
|
11
|
-
type: Directive,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: '[rxapPreventDefault]'
|
|
14
|
-
}]
|
|
15
|
-
}], propDecorators: { onClick: [{
|
|
16
|
-
type: HostListener,
|
|
17
|
-
args: ['click', ['$event']]
|
|
18
|
-
}] } });
|
|
19
|
-
export class PreventDefaultDirectiveModule {
|
|
20
|
-
}
|
|
21
|
-
PreventDefaultDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: PreventDefaultDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
22
|
-
PreventDefaultDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: PreventDefaultDirectiveModule, declarations: [PreventDefaultDirective], exports: [PreventDefaultDirective] });
|
|
23
|
-
PreventDefaultDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: PreventDefaultDirectiveModule });
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: PreventDefaultDirectiveModule, decorators: [{
|
|
25
|
-
type: NgModule,
|
|
26
|
-
args: [{
|
|
27
|
-
exports: [PreventDefaultDirective],
|
|
28
|
-
declarations: [PreventDefaultDirective]
|
|
29
|
-
}]
|
|
30
|
-
}] });
|
|
31
|
-
//# sourceMappingURL=prevent-default.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prevent-default.directive.js","sourceRoot":"","sources":["../../../../../libs/directives/src/lib/prevent-default.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACb,MAAM,eAAe,CAAC;;AAKvB,MAAM,OAAO,uBAAuB;IAG3B,OAAO,CAAC,MAAa;QAC1B,MAAM,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;;oHALU,uBAAuB;wGAAvB,uBAAuB;2FAAvB,uBAAuB;kBAHnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;iBACjC;8BAIQ,OAAO;sBADb,YAAY;uBAAC,OAAO,EAAE,CAAE,QAAQ,CAAE;;AAWrC,MAAM,OAAO,6BAA6B;;0HAA7B,6BAA6B;2HAA7B,6BAA6B,iBAb7B,uBAAuB,aAAvB,uBAAuB;2HAavB,6BAA6B;2FAA7B,6BAA6B;kBAJzC,QAAQ;mBAAC;oBACR,OAAO,EAAO,CAAE,uBAAuB,CAAE;oBACzC,YAAY,EAAE,CAAE,uBAAuB,CAAE;iBAC1C","sourcesContent":["import {\n Directive,\n NgModule,\n HostListener\n} from '@angular/core';\n\n@Directive({\n selector: '[rxapPreventDefault]'\n})\nexport class PreventDefaultDirective {\n\n @HostListener('click', [ '$event' ])\n public onClick($event: Event): void {\n $event.preventDefault();\n }\n\n}\n\n@NgModule({\n exports: [ PreventDefaultDirective ],\n declarations: [ PreventDefaultDirective ]\n})\nexport class PreventDefaultDirectiveModule {}\n"]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { __awaiter, __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Directive, HostListener, Input, Injectable, NgModule } from '@angular/core';
|
|
3
|
-
import { Required } from '@rxap/utilities';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class ShareService {
|
|
6
|
-
share(data) {
|
|
7
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
8
|
-
if (this.isShareSupported()) {
|
|
9
|
-
if (navigator.canShare(data)) {
|
|
10
|
-
yield navigator.share(data);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
console.debug('share data:', data);
|
|
14
|
-
throw new Error('Can not share data. Data is invalid!');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
alert('Native share is not supported!');
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
isShareSupported() {
|
|
23
|
-
return !!navigator.share;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
ShareService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
27
|
-
ShareService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareService, providedIn: 'root' });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareService, decorators: [{
|
|
29
|
-
type: Injectable,
|
|
30
|
-
args: [{ providedIn: 'root' }]
|
|
31
|
-
}] });
|
|
32
|
-
export class ShareButtonDirective {
|
|
33
|
-
constructor(shareService) {
|
|
34
|
-
this.shareService = shareService;
|
|
35
|
-
}
|
|
36
|
-
share() {
|
|
37
|
-
this.shareService.share({ url: this.url, text: this.text, files: this.files, title: this.title })
|
|
38
|
-
.then(() => console.log('share successfully'))
|
|
39
|
-
.catch(err => console.error('share failed', err.message));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
ShareButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareButtonDirective, deps: [{ token: ShareService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
43
|
-
ShareButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: ShareButtonDirective, selector: "[rxapShareButton]", inputs: { url: "url", text: "text", title: "title", files: "files" }, host: { listeners: { "click": "share()" } }, ngImport: i0 });
|
|
44
|
-
__decorate([
|
|
45
|
-
Required,
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], ShareButtonDirective.prototype, "title", void 0);
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareButtonDirective, decorators: [{
|
|
49
|
-
type: Directive,
|
|
50
|
-
args: [{
|
|
51
|
-
selector: '[rxapShareButton]'
|
|
52
|
-
}]
|
|
53
|
-
}], ctorParameters: function () { return [{ type: ShareService }]; }, propDecorators: { url: [{
|
|
54
|
-
type: Input
|
|
55
|
-
}], text: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], title: [{
|
|
58
|
-
type: Input
|
|
59
|
-
}], files: [{
|
|
60
|
-
type: Input
|
|
61
|
-
}], share: [{
|
|
62
|
-
type: HostListener,
|
|
63
|
-
args: ['click']
|
|
64
|
-
}] } });
|
|
65
|
-
export class ShareButtonDirectiveModule {
|
|
66
|
-
}
|
|
67
|
-
ShareButtonDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareButtonDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
68
|
-
ShareButtonDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareButtonDirectiveModule, declarations: [ShareButtonDirective], exports: [ShareButtonDirective] });
|
|
69
|
-
ShareButtonDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareButtonDirectiveModule });
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ShareButtonDirectiveModule, decorators: [{
|
|
71
|
-
type: NgModule,
|
|
72
|
-
args: [{
|
|
73
|
-
exports: [ShareButtonDirective],
|
|
74
|
-
declarations: [ShareButtonDirective]
|
|
75
|
-
}]
|
|
76
|
-
}] });
|
|
77
|
-
//# sourceMappingURL=share-button.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"share-button.directive.js","sourceRoot":"","sources":["../../../../../libs/directives/src/lib/share-button.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,KAAK,EACL,UAAU,EACV,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;;AAG3C,MAAM,OAAO,YAAY;IAEV,KAAK,CAAC,IAAkF;;YAEnG,IAAI,IAAI,CAAC,gBAAgB,EAAE,EAAE;gBAE3B,IAAK,SAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;oBAErC,MAAO,SAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBAEtC;qBAAM;oBACL,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;oBACnC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;iBACzD;aAEF;iBAAM;gBACL,KAAK,CAAC,gCAAgC,CAAC,CAAC;aACzC;QAEH,CAAC;KAAA;IAEO,gBAAgB;QACtB,OAAO,CAAC,CAAE,SAAiB,CAAC,KAAK,CAAC;IACpC,CAAC;;yGAvBU,YAAY;6GAAZ,YAAY,cADC,MAAM;2FACnB,YAAY;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;AA+BlC,MAAM,OAAO,oBAAoB;IAe/B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAGpD,KAAK;QACV,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;aAC5F,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;aAC7C,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,CAAC;;iHAtBU,oBAAoB,kBAeY,YAAY;qGAf5C,oBAAoB;AAU/B;IADC,QAAQ;;mDACa;2FAVX,oBAAoB;kBAHhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;iBAC9B;0DAgB4C,YAAY,0BAZhD,GAAG;sBADT,KAAK;gBAIC,IAAI;sBADV,KAAK;gBAKC,KAAK;sBAFX,KAAK;gBAKC,KAAK;sBADX,KAAK;gBAMC,KAAK;sBADX,YAAY;uBAAC,OAAO;;AAavB,MAAM,OAAO,0BAA0B;;uHAA1B,0BAA0B;wHAA1B,0BAA0B,iBA9B1B,oBAAoB,aAApB,oBAAoB;wHA8BpB,0BAA0B;2FAA1B,0BAA0B;kBAJtC,QAAQ;mBAAC;oBACR,OAAO,EAAO,CAAE,oBAAoB,CAAE;oBACtC,YAAY,EAAE,CAAE,oBAAoB,CAAE;iBACvC","sourcesContent":["import {\n Directive,\n HostListener,\n Input,\n Injectable,\n NgModule\n} from '@angular/core';\nimport { Required } from '@rxap/utilities';\n\n@Injectable({ providedIn: 'root' })\nexport class ShareService {\n\n public async share(data: { url?: string, text?: string, title?: string, files?: ReadonlyArray<File> }) {\n\n if (this.isShareSupported()) {\n\n if ((navigator as any).canShare(data)) {\n\n await (navigator as any).share(data);\n\n } else {\n console.debug('share data:', data);\n throw new Error('Can not share data. Data is invalid!');\n }\n\n } else {\n alert('Native share is not supported!');\n }\n\n }\n\n private isShareSupported(): boolean {\n return !!(navigator as any).share;\n }\n\n}\n\n@Directive({\n selector: '[rxapShareButton]'\n})\nexport class ShareButtonDirective {\n\n @Input()\n public url!: string;\n\n @Input()\n public text!: string;\n\n @Input()\n @Required\n public title!: string;\n\n @Input()\n public files?: ReadonlyArray<File>;\n\n constructor(private readonly shareService: ShareService) {}\n\n @HostListener('click')\n public share() {\n this.shareService.share({ url: this.url, text: this.text, files: this.files, title: this.title })\n .then(() => console.log('share successfully'))\n .catch(err => console.error('share failed', err.message));\n }\n\n}\n\n@NgModule({\n exports: [ ShareButtonDirective ],\n declarations: [ ShareButtonDirective ]\n})\nexport class ShareButtonDirectiveModule {\n\n}\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Directive, NgModule, HostListener } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class StopImmediatePropagationDirective {
|
|
4
|
-
onClick($event) {
|
|
5
|
-
$event.stopImmediatePropagation();
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
StopImmediatePropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopImmediatePropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
-
StopImmediatePropagationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: StopImmediatePropagationDirective, selector: "[rxapStopImmediatePropagation]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopImmediatePropagationDirective, decorators: [{
|
|
11
|
-
type: Directive,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: '[rxapStopImmediatePropagation]'
|
|
14
|
-
}]
|
|
15
|
-
}], propDecorators: { onClick: [{
|
|
16
|
-
type: HostListener,
|
|
17
|
-
args: ['click', ['$event']]
|
|
18
|
-
}] } });
|
|
19
|
-
export class StopImmediatePropagationDirectiveModule {
|
|
20
|
-
}
|
|
21
|
-
StopImmediatePropagationDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopImmediatePropagationDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
22
|
-
StopImmediatePropagationDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopImmediatePropagationDirectiveModule, declarations: [StopImmediatePropagationDirective], exports: [StopImmediatePropagationDirective] });
|
|
23
|
-
StopImmediatePropagationDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopImmediatePropagationDirectiveModule });
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopImmediatePropagationDirectiveModule, decorators: [{
|
|
25
|
-
type: NgModule,
|
|
26
|
-
args: [{
|
|
27
|
-
exports: [StopImmediatePropagationDirective],
|
|
28
|
-
declarations: [StopImmediatePropagationDirective]
|
|
29
|
-
}]
|
|
30
|
-
}] });
|
|
31
|
-
//# sourceMappingURL=stop-immediate-propagation.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stop-immediate-propagation.directive.js","sourceRoot":"","sources":["../../../../../libs/directives/src/lib/stop-immediate-propagation.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACb,MAAM,eAAe,CAAC;;AAKvB,MAAM,OAAO,iCAAiC;IAGrC,OAAO,CAAC,MAAa;QAC1B,MAAM,CAAC,wBAAwB,EAAE,CAAC;IACpC,CAAC;;8HALU,iCAAiC;kHAAjC,iCAAiC;2FAAjC,iCAAiC;kBAH7C,SAAS;mBAAC;oBACT,QAAQ,EAAE,gCAAgC;iBAC3C;8BAIQ,OAAO;sBADb,YAAY;uBAAC,OAAO,EAAE,CAAE,QAAQ,CAAE;;AAWrC,MAAM,OAAO,uCAAuC;;oIAAvC,uCAAuC;qIAAvC,uCAAuC,iBAbvC,iCAAiC,aAAjC,iCAAiC;qIAajC,uCAAuC;2FAAvC,uCAAuC;kBAJnD,QAAQ;mBAAC;oBACR,OAAO,EAAO,CAAE,iCAAiC,CAAE;oBACnD,YAAY,EAAE,CAAE,iCAAiC,CAAE;iBACpD","sourcesContent":["import {\n Directive,\n NgModule,\n HostListener\n} from '@angular/core';\n\n@Directive({\n selector: '[rxapStopImmediatePropagation]'\n})\nexport class StopImmediatePropagationDirective {\n\n @HostListener('click', [ '$event' ])\n public onClick($event: Event): void {\n $event.stopImmediatePropagation();\n }\n\n}\n\n@NgModule({\n exports: [ StopImmediatePropagationDirective ],\n declarations: [ StopImmediatePropagationDirective ]\n})\nexport class StopImmediatePropagationDirectiveModule {}\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Directive, NgModule, HostListener } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class StopPropagationDirective {
|
|
4
|
-
onClick($event) {
|
|
5
|
-
$event.stopPropagation();
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
StopPropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
-
StopPropagationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: StopPropagationDirective, selector: "[rxapStopPropagation]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopPropagationDirective, decorators: [{
|
|
11
|
-
type: Directive,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: '[rxapStopPropagation]'
|
|
14
|
-
}]
|
|
15
|
-
}], propDecorators: { onClick: [{
|
|
16
|
-
type: HostListener,
|
|
17
|
-
args: ['click', ['$event']]
|
|
18
|
-
}] } });
|
|
19
|
-
export class StopPropagationDirectiveModule {
|
|
20
|
-
}
|
|
21
|
-
StopPropagationDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopPropagationDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
22
|
-
StopPropagationDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopPropagationDirectiveModule, declarations: [StopPropagationDirective], exports: [StopPropagationDirective] });
|
|
23
|
-
StopPropagationDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopPropagationDirectiveModule });
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: StopPropagationDirectiveModule, decorators: [{
|
|
25
|
-
type: NgModule,
|
|
26
|
-
args: [{
|
|
27
|
-
exports: [StopPropagationDirective],
|
|
28
|
-
declarations: [StopPropagationDirective]
|
|
29
|
-
}]
|
|
30
|
-
}] });
|
|
31
|
-
//# sourceMappingURL=stop-propagation.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stop-propagation.directive.js","sourceRoot":"","sources":["../../../../../libs/directives/src/lib/stop-propagation.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACb,MAAM,eAAe,CAAC;;AAKvB,MAAM,OAAO,wBAAwB;IAG5B,OAAO,CAAC,MAAa;QAC1B,MAAM,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;;qHALU,wBAAwB;yGAAxB,wBAAwB;2FAAxB,wBAAwB;kBAHpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,uBAAuB;iBAClC;8BAIQ,OAAO;sBADb,YAAY;uBAAC,OAAO,EAAE,CAAE,QAAQ,CAAE;;AAWrC,MAAM,OAAO,8BAA8B;;2HAA9B,8BAA8B;4HAA9B,8BAA8B,iBAb9B,wBAAwB,aAAxB,wBAAwB;4HAaxB,8BAA8B;2FAA9B,8BAA8B;kBAJ1C,QAAQ;mBAAC;oBACR,OAAO,EAAO,CAAE,wBAAwB,CAAE;oBAC1C,YAAY,EAAE,CAAE,wBAAwB,CAAE;iBAC3C","sourcesContent":["import {\n Directive,\n NgModule,\n HostListener\n} from '@angular/core';\n\n@Directive({\n selector: '[rxapStopPropagation]'\n})\nexport class StopPropagationDirective {\n\n @HostListener('click', [ '$event' ])\n public onClick($event: Event): void {\n $event.stopPropagation();\n }\n\n}\n\n@NgModule({\n exports: [ StopPropagationDirective ],\n declarations: [ StopPropagationDirective ]\n})\nexport class StopPropagationDirectiveModule {}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-directives.js","sourceRoot":"","sources":["../../../../libs/directives/src/rxap-directives.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
|