@softpak/components 20.13.1 → 20.13.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, computed, output, viewChild, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ImpactStyle, Haptics } from '@capacitor/haptics';
|
|
4
4
|
import { IsSeverityPipe } from '@softpak/components/spx-pipes';
|
|
5
5
|
import { NgClass } from '@angular/common';
|
|
6
6
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
@@ -19,10 +19,14 @@ class SpxButtonComponent {
|
|
|
19
19
|
this.spxType = input('submit', ...(ngDevMode ? [{ debugName: "spxType" }] : []));
|
|
20
20
|
this.mappedName = computed(() => this.spxName() ?? undefined, ...(ngDevMode ? [{ debugName: "mappedName" }] : []));
|
|
21
21
|
this.spxName = input(...(ngDevMode ? [undefined, { debugName: "spxName" }] : []));
|
|
22
|
-
this.isPressing = false;
|
|
23
22
|
this.spxClick = output();
|
|
24
23
|
this.buttonRef = viewChild('buttonRef', ...(ngDevMode ? [{ debugName: "buttonRef" }] : []));
|
|
25
24
|
this.SpxSeverity = SpxSeverityEnum;
|
|
25
|
+
// For haptics
|
|
26
|
+
this.isPressing = false;
|
|
27
|
+
this.lastHaptic = 0;
|
|
28
|
+
this.hapticCooldown = 120;
|
|
29
|
+
//
|
|
26
30
|
this.hasShadowDom = (el) => {
|
|
27
31
|
return !!el.shadowRoot && !!el.attachShadow;
|
|
28
32
|
};
|
|
@@ -31,17 +35,13 @@ class SpxButtonComponent {
|
|
|
31
35
|
this.spxClick.emit();
|
|
32
36
|
}
|
|
33
37
|
};
|
|
38
|
+
// For haptics
|
|
34
39
|
this.handlePress = async () => {
|
|
35
40
|
if (this.spxDisabled()) {
|
|
36
41
|
return;
|
|
37
42
|
}
|
|
38
43
|
this.isPressing = true;
|
|
39
|
-
|
|
40
|
-
await Haptics.impact({ style: ImpactStyle.Medium });
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
// silence if haptics is not available
|
|
44
|
-
}
|
|
44
|
+
await this.safeHaptic(ImpactStyle.Medium);
|
|
45
45
|
};
|
|
46
46
|
// global pointerup: check of de release binnen of buiten de knop is
|
|
47
47
|
this.onDocumentPointerUp = async (event) => {
|
|
@@ -57,21 +57,34 @@ class SpxButtonComponent {
|
|
|
57
57
|
try {
|
|
58
58
|
if (inside) {
|
|
59
59
|
// OK haptic
|
|
60
|
-
await
|
|
60
|
+
await this.safeHaptic(ImpactStyle.Heavy);
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
// Cancel haptic
|
|
64
|
-
await
|
|
64
|
+
await this.safeHaptic(ImpactStyle.Light);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
catch {
|
|
68
|
-
//
|
|
68
|
+
// Silence if no haptics
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
spxSetFocus() {
|
|
73
73
|
this.buttonRef()?.nativeElement?.focus();
|
|
74
74
|
}
|
|
75
|
+
async safeHaptic(style) {
|
|
76
|
+
const now = performance.now();
|
|
77
|
+
if (now - this.lastHaptic < this.hapticCooldown) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.lastHaptic = now;
|
|
81
|
+
try {
|
|
82
|
+
await Haptics.impact({ style });
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// Silence if no haptics
|
|
86
|
+
}
|
|
87
|
+
}
|
|
75
88
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: SpxButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
76
89
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.2.3", type: SpxButtonComponent, isStandalone: true, selector: "spx-button", inputs: { spxDisabled: { classPropertyName: "spxDisabled", publicName: "spxDisabled", isSignal: true, isRequired: false, transformFunction: null }, spxClass: { classPropertyName: "spxClass", publicName: "spxClass", isSignal: true, isRequired: false, transformFunction: null }, spxClassObject: { classPropertyName: "spxClassObject", publicName: "spxClassObject", isSignal: true, isRequired: false, transformFunction: null }, spxForm: { classPropertyName: "spxForm", publicName: "spxForm", isSignal: true, isRequired: false, transformFunction: null }, spxFullHeight: { classPropertyName: "spxFullHeight", publicName: "spxFullHeight", isSignal: true, isRequired: false, transformFunction: null }, spxFullWidth: { classPropertyName: "spxFullWidth", publicName: "spxFullWidth", isSignal: true, isRequired: false, transformFunction: null }, spxSeverity: { classPropertyName: "spxSeverity", publicName: "spxSeverity", isSignal: true, isRequired: false, transformFunction: null }, spxSize: { classPropertyName: "spxSize", publicName: "spxSize", isSignal: true, isRequired: false, transformFunction: null }, spxTabIndex: { classPropertyName: "spxTabIndex", publicName: "spxTabIndex", isSignal: true, isRequired: false, transformFunction: null }, spxType: { classPropertyName: "spxType", publicName: "spxType", isSignal: true, isRequired: false, transformFunction: null }, spxName: { classPropertyName: "spxName", publicName: "spxName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxClick: "spxClick" }, host: { listeners: { "document:pointerup": "onDocumentPointerUp($event)" }, properties: { "class.block": "spxFullWidth()", "class.h-full": "spxFullHeight()", "class.w-full": "spxFullWidth()" } }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["buttonRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n #buttonRef\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\n [class.h-full]=\"this.spxFullHeight()\"\n [class.w-full]=\"this.spxFullWidth()\"\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\n [class.text-xl]=\"this.spxSize() === 'xl'\"\n [class.text-lg]=\"this.spxSize() === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled()\"\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\n [class.opacity-50]=\"this.spxDisabled()\"\n [class.focus:ring-0]=\"this.spxDisabled()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\n [attr.name]=\"this.mappedName()\"\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\n (pointerdown)=\"this.handlePress()\"\n (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: IsSeverityPipe, name: "isSeverity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
77
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-button.mjs","sources":["../../../../projects/softpak/components/spx-button/spx-button.component.ts","../../../../projects/softpak/components/spx-button/spx-button.component.html","../../../../projects/softpak/components/spx-button/softpak-components-spx-button.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostListener,\n computed,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { Haptics, ImpactStyle } from '@capacitor/haptics';\n\nimport { IsSeverityPipe } from '@softpak/components/spx-pipes';\nimport { NgClass } from '@angular/common';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-button',\n imports: [NgClass, IsSeverityPipe],\n templateUrl: './spx-button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.block]': 'spxFullWidth()',\n '[class.h-full]': 'spxFullHeight()',\n '[class.w-full]': 'spxFullWidth()',\n },\n standalone: true,\n})\nexport class SpxButtonComponent {\n readonly spxDisabled = input(false);\n readonly spxClass = input<string>();\n readonly spxClassObject = input<object>();\n readonly spxForm = input<string>();\n readonly spxFullHeight = input<boolean>();\n readonly spxFullWidth = input<boolean>();\n readonly spxSeverity = input<SpxSeverityEnum | undefined>(SpxSeverityEnum.info);\n readonly spxSize = input<'lg' | 'xl'>('lg');\n readonly spxTabIndex = input<number>();\n readonly spxType = input<'button' | 'submit'>('submit');\n protected mappedName = computed(() => this.spxName() ?? undefined);\n readonly spxName = input<string>();\n isPressing = false;\n spxClick = output();\n buttonRef = viewChild<ElementRef<HTMLInputElement>>('buttonRef');\n SpxSeverity = SpxSeverityEnum;\n\n hasShadowDom = (el: HTMLElement) => {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n };\n handleClick = () => {\n if (!this.spxDisabled()) {\n this.spxClick.emit();\n }\n };\n\n handlePress = async () => {\n if (this.spxDisabled()) {\n return;\n }\n this.isPressing = true;\n try {\n await Haptics.impact({ style: ImpactStyle.Medium });\n } catch {\n // silence if haptics is not available\n }\n };\n\n // global pointerup: check of de release binnen of buiten de knop is\n @HostListener('document:pointerup', ['$event'])\n onDocumentPointerUp = async (event: PointerEvent) => {\n if (!this.isPressing || this.spxDisabled()) {\n return;\n }\n this.isPressing = false;\n\n const btn = this.buttonRef()?.nativeElement;\n if (!btn) {\n return;\n }\n\n const inside = btn.contains(event.target as Node);\n\n try {\n if (inside) {\n // OK haptic\n await Haptics.impact({ style: ImpactStyle.Heavy });\n } else {\n // Cancel haptic\n await Haptics.impact({ style: ImpactStyle.Light });\n }\n } catch {\n // ignore\n }\n };\n\n spxSetFocus(): void {\n this.buttonRef()?.nativeElement?.focus();\n }\n}\n","<button\n #buttonRef\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\n [class.h-full]=\"this.spxFullHeight()\"\n [class.w-full]=\"this.spxFullWidth()\"\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\n [class.text-xl]=\"this.spxSize() === 'xl'\"\n [class.text-lg]=\"this.spxSize() === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled()\"\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\n [class.opacity-50]=\"this.spxDisabled()\"\n [class.focus:ring-0]=\"this.spxDisabled()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\n [attr.name]=\"this.mappedName()\"\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\n (pointerdown)=\"this.handlePress()\"\n (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA4Ba,kBAAkB,CAAA;AAZ/B,IAAA,WAAA,GAAA;AAaW,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,uDAAC;QAC1B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;QAC1B,IAAA,CAAA,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;QAChC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;QACzB,IAAA,CAAA,aAAa,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,E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kBAZ9B,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,CAAC,OAAO,EAAE,cAAc,CAAC,EAAA,eAAA,EAEjB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,eAAe,EAAE,gBAAgB;AACjC,wBAAA,gBAAgB,EAAE,iBAAiB;AACnC,wBAAA,gBAAgB,EAAE,gBAAgB;AACnC,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,4qEAAA,EAAA;8BA2ChB,mBAAmB,EAAA,CAAA;sBADlB,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;;AEpEhD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-button.mjs","sources":["../../../../projects/softpak/components/spx-button/spx-button.component.ts","../../../../projects/softpak/components/spx-button/spx-button.component.html","../../../../projects/softpak/components/spx-button/softpak-components-spx-button.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostListener,\n computed,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { Haptics, ImpactStyle } from '@capacitor/haptics';\n\nimport { IsSeverityPipe } from '@softpak/components/spx-pipes';\nimport { NgClass } from '@angular/common';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-button',\n imports: [NgClass, IsSeverityPipe],\n templateUrl: './spx-button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.block]': 'spxFullWidth()',\n '[class.h-full]': 'spxFullHeight()',\n '[class.w-full]': 'spxFullWidth()',\n },\n standalone: true,\n})\nexport class SpxButtonComponent {\n readonly spxDisabled = input(false);\n readonly spxClass = input<string>();\n readonly spxClassObject = input<object>();\n readonly spxForm = input<string>();\n readonly spxFullHeight = input<boolean>();\n readonly spxFullWidth = input<boolean>();\n readonly spxSeverity = input<SpxSeverityEnum | undefined>(SpxSeverityEnum.info);\n readonly spxSize = input<'lg' | 'xl'>('lg');\n readonly spxTabIndex = input<number>();\n readonly spxType = input<'button' | 'submit'>('submit');\n protected mappedName = computed(() => this.spxName() ?? undefined);\n readonly spxName = input<string>();\n spxClick = output();\n buttonRef = viewChild<ElementRef<HTMLInputElement>>('buttonRef');\n SpxSeverity = SpxSeverityEnum;\n\n // For haptics\n private isPressing = false;\n private lastHaptic = 0;\n private hapticCooldown = 120;\n //\n\n hasShadowDom = (el: HTMLElement) => {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n };\n handleClick = () => {\n if (!this.spxDisabled()) {\n this.spxClick.emit();\n }\n };\n\n spxSetFocus(): void {\n this.buttonRef()?.nativeElement?.focus();\n }\n\n // For haptics\n handlePress = async () => {\n if (this.spxDisabled()) {\n return;\n }\n this.isPressing = true;\n await this.safeHaptic(ImpactStyle.Medium);\n };\n\n // global pointerup: check of de release binnen of buiten de knop is\n @HostListener('document:pointerup', ['$event'])\n onDocumentPointerUp = async (event: PointerEvent) => {\n if (!this.isPressing || this.spxDisabled()) {\n return;\n }\n this.isPressing = false;\n\n const btn = this.buttonRef()?.nativeElement;\n if (!btn) {\n return;\n }\n\n const inside = btn.contains(event.target as Node);\n\n try {\n if (inside) {\n // OK haptic\n await this.safeHaptic(ImpactStyle.Heavy);\n } else {\n // Cancel haptic\n await this.safeHaptic(ImpactStyle.Light);\n }\n } catch {\n // Silence if no haptics\n }\n };\n\n private async safeHaptic(style: ImpactStyle) {\n const now = performance.now();\n if (now - this.lastHaptic < this.hapticCooldown) {\n return;\n }\n this.lastHaptic = now;\n\n try {\n await Haptics.impact({ style });\n } catch {\n // Silence if no haptics\n }\n }\n // End haptics\n}\n","<button\n #buttonRef\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\n [class.h-full]=\"this.spxFullHeight()\"\n [class.w-full]=\"this.spxFullWidth()\"\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\n [class.text-xl]=\"this.spxSize() === 'xl'\"\n [class.text-lg]=\"this.spxSize() === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled()\"\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\n [class.opacity-50]=\"this.spxDisabled()\"\n [class.focus:ring-0]=\"this.spxDisabled()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\n [attr.name]=\"this.mappedName()\"\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\n (pointerdown)=\"this.handlePress()\"\n (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA4Ba,kBAAkB,CAAA;AAZ/B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AC,QAAQ,CAAC;;;AE1EhD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softpak/components",
|
|
3
|
-
"version": "20.13.
|
|
3
|
+
"version": "20.13.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "20.x.x",
|
|
@@ -32,62 +32,66 @@
|
|
|
32
32
|
"types": "./index.d.ts",
|
|
33
33
|
"default": "./fesm2022/softpak-components.mjs"
|
|
34
34
|
},
|
|
35
|
-
"./spx-alert": {
|
|
36
|
-
"types": "./spx-alert/index.d.ts",
|
|
37
|
-
"default": "./fesm2022/softpak-components-spx-alert.mjs"
|
|
38
|
-
},
|
|
39
35
|
"./spx-404-page": {
|
|
40
36
|
"types": "./spx-404-page/index.d.ts",
|
|
41
37
|
"default": "./fesm2022/softpak-components-spx-404-page.mjs"
|
|
42
38
|
},
|
|
43
|
-
"./spx-app-configuration": {
|
|
44
|
-
"types": "./spx-app-configuration/index.d.ts",
|
|
45
|
-
"default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
|
|
46
|
-
},
|
|
47
39
|
"./spx-app-expiry": {
|
|
48
40
|
"types": "./spx-app-expiry/index.d.ts",
|
|
49
41
|
"default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
|
|
50
42
|
},
|
|
43
|
+
"./spx-alert": {
|
|
44
|
+
"types": "./spx-alert/index.d.ts",
|
|
45
|
+
"default": "./fesm2022/softpak-components-spx-alert.mjs"
|
|
46
|
+
},
|
|
51
47
|
"./spx-button": {
|
|
52
48
|
"types": "./spx-button/index.d.ts",
|
|
53
49
|
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
54
50
|
},
|
|
55
|
-
"./spx-
|
|
56
|
-
"types": "./spx-
|
|
57
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
58
|
-
},
|
|
59
|
-
"./spx-capitalize": {
|
|
60
|
-
"types": "./spx-capitalize/index.d.ts",
|
|
61
|
-
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
51
|
+
"./spx-app-configuration": {
|
|
52
|
+
"types": "./spx-app-configuration/index.d.ts",
|
|
53
|
+
"default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
|
|
62
54
|
},
|
|
63
55
|
"./spx-change-details": {
|
|
64
56
|
"types": "./spx-change-details/index.d.ts",
|
|
65
57
|
"default": "./fesm2022/softpak-components-spx-change-details.mjs"
|
|
66
58
|
},
|
|
59
|
+
"./spx-card": {
|
|
60
|
+
"types": "./spx-card/index.d.ts",
|
|
61
|
+
"default": "./fesm2022/softpak-components-spx-card.mjs"
|
|
62
|
+
},
|
|
67
63
|
"./spx-channel-selection": {
|
|
68
64
|
"types": "./spx-channel-selection/index.d.ts",
|
|
69
65
|
"default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
|
|
70
66
|
},
|
|
71
|
-
"./spx-
|
|
72
|
-
"types": "./spx-
|
|
73
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
67
|
+
"./spx-capitalize": {
|
|
68
|
+
"types": "./spx-capitalize/index.d.ts",
|
|
69
|
+
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
74
70
|
},
|
|
75
|
-
"./spx-form-
|
|
76
|
-
"types": "./spx-form-
|
|
77
|
-
"default": "./fesm2022/softpak-components-spx-form-
|
|
71
|
+
"./spx-form-view": {
|
|
72
|
+
"types": "./spx-form-view/index.d.ts",
|
|
73
|
+
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
78
74
|
},
|
|
79
75
|
"./spx-confirm": {
|
|
80
76
|
"types": "./spx-confirm/index.d.ts",
|
|
81
77
|
"default": "./fesm2022/softpak-components-spx-confirm.mjs"
|
|
82
78
|
},
|
|
83
|
-
"./spx-
|
|
84
|
-
"types": "./spx-
|
|
85
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
79
|
+
"./spx-check-digit": {
|
|
80
|
+
"types": "./spx-check-digit/index.d.ts",
|
|
81
|
+
"default": "./fesm2022/softpak-components-spx-check-digit.mjs"
|
|
86
82
|
},
|
|
87
83
|
"./spx-helpers": {
|
|
88
84
|
"types": "./spx-helpers/index.d.ts",
|
|
89
85
|
"default": "./fesm2022/softpak-components-spx-helpers.mjs"
|
|
90
86
|
},
|
|
87
|
+
"./spx-form-section": {
|
|
88
|
+
"types": "./spx-form-section/index.d.ts",
|
|
89
|
+
"default": "./fesm2022/softpak-components-spx-form-section.mjs"
|
|
90
|
+
},
|
|
91
|
+
"./spx-inputs": {
|
|
92
|
+
"types": "./spx-inputs/index.d.ts",
|
|
93
|
+
"default": "./fesm2022/softpak-components-spx-inputs.mjs"
|
|
94
|
+
},
|
|
91
95
|
"./spx-navigation": {
|
|
92
96
|
"types": "./spx-navigation/index.d.ts",
|
|
93
97
|
"default": "./fesm2022/softpak-components-spx-navigation.mjs"
|
|
@@ -96,42 +100,34 @@
|
|
|
96
100
|
"types": "./spx-number-check/index.d.ts",
|
|
97
101
|
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
98
102
|
},
|
|
99
|
-
"./spx-pagination": {
|
|
100
|
-
"types": "./spx-pagination/index.d.ts",
|
|
101
|
-
"default": "./fesm2022/softpak-components-spx-pagination.mjs"
|
|
102
|
-
},
|
|
103
|
-
"./spx-inputs": {
|
|
104
|
-
"types": "./spx-inputs/index.d.ts",
|
|
105
|
-
"default": "./fesm2022/softpak-components-spx-inputs.mjs"
|
|
106
|
-
},
|
|
107
|
-
"./spx-progress-bar": {
|
|
108
|
-
"types": "./spx-progress-bar/index.d.ts",
|
|
109
|
-
"default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
|
|
110
|
-
},
|
|
111
103
|
"./spx-patch": {
|
|
112
104
|
"types": "./spx-patch/index.d.ts",
|
|
113
105
|
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
114
106
|
},
|
|
115
|
-
"./spx-
|
|
116
|
-
"types": "./spx-
|
|
117
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
107
|
+
"./spx-pagination": {
|
|
108
|
+
"types": "./spx-pagination/index.d.ts",
|
|
109
|
+
"default": "./fesm2022/softpak-components-spx-pagination.mjs"
|
|
118
110
|
},
|
|
119
111
|
"./spx-redux": {
|
|
120
112
|
"types": "./spx-redux/index.d.ts",
|
|
121
113
|
"default": "./fesm2022/softpak-components-spx-redux.mjs"
|
|
122
114
|
},
|
|
123
|
-
"./spx-
|
|
124
|
-
"types": "./spx-
|
|
125
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
115
|
+
"./spx-pipes": {
|
|
116
|
+
"types": "./spx-pipes/index.d.ts",
|
|
117
|
+
"default": "./fesm2022/softpak-components-spx-pipes.mjs"
|
|
126
118
|
},
|
|
127
|
-
"./spx-
|
|
128
|
-
"types": "./spx-
|
|
129
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
119
|
+
"./spx-progress-bar": {
|
|
120
|
+
"types": "./spx-progress-bar/index.d.ts",
|
|
121
|
+
"default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
|
|
130
122
|
},
|
|
131
123
|
"./spx-storage": {
|
|
132
124
|
"types": "./spx-storage/index.d.ts",
|
|
133
125
|
"default": "./fesm2022/softpak-components-spx-storage.mjs"
|
|
134
126
|
},
|
|
127
|
+
"./spx-spinner": {
|
|
128
|
+
"types": "./spx-spinner/index.d.ts",
|
|
129
|
+
"default": "./fesm2022/softpak-components-spx-spinner.mjs"
|
|
130
|
+
},
|
|
135
131
|
"./spx-suggestion": {
|
|
136
132
|
"types": "./spx-suggestion/index.d.ts",
|
|
137
133
|
"default": "./fesm2022/softpak-components-spx-suggestion.mjs"
|
|
@@ -140,9 +136,9 @@
|
|
|
140
136
|
"types": "./spx-tabs/index.d.ts",
|
|
141
137
|
"default": "./fesm2022/softpak-components-spx-tabs.mjs"
|
|
142
138
|
},
|
|
143
|
-
"./spx-
|
|
144
|
-
"types": "./spx-
|
|
145
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
139
|
+
"./spx-stock-info": {
|
|
140
|
+
"types": "./spx-stock-info/index.d.ts",
|
|
141
|
+
"default": "./fesm2022/softpak-components-spx-stock-info.mjs"
|
|
146
142
|
},
|
|
147
143
|
"./spx-toggle": {
|
|
148
144
|
"types": "./spx-toggle/index.d.ts",
|
|
@@ -152,21 +148,25 @@
|
|
|
152
148
|
"types": "./spx-translate/index.d.ts",
|
|
153
149
|
"default": "./fesm2022/softpak-components-spx-translate.mjs"
|
|
154
150
|
},
|
|
151
|
+
"./spx-toaster": {
|
|
152
|
+
"types": "./spx-toaster/index.d.ts",
|
|
153
|
+
"default": "./fesm2022/softpak-components-spx-toaster.mjs"
|
|
154
|
+
},
|
|
155
155
|
"./spx-update": {
|
|
156
156
|
"types": "./spx-update/index.d.ts",
|
|
157
157
|
"default": "./fesm2022/softpak-components-spx-update.mjs"
|
|
158
158
|
},
|
|
159
|
-
"./spx-
|
|
160
|
-
"types": "./spx-
|
|
161
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
159
|
+
"./spx-welcome": {
|
|
160
|
+
"types": "./spx-welcome/index.d.ts",
|
|
161
|
+
"default": "./fesm2022/softpak-components-spx-welcome.mjs"
|
|
162
162
|
},
|
|
163
163
|
"./spx-validation": {
|
|
164
164
|
"types": "./spx-validation/index.d.ts",
|
|
165
165
|
"default": "./fesm2022/softpak-components-spx-validation.mjs"
|
|
166
166
|
},
|
|
167
|
-
"./spx-
|
|
168
|
-
"types": "./spx-
|
|
169
|
-
"default": "./fesm2022/softpak-components-spx-
|
|
167
|
+
"./spx-validation-messages": {
|
|
168
|
+
"types": "./spx-validation-messages/index.d.ts",
|
|
169
|
+
"default": "./fesm2022/softpak-components-spx-validation-messages.mjs"
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
}
|
package/spx-button/index.d.ts
CHANGED
|
@@ -15,15 +15,18 @@ declare class SpxButtonComponent {
|
|
|
15
15
|
readonly spxType: _angular_core.InputSignal<"button" | "submit">;
|
|
16
16
|
protected mappedName: _angular_core.Signal<string | undefined>;
|
|
17
17
|
readonly spxName: _angular_core.InputSignal<string | undefined>;
|
|
18
|
-
isPressing: boolean;
|
|
19
18
|
spxClick: _angular_core.OutputEmitterRef<void>;
|
|
20
19
|
buttonRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
21
20
|
SpxSeverity: typeof SpxSeverityEnum;
|
|
21
|
+
private isPressing;
|
|
22
|
+
private lastHaptic;
|
|
23
|
+
private hapticCooldown;
|
|
22
24
|
hasShadowDom: (el: HTMLElement) => boolean;
|
|
23
25
|
handleClick: () => void;
|
|
26
|
+
spxSetFocus(): void;
|
|
24
27
|
handlePress: () => Promise<void>;
|
|
25
28
|
onDocumentPointerUp: (event: PointerEvent) => Promise<void>;
|
|
26
|
-
|
|
29
|
+
private safeHaptic;
|
|
27
30
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpxButtonComponent, never>;
|
|
28
31
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SpxButtonComponent, "spx-button", never, { "spxDisabled": { "alias": "spxDisabled"; "required": false; "isSignal": true; }; "spxClass": { "alias": "spxClass"; "required": false; "isSignal": true; }; "spxClassObject": { "alias": "spxClassObject"; "required": false; "isSignal": true; }; "spxForm": { "alias": "spxForm"; "required": false; "isSignal": true; }; "spxFullHeight": { "alias": "spxFullHeight"; "required": false; "isSignal": true; }; "spxFullWidth": { "alias": "spxFullWidth"; "required": false; "isSignal": true; }; "spxSeverity": { "alias": "spxSeverity"; "required": false; "isSignal": true; }; "spxSize": { "alias": "spxSize"; "required": false; "isSignal": true; }; "spxTabIndex": { "alias": "spxTabIndex"; "required": false; "isSignal": true; }; "spxType": { "alias": "spxType"; "required": false; "isSignal": true; }; "spxName": { "alias": "spxName"; "required": false; "isSignal": true; }; }, { "spxClick": "spxClick"; }, never, ["*"], true, never>;
|
|
29
32
|
}
|
package/spx-update/index.d.ts
CHANGED
|
@@ -141,7 +141,7 @@ declare const hasBeenDownloaded: _ngrx_store.ActionCreator<"[SPX / Update Pendin
|
|
|
141
141
|
declare const hasBeenInstalled: _ngrx_store.ActionCreator<"[SPX / Update Pending] Has been installed", (props: Record<string, unknown>) => Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending] Has been installed">>;
|
|
142
142
|
declare const postpone: _ngrx_store.ActionCreator<"[SPX / Update Pending] Postpone", (props: Record<string, unknown>) => Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending] Postpone">>;
|
|
143
143
|
declare const postponeExpired: _ngrx_store.ActionCreator<"[SPX / Update Pending] Postpone expired", (props: Record<string, unknown>) => Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending] Postpone expired">>;
|
|
144
|
-
declare const all: (Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending]
|
|
144
|
+
declare const all: (Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending] Has been downloaded">) | (Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending] Has been installed">) | (Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending] Postpone">) | (Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending] Postpone expired">) | (Record<string, unknown> & _ngrx_store.Action<"[SPX / Update Pending] Accept update">);
|
|
145
145
|
type Actions = typeof all;
|
|
146
146
|
|
|
147
147
|
type spxUpdatePending_actions_d_Actions = Actions;
|