@softpak/components 20.12.18 → 20.13.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.
@@ -1,8 +1,9 @@
1
- import { NgClass } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { input, computed, output, viewChild, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
2
+ import { input, computed, output, viewChild, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { Haptics, ImpactStyle } from '@capacitor/haptics';
5
4
  import { IsSeverityPipe } from '@softpak/components/spx-pipes';
5
+ import { NgClass } from '@angular/common';
6
+ import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
6
7
 
7
8
  class SpxButtonComponent {
8
9
  constructor() {
@@ -18,6 +19,7 @@ class SpxButtonComponent {
18
19
  this.spxType = input('submit', ...(ngDevMode ? [{ debugName: "spxType" }] : []));
19
20
  this.mappedName = computed(() => this.spxName() ?? undefined, ...(ngDevMode ? [{ debugName: "mappedName" }] : []));
20
21
  this.spxName = input(...(ngDevMode ? [undefined, { debugName: "spxName" }] : []));
22
+ this.isPressing = false;
21
23
  this.spxClick = output();
22
24
  this.buttonRef = viewChild('buttonRef', ...(ngDevMode ? [{ debugName: "buttonRef" }] : []));
23
25
  this.SpxSeverity = SpxSeverityEnum;
@@ -29,12 +31,49 @@ class SpxButtonComponent {
29
31
  this.spxClick.emit();
30
32
  }
31
33
  };
34
+ this.handlePress = async () => {
35
+ if (this.spxDisabled()) {
36
+ return;
37
+ }
38
+ this.isPressing = true;
39
+ try {
40
+ await Haptics.impact({ style: ImpactStyle.Medium });
41
+ }
42
+ catch {
43
+ // silence if haptics is not available
44
+ }
45
+ };
46
+ // global pointerup: check of de release binnen of buiten de knop is
47
+ this.onDocumentPointerUp = async (event) => {
48
+ if (!this.isPressing || this.spxDisabled()) {
49
+ return;
50
+ }
51
+ this.isPressing = false;
52
+ const btn = this.buttonRef()?.nativeElement;
53
+ if (!btn) {
54
+ return;
55
+ }
56
+ const inside = btn.contains(event.target);
57
+ try {
58
+ if (inside) {
59
+ // OK haptic
60
+ await Haptics.impact({ style: ImpactStyle.Heavy });
61
+ }
62
+ else {
63
+ // Cancel haptic
64
+ await Haptics.impact({ style: ImpactStyle.Light });
65
+ }
66
+ }
67
+ catch {
68
+ // ignore
69
+ }
70
+ };
32
71
  }
33
72
  spxSetFocus() {
34
73
  this.buttonRef()?.nativeElement?.focus();
35
74
  }
36
75
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: SpxButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
37
- 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: { 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 (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 }); }
76
+ 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 }); }
38
77
  }
39
78
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: SpxButtonComponent, decorators: [{
40
79
  type: Component,
@@ -42,8 +81,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
42
81
  '[class.block]': 'spxFullWidth()',
43
82
  '[class.h-full]': 'spxFullHeight()',
44
83
  '[class.w-full]': 'spxFullWidth()',
45
- }, standalone: true, 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 (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>" }]
46
- }] });
84
+ }, standalone: true, 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>" }]
85
+ }], propDecorators: { onDocumentPointerUp: [{
86
+ type: HostListener,
87
+ args: ['document:pointerup', ['$event']]
88
+ }] } });
47
89
 
