@flexzap/misc 0.0.1 → 0.0.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/fesm2022/flexzap-misc.mjs +9 -9
- package/fesm2022/flexzap-misc.mjs.map +1 -1
- package/index.d.ts +7 -7
- package/package.json +1 -1
|
@@ -2,16 +2,16 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, input, computed } from '@angular/core';
|
|
3
3
|
import { ZapNumeric } from '@flexzap/pipes';
|
|
4
4
|
|
|
5
|
-
class
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type:
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type:
|
|
5
|
+
class ZapSpinner {
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ZapSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: ZapSpinner, isStandalone: true, selector: "zap-spinner", ngImport: i0, template: "<div class=\"zap-spinner\">\n <div>\n <ng-content></ng-content>\n </div>\n <div></div>\n</div>\n", styles: [".zap-spinner{display:flex;justify-content:center;align-items:center;flex:1}.zap-spinner div:nth-child(1){position:absolute;z-index:1}.zap-spinner div:nth-child(2){width:100%;height:100%}:host{width:100%;height:100%;display:flex;position:absolute;left:0;top:0;z-index:10}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type:
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ZapSpinner, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'zap-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"zap-spinner\">\n <div>\n <ng-content></ng-content>\n </div>\n <div></div>\n</div>\n", styles: [".zap-spinner{display:flex;justify-content:center;align-items:center;flex:1}.zap-spinner div:nth-child(1){position:absolute;z-index:1}.zap-spinner div:nth-child(2){width:100%;height:100%}:host{width:100%;height:100%;display:flex;position:absolute;left:0;top:0;z-index:10}\n"] }]
|
|
12
12
|
}] });
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class ZapProgressBar {
|
|
15
15
|
value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
16
16
|
min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
17
17
|
max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
@@ -27,10 +27,10 @@ class ProgressBar {
|
|
|
27
27
|
style = computed(() => ({
|
|
28
28
|
width: `${this.size()}%`
|
|
29
29
|
}), ...(ngDevMode ? [{ debugName: "style" }] : []));
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type:
|
|
31
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.2", type:
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ZapProgressBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.2", type: ZapProgressBar, isStandalone: true, selector: "zap-progress-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"zap-progress-bar\">\n <div [style]=\"style()\">\n <span>{{ value() | ZapNumeric: format() }}</span>\n </div>\n</div>\n", styles: [".zap-progress-bar div{max-width:100%}:host{display:block}\n"], dependencies: [{ kind: "pipe", type: ZapNumeric, name: "ZapNumeric" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type:
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ZapProgressBar, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{ selector: 'zap-progress-bar', imports: [ZapNumeric], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"zap-progress-bar\">\n <div [style]=\"style()\">\n <span>{{ value() | ZapNumeric: format() }}</span>\n </div>\n</div>\n", styles: [".zap-progress-bar div{max-width:100%}:host{display:block}\n"] }]
|
|
36
36
|
}] });
|
|
@@ -43,5 +43,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
43
43
|
* Generated bundle index. Do not edit.
|
|
44
44
|
*/
|
|
45
45
|
|
|
46
|
-
export {
|
|
46
|
+
export { ZapProgressBar, ZapSpinner };
|
|
47
47
|
//# sourceMappingURL=flexzap-misc.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flexzap-misc.mjs","sources":["../../../../projects/flexzap/misc/src/lib/spinner/spinner.ts","../../../../projects/flexzap/misc/src/lib/spinner/spinner.html","../../../../projects/flexzap/misc/src/lib/progress-bar/progress-bar.ts","../../../../projects/flexzap/misc/src/lib/progress-bar/progress-bar.html","../../../../projects/flexzap/misc/src/public-api.ts","../../../../projects/flexzap/misc/src/flexzap-misc.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'zap-spinner',\n templateUrl: './spinner.html',\n styleUrl: './spinner.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class
|
|
1
|
+
{"version":3,"file":"flexzap-misc.mjs","sources":["../../../../projects/flexzap/misc/src/lib/spinner/spinner.ts","../../../../projects/flexzap/misc/src/lib/spinner/spinner.html","../../../../projects/flexzap/misc/src/lib/progress-bar/progress-bar.ts","../../../../projects/flexzap/misc/src/lib/progress-bar/progress-bar.html","../../../../projects/flexzap/misc/src/public-api.ts","../../../../projects/flexzap/misc/src/flexzap-misc.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'zap-spinner',\n templateUrl: './spinner.html',\n styleUrl: './spinner.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ZapSpinner { }\n","<div class=\"zap-spinner\">\n <div>\n <ng-content></ng-content>\n </div>\n <div></div>\n</div>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nimport { ZapNumeric, ZapNumericInterface } from '@flexzap/pipes';\n\n@Component({\n selector: 'zap-progress-bar',\n imports: [ZapNumeric],\n templateUrl: './progress-bar.html',\n styleUrl: './progress-bar.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ZapProgressBar {\n value = input<number>(0);\n min = input<number>(0);\n max = input<number>(100);\n format = input<Partial<ZapNumericInterface>>({});\n\n size = computed(() => {\n const currentValue = this.value();\n const minValue = this.min();\n const maxValue = this.max();\n\n if (maxValue <= minValue) return 0;\n\n return Math.trunc(((currentValue - minValue) / (maxValue - minValue)) * 100);\n });\n\n style = computed(() => ({\n width: `${this.size()}%`\n }));\n}\n","<div class=\"zap-progress-bar\">\n <div [style]=\"style()\">\n <span>{{ value() | ZapNumeric: format() }}</span>\n </div>\n</div>\n","/*\n * Public API Surface of misc\n */\n\nexport * from './lib/spinner/spinner';\nexport * from './lib/progress-bar/progress-bar';\n","/**\n * Generated bundle index. Do not edit.\n */\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AA,kBAAkB,WACnB,CAAC,UAAU,CAAC,EAAA,eAAA,EAGJ,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0IAAA,EAAA,MAAA,EAAA,CAAA,6DAAA,CAAA,EAAA;;;AETjD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ZapNumericInterface } from '@flexzap/pipes';
|
|
3
3
|
|
|
4
|
-
declare class
|
|
5
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
6
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
4
|
+
declare class ZapSpinner {
|
|
5
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZapSpinner, never>;
|
|
6
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZapSpinner, "zap-spinner", never, {}, {}, never, ["*"], true, never>;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
declare class
|
|
9
|
+
declare class ZapProgressBar {
|
|
10
10
|
value: _angular_core.InputSignal<number>;
|
|
11
11
|
min: _angular_core.InputSignal<number>;
|
|
12
12
|
max: _angular_core.InputSignal<number>;
|
|
@@ -15,8 +15,8 @@ declare class ProgressBar {
|
|
|
15
15
|
style: _angular_core.Signal<{
|
|
16
16
|
width: string;
|
|
17
17
|
}>;
|
|
18
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
19
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
18
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZapProgressBar, never>;
|
|
19
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZapProgressBar, "zap-progress-bar", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export { ZapProgressBar, ZapSpinner };
|