@trii/components 2.0.15 → 2.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/cjs/index.js +50 -656
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +3 -4
  4. package/dist/cjs/types/components/ContactInfoPopup/components/Header/Header.d.ts +4 -7
  5. package/dist/cjs/types/components/ContactInfoPopup/components/index.d.ts +0 -3
  6. package/dist/esm/index.js +52 -658
  7. package/dist/esm/index.js.map +1 -1
  8. package/dist/esm/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +3 -4
  9. package/dist/esm/types/components/ContactInfoPopup/components/Header/Header.d.ts +4 -7
  10. package/dist/esm/types/components/ContactInfoPopup/components/index.d.ts +0 -3
  11. package/dist/index.d.ts +3 -4
  12. package/package.json +99 -99
  13. package/readme +71 -71
  14. package/dist/cjs/types/components/ContactInfoPopup/components/BusinessSection/BusinessSection.d.ts +0 -7
  15. package/dist/cjs/types/components/ContactInfoPopup/components/BusinessSection/index.d.ts +0 -1
  16. package/dist/cjs/types/components/ContactInfoPopup/components/LabelsSection/LabelsSection.d.ts +0 -7
  17. package/dist/cjs/types/components/ContactInfoPopup/components/LabelsSection/index.d.ts +0 -1
  18. package/dist/cjs/types/components/ContactInfoPopup/components/MemberItem/MemberItem.d.ts +0 -5
  19. package/dist/cjs/types/components/ContactInfoPopup/components/MemberItem/index.d.ts +0 -1
  20. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/MembersSection.d.ts +0 -7
  21. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/MemberItem.d.ts +0 -4
  22. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/index.d.ts +0 -1
  23. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/components/index.d.ts +0 -1
  24. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/index.d.ts +0 -1
  25. package/dist/cjs/types/components/ContactInfoPopup/hooks/useContactInfoPopupTranslation.d.ts +0 -24
  26. package/dist/cjs/types/components/ContactInfoPopup/types/is-business.typeguard.d.ts +0 -7
  27. package/dist/cjs/types/components/ContactInfoPopup/types/is-contact.typeguard.d.ts +0 -7
  28. package/dist/cjs/types/components/LanguageSelector.d.ts +0 -2
  29. package/dist/cjs/types/contexts/LanguageContext.d.ts +0 -10
  30. package/dist/cjs/types/i18n.d.ts +0 -2
  31. package/dist/cjs/types/translations/en.d.ts +0 -31
  32. package/dist/cjs/types/translations/es.d.ts +0 -31
  33. package/dist/cjs/types/translations/index.d.ts +0 -2
  34. package/dist/cjs/types/types/translations.d.ts +0 -25
  35. package/dist/cjs/types/utils/translation.d.ts +0 -7
  36. package/dist/esm/types/components/ContactInfoPopup/components/BusinessSection/BusinessSection.d.ts +0 -7
  37. package/dist/esm/types/components/ContactInfoPopup/components/BusinessSection/index.d.ts +0 -1
  38. package/dist/esm/types/components/ContactInfoPopup/components/LabelsSection/LabelsSection.d.ts +0 -7
  39. package/dist/esm/types/components/ContactInfoPopup/components/LabelsSection/index.d.ts +0 -1
  40. package/dist/esm/types/components/ContactInfoPopup/components/MemberItem/MemberItem.d.ts +0 -5
  41. package/dist/esm/types/components/ContactInfoPopup/components/MemberItem/index.d.ts +0 -1
  42. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/MembersSection.d.ts +0 -7
  43. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/MemberItem.d.ts +0 -4
  44. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/index.d.ts +0 -1
  45. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/components/index.d.ts +0 -1
  46. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/index.d.ts +0 -1
  47. package/dist/esm/types/components/ContactInfoPopup/hooks/useContactInfoPopupTranslation.d.ts +0 -24
  48. package/dist/esm/types/components/ContactInfoPopup/types/is-business.typeguard.d.ts +0 -7
  49. package/dist/esm/types/components/ContactInfoPopup/types/is-contact.typeguard.d.ts +0 -7
  50. package/dist/esm/types/components/LanguageSelector.d.ts +0 -2
  51. package/dist/esm/types/contexts/LanguageContext.d.ts +0 -10
  52. package/dist/esm/types/i18n.d.ts +0 -2
  53. package/dist/esm/types/translations/en.d.ts +0 -31
  54. package/dist/esm/types/translations/es.d.ts +0 -31
  55. package/dist/esm/types/translations/index.d.ts +0 -2
  56. package/dist/esm/types/types/translations.d.ts +0 -25
  57. package/dist/esm/types/utils/translation.d.ts +0 -7
package/dist/cjs/index.js CHANGED
@@ -3042,422 +3042,6 @@ var capitalize = /*#__PURE__*/Object.freeze({
3042
3042
  default: capitalize$1
3043
3043
  });
3044
3044
 
