@planningcenter/chat-react-native 3.2.0-rc.13 → 3.2.0-rc.15

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 (115) hide show
  1. package/build/components/display/banner.d.ts +6 -1
  2. package/build/components/display/banner.d.ts.map +1 -1
  3. package/build/components/display/banner.js +2 -2
  4. package/build/components/display/banner.js.map +1 -1
  5. package/build/components/display/banner_collapsible.d.ts +1 -1
  6. package/build/components/display/banner_collapsible.d.ts.map +1 -1
  7. package/build/components/display/banner_collapsible.js +2 -2
  8. package/build/components/display/banner_collapsible.js.map +1 -1
  9. package/build/components/display/child_notice.d.ts +3 -1
  10. package/build/components/display/child_notice.d.ts.map +1 -1
  11. package/build/components/display/child_notice.js +2 -2
  12. package/build/components/display/child_notice.js.map +1 -1
  13. package/build/components/primitive/banner_primitive.d.ts +3 -0
  14. package/build/components/primitive/banner_primitive.d.ts.map +1 -1
  15. package/build/components/primitive/banner_primitive.js +4 -4
  16. package/build/components/primitive/banner_primitive.js.map +1 -1
  17. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +12 -0
  18. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
  19. package/build/hooks/groups/use_group_members_for_new_conversation.js +4 -0
  20. package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
  21. package/build/navigation/index.d.ts +30 -22
  22. package/build/navigation/index.d.ts.map +1 -1
  23. package/build/navigation/index.js +5 -2
  24. package/build/navigation/index.js.map +1 -1
  25. package/build/screens/conversation_details_screen.js +2 -2
  26. package/build/screens/conversation_details_screen.js.map +1 -1
  27. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +10 -0
  28. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -0
  29. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +74 -0
  30. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -0
  31. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +10 -0
  32. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -0
  33. package/build/screens/conversation_filter_recipients/components/header_row.js +69 -0
  34. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -0
  35. package/build/screens/conversation_filter_recipients/components/navigation_header.d.ts +5 -0
  36. package/build/screens/conversation_filter_recipients/components/navigation_header.d.ts.map +1 -0
  37. package/build/screens/conversation_filter_recipients/components/navigation_header.js +46 -0
  38. package/build/screens/conversation_filter_recipients/components/navigation_header.js.map +1 -0
  39. package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.d.ts +17 -0
  40. package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.d.ts.map +1 -0
  41. package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.js +37 -0
  42. package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.js.map +1 -0
  43. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -3
  44. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  45. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +66 -32
  46. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  47. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.d.ts +10 -0
  48. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.d.ts.map +1 -0
  49. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.js +32 -0
  50. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.js.map +1 -0
  51. package/build/screens/conversation_filter_recipients/types.d.ts +38 -0
  52. package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -0
  53. package/build/screens/conversation_filter_recipients/types.js +6 -0
  54. package/build/screens/conversation_filter_recipients/types.js.map +1 -0
  55. package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.d.ts +3 -0
  56. package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.d.ts.map +1 -0
  57. package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.js +133 -0
  58. package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.js.map +1 -0
  59. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  60. package/build/screens/conversation_new/components/groups_form.js +9 -5
  61. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  62. package/build/screens/conversation_new/components/team_form.d.ts +1 -1
  63. package/build/screens/conversation_new/components/team_form.js.map +1 -1
  64. package/build/screens/conversation_new/conversation_new_screen.d.ts +4 -1
  65. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  66. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  67. package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts +5 -2
  68. package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts.map +1 -1
  69. package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js +3 -2
  70. package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +1 -1
  71. package/build/screens/conversations/conversations_screen.d.ts +2 -1
  72. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  73. package/build/screens/conversations/conversations_screen.js +32 -1
  74. package/build/screens/conversations/conversations_screen.js.map +1 -1
  75. package/build/utils/destructure_chat_group_graph_id.d.ts +10 -0
  76. package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -0
  77. package/build/utils/destructure_chat_group_graph_id.js +8 -0
  78. package/build/utils/destructure_chat_group_graph_id.js.map +1 -0
  79. package/build/utils/index.d.ts +1 -0
  80. package/build/utils/index.d.ts.map +1 -1
  81. package/build/utils/index.js +1 -0
  82. package/build/utils/index.js.map +1 -1
  83. package/build/vendor/tapestry/alias_tokens_color_map.d.ts +2 -0
  84. package/build/vendor/tapestry/alias_tokens_color_map.d.ts.map +1 -1
  85. package/build/vendor/tapestry/alias_tokens_color_map.js +2 -0
  86. package/build/vendor/tapestry/alias_tokens_color_map.js.map +1 -1
  87. package/package.json +2 -2
  88. package/src/components/display/banner.tsx +7 -1
  89. package/src/components/display/banner_collapsible.tsx +6 -1
  90. package/src/components/display/child_notice.tsx +9 -3
  91. package/src/components/primitive/banner_primitive.tsx +12 -5
  92. package/src/hooks/groups/use_group_members_for_new_conversation.ts +5 -0
  93. package/src/navigation/index.tsx +10 -2
  94. package/src/screens/conversation_details_screen.tsx +2 -2
  95. package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +101 -0
  96. package/src/screens/conversation_filter_recipients/components/header_row.tsx +99 -0
  97. package/src/screens/conversation_filter_recipients/components/navigation_header.tsx +68 -0
  98. package/src/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.tsx +53 -0
  99. package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +89 -49
  100. package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.tsx +50 -0
  101. package/src/screens/conversation_filter_recipients/types.tsx +47 -0
  102. package/src/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.ts +134 -0
  103. package/src/screens/conversation_new/components/groups_form.tsx +16 -6
  104. package/src/screens/conversation_new/components/team_form.tsx +1 -1
  105. package/src/screens/conversation_new/conversation_new_screen.tsx +4 -1
  106. package/src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx +9 -3
  107. package/src/screens/conversations/conversations_screen.tsx +37 -2
  108. package/src/utils/destructure_chat_group_graph_id.ts +25 -0
  109. package/src/utils/index.ts +1 -0
  110. package/src/vendor/tapestry/alias_tokens_color_map.ts +3 -0
  111. package/build/screens/conversation_new/components/member_error_card.d.ts +0 -5
  112. package/build/screens/conversation_new/components/member_error_card.d.ts.map +0 -1
  113. package/build/screens/conversation_new/components/member_error_card.js +0 -17
  114. package/build/screens/conversation_new/components/member_error_card.js.map +0 -1
  115. package/src/screens/conversation_new/components/member_error_card.tsx +0 -20
@@ -1,5 +1,6 @@
1
1
  import React, { ReactElement } from 'react';
2
2
  import { type BannerStatusIconProps, type BannerRootProps } from '../primitive/banner_primitive';
3
+ import { ViewStyle } from 'react-native';
3
4
  type descriptionUnion = string | ReactElement | undefined;
4
5
  export interface BannerProps {
5
6
  /**
@@ -24,8 +25,12 @@ export interface BannerProps {
24
25
  * Hides the status icon. By default, the status icon is shown.
25
26
  */
26
27
  showIcon?: boolean;
28
+ /**
29
+ * Adds a style to the banner.
30
+ */
31
+ style?: ViewStyle;
27
32
  }
28
- export declare function Banner({ appearance, description, heading, iconName, showIcon, }: BannerProps): React.JSX.Element | null;
33
+ export declare function Banner({ appearance, description, heading, iconName, showIcon, style, }: BannerProps): React.JSX.Element | null;
29
34
  export declare function ConditionalDescription({ description }: {
30
35
  description: descriptionUnion;
31
36
  }): React.JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/display/banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkB,YAAY,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAwB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAA;AAEtC,KAAK,gBAAgB,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,CAAA;AAEzD,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;IAC1C;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAA;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,MAAM,CAAC,EACrB,UAAU,EACV,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAe,GAChB,EAAE,WAAW,4BAcb;AAED,wBAAgB,sBAAsB,CAAC,EAAE,WAAW,EAAE,EAAE;IAAE,WAAW,EAAE,gBAAgB,CAAA;CAAE,4BASxF"}
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../src/components/display/banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkB,YAAY,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAwB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,KAAK,gBAAgB,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,CAAA;AAEzD,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;IAC1C;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAA;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,wBAAgB,MAAM,CAAC,EACrB,UAAU,EACV,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAe,EACf,KAAK,GACN,EAAE,WAAW,4BAcb;AAED,wBAAgB,sBAAsB,CAAC,EAAE,WAAW,EAAE,EAAE;IAAE,WAAW,EAAE,gBAAgB,CAAA;CAAE,4BASxF"}
@@ -1,10 +1,10 @@
1
1
  import React, { isValidElement } from 'react';
