@trii/components 2.0.8 → 2.0.10

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 (39) hide show
  1. package/dist/cjs/index.js +617 -40
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +4 -3
  4. package/dist/cjs/types/components/ContactInfoPopup/components/BusinessSection/BusinessSection.d.ts +7 -0
  5. package/dist/cjs/types/components/ContactInfoPopup/components/BusinessSection/index.d.ts +1 -0
  6. package/dist/cjs/types/components/ContactInfoPopup/components/Header/Header.d.ts +2 -1
  7. package/dist/cjs/types/components/ContactInfoPopup/components/LabelsSection/LabelsSection.d.ts +7 -0
  8. package/dist/cjs/types/components/ContactInfoPopup/components/LabelsSection/index.d.ts +1 -0
  9. package/dist/cjs/types/components/ContactInfoPopup/components/MemberItem/MemberItem.d.ts +5 -0
  10. package/dist/cjs/types/components/ContactInfoPopup/components/MemberItem/index.d.ts +1 -0
  11. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/MembersSection.d.ts +7 -0
  12. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/MemberItem.d.ts +4 -0
  13. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/index.d.ts +1 -0
  14. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/components/index.d.ts +1 -0
  15. package/dist/cjs/types/components/ContactInfoPopup/components/MembersSection/index.d.ts +1 -0
  16. package/dist/cjs/types/components/ContactInfoPopup/components/index.d.ts +3 -0
  17. package/dist/cjs/types/components/ContactInfoPopup/types/is-business.typeguard.d.ts +7 -0
  18. package/dist/cjs/types/components/ContactInfoPopup/types/is-contact.typeguard.d.ts +7 -0
  19. package/dist/esm/index.js +617 -40
  20. package/dist/esm/index.js.map +1 -1
  21. package/dist/esm/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +4 -3
  22. package/dist/esm/types/components/ContactInfoPopup/components/BusinessSection/BusinessSection.d.ts +7 -0
  23. package/dist/esm/types/components/ContactInfoPopup/components/BusinessSection/index.d.ts +1 -0
  24. package/dist/esm/types/components/ContactInfoPopup/components/Header/Header.d.ts +2 -1
  25. package/dist/esm/types/components/ContactInfoPopup/components/LabelsSection/LabelsSection.d.ts +7 -0
  26. package/dist/esm/types/components/ContactInfoPopup/components/LabelsSection/index.d.ts +1 -0
  27. package/dist/esm/types/components/ContactInfoPopup/components/MemberItem/MemberItem.d.ts +5 -0
  28. package/dist/esm/types/components/ContactInfoPopup/components/MemberItem/index.d.ts +1 -0
  29. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/MembersSection.d.ts +7 -0
  30. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/MemberItem.d.ts +4 -0
  31. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/components/MemberItem/index.d.ts +1 -0
  32. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/components/index.d.ts +1 -0
  33. package/dist/esm/types/components/ContactInfoPopup/components/MembersSection/index.d.ts +1 -0
  34. package/dist/esm/types/components/ContactInfoPopup/components/index.d.ts +3 -0
  35. package/dist/esm/types/components/ContactInfoPopup/types/is-business.typeguard.d.ts +7 -0
  36. package/dist/esm/types/components/ContactInfoPopup/types/is-contact.typeguard.d.ts +7 -0
  37. package/dist/index.d.ts +4 -3
  38. package/package.json +99 -99
  39. package/readme +71 -71
package/dist/cjs/index.js CHANGED
@@ -3042,6 +3042,422 @@ 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
+
3045
3461
  /**
3046
3462
  * Add keys, values of `defaultProps` that does not exist in `props`
3047
3463
  * @param {object} defaultProps
@@ -6655,7 +7071,7 @@ var require$$1 = /*@__PURE__*/getAugmentedNamespace(formatMuiErrorMessage);
6655
7071
 
6656
7072
  var require$$2 = /*@__PURE__*/getAugmentedNamespace(clamp);
6657
7073
 
6658
- var _interopRequireDefault$1 = interopRequireDefaultExports;
7074
+ var _interopRequireDefault$2 = interopRequireDefaultExports;
6659
7075
  Object.defineProperty(colorManipulator, "__esModule", {
6660
7076
  value: true
6661
7077
  });
@@ -6677,8 +7093,8 @@ colorManipulator.private_safeEmphasize = private_safeEmphasize;
6677
7093
  colorManipulator.private_safeLighten = private_safeLighten;
6678
7094
  colorManipulator.recomposeColor = recomposeColor;
6679
7095
  colorManipulator.rgbToHex = rgbToHex;
6680
- var _formatMuiErrorMessage2 = _interopRequireDefault$1(require$$1);
6681
- var _clamp = _interopRequireDefault$1(require$$2);
7096
+ var _formatMuiErrorMessage2 = _interopRequireDefault$2(require$$1);
7097
+ var _clamp = _interopRequireDefault$2(require$$2);
6682
7098
  /* eslint-disable @typescript-eslint/naming-convention */
6683
7099
 
6684
7100
  /**
@@ -7800,21 +8216,21 @@ var require$$7 = /*@__PURE__*/getAugmentedNamespace(createTheme$1);
7800
8216
 
7801
8217
  var require$$8 = /*@__PURE__*/getAugmentedNamespace(styleFunctionSx);
7802
8218
 
7803
- var _interopRequireDefault = interopRequireDefaultExports;
8219
+ var _interopRequireDefault$1 = interopRequireDefaultExports;
7804
8220
  Object.defineProperty(createStyled$1, "__esModule", {
7805
8221
  value: true
7806
8222
  });
7807
8223
  var _default = createStyled$1.default = createStyled;
7808
8224
  createStyled$1.shouldForwardProp = shouldForwardProp;
7809
8225
  createStyled$1.systemDefaultTheme = void 0;
7810
- var _extends2 = _interopRequireDefault(require_extends());
7811
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(requireObjectWithoutPropertiesLoose());
8226
+ var _extends2 = _interopRequireDefault$1(require_extends());
8227
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault$1(requireObjectWithoutPropertiesLoose());
7812
8228
  var _styledEngine = _interopRequireWildcard(require$$3);
7813
8229
  var _deepmerge = require$$4;
7814
- var _capitalize = _interopRequireDefault(require$$5);
7815
- var _getDisplayName = _interopRequireDefault(require$$6);
7816
- var _createTheme = _interopRequireDefault(require$$7);
7817
- var _styleFunctionSx = _interopRequireDefault(require$$8);
8230
+ var _capitalize = _interopRequireDefault$1(require$$5);
8231
+ var _getDisplayName = _interopRequireDefault$1(require$$6);
8232
+ var _createTheme = _interopRequireDefault$1(require$$7);
8233
+ var _styleFunctionSx = _interopRequireDefault$1(require$$8);
7818
8234
  const _excluded$1 = ["ownerState"],
7819
8235
  _excluded2 = ["variants"],
7820
8236
  _excluded3 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
@@ -8244,7 +8660,7 @@ process.env.NODE_ENV !== "production" ? SvgIcon.propTypes /* remove-proptypes */
8244
8660
  SvgIcon.muiName = 'SvgIcon';
8245
8661
  var SvgIcon$1 = SvgIcon;
8246
8662
 
8247
- function createSvgIcon(path, displayName) {
8663
+ function createSvgIcon$1(path, displayName) {
8248
8664
  function Component(props, ref) {
8249
8665
  return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon$1, _extends$1({
8250
8666
  "data-testid": `${displayName}Icon`,
@@ -8262,45 +8678,118 @@ function createSvgIcon(path, displayName) {
8262
8678
  return /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(Component));
8263
8679
  }
8264
8680
 
8265
- var Email = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
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", {
8266
8715
  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"
8267
8716
  }), 'Email');
8268
8717
 
8269
- var Facebook = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8718
+ var Facebook = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8270
8719
  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"
8271
8720
  }), 'Facebook');
8272
8721
 
8273
- var Handyman = createSvgIcon([/*#__PURE__*/jsxRuntimeExports.jsx("path", {
8722
+ var Handyman = createSvgIcon$1([/*#__PURE__*/jsxRuntimeExports.jsx("path", {
8274
8723
  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"
8275
8724
  }, "0"), /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8276
8725
  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"
8277
8726
  }, "1")], 'Handyman');
8278
8727
 
8279
- var Instagram = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8728
+ var Instagram = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8280
8729
  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"
8281
8730
  }), 'Instagram');
8282
8731
 
8283
- var OpenInNew = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8732
+ var OpenInNew = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8284
8733
  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
8734
  }), 'OpenInNew');
8286
8735
 
8287
- var PhoneEnabled = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8736
+ var PhoneEnabled = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8288
8737
  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"
8289
8738
  }), 'PhoneEnabled');
8290
8739
 
8291
- var ThreeP = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8740
+ var ThreeP = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8292
8741
  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"
8293
8742
  }), 'ThreeP');
8294
8743
 
8295
- var WhatsApp = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8744
+ var WhatsApp = createSvgIcon$1( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
8296
8745
  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"
8297
8746
  }), 'WhatsApp');
8298
8747
 
8748
+ var Message = {};
8749
+
8750
+ var createSvgIcon = {};
8751
+
8752
+ var require$$0 = /*@__PURE__*/getAugmentedNamespace(utils);
8753
+
8754
+ var hasRequiredCreateSvgIcon;
8755
+
8756
+ function requireCreateSvgIcon () {
8757
+ if (hasRequiredCreateSvgIcon) return createSvgIcon;
8758
+ hasRequiredCreateSvgIcon = 1;
8759
+ (function (exports) {
8760
+ 'use client';
8761
+
8762
+ Object.defineProperty(exports, "__esModule", {
8763
+ value: true
8764
+ });
8765
+ Object.defineProperty(exports, "default", {
8766
+ enumerable: true,
8767
+ get: function () {
8768
+ return _utils.createSvgIcon;
8769
+ }
8770
+ });
8771
+ var _utils = require$$0;
8772
+ } (createSvgIcon));
8773
+ return createSvgIcon;
8774
+ }
8775
+
8776
+ var _interopRequireDefault = interopRequireDefaultExports;
8777
+ Object.defineProperty(Message, "__esModule", {
8778
+ value: true
8779
+ });
8780
+ var default_1 = Message.default = void 0;
8781
+ var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
8782
+ var _jsxRuntime = jsxRuntimeExports;
8783
+ default_1 = Message.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
8784
+ 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"
8785
+ }), 'Message');
8786
+
8299
8787
  const ButtonsContainer = material.styled(material.Box)(({ theme }) => ({
8300
8788
  position: 'absolute',
8301
8789
  top: 8,
8302
8790
  right: 8,
8303
8791
  display: 'flex',
8792
+ flexDirection: 'column',
8304
8793
  gap: 4,
8305
8794
  zIndex: 1,
8306
8795
  //@ts-ignore
@@ -8327,14 +8816,21 @@ const ContactName = material.styled(material.Typography)({
8327
8816
  maxWidth: 200,
8328
8817
  textAlign: 'center',
8329
8818
  });
8330
- const Header = ({ imgUrl, name, contactId, }) => {
8819
+ const Header = ({ imgUrl, name, contactId, navigate }) => {
8331
8820
  const handleOpenInNewTab = (event) => {
8332
8821
  event.preventDefault();
8333
8822
  event.stopPropagation();
8334
8823
  const url = `/a/contacts/contacts/${contactId}`;
8335
8824
  window.open(url, '_blank');
8336
8825
  };
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 })] }));
8826
+ const handleNavigateToConversations = (event) => {
8827
+ event.preventDefault();
8828
+ event.stopPropagation();
8829
+ const url = `/a/conversations/conversations`;
8830
+ // Navigate in the same tab
8831
+ navigate(url);
8832
+ };
8833
+ return (jsxRuntimeExports.jsxs(HeaderContainer, { children: [jsxRuntimeExports.jsxs(ButtonsContainer, { children: [jsxRuntimeExports.jsx(SmallIconButton, { color: "info", size: "small", onClick: handleOpenInNewTab, children: jsxRuntimeExports.jsx(OpenInNew, { fontSize: "small" }) }), jsxRuntimeExports.jsx(SmallIconButton, { color: "info", size: "small", onClick: handleNavigateToConversations, children: jsxRuntimeExports.jsx(default_1, { fontSize: "small" }) })] }), jsxRuntimeExports.jsx(ContactAvatar, { src: imgUrl, alt: "Contact Avatar" }), jsxRuntimeExports.jsx(ContactName, { variant: "h6", children: name })] }));
8338
8834
  };
