@masterteam/components 0.0.162 → 0.0.164

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.
Files changed (32) hide show
  1. package/assets/common.css +1 -1
  2. package/assets/i18n/ar.json +24 -0
  3. package/assets/i18n/en.json +24 -0
  4. package/fesm2022/masterteam-components-business-fields.mjs +290 -90
  5. package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
  6. package/fesm2022/masterteam-components-color-picker-field.mjs +11 -3
  7. package/fesm2022/masterteam-components-color-picker-field.mjs.map +1 -1
  8. package/fesm2022/masterteam-components-entities.mjs +3 -2
  9. package/fesm2022/masterteam-components-entities.mjs.map +1 -1
  10. package/fesm2022/masterteam-components-field-validation.mjs +19 -18
  11. package/fesm2022/masterteam-components-field-validation.mjs.map +1 -1
  12. package/fesm2022/masterteam-components-sidebar.mjs +2 -2
  13. package/fesm2022/masterteam-components-sidebar.mjs.map +1 -1
  14. package/fesm2022/masterteam-components-table.mjs +1 -11
  15. package/fesm2022/masterteam-components-table.mjs.map +1 -1
  16. package/fesm2022/masterteam-components-text-field.mjs +21 -26
  17. package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
  18. package/fesm2022/masterteam-components-toast.mjs +28 -23
  19. package/fesm2022/masterteam-components-toast.mjs.map +1 -1
  20. package/fesm2022/masterteam-components-topbar.mjs +2 -2
  21. package/fesm2022/masterteam-components-topbar.mjs.map +1 -1
  22. package/fesm2022/masterteam-components-user-search-field.mjs +7 -3
  23. package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
  24. package/fesm2022/masterteam-components.mjs +1 -1
  25. package/fesm2022/masterteam-components.mjs.map +1 -1
  26. package/package.json +2 -2
  27. package/types/masterteam-components-business-fields.d.ts +67 -21
  28. package/types/masterteam-components-entities.d.ts +1 -0
  29. package/types/masterteam-components-text-field.d.ts +11 -2
  30. package/types/masterteam-components-toast.d.ts +1 -0
  31. package/types/masterteam-components-user-search-field.d.ts +2 -0
  32. package/types/masterteam-components.d.ts +7 -5
@@ -209,6 +209,7 @@ class EntityUser {
209
209
  });
210
210
  /** Full entity data object */
211
211
  data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : /* istanbul ignore next */ []));
212
+ displayName = computed(() => this.data()?.name ?? '', ...(ngDevMode ? [{ debugName: "displayName" }] : /* istanbul ignore next */ []));
212
213
  /** Resolved user value object from data().value */
213
214
  userValue = computed(() => {
214
215
  const val = this.data()?.value;
@@ -231,11 +232,11 @@ class EntityUser {
231
232
  hasContactInfo = computed(() => (this.showPhoneNumber() && !!this.phoneNumber()) ||
232
233
  (this.showEmail() && !!this.email()), ...(ngDevMode ? [{ debugName: "hasContactInfo" }] : /* istanbul ignore next */ []));
233
234
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityUser, deps: [], target: i0.ɵɵFactoryTarget.Component });
234
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityUser, isStandalone: true, selector: "mt-entity-user", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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-xxl! 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.5 ms-auto shrink-0\">\r\n @if (showPhoneNumber() && phoneNumber()) {\r\n <a\r\n [href]=\"'tel:' + phoneNumber()\"\r\n [attr.aria-label]=\"phoneNumber()\"\r\n [mtTooltip]=\"phoneNumber()\"\r\n tooltipPosition=\"top\"\r\n class=\"inline-flex\"\r\n >\r\n <mt-avatar\r\n icon=\"communication.phone\"\r\n badgeSeverity=\"secondary\"\r\n styleClass=\"bg-surface-100! text-surface-600! h-7! w-7! text-sm! font-semibold!\"\r\n />\r\n </a>\r\n }\r\n @if (showEmail() && email()) {\r\n <a\r\n [href]=\"'mailto:' + email()\"\r\n [attr.aria-label]=\"email()\"\r\n [mtTooltip]=\"email()\"\r\n tooltipPosition=\"top\"\r\n class=\"inline-flex\"\r\n >\r\n <mt-avatar\r\n styleClass=\"bg-surface-100! text-surface-600! h-7! w-7! text-sm! font-semibold!\"\r\n icon=\"communication.mail-01\"\r\n badgeSeverity=\"secondary\"\r\n />\r\n </a>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }] });
235
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityUser, isStandalone: true, selector: "mt-entity-user", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n <div class=\"flex items-center gap-2\">\n <mt-avatar\n [image]=\"\n userPhoto()\n ? (userPhoto() | secureImage: true : httpContext : 'avatar/')\n : ''\n \"\n [icon]=\"'user.user-01'\"\n styleClass=\"w-10! h-10! text-white! text-xxl! bg-primary-500!\"\n ></mt-avatar>\n\n @if (showDisplayName()) {\n <div class=\"flex flex-col min-w-0 flex-1\">\n <span class=\"text-sm text-gray-700 truncate\">{{ userName() }}</span>\n @if (labelText()) {\n <span class=\"text-xs text-gray-500 truncate\">{{ labelText() }}</span>\n }\n </div>\n }\n\n @if (hasContactInfo()) {\n <div class=\"flex items-center gap-1.5 ms-auto shrink-0\">\n @if (showPhoneNumber() && phoneNumber()) {\n <a\n [href]=\"'tel:' + phoneNumber()\"\n [attr.aria-label]=\"phoneNumber()\"\n [mtTooltip]=\"phoneNumber()\"\n tooltipPosition=\"top\"\n class=\"inline-flex\"\n >\n <mt-avatar\n icon=\"communication.phone\"\n badgeSeverity=\"secondary\"\n styleClass=\"bg-surface-100! text-surface-600! h-7! w-7! text-sm! font-semibold!\"\n />\n </a>\n }\n @if (showEmail() && email()) {\n <a\n [href]=\"'mailto:' + email()\"\n [attr.aria-label]=\"email()\"\n [mtTooltip]=\"email()\"\n tooltipPosition=\"top\"\n class=\"inline-flex\"\n >\n <mt-avatar\n styleClass=\"bg-surface-100! text-surface-600! h-7! w-7! text-sm! font-semibold!\"\n icon=\"communication.mail-01\"\n badgeSeverity=\"secondary\"\n />\n </a>\n }\n </div>\n }\n </div>\n</mt-entity-field>\n", dependencies: [{ kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }] });
235
236
  }
