import { HttpClient } from '@angular/common/http'; import { AppConfigService, BaseService } from '../../../shared'; import { ListService } from '../../../shared/services/list.service'; import { WidgetAdminStore } from './widget-admin.store'; import { WidgetModel } from '../models/widget.model'; import * as i0 from "@angular/core"; /** Which style blob is being edited (controls which keys are object→JSON-string). */ export type WidgetAdminStyleKind = 'widget' | 'item' | 'badge'; /** Widget root `record.style` — user may pass JSON objects; API expects JSON strings. */ export declare const WIDGET_ROOT_STYLE_JSON_KEYS: readonly string[]; /** `dataItems[].style` */ export declare const WIDGET_DATA_ITEM_STYLE_JSON_KEYS: readonly string[]; /** `badges[].style` */ export declare const WIDGET_BADGE_STYLE_JSON_KEYS: readonly string[]; /** * Service for managing widget configurations. */ export declare class WidgetAdminService extends BaseService { protected apiManagementStore: WidgetAdminStore; private configService; constructor(http: HttpClient, apiManagementStore: WidgetAdminStore, configService: AppConfigService, listService: ListService); protected list: any; /** * Cleans and parses a malformed style JSON string * @param {string} rawStyleStr - The raw style string from API or DB * @returns {Record | null} - Parsed style object or null if parsing fails */ sanitizeStyleString(rawStyleStr: string): Record | null; private styleJsonKeysForKind; /** * For the listed keys only: plain objects → JSON string so the payload matches the API. * Other keys (width, hasSeparator, plain strings, etc.) are unchanged. */ private stringifyStyleJsonKeys; /** * Minify JSON blob strings for known keys (parseable object/array → stable JSON string). */ private canonicalizeJsonBlobStrings; /** Final pass before PUT/POST for this style level. */ private finalizeStylePayloadForApi; /** * Fixes `"styleExpression": "{"a":1}"` (invalid JSON) by re-encoding the inner object as a proper JSON string value. */ private repairBrokenQuotedJsonObjectValues; /** * Converts widget / item / badge style for text-box binding (avoids "[object Object]"). */ coerceStyleToJsonText(value: unknown, kind?: WidgetAdminStyleKind): string; /** * Parses style from form (string or object) and returns an object payload for API submit. */ parseStylePayload(input: unknown, kind?: WidgetAdminStyleKind): Record; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }