@sneat/components 0.26.0 → 0.26.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.
Files changed (41) hide show
  1. package/esm2022/lib/app-version/app-version.component.js +6 -6
  2. package/esm2022/lib/app-version/app-version.component.js.map +1 -1
  3. package/esm2022/lib/card-list/sneat-card-list.component.js +15 -16
  4. package/esm2022/lib/card-list/sneat-card-list.component.js.map +1 -1
  5. package/esm2022/lib/copyright/copyright.component.js +5 -5
  6. package/esm2022/lib/copyright/copyright.component.js.map +1 -1
  7. package/esm2022/lib/country-input/country-input.component.js +18 -18
  8. package/esm2022/lib/country-input/country-input.component.js.map +1 -1
  9. package/esm2022/lib/country-selector/countries-loader.service.js +5 -4
  10. package/esm2022/lib/country-selector/countries-loader.service.js.map +1 -1
  11. package/esm2022/lib/country-selector/country-selector.component.js +34 -32
  12. package/esm2022/lib/country-selector/country-selector.component.js.map +1 -1
  13. package/esm2022/lib/country-selector/country-selector.service.js +3 -3
  14. package/esm2022/lib/date-input/date-input.component.js +24 -15
  15. package/esm2022/lib/date-input/date-input.component.js.map +1 -1
  16. package/esm2022/lib/date-input/date-modal.component.js +14 -13
  17. package/esm2022/lib/date-input/date-modal.component.js.map +1 -1
  18. package/esm2022/lib/dialog-header/dialog-header.component.js +9 -10
  19. package/esm2022/lib/dialog-header/dialog-header.component.js.map +1 -1
  20. package/esm2022/lib/error-card/sneat-error-card.component.js +6 -6
  21. package/esm2022/lib/error-card/sneat-error-card.component.js.map +1 -1
  22. package/esm2022/lib/filter-item/filter-item.component.js +6 -5
  23. package/esm2022/lib/filter-item/filter-item.component.js.map +1 -1
  24. package/esm2022/lib/pipes/country-emoji.pipe.js +6 -6
  25. package/esm2022/lib/pipes/decimal64p2.pipe.js +6 -6
  26. package/esm2022/lib/pipes/gender.pipes.js +9 -9
  27. package/esm2022/lib/pipes/long-month-name.pipe.js +3 -3
  28. package/esm2022/lib/pipes/short-month-name.pipe.js +3 -3
  29. package/esm2022/lib/pipes/team-emoji.pipe.js +3 -3
  30. package/esm2022/lib/user-country/user-country.component.js +22 -17
  31. package/esm2022/lib/user-country/user-country.component.js.map +1 -1
  32. package/lib/card-list/sneat-card-list.component.d.ts +5 -5
  33. package/lib/country-input/country-input.component.d.ts +4 -4
  34. package/lib/country-selector/country-selector.component.d.ts +6 -6
  35. package/lib/date-input/date-input.component.d.ts +1 -1
  36. package/lib/date-input/date-modal.component.d.ts +3 -3
  37. package/lib/dialog-header/dialog-header.component.d.ts +2 -2
  38. package/lib/user-country/user-country.component.d.ts +2 -2
  39. package/package.json +6 -5
  40. package/src/sneat-styles.scss +10 -10
  41. package/tsconfig.lib.prod.tsbuildinfo +1 -1
@@ -1,6 +1,6 @@
1
- import { Component, computed, EventEmitter, inject, Input, Output, signal, } from '@angular/core';
1
+ import { Component, computed, EventEmitter, inject, Input, Output, signal, ChangeDetectionStrategy, input } from '@angular/core';
2
2
  import { FormsModule } from '@angular/forms';
3
- import { IonButton, IonItem, IonLabel, IonSegment, IonSegmentButton, } from '@ionic/angular/standalone';
3
+ import { IonButton, IonItem, IonLabel, IonSegment, IonSegmentButton, } from '@ionic/angular';
4
4
  import { SelectFromListComponent } from '@sneat/ui';
5
5
  import { CountriesLoaderService } from './countries-loader.service';
6
6
  import * as i0 from "@angular/core";
@@ -14,15 +14,25 @@ export class CountrySelectorComponent {
14
14
  { id: 'Americas' },
15
15
  { id: 'Africa' },
16
16
  ];
17
- this.readonly = false;
18
- this.disabled = false;
19
- this.label = 'search';
20
- this.canBeUnknown = false;
17
+ this.defaultCountryID = input(/* @ts-ignore */
18
+ ...(ngDevMode ? [undefined, { debugName: "defaultCountryID" }] : /* istanbul ignore next */ []));
19
+ this.readonly = input(false, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
21
+ this.disabled = input(false, /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
23
+ this.label = input('search', /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
25
+ this.canBeUnknown = input(false, /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "canBeUnknown" }] : /* istanbul ignore next */ []));
21
27
  this.countryIDChange = new EventEmitter();
22
- this.filter = signal('', ...(ngDevMode ? [{ debugName: "filter" }] : []));
23
- this.geoRegion = signal('All', ...(ngDevMode ? [{ debugName: "geoRegion" }] : []));
24
- this.allCountries = signal([], ...(ngDevMode ? [{ debugName: "allCountries" }] : []));
25
- this.unknownCountry = signal(undefined, ...(ngDevMode ? [{ debugName: "unknownCountry" }] : []));
28
+ this.filter = signal('', /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
30
+ this.geoRegion = signal('All', /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "geoRegion" }] : /* istanbul ignore next */ []));
32
+ this.allCountries = signal([], /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "allCountries" }] : /* istanbul ignore next */ []));
34
+ this.unknownCountry = signal(undefined, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "unknownCountry" }] : /* istanbul ignore next */ []));
26
36
  // True when the country list failed to load — surfaced in the UI with a Retry.
27
37
  this.loadFailed = this.countriesLoader.loadFailed;