3045
- /**
3046
- * Safe chained function.
3047
- *
3048
- * Will only create a new function if needed,
3049
- * otherwise will pass back existing functions or null.
3050
- */
3051
- function createChainedFunction(...funcs) {
3052
- return funcs.reduce((acc, func) => {
3053
- if (func == null) {
3054
- return acc;
3055
- }
3056
- return function chainedFunction(...args) {
3057
- acc.apply(this, args);
3058
- func.apply(this, args);
3059
- };
3060
- }, () => {});
3061
- }
3062
-
3063
- // Corresponds to 10 frames at 60 Hz.
3064
- // A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
3065
- function debounce(func, wait = 166) {
3066
- let timeout;
3067
- function debounced(...args) {
3068
- const later = () => {
3069
- // @ts-ignore
3070
- func.apply(this, args);
3071
- };
3072
- clearTimeout(timeout);
3073
- timeout = setTimeout(later, wait);
3074
- }
3075
- debounced.clear = () => {
3076
- clearTimeout(timeout);
3077
- };
3078
- return debounced;
3079
- }
3080
-
3081
- function deprecatedPropType(validator, reason) {
3082
- if (process.env.NODE_ENV === 'production') {
3083
- return () => null;
3084
- }
3085
- return (props, propName, componentName, location, propFullName) => {
3086
- const componentNameSafe = componentName || '<<anonymous>>';
3087
- const propFullNameSafe = propFullName || propName;
3088
- if (typeof props[propName] !== 'undefined') {
3089
- return new Error(`The ${location} \`${propFullNameSafe}\` of ` + `\`${componentNameSafe}\` is deprecated. ${reason}`);
3090
- }
3091
- return null;
3092
- };
3093
- }
3094
-
3095
- function isMuiElement(element, muiNames) {
3096
- var _muiName, _element$type;
3097
- return /*#__PURE__*/React__namespace.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
3098
- // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
3099
- // eslint-disable-next-line no-underscore-dangle
3100
- (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
3101
- }
3102
-
3103
- function ownerDocument(node) {
3104
- return node && node.ownerDocument || document;
3105
- }
3106
-
3107
- function ownerWindow(node) {
3108
- const doc = ownerDocument(node);
3109
- return doc.defaultView || window;
3110
- }
3111
-
3112
- function requirePropFactory(componentNameInError, Component) {
3113
- if (process.env.NODE_ENV === 'production') {
3114
- return () => null;
3115
- }
3116
-
3117
- // eslint-disable-next-line react/forbid-foreign-prop-types
3118
- const prevPropTypes = Component ? _extends$1({}, Component.propTypes) : null;
3119
- const requireProp = requiredProp => (props, propName, componentName, location, propFullName, ...args) => {
3120
- const propFullNameSafe = propFullName || propName;
3121
- const defaultTypeChecker = prevPropTypes == null ? void 0 : prevPropTypes[propFullNameSafe];
3122
- if (defaultTypeChecker) {
3123
- const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);
3124
- if (typeCheckerResult) {
3125
- return typeCheckerResult;
3126
- }
3127
- }
3128
- if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {
3129
- return new Error(`The prop \`${propFullNameSafe}\` of ` + `\`${componentNameInError}\` can only be used together with the \`${requiredProp}\` prop.`);
3130
- }
3131
- return null;
3132
- };
3133
- return requireProp;
3134
- }
3135
-
3136
- /**
3137
- * TODO v5: consider making it private
3138
- *
3139
- * passes {value} to {ref}
3140
- *
3141
- * WARNING: Be sure to only call this inside a callback that is passed as a ref.
3142
- * Otherwise, make sure to cleanup the previous {ref} if it changes. See
3143
- * https://github.com/mui/material-ui/issues/13539
3144
- *
3145
- * Useful if you want to expose the ref of an inner component to the public API
3146
- * while still using it inside the component.
3147
- * @param ref A ref callback or ref object. If anything falsy, this is a no-op.
3148
- */
3149
- function setRef(ref, value) {
3150
- if (typeof ref === 'function') {
3151
- ref(value);
3152
- } else if (ref) {
3153
- ref.current = value;
3154
- }
3155
- }
3156
-
3157
- /**
3158
- * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
3159
- * This is useful for effects that are only needed for client-side rendering but not for SSR.
3160
- *
3161
- * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
3162
- * and confirm it doesn't apply to your use-case.
3163
- */
3164
- const useEnhancedEffect = typeof window !== 'undefined' ? React__namespace.useLayoutEffect : React__namespace.useEffect;
3165
- var useEnhancedEffect$1 = useEnhancedEffect;
3166
-
3167
- let globalId = 0;
3168
- function useGlobalId(idOverride) {
3169
- const [defaultId, setDefaultId] = React__namespace.useState(idOverride);
3170
- const id = idOverride || defaultId;
3171
- React__namespace.useEffect(() => {
3172
- if (defaultId == null) {
3173
- // Fallback to this default id when possible.
3174
- // Use the incrementing value for client-side rendering only.
3175
- // We can't use it server-side.
3176
- // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem
3177
- globalId += 1;
3178
- setDefaultId(`mui-${globalId}`);
3179
- }
3180
- }, [defaultId]);
3181
- return id;
3182
- }
3183
-
3184
- // downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
3185
- const maybeReactUseId = React__namespace['useId'.toString()];
3186
- /**
3187
- *
3188
- * @example <div id={useId()} />
3189
- * @param idOverride
3190
- * @returns {string}
3191
- */
3192
- function useId(idOverride) {
3193
- if (maybeReactUseId !== undefined) {
3194
- const reactId = maybeReactUseId();
3195
- return idOverride != null ? idOverride : reactId;
3196
- }
3197
- // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.
3198
- return useGlobalId(idOverride);
3199
- }
3200
-
3201
- function unsupportedProp(props, propName, componentName, location, propFullName) {
3202
- if (process.env.NODE_ENV === 'production') {
3203
- return null;
3204
- }
3205
- const propFullNameSafe = propFullName || propName;
3206
- if (typeof props[propName] !== 'undefined') {
3207
- return new Error(`The prop \`${propFullNameSafe}\` is not supported. Please remove it.`);
3208
- }
3209
- return null;
3210
- }
3211
-
3212
- function useControlled({
3213
- controlled,
3214
- default: defaultProp,
3215
- name,
3216
- state = 'value'
3217
- }) {
3218
- // isControlled is ignored in the hook dependency lists as it should never change.
3219
- const {
3220
- current: isControlled
3221
- } = React__namespace.useRef(controlled !== undefined);
3222
- const [valueState, setValue] = React__namespace.useState(defaultProp);
3223
- const value = isControlled ? controlled : valueState;
3224
- if (process.env.NODE_ENV !== 'production') {
3225
- React__namespace.useEffect(() => {
3226
- if (isControlled !== (controlled !== undefined)) {
3227
- console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
3228
- }
3229
- }, [state, name, controlled]);
3230
- const {
3231
- current: defaultValue
3232
- } = React__namespace.useRef(defaultProp);
3233
- React__namespace.useEffect(() => {
3234
- if (!isControlled && defaultValue !== defaultProp) {
3235
- console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n'));
3236
- }
3237
- }, [JSON.stringify(defaultProp)]);
3238
- }
3239
- const setValueIfUncontrolled = React__namespace.useCallback(newValue => {
3240
- if (!isControlled) {
3241
- setValue(newValue);
3242
- }
3243
- }, []);
3244
- return [value, setValueIfUncontrolled];
3245
- }
3246
-
3247
- /**
3248
- * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
3249
- * See RFC in https://github.com/reactjs/rfcs/pull/220
3250
- */
3251
-
3252
- function useEventCallback(fn) {
3253
- const ref = React__namespace.useRef(fn);
3254
- useEnhancedEffect$1(() => {
3255
- ref.current = fn;
3256
- });
3257
- return React__namespace.useRef((...args) =>
3258
- // @ts-expect-error hide `this`
3259
- (0, ref.current)(...args)).current;
3260
- }
3261
-
3262
- function useForkRef(...refs) {
3263
- /**
3264
- * This will create a new function if the refs passed to this hook change and are all defined.
3265
- * This means react will call the old forkRef with `null` and the new forkRef
3266
- * with the ref. Cleanup naturally emerges from this behavior.
3267
- */
3268
- return React__namespace.useMemo(() => {
3269
- if (refs.every(ref => ref == null)) {
3270
- return null;
3271
- }
3272
- return instance => {
3273
- refs.forEach(ref => {
3274
- setRef(ref, instance);
3275
- });
3276
- };
3277
- // eslint-disable-next-line react-hooks/exhaustive-deps
3278
- }, refs);
3279
- }
3280
-
3281
- class Timeout {
3282
- constructor() {
3283
- this.currentId = null;
3284
- this.clear = () => {
3285
- if (this.currentId !== null) {
3286
- clearTimeout(this.currentId);
3287
- this.currentId = null;
3288
- }
3289
- };
3290
- this.disposeEffect = () => {
3291
- return this.clear;
3292
- };
3293
- }
3294
- static create() {
3295
- return new Timeout();
3296
- }
3297
- /**
3298
- * Executes `fn` after `delay`, clearing any previously scheduled call.
3299
- */
3300
- start(delay, fn) {
3301
- this.clear();
3302
- this.currentId = setTimeout(() => {
3303
- this.currentId = null;
3304
- fn();
3305
- }, delay);
3306
- }
3307
- }
3308
-
3309
- let hadKeyboardEvent = true;
3310
- let hadFocusVisibleRecently = false;
3311
- const hadFocusVisibleRecentlyTimeout = new Timeout();
3312
- const inputTypesWhitelist = {
3313
- text: true,
3314
- search: true,
3315
- url: true,
3316
- tel: true,
3317
- email: true,
3318
- password: true,
3319
- number: true,
3320
- date: true,
3321
- month: true,
3322
- week: true,
3323
- time: true,
3324
- datetime: true,
3325
- 'datetime-local': true
3326
- };
3327
-
3328
- /**
3329
- * Computes whether the given element should automatically trigger the
3330
- * `focus-visible` class being added, i.e. whether it should always match
3331
- * `:focus-visible` when focused.
3332
- * @param {Element} node
3333
- * @returns {boolean}
3334
- */
3335
- function focusTriggersKeyboardModality(node) {
3336
- const {
3337
- type,
3338
- tagName
3339
- } = node;
3340
- if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
3341
- return true;
3342
- }
3343
- if (tagName === 'TEXTAREA' && !node.readOnly) {
3344
- return true;
3345
- }
3346
- if (node.isContentEditable) {
3347
- return true;
3348
- }
3349
- return false;
3350
- }
3351
-
3352
- /**
3353
- * Keep track of our keyboard modality state with `hadKeyboardEvent`.
3354
- * If the most recent user interaction was via the keyboard;
3355
- * and the key press did not include a meta, alt/option, or control key;
3356
- * then the modality is keyboard. Otherwise, the modality is not keyboard.
3357
- * @param {KeyboardEvent} event
3358
- */
3359
- function handleKeyDown(event) {
3360
- if (event.metaKey || event.altKey || event.ctrlKey) {
3361
- return;
3362
- }
3363
- hadKeyboardEvent = true;
3364
- }
3365
-
3366
- /**
3367
- * If at any point a user clicks with a pointing device, ensure that we change
3368
- * the modality away from keyboard.
3369
- * This avoids the situation where a user presses a key on an already focused
3370
- * element, and then clicks on a different element, focusing it with a
3371
- * pointing device, while we still think we're in keyboard modality.
3372
- */
3373
- function handlePointerDown() {
3374
- hadKeyboardEvent = false;
3375
- }
3376
- function handleVisibilityChange() {
3377
- if (this.visibilityState === 'hidden') {
3378
- // If the tab becomes active again, the browser will handle calling focus
3379
- // on the element (Safari actually calls it twice).
3380
- // If this tab change caused a blur on an element with focus-visible,
3381
- // re-apply the class when the user switches back to the tab.
3382
- if (hadFocusVisibleRecently) {
3383
- hadKeyboardEvent = true;
3384
- }
3385
- }
3386
- }
3387
- function prepare(doc) {
3388
- doc.addEventListener('keydown', handleKeyDown, true);
3389
- doc.addEventListener('mousedown', handlePointerDown, true);
3390
- doc.addEventListener('pointerdown', handlePointerDown, true);
3391
- doc.addEventListener('touchstart', handlePointerDown, true);
3392
- doc.addEventListener('visibilitychange', handleVisibilityChange, true);
3393
- }
3394
- function isFocusVisible(event) {
3395
- const {
3396
- target
3397
- } = event;
3398
- try {
3399
- return target.matches(':focus-visible');
3400
- } catch (error) {
3401
- // Browsers not implementing :focus-visible will throw a SyntaxError.
3402
- // We use our own heuristic for those browsers.
3403
- // Rethrow might be better if it's not the expected error but do we really
3404
- // want to crash if focus-visible malfunctioned?
3405
- }
3406
-
3407
- // No need for validFocusTarget check. The user does that by attaching it to
3408
- // focusable events only.
3409
- return hadKeyboardEvent || focusTriggersKeyboardModality(target);
3410
- }
3411
- function useIsFocusVisible() {
3412
- const ref = React__namespace.useCallback(node => {
3413
- if (node != null) {
3414
- prepare(node.ownerDocument);
3415
- }
3416
- }, []);
3417
- const isFocusVisibleRef = React__namespace.useRef(false);
3418
-
3419
- /**
3420
- * Should be called if a blur event is fired
3421
- */
3422
- function handleBlurVisible() {
3423
- // checking against potential state variable does not suffice if we focus and blur synchronously.
3424
- // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.
3425
- // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.
3426
- // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751
3427
- // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).
3428
- if (isFocusVisibleRef.current) {
3429
- // To detect a tab/window switch, we look for a blur event followed
3430
- // rapidly by a visibility change.
3431
- // If we don't see a visibility change within 100ms, it's probably a
3432
- // regular focus change.
3433
- hadFocusVisibleRecently = true;
3434
- hadFocusVisibleRecentlyTimeout.start(100, () => {
3435
- hadFocusVisibleRecently = false;
3436
- });
3437
- isFocusVisibleRef.current = false;
3438
- return true;
3439
- }
3440
- return false;
3441
- }
3442
-
3443
- /**
3444
- * Should be called if a blur event is fired
3445
- */
3446
- function handleFocusVisible(event) {
3447
- if (isFocusVisible(event)) {
3448
- isFocusVisibleRef.current = true;
3449
- return true;
3450
- }
3451
- return false;
3452
- }
3453
- return {
3454
- isFocusVisibleRef,
3455
- onFocus: handleFocusVisible,
3456
- onBlur: handleBlurVisible,
3457
- ref
3458
- };
3459
- }
3460
-
3461
3045
  /**
3462
3046
  * Add keys, values of `defaultProps` that does not exist in `props`
3463
3047
  * @param {object} defaultProps
@@ -7071,7 +6655,7 @@ var require$$1 = /*@__PURE__*/getAugmentedNamespace(formatMuiErrorMessage);
7071
6655
 
