@masterteam/components 0.0.248 → 0.0.250

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-components.mjs","sources":["../../../../packages/masterteam/components/src/lib/utils/theme.ts","../../../../packages/masterteam/components/src/lib/config/ds-identity.tokens.ts","../../../../packages/masterteam/components/src/lib/config/ds-identity.preset.ts","../../../../packages/masterteam/components/src/lib/config/providemt.ts","../../../../packages/masterteam/components/src/lib/config/povide-messages.ts","../../../../packages/masterteam/components/src/lib/config/provide-confirmation.ts","../../../../packages/masterteam/components/src/lib/config/date-format.config.ts","../../../../packages/masterteam/components/src/lib/config/dynamic-form.model.ts","../../../../packages/masterteam/components/src/lib/base/base.facade.ts","../../../../packages/masterteam/components/src/lib/utils/entity-adapter.ts","../../../../packages/masterteam/components/src/lib/utils/state-helpers.ts","../../../../packages/masterteam/components/src/lib/utils/api-request.helper.ts","../../../../packages/masterteam/components/src/lib/base/crud-base.state.ts","../../../../packages/masterteam/components/src/lib/utils/inputs.ts","../../../../packages/masterteam/components/src/lib/utils/http-context.ts","../../../../packages/masterteam/components/src/lib/utils/color.utils.ts","../../../../packages/masterteam/components/src/lib/pipes/mt-date-format.pipe.ts","../../../../packages/masterteam/components/src/public-api.ts","../../../../packages/masterteam/components/src/masterteam-components.ts"],"sourcesContent":["type HSLTuple = [number, number, number]; // [hue, saturation, lightness]\r\ntype TailwindColorPalette = {\r\n [key: string]: string; // e.g., '50': '#f0f9ff', '500': '#0284c7'\r\n};\r\n\r\n/**\r\n * Converts a hex color string to an HSL tuple.\r\n * @param hex - The hex color string (e.g., \"#RRGGBB\" or \"#RGB\").\r\n * @returns An HSL tuple [hue, saturation, lightness] where hue is in degrees (0-360),\r\n * and saturation/lightness are percentages (0-100).\r\n */\r\nfunction hexToHsl(hex: string): HSLTuple {\r\n let r: number = 0,\r\n g: number = 0,\r\n b: number = 0;\r\n\r\n // Handle shorthand hex codes\r\n if (hex.length === 4) {\r\n r = parseInt(hex[1] + hex[1], 16);\r\n g = parseInt(hex[2] + hex[2], 16);\r\n b = parseInt(hex[3] + hex[3], 16);\r\n } else if (hex.length === 7) {\r\n r = parseInt(hex.substring(1, 3), 16);\r\n g = parseInt(hex.substring(3, 5), 16);\r\n b = parseInt(hex.substring(5, 7), 16);\r\n } else {\r\n throw new Error('Invalid hex color format. Expected #RGB or #RRGGBB.');\r\n }\r\n\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n\r\n const max: number = Math.max(r, g, b);\r\n const min: number = Math.min(r, g, b);\r\n let h: number = 0,\r\n s: number;\r\n const l: number = (max + min) / 2;\r\n\r\n if (max === min) {\r\n h = s = 0; // achromatic\r\n } else {\r\n const d: number = max - min;\r\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\r\n switch (max) {\r\n case r:\r\n h = (g - b) / d + (g < b ? 6 : 0);\r\n break;\r\n case g:\r\n h = (b - r) / d + 2;\r\n break;\r\n case b:\r\n h = (r - g) / d + 4;\r\n break;\r\n }\r\n h /= 6;\r\n }\r\n\r\n return [h * 360, s * 100, l * 100]; // HSL in degrees, percentage, percentage\r\n}\r\n\r\n/**\r\n * Converts HSL values to a hex color string.\r\n * @param h - Hue (0-360).\r\n * @param s - Saturation (0-100).\r\n * @param l - Lightness (0-100).\r\n * @returns The hex color string (e.g., \"#RRGGBB\").\r\n */\r\nfunction hslToHex(h: number, s: number, l: number): string {\r\n l /= 100;\r\n const a: number = (s * Math.min(l, 1 - l)) / 100;\r\n const f = (n: number): string => {\r\n const k: number = (n + h / 30) % 12;\r\n const color: number = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\r\n return Math.round(255 * color)\r\n .toString(16)\r\n .padStart(2, '0');\r\n };\r\n return `#${f(0)}${f(8)}${f(4)}`;\r\n}\r\n\r\n/**\r\n * Generates a Tailwind-like color palette (50-950) from a primary color (assumed to be 500).\r\n *\r\n * @param primaryColor500 - The hex string of the primary color (e.g., \"#0284c7\").\r\n * @returns An object representing the color palette, where keys are color numbers (e.g., \"50\", \"100\")\r\n * and values are hex color strings.\r\n */\r\n// export function generateTailwindPalette(\r\n// primaryColor500: string,\r\n// ): TailwindColorPalette {\r\n// const [h, s, _l]: HSLTuple = hexToHsl(primaryColor500);\r\n//\r\n// const palette: TailwindColorPalette = {\r\n// '500': primaryColor500,\r\n// };\r\n//\r\n// // Define steps for lighter shades (50 - 400)\r\n// const lightnessStepsLighter: { [key: string]: number } = {\r\n// '50': 95,\r\n// '100': 90,\r\n// '200': 80,\r\n// '300': 70,\r\n// '400': 60,\r\n// };\r\n//\r\n// const saturationReductionsLighter: { [key: string]: number } = {\r\n// '50': 40, // More desaturated\r\n// '100': 30,\r\n// '200': 20,\r\n// '300': 10,\r\n// '400': 5, // Slightly desaturated\r\n// };\r\n//\r\n// for (const shade in lightnessStepsLighter) {\r\n// if (Object.prototype.hasOwnProperty.call(lightnessStepsLighter, shade)) {\r\n// const newL: number = lightnessStepsLighter[shade];\r\n// // Ensure saturation doesn't go below 0\r\n// const newS: number = Math.max(0, s - saturationReductionsLighter[shade]);\r\n// palette[shade] = hslToHex(h, newS, newL);\r\n// }\r\n// }\r\n//\r\n// // Define steps for darker shades (600 - 950)\r\n// const lightnessStepsDarker: { [key: string]: number } = {\r\n// '600': 45,\r\n// '700': 35,\r\n// '800': 25,\r\n// '900': 15,\r\n// '950': 8, // More aggressive darkening for 950\r\n// };\r\n//\r\n// const saturationIncreasesDarker: { [key: string]: number } = {\r\n// '600': 5,\r\n// '700': 10,\r\n// '800': 15,\r\n// '900': 20,\r\n// '950': 25, // Can increase saturation for darker shades\r\n// };\r\n//\r\n// for (const shade in lightnessStepsDarker) {\r\n// if (Object.prototype.hasOwnProperty.call(lightnessStepsDarker, shade)) {\r\n// const newL: number = lightnessStepsDarker[shade];\r\n// // Ensure saturation doesn't exceed 100\r\n// const newS: number = Math.min(100, s + saturationIncreasesDarker[shade]);\r\n// palette[shade] = hslToHex(h, newS, newL);\r\n// }\r\n// }\r\n//\r\n// // Sort the keys numerically to ensure consistent order\r\n// const sortedPalette: TailwindColorPalette = {};\r\n// Object.keys(palette)\r\n// .sort((a, b) => parseInt(a) - parseInt(b))\r\n// .forEach((key: string) => {\r\n// sortedPalette[key] = palette[key];\r\n// });\r\n//\r\n// return sortedPalette;\r\n// }\r\n\r\n// Define the specific shade keys\r\nexport type PaletteShade =\r\n | '0'\r\n | '50'\r\n | '100'\r\n | '200'\r\n | '300'\r\n | '400'\r\n | '500'\r\n | '600'\r\n | '700'\r\n | '800'\r\n | '900'\r\n | '950';\r\n\r\n// A helper type for our new palette profile\r\ntype ShadeProfile = {\r\n /** Target lightness (0-100) */\r\n l: number;\r\n /** Saturation adjustment relative to the 500 shade */\r\n s_adjust: number;\r\n};\r\n\r\n/**\r\n * Defines the \"ideal\" lightness and saturation adjustment for each shade.\r\n * Lightness for 500 is set to 50 as a balanced default.\r\n */\r\nconst PALETTE_PROFILE: Record<PaletteShade, ShadeProfile> = {\r\n '0': { l: 98, s_adjust: -50 },\r\n '50': { l: 95, s_adjust: -40 },\r\n '100': { l: 90, s_adjust: -30 },\r\n '200': { l: 80, s_adjust: -20 },\r\n '300': { l: 70, s_adjust: -10 },\r\n '400': { l: 60, s_adjust: -5 },\r\n '500': { l: 50, s_adjust: 0 },\r\n '600': { l: 45, s_adjust: 5 },\r\n '700': { l: 35, s_adjust: 10 },\r\n '800': { l: 25, s_adjust: 15 },\r\n '900': { l: 15, s_adjust: 20 },\r\n '950': { l: 8, s_adjust: 25 },\r\n};\r\n\r\n// Helper to ensure palette is always in the correct 50-950 order\r\nconst ALL_SHADES: PaletteShade[] = [\r\n '0',\r\n '50',\r\n '100',\r\n '200',\r\n '300',\r\n '400',\r\n '500',\r\n '600',\r\n '700',\r\n '800',\r\n '900',\r\n '950',\r\n];\r\n\r\n/**\r\n * Clamps a number between a min and max value.\r\n */\r\nfunction clamp(value: number, min: number, max: number): number {\r\n return Math.max(min, Math.min(max, value));\r\n}\r\n\r\n/**\r\n * Generates a Tailwind-like color palette (50-950) from any given base color.\r\n *\r\n * @param baseColorHex - The hex string of the base color (e.g., \"#0284c7\").\r\n * @param baseColorShade - The shade of the base color (e.g., \"500\", \"700\").\r\n * @returns An object representing the full color palette.\r\n */\r\nexport function generateTailwindPalette(\r\n baseColorHex: string,\r\n baseColorShade: PaletteShade = '500',\r\n): TailwindColorPalette {\r\n // 1. Get HSL of the input color\r\n const [h_base, s_base, l_base]: HSLTuple = hexToHsl(baseColorHex);\r\n\r\n // 2. Find the anchors\r\n const baseProfile = PALETTE_PROFILE[baseColorShade];\r\n\r\n /** The Hue is constant across the entire palette. */\r\n const h = h_base;\r\n\r\n /**\r\n * Calculate the 500-shade's saturation by \"reversing\" the adjustment\r\n * from the base color.\r\n * e.g., if base is 700 (s_adjust: +10) and s_base is 80,\r\n * s_500 will be 70.\r\n */\r\n const s_500 = clamp(s_base - baseProfile.s_adjust, 0, 100);\r\n\r\n /**\r\n * Calculate the lightness \"offset\". This is the difference between\r\n * the base color's actual lightness and its \"ideal\" lightness\r\n * from the profile.\r\n * e.g., if base is 700 (ideal L: 35) and l_base is 38,\r\n * the offset is +3. This offset will be applied to all shades.\r\n */\r\n const l_offset = l_base - baseProfile.l;\r\n\r\n // 3. Generate the full palette\r\n const palette: Partial<TailwindColorPalette> = {};\r\n\r\n for (const shade of ALL_SHADES) {\r\n const profile = PALETTE_PROFILE[shade];\r\n\r\n // Calculate the new saturation and lightness for this shade\r\n const newS = clamp(s_500 + profile.s_adjust, 0, 100);\r\n const newL = clamp(profile.l + l_offset, 0, 100);\r\n\r\n palette[shade] = hslToHex(h, newS, newL);\r\n }\r\n\r\n // 4. Ensure the originally provided color is used exactly\r\n // (to avoid rounding errors from HSL conversion)\r\n palette[baseColorShade] = baseColorHex;\r\n\r\n return palette as TailwindColorPalette;\r\n}\r\n","/**\r\n * Masterteam Design System — raw palettes and scales.\r\n *\r\n * Transcribed from the DS Storybook foundations (Figma\r\n * `WTmRAkJVvw0IvZMA7wBdTC`). These are primitives: they name colours, not\r\n * roles. The mapping from primitive to role lives in `ds-identity.preset.ts`.\r\n *\r\n * Adding a value here without a corresponding Figma variable is how a design\r\n * system drifts — extend the Figma file first, then mirror it.\r\n */\r\n\r\nexport interface DSColorScale {\r\n readonly 25: string;\r\n readonly 50: string;\r\n readonly 100: string;\r\n readonly 200: string;\r\n readonly 300: string;\r\n readonly 400: string;\r\n readonly 500: string;\r\n readonly 600: string;\r\n readonly 700: string;\r\n readonly 800: string;\r\n readonly 900: string;\r\n readonly 950: string;\r\n}\r\n\r\n/** Primary blue. 800 is the primary button background. */\r\nexport const DS_BLUE: DSColorScale = {\r\n 25: '#F5FAFF',\r\n 50: '#EFF8FF',\r\n 100: '#D1E9FF',\r\n 200: '#B2DDFF',\r\n 300: '#84CAFF',\r\n 400: '#53B1FD',\r\n 500: '#2E90FA',\r\n 600: '#1570EF',\r\n 700: '#175CD3',\r\n 800: '#1849A9',\r\n 900: '#194185',\r\n 950: '#102A56',\r\n};\r\n\r\n/** Secondary indigo — accents, tags, selected states. */\r\nexport const DS_INDIGO: DSColorScale = {\r\n 25: '#F5F8FF',\r\n 50: '#EEF4FF',\r\n 100: '#E0EAFF',\r\n 200: '#C7D7FE',\r\n 300: '#A4BCFD',\r\n 400: '#8098F9',\r\n 500: '#6172F3',\r\n 600: '#444CE7',\r\n 700: '#3538CD',\r\n 800: '#2D31A6',\r\n 900: '#2D3282',\r\n 950: '#1F235B',\r\n};\r\n\r\nexport const DS_SUCCESS: DSColorScale = {\r\n 25: '#F6FEF9',\r\n 50: '#ECFDF3',\r\n 100: '#DCFAE6',\r\n 200: '#A9EFC5',\r\n 300: '#75E0A7',\r\n 400: '#47CD89',\r\n 500: '#17B26A',\r\n 600: '#079455',\r\n 700: '#067647',\r\n 800: '#085D3A',\r\n 900: '#074D31',\r\n 950: '#053321',\r\n};\r\n\r\nexport const DS_WARNING: DSColorScale = {\r\n 25: '#FFFCF5',\r\n 50: '#FFFAEB',\r\n 100: '#FEF0C7',\r\n 200: '#FEDF89',\r\n 300: '#FEC84B',\r\n 400: '#FDB022',\r\n 500: '#F79009',\r\n 600: '#DC6803',\r\n 700: '#B54708',\r\n 800: '#93370D',\r\n 900: '#7A2E0E',\r\n 950: '#4E1D09',\r\n};\r\n\r\nexport const DS_ERROR: DSColorScale = {\r\n 25: '#FFFBFA',\r\n 50: '#FEF3F2',\r\n 100: '#FEE4E2',\r\n 200: '#FECDCA',\r\n 300: '#FDA29B',\r\n 400: '#F97066',\r\n 500: '#F04438',\r\n 600: '#D92D20',\r\n 700: '#B42318',\r\n 800: '#912018',\r\n 900: '#7A271A',\r\n 950: '#55160C',\r\n};\r\n\r\n/** Neutral scale. Note it stops at 900 in Figma; 0/25/950 are extrapolated\r\n * because PrimeUIX requires a full 0–950 surface ramp. */\r\nexport const DS_GRAY = {\r\n 0: '#FFFFFF',\r\n 25: '#FCFCFD',\r\n 50: '#F9FAFB',\r\n 100: '#F3F4F6',\r\n 200: '#E5E7EB',\r\n 300: '#D1D5DB',\r\n 400: '#9CA3AF',\r\n 500: '#6B7280',\r\n 600: '#4B5563',\r\n 700: '#374151',\r\n 800: '#1F2937',\r\n 900: '#111827',\r\n 950: '#0A0F1C',\r\n} as const;\r\n\r\n/**\r\n * Semantic values that are not part of a ramp. Each one is a named Figma\r\n * variable in its own right.\r\n */\r\nexport const DS_SEMANTIC = {\r\n /** Default body / label text. Deliberately navy-black, not gray-900. */\r\n textStrong: '#000B36',\r\n textSecondary: '#3C5073',\r\n textPlaceholder: '#B6BDCA',\r\n textHelper: '#384250',\r\n\r\n surface: '#FFFFFF',\r\n border: '#E5E7EB',\r\n\r\n /** Disabled is a colour swap, never an opacity fade. */\r\n disabledBg: '#D2D6DB',\r\n disabledText: '#6C7C96',\r\n\r\n inputBorder: '#D2D6DB',\r\n inputBorderHover: '#1F2A37',\r\n inputBorderReadonly: '#CED3DC',\r\n inputBgPressed: '#F3F4F6',\r\n\r\n /** Destructive red. Distinct from the error ramp — this is the button colour. */\r\n danger: '#A30000',\r\n dangerSecondaryBg: '#FCDAD7',\r\n dangerSecondaryBgHover: '#F8BAB5',\r\n dangerSecondaryBgPressed: '#F3908A',\r\n\r\n /** Tinted secondary button, expressed as primary-at-opacity. */\r\n secondaryBg: 'rgba(24, 73, 169, 0.2)',\r\n secondaryBgHover: 'rgba(24, 73, 169, 0.1)',\r\n\r\n focusRing: '#1849A9',\r\n focusOutline: '#FFFFFF',\r\n\r\n tooltipBg: '#1A2236',\r\n} as const;\r\n\r\n/** Figma effect styles. Never invent a shadow outside this set. */\r\nexport const DS_SHADOW = {\r\n xs: '0 1px 2px 0 rgba(16, 24, 40, 0.05)',\r\n sm: '0 1px 3px 0 rgba(16, 24, 40, 0.10), 0 1px 2px 0 rgba(16, 24, 40, 0.06)',\r\n md: '0 4px 8px -2px rgba(16, 24, 40, 0.10), 0 2px 4px -2px rgba(16, 24, 40, 0.06)',\r\n lg: '0 12px 16px -6px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03)',\r\n xl: '0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03)',\r\n '2xl': '0 24px 48px -12px rgba(16, 24, 40, 0.18)',\r\n} as const;\r\n\r\n/**\r\n * Radius scale. The DS names differ from the PrimeUIX names by one step —\r\n * DS `radius-sm` (4px, the default for buttons and inputs) lands on PrimeUIX\r\n * `md`, because that is the key PrimeNG components reference. Mapping them\r\n * here keeps the shift in one place instead of spreading it across overrides.\r\n */\r\nexport const DS_RADIUS = {\r\n none: '0',\r\n /** DS radius-xs — code badges, small tags */\r\n xs: '2px',\r\n /** DS radius-xs..sm boundary */\r\n sm: '4px',\r\n /** DS radius-sm — buttons, inputs, dropdowns (PrimeNG's default reference) */\r\n md: '4px',\r\n /** DS radius-md — cards, tooltips, popovers */\r\n lg: '8px',\r\n /** DS radius-lg — modals, drawers */\r\n xl: '16px',\r\n} as const;\r\n\r\n/** Control heights, in px, from the Figma button spacing frame. */\r\nexport const DS_CONTROL_HEIGHT = {\r\n sm: 24,\r\n md: 32,\r\n lg: 40,\r\n} as const;\r\n\r\nexport const DS_FONT_FAMILY =\r\n \"'IBM Plex Sans Arabic', system-ui, 'Segoe UI', sans-serif\";\r\n\r\n/** Ordered chart series. Six is the hard maximum. */\r\nexport const DS_CHART_SERIES = [\r\n '#1849A9',\r\n '#175CD3',\r\n '#2E90FA',\r\n '#53B1FD',\r\n '#B2DDFF',\r\n '#D1E9FF',\r\n] as const;\r\n","import { Preset } from '@primeuix/themes/types';\r\nimport { AuraBaseDesignTokens } from '@primeuix/themes/aura/base';\r\nimport {\r\n DS_BLUE,\r\n DS_CHART_SERIES,\r\n DS_ERROR,\r\n DS_GRAY,\r\n DS_INDIGO,\r\n DS_RADIUS,\r\n DS_SEMANTIC,\r\n DS_SHADOW,\r\n DS_SUCCESS,\r\n DS_WARNING,\r\n} from './ds-identity.tokens';\r\n\r\n/**\r\n * Masterteam Design System — experimental identity, expressed as a PrimeUIX\r\n * preset.\r\n *\r\n * Every `mt-*` component is a thin wrapper over a PrimeNG component, so the\r\n * identity is applied here rather than in 200 component stylesheets: retune the\r\n * preset and buttons, fields, tables, overlays, tabs and toasts all move\r\n * together. Only the handful of things a design token cannot express — the\r\n * font, the double focus ring, the animated input underline — live in\r\n * `assets/ds-identity.css`.\r\n *\r\n * This preset is *additive*: it is merged over the classic MT configuration, so\r\n * anything it does not mention keeps its current behaviour.\r\n */\r\n\r\nexport type MTDesignIdentity = 'classic' | 'experimental';\r\n\r\n/** Root class that gates the CSS half of the identity. */\r\nexport const MT_DESIGN_IDENTITY_CLASS = 'mt-ds';\r\n\r\n/** DS primary button background. Used when the host does not brand the app. */\r\nexport const DS_DEFAULT_PRIMARY_COLOR = DS_BLUE[800];\r\n\r\n/**\r\n * PrimeUIX wants a 50–950 ramp; the DS publishes 25–950. Drop the 25 step and\r\n * keep the rest — the ramp is dense enough that nothing downstream misses it.\r\n */\r\nfunction toPrimeRamp(scale: {\r\n 50: string;\r\n 100: string;\r\n 200: string;\r\n 300: string;\r\n 400: string;\r\n 500: string;\r\n 600: string;\r\n 700: string;\r\n 800: string;\r\n 900: string;\r\n 950: string;\r\n}): Record<string, string> {\r\n return {\r\n 50: scale[50],\r\n 100: scale[100],\r\n 200: scale[200],\r\n 300: scale[300],\r\n 400: scale[400],\r\n 500: scale[500],\r\n 600: scale[600],\r\n 700: scale[700],\r\n 800: scale[800],\r\n 900: scale[900],\r\n 950: scale[950],\r\n };\r\n}\r\n\r\n/**\r\n * Control geometry, derived rather than hardcoded so the relationship between\r\n * height, line-height and border stays visible:\r\n *\r\n * height = lineHeight + 2 * paddingY + 2 * border(1px)\r\n *\r\n * sm 24px = 18 + 2*2 + 2\r\n * md 32px = 20 + 2*5 + 2 ← default\r\n * lg 40px = 24 + 2*7 + 2\r\n */\r\nconst FIELD = {\r\n sm: { fontSize: '0.75rem', paddingX: '0.5rem', paddingY: '0.125rem' },\r\n md: { fontSize: '0.875rem', paddingX: '0.5rem', paddingY: '0.3125rem' },\r\n lg: { fontSize: '1rem', paddingX: '0.75rem', paddingY: '0.4375rem' },\r\n} as const;\r\n\r\n/**\r\n * The DS identity as a partial preset.\r\n *\r\n * @param primaryColor Optional brand override. Tenants that white-label the\r\n * product still need their own colour; when omitted the DS blue is used.\r\n * Note the DS itself treats the blue as fixed — an override is a deliberate\r\n * deviation, not a supported DS variant.\r\n */\r\nexport function dsIdentityConfigs(\r\n primaryColor?: string,\r\n): Preset<AuraBaseDesignTokens> {\r\n const primary = primaryColor\r\n ? // A branded run keeps the DS ramp shape but re-anchors the key steps, so\r\n // hover/pressed stay one and two steps darker as the DS specifies.\r\n { ...toPrimeRamp(DS_BLUE), 800: primaryColor }\r\n : toPrimeRamp(DS_BLUE);\r\n\r\n return {\r\n primitive: {\r\n borderRadius: { ...DS_RADIUS },\r\n blue: toPrimeRamp(DS_BLUE),\r\n indigo: toPrimeRamp(DS_INDIGO),\r\n green: toPrimeRamp(DS_SUCCESS),\r\n emerald: toPrimeRamp(DS_SUCCESS),\r\n amber: toPrimeRamp(DS_WARNING),\r\n orange: toPrimeRamp(DS_WARNING),\r\n yellow: toPrimeRamp(DS_WARNING),\r\n red: toPrimeRamp(DS_ERROR),\r\n rose: toPrimeRamp(DS_ERROR),\r\n gray: toPrimeRamp(DS_GRAY),\r\n slate: toPrimeRamp(DS_GRAY),\r\n zinc: toPrimeRamp(DS_GRAY),\r\n },\r\n\r\n semantic: {\r\n primary,\r\n\r\n transitionDuration: '0.2s',\r\n\r\n /**\r\n * Disabled is a colour swap, never a fade — a hard DS rule, because a\r\n * faded control on a tinted surface stops meeting contrast at all.\r\n */\r\n disabledOpacity: '1',\r\n\r\n iconSize: '1rem',\r\n\r\n /**\r\n * Inner 2px primary ring. The outer 3px white halo cannot be expressed as\r\n * a token (PrimeUIX renders `focusRing` as a single outline) and is added\r\n * in `ds-identity.css`.\r\n */\r\n focusRing: {\r\n width: '2px',\r\n style: 'solid',\r\n color: '{primary.color}',\r\n offset: '0',\r\n shadow: 'none',\r\n },\r\n\r\n formField: {\r\n paddingX: FIELD.md.paddingX,\r\n paddingY: FIELD.md.paddingY,\r\n sm: FIELD.sm,\r\n lg: FIELD.lg,\r\n borderRadius: '{border.radius.md}',\r\n focusRing: {\r\n width: '0',\r\n style: 'none',\r\n color: 'transparent',\r\n offset: '0',\r\n shadow: 'none',\r\n },\r\n transitionDuration: '{transition.duration}',\r\n },\r\n\r\n content: { borderRadius: '{border.radius.lg}' },\r\n\r\n overlay: {\r\n select: {\r\n borderRadius: '{border.radius.lg}',\r\n shadow: DS_SHADOW.md,\r\n },\r\n popover: {\r\n borderRadius: '{border.radius.lg}',\r\n padding: '0.75rem',\r\n shadow: DS_SHADOW.md,\r\n },\r\n modal: {\r\n // 8px, not the 16px the foundations table implies for \"modals\" —\r\n // the DS Modal component itself ships radius-md and shadow-3xl.\r\n borderRadius: '{border.radius.lg}',\r\n padding: '1.5rem',\r\n shadow: '0 32px 64px -12px rgba(16, 24, 40, 0.14)',\r\n },\r\n navigation: { shadow: DS_SHADOW.md },\r\n },\r\n\r\n list: {\r\n padding: '0.25rem',\r\n gap: '2px',\r\n option: {\r\n padding: '0.375rem 0.5rem',\r\n borderRadius: '{border.radius.md}',\r\n },\r\n optionGroup: { padding: '0.375rem 0.5rem', fontWeight: '600' },\r\n },\r\n\r\n navigation: {\r\n item: {\r\n padding: '0.375rem 0.5rem',\r\n borderRadius: '{border.radius.md}',\r\n gap: '0.5rem',\r\n },\r\n },\r\n\r\n colorScheme: {\r\n light: {\r\n surface: {\r\n 0: DS_GRAY[0],\r\n ...toPrimeRamp(DS_GRAY),\r\n },\r\n\r\n /**\r\n * The DS anchors the primary button on blue-800, with hover and\r\n * pressed one and two steps darker. Aura anchors on 500, so the whole\r\n * triple is remapped rather than inherited.\r\n */\r\n primary: {\r\n color: '{primary.800}',\r\n contrastColor: DS_GRAY[50],\r\n hoverColor: '{primary.900}',\r\n activeColor: '{primary.950}',\r\n },\r\n\r\n highlight: {\r\n background: '{primary.50}',\r\n focusBackground: '{primary.100}',\r\n color: '{primary.800}',\r\n focusColor: '{primary.900}',\r\n },\r\n\r\n mask: { background: 'rgba(16, 24, 40, 0.6)', color: '{surface.200}' },\r\n\r\n formField: {\r\n background: DS_SEMANTIC.surface,\r\n disabledBackground: DS_SEMANTIC.disabledBg,\r\n filledBackground: '{surface.50}',\r\n filledHoverBackground: '{surface.50}',\r\n filledFocusBackground: '{surface.50}',\r\n borderColor: DS_SEMANTIC.inputBorder,\r\n hoverBorderColor: DS_SEMANTIC.inputBorderHover,\r\n // The DS keeps the border neutral on focus and signals focus with\r\n // the underline bar instead (see ds-identity.css).\r\n focusBorderColor: DS_SEMANTIC.inputBorder,\r\n invalidBorderColor: DS_SEMANTIC.danger,\r\n color: DS_SEMANTIC.textStrong,\r\n disabledColor: DS_SEMANTIC.disabledText,\r\n placeholderColor: DS_SEMANTIC.textPlaceholder,\r\n invalidPlaceholderColor: DS_SEMANTIC.danger,\r\n floatLabelColor: '{surface.500}',\r\n floatLabelFocusColor: '{primary.800}',\r\n floatLabelActiveColor: '{surface.500}',\r\n floatLabelInvalidColor: DS_SEMANTIC.danger,\r\n iconColor: '{surface.500}',\r\n shadow: 'none',\r\n },\r\n\r\n text: {\r\n color: DS_SEMANTIC.textStrong,\r\n hoverColor: DS_SEMANTIC.textStrong,\r\n mutedColor: '{surface.500}',\r\n hoverMutedColor: '{surface.600}',\r\n },\r\n\r\n content: {\r\n background: DS_SEMANTIC.surface,\r\n hoverBackground: '{surface.50}',\r\n borderColor: DS_SEMANTIC.border,\r\n color: '{text.color}',\r\n hoverColor: '{text.hover.color}',\r\n },\r\n\r\n list: {\r\n option: {\r\n focusBackground: '{surface.100}',\r\n selectedBackground: '{primary.50}',\r\n selectedFocusBackground: '{primary.100}',\r\n color: '{text.color}',\r\n focusColor: '{text.color}',\r\n selectedColor: '{primary.800}',\r\n selectedFocusColor: '{primary.900}',\r\n },\r\n },\r\n },\r\n\r\n /**\r\n * The DS does not publish a dark theme. Dark mode is still a shipped\r\n * capability here, so this is an extrapolation: the ramps are the DS\r\n * ramps, re-anchored to lighter primary steps for contrast on dark\r\n * surfaces. Treat these values as ours, not as design-approved.\r\n */\r\n dark: {\r\n surface: {\r\n 0: DS_GRAY[0],\r\n ...toPrimeRamp(DS_GRAY),\r\n },\r\n primary: {\r\n color: '{primary.400}',\r\n contrastColor: '{surface.950}',\r\n hoverColor: '{primary.300}',\r\n activeColor: '{primary.200}',\r\n },\r\n formField: {\r\n borderColor: '{surface.600}',\r\n hoverBorderColor: '{surface.500}',\r\n focusBorderColor: '{surface.600}',\r\n invalidBorderColor: '{red.400}',\r\n disabledBackground: '{surface.700}',\r\n disabledColor: '{surface.400}',\r\n placeholderColor: '{surface.400}',\r\n shadow: 'none',\r\n },\r\n mask: { background: 'rgba(0, 0, 0, 0.6)', color: '{surface.200}' },\r\n },\r\n },\r\n },\r\n\r\n components: {\r\n button: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n gap: '0.25rem',\r\n paddingX: FIELD.md.paddingX,\r\n paddingY: FIELD.md.paddingY,\r\n iconOnlyWidth: '2rem',\r\n sm: { ...FIELD.sm, iconOnlyWidth: '1.5rem' },\r\n lg: { ...FIELD.lg, iconOnlyWidth: '2.5rem' },\r\n label: { fontWeight: '500' },\r\n badgeSize: '1rem',\r\n },\r\n colorScheme: {\r\n light: {\r\n root: {\r\n /** DS \"neutral\" button — the standard Cancel / secondary action. */\r\n secondary: {\r\n background: '{surface.100}',\r\n hoverBackground: '{surface.200}',\r\n activeBackground: DS_SEMANTIC.disabledBg,\r\n borderColor: '{surface.100}',\r\n hoverBorderColor: '{surface.200}',\r\n activeBorderColor: DS_SEMANTIC.disabledBg,\r\n color: DS_SEMANTIC.textStrong,\r\n hoverColor: DS_SEMANTIC.textStrong,\r\n activeColor: DS_SEMANTIC.textStrong,\r\n },\r\n /** DS \"danger-primary\" — irreversible actions only. */\r\n danger: {\r\n background: DS_SEMANTIC.danger,\r\n hoverBackground: '#8A0000',\r\n activeBackground: '#6E0000',\r\n borderColor: DS_SEMANTIC.danger,\r\n hoverBorderColor: '#8A0000',\r\n activeBorderColor: '#6E0000',\r\n color: DS_GRAY[50],\r\n hoverColor: DS_GRAY[50],\r\n activeColor: DS_GRAY[50],\r\n },\r\n },\r\n /** DS \"transparent\" / ghost — link-style text buttons. */\r\n text: {\r\n primary: {\r\n color: DS_BLUE[700],\r\n hoverBackground: '{primary.50}',\r\n activeBackground: '{primary.100}',\r\n },\r\n danger: {\r\n color: DS_SEMANTIC.danger,\r\n hoverBackground: DS_SEMANTIC.dangerSecondaryBg,\r\n activeBackground: DS_SEMANTIC.dangerSecondaryBgHover,\r\n },\r\n },\r\n /** DS \"secondary-solid\" is a tint, closest to the outlined slot. */\r\n outlined: {\r\n primary: {\r\n borderColor: '{primary.200}',\r\n color: '{primary.800}',\r\n hoverBackground: DS_SEMANTIC.secondaryBgHover,\r\n activeBackground: DS_SEMANTIC.secondaryBg,\r\n },\r\n danger: {\r\n borderColor: DS_SEMANTIC.dangerSecondaryBgPressed,\r\n color: DS_SEMANTIC.danger,\r\n hoverBackground: DS_SEMANTIC.dangerSecondaryBg,\r\n activeBackground: DS_SEMANTIC.dangerSecondaryBgHover,\r\n },\r\n },\r\n link: {\r\n color: DS_BLUE[700],\r\n hoverColor: DS_BLUE[600],\r\n activeColor: DS_BLUE[800],\r\n },\r\n },\r\n },\r\n css: () => `\r\n .p-button.p-button-icon-only { padding-inline: 0; }\r\n /* Disabled is a colour swap, not a fade. */\r\n .p-button:disabled {\r\n background: ${DS_SEMANTIC.disabledBg};\r\n border-color: ${DS_SEMANTIC.disabledBg};\r\n color: ${DS_SEMANTIC.disabledText};\r\n cursor: not-allowed;\r\n }\r\n .p-button.p-button-text:disabled,\r\n .p-button.p-button-outlined:disabled {\r\n background: transparent;\r\n color: ${DS_SEMANTIC.disabledText};\r\n }\r\n `,\r\n },\r\n\r\n card: {\r\n root: {\r\n borderRadius: '{border.radius.lg}',\r\n shadow: DS_SHADOW.sm,\r\n },\r\n body: { padding: '1rem', gap: '0.5rem' },\r\n title: { fontSize: '1rem', fontWeight: '600' },\r\n subtitle: { color: DS_SEMANTIC.textSecondary },\r\n },\r\n\r\n tabs: {\r\n tab: {\r\n padding: '0.5rem 0.75rem',\r\n fontWeight: '500',\r\n borderWidth: '0 0 2px 0',\r\n },\r\n activeBar: { height: '2px', bottom: '-2px' },\r\n colorScheme: {\r\n light: {\r\n tab: {\r\n color: '{surface.500}',\r\n hoverColor: DS_SEMANTIC.textStrong,\r\n activeColor: '{primary.800}',\r\n borderColor: DS_SEMANTIC.border,\r\n hoverBorderColor: '{surface.300}',\r\n activeBorderColor: '{primary.800}',\r\n },\r\n activeBar: { background: '{primary.800}' },\r\n },\r\n },\r\n },\r\n\r\n datatable: {\r\n headerCell: { padding: '0.5rem 0.75rem' },\r\n bodyCell: { padding: '0.5rem 0.75rem' },\r\n footerCell: { padding: '0.5rem 0.75rem' },\r\n colorScheme: {\r\n light: {\r\n headerCell: {\r\n background: '{surface.50}',\r\n color: '{surface.600}',\r\n borderColor: DS_SEMANTIC.border,\r\n hoverBackground: '{surface.100}',\r\n },\r\n bodyCell: { borderColor: DS_SEMANTIC.border },\r\n row: {\r\n background: DS_SEMANTIC.surface,\r\n hoverBackground: '{surface.50}',\r\n color: DS_SEMANTIC.textStrong,\r\n selectedBackground: '{primary.50}',\r\n selectedColor: DS_SEMANTIC.textStrong,\r\n },\r\n },\r\n },\r\n },\r\n\r\n tag: {\r\n root: {\r\n fontSize: '0.75rem',\r\n fontWeight: '500',\r\n padding: '0.125rem 0.5rem',\r\n borderRadius: '{border.radius.md}',\r\n },\r\n colorScheme: {\r\n light: {\r\n primary: { background: DS_BLUE[100], color: DS_BLUE[700] },\r\n secondary: { background: '{surface.100}', color: '{surface.700}' },\r\n success: { background: DS_SUCCESS[100], color: DS_SUCCESS[700] },\r\n info: { background: DS_BLUE[100], color: DS_BLUE[700] },\r\n warn: { background: DS_WARNING[100], color: DS_WARNING[700] },\r\n danger: { background: DS_ERROR[100], color: DS_ERROR[700] },\r\n },\r\n },\r\n },\r\n\r\n toast: {\r\n root: { borderRadius: '{border.radius.lg}' },\r\n },\r\n\r\n tooltip: {\r\n root: {\r\n borderRadius: '6px',\r\n padding: '0.5rem 0.75rem',\r\n maxWidth: '20rem',\r\n },\r\n colorScheme: {\r\n light: {\r\n root: { background: DS_SEMANTIC.tooltipBg, color: '#ffffff' },\r\n },\r\n dark: {\r\n root: { background: DS_SEMANTIC.tooltipBg, color: '#ffffff' },\r\n },\r\n },\r\n },\r\n\r\n progressbar: {\r\n root: { borderRadius: '{border.radius.full}', height: '0.5rem' },\r\n },\r\n\r\n skeleton: {\r\n colorScheme: {\r\n light: { root: { background: '#e7e9ed' } },\r\n },\r\n },\r\n\r\n avatar: {\r\n root: { borderRadius: '{border.radius.full}' },\r\n },\r\n\r\n chip: {\r\n root: { borderRadius: '{border.radius.full}' },\r\n },\r\n },\r\n } as Preset<AuraBaseDesignTokens>;\r\n}\r\n\r\n/** The DS chart ramp, for hosts that render charts outside PrimeNG. */\r\nexport const dsChartSeries: readonly string[] = DS_CHART_SERIES;\r\n\r\n/**\r\n * Adds or removes the root class that activates the CSS half of the identity.\r\n * No-ops outside the browser so SSR builds stay safe.\r\n */\r\nexport function applyDesignIdentityClass(identity: MTDesignIdentity): void {\r\n if (typeof document === 'undefined') return;\r\n\r\n document.documentElement.classList.toggle(\r\n MT_DESIGN_IDENTITY_CLASS,\r\n identity === 'experimental',\r\n );\r\n}\r\n","import { providePrimeNG } from 'primeng/config';\r\nimport { generateTailwindPalette } from '../utils/theme';\r\nimport Aura from '@primeuix/themes/aura';\r\nimport { definePreset, updatePreset, usePreset } from '@primeuix/themes';\r\nimport { ToastTokenSections } from '@primeuix/themes/types/toast';\r\nimport { EnvironmentProviders } from '@angular/core';\r\nimport { Preset } from '@primeuix/themes/types';\r\nimport { AuraBaseDesignTokens } from '@primeuix/themes/aura/base';\r\nimport {\r\n applyDesignIdentityClass,\r\n DS_DEFAULT_PRIMARY_COLOR,\r\n dsIdentityConfigs,\r\n MTDesignIdentity,\r\n} from './ds-identity.preset';\r\n\r\nexport interface MTThemeOptions {\r\n primaryColor?: string;\r\n textColor?: string;\r\n backgroundColor?: string;\r\n /**\r\n * Which visual identity to render.\r\n *\r\n * - `'classic'` (default) — the shipped MT look. Unchanged.\r\n * - `'experimental'` — the Masterteam Design System identity (IBM Plex Sans\r\n * Arabic, DS blue, 4px control radius, DS elevation and focus ring).\r\n * Opt-in while the DS is being evaluated; see\r\n * `.claude/skills/mt-design-identity/SKILL.md`.\r\n */\r\n designIdentity?: MTDesignIdentity;\r\n}\r\n\r\nconst inputBorderRadius = '{border.radius.md}';\r\n\r\nconst toastStyle: ToastTokenSections.Success = {\r\n // borderColor: '{surface.300}',\r\n background: '{content.background}',\r\n // color: '{surface.600}',\r\n // closeButton: {\r\n // hoverBackground: '{surface.100}',\r\n // focusRing: {\r\n // color: '{surface.600}',\r\n // },\r\n // },\r\n};\r\n\r\n/**\r\n * Which identity the app is currently wearing. Tracked because the runtime\r\n * colour helpers below have to anchor a generated ramp on a different step per\r\n * identity — classic reads the brand colour as the 500 shade, the DS reads it\r\n * as 800.\r\n */\r\nlet activeDesignIdentity: MTDesignIdentity = 'classic';\r\n\r\nexport function getMTDesignIdentity(): MTDesignIdentity {\r\n return activeDesignIdentity;\r\n}\r\n\r\nexport function changePrimaryColor(color: string): void {\r\n const isDS = activeDesignIdentity === 'experimental';\r\n const base = color || (isDS ? DS_DEFAULT_PRIMARY_COLOR : '#2AAEC0');\r\n\r\n updatePreset({\r\n semantic: {\r\n primary: isDS\r\n ? generateTailwindPalette(base, '800')\r\n : generateTailwindPalette(base),\r\n },\r\n });\r\n}\r\n\r\nexport function changeBackgroundColor(color?: string): void {\r\n if (color) {\r\n const palette = generateTailwindPalette(color, '100');\r\n document.documentElement.style.setProperty(\r\n '--app-background-light',\r\n palette['100'],\r\n );\r\n document.documentElement.style.setProperty(\r\n '--app-background-dark',\r\n palette['950'],\r\n );\r\n }\r\n}\r\n\r\nexport function changeTextColor(color: string): void {\r\n const palette = generateTailwindPalette(color ?? '#334155', '700');\r\n updatePreset({\r\n semantic: {\r\n colorScheme: {\r\n light: {\r\n text: {\r\n color: palette['700'],\r\n hoverColor: palette['800'],\r\n hoverMutedColor: palette['600'],\r\n mutedColor: palette['500'],\r\n },\r\n },\r\n dark: {\r\n text: {\r\n color: palette['0'],\r\n hoverColor: palette['0'],\r\n hoverMutedColor: palette['300'],\r\n mutedColor: palette['400'],\r\n },\r\n },\r\n },\r\n },\r\n });\r\n}\r\n\r\nconst MTPreset = (themeOptions?: MTThemeOptions) => {\r\n const textPalette = generateTailwindPalette(\r\n themeOptions?.textColor ?? '#334155',\r\n '700',\r\n );\r\n const configs: Preset<AuraBaseDesignTokens> = {\r\n options: {\r\n prefix: 'mt',\r\n cssLayer: {\r\n name: 'primeng',\r\n order: 'theme, base, primeng',\r\n },\r\n },\r\n semantic: {\r\n colorScheme: {\r\n light: {\r\n text: {\r\n color: textPalette['700'],\r\n hoverColor: textPalette['800'],\r\n hoverMutedColor: textPalette['600'],\r\n mutedColor: textPalette['500'],\r\n },\r\n },\r\n dark: {\r\n text: {\r\n color: textPalette['0'],\r\n hoverColor: textPalette['0'],\r\n hoverMutedColor: textPalette['300'],\r\n mutedColor: textPalette['400'],\r\n },\r\n },\r\n },\r\n primary: generateTailwindPalette(themeOptions?.primaryColor || '#2AAEC0'),\r\n content: {\r\n borderRadius: '{border.radius.lg}',\r\n },\r\n formField: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n components: {\r\n autocomplete: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n cascadeselect: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n dialog: {\r\n header: {\r\n padding: '0',\r\n },\r\n content: {\r\n padding: '0',\r\n },\r\n footer: {\r\n padding: '0',\r\n },\r\n },\r\n toast: {\r\n root: {\r\n borderRadius: '{border.radius.xl}',\r\n },\r\n colorScheme: {\r\n light: {\r\n success: toastStyle,\r\n info: toastStyle,\r\n warn: toastStyle,\r\n error: toastStyle,\r\n secondary: toastStyle,\r\n },\r\n dark: {\r\n success: toastStyle,\r\n info: toastStyle,\r\n warn: toastStyle,\r\n error: toastStyle,\r\n secondary: toastStyle,\r\n },\r\n },\r\n },\r\n togglebutton: {\r\n root: {\r\n padding: '1px',\r\n borderRadius: '{border.radius.sm}',\r\n },\r\n colorScheme: {\r\n light: {\r\n root: {\r\n checkedColor: '{primary.500}',\r\n },\r\n },\r\n dark: {\r\n root: {\r\n checkedColor: '{primary.400}',\r\n },\r\n },\r\n },\r\n },\r\n button: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n gap: '0.25rem',\r\n },\r\n css: () => `\r\n .p-button.p-button-icon-only {\r\n padding-inline: 0;\r\n }\r\n `,\r\n },\r\n inputtext: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n inputchips: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n listbox: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n avatar: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n },\r\n },\r\n tooltip: {\r\n css: () => `\r\n .p-tooltip .p-tooltip-text {\r\n font-size: 0.75rem;\r\n line-height: 1.2;\r\n }\r\n `,\r\n },\r\n selectbutton: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n },\r\n },\r\n multiselect: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n textarea: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n treeselect: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n\r\n paginator: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n padding: '0',\r\n },\r\n navButton: {\r\n borderRadius: '{border.radius.sm}',\r\n },\r\n\r\n colorScheme: {\r\n light: {\r\n navButton: {\r\n color: '{surface.500}',\r\n hoverBackground: '{surface.50}',\r\n selectedBackground: '{primary.500}',\r\n selectedColor: '#ffffff',\r\n focusRing: {\r\n color: '{primary.100}',\r\n },\r\n },\r\n },\r\n dark: {\r\n navButton: {\r\n color: '{surface.200}',\r\n hoverBackground: 'transparent',\r\n selectedBackground: '{primary.500}',\r\n selectedColor: '#fff',\r\n focusRing: {\r\n color: '{primary.500}',\r\n },\r\n },\r\n },\r\n },\r\n\r\n css: () => `\r\n .p-paginator {\r\n --p-paginator-gap: 0.375rem;\r\n --p-paginator-nav-button-width: 1.75rem;\r\n --p-paginator-nav-button-height: 1.75rem;\r\n width: fit-content;\r\n padding: 0;\r\n border: 0;\r\n background: transparent;\r\n font-size: 0.875rem;\r\n }\r\n\r\n .p-paginator-pages {\r\n display: flex;\r\n gap: var(--p-paginator-gap);\r\n }\r\n\r\n .p-paginator-pages button,\r\n .p-paginator-prev,\r\n .p-paginator-next,\r\n .p-paginator-first,\r\n .p-paginator-last {\r\n min-width: var(--p-paginator-nav-button-width);\r\n height: var(--p-paginator-nav-button-height);\r\n border: 1px solid var(--p-surface-200);\r\n border-radius: 0.375rem;\r\n background: #fff;\r\n color: #667085;\r\n box-shadow: none;\r\n }\r\n\r\n .p-paginator .p-paginator-page.p-paginator-page-selected {\r\n border-color: var(--p-primary-color);\r\n background: var(--p-primary-color);\r\n color: #fff;\r\n font-weight: 500;\r\n }\r\n\r\n .p-paginator-pages button:not(.p-paginator-page-selected):hover,\r\n .p-paginator-prev:hover,\r\n .p-paginator-next:hover,\r\n .p-paginator-first:hover,\r\n .p-paginator-last:hover {\r\n background: var(--p-surface-50);\r\n }\r\n\r\n .p-paginator .p-select {\r\n min-height: var(--p-paginator-nav-button-height);\r\n margin-inline-start: 0.5rem;\r\n border: 1px solid var(--p-surface-200);\r\n border-radius: 0.5rem;\r\n background: #fff;\r\n }\r\n\r\n .p-paginator .p-select .p-select-label {\r\n padding: 0.375rem 0.625rem;\r\n font-size: 0.875rem;\r\n }\r\n\r\n /* Dark Mode Styles */\r\n .dark .p-paginator-pages button,\r\n .dark .p-paginator-prev,\r\n .dark .p-paginator-next,\r\n .dark .p-paginator-first,\r\n .dark .p-paginator-last,\r\n .dark .p-paginator .p-select {\r\n border-color: var(--p-surface-500);\r\n background: var(--p-surface-900);\r\n }\r\n\r\n .dark .p-paginator .p-paginator-page.p-paginator-page-selected {\r\n border-color: var(--p-primary-color);\r\n background: var(--p-primary-color);\r\n color: #fff;\r\n }\r\n `,\r\n },\r\n\r\n toggleswitch: {\r\n root: {\r\n width: '2.5rem',\r\n height: '1.4rem',\r\n },\r\n },\r\n select: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n optionGroup: {\r\n fontWeight: 'bold',\r\n padding: '6px 8px',\r\n background: '{surface.50}',\r\n color: '{primary.700}',\r\n },\r\n },\r\n\r\n // steps: {\r\n // item: {\r\n // link: {\r\n // gap: 'calc(50% + 0.25rem)',\r\n // },\r\n // number: {\r\n // font: {\r\n // size: '0.9rem',\r\n // },\r\n // active: {\r\n // color: 'white',\r\n // background: '{primary.500}',\r\n // border: {\r\n // color: '{primary.500}',\r\n // },\r\n // },\r\n // },\r\n // },\r\n // },\r\n },\r\n };\r\n\r\n // The DS layer is merged last so it wins on the tokens it names, while\r\n // everything it stays silent about keeps the classic behaviour.\r\n if ((themeOptions?.designIdentity ?? 'classic') === 'experimental') {\r\n return definePreset(\r\n Aura,\r\n configs,\r\n dsIdentityConfigs(themeOptions?.primaryColor),\r\n );\r\n }\r\n\r\n return definePreset(Aura, configs);\r\n};\r\n\r\n/**\r\n * Switches identity at runtime — for the showcase toggle and for side-by-side\r\n * review. Replaces the active preset outright (rather than merging into it, as\r\n * `updatePreset` would) so switching back to classic is lossless.\r\n */\r\nexport function setMTDesignIdentity(\r\n identity: MTDesignIdentity,\r\n themeOptions?: Omit<MTThemeOptions, 'designIdentity'>,\r\n): void {\r\n activeDesignIdentity = identity;\r\n applyDesignIdentityClass(identity);\r\n usePreset(MTPreset({ ...themeOptions, designIdentity: identity }));\r\n}\r\n\r\nexport function provideMTComponents(\r\n themeOptions?: MTThemeOptions,\r\n): EnvironmentProviders {\r\n activeDesignIdentity = themeOptions?.designIdentity ?? 'classic';\r\n applyDesignIdentityClass(activeDesignIdentity);\r\n changeBackgroundColor(themeOptions?.backgroundColor);\r\n return providePrimeNG({\r\n zIndex: {\r\n modal: 1900,\r\n overlay: 1500,\r\n menu: 1500,\r\n tooltip: 1600,\r\n },\r\n theme: {\r\n preset: MTPreset(themeOptions),\r\n options: {\r\n darkModeSelector: '.dark',\r\n },\r\n },\r\n });\r\n}\r\n","import { MessageService } from 'primeng/api';\r\n\r\nexport function provideMTMessages() {\r\n return MessageService;\r\n}\r\n","import { ConfirmationService } from 'primeng/api';\r\n\r\nexport function provideMTConfirmation() {\r\n return ConfirmationService;\r\n}\r\n","import {\r\n EnvironmentProviders,\r\n InjectionToken,\r\n makeEnvironmentProviders,\r\n} from '@angular/core';\r\n\r\nexport interface MTDateFormats {\r\n date: string;\r\n dateTime: string;\r\n /** Clock-time only, used by `Time` properties. */\r\n time: string;\r\n timezone?: string;\r\n}\r\n\r\nexport const DEFAULT_MT_DATE_FORMATS: MTDateFormats = {\r\n date: 'dd/MM/yyyy',\r\n dateTime: 'dd/MM/yyyy HH:mm',\r\n time: 'HH:mm',\r\n};\r\n\r\nexport const MT_DATE_FORMATS = new InjectionToken<MTDateFormats>(\r\n 'MT_DATE_FORMATS',\r\n {\r\n factory: () => ({ ...DEFAULT_MT_DATE_FORMATS }),\r\n },\r\n);\r\n\r\n/**\r\n * Converts .NET custom date/time format tokens to Angular `formatDate` (CLDR)\r\n * tokens. System-setting formats are authored in .NET convention (e.g. `hh:mm tt`),\r\n * but `formatDate` uses CLDR tokens where the AM/PM designator is `a`, not `tt`.\r\n * Every other token in the supported set (d, M, y, H, h, m, s) is identical between\r\n * the two, so only `tt`/`t` → `a` needs translating. Single-quoted literal sections\r\n * (e.g. `'at'`) are left untouched.\r\n */\r\nexport function toAngularDateFormat(format: string): string {\r\n return format\r\n .split(/('[^']*')/g)\r\n .map((part) => (part.startsWith(\"'\") ? part : part.replace(/t+/g, 'a')))\r\n .join('');\r\n}\r\n\r\nexport function provideMTDateFormats(\r\n formats: Partial<MTDateFormats>,\r\n): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n {\r\n provide: MT_DATE_FORMATS,\r\n useFactory: () => ({\r\n ...DEFAULT_MT_DATE_FORMATS,\r\n ...formats,\r\n }),\r\n },\r\n ]);\r\n}\r\n","import { HttpContext } from '@angular/common/http';\r\nimport { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\r\n\r\nexport type FieldType =\r\n | 'text'\r\n | 'textarea'\r\n | 'select'\r\n | 'date'\r\n | 'number'\r\n | 'slider'\r\n | 'multi-select'\r\n | 'pick-list'\r\n | 'checkbox'\r\n | 'icon-field'\r\n | 'color-picker'\r\n | 'location'\r\n | 'spacer'\r\n | 'entity-preview'\r\n | 'lookup-matrix'\r\n | 'lookup-module-check-list'\r\n | string;\r\n\r\nexport type ValidatorType =\r\n | 'required'\r\n | 'email'\r\n | 'minLength'\r\n | 'maxLength'\r\n | 'min'\r\n | 'max'\r\n | 'pattern'\r\n | 'custom';\r\n\r\nexport type FieldRelationAction = 'enable' | 'disable' | 'show' | 'hide';\r\n\r\nexport interface FieldRelationConfig {\r\n key: string;\r\n value: any;\r\n action: FieldRelationAction;\r\n}\r\n\r\nexport type FormulaConditionMode =\r\n | 'auto'\r\n | 'show'\r\n | 'hide'\r\n | 'enable'\r\n | 'disable';\r\n\r\nexport interface FormulaConditionConfig {\r\n formulaTokens: string;\r\n formulaText?: string;\r\n mode?: FormulaConditionMode;\r\n}\r\n\r\nexport type FormulaValidationSeverity = 'error' | 'warning';\r\n\r\nexport interface FormulaValidationRuleConfig {\r\n id: string | number;\r\n formulaTokens: string;\r\n formulaText?: string;\r\n message: string;\r\n severity: FormulaValidationSeverity;\r\n enabled: boolean;\r\n}\r\n\r\nexport type FormulaRuntimeMessageCode =\r\n | 'FORMULA_PARSE_ERROR'\r\n | 'FORMULA_EVALUATION_ERROR'\r\n | 'FORMULA_FALSE';\r\n\r\nexport interface FormulaRuntimeMessage {\r\n code: FormulaRuntimeMessageCode;\r\n severity: FormulaValidationSeverity;\r\n message: string;\r\n formulaText?: string;\r\n ruleId?: string | number;\r\n fieldKey?: string;\r\n}\r\n\r\nexport interface ResponsiveColSpan {\r\n // Container\r\n xs?: number; // @xs\r\n sm?: number; // @sm\r\n md?: number; // @md\r\n lg?: number; // @lg\r\n xl?: number; // @xl\r\n}\r\n\r\nexport class ValidatorConfig {\r\n type: ValidatorType;\r\n value?: any;\r\n message?: string;\r\n customValidator?: (\r\n value: any,\r\n control?: AbstractControl,\r\n ) => boolean | Promise<boolean>;\r\n\r\n constructor(config: {\r\n type: ValidatorType;\r\n value?: any;\r\n message?: string;\r\n customValidator?: (\r\n value: any,\r\n control?: AbstractControl,\r\n ) => boolean | Promise<boolean>;\r\n }) {\r\n this.type = config.type;\r\n this.value = config.value;\r\n this.message = config.message;\r\n this.customValidator = config.customValidator;\r\n }\r\n\r\n // Factory methods for common validators\r\n static required(message = 'This field is required'): ValidatorConfig {\r\n return new ValidatorConfig({ type: 'required', message });\r\n }\r\n\r\n static email(message = 'Please enter a valid email'): ValidatorConfig {\r\n return new ValidatorConfig({ type: 'email', message });\r\n }\r\n\r\n static minLength(length: number, message?: string): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'minLength',\r\n value: length,\r\n message: message || `Minimum length is ${length} characters`,\r\n });\r\n }\r\n\r\n static maxLength(length: number, message?: string): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'maxLength',\r\n value: length,\r\n message: message || `Maximum length is ${length} characters`,\r\n });\r\n }\r\n\r\n static min(value: number, message?: string): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'min',\r\n value,\r\n message: message || `Minimum value is ${value}`,\r\n });\r\n }\r\n\r\n static max(value: number, message?: string): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'max',\r\n value,\r\n message: message || `Maximum value is ${value}`,\r\n });\r\n }\r\n\r\n static pattern(pattern: string, message = 'Invalid format'): ValidatorConfig {\r\n return new ValidatorConfig({ type: 'pattern', value: pattern, message });\r\n }\r\n\r\n static custom(\r\n validator: (\r\n value: any,\r\n control?: AbstractControl,\r\n ) => boolean | Promise<boolean>,\r\n message = 'Invalid value',\r\n ): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'custom',\r\n customValidator: validator,\r\n message,\r\n });\r\n }\r\n}\r\n\r\nexport type BaseFieldConstructorConfig = ConstructorParameters<\r\n typeof BaseFieldConfig\r\n>[0];\r\n\r\nexport abstract class BaseFieldConfig {\r\n key: string;\r\n label: string;\r\n type: FieldType;\r\n required: boolean;\r\n disabled: boolean;\r\n readonly: boolean;\r\n hidden: boolean;\r\n placeholder: string;\r\n hint: string;\r\n cssClass: string;\r\n validators: ValidatorConfig[];\r\n order: number;\r\n colSpan: number | ResponsiveColSpan;\r\n\r\n defaultValue?: any;\r\n\r\n customTemplate: string;\r\n relations: FieldRelationConfig[];\r\n formulaCondition?: FormulaConditionConfig;\r\n\r\n constructor(config: {\r\n key?: string;\r\n label?: string;\r\n type: FieldType;\r\n required?: boolean;\r\n disabled?: boolean;\r\n readonly?: boolean;\r\n hidden?: boolean;\r\n placeholder?: string;\r\n hint?: string;\r\n cssClass?: string;\r\n validators?: ValidatorConfig[];\r\n order?: number;\r\n relations?: FieldRelationConfig[];\r\n formulaCondition?: FormulaConditionConfig;\r\n colSpan?: number | ResponsiveColSpan;\r\n }) {\r\n this.key = config.key || 'Key';\r\n this.label = config.label || '';\r\n this.type = config.type;\r\n this.required = config.required || false;\r\n this.disabled = config.disabled || false;\r\n this.readonly = config.readonly || false;\r\n this.hidden = config.hidden || false;\r\n this.placeholder = config.placeholder || '';\r\n this.hint = config.hint || '';\r\n this.cssClass = config.cssClass || '';\r\n this.validators = config.validators || [];\r\n this.order = config.order || 0;\r\n this.relations = config.relations || [];\r\n this.formulaCondition = config.formulaCondition;\r\n this.colSpan = config.colSpan || 12;\r\n }\r\n}\r\n\r\n// Specific configurations for different field types\r\nexport class TextFieldConfig extends BaseFieldConfig {\r\n inputType: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n inputType?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'text' });\r\n this.inputType = config.inputType || 'text';\r\n }\r\n}\r\n\r\nexport class TextareaFieldConfig extends BaseFieldConfig {\r\n rows: number;\r\n autoResize: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n rows?: number;\r\n autoResize?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'textarea' });\r\n this.rows = config.rows || 3;\r\n this.autoResize = config.autoResize || false;\r\n }\r\n}\r\n\r\nexport class SelectFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n group: boolean;\r\n optionGroupLabel: string;\r\n optionGroupChildren: string;\r\n multiple: boolean;\r\n filter: boolean;\r\n filterBy: string;\r\n filterPlaceholder: string;\r\n showClear: boolean;\r\n emptyMessage: string;\r\n size: string;\r\n hasPlaceholderPrefix: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n group?: boolean;\r\n optionGroupLabel?: string;\r\n optionGroupChildren?: string;\r\n multiple?: boolean;\r\n filter?: boolean;\r\n filterBy?: string;\r\n filterPlaceholder?: string;\r\n showClear?: boolean;\r\n emptyMessage?: string;\r\n size?: string;\r\n hasPlaceholderPrefix?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'select' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.group = config.group || false;\r\n this.optionGroupLabel = config.optionGroupLabel || 'label';\r\n this.optionGroupChildren = config.optionGroupChildren || 'items';\r\n this.multiple = config.multiple || false;\r\n this.filter = config.filter || false;\r\n this.filterBy = config.filterBy || '';\r\n this.filterPlaceholder = config.filterPlaceholder || 'Search...';\r\n this.showClear = config.showClear || false;\r\n this.emptyMessage = config.emptyMessage || 'No options available';\r\n this.size = config.size || '';\r\n this.hasPlaceholderPrefix =\r\n config.hasPlaceholderPrefix === undefined\r\n ? true\r\n : config.hasPlaceholderPrefix;\r\n }\r\n}\r\n\r\nexport class RadioButtonFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n orientation: 'vertical' | 'horizontal';\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n orientation?: 'vertical' | 'horizontal';\r\n },\r\n ) {\r\n super({ ...config, type: 'radio-button' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.orientation = config.orientation || 'vertical';\r\n }\r\n}\r\nexport class RadioCardsFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n size: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n size?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'radio-cards' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.size = config.size || 'small';\r\n }\r\n}\r\nexport class UserSearchFieldConfig extends BaseFieldConfig {\r\n optionLabel: string;\r\n optionValue: string;\r\n size: string;\r\n apiUrl: string;\r\n context: HttpContext | undefined;\r\n isMultiple: boolean;\r\n hideUnlinkedHint: boolean;\r\n dataKey: string;\r\n paramName: string;\r\n minLength: number;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n optionLabel?: string;\r\n optionValue?: string;\r\n size?: string;\r\n hint?: string;\r\n apiUrl?: string;\r\n context?: HttpContext | undefined;\r\n placeholder?: string;\r\n isMultiple?: boolean;\r\n hideUnlinkedHint?: boolean;\r\n dataKey?: string;\r\n paramName?: string;\r\n minLength?: number;\r\n },\r\n ) {\r\n super({ ...config, type: 'user-search' });\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.size = config.size || '';\r\n this.hint = config.hint || '';\r\n this.context = config.context || undefined;\r\n this.apiUrl = config.apiUrl || '';\r\n this.placeholder = config.placeholder || 'Search';\r\n this.isMultiple = config.isMultiple || false;\r\n this.hideUnlinkedHint = config.hideUnlinkedHint || false;\r\n this.dataKey = config.dataKey || 'data';\r\n this.paramName = config.paramName || 'query';\r\n this.minLength = config.minLength ?? 1;\r\n }\r\n}\r\n\r\nexport class LocationFieldConfig extends BaseFieldConfig {\r\n configuration: Record<string, unknown> | string | null;\r\n searchUrl?: string;\r\n minLength: number;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n configuration?: Record<string, unknown> | string | null;\r\n searchUrl?: string;\r\n minLength?: number;\r\n },\r\n ) {\r\n super({ ...config, type: 'location' });\r\n this.configuration = config.configuration ?? null;\r\n this.searchUrl = config.searchUrl;\r\n this.minLength = config.minLength ?? 2;\r\n }\r\n}\r\n\r\nexport class UploadFileFieldConfig extends BaseFieldConfig {\r\n size: string;\r\n endPoint?: string;\r\n userImgClass?: string;\r\n shape?: string;\r\n multiple?: boolean;\r\n accept?: string | string[];\r\n fileSizeLimit?: number | undefined;\r\n context: HttpContext | undefined;\r\n title: string;\r\n description: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n size?: string;\r\n endPoint?: string;\r\n userImgClass?: string;\r\n shape?: string;\r\n multiple?: boolean;\r\n accept?: string | string[];\r\n fileSizeLimit?: number | undefined;\r\n context?: HttpContext | undefined;\r\n title?: string;\r\n description?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'upload-file' });\r\n this.size = config.size || 'normal';\r\n this.endPoint = config.endPoint || 'uploader';\r\n this.userImgClass =\r\n config.userImgClass || 'w-25! h-25! text-4xl! text-gray-400!';\r\n this.shape = config.shape || 'field';\r\n this.multiple = config.multiple ?? false;\r\n this.accept = config.accept || '.pdf,.doc,.docx,.xlsx,image/*';\r\n this.fileSizeLimit = config.fileSizeLimit || undefined;\r\n this.context = config.context || undefined;\r\n this.title = config.title || 'Upload File';\r\n this.description = config.description || 'Click or drop a file to upload';\r\n }\r\n}\r\n\r\nexport class DateFieldConfig extends BaseFieldConfig {\r\n dateFormat: string;\r\n showTime: boolean;\r\n /** Edits the clock time only — no calendar. The value stays a full `Date`. */\r\n timeOnly: boolean;\r\n showSeconds: boolean;\r\n hourFormat: '12' | '24';\r\n minDate?: Date;\r\n maxDate?: Date;\r\n disabledDates: Date[];\r\n disabledDays: number[];\r\n yearRange: string;\r\n showIcon: boolean;\r\n icon: string;\r\n showButtonBar: boolean;\r\n showClear: boolean;\r\n inline: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n dateFormat?: string;\r\n showTime?: boolean;\r\n timeOnly?: boolean;\r\n showSeconds?: boolean;\r\n hourFormat?: '12' | '24';\r\n minDate?: Date;\r\n maxDate?: Date;\r\n disabledDates?: Date[];\r\n disabledDays?: number[];\r\n yearRange?: string;\r\n showIcon?: boolean;\r\n icon?: string;\r\n showButtonBar?: boolean;\r\n showClear?: boolean;\r\n inline?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'date' });\r\n this.dateFormat = config.dateFormat || 'yyyy-mm-dd';\r\n this.showTime = config.showTime || false;\r\n this.timeOnly = config.timeOnly || false;\r\n this.showSeconds = config.showSeconds || false;\r\n this.hourFormat = config.hourFormat || '24';\r\n this.minDate = config.minDate;\r\n this.maxDate = config.maxDate;\r\n this.disabledDates = config.disabledDates || [];\r\n this.disabledDays = config.disabledDays || [];\r\n this.yearRange = config.yearRange || '1900:2030';\r\n this.showIcon = config.showIcon || true;\r\n this.icon = config.icon || 'pi pi-calendar';\r\n this.showButtonBar = config.showButtonBar || false;\r\n this.showClear = config.showClear || true;\r\n this.inline = config.inline || false;\r\n }\r\n}\r\n\r\nexport class NumberFieldConfig extends BaseFieldConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n prefix?: string;\r\n suffix?: string;\r\n currency?: string;\r\n locale?: string;\r\n minFractionDigits?: number;\r\n maxFractionDigits?: number;\r\n useGrouping?: boolean;\r\n showButtons?: boolean;\r\n buttonLayout?: 'stacked' | 'horizontal';\r\n incrementButtonClass?: string;\r\n decrementButtonClass?: string;\r\n incrementButtonIcon?: string;\r\n decrementButtonIcon?: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n prefix?: string;\r\n suffix?: string;\r\n currency?: string;\r\n locale?: string;\r\n minFractionDigits?: number;\r\n maxFractionDigits?: number;\r\n useGrouping?: boolean;\r\n showButtons?: boolean;\r\n buttonLayout?: 'stacked' | 'horizontal';\r\n incrementButtonClass?: string;\r\n decrementButtonClass?: string;\r\n incrementButtonIcon?: string;\r\n decrementButtonIcon?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'number' });\r\n this.min = config.min;\r\n this.max = config.max;\r\n this.step = config.step || 1;\r\n this.prefix = config.prefix;\r\n this.suffix = config.suffix;\r\n this.currency = config.currency;\r\n this.locale = config.locale;\r\n this.minFractionDigits = config.minFractionDigits;\r\n this.maxFractionDigits = config.maxFractionDigits;\r\n this.useGrouping = config.useGrouping || false;\r\n this.showButtons = config.showButtons || false;\r\n this.buttonLayout = config.buttonLayout || 'stacked';\r\n this.incrementButtonClass = config.incrementButtonClass;\r\n this.decrementButtonClass = config.decrementButtonClass;\r\n this.incrementButtonIcon = config.incrementButtonIcon;\r\n this.decrementButtonIcon = config.decrementButtonIcon;\r\n }\r\n}\r\n\r\nexport class SliderFieldConfig extends BaseFieldConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n orientation?: 'horizontal' | 'vertical';\r\n range?: boolean;\r\n animate?: boolean;\r\n unit?: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n orientation?: 'horizontal' | 'vertical';\r\n range?: boolean;\r\n animate?: boolean;\r\n unit?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'slider' });\r\n this.min = config.min || 0;\r\n this.max = config.max || 100;\r\n this.step = config.step || 1;\r\n this.orientation = config.orientation || 'horizontal';\r\n this.range = config.range || false;\r\n this.animate = config.animate || false;\r\n this.unit = config.unit || '';\r\n }\r\n}\r\n\r\nexport class MultiSelectFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n filter: boolean;\r\n filterBy: string;\r\n filterPlaceholder: string;\r\n showClear: boolean;\r\n emptyMessage: string;\r\n display?: 'comma' | 'chip';\r\n maxSelectedLabels?: number;\r\n selectedItemsLabel?: string;\r\n showToggleAll?: boolean;\r\n resetFilterOnHide?: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n filter?: boolean;\r\n filterBy?: string;\r\n filterPlaceholder?: string;\r\n showClear?: boolean;\r\n emptyMessage?: string;\r\n display?: 'comma' | 'chip';\r\n maxSelectedLabels?: number;\r\n selectedItemsLabel?: string;\r\n showToggleAll?: boolean;\r\n resetFilterOnHide?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'multi-select' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.filter = config.filter || false;\r\n this.filterBy = config.filterBy || '';\r\n this.filterPlaceholder = config.filterPlaceholder || 'Search...';\r\n this.showClear = config.showClear || false;\r\n this.emptyMessage = config.emptyMessage || 'No options available';\r\n this.display = config.display || 'comma';\r\n this.maxSelectedLabels = config.maxSelectedLabels || 3;\r\n this.selectedItemsLabel = config.selectedItemsLabel || '{0} items selected';\r\n this.showToggleAll = config.showToggleAll || true;\r\n this.resetFilterOnHide = config.resetFilterOnHide || false;\r\n }\r\n}\r\n\r\nexport class PickListFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n sourceHeader: string;\r\n targetHeader: string;\r\n showSourceControls: boolean;\r\n showTargetControls: boolean;\r\n showSourceFilter: boolean;\r\n showTargetFilter: boolean;\r\n filterBy: string;\r\n dataKey?: string;\r\n dragdrop: boolean;\r\n responsive: boolean;\r\n breakpoint: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n sourceHeader?: string;\r\n targetHeader?: string;\r\n showSourceControls?: boolean;\r\n showTargetControls?: boolean;\r\n showSourceFilter?: boolean;\r\n showTargetFilter?: boolean;\r\n filterBy?: string;\r\n dataKey?: string;\r\n dragdrop?: boolean;\r\n responsive?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'pick-list' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.sourceHeader = config.sourceHeader || 'Available';\r\n this.targetHeader = config.targetHeader || 'Selected';\r\n this.showSourceControls =\r\n config.showSourceControls !== undefined\r\n ? config.showSourceControls\r\n : true;\r\n this.showTargetControls =\r\n config.showTargetControls !== undefined\r\n ? config.showTargetControls\r\n : true;\r\n this.showSourceFilter =\r\n config.showSourceFilter !== undefined ? config.showSourceFilter : false;\r\n this.showTargetFilter =\r\n config.showTargetFilter !== undefined ? config.showTargetFilter : false;\r\n this.filterBy = config.filterBy || this.optionLabel;\r\n this.dataKey = config.dataKey || this.optionValue;\r\n this.dragdrop = config.dragdrop ?? false;\r\n this.responsive = config.responsive ?? true;\r\n }\r\n}\r\n\r\nexport class CheckboxFieldConfig extends BaseFieldConfig {\r\n binary?: boolean;\r\n trueValue?: any;\r\n falseValue?: any;\r\n checkboxIcon?: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n binary?: boolean;\r\n trueValue?: any;\r\n falseValue?: any;\r\n checkboxIcon?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'checkbox' });\r\n this.binary = config.binary !== false; // Default to true\r\n this.trueValue = config.trueValue !== undefined ? config.trueValue : true;\r\n this.falseValue =\r\n config.falseValue !== undefined ? config.falseValue : false;\r\n this.checkboxIcon = config.checkboxIcon;\r\n }\r\n}\r\nexport class ToggleFieldConfig extends BaseFieldConfig {\r\n toggleShape?: 'toggle' | 'card';\r\n icon?: string;\r\n descriptionCard?: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n toggleShape?: 'toggle' | 'card';\r\n icon?: string;\r\n descriptionCard?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'toggle' });\r\n this.toggleShape = config.toggleShape ?? 'toggle';\r\n this.icon = config.icon;\r\n this.descriptionCard = config.descriptionCard;\r\n }\r\n}\r\nexport class EditorFieldConfig extends BaseFieldConfig {\r\n constructor(config: Omit<BaseFieldConstructorConfig, 'type'>) {\r\n super({ ...config, type: 'editor-field' });\r\n }\r\n}\r\n\r\nexport class ColorPickerFieldConfig extends BaseFieldConfig {\r\n format?: 'hex' | 'rgb' | 'hsb';\r\n inline?: boolean;\r\n appendTo?: any;\r\n variant?: 'outlined' | 'filled';\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n format?: 'hex' | 'rgb' | 'hsb';\r\n inline?: boolean;\r\n appendTo?: any;\r\n variant?: 'outlined' | 'filled';\r\n },\r\n ) {\r\n super({ ...config, type: 'color-picker' });\r\n this.format = config.format || 'hex';\r\n this.inline = config.inline || false;\r\n this.appendTo = config.appendTo || 'body';\r\n this.variant = config.variant || 'outlined';\r\n }\r\n}\r\n\r\nexport class IconFieldConfig extends BaseFieldConfig {\r\n constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {}) {\r\n super({ ...config, type: 'icon-field' });\r\n }\r\n}\r\n\r\nexport class SpacerFieldConfig extends BaseFieldConfig {\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type' | 'key' | 'label'> & {\r\n key?: string;\r\n label?: string;\r\n },\r\n ) {\r\n super({\r\n ...config,\r\n type: 'spacer',\r\n key: config.key || `spacer_${Date.now()}`,\r\n label: config.label || '',\r\n });\r\n }\r\n}\r\n\r\nexport interface LookupOptionItemConfig {\r\n id?: number | string;\r\n key?: string;\r\n label: string;\r\n value: any;\r\n color?: string | null;\r\n description?: string;\r\n}\r\n\r\nexport interface LookupMatrixCellConfig {\r\n row: number;\r\n column: number;\r\n xLookupItemId: number | string;\r\n yLookupItemId?: number | string;\r\n zLookupItemId?: number | string | null;\r\n label: string;\r\n color?: string | null;\r\n}\r\n\r\nexport class LookupMatrixFieldConfig extends BaseFieldConfig {\r\n xFieldKey: string;\r\n yFieldKey?: string;\r\n xAxisLabel: string;\r\n yAxisLabel?: string;\r\n xOptions: LookupOptionItemConfig[];\r\n yOptions?: LookupOptionItemConfig[];\r\n cells: LookupMatrixCellConfig[];\r\n emptyMessage: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n xFieldKey: string;\r\n yFieldKey?: string;\r\n xAxisLabel?: string;\r\n yAxisLabel?: string;\r\n xOptions?: LookupOptionItemConfig[];\r\n yOptions?: LookupOptionItemConfig[];\r\n cells?: LookupMatrixCellConfig[];\r\n emptyMessage?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'lookup-matrix' });\r\n this.xFieldKey = config.xFieldKey;\r\n this.yFieldKey = config.yFieldKey;\r\n this.xAxisLabel = config.xAxisLabel || '';\r\n this.yAxisLabel = config.yAxisLabel;\r\n this.xOptions = config.xOptions || [];\r\n this.yOptions = config.yOptions;\r\n this.cells = config.cells || [];\r\n this.emptyMessage = config.emptyMessage || 'No matrix data available';\r\n }\r\n}\r\n\r\nexport class SchemaConnectionFieldConfig extends BaseFieldConfig {\r\n configuration: any;\r\n context: HttpContext | undefined;\r\n filter: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n configuration: any;\r\n context?: HttpContext | undefined;\r\n filter?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'schema-connection' });\r\n this.configuration = config.configuration;\r\n this.context = config.context || undefined;\r\n this.filter = config.filter ?? true;\r\n }\r\n}\r\n\r\nexport interface SchedulePredecessorFieldRuntimeContext {\r\n levelId?: number | string | null;\r\n levelDataId?: number | string | null;\r\n moduleDataId?: number | string | null;\r\n}\r\n\r\nexport class SchedulePredecessorFieldConfig extends BaseFieldConfig {\r\n configuration: any;\r\n runtimeContext: SchedulePredecessorFieldRuntimeContext | null;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n configuration?: any;\r\n runtimeContext?: SchedulePredecessorFieldRuntimeContext | null;\r\n },\r\n ) {\r\n super({ ...config, type: 'predecessor' });\r\n this.configuration = config.configuration ?? null;\r\n this.runtimeContext = config.runtimeContext ?? null;\r\n }\r\n}\r\n\r\nexport interface EntityListFieldRuntimeContext {\r\n /**\r\n * Route id for the read endpoint.\r\n * - Level-scoped EntityList properties → level-data id\r\n * - Module-scoped EntityList properties → source module-data id\r\n */\r\n sourceId?: number | string | null;\r\n /** Current level id (used to build the fetch/query contextKey). */\r\n levelId?: number | string | null;\r\n levelDataId?: number | string | null;\r\n}\r\n\r\nexport class EntityListFieldConfig extends BaseFieldConfig {\r\n /** EntityList property id (used in the read endpoint route). */\r\n propertyId: number | null;\r\n /** Property configuration (sourceType, moduleId, access, snapshotMode, fields). */\r\n configuration: any;\r\n /** Runtime ids needed to call the read endpoint. */\r\n runtimeContext: EntityListFieldRuntimeContext | null;\r\n context: HttpContext | undefined;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n propertyId?: number | null;\r\n configuration?: any;\r\n runtimeContext?: EntityListFieldRuntimeContext | null;\r\n context?: HttpContext | undefined;\r\n },\r\n ) {\r\n super({ ...config, type: 'entity-list' });\r\n this.propertyId = config.propertyId ?? null;\r\n this.configuration = config.configuration ?? null;\r\n this.runtimeContext = config.runtimeContext ?? null;\r\n this.context = config.context;\r\n }\r\n}\r\n\r\nexport interface ScheduleItemSelectorFieldRuntimeContext {\r\n /** Current level id — used to build the options `contextKey` (`Level:{levelId}`). */\r\n levelId?: number | string | null;\r\n /**\r\n * Module schema id of the form that owns the selector property — the\r\n * `Module:{moduleId}` segment of the options `contextKey`. For Deliverable\r\n * Acceptance this is the Deliverable Acceptance module schema id, NOT the\r\n * target schedule module id.\r\n */\r\n moduleId?: number | string | null;\r\n /** Current workspace instance id (`levelDataId` query param). */\r\n levelDataId?: number | string | null;\r\n /**\r\n * Record being edited (`ownerRecordId` query param). Lets the backend keep\r\n * the current record's existing selections valid in edit mode.\r\n */\r\n ownerRecordId?: number | string | null;\r\n}\r\n\r\nexport class ScheduleItemSelectorFieldConfig extends BaseFieldConfig {\r\n /** Property key — used in the options endpoint route `forms/options/{propertyKey}`. */\r\n propertyKey: string;\r\n /** `Single` renders a single-select picker, `Multi` a multi-select picker. */\r\n selectionMode: 'Single' | 'Multi';\r\n /** Raw property configuration (selectionMode, scheduleModuleKey, etc.). */\r\n configuration: any;\r\n /** Runtime ids needed to call the options endpoint. */\r\n runtimeContext: ScheduleItemSelectorFieldRuntimeContext | null;\r\n context: HttpContext | undefined;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n propertyKey?: string;\r\n selectionMode?: 'Single' | 'Multi';\r\n configuration?: any;\r\n runtimeContext?: ScheduleItemSelectorFieldRuntimeContext | null;\r\n context?: HttpContext | undefined;\r\n },\r\n ) {\r\n super({ ...config, type: 'schedule-item-selector' });\r\n this.propertyKey = config.propertyKey || config.key || '';\r\n this.selectionMode = config.selectionMode || 'Multi';\r\n this.configuration = config.configuration ?? null;\r\n this.runtimeContext = config.runtimeContext ?? null;\r\n this.context = config.context;\r\n }\r\n}\r\n\r\n/** One configured module property the checklist captures for each entry. */\r\nexport interface LookupCheckListPropertyConfig {\r\n /** Property key persisted in `props[].key`. */\r\n key: string;\r\n /** Human-readable label shown next to the input. */\r\n label: string;\r\n}\r\n\r\nexport interface LookupModuleCheckListFieldRuntimeContext {\r\n /** Current level id — passed to `process-form-load` for each section form. */\r\n levelId?: number | string | null;\r\n /** Current workspace instance id — passed to `process-form-load`. */\r\n levelDataId?: number | string | null;\r\n}\r\n\r\nexport class LookupModuleCheckListFieldConfig extends BaseFieldConfig {\r\n /** Lookup items rendered as collapsible checklist sections. */\r\n lookupOptions: LookupOptionItemConfig[];\r\n /** Full lookup catalog passed through to the rich nested form renderer. */\r\n lookups: unknown[];\r\n /** Module property keys/labels captured per checklist entry. */\r\n propertyFields: LookupCheckListPropertyConfig[];\r\n /** Scope module id whose form is loaded for each section. */\r\n scopeId: number | string | null;\r\n /** Property keys to render in each section form (`allowedFieldKeys`). */\r\n propertyKeys: string[];\r\n /** Runtime ids needed to load each section form. */\r\n runtimeContext: LookupModuleCheckListFieldRuntimeContext | null;\r\n /** Raw property configuration (lookup id, scope/module id, properties). */\r\n configuration: any;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n lookupOptions?: LookupOptionItemConfig[];\r\n lookups?: unknown[];\r\n propertyFields?: LookupCheckListPropertyConfig[];\r\n scopeId?: number | string | null;\r\n propertyKeys?: string[];\r\n runtimeContext?: LookupModuleCheckListFieldRuntimeContext | null;\r\n configuration?: any;\r\n },\r\n ) {\r\n super({ ...config, type: 'lookup-module-check-list' });\r\n this.lookupOptions = config.lookupOptions || [];\r\n this.lookups = config.lookups || [];\r\n this.propertyFields = config.propertyFields || [];\r\n this.scopeId = config.scopeId ?? null;\r\n this.propertyKeys = config.propertyKeys || [];\r\n this.runtimeContext = config.runtimeContext ?? null;\r\n this.configuration = config.configuration ?? null;\r\n }\r\n}\r\n\r\n// Union type for all field configurations\r\nexport type DynamicFieldConfig = {\r\n [K in keyof (TextFieldConfig &\r\n TextareaFieldConfig &\r\n SelectFieldConfig &\r\n DateFieldConfig &\r\n NumberFieldConfig &\r\n SliderFieldConfig &\r\n MultiSelectFieldConfig &\r\n PickListFieldConfig &\r\n CheckboxFieldConfig &\r\n ToggleFieldConfig &\r\n LocationFieldConfig &\r\n ColorPickerFieldConfig &\r\n IconFieldConfig &\r\n SpacerFieldConfig &\r\n LookupMatrixFieldConfig &\r\n SchemaConnectionFieldConfig &\r\n SchedulePredecessorFieldConfig &\r\n EntityListFieldConfig &\r\n ScheduleItemSelectorFieldConfig &\r\n LookupModuleCheckListFieldConfig &\r\n BaseFieldConfig)]?: (TextFieldConfig &\r\n TextareaFieldConfig &\r\n SelectFieldConfig &\r\n DateFieldConfig &\r\n NumberFieldConfig &\r\n SliderFieldConfig &\r\n MultiSelectFieldConfig &\r\n PickListFieldConfig &\r\n CheckboxFieldConfig &\r\n ToggleFieldConfig &\r\n LocationFieldConfig &\r\n ColorPickerFieldConfig &\r\n IconFieldConfig &\r\n SpacerFieldConfig &\r\n LookupMatrixFieldConfig &\r\n SchemaConnectionFieldConfig &\r\n SchedulePredecessorFieldConfig &\r\n EntityListFieldConfig &\r\n ScheduleItemSelectorFieldConfig &\r\n LookupModuleCheckListFieldConfig &\r\n BaseFieldConfig)[K];\r\n};\r\n\r\n// Layout configuration\r\nexport interface LayoutConfig {\r\n containerClass?: string;\r\n sectionClass?: string;\r\n fieldClass?: string;\r\n}\r\n\r\n// Simplified form configuration interface\r\nexport interface DynamicFormConfig {\r\n sections: SectionConfig[];\r\n layout?: LayoutConfig;\r\n validationRules?: FormulaValidationRuleConfig[];\r\n}\r\nexport interface SectionConfig {\r\n key?: string;\r\n label?: string;\r\n type: 'none' | 'header';\r\n cssClass?: string;\r\n bodyClass?: string;\r\n headerClass?: string;\r\n columns?: number;\r\n\r\n order?: number;\r\n fields: DynamicFieldConfig[];\r\n}\r\nexport interface FieldState {\r\n hidden: boolean;\r\n disabled: boolean;\r\n}\r\n\r\nexport function createCustomValidator(\r\n customValidator: (\r\n value: any,\r\n control?: AbstractControl,\r\n ) => boolean | Promise<boolean>,\r\n message?: string,\r\n): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const result = customValidator(control.value, control);\r\n\r\n if (result instanceof Promise) {\r\n // Handle async validation\r\n result.then((isValid) => {\r\n if (!isValid) {\r\n control.setErrors({\r\n custom: { message: message || 'Invalid value' },\r\n });\r\n }\r\n });\r\n return null; // For async, return null initially\r\n } else {\r\n // Handle sync validation\r\n return result\r\n ? null\r\n : { custom: { message: message || 'Invalid value' } };\r\n }\r\n };\r\n}\r\n\r\nexport function wrapValidatorWithMessage(\r\n validator: ValidatorFn,\r\n errorKey: string,\r\n message: string,\r\n): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const result = validator(control);\r\n if (result) {\r\n // Replace the default error with custom message\r\n return { [errorKey]: { ...result[Object.keys(result)[0]], message } };\r\n }\r\n return null;\r\n };\r\n}\r\n// DynamicFieldConfig = input.required<any>({\r\n// transform: (value: any) => this.transformToDateFieldConfig(value)\r\n// });\r\n// transformToDateFieldConfig(value: any){\r\n// return new TextFieldConfig()\r\n// }\r\n","import { computed, Signal } from '@angular/core';\r\n\r\n/**\r\n * Query result with separate signals for each property\r\n */\r\nexport interface QueryResult<T> {\r\n data: Signal<T | null>;\r\n isPending: Signal<boolean>;\r\n isSuccess: Signal<boolean>;\r\n isError: Signal<boolean>;\r\n error: Signal<string | null>;\r\n}\r\n\r\n/**\r\n * @deprecated Use direct `select()` + `computed()` pattern instead for better performance.\r\n *\r\n * **Problem with BaseFacade:**\r\n * - All computed signals depend on the full state, causing unnecessary recomputations\r\n * - Bypasses NGXS selector memoization\r\n * - Uses `as any` casting, losing type safety\r\n *\r\n * **New Pattern - Use slice-based selectors:**\r\n *\r\n * ```typescript\r\n * // In your State class - add slice selectors:\r\n * @Selector()\r\n * static getLoadingActive(state: MyStateModel): string[] {\r\n * return state.loadingActive;\r\n * }\r\n *\r\n * @Selector()\r\n * static getErrors(state: MyStateModel): Record<string, string | null> {\r\n * return state.errors;\r\n * }\r\n *\r\n * // In your Facade - don't extend BaseFacade:\r\n * @Injectable({ providedIn: 'root' })\r\n * export class MyFacade {\r\n * private readonly store = inject(Store);\r\n *\r\n * // Data selectors - memoized by NGXS\r\n * readonly items = select(MyState.getItems);\r\n *\r\n * // Loading/Error slices - memoized by NGXS\r\n * private readonly loadingActive = select(MyState.getLoadingActive);\r\n * private readonly errors = select(MyState.getErrors);\r\n *\r\n * // Loading signals - computed from slice (minimal reactivity)\r\n * readonly isLoadingItems = computed(() =>\r\n * this.loadingActive().includes(MyActionKey.GetItems)\r\n * );\r\n *\r\n * // Error signals - computed from slice (minimal reactivity)\r\n * readonly itemsError = computed(() =>\r\n * this.errors()[MyActionKey.GetItems] ?? null\r\n * );\r\n *\r\n * // Dispatchers\r\n * loadItems() {\r\n * return this.store.dispatch(new GetItems());\r\n * }\r\n * }\r\n * ```\r\n *\r\n * **Template Usage:**\r\n * ```html\r\n * @if (facade.isLoadingItems()) {\r\n * <loading-spinner />\r\n * } @else if (facade.itemsError(); as error) {\r\n * <error-alert>{{ error }}</error-alert>\r\n * } @else {\r\n * @for (item of facade.items(); track item.id) {\r\n * <item-card [item]=\"item\" />\r\n * }\r\n * }\r\n * ```\r\n */\r\nexport abstract class BaseFacade<TState, TLoadingName extends string> {\r\n /**\r\n * Override in child facade to provide the state selector\r\n */\r\n protected abstract state(): Signal<TState>;\r\n\r\n /**\r\n * Creates a query object with separate signals for data, loading, and error states\r\n * Each property is its own signal for granular reactivity\r\n *\r\n * @example\r\n * readonly modulesQuery = this.query(\r\n * 'getModulesLoading',\r\n * (state) => state.allModules\r\n * );\r\n *\r\n * // In template - each is a separate signal:\r\n * @if (modulesQuery.isPending()) { Loading... }\r\n * @if (modulesQuery.error(); as error) { Error: {{ error }} }\r\n * @if (modulesQuery.data(); as modules) {\r\n * <div *ngFor=\"let m of modules\">{{ m.title }}</div>\r\n * }\r\n */\r\n protected query<T>(\r\n loadingKey: TLoadingName,\r\n dataSelector: (state: TState) => T,\r\n ): QueryResult<T> {\r\n const stateSignal = this.state();\r\n\r\n const isPending = computed(() => {\r\n const currentState = stateSignal() as any;\r\n return currentState.loadingActive?.includes(loadingKey) ?? false;\r\n });\r\n\r\n const error = computed(() => {\r\n const currentState = stateSignal() as any;\r\n return currentState.errors?.[loadingKey] ?? null;\r\n });\r\n\r\n const data = computed(() => {\r\n const currentState = stateSignal() as any;\r\n const hasError = currentState.errors?.[loadingKey];\r\n return hasError ? null : dataSelector(currentState);\r\n });\r\n\r\n const isSuccess = computed(\r\n () => !isPending() && !error() && data() !== null,\r\n );\r\n\r\n const isError = computed(() => !!error());\r\n\r\n return {\r\n data,\r\n isPending,\r\n isSuccess,\r\n isError,\r\n error,\r\n };\r\n }\r\n\r\n /**\r\n * Creates a loading signal for a specific operation\r\n */\r\n protected loading(loadingKey: TLoadingName): Signal<boolean> {\r\n const stateSignal = this.state();\r\n return computed(() => {\r\n const currentState = stateSignal() as any;\r\n return currentState.loadingActive?.includes(loadingKey) ?? false;\r\n });\r\n }\r\n\r\n /**\r\n * Creates an error signal for a specific operation\r\n */\r\n protected errorSignal(loadingKey: TLoadingName): Signal<string | null> {\r\n const stateSignal = this.state();\r\n return computed(() => {\r\n const currentState = stateSignal() as any;\r\n return currentState.errors?.[loadingKey] ?? null;\r\n });\r\n }\r\n}\r\n","export interface EntityAdapter<T> {\r\n addOne(state: T[], entity: T): T[];\r\n upsertOne(state: T[], entity: T, uniqueKey?: keyof T): T[];\r\n updateOne(\r\n state: T[],\r\n id: string | number,\r\n changes: Partial<T>,\r\n uniqueKey?: keyof T,\r\n ): T[];\r\n removeOne(state: T[], id: string | number, uniqueKey?: keyof T): T[];\r\n setAll(state: T[], entities: T[]): T[];\r\n}\r\n\r\nexport function createEntityAdapter<T>(): EntityAdapter<T> {\r\n return {\r\n addOne: (state: T[], entity: T): T[] => [...state, entity],\r\n\r\n upsertOne: (\r\n state: T[],\r\n entity: T,\r\n uniqueKey: keyof T = 'id' as keyof T,\r\n ): T[] => {\r\n const key = entity[uniqueKey];\r\n if (key == null) return state;\r\n const index = state.findIndex((e) => e[uniqueKey] === key);\r\n if (index === -1) {\r\n return [...state, entity];\r\n }\r\n const clone = [...state];\r\n clone[index] = entity;\r\n return clone;\r\n },\r\n\r\n updateOne: (\r\n state: T[],\r\n id: string | number,\r\n changes: Partial<T>,\r\n uniqueKey: keyof T = 'id' as keyof T,\r\n ): T[] =>\r\n state.map((e) => (e[uniqueKey] === id ? { ...e, ...changes } : e)),\r\n\r\n removeOne: (\r\n state: T[],\r\n id: string | number,\r\n uniqueKey: keyof T = 'id' as keyof T,\r\n ): T[] => state.filter((e) => e[uniqueKey] !== id),\r\n\r\n setAll: (_state: T[], entities: T[]): T[] => [...entities],\r\n };\r\n}\r\n","import type { StateContext } from '@ngxs/store';\r\n\r\nexport interface LoadingStateShape<L extends string = string> {\r\n loadingActive: L[];\r\n errors: Partial<Record<L, string>>;\r\n}\r\n\r\ntype LoadingName<T extends LoadingStateShape<string>> =\r\n T['loadingActive'][number];\r\n\r\nexport function startLoading<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n): void {\r\n const { loadingActive, errors } = ctx.getState();\r\n\r\n if (!loadingActive.includes(loadingName)) {\r\n ctx.patchState({\r\n loadingActive: [...loadingActive, loadingName],\r\n } as Partial<T>);\r\n }\r\n\r\n if (errors && errors[loadingName]) {\r\n const { [loadingName]: _removed, ...rest } = errors;\r\n ctx.patchState({ errors: rest } as Partial<T>);\r\n }\r\n}\r\n\r\nexport function endLoading<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n): void {\r\n const { loadingActive } = ctx.getState();\r\n\r\n ctx.patchState({\r\n loadingActive: loadingActive.filter((name) => name !== loadingName),\r\n } as Partial<T>);\r\n}\r\n\r\nexport function setLoadingError<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n message: string,\r\n): void {\r\n const { errors } = ctx.getState();\r\n ctx.patchState({\r\n errors: { ...errors, [loadingName]: message },\r\n } as Partial<T>);\r\n}\r\n","import { StateContext } from '@ngxs/store';\r\nimport { Observable } from 'rxjs';\r\nimport { tap, catchError, finalize } from 'rxjs/operators';\r\nimport {\r\n startLoading,\r\n endLoading,\r\n setLoadingError,\r\n LoadingStateShape,\r\n} from './state-helpers';\r\n\r\ntype LoadingName<TState extends LoadingStateShape<string>> =\r\n TState['loadingActive'][number];\r\n\r\nexport interface ApiRequestConfig<\r\n TState extends LoadingStateShape<string>,\r\n TResponse,\r\n> {\r\n ctx: StateContext<TState>;\r\n key: LoadingName<TState>;\r\n request$: Observable<TResponse>;\r\n onSuccess: (response: TResponse, state: TState) => Partial<TState> | void;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\nexport function handleApiRequest<\r\n TState extends LoadingStateShape<string>,\r\n TResponse,\r\n>(config: ApiRequestConfig<TState, TResponse>) {\r\n const { ctx, key, request$, onSuccess, onError, errorMessage } = config;\r\n\r\n startLoading(ctx, key);\r\n\r\n return request$.pipe(\r\n tap((response) => {\r\n const state = ctx.getState();\r\n const patch = onSuccess(response, state);\r\n if (patch) {\r\n ctx.patchState(patch);\r\n }\r\n }),\r\n catchError((error) => {\r\n const state = ctx.getState();\r\n const message = error?.error?.message ?? error?.message ?? errorMessage;\r\n setLoadingError(ctx, key, message);\r\n\r\n // Call onError callback if provided\r\n if (onError) {\r\n const patch = onError(error, state);\r\n if (patch) {\r\n ctx.patchState(patch);\r\n }\r\n }\r\n\r\n throw error;\r\n }),\r\n finalize(() => endLoading(ctx, key)),\r\n );\r\n}\r\n","import { StateContext } from '@ngxs/store';\r\nimport { Observable } from 'rxjs';\r\nimport { createEntityAdapter } from '../utils/entity-adapter';\r\nimport { handleApiRequest } from '../utils/api-request.helper';\r\nimport { LoadingStateShape } from '../utils/state-helpers';\r\n\r\nexport interface Response<T> {\r\n endpoint: string;\r\n status: number;\r\n code: number;\r\n locale: string;\r\n message?: string | null;\r\n errors?: unknown | null;\r\n data: T;\r\n cacheSession?: string;\r\n}\r\nexport interface CrudLoadConfig<T, TState, TLoad extends string, TData = T[]> {\r\n key: TLoad;\r\n request$: Observable<Response<TData>>;\r\n stateProperty?: (state: TState) => T[];\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for complex state updates.\r\n * CRUD methods should only be used for simple array operations with `stateProperty`.\r\n */\r\n updateState?: (state: TState, data: TData) => Partial<TState>;\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for data transformation.\r\n * CRUD methods should only be used for simple array operations.\r\n */\r\n transform?: (data: TData) => TData;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\nexport interface CrudCreateConfig<T, TState, TLoad extends string> {\r\n key: TLoad;\r\n request$: Observable<Response<T>>;\r\n stateProperty: (state: TState) => T[];\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for complex state updates.\r\n * CRUD methods should only be used for simple array operations with `stateProperty`.\r\n */\r\n updateState?: (state: TState, items: T[]) => Partial<TState>;\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for data transformation.\r\n * CRUD methods should only be used for simple array operations.\r\n */\r\n transform?: (data: T) => T;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\nexport interface CrudUpdateConfig<T, TState, TLoad extends string> {\r\n key: TLoad;\r\n request$: Observable<Response<T>>;\r\n uniqueKey: keyof T;\r\n id: string | number;\r\n stateProperty: (state: TState) => T[];\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for complex state updates.\r\n * CRUD methods should only be used for simple array operations with `stateProperty`.\r\n */\r\n updateState?: (state: TState, items: T[]) => Partial<TState>;\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for data transformation.\r\n * CRUD methods should only be used for simple array operations.\r\n */\r\n transform?: (data: T) => T;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\nexport interface CrudDeleteConfig<T, TState, TLoad extends string> {\r\n key: TLoad;\r\n request$: Observable<Response<void>>;\r\n uniqueKey: keyof T;\r\n id: string | number;\r\n stateProperty: (state: TState) => T[];\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for complex state updates.\r\n * CRUD methods should only be used for simple array operations with `stateProperty`.\r\n */\r\n updateState?: (state: TState, items: T[]) => Partial<TState>;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\n/**\r\n * T = entity type (Module, User, ...)\r\n * TState = full state model (must include LoadingStateShape)\r\n * TLoad = union type of loading keys for this feature\r\n */\r\nexport abstract class CrudStateBase<\r\n T,\r\n TState extends LoadingStateShape<TLoad>,\r\n TLoad extends string,\r\n> {\r\n protected adapter = createEntityAdapter<T>();\r\n\r\n /**\r\n * Helper to create default updateState function\r\n */\r\n private getDefaultUpdateState<TState>(\r\n stateProperty: (state: TState) => T[],\r\n ): (state: TState, items: T[]) => Partial<TState> {\r\n // Try to extract the property name from the stateProperty function\r\n const funcStr = stateProperty.toString();\r\n const match = funcStr.match(/\\.([a-zA-Z_$][a-zA-Z0-9_$]*)/); // Match .propertyName\r\n const key = match ? match[1] : 'items';\r\n\r\n return (state, items) => ({ [key]: items }) as Partial<TState>;\r\n }\r\n\r\n /**\r\n * @deprecated Use `handleApiRequest` directly with `onSuccess` callback.\r\n * The `load()` method provides no significant benefit over `handleApiRequest`.\r\n *\r\n * @example\r\n * // Instead of this.load(), use:\r\n * return handleApiRequest({\r\n * ctx,\r\n * key: ActionKey.GetItems,\r\n * request$: req$,\r\n * onSuccess: (response) => ({\r\n * items: response.data ?? [],\r\n * }),\r\n * });\r\n */\r\n protected load<TData = T[]>(\r\n ctx: StateContext<TState>,\r\n config: CrudLoadConfig<T, TState, TLoad, TData>,\r\n ) {\r\n return handleApiRequest({\r\n ctx,\r\n key: config.key,\r\n request$: config.request$,\r\n onSuccess: (response, state) => {\r\n const data = config.transform\r\n ? config.transform(response.data)\r\n : response.data;\r\n\r\n // If stateProperty provided, use adapter for array operations\r\n if (config.stateProperty) {\r\n const items = this.adapter.setAll(\r\n config.stateProperty(state),\r\n data as T[],\r\n );\r\n const updateState =\r\n config.updateState ??\r\n this.getDefaultUpdateState(config.stateProperty);\r\n return updateState(state, items as any);\r\n }\r\n\r\n // Otherwise, use custom updateState directly\r\n if (config.updateState) {\r\n return config.updateState(state, data);\r\n }\r\n\r\n throw new Error('Either stateProperty or updateState must be provided');\r\n },\r\n onError: config.onError,\r\n errorMessage: config.errorMessage ?? 'Failed to load data',\r\n });\r\n }\r\n\r\n /**\r\n * Create one entity with config object\r\n */\r\n protected create(\r\n ctx: StateContext<TState>,\r\n config: CrudCreateConfig<T, TState, TLoad>,\r\n ) {\r\n const updateState =\r\n config.updateState ?? this.getDefaultUpdateState(config.stateProperty);\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: config.key,\r\n request$: config.request$,\r\n onSuccess: (response, state) => {\r\n const entity = config.transform\r\n ? config.transform(response.data)\r\n : response.data;\r\n const items = this.adapter.addOne(config.stateProperty(state), entity);\r\n return updateState(state, items);\r\n },\r\n onError: config.onError,\r\n errorMessage: config.errorMessage ?? 'Failed to create item',\r\n });\r\n }\r\n\r\n /**\r\n * Update one entity with config object\r\n */\r\n protected update(\r\n ctx: StateContext<TState>,\r\n config: CrudUpdateConfig<T, TState, TLoad>,\r\n ) {\r\n const updateState =\r\n config.updateState ?? this.getDefaultUpdateState(config.stateProperty);\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: config.key,\r\n request$: config.request$,\r\n onSuccess: (response, state) => {\r\n const entity = config.transform\r\n ? config.transform(response.data)\r\n : response.data;\r\n const items = this.adapter.upsertOne(\r\n config.stateProperty(state),\r\n entity,\r\n config.uniqueKey,\r\n );\r\n return updateState(state, items);\r\n },\r\n onError: config.onError,\r\n errorMessage: config.errorMessage ?? 'Failed to update item',\r\n });\r\n }\r\n\r\n /**\r\n * Delete one entity with config object\r\n */\r\n protected delete(\r\n ctx: StateContext<TState>,\r\n config: CrudDeleteConfig<T, TState, TLoad>,\r\n ) {\r\n const updateState =\r\n config.updateState ?? this.getDefaultUpdateState(config.stateProperty);\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: config.key,\r\n request$: config.request$,\r\n onSuccess: (_response, state) => {\r\n const items = this.adapter.removeOne(\r\n config.stateProperty(state),\r\n config.id,\r\n config.uniqueKey,\r\n );\r\n return updateState(state, items);\r\n },\r\n onError: config.onError,\r\n errorMessage: config.errorMessage ?? 'Failed to delete item',\r\n });\r\n }\r\n}\r\n","import { AbstractControl } from '@angular/forms';\r\n\r\nexport function isInvalid(control: AbstractControl | null) {\r\n if (!control) return false;\r\n return control && control?.invalid && control?.touched;\r\n}\r\n","import { HttpContextToken } from '@angular/common/http';\r\n\r\n/**\r\n * HTTP context configuration for request handling\r\n */\r\nexport interface RequestContextConfig {\r\n /** Use base URL instead of gateway URL */\r\n useBaseUrl?: boolean;\r\n}\r\n\r\n/**\r\n * Shared HTTP context token for request configuration.\r\n * Used by interceptors to determine base URL routing.\r\n *\r\n * @example\r\n * ```typescript\r\n * import { REQUEST_CONTEXT } from '@masterteam/components';\r\n *\r\n * // In a service\r\n * private context = new HttpContext().set(REQUEST_CONTEXT, { useBaseUrl: true });\r\n *\r\n * getMetadata(): Observable<any> {\r\n * return this.http.get('metadata', { context: this.context });\r\n * }\r\n *\r\n * // In interceptor\r\n * const config = req.context.get(REQUEST_CONTEXT);\r\n * if (config?.useBaseUrl) {\r\n * // Use base URL\r\n * }\r\n * ```\r\n */\r\nexport const REQUEST_CONTEXT = new HttpContextToken<RequestContextConfig>(\r\n () => ({ useBaseUrl: false }),\r\n);\r\n","/**\r\n * Color utility functions for brand display.\r\n */\r\n\r\n/**\r\n * Converts a hex color to a light shade (equivalent to primary-100 in Tailwind).\r\n * This creates a color with ~10% opacity or a very light tint by mixing with white.\r\n */\r\nexport function getLightColor(hexColor: string): string {\r\n const hex = hexColor.replace('#', '');\r\n const r = parseInt(hex.substring(0, 2), 16);\r\n const g = parseInt(hex.substring(2, 4), 16);\r\n const b = parseInt(hex.substring(4, 6), 16);\r\n\r\n const lightR = Math.round(r * 0.1 + 255 * 0.9);\r\n const lightG = Math.round(g * 0.1 + 255 * 0.9);\r\n const lightB = Math.round(b * 0.1 + 255 * 0.9);\r\n\r\n return `#${lightR.toString(16).padStart(2, '0')}${lightG\r\n .toString(16)\r\n .padStart(2, '0')}${lightB.toString(16).padStart(2, '0')}`;\r\n}\r\n\r\nexport function getContrastColor(bgColor: string): string {\r\n let r = 0,\r\n g = 0,\r\n b = 0;\r\n if (bgColor.startsWith('#')) {\r\n const hex = bgColor.slice(1);\r\n if (hex.length === 3) {\r\n r = parseInt(hex[0] + hex[0], 16);\r\n g = parseInt(hex[1] + hex[1], 16);\r\n b = parseInt(hex[2] + hex[2], 16);\r\n } else if (hex.length === 6) {\r\n r = parseInt(hex.slice(0, 2), 16);\r\n g = parseInt(hex.slice(2, 4), 16);\r\n b = parseInt(hex.slice(4, 6), 16);\r\n }\r\n }\r\n const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n return luminance > 0.5 ? '' : '#ffffff';\r\n}\r\n","import { formatDate } from '@angular/common';\r\nimport { inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';\r\nimport {\r\n MT_DATE_FORMATS,\r\n toAngularDateFormat,\r\n} from '../config/date-format.config';\r\n\r\nexport type MTDateFormatType = 'date' | 'dateTime' | 'time';\r\n\r\n@Pipe({\r\n name: 'mtDateFormat',\r\n standalone: true,\r\n})\r\nexport class MTDateFormatPipe implements PipeTransform {\r\n private readonly locale = inject(LOCALE_ID);\r\n private readonly formats = inject(MT_DATE_FORMATS);\r\n\r\n transform(value: unknown, type: MTDateFormatType = 'date'): string {\r\n if (value === null || value === undefined || value === '') {\r\n return '';\r\n }\r\n\r\n try {\r\n return formatDate(\r\n value as string | number | Date,\r\n toAngularDateFormat(this.formats[type] ?? this.formats.date),\r\n this.locale,\r\n this.formats.timezone,\r\n );\r\n } catch {\r\n return String(value);\r\n }\r\n }\r\n}\r\n","/*\r\n * Public API Surface of components\r\n */\r\n\r\n// Config\r\nexport * from './lib/config/providemt';\r\nexport * from './lib/config/ds-identity.preset';\r\nexport * from './lib/config/ds-identity.tokens';\r\nexport * from './lib/config/povide-messages';\r\nexport * from './lib/config/provide-confirmation';\r\nexport * from './lib/config/date-format.config';\r\nexport * from './lib/config/dynamic-form.model';\r\n\r\n// Base classes\r\nexport * from './lib/base/base.facade';\r\nexport * from './lib/base/crud-base.state';\r\n\r\n// Utils\r\nexport * from './lib/utils/theme';\r\nexport * from './lib/utils/inputs';\r\nexport * from './lib/utils/state-helpers';\r\nexport * from './lib/utils/api-request.helper';\r\nexport * from './lib/utils/entity-adapter';\r\nexport * from './lib/utils/http-context';\r\nexport * from './lib/utils/color.utils';\r\n\r\n// Pipes\r\nexport * from './lib/pipes/mt-date-format.pipe';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAKA;;;;;AAKG;AACH,SAAS,QAAQ,CAAC,GAAW,EAAA;IAC3B,IAAI,CAAC,GAAW,CAAC,EACf,CAAC,GAAW,CAAC,EACb,CAAC,GAAW,CAAC;;AAGf,IAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AACpB,QAAA,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACjC,QAAA,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACjC,QAAA,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACnC;AAAO,SAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3B,QAAA,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;AACrC,QAAA,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;AACrC,QAAA,CAAC,GAAG,QAAQ,CAAC,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AC,GAAG,KAAK,GAAG,CAAC,IAAI,GAAG;IAC3D,OAAO,SAAS,GAAG,GAAG,GAAG,EAAE,GAAG,SAAS;AACzC;;MC5Ba,gBAAgB,CAAA;AACV,IAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;AAC1B,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AAElD,IAAA,SAAS,CAAC,KAAc,EAAE,IAAA,GAAyB,MAAM,EAAA;AACvD,QAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE;AACzD,YAAA,OAAO,EAAE;QACX;AAEA,QAAA,IAAI;AACF,YAAA,OAAO,UAAU,CACf,KAA+B,EAC/B,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAC5D,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,OAAO,CAAC,QAAQ,CACtB;QACH;AAAE,QAAA,MAAM;AACN,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC;QACtB;IACF;uGAnBW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,cAAc;AACpB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACZD;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
1
+ {"version":3,"file":"masterteam-components.mjs","sources":["../../../../packages/masterteam/components/src/lib/utils/theme.ts","../../../../packages/masterteam/components/src/lib/config/ds-identity.tokens.ts","../../../../packages/masterteam/components/src/lib/config/ds-identity.preset.ts","../../../../packages/masterteam/components/src/lib/config/providemt.ts","../../../../packages/masterteam/components/src/lib/config/povide-messages.ts","../../../../packages/masterteam/components/src/lib/config/provide-confirmation.ts","../../../../packages/masterteam/components/src/lib/config/date-format.config.ts","../../../../packages/masterteam/components/src/lib/config/dynamic-form.model.ts","../../../../packages/masterteam/components/src/lib/base/base.facade.ts","../../../../packages/masterteam/components/src/lib/utils/entity-adapter.ts","../../../../packages/masterteam/components/src/lib/utils/state-helpers.ts","../../../../packages/masterteam/components/src/lib/utils/api-request.helper.ts","../../../../packages/masterteam/components/src/lib/base/crud-base.state.ts","../../../../packages/masterteam/components/src/lib/utils/inputs.ts","../../../../packages/masterteam/components/src/lib/utils/http-context.ts","../../../../packages/masterteam/components/src/lib/utils/color.utils.ts","../../../../packages/masterteam/components/src/lib/pipes/mt-date-format.pipe.ts","../../../../packages/masterteam/components/src/public-api.ts","../../../../packages/masterteam/components/src/masterteam-components.ts"],"sourcesContent":["type HSLTuple = [number, number, number]; // [hue, saturation, lightness]\r\ntype TailwindColorPalette = {\r\n [key: string]: string; // e.g., '50': '#f0f9ff', '500': '#0284c7'\r\n};\r\n\r\n/**\r\n * Converts a hex color string to an HSL tuple.\r\n * @param hex - The hex color string (e.g., \"#RRGGBB\" or \"#RGB\").\r\n * @returns An HSL tuple [hue, saturation, lightness] where hue is in degrees (0-360),\r\n * and saturation/lightness are percentages (0-100).\r\n */\r\nfunction hexToHsl(hex: string): HSLTuple {\r\n let r: number = 0,\r\n g: number = 0,\r\n b: number = 0;\r\n\r\n // Handle shorthand hex codes\r\n if (hex.length === 4) {\r\n r = parseInt(hex[1] + hex[1], 16);\r\n g = parseInt(hex[2] + hex[2], 16);\r\n b = parseInt(hex[3] + hex[3], 16);\r\n } else if (hex.length === 7) {\r\n r = parseInt(hex.substring(1, 3), 16);\r\n g = parseInt(hex.substring(3, 5), 16);\r\n b = parseInt(hex.substring(5, 7), 16);\r\n } else {\r\n throw new Error('Invalid hex color format. Expected #RGB or #RRGGBB.');\r\n }\r\n\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n\r\n const max: number = Math.max(r, g, b);\r\n const min: number = Math.min(r, g, b);\r\n let h: number = 0,\r\n s: number;\r\n const l: number = (max + min) / 2;\r\n\r\n if (max === min) {\r\n h = s = 0; // achromatic\r\n } else {\r\n const d: number = max - min;\r\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\r\n switch (max) {\r\n case r:\r\n h = (g - b) / d + (g < b ? 6 : 0);\r\n break;\r\n case g:\r\n h = (b - r) / d + 2;\r\n break;\r\n case b:\r\n h = (r - g) / d + 4;\r\n break;\r\n }\r\n h /= 6;\r\n }\r\n\r\n return [h * 360, s * 100, l * 100]; // HSL in degrees, percentage, percentage\r\n}\r\n\r\n/**\r\n * Converts HSL values to a hex color string.\r\n * @param h - Hue (0-360).\r\n * @param s - Saturation (0-100).\r\n * @param l - Lightness (0-100).\r\n * @returns The hex color string (e.g., \"#RRGGBB\").\r\n */\r\nfunction hslToHex(h: number, s: number, l: number): string {\r\n l /= 100;\r\n const a: number = (s * Math.min(l, 1 - l)) / 100;\r\n const f = (n: number): string => {\r\n const k: number = (n + h / 30) % 12;\r\n const color: number = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\r\n return Math.round(255 * color)\r\n .toString(16)\r\n .padStart(2, '0');\r\n };\r\n return `#${f(0)}${f(8)}${f(4)}`;\r\n}\r\n\r\n/**\r\n * Generates a Tailwind-like color palette (50-950) from a primary color (assumed to be 500).\r\n *\r\n * @param primaryColor500 - The hex string of the primary color (e.g., \"#0284c7\").\r\n * @returns An object representing the color palette, where keys are color numbers (e.g., \"50\", \"100\")\r\n * and values are hex color strings.\r\n */\r\n// export function generateTailwindPalette(\r\n// primaryColor500: string,\r\n// ): TailwindColorPalette {\r\n// const [h, s, _l]: HSLTuple = hexToHsl(primaryColor500);\r\n//\r\n// const palette: TailwindColorPalette = {\r\n// '500': primaryColor500,\r\n// };\r\n//\r\n// // Define steps for lighter shades (50 - 400)\r\n// const lightnessStepsLighter: { [key: string]: number } = {\r\n// '50': 95,\r\n// '100': 90,\r\n// '200': 80,\r\n// '300': 70,\r\n// '400': 60,\r\n// };\r\n//\r\n// const saturationReductionsLighter: { [key: string]: number } = {\r\n// '50': 40, // More desaturated\r\n// '100': 30,\r\n// '200': 20,\r\n// '300': 10,\r\n// '400': 5, // Slightly desaturated\r\n// };\r\n//\r\n// for (const shade in lightnessStepsLighter) {\r\n// if (Object.prototype.hasOwnProperty.call(lightnessStepsLighter, shade)) {\r\n// const newL: number = lightnessStepsLighter[shade];\r\n// // Ensure saturation doesn't go below 0\r\n// const newS: number = Math.max(0, s - saturationReductionsLighter[shade]);\r\n// palette[shade] = hslToHex(h, newS, newL);\r\n// }\r\n// }\r\n//\r\n// // Define steps for darker shades (600 - 950)\r\n// const lightnessStepsDarker: { [key: string]: number } = {\r\n// '600': 45,\r\n// '700': 35,\r\n// '800': 25,\r\n// '900': 15,\r\n// '950': 8, // More aggressive darkening for 950\r\n// };\r\n//\r\n// const saturationIncreasesDarker: { [key: string]: number } = {\r\n// '600': 5,\r\n// '700': 10,\r\n// '800': 15,\r\n// '900': 20,\r\n// '950': 25, // Can increase saturation for darker shades\r\n// };\r\n//\r\n// for (const shade in lightnessStepsDarker) {\r\n// if (Object.prototype.hasOwnProperty.call(lightnessStepsDarker, shade)) {\r\n// const newL: number = lightnessStepsDarker[shade];\r\n// // Ensure saturation doesn't exceed 100\r\n// const newS: number = Math.min(100, s + saturationIncreasesDarker[shade]);\r\n// palette[shade] = hslToHex(h, newS, newL);\r\n// }\r\n// }\r\n//\r\n// // Sort the keys numerically to ensure consistent order\r\n// const sortedPalette: TailwindColorPalette = {};\r\n// Object.keys(palette)\r\n// .sort((a, b) => parseInt(a) - parseInt(b))\r\n// .forEach((key: string) => {\r\n// sortedPalette[key] = palette[key];\r\n// });\r\n//\r\n// return sortedPalette;\r\n// }\r\n\r\n// Define the specific shade keys\r\nexport type PaletteShade =\r\n | '0'\r\n | '50'\r\n | '100'\r\n | '200'\r\n | '300'\r\n | '400'\r\n | '500'\r\n | '600'\r\n | '700'\r\n | '800'\r\n | '900'\r\n | '950';\r\n\r\n// A helper type for our new palette profile\r\ntype ShadeProfile = {\r\n /** Target lightness (0-100) */\r\n l: number;\r\n /** Saturation adjustment relative to the 500 shade */\r\n s_adjust: number;\r\n};\r\n\r\n/**\r\n * Defines the \"ideal\" lightness and saturation adjustment for each shade.\r\n * Lightness for 500 is set to 50 as a balanced default.\r\n */\r\nconst PALETTE_PROFILE: Record<PaletteShade, ShadeProfile> = {\r\n '0': { l: 98, s_adjust: -50 },\r\n '50': { l: 95, s_adjust: -40 },\r\n '100': { l: 90, s_adjust: -30 },\r\n '200': { l: 80, s_adjust: -20 },\r\n '300': { l: 70, s_adjust: -10 },\r\n '400': { l: 60, s_adjust: -5 },\r\n '500': { l: 50, s_adjust: 0 },\r\n '600': { l: 45, s_adjust: 5 },\r\n '700': { l: 35, s_adjust: 10 },\r\n '800': { l: 25, s_adjust: 15 },\r\n '900': { l: 15, s_adjust: 20 },\r\n '950': { l: 8, s_adjust: 25 },\r\n};\r\n\r\n// Helper to ensure palette is always in the correct 50-950 order\r\nconst ALL_SHADES: PaletteShade[] = [\r\n '0',\r\n '50',\r\n '100',\r\n '200',\r\n '300',\r\n '400',\r\n '500',\r\n '600',\r\n '700',\r\n '800',\r\n '900',\r\n '950',\r\n];\r\n\r\n/**\r\n * Clamps a number between a min and max value.\r\n */\r\nfunction clamp(value: number, min: number, max: number): number {\r\n return Math.max(min, Math.min(max, value));\r\n}\r\n\r\n/**\r\n * Generates a Tailwind-like color palette (50-950) from any given base color.\r\n *\r\n * @param baseColorHex - The hex string of the base color (e.g., \"#0284c7\").\r\n * @param baseColorShade - The shade of the base color (e.g., \"500\", \"700\").\r\n * @returns An object representing the full color palette.\r\n */\r\nexport function generateTailwindPalette(\r\n baseColorHex: string,\r\n baseColorShade: PaletteShade = '500',\r\n): TailwindColorPalette {\r\n // 1. Get HSL of the input color\r\n const [h_base, s_base, l_base]: HSLTuple = hexToHsl(baseColorHex);\r\n\r\n // 2. Find the anchors\r\n const baseProfile = PALETTE_PROFILE[baseColorShade];\r\n\r\n /** The Hue is constant across the entire palette. */\r\n const h = h_base;\r\n\r\n /**\r\n * Calculate the 500-shade's saturation by \"reversing\" the adjustment\r\n * from the base color.\r\n * e.g., if base is 700 (s_adjust: +10) and s_base is 80,\r\n * s_500 will be 70.\r\n */\r\n const s_500 = clamp(s_base - baseProfile.s_adjust, 0, 100);\r\n\r\n /**\r\n * Calculate the lightness \"offset\". This is the difference between\r\n * the base color's actual lightness and its \"ideal\" lightness\r\n * from the profile.\r\n * e.g., if base is 700 (ideal L: 35) and l_base is 38,\r\n * the offset is +3. This offset will be applied to all shades.\r\n */\r\n const l_offset = l_base - baseProfile.l;\r\n\r\n // 3. Generate the full palette\r\n const palette: Partial<TailwindColorPalette> = {};\r\n\r\n for (const shade of ALL_SHADES) {\r\n const profile = PALETTE_PROFILE[shade];\r\n\r\n // Calculate the new saturation and lightness for this shade\r\n const newS = clamp(s_500 + profile.s_adjust, 0, 100);\r\n const newL = clamp(profile.l + l_offset, 0, 100);\r\n\r\n palette[shade] = hslToHex(h, newS, newL);\r\n }\r\n\r\n // 4. Ensure the originally provided color is used exactly\r\n // (to avoid rounding errors from HSL conversion)\r\n palette[baseColorShade] = baseColorHex;\r\n\r\n return palette as TailwindColorPalette;\r\n}\r\n","/**\n * Masterteam Design System — raw palettes and scales.\n *\n * Transcribed from the DS Storybook foundations (Figma\n * `WTmRAkJVvw0IvZMA7wBdTC`). These are primitives: they name colours, not\n * roles. The mapping from primitive to role lives in `ds-identity.preset.ts`.\n *\n * Adding a value here without a corresponding Figma variable is how a design\n * system drifts — extend the Figma file first, then mirror it.\n */\n\nexport interface DSColorScale {\n readonly 25: string;\n readonly 50: string;\n readonly 100: string;\n readonly 200: string;\n readonly 300: string;\n readonly 400: string;\n readonly 500: string;\n readonly 600: string;\n readonly 700: string;\n readonly 800: string;\n readonly 900: string;\n readonly 950: string;\n}\n\n/** Primary blue. 800 is the primary button background. */\nexport const DS_BLUE: DSColorScale = {\n 25: '#F5FAFF',\n 50: '#EFF8FF',\n 100: '#D1E9FF',\n 200: '#B2DDFF',\n 300: '#84CAFF',\n 400: '#53B1FD',\n 500: '#2E90FA',\n 600: '#1570EF',\n 700: '#175CD3',\n 800: '#1849A9',\n 900: '#194185',\n 950: '#102A56',\n};\n\n/** Secondary indigo — accents, tags, selected states. */\nexport const DS_INDIGO: DSColorScale = {\n 25: '#F5F8FF',\n 50: '#EEF4FF',\n 100: '#E0EAFF',\n 200: '#C7D7FE',\n 300: '#A4BCFD',\n 400: '#8098F9',\n 500: '#6172F3',\n 600: '#444CE7',\n 700: '#3538CD',\n 800: '#2D31A6',\n 900: '#2D3282',\n 950: '#1F235B',\n};\n\nexport const DS_SUCCESS: DSColorScale = {\n 25: '#F6FEF9',\n 50: '#ECFDF3',\n 100: '#DCFAE6',\n 200: '#A9EFC5',\n 300: '#75E0A7',\n 400: '#47CD89',\n 500: '#17B26A',\n 600: '#079455',\n 700: '#067647',\n 800: '#085D3A',\n 900: '#074D31',\n 950: '#053321',\n};\n\nexport const DS_WARNING: DSColorScale = {\n 25: '#FFFCF5',\n 50: '#FFFAEB',\n 100: '#FEF0C7',\n 200: '#FEDF89',\n 300: '#FEC84B',\n 400: '#FDB022',\n 500: '#F79009',\n 600: '#DC6803',\n 700: '#B54708',\n 800: '#93370D',\n 900: '#7A2E0E',\n 950: '#4E1D09',\n};\n\nexport const DS_ERROR: DSColorScale = {\n 25: '#FFFBFA',\n 50: '#FEF3F2',\n 100: '#FEE4E2',\n 200: '#FECDCA',\n 300: '#FDA29B',\n 400: '#F97066',\n 500: '#F04438',\n 600: '#D92D20',\n 700: '#B42318',\n 800: '#912018',\n 900: '#7A271A',\n 950: '#55160C',\n};\n\n/** Neutral scale. Note it stops at 900 in Figma; 0/25/950 are extrapolated\n * because PrimeUIX requires a full 0–950 surface ramp. */\nexport const DS_GRAY = {\n 0: '#FFFFFF',\n 25: '#FCFCFD',\n 50: '#F9FAFB',\n 100: '#F3F4F6',\n 200: '#E5E7EB',\n 300: '#D1D5DB',\n 400: '#9CA3AF',\n 500: '#6B7280',\n 600: '#4B5563',\n 700: '#374151',\n 800: '#1F2937',\n 900: '#111827',\n 950: '#0A0F1C',\n} as const;\n\n/**\n * Semantic values that are not part of a ramp. Each one is a named Figma\n * variable in its own right.\n */\nexport const DS_SEMANTIC = {\n /** Default body / label text. Deliberately navy-black, not gray-900. */\n textStrong: '#000B36',\n textSecondary: '#3C5073',\n textPlaceholder: '#B6BDCA',\n textHelper: '#384250',\n /** Figma `--avatar/text/default` for initials and avatar icons. */\n avatarText: '#233A61',\n\n surface: '#FFFFFF',\n border: '#E5E7EB',\n\n /** Disabled is a colour swap, never an opacity fade. */\n disabledBg: '#D2D6DB',\n disabledText: '#6C7C96',\n\n inputBorder: '#D2D6DB',\n inputBorderHover: '#1F2A37',\n inputBorderReadonly: '#CED3DC',\n inputBgPressed: '#F3F4F6',\n\n /** Destructive red. Distinct from the error ramp — this is the button colour. */\n danger: '#A30000',\n dangerSecondaryBg: '#FCDAD7',\n dangerSecondaryBgHover: '#F8BAB5',\n dangerSecondaryBgPressed: '#F3908A',\n\n /** Tinted secondary button, expressed as primary-at-opacity. */\n secondaryBg: 'rgba(24, 73, 169, 0.2)',\n secondaryBgHover: 'rgba(24, 73, 169, 0.1)',\n\n focusRing: '#1849A9',\n focusOutline: '#FFFFFF',\n\n tooltipBg: '#1A2236',\n} as const;\n\n/** Figma effect styles. Never invent a shadow outside this set. */\nexport const DS_SHADOW = {\n xs: '0 1px 2px 0 rgba(16, 24, 40, 0.05)',\n sm: '0 1px 3px 0 rgba(16, 24, 40, 0.10), 0 1px 2px 0 rgba(16, 24, 40, 0.06)',\n md: '0 4px 8px -2px rgba(16, 24, 40, 0.10), 0 2px 4px -2px rgba(16, 24, 40, 0.06)',\n lg: '0 12px 16px -6px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03)',\n xl: '0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03)',\n '2xl': '0 24px 48px -12px rgba(16, 24, 40, 0.18)',\n} as const;\n\n/**\n * Radius scale. The DS names differ from the PrimeUIX names by one step —\n * DS `radius-sm` (4px, the default for buttons and inputs) lands on PrimeUIX\n * `md`, because that is the key PrimeNG components reference. Mapping them\n * here keeps the shift in one place instead of spreading it across overrides.\n */\nexport const DS_RADIUS = {\n none: '0',\n /** DS radius-xs — code badges, small tags */\n xs: '2px',\n /** DS radius-xs..sm boundary */\n sm: '4px',\n /** DS radius-sm — buttons, inputs, dropdowns (PrimeNG's default reference) */\n md: '4px',\n /** DS radius-md — cards, tooltips, popovers */\n lg: '8px',\n /** DS radius-lg — modals, drawers */\n xl: '16px',\n} as const;\n\n/** Control heights, in px, from the Figma button spacing frame. */\nexport const DS_CONTROL_HEIGHT = {\n sm: 24,\n md: 32,\n lg: 40,\n} as const;\n\n/** DatePicker component geometry from Figma node 4250:1943. */\nexport const DS_DATEPICKER = {\n panelInlineSize: '26.5rem',\n headerHeight: '3.5rem',\n weekdayHeight: '2.5rem',\n cellSize: '3.5rem',\n dateSize: '3rem',\n} as const;\n\nexport const DS_FONT_FAMILY =\n \"'IBM Plex Sans Arabic', system-ui, 'Segoe UI', sans-serif\";\n\n/** Ordered chart series. Six is the hard maximum. */\nexport const DS_CHART_SERIES = [\n '#1849A9',\n '#175CD3',\n '#2E90FA',\n '#53B1FD',\n '#B2DDFF',\n '#D1E9FF',\n] as const;\n","import { Preset } from '@primeuix/themes/types';\nimport { AuraBaseDesignTokens } from '@primeuix/themes/aura/base';\nimport {\n DS_BLUE,\n DS_CHART_SERIES,\n DS_DATEPICKER,\n DS_ERROR,\n DS_GRAY,\n DS_INDIGO,\n DS_RADIUS,\n DS_SEMANTIC,\n DS_SHADOW,\n DS_SUCCESS,\n DS_WARNING,\n} from './ds-identity.tokens';\n\n/**\n * Masterteam Design System — experimental identity, expressed as a PrimeUIX\n * preset.\n *\n * Every `mt-*` component is a thin wrapper over a PrimeNG component, so the\n * identity is applied here rather than in 200 component stylesheets: retune the\n * preset and buttons, fields, tables, overlays, tabs and toasts all move\n * together. Only the handful of things a design token cannot express — the\n * font, the double focus ring, the animated input underline — live in\n * `assets/ds-identity.css`.\n *\n * This preset is *additive*: it is merged over the classic MT configuration, so\n * anything it does not mention keeps its current behaviour.\n */\n\nexport type MTDesignIdentity = 'classic' | 'experimental';\n\n/** Root class that gates the CSS half of the identity. */\nexport const MT_DESIGN_IDENTITY_CLASS = 'mt-ds';\n\n/** DS primary button background. Used when the host does not brand the app. */\nexport const DS_DEFAULT_PRIMARY_COLOR = DS_BLUE[800];\n\n/**\n * PrimeUIX wants a 50–950 ramp; the DS publishes 25–950. Drop the 25 step and\n * keep the rest — the ramp is dense enough that nothing downstream misses it.\n */\nfunction toPrimeRamp(scale: {\n 50: string;\n 100: string;\n 200: string;\n 300: string;\n 400: string;\n 500: string;\n 600: string;\n 700: string;\n 800: string;\n 900: string;\n 950: string;\n}): Record<string, string> {\n return {\n 50: scale[50],\n 100: scale[100],\n 200: scale[200],\n 300: scale[300],\n 400: scale[400],\n 500: scale[500],\n 600: scale[600],\n 700: scale[700],\n 800: scale[800],\n 900: scale[900],\n 950: scale[950],\n };\n}\n\n/**\n * Control geometry, derived rather than hardcoded so the relationship between\n * height, line-height and border stays visible:\n *\n * height = lineHeight + 2 * paddingY + 2 * border(1px)\n *\n * sm 24px = 18 + 2*2 + 2\n * md 32px = 20 + 2*5 + 2 ← default\n * lg 40px = 24 + 2*7 + 2\n */\nconst FIELD = {\n sm: { fontSize: '0.75rem', paddingX: '0.5rem', paddingY: '0.125rem' },\n md: { fontSize: '0.875rem', paddingX: '0.5rem', paddingY: '0.3125rem' },\n lg: { fontSize: '1rem', paddingX: '0.75rem', paddingY: '0.4375rem' },\n} as const;\n\n/**\n * The DS identity as a partial preset.\n *\n * @param primaryColor Optional brand override. Tenants that white-label the\n * product still need their own colour; when omitted the DS blue is used.\n * Note the DS itself treats the blue as fixed — an override is a deliberate\n * deviation, not a supported DS variant.\n */\nexport function dsIdentityConfigs(\n primaryColor?: string,\n): Preset<AuraBaseDesignTokens> {\n const primary = primaryColor\n ? // A branded run keeps the DS ramp shape but re-anchors the key steps, so\n // hover/pressed stay one and two steps darker as the DS specifies.\n { ...toPrimeRamp(DS_BLUE), 800: primaryColor }\n : toPrimeRamp(DS_BLUE);\n\n return {\n primitive: {\n borderRadius: { ...DS_RADIUS },\n blue: toPrimeRamp(DS_BLUE),\n indigo: toPrimeRamp(DS_INDIGO),\n green: toPrimeRamp(DS_SUCCESS),\n emerald: toPrimeRamp(DS_SUCCESS),\n amber: toPrimeRamp(DS_WARNING),\n orange: toPrimeRamp(DS_WARNING),\n yellow: toPrimeRamp(DS_WARNING),\n red: toPrimeRamp(DS_ERROR),\n rose: toPrimeRamp(DS_ERROR),\n gray: toPrimeRamp(DS_GRAY),\n slate: toPrimeRamp(DS_GRAY),\n zinc: toPrimeRamp(DS_GRAY),\n },\n\n semantic: {\n primary,\n\n transitionDuration: '0.2s',\n\n /**\n * Disabled is a colour swap, never a fade — a hard DS rule, because a\n * faded control on a tinted surface stops meeting contrast at all.\n */\n disabledOpacity: '1',\n\n iconSize: '1rem',\n\n /**\n * Inner 2px primary ring. The outer 3px white halo cannot be expressed as\n * a token (PrimeUIX renders `focusRing` as a single outline) and is added\n * in `ds-identity.css`.\n */\n focusRing: {\n width: '2px',\n style: 'solid',\n color: '{primary.color}',\n offset: '0',\n shadow: 'none',\n },\n\n formField: {\n paddingX: FIELD.md.paddingX,\n paddingY: FIELD.md.paddingY,\n sm: FIELD.sm,\n lg: FIELD.lg,\n borderRadius: '{border.radius.md}',\n focusRing: {\n width: '0',\n style: 'none',\n color: 'transparent',\n offset: '0',\n shadow: 'none',\n },\n transitionDuration: '{transition.duration}',\n },\n\n content: { borderRadius: '{border.radius.lg}' },\n\n overlay: {\n select: {\n borderRadius: '{border.radius.lg}',\n shadow: DS_SHADOW.md,\n },\n popover: {\n borderRadius: '{border.radius.lg}',\n padding: '0.75rem',\n shadow: DS_SHADOW.md,\n },\n modal: {\n // 8px, not the 16px the foundations table implies for \"modals\" —\n // the DS Modal component itself ships radius-md and shadow-3xl.\n borderRadius: '{border.radius.lg}',\n padding: '1.5rem',\n shadow: '0 32px 64px -12px rgba(16, 24, 40, 0.14)',\n },\n navigation: { shadow: DS_SHADOW.md },\n },\n\n list: {\n padding: '0.25rem',\n gap: '2px',\n option: {\n padding: '0.375rem 0.5rem',\n borderRadius: '{border.radius.md}',\n },\n optionGroup: { padding: '0.375rem 0.5rem', fontWeight: '600' },\n },\n\n navigation: {\n item: {\n padding: '0.375rem 0.5rem',\n borderRadius: '{border.radius.md}',\n gap: '0.5rem',\n },\n },\n\n colorScheme: {\n light: {\n surface: {\n 0: DS_GRAY[0],\n ...toPrimeRamp(DS_GRAY),\n },\n\n /**\n * The DS anchors the primary button on blue-800, with hover and\n * pressed one and two steps darker. Aura anchors on 500, so the whole\n * triple is remapped rather than inherited.\n */\n primary: {\n color: '{primary.800}',\n contrastColor: DS_GRAY[50],\n hoverColor: '{primary.900}',\n activeColor: '{primary.950}',\n },\n\n highlight: {\n background: '{primary.50}',\n focusBackground: '{primary.100}',\n color: '{primary.800}',\n focusColor: '{primary.900}',\n },\n\n mask: { background: 'rgba(16, 24, 40, 0.6)', color: '{surface.200}' },\n\n formField: {\n background: DS_SEMANTIC.surface,\n disabledBackground: DS_SEMANTIC.disabledBg,\n filledBackground: '{surface.50}',\n filledHoverBackground: '{surface.50}',\n filledFocusBackground: '{surface.50}',\n borderColor: DS_SEMANTIC.inputBorder,\n hoverBorderColor: DS_SEMANTIC.inputBorderHover,\n // The DS keeps the border neutral on focus and signals focus with\n // the underline bar instead (see ds-identity.css).\n focusBorderColor: DS_SEMANTIC.inputBorder,\n invalidBorderColor: DS_SEMANTIC.danger,\n color: DS_SEMANTIC.textStrong,\n disabledColor: DS_SEMANTIC.disabledText,\n placeholderColor: DS_SEMANTIC.textPlaceholder,\n invalidPlaceholderColor: DS_SEMANTIC.danger,\n floatLabelColor: '{surface.500}',\n floatLabelFocusColor: '{primary.800}',\n floatLabelActiveColor: '{surface.500}',\n floatLabelInvalidColor: DS_SEMANTIC.danger,\n iconColor: '{surface.500}',\n shadow: 'none',\n },\n\n text: {\n color: DS_SEMANTIC.textStrong,\n hoverColor: DS_SEMANTIC.textStrong,\n mutedColor: '{surface.500}',\n hoverMutedColor: '{surface.600}',\n },\n\n content: {\n background: DS_SEMANTIC.surface,\n hoverBackground: '{surface.50}',\n borderColor: DS_SEMANTIC.border,\n color: '{text.color}',\n hoverColor: '{text.hover.color}',\n },\n\n list: {\n option: {\n focusBackground: '{surface.100}',\n selectedBackground: '{primary.50}',\n selectedFocusBackground: '{primary.100}',\n color: '{text.color}',\n focusColor: '{text.color}',\n selectedColor: '{primary.800}',\n selectedFocusColor: '{primary.900}',\n },\n },\n },\n\n /**\n * The DS does not publish a dark theme. Dark mode is still a shipped\n * capability here, so this is an extrapolation: the ramps are the DS\n * ramps, re-anchored to lighter primary steps for contrast on dark\n * surfaces. Treat these values as ours, not as design-approved.\n */\n dark: {\n surface: {\n 0: DS_GRAY[0],\n ...toPrimeRamp(DS_GRAY),\n },\n primary: {\n color: '{primary.400}',\n contrastColor: '{surface.950}',\n hoverColor: '{primary.300}',\n activeColor: '{primary.200}',\n },\n formField: {\n borderColor: '{surface.600}',\n hoverBorderColor: '{surface.500}',\n focusBorderColor: '{surface.600}',\n invalidBorderColor: '{red.400}',\n disabledBackground: '{surface.700}',\n disabledColor: '{surface.400}',\n placeholderColor: '{surface.400}',\n shadow: 'none',\n },\n mask: { background: 'rgba(0, 0, 0, 0.6)', color: '{surface.200}' },\n },\n },\n },\n\n components: {\n button: {\n root: {\n borderRadius: '{border.radius.md}',\n gap: '0.25rem',\n paddingX: FIELD.md.paddingX,\n paddingY: FIELD.md.paddingY,\n iconOnlyWidth: '2rem',\n sm: { ...FIELD.sm, iconOnlyWidth: '1.5rem' },\n lg: { ...FIELD.lg, iconOnlyWidth: '2.5rem' },\n label: { fontWeight: '500' },\n badgeSize: '1rem',\n },\n colorScheme: {\n light: {\n root: {\n /** DS \"neutral\" button — the standard Cancel / secondary action. */\n secondary: {\n background: '{surface.100}',\n hoverBackground: '{surface.200}',\n activeBackground: DS_SEMANTIC.disabledBg,\n borderColor: '{surface.100}',\n hoverBorderColor: '{surface.200}',\n activeBorderColor: DS_SEMANTIC.disabledBg,\n color: DS_SEMANTIC.textStrong,\n hoverColor: DS_SEMANTIC.textStrong,\n activeColor: DS_SEMANTIC.textStrong,\n },\n /** DS \"danger-primary\" — irreversible actions only. */\n danger: {\n background: DS_SEMANTIC.danger,\n hoverBackground: '#8A0000',\n activeBackground: '#6E0000',\n borderColor: DS_SEMANTIC.danger,\n hoverBorderColor: '#8A0000',\n activeBorderColor: '#6E0000',\n color: DS_GRAY[50],\n hoverColor: DS_GRAY[50],\n activeColor: DS_GRAY[50],\n },\n },\n /** DS \"transparent\" / ghost — link-style text buttons. */\n text: {\n primary: {\n color: DS_BLUE[700],\n hoverBackground: '{primary.50}',\n activeBackground: '{primary.100}',\n },\n danger: {\n color: DS_SEMANTIC.danger,\n hoverBackground: DS_SEMANTIC.dangerSecondaryBg,\n activeBackground: DS_SEMANTIC.dangerSecondaryBgHover,\n },\n },\n /** DS \"secondary-solid\" is a tint, closest to the outlined slot. */\n outlined: {\n primary: {\n borderColor: '{primary.200}',\n color: '{primary.800}',\n hoverBackground: DS_SEMANTIC.secondaryBgHover,\n activeBackground: DS_SEMANTIC.secondaryBg,\n },\n danger: {\n borderColor: DS_SEMANTIC.dangerSecondaryBgPressed,\n color: DS_SEMANTIC.danger,\n hoverBackground: DS_SEMANTIC.dangerSecondaryBg,\n activeBackground: DS_SEMANTIC.dangerSecondaryBgHover,\n },\n },\n link: {\n color: DS_BLUE[700],\n hoverColor: DS_BLUE[600],\n activeColor: DS_BLUE[800],\n },\n },\n },\n css: () => `\n .p-button.p-button-icon-only { padding-inline: 0; }\n /* Disabled is a colour swap, not a fade. */\n .p-button:disabled {\n background: ${DS_SEMANTIC.disabledBg};\n border-color: ${DS_SEMANTIC.disabledBg};\n color: ${DS_SEMANTIC.disabledText};\n cursor: not-allowed;\n }\n .p-button.p-button-text:disabled,\n .p-button.p-button-outlined:disabled {\n background: transparent;\n color: ${DS_SEMANTIC.disabledText};\n }\n `,\n },\n\n card: {\n root: {\n borderRadius: '{border.radius.lg}',\n shadow: DS_SHADOW.sm,\n },\n body: { padding: '1rem', gap: '0.5rem' },\n title: { fontSize: '1rem', fontWeight: '600' },\n subtitle: { color: DS_SEMANTIC.textSecondary },\n },\n\n datepicker: {\n panel: {\n background: DS_SEMANTIC.surface,\n borderColor: DS_SEMANTIC.border,\n color: DS_SEMANTIC.textStrong,\n borderRadius: '{border.radius.lg}',\n shadow: DS_SHADOW.xl,\n padding: '0',\n },\n header: {\n background: DS_SEMANTIC.surface,\n borderColor: 'transparent',\n color: DS_SEMANTIC.textStrong,\n padding: '0',\n },\n title: {\n gap: '0.25rem',\n fontWeight: '700',\n },\n selectMonth: {\n hoverBackground: '{surface.100}',\n color: DS_SEMANTIC.textStrong,\n hoverColor: DS_SEMANTIC.textStrong,\n padding: '0.25rem 0.375rem',\n borderRadius: '{border.radius.md}',\n },\n selectYear: {\n hoverBackground: '{surface.100}',\n color: DS_SEMANTIC.textStrong,\n hoverColor: DS_SEMANTIC.textStrong,\n padding: '0.25rem 0.375rem',\n borderRadius: '{border.radius.md}',\n },\n group: {\n borderColor: DS_SEMANTIC.border,\n gap: '0',\n },\n dayView: { margin: '0' },\n weekDay: {\n padding: '0',\n fontWeight: '400',\n color: DS_SEMANTIC.textPlaceholder,\n },\n date: {\n hoverBackground: '{surface.200}',\n selectedBackground: '{primary.800}',\n rangeSelectedBackground: '{primary.50}',\n color: DS_SEMANTIC.textStrong,\n hoverColor: DS_SEMANTIC.textStrong,\n selectedColor: DS_GRAY[50],\n rangeSelectedColor: DS_SEMANTIC.textStrong,\n width: DS_DATEPICKER.dateSize,\n height: DS_DATEPICKER.dateSize,\n borderRadius: '{border.radius.full}',\n padding: '0.25rem',\n focusRing: {\n width: '0',\n style: 'none',\n color: 'transparent',\n offset: '0',\n shadow: 'none',\n },\n },\n monthView: { margin: '0.5rem 0 0' },\n month: {\n padding: '0.5rem',\n borderRadius: '{border.radius.md}',\n },\n yearView: { margin: '0.5rem 0 0' },\n year: {\n padding: '0.5rem',\n borderRadius: '{border.radius.md}',\n },\n buttonbar: {\n padding: '0.75rem 1rem',\n borderColor: DS_SEMANTIC.border,\n },\n timePicker: {\n padding: '0.75rem 1rem',\n borderColor: DS_SEMANTIC.border,\n gap: '0.5rem',\n buttonGap: '0.25rem',\n },\n colorScheme: {\n light: {\n today: {\n background: 'transparent',\n color: '{primary.800}',\n },\n },\n },\n },\n\n tabs: {\n tab: {\n padding: '0.5rem 0.75rem',\n fontWeight: '500',\n borderWidth: '0 0 2px 0',\n },\n activeBar: { height: '2px', bottom: '-2px' },\n colorScheme: {\n light: {\n tab: {\n color: '{surface.500}',\n hoverColor: DS_SEMANTIC.textStrong,\n activeColor: '{primary.800}',\n borderColor: DS_SEMANTIC.border,\n hoverBorderColor: '{surface.300}',\n activeBorderColor: '{primary.800}',\n },\n activeBar: { background: '{primary.800}' },\n },\n },\n },\n\n datatable: {\n headerCell: { padding: '0.5rem 0.75rem' },\n bodyCell: { padding: '0.5rem 0.75rem' },\n footerCell: { padding: '0.5rem 0.75rem' },\n colorScheme: {\n light: {\n headerCell: {\n background: '{surface.50}',\n color: '{surface.600}',\n borderColor: DS_SEMANTIC.border,\n hoverBackground: '{surface.100}',\n },\n bodyCell: { borderColor: DS_SEMANTIC.border },\n row: {\n background: DS_SEMANTIC.surface,\n hoverBackground: '{surface.50}',\n color: DS_SEMANTIC.textStrong,\n selectedBackground: '{primary.50}',\n selectedColor: DS_SEMANTIC.textStrong,\n },\n },\n },\n },\n\n tag: {\n root: {\n fontSize: '0.75rem',\n fontWeight: '500',\n padding: '0.125rem 0.5rem',\n borderRadius: '{border.radius.md}',\n },\n colorScheme: {\n light: {\n primary: { background: DS_BLUE[100], color: DS_BLUE[700] },\n secondary: { background: '{surface.100}', color: '{surface.700}' },\n success: { background: DS_SUCCESS[100], color: DS_SUCCESS[700] },\n info: { background: DS_BLUE[100], color: DS_BLUE[700] },\n warn: { background: DS_WARNING[100], color: DS_WARNING[700] },\n danger: { background: DS_ERROR[100], color: DS_ERROR[700] },\n },\n },\n },\n\n toast: {\n root: { borderRadius: '{border.radius.lg}' },\n },\n\n tooltip: {\n root: {\n borderRadius: '6px',\n padding: '0.5rem 0.75rem',\n maxWidth: '20rem',\n },\n colorScheme: {\n light: {\n root: { background: DS_SEMANTIC.tooltipBg, color: '#ffffff' },\n },\n dark: {\n root: { background: DS_SEMANTIC.tooltipBg, color: '#ffffff' },\n },\n },\n },\n\n progressbar: {\n root: { borderRadius: '{border.radius.full}', height: '0.5rem' },\n },\n\n skeleton: {\n colorScheme: {\n light: { root: { background: '#e7e9ed' } },\n },\n },\n\n avatar: {\n root: {\n background: '{surface.100}',\n color: DS_SEMANTIC.avatarText,\n borderRadius: '{border.radius.md}',\n },\n group: { borderColor: DS_SEMANTIC.surface },\n },\n\n chip: {\n root: { borderRadius: '{border.radius.full}' },\n },\n },\n } as Preset<AuraBaseDesignTokens>;\n}\n\n/** The DS chart ramp, for hosts that render charts outside PrimeNG. */\nexport const dsChartSeries: readonly string[] = DS_CHART_SERIES;\n\n/**\n * Adds or removes the root class that activates the CSS half of the identity.\n * No-ops outside the browser so SSR builds stay safe.\n */\nexport function applyDesignIdentityClass(identity: MTDesignIdentity): void {\n if (typeof document === 'undefined') return;\n\n document.documentElement.classList.toggle(\n MT_DESIGN_IDENTITY_CLASS,\n identity === 'experimental',\n );\n}\n","import { providePrimeNG } from 'primeng/config';\r\nimport { generateTailwindPalette } from '../utils/theme';\r\nimport Aura from '@primeuix/themes/aura';\r\nimport { definePreset, updatePreset, usePreset } from '@primeuix/themes';\r\nimport { ToastTokenSections } from '@primeuix/themes/types/toast';\r\nimport { EnvironmentProviders } from '@angular/core';\r\nimport { Preset } from '@primeuix/themes/types';\r\nimport { AuraBaseDesignTokens } from '@primeuix/themes/aura/base';\r\nimport {\r\n applyDesignIdentityClass,\r\n DS_DEFAULT_PRIMARY_COLOR,\r\n dsIdentityConfigs,\r\n MTDesignIdentity,\r\n} from './ds-identity.preset';\r\n\r\nexport interface MTThemeOptions {\r\n primaryColor?: string;\r\n textColor?: string;\r\n backgroundColor?: string;\r\n /**\r\n * Which visual identity to render.\r\n *\r\n * - `'classic'` (default) — the shipped MT look. Unchanged.\r\n * - `'experimental'` — the Masterteam Design System identity (IBM Plex Sans\r\n * Arabic, DS blue, 4px control radius, DS elevation and focus ring).\r\n * Opt-in while the DS is being evaluated; see\r\n * `.claude/skills/mt-design-identity/SKILL.md`.\r\n */\r\n designIdentity?: MTDesignIdentity;\r\n}\r\n\r\nconst inputBorderRadius = '{border.radius.md}';\r\n\r\nconst toastStyle: ToastTokenSections.Success = {\r\n // borderColor: '{surface.300}',\r\n background: '{content.background}',\r\n // color: '{surface.600}',\r\n // closeButton: {\r\n // hoverBackground: '{surface.100}',\r\n // focusRing: {\r\n // color: '{surface.600}',\r\n // },\r\n // },\r\n};\r\n\r\n/**\r\n * Which identity the app is currently wearing. Tracked because the runtime\r\n * colour helpers below have to anchor a generated ramp on a different step per\r\n * identity — classic reads the brand colour as the 500 shade, the DS reads it\r\n * as 800.\r\n */\r\nlet activeDesignIdentity: MTDesignIdentity = 'classic';\r\n\r\nexport function getMTDesignIdentity(): MTDesignIdentity {\r\n return activeDesignIdentity;\r\n}\r\n\r\nexport function changePrimaryColor(color: string): void {\r\n const isDS = activeDesignIdentity === 'experimental';\r\n const base = color || (isDS ? DS_DEFAULT_PRIMARY_COLOR : '#2AAEC0');\r\n\r\n updatePreset({\r\n semantic: {\r\n primary: isDS\r\n ? generateTailwindPalette(base, '800')\r\n : generateTailwindPalette(base),\r\n },\r\n });\r\n}\r\n\r\nexport function changeBackgroundColor(color?: string): void {\r\n if (color) {\r\n const palette = generateTailwindPalette(color, '100');\r\n document.documentElement.style.setProperty(\r\n '--app-background-light',\r\n palette['100'],\r\n );\r\n document.documentElement.style.setProperty(\r\n '--app-background-dark',\r\n palette['950'],\r\n );\r\n }\r\n}\r\n\r\nexport function changeTextColor(color: string): void {\r\n const palette = generateTailwindPalette(color ?? '#334155', '700');\r\n updatePreset({\r\n semantic: {\r\n colorScheme: {\r\n light: {\r\n text: {\r\n color: palette['700'],\r\n hoverColor: palette['800'],\r\n hoverMutedColor: palette['600'],\r\n mutedColor: palette['500'],\r\n },\r\n },\r\n dark: {\r\n text: {\r\n color: palette['0'],\r\n hoverColor: palette['0'],\r\n hoverMutedColor: palette['300'],\r\n mutedColor: palette['400'],\r\n },\r\n },\r\n },\r\n },\r\n });\r\n}\r\n\r\nconst MTPreset = (themeOptions?: MTThemeOptions) => {\r\n const textPalette = generateTailwindPalette(\r\n themeOptions?.textColor ?? '#334155',\r\n '700',\r\n );\r\n const configs: Preset<AuraBaseDesignTokens> = {\r\n options: {\r\n prefix: 'mt',\r\n cssLayer: {\r\n name: 'primeng',\r\n order: 'theme, base, primeng',\r\n },\r\n },\r\n semantic: {\r\n colorScheme: {\r\n light: {\r\n text: {\r\n color: textPalette['700'],\r\n hoverColor: textPalette['800'],\r\n hoverMutedColor: textPalette['600'],\r\n mutedColor: textPalette['500'],\r\n },\r\n },\r\n dark: {\r\n text: {\r\n color: textPalette['0'],\r\n hoverColor: textPalette['0'],\r\n hoverMutedColor: textPalette['300'],\r\n mutedColor: textPalette['400'],\r\n },\r\n },\r\n },\r\n primary: generateTailwindPalette(themeOptions?.primaryColor || '#2AAEC0'),\r\n content: {\r\n borderRadius: '{border.radius.lg}',\r\n },\r\n formField: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n components: {\r\n autocomplete: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n cascadeselect: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n dialog: {\r\n header: {\r\n padding: '0',\r\n },\r\n content: {\r\n padding: '0',\r\n },\r\n footer: {\r\n padding: '0',\r\n },\r\n },\r\n toast: {\r\n root: {\r\n borderRadius: '{border.radius.xl}',\r\n },\r\n colorScheme: {\r\n light: {\r\n success: toastStyle,\r\n info: toastStyle,\r\n warn: toastStyle,\r\n error: toastStyle,\r\n secondary: toastStyle,\r\n },\r\n dark: {\r\n success: toastStyle,\r\n info: toastStyle,\r\n warn: toastStyle,\r\n error: toastStyle,\r\n secondary: toastStyle,\r\n },\r\n },\r\n },\r\n togglebutton: {\r\n root: {\r\n padding: '1px',\r\n borderRadius: '{border.radius.sm}',\r\n },\r\n colorScheme: {\r\n light: {\r\n root: {\r\n checkedColor: '{primary.500}',\r\n },\r\n },\r\n dark: {\r\n root: {\r\n checkedColor: '{primary.400}',\r\n },\r\n },\r\n },\r\n },\r\n button: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n gap: '0.25rem',\r\n },\r\n css: () => `\r\n .p-button.p-button-icon-only {\r\n padding-inline: 0;\r\n }\r\n `,\r\n },\r\n inputtext: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n inputchips: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n listbox: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n avatar: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n },\r\n },\r\n tooltip: {\r\n css: () => `\r\n .p-tooltip .p-tooltip-text {\r\n font-size: 0.75rem;\r\n line-height: 1.2;\r\n }\r\n `,\r\n },\r\n selectbutton: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n },\r\n },\r\n multiselect: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n textarea: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n treeselect: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n },\r\n\r\n paginator: {\r\n root: {\r\n borderRadius: '{border.radius.md}',\r\n padding: '0',\r\n },\r\n navButton: {\r\n borderRadius: '{border.radius.sm}',\r\n },\r\n\r\n colorScheme: {\r\n light: {\r\n navButton: {\r\n color: '{surface.500}',\r\n hoverBackground: '{surface.50}',\r\n selectedBackground: '{primary.500}',\r\n selectedColor: '#ffffff',\r\n focusRing: {\r\n color: '{primary.100}',\r\n },\r\n },\r\n },\r\n dark: {\r\n navButton: {\r\n color: '{surface.200}',\r\n hoverBackground: 'transparent',\r\n selectedBackground: '{primary.500}',\r\n selectedColor: '#fff',\r\n focusRing: {\r\n color: '{primary.500}',\r\n },\r\n },\r\n },\r\n },\r\n\r\n css: () => `\r\n .p-paginator {\r\n --p-paginator-gap: 0.375rem;\r\n --p-paginator-nav-button-width: 1.75rem;\r\n --p-paginator-nav-button-height: 1.75rem;\r\n width: fit-content;\r\n padding: 0;\r\n border: 0;\r\n background: transparent;\r\n font-size: 0.875rem;\r\n }\r\n\r\n .p-paginator-pages {\r\n display: flex;\r\n gap: var(--p-paginator-gap);\r\n }\r\n\r\n .p-paginator-pages button,\r\n .p-paginator-prev,\r\n .p-paginator-next,\r\n .p-paginator-first,\r\n .p-paginator-last {\r\n min-width: var(--p-paginator-nav-button-width);\r\n height: var(--p-paginator-nav-button-height);\r\n border: 1px solid var(--p-surface-200);\r\n border-radius: 0.375rem;\r\n background: #fff;\r\n color: #667085;\r\n box-shadow: none;\r\n }\r\n\r\n .p-paginator .p-paginator-page.p-paginator-page-selected {\r\n border-color: var(--p-primary-color);\r\n background: var(--p-primary-color);\r\n color: #fff;\r\n font-weight: 500;\r\n }\r\n\r\n .p-paginator-pages button:not(.p-paginator-page-selected):hover,\r\n .p-paginator-prev:hover,\r\n .p-paginator-next:hover,\r\n .p-paginator-first:hover,\r\n .p-paginator-last:hover {\r\n background: var(--p-surface-50);\r\n }\r\n\r\n .p-paginator .p-select {\r\n min-height: var(--p-paginator-nav-button-height);\r\n margin-inline-start: 0.5rem;\r\n border: 1px solid var(--p-surface-200);\r\n border-radius: 0.5rem;\r\n background: #fff;\r\n }\r\n\r\n .p-paginator .p-select .p-select-label {\r\n padding: 0.375rem 0.625rem;\r\n font-size: 0.875rem;\r\n }\r\n\r\n /* Dark Mode Styles */\r\n .dark .p-paginator-pages button,\r\n .dark .p-paginator-prev,\r\n .dark .p-paginator-next,\r\n .dark .p-paginator-first,\r\n .dark .p-paginator-last,\r\n .dark .p-paginator .p-select {\r\n border-color: var(--p-surface-500);\r\n background: var(--p-surface-900);\r\n }\r\n\r\n .dark .p-paginator .p-paginator-page.p-paginator-page-selected {\r\n border-color: var(--p-primary-color);\r\n background: var(--p-primary-color);\r\n color: #fff;\r\n }\r\n `,\r\n },\r\n\r\n toggleswitch: {\r\n root: {\r\n width: '2.5rem',\r\n height: '1.4rem',\r\n },\r\n },\r\n select: {\r\n root: {\r\n borderRadius: inputBorderRadius,\r\n },\r\n optionGroup: {\r\n fontWeight: 'bold',\r\n padding: '6px 8px',\r\n background: '{surface.50}',\r\n color: '{primary.700}',\r\n },\r\n },\r\n\r\n // steps: {\r\n // item: {\r\n // link: {\r\n // gap: 'calc(50% + 0.25rem)',\r\n // },\r\n // number: {\r\n // font: {\r\n // size: '0.9rem',\r\n // },\r\n // active: {\r\n // color: 'white',\r\n // background: '{primary.500}',\r\n // border: {\r\n // color: '{primary.500}',\r\n // },\r\n // },\r\n // },\r\n // },\r\n // },\r\n },\r\n };\r\n\r\n // The DS layer is merged last so it wins on the tokens it names, while\r\n // everything it stays silent about keeps the classic behaviour.\r\n if ((themeOptions?.designIdentity ?? 'classic') === 'experimental') {\r\n return definePreset(\r\n Aura,\r\n configs,\r\n dsIdentityConfigs(themeOptions?.primaryColor),\r\n );\r\n }\r\n\r\n return definePreset(Aura, configs);\r\n};\r\n\r\n/**\r\n * Switches identity at runtime — for the showcase toggle and for side-by-side\r\n * review. Replaces the active preset outright (rather than merging into it, as\r\n * `updatePreset` would) so switching back to classic is lossless.\r\n */\r\nexport function setMTDesignIdentity(\r\n identity: MTDesignIdentity,\r\n themeOptions?: Omit<MTThemeOptions, 'designIdentity'>,\r\n): void {\r\n activeDesignIdentity = identity;\r\n applyDesignIdentityClass(identity);\r\n usePreset(MTPreset({ ...themeOptions, designIdentity: identity }));\r\n}\r\n\r\nexport function provideMTComponents(\r\n themeOptions?: MTThemeOptions,\r\n): EnvironmentProviders {\r\n activeDesignIdentity = themeOptions?.designIdentity ?? 'classic';\r\n applyDesignIdentityClass(activeDesignIdentity);\r\n changeBackgroundColor(themeOptions?.backgroundColor);\r\n return providePrimeNG({\r\n zIndex: {\r\n modal: 1900,\r\n overlay: 1500,\r\n menu: 1500,\r\n tooltip: 1600,\r\n },\r\n theme: {\r\n preset: MTPreset(themeOptions),\r\n options: {\r\n darkModeSelector: '.dark',\r\n },\r\n },\r\n });\r\n}\r\n","import { MessageService } from 'primeng/api';\r\n\r\nexport function provideMTMessages() {\r\n return MessageService;\r\n}\r\n","import { ConfirmationService } from 'primeng/api';\r\n\r\nexport function provideMTConfirmation() {\r\n return ConfirmationService;\r\n}\r\n","import {\r\n EnvironmentProviders,\r\n InjectionToken,\r\n makeEnvironmentProviders,\r\n} from '@angular/core';\r\n\r\nexport interface MTDateFormats {\r\n date: string;\r\n dateTime: string;\r\n /** Clock-time only, used by `Time` properties. */\r\n time: string;\r\n timezone?: string;\r\n}\r\n\r\nexport const DEFAULT_MT_DATE_FORMATS: MTDateFormats = {\r\n date: 'dd/MM/yyyy',\r\n dateTime: 'dd/MM/yyyy HH:mm',\r\n time: 'HH:mm',\r\n};\r\n\r\nexport const MT_DATE_FORMATS = new InjectionToken<MTDateFormats>(\r\n 'MT_DATE_FORMATS',\r\n {\r\n factory: () => ({ ...DEFAULT_MT_DATE_FORMATS }),\r\n },\r\n);\r\n\r\n/**\r\n * Converts .NET custom date/time format tokens to Angular `formatDate` (CLDR)\r\n * tokens. System-setting formats are authored in .NET convention (e.g. `hh:mm tt`),\r\n * but `formatDate` uses CLDR tokens where the AM/PM designator is `a`, not `tt`.\r\n * Every other token in the supported set (d, M, y, H, h, m, s) is identical between\r\n * the two, so only `tt`/`t` → `a` needs translating. Single-quoted literal sections\r\n * (e.g. `'at'`) are left untouched.\r\n */\r\nexport function toAngularDateFormat(format: string): string {\r\n return format\r\n .split(/('[^']*')/g)\r\n .map((part) => (part.startsWith(\"'\") ? part : part.replace(/t+/g, 'a')))\r\n .join('');\r\n}\r\n\r\nexport function provideMTDateFormats(\r\n formats: Partial<MTDateFormats>,\r\n): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n {\r\n provide: MT_DATE_FORMATS,\r\n useFactory: () => ({\r\n ...DEFAULT_MT_DATE_FORMATS,\r\n ...formats,\r\n }),\r\n },\r\n ]);\r\n}\r\n","import { HttpContext } from '@angular/common/http';\r\nimport { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\r\n\r\nexport type FieldType =\r\n | 'text'\r\n | 'textarea'\r\n | 'select'\r\n | 'date'\r\n | 'number'\r\n | 'slider'\r\n | 'multi-select'\r\n | 'pick-list'\r\n | 'checkbox'\r\n | 'icon-field'\r\n | 'color-picker'\r\n | 'location'\r\n | 'spacer'\r\n | 'entity-preview'\r\n | 'lookup-matrix'\r\n | 'lookup-module-check-list'\r\n | string;\r\n\r\nexport type ValidatorType =\r\n | 'required'\r\n | 'email'\r\n | 'minLength'\r\n | 'maxLength'\r\n | 'min'\r\n | 'max'\r\n | 'pattern'\r\n | 'custom';\r\n\r\nexport type FieldRelationAction = 'enable' | 'disable' | 'show' | 'hide';\r\n\r\nexport interface FieldRelationConfig {\r\n key: string;\r\n value: any;\r\n action: FieldRelationAction;\r\n}\r\n\r\nexport type FormulaConditionMode =\r\n | 'auto'\r\n | 'show'\r\n | 'hide'\r\n | 'enable'\r\n | 'disable';\r\n\r\nexport interface FormulaConditionConfig {\r\n formulaTokens: string;\r\n formulaText?: string;\r\n mode?: FormulaConditionMode;\r\n}\r\n\r\nexport type FormulaValidationSeverity = 'error' | 'warning';\r\n\r\nexport interface FormulaValidationRuleConfig {\r\n id: string | number;\r\n formulaTokens: string;\r\n formulaText?: string;\r\n message: string;\r\n severity: FormulaValidationSeverity;\r\n enabled: boolean;\r\n}\r\n\r\nexport type FormulaRuntimeMessageCode =\r\n | 'FORMULA_PARSE_ERROR'\r\n | 'FORMULA_EVALUATION_ERROR'\r\n | 'FORMULA_FALSE';\r\n\r\nexport interface FormulaRuntimeMessage {\r\n code: FormulaRuntimeMessageCode;\r\n severity: FormulaValidationSeverity;\r\n message: string;\r\n formulaText?: string;\r\n ruleId?: string | number;\r\n fieldKey?: string;\r\n}\r\n\r\nexport interface ResponsiveColSpan {\r\n // Container\r\n xs?: number; // @xs\r\n sm?: number; // @sm\r\n md?: number; // @md\r\n lg?: number; // @lg\r\n xl?: number; // @xl\r\n}\r\n\r\nexport class ValidatorConfig {\r\n type: ValidatorType;\r\n value?: any;\r\n message?: string;\r\n customValidator?: (\r\n value: any,\r\n control?: AbstractControl,\r\n ) => boolean | Promise<boolean>;\r\n\r\n constructor(config: {\r\n type: ValidatorType;\r\n value?: any;\r\n message?: string;\r\n customValidator?: (\r\n value: any,\r\n control?: AbstractControl,\r\n ) => boolean | Promise<boolean>;\r\n }) {\r\n this.type = config.type;\r\n this.value = config.value;\r\n this.message = config.message;\r\n this.customValidator = config.customValidator;\r\n }\r\n\r\n // Factory methods for common validators\r\n static required(message = 'This field is required'): ValidatorConfig {\r\n return new ValidatorConfig({ type: 'required', message });\r\n }\r\n\r\n static email(message = 'Please enter a valid email'): ValidatorConfig {\r\n return new ValidatorConfig({ type: 'email', message });\r\n }\r\n\r\n static minLength(length: number, message?: string): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'minLength',\r\n value: length,\r\n message: message || `Minimum length is ${length} characters`,\r\n });\r\n }\r\n\r\n static maxLength(length: number, message?: string): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'maxLength',\r\n value: length,\r\n message: message || `Maximum length is ${length} characters`,\r\n });\r\n }\r\n\r\n static min(value: number, message?: string): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'min',\r\n value,\r\n message: message || `Minimum value is ${value}`,\r\n });\r\n }\r\n\r\n static max(value: number, message?: string): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'max',\r\n value,\r\n message: message || `Maximum value is ${value}`,\r\n });\r\n }\r\n\r\n static pattern(pattern: string, message = 'Invalid format'): ValidatorConfig {\r\n return new ValidatorConfig({ type: 'pattern', value: pattern, message });\r\n }\r\n\r\n static custom(\r\n validator: (\r\n value: any,\r\n control?: AbstractControl,\r\n ) => boolean | Promise<boolean>,\r\n message = 'Invalid value',\r\n ): ValidatorConfig {\r\n return new ValidatorConfig({\r\n type: 'custom',\r\n customValidator: validator,\r\n message,\r\n });\r\n }\r\n}\r\n\r\nexport type BaseFieldConstructorConfig = ConstructorParameters<\r\n typeof BaseFieldConfig\r\n>[0];\r\n\r\nexport abstract class BaseFieldConfig {\r\n key: string;\r\n label: string;\r\n type: FieldType;\r\n required: boolean;\r\n disabled: boolean;\r\n readonly: boolean;\r\n hidden: boolean;\r\n placeholder: string;\r\n hint: string;\r\n cssClass: string;\r\n validators: ValidatorConfig[];\r\n order: number;\r\n colSpan: number | ResponsiveColSpan;\r\n\r\n defaultValue?: any;\r\n\r\n customTemplate: string;\r\n relations: FieldRelationConfig[];\r\n formulaCondition?: FormulaConditionConfig;\r\n\r\n constructor(config: {\r\n key?: string;\r\n label?: string;\r\n type: FieldType;\r\n required?: boolean;\r\n disabled?: boolean;\r\n readonly?: boolean;\r\n hidden?: boolean;\r\n placeholder?: string;\r\n hint?: string;\r\n cssClass?: string;\r\n validators?: ValidatorConfig[];\r\n order?: number;\r\n relations?: FieldRelationConfig[];\r\n formulaCondition?: FormulaConditionConfig;\r\n colSpan?: number | ResponsiveColSpan;\r\n }) {\r\n this.key = config.key || 'Key';\r\n this.label = config.label || '';\r\n this.type = config.type;\r\n this.required = config.required || false;\r\n this.disabled = config.disabled || false;\r\n this.readonly = config.readonly || false;\r\n this.hidden = config.hidden || false;\r\n this.placeholder = config.placeholder || '';\r\n this.hint = config.hint || '';\r\n this.cssClass = config.cssClass || '';\r\n this.validators = config.validators || [];\r\n this.order = config.order || 0;\r\n this.relations = config.relations || [];\r\n this.formulaCondition = config.formulaCondition;\r\n this.colSpan = config.colSpan || 12;\r\n }\r\n}\r\n\r\n// Specific configurations for different field types\r\nexport class TextFieldConfig extends BaseFieldConfig {\r\n inputType: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n inputType?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'text' });\r\n this.inputType = config.inputType || 'text';\r\n }\r\n}\r\n\r\nexport class TextareaFieldConfig extends BaseFieldConfig {\r\n rows: number;\r\n autoResize: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n rows?: number;\r\n autoResize?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'textarea' });\r\n this.rows = config.rows || 3;\r\n this.autoResize = config.autoResize || false;\r\n }\r\n}\r\n\r\nexport class SelectFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n group: boolean;\r\n optionGroupLabel: string;\r\n optionGroupChildren: string;\r\n multiple: boolean;\r\n filter: boolean;\r\n filterBy: string;\r\n filterPlaceholder: string;\r\n showClear: boolean;\r\n emptyMessage: string;\r\n size: string;\r\n hasPlaceholderPrefix: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n group?: boolean;\r\n optionGroupLabel?: string;\r\n optionGroupChildren?: string;\r\n multiple?: boolean;\r\n filter?: boolean;\r\n filterBy?: string;\r\n filterPlaceholder?: string;\r\n showClear?: boolean;\r\n emptyMessage?: string;\r\n size?: string;\r\n hasPlaceholderPrefix?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'select' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.group = config.group || false;\r\n this.optionGroupLabel = config.optionGroupLabel || 'label';\r\n this.optionGroupChildren = config.optionGroupChildren || 'items';\r\n this.multiple = config.multiple || false;\r\n this.filter = config.filter || false;\r\n this.filterBy = config.filterBy || '';\r\n this.filterPlaceholder = config.filterPlaceholder || 'Search...';\r\n this.showClear = config.showClear || false;\r\n this.emptyMessage = config.emptyMessage || 'No options available';\r\n this.size = config.size || '';\r\n this.hasPlaceholderPrefix =\r\n config.hasPlaceholderPrefix === undefined\r\n ? true\r\n : config.hasPlaceholderPrefix;\r\n }\r\n}\r\n\r\nexport class RadioButtonFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n orientation: 'vertical' | 'horizontal';\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n orientation?: 'vertical' | 'horizontal';\r\n },\r\n ) {\r\n super({ ...config, type: 'radio-button' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.orientation = config.orientation || 'vertical';\r\n }\r\n}\r\nexport class RadioCardsFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n size: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n size?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'radio-cards' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.size = config.size || 'small';\r\n }\r\n}\r\nexport class UserSearchFieldConfig extends BaseFieldConfig {\r\n optionLabel: string;\r\n optionValue: string;\r\n size: string;\r\n apiUrl: string;\r\n context: HttpContext | undefined;\r\n isMultiple: boolean;\r\n hideUnlinkedHint: boolean;\r\n dataKey: string;\r\n paramName: string;\r\n minLength: number;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n optionLabel?: string;\r\n optionValue?: string;\r\n size?: string;\r\n hint?: string;\r\n apiUrl?: string;\r\n context?: HttpContext | undefined;\r\n placeholder?: string;\r\n isMultiple?: boolean;\r\n hideUnlinkedHint?: boolean;\r\n dataKey?: string;\r\n paramName?: string;\r\n minLength?: number;\r\n },\r\n ) {\r\n super({ ...config, type: 'user-search' });\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.size = config.size || '';\r\n this.hint = config.hint || '';\r\n this.context = config.context || undefined;\r\n this.apiUrl = config.apiUrl || '';\r\n this.placeholder = config.placeholder || 'Search';\r\n this.isMultiple = config.isMultiple || false;\r\n this.hideUnlinkedHint = config.hideUnlinkedHint || false;\r\n this.dataKey = config.dataKey || 'data';\r\n this.paramName = config.paramName || 'query';\r\n this.minLength = config.minLength ?? 1;\r\n }\r\n}\r\n\r\nexport class LocationFieldConfig extends BaseFieldConfig {\r\n configuration: Record<string, unknown> | string | null;\r\n searchUrl?: string;\r\n minLength: number;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n configuration?: Record<string, unknown> | string | null;\r\n searchUrl?: string;\r\n minLength?: number;\r\n },\r\n ) {\r\n super({ ...config, type: 'location' });\r\n this.configuration = config.configuration ?? null;\r\n this.searchUrl = config.searchUrl;\r\n this.minLength = config.minLength ?? 2;\r\n }\r\n}\r\n\r\nexport class UploadFileFieldConfig extends BaseFieldConfig {\r\n size: string;\r\n endPoint?: string;\r\n userImgClass?: string;\r\n shape?: string;\r\n multiple?: boolean;\r\n accept?: string | string[];\r\n fileSizeLimit?: number | undefined;\r\n context: HttpContext | undefined;\r\n title: string;\r\n description: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n size?: string;\r\n endPoint?: string;\r\n userImgClass?: string;\r\n shape?: string;\r\n multiple?: boolean;\r\n accept?: string | string[];\r\n fileSizeLimit?: number | undefined;\r\n context?: HttpContext | undefined;\r\n title?: string;\r\n description?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'upload-file' });\r\n this.size = config.size || 'normal';\r\n this.endPoint = config.endPoint || 'uploader';\r\n this.userImgClass =\r\n config.userImgClass || 'w-25! h-25! text-4xl! text-gray-400!';\r\n this.shape = config.shape || 'field';\r\n this.multiple = config.multiple ?? false;\r\n this.accept = config.accept || '.pdf,.doc,.docx,.xlsx,image/*';\r\n this.fileSizeLimit = config.fileSizeLimit || undefined;\r\n this.context = config.context || undefined;\r\n this.title = config.title || 'Upload File';\r\n this.description = config.description || 'Click or drop a file to upload';\r\n }\r\n}\r\n\r\nexport class DateFieldConfig extends BaseFieldConfig {\r\n dateFormat: string;\r\n showTime: boolean;\r\n /** Edits the clock time only — no calendar. The value stays a full `Date`. */\r\n timeOnly: boolean;\r\n showSeconds: boolean;\r\n hourFormat: '12' | '24';\r\n minDate?: Date;\r\n maxDate?: Date;\r\n disabledDates: Date[];\r\n disabledDays: number[];\r\n yearRange: string;\r\n showIcon: boolean;\r\n icon: string;\r\n showButtonBar: boolean;\r\n showClear: boolean;\r\n inline: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n dateFormat?: string;\r\n showTime?: boolean;\r\n timeOnly?: boolean;\r\n showSeconds?: boolean;\r\n hourFormat?: '12' | '24';\r\n minDate?: Date;\r\n maxDate?: Date;\r\n disabledDates?: Date[];\r\n disabledDays?: number[];\r\n yearRange?: string;\r\n showIcon?: boolean;\r\n icon?: string;\r\n showButtonBar?: boolean;\r\n showClear?: boolean;\r\n inline?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'date' });\r\n this.dateFormat = config.dateFormat || 'yyyy-mm-dd';\r\n this.showTime = config.showTime || false;\r\n this.timeOnly = config.timeOnly || false;\r\n this.showSeconds = config.showSeconds || false;\r\n this.hourFormat = config.hourFormat || '24';\r\n this.minDate = config.minDate;\r\n this.maxDate = config.maxDate;\r\n this.disabledDates = config.disabledDates || [];\r\n this.disabledDays = config.disabledDays || [];\r\n this.yearRange = config.yearRange || '1900:2030';\r\n this.showIcon = config.showIcon || true;\r\n this.icon = config.icon || 'pi pi-calendar';\r\n this.showButtonBar = config.showButtonBar || false;\r\n this.showClear = config.showClear || true;\r\n this.inline = config.inline || false;\r\n }\r\n}\r\n\r\nexport class NumberFieldConfig extends BaseFieldConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n prefix?: string;\r\n suffix?: string;\r\n currency?: string;\r\n locale?: string;\r\n minFractionDigits?: number;\r\n maxFractionDigits?: number;\r\n useGrouping?: boolean;\r\n showButtons?: boolean;\r\n buttonLayout?: 'stacked' | 'horizontal';\r\n incrementButtonClass?: string;\r\n decrementButtonClass?: string;\r\n incrementButtonIcon?: string;\r\n decrementButtonIcon?: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n prefix?: string;\r\n suffix?: string;\r\n currency?: string;\r\n locale?: string;\r\n minFractionDigits?: number;\r\n maxFractionDigits?: number;\r\n useGrouping?: boolean;\r\n showButtons?: boolean;\r\n buttonLayout?: 'stacked' | 'horizontal';\r\n incrementButtonClass?: string;\r\n decrementButtonClass?: string;\r\n incrementButtonIcon?: string;\r\n decrementButtonIcon?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'number' });\r\n this.min = config.min;\r\n this.max = config.max;\r\n this.step = config.step || 1;\r\n this.prefix = config.prefix;\r\n this.suffix = config.suffix;\r\n this.currency = config.currency;\r\n this.locale = config.locale;\r\n this.minFractionDigits = config.minFractionDigits;\r\n this.maxFractionDigits = config.maxFractionDigits;\r\n this.useGrouping = config.useGrouping || false;\r\n this.showButtons = config.showButtons || false;\r\n this.buttonLayout = config.buttonLayout || 'stacked';\r\n this.incrementButtonClass = config.incrementButtonClass;\r\n this.decrementButtonClass = config.decrementButtonClass;\r\n this.incrementButtonIcon = config.incrementButtonIcon;\r\n this.decrementButtonIcon = config.decrementButtonIcon;\r\n }\r\n}\r\n\r\nexport class SliderFieldConfig extends BaseFieldConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n orientation?: 'horizontal' | 'vertical';\r\n range?: boolean;\r\n animate?: boolean;\r\n unit?: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n orientation?: 'horizontal' | 'vertical';\r\n range?: boolean;\r\n animate?: boolean;\r\n unit?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'slider' });\r\n this.min = config.min || 0;\r\n this.max = config.max || 100;\r\n this.step = config.step || 1;\r\n this.orientation = config.orientation || 'horizontal';\r\n this.range = config.range || false;\r\n this.animate = config.animate || false;\r\n this.unit = config.unit || '';\r\n }\r\n}\r\n\r\nexport class MultiSelectFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n filter: boolean;\r\n filterBy: string;\r\n filterPlaceholder: string;\r\n showClear: boolean;\r\n emptyMessage: string;\r\n display?: 'comma' | 'chip';\r\n maxSelectedLabels?: number;\r\n selectedItemsLabel?: string;\r\n showToggleAll?: boolean;\r\n resetFilterOnHide?: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n filter?: boolean;\r\n filterBy?: string;\r\n filterPlaceholder?: string;\r\n showClear?: boolean;\r\n emptyMessage?: string;\r\n display?: 'comma' | 'chip';\r\n maxSelectedLabels?: number;\r\n selectedItemsLabel?: string;\r\n showToggleAll?: boolean;\r\n resetFilterOnHide?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'multi-select' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.filter = config.filter || false;\r\n this.filterBy = config.filterBy || '';\r\n this.filterPlaceholder = config.filterPlaceholder || 'Search...';\r\n this.showClear = config.showClear || false;\r\n this.emptyMessage = config.emptyMessage || 'No options available';\r\n this.display = config.display || 'comma';\r\n this.maxSelectedLabels = config.maxSelectedLabels || 3;\r\n this.selectedItemsLabel = config.selectedItemsLabel || '{0} items selected';\r\n this.showToggleAll = config.showToggleAll || true;\r\n this.resetFilterOnHide = config.resetFilterOnHide || false;\r\n }\r\n}\r\n\r\nexport class PickListFieldConfig extends BaseFieldConfig {\r\n options: any[];\r\n optionLabel: string;\r\n optionValue: string;\r\n sourceHeader: string;\r\n targetHeader: string;\r\n showSourceControls: boolean;\r\n showTargetControls: boolean;\r\n showSourceFilter: boolean;\r\n showTargetFilter: boolean;\r\n filterBy: string;\r\n dataKey?: string;\r\n dragdrop: boolean;\r\n responsive: boolean;\r\n breakpoint: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n options: any[];\r\n optionLabel?: string;\r\n optionValue?: string;\r\n sourceHeader?: string;\r\n targetHeader?: string;\r\n showSourceControls?: boolean;\r\n showTargetControls?: boolean;\r\n showSourceFilter?: boolean;\r\n showTargetFilter?: boolean;\r\n filterBy?: string;\r\n dataKey?: string;\r\n dragdrop?: boolean;\r\n responsive?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'pick-list' });\r\n this.options = config.options;\r\n this.optionLabel = config.optionLabel || 'label';\r\n this.optionValue = config.optionValue || 'value';\r\n this.sourceHeader = config.sourceHeader || 'Available';\r\n this.targetHeader = config.targetHeader || 'Selected';\r\n this.showSourceControls =\r\n config.showSourceControls !== undefined\r\n ? config.showSourceControls\r\n : true;\r\n this.showTargetControls =\r\n config.showTargetControls !== undefined\r\n ? config.showTargetControls\r\n : true;\r\n this.showSourceFilter =\r\n config.showSourceFilter !== undefined ? config.showSourceFilter : false;\r\n this.showTargetFilter =\r\n config.showTargetFilter !== undefined ? config.showTargetFilter : false;\r\n this.filterBy = config.filterBy || this.optionLabel;\r\n this.dataKey = config.dataKey || this.optionValue;\r\n this.dragdrop = config.dragdrop ?? false;\r\n this.responsive = config.responsive ?? true;\r\n }\r\n}\r\n\r\nexport class CheckboxFieldConfig extends BaseFieldConfig {\r\n binary?: boolean;\r\n trueValue?: any;\r\n falseValue?: any;\r\n checkboxIcon?: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n binary?: boolean;\r\n trueValue?: any;\r\n falseValue?: any;\r\n checkboxIcon?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'checkbox' });\r\n this.binary = config.binary !== false; // Default to true\r\n this.trueValue = config.trueValue !== undefined ? config.trueValue : true;\r\n this.falseValue =\r\n config.falseValue !== undefined ? config.falseValue : false;\r\n this.checkboxIcon = config.checkboxIcon;\r\n }\r\n}\r\nexport class ToggleFieldConfig extends BaseFieldConfig {\r\n toggleShape?: 'toggle' | 'card';\r\n icon?: string;\r\n descriptionCard?: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n toggleShape?: 'toggle' | 'card';\r\n icon?: string;\r\n descriptionCard?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'toggle' });\r\n this.toggleShape = config.toggleShape ?? 'toggle';\r\n this.icon = config.icon;\r\n this.descriptionCard = config.descriptionCard;\r\n }\r\n}\r\nexport class EditorFieldConfig extends BaseFieldConfig {\r\n constructor(config: Omit<BaseFieldConstructorConfig, 'type'>) {\r\n super({ ...config, type: 'editor-field' });\r\n }\r\n}\r\n\r\nexport class ColorPickerFieldConfig extends BaseFieldConfig {\r\n format?: 'hex' | 'rgb' | 'hsb';\r\n inline?: boolean;\r\n appendTo?: any;\r\n variant?: 'outlined' | 'filled';\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n format?: 'hex' | 'rgb' | 'hsb';\r\n inline?: boolean;\r\n appendTo?: any;\r\n variant?: 'outlined' | 'filled';\r\n },\r\n ) {\r\n super({ ...config, type: 'color-picker' });\r\n this.format = config.format || 'hex';\r\n this.inline = config.inline || false;\r\n this.appendTo = config.appendTo || 'body';\r\n this.variant = config.variant || 'outlined';\r\n }\r\n}\r\n\r\nexport class IconFieldConfig extends BaseFieldConfig {\r\n constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {}) {\r\n super({ ...config, type: 'icon-field' });\r\n }\r\n}\r\n\r\nexport class SpacerFieldConfig extends BaseFieldConfig {\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type' | 'key' | 'label'> & {\r\n key?: string;\r\n label?: string;\r\n },\r\n ) {\r\n super({\r\n ...config,\r\n type: 'spacer',\r\n key: config.key || `spacer_${Date.now()}`,\r\n label: config.label || '',\r\n });\r\n }\r\n}\r\n\r\nexport interface LookupOptionItemConfig {\r\n id?: number | string;\r\n key?: string;\r\n label: string;\r\n value: any;\r\n color?: string | null;\r\n description?: string;\r\n}\r\n\r\nexport interface LookupMatrixCellConfig {\r\n row: number;\r\n column: number;\r\n xLookupItemId: number | string;\r\n yLookupItemId?: number | string;\r\n zLookupItemId?: number | string | null;\r\n label: string;\r\n color?: string | null;\r\n}\r\n\r\nexport class LookupMatrixFieldConfig extends BaseFieldConfig {\r\n xFieldKey: string;\r\n yFieldKey?: string;\r\n xAxisLabel: string;\r\n yAxisLabel?: string;\r\n xOptions: LookupOptionItemConfig[];\r\n yOptions?: LookupOptionItemConfig[];\r\n cells: LookupMatrixCellConfig[];\r\n emptyMessage: string;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n xFieldKey: string;\r\n yFieldKey?: string;\r\n xAxisLabel?: string;\r\n yAxisLabel?: string;\r\n xOptions?: LookupOptionItemConfig[];\r\n yOptions?: LookupOptionItemConfig[];\r\n cells?: LookupMatrixCellConfig[];\r\n emptyMessage?: string;\r\n },\r\n ) {\r\n super({ ...config, type: 'lookup-matrix' });\r\n this.xFieldKey = config.xFieldKey;\r\n this.yFieldKey = config.yFieldKey;\r\n this.xAxisLabel = config.xAxisLabel || '';\r\n this.yAxisLabel = config.yAxisLabel;\r\n this.xOptions = config.xOptions || [];\r\n this.yOptions = config.yOptions;\r\n this.cells = config.cells || [];\r\n this.emptyMessage = config.emptyMessage || 'No matrix data available';\r\n }\r\n}\r\n\r\nexport class SchemaConnectionFieldConfig extends BaseFieldConfig {\r\n configuration: any;\r\n context: HttpContext | undefined;\r\n filter: boolean;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n configuration: any;\r\n context?: HttpContext | undefined;\r\n filter?: boolean;\r\n },\r\n ) {\r\n super({ ...config, type: 'schema-connection' });\r\n this.configuration = config.configuration;\r\n this.context = config.context || undefined;\r\n this.filter = config.filter ?? true;\r\n }\r\n}\r\n\r\nexport interface SchedulePredecessorFieldRuntimeContext {\r\n levelId?: number | string | null;\r\n levelDataId?: number | string | null;\r\n moduleDataId?: number | string | null;\r\n}\r\n\r\nexport class SchedulePredecessorFieldConfig extends BaseFieldConfig {\r\n configuration: any;\r\n runtimeContext: SchedulePredecessorFieldRuntimeContext | null;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n configuration?: any;\r\n runtimeContext?: SchedulePredecessorFieldRuntimeContext | null;\r\n },\r\n ) {\r\n super({ ...config, type: 'predecessor' });\r\n this.configuration = config.configuration ?? null;\r\n this.runtimeContext = config.runtimeContext ?? null;\r\n }\r\n}\r\n\r\nexport interface EntityListFieldRuntimeContext {\r\n /**\r\n * Route id for the read endpoint.\r\n * - Level-scoped EntityList properties → level-data id\r\n * - Module-scoped EntityList properties → source module-data id\r\n */\r\n sourceId?: number | string | null;\r\n /** Current level id (used to build the fetch/query contextKey). */\r\n levelId?: number | string | null;\r\n levelDataId?: number | string | null;\r\n}\r\n\r\nexport class EntityListFieldConfig extends BaseFieldConfig {\r\n /** EntityList property id (used in the read endpoint route). */\r\n propertyId: number | null;\r\n /** Property configuration (sourceType, moduleId, access, snapshotMode, fields). */\r\n configuration: any;\r\n /** Runtime ids needed to call the read endpoint. */\r\n runtimeContext: EntityListFieldRuntimeContext | null;\r\n context: HttpContext | undefined;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n propertyId?: number | null;\r\n configuration?: any;\r\n runtimeContext?: EntityListFieldRuntimeContext | null;\r\n context?: HttpContext | undefined;\r\n },\r\n ) {\r\n super({ ...config, type: 'entity-list' });\r\n this.propertyId = config.propertyId ?? null;\r\n this.configuration = config.configuration ?? null;\r\n this.runtimeContext = config.runtimeContext ?? null;\r\n this.context = config.context;\r\n }\r\n}\r\n\r\nexport interface ScheduleItemSelectorFieldRuntimeContext {\r\n /** Current level id — used to build the options `contextKey` (`Level:{levelId}`). */\r\n levelId?: number | string | null;\r\n /**\r\n * Module schema id of the form that owns the selector property — the\r\n * `Module:{moduleId}` segment of the options `contextKey`. For Deliverable\r\n * Acceptance this is the Deliverable Acceptance module schema id, NOT the\r\n * target schedule module id.\r\n */\r\n moduleId?: number | string | null;\r\n /** Current workspace instance id (`levelDataId` query param). */\r\n levelDataId?: number | string | null;\r\n /**\r\n * Record being edited (`ownerRecordId` query param). Lets the backend keep\r\n * the current record's existing selections valid in edit mode.\r\n */\r\n ownerRecordId?: number | string | null;\r\n}\r\n\r\nexport class ScheduleItemSelectorFieldConfig extends BaseFieldConfig {\r\n /** Property key — used in the options endpoint route `forms/options/{propertyKey}`. */\r\n propertyKey: string;\r\n /** `Single` renders a single-select picker, `Multi` a multi-select picker. */\r\n selectionMode: 'Single' | 'Multi';\r\n /** Raw property configuration (selectionMode, scheduleModuleKey, etc.). */\r\n configuration: any;\r\n /** Runtime ids needed to call the options endpoint. */\r\n runtimeContext: ScheduleItemSelectorFieldRuntimeContext | null;\r\n context: HttpContext | undefined;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n propertyKey?: string;\r\n selectionMode?: 'Single' | 'Multi';\r\n configuration?: any;\r\n runtimeContext?: ScheduleItemSelectorFieldRuntimeContext | null;\r\n context?: HttpContext | undefined;\r\n },\r\n ) {\r\n super({ ...config, type: 'schedule-item-selector' });\r\n this.propertyKey = config.propertyKey || config.key || '';\r\n this.selectionMode = config.selectionMode || 'Multi';\r\n this.configuration = config.configuration ?? null;\r\n this.runtimeContext = config.runtimeContext ?? null;\r\n this.context = config.context;\r\n }\r\n}\r\n\r\n/** One configured module property the checklist captures for each entry. */\r\nexport interface LookupCheckListPropertyConfig {\r\n /** Property key persisted in `props[].key`. */\r\n key: string;\r\n /** Human-readable label shown next to the input. */\r\n label: string;\r\n}\r\n\r\nexport interface LookupModuleCheckListFieldRuntimeContext {\r\n /** Current level id — passed to `process-form-load` for each section form. */\r\n levelId?: number | string | null;\r\n /** Current workspace instance id — passed to `process-form-load`. */\r\n levelDataId?: number | string | null;\r\n}\r\n\r\nexport class LookupModuleCheckListFieldConfig extends BaseFieldConfig {\r\n /** Lookup items rendered as collapsible checklist sections. */\r\n lookupOptions: LookupOptionItemConfig[];\r\n /** Full lookup catalog passed through to the rich nested form renderer. */\r\n lookups: unknown[];\r\n /** Module property keys/labels captured per checklist entry. */\r\n propertyFields: LookupCheckListPropertyConfig[];\r\n /** Scope module id whose form is loaded for each section. */\r\n scopeId: number | string | null;\r\n /** Property keys to render in each section form (`allowedFieldKeys`). */\r\n propertyKeys: string[];\r\n /** Runtime ids needed to load each section form. */\r\n runtimeContext: LookupModuleCheckListFieldRuntimeContext | null;\r\n /** Raw property configuration (lookup id, scope/module id, properties). */\r\n configuration: any;\r\n\r\n constructor(\r\n config: Omit<BaseFieldConstructorConfig, 'type'> & {\r\n lookupOptions?: LookupOptionItemConfig[];\r\n lookups?: unknown[];\r\n propertyFields?: LookupCheckListPropertyConfig[];\r\n scopeId?: number | string | null;\r\n propertyKeys?: string[];\r\n runtimeContext?: LookupModuleCheckListFieldRuntimeContext | null;\r\n configuration?: any;\r\n },\r\n ) {\r\n super({ ...config, type: 'lookup-module-check-list' });\r\n this.lookupOptions = config.lookupOptions || [];\r\n this.lookups = config.lookups || [];\r\n this.propertyFields = config.propertyFields || [];\r\n this.scopeId = config.scopeId ?? null;\r\n this.propertyKeys = config.propertyKeys || [];\r\n this.runtimeContext = config.runtimeContext ?? null;\r\n this.configuration = config.configuration ?? null;\r\n }\r\n}\r\n\r\n// Union type for all field configurations\r\nexport type DynamicFieldConfig = {\r\n [K in keyof (TextFieldConfig &\r\n TextareaFieldConfig &\r\n SelectFieldConfig &\r\n DateFieldConfig &\r\n NumberFieldConfig &\r\n SliderFieldConfig &\r\n MultiSelectFieldConfig &\r\n PickListFieldConfig &\r\n CheckboxFieldConfig &\r\n ToggleFieldConfig &\r\n LocationFieldConfig &\r\n ColorPickerFieldConfig &\r\n IconFieldConfig &\r\n SpacerFieldConfig &\r\n LookupMatrixFieldConfig &\r\n SchemaConnectionFieldConfig &\r\n SchedulePredecessorFieldConfig &\r\n EntityListFieldConfig &\r\n ScheduleItemSelectorFieldConfig &\r\n LookupModuleCheckListFieldConfig &\r\n BaseFieldConfig)]?: (TextFieldConfig &\r\n TextareaFieldConfig &\r\n SelectFieldConfig &\r\n DateFieldConfig &\r\n NumberFieldConfig &\r\n SliderFieldConfig &\r\n MultiSelectFieldConfig &\r\n PickListFieldConfig &\r\n CheckboxFieldConfig &\r\n ToggleFieldConfig &\r\n LocationFieldConfig &\r\n ColorPickerFieldConfig &\r\n IconFieldConfig &\r\n SpacerFieldConfig &\r\n LookupMatrixFieldConfig &\r\n SchemaConnectionFieldConfig &\r\n SchedulePredecessorFieldConfig &\r\n EntityListFieldConfig &\r\n ScheduleItemSelectorFieldConfig &\r\n LookupModuleCheckListFieldConfig &\r\n BaseFieldConfig)[K];\r\n};\r\n\r\n// Layout configuration\r\nexport interface LayoutConfig {\r\n containerClass?: string;\r\n sectionClass?: string;\r\n fieldClass?: string;\r\n}\r\n\r\n// Simplified form configuration interface\r\nexport interface DynamicFormConfig {\r\n sections: SectionConfig[];\r\n layout?: LayoutConfig;\r\n validationRules?: FormulaValidationRuleConfig[];\r\n}\r\nexport interface SectionConfig {\r\n key?: string;\r\n label?: string;\r\n type: 'none' | 'header';\r\n cssClass?: string;\r\n bodyClass?: string;\r\n headerClass?: string;\r\n columns?: number;\r\n\r\n order?: number;\r\n fields: DynamicFieldConfig[];\r\n}\r\nexport interface FieldState {\r\n hidden: boolean;\r\n disabled: boolean;\r\n}\r\n\r\nexport function createCustomValidator(\r\n customValidator: (\r\n value: any,\r\n control?: AbstractControl,\r\n ) => boolean | Promise<boolean>,\r\n message?: string,\r\n): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const result = customValidator(control.value, control);\r\n\r\n if (result instanceof Promise) {\r\n // Handle async validation\r\n result.then((isValid) => {\r\n if (!isValid) {\r\n control.setErrors({\r\n custom: { message: message || 'Invalid value' },\r\n });\r\n }\r\n });\r\n return null; // For async, return null initially\r\n } else {\r\n // Handle sync validation\r\n return result\r\n ? null\r\n : { custom: { message: message || 'Invalid value' } };\r\n }\r\n };\r\n}\r\n\r\nexport function wrapValidatorWithMessage(\r\n validator: ValidatorFn,\r\n errorKey: string,\r\n message: string,\r\n): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const result = validator(control);\r\n if (result) {\r\n // Replace the default error with custom message\r\n return { [errorKey]: { ...result[Object.keys(result)[0]], message } };\r\n }\r\n return null;\r\n };\r\n}\r\n// DynamicFieldConfig = input.required<any>({\r\n// transform: (value: any) => this.transformToDateFieldConfig(value)\r\n// });\r\n// transformToDateFieldConfig(value: any){\r\n// return new TextFieldConfig()\r\n// }\r\n","import { computed, Signal } from '@angular/core';\r\n\r\n/**\r\n * Query result with separate signals for each property\r\n */\r\nexport interface QueryResult<T> {\r\n data: Signal<T | null>;\r\n isPending: Signal<boolean>;\r\n isSuccess: Signal<boolean>;\r\n isError: Signal<boolean>;\r\n error: Signal<string | null>;\r\n}\r\n\r\n/**\r\n * @deprecated Use direct `select()` + `computed()` pattern instead for better performance.\r\n *\r\n * **Problem with BaseFacade:**\r\n * - All computed signals depend on the full state, causing unnecessary recomputations\r\n * - Bypasses NGXS selector memoization\r\n * - Uses `as any` casting, losing type safety\r\n *\r\n * **New Pattern - Use slice-based selectors:**\r\n *\r\n * ```typescript\r\n * // In your State class - add slice selectors:\r\n * @Selector()\r\n * static getLoadingActive(state: MyStateModel): string[] {\r\n * return state.loadingActive;\r\n * }\r\n *\r\n * @Selector()\r\n * static getErrors(state: MyStateModel): Record<string, string | null> {\r\n * return state.errors;\r\n * }\r\n *\r\n * // In your Facade - don't extend BaseFacade:\r\n * @Injectable({ providedIn: 'root' })\r\n * export class MyFacade {\r\n * private readonly store = inject(Store);\r\n *\r\n * // Data selectors - memoized by NGXS\r\n * readonly items = select(MyState.getItems);\r\n *\r\n * // Loading/Error slices - memoized by NGXS\r\n * private readonly loadingActive = select(MyState.getLoadingActive);\r\n * private readonly errors = select(MyState.getErrors);\r\n *\r\n * // Loading signals - computed from slice (minimal reactivity)\r\n * readonly isLoadingItems = computed(() =>\r\n * this.loadingActive().includes(MyActionKey.GetItems)\r\n * );\r\n *\r\n * // Error signals - computed from slice (minimal reactivity)\r\n * readonly itemsError = computed(() =>\r\n * this.errors()[MyActionKey.GetItems] ?? null\r\n * );\r\n *\r\n * // Dispatchers\r\n * loadItems() {\r\n * return this.store.dispatch(new GetItems());\r\n * }\r\n * }\r\n * ```\r\n *\r\n * **Template Usage:**\r\n * ```html\r\n * @if (facade.isLoadingItems()) {\r\n * <loading-spinner />\r\n * } @else if (facade.itemsError(); as error) {\r\n * <error-alert>{{ error }}</error-alert>\r\n * } @else {\r\n * @for (item of facade.items(); track item.id) {\r\n * <item-card [item]=\"item\" />\r\n * }\r\n * }\r\n * ```\r\n */\r\nexport abstract class BaseFacade<TState, TLoadingName extends string> {\r\n /**\r\n * Override in child facade to provide the state selector\r\n */\r\n protected abstract state(): Signal<TState>;\r\n\r\n /**\r\n * Creates a query object with separate signals for data, loading, and error states\r\n * Each property is its own signal for granular reactivity\r\n *\r\n * @example\r\n * readonly modulesQuery = this.query(\r\n * 'getModulesLoading',\r\n * (state) => state.allModules\r\n * );\r\n *\r\n * // In template - each is a separate signal:\r\n * @if (modulesQuery.isPending()) { Loading... }\r\n * @if (modulesQuery.error(); as error) { Error: {{ error }} }\r\n * @if (modulesQuery.data(); as modules) {\r\n * <div *ngFor=\"let m of modules\">{{ m.title }}</div>\r\n * }\r\n */\r\n protected query<T>(\r\n loadingKey: TLoadingName,\r\n dataSelector: (state: TState) => T,\r\n ): QueryResult<T> {\r\n const stateSignal = this.state();\r\n\r\n const isPending = computed(() => {\r\n const currentState = stateSignal() as any;\r\n return currentState.loadingActive?.includes(loadingKey) ?? false;\r\n });\r\n\r\n const error = computed(() => {\r\n const currentState = stateSignal() as any;\r\n return currentState.errors?.[loadingKey] ?? null;\r\n });\r\n\r\n const data = computed(() => {\r\n const currentState = stateSignal() as any;\r\n const hasError = currentState.errors?.[loadingKey];\r\n return hasError ? null : dataSelector(currentState);\r\n });\r\n\r\n const isSuccess = computed(\r\n () => !isPending() && !error() && data() !== null,\r\n );\r\n\r\n const isError = computed(() => !!error());\r\n\r\n return {\r\n data,\r\n isPending,\r\n isSuccess,\r\n isError,\r\n error,\r\n };\r\n }\r\n\r\n /**\r\n * Creates a loading signal for a specific operation\r\n */\r\n protected loading(loadingKey: TLoadingName): Signal<boolean> {\r\n const stateSignal = this.state();\r\n return computed(() => {\r\n const currentState = stateSignal() as any;\r\n return currentState.loadingActive?.includes(loadingKey) ?? false;\r\n });\r\n }\r\n\r\n /**\r\n * Creates an error signal for a specific operation\r\n */\r\n protected errorSignal(loadingKey: TLoadingName): Signal<string | null> {\r\n const stateSignal = this.state();\r\n return computed(() => {\r\n const currentState = stateSignal() as any;\r\n return currentState.errors?.[loadingKey] ?? null;\r\n });\r\n }\r\n}\r\n","export interface EntityAdapter<T> {\r\n addOne(state: T[], entity: T): T[];\r\n upsertOne(state: T[], entity: T, uniqueKey?: keyof T): T[];\r\n updateOne(\r\n state: T[],\r\n id: string | number,\r\n changes: Partial<T>,\r\n uniqueKey?: keyof T,\r\n ): T[];\r\n removeOne(state: T[], id: string | number, uniqueKey?: keyof T): T[];\r\n setAll(state: T[], entities: T[]): T[];\r\n}\r\n\r\nexport function createEntityAdapter<T>(): EntityAdapter<T> {\r\n return {\r\n addOne: (state: T[], entity: T): T[] => [...state, entity],\r\n\r\n upsertOne: (\r\n state: T[],\r\n entity: T,\r\n uniqueKey: keyof T = 'id' as keyof T,\r\n ): T[] => {\r\n const key = entity[uniqueKey];\r\n if (key == null) return state;\r\n const index = state.findIndex((e) => e[uniqueKey] === key);\r\n if (index === -1) {\r\n return [...state, entity];\r\n }\r\n const clone = [...state];\r\n clone[index] = entity;\r\n return clone;\r\n },\r\n\r\n updateOne: (\r\n state: T[],\r\n id: string | number,\r\n changes: Partial<T>,\r\n uniqueKey: keyof T = 'id' as keyof T,\r\n ): T[] =>\r\n state.map((e) => (e[uniqueKey] === id ? { ...e, ...changes } : e)),\r\n\r\n removeOne: (\r\n state: T[],\r\n id: string | number,\r\n uniqueKey: keyof T = 'id' as keyof T,\r\n ): T[] => state.filter((e) => e[uniqueKey] !== id),\r\n\r\n setAll: (_state: T[], entities: T[]): T[] => [...entities],\r\n };\r\n}\r\n","import type { StateContext } from '@ngxs/store';\r\n\r\nexport interface LoadingStateShape<L extends string = string> {\r\n loadingActive: L[];\r\n errors: Partial<Record<L, string>>;\r\n}\r\n\r\ntype LoadingName<T extends LoadingStateShape<string>> =\r\n T['loadingActive'][number];\r\n\r\nexport function startLoading<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n): void {\r\n const { loadingActive, errors } = ctx.getState();\r\n\r\n if (!loadingActive.includes(loadingName)) {\r\n ctx.patchState({\r\n loadingActive: [...loadingActive, loadingName],\r\n } as Partial<T>);\r\n }\r\n\r\n if (errors && errors[loadingName]) {\r\n const { [loadingName]: _removed, ...rest } = errors;\r\n ctx.patchState({ errors: rest } as Partial<T>);\r\n }\r\n}\r\n\r\nexport function endLoading<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n): void {\r\n const { loadingActive } = ctx.getState();\r\n\r\n ctx.patchState({\r\n loadingActive: loadingActive.filter((name) => name !== loadingName),\r\n } as Partial<T>);\r\n}\r\n\r\nexport function setLoadingError<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n message: string,\r\n): void {\r\n const { errors } = ctx.getState();\r\n ctx.patchState({\r\n errors: { ...errors, [loadingName]: message },\r\n } as Partial<T>);\r\n}\r\n","import { StateContext } from '@ngxs/store';\r\nimport { Observable } from 'rxjs';\r\nimport { tap, catchError, finalize } from 'rxjs/operators';\r\nimport {\r\n startLoading,\r\n endLoading,\r\n setLoadingError,\r\n LoadingStateShape,\r\n} from './state-helpers';\r\n\r\ntype LoadingName<TState extends LoadingStateShape<string>> =\r\n TState['loadingActive'][number];\r\n\r\nexport interface ApiRequestConfig<\r\n TState extends LoadingStateShape<string>,\r\n TResponse,\r\n> {\r\n ctx: StateContext<TState>;\r\n key: LoadingName<TState>;\r\n request$: Observable<TResponse>;\r\n onSuccess: (response: TResponse, state: TState) => Partial<TState> | void;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\nexport function handleApiRequest<\r\n TState extends LoadingStateShape<string>,\r\n TResponse,\r\n>(config: ApiRequestConfig<TState, TResponse>) {\r\n const { ctx, key, request$, onSuccess, onError, errorMessage } = config;\r\n\r\n startLoading(ctx, key);\r\n\r\n return request$.pipe(\r\n tap((response) => {\r\n const state = ctx.getState();\r\n const patch = onSuccess(response, state);\r\n if (patch) {\r\n ctx.patchState(patch);\r\n }\r\n }),\r\n catchError((error) => {\r\n const state = ctx.getState();\r\n const message = error?.error?.message ?? error?.message ?? errorMessage;\r\n setLoadingError(ctx, key, message);\r\n\r\n // Call onError callback if provided\r\n if (onError) {\r\n const patch = onError(error, state);\r\n if (patch) {\r\n ctx.patchState(patch);\r\n }\r\n }\r\n\r\n throw error;\r\n }),\r\n finalize(() => endLoading(ctx, key)),\r\n );\r\n}\r\n","import { StateContext } from '@ngxs/store';\r\nimport { Observable } from 'rxjs';\r\nimport { createEntityAdapter } from '../utils/entity-adapter';\r\nimport { handleApiRequest } from '../utils/api-request.helper';\r\nimport { LoadingStateShape } from '../utils/state-helpers';\r\n\r\nexport interface Response<T> {\r\n endpoint: string;\r\n status: number;\r\n code: number;\r\n locale: string;\r\n message?: string | null;\r\n errors?: unknown | null;\r\n data: T;\r\n cacheSession?: string;\r\n}\r\nexport interface CrudLoadConfig<T, TState, TLoad extends string, TData = T[]> {\r\n key: TLoad;\r\n request$: Observable<Response<TData>>;\r\n stateProperty?: (state: TState) => T[];\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for complex state updates.\r\n * CRUD methods should only be used for simple array operations with `stateProperty`.\r\n */\r\n updateState?: (state: TState, data: TData) => Partial<TState>;\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for data transformation.\r\n * CRUD methods should only be used for simple array operations.\r\n */\r\n transform?: (data: TData) => TData;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\nexport interface CrudCreateConfig<T, TState, TLoad extends string> {\r\n key: TLoad;\r\n request$: Observable<Response<T>>;\r\n stateProperty: (state: TState) => T[];\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for complex state updates.\r\n * CRUD methods should only be used for simple array operations with `stateProperty`.\r\n */\r\n updateState?: (state: TState, items: T[]) => Partial<TState>;\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for data transformation.\r\n * CRUD methods should only be used for simple array operations.\r\n */\r\n transform?: (data: T) => T;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\nexport interface CrudUpdateConfig<T, TState, TLoad extends string> {\r\n key: TLoad;\r\n request$: Observable<Response<T>>;\r\n uniqueKey: keyof T;\r\n id: string | number;\r\n stateProperty: (state: TState) => T[];\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for complex state updates.\r\n * CRUD methods should only be used for simple array operations with `stateProperty`.\r\n */\r\n updateState?: (state: TState, items: T[]) => Partial<TState>;\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for data transformation.\r\n * CRUD methods should only be used for simple array operations.\r\n */\r\n transform?: (data: T) => T;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\nexport interface CrudDeleteConfig<T, TState, TLoad extends string> {\r\n key: TLoad;\r\n request$: Observable<Response<void>>;\r\n uniqueKey: keyof T;\r\n id: string | number;\r\n stateProperty: (state: TState) => T[];\r\n /**\r\n * @deprecated Use `handleApiRequest` with `onSuccess` for complex state updates.\r\n * CRUD methods should only be used for simple array operations with `stateProperty`.\r\n */\r\n updateState?: (state: TState, items: T[]) => Partial<TState>;\r\n onError?: (error: any, state: TState) => Partial<TState> | void;\r\n errorMessage?: string;\r\n}\r\n\r\n/**\r\n * T = entity type (Module, User, ...)\r\n * TState = full state model (must include LoadingStateShape)\r\n * TLoad = union type of loading keys for this feature\r\n */\r\nexport abstract class CrudStateBase<\r\n T,\r\n TState extends LoadingStateShape<TLoad>,\r\n TLoad extends string,\r\n> {\r\n protected adapter = createEntityAdapter<T>();\r\n\r\n /**\r\n * Helper to create default updateState function\r\n */\r\n private getDefaultUpdateState<TState>(\r\n stateProperty: (state: TState) => T[],\r\n ): (state: TState, items: T[]) => Partial<TState> {\r\n // Try to extract the property name from the stateProperty function\r\n const funcStr = stateProperty.toString();\r\n const match = funcStr.match(/\\.([a-zA-Z_$][a-zA-Z0-9_$]*)/); // Match .propertyName\r\n const key = match ? match[1] : 'items';\r\n\r\n return (state, items) => ({ [key]: items }) as Partial<TState>;\r\n }\r\n\r\n /**\r\n * @deprecated Use `handleApiRequest` directly with `onSuccess` callback.\r\n * The `load()` method provides no significant benefit over `handleApiRequest`.\r\n *\r\n * @example\r\n * // Instead of this.load(), use:\r\n * return handleApiRequest({\r\n * ctx,\r\n * key: ActionKey.GetItems,\r\n * request$: req$,\r\n * onSuccess: (response) => ({\r\n * items: response.data ?? [],\r\n * }),\r\n * });\r\n */\r\n protected load<TData = T[]>(\r\n ctx: StateContext<TState>,\r\n config: CrudLoadConfig<T, TState, TLoad, TData>,\r\n ) {\r\n return handleApiRequest({\r\n ctx,\r\n key: config.key,\r\n request$: config.request$,\r\n onSuccess: (response, state) => {\r\n const data = config.transform\r\n ? config.transform(response.data)\r\n : response.data;\r\n\r\n // If stateProperty provided, use adapter for array operations\r\n if (config.stateProperty) {\r\n const items = this.adapter.setAll(\r\n config.stateProperty(state),\r\n data as T[],\r\n );\r\n const updateState =\r\n config.updateState ??\r\n this.getDefaultUpdateState(config.stateProperty);\r\n return updateState(state, items as any);\r\n }\r\n\r\n // Otherwise, use custom updateState directly\r\n if (config.updateState) {\r\n return config.updateState(state, data);\r\n }\r\n\r\n throw new Error('Either stateProperty or updateState must be provided');\r\n },\r\n onError: config.onError,\r\n errorMessage: config.errorMessage ?? 'Failed to load data',\r\n });\r\n }\r\n\r\n /**\r\n * Create one entity with config object\r\n */\r\n protected create(\r\n ctx: StateContext<TState>,\r\n config: CrudCreateConfig<T, TState, TLoad>,\r\n ) {\r\n const updateState =\r\n config.updateState ?? this.getDefaultUpdateState(config.stateProperty);\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: config.key,\r\n request$: config.request$,\r\n onSuccess: (response, state) => {\r\n const entity = config.transform\r\n ? config.transform(response.data)\r\n : response.data;\r\n const items = this.adapter.addOne(config.stateProperty(state), entity);\r\n return updateState(state, items);\r\n },\r\n onError: config.onError,\r\n errorMessage: config.errorMessage ?? 'Failed to create item',\r\n });\r\n }\r\n\r\n /**\r\n * Update one entity with config object\r\n */\r\n protected update(\r\n ctx: StateContext<TState>,\r\n config: CrudUpdateConfig<T, TState, TLoad>,\r\n ) {\r\n const updateState =\r\n config.updateState ?? this.getDefaultUpdateState(config.stateProperty);\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: config.key,\r\n request$: config.request$,\r\n onSuccess: (response, state) => {\r\n const entity = config.transform\r\n ? config.transform(response.data)\r\n : response.data;\r\n const items = this.adapter.upsertOne(\r\n config.stateProperty(state),\r\n entity,\r\n config.uniqueKey,\r\n );\r\n return updateState(state, items);\r\n },\r\n onError: config.onError,\r\n errorMessage: config.errorMessage ?? 'Failed to update item',\r\n });\r\n }\r\n\r\n /**\r\n * Delete one entity with config object\r\n */\r\n protected delete(\r\n ctx: StateContext<TState>,\r\n config: CrudDeleteConfig<T, TState, TLoad>,\r\n ) {\r\n const updateState =\r\n config.updateState ?? this.getDefaultUpdateState(config.stateProperty);\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: config.key,\r\n request$: config.request$,\r\n onSuccess: (_response, state) => {\r\n const items = this.adapter.removeOne(\r\n config.stateProperty(state),\r\n config.id,\r\n config.uniqueKey,\r\n );\r\n return updateState(state, items);\r\n },\r\n onError: config.onError,\r\n errorMessage: config.errorMessage ?? 'Failed to delete item',\r\n });\r\n }\r\n}\r\n","import { AbstractControl } from '@angular/forms';\r\n\r\nexport function isInvalid(control: AbstractControl | null) {\r\n if (!control) return false;\r\n return control && control?.invalid && control?.touched;\r\n}\r\n","import { HttpContextToken } from '@angular/common/http';\r\n\r\n/**\r\n * HTTP context configuration for request handling\r\n */\r\nexport interface RequestContextConfig {\r\n /** Use base URL instead of gateway URL */\r\n useBaseUrl?: boolean;\r\n}\r\n\r\n/**\r\n * Shared HTTP context token for request configuration.\r\n * Used by interceptors to determine base URL routing.\r\n *\r\n * @example\r\n * ```typescript\r\n * import { REQUEST_CONTEXT } from '@masterteam/components';\r\n *\r\n * // In a service\r\n * private context = new HttpContext().set(REQUEST_CONTEXT, { useBaseUrl: true });\r\n *\r\n * getMetadata(): Observable<any> {\r\n * return this.http.get('metadata', { context: this.context });\r\n * }\r\n *\r\n * // In interceptor\r\n * const config = req.context.get(REQUEST_CONTEXT);\r\n * if (config?.useBaseUrl) {\r\n * // Use base URL\r\n * }\r\n * ```\r\n */\r\nexport const REQUEST_CONTEXT = new HttpContextToken<RequestContextConfig>(\r\n () => ({ useBaseUrl: false }),\r\n);\r\n","/**\r\n * Color utility functions for brand display.\r\n */\r\n\r\n/**\r\n * Converts a hex color to a light shade (equivalent to primary-100 in Tailwind).\r\n * This creates a color with ~10% opacity or a very light tint by mixing with white.\r\n */\r\nexport function getLightColor(hexColor: string): string {\r\n const hex = hexColor.replace('#', '');\r\n const r = parseInt(hex.substring(0, 2), 16);\r\n const g = parseInt(hex.substring(2, 4), 16);\r\n const b = parseInt(hex.substring(4, 6), 16);\r\n\r\n const lightR = Math.round(r * 0.1 + 255 * 0.9);\r\n const lightG = Math.round(g * 0.1 + 255 * 0.9);\r\n const lightB = Math.round(b * 0.1 + 255 * 0.9);\r\n\r\n return `#${lightR.toString(16).padStart(2, '0')}${lightG\r\n .toString(16)\r\n .padStart(2, '0')}${lightB.toString(16).padStart(2, '0')}`;\r\n}\r\n\r\nexport function getContrastColor(bgColor: string): string {\r\n let r = 0,\r\n g = 0,\r\n b = 0;\r\n if (bgColor.startsWith('#')) {\r\n const hex = bgColor.slice(1);\r\n if (hex.length === 3) {\r\n r = parseInt(hex[0] + hex[0], 16);\r\n g = parseInt(hex[1] + hex[1], 16);\r\n b = parseInt(hex[2] + hex[2], 16);\r\n } else if (hex.length === 6) {\r\n r = parseInt(hex.slice(0, 2), 16);\r\n g = parseInt(hex.slice(2, 4), 16);\r\n b = parseInt(hex.slice(4, 6), 16);\r\n }\r\n }\r\n const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n return luminance > 0.5 ? '' : '#ffffff';\r\n}\r\n","import { formatDate } from '@angular/common';\r\nimport { inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core';\r\nimport {\r\n MT_DATE_FORMATS,\r\n toAngularDateFormat,\r\n} from '../config/date-format.config';\r\n\r\nexport type MTDateFormatType = 'date' | 'dateTime' | 'time';\r\n\r\n@Pipe({\r\n name: 'mtDateFormat',\r\n standalone: true,\r\n})\r\nexport class MTDateFormatPipe implements PipeTransform {\r\n private readonly locale = inject(LOCALE_ID);\r\n private readonly formats = inject(MT_DATE_FORMATS);\r\n\r\n transform(value: unknown, type: MTDateFormatType = 'date'): string {\r\n if (value === null || value === undefined || value === '') {\r\n return '';\r\n }\r\n\r\n try {\r\n return formatDate(\r\n value as string | number | Date,\r\n toAngularDateFormat(this.formats[type] ?? this.formats.date),\r\n this.locale,\r\n this.formats.timezone,\r\n );\r\n } catch {\r\n return String(value);\r\n }\r\n }\r\n}\r\n","/*\r\n * Public API Surface of components\r\n */\r\n\r\n// Config\r\nexport * from './lib/config/providemt';\r\nexport * from './lib/config/ds-identity.preset';\r\nexport * from './lib/config/ds-identity.tokens';\r\nexport * from './lib/config/povide-messages';\r\nexport * from './lib/config/provide-confirmation';\r\nexport * from './lib/config/date-format.config';\r\nexport * from './lib/config/dynamic-form.model';\r\n\r\n// Base classes\r\nexport * from './lib/base/base.facade';\r\nexport * from './lib/base/crud-base.state';\r\n\r\n// Utils\r\nexport * from './lib/utils/theme';\r\nexport * from './lib/utils/inputs';\r\nexport * from './lib/utils/state-helpers';\r\nexport * from './lib/utils/api-request.helper';\r\nexport * from './lib/utils/entity-adapter';\r\nexport * from './lib/utils/http-context';\r\nexport * from './lib/utils/color.utils';\r\n\r\n// Pipes\r\nexport * from './lib/pipes/mt-date-format.pipe';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAKA;;;;;AAKG;AACH,SAAS,QAA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