8339
8835
 
8340
8836
  const Container$1 = material.styled(material.Box)({
@@ -14183,7 +14679,7 @@ const Container = material.styled(material.Box)({
14183
14679
  alignItems: 'center',
14184
14680
  gap: 8,
14185
14681
  });
14186
- const SectionTitle$1 = material.styled(material.Typography)({
14682
+ const SectionTitle$3 = material.styled(material.Typography)({
14187
14683
  borderBottom: `1px solid lightgray`,
14188
14684
  width: '100%',
14189
14685
  });
@@ -14241,7 +14737,98 @@ const Properties = ({ properties, title }) => {
14241
14737
  }
14242
14738
  return value;
14243
14739
  };
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)))] }));
14740
+ 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)))] }));
14741
+ };
14742
+
14743
+ const SectionTitle$2 = material.styled(material.Typography)({
14744
+ fontWeight: 'bold',
14745
+ marginBottom: '8px',
14746
+ marginTop: '16px',
14747
+ borderBottom: `1px solid lightgray`,
14748
+ });
14749
+ const TagContainer = material.styled(material.Box)({
14750
+ marginBottom: 16,
14751
+ });
14752
+ const StyledChip = material.styled(material.Chip)(({ theme }) => ({
14753
+ marginRight: 8,
14754
+ marginBottom: 8,
14755
+ backgroundColor: `${theme.palette.primary.main}b3`,
14756
+ }));
14757
+ const LabelsSection = ({ contactData, title }) => {
14758
+ if (!contactData)
14759
+ return null;
14760
+ if (!contactData.tags?.length)
14761
+ return null;
14762
+ return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(SectionTitle$2, { gutterBottom: true, mt: 2, variant: "subtitle1", children: title }), jsxRuntimeExports.jsx(TagContainer, { children: contactData?.tags?.map((tag) => (jsxRuntimeExports.jsx(StyledChip, { label: tag.name, color: "primary", size: "small" }, tag.id))) })] }));
14763
+ };
14764
+
14765
+ /**
14766
+ * Type guard to check if an object is an IContact
14767
+ * @param obj The object to check
14768
+ * @returns True if the object is an IContact
14769
+ */
14770
+ function isContact(obj) {
14771
+ return (obj !== null &&
14772
+ typeof obj === 'object' &&
14773
+ typeof obj.id === 'string' &&
14774
+ typeof obj.spaceId === 'string' &&
14775
+ typeof obj.name === 'string' &&
14776
+ typeof obj.firstName === 'string' &&
14777
+ typeof obj.lastName === 'string' &&
14778
+ Array.isArray(obj.phones) &&
14779
+ Array.isArray(obj.emails) &&
14780
+ 'origin' in obj &&
14781
+ typeof obj.isSpam === 'boolean' &&
14782
+ (!obj.businessId || typeof obj.businessId === 'string'));
14783
+ }
14784
+
14785
+ const SectionTitle$1 = material.styled(material.Typography)({
14786
+ fontWeight: 'bold',
14787
+ marginBottom: '8px',
14788
+ marginTop: '16px',
14789
+ borderBottom: `1px solid lightgray`,
14790
+ });
14791
+ const BusinessSection = ({ contactData, title }) => {
14792
+ if (!contactData || !isContact(contactData))
14793
+ return null;
14794
+ 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 })] }));
14795
+ };
14796
+
14797
+ /**
14798
+ * Type guard to check if an object is an IBusiness
14799
+ * @param obj The object to check
14800
+ * @returns True if the object is an IBusiness
14801
+ */
14802
+ function isBusiness(obj) {
14803
+ return (obj !== null &&
14804
+ typeof obj === 'object' &&
14805
+ typeof obj.id === 'string' &&
14806
+ typeof obj.spaceId === 'string' &&
14807
+ typeof obj.name === 'string' &&
14808
+ Array.isArray(obj.membersId) &&
14809
+ Array.isArray(obj.members) &&
14810
+ Array.isArray(obj.phones) &&
14811
+ Array.isArray(obj.emails) &&
14812
+ typeof obj.imageUrl === 'string' &&
14813
+ !('firstName' in obj) &&
14814
+ !('lastName' in obj));
14815
+ }
14816
+
14817
+ // Components
14818
+ const MemberItem = ({ name }) => {
14819
+ return (jsxRuntimeExports.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: name }));
14820
+ };
14821
+
14822
+ const SectionTitle = material.styled(material.Typography)({
14823
+ fontWeight: 'bold',
14824
+ marginBottom: '8px',
14825
+ marginTop: '16px',
14826
+ borderBottom: `1px solid lightgray`,
14827
+ });
14828
+ const MembersSection = ({ contactData, title }) => {
14829
+ if (!contactData || !isBusiness(contactData) || !contactData.members?.length)
14830
+ return null;
14831
+ 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))) })] }));
14245
14832
  };