28
38
  this.countries = computed(() => {
@@ -38,11 +48,12 @@ export class CountrySelectorComponent {
38
48
  (c.geoRegions.includes('North America') ||
39
49
  c.geoRegions.includes('South America'))) ||
40
50
  c.geoRegions.includes(this.geoRegion()));
41
- if (this.canBeUnknown && this.unknownCountry()) {
51
+ if (this.canBeUnknown() && this.unknownCountry()) {
42
52
  countriesToShow = [...countriesToShow, this.unknownCountry()];
43
53
  }
44
54
  return countriesToShow;
45
- }, ...(ngDevMode ? [{ debugName: "countries" }] : []));
55
+ }, /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "countries" }] : /* istanbul ignore next */ []));
46
57
  this.filterCountryByCode = (item, filter) => {
47
58
  const f = filter.trim().toUpperCase();
48
59
  const c = item;
@@ -72,26 +83,27 @@ export class CountrySelectorComponent {
72
83
  this.filter.set(filter);
73
84
  }
74
85
  ngOnChanges(changes) {
75
- if (changes['country'] && this.countryID === '--' && !this.canBeUnknown) {
86
+ if (changes['country'] && this.countryID === '--' && !this.canBeUnknown()) {
76
87
  this.countryID = undefined;
77
88
  }
89
+ const defaultCountryID = this.defaultCountryID();
78
90
  if (changes['defaultCountryID'] &&
79
91
  !this.countryID &&
80
- this.defaultCountryID &&
81
- this.defaultCountryID !== '--') {
82
- this.countryID = this.defaultCountryID;
92
+ defaultCountryID &&
93
+ defaultCountryID !== '--') {
94
+ this.countryID = defaultCountryID;
83
95
  this.countryIDChange.emit(this.countryID);
84
96
  }
85
97
  }
86
98
  onRegionChanged(event) {
87
99
  this.geoRegion.set(event.detail.value);
88
100
  }
89
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CountrySelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: CountrySelectorComponent, isStandalone: true, selector: "sneat-country-selector", inputs: { countryID: "countryID", defaultCountryID: "defaultCountryID", readonly: "readonly", disabled: "disabled", label: "label", canBeUnknown: "canBeUnknown" }, outputs: { countryIDChange: "countryIDChange" }, usesOnChanges: true, ngImport: i0, template: "@if (loadFailed()) {\n <ion-item color=\"danger\" lines=\"none\">\n <ion-label class=\"ion-text-wrap\">\n Couldn't load the list of countries. Check your connection and try again.\n </ion-label>\n <ion-button slot=\"end\" fill=\"clear\" (click)=\"retry()\">Retry</ion-button>\n </ion-item>\n}\n\n<sneat-select-from-list\n [value]=\"countryID || ''\"\n [isFilterable]=\"true\"\n [filterLabel]=\"label\"\n [label]=\"label\"\n [items]=\"countries()\"\n [(ngModel)]=\"countryID\"\n (ngModelChange)=\"onChanged()\"\n [isReadonly]=\"readonly\"\n [filterItem]=\"filterCountryByCode\"\n (filterChanged)=\"onFilterChanged($event)\"\n labelPlacement=\"start\"\n>\n @if (!countryID && !filter()) {\n <ion-segment [(ngModel)]=\"geoRegion\" (ionChange)=\"onRegionChanged($event)\">\n <ion-segment-button value=\"All\">All</ion-segment-button>\n @for (region of geoRegions; track region.id) {\n <ion-segment-button [value]=\"region.id\">\n <small>{{ region.id }}</small>\n </ion-segment-button>\n }\n </ion-segment>\n }\n</sneat-select-from-list>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SelectFromListComponent, selector: "sneat-select-from-list", inputs: ["value", "filterLabel", "label", "listLabel", "listLabelColor", "isFilterable", "isLoading", "items", "items$", "lastItemLines", "labelPlacement", "justify", "other", "canAdd", "filterItem", "selectMode", "isReadonly", "$isProcessing", "sortBy"], outputs: ["valueChange", "filterChanged"] }, { kind: "component", type: IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: IonSegmentButton, selector: "ion-segment-button", inputs: ["contentId", "disabled", "layout", "mode", "type", "value"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }] }); }
101
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CountrySelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
102
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: CountrySelectorComponent, isStandalone: true, selector: "sneat-country-selector", inputs: { countryID: { classPropertyName: "countryID", publicName: "countryID", isSignal: false, isRequired: true, transformFunction: null }, defaultCountryID: { classPropertyName: "defaultCountryID", publicName: "defaultCountryID", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, canBeUnknown: { classPropertyName: "canBeUnknown", publicName: "canBeUnknown", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { countryIDChange: "countryIDChange" }, usesOnChanges: true, ngImport: i0, template: "@if (loadFailed()) {\n <ion-item color=\"danger\" lines=\"none\">\n <ion-label class=\"ion-text-wrap\">\n Couldn't load the list of countries. Check your connection and try again.\n </ion-label>\n <ion-button slot=\"end\" fill=\"clear\" (click)=\"retry()\">Retry</ion-button>\n </ion-item>\n}\n\n<sneat-select-from-list\n [value]=\"countryID || ''\"\n [isFilterable]=\"true\"\n [filterLabel]=\"label()\"\n [label]=\"label()\"\n [items]=\"countries()\"\n [(ngModel)]=\"countryID\"\n (ngModelChange)=\"onChanged()\"\n [isReadonly]=\"readonly()\"\n [filterItem]=\"filterCountryByCode\"\n (filterChanged)=\"onFilterChanged($event)\"\n labelPlacement=\"start\"\n>\n @if (!countryID && !filter()) {\n <ion-segment [(ngModel)]=\"geoRegion\" (ionChange)=\"onRegionChanged($event)\">\n <ion-segment-button value=\"All\">All</ion-segment-button>\n @for (region of geoRegions; track region.id) {\n <ion-segment-button [value]=\"region.id\">\n <small>{{ region.id }}</small>\n </ion-segment-button>\n }\n </ion-segment>\n }\n</sneat-select-from-list>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SelectFromListComponent, selector: "sneat-select-from-list", inputs: ["value", "filterLabel", "label", "listLabel", "listLabelColor", "isFilterable", "isLoading", "items", "items$", "lastItemLines", "labelPlacement", "justify", "other", "canAdd", "filterItem", "selectMode", "isReadonly", "$isProcessing", "sortBy"], outputs: ["valueChange", "filterChanged"] }, { kind: "component", type: IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: IonSegmentButton, selector: "ion-segment-button", inputs: ["contentId", "disabled", "layout", "mode", "type", "value"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"], outputs: ["ionFocus", "ionBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
91
103
  }
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CountrySelectorComponent, decorators: [{
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CountrySelectorComponent, decorators: [{
93
105
  type: Component,
94
- args: [{ selector: 'sneat-country-selector', imports: [
106
+ args: [{ selector: 'sneat-country-selector', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
95
107
  FormsModule,
96
108
  SelectFromListComponent,
97
109
  IonSegment,
@@ -99,21 +111,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
99
111
  IonItem,
100
112
  IonLabel,
101
113
  IonButton,
102
- ], template: "@if (loadFailed()) {\n <ion-item color=\"danger\" lines=\"none\">\n <ion-label class=\"ion-text-wrap\">\n Couldn't load the list of countries. Check your connection and try again.\n </ion-label>\n <ion-button slot=\"end\" fill=\"clear\" (click)=\"retry()\">Retry</ion-button>\n </ion-item>\n}\n\n<sneat-select-from-list\n [value]=\"countryID || ''\"\n [isFilterable]=\"true\"\n [filterLabel]=\"label\"\n [label]=\"label\"\n [items]=\"countries()\"\n [(ngModel)]=\"countryID\"\n (ngModelChange)=\"onChanged()\"\n [isReadonly]=\"readonly\"\n [filterItem]=\"filterCountryByCode\"\n (filterChanged)=\"onFilterChanged($event)\"\n labelPlacement=\"start\"\n>\n @if (!countryID && !filter()) {\n <ion-segment [(ngModel)]=\"geoRegion\" (ionChange)=\"onRegionChanged($event)\">\n <ion-segment-button value=\"All\">All</ion-segment-button>\n @for (region of geoRegions; track region.id) {\n <ion-segment-button [value]=\"region.id\">\n <small>{{ region.id }}</small>\n </ion-segment-button>\n }\n </ion-segment>\n }\n</sneat-select-from-list>\n" }]
114
+ ], template: "@if (loadFailed()) {\n <ion-item color=\"danger\" lines=\"none\">\n <ion-label class=\"ion-text-wrap\">\n Couldn't load the list of countries. Check your connection and try again.\n </ion-label>\n <ion-button slot=\"end\" fill=\"clear\" (click)=\"retry()\">Retry</ion-button>\n </ion-item>\n}\n\n<sneat-select-from-list\n [value]=\"countryID || ''\"\n [isFilterable]=\"true\"\n [filterLabel]=\"label()\"\n [label]=\"label()\"\n [items]=\"countries()\"\n [(ngModel)]=\"countryID\"\n (ngModelChange)=\"onChanged()\"\n [isReadonly]=\"readonly()\"\n [filterItem]=\"filterCountryByCode\"\n (filterChanged)=\"onFilterChanged($event)\"\n labelPlacement=\"start\"\n>\n @if (!countryID && !filter()) {\n <ion-segment [(ngModel)]=\"geoRegion\" (ionChange)=\"onRegionChanged($event)\">\n <ion-segment-button value=\"All\">All</ion-segment-button>\n @for (region of geoRegions; track region.id) {\n <ion-segment-button [value]=\"region.id\">\n <small>{{ region.id }}</small>\n </ion-segment-button>\n }\n </ion-segment>\n }\n</sneat-select-from-list>\n" }]
103
115
  }], propDecorators: { countryID: [{
104
116
  type: Input,
105
117
  args: [{ required: true }]
106
- }], defaultCountryID: [{
107
- type: Input
108
- }], readonly: [{
109
- type: Input
110
- }], disabled: [{
111
- type: Input
112
- }], label: [{
113
- type: Input
114
- }], canBeUnknown: [{
115
- type: Input
116
- }], countryIDChange: [{
118
+ }], defaultCountryID: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultCountryID", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], canBeUnknown: [{ type: i0.Input, args: [{ isSignal: true, alias: "canBeUnknown", required: false }] }], countryIDChange: [{
117
119
  type: Output
118
120
  }] } });
119
121
  //# sourceMappingURL=country-selector.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"country-selector.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/country-selector/country-selector.component.ts","../../../../../../libs/components/src/lib/country-selector/country-selector.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,KAAK,EAGL,MAAM,EACN,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,SAAS,EACT,OAAO,EACP,QAAQ,EACR,UAAU,EACV,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EA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BAeA,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBAExB,KAAK;;sBAEL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBAEL,MAAM","sourcesContent":["import {\n Component,\n computed,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n signal,\n SimpleChanges,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n IonButton,\n IonItem,\n IonLabel,\n IonSegment,\n IonSegmentButton,\n} from '@ionic/angular/standalone';\nimport { ISelectItem, SelectFromListComponent } from '@sneat/ui';\nimport { GeoRegion, ICountry } from './countries';\nimport { CountriesLoaderService } from './countries-loader.service';\n\n@Component({\n selector: 'sneat-country-selector',\n templateUrl: './country-selector.component.html',\n imports: [\n FormsModule,\n SelectFromListComponent,\n IonSegment,\n IonSegmentButton,\n IonItem,\n IonLabel,\n IonButton,\n ],\n})\nexport class CountrySelectorComponent implements OnInit, OnChanges {\n private readonly countriesLoader = inject(CountriesLoaderService);\n\n protected readonly geoRegions: readonly {\n readonly id: string;\n title?: string;\n }[] = [\n { id: 'Europe' },\n { id: 'Asia' },\n { id: 'Americas' },\n { id: 'Africa' },\n ];\n\n @Input({ required: true }) countryID?: string;\n\n @Input() defaultCountryID?: string;\n\n @Input() readonly = false;\n @Input() disabled = false;\n @Input() label = 'search';\n @Input() canBeUnknown = false;\n\n @Output() readonly countryIDChange = new EventEmitter<string>();\n\n protected readonly filter = signal<string>('');\n protected readonly geoRegion = signal<GeoRegion | 'All' | 'Americas'>('All');\n protected readonly allCountries = signal<readonly ICountry[]>([]);\n protected readonly unknownCountry = signal<ICountry | undefined>(undefined);\n\n // True when the country list failed to load — surfaced in the UI with a Retry.\n protected readonly loadFailed = this.countriesLoader.loadFailed;\n\n protected readonly countries = computed<readonly ISelectItem[]>(() => {\n const allCountries = this.allCountries();\n if (allCountries.length === 0) {\n return []; // Data not loaded yet\n }\n\n const filter = this.filter();\n let countriesToShow: readonly ISelectItem[] = filter\n ? allCountries\n : allCountries.filter(\n (c) =>\n this.geoRegion() === 'All' ||\n (this.geoRegion() === 'Americas' &&\n (c.geoRegions.includes('North America') ||\n c.geoRegions.includes('South America'))) ||\n c.geoRegions.includes(this.geoRegion() as GeoRegion),\n );\n if (this.canBeUnknown && this.unknownCountry()) {\n countriesToShow = [...countriesToShow, this.unknownCountry()!];\n }\n return countriesToShow;\n });\n\n ngOnInit(): void {\n this.load();\n }\n\n private load(): void {\n this.countriesLoader.getCountries().then((countries) => {\n this.allCountries.set(countries);\n });\n this.countriesLoader.getUnknownCountry().then((unknown) => {\n this.unknownCountry.set(unknown);\n });\n }\n\n // Retry loading the country list after a failure (loadFailed()).\n protected retry(): void {\n this.countriesLoader.reload().then(() => this.load());\n }\n\n // protected geoRegion: GeoRegion | 'All' | 'Americas' = 'All';\n\n protected onChanged(): void {\n this.countryIDChange.emit(this.countryID);\n }\n\n protected onFilterChanged(filter: string): void {\n this.filter.set(filter);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['country'] && this.countryID === '--' && !this.canBeUnknown) {\n this.countryID = undefined;\n }\n if (\n changes['defaultCountryID'] &&\n !this.countryID &&\n this.defaultCountryID &&\n this.defaultCountryID !== '--'\n ) {\n this.countryID = this.defaultCountryID;\n this.countryIDChange.emit(this.countryID);\n }\n }\n\n protected onRegionChanged(event: Event): void {\n this.geoRegion.set(\n (event as CustomEvent).detail.value as GeoRegion | 'All' | 'Americas',\n );\n }\n\n protected readonly filterCountryByCode = (\n item: ISelectItem,\n filter: string,\n ) => {\n const f = filter.trim().toUpperCase();\n const c = item as ICountry;\n return c.id === f || c.id3.startsWith(f);\n };\n}\n","@if (loadFailed()) {\n <ion-item color=\"danger\" lines=\"none\">\n <ion-label class=\"ion-text-wrap\">\n Couldn't load the list of countries. Check your connection and try again.\n </ion-label>\n <ion-button slot=\"end\" fill=\"clear\" (click)=\"retry()\">Retry</ion-button>\n </ion-item>\n}\n\n<sneat-select-from-list\n [value]=\"countryID || ''\"\n [isFilterable]=\"true\"\n [filterLabel]=\"label\"\n [label]=\"label\"\n [items]=\"countries()\"\n [(ngModel)]=\"countryID\"\n (ngModelChange)=\"onChanged()\"\n [isReadonly]=\"readonly\"\n [filterItem]=\"filterCountryByCode\"\n (filterChanged)=\"onFilterChanged($event)\"\n labelPlacement=\"start\"\n>\n @if (!countryID && !filter()) {\n <ion-segment [(ngModel)]=\"geoRegion\" (ionChange)=\"onRegionChanged($event)\">\n <ion-segment-button value=\"All\">All</ion-segment-button>\n @for (region of geoRegions; track region.id) {\n <ion-segment-button [value]=\"region.id\">\n <small>{{ region.id }}</small>\n </ion-segment-button>\n }\n </ion-segment>\n }\n</sneat-select-from-list>\n"]}
1
+ {"version":3,"file":"country-selector.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/country-selector/country-selector.component.ts","../../../../../../libs/components/src/lib/country-selector/country-selector.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,KAAK,EAGL,MAAM,EACN,MAAM,EAEN,uBAAuB,EACvB,KAAK,EACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,SAAS,EACT,OAAO,EACP,QAAQ,EACR,UAAU,EACV,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAe,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;;;AAgBpE,MAAM,OAAO,wBAAwB;IAdrC;QAemB,oBAAe,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;QAE/C,eAAU,GAGvB;YACJ,EAAE,EAAE,EAAE,QAAQ,EAAE;YAChB,EAAE,EAAE,EAAE,MAAM,EAAE;YACd,EAAE,EAAE,EAAE,UAAU,EAAE;YAClB,EAAE,EAAE,EAAE,QAAQ,EAAE;SAC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IAES,eAAe,CAAC,MAAc;QACtC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAED,WAAW,CAAC,OAAsB;QAChC,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;YAC1E,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7B,CAAC;QACD,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACjD,IACE,OAAO,CAAC,kBAAkB,CAAC;YAC3B,CAAC,IAAI,CAAC,SAAS;YACf,gBAAgB;YAChB,gBAAgB,KAAK,IAAI,EACzB,CAAC;YACD,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC;YAClC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAES,eAAe,CAAC,KAAY;QACpC,IAAI,CAAC,SAAS,CAAC,GAAG,CACf,KAAqB,CAAC,MAAM,CAAC,KAAuC,CACtE,CAAC;IACJ,CAAC;8GAzGU,wBAAwB;kGAAxB,wBAAwB,w8BCxCrC,2lCAiCA,2CDFI,WAAW,+VACX,uBAAuB,8WACvB,UAAU,uJACV,gBAAgB,qIAChB,OAAO,0NACP,QAAQ,6FACR,SAAS;;2FAGA,wBAAwB;kBAdpC,SAAS;+BACE,wBAAwB,mBAEjB,uBAAuB,CAAC,MAAM,WACtC;wBACP,WAAW;wBACX,uBAAuB;wBACvB,UAAU;wBACV,gBAAgB;wBAChB,OAAO;wBACP,QAAQ;wBACR,SAAS;qBACV;;sBAiBA,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBASxB,MAAM","sourcesContent":["import {\n Component,\n computed,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n signal,\n SimpleChanges,\n ChangeDetectionStrategy,\n input\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n IonButton,\n IonItem,\n IonLabel,\n IonSegment,\n IonSegmentButton,\n} from '@ionic/angular';\nimport { ISelectItem, SelectFromListComponent } from '@sneat/ui';\nimport { GeoRegion, ICountry } from './countries';\nimport { CountriesLoaderService } from './countries-loader.service';\n\n@Component({\n selector: 'sneat-country-selector',\n templateUrl: './country-selector.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FormsModule,\n SelectFromListComponent,\n IonSegment,\n IonSegmentButton,\n IonItem,\n IonLabel,\n IonButton,\n ],\n})\nexport class CountrySelectorComponent implements OnInit, OnChanges {\n private readonly countriesLoader = inject(CountriesLoaderService);\n\n protected readonly geoRegions: readonly {\n readonly id: string;\n title?: string;\n }[] = [\n { id: 'Europe' },\n { id: 'Asia' },\n { id: 'Americas' },\n { id: 'Africa' },\n ];\n\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input({ required: true }) countryID?: string;\n\n readonly defaultCountryID = input<string>();\n\n readonly readonly = input(false);\n readonly disabled = input(false);\n readonly label = input('search');\n readonly canBeUnknown = input(false);\n\n @Output() readonly countryIDChange = new EventEmitter<string>();\n\n protected readonly filter = signal<string>('');\n protected readonly geoRegion = signal<GeoRegion | 'All' | 'Americas'>('All');\n protected readonly allCountries = signal<readonly ICountry[]>([]);\n protected readonly unknownCountry = signal<ICountry | undefined>(undefined);\n\n // True when the country list failed to load — surfaced in the UI with a Retry.\n protected readonly loadFailed = this.countriesLoader.loadFailed;\n\n protected readonly countries = computed<readonly ISelectItem[]>(() => {\n const allCountries = this.allCountries();\n if (allCountries.length === 0) {\n return []; // Data not loaded yet\n }\n\n const filter = this.filter();\n let countriesToShow: readonly ISelectItem[] = filter\n ? allCountries\n : allCountries.filter(\n (c) =>\n this.geoRegion() === 'All' ||\n (this.geoRegion() === 'Americas' &&\n (c.geoRegions.includes('North America') ||\n c.geoRegions.includes('South America'))) ||\n c.geoRegions.includes(this.geoRegion() as GeoRegion),\n );\n if (this.canBeUnknown() && this.unknownCountry()) {\n countriesToShow = [...countriesToShow, this.unknownCountry()!];\n }\n return countriesToShow;\n });\n\n ngOnInit(): void {\n this.load();\n }\n\n private load(): void {\n this.countriesLoader.getCountries().then((countries) => {\n this.allCountries.set(countries);\n });\n this.countriesLoader.getUnknownCountry().then((unknown) => {\n this.unknownCountry.set(unknown);\n });\n }\n\n // Retry loading the country list after a failure (loadFailed()).\n protected retry(): void {\n this.countriesLoader.reload().then(() => this.load());\n }\n\n // protected geoRegion: GeoRegion | 'All' | 'Americas' = 'All';\n\n protected onChanged(): void {\n this.countryIDChange.emit(this.countryID);\n }\n\n protected onFilterChanged(filter: string): void {\n this.filter.set(filter);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['country'] && this.countryID === '--' && !this.canBeUnknown()) {\n this.countryID = undefined;\n }\n const defaultCountryID = this.defaultCountryID();\n if (\n changes['defaultCountryID'] &&\n !this.countryID &&\n defaultCountryID &&\n defaultCountryID !== '--'\n ) {\n this.countryID = defaultCountryID;\n this.countryIDChange.emit(this.countryID);\n }\n }\n\n protected onRegionChanged(event: Event): void {\n this.geoRegion.set(\n (event as CustomEvent).detail.value as GeoRegion | 'All' | 'Americas',\n );\n }\n\n protected readonly filterCountryByCode = (\n item: ISelectItem,\n filter: string,\n ) => {\n const f = filter.trim().toUpperCase();\n const c = item as ICountry;\n return c.id === f || c.id3.startsWith(f);\n };\n}\n","@if (loadFailed()) {\n <ion-item color=\"danger\" lines=\"none\">\n <ion-label class=\"ion-text-wrap\">\n Couldn't load the list of countries. Check your connection and try again.\n </ion-label>\n <ion-button slot=\"end\" fill=\"clear\" (click)=\"retry()\">Retry</ion-button>\n </ion-item>\n}\n\n<sneat-select-from-list\n [value]=\"countryID || ''\"\n [isFilterable]=\"true\"\n [filterLabel]=\"label()\"\n [label]=\"label()\"\n [items]=\"countries()\"\n [(ngModel)]=\"countryID\"\n (ngModelChange)=\"onChanged()\"\n [isReadonly]=\"readonly()\"\n [filterItem]=\"filterCountryByCode\"\n (filterChanged)=\"onFilterChanged($event)\"\n labelPlacement=\"start\"\n>\n @if (!countryID && !filter()) {\n <ion-segment [(ngModel)]=\"geoRegion\" (ionChange)=\"onRegionChanged($event)\">\n <ion-segment-button value=\"All\">All</ion-segment-button>\n @for (region of geoRegions; track region.id) {\n <ion-segment-button [value]=\"region.id\">\n <small>{{ region.id }}</small>\n </ion-segment-button>\n }\n </ion-segment>\n }\n</sneat-select-from-list>\n"]}
@@ -6,10 +6,10 @@ export class CountrySelectorService extends SelectorBaseService {
6
6
  constructor() {
7
7
  super(CountrySelectorComponent);
8
8
  }
9
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CountrySelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
10
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CountrySelectorService }); }
9
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CountrySelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
10
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CountrySelectorService }); }
11
11
  }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CountrySelectorService, decorators: [{
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CountrySelectorService, decorators: [{
13
13
  type: Injectable
14
14
  }], ctorParameters: () => [] });
15
15
  //# sourceMappingURL=country-selector.service.js.map
@@ -1,19 +1,28 @@
1
- import { Component, computed, inject, input, Output, EventEmitter, signal, } from '@angular/core';
2
- import { IonInput, IonLabel, IonButton, IonButtons, IonItem, PopoverController, IonIcon, IonSpinner, } from '@ionic/angular/standalone';
1
+ import { Component, computed, inject, input, Output, EventEmitter, signal, ChangeDetectionStrategy } from '@angular/core';
2
+ import { IonInput, IonLabel, IonButton, IonButtons, IonItem, PopoverController, IonIcon, IonSpinner, } from '@ionic/angular';
3
3
  import { DateModalComponent } from './date-modal.component';
4
4
  import * as i0 from "@angular/core";
5
5
  export class DateInputComponent {
6
6
  constructor() {
7
- this.$label = input.required(...(ngDevMode ? [{ debugName: "$label" }] : []));
8
- this.$value = input.required(...(ngDevMode ? [{ debugName: "$value" }] : []));
9
- this.$max = input(...(ngDevMode ? [undefined, { debugName: "$max" }] : []));
10
- this.$newValue = signal(undefined, ...(ngDevMode ? [{ debugName: "$newValue" }] : []));
11
- this.$displayValue = computed(() => this.$updating() ? this.$newValue() : this.$value(), ...(ngDevMode ? [{ debugName: "$displayValue" }] : []));
12
- this.$updating = input(...(ngDevMode ? [undefined, { debugName: "$updating" }] : []));
7
+ this.$label = input.required(/* @ts-ignore */
8
+ ...(ngDevMode ? [{ debugName: "$label" }] : /* istanbul ignore next */ []));
9
+ this.$value = input.required(/* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "$value" }] : /* istanbul ignore next */ []));
11
+ this.$max = input(/* @ts-ignore */
12
+ ...(ngDevMode ? [undefined, { debugName: "$max" }] : /* istanbul ignore next */ []));
13
+ this.$newValue = signal(undefined, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "$newValue" }] : /* istanbul ignore next */ []));
15
+ this.$displayValue = computed(() => this.$updating() ? this.$newValue() : this.$value(), /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "$displayValue" }] : /* istanbul ignore next */ []));
17
+ this.$updating = input(/* @ts-ignore */
18
+ ...(ngDevMode ? [undefined, { debugName: "$updating" }] : /* istanbul ignore next */ []));
13
19
  this.valueChange = new EventEmitter();
14
- this.$noValueLabel = input(...(ngDevMode ? [undefined, { debugName: "$noValueLabel" }] : []));
15
- this.$noValueText = computed(() => this.$noValueLabel() || '(not set)', ...(ngDevMode ? [{ debugName: "$noValueText" }] : []));
16
- this.$noValueButtonColor = input(...(ngDevMode ? [undefined, { debugName: "$noValueButtonColor" }] : []));
20
+ this.$noValueLabel = input(/* @ts-ignore */
21
+ ...(ngDevMode ? [undefined, { debugName: "$noValueLabel" }] : /* istanbul ignore next */ []));
22
+ this.$noValueText = computed(() => this.$noValueLabel() || '(not set)', /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "$noValueText" }] : /* istanbul ignore next */ []));
24
+ this.$noValueButtonColor = input(/* @ts-ignore */
25
+ ...(ngDevMode ? [undefined, { debugName: "$noValueButtonColor" }] : /* istanbul ignore next */ []));
17
26
  this.popoverCtrl = inject(PopoverController);
18
27
  }
19
28
  onValueChanged(event) {
@@ -50,10 +59,10 @@ export class DateInputComponent {
50
59
  });
51
60
  await popover.present();
52
61
  }
53
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DateInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
54
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: DateInputComponent, isStandalone: true, selector: "sneat-date-input", inputs: { $label: { classPropertyName: "$label", publicName: "$label", isSignal: true, isRequired: true, transformFunction: null }, $value: { classPropertyName: "$value", publicName: "$value", isSignal: true, isRequired: true, transformFunction: null }, $max: { classPropertyName: "$max", publicName: "$max", isSignal: true, isRequired: false, transformFunction: null }, $updating: { classPropertyName: "$updating", publicName: "$updating", isSignal: true, isRequired: false, transformFunction: null }, $noValueLabel: { classPropertyName: "$noValueLabel", publicName: "$noValueLabel", isSignal: true, isRequired: false, transformFunction: null }, $noValueButtonColor: { classPropertyName: "$noValueButtonColor", publicName: "$noValueButtonColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [PopoverController], ngImport: i0, template: "<ion-item class=\"sneat-tiny-end-padding\" lines=\"none\">\n @let displayValue = $displayValue();\n\n <ion-input\n [label]=\"$label()\"\n type=\"date\"\n [readonly]=\"$value() === undefined || $updating()\"\n [value]=\"displayValue\"\n (ionChange)=\"onValueChanged($event)\"\n />\n\n @if ($value() !== undefined || $newValue()) {\n <ion-buttons slot=\"end\">\n @if ($updating()) {\n <ion-button disabled=\"true\" (click)=\"openDatePicker($event)\">\n <ion-spinner name=\"lines-small\" slot=\"start\" />\n <ion-label>Saving...</ion-label>\n </ion-button>\n } @else if ($newValue() !== undefined && $newValue() !== $value()) {\n <ion-button color=\"danger\" fill=\"solid\" (click)=\"save($event)\">\n <ion-icon name=\"save-outline\" slot=\"start\" />\n <ion-label>Save</ion-label>\n </ion-button>\n } @else if ($value()) {\n <ion-button color=\"medium\" (click)=\"openDatePicker($event)\">\n <ion-icon name=\"chevron-down-outline\" slot=\"start\" />\n </ion-button>\n } @else {\n <ion-button\n fill=\"solid\"\n [color]=\"$noValueButtonColor() || 'danger'\"\n (click)=\"openDatePicker($event)\"\n >\n <ion-label>Add</ion-label>\n </ion-button>\n }\n </ion-buttons>\n }\n</ion-item>\n", dependencies: [{ kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }] }); }
62
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DateInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: DateInputComponent, isStandalone: true, selector: "sneat-date-input", inputs: { $label: { classPropertyName: "$label", publicName: "$label", isSignal: true, isRequired: true, transformFunction: null }, $value: { classPropertyName: "$value", publicName: "$value", isSignal: true, isRequired: true, transformFunction: null }, $max: { classPropertyName: "$max", publicName: "$max", isSignal: true, isRequired: false, transformFunction: null }, $updating: { classPropertyName: "$updating", publicName: "$updating", isSignal: true, isRequired: false, transformFunction: null }, $noValueLabel: { classPropertyName: "$noValueLabel", publicName: "$noValueLabel", isSignal: true, isRequired: false, transformFunction: null }, $noValueButtonColor: { classPropertyName: "$noValueButtonColor", publicName: "$noValueButtonColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [PopoverController], ngImport: i0, template: "<ion-item class=\"sneat-tiny-end-padding\" lines=\"none\">\n @let displayValue = $displayValue();\n\n <ion-input\n [label]=\"$label()\"\n type=\"date\"\n [readonly]=\"$value() === undefined || $updating()\"\n [value]=\"displayValue\"\n (ionChange)=\"onValueChanged($event)\"\n />\n\n @if ($value() !== undefined || $newValue()) {\n <ion-buttons slot=\"end\">\n @if ($updating()) {\n <ion-button disabled=\"true\" (click)=\"openDatePicker($event)\">\n <ion-spinner name=\"lines-small\" slot=\"start\" />\n <ion-label>Saving...</ion-label>\n </ion-button>\n } @else if ($newValue() !== undefined && $newValue() !== $value()) {\n <ion-button color=\"danger\" fill=\"solid\" (click)=\"save($event)\">\n <ion-icon name=\"save-outline\" slot=\"start\" />\n <ion-label>Save</ion-label>\n </ion-button>\n } @else if ($value()) {\n <ion-button color=\"medium\" (click)=\"openDatePicker($event)\">\n <ion-icon name=\"chevron-down-outline\" slot=\"start\" />\n </ion-button>\n } @else {\n <ion-button\n fill=\"solid\"\n [color]=\"$noValueButtonColor() || 'danger'\"\n (click)=\"openDatePicker($event)\"\n >\n <ion-label>Add</ion-label>\n </ion-button>\n }\n </ion-buttons>\n }\n</ion-item>\n", dependencies: [{ kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"], outputs: ["ionFocus", "ionBlur"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
55
64
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DateInputComponent, decorators: [{
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DateInputComponent, decorators: [{
57
66
  type: Component,
58
67
  args: [{ selector: 'sneat-date-input', imports: [
59
68
  IonItem,
@@ -63,7 +72,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
63
72
  IonButton,
64
73
  IonIcon,
65
74
  IonSpinner,
66
- ], providers: [PopoverController], template: "<ion-item class=\"sneat-tiny-end-padding\" lines=\"none\">\n @let displayValue = $displayValue();\n\n <ion-input\n [label]=\"$label()\"\n type=\"date\"\n [readonly]=\"$value() === undefined || $updating()\"\n [value]=\"displayValue\"\n (ionChange)=\"onValueChanged($event)\"\n />\n\n @if ($value() !== undefined || $newValue()) {\n <ion-buttons slot=\"end\">\n @if ($updating()) {\n <ion-button disabled=\"true\" (click)=\"openDatePicker($event)\">\n <ion-spinner name=\"lines-small\" slot=\"start\" />\n <ion-label>Saving...</ion-label>\n </ion-button>\n } @else if ($newValue() !== undefined && $newValue() !== $value()) {\n <ion-button color=\"danger\" fill=\"solid\" (click)=\"save($event)\">\n <ion-icon name=\"save-outline\" slot=\"start\" />\n <ion-label>Save</ion-label>\n </ion-button>\n } @else if ($value()) {\n <ion-button color=\"medium\" (click)=\"openDatePicker($event)\">\n <ion-icon name=\"chevron-down-outline\" slot=\"start\" />\n </ion-button>\n } @else {\n <ion-button\n fill=\"solid\"\n [color]=\"$noValueButtonColor() || 'danger'\"\n (click)=\"openDatePicker($event)\"\n >\n <ion-label>Add</ion-label>\n </ion-button>\n }\n </ion-buttons>\n }\n</ion-item>\n" }]
75
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [PopoverController], template: "<ion-item class=\"sneat-tiny-end-padding\" lines=\"none\">\n @let displayValue = $displayValue();\n\n <ion-input\n [label]=\"$label()\"\n type=\"date\"\n [readonly]=\"$value() === undefined || $updating()\"\n [value]=\"displayValue\"\n (ionChange)=\"onValueChanged($event)\"\n />\n\n @if ($value() !== undefined || $newValue()) {\n <ion-buttons slot=\"end\">\n @if ($updating()) {\n <ion-button disabled=\"true\" (click)=\"openDatePicker($event)\">\n <ion-spinner name=\"lines-small\" slot=\"start\" />\n <ion-label>Saving...</ion-label>\n </ion-button>\n } @else if ($newValue() !== undefined && $newValue() !== $value()) {\n <ion-button color=\"danger\" fill=\"solid\" (click)=\"save($event)\">\n <ion-icon name=\"save-outline\" slot=\"start\" />\n <ion-label>Save</ion-label>\n </ion-button>\n } @else if ($value()) {\n <ion-button color=\"medium\" (click)=\"openDatePicker($event)\">\n <ion-icon name=\"chevron-down-outline\" slot=\"start\" />\n </ion-button>\n } @else {\n <ion-button\n fill=\"solid\"\n [color]=\"$noValueButtonColor() || 'danger'\"\n (click)=\"openDatePicker($event)\"\n >\n <ion-label>Add</ion-label>\n </ion-button>\n }\n </ion-buttons>\n }\n</ion-item>\n" }]
67
76
  }], propDecorators: { $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: true }] }], $value: [{ type: i0.Input, args: [{ isSignal: true, alias: "$value", required: true }] }], $max: [{ type: i0.Input, args: [{ isSignal: true, alias: "$max", required: false }] }], $updating: [{ type: i0.Input, args: [{ isSignal: true, alias: "$updating", required: false }] }], valueChange: [{
68
77
  type: Output
69
78
  }], $noValueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "$noValueLabel", required: false }] }], $noValueButtonColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "$noValueButtonColor", required: false }] }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"date-input.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/date-input/date-input.component.ts","../../../../../../libs/components/src/lib/date-input/date-input.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAM,EACN,YAAY,EACZ,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,Q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,\n Output,\n EventEmitter,\n signal,\n} from '@angular/core';\nimport {\n IonInput,\n IonLabel,\n IonButton,\n IonButtons,\n IonItem,\n PopoverController,\n IonIcon,\n IonSpinner,\n} from '@ionic/angular/standalone';\nimport { DateModalComponent } from './date-modal.component';\n\n@Component({\n selector: 'sneat-date-input',\n templateUrl: 'date-input.component.html',\n imports: [\n IonItem,\n IonInput,\n IonLabel,\n IonButtons,\n IonButton,\n IonIcon,\n IonSpinner,\n ],\n providers: [PopoverController],\n})\nexport class DateInputComponent {\n public readonly $label = input.required<string>();\n public readonly $value = input.required<string | undefined>();\n public readonly $max = input<string>();\n\n public readonly $newValue = signal<string | undefined>(undefined);\n\n public readonly $displayValue = computed(() =>\n this.$updating() ? this.$newValue() : this.$value(),\n );\n\n public readonly $updating = input<boolean>();\n\n @Output() public valueChange = new EventEmitter<string | undefined>();\n\n public readonly $noValueLabel = input<string>();\n\n protected readonly $noValueText = computed(\n () => this.$noValueLabel() || '(not set)',\n );\n\n protected readonly $noValueButtonColor = input<string>();\n\n protected readonly popoverCtrl = inject(PopoverController);\n\n protected onValueChanged(event: CustomEvent): void {\n const newValue = event.detail.value as string;\n // console.log('onValueChanged', newValue);\n this.$newValue.set(newValue);\n }\n\n protected save(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.valueChange.emit(this.$newValue());\n }\n\n protected async openDatePicker(event: Event): Promise<void> {\n event.stopPropagation();\n event.preventDefault();\n const popover = await this.popoverCtrl.create({\n reference: 'trigger',\n event,\n side: 'bottom',\n alignment: 'center',\n component: DateModalComponent,\n componentProps: {\n title: this.$label(),\n max: this.$max(),\n },\n });\n popover.onDidDismiss().then((eventDetail) => {\n // console.log(`Selected \"${this.$label()}\":`, eventDetail.data);\n const value = eventDetail.data as string | undefined;\n if (value !== undefined) {\n this.$newValue.set(value || '');\n this.valueChange.emit(eventDetail.data as string | undefined);\n }\n });\n await popover.present();\n }\n}\n","<ion-item class=\"sneat-tiny-end-padding\" lines=\"none\">\n @let displayValue = $displayValue();\n\n <ion-input\n [label]=\"$label()\"\n type=\"date\"\n [readonly]=\"$value() === undefined || $updating()\"\n [value]=\"displayValue\"\n (ionChange)=\"onValueChanged($event)\"\n />\n\n @if ($value() !== undefined || $newValue()) {\n <ion-buttons slot=\"end\">\n @if ($updating()) {\n <ion-button disabled=\"true\" (click)=\"openDatePicker($event)\">\n <ion-spinner name=\"lines-small\" slot=\"start\" />\n <ion-label>Saving...</ion-label>\n </ion-button>\n } @else if ($newValue() !== undefined && $newValue() !== $value()) {\n <ion-button color=\"danger\" fill=\"solid\" (click)=\"save($event)\">\n <ion-icon name=\"save-outline\" slot=\"start\" />\n <ion-label>Save</ion-label>\n </ion-button>\n } @else if ($value()) {\n <ion-button color=\"medium\" (click)=\"openDatePicker($event)\">\n <ion-icon name=\"chevron-down-outline\" slot=\"start\" />\n </ion-button>\n } @else {\n <ion-button\n fill=\"solid\"\n [color]=\"$noValueButtonColor() || 'danger'\"\n (click)=\"openDatePicker($event)\"\n >\n <ion-label>Add</ion-label>\n </ion-button>\n }\n </ion-buttons>\n }\n</ion-item>\n"]}