236
237
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityUser, decorators: [{
237
238
  type: Component,
238
- args: [{ selector: 'mt-entity-user', standalone: true, imports: [Avatar, Tooltip, SecureImagePipe], template: "<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-xxl! 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.5 ms-auto shrink-0\">\r\n @if (showPhoneNumber() && phoneNumber()) {\r\n <a\r\n [href]=\"'tel:' + phoneNumber()\"\r\n [attr.aria-label]=\"phoneNumber()\"\r\n [mtTooltip]=\"phoneNumber()\"\r\n tooltipPosition=\"top\"\r\n class=\"inline-flex\"\r\n >\r\n <mt-avatar\r\n icon=\"communication.phone\"\r\n badgeSeverity=\"secondary\"\r\n styleClass=\"bg-surface-100! text-surface-600! h-7! w-7! text-sm! font-semibold!\"\r\n />\r\n </a>\r\n }\r\n @if (showEmail() && email()) {\r\n <a\r\n [href]=\"'mailto:' + email()\"\r\n [attr.aria-label]=\"email()\"\r\n [mtTooltip]=\"email()\"\r\n tooltipPosition=\"top\"\r\n class=\"inline-flex\"\r\n >\r\n <mt-avatar\r\n styleClass=\"bg-surface-100! text-surface-600! h-7! w-7! text-sm! font-semibold!\"\r\n icon=\"communication.mail-01\"\r\n badgeSeverity=\"secondary\"\r\n />\r\n </a>\r\n }\r\n </div>\r\n }\r\n</div>\r\n" }]
239
+ args: [{ selector: 'mt-entity-user', standalone: true, imports: [Avatar, Tooltip, SecureImagePipe, EntityField], template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n <div class=\"flex items-center gap-2\">\n <mt-avatar\n [image]=\"\n userPhoto()\n ? (userPhoto() | secureImage: true : httpContext : 'avatar/')\n : ''\n \"\n [icon]=\"'user.user-01'\"\n styleClass=\"w-10! h-10! text-white! text-xxl! bg-primary-500!\"\n ></mt-avatar>\n\n @if (showDisplayName()) {\n <div class=\"flex flex-col min-w-0 flex-1\">\n <span class=\"text-sm text-gray-700 truncate\">{{ userName() }}</span>\n @if (labelText()) {\n <span class=\"text-xs text-gray-500 truncate\">{{ labelText() }}</span>\n }\n </div>\n }\n\n @if (hasContactInfo()) {\n <div class=\"flex items-center gap-1.5 ms-auto shrink-0\">\n @if (showPhoneNumber() && phoneNumber()) {\n <a\n [href]=\"'tel:' + phoneNumber()\"\n [attr.aria-label]=\"phoneNumber()\"\n [mtTooltip]=\"phoneNumber()\"\n tooltipPosition=\"top\"\n class=\"inline-flex\"\n >\n <mt-avatar\n icon=\"communication.phone\"\n badgeSeverity=\"secondary\"\n styleClass=\"bg-surface-100! text-surface-600! h-7! w-7! text-sm! font-semibold!\"\n />\n </a>\n }\n @if (showEmail() && email()) {\n <a\n [href]=\"'mailto:' + email()\"\n [attr.aria-label]=\"email()\"\n [mtTooltip]=\"email()\"\n tooltipPosition=\"top\"\n class=\"inline-flex\"\n >\n <mt-avatar\n styleClass=\"bg-surface-100! text-surface-600! h-7! w-7! text-sm! font-semibold!\"\n icon=\"communication.mail-01\"\n badgeSeverity=\"secondary\"\n />\n </a>\n }\n </div>\n }\n </div>\n</mt-entity-field>\n" }]
239
240
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
240
241
 
241
242
  class EntityPercentage {