7072
6656
  var require$$2 = /*@__PURE__*/getAugmentedNamespace(clamp);
7073
6657
 
7074
- var _interopRequireDefault$3 = interopRequireDefaultExports;
6658
+ var _interopRequireDefault$1 = interopRequireDefaultExports;
7075
6659
  Object.defineProperty(colorManipulator, "__esModule", {
7076
6660
  value: true
7077
6661
  });
@@ -7093,8 +6677,8 @@ colorManipulator.private_safeEmphasize = private_safeEmphasize;
7093
6677
  colorManipulator.private_safeLighten = private_safeLighten;
7094
6678
  colorManipulator.recomposeColor = recomposeColor;
7095
6679
  colorManipulator.rgbToHex = rgbToHex;
7096
- var _formatMuiErrorMessage2 = _interopRequireDefault$3(require$$1);
7097
- var _clamp = _interopRequireDefault$3(require$$2);
6680
+ var _formatMuiErrorMessage2 = _interopRequireDefault$1(require$$1);
6681
+ var _clamp = _interopRequireDefault$1(require$$2);
7098
6682
  /* eslint-disable @typescript-eslint/naming-convention */
7099
6683
 
7100
6684
  /**
@@ -8216,21 +7800,21 @@ var require$$7 = /*@__PURE__*/getAugmentedNamespace(createTheme$1);
8216
7800
 
