@masterteam/components 0.0.133 → 0.0.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/masterteam-components-business-fields.mjs +38 -18
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +40 -40
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +21 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-entities.mjs","sources":["../../../../packages/masterteam/components/entities/entity-display.utils.ts","../../../../packages/masterteam/components/entities/entity-field/entity-field.ts","../../../../packages/masterteam/components/entities/entity-text/entity-text.ts","../../../../packages/masterteam/components/entities/entity-text/entity-text.html","../../../../packages/masterteam/components/entities/entity-date/entity-date.ts","../../../../packages/masterteam/components/entities/entity-date/entity-date.html","../../../../packages/masterteam/components/entities/entity-status/entity-status.ts","../../../../packages/masterteam/components/entities/entity-status/entity-status.html","../../../../packages/masterteam/components/entities/entity-user/entity-user.ts","../../../../packages/masterteam/components/entities/entity-user/entity-user.html","../../../../packages/masterteam/components/entities/entity-percentage/entity-percentage.ts","../../../../packages/masterteam/components/entities/entity-percentage/entity-percentage.html","../../../../packages/masterteam/components/entities/entity-currency/entity-currency.ts","../../../../packages/masterteam/components/entities/entity-currency/entity-currency.html","../../../../packages/masterteam/components/entities/entity-checkbox/entity-checkbox.ts","../../../../packages/masterteam/components/entities/entity-checkbox/entity-checkbox.html","../../../../packages/masterteam/components/entities/entity-long-text/entity-long-text.ts","../../../../packages/masterteam/components/entities/entity-long-text/entity-long-text.html","../../../../packages/masterteam/components/entities/entity-lookup/entity-lookup.ts","../../../../packages/masterteam/components/entities/entity-lookup/entity-lookup.html","../../../../packages/masterteam/components/entities/entity-attachment/entity-attachment.ts","../../../../packages/masterteam/components/entities/entity-attachment/entity-attachment.html","../../../../packages/masterteam/components/entities/entity-preview/entity-preview.ts","../../../../packages/masterteam/components/entities/entity-preview/entity-preview.html","../../../../packages/masterteam/components/entities/entities-preview/entities-preview.ts","../../../../packages/masterteam/components/entities/entities-preview/entities-preview.html","../../../../packages/masterteam/components/entities/entities-manage/entities-resize-base.ts","../../../../packages/masterteam/components/entities/entities-manage/entities-manage.ts","../../../../packages/masterteam/components/entities/entities-manage/entities-manage.html","../../../../packages/masterteam/components/entities/masterteam-components-entities.ts"],"sourcesContent":["import { EntityConfiguration, EntityLabelPosition } from './entity.model';\n\nexport const ENTITY_EMPTY_VALUE_PLACEHOLDER = '_';\n\nexport function isValueMissing(value: unknown): boolean {\n if (value === null || value === undefined) {\n return true;\n }\n\n if (typeof value === 'string') {\n return value.trim().length === 0;\n }\n\n return false;\n}\n\nexport function displayOrPlaceholder(value: unknown): string {\n if (isValueMissing(value)) {\n return ENTITY_EMPTY_VALUE_PLACEHOLDER;\n }\n\n return String(value);\n}\n\nexport function isEntityLabelHidden(\n configuration?: EntityConfiguration | null,\n): boolean {\n const config = configuration as\n | {\n hideLabel?: boolean;\n hideName?: boolean;\n }\n | null\n | undefined;\n\n return config?.hideLabel ?? config?.hideName ?? false;\n}\n\nexport function resolveEntityLabelPosition(\n configuration?: EntityConfiguration | null,\n): EntityLabelPosition {\n const config = configuration as\n | {\n labelPosition?: EntityLabelPosition;\n labelPostion?: EntityLabelPosition;\n }\n | null\n | undefined;\n\n return config?.labelPosition ?? config?.labelPostion ?? 'bottom';\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport { TruncateTooltip } from '@masterteam/components/tooltip';\nimport {\n isEntityLabelHidden,\n resolveEntityLabelPosition,\n} from '../entity-display.utils';\nimport { EntityConfiguration } from '../entity.model';\n\ntype EntityFieldGap = 'compact' | 'normal' | 'relaxed';\n\n@Component({\n selector: 'mt-entity-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [TruncateTooltip],\n template: `\n <div [class]=\"containerClass()\">\n <ng-content />\n @if (!hideLabel()) {\n <span\n class=\"block min-w-0 truncate text-sm text-gray-500\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >\n {{ label() }}\n </span>\n }\n </div>\n `,\n host: {\n class: 'block min-w-0 w-full',\n },\n})\nexport class EntityField {\n readonly label = input<string>('');\n readonly configuration = input<EntityConfiguration | null | undefined>();\n readonly gap = input<EntityFieldGap>('compact');\n\n readonly hideLabel = computed(() =>\n isEntityLabelHidden(this.configuration()),\n );\n\n readonly labelPosition = computed(() =>\n resolveEntityLabelPosition(this.configuration()),\n );\n\n readonly containerClass = computed(() => {\n const gapClass =\n this.gap() === 'relaxed'\n ? 'gap-2'\n : this.gap() === 'normal'\n ? 'gap-1'\n : 'gap-0.5';\n\n const directionClass =\n this.labelPosition() === 'top' ? 'flex-col-reverse' : 'flex-col';\n\n return `flex min-w-0 ${directionClass} ${gapClass}`;\n });\n}\n","import { Component, computed, input } from '@angular/core';\nimport { TruncateTooltip } from '@masterteam/components/tooltip';\nimport { displayOrPlaceholder } from '../entity-display.utils';\nimport { EntityField } from '../entity-field/entity-field';\nimport { EntityData } from '../entity.model';\n\n@Component({\n selector: 'mt-entity-text',\n standalone: true,\n imports: [EntityField, TruncateTooltip],\n templateUrl: './entity-text.html',\n})\nexport class EntityText {\n /** Full entity data object */\n readonly data = input<EntityData>();\n\n /** Individual inputs (used when data is not provided) */\n readonly name = input<string>();\n readonly value = input<string>();\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n readonly displayValue = computed(() => {\n const d = this.data();\n if (d) {\n return displayOrPlaceholder(typeof d.value === 'string' ? d.value : null);\n }\n return displayOrPlaceholder(this.value());\n });\n}\n","<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n>\n <div\n class=\"min-w-0 truncate text-sm font-semibold\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n [innerHTML]=\"displayValue()\"\n ></div>\n</mt-entity-field>\n","import { Component, computed, input } from '@angular/core';\nimport { TruncateTooltip } from '@masterteam/components/tooltip';\nimport { displayOrPlaceholder } from '../entity-display.utils';\nimport { EntityField } from '../entity-field/entity-field';\nimport { EntityData } from '../entity.model';\n\n@Component({\n selector: 'mt-entity-date',\n standalone: true,\n imports: [EntityField, TruncateTooltip],\n templateUrl: './entity-date.html',\n})\nexport class EntityDate {\n /** Full entity data object */\n readonly data = input<EntityData>();\n\n /** Individual inputs (used when data is not provided) */\n readonly name = input<string>();\n readonly value = input<string>();\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n readonly displayValue = computed(() => {\n const d = this.data();\n if (d) {\n return displayOrPlaceholder(typeof d.value === 'string' ? d.value : null);\n }\n return displayOrPlaceholder(this.value());\n });\n}\n","<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n>\n <span\n class=\"block min-w-0 truncate text-sm font-semibold\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >\n {{ displayValue() }}\n </span>\n</mt-entity-field>\n","import { Component, computed, input } from '@angular/core';\nimport {\n displayOrPlaceholder,\n ENTITY_EMPTY_VALUE_PLACEHOLDER,\n} from '../entity-display.utils';\nimport { EntityField } from '../entity-field/entity-field';\nimport { EntityData, EntityStatusValue } from '../entity.model';\n\n@Component({\n selector: 'mt-entity-status',\n standalone: true,\n imports: [EntityField],\n templateUrl: './entity-status.html',\n})\nexport class EntityStatus {\n /** Full entity data object */\n readonly data = input<EntityData>();\n\n /** Individual inputs (used when data is not provided) */\n readonly name = input<string>();\n readonly value = input<EntityStatusValue>();\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n\n readonly statusValue = computed<EntityStatusValue | null>(() => {\n const d = this.data();\n if (d && typeof d.value === 'object' && d.value !== null) {\n return d.value as EntityStatusValue;\n }\n return this.value() ?? null;\n });\n\n readonly badgeStyle = computed(() => {\n const status = this.statusValue();\n if (!status?.color) return {};\n return {\n color: status.color,\n backgroundColor: this.hexToRgba(status.color, 0.12),\n };\n });\n\n readonly emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;\n\n readonly statusLabel = computed(() =>\n displayOrPlaceholder(this.statusValue()?.display),\n );\n\n private hexToRgba(hex: string, alpha: number): string {\n const r = parseInt(hex.slice(1, 3), 16);\n const g = parseInt(hex.slice(3, 5), 16);\n const b = parseInt(hex.slice(5, 7), 16);\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n}\n","<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (statusValue(); as status) {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit\"\n [style]=\"badgeStyle()\"\n >\n {{ statusLabel() }}\n </span>\n } @else {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n","import { Component, computed, input } from '@angular/core';\r\nimport { HttpContext } from '@angular/common/http';\r\nimport { Avatar } from '@masterteam/components/avatar';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { EntityData, EntityUserConfig, EntityUserValue } from '../entity.model';\r\nimport { SecureImagePipe } from '@masterteam/components/upload-field';\r\nimport { displayOrPlaceholder } from '../entity-display.utils';\r\nimport { REQUEST_CONTEXT } from '@masterteam/components';\r\n\r\n@Component({\r\n selector: 'mt-entity-user',\r\n standalone: true,\r\n imports: [Avatar, Button, SecureImagePipe],\r\n templateUrl: './entity-user.html',\r\n})\r\nexport class EntityUser {\r\n readonly httpContext = new HttpContext().set(REQUEST_CONTEXT, {\r\n useBaseUrl: true,\r\n });\r\n\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Resolved user value object from data().value */\r\n private readonly userValue = computed(() => {\r\n const val = this.data()?.value;\r\n if (val && typeof val === 'object' && 'displayName' in val) {\r\n return val as EntityUserValue;\r\n }\r\n return null;\r\n });\r\n\r\n readonly rawUserName = computed(() => this.userValue()?.displayName ?? null);\r\n\r\n readonly userName = computed(() => displayOrPlaceholder(this.rawUserName()));\r\n\r\n readonly userPhoto = computed(() => this.userValue()?.photoUrl ?? '');\r\n\r\n readonly labelText = computed(() => this.userValue()?.name ?? '');\r\n\r\n // ── Configuration-driven visibility ──\r\n\r\n private readonly config = computed(\r\n () => (this.data()?.configuration as EntityUserConfig) ?? {},\r\n );\r\n\r\n readonly showDisplayName = computed(\r\n () => this.config().showDisplayName ?? true,\r\n );\r\n\r\n readonly showPhoneNumber = computed(\r\n () => this.config().showPhoneNumber ?? false,\r\n );\r\n\r\n readonly showEmail = computed(() => this.config().showEmail ?? false);\r\n\r\n readonly phoneNumber = computed(() => this.userValue()?.phoneNumber ?? '');\r\n\r\n readonly email = computed(() => this.userValue()?.email ?? '');\r\n\r\n readonly hasContactInfo = computed(\r\n () =>\r\n (this.showPhoneNumber() && !!this.phoneNumber()) ||\r\n (this.showEmail() && !!this.email()),\r\n );\r\n}\r\n","<div class=\"flex items-center gap-2\">\r\n <mt-avatar\r\n [image]=\"\r\n userPhoto()\r\n ? (userPhoto() | secureImage: true : httpContext : 'avatar/')\r\n : ''\r\n \"\r\n [icon]=\"'user.user-01'\"\r\n styleClass=\"w-10! h-10! text-white! text-xl! bg-primary-500!\"\r\n ></mt-avatar>\r\n\r\n @if (showDisplayName()) {\r\n <div class=\"flex flex-col min-w-0 flex-1\">\r\n <span class=\"text-sm text-gray-700 truncate\">{{ userName() }}</span>\r\n @if (labelText()) {\r\n <span class=\"text-xs text-gray-500 truncate\">{{ labelText() }}</span>\r\n }\r\n </div>\r\n }\r\n\r\n @if (hasContactInfo()) {\r\n <div class=\"flex items-center gap-1 ms-auto shrink-0\">\r\n @if (showPhoneNumber() && phoneNumber()) {\r\n <a [href]=\"'tel:' + phoneNumber()\" [title]=\"phoneNumber()\">\r\n <mt-button\r\n icon=\"communication.phone\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"phoneNumber()\"\r\n />\r\n </a>\r\n }\r\n @if (showEmail() && email()) {\r\n <a [href]=\"'mailto:' + email()\" [title]=\"email()\">\r\n <mt-button\r\n icon=\"communication.mail-01\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"email()\"\r\n />\r\n </a>\r\n }\r\n </div>\r\n }\r\n</div>\r\n","import { Component, computed, input } from '@angular/core';\nimport { Progress } from '@masterteam/components/progress';\nimport {\n displayOrPlaceholder,\n isEntityLabelHidden,\n isValueMissing,\n} from '../entity-display.utils';\nimport { EntityData, EntityPercentageConfig } from '../entity.model';\n\n@Component({\n selector: 'mt-entity-percentage',\n standalone: true,\n imports: [Progress],\n templateUrl: './entity-percentage.html',\n})\nexport class EntityPercentage {\n /** Full entity data object */\n readonly data = input<EntityData>();\n\n /** Individual inputs (used when data is not provided) */\n readonly name = input<string>();\n readonly value = input<string>();\n readonly rawValue = input<string>();\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n\n readonly displayValue = computed(() => {\n const d = this.data();\n if (d) {\n return displayOrPlaceholder(typeof d.value === 'string' ? d.value : null);\n }\n return displayOrPlaceholder(this.value());\n });\n\n private readonly rawNumericValue = computed(\n () =>\n this.data()?.rawValue ??\n this.rawValue() ??\n this.value() ??\n this.displayValue(),\n );\n\n readonly hasNumericValue = computed(() => {\n return this.parseNumericValue(this.rawNumericValue()) !== null;\n });\n\n readonly numericValue = computed(() => {\n const num = this.parseNumericValue(this.rawNumericValue());\n return num === null ? 0 : Math.min(num, 100);\n });\n\n readonly maxValue = computed(() => {\n const num = this.parseNumericValue(this.rawNumericValue());\n if (num === null) return 100;\n return num > 100 ? Math.ceil(num) : 100;\n });\n\n // ── Configuration-driven visibility ──\n\n readonly hideName = computed(() =>\n isEntityLabelHidden(this.data()?.configuration),\n );\n\n readonly progressColor = computed(() => {\n const configuration = this.data()?.configuration as\n | EntityPercentageConfig\n | undefined;\n return configuration?.color?.trim() || 'primary';\n });\n\n private parseNumericValue(raw: unknown): number | null {\n if (isValueMissing(raw)) {\n return null;\n }\n\n const normalizedRawValue = String(raw).replace(/%/g, '').trim();\n if (!normalizedRawValue) {\n return null;\n }\n\n const numericValue = Number.parseFloat(normalizedRawValue);\n return Number.isNaN(numericValue) ? null : numericValue;\n }\n}\n","<div class=\"flex flex-col gap-1\">\r\n <div class=\"flex items-center justify-between\">\r\n @if (!hideName()) {\r\n <span class=\"text-xs font-semibold\">{{ displayName() }}</span>\r\n }\r\n <span class=\"text-xs font-bold\" [class.ms-auto]=\"hideName()\">{{\r\n displayValue()\r\n }}</span>\r\n </div>\r\n @if (hasNumericValue()) {\r\n <mt-progress\r\n [value]=\"numericValue()\"\r\n [showLabel]=\"false\"\r\n [height]=\"9\"\r\n [maxValue]=\"maxValue()\"\r\n [color]=\"progressColor()\"\r\n >\r\n </mt-progress>\r\n } @else {\r\n <div class=\"h-[9px] rounded-full bg-gray-200\"></div>\r\n }\r\n</div>\r\n","import { Component, computed, input } from '@angular/core';\nimport { TruncateTooltip } from '@masterteam/components/tooltip';\nimport { displayOrPlaceholder } from '../entity-display.utils';\nimport { EntityField } from '../entity-field/entity-field';\nimport { EntityData } from '../entity.model';\n\n@Component({\n selector: 'mt-entity-currency',\n standalone: true,\n imports: [EntityField, TruncateTooltip],\n templateUrl: './entity-currency.html',\n})\nexport class EntityCurrency {\n /** Full entity data object */\n readonly data = input<EntityData>();\n\n /** Individual inputs (used when data is not provided) */\n readonly name = input<string>();\n readonly value = input<string>();\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n readonly displayValue = computed(() => {\n const d = this.data();\n if (d) {\n return displayOrPlaceholder(typeof d.value === 'string' ? d.value : null);\n }\n return displayOrPlaceholder(this.value());\n });\n}\n","<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n>\n <span\n class=\"block min-w-0 truncate text-sm font-semibold\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >\n {{ displayValue() }}\n </span>\n</mt-entity-field>\n","import { Component, computed, input } from '@angular/core';\nimport {\n ENTITY_EMPTY_VALUE_PLACEHOLDER,\n isEntityLabelHidden,\n} from '../entity-display.utils';\nimport { EntityData } from '../entity.model';\n\n@Component({\n selector: 'mt-entity-checkbox',\n standalone: true,\n templateUrl: './entity-checkbox.html',\n})\nexport class EntityCheckbox {\n /** Full entity data object */\n readonly data = input<EntityData>();\n\n /** Individual inputs (used when data is not provided) */\n readonly name = input<string>();\n readonly value = input<string>();\n readonly rawValue = input<string>();\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n readonly emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;\n\n readonly hideName = computed(() =>\n isEntityLabelHidden(this.data()?.configuration),\n );\n\n readonly checkboxState = computed<boolean | null>(() => {\n const raw = this.data()?.rawValue ?? this.rawValue();\n if (raw !== undefined && raw !== null) {\n return this.parseBoolean(raw);\n }\n\n const val = this.data()?.value ?? this.value();\n if (typeof val === 'string') {\n return this.parseBoolean(val);\n }\n\n return null;\n });\n\n private parseBoolean(value: string): boolean | null {\n const normalized = value.trim().toLowerCase();\n if (!normalized.length) {\n return null;\n }\n\n if (normalized === 'true') {\n return true;\n }\n\n if (normalized === 'false') {\n return false;\n }\n\n return null;\n }\n}\n","<div class=\"flex items-center gap-2\">\r\n @if (checkboxState() === true) {\r\n <svg class=\"w-5 h-5 text-green-500\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n } @else if (checkboxState() === false) {\r\n <svg class=\"w-5 h-5 text-gray-300\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5.414l-2.293-2.293a1 1 0 011.414-1.414L10 11.172l3.879-3.879a1 1 0 111.414 1.414L10 13.414l-.707-.707-.293-.293z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n } @else {\r\n <span\r\n class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-100 px-1 text-[10px] font-semibold text-gray-500\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n @if (!hideName()) {\r\n <span class=\"text-sm font-semibold\">{{ displayName() }}</span>\r\n }\r\n</div>\r\n","import { Component, computed, input } from '@angular/core';\nimport {\n ENTITY_EMPTY_VALUE_PLACEHOLDER,\n isValueMissing,\n} from '../entity-display.utils';\nimport { EntityField } from '../entity-field/entity-field';\nimport { EntityData } from '../entity.model';\n\n@Component({\n selector: 'mt-entity-long-text',\n standalone: true,\n imports: [EntityField],\n templateUrl: './entity-long-text.html',\n})\nexport class EntityLongText {\n /** Full entity data object */\n readonly data = input<EntityData>();\n\n /** Individual inputs (used when data is not provided) */\n readonly name = input<string>();\n readonly value = input<string>();\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n\n readonly displayValue = computed(() => {\n const d = this.data();\n const raw = d\n ? typeof d.value === 'string'\n ? d.value\n : null\n : this.value();\n\n if (isValueMissing(raw)) {\n return ENTITY_EMPTY_VALUE_PLACEHOLDER;\n }\n\n return raw as string;\n });\n}\n","<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n>\n <div class=\"text-sm font-semibold\" [innerHTML]=\"displayValue()\"></div>\n</mt-entity-field>\n","import { Component, computed, input } from '@angular/core';\nimport {\n displayOrPlaceholder,\n ENTITY_EMPTY_VALUE_PLACEHOLDER,\n} from '../entity-display.utils';\nimport { EntityField } from '../entity-field/entity-field';\nimport { EntityData, EntityLookupValue } from '../entity.model';\n\n@Component({\n selector: 'mt-entity-lookup',\n standalone: true,\n imports: [EntityField],\n templateUrl: './entity-lookup.html',\n})\nexport class EntityLookup {\n /** Full entity data object */\n readonly data = input<EntityData>();\n\n /** Individual inputs (used when data is not provided) */\n readonly name = input<string>();\n readonly value = input<EntityLookupValue>();\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n\n readonly lookupValue = computed<EntityLookupValue | null>(() => {\n const d = this.data();\n if (d && typeof d.value === 'object' && d.value !== null) {\n return d.value as EntityLookupValue;\n }\n return this.value() ?? null;\n });\n\n readonly badgeStyle = computed(() => {\n const lookup = this.lookupValue();\n if (!lookup?.color) return {};\n return {\n color: lookup.color,\n backgroundColor: this.hexToRgba(lookup.color, 0.12),\n };\n });\n\n readonly emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;\n\n readonly lookupLabel = computed(() =>\n displayOrPlaceholder(this.lookupValue()?.display),\n );\n\n private hexToRgba(hex: string, alpha: number): string {\n const r = parseInt(hex.slice(1, 3), 16);\n const g = parseInt(hex.slice(3, 5), 16);\n const b = parseInt(hex.slice(5, 7), 16);\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n}\n","<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (lookupValue(); as lookup) {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit\"\n [style]=\"badgeStyle()\"\n >\n {{ lookupLabel() }}\n </span>\n } @else {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n","import { HttpClient, HttpContext } from '@angular/common/http';\nimport {\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Button } from '@masterteam/components/button';\nimport { UploadField } from '@masterteam/components/upload-field';\nimport { MTIcon } from '@masterteam/icons';\nimport {\n EMPTY,\n catchError,\n finalize,\n forkJoin,\n map,\n of,\n switchMap,\n take,\n} from 'rxjs';\n\nimport {\n EntityAttachmentItemValue,\n EntityAttachmentValue,\n EntityData,\n} from '../entity.model';\nimport { EntityField } from '../entity-field/entity-field';\n\ninterface AttachmentMetadataResponse {\n data: EntityAttachmentItemValue;\n}\n\ntype AttachmentReference = EntityAttachmentItemValue | string;\n\n@Component({\n selector: 'mt-entity-attachment',\n standalone: true,\n imports: [FormsModule, UploadField, Button, EntityField],\n templateUrl: './entity-attachment.html',\n})\nexport class EntityAttachment {\n readonly data = input<EntityData>();\n readonly name = input<string>();\n readonly shape = input<'default' | 'compact'>('default');\n readonly value = input<\n EntityAttachmentValue | EntityAttachmentItemValue | string | null\n >();\n readonly endPoint = input<string>('uploader');\n readonly context = input<HttpContext | undefined>(undefined);\n\n private readonly httpClient = inject(HttpClient);\n\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\n readonly loading = signal(false);\n readonly attachments = signal<EntityAttachmentItemValue[]>([]);\n readonly attachmentReferences = computed(() =>\n this.normalizeAttachmentValue(this.data()?.value ?? this.value()),\n );\n readonly uploadValue = computed(() => {\n const references = this.attachmentReferences().map((reference) => {\n if (typeof reference === 'string') {\n return reference.trim();\n }\n\n if (reference.fileName) {\n return reference;\n }\n\n return reference.id?.trim() || reference;\n });\n\n if (!references.length) {\n return null;\n }\n\n return references.length === 1 ? references[0] : references;\n });\n readonly hasAttachments = computed(() =>\n this.shape() === 'compact'\n ? this.attachments().length > 0\n : this.uploadValue() != null,\n );\n readonly isMultiple = computed(() => this.attachmentReferences().length > 1);\n\n protected readonly empty = '-';\n\n constructor() {\n effect((onCleanup) => {\n if (this.shape() !== 'compact') {\n this.loading.set(false);\n this.attachments.set([]);\n return;\n }\n\n const references = this.attachmentReferences();\n\n if (!references.length) {\n this.loading.set(false);\n this.attachments.set([]);\n return;\n }\n\n const shouldFetchMetadata = references.some((reference) =>\n this.requiresMetadataRequest(reference),\n );\n\n if (!shouldFetchMetadata) {\n this.attachments.set(\n references.filter(this.isAttachmentItemValue).map((reference) => ({\n ...reference,\n name:\n reference.name ??\n reference.fileName ??\n reference.id ??\n reference.name,\n extension: this.resolveExtension(reference),\n })),\n );\n this.loading.set(false);\n return;\n }\n\n this.loading.set(true);\n\n const sub = forkJoin(\n references.map((reference) => this.resolveAttachment$(reference)),\n )\n .pipe(finalize(() => this.loading.set(false)))\n .subscribe((attachments) => {\n this.attachments.set(\n attachments.filter(\n (attachment): attachment is EntityAttachmentItemValue =>\n attachment != null,\n ),\n );\n });\n\n onCleanup(() => sub.unsubscribe());\n });\n }\n\n attachmentTrackBy(\n index: number,\n attachment: EntityAttachmentItemValue,\n ): string {\n return (\n attachment.id ?? attachment.fileName ?? attachment.name ?? String(index)\n );\n }\n\n attachmentTooltip(attachment: EntityAttachmentItemValue): string {\n return (\n attachment.name ?? attachment.fileName ?? attachment.id ?? 'Attachment'\n );\n }\n\n attachmentIcon(attachment: EntityAttachmentItemValue): MTIcon {\n const extension = this.resolveExtension(attachment);\n const contentType = attachment.contentType?.toLowerCase() ?? '';\n\n if (contentType.startsWith('image/')) {\n return 'image.image-03';\n }\n\n switch (extension) {\n case '.pdf':\n return 'file.file-06';\n case '.doc':\n case '.docx':\n case '.txt':\n case '.rtf':\n return 'file.file-04';\n case '.xls':\n case '.xlsx':\n case '.csv':\n return 'file.file-03';\n case '.ppt':\n case '.pptx':\n return 'file.file-05';\n default:\n return 'file.clipboard-attachment';\n }\n }\n\n onCompactAttachmentClick(\n event: MouseEvent,\n attachment: EntityAttachmentItemValue,\n ): void {\n event.stopPropagation();\n this.downloadAttachment(attachment);\n }\n\n downloadAttachment(attachment: EntityAttachmentItemValue): void {\n const resolvedAttachment$ = this.requiresMetadataRequest(attachment)\n ? this.resolveAttachment$(attachment)\n : of(this.normalizeAttachmentItem(attachment));\n\n resolvedAttachment$\n .pipe(\n take(1),\n switchMap((resolvedAttachment) => {\n if (!resolvedAttachment?.fileName) {\n return EMPTY;\n }\n\n return this.httpClient\n .get(`${this.endPoint()}/${resolvedAttachment.fileName}`, {\n responseType: 'blob',\n context: this.context(),\n })\n .pipe(\n take(1),\n map((blob) => ({\n attachment: resolvedAttachment,\n blob,\n })),\n );\n }),\n )\n .subscribe(({ attachment, blob }) => {\n const downloadBlob = new Blob([blob], {\n type:\n attachment.contentType || blob.type || 'application/octet-stream',\n });\n const objectUrl = window.URL.createObjectURL(downloadBlob);\n const anchor = document.createElement('a');\n\n anchor.href = objectUrl;\n anchor.download =\n attachment.name ??\n attachment.fileName ??\n attachment.id ??\n 'attachment';\n anchor.click();\n\n window.URL.revokeObjectURL(objectUrl);\n });\n }\n\n private resolveAttachment$(reference: AttachmentReference) {\n const normalizedAttachment = this.normalizeAttachmentItem(reference);\n\n if (!this.requiresMetadataRequest(reference)) {\n return of(normalizedAttachment);\n }\n\n const attachmentId =\n typeof reference === 'string' ? reference.trim() : reference.id?.trim();\n\n if (!attachmentId) {\n return of(normalizedAttachment);\n }\n\n return this.httpClient\n .get<AttachmentMetadataResponse>(\n `${this.endPoint()}/${attachmentId}/metaData`,\n {\n context: this.context(),\n },\n )\n .pipe(\n take(1),\n map((response) => this.normalizeAttachmentItem(response.data)),\n catchError(() => of(normalizedAttachment)),\n );\n }\n\n private normalizeAttachmentValue(value: unknown): AttachmentReference[] {\n if (value === null || value === undefined) {\n return [];\n }\n\n if (Array.isArray(value)) {\n return value.flatMap((item) => this.normalizeAttachmentValue(item));\n }\n\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n\n if (!trimmedValue || trimmedValue === '[]') {\n return [];\n }\n\n if (\n (trimmedValue.startsWith('[') && trimmedValue.endsWith(']')) ||\n (trimmedValue.startsWith('{') && trimmedValue.endsWith('}'))\n ) {\n try {\n return this.normalizeAttachmentValue(JSON.parse(trimmedValue));\n } catch {\n return [trimmedValue];\n }\n }\n\n return [trimmedValue];\n }\n\n if (typeof value === 'object') {\n return [value as EntityAttachmentItemValue];\n }\n\n return [];\n }\n\n private normalizeAttachmentItem(\n value: AttachmentReference | null | undefined,\n ): EntityAttachmentItemValue | null {\n if (!value) {\n return null;\n }\n\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n\n return trimmedValue\n ? {\n id: trimmedValue,\n name: trimmedValue,\n }\n : null;\n }\n\n const normalizedAttachment: EntityAttachmentItemValue = {\n ...value,\n name: value.name ?? value.fileName ?? value.id ?? '',\n extension: this.resolveExtension(value),\n };\n\n return normalizedAttachment.name ||\n normalizedAttachment.fileName ||\n normalizedAttachment.id\n ? normalizedAttachment\n : null;\n }\n\n private requiresMetadataRequest(reference: AttachmentReference): boolean {\n if (typeof reference === 'string') {\n return reference.trim().length > 0;\n }\n\n return !!reference.id?.trim() && !reference.fileName;\n }\n\n private isAttachmentItemValue(\n reference: AttachmentReference,\n ): reference is EntityAttachmentItemValue {\n return typeof reference === 'object' && reference != null;\n }\n\n private resolveExtension(\n value: EntityAttachmentItemValue,\n ): string | undefined {\n const explicitExtension = value.extension?.trim();\n\n if (explicitExtension) {\n return explicitExtension.startsWith('.')\n ? explicitExtension.toLowerCase()\n : `.${explicitExtension.toLowerCase()}`;\n }\n\n const fileName = value.fileName ?? value.name;\n if (!fileName || !fileName.includes('.')) {\n return undefined;\n }\n\n return `.${fileName.split('.').pop()!.toLowerCase()}`;\n }\n}\n","<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"relaxed\"\n>\n @if (hasAttachments()) {\n @if (shape() === \"compact\") {\n <div class=\"flex flex-wrap items-center gap-2\">\n @for (\n attachment of attachments();\n track attachmentTrackBy($index, attachment)\n ) {\n <mt-button\n iconPos=\"top\"\n size=\"small\"\n severity=\"secondary\"\n variant=\"outlined\"\n [icon]=\"attachmentIcon(attachment)\"\n [tooltip]=\"attachmentTooltip(attachment)\"\n styleClass=\"h-9! w-9! rounded-lg!\"\n (onClick)=\"onCompactAttachmentClick($event, attachment)\"\n />\n }\n </div>\n } @else {\n <mt-upload-field\n class=\"w-full\"\n [ngModel]=\"uploadValue()\"\n [ngModelOptions]=\"{ standalone: true }\"\n [shape]=\"'card'\"\n [multiple]=\"isMultiple()\"\n [readonly]=\"true\"\n [endPoint]=\"endPoint()\"\n [context]=\"context()\"\n />\n }\n } @else {\n <span class=\"text-sm font-semibold\">{{ empty }}</span>\n }\n</mt-entity-field>\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n input,\r\n} from '@angular/core';\r\nimport { EntityData, EntityViewType } from '../entity.model';\r\nimport { EntityText } from '../entity-text/entity-text';\r\nimport { EntityLongText } from '../entity-long-text/entity-long-text';\r\nimport { EntityDate } from '../entity-date/entity-date';\r\nimport { EntityUser } from '../entity-user/entity-user';\r\nimport { EntityPercentage } from '../entity-percentage/entity-percentage';\r\nimport { EntityCurrency } from '../entity-currency/entity-currency';\r\nimport { EntityCheckbox } from '../entity-checkbox/entity-checkbox';\r\nimport { EntityLookup } from '../entity-lookup/entity-lookup';\r\nimport { EntityAttachment } from '../entity-attachment/entity-attachment';\r\nimport { EntityStatus } from '../entity-status/entity-status';\r\n\r\n@Component({\r\n selector: 'mt-entity-preview',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n EntityText,\r\n EntityLongText,\r\n EntityDate,\r\n EntityUser,\r\n EntityPercentage,\r\n EntityCurrency,\r\n EntityCheckbox,\r\n EntityLookup,\r\n EntityAttachment,\r\n EntityStatus,\r\n ],\r\n templateUrl: './entity-preview.html',\r\n host: {\r\n class: 'w-full',\r\n },\r\n})\r\nexport class EntityPreview {\r\n /** Single entity data to display */\r\n readonly data = input.required<EntityData>();\r\n readonly attachmentShape = input<'default' | 'compact'>('default');\r\n readonly previewType = computed<Exclude<EntityViewType, 'LookupMatrix'>>(\r\n () => {\r\n const viewType = this.data().viewType;\r\n return viewType === 'LookupMatrix' ? 'Lookup' : viewType;\r\n },\r\n );\r\n}\r\n","@switch (previewType()) {\r\n @case (\"Text\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"LongText\") {\r\n <mt-entity-long-text [data]=\"data()\" />\r\n }\r\n @case (\"Date\") {\r\n <mt-entity-date [data]=\"data()\" />\r\n }\r\n @case (\"DateTime\") {\r\n <mt-entity-date [data]=\"data()\" />\r\n }\r\n @case (\"User\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-entity-percentage [data]=\"data()\" />\r\n }\r\n @case (\"Currency\") {\r\n <mt-entity-currency [data]=\"data()\" />\r\n }\r\n @case (\"Checkbox\") {\r\n <mt-entity-checkbox [data]=\"data()\" />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-entity-lookup [data]=\"data()\" />\r\n }\r\n @case (\"Status\") {\r\n <mt-entity-status [data]=\"data()\" />\r\n }\r\n @case (\"Attachment\") {\r\n <mt-entity-attachment [data]=\"data()\" [shape]=\"attachmentShape()\" />\r\n }\r\n @default {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n}\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { EntityData, EntitySize } from '../entity.model';\r\nimport { EntityPreview } from '../entity-preview/entity-preview';\r\n\r\n@Component({\r\n selector: 'mt-entities-preview',\r\n standalone: true,\r\n imports: [EntityPreview],\r\n templateUrl: './entities-preview.html',\r\n})\r\nexport class EntitiesPreview {\r\n /** Array of entity data to display */\r\n readonly entities = input.required<EntityData[]>();\r\n readonly attachmentShape = input<'default' | 'compact'>('default');\r\n\r\n /** Entities sorted by order */\r\n readonly sortedEntities = computed(() =>\r\n [...this.entities()].sort((a, b) => (a.order ?? 0) - (b.order ?? 0)),\r\n );\r\n\r\n /** Returns the grid-column span for a given entity size (1-24) */\r\n getColSpan(entity: EntityData): string {\r\n const size: EntitySize = entity.configuration?.size ?? 8;\r\n return `span ${size}`;\r\n }\r\n}\r\n","<div class=\"grid grid-cols-24 gap-x-3 gap-y-5\">\r\n @for (entity of sortedEntities(); track $index) {\r\n <div\r\n class=\"min-w-0 flex items-center p-3\"\r\n [class.border]=\"entity.configuration?.showBorder\"\r\n [class.border-dashed]=\"entity.configuration?.showBorder\"\r\n [class.border-gray-200]=\"entity.configuration?.showBorder\"\r\n [class.rounded-lg]=\"entity.configuration?.showBorder\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n >\r\n <mt-entity-preview\r\n [data]=\"entity\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n","import {\r\n Directive,\r\n ElementRef,\r\n inject,\r\n NgZone,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { EntityData, EntityResizeEvent, EntitySize } from '../entity.model';\r\n\r\n/**\r\n * Base class that encapsulates all entity resize-via-drag logic.\r\n *\r\n * Extend this directive in any component that needs column-resize behaviour\r\n * on a 24-column CSS grid. The subclass must:\r\n * - Provide a `model.required<EntityData[]>()` (or equivalent) for the\r\n * entity list so `updateEntitySize()` can be called after resize.\r\n * - Contain a `.grid` element (or override `getGridElement()`).\r\n *\r\n * Resize flow:\r\n * 1. `onResizeStart(event, entity)` — called from a mousedown on the handle\r\n * 2. mousemove → snaps to nearest column, updates `resizePreviewSize`\r\n * 3. mouseup → emits `entityResized` with previous & new size\r\n */\r\n@Directive()\r\nexport abstract class EntitiesResizeBase {\r\n protected readonly elRef = inject(ElementRef);\r\n protected readonly zone = inject(NgZone);\r\n protected readonly doc = inject(DOCUMENT);\r\n\r\n /** Emits when an entity is resized via the drag handle */\r\n readonly entityResized = output<EntityResizeEvent>();\r\n\r\n // ── Resize state ──\r\n\r\n /** The entity currently being resized (null when idle) */\r\n readonly resizingEntity = signal<EntityData | null>(null);\r\n\r\n /** Live preview size while dragging */\r\n readonly resizePreviewSize = signal<EntitySize | null>(null);\r\n\r\n /** Bound listeners kept for cleanup */\r\n private _onMouseMove: ((e: MouseEvent) => void) | null = null;\r\n private _onMouseUp: ((e: MouseEvent) => void) | null = null;\r\n\r\n // ── Public API ──\r\n\r\n /**\r\n * Returns the grid element used to compute column widths.\r\n * Override if the grid selector differs.\r\n */\r\n protected getGridElement(): HTMLElement | null {\r\n return this.elRef.nativeElement.querySelector('.grid');\r\n }\r\n\r\n /**\r\n * Returns the grid-column span string for a given entity.\r\n * While resizing the active entity, returns the preview size.\r\n */\r\n getResizeColSpan(entity: EntityData): string {\r\n if (this.resizingEntity() === entity && this.resizePreviewSize() !== null) {\r\n return `span ${this.resizePreviewSize()}`;\r\n }\r\n const size: EntitySize = entity.configuration?.size ?? 8;\r\n return `span ${size}`;\r\n }\r\n\r\n /** Starts a resize operation from the right-edge handle */\r\n onResizeStart(event: MouseEvent, entity: EntityData): void {\r\n // Prevent the drag-drop from starting\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n const gridEl = this.getGridElement();\r\n if (!gridEl) return;\r\n\r\n const gridRect = gridEl.getBoundingClientRect();\r\n const gridWidth = gridRect.width;\r\n const columnWidth = gridWidth / 24;\r\n\r\n const previousSize: EntitySize = entity.configuration?.size ?? 8;\r\n\r\n // Left edge of the entity cell\r\n const cellEl = (event.target as HTMLElement).closest(\r\n '.entity-cell',\r\n ) as HTMLElement | null;\r\n if (!cellEl) return;\r\n const cellRect = cellEl.getBoundingClientRect();\r\n const isRtl =\r\n this.doc.documentElement.getAttribute('dir') === 'rtl' ||\r\n getComputedStyle(this.doc.documentElement).direction === 'rtl';\r\n\r\n this.resizingEntity.set(entity);\r\n this.resizePreviewSize.set(previousSize);\r\n\r\n // Run mouse listeners outside Angular zone for performance\r\n this.zone.runOutsideAngular(() => {\r\n this._onMouseMove = (e: MouseEvent) => {\r\n // In RTL the logical end is the left edge; dragging left widens the cell\r\n const rawWidth = isRtl\r\n ? cellRect.right - e.clientX\r\n : e.clientX - cellRect.left;\r\n // Snap to nearest full column (min 1, max 12)\r\n let cols = Math.round(rawWidth / columnWidth);\r\n cols = Math.max(1, Math.min(24, cols)) as EntitySize;\r\n const current = this.resizePreviewSize();\r\n if (current !== cols) {\r\n this.zone.run(() => this.resizePreviewSize.set(cols as EntitySize));\r\n }\r\n };\r\n\r\n this._onMouseUp = () => {\r\n this._cleanupListeners();\r\n\r\n const newSize = this.resizePreviewSize() as EntitySize;\r\n this.resizingEntity.set(null);\r\n this.resizePreviewSize.set(null);\r\n\r\n if (newSize !== previousSize) {\r\n this.zone.run(() => {\r\n this.onResizeComplete(entity, previousSize, newSize);\r\n });\r\n }\r\n };\r\n\r\n this.doc.addEventListener('mousemove', this._onMouseMove);\r\n this.doc.addEventListener('mouseup', this._onMouseUp, { once: true });\r\n });\r\n }\r\n\r\n /**\r\n * Called when a resize operation completes with a changed size.\r\n * Subclasses should update the entity list and emit events here.\r\n */\r\n protected abstract onResizeComplete(\r\n entity: EntityData,\r\n previousSize: EntitySize,\r\n newSize: EntitySize,\r\n ): void;\r\n\r\n /** Removes global mouse listeners */\r\n private _cleanupListeners(): void {\r\n if (this._onMouseMove) {\r\n this.doc.removeEventListener('mousemove', this._onMouseMove);\r\n this._onMouseMove = null;\r\n }\r\n if (this._onMouseUp) {\r\n this.doc.removeEventListener('mouseup', this._onMouseUp);\r\n this._onMouseUp = null;\r\n }\r\n }\r\n}\r\n","import { Component, computed, model, output } from '@angular/core';\r\nimport {\r\n CdkDrag,\r\n CdkDragDrop,\r\n CdkDragPlaceholder,\r\n CdkDropList,\r\n} from '@angular/cdk/drag-drop';\r\nimport { EntityData, EntitySize } from '../entity.model';\r\nimport { EntityPreview } from '../entity-preview/entity-preview';\r\nimport { EntitiesResizeBase } from './entities-resize-base';\r\n\r\n@Component({\r\n selector: 'mt-entities-manage',\r\n standalone: true,\r\n imports: [EntityPreview, CdkDrag, CdkDropList, CdkDragPlaceholder],\r\n templateUrl: './entities-manage.html',\r\n styleUrl: './entities-manage.scss',\r\n})\r\nexport class EntitiesManage extends EntitiesResizeBase {\r\n /** Array of entity data – supports two-way binding to keep order in sync */\r\n readonly entities = model.required<EntityData[]>();\r\n\r\n /** Emits the reordered entities array after each drag-drop */\r\n readonly entitiesReordered = output<EntityData[]>();\r\n\r\n /** Entities sorted by their order field */\r\n readonly sortedEntities = computed(() =>\r\n [...this.entities()].sort((a, b) => (a.order ?? 0) - (b.order ?? 0)),\r\n );\r\n\r\n /** Returns the grid-column span for a given entity size (1-24) */\r\n getColSpan(entity: EntityData): string {\r\n return this.getResizeColSpan(entity);\r\n }\r\n\r\n /** Handle drag-drop reorder */\r\n onDrop(event: CdkDragDrop<EntityData[]>): void {\r\n if (event.previousIndex === event.currentIndex) return;\r\n\r\n const items = [...this.sortedEntities()];\r\n const [moved] = items.splice(event.previousIndex, 1);\r\n items.splice(event.currentIndex, 0, moved);\r\n\r\n // Reassign order based on new positions\r\n const reordered = items.map((item, index) => ({\r\n ...item,\r\n order: index + 1,\r\n }));\r\n\r\n // Update the model (two-way binding)\r\n this.entities.set(reordered);\r\n\r\n // Emit the reordered list\r\n this.entitiesReordered.emit(reordered);\r\n }\r\n\r\n // ── Resize completion (from EntitiesResizeBase) ──\r\n\r\n protected override onResizeComplete(\r\n entity: EntityData,\r\n previousSize: EntitySize,\r\n newSize: EntitySize,\r\n ): void {\r\n // Update entity in the list\r\n const updated = this.entities().map((e) =>\r\n e === entity\r\n ? {\r\n ...e,\r\n configuration: {\r\n ...e.configuration,\r\n size: newSize,\r\n },\r\n }\r\n : e,\r\n );\r\n this.entities.set(updated);\r\n\r\n this.entityResized.emit({\r\n entity: {\r\n ...entity,\r\n configuration: { ...entity.configuration, size: newSize },\r\n },\r\n previousSize,\r\n newSize,\r\n });\r\n }\r\n}\r\n","<div\r\n cdkDropList\r\n cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"sortedEntities()\"\r\n (cdkDropListDropped)=\"onDrop($event)\"\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-6\"\r\n>\r\n @for (entity of sortedEntities(); track entity.order) {\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell group relative min-w-0 flex items-center p-3 cursor-grab active:cursor-grabbing\"\r\n [class.border]=\"entity.configuration?.showBorder\"\r\n [class.border-dashed]=\"entity.configuration?.showBorder\"\r\n [class.border-gray-200]=\"entity.configuration?.showBorder\"\r\n [class.rounded-lg]=\"entity.configuration?.showBorder\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n >\r\n <!-- Drag placeholder -->\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-12 bg-black/10 rounded-xl\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n ></div>\r\n\r\n <mt-entity-preview [data]=\"entity\" class=\"flex-1 min-w-0\" />\r\n\r\n <!-- Resize handle (right edge) -->\r\n <div class=\"resize-handle\" (mousedown)=\"onResizeStart($event, entity)\">\r\n <div class=\"resize-handle-bar\"></div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEO,MAAM,8BAA8B,GAAG,GAAG;AAE3C,SAAU,cAAc,CAAC,KAAc,EAAA;IAC3C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AACzC,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;IAClC;AAEA,IAAA,OAAO,KAAK;AACd;AAEM,SAAU,oBAAoB,CAAC,KAAc,EAAA;AACjD,IAAA,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;AACzB,QAAA,OAAO,8BAA8B;IACvC;AAEA,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC;AACtB;AAEM,SAAU,mBAAmB,CACjC,aAA0C,EAAA;IAE1C,MAAM,MAAM,GAAG,aAMF;IAEb,OAAO,MAAM,EAAE,SAAS,IAAI,MAAM,EAAE,QAAQ,IAAI,KAAK;AACvD;AAEM,SAAU,0BAA0B,CACx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A,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,WAAW,EAAA,QAAA,EAAA,8BAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,EAAA,iBAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,4BAAA,EAAA,2BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,2BAAA,EAAA,6BAAA,EAAA,sBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,iCAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAItD,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,CAAC,EAAA,QAAA,EAAA,m0CAAA,EAAA,MAAA,EAAA,CAAA,+5BAAA,CAAA,EAAA;;;AEdpE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-components-entities.mjs","sources":["../../../../packages/masterteam/components/entities/entity-display.utils.ts","../../../../packages/masterteam/components/entities/entity-field/entity-field.ts","../../../../packages/masterteam/components/entities/entity-text/entity-text.ts","../../../../packages/masterteam/components/entities/entity-text/entity-text.html","../../../../packages/masterteam/components/entities/entity-date/entity-date.ts","../../../../packages/masterteam/components/entities/entity-date/entity-date.html","../../../../packages/masterteam/components/entities/entity-status/entity-status.ts","../../../../packages/masterteam/components/entities/entity-status/entity-status.html","../../../../packages/masterteam/components/entities/entity-user/entity-user.ts","../../../../packages/masterteam/components/entities/entity-user/entity-user.html","../../../../packages/masterteam/components/entities/entity-percentage/entity-percentage.ts","../../../../packages/masterteam/components/entities/entity-percentage/entity-percentage.html","../../../../packages/masterteam/components/entities/entity-currency/entity-currency.ts","../../../../packages/masterteam/components/entities/entity-currency/entity-currency.html","../../../../packages/masterteam/components/entities/entity-checkbox/entity-checkbox.ts","../../../../packages/masterteam/components/entities/entity-checkbox/entity-checkbox.html","../../../../packages/masterteam/components/entities/entity-long-text/entity-long-text.ts","../../../../packages/masterteam/components/entities/entity-long-text/entity-long-text.html","../../../../packages/masterteam/components/entities/entity-lookup/entity-lookup.ts","../../../../packages/masterteam/components/entities/entity-lookup/entity-lookup.html","../../../../packages/masterteam/components/entities/entity-attachment/entity-attachment.ts","../../../../packages/masterteam/components/entities/entity-attachment/entity-attachment.html","../../../../packages/masterteam/components/entities/entity-preview/entity-preview.ts","../../../../packages/masterteam/components/entities/entity-preview/entity-preview.html","../../../../packages/masterteam/components/entities/entities-preview/entities-preview.ts","../../../../packages/masterteam/components/entities/entities-preview/entities-preview.html","../../../../packages/masterteam/components/entities/entities-manage/entities-resize-base.ts","../../../../packages/masterteam/components/entities/entities-manage/entities-manage.ts","../../../../packages/masterteam/components/entities/entities-manage/entities-manage.html","../../../../packages/masterteam/components/entities/masterteam-components-entities.ts"],"sourcesContent":["import { EntityConfiguration, EntityLabelPosition } from './entity.model';\r\n\r\nexport const ENTITY_EMPTY_VALUE_PLACEHOLDER = '_';\r\n\r\nexport function isValueMissing(value: unknown): boolean {\r\n if (value === null || value === undefined) {\r\n return true;\r\n }\r\n\r\n if (typeof value === 'string') {\r\n return value.trim().length === 0;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport function displayOrPlaceholder(value: unknown): string {\r\n if (isValueMissing(value)) {\r\n return ENTITY_EMPTY_VALUE_PLACEHOLDER;\r\n }\r\n\r\n return String(value);\r\n}\r\n\r\nexport function isEntityLabelHidden(\r\n configuration?: EntityConfiguration | null,\r\n): boolean {\r\n const config = configuration as\r\n | {\r\n hideLabel?: boolean;\r\n hideName?: boolean;\r\n }\r\n | null\r\n | undefined;\r\n\r\n return config?.hideLabel ?? config?.hideName ?? false;\r\n}\r\n\r\nexport function resolveEntityLabelPosition(\r\n configuration?: EntityConfiguration | null,\r\n): EntityLabelPosition {\r\n const config = configuration as\r\n | {\r\n labelPosition?: EntityLabelPosition;\r\n labelPostion?: EntityLabelPosition;\r\n }\r\n | null\r\n | undefined;\r\n\r\n return config?.labelPosition ?? config?.labelPostion ?? 'bottom';\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n input,\r\n} from '@angular/core';\r\nimport { TruncateTooltip } from '@masterteam/components/tooltip';\r\nimport {\r\n isEntityLabelHidden,\r\n resolveEntityLabelPosition,\r\n} from '../entity-display.utils';\r\nimport { EntityConfiguration } from '../entity.model';\r\n\r\ntype EntityFieldGap = 'compact' | 'normal' | 'relaxed';\r\n\r\n@Component({\r\n selector: 'mt-entity-field',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [TruncateTooltip],\r\n template: `\r\n <div [class]=\"containerClass()\">\r\n <ng-content />\r\n @if (!hideLabel()) {\r\n <span\r\n class=\"block min-w-0 truncate text-sm text-gray-500\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >\r\n {{ label() }}\r\n </span>\r\n }\r\n </div>\r\n `,\r\n host: {\r\n class: 'block min-w-0 w-full',\r\n },\r\n})\r\nexport class EntityField {\r\n readonly label = input<string>('');\r\n readonly configuration = input<EntityConfiguration | null | undefined>();\r\n readonly gap = input<EntityFieldGap>('compact');\r\n\r\n readonly hideLabel = computed(() =>\r\n isEntityLabelHidden(this.configuration()),\r\n );\r\n\r\n readonly labelPosition = computed(() =>\r\n resolveEntityLabelPosition(this.configuration()),\r\n );\r\n\r\n readonly containerClass = computed(() => {\r\n const gapClass =\r\n this.gap() === 'relaxed'\r\n ? 'gap-2'\r\n : this.gap() === 'normal'\r\n ? 'gap-1'\r\n : 'gap-0.5';\r\n\r\n const directionClass =\r\n this.labelPosition() === 'top' ? 'flex-col-reverse' : 'flex-col';\r\n\r\n return `flex min-w-0 ${directionClass} ${gapClass}`;\r\n });\r\n}\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { TruncateTooltip } from '@masterteam/components/tooltip';\r\nimport { displayOrPlaceholder } from '../entity-display.utils';\r\nimport { EntityField } from '../entity-field/entity-field';\r\nimport { EntityData } from '../entity.model';\r\n\r\n@Component({\r\n selector: 'mt-entity-text',\r\n standalone: true,\r\n imports: [EntityField, TruncateTooltip],\r\n templateUrl: './entity-text.html',\r\n})\r\nexport class EntityText {\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Individual inputs (used when data is not provided) */\r\n readonly name = input<string>();\r\n readonly value = input<string>();\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n readonly displayValue = computed(() => {\r\n const d = this.data();\r\n if (d) {\r\n return displayOrPlaceholder(typeof d.value === 'string' ? d.value : null);\r\n }\r\n return displayOrPlaceholder(this.value());\r\n });\r\n}\r\n","<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n>\r\n <div\r\n class=\"min-w-0 truncate text-sm font-semibold\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n [innerHTML]=\"displayValue()\"\r\n ></div>\r\n</mt-entity-field>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { TruncateTooltip } from '@masterteam/components/tooltip';\r\nimport { displayOrPlaceholder } from '../entity-display.utils';\r\nimport { EntityField } from '../entity-field/entity-field';\r\nimport { EntityData } from '../entity.model';\r\n\r\n@Component({\r\n selector: 'mt-entity-date',\r\n standalone: true,\r\n imports: [EntityField, TruncateTooltip],\r\n templateUrl: './entity-date.html',\r\n})\r\nexport class EntityDate {\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Individual inputs (used when data is not provided) */\r\n readonly name = input<string>();\r\n readonly value = input<string>();\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n readonly displayValue = computed(() => {\r\n const d = this.data();\r\n if (d) {\r\n return displayOrPlaceholder(typeof d.value === 'string' ? d.value : null);\r\n }\r\n return displayOrPlaceholder(this.value());\r\n });\r\n}\r\n","<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n>\r\n <span\r\n class=\"block min-w-0 truncate text-sm font-semibold\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >\r\n {{ displayValue() }}\r\n </span>\r\n</mt-entity-field>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport {\r\n displayOrPlaceholder,\r\n ENTITY_EMPTY_VALUE_PLACEHOLDER,\r\n} from '../entity-display.utils';\r\nimport { EntityField } from '../entity-field/entity-field';\r\nimport { EntityData, EntityStatusValue } from '../entity.model';\r\n\r\n@Component({\r\n selector: 'mt-entity-status',\r\n standalone: true,\r\n imports: [EntityField],\r\n templateUrl: './entity-status.html',\r\n})\r\nexport class EntityStatus {\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Individual inputs (used when data is not provided) */\r\n readonly name = input<string>();\r\n readonly value = input<EntityStatusValue>();\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n\r\n readonly statusValue = computed<EntityStatusValue | null>(() => {\r\n const d = this.data();\r\n if (d && typeof d.value === 'object' && d.value !== null) {\r\n return d.value as EntityStatusValue;\r\n }\r\n return this.value() ?? null;\r\n });\r\n\r\n readonly badgeStyle = computed(() => {\r\n const status = this.statusValue();\r\n if (!status?.color) return {};\r\n return {\r\n color: status.color,\r\n backgroundColor: this.hexToRgba(status.color, 0.12),\r\n };\r\n });\r\n\r\n readonly emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;\r\n\r\n readonly statusLabel = computed(() =>\r\n displayOrPlaceholder(this.statusValue()?.display),\r\n );\r\n\r\n private hexToRgba(hex: string, alpha: number): string {\r\n const r = parseInt(hex.slice(1, 3), 16);\r\n const g = parseInt(hex.slice(3, 5), 16);\r\n const b = parseInt(hex.slice(5, 7), 16);\r\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\r\n }\r\n}\r\n","<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (statusValue(); as status) {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit\"\r\n [style]=\"badgeStyle()\"\r\n >\r\n {{ statusLabel() }}\r\n </span>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { HttpContext } from '@angular/common/http';\r\nimport { Avatar } from '@masterteam/components/avatar';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { EntityData, EntityUserConfig, EntityUserValue } from '../entity.model';\r\nimport { SecureImagePipe } from '@masterteam/components/upload-field';\r\nimport { displayOrPlaceholder } from '../entity-display.utils';\r\nimport { REQUEST_CONTEXT } from '@masterteam/components';\r\n\r\n@Component({\r\n selector: 'mt-entity-user',\r\n standalone: true,\r\n imports: [Avatar, Button, SecureImagePipe],\r\n templateUrl: './entity-user.html',\r\n})\r\nexport class EntityUser {\r\n readonly httpContext = new HttpContext().set(REQUEST_CONTEXT, {\r\n useBaseUrl: true,\r\n });\r\n\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Resolved user value object from data().value */\r\n private readonly userValue = computed(() => {\r\n const val = this.data()?.value;\r\n if (val && typeof val === 'object' && 'displayName' in val) {\r\n return val as EntityUserValue;\r\n }\r\n return null;\r\n });\r\n\r\n readonly rawUserName = computed(() => this.userValue()?.displayName ?? null);\r\n\r\n readonly userName = computed(() => displayOrPlaceholder(this.rawUserName()));\r\n\r\n readonly userPhoto = computed(() => this.userValue()?.photoUrl ?? '');\r\n\r\n readonly labelText = computed(() => this.userValue()?.name ?? '');\r\n\r\n // ── Configuration-driven visibility ──\r\n\r\n private readonly config = computed(\r\n () => (this.data()?.configuration as EntityUserConfig) ?? {},\r\n );\r\n\r\n readonly showDisplayName = computed(\r\n () => this.config().showDisplayName ?? true,\r\n );\r\n\r\n readonly showPhoneNumber = computed(\r\n () => this.config().showPhoneNumber ?? false,\r\n );\r\n\r\n readonly showEmail = computed(() => this.config().showEmail ?? false);\r\n\r\n readonly phoneNumber = computed(() => this.userValue()?.phoneNumber ?? '');\r\n\r\n readonly email = computed(() => this.userValue()?.email ?? '');\r\n\r\n readonly hasContactInfo = computed(\r\n () =>\r\n (this.showPhoneNumber() && !!this.phoneNumber()) ||\r\n (this.showEmail() && !!this.email()),\r\n );\r\n}\r\n","<div class=\"flex items-center gap-2\">\r\n <mt-avatar\r\n [image]=\"\r\n userPhoto()\r\n ? (userPhoto() | secureImage: true : httpContext : 'avatar/')\r\n : ''\r\n \"\r\n [icon]=\"'user.user-01'\"\r\n styleClass=\"w-10! h-10! text-white! text-xl! bg-primary-500!\"\r\n ></mt-avatar>\r\n\r\n @if (showDisplayName()) {\r\n <div class=\"flex flex-col min-w-0 flex-1\">\r\n <span class=\"text-sm text-gray-700 truncate\">{{ userName() }}</span>\r\n @if (labelText()) {\r\n <span class=\"text-xs text-gray-500 truncate\">{{ labelText() }}</span>\r\n }\r\n </div>\r\n }\r\n\r\n @if (hasContactInfo()) {\r\n <div class=\"flex items-center gap-1 ms-auto shrink-0\">\r\n @if (showPhoneNumber() && phoneNumber()) {\r\n <a [href]=\"'tel:' + phoneNumber()\" [title]=\"phoneNumber()\">\r\n <mt-button\r\n icon=\"communication.phone\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"phoneNumber()\"\r\n />\r\n </a>\r\n }\r\n @if (showEmail() && email()) {\r\n <a [href]=\"'mailto:' + email()\" [title]=\"email()\">\r\n <mt-button\r\n icon=\"communication.mail-01\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"email()\"\r\n />\r\n </a>\r\n }\r\n </div>\r\n }\r\n</div>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { Progress } from '@masterteam/components/progress';\r\nimport {\r\n displayOrPlaceholder,\r\n isEntityLabelHidden,\r\n isValueMissing,\r\n} from '../entity-display.utils';\r\nimport { EntityData, EntityPercentageConfig } from '../entity.model';\r\n\r\n@Component({\r\n selector: 'mt-entity-percentage',\r\n standalone: true,\r\n imports: [Progress],\r\n templateUrl: './entity-percentage.html',\r\n})\r\nexport class EntityPercentage {\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Individual inputs (used when data is not provided) */\r\n readonly name = input<string>();\r\n readonly value = input<string>();\r\n readonly rawValue = input<string>();\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n\r\n readonly displayValue = computed(() => {\r\n const d = this.data();\r\n if (d) {\r\n return displayOrPlaceholder(typeof d.value === 'string' ? d.value : null);\r\n }\r\n return displayOrPlaceholder(this.value());\r\n });\r\n\r\n private readonly rawNumericValue = computed(\r\n () =>\r\n this.data()?.rawValue ??\r\n this.rawValue() ??\r\n this.value() ??\r\n this.displayValue(),\r\n );\r\n\r\n readonly hasNumericValue = computed(() => {\r\n return this.parseNumericValue(this.rawNumericValue()) !== null;\r\n });\r\n\r\n readonly numericValue = computed(() => {\r\n const num = this.parseNumericValue(this.rawNumericValue());\r\n return num === null ? 0 : Math.min(num, 100);\r\n });\r\n\r\n readonly maxValue = computed(() => {\r\n const num = this.parseNumericValue(this.rawNumericValue());\r\n if (num === null) return 100;\r\n return num > 100 ? Math.ceil(num) : 100;\r\n });\r\n\r\n // ── Configuration-driven visibility ──\r\n\r\n readonly hideName = computed(() =>\r\n isEntityLabelHidden(this.data()?.configuration),\r\n );\r\n\r\n readonly progressColor = computed(() => {\r\n const configuration = this.data()?.configuration as\r\n | EntityPercentageConfig\r\n | undefined;\r\n return configuration?.color?.trim() || 'primary';\r\n });\r\n\r\n private parseNumericValue(raw: unknown): number | null {\r\n if (isValueMissing(raw)) {\r\n return null;\r\n }\r\n\r\n const normalizedRawValue = String(raw).replace(/%/g, '').trim();\r\n if (!normalizedRawValue) {\r\n return null;\r\n }\r\n\r\n const numericValue = Number.parseFloat(normalizedRawValue);\r\n return Number.isNaN(numericValue) ? null : numericValue;\r\n }\r\n}\r\n","<div class=\"flex flex-col gap-1\">\r\n <div class=\"flex items-center justify-between\">\r\n @if (!hideName()) {\r\n <span class=\"text-xs font-semibold\">{{ displayName() }}</span>\r\n }\r\n <span class=\"text-xs font-bold\" [class.ms-auto]=\"hideName()\">{{\r\n displayValue()\r\n }}</span>\r\n </div>\r\n @if (hasNumericValue()) {\r\n <mt-progress\r\n [value]=\"numericValue()\"\r\n [showLabel]=\"false\"\r\n [height]=\"9\"\r\n [maxValue]=\"maxValue()\"\r\n [color]=\"progressColor()\"\r\n >\r\n </mt-progress>\r\n } @else {\r\n <div class=\"h-[9px] rounded-full bg-gray-200\"></div>\r\n }\r\n</div>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { TruncateTooltip } from '@masterteam/components/tooltip';\r\nimport { displayOrPlaceholder } from '../entity-display.utils';\r\nimport { EntityField } from '../entity-field/entity-field';\r\nimport { EntityData } from '../entity.model';\r\n\r\n@Component({\r\n selector: 'mt-entity-currency',\r\n standalone: true,\r\n imports: [EntityField, TruncateTooltip],\r\n templateUrl: './entity-currency.html',\r\n})\r\nexport class EntityCurrency {\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Individual inputs (used when data is not provided) */\r\n readonly name = input<string>();\r\n readonly value = input<string>();\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n readonly displayValue = computed(() => {\r\n const d = this.data();\r\n if (d) {\r\n return displayOrPlaceholder(typeof d.value === 'string' ? d.value : null);\r\n }\r\n return displayOrPlaceholder(this.value());\r\n });\r\n}\r\n","<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n>\r\n <span\r\n class=\"block min-w-0 truncate text-sm font-semibold\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >\r\n {{ displayValue() }}\r\n </span>\r\n</mt-entity-field>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport {\r\n ENTITY_EMPTY_VALUE_PLACEHOLDER,\r\n isEntityLabelHidden,\r\n} from '../entity-display.utils';\r\nimport { EntityData } from '../entity.model';\r\n\r\n@Component({\r\n selector: 'mt-entity-checkbox',\r\n standalone: true,\r\n templateUrl: './entity-checkbox.html',\r\n})\r\nexport class EntityCheckbox {\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Individual inputs (used when data is not provided) */\r\n readonly name = input<string>();\r\n readonly value = input<string>();\r\n readonly rawValue = input<string>();\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n readonly emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;\r\n\r\n readonly hideName = computed(() =>\r\n isEntityLabelHidden(this.data()?.configuration),\r\n );\r\n\r\n readonly checkboxState = computed<boolean | null>(() => {\r\n const raw = this.data()?.rawValue ?? this.rawValue();\r\n if (raw !== undefined && raw !== null) {\r\n return this.parseBoolean(raw);\r\n }\r\n\r\n const val = this.data()?.value ?? this.value();\r\n if (typeof val === 'string') {\r\n return this.parseBoolean(val);\r\n }\r\n\r\n return null;\r\n });\r\n\r\n private parseBoolean(value: string): boolean | null {\r\n const normalized = value.trim().toLowerCase();\r\n if (!normalized.length) {\r\n return null;\r\n }\r\n\r\n if (normalized === 'true') {\r\n return true;\r\n }\r\n\r\n if (normalized === 'false') {\r\n return false;\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n","<div class=\"flex items-center gap-2\">\r\n @if (checkboxState() === true) {\r\n <svg class=\"w-5 h-5 text-green-500\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n } @else if (checkboxState() === false) {\r\n <svg class=\"w-5 h-5 text-gray-300\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5.414l-2.293-2.293a1 1 0 011.414-1.414L10 11.172l3.879-3.879a1 1 0 111.414 1.414L10 13.414l-.707-.707-.293-.293z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n } @else {\r\n <span\r\n class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-100 px-1 text-[10px] font-semibold text-gray-500\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n @if (!hideName()) {\r\n <span class=\"text-sm font-semibold\">{{ displayName() }}</span>\r\n }\r\n</div>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport {\r\n ENTITY_EMPTY_VALUE_PLACEHOLDER,\r\n isValueMissing,\r\n} from '../entity-display.utils';\r\nimport { EntityField } from '../entity-field/entity-field';\r\nimport { EntityData } from '../entity.model';\r\n\r\n@Component({\r\n selector: 'mt-entity-long-text',\r\n standalone: true,\r\n imports: [EntityField],\r\n templateUrl: './entity-long-text.html',\r\n})\r\nexport class EntityLongText {\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Individual inputs (used when data is not provided) */\r\n readonly name = input<string>();\r\n readonly value = input<string>();\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n\r\n readonly displayValue = computed(() => {\r\n const d = this.data();\r\n const raw = d\r\n ? typeof d.value === 'string'\r\n ? d.value\r\n : null\r\n : this.value();\r\n\r\n if (isValueMissing(raw)) {\r\n return ENTITY_EMPTY_VALUE_PLACEHOLDER;\r\n }\r\n\r\n return raw as string;\r\n });\r\n}\r\n","<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n>\r\n <div class=\"text-sm font-semibold\" [innerHTML]=\"displayValue()\"></div>\r\n</mt-entity-field>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport {\r\n displayOrPlaceholder,\r\n ENTITY_EMPTY_VALUE_PLACEHOLDER,\r\n} from '../entity-display.utils';\r\nimport { EntityField } from '../entity-field/entity-field';\r\nimport { EntityData, EntityLookupValue } from '../entity.model';\r\n\r\n@Component({\r\n selector: 'mt-entity-lookup',\r\n standalone: true,\r\n imports: [EntityField],\r\n templateUrl: './entity-lookup.html',\r\n})\r\nexport class EntityLookup {\r\n /** Full entity data object */\r\n readonly data = input<EntityData>();\r\n\r\n /** Individual inputs (used when data is not provided) */\r\n readonly name = input<string>();\r\n readonly value = input<EntityLookupValue>();\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n\r\n readonly lookupValue = computed<EntityLookupValue | null>(() => {\r\n const d = this.data();\r\n if (d && typeof d.value === 'object' && d.value !== null) {\r\n return d.value as EntityLookupValue;\r\n }\r\n return this.value() ?? null;\r\n });\r\n\r\n readonly badgeStyle = computed(() => {\r\n const lookup = this.lookupValue();\r\n if (!lookup?.color) return {};\r\n return {\r\n color: lookup.color,\r\n backgroundColor: this.hexToRgba(lookup.color, 0.12),\r\n };\r\n });\r\n\r\n readonly emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;\r\n\r\n readonly lookupLabel = computed(() =>\r\n displayOrPlaceholder(this.lookupValue()?.display),\r\n );\r\n\r\n private hexToRgba(hex: string, alpha: number): string {\r\n const r = parseInt(hex.slice(1, 3), 16);\r\n const g = parseInt(hex.slice(3, 5), 16);\r\n const b = parseInt(hex.slice(5, 7), 16);\r\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\r\n }\r\n}\r\n","<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (lookupValue(); as lookup) {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit\"\r\n [style]=\"badgeStyle()\"\r\n >\r\n {{ lookupLabel() }}\r\n </span>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n","import { HttpClient, HttpContext } from '@angular/common/http';\r\nimport {\r\n Component,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { UploadField } from '@masterteam/components/upload-field';\r\nimport { MTIcon } from '@masterteam/icons';\r\nimport {\r\n EMPTY,\r\n catchError,\r\n finalize,\r\n forkJoin,\r\n map,\r\n of,\r\n switchMap,\r\n take,\r\n} from 'rxjs';\r\n\r\nimport {\r\n EntityAttachmentItemValue,\r\n EntityAttachmentValue,\r\n EntityData,\r\n} from '../entity.model';\r\nimport { EntityField } from '../entity-field/entity-field';\r\n\r\ninterface AttachmentMetadataResponse {\r\n data: EntityAttachmentItemValue;\r\n}\r\n\r\ntype AttachmentReference = EntityAttachmentItemValue | string;\r\n\r\n@Component({\r\n selector: 'mt-entity-attachment',\r\n standalone: true,\r\n imports: [FormsModule, UploadField, Button, EntityField],\r\n templateUrl: './entity-attachment.html',\r\n})\r\nexport class EntityAttachment {\r\n readonly data = input<EntityData>();\r\n readonly name = input<string>();\r\n readonly shape = input<'default' | 'compact'>('default');\r\n readonly value = input<\r\n EntityAttachmentValue | EntityAttachmentItemValue | string | null\r\n >();\r\n readonly endPoint = input<string>('uploader');\r\n readonly context = input<HttpContext | undefined>(undefined);\r\n\r\n private readonly httpClient = inject(HttpClient);\r\n\r\n readonly displayName = computed(() => this.data()?.name ?? this.name() ?? '');\r\n readonly loading = signal(false);\r\n readonly attachments = signal<EntityAttachmentItemValue[]>([]);\r\n readonly attachmentReferences = computed(() =>\r\n this.normalizeAttachmentValue(this.data()?.value ?? this.value()),\r\n );\r\n readonly uploadValue = computed(() => {\r\n const references = this.attachmentReferences().map((reference) => {\r\n if (typeof reference === 'string') {\r\n return reference.trim();\r\n }\r\n\r\n if (reference.fileName) {\r\n return reference;\r\n }\r\n\r\n return reference.id?.trim() || reference;\r\n });\r\n\r\n if (!references.length) {\r\n return null;\r\n }\r\n\r\n return references.length === 1 ? references[0] : references;\r\n });\r\n readonly hasAttachments = computed(() =>\r\n this.shape() === 'compact'\r\n ? this.attachments().length > 0\r\n : this.uploadValue() != null,\r\n );\r\n readonly isMultiple = computed(() => this.attachmentReferences().length > 1);\r\n\r\n protected readonly empty = '-';\r\n\r\n constructor() {\r\n effect((onCleanup) => {\r\n if (this.shape() !== 'compact') {\r\n this.loading.set(false);\r\n this.attachments.set([]);\r\n return;\r\n }\r\n\r\n const references = this.attachmentReferences();\r\n\r\n if (!references.length) {\r\n this.loading.set(false);\r\n this.attachments.set([]);\r\n return;\r\n }\r\n\r\n const shouldFetchMetadata = references.some((reference) =>\r\n this.requiresMetadataRequest(reference),\r\n );\r\n\r\n if (!shouldFetchMetadata) {\r\n this.attachments.set(\r\n references.filter(this.isAttachmentItemValue).map((reference) => ({\r\n ...reference,\r\n name:\r\n reference.name ??\r\n reference.fileName ??\r\n reference.id ??\r\n reference.name,\r\n extension: this.resolveExtension(reference),\r\n })),\r\n );\r\n this.loading.set(false);\r\n return;\r\n }\r\n\r\n this.loading.set(true);\r\n\r\n const sub = forkJoin(\r\n references.map((reference) => this.resolveAttachment$(reference)),\r\n )\r\n .pipe(finalize(() => this.loading.set(false)))\r\n .subscribe((attachments) => {\r\n this.attachments.set(\r\n attachments.filter(\r\n (attachment): attachment is EntityAttachmentItemValue =>\r\n attachment != null,\r\n ),\r\n );\r\n });\r\n\r\n onCleanup(() => sub.unsubscribe());\r\n });\r\n }\r\n\r\n attachmentTrackBy(\r\n index: number,\r\n attachment: EntityAttachmentItemValue,\r\n ): string {\r\n return (\r\n attachment.id ?? attachment.fileName ?? attachment.name ?? String(index)\r\n );\r\n }\r\n\r\n attachmentTooltip(attachment: EntityAttachmentItemValue): string {\r\n return (\r\n attachment.name ?? attachment.fileName ?? attachment.id ?? 'Attachment'\r\n );\r\n }\r\n\r\n attachmentIcon(attachment: EntityAttachmentItemValue): MTIcon {\r\n const extension = this.resolveExtension(attachment);\r\n const contentType = attachment.contentType?.toLowerCase() ?? '';\r\n\r\n if (contentType.startsWith('image/')) {\r\n return 'image.image-03';\r\n }\r\n\r\n switch (extension) {\r\n case '.pdf':\r\n return 'file.file-06';\r\n case '.doc':\r\n case '.docx':\r\n case '.txt':\r\n case '.rtf':\r\n return 'file.file-04';\r\n case '.xls':\r\n case '.xlsx':\r\n case '.csv':\r\n return 'file.file-03';\r\n case '.ppt':\r\n case '.pptx':\r\n return 'file.file-05';\r\n default:\r\n return 'file.clipboard-attachment';\r\n }\r\n }\r\n\r\n onCompactAttachmentClick(\r\n event: MouseEvent,\r\n attachment: EntityAttachmentItemValue,\r\n ): void {\r\n event.stopPropagation();\r\n this.downloadAttachment(attachment);\r\n }\r\n\r\n downloadAttachment(attachment: EntityAttachmentItemValue): void {\r\n const resolvedAttachment$ = this.requiresMetadataRequest(attachment)\r\n ? this.resolveAttachment$(attachment)\r\n : of(this.normalizeAttachmentItem(attachment));\r\n\r\n resolvedAttachment$\r\n .pipe(\r\n take(1),\r\n switchMap((resolvedAttachment) => {\r\n if (!resolvedAttachment?.fileName) {\r\n return EMPTY;\r\n }\r\n\r\n return this.httpClient\r\n .get(`${this.endPoint()}/${resolvedAttachment.fileName}`, {\r\n responseType: 'blob',\r\n context: this.context(),\r\n })\r\n .pipe(\r\n take(1),\r\n map((blob) => ({\r\n attachment: resolvedAttachment,\r\n blob,\r\n })),\r\n );\r\n }),\r\n )\r\n .subscribe(({ attachment, blob }) => {\r\n const downloadBlob = new Blob([blob], {\r\n type:\r\n attachment.contentType || blob.type || 'application/octet-stream',\r\n });\r\n const objectUrl = window.URL.createObjectURL(downloadBlob);\r\n const anchor = document.createElement('a');\r\n\r\n anchor.href = objectUrl;\r\n anchor.download =\r\n attachment.name ??\r\n attachment.fileName ??\r\n attachment.id ??\r\n 'attachment';\r\n anchor.click();\r\n\r\n window.URL.revokeObjectURL(objectUrl);\r\n });\r\n }\r\n\r\n private resolveAttachment$(reference: AttachmentReference) {\r\n const normalizedAttachment = this.normalizeAttachmentItem(reference);\r\n\r\n if (!this.requiresMetadataRequest(reference)) {\r\n return of(normalizedAttachment);\r\n }\r\n\r\n const attachmentId =\r\n typeof reference === 'string' ? reference.trim() : reference.id?.trim();\r\n\r\n if (!attachmentId) {\r\n return of(normalizedAttachment);\r\n }\r\n\r\n return this.httpClient\r\n .get<AttachmentMetadataResponse>(\r\n `${this.endPoint()}/${attachmentId}/metaData`,\r\n {\r\n context: this.context(),\r\n },\r\n )\r\n .pipe(\r\n take(1),\r\n map((response) => this.normalizeAttachmentItem(response.data)),\r\n catchError(() => of(normalizedAttachment)),\r\n );\r\n }\r\n\r\n private normalizeAttachmentValue(value: unknown): AttachmentReference[] {\r\n if (value === null || value === undefined) {\r\n return [];\r\n }\r\n\r\n if (Array.isArray(value)) {\r\n return value.flatMap((item) => this.normalizeAttachmentValue(item));\r\n }\r\n\r\n if (typeof value === 'string') {\r\n const trimmedValue = value.trim();\r\n\r\n if (!trimmedValue || trimmedValue === '[]') {\r\n return [];\r\n }\r\n\r\n if (\r\n (trimmedValue.startsWith('[') && trimmedValue.endsWith(']')) ||\r\n (trimmedValue.startsWith('{') && trimmedValue.endsWith('}'))\r\n ) {\r\n try {\r\n return this.normalizeAttachmentValue(JSON.parse(trimmedValue));\r\n } catch {\r\n return [trimmedValue];\r\n }\r\n }\r\n\r\n return [trimmedValue];\r\n }\r\n\r\n if (typeof value === 'object') {\r\n return [value as EntityAttachmentItemValue];\r\n }\r\n\r\n return [];\r\n }\r\n\r\n private normalizeAttachmentItem(\r\n value: AttachmentReference | null | undefined,\r\n ): EntityAttachmentItemValue | null {\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n if (typeof value === 'string') {\r\n const trimmedValue = value.trim();\r\n\r\n return trimmedValue\r\n ? {\r\n id: trimmedValue,\r\n name: trimmedValue,\r\n }\r\n : null;\r\n }\r\n\r\n const normalizedAttachment: EntityAttachmentItemValue = {\r\n ...value,\r\n name: value.name ?? value.fileName ?? value.id ?? '',\r\n extension: this.resolveExtension(value),\r\n };\r\n\r\n return normalizedAttachment.name ||\r\n normalizedAttachment.fileName ||\r\n normalizedAttachment.id\r\n ? normalizedAttachment\r\n : null;\r\n }\r\n\r\n private requiresMetadataRequest(reference: AttachmentReference): boolean {\r\n if (typeof reference === 'string') {\r\n return reference.trim().length > 0;\r\n }\r\n\r\n return !!reference.id?.trim() && !reference.fileName;\r\n }\r\n\r\n private isAttachmentItemValue(\r\n reference: AttachmentReference,\r\n ): reference is EntityAttachmentItemValue {\r\n return typeof reference === 'object' && reference != null;\r\n }\r\n\r\n private resolveExtension(\r\n value: EntityAttachmentItemValue,\r\n ): string | undefined {\r\n const explicitExtension = value.extension?.trim();\r\n\r\n if (explicitExtension) {\r\n return explicitExtension.startsWith('.')\r\n ? explicitExtension.toLowerCase()\r\n : `.${explicitExtension.toLowerCase()}`;\r\n }\r\n\r\n const fileName = value.fileName ?? value.name;\r\n if (!fileName || !fileName.includes('.')) {\r\n return undefined;\r\n }\r\n\r\n return `.${fileName.split('.').pop()!.toLowerCase()}`;\r\n }\r\n}\r\n","<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"relaxed\"\r\n>\r\n @if (hasAttachments()) {\r\n @if (shape() === \"compact\") {\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @for (\r\n attachment of attachments();\r\n track attachmentTrackBy($index, attachment)\r\n ) {\r\n <mt-button\r\n iconPos=\"top\"\r\n size=\"small\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n [icon]=\"attachmentIcon(attachment)\"\r\n [tooltip]=\"attachmentTooltip(attachment)\"\r\n styleClass=\"h-9! w-9! rounded-lg!\"\r\n (onClick)=\"onCompactAttachmentClick($event, attachment)\"\r\n />\r\n }\r\n </div>\r\n } @else {\r\n <mt-upload-field\r\n class=\"w-full\"\r\n [ngModel]=\"uploadValue()\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [shape]=\"'card'\"\r\n [multiple]=\"isMultiple()\"\r\n [readonly]=\"true\"\r\n [endPoint]=\"endPoint()\"\r\n [context]=\"context()\"\r\n />\r\n }\r\n } @else {\r\n <span class=\"text-sm font-semibold\">{{ empty }}</span>\r\n }\r\n</mt-entity-field>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n input,\r\n} from '@angular/core';\r\nimport { EntityData, EntityViewType } from '../entity.model';\r\nimport { EntityText } from '../entity-text/entity-text';\r\nimport { EntityLongText } from '../entity-long-text/entity-long-text';\r\nimport { EntityDate } from '../entity-date/entity-date';\r\nimport { EntityUser } from '../entity-user/entity-user';\r\nimport { EntityPercentage } from '../entity-percentage/entity-percentage';\r\nimport { EntityCurrency } from '../entity-currency/entity-currency';\r\nimport { EntityCheckbox } from '../entity-checkbox/entity-checkbox';\r\nimport { EntityLookup } from '../entity-lookup/entity-lookup';\r\nimport { EntityAttachment } from '../entity-attachment/entity-attachment';\r\nimport { EntityStatus } from '../entity-status/entity-status';\r\n\r\n@Component({\r\n selector: 'mt-entity-preview',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n EntityText,\r\n EntityLongText,\r\n EntityDate,\r\n EntityUser,\r\n EntityPercentage,\r\n EntityCurrency,\r\n EntityCheckbox,\r\n EntityLookup,\r\n EntityAttachment,\r\n EntityStatus,\r\n ],\r\n templateUrl: './entity-preview.html',\r\n host: {\r\n class: 'w-full',\r\n },\r\n})\r\nexport class EntityPreview {\r\n /** Single entity data to display */\r\n readonly data = input.required<EntityData>();\r\n readonly attachmentShape = input<'default' | 'compact'>('default');\r\n readonly previewType = computed<Exclude<EntityViewType, 'LookupMatrix'>>(\r\n () => {\r\n const viewType = this.data().viewType;\r\n return viewType === 'LookupMatrix' ? 'Lookup' : viewType;\r\n },\r\n );\r\n}\r\n","@switch (previewType()) {\r\n @case (\"Text\") {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n @case (\"LongText\") {\r\n <mt-entity-long-text [data]=\"data()\" />\r\n }\r\n @case (\"Date\") {\r\n <mt-entity-date [data]=\"data()\" />\r\n }\r\n @case (\"DateTime\") {\r\n <mt-entity-date [data]=\"data()\" />\r\n }\r\n @case (\"User\") {\r\n <mt-entity-user [data]=\"data()\" />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-entity-percentage [data]=\"data()\" />\r\n }\r\n @case (\"Currency\") {\r\n <mt-entity-currency [data]=\"data()\" />\r\n }\r\n @case (\"Checkbox\") {\r\n <mt-entity-checkbox [data]=\"data()\" />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-entity-lookup [data]=\"data()\" />\r\n }\r\n @case (\"Status\") {\r\n <mt-entity-status [data]=\"data()\" />\r\n }\r\n @case (\"Attachment\") {\r\n <mt-entity-attachment [data]=\"data()\" [shape]=\"attachmentShape()\" />\r\n }\r\n @default {\r\n <mt-entity-text [data]=\"data()\" />\r\n }\r\n}\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { EntityData, EntitySize } from '../entity.model';\r\nimport { EntityPreview } from '../entity-preview/entity-preview';\r\n\r\n@Component({\r\n selector: 'mt-entities-preview',\r\n standalone: true,\r\n imports: [EntityPreview],\r\n templateUrl: './entities-preview.html',\r\n})\r\nexport class EntitiesPreview {\r\n /** Array of entity data to display */\r\n readonly entities = input.required<EntityData[]>();\r\n readonly attachmentShape = input<'default' | 'compact'>('default');\r\n\r\n /** Entities sorted by order */\r\n readonly sortedEntities = computed(() =>\r\n [...this.entities()].sort((a, b) => (a.order ?? 0) - (b.order ?? 0)),\r\n );\r\n\r\n /** Returns the grid-column span for a given entity size (1-24) */\r\n getColSpan(entity: EntityData): string {\r\n const size: EntitySize = entity.configuration?.size ?? 8;\r\n return `span ${size}`;\r\n }\r\n}\r\n","<div class=\"grid grid-cols-24 gap-x-3 gap-y-5\">\r\n @for (entity of sortedEntities(); track $index) {\r\n <div\r\n class=\"min-w-0 flex items-center p-3\"\r\n [class.border]=\"entity.configuration?.showBorder\"\r\n [class.border-dashed]=\"entity.configuration?.showBorder\"\r\n [class.border-gray-200]=\"entity.configuration?.showBorder\"\r\n [class.rounded-lg]=\"entity.configuration?.showBorder\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n >\r\n <mt-entity-preview\r\n [data]=\"entity\"\r\n [attachmentShape]=\"attachmentShape()\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n","import {\r\n Directive,\r\n ElementRef,\r\n inject,\r\n NgZone,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { EntityData, EntityResizeEvent, EntitySize } from '../entity.model';\r\n\r\n/**\r\n * Base class that encapsulates all entity resize-via-drag logic.\r\n *\r\n * Extend this directive in any component that needs column-resize behaviour\r\n * on a 24-column CSS grid. The subclass must:\r\n * - Provide a `model.required<EntityData[]>()` (or equivalent) for the\r\n * entity list so `updateEntitySize()` can be called after resize.\r\n * - Contain a `.grid` element (or override `getGridElement()`).\r\n *\r\n * Resize flow:\r\n * 1. `onResizeStart(event, entity)` — called from a mousedown on the handle\r\n * 2. mousemove → snaps to nearest column, updates `resizePreviewSize`\r\n * 3. mouseup → emits `entityResized` with previous & new size\r\n */\r\n@Directive()\r\nexport abstract class EntitiesResizeBase {\r\n protected readonly elRef = inject(ElementRef);\r\n protected readonly zone = inject(NgZone);\r\n protected readonly doc = inject(DOCUMENT);\r\n\r\n /** Emits when an entity is resized via the drag handle */\r\n readonly entityResized = output<EntityResizeEvent>();\r\n\r\n // ── Resize state ──\r\n\r\n /** The entity currently being resized (null when idle) */\r\n readonly resizingEntity = signal<EntityData | null>(null);\r\n\r\n /** Live preview size while dragging */\r\n readonly resizePreviewSize = signal<EntitySize | null>(null);\r\n\r\n /** Bound listeners kept for cleanup */\r\n private _onMouseMove: ((e: MouseEvent) => void) | null = null;\r\n private _onMouseUp: ((e: MouseEvent) => void) | null = null;\r\n\r\n // ── Public API ──\r\n\r\n /**\r\n * Returns the grid element used to compute column widths.\r\n * Override if the grid selector differs.\r\n */\r\n protected getGridElement(): HTMLElement | null {\r\n return this.elRef.nativeElement.querySelector('.grid');\r\n }\r\n\r\n /**\r\n * Returns the grid-column span string for a given entity.\r\n * While resizing the active entity, returns the preview size.\r\n */\r\n getResizeColSpan(entity: EntityData): string {\r\n if (this.resizingEntity() === entity && this.resizePreviewSize() !== null) {\r\n return `span ${this.resizePreviewSize()}`;\r\n }\r\n const size: EntitySize = entity.configuration?.size ?? 8;\r\n return `span ${size}`;\r\n }\r\n\r\n /** Starts a resize operation from the right-edge handle */\r\n onResizeStart(event: MouseEvent, entity: EntityData): void {\r\n // Prevent the drag-drop from starting\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n const gridEl = this.getGridElement();\r\n if (!gridEl) return;\r\n\r\n const gridRect = gridEl.getBoundingClientRect();\r\n const gridWidth = gridRect.width;\r\n const columnWidth = gridWidth / 24;\r\n\r\n const previousSize: EntitySize = entity.configuration?.size ?? 8;\r\n\r\n // Left edge of the entity cell\r\n const cellEl = (event.target as HTMLElement).closest(\r\n '.entity-cell',\r\n ) as HTMLElement | null;\r\n if (!cellEl) return;\r\n const cellRect = cellEl.getBoundingClientRect();\r\n const isRtl =\r\n this.doc.documentElement.getAttribute('dir') === 'rtl' ||\r\n getComputedStyle(this.doc.documentElement).direction === 'rtl';\r\n\r\n this.resizingEntity.set(entity);\r\n this.resizePreviewSize.set(previousSize);\r\n\r\n // Run mouse listeners outside Angular zone for performance\r\n this.zone.runOutsideAngular(() => {\r\n this._onMouseMove = (e: MouseEvent) => {\r\n // In RTL the logical end is the left edge; dragging left widens the cell\r\n const rawWidth = isRtl\r\n ? cellRect.right - e.clientX\r\n : e.clientX - cellRect.left;\r\n // Snap to nearest full column (min 1, max 12)\r\n let cols = Math.round(rawWidth / columnWidth);\r\n cols = Math.max(1, Math.min(24, cols)) as EntitySize;\r\n const current = this.resizePreviewSize();\r\n if (current !== cols) {\r\n this.zone.run(() => this.resizePreviewSize.set(cols as EntitySize));\r\n }\r\n };\r\n\r\n this._onMouseUp = () => {\r\n this._cleanupListeners();\r\n\r\n const newSize = this.resizePreviewSize() as EntitySize;\r\n this.resizingEntity.set(null);\r\n this.resizePreviewSize.set(null);\r\n\r\n if (newSize !== previousSize) {\r\n this.zone.run(() => {\r\n this.onResizeComplete(entity, previousSize, newSize);\r\n });\r\n }\r\n };\r\n\r\n this.doc.addEventListener('mousemove', this._onMouseMove);\r\n this.doc.addEventListener('mouseup', this._onMouseUp, { once: true });\r\n });\r\n }\r\n\r\n /**\r\n * Called when a resize operation completes with a changed size.\r\n * Subclasses should update the entity list and emit events here.\r\n */\r\n protected abstract onResizeComplete(\r\n entity: EntityData,\r\n previousSize: EntitySize,\r\n newSize: EntitySize,\r\n ): void;\r\n\r\n /** Removes global mouse listeners */\r\n private _cleanupListeners(): void {\r\n if (this._onMouseMove) {\r\n this.doc.removeEventListener('mousemove', this._onMouseMove);\r\n this._onMouseMove = null;\r\n }\r\n if (this._onMouseUp) {\r\n this.doc.removeEventListener('mouseup', this._onMouseUp);\r\n this._onMouseUp = null;\r\n }\r\n }\r\n}\r\n","import { Component, computed, model, output } from '@angular/core';\r\nimport {\r\n CdkDrag,\r\n CdkDragDrop,\r\n CdkDragPlaceholder,\r\n CdkDropList,\r\n} from '@angular/cdk/drag-drop';\r\nimport { EntityData, EntitySize } from '../entity.model';\r\nimport { EntityPreview } from '../entity-preview/entity-preview';\r\nimport { EntitiesResizeBase } from './entities-resize-base';\r\n\r\n@Component({\r\n selector: 'mt-entities-manage',\r\n standalone: true,\r\n imports: [EntityPreview, CdkDrag, CdkDropList, CdkDragPlaceholder],\r\n templateUrl: './entities-manage.html',\r\n styleUrl: './entities-manage.scss',\r\n})\r\nexport class EntitiesManage extends EntitiesResizeBase {\r\n /** Array of entity data – supports two-way binding to keep order in sync */\r\n readonly entities = model.required<EntityData[]>();\r\n\r\n /** Emits the reordered entities array after each drag-drop */\r\n readonly entitiesReordered = output<EntityData[]>();\r\n\r\n /** Entities sorted by their order field */\r\n readonly sortedEntities = computed(() =>\r\n [...this.entities()].sort((a, b) => (a.order ?? 0) - (b.order ?? 0)),\r\n );\r\n\r\n /** Returns the grid-column span for a given entity size (1-24) */\r\n getColSpan(entity: EntityData): string {\r\n return this.getResizeColSpan(entity);\r\n }\r\n\r\n /** Handle drag-drop reorder */\r\n onDrop(event: CdkDragDrop<EntityData[]>): void {\r\n if (event.previousIndex === event.currentIndex) return;\r\n\r\n const items = [...this.sortedEntities()];\r\n const [moved] = items.splice(event.previousIndex, 1);\r\n items.splice(event.currentIndex, 0, moved);\r\n\r\n // Reassign order based on new positions\r\n const reordered = items.map((item, index) => ({\r\n ...item,\r\n order: index + 1,\r\n }));\r\n\r\n // Update the model (two-way binding)\r\n this.entities.set(reordered);\r\n\r\n // Emit the reordered list\r\n this.entitiesReordered.emit(reordered);\r\n }\r\n\r\n // ── Resize completion (from EntitiesResizeBase) ──\r\n\r\n protected override onResizeComplete(\r\n entity: EntityData,\r\n previousSize: EntitySize,\r\n newSize: EntitySize,\r\n ): void {\r\n // Update entity in the list\r\n const updated = this.entities().map((e) =>\r\n e === entity\r\n ? {\r\n ...e,\r\n configuration: {\r\n ...e.configuration,\r\n size: newSize,\r\n },\r\n }\r\n : e,\r\n );\r\n this.entities.set(updated);\r\n\r\n this.entityResized.emit({\r\n entity: {\r\n ...entity,\r\n configuration: { ...entity.configuration, size: newSize },\r\n },\r\n previousSize,\r\n newSize,\r\n });\r\n }\r\n}\r\n","<div\r\n cdkDropList\r\n cdkDropListOrientation=\"mixed\"\r\n [cdkDropListData]=\"sortedEntities()\"\r\n (cdkDropListDropped)=\"onDrop($event)\"\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-6\"\r\n>\r\n @for (entity of sortedEntities(); track entity.order) {\r\n <div\r\n cdkDrag\r\n [cdkDragData]=\"entity\"\r\n class=\"entity-cell group relative min-w-0 flex items-center p-3 cursor-grab active:cursor-grabbing\"\r\n [class.border]=\"entity.configuration?.showBorder\"\r\n [class.border-dashed]=\"entity.configuration?.showBorder\"\r\n [class.border-gray-200]=\"entity.configuration?.showBorder\"\r\n [class.rounded-lg]=\"entity.configuration?.showBorder\"\r\n [class.resizing]=\"resizingEntity() === entity\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n >\r\n <!-- Drag placeholder -->\r\n <div\r\n *cdkDragPlaceholder\r\n class=\"h-full min-h-12 bg-black/10 rounded-xl\"\r\n [style.grid-column]=\"getColSpan(entity)\"\r\n ></div>\r\n\r\n <mt-entity-preview [data]=\"entity\" class=\"flex-1 min-w-0\" />\r\n\r\n <!-- Resize handle (right edge) -->\r\n <div class=\"resize-handle\" (mousedown)=\"onResizeStart($event, entity)\">\r\n <div class=\"resize-handle-bar\"></div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEO,MAAM,8BAA8B,GAAG,GAAG;AAE3C,SAAU,cAAc,CAAC,KAAc,EAAA;IAC3C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AACzC,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QA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CAAA,+5BAAA,CAAA,EAAA;;;AEdpE;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -34,10 +34,19 @@ declare class LookupMatrixField {
|
|
|
34
34
|
/**
|
|
35
35
|
* One source level inside connection configuration.
|
|
36
36
|
* Comes from `field.propertyMetadata.configuration.sourceLevels[]`
|
|
37
|
+
*
|
|
38
|
+
* A source can be either a **level** (has `levelId`/`levelKey`) or a
|
|
39
|
+
* **module** (has `moduleId`/`moduleKey`). Exactly one pair will be present.
|
|
37
40
|
*/
|
|
38
41
|
interface ConnectionSourceLevel {
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
/** Present for level-type sources */
|
|
43
|
+
levelId?: number;
|
|
44
|
+
/** Present for level-type sources */
|
|
45
|
+
levelKey?: string;
|
|
46
|
+
/** Present for module-type sources */
|
|
47
|
+
moduleId?: number;
|
|
48
|
+
/** Present for module-type sources */
|
|
49
|
+
moduleKey?: string;
|
|
41
50
|
name: {
|
|
42
51
|
en?: string;
|
|
43
52
|
ar?: string;
|
|
@@ -124,6 +133,16 @@ declare class SchemaConnectionField implements ControlValueAccessor {
|
|
|
124
133
|
*/
|
|
125
134
|
readonly dropdownWidth: _angular_core.Signal<string>;
|
|
126
135
|
constructor();
|
|
136
|
+
/**
|
|
137
|
+
* Returns a stable numeric ID for a source regardless of whether it is a
|
|
138
|
+
* level (`levelId`) or a module (`moduleId`). Used as the key in `selections`
|
|
139
|
+
* and `sourceLevelStates`.
|
|
140
|
+
*/
|
|
141
|
+
protected getSourceId(source: ConnectionSourceLevel): number;
|
|
142
|
+
/**
|
|
143
|
+
* Builds the `contextKey` for the `fetch/query` request based on source type.
|
|
144
|
+
*/
|
|
145
|
+
private getContextKey;
|
|
127
146
|
private loadOptions;
|
|
128
147
|
private updateSourceState;
|
|
129
148
|
/**
|