1
+ {"version":3,"file":"date-input.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/date-input/date-input.component.ts","../../../../../../libs/components/src/lib/date-input/date-input.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAM,EACN,YAAY,EACZ,MAAM,EACN,uBAAuB,EACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;;AAiB5D,MAAM,OAAO,kBAAkB;IAf/B;QAgBkB,WAAM,GAAG,KAAK,CAAC,QAAQ;mFAAU,CAAC;QAClC,WAAM,GAAG,KAAK,C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,QAAQ;YACnB,SAAS,EAAE,kBAAkB;YAC7B,cAAc,EAAE;gBACd,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;gBACpB,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE;aACjB;SACF,CAAC,CAAC;QACH,OAAO,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE;YAC1C,iEAAiE;YACjE,MAAM,KAAK,GAAG,WAAW,CAAC,IAA0B,CAAC;YACrD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;gBAChC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,IAA0B,CAAC,CAAC;YAChE,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;8GA5DU,kBAAkB;kGAAlB,kBAAkB,m5BAFlB,CAAC,iBAAiB,CAAC,0BCnChC,i2CAuCA,4CDbI,OAAO,0NACP,QAAQ,8eACR,QAAQ,6FACR,UAAU,8EACV,SAAS,sRACT,OAAO,2JACP,UAAU;;2FAKD,kBAAkB;kBAf9B,SAAS;+BACE,kBAAkB,WAEnB;wBACP,OAAO;wBACP,QAAQ;wBACR,QAAQ;wBACR,UAAU;wBACV,SAAS;wBACT,OAAO;wBACP,UAAU;qBACX,mBACgB,uBAAuB,CAAC,MAAM,aACpC,CAAC,iBAAiB,CAAC;;sBAe7B,MAAM","sourcesContent":["import {\n Component,\n computed,\n inject,\n input,\n Output,\n EventEmitter,\n signal,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport {\n IonInput,\n IonLabel,\n IonButton,\n IonButtons,\n IonItem,\n PopoverController,\n IonIcon,\n IonSpinner,\n} from '@ionic/angular';\nimport { DateModalComponent } from './date-modal.component';\n\n@Component({\n selector: 'sneat-date-input',\n templateUrl: 'date-input.component.html',\n imports: [\n IonItem,\n IonInput,\n IonLabel,\n IonButtons,\n IonButton,\n IonIcon,\n IonSpinner,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [PopoverController],\n})\nexport class DateInputComponent {\n public readonly $label = input.required<string>();\n public readonly $value = input.required<string | undefined>();\n public readonly $max = input<string>();\n\n public readonly $newValue = signal<string | undefined>(undefined);\n\n public readonly $displayValue = computed(() =>\n this.$updating() ? this.$newValue() : this.$value(),\n );\n\n public readonly $updating = input<boolean>();\n\n @Output() public valueChange = new EventEmitter<string | undefined>();\n\n public readonly $noValueLabel = input<string>();\n\n protected readonly $noValueText = computed(\n () => this.$noValueLabel() || '(not set)',\n );\n\n protected readonly $noValueButtonColor = input<string>();\n\n protected readonly popoverCtrl = inject(PopoverController);\n\n protected onValueChanged(event: CustomEvent): void {\n const newValue = event.detail.value as string;\n // console.log('onValueChanged', newValue);\n this.$newValue.set(newValue);\n }\n\n protected save(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.valueChange.emit(this.$newValue());\n }\n\n protected async openDatePicker(event: Event): Promise<void> {\n event.stopPropagation();\n event.preventDefault();\n const popover = await this.popoverCtrl.create({\n reference: 'trigger',\n event,\n side: 'bottom',\n alignment: 'center',\n component: DateModalComponent,\n componentProps: {\n title: this.$label(),\n max: this.$max(),\n },\n });\n popover.onDidDismiss().then((eventDetail) => {\n // console.log(`Selected \"${this.$label()}\":`, eventDetail.data);\n const value = eventDetail.data as string | undefined;\n if (value !== undefined) {\n this.$newValue.set(value || '');\n this.valueChange.emit(eventDetail.data as string | undefined);\n }\n });\n await popover.present();\n }\n}\n","<ion-item class=\"sneat-tiny-end-padding\" lines=\"none\">\n @let displayValue = $displayValue();\n\n <ion-input\n [label]=\"$label()\"\n type=\"date\"\n [readonly]=\"$value() === undefined || $updating()\"\n [value]=\"displayValue\"\n (ionChange)=\"onValueChanged($event)\"\n />\n\n @if ($value() !== undefined || $newValue()) {\n <ion-buttons slot=\"end\">\n @if ($updating()) {\n <ion-button disabled=\"true\" (click)=\"openDatePicker($event)\">\n <ion-spinner name=\"lines-small\" slot=\"start\" />\n <ion-label>Saving...</ion-label>\n </ion-button>\n } @else if ($newValue() !== undefined && $newValue() !== $value()) {\n <ion-button color=\"danger\" fill=\"solid\" (click)=\"save($event)\">\n <ion-icon name=\"save-outline\" slot=\"start\" />\n <ion-label>Save</ion-label>\n </ion-button>\n } @else if ($value()) {\n <ion-button color=\"medium\" (click)=\"openDatePicker($event)\">\n <ion-icon name=\"chevron-down-outline\" slot=\"start\" />\n </ion-button>\n } @else {\n <ion-button\n fill=\"solid\"\n [color]=\"$noValueButtonColor() || 'danger'\"\n (click)=\"openDatePicker($event)\"\n >\n <ion-label>Add</ion-label>\n </ion-button>\n }\n </ion-buttons>\n }\n</ion-item>\n"]}
@@ -1,12 +1,17 @@
1
- import { Component, inject, Input, signal, ChangeDetectionStrategy, } from '@angular/core';
2
- import { IonButton, IonButtons, IonContent, IonDatetime, IonHeader, IonLabel, IonTitle, IonToolbar, PopoverController, } from '@ionic/angular/standalone';
1
+ import { Component, inject, signal, ChangeDetectionStrategy, input } from '@angular/core';
2
+ import { IonButton, IonButtons, IonContent, IonDatetime, IonHeader, IonLabel, IonTitle, IonToolbar, PopoverController, } from '@ionic/angular';
3
3
  import { ClassName, SneatBaseComponent } from '@sneat/ui';