8217
7801
  var require$$8 = /*@__PURE__*/getAugmentedNamespace(styleFunctionSx);
8218
7802
 
8219
- var _interopRequireDefault$2 = interopRequireDefaultExports;
7803
+ var _interopRequireDefault = interopRequireDefaultExports;
8220
7804
  Object.defineProperty(createStyled$1, "__esModule", {
8221
7805
  value: true
8222
7806
  });
8223
7807
  var _default = createStyled$1.default = createStyled;
8224
7808
  createStyled$1.shouldForwardProp = shouldForwardProp;
8225
7809
  createStyled$1.systemDefaultTheme = void 0;
8226
- var _extends2 = _interopRequireDefault$2(require_extends());
8227
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault$2(requireObjectWithoutPropertiesLoose());
7810
+ var _extends2 = _interopRequireDefault(require_extends());
7811
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(requireObjectWithoutPropertiesLoose());
8228
7812
  var _styledEngine = _interopRequireWildcard(require$$3);
8229
7813
  var _deepmerge = require$$4;
8230
- var _capitalize = _interopRequireDefault$2(require$$5);
8231
- var _getDisplayName = _interopRequireDefault$2(require$$6);
8232
- var _createTheme = _interopRequireDefault$2(require$$7);
8233
- var _styleFunctionSx = _interopRequireDefault$2(require$$8);
7814
+ var _capitalize = _interopRequireDefault(require$$5);
7815
+ var _getDisplayName = _interopRequireDefault(require$$6);
7816
+ var _createTheme = _interopRequireDefault(require$$7);
7817
+ var _styleFunctionSx = _interopRequireDefault(require$$8);
8234
7818
  const _excluded$1 = ["ownerState"],
8235
7819
  _excluded2 = ["variants"],
8236
7820
  _excluded3 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
@@ -8660,7 +8244,7 @@ process.env.NODE_ENV !== "production" ? SvgIcon.propTypes /* remove-proptypes */
8660
8244
  SvgIcon.muiName = 'SvgIcon';
8661
8245
  var SvgIcon$1 = SvgIcon;
8662
8246
 
