commons-shared-web-ui 0.0.15 → 0.0.17
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/index.d.ts
CHANGED
|
@@ -1720,9 +1720,62 @@ interface AttachmentConfig {
|
|
|
1720
1720
|
features?: string[];
|
|
1721
1721
|
}
|
|
1722
1722
|
interface LocationConfig {
|
|
1723
|
+
/** Default active tab: 'VENUE' | 'ONLINE' | 'TBA'. Defaults to 'VENUE'. */
|
|
1724
|
+
defaultTab?: 'VENUE' | 'ONLINE' | 'TBA';
|
|
1725
|
+
/** Allow multiple locations. Replaces the need for maxLocations. */
|
|
1726
|
+
allowMulti?: boolean;
|
|
1727
|
+
/** Maximum number of venue locations allowed. Defaults to 5 if allowMulti is true. */
|
|
1728
|
+
maxLocations?: number;
|
|
1729
|
+
/** Placeholder for the venue search input */
|
|
1730
|
+
venuePlaceholder?: string;
|
|
1731
|
+
/** Google Maps API Key – required for map rendering and autocomplete */
|
|
1732
|
+
googleMapsApiKey?: string;
|
|
1733
|
+
/** Height of the embedded Google Map. Defaults to '300px'. */
|
|
1734
|
+
mapHeight?: string;
|
|
1735
|
+
/** Default map center latitude when no locations are added (e.g., India: 20.5937) */
|
|
1736
|
+
defaultLat?: number;
|
|
1737
|
+
/** Default map center longitude when no locations are added (e.g., India: 78.9629) */
|
|
1738
|
+
defaultLng?: number;
|
|
1739
|
+
/** Default zoom level when no locations are added (e.g., 4) */
|
|
1740
|
+
defaultZoom?: number;
|
|
1741
|
+
/** Placeholder for the online event URL input */
|
|
1742
|
+
onlinePlaceholder?: string;
|
|
1743
|
+
/** Show map preview after locations are added (default: true) */
|
|
1744
|
+
showMap?: boolean;
|
|
1745
|
+
/** Whether the current location button is enabled inside venue tab */
|
|
1723
1746
|
enableCurrentLocation?: boolean;
|
|
1747
|
+
/** @deprecated Use showMap instead */
|
|
1724
1748
|
enableMapPicker?: boolean;
|
|
1725
1749
|
}
|
|
1750
|
+
/** A single venue location picked from Google Places autocomplete. */
|
|
1751
|
+
interface LocationItem {
|
|
1752
|
+
uuid?: string;
|
|
1753
|
+
isActive?: boolean;
|
|
1754
|
+
id?: number;
|
|
1755
|
+
locationCode?: string;
|
|
1756
|
+
latitude?: number;
|
|
1757
|
+
longitude?: number;
|
|
1758
|
+
address?: string;
|
|
1759
|
+
name?: string;
|
|
1760
|
+
cityLabel?: string;
|
|
1761
|
+
stateLabel?: string;
|
|
1762
|
+
countryLabel?: string;
|
|
1763
|
+
placeId?: string;
|
|
1764
|
+
type?: string;
|
|
1765
|
+
/** Legacy field for UI binding */
|
|
1766
|
+
description?: string;
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* Value shape stored in the FormControl for a LOCATION field.
|
|
1770
|
+
* `tab` indicates which mode is active.
|
|
1771
|
+
*/
|
|
1772
|
+
interface LocationFieldValue {
|
|
1773
|
+
tab: 'VENUE' | 'ONLINE' | 'TBA';
|
|
1774
|
+
/** Array of venue locations (only valid when tab === 'VENUE') */
|
|
1775
|
+
venues?: LocationItem[];
|
|
1776
|
+
/** Event URL (only valid when tab === 'ONLINE') */
|
|
1777
|
+
onlineUrl?: string;
|
|
1778
|
+
}
|
|
1726
1779
|
interface RatingConfig {
|
|
1727
1780
|
maxRating?: number;
|
|
1728
1781
|
allowHalf?: boolean;
|
|
@@ -1962,6 +2015,22 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1962
2015
|
libraryLoading: boolean;
|
|
1963
2016
|
libraryError: string;
|
|
1964
2017
|
mediaUploadError: string;
|
|
2018
|
+
/** Active tab: VENUE | ONLINE | TBA */
|
|
2019
|
+
locationActiveTab: 'VENUE' | 'ONLINE' | 'TBA';
|
|
2020
|
+
/** Current text in the venue search box */
|
|
2021
|
+
locationSearchText: string;
|
|
2022
|
+
/** Google Places autocomplete suggestions */
|
|
2023
|
+
locationSuggestions: any[];
|
|
2024
|
+
/** Show the suggestions dropdown */
|
|
2025
|
+
locationShowSuggestions: boolean;
|
|
2026
|
+
/** Cached Google AutocompleteService instance */
|
|
2027
|
+
private _googleAcService;
|
|
2028
|
+
/** Whether Google Maps is loaded */
|
|
2029
|
+
locationMapLoaded: boolean;
|
|
2030
|
+
/** Map instance */
|
|
2031
|
+
private _googleMap;
|
|
2032
|
+
/** Map markers */
|
|
2033
|
+
private _mapMarkers;
|
|
1965
2034
|
/** FormControl used ONLY for the autocomplete text-input display value */
|
|
1966
2035
|
autocompleteInputCtrl: FormControl<string>;
|
|
1967
2036
|
/** Filtered option list shown in the mat-autocomplete panel */
|
|
@@ -2063,6 +2132,7 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
2063
2132
|
get isGenerated(): boolean;
|
|
2064
2133
|
get isRow(): boolean;
|
|
2065
2134
|
get isGroup(): boolean;
|
|
2135
|
+
get isLocation(): boolean;
|
|
2066
2136
|
/**
|
|
2067
2137
|
* Initialise the separate display-control that drives the mat-autocomplete
|
|
2068
2138
|
* text input. The real form control always stores the *code* value.
|
|
@@ -2125,6 +2195,21 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
2125
2195
|
removeMediaItem(index: number): void;
|
|
2126
2196
|
private _appendMediaItem;
|
|
2127
2197
|
private showMediaError;
|
|
2198
|
+
private initLocationField;
|
|
2199
|
+
private _ensureGoogleMapsScript;
|
|
2200
|
+
onLocationTabChange(tab: 'VENUE' | 'ONLINE' | 'TBA'): void;
|
|
2201
|
+
get locationValue(): LocationFieldValue;
|
|
2202
|
+
get locationVenues(): LocationItem[];
|
|
2203
|
+
get locationOnlineUrl(): string;
|
|
2204
|
+
get locationMaxReached(): boolean;
|
|
2205
|
+
handleLocationSearchInput(event: Event): void;
|
|
2206
|
+
onLocationSuggestionSelect(prediction: any): void;
|
|
2207
|
+
private _addVenueAndUpdate;
|
|
2208
|
+
removeLocationVenue(index: number): void;
|
|
2209
|
+
onLocationUrlChange(url: string): void;
|
|
2210
|
+
hideLocationSuggestions(): void;
|
|
2211
|
+
getLocationMapEmbedUrl(): string;
|
|
2212
|
+
private _renderMap;
|
|
2128
2213
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
|
|
2129
2214
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "lib-form-field", never, { "config": { "alias": "config"; "required": false; }; "controller": { "alias": "controller"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "allowMulti": { "alias": "allowMulti"; "required": false; }; }, {}, never, never, false, never>;
|
|
2130
2215
|
}
|
|
@@ -2418,6 +2503,8 @@ interface TableFilter {
|
|
|
2418
2503
|
valuePath?: string;
|
|
2419
2504
|
requestKey?: string;
|
|
2420
2505
|
dataPath?: string;
|
|
2506
|
+
handling?: 'standard' | 'nested_string';
|
|
2507
|
+
nestedStringConfig?: NestedStringConfig;
|
|
2421
2508
|
}
|
|
2422
2509
|
interface TableActionItem {
|
|
2423
2510
|
label: string;
|
|
@@ -2597,6 +2684,8 @@ declare class SmartTableModule {
|
|
|
2597
2684
|
static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
|
|
2598
2685
|
}
|
|
2599
2686
|
|
|
2687
|
+
declare function appendBaseUrlRecursively(obj: any, baseURL: string): void;
|
|
2688
|
+
|
|
2600
2689
|
declare class ValidationUtils {
|
|
2601
2690
|
static email(): ValidatorFn;
|
|
2602
2691
|
static phone(): ValidatorFn;
|
|
@@ -2620,6 +2709,7 @@ declare const SAMPLE_FORMS: {
|
|
|
2620
2709
|
demandDefinitionForm: string;
|
|
2621
2710
|
projectInfoForm: string;
|
|
2622
2711
|
faqForm: string;
|
|
2712
|
+
locationForm: string;
|
|
2623
2713
|
};
|
|
2624
2714
|
|
|
2625
2715
|
declare const smartForm_examples_d_SAMPLE_FORMS: typeof SAMPLE_FORMS;
|
|
@@ -2643,5 +2733,5 @@ declare class SnackbarModule {
|
|
|
2643
2733
|
static ɵinj: i0.ɵɵInjectorDeclaration<SnackbarModule>;
|
|
2644
2734
|
}
|
|
2645
2735
|
|
|
2646
|
-
export { AlertComponent, AlertModule, ButtonComponent, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FormComponentsModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
|
|
2736
|
+
export { AlertComponent, AlertModule, ButtonComponent, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FormComponentsModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
|
|
2647
2737
|
export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig$1 as OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableConfig, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
|