4
4
  import * as i0 from "@angular/core";
5
5
  export class DateModalComponent extends SneatBaseComponent {
6
6
  constructor() {
7
7
  super();
8
+ this.title = input(/* @ts-ignore */
9
+ ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
10
+ this.max = input(/* @ts-ignore */
11
+ ...(ngDevMode ? [undefined, { debugName: "max" }] : /* istanbul ignore next */ []));
8
12
  this.popoverCtrl = inject(PopoverController);
9
- this.$date = signal(undefined, ...(ngDevMode ? [{ debugName: "$date" }] : []));
13
+ this.$date = signal(undefined, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "$date" }] : /* istanbul ignore next */ []));
10
15
  }
11
16
  onDateChanged(event) {
12
17
  let { value } = event.detail;
@@ -20,15 +25,15 @@ export class DateModalComponent extends SneatBaseComponent {
20
25
  .dismiss(this.$date())
21
26
  .catch(this.errorLogger.logErrorHandler('failed to dismiss date modal'));
22
27
  }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DateModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: DateModalComponent, isStandalone: true, selector: "sneat-contact-dob-modal", inputs: { title: "title", max: "max" }, providers: [
28
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DateModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
29
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: DateModalComponent, isStandalone: true, selector: "sneat-contact-dob-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
25
30
  {
26
31
  provide: ClassName,
27
32
  useValue: 'DateModalComponent',
28
33
  },
29
- ], usesInheritance: true, ngImport: i0, template: "<ion-header>\n <ion-toolbar>\n <ion-title>{{ title }}</ion-title>\n <ion-buttons slot=\"end\">\n <ion-button\n (click)=\"dismiss()\"\n [disabled]=\"!$date()\"\n [color]=\"$date() ? 'primary' : undefined\"\n [fill]=\"$date() ? 'solid' : undefined\"\n >\n <ion-label>Set</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n<ion-content>\n <ion-datetime\n [value]=\"$date()\"\n [max]=\"max\"\n (ionChange)=\"onDateChanged($event)\"\n presentation=\"date\"\n />\n</ion-content>\n", dependencies: [{ kind: "component", type: IonDatetime, selector: "ion-datetime", inputs: ["cancelText", "clearText", "color", "dayValues", "disabled", "doneText", "firstDayOfWeek", "formatOptions", "highlightedDates", "hourCycle", "hourValues", "isDateEnabled", "locale", "max", "min", "minuteValues", "mode", "monthValues", "multiple", "name", "preferWheel", "presentation", "readonly", "showAdjacentDays", "showClearButton", "showDefaultButtons", "showDefaultTimeLabel", "showDefaultTitle", "size", "titleSelectedDatesFormatter", "value", "yearValues"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
34
+ ], usesInheritance: true, ngImport: i0, template: "<ion-header>\n <ion-toolbar>\n <ion-title>{{ title() }}</ion-title>\n <ion-buttons slot=\"end\">\n <ion-button\n (click)=\"dismiss()\"\n [disabled]=\"!$date()\"\n [color]=\"$date() ? 'primary' : undefined\"\n [fill]=\"$date() ? 'solid' : undefined\"\n >\n <ion-label>Set</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n<ion-content>\n <ion-datetime\n [value]=\"$date()\"\n [max]=\"max()\"\n (ionChange)=\"onDateChanged($event)\"\n presentation=\"date\"\n />\n</ion-content>\n", dependencies: [{ kind: "component", type: IonDatetime, selector: "ion-datetime", inputs: ["cancelText", "clearText", "color", "dayValues", "disabled", "doneText", "firstDayOfWeek", "formatOptions", "highlightedDates", "hourCycle", "hourValues", "isDateEnabled", "locale", "max", "min", "minuteValues", "mode", "monthValues", "multiple", "name", "preferWheel", "presentation", "readonly", "showAdjacentDays", "showClearButton", "showDefaultButtons", "showDefaultTimeLabel", "showDefaultTitle", "size", "titleSelectedDatesFormatter", "value", "yearValues"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"], outputs: ["ionScrollStart", "ionScroll", "ionScrollEnd"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"], outputs: ["ionFocus", "ionBlur"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
30
35
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DateModalComponent, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DateModalComponent, decorators: [{
32
37
  type: Component,
33
38
  args: [{ imports: [
34
39
  IonDatetime,
@@ -44,10 +49,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
44
49
  provide: ClassName,
45
50
  useValue: 'DateModalComponent',
46
51
  },
47
- ], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'sneat-contact-dob-modal', template: "<ion-header>\n <ion-toolbar>\n <ion-title>{{ title }}</ion-title>\n <ion-buttons slot=\"end\">\n <ion-button\n (click)=\"dismiss()\"\n [disabled]=\"!$date()\"\n [color]=\"$date() ? 'primary' : undefined\"\n [fill]=\"$date() ? 'solid' : undefined\"\n >\n <ion-label>Set</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n<ion-content>\n <ion-datetime\n [value]=\"$date()\"\n [max]=\"max\"\n (ionChange)=\"onDateChanged($event)\"\n presentation=\"date\"\n />\n</ion-content>\n" }]
48
- }], ctorParameters: () => [], propDecorators: { title: [{
49
- type: Input
50
- }], max: [{
51
- type: Input
52
- }] } });
52
+ ], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'sneat-contact-dob-modal', template: "<ion-header>\n <ion-toolbar>\n <ion-title>{{ title() }}</ion-title>\n <ion-buttons slot=\"end\">\n <ion-button\n (click)=\"dismiss()\"\n [disabled]=\"!$date()\"\n [color]=\"$date() ? 'primary' : undefined\"\n [fill]=\"$date() ? 'solid' : undefined\"\n >\n <ion-label>Set</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n<ion-content>\n <ion-datetime\n [value]=\"$date()\"\n [max]=\"max()\"\n (ionChange)=\"onDateChanged($event)\"\n presentation=\"date\"\n />\n</ion-content>\n" }]
53
+ }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }] } });
53
54
  //# sourceMappingURL=date-modal.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-modal.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/date-input/date-modal.component.ts","../../../../../../libs/components/src/lib/date-input/date-modal.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,WA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/B;qBACF,mBACgB,uBAAuB,CAAC,MAAM,YACrC,yBAAyB;;sBAIlC,KAAK;;sBACL,KAAK","sourcesContent":["import {\n Component,\n inject,\n Input,\n signal,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {\n IonButton,\n IonButtons,\n IonContent,\n IonDatetime,\n IonHeader,\n IonLabel,\n IonTitle,\n IonToolbar,\n PopoverController,\n} from '@ionic/angular/standalone';\nimport { ClassName, SneatBaseComponent } from '@sneat/ui';\n\n@Component({\n imports: [\n IonDatetime,\n IonHeader,\n IonToolbar,\n IonTitle,\n IonContent,\n IonButton,\n IonButtons,\n IonLabel,\n ],\n providers: [\n {\n provide: ClassName,\n useValue: 'DateModalComponent',\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'sneat-contact-dob-modal',\n templateUrl: 'date-modal.component.html',\n})\nexport class DateModalComponent extends SneatBaseComponent {\n @Input() title?: string;\n @Input() max?: string;\n\n public constructor() {\n super();\n }\n\n private popoverCtrl = inject(PopoverController);\n\n protected readonly $date = signal<string | undefined>(undefined);\n\n protected onDateChanged(event: CustomEvent): void {\n let { value } = event.detail;\n if (value) {\n value = (value as string).slice(0, 10);\n }\n this.$date.set(value);\n }\n\n protected dismiss(): void {\n this.popoverCtrl\n .dismiss(this.$date())\n .catch(this.errorLogger.logErrorHandler('failed to dismiss date modal'));\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>{{ title }}</ion-title>\n <ion-buttons slot=\"end\">\n <ion-button\n (click)=\"dismiss()\"\n [disabled]=\"!$date()\"\n [color]=\"$date() ? 'primary' : undefined\"\n [fill]=\"$date() ? 'solid' : undefined\"\n >\n <ion-label>Set</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n<ion-content>\n <ion-datetime\n [value]=\"$date()\"\n [max]=\"max\"\n (ionChange)=\"onDateChanged($event)\"\n presentation=\"date\"\n />\n</ion-content>\n"]}