8663
- function createSvgIcon$1(path, displayName) {
8247
+ function createSvgIcon(path, displayName) {
8664
8248
  function Component(props, ref) {
8665
8249
  return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon$1, _extends$1({
8666
8250
  "data-testid": `${displayName}Icon`,
@@ -8678,127 +8262,45 @@ function createSvgIcon$1(path, displayName) {
8678
8262
  return /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(Component));
8679
8263
  }
8680
8264
 
8681
- // TODO: remove this export once ClassNameGenerator is stable
8682
- // eslint-disable-next-line @typescript-eslint/naming-convention
8683
- const unstable_ClassNameGenerator = {
8684
- configure: generator => {
8685
- if (process.env.NODE_ENV !== 'production') {
8686
- console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\n'));
8687
- }
8688
- ClassNameGenerator$1.configure(generator);
8689
- }
8690
- };
8691
-
8692
- var utils = /*#__PURE__*/Object.freeze({
8693
- __proto__: null,
8694
- capitalize: capitalize$1,
8695
- createChainedFunction: createChainedFunction,
8696
- createSvgIcon: createSvgIcon$1,
8697
- debounce: debounce,
8698
- deprecatedPropType: deprecatedPropType,
8699
- isMuiElement: isMuiElement,
8700
- ownerDocument: ownerDocument,
8701
- ownerWindow: ownerWindow,
8702
- requirePropFactory: requirePropFactory,
8703
- setRef: setRef,
8704
- unstable_ClassNameGenerator: unstable_ClassNameGenerator,
8705
- unstable_useEnhancedEffect: useEnhancedEffect$1,
8706
- unstable_useId: useId,
8707
- unsupportedProp: unsupportedProp,
8708
- useControlled: useControlled,
8709
- useEventCallback: useEventCallback,
8710
- useForkRef: useForkRef,
8711
- useIsFocusVisible: useIsFocusVisible
8712
- });
8713
-
8714
- var Email = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8265
+ var Email = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8715
8266
  d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"
8716
8267
  }), 'Email');
8717
8268
 
8718
- var Facebook = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8269
+ var Facebook = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8719
8270
  d: "M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"
8720
8271
  }), 'Facebook');
8721
8272
 
8722
- var Handyman = createSvgIcon$1([/*#__PURE__*/jsxRuntimeExports.jsx("path", {
8273
+ var Handyman = createSvgIcon([/*#__PURE__*/jsxRuntimeExports.jsx("path", {
8723
8274
  d: "m21.67 18.17-5.3-5.3h-.99l-2.54 2.54v.99l5.3 5.3c.39.39 1.02.39 1.41 0l2.12-2.12c.39-.38.39-1.02 0-1.41"
8724
8275
  }, "0"), /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8725
8276
  d: "m17.34 10.19 1.41-1.41 2.12 2.12c1.17-1.17 1.17-3.07 0-4.24l-3.54-3.54-1.41 1.41V1.71l-.7-.71-3.54 3.54.71.71h2.83l-1.41 1.41 1.06 1.06-2.89 2.89-4.13-4.13V5.06L4.83 2.04 2 4.87 5.03 7.9h1.41l4.13 4.13-.85.85H7.6l-5.3 5.3c-.39.39-.39 1.02 0 1.41l2.12 2.12c.39.39 1.02.39 1.41 0l5.3-5.3v-2.12l5.15-5.15z"
8726
8277
  }, "1")], 'Handyman');
8727
8278
 
8728
- var Instagram = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8279
+ var Instagram = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8729
8280
  d: "M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z"
8730
8281
  }), 'Instagram');
8731
8282
 
8732
- var PhoneEnabled = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8283
+ var OpenInNew = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8284
+ d: "M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"
8285
+ }), 'OpenInNew');
8286
+
8287
+ var PhoneEnabled = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8733
8288
  d: "m17.38 10.79-2.2-2.2c-.28-.28-.36-.67-.25-1.02.37-1.12.57-2.32.57-3.57 0-.55.45-1 1-1H20c.55 0 1 .45 1 1 0 9.39-7.61 17-17 17-.55 0-1-.45-1-1v-3.49c0-.55.45-1 1-1 1.24 0 2.45-.2 3.57-.57.35-.12.75-.03 1.02.24l2.2 2.2c2.83-1.45 5.15-3.76 6.59-6.59"
8734
8289
  }), 'PhoneEnabled');
8735
8290
 
8736
- var ThreeP = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8291
+ var ThreeP = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8737
8292
  d: "M20 2H4.01c-1.1 0-2 .9-2 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8 4c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m4 8H8v-.57c0-.81.48-1.53 1.22-1.85.85-.37 1.79-.58 2.78-.58.99 0 1.93.21 2.78.58.74.32 1.22 1.04 1.22 1.85z"
8738
8293
  }), 'ThreeP');
8739
8294
 
8740
- var WhatsApp = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8295
+ var WhatsApp = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8741
8296
  d: "M16.75 13.96c.25.13.41.2.46.3.06.11.04.61-.21 1.18-.2.56-1.24 1.1-1.7 1.12-.46.02-.47.36-2.96-.73-2.49-1.09-3.99-3.75-4.11-3.92-.12-.17-.96-1.38-.92-2.61.05-1.22.69-1.8.95-2.04.24-.26.51-.29.68-.26h.47c.15 0 .36-.06.55.45l.69 1.87c.06.13.1.28.01.44l-.27.41-.39.42c-.12.12-.26.25-.12.5.12.26.62 1.09 1.32 1.78.91.88 1.71 1.17 1.95 1.3.24.14.39.12.54-.04l.81-.94c.19-.25.35-.19.58-.11l1.67.88M12 2a10 10 0 0 1 10 10 10 10 0 0 1-10 10c-1.97 0-3.8-.57-5.35-1.55L2 22l1.55-4.65A9.969 9.969 0 0 1 2 12 10 10 0 0 1 12 2m0 2a8 8 0 0 0-8 8c0 1.72.54 3.31 1.46 4.61L4.5 19.5l2.89-.96A7.95 7.95 0 0 0 12 20a8 8 0 0 0 8-8 8 8 0 0 0-8-8z"
8742
8297
  }), 'WhatsApp');
8743
8298
 