48
90
  /**
49
91
  * Generated bundle index. Do not edit.
@@ -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 { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { IsSeverityPipe } from '@softpak/components/spx-pipes';\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 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","<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 (click)=\"this.handleClick()\"\n part=\"button\">\n <ng-content></ng-content>\n </button>","/**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js","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,EAAA,SAAA,EAAA,eAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA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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;;;;"}
@@ -6,6 +6,7 @@ const spxCreateApiActions = () => {
6
6
  Load: props(),
7
7
  Received: props(),
8
8
  Reset: emptyProps(),
9
+ NoResults: emptyProps(),
9
10
  };
10
11
  };
11
12
 
@@ -21,6 +22,7 @@ function spxCreateApiReducer(actions, initialState) {
21
22
  error: null,
22
23
  loading: false,
23
24
  loaded: true,
25
+ noResults: false,
24
26
  query: state.queryNext,
25
27
  queryNext: null,
26
28
  })), on(actions.error, (state, { error }) => ({
@@ -29,6 +31,16 @@ function spxCreateApiReducer(actions, initialState) {
29
31
  data: null,
30
32
  loading: false,
31
33
  loaded: false,
34
+ noResults: false,
35
+ query: state.queryNext,
36
+ queryNext: null,
37
+ })), on(actions.noResults, (state) => ({
38
+ ...state,
39
+ error: null,
40
+ data: null,
41
+ loading: false,
42
+ loaded: true,
43
+ noResults: true,
32
44
  query: state.queryNext,
33
45
  queryNext: null,
34
46
  })), on(actions.reset, () => initialState));
@@ -39,6 +51,7 @@ const spxCreateInitialStateForReducer = () => ({
39
51
  error: null,
40
52
  loading: false,
41
53
  loaded: false,
54
+ noResults: false,
42
55
  query: null,
43
56
  queryNext: null,
44
57
  });
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-redux.mjs","sources":["../../../../projects/softpak/components/spx-redux/src/spx-create-api-actions.ts","../../../../projects/softpak/components/spx-redux/src/spx-create-api-reducer.ts","../../../../projects/softpak/components/spx-redux/src/spx-create-initial-state.ts","../../../../projects/softpak/components/spx-redux/softpak-components-spx-redux.ts"],"sourcesContent":["import { ActionCreator, emptyProps, props } from \"@ngrx/store\";\n\nexport type WithProps<P extends object> = ActionCreator<string, (props: P) => P>;\nexport type WithoutProps = ActionCreator<string, () => object>;\n\nexport const spxCreateApiActions = <TQuery, TResult, TMsg = string>() => {\n return {\n Error: props<{ error: TMsg }>(),\n Load: props<{ query: TQuery }>(),\n Received: props<{ result: TResult }>(),\n Reset: emptyProps(),\n };\n}","import { WithProps, WithoutProps } from \"./spx-create-api-actions\";\nimport { createReducer, on } from \"@ngrx/store\";\n\nimport { SpxState } from \"./spx-state.interface\";\n\nexport interface SpxApiActions<TQuery, TData, TError> {\n error: WithProps<{ error: TError }>;\n load: WithProps<{ query: TQuery }>;\n received: WithProps<{ result: TData }>;\n reset: WithoutProps;\n}\n\nexport function spxCreateApiReducer<TQuery, TData, TError>(\n actions: SpxApiActions<TQuery, TData, TError>,\n initialState: SpxState<TQuery, TData, TError>,\n) {\n return createReducer(\n initialState,\n\n on(actions.load, (state: SpxState<TQuery, TData, TError>, { query }): SpxState<TQuery, TData, TError> => ({\n ...state,\n loading: true,\n loaded: false,\n queryNext: query,\n })),\n\n on(actions.received, (state: SpxState<TQuery, TData, TError>, { result }): SpxState<TQuery, TData, TError> => ({\n ...state,\n data: result as TData,\n error: null,\n loading: false,\n loaded: true,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.error, (state: SpxState<TQuery, TData, TError>, { error }): SpxState<TQuery, TData, TError> => ({\n ...state,\n error,\n data: null,\n loading: false,\n loaded: false,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.reset, (): SpxState<TQuery, TData, TError> => initialState)\n );\n}","import { SpxState } from \"./spx-state.interface\";\n\nexport const spxCreateInitialStateForReducer = <TQuery, TData, TError>(): SpxState<TQuery, TData, TError> => ({\n data: null,\n error: null,\n loading: false,\n loaded: false,\n query: null,\n queryNext: null,\n});\n","/**\n * Generated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;AACH;;AC9CO,MAAM,+BAA+B,GAAG,OAA+D;AAC5G,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,SAAS,EAAE,IAAI;AAChB,CAAA;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-redux.mjs","sources":["../../../../projects/softpak/components/spx-redux/src/spx-create-api-actions.ts","../../../../projects/softpak/components/spx-redux/src/spx-create-api-reducer.ts","../../../../projects/softpak/components/spx-redux/src/spx-create-initial-state.ts","../../../../projects/softpak/components/spx-redux/softpak-components-spx-redux.ts"],"sourcesContent":["import { ActionCreator, emptyProps, props } from \"@ngrx/store\";\n\nexport type WithProps<P extends object> = ActionCreator<string, (props: P) => P>;\nexport type WithoutProps = ActionCreator<string, () => object>;\n\nexport const spxCreateApiActions = <TQuery, TResult, TMsg = string>() => {\n return {\n Error: props<{ error: TMsg }>(),\n Load: props<{ query: TQuery }>(),\n Received: props<{ result: TResult }>(),\n Reset: emptyProps(),\n NoResults: emptyProps(),\n };\n}","import { WithProps, WithoutProps } from \"./spx-create-api-actions\";\nimport { createReducer, on } from \"@ngrx/store\";\n\nimport { SpxState } from \"./spx-state.interface\";\n\nexport interface SpxApiActions<TQuery, TData, TError> {\n error: WithProps<{ error: TError }>;\n load: WithProps<{ query: TQuery }>;\n noResults: WithoutProps;\n received: WithProps<{ result: TData }>;\n reset: WithoutProps;\n}\n\nexport function spxCreateApiReducer<TQuery, TData, TError>(\n actions: SpxApiActions<TQuery, TData, TError>,\n initialState: SpxState<TQuery, TData, TError>,\n) {\n return createReducer(\n initialState,\n\n on(actions.load, (state: SpxState<TQuery, TData, TError>, { query }): SpxState<TQuery, TData, TError> => ({\n ...state,\n loading: true,\n loaded: false,\n queryNext: query,\n })),\n\n on(actions.received, (state: SpxState<TQuery, TData, TError>, { result }): SpxState<TQuery, TData, TError> => ({\n ...state,\n data: result as TData,\n error: null,\n loading: false,\n loaded: true,\n noResults: false,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.error, (state: SpxState<TQuery, TData, TError>, { error }): SpxState<TQuery, TData, TError> => ({\n ...state,\n error,\n data: null,\n loading: false,\n loaded: false,\n noResults: false,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.noResults, (state: SpxState<TQuery, TData, TError>): SpxState<TQuery, TData, TError> => ({\n ...state,\n error: null,\n data: null,\n loading: false,\n loaded: true,\n noResults: true,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.reset, (): SpxState<TQuery, TData, TError> => initialState)\n );\n}","import { SpxState } from \"./spx-state.interface\";\n\nexport const spxCreateInitialStateForReducer = <TQuery, TData, TError>(): SpxState<TQuery, TData, TError> => ({\n data: null,\n error: null,\n loading: false,\n loaded: false,\n noResults: false,\n query: null,\n queryNext: null,\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAKO,MAAM,mBAAmB,GAAG,MAAqC;IACtE,OAAO;QACL,KAAK,EAAE,KAAK,EAAmB;QAC/B,IAAI,EAAE,KAAK,EAAqB;QAChC,QAAQ,EAAE,KAAK,EAAuB;QACtC,KAAK,EAAE,UAAU,EAAE;QACnB,SAAS,EAAE,UAAU,EAAE;KACxB;AACH;;ACAM,SAAU,mBAAmB,CACjC,OAA6C,EAC7C,YAA6C,EAAA;AAE7C,IAAA,OAAO,aAAa,CAClB,YAAY,EAEZ,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAsC,EAAE,EAAE,KAAK,EAAE,MAAuC;AACxG,QAAA,GAAG,KAAK;AACR,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,SAAS,EAAE,KAAK;AACjB,KAAA,CAAC,CAAC,EAEH,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAA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ACX,IAAA,SAAS,EAAE,IAAI;AAChB,CAAA;;ACVD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softpak/components",
3
- "version": "20.12.18",
3
+ "version": "20.13.0",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "20.x.x",
@@ -40,10 +40,6 @@
40
40
  "types": "./spx-alert/index.d.ts",
41
41
  "default": "./fesm2022/softpak-components-spx-alert.mjs"
42
42
  },
43
- "./spx-app-configuration": {
44
- "types": "./spx-app-configuration/index.d.ts",
45
- "default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
46
- },
47
43
  "./spx-button": {
48
44
  "types": "./spx-button/index.d.ts",
49
45
  "default": "./fesm2022/softpak-components-spx-button.mjs"
@@ -52,38 +48,42 @@
52
48
  "types": "./spx-capitalize/index.d.ts",
53
49
  "default": "./fesm2022/softpak-components-spx-capitalize.mjs"
54
50
  },
51
+ "./spx-app-configuration": {
52
+ "types": "./spx-app-configuration/index.d.ts",
53
+ "default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
54
+ },
55
+ "./spx-app-expiry": {
56
+ "types": "./spx-app-expiry/index.d.ts",
57
+ "default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
58
+ },
55
59
  "./spx-card": {
56
60
  "types": "./spx-card/index.d.ts",
57
61
  "default": "./fesm2022/softpak-components-spx-card.mjs"
58
62
  },
59
- "./spx-change-details": {
60
- "types": "./spx-change-details/index.d.ts",
61
- "default": "./fesm2022/softpak-components-spx-change-details.mjs"
62
- },
63
63
  "./spx-channel-selection": {
64
64
  "types": "./spx-channel-selection/index.d.ts",
65
65
  "default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
66
66
  },
67
+ "./spx-change-details": {
68
+ "types": "./spx-change-details/index.d.ts",
69
+ "default": "./fesm2022/softpak-components-spx-change-details.mjs"
70
+ },
67
71
  "./spx-check-digit": {
68
72
  "types": "./spx-check-digit/index.d.ts",
69
73
  "default": "./fesm2022/softpak-components-spx-check-digit.mjs"
70
74
  },
71
- "./spx-app-expiry": {
72
- "types": "./spx-app-expiry/index.d.ts",
73
- "default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
74
- },
75
75
  "./spx-confirm": {
76
76
  "types": "./spx-confirm/index.d.ts",
77
77
  "default": "./fesm2022/softpak-components-spx-confirm.mjs"
78
78
  },
79
- "./spx-form-view": {
80
- "types": "./spx-form-view/index.d.ts",
81
- "default": "./fesm2022/softpak-components-spx-form-view.mjs"
82
- },
83
79
  "./spx-form-section": {
84
80
  "types": "./spx-form-section/index.d.ts",
85
81
  "default": "./fesm2022/softpak-components-spx-form-section.mjs"
86
82
  },
83
+ "./spx-form-view": {
84
+ "types": "./spx-form-view/index.d.ts",
85
+ "default": "./fesm2022/softpak-components-spx-form-view.mjs"
86
+ },
87
87
  "./spx-helpers": {
88
88
  "types": "./spx-helpers/index.d.ts",
89
89
  "default": "./fesm2022/softpak-components-spx-helpers.mjs"
@@ -96,6 +96,10 @@
96
96
  "types": "./spx-navigation/index.d.ts",
97
97
  "default": "./fesm2022/softpak-components-spx-navigation.mjs"
98
98
  },
99
+ "./spx-number-check": {
100
+ "types": "./spx-number-check/index.d.ts",
101
+ "default": "./fesm2022/softpak-components-spx-number-check.mjs"
102
+ },
99
103
  "./spx-pagination": {
100
104
  "types": "./spx-pagination/index.d.ts",
101
105
  "default": "./fesm2022/softpak-components-spx-pagination.mjs"
@@ -108,26 +112,22 @@
108
112
  "types": "./spx-pipes/index.d.ts",
109
113
  "default": "./fesm2022/softpak-components-spx-pipes.mjs"
110
114
  },
111
- "./spx-number-check": {
112
- "types": "./spx-number-check/index.d.ts",
113
- "default": "./fesm2022/softpak-components-spx-number-check.mjs"
114
- },
115
- "./spx-spinner": {
116
- "types": "./spx-spinner/index.d.ts",
117
- "default": "./fesm2022/softpak-components-spx-spinner.mjs"
115
+ "./spx-progress-bar": {
116
+ "types": "./spx-progress-bar/index.d.ts",
117
+ "default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
118
118
  },
119
119
  "./spx-redux": {
120
120
  "types": "./spx-redux/index.d.ts",
121
121
  "default": "./fesm2022/softpak-components-spx-redux.mjs"
122
122
  },
123
- "./spx-progress-bar": {
124
- "types": "./spx-progress-bar/index.d.ts",
125
- "default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
126
- },
127
123
  "./spx-stock-info": {
128
124
  "types": "./spx-stock-info/index.d.ts",
129
125
  "default": "./fesm2022/softpak-components-spx-stock-info.mjs"
130
126
  },
127
+ "./spx-spinner": {
128
+ "types": "./spx-spinner/index.d.ts",
129
+ "default": "./fesm2022/softpak-components-spx-spinner.mjs"
130
+ },
131
131
  "./spx-storage": {
132
132
  "types": "./spx-storage/index.d.ts",
133
133
  "default": "./fesm2022/softpak-components-spx-storage.mjs"
@@ -140,6 +140,10 @@
140
140
  "types": "./spx-tabs/index.d.ts",
141
141
  "default": "./fesm2022/softpak-components-spx-tabs.mjs"
142
142
  },
143
+ "./spx-toaster": {
144
+ "types": "./spx-toaster/index.d.ts",
145
+ "default": "./fesm2022/softpak-components-spx-toaster.mjs"
146
+ },
143
147
  "./spx-toggle": {
144
148
  "types": "./spx-toggle/index.d.ts",
145
149
  "default": "./fesm2022/softpak-components-spx-toggle.mjs"
@@ -152,10 +156,6 @@
152
156
  "types": "./spx-update/index.d.ts",
153
157
  "default": "./fesm2022/softpak-components-spx-update.mjs"
154
158
  },
155
- "./spx-toaster": {
156
- "types": "./spx-toaster/index.d.ts",
157
- "default": "./fesm2022/softpak-components-spx-toaster.mjs"
158
- },
159
159
  "./spx-validation": {
160
160
  "types": "./spx-validation/index.d.ts",
161
161
  "default": "./fesm2022/softpak-components-spx-validation.mjs"
@@ -1,4 +1,4 @@
1
- import * as _fortawesome_free_solid_svg_icons from '@fortawesome/free-solid-svg-icons';
1
+ import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
4
4
 
@@ -12,10 +12,10 @@ declare class SpxAlertComponent {
12
12
  readonly spxMarginTop: _angular_core.InputSignal<boolean>;
13
13
  readonly spxSeverity: _angular_core.InputSignal<SpxSeverityEnum | undefined>;
14
14
  SpxSeverity: typeof SpxSeverityEnum;
15
- faCheck: _fortawesome_free_solid_svg_icons.IconDefinition;
16
- faCircleInfo: _fortawesome_free_solid_svg_icons.IconDefinition;
17
- faTriangleExclamation: _fortawesome_free_solid_svg_icons.IconDefinition;
18
- faTimes: _fortawesome_free_solid_svg_icons.IconDefinition;
15
+ faCheck: _fortawesome_fontawesome_common_types.IconDefinition;
16
+ faCircleInfo: _fortawesome_fontawesome_common_types.IconDefinition;
17
+ faTriangleExclamation: _fortawesome_fontawesome_common_types.IconDefinition;
18
+ faTimes: _fortawesome_fontawesome_common_types.IconDefinition;
19
19
  componentDidLoad(): void;
20
20
  private prepareAutoClose;
21
21
  private _assignDefaultTitle;
@@ -15,11 +15,14 @@ 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;
18
19
  spxClick: _angular_core.OutputEmitterRef<void>;
19
20
  buttonRef: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
20
21
  SpxSeverity: typeof SpxSeverityEnum;
21
22
  hasShadowDom: (el: HTMLElement) => boolean;
22
23
  handleClick: () => void;
24
+ handlePress: () => Promise<void>;
25
+ onDocumentPointerUp: (event: PointerEvent) => Promise<void>;
23
26
  spxSetFocus(): void;
24
27
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpxButtonComponent, never>;
25
28
  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>;
@@ -1,4 +1,4 @@
1
- import * as _fortawesome_free_solid_svg_icons from '@fortawesome/free-solid-svg-icons';
1
+ import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
2
2
  import * as i0 from '@angular/core';
3
3
  import { OnInit, OnDestroy } from '@angular/core';
4
4
  import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
@@ -11,7 +11,7 @@ declare class SpxConfirmComponent {
11
11
  id: i0.InputSignal<string>;
12
12
  spxCancel: i0.OutputEmitterRef<string>;
13
13
  spxConfirm: i0.OutputEmitterRef<string>;
14
- faTimes: _fortawesome_free_solid_svg_icons.IconDefinition;
14
+ faTimes: _fortawesome_fontawesome_common_types.IconDefinition;
15
15
  severityError: SpxSeverityEnum;
16
16
  severityInfo: SpxSeverityEnum;
17
17
  severitySuccess: SpxSeverityEnum;
@@ -1,6 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ElementRef, ChangeDetectorRef, EventEmitter, QueryList, OnInit, SimpleChanges } from '@angular/core';
3
- import * as _fortawesome_free_solid_svg_icons from '@fortawesome/free-solid-svg-icons';
3
+ import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
4
4
  import { Observable } from 'rxjs';
5
5
  import { SpxSeverityEnum, SpxInputAlertI as SpxInputAlertI$1 } from '@softpak/components/spx-helpers';
6
6
  import { ModalController } from '@ionic/angular/standalone';
@@ -28,10 +28,10 @@ interface SpxInputAlertI {
28
28
 
29
29
  declare class SpxInputBoxComponent {
30
30
  selectedInputService: SelectedInputService;
31
- faEdit: _fortawesome_free_solid_svg_icons.IconDefinition;
32
- faSearch: _fortawesome_free_solid_svg_icons.IconDefinition;
33
- faQuestion: _fortawesome_free_solid_svg_icons.IconDefinition;
34
- faTimes: _fortawesome_free_solid_svg_icons.IconDefinition;
31
+ faEdit: _fortawesome_fontawesome_common_types.IconDefinition;
32
+ faSearch: _fortawesome_fontawesome_common_types.IconDefinition;
33
+ faQuestion: _fortawesome_fontawesome_common_types.IconDefinition;
34
+ faTimes: _fortawesome_fontawesome_common_types.IconDefinition;
35
35
  SpxSeverity: typeof SpxSeverityEnum;
36
36
  clearButtonName: _angular_core.Signal<string | undefined>;
37
37
  searchButtonName: _angular_core.Signal<string | undefined>;
@@ -14,6 +14,7 @@ declare const spxCreateApiActions: <TQuery, TResult, TMsg = string>() => {
14
14
  result: TResult;
15
15
  }>;
16
16
  Reset: _ngrx_store.ActionCreatorProps<void>;
17
+ NoResults: _ngrx_store.ActionCreatorProps<void>;
17
18
  };
18
19
 
19
20
  interface SpxState<TQuery, TData, TError> {
@@ -21,6 +22,7 @@ interface SpxState<TQuery, TData, TError> {
21
22
  error: TError | null;
22
23
  loading: boolean;
23
24
  loaded: boolean;
25
+ noResults: boolean;
24
26
  queryNext: TQuery | null;
25
27
  query: TQuery | null;
26
28
  }
@@ -32,6 +34,7 @@ interface SpxApiActions<TQuery, TData, TError> {
32
34
  load: WithProps<{
33
35
  query: TQuery;
34
36
  }>;
37
+ noResults: WithoutProps;
35
38
  received: WithProps<{
36
39
  result: TData;
37
40
  }>;