1
+ {"version":3,"file":"date-modal.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/date-input/date-modal.component.ts","../../../../../../libs/components/src/lib/date-input/date-modal.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,uBAAuB,EACvB,KAAK,EACN,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;;AAuB1D,MAAM,OAAO,kBAAmB,SAAQ,kBAAkB;IAIxD;QACE,KAAK,EAAE,CAAC;QAJD,UAAK,GAAG,KAAK;6FAAU,CAAC;QACxB,QAAG,GAAG,KAAK;2FAAU,CAAC;QAMvB,gBAAW,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAE7B,UAAK,GAAG,MAAM,CAAqB,SAAS;kFAAC,CAAC;IAJjE,CAAC;IAMS,aAAa,CAAC,KAAkB;QACxC,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;QAC7B,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,GAAI,KAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAES,OAAO;QACf,IAAI,CAAC,WAAW;aACb,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;aACrB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC7E,CAAC;8GAxBU,kBAAkB;kGAAlB,kBAAkB,4TAVlB;YACT;gBACE,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,oBAAoB;aAC/B;SACF,iDCpCH,skBAuBA,4CDDI,WAAW,ohBACX,SAAS,oGACT,UAAU,mFACV,QAAQ,iFACR,UAAU,kOACV,SAAS,sRACT,UAAU,8EACV,QAAQ;;2FAYC,kBAAkB;kBArB9B,SAAS;8BACC;wBACP,WAAW;wBACX,SAAS;wBACT,UAAU;wBACV,QAAQ;wBACR,UAAU;wBACV,SAAS;wBACT,UAAU;wBACV,QAAQ;qBACT,aACU;wBACT;4BACE,OAAO,EAAE,SAAS;4BAClB,QAAQ,EAAE,oBAAoB;yBAC/B;qBACF,mBACgB,uBAAuB,CAAC,MAAM,YACrC,yBAAyB","sourcesContent":["import {\n Component,\n inject,\n signal,\n ChangeDetectionStrategy,\n input\n} from '@angular/core';\nimport {\n IonButton,\n IonButtons,\n IonContent,\n IonDatetime,\n IonHeader,\n IonLabel,\n IonTitle,\n IonToolbar,\n PopoverController,\n} from '@ionic/angular';\nimport { ClassName, SneatBaseComponent } from '@sneat/ui';\n\n@Component({\n imports: [\n IonDatetime,\n IonHeader,\n IonToolbar,\n IonTitle,\n IonContent,\n IonButton,\n IonButtons,\n IonLabel,\n ],\n providers: [\n {\n provide: ClassName,\n useValue: 'DateModalComponent',\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'sneat-contact-dob-modal',\n templateUrl: 'date-modal.component.html',\n})\nexport class DateModalComponent extends SneatBaseComponent {\n readonly title = input<string>();\n readonly max = input<string>();\n\n public constructor() {\n super();\n }\n\n private popoverCtrl = inject(PopoverController);\n\n protected readonly $date = signal<string | undefined>(undefined);\n\n protected onDateChanged(event: CustomEvent): void {\n let { value } = event.detail;\n if (value) {\n value = (value as string).slice(0, 10);\n }\n this.$date.set(value);\n }\n\n protected dismiss(): void {\n this.popoverCtrl\n .dismiss(this.$date())\n .catch(this.errorLogger.logErrorHandler('failed to dismiss date modal'));\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>{{ title() }}</ion-title>\n <ion-buttons slot=\"end\">\n <ion-button\n (click)=\"dismiss()\"\n [disabled]=\"!$date()\"\n [color]=\"$date() ? 'primary' : undefined\"\n [fill]=\"$date() ? 'solid' : undefined\"\n >\n <ion-label>Set</ion-label>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n<ion-content>\n <ion-datetime\n [value]=\"$date()\"\n [max]=\"max()\"\n (ionChange)=\"onDateChanged($event)\"\n presentation=\"date\"\n />\n</ion-content>\n"]}
@@ -1,23 +1,22 @@
1
- import { Component, Input, inject } from '@angular/core';
2
- import { ModalController, IonButton, IonButtons, IonIcon, IonItem, IonLabel, } from '@ionic/angular/standalone';
1
+ import { Component, inject, ChangeDetectionStrategy, input } from '@angular/core';
2
+ import { ModalController, IonButton, IonButtons, IonIcon, IonItem, IonLabel, } from '@ionic/angular';
3
3
  import * as i0 from "@angular/core";