8744
- var ArrowForward = {};
8745
-
8746
- var createSvgIcon = {};
8747
-
8748
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(utils);
8749
-
8750
- var hasRequiredCreateSvgIcon;
8751
-
8752
- function requireCreateSvgIcon () {
8753
- if (hasRequiredCreateSvgIcon) return createSvgIcon;
8754
- hasRequiredCreateSvgIcon = 1;
8755
- (function (exports) {
8756
- 'use client';
8757
-
8758
- Object.defineProperty(exports, "__esModule", {
8759
- value: true
8760
- });
8761
- Object.defineProperty(exports, "default", {
8762
- enumerable: true,
8763
- get: function () {
8764
- return _utils.createSvgIcon;
8765
- }
8766
- });
8767
- var _utils = require$$0;
8768
- } (createSvgIcon));
8769
- return createSvgIcon;
8770
- }
8771
-
8772
- var _interopRequireDefault$1 = interopRequireDefaultExports;
8773
- Object.defineProperty(ArrowForward, "__esModule", {
8774
- value: true
8775
- });
8776
- var default_1$1 = ArrowForward.default = void 0;
8777
- var _createSvgIcon$1 = _interopRequireDefault$1(requireCreateSvgIcon());
8778
- var _jsxRuntime$1 = jsxRuntimeExports;
8779
- default_1$1 = ArrowForward.default = (0, _createSvgIcon$1.default)( /*#__PURE__*/(0, _jsxRuntime$1.jsx)("path", {
8780
- d: "m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"
8781
- }), 'ArrowForward');
8782
-
8783
- var Message = {};
8784
-
8785
- var _interopRequireDefault = interopRequireDefaultExports;
8786
- Object.defineProperty(Message, "__esModule", {
8787
- value: true
8788
- });
8789
- var default_1 = Message.default = void 0;
8790
- var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
8791
- var _jsxRuntime = jsxRuntimeExports;
8792
- default_1 = Message.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
8793
- d: "M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-2 12H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z"
8794
- }), 'Message');
8795
-
8796
8299
  const ButtonsContainer = material.styled(material.Box)(({ theme }) => ({
8797
8300
  position: 'absolute',
8798
8301
  top: 8,
8799
8302
  right: 8,
8800
8303
  display: 'flex',
8801
- flexDirection: 'column',
8802
8304
  gap: 4,
8803
8305
  zIndex: 1,
8804
8306
  //@ts-ignore
@@ -8812,7 +8314,6 @@ const HeaderContainer = material.styled(material.Box)({
8812
8314
  flexDirection: 'column',
8813
8315
  alignItems: 'center',
8814
8316
  marginBottom: '16px',
8815
- position: 'relative',
8816
8317
  });
8817
8318
  const ContactAvatar = material.styled(material.Avatar)({
8818
8319
  width: 60,
@@ -8826,39 +8327,14 @@ const ContactName = material.styled(material.Typography)({
8826
8327
  maxWidth: 200,
8827
8328
  textAlign: 'center',
8828
8329
  });
8829
- const LoadingContainer = material.styled(material.Box)({
8830
- display: 'flex',
8831
- justifyContent: 'center',
8832
- alignItems: 'center',
8833
- width: 60,
8834
- height: 60,
8835
- marginBottom: 8,
8836
- });
8837
- const Header = ({ imgUrl, name, contactId, navigate, isLoading = false, onError, }) => {
8838
- const handleNavigation = React.useCallback((url) => (event) => {
8839
- try {
8840
- event.preventDefault();
8841
- event.stopPropagation();
8842
- if (!url) {
8843
- throw new Error('Navigation URL is required');
8844
- }
8845
- const isNewTab = event.ctrlKey || event.metaKey || event.button === 1; // Ctrl+Click, Cmd+Click, Middle Mouse
8846
- if (isNewTab) {
8847
- window.open(url, '_blank', 'noopener,noreferrer');
8848
- }
8849
- else {
8850
- navigate(url);
8851
- }
8852
- }
8853
- catch (error) {
8854
- onError?.(error instanceof Error ? error : new Error('Navigation failed'));
8855
- }
8856
- }, [navigate, onError]);
8857
- const handleNavigateToContacts = handleNavigation(`/a/contacts/contacts/${contactId}`);
8858
- const handleNavigateToConversations = handleNavigation('/a/conversations/conversations');
8859
- const displayName = name || 'Unknown Contact';
8860
- const avatarAlt = `Avatar for ${displayName}`;
8861
- return (jsxRuntimeExports.jsxs(HeaderContainer, { children: [jsxRuntimeExports.jsxs(ButtonsContainer, { children: [jsxRuntimeExports.jsx(SmallIconButton, { color: "info", size: "small", onClick: handleNavigateToContacts, disabled: !contactId, "aria-label": "View contact details", children: jsxRuntimeExports.jsx(default_1$1, { fontSize: "small" }) }), jsxRuntimeExports.jsx(SmallIconButton, { color: "info", size: "small", onClick: handleNavigateToConversations, "aria-label": "Go to conversations", children: jsxRuntimeExports.jsx(default_1, { fontSize: "small" }) })] }), isLoading ? (jsxRuntimeExports.jsx(LoadingContainer, { children: jsxRuntimeExports.jsx(material.CircularProgress, { size: 24 }) })) : (jsxRuntimeExports.jsx(ContactAvatar, { src: imgUrl, alt: avatarAlt, onError: () => onError?.(new Error('Failed to load avatar')) })), jsxRuntimeExports.jsx(ContactName, { variant: "h6", title: displayName, children: displayName })] }));
8330
+ const Header = ({ imgUrl, name, contactId, }) => {
8331
+ const handleOpenInNewTab = (event) => {
8332
+ event.preventDefault();
8333
+ event.stopPropagation();
8334
+ const url = `/a/contacts/contacts/${contactId}`;
8335
+ window.open(url, '_blank');
8336
+ };
8337
+ return (jsxRuntimeExports.jsxs(HeaderContainer, { children: [jsxRuntimeExports.jsx(ButtonsContainer, { children: jsxRuntimeExports.jsx(SmallIconButton, { color: "info", size: "small", onClick: handleOpenInNewTab, children: jsxRuntimeExports.jsx(OpenInNew, { fontSize: "small" }) }) }), jsxRuntimeExports.jsx(ContactAvatar, { src: imgUrl, alt: "Contact Avatar" }), jsxRuntimeExports.jsx(ContactName, { variant: "h6", children: name })] }));
8862
8338
  };
8863
8339
 
8864
8340
  const Container$1 = material.styled(material.Box)({
@@ -14707,7 +14183,7 @@ const Container = material.styled(material.Box)({
14707
14183
  alignItems: 'center',
14708
14184
  gap: 8,
14709
14185
  });
14710
- const SectionTitle$3 = material.styled(material.Typography)({
14186
+ const SectionTitle$1 = material.styled(material.Typography)({
14711
14187
  borderBottom: `1px solid lightgray`,
14712
14188
  width: '100%',
14713
14189
  });
@@ -14765,100 +14241,7 @@ const Properties = ({ properties, title }) => {
14765
14241
  }
14766
14242
  return value;
14767
14243
  };
14768
- return (jsxRuntimeExports.jsxs(Container, { children: [jsxRuntimeExports.jsx(SectionTitle$3, { fontWeight: "bold", gutterBottom: true, mt: 2, variant: "subtitle1", children: title }), properties?.map((property, i) => property.value.length > 0 && (jsxRuntimeExports.jsxs(PropertyItem, { children: [jsxRuntimeExports.jsx(PropertyIcon, {}), jsxRuntimeExports.jsxs(PropertyText, { children: [getPropertyTitle(property.nameKey), ":", ' ', formatPropertyValue(property.value, property.type)] })] }, i)))] }));
14769
- };
14770
-
14771
- const SectionTitle$2 = material.styled(material.Typography)({
14772
- fontWeight: 'bold',
14773
- marginBottom: '8px',
14774
- marginTop: '16px',
14775
- borderBottom: `1px solid lightgray`,
14776
- });
14777
- const TagContainer = material.styled(material.Box)({
14778
- marginBottom: 16,
14779
- });
14780
- const StyledChip = material.styled(material.Chip)(({ theme }) => ({
14781
- marginRight: 8,
14782
- marginBottom: 8,
14783
- backgroundColor: `${theme.palette.primary.main}b3`,
14784
- }));
14785
- const LabelsSection = ({ contactData, title }) => {
14786
- if (!contactData)
14787
- return null;
14788
- if (!contactData.tags?.length)
14789
- return null;
14790
- return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(SectionTitle$2, { gutterBottom: true, mt: 2, variant: "subtitle1", children: title }), jsxRuntimeExports.jsx(TagContainer, { children: contactData?.tags
14791
- ?.filter((tag) => tag.name?.trim())
14792
- .map((tag) => (jsxRuntimeExports.jsx(StyledChip, { label: tag.name, color: "primary", size: "small" }, tag.id))) })] }));
14793
- };
14794
-
14795
- /**
14796
- * Type guard to check if an object is an IContact
14797
- * @param obj The object to check
14798
- * @returns True if the object is an IContact
14799
- */
14800
- function isContact(obj) {
14801
- return (obj !== null &&
14802
- typeof obj === 'object' &&
14803
- typeof obj.id === 'string' &&
14804
- typeof obj.spaceId === 'string' &&
14805
- typeof obj.name === 'string' &&
14806
- typeof obj.firstName === 'string' &&
14807
- typeof obj.lastName === 'string' &&
14808
- Array.isArray(obj.phones) &&
14809
- Array.isArray(obj.emails) &&
14810
- 'origin' in obj &&
14811
- typeof obj.isSpam === 'boolean' &&
14812
- (!obj.businessId || typeof obj.businessId === 'string'));
14813
- }
14814
-
14815
- const SectionTitle$1 = material.styled(material.Typography)({
14816
- fontWeight: 'bold',
14817
- marginBottom: '8px',
14818
- marginTop: '16px',
14819
- borderBottom: `1px solid lightgray`,
14820
- });
14821
- const BusinessSection = ({ contactData, title }) => {
14822
- if (!contactData || !isContact(contactData))
14823
- return null;
14824
- return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(SectionTitle$1, { gutterBottom: true, mt: 2, variant: "subtitle1", children: title }), jsxRuntimeExports.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: contactData?.businessName })] }));
14825
- };
14826
-
14827
- /**
14828
- * Type guard to check if an object is an IBusiness
14829
- * @param obj The object to check
14830
- * @returns True if the object is an IBusiness
14831
- */
14832
- function isBusiness(obj) {
14833
- return (obj !== null &&
14834
- typeof obj === 'object' &&
14835
- typeof obj.id === 'string' &&
14836
- typeof obj.spaceId === 'string' &&
14837
- typeof obj.name === 'string' &&
14838
- Array.isArray(obj.membersId) &&
14839
- Array.isArray(obj.members) &&
14840
- Array.isArray(obj.phones) &&
14841
- Array.isArray(obj.emails) &&
14842
- typeof obj.imageUrl === 'string' &&
14843
- !('firstName' in obj) &&
14844
- !('lastName' in obj));
14845
- }
14846
-
14847
- // Components
14848
- const MemberItem = ({ name }) => {
14849
- return (jsxRuntimeExports.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: name }));
14850
- };
14851
-
14852
- const SectionTitle = material.styled(material.Typography)({
14853
- fontWeight: 'bold',
14854
- marginBottom: '8px',
14855
- marginTop: '16px',
14856
- borderBottom: `1px solid lightgray`,
14857
- });
14858
- const MembersSection = ({ contactData, title }) => {
14859
- if (!contactData || !isBusiness(contactData) || !contactData.members?.length)
14860
- return null;
14861
- return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(SectionTitle, { gutterBottom: true, mt: 2, variant: "subtitle1", children: title }), jsxRuntimeExports.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: contactData?.members.map((member) => (jsxRuntimeExports.jsx(MemberItem, { name: member.name }, member.id))) })] }));
14244
+ return (jsxRuntimeExports.jsxs(Container, { children: [jsxRuntimeExports.jsx(SectionTitle$1, { fontWeight: "bold", gutterBottom: true, mt: 2, variant: "subtitle1", children: title }), properties?.map((property, i) => property.value.length > 0 && (jsxRuntimeExports.jsxs(PropertyItem, { children: [jsxRuntimeExports.jsx(PropertyIcon, {}), jsxRuntimeExports.jsxs(PropertyText, { children: [getPropertyTitle(property.nameKey), ":", ' ', formatPropertyValue(property.value, property.type)] })] }, i)))] }));
14862
14245
  };
