@haloduck/ui 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/haloduck-ui.mjs +8 -5
- package/fesm2022/haloduck-ui.mjs.map +1 -1
- package/index.d.ts +2 -1
- package/package.json +1 -1
package/fesm2022/haloduck-ui.mjs
CHANGED
|
@@ -2152,6 +2152,7 @@ class MapToAddressComponent {
|
|
|
2152
2152
|
mapId = this.coreService.getMapId();
|
|
2153
2153
|
defaultLngLat = this.coreService.getDefaultLngLat();
|
|
2154
2154
|
disabled = false;
|
|
2155
|
+
language = 'en';
|
|
2155
2156
|
currentLngLat;
|
|
2156
2157
|
_currentAddress;
|
|
2157
2158
|
_isGoogleLoaded = false;
|
|
@@ -2188,7 +2189,7 @@ class MapToAddressComponent {
|
|
|
2188
2189
|
}
|
|
2189
2190
|
}
|
|
2190
2191
|
catch (error) {
|
|
2191
|
-
this._loadError = 'Google Maps API
|
|
2192
|
+
this._loadError = 'Unable to load Google Maps API.';
|
|
2192
2193
|
isDevMode() && console.error('Failed to load Google Maps API:', error);
|
|
2193
2194
|
}
|
|
2194
2195
|
}
|
|
@@ -2200,7 +2201,7 @@ class MapToAddressComponent {
|
|
|
2200
2201
|
return;
|
|
2201
2202
|
}
|
|
2202
2203
|
const script = document.createElement('script');
|
|
2203
|
-
script.src = `https://maps.googleapis.com/maps/api/js?key=${this.coreService.getGoogleApiKey()}&libraries=places,marker&loading=sync`;
|
|
2204
|
+
script.src = `https://maps.googleapis.com/maps/api/js?key=${this.coreService.getGoogleApiKey()}&libraries=places,marker&loading=sync&language=${this.language}`;
|
|
2204
2205
|
script.async = false;
|
|
2205
2206
|
script.defer = true;
|
|
2206
2207
|
script.onload = () => {
|
|
@@ -2370,13 +2371,13 @@ class MapToAddressComponent {
|
|
|
2370
2371
|
this.disabled = isDisabled;
|
|
2371
2372
|
}
|
|
2372
2373
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: MapToAddressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2373
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2374
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: MapToAddressComponent, isStandalone: true, selector: "haloduck-map-to-address", inputs: { disabled: "disabled", language: "language", currentLngLat: "currentLngLat", currentAddress: "currentAddress" }, outputs: { locationChanged: "locationChanged" }, providers: [
|
|
2374
2375
|
{
|
|
2375
2376
|
provide: NG_VALUE_ACCESSOR,
|
|
2376
2377
|
useExisting: MapToAddressComponent,
|
|
2377
2378
|
multi: true,
|
|
2378
2379
|
},
|
|
2379
|
-
], ngImport: i0, template: "<div class=\"w-full h-full relative\">\n <!-- \uB85C\uB529 \uC0C1\uD0DC -->\n
|
|
2380
|
+
], ngImport: i0, template: "<div class=\"w-full h-full relative\">\n <!-- \uB85C\uB529 \uC0C1\uD0DC -->\n @if(!isGoogleLoaded && !loadError) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-gray-100 z-10\">\n <div class=\"text-center\">\n <div class=\"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-2\"></div>\n <p class=\"text-gray-600 text-sm\">\uC9C0\uB3C4\uB97C \uB85C\uB529 \uC911\uC785\uB2C8\uB2E4...</p>\n </div>\n </div>\n }\n\n <!-- \uC5D0\uB7EC \uC0C1\uD0DC -->\n @if(loadError) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-red-50 z-10\">\n <div class=\"text-center p-4\">\n <div class=\"text-red-500 text-2xl mb-2\">\u26A0\uFE0F</div>\n <p class=\"text-red-700 text-sm font-medium\">{{ loadError }}</p>\n <p class=\"text-red-600 text-xs mt-1\">Please check your internet connection and refresh the page.</p>\n </div>\n </div>\n }\n\n <div id=\"map\"\n class=\"w-full h-full\"></div>\n</div>\n", styles: ["#map{border:1px solid #ccc;margin-bottom:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }] });
|
|
2380
2381
|
}
|
|
2381
2382
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: MapToAddressComponent, decorators: [{
|
|
2382
2383
|
type: Component,
|
|
@@ -2386,9 +2387,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
2386
2387
|
useExisting: MapToAddressComponent,
|
|
2387
2388
|
multi: true,
|
|
2388
2389
|
},
|
|
2389
|
-
], template: "<div class=\"w-full h-full relative\">\n <!-- \uB85C\uB529 \uC0C1\uD0DC -->\n
|
|
2390
|
+
], template: "<div class=\"w-full h-full relative\">\n <!-- \uB85C\uB529 \uC0C1\uD0DC -->\n @if(!isGoogleLoaded && !loadError) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-gray-100 z-10\">\n <div class=\"text-center\">\n <div class=\"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-2\"></div>\n <p class=\"text-gray-600 text-sm\">\uC9C0\uB3C4\uB97C \uB85C\uB529 \uC911\uC785\uB2C8\uB2E4...</p>\n </div>\n </div>\n }\n\n <!-- \uC5D0\uB7EC \uC0C1\uD0DC -->\n @if(loadError) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-red-50 z-10\">\n <div class=\"text-center p-4\">\n <div class=\"text-red-500 text-2xl mb-2\">\u26A0\uFE0F</div>\n <p class=\"text-red-700 text-sm font-medium\">{{ loadError }}</p>\n <p class=\"text-red-600 text-xs mt-1\">Please check your internet connection and refresh the page.</p>\n </div>\n </div>\n }\n\n <div id=\"map\"\n class=\"w-full h-full\"></div>\n</div>\n", styles: ["#map{border:1px solid #ccc;margin-bottom:10px}\n"] }]
|
|
2390
2391
|
}], propDecorators: { disabled: [{
|
|
2391
2392
|
type: Input
|
|
2393
|
+
}], language: [{
|
|
2394
|
+
type: Input
|
|
2392
2395
|
}], currentLngLat: [{
|
|
2393
2396
|
type: Input
|
|
2394
2397
|
}], currentAddress: [{
|