4
4
  export class DialogHeaderComponent {
5
5
  constructor() {
6
6
  this.modalController = inject(ModalController);
7
- this.dialogTitle = 'Dialog';
7
+ this.dialogTitle = input('Dialog', /* @ts-ignore */
8
+ ...(ngDevMode ? [{ debugName: "dialogTitle" }] : /* istanbul ignore next */ []));
8
9
  }
9
10
  close(event) {
10
11
  event.stopPropagation();
11
12
  event.preventDefault();
12
13
  this.modalController.dismiss().catch(console.error);
13
14
  }
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: DialogHeaderComponent, isStandalone: true, selector: "sneat-dialog-header", inputs: { dialogTitle: "dialogTitle" }, ngImport: i0, template: "<ion-item color=\"primary\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ dialogTitle }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button (click)=\"close($event)\">\n <ion-icon name=\"close-outline\" />\n </ion-button>\n </ion-buttons>\n</ion-item>\n", dependencies: [{ kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }] }); }
15
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: DialogHeaderComponent, isStandalone: true, selector: "sneat-dialog-header", inputs: { dialogTitle: { classPropertyName: "dialogTitle", publicName: "dialogTitle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ion-item color=\"primary\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ dialogTitle() }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button (click)=\"close($event)\">\n <ion-icon name=\"close-outline\" />\n </ion-button>\n </ion-buttons>\n</ion-item>\n", dependencies: [{ kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"], outputs: ["ionFocus", "ionBlur"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16
17
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DialogHeaderComponent, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DialogHeaderComponent, decorators: [{
18
19
  type: Component,
19
- args: [{ selector: 'sneat-dialog-header', imports: [IonItem, IonLabel, IonButtons, IonButton, IonIcon], template: "<ion-item color=\"primary\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ dialogTitle }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button (click)=\"close($event)\">\n <ion-icon name=\"close-outline\" />\n </ion-button>\n </ion-buttons>\n</ion-item>\n" }]
20
- }], propDecorators: { dialogTitle: [{
21
- type: Input
22
- }] } });
20
+ args: [{ selector: 'sneat-dialog-header', changeDetection: ChangeDetectionStrategy.OnPush, imports: [IonItem, IonLabel, IonButtons, IonButton, IonIcon], template: "<ion-item color=\"primary\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ dialogTitle() }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button (click)=\"close($event)\">\n <ion-icon name=\"close-outline\" />\n </ion-button>\n </ion-buttons>\n</ion-item>\n" }]
21
+ }], propDecorators: { dialogTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogTitle", required: false }] }] } });
23
22
  //# sourceMappingURL=dialog-header.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-header.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/dialog-header/dialog-header.component.ts","../../../../../../libs/components/src/lib/dialog-header/dialog-header.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,EACP,QAAQ,GACT,MAAM,2BAA2B,CAAC;;AAOnC,MAAM,OAAO,qBAAqB;IALlC;QAMmB,oBAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAElD,gBAAW,GAAG,QAAQ,CAAC;KAOjC;IALC,KAAK,CAAC,KAAY;QAChB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;8GATU,qBAAqB;kGAArB,qBAAqB,uHCflC,oRAQA,4CDKY,OAAO,0NAAE,QAAQ,6FAAE,UAAU,8EAAE,SAAS,oPAAE,OAAO;;2FAEhD,qBAAqB;kBALjC,SAAS;+BACE,qBAAqB,WAEtB,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC;;sBAK3D,KAAK","sourcesContent":["import { Component, Input, inject } from '@angular/core';\nimport {\n ModalController,\n IonButton,\n IonButtons,\n IonIcon,\n IonItem,\n IonLabel,\n} from '@ionic/angular/standalone';\n\n@Component({\n selector: 'sneat-dialog-header',\n templateUrl: './dialog-header.component.html',\n imports: [IonItem, IonLabel, IonButtons, IonButton, IonIcon],\n})\nexport class DialogHeaderComponent {\n private readonly modalController = inject(ModalController);\n\n @Input() dialogTitle = 'Dialog';\n\n close(event: Event): void {\n event.stopPropagation();\n event.preventDefault();\n this.modalController.dismiss().catch(console.error);\n }\n}\n","<ion-item color=\"primary\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ dialogTitle }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button (click)=\"close($event)\">\n <ion-icon name=\"close-outline\" />\n </ion-button>\n </ion-buttons>\n</ion-item>\n"]}
1
+ {"version":3,"file":"dialog-header.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/dialog-header/dialog-header.component.ts","../../../../../../libs/components/src/lib/dialog-header/dialog-header.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,EACP,QAAQ,GACT,MAAM,gBAAgB,CAAC;;AAQxB,MAAM,OAAO,qBAAqB;IANlC;QAOmB,oBAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAElD,gBAAW,GAAG,KAAK,CAAC,QAAQ;wFAAC,CAAC;KAOxC;IALC,KAAK,CAAC,KAAY;QAChB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;8GATU,qBAAqB;kGAArB,qBAAqB,qOChBlC,sRAQA,4CDMY,OAAO,0NAAE,QAAQ,6FAAE,UAAU,8EAAE,SAAS,sRAAE,OAAO;;2FAEhD,qBAAqB;kBANjC,SAAS;+BACE,qBAAqB,mBAEd,uBAAuB,CAAC,MAAM,WACtC,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC","sourcesContent":["import { Component, inject, ChangeDetectionStrategy, input } from '@angular/core';\nimport {\n ModalController,\n IonButton,\n IonButtons,\n IonIcon,\n IonItem,\n IonLabel,\n} from '@ionic/angular';\n\n@Component({\n selector: 'sneat-dialog-header',\n templateUrl: './dialog-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [IonItem, IonLabel, IonButtons, IonButton, IonIcon],\n})\nexport class DialogHeaderComponent {\n private readonly modalController = inject(ModalController);\n\n readonly dialogTitle = input('Dialog');\n\n close(event: Event): void {\n event.stopPropagation();\n event.preventDefault();\n this.modalController.dismiss().catch(console.error);\n }\n}\n","<ion-item color=\"primary\" class=\"sneat-tiny-end-padding\">\n <ion-label>{{ dialogTitle() }}</ion-label>\n <ion-buttons slot=\"end\">\n <ion-button (click)=\"close($event)\">\n <ion-icon name=\"close-outline\" />\n </ion-button>\n </ion-buttons>\n</ion-item>\n"]}
@@ -1,14 +1,14 @@
1
1
  import { JsonPipe } from '@angular/common';
2
- import { Component, Input } from '@angular/core';
3
- import { IonCard, IonCardContent, IonCardHeader, IonCardTitle, IonItem, IonTextarea, } from '@ionic/angular/standalone';
2
+ import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
3
+ import { IonCard, IonCardContent, IonCardHeader, IonCardTitle, IonItem, IonTextarea, } from '@ionic/angular';
4
4
  import * as i0 from "@angular/core";
5
5
  export class SneatErrorCardComponent {
6
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: SneatErrorCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: SneatErrorCardComponent, isStandalone: true, selector: "sneat-datatug-error-card", inputs: { error: "error" }, ngImport: i0, template: "<ion-card>\n <ion-card-header>\n <ion-card-title color=\"danger\">Error</ion-card-title>\n </ion-card-header>\n <ion-card-content>\n @if (error?.message) {\n <p>\n {{ error?.message }}\n </p>\n }\n <ion-item>\n <ion-textarea\n readonly=\"true\"\n [value]=\"error | json\"\n autoGrow=\"true\"\n color=\"medium\"\n />\n </ion-item>\n </ion-card-content>\n</ion-card>\n", dependencies: [{ kind: "component", type: IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonTextarea, selector: "ion-textarea", inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "shape", "spellcheck", "value", "wrap"] }, { kind: "pipe", type: JsonPipe, name: "json" }] }); }
6
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SneatErrorCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: SneatErrorCardComponent, isStandalone: true, selector: "sneat-datatug-error-card", inputs: { error: "error" }, ngImport: i0, template: "<ion-card>\n <ion-card-header>\n <ion-card-title color=\"danger\">Error</ion-card-title>\n </ion-card-header>\n <ion-card-content>\n @if (error?.message) {\n <p>\n {{ error?.message }}\n </p>\n }\n <ion-item>\n <ion-textarea\n readonly=\"true\"\n [value]=\"error | json\"\n autoGrow=\"true\"\n color=\"medium\"\n />\n </ion-item>\n </ion-card-content>\n</ion-card>\n", dependencies: [{ kind: "component", type: IonCard, selector: "ion-card", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonCardHeader, selector: "ion-card-header", inputs: ["color", "mode", "translucent"] }, { kind: "component", type: IonCardTitle, selector: "ion-card-title", inputs: ["color", "mode"] }, { kind: "component", type: IonCardContent, selector: "ion-card-content", inputs: ["mode"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonTextarea, selector: "ion-textarea", inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "shape", "spellcheck", "value", "wrap"] }, { kind: "pipe", type: JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8
8
  }
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: SneatErrorCardComponent, decorators: [{
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SneatErrorCardComponent, decorators: [{
10
10
  type: Component,
11
- args: [{ selector: 'sneat-datatug-error-card', imports: [
11
+ args: [{ selector: 'sneat-datatug-error-card', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
12
12
  IonCard,
13
13
  IonCardHeader,
14
14
  IonCardTitle,
@@ -1 +1 @@
1
- {"version":3,"file":"sneat-error-card.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/error-card/sneat-error-card.component.ts","../../../../../../libs/components/src/lib/error-card/sneat-error-card.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,OAAO,EACP,WAAW,GACZ,MAAM,2BAA2B,CAAC;;AAenC,MAAM,OAAO,uBAAuB;8GAAvB,uBAAuB;kGAAvB,uBAAuB,gHCxBpC,0bAoBA,4CDLI,OAAO,yLACP,aAAa,sGACb,YAAY,sFACZ,cAAc,+EACd,OAAO,0NACP,WAAW,4ZACX,QAAQ;;2FAGC,uBAAuB;kBAbnC,SAAS;+BACE,0BAA0B,WAE3B;wBACP,OAAO;wBACP,aAAa;wBACb,YAAY;wBACZ,cAAc;wBACd,OAAO;wBACP,WAAW;wBACX,QAAQ;qBACT;;sBAGA,KAAK","sourcesContent":["import { JsonPipe } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport {\n IonCard,\n IonCardContent,\n IonCardHeader,\n IonCardTitle,\n IonItem,\n IonTextarea,\n} from '@ionic/angular/standalone';\n\n@Component({\n selector: 'sneat-datatug-error-card',\n templateUrl: './sneat-error-card.component.html',\n imports: [\n IonCard,\n IonCardHeader,\n IonCardTitle,\n IonCardContent,\n IonItem,\n IonTextarea,\n JsonPipe,\n ],\n})\nexport class SneatErrorCardComponent {\n @Input()\n error?: { message?: string };\n}\n","<ion-card>\n <ion-card-header>\n <ion-card-title color=\"danger\">Error</ion-card-title>\n </ion-card-header>\n <ion-card-content>\n @if (error?.message) {\n <p>\n {{ error?.message }}\n </p>\n }\n <ion-item>\n <ion-textarea\n readonly=\"true\"\n [value]=\"error | json\"\n autoGrow=\"true\"\n color=\"medium\"\n />\n </ion-item>\n </ion-card-content>\n</ion-card>\n"]}
1
+ {"version":3,"file":"sneat-error-card.component.js","sourceRoot":"","sources":["../../../../../../libs/components/src/lib/error-card/sneat-error-card.component.ts","../../../../../../libs/components/src/lib/error-card/sneat-error-card.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,OAAO,EACP,WAAW,GACZ,MAAM,gBAAgB,CAAC;;AAgBxB,MAAM,OAAO,uBAAuB;8GAAvB,uBAAuB;kGAAvB,uBAAuB,gHCzBpC,0bAoBA,4CDJI,OAAO,yLACP,aAAa,sGACb,YAAY,sFACZ,cAAc,+EACd,OAAO,0NACP,WAAW,4ZACX,QAAQ;;2FAGC,uBAAuB;kBAdnC,SAAS;+BACE,0BAA0B,mBAEnB,uBAAuB,CAAC,MAAM,WACtC;wBACP,OAAO;wBACP,aAAa;wBACb,YAAY;wBACZ,cAAc;wBACd,OAAO;wBACP,WAAW;wBACX,QAAQ;qBACT;;sBAKA,KAAK","sourcesContent":["import { JsonPipe } from '@angular/common';\nimport { Component, Input, ChangeDetectionStrategy } from '@angular/core';\nimport {\n IonCard,\n IonCardContent,\n IonCardHeader,\n IonCardTitle,\n IonItem,\n IonTextarea,\n} from '@ionic/angular';\n\n@Component({\n selector: 'sneat-datatug-error-card',\n templateUrl: './sneat-error-card.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n IonCard,\n IonCardHeader,\n IonCardTitle,\n IonCardContent,\n IonItem,\n IonTextarea,\n JsonPipe,\n ],\n})\nexport class SneatErrorCardComponent {\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input()\n error?: { message?: string };\n}\n","<ion-card>\n <ion-card-header>\n <ion-card-title color=\"danger\">Error</ion-card-title>\n </ion-card-header>\n <ion-card-content>\n @if (error?.message) {\n <p>\n {{ error?.message }}\n </p>\n }\n <ion-item>\n <ion-textarea\n readonly=\"true\"\n [value]=\"error | json\"\n autoGrow=\"true\"\n color=\"medium\"\n />\n </ion-item>\n </ion-card-content>\n</ion-card>\n"]}