2
2
  import BannerPrimitive from '../primitive/banner_primitive';
3
- export function Banner({ appearance, description, heading, iconName, showIcon = true, }) {
3
+ export function Banner({ appearance, description, heading, iconName, showIcon = true, style, }) {
4
4
  if (!description && !heading)
5
5
  return null;
6
6
  return (<BannerPrimitive.Root appearance={appearance}>
7
- <BannerPrimitive.StaticLayout>
7
+ <BannerPrimitive.StaticLayout style={style}>
8
8
  {showIcon && <BannerPrimitive.StatusIcon iconName={iconName}/>}
9
9
  <BannerPrimitive.Content>
10
10
  {Boolean(heading) && <BannerPrimitive.Heading>{heading}</BannerPrimitive.Heading>}
@@ -1 +1 @@
1
- {"version":3,"file":"banner.js","sourceRoot":"","sources":["../../../src/components/display/banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAgB,MAAM,OAAO,CAAA;AAC3D,OAAO,eAGN,MAAM,+BAA+B,CAAA;AA6BtC,MAAM,UAAU,MAAM,CAAC,EACrB,UAAU,EACV,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,GAAG,IAAI,GACH;IACZ,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzC,OAAO,CACL,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAC3C;MAAA,CAAC,eAAe,CAAC,YAAY,CAC3B;QAAA,CAAC,QAAQ,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CAC/D;QAAA,CAAC,eAAe,CAAC,OAAO,CACtB;UAAA,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CACjF;UAAA,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,EACnD;QAAA,EAAE,eAAe,CAAC,OAAO,CAC3B;MAAA,EAAE,eAAe,CAAC,YAAY,CAChC;IAAA,EAAE,eAAe,CAAC,IAAI,CAAC,CACxB,CAAA;AACH,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,EAAE,WAAW,EAAqC;IACvF,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,WAAW,KAAK,SAAS;YAC5B,OAAO,IAAI,CAAA;QACb,KAAK,cAAc,CAAC,WAAW,CAAC;YAC9B,OAAO,WAAW,CAAA;QACpB;YACE,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IACrE,CAAC;AACH,CAAC","sourcesContent":["import React, { isValidElement, ReactElement } from 'react'\nimport BannerPrimitive, {\n type BannerStatusIconProps,\n type BannerRootProps,\n} from '../primitive/banner_primitive'\n\ntype descriptionUnion = string | ReactElement | undefined\n\nexport interface BannerProps {\n /**\n * Changes the status color for the background, text, and icon.\n * Sets a preset status icon.\n */\n appearance?: BannerRootProps['appearance']\n /**\n * Renders the banner's main text.\n * If some of the text is interactive it can also take `BannerPrimitive.Link` wrapped in `BannerPrimitive.Text`.\n */\n description?: descriptionUnion\n /**\n * Renders the banner's heading text.\n */\n heading?: string\n /**\n * Overrides the preset status icon.\n */\n iconName?: BannerStatusIconProps['iconName']\n /**\n * Hides the status icon. By default, the status icon is shown.\n */\n showIcon?: boolean\n}\n\nexport function Banner({\n appearance,\n description,\n heading,\n iconName,\n showIcon = true,\n}: BannerProps) {\n if (!description && !heading) return null\n\n return (\n <BannerPrimitive.Root appearance={appearance}>\n <BannerPrimitive.StaticLayout>\n {showIcon && <BannerPrimitive.StatusIcon iconName={iconName} />}\n <BannerPrimitive.Content>\n {Boolean(heading) && <BannerPrimitive.Heading>{heading}</BannerPrimitive.Heading>}\n <ConditionalDescription description={description} />\n </BannerPrimitive.Content>\n </BannerPrimitive.StaticLayout>\n </BannerPrimitive.Root>\n )\n}\n\nexport function ConditionalDescription({ description }: { description: descriptionUnion }) {\n switch (true) {\n case description === undefined:\n return null\n case isValidElement(description):\n return description\n default:\n return <BannerPrimitive.Text>{description}</BannerPrimitive.Text>\n }\n}\n"]}
1
+ {"version":3,"file":"banner.js","sourceRoot":"","sources":["../../../src/components/display/banner.tsx"],"names":[],"mapp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":["import React, { isValidElement, ReactElement } from 'react'\nimport BannerPrimitive, {\n type BannerStatusIconProps,\n type BannerRootProps,\n} from '../primitive/banner_primitive'\nimport { ViewStyle } from 'react-native'\n\ntype descriptionUnion = string | ReactElement | undefined\n\nexport interface BannerProps {\n /**\n * Changes the status color for the background, text, and icon.\n * Sets a preset status icon.\n */\n appearance?: BannerRootProps['appearance']\n /**\n * Renders the banner's main text.\n * If some of the text is interactive it can also take `BannerPrimitive.Link` wrapped in `BannerPrimitive.Text`.\n */\n description?: descriptionUnion\n /**\n * Renders the banner's heading text.\n */\n heading?: string\n /**\n * Overrides the preset status icon.\n */\n iconName?: BannerStatusIconProps['iconName']\n /**\n * Hides the status icon. By default, the status icon is shown.\n */\n showIcon?: boolean\n /**\n * Adds a style to the banner.\n */\n style?: ViewStyle\n}\n\nexport function Banner({\n appearance,\n description,\n heading,\n iconName,\n showIcon = true,\n style,\n}: BannerProps) {\n if (!description && !heading) return null\n\n return (\n <BannerPrimitive.Root appearance={appearance}>\n <BannerPrimitive.StaticLayout style={style}>\n {showIcon && <BannerPrimitive.StatusIcon iconName={iconName} />}\n <BannerPrimitive.Content>\n {Boolean(heading) && <BannerPrimitive.Heading>{heading}</BannerPrimitive.Heading>}\n <ConditionalDescription description={description} />\n </BannerPrimitive.Content>\n </BannerPrimitive.StaticLayout>\n </BannerPrimitive.Root>\n )\n}\n\nexport function ConditionalDescription({ description }: { description: descriptionUnion }) {\n switch (true) {\n case description === undefined:\n return null\n case isValidElement(description):\n return description\n default:\n return <BannerPrimitive.Text>{description}</BannerPrimitive.Text>\n }\n}\n"]}
@@ -6,6 +6,6 @@ interface BannerCollapsibleProps extends BannerProps {
6
6
  */
7
7
  children?: ReactNode;
8
8
  }
9
- export declare function BannerCollapsible({ appearance, children, description, heading, iconName, showIcon, }: BannerCollapsibleProps): React.JSX.Element | null;
9
+ export declare function BannerCollapsible({ appearance, children, description, heading, iconName, showIcon, style, }: BannerCollapsibleProps): React.JSX.Element | null;
10
10
  export {};
11
11
  //# sourceMappingURL=banner_collapsible.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"banner_collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/display/banner_collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,WAAW,EAA0B,MAAM,UAAU,CAAA;AAO9D,UAAU,sBAAuB,SAAQ,WAAW;IAClD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAe,GAChB,EAAE,sBAAsB,4BAqBxB"}
1
+ {"version":3,"file":"banner_collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/display/banner_collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,WAAW,EAA0B,MAAM,UAAU,CAAA;AAO9D,UAAU,sBAAuB,SAAQ,WAAW;IAClD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAe,EACf,KAAK,GACN,EAAE,sBAAsB,4BAyBxB"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ConditionalDescription } from './banner';
3
3
  import BannerPrimitive from '../primitive/banner_primitive';
4
- export function BannerCollapsible({ appearance, children, description, heading, iconName, showIcon = true, }) {
4
+ export function BannerCollapsible({ appearance, children, description, heading, iconName, showIcon = true, style, }) {
5
5
  const [expanded, setExpanded] = React.useState(false);
6
6
  const toggleCollapsible = () => {
7
7
  setExpanded(prev => !prev);
@@ -9,7 +9,7 @@ export function BannerCollapsible({ appearance, children, description, heading,
9
9
  if (!description && !heading)
10
10
  return null;
11
11
  return (<BannerPrimitive.Root appearance={appearance}>
12
- <BannerPrimitive.CollapsibleLayout onPress={toggleCollapsible} expanded={expanded}>
12
+ <BannerPrimitive.CollapsibleLayout onPress={toggleCollapsible} expanded={expanded} style={style}>
13
13
  {showIcon && <BannerPrimitive.StatusIcon iconName={iconName}/>}
14
14
  <BannerPrimitive.Content>
15
15
  {Boolean(heading) && <BannerPrimitive.Heading>{heading}</BannerPrimitive.Heading>}
@@ -1 +1 @@
1
- {"version":3,"file":"banner_collapsible.js","sourceRoot":"","sources":["../../../src/components/display/banner_collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAe,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,eAAe,MAAM,+BAA+B,CAAA;AAa3D,MAAM,UAAU,iBAAiB,CAAC,EAChC,UAAU,EACV,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,GAAG,IAAI,GACQ;IACvB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAErD,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC7B,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC,CAAA;IAED,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzC,OAAO,CACL,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAC3C;MAAA,CAAC,eAAe,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAChF;QAAA,CAAC,QAAQ,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CAC/D;QAAA,CAAC,eAAe,CAAC,OAAO,CACtB;UAAA,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CACjF;UAAA,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,EACjD;UAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAC7B;QAAA,EAAE,eAAe,CAAC,OAAO,CAC3B;MAAA,EAAE,eAAe,CAAC,iBAAiB,CACrC;IAAA,EAAE,eAAe,CAAC,IAAI,CAAC,CACxB,CAAA;AACH,CAAC","sourcesContent":["import React, { ReactNode } from 'react'\nimport { BannerProps, ConditionalDescription } from './banner'\nimport BannerPrimitive from '../primitive/banner_primitive'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface BannerCollapsibleProps extends BannerProps {\n /**\n * Hidden by default and shown when the banner is expanded.\n */\n children?: ReactNode\n}\n\nexport function BannerCollapsible({\n appearance,\n children,\n description,\n heading,\n iconName,\n showIcon = true,\n}: BannerCollapsibleProps) {\n const [expanded, setExpanded] = React.useState(false)\n\n const toggleCollapsible = () => {\n setExpanded(prev => !prev)\n }\n\n if (!description && !heading) return null\n\n return (\n <BannerPrimitive.Root appearance={appearance}>\n <BannerPrimitive.CollapsibleLayout onPress={toggleCollapsible} expanded={expanded}>\n {showIcon && <BannerPrimitive.StatusIcon iconName={iconName} />}\n <BannerPrimitive.Content>\n {Boolean(heading) && <BannerPrimitive.Heading>{heading}</BannerPrimitive.Heading>}\n <ConditionalDescription description={description} />\n {expanded ? children : null}\n </BannerPrimitive.Content>\n </BannerPrimitive.CollapsibleLayout>\n </BannerPrimitive.Root>\n )\n}\n"]}
1
+ {"version":3,"file":"banner_collapsible.js","sourceRoot":"","sources":["../../../src/components/display/banner_collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACx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Ae,CAAC,IAAI,CAAC,CACxB,CAAA;AACH,CAAC","sourcesContent":["import React, { ReactNode } from 'react'\nimport { BannerProps, ConditionalDescription } from './banner'\nimport BannerPrimitive from '../primitive/banner_primitive'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface BannerCollapsibleProps extends BannerProps {\n /**\n * Hidden by default and shown when the banner is expanded.\n */\n children?: ReactNode\n}\n\nexport function BannerCollapsible({\n appearance,\n children,\n description,\n heading,\n iconName,\n showIcon = true,\n style,\n}: BannerCollapsibleProps) {\n const [expanded, setExpanded] = React.useState(false)\n\n const toggleCollapsible = () => {\n setExpanded(prev => !prev)\n }\n\n if (!description && !heading) return null\n\n return (\n <BannerPrimitive.Root appearance={appearance}>\n <BannerPrimitive.CollapsibleLayout\n onPress={toggleCollapsible}\n expanded={expanded}\n style={style}\n >\n {showIcon && <BannerPrimitive.StatusIcon iconName={iconName} />}\n <BannerPrimitive.Content>\n {Boolean(heading) && <BannerPrimitive.Heading>{heading}</BannerPrimitive.Heading>}\n <ConditionalDescription description={description} />\n {expanded ? children : null}\n </BannerPrimitive.Content>\n </BannerPrimitive.CollapsibleLayout>\n </BannerPrimitive.Root>\n )\n}\n"]}
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { MemberResource } from '../../types';
3
+ import { type ViewStyle } from 'react-native';
3
4
  interface ChildNoticeProps {
4
5
  childMembers: MemberResource[];
6
+ style?: ViewStyle;
5
7
  }
6
- export declare function ChildNotice({ childMembers }: ChildNoticeProps): React.JSX.Element;
8
+ export declare function ChildNotice({ childMembers, style }: ChildNoticeProps): React.JSX.Element;
7
9
  export {};
8
10
  //# sourceMappingURL=child_notice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"child_notice.d.ts","sourceRoot":"","sources":["../../../src/components/display/child_notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAY5C,UAAU,gBAAgB;IACxB,YAAY,EAAE,cAAc,EAAE,CAAA;CAC/B;AAED,wBAAgB,WAAW,CAAC,EAAE,YAAY,EAAE,EAAE,gBAAgB,qBAc7D"}
1
+ {"version":3,"file":"child_notice.d.ts","sourceRoot":"","sources":["../../../src/components/display/child_notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAG5C,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAS/D,UAAU,gBAAgB;IACxB,YAAY,EAAE,cAAc,EAAE,CAAA;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,gBAAgB,qBAmBpE"}
@@ -5,10 +5,10 @@ import { View, StyleSheet } from 'react-native';
5
5
  import { Avatar } from './avatar';
6
6
  import { platformFontWeightMedium, pluralize } from '../../utils';
7
7
  import { Text } from './text';
8
- export function ChildNotice({ childMembers }) {
8
+ export function ChildNotice({ childMembers, style }) {
9
9
  const styles = useStyles();
10
10
  const heading = `${pluralize(childMembers.length, 'member')} under age 13`;
11
- return (<BannerCollapsible appearance="warning" iconName="general.shieldExclamation" heading={heading}>
11
+ return (<BannerCollapsible appearance="warning" iconName="general.shieldExclamation" heading={heading} style={style}>
12
12
  <BannerPrimitive.Text>
13
13
  Under age members cannot chat. They won't see conversations or notifications.
14
14
  </BannerPrimitive.Text>
@@ -1 +1 @@
1
- {"version":3,"file":"child_notice.js","sourceRoot":"","sources":["../../../src/components/display/child_notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,eAAe,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AA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,CAAC,KAAK,CAAC,IAAI,CACb;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,eAAe,EAAE;YACf,SAAS,EAAE,CAAC;YACZ,GAAG,EAAE,CAAC;SACP;QACD,KAAK,EAAE;YACL,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,wBAAwB;SACrC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { MemberResource } from '../../types'\nimport { BannerCollapsible } from './banner_collapsible'\nimport BannerPrimitive from '../primitive/banner_primitive'\nimport { View, StyleSheet } from 'react-native'\nimport { Avatar } from './avatar'\nimport { platformFontWeightMedium, pluralize } from '../../utils'\nimport { Text } from './text'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface ChildNoticeProps {\n childMembers: MemberResource[]\n}\n\nexport function ChildNotice({ childMembers }: ChildNoticeProps) {\n const styles = useStyles()\n const heading = `${pluralize(childMembers.length, 'member')} under age 13`\n\n return (\n <BannerCollapsible appearance=\"warning\" iconName=\"general.shieldExclamation\" heading={heading}>\n <BannerPrimitive.Text>\n Under age members cannot chat. They won't see conversations or notifications.\n </BannerPrimitive.Text>\n <View style={styles.childrenWrapper}>\n {childMembers?.map(child => <Child key={child.id} child={child} />)}\n </View>\n </BannerCollapsible>\n )\n}\n\nfunction Child({ child }: { child: MemberResource }) {\n const styles = useStyles()\n return (\n <View style={styles.child}>\n <Avatar sourceUri={child.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" style={styles.name}>\n {child.name}\n </Text>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n return StyleSheet.create({\n childrenWrapper: {\n marginTop: 8,\n gap: 8,\n },\n child: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n name: {\n fontWeight: platformFontWeightMedium,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"child_notice.js","sourceRoot":"","sources":["../../../src/components/display/child_notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,eAAe,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAW7B,MAAM,UAAU,WAAW,CAAC,EAAE,YAAY,EAAE,KAAK,EAAoB;IACnE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,OAAO,GAAG,GAAG,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAA;IAE1E,OAAO,CACL,CAAC,iBAAiB,CAChB,UAAU,CAAC,SAAS,CACpB,QAAQ,CAAC,2BAA2B,CACpC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;MAAA,CAAC,eAAe,CAAC,IAAI,CACnB;;MACF,EAAE,eAAe,CAAC,IAAI,CACtB;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAClC;QAAA,CAAC,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAG,CAAC,CACrE;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,iBAAiB,CAAC,CACrB,CAAA;AACH,CAAC;AAED,SAAS,KAAK,CAAC,EAAE,KAAK,EAA6B;IACjD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACxB;MAAA,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAC1C;MAAA,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAC1C;QAAA,CAAC,KAAK,CAAC,IAAI,CACb;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,eAAe,EAAE;YACf,SAAS,EAAE,CAAC;YACZ,GAAG,EAAE,CAAC;SACP;QACD,KAAK,EAAE;YACL,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,wBAAwB;SACrC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { MemberResource } from '../../types'\nimport { BannerCollapsible } from './banner_collapsible'\nimport BannerPrimitive from '../primitive/banner_primitive'\nimport { View, StyleSheet, type ViewStyle } from 'react-native'\nimport { Avatar } from './avatar'\nimport { platformFontWeightMedium, pluralize } from '../../utils'\nimport { Text } from './text'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface ChildNoticeProps {\n childMembers: MemberResource[]\n style?: ViewStyle\n}\n\nexport function ChildNotice({ childMembers, style }: ChildNoticeProps) {\n const styles = useStyles()\n const heading = `${pluralize(childMembers.length, 'member')} under age 13`\n\n return (\n <BannerCollapsible\n appearance=\"warning\"\n iconName=\"general.shieldExclamation\"\n heading={heading}\n style={style}\n >\n <BannerPrimitive.Text>\n Under age members cannot chat. They won't see conversations or notifications.\n </BannerPrimitive.Text>\n <View style={styles.childrenWrapper}>\n {childMembers?.map(child => <Child key={child.id} child={child} />)}\n </View>\n </BannerCollapsible>\n )\n}\n\nfunction Child({ child }: { child: MemberResource }) {\n const styles = useStyles()\n return (\n <View style={styles.child}>\n <Avatar sourceUri={child.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" style={styles.name}>\n {child.name}\n </Text>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n return StyleSheet.create({\n childrenWrapper: {\n marginTop: 8,\n gap: 8,\n },\n child: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n name: {\n fontWeight: platformFontWeightMedium,\n },\n })\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
+ import { ViewStyle } from 'react-native';
2
3
  import { type StatusAppearanceUnion } from '../display/utils/status_colors';
3
4
  import { IconString } from '../display/icon';
4
5
  type BannerComponents = {
@@ -20,11 +21,13 @@ interface BannerRootProps {
20
21
  }
21
22
  interface BannerStaticLayoutProps {
22
23
  children: ReactNode;
24
+ style?: ViewStyle;
23
25
  }
24
26
  interface BannerCollapsibleLayoutProps {
25
27
  children: ReactNode;
26
28
  expanded?: boolean;
27
29
  onPress?: () => void;
30
+ style?: ViewStyle;
28
31
  }
29
32
  interface BannerContentProps {
30
33
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"banner_primitive.d.ts","sourceRoot":"","sources":["../../../src/components/primitive/banner_primitive.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAiB,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAA;AAEvE,OAAO,EAEL,KAAK,q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,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB"}
1
+ {"version":3,"file":"banner_primitive.d.ts","sourceRoot":"","sources":["../../../src/components/primitive/banner_primitive.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAiB,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAA;AACvE,OAAO,EAA+B,SAAS,EAAE,MAAM,cAAc,CAAA;AACrE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAA;AASvC,OAAO,EAAQ,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAoBlD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,CAAA;IACzB,YAAY,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAA;IACzC,iBAAiB,EAAE,EAAE,CAAC,4BAA4B,CAAC,CAAA;IACnD,OAAO,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAA;IAC/B,UAAU,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAA;IACrC,OAAO,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAA;IAC/B,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,CAAA;IACzB,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,CAAA;CAC1B,CAAA;wBAEwB,gBAAgB;AAAzC,wBAAyC;AACzC,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAC5B,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,CAAA;AAwBD,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,UAAU,CAAC,EAAE,qBAAqB,CAAA;CACnC;AAYD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAeD,UAAU,4BAA4B;IACpC,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAoCD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAcD,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,EAAE,UAAU,CAAA;CACtB;AA6BD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAmBD,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAmBD,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB"}
@@ -34,13 +34,13 @@ function BannerRoot({ children, appearance = 'neutral' }) {
34
34
  return <BannerContext.Provider value={{ appearance }}>{children}</BannerContext.Provider>;
35
35
  }
36
36
  BannerRoot.displayName = 'Banner.Root';
37
- function BannerStaticLayout({ children }) {
37
+ function BannerStaticLayout({ children, style }) {
38
38
  const { appearance } = useBannerContext();
39
39
  const styles = useStyles({ appearance });
40
- return <View style={styles.staticLayout}>{children}</View>;
40
+ return <View style={[styles.staticLayout, style]}>{children}</View>;
41
41
  }
42
42
  BannerStaticLayout.displayName = 'Banner.StaticLayout';
43
- function BannerCollapsibleLayout({ children, expanded, onPress }) {
43
+ function BannerCollapsibleLayout({ children, expanded, onPress, style, }) {
44
44
  const { appearance = 'neutral' } = useBannerContext();
45
45
  const styles = useStyles({ appearance });
46
46
  const iconName = expanded ? 'general.upCaret' : 'general.downCaret';
@@ -48,7 +48,7 @@ function BannerCollapsibleLayout({ children, expanded, onPress }) {
48
48
  const androidRippleColor = useCreateAndroidRippleColor({
49
49
  color: statusColorMap[appearance].background,
50
50
  });
51
- return (<Pressable onPress={onPress} style={({ pressed }) => [styles.staticLayout, pressed && platformPressedOpacityStyle]} android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }} accessibilityState={{ expanded }} accessibilityRole="button">
51
+ return (<Pressable onPress={onPress} style={({ pressed }) => [styles.staticLayout, pressed && platformPressedOpacityStyle, style]} android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }} accessibilityState={{ expanded }} accessibilityRole="button">
52
52
  {children}
53
53
  <Icon name={iconName} style={styles.icon} maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}/>
54
54
  </Pressable>);
@@ -1 +1 @@
1
- {"version":3,"file":"banner_primitive.js","sourceRoot":"","sources":["../../../src/components/primitive/banner_primitive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,2BAA2B,GAE5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,KAAK,GACN,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,2BAA2B,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,EAAE,IAAI,EAAc,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAEhE,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAE3C,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,UAAU;IAChB,YAAY,EAAE,kBAAkB;IAChC,iBAAiB,EAAE,uBAAuB;IAC1C,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,gBAAgB;IAC5B,OAAO,EAAE,aAAa;IACtB,IAAI,EAA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SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,GAAG,SAAS;SACzD;QACD,OAAO,EAAE;YACP,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,IAAI;YACtC,UAAU,EAAE,wBAAwB;YACpC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,IAAI;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { createContext, FC, ReactNode, useContext } from 'react'\nimport { Pressable, StyleSheet, View } from 'react-native'\nimport {\n useStatusColorAppearanceMap,\n type StatusAppearanceUnion,\n} from '../display/utils/status_colors'\nimport {\n MAX_FONT_SIZE_MULTIPLIER,\n platformFontWeightMedium,\n platformPressedOpacityStyle,\n space,\n} from '../../utils'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { useCreateAndroidRippleColor, useFontScale } from '../../hooks'\nimport { Icon, IconString } from '../display/icon'\nimport { Heading } from '../display/heading'\nimport { Text } from '../display/text'\nimport { TextInlineButton } from '../display/text_inline_button'\n\n// ========================================\n// ====== Exports =========================\n// ========================================\n\nconst Banner = {\n Root: BannerRoot,\n StaticLayout: BannerStaticLayout,\n CollapsibleLayout: BannerCollapsibleLayout,\n Content: BannerContent,\n StatusIcon: BannerStatusIcon,\n Heading: BannerHeading,\n Text: BannerText,\n Link: BannerLink,\n} as const\n\ntype BannerComponents = {\n Root: FC<BannerRootProps>\n StaticLayout: FC<BannerStaticLayoutProps>\n CollapsibleLayout: FC<BannerCollapsibleLayoutProps>\n Content: FC<BannerContentProps>\n StatusIcon: FC<BannerStatusIconProps>\n Heading: FC<BannerHeadingProps>\n Text: FC<BannerTextProps>\n Link: FC<BannerLinkProps>\n}\n\nexport default Banner as BannerComponents\nexport type {\n BannerRootProps,\n BannerStaticLayoutProps,\n BannerCollapsibleLayoutProps,\n BannerContentProps,\n BannerStatusIconProps,\n BannerHeadingProps,\n BannerTextProps,\n BannerLinkProps,\n}\n\n// ========================================\n// ====== Context =========================\n// ========================================\n\ninterface BannerContextType {\n appearance?: StatusAppearanceUnion\n}\n\nconst BannerContext = createContext<BannerContextType | null>(null)\n\nfunction useBannerContext() {\n const context = useContext(BannerContext)\n if (!context) {\n throw new Error('Banner components must be used within Banner.Root')\n }\n return context\n}\n\n// ========================================\n// ====== BannerRoot ======================\n// ========================================\n\ninterface BannerRootProps {\n children: ReactNode\n appearance?: StatusAppearanceUnion\n}\n\nfunction BannerRoot({ children, appearance = 'neutral' }: BannerRootProps) {\n return <BannerContext.Provider value={{ appearance }}>{children}</BannerContext.Provider>\n}\n\nBannerRoot.displayName = 'Banner.Root'\n\n// ========================================\n// ====== BannerStaticLayout ==============\n// ========================================\n\ninterface BannerStaticLayoutProps {\n children: ReactNode\n}\n\nfunction BannerStaticLayout({ children }: BannerStaticLayoutProps) {\n const { appearance } = useBannerContext()\n const styles = useStyles({ appearance })\n\n return <View style={styles.staticLayout}>{children}</View>\n}\n\nBannerStaticLayout.displayName = 'Banner.StaticLayout'\n\n// ========================================\n// ====== BannerCollapsibleLayout =========\n// ========================================\n\ninterface BannerCollapsibleLayoutProps {\n children: ReactNode\n expanded?: boolean\n onPress?: () => void\n}\n\nfunction BannerCollapsibleLayout({ children, expanded, onPress }: BannerCollapsibleLayoutProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n const iconName = expanded ? 'general.upCaret' : 'general.downCaret'\n const statusColorMap = useStatusColorAppearanceMap()\n const androidRippleColor = useCreateAndroidRippleColor({\n color: statusColorMap[appearance].background,\n })\n\n return (\n <Pressable\n onPress={onPress}\n style={({ pressed }) => [styles.staticLayout, pressed && platformPressedOpacityStyle]}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n accessibilityState={{ expanded }}\n accessibilityRole=\"button\"\n >\n {children}\n <Icon name={iconName} style={styles.icon} maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER} />\n </Pressable>\n )\n}\n\nBannerCollapsibleLayout.displayName = 'Banner.CollapsibleLayout'\n\n// ========================================\n// ====== BannerContent ===================\n// ========================================\n\ninterface BannerContentProps {\n children: ReactNode\n}\n\nfunction BannerContent({ children }: BannerContentProps) {\n const styles = useStyles()\n\n return <View style={styles.content}>{children}</View>\n}\n\nBannerContent.displayName = 'Banner.Content'\n\n// ========================================\n// ====== BannerStatusIcon ================\n// ========================================\n\ninterface BannerStatusIconProps {\n iconName?: IconString\n}\n\nfunction BannerStatusIcon({ iconName }: BannerStatusIconProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n\n const iconNameMap = {\n error: 'general.exclamationTriangle',\n info: 'general.outlinedInfoCircle',\n neutral: 'general.outlinedInfoCircle',\n success: 'general.check',\n warning: 'general.exclamationTriangle',\n } as const\n\n return (\n <Icon\n name={iconName || iconNameMap[appearance]}\n style={styles.icon}\n maxFontSizeMultiplier={1}\n />\n )\n}\n\nBannerStatusIcon.displayName = 'Banner.StatusIcon'\n\n// ========================================\n// ====== BannerHeading ===================\n// ========================================\n\ninterface BannerHeadingProps {\n children: ReactNode\n}\n\nfunction BannerHeading({ children }: BannerHeadingProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n\n return (\n <Heading variant=\"h3\" style={styles.heading}>\n {children}\n </Heading>\n )\n}\n\nBannerHeading.displayName = 'Banner.Heading'\n\n// ========================================\n// ====== BannerText ======================\n// ========================================\n\ninterface BannerTextProps {\n children: ReactNode\n}\n\nfunction BannerText({ children }: BannerTextProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n\n return (\n <Text variant=\"tertiary\" style={styles.text}>\n {children}\n </Text>\n )\n}\n\nBannerText.displayName = 'Banner.Text'\n\n// ========================================\n// ====== BannerLink ======================\n// ========================================\n\ninterface BannerLinkProps {\n children: ReactNode\n onPress?: () => void\n}\n\nfunction BannerLink({ children, onPress }: BannerLinkProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n\n return (\n <TextInlineButton variant=\"tertiary\" style={styles.text} onPress={onPress}>\n {children}\n </TextInlineButton>\n )\n}\n\nBannerLink.displayName = 'Banner.Link'\n\n// ========================================\n// ====== Styles ==========================\n// ========================================\n\ninterface Styles {\n appearance?: StatusAppearanceUnion\n}\n\nconst useStyles = ({ appearance = 'neutral' }: Styles = {}) => {\n const statusColorMap = useStatusColorAppearanceMap()\n const fontScale = useFontScale()\n const LINE_HEIGHT_OFFSET = fontScale > 1 ? 0 : 1\n\n return StyleSheet.create({\n staticLayout: {\n flexDirection: 'row',\n backgroundColor: statusColorMap[appearance].background,\n padding: space(1.5),\n gap: space(1),\n borderRadius: tokens.borderRadiusMd,\n },\n content: {\n gap: space(0.5),\n flex: 1,\n },\n icon: {\n color: statusColorMap[appearance].icon,\n fontSize: tokens.fontSizeMd,\n marginTop: (space(0.5) - LINE_HEIGHT_OFFSET) * fontScale,\n },\n heading: {\n color: statusColorMap[appearance].text,\n fontWeight: platformFontWeightMedium,\n fontSize: tokens.fontSizeMd,\n },\n text: {\n color: statusColorMap[appearance].text,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"banner_primitive.js","sourceRoot":"","sources":["../../../src/components/primitive/banner_primitive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AACrE,OAAO,EACL,2BAA2B,GAE5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,KAAK,GACN,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,2BAA2B,EAAE,YAAY,EAAE,MAAM,aAAa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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEhD,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,YAAY,EAAE;YACZ,aAAa,EAAE,KAAK;YACpB,eAAe,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,UAAU;YACtD,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC;YACnB,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;YACb,YAAY,EAAE,MAAM,CAAC,cAAc;SACpC;QACD,OAAO,EAAE;YACP,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC;YACf,IAAI,EAAE,CAAC;SACR;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,IAAI;YACtC,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,GAAG,SAAS;SACzD;QACD,OAAO,EAAE;YACP,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,IAAI;YACtC,UAAU,EAAE,wBAAwB;YACpC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,IAAI;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { createContext, FC, ReactNode, useContext } from 'react'\nimport { Pressable, StyleSheet, View, ViewStyle } from 'react-native'\nimport {\n useStatusColorAppearanceMap,\n type StatusAppearanceUnion,\n} from '../display/utils/status_colors'\nimport {\n MAX_FONT_SIZE_MULTIPLIER,\n platformFontWeightMedium,\n platformPressedOpacityStyle,\n space,\n} from '../../utils'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { useCreateAndroidRippleColor, useFontScale } from '../../hooks'\nimport { Icon, IconString } from '../display/icon'\nimport { Heading } from '../display/heading'\nimport { Text } from '../display/text'\nimport { TextInlineButton } from '../display/text_inline_button'\n\n// ========================================\n// ====== Exports =========================\n// ========================================\n\nconst Banner = {\n Root: BannerRoot,\n StaticLayout: BannerStaticLayout,\n CollapsibleLayout: BannerCollapsibleLayout,\n Content: BannerContent,\n StatusIcon: BannerStatusIcon,\n Heading: BannerHeading,\n Text: BannerText,\n Link: BannerLink,\n} as const\n\ntype BannerComponents = {\n Root: FC<BannerRootProps>\n StaticLayout: FC<BannerStaticLayoutProps>\n CollapsibleLayout: FC<BannerCollapsibleLayoutProps>\n Content: FC<BannerContentProps>\n StatusIcon: FC<BannerStatusIconProps>\n Heading: FC<BannerHeadingProps>\n Text: FC<BannerTextProps>\n Link: FC<BannerLinkProps>\n}\n\nexport default Banner as BannerComponents\nexport type {\n BannerRootProps,\n BannerStaticLayoutProps,\n BannerCollapsibleLayoutProps,\n BannerContentProps,\n BannerStatusIconProps,\n BannerHeadingProps,\n BannerTextProps,\n BannerLinkProps,\n}\n\n// ========================================\n// ====== Context =========================\n// ========================================\n\ninterface BannerContextType {\n appearance?: StatusAppearanceUnion\n}\n\nconst BannerContext = createContext<BannerContextType | null>(null)\n\nfunction useBannerContext() {\n const context = useContext(BannerContext)\n if (!context) {\n throw new Error('Banner components must be used within Banner.Root')\n }\n return context\n}\n\n// ========================================\n// ====== BannerRoot ======================\n// ========================================\n\ninterface BannerRootProps {\n children: ReactNode\n appearance?: StatusAppearanceUnion\n}\n\nfunction BannerRoot({ children, appearance = 'neutral' }: BannerRootProps) {\n return <BannerContext.Provider value={{ appearance }}>{children}</BannerContext.Provider>\n}\n\nBannerRoot.displayName = 'Banner.Root'\n\n// ========================================\n// ====== BannerStaticLayout ==============\n// ========================================\n\ninterface BannerStaticLayoutProps {\n children: ReactNode\n style?: ViewStyle\n}\n\nfunction BannerStaticLayout({ children, style }: BannerStaticLayoutProps) {\n const { appearance } = useBannerContext()\n const styles = useStyles({ appearance })\n\n return <View style={[styles.staticLayout, style]}>{children}</View>\n}\n\nBannerStaticLayout.displayName = 'Banner.StaticLayout'\n\n// ========================================\n// ====== BannerCollapsibleLayout =========\n// ========================================\n\ninterface BannerCollapsibleLayoutProps {\n children: ReactNode\n expanded?: boolean\n onPress?: () => void\n style?: ViewStyle\n}\n\nfunction BannerCollapsibleLayout({\n children,\n expanded,\n onPress,\n style,\n}: BannerCollapsibleLayoutProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n const iconName = expanded ? 'general.upCaret' : 'general.downCaret'\n const statusColorMap = useStatusColorAppearanceMap()\n const androidRippleColor = useCreateAndroidRippleColor({\n color: statusColorMap[appearance].background,\n })\n\n return (\n <Pressable\n onPress={onPress}\n style={({ pressed }) => [styles.staticLayout, pressed && platformPressedOpacityStyle, style]}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n accessibilityState={{ expanded }}\n accessibilityRole=\"button\"\n >\n {children}\n <Icon name={iconName} style={styles.icon} maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER} />\n </Pressable>\n )\n}\n\nBannerCollapsibleLayout.displayName = 'Banner.CollapsibleLayout'\n\n// ========================================\n// ====== BannerContent ===================\n// ========================================\n\ninterface BannerContentProps {\n children: ReactNode\n}\n\nfunction BannerContent({ children }: BannerContentProps) {\n const styles = useStyles()\n\n return <View style={styles.content}>{children}</View>\n}\n\nBannerContent.displayName = 'Banner.Content'\n\n// ========================================\n// ====== BannerStatusIcon ================\n// ========================================\n\ninterface BannerStatusIconProps {\n iconName?: IconString\n}\n\nfunction BannerStatusIcon({ iconName }: BannerStatusIconProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n\n const iconNameMap = {\n error: 'general.exclamationTriangle',\n info: 'general.outlinedInfoCircle',\n neutral: 'general.outlinedInfoCircle',\n success: 'general.check',\n warning: 'general.exclamationTriangle',\n } as const\n\n return (\n <Icon\n name={iconName || iconNameMap[appearance]}\n style={styles.icon}\n maxFontSizeMultiplier={1}\n />\n )\n}\n\nBannerStatusIcon.displayName = 'Banner.StatusIcon'\n\n// ========================================\n// ====== BannerHeading ===================\n// ========================================\n\ninterface BannerHeadingProps {\n children: ReactNode\n}\n\nfunction BannerHeading({ children }: BannerHeadingProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n\n return (\n <Heading variant=\"h3\" style={styles.heading}>\n {children}\n </Heading>\n )\n}\n\nBannerHeading.displayName = 'Banner.Heading'\n\n// ========================================\n// ====== BannerText ======================\n// ========================================\n\ninterface BannerTextProps {\n children: ReactNode\n}\n\nfunction BannerText({ children }: BannerTextProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n\n return (\n <Text variant=\"tertiary\" style={styles.text}>\n {children}\n </Text>\n )\n}\n\nBannerText.displayName = 'Banner.Text'\n\n// ========================================\n// ====== BannerLink ======================\n// ========================================\n\ninterface BannerLinkProps {\n children: ReactNode\n onPress?: () => void\n}\n\nfunction BannerLink({ children, onPress }: BannerLinkProps) {\n const { appearance = 'neutral' } = useBannerContext()\n const styles = useStyles({ appearance })\n\n return (\n <TextInlineButton variant=\"tertiary\" style={styles.text} onPress={onPress}>\n {children}\n </TextInlineButton>\n )\n}\n\nBannerLink.displayName = 'Banner.Link'\n\n// ========================================\n// ====== Styles ==========================\n// ========================================\n\ninterface Styles {\n appearance?: StatusAppearanceUnion\n}\n\nconst useStyles = ({ appearance = 'neutral' }: Styles = {}) => {\n const statusColorMap = useStatusColorAppearanceMap()\n const fontScale = useFontScale()\n const LINE_HEIGHT_OFFSET = fontScale > 1 ? 0 : 1\n\n return StyleSheet.create({\n staticLayout: {\n flexDirection: 'row',\n backgroundColor: statusColorMap[appearance].background,\n padding: space(1.5),\n gap: space(1),\n borderRadius: tokens.borderRadiusMd,\n },\n content: {\n gap: space(0.5),\n flex: 1,\n },\n icon: {\n color: statusColorMap[appearance].icon,\n fontSize: tokens.fontSizeMd,\n marginTop: (space(0.5) - LINE_HEIGHT_OFFSET) * fontScale,\n },\n heading: {\n color: statusColorMap[appearance].text,\n fontWeight: platformFontWeightMedium,\n fontSize: tokens.fontSizeMd,\n },\n text: {\n color: statusColorMap[appearance].text,\n },\n })\n}\n"]}
@@ -8,6 +8,8 @@ export declare function useGroupMembersForNewConversation({ id }: {
8
8
  id: number;
9
9
  }): {
10
10
  data: MemberResource[];
11
+ adultMembers: MemberResource[];
12
+ childMembers: MemberResource[];
11
13
  error: Response;
12
14
  isError: true;
13
15
  isPending: false;
@@ -42,6 +44,8 @@ export declare function useGroupMembersForNewConversation({ id }: {
42
44
  promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../types").ApiCollection<GroupsGroupMemberResource>, unknown>>;
43
45
  } | {
44
46
  data: MemberResource[];
47
+ adultMembers: MemberResource[];
48
+ childMembers: MemberResource[];
45
49
  error: null;
46
50
  isError: false;
47
51
  isPending: false;
@@ -76,6 +80,8 @@ export declare function useGroupMembersForNewConversation({ id }: {
76
80
  promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../types").ApiCollection<GroupsGroupMemberResource>, unknown>>;
77
81
  } | {
78
82
  data: MemberResource[];
83
+ adultMembers: MemberResource[];
84
+ childMembers: MemberResource[];
79
85
  error: Response;
80
86
  isError: true;
81
87
  isPending: false;
@@ -110,6 +116,8 @@ export declare function useGroupMembersForNewConversation({ id }: {
110
116
  promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../types").ApiCollection<GroupsGroupMemberResource>, unknown>>;
111
117
  } | {
112
118
  data: MemberResource[];
119
+ adultMembers: MemberResource[];
120
+ childMembers: MemberResource[];
113
121
  error: null;
114
122
  isError: false;
115
123
  isPending: true;
@@ -144,6 +152,8 @@ export declare function useGroupMembersForNewConversation({ id }: {
144
152
  promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../types").ApiCollection<GroupsGroupMemberResource>, unknown>>;
145
153
  } | {
146
154
  data: MemberResource[];
155
+ adultMembers: MemberResource[];
156
+ childMembers: MemberResource[];
147
157
  error: null;
148
158
  isError: false;
149
159
  isPending: true;
@@ -178,6 +188,8 @@ export declare function useGroupMembersForNewConversation({ id }: {
178
188
  promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../types").ApiCollection<GroupsGroupMemberResource>, unknown>>;
179
189
  } | {
180
190
  data: MemberResource[];
191
+ adultMembers: MemberResource[];
192
+ childMembers: MemberResource[];
181
193
  isError: false;
182
194
  error: null;
183
195
  isPending: false;
@@ -1 +1 @@
1
- {"version":3,"file":"use_group_members_for_new_conversation.d.ts","sourceRoot":"","sources":["../../../src/hooks/groups/use_group_members_for_new_conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iEAAiE,CAAA;AAI3G;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCvE"}
1
+ {"version":3,"file":"use_group_members_for_new_conversation.d.ts","sourceRoot":"","sources":["../../../src/hooks/groups/use_group_members_for_new_conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iEAAiE,CAAA;AAI3G;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCvE"}
@@ -31,9 +31,13 @@ export function useGroupMembersForNewConversation({ id }) {
31
31
  source: [],
32
32
  };
33
33
  });
34
+ const adultMembers = members.filter(member => !member.child);
35
+ const childMembers = members.filter(member => member.child);
34
36
  return {
35
37
  ...response,
36
38
  data: members,
39
+ adultMembers,
40
+ childMembers,
37
41
  };
38
42
  }
39
43
  function buildBadges(membership, currentPersonId) {
@@ -1 +1 @@
1
- {"version":3,"file":"use_group_members_for_new_conversation.js","sourceRoot":"","sources":["../../../src/hooks/groups/use_group_members_for_new_conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD;;;GAGG;AACH,MAAM,UAAU,iCAAiC,CAAC,EAAE,EAAE,EAAkB;IACtE,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAA;IACxC,MAAM,QAAQ,GAAG,eAAe,CAA4B;QAC1D,GAAG,EAAE,cAAc,EAAE,cAAc;QACnC,IAAI,EAAE;YACJ,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,CAAC,QAAQ,CAAC;YACnB,MAAM,EAAE;gBACN,UAAU,EAAE,CAAC,cAAc,CAAC;gBAC5B,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,CAAC;aACnE;SACF;QACD,GAAG,EAAE,QAAQ;KACd,CAAC,CAAA;IAEF,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,QAAQ,CAAA;IAC3C,MAAM,OAAO,GAAqB,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;QAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAA;QAC7B,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM,CAAC,SAAS;YACxB,MAAM,EAAE,WAAW,CAAC,UAAU,EAAE,aAAa,CAAC,EAAE,CAAC;YACjD,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE;YACd,IAAI,EAAE,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,QAAQ,EAAE;YAC9C,MAAM,EAAE,EAAE;SACX,CAAA;IACH,CAAC,CAAC,CAAA;IACF,OAAO;QACL,GAAG,QAAQ;QACX,IAAI,EAAE,OAAO;KACd,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAClB,UAAqC,EACrC,eAAuB;IAEvB,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAA;IAC7B,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,IAAI,UAAU,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;IAClC,CAAC;IACD,IAAI,MAAM,CAAC,EAAE,KAAK,eAAe,EAAE,CAAC;QAClC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAA;IAC9C,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import { MemberBadge, MemberResource } from '../../types'\nimport { GroupsGroupMemberResource } from '../../types/resources/groups/groups_member_resource_with_person'\nimport { useApiPaginator } from '../use_api'\nimport { useCurrentPerson } from '../use_current_person'\n\n/**\n * This is specifically for the new conversation screen because we assign\n * the \"Conversation owner\" badge to the current person.\n */\nexport function useGroupMembersForNewConversation({ id }: { id: number }) {\n const currentPerson = useCurrentPerson()\n const response = useApiPaginator<GroupsGroupMemberResource>({\n url: `/me/groups/${id}/memberships`,\n data: {\n perPage: 100,\n include: ['person'],\n fields: {\n Membership: ['person, role'],\n Person: ['avatar_url', 'name', 'first_name', 'last_name', 'child'],\n },\n },\n app: 'groups',\n })\n\n const { data: memberships = [] } = response\n const members: MemberResource[] = memberships.map(membership => {\n const { person } = membership\n return {\n type: 'Member',\n avatar: person.avatarUrl,\n badges: buildBadges(membership, currentPerson.id),\n child: person.child,\n id: +person.id,\n name: `${person.firstName} ${person.lastName}`,\n source: [],\n }\n })\n return {\n ...response,\n data: members,\n }\n}\n\nfunction buildBadges(\n membership: GroupsGroupMemberResource,\n currentPersonId: number\n): MemberBadge[] {\n const { person } = membership\n const badges = []\n if (membership.role === 'leader') {\n badges.push({ title: 'Leader' })\n }\n if (person.id === currentPersonId) {\n badges.push({ title: 'Conversation owner' })\n }\n return badges\n}\n"]}
1
+ {"version":3,"file":"use_group_members_for_new_conversation.js","sourceRoot":"","sources":["../../../src/hooks/groups/use_group_members_for_new_conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD;;;GAGG;AACH,MAAM,UAAU,iCAAiC,CAAC,EAAE,EAAE,EAAkB;IACtE,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAA;IACxC,MAAM,QAAQ,GAAG,eAAe,CAA4B;QAC1D,GAAG,EAAE,cAAc,EAAE,cAAc;QACnC,IAAI,EAAE;YACJ,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,CAAC,QAAQ,CAAC;YACnB,MAAM,EAAE;gBACN,UAAU,EAAE,CAAC,cAAc,CAAC;gBAC5B,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,CAAC;aACnE;SACF;QACD,GAAG,EAAE,QAAQ;KACd,CAAC,CAAA;IAEF,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,QAAQ,CAAA;IAC3C,MAAM,OAAO,GAAqB,WAAW,CA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roupMemberResource } from '../../types/resources/groups/groups_member_resource_with_person'\nimport { useApiPaginator } from '../use_api'\nimport { useCurrentPerson } from '../use_current_person'\n\n/**\n * This is specifically for the new conversation screen because we assign\n * the \"Conversation owner\" badge to the current person.\n */\nexport function useGroupMembersForNewConversation({ id }: { id: number }) {\n const currentPerson = useCurrentPerson()\n const response = useApiPaginator<GroupsGroupMemberResource>({\n url: `/me/groups/${id}/memberships`,\n data: {\n perPage: 100,\n include: ['person'],\n fields: {\n Membership: ['person, role'],\n Person: ['avatar_url', 'name', 'first_name', 'last_name', 'child'],\n },\n },\n app: 'groups',\n })\n\n const { data: memberships = [] } = response\n const members: MemberResource[] = memberships.map(membership => {\n const { person } = membership\n return {\n type: 'Member',\n avatar: person.avatarUrl,\n badges: buildBadges(membership, currentPerson.id),\n child: person.child,\n id: +person.id,\n name: `${person.firstName} ${person.lastName}`,\n source: [],\n }\n })\n const adultMembers = members.filter(member => !member.child)\n const childMembers = members.filter(member => member.child)\n\n return {\n ...response,\n data: members,\n adultMembers,\n childMembers,\n }\n}\n\nfunction buildBadges(\n membership: GroupsGroupMemberResource,\n currentPersonId: number\n): MemberBadge[] {\n const { person } = membership\n const badges = []\n if (membership.role === 'leader') {\n badges.push({ title: 'Leader' })\n }\n if (person.id === currentPersonId) {\n badges.push({ title: 'Conversation owner' })\n }\n return badges\n}\n"]}
@@ -27,10 +27,11 @@ export declare const NewConversationStack: import("@react-navigation/native").Ty
27
27
  readonly screenLayout: typeof ScreenLayout;
28
28
  readonly screens: {
29
29
  readonly ConversationSelectRecipients: {
30
- readonly screen: ({}: {
30
+ readonly screen: ({ route, }: {
31
31
  route: {
32
32
  params: {
33
- chat_group_graph_id?: string;
33
+ chat_group_graph_id?: import("../types/resources/group_resource").GraphId;
34
+ group_source_app_name?: import("../types/resources/app_name").AppName;
34
35
  };
35
36
  };
36
37
  }) => React.JSX.Element;
@@ -44,11 +45,7 @@ export declare const NewConversationStack: import("@react-navigation/native").Ty
44
45
  };
45
46
  };
46
47
  readonly ConversationFilterRecipients: {
47
- readonly screen: ({}: {
48
- route: {
49
- params: {};
50
- };
51
- }) => React.JSX.Element;
48
+ readonly screen: ({}: import("../screens/conversation_filter_recipients/types").ConversationFilterRecipientsScreenProps) => React.JSX.Element;
52
49
  readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
53
50
  };
54
51
  readonly ConversationNew: {
@@ -56,15 +53,22 @@ export declare const NewConversationStack: import("@react-navigation/native").Ty
56
53
  route: {
57
54
  params: {
58
55
  group_id?: number;
59
- team_ids?: string[];
56
+ team_ids?: number[];
60
57
  plan_id?: number;
61
58
  source_app_name: import("../types/resources/app_name").AppName;
59
+ chat_group_graph_id?: import("../types/resources/group_resource").GraphId;
60
+ group_source_app_name?: import("../types/resources/app_name").AppName;
62
61
  };
63
62
  };
64
63
  }) => React.JSX.Element;
65
- readonly options: {
66
- readonly title: "New conversation";
67
- readonly headerLeft: () => null;
64
+ readonly options: ({ navigation, route }: {
65
+ route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
66
+ navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
67
+ theme: ReactNavigation.Theme;
68
+ }) => {
69
+ title: string;
70
+ headerLeft: () => null;
71
+ headerRight: (props: NativeStackHeaderRightProps) => React.JSX.Element;
68
72
  };
69
73
  };
70
74
  };
@@ -142,10 +146,11 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
142
146
  readonly screenLayout: typeof ScreenLayout;
143
147
  readonly screens: {
144
148
  readonly ConversationSelectRecipients: {
145
- readonly screen: ({}: {
149
+ readonly screen: ({ route, }: {
146
150
  route: {
147
151
  params: {
148
- chat_group_graph_id?: string;
152
+ chat_group_graph_id?: import("../types/resources/group_resource").GraphId;
153
+ group_source_app_name?: import("../types/resources/app_name").AppName;
149
154
  };
150
155
  };
151
156
  }) => React.JSX.Element;
@@ -159,11 +164,7 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
159
164
  };
160
165
  };
161
166
  readonly ConversationFilterRecipients: {
162
- readonly screen: ({}: {
163
- route: {
164
- params: {};
165
- };
166
- }) => React.JSX.Element;
167
+ readonly screen: ({}: import("../screens/conversation_filter_recipients/types").ConversationFilterRecipientsScreenProps) => React.JSX.Element;
167
168
  readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
168
169
  };
169
170
  readonly ConversationNew: {
@@ -171,15 +172,22 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
171
172
  route: {
172
173
  params: {
173
174
  group_id?: number;
174
- team_ids?: string[];
175
+ team_ids?: number[];
175
176
  plan_id?: number;
176
177
  source_app_name: import("../types/resources/app_name").AppName;
178
+ chat_group_graph_id?: import("../types/resources/group_resource").GraphId;
179
+ group_source_app_name?: import("../types/resources/app_name").AppName;
177
180
  };
178
181
  };
179
182
  }) => React.JSX.Element;
180
- readonly options: {
181
- readonly title: "New conversation";
182
- readonly headerLeft: () => null;
183
+ readonly options: ({ navigation, route }: {
184
+ route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
185
+ navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
186
+ theme: ReactNavigation.Theme;
187
+ }) => {
188
+ title: string;
189
+ headerLeft: () => null;
190
+ headerRight: (props: NativeStackHeaderRightProps) => React.JSX.Element;
183
191
  };
184
192
  };
185
193
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OA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39
  screen: ConversationNewScreen,
40
- options: {
40
+ options: ({ navigation, route }) => ({
41
41
  title: 'New conversation',
42
42
  headerLeft: () => null,
43
- },
43
+ headerRight: (props) => (<HeaderRightButton {...props} onPress={() => navigation.popTo('Conversations', route.params)}>
44
+ Cancel
45
+ </HeaderRightButton>),
46
+ }),
44
47
  },
45
48
  },
46
49
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAA;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAA;AAC3F,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,iFAAiF,CAAA;AACxF,OAAO,EAAE,kCAAkC,EAAE,MAAM,iFAAiF,CAAA;AACpI,OAAO,EACL,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,M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CAAC,CACrB;aACF,CAAC;SACH;QACD,GAAG,EAAE;YACH,MAAM,EAAE,oBAAoB;YAC5B,OAAO,EAAE;gBACP,WAAW,EAAE,KAAK;gBAClB,YAAY,EAAE,OAAO;aACtB;SACF;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,cAAc,EAAE;YACd,MAAM,EAAE,oBAAoB;YAC5B,gEAAgE;YAChE,OAAO,EAAE,2BAA2B;SACrC;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK;aACb;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport React from 'react'\nimport { Icon } from '../components'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport { ConversationScreen } from '../screens/conversation_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationSelectRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_recipients_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { NotFound } from '../screens/not_found'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { HeaderRightButton } from './header'\nimport { ScreenLayout } from './screenLayout'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationSelectRecipients',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayout,\n screens: {\n ConversationSelectRecipients: {\n screen: ConversationSelectRecipientsScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton {...props} onPress={navigation.goBack}>\n Cancel\n </HeaderRightButton>\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: {\n title: 'New conversation',\n headerLeft: () => null,\n },\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayout,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerLeft: props => (\n <HeaderBackButton\n displayMode=\"minimal\"\n onPress={() => {\n if ((route.params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n navigation.popTo('Conversations', route.params)\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton {...props} onPress={navigation.goBack}>\n Done\n </HeaderRightButton>\n ),\n }),\n },\n New: {\n screen: NewConversationStack,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAA;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAA;AAC3F,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,iFAAiF,CAAA;AACxF,OAAO,EAAE,kCAAkC,EAAE,MAAM,iFAAiF,CAAA;AACpI,OAAO,EACL,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,mCAAmC,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nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport React from 'react'\nimport { Icon } from '../components'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport { ConversationScreen } from '../screens/conversation_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationSelectRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_recipients_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { NotFound } from '../screens/not_found'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { HeaderRightButton } from './header'\nimport { ScreenLayout } from './screenLayout'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationSelectRecipients',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayout,\n screens: {\n ConversationSelectRecipients: {\n screen: ConversationSelectRecipientsScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton {...props} onPress={navigation.goBack}>\n Cancel\n </HeaderRightButton>\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n >\n Cancel\n </HeaderRightButton>\n ),\n }),\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayout,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerLeft: props => (\n <HeaderBackButton\n displayMode=\"minimal\"\n onPress={() => {\n if ((route.params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n navigation.popTo('Conversations', route.params)\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton {...props} onPress={navigation.goBack}>\n Done\n </HeaderRightButton>\n ),\n }),\n },\n New: {\n screen: NewConversationStack,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
@@ -267,14 +267,14 @@ const useStyles = ({ isStart, isEnd } = {}) => {
267
267
  return StyleSheet.create({
268
268
  listContainer: {
269
269
  flex: 1,
270
- backgroundColor: colors.fillColorNeutral080,
270
+ backgroundColor: colors.surfaceColor080,
271
271
  },
272
272
  contentContainer: {
273
273
  padding: space(2),
274
274
  },
275
275
  sectionOuterBase: {
276
276
  paddingLeft: space(2),
277
- backgroundColor: colors.fillColorNeutral100Inverted,
277
+ backgroundColor: colors.surfaceColor100,
278
278
  borderTopLeftRadius: isStart ? space(1) : 0,
279
279
  borderTopRightRadius: isStart ? space(1) : 0,
280
280
  borderBottomLeftRadius: isEnd ? space(1) : 0,