14863
14246
 
14864
14247
  const PopupContainer = material.styled(material.Box)(({ theme }) => ({
@@ -14888,17 +14271,28 @@ const PopupContainer = material.styled(material.Box)(({ theme }) => ({
14888
14271
  background: '#616161',
14889
14272
  },
14890
14273
  }));
14891
- const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl, navigate, t = (key) => ({
14274
+ const SectionTitle = material.styled(material.Typography)({
14275
+ fontWeight: 'bold',
14276
+ marginBottom: '8px',
14277
+ marginTop: '16px',
14278
+ borderBottom: `1px solid lightgray`,
14279
+ });
14280
+ const TagContainer = material.styled(material.Box)({
14281
+ marginBottom: 16,
14282
+ });
14283
+ const StyledChip = material.styled(material.Chip)(({ theme }) => ({
14284
+ marginRight: 8,
14285
+ marginBottom: 8,
14286
+ backgroundColor: `${theme.palette.primary.main}b3`
14287
+ }));
14288
+ const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl, t = (key) => ({
14892
14289
  labels: 'Etiquetas',
14893
14290
  phone: 'Teléfono',
14894
14291
  business: 'Empresa',
14895
- businessMembers: 'Miembros de la empresa',
14896
14292
  properties: 'Propiedades',
14897
14293
  view: 'Ver',
14898
- email: 'Correo Electrónico',
14294
+ 'E-mail Address': 'Correo Electrónico'
14899
14295
  }[key] || key), }) => {
14900
- const dataIsBusiness = isBusiness(contactData);
14901
- const dataIsContact = isContact(contactData);
14902
14296
  const contactMethods = [
14903
14297
  {
14904
14298
  icon: jsxRuntimeExports.jsx(PhoneEnabled, { fontSize: "small" }),
@@ -14908,7 +14302,7 @@ const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl,
14908
14302
  },
14909
14303
  {
14910
14304
  icon: jsxRuntimeExports.jsx(Email, { fontSize: "small" }),
14911
- title: t('email'),
14305
+ title: t('E-mail Address'),
14912
14306
  contactList: contactData?.emails || [],
14913
14307
  showTitle: true,
14914
14308
  },
@@ -14947,7 +14341,7 @@ const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl,
14947
14341
  window.removeEventListener('keydown', handleKeyDown);
14948
14342
  };
14949
14343
  }, [open, onClose]);
14950
- return (jsxRuntimeExports.jsx(material.Popper, { sx: { zIndex: 1300 }, open: open, anchorEl: anchorEl, placement: "bottom-start", "data-popper-child": "true", children: jsxRuntimeExports.jsx(material.ClickAwayListener, { onClickAway: onClose, children: jsxRuntimeExports.jsx(PopupContainer, { children: jsxRuntimeExports.jsxs(material.CardContent, { children: [jsxRuntimeExports.jsx(Header, { navigate: navigate, contactId: contactData?.id, imgUrl: avatarImgUrl, name: contactData?.name }), jsxRuntimeExports.jsx(LabelsSection, { contactData: contactData, title: t('labels') }), dataIsContact && (jsxRuntimeExports.jsx(BusinessSection, { contactData: contactData, title: t('business') })), dataIsBusiness && (jsxRuntimeExports.jsx(MembersSection, { contactData: contactData, title: t('businessMembers') })), contactMethods.map((method, index) => (jsxRuntimeExports.jsx(ContactMethod, { icon: method.icon, title: method.title, contactList: method.contactList, showTitle: method.showTitle }, index))), jsxRuntimeExports.jsx(Properties, { properties: contactData?.properties, title: t('properties') })] }) }) }) }));
14344
+ return (jsxRuntimeExports.jsx(material.Popper, { sx: { zIndex: 1300 }, open: open, anchorEl: anchorEl, placement: "bottom-start", "data-popper-child": "true", children: jsxRuntimeExports.jsx(material.ClickAwayListener, { onClickAway: onClose, children: jsxRuntimeExports.jsx(PopupContainer, { children: jsxRuntimeExports.jsxs(material.CardContent, { children: [jsxRuntimeExports.jsx(Header, { contactId: contactData?.id, imgUrl: avatarImgUrl, name: contactData?.name }), jsxRuntimeExports.jsx(SectionTitle, { gutterBottom: true, mt: 2, variant: "subtitle1", children: t('labels') }), jsxRuntimeExports.jsx(TagContainer, { children: contactData?.tags?.map((tag) => (jsxRuntimeExports.jsx(StyledChip, { label: tag.name, color: "primary", size: "small" }, tag.id))) }), jsxRuntimeExports.jsx(SectionTitle, { gutterBottom: true, mt: 2, variant: "subtitle1", children: t('business') }), jsxRuntimeExports.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: contactData?.businessName }), contactMethods.map((method, index) => (jsxRuntimeExports.jsx(ContactMethod, { icon: method.icon, title: method.title, contactList: method.contactList, showTitle: method.showTitle }, index))), jsxRuntimeExports.jsx(Properties, { properties: contactData?.properties, title: t('properties') })] }) }) }) }));
14951
14345
  };
14952
14346
 
14953
14347
  exports.ContactInfoPopup = ContactInfoPopup;