14246
14833
 
14247
14834
  const PopupContainer = material.styled(material.Box)(({ theme }) => ({
@@ -14271,27 +14858,17 @@ const PopupContainer = material.styled(material.Box)(({ theme }) => ({
14271
14858
  background: '#616161',
14272
14859
  },
14273
14860
  }));
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) => ({
14861
+ const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl, navigate, t = (key) => ({
14289
14862
  labels: 'Etiquetas',
14290
14863
  phone: 'Teléfono',
14291
14864
  business: 'Empresa',
14865
+ businessMembers: 'Miembros de la empresa',
14292
14866
  properties: 'Propiedades',
14293
14867
  view: 'Ver',
14868
+ email: 'Correo Electrónico',
14294
14869
  }[key] || key), }) => {
14870
+ const dataIsBusiness = isBusiness(contactData);
14871
+ const dataIsContact = isContact(contactData);
14295
14872
  const contactMethods = [
14296
14873
  {
14297
14874
  icon: jsxRuntimeExports.jsx(PhoneEnabled, { fontSize: "small" }),
@@ -14301,7 +14878,7 @@ const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl,
14301
14878
  },
14302
14879
  {
14303
14880
  icon: jsxRuntimeExports.jsx(Email, { fontSize: "small" }),
14304
- title: t('conversations.contactInfo.email'),
14881
+ title: t('email'),
14305
14882
  contactList: contactData?.emails || [],
14306
14883
  showTitle: true,
14307
14884
  },
@@ -14340,7 +14917,7 @@ const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl,
14340
14917
  window.removeEventListener('keydown', handleKeyDown);
14341
14918
  };
14342
14919
  }, [open, onClose]);
14343
- 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') })] }) }) }) }));
14920
+ 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
14921
  };
14345
14922
 
14346
14923
  exports.ContactInfoPopup = ContactInfoPopup;