From 5101ab4769d36ded4383787f02ddca9385b7b8f9 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Thu, 26 May 2022 11:07:17 -0300 Subject: [PATCH] Chore: update @rocket.chat/ui-kit to 0.31.11 (#4203) * Chore: Update UiKit * fix interfaces and plain_text and mrkdwn --- app/containers/UIKit/Actions.tsx | 4 +- app/containers/UIKit/Context.tsx | 4 +- app/containers/UIKit/DatePicker.tsx | 4 +- app/containers/UIKit/Image.tsx | 6 +-- app/containers/UIKit/Input.tsx | 4 +- app/containers/UIKit/MultiSelect/index.tsx | 6 +-- app/containers/UIKit/Section.tsx | 4 +- app/containers/UIKit/index.tsx | 48 ++++++++++++++----- app/containers/UIKit/interfaces.ts | 10 +--- app/containers/UIKit/utils.ts | 6 +-- app/externalModules.d.ts | 1 - .../CreateDiscussionView/SelectUsers.tsx | 4 +- app/views/LivechatEditView.tsx | 4 +- app/views/RoomInfoEditView/index.tsx | 4 +- package.json | 2 +- yarn.lock | 8 ++-- 16 files changed, 67 insertions(+), 52 deletions(-) diff --git a/app/containers/UIKit/Actions.tsx b/app/containers/UIKit/Actions.tsx index c8bf9ff5..a23b030a 100644 --- a/app/containers/UIKit/Actions.tsx +++ b/app/containers/UIKit/Actions.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit'; +import { BlockContext } from '@rocket.chat/ui-kit'; import Button from '../Button'; import I18n from '../../i18n'; @@ -10,7 +10,7 @@ export const Actions = ({ blockId, appId, elements, parser }: IActions) => { const renderedElements = showMoreVisible ? elements?.slice(0, 5) : elements; const Elements = () => ( - <>{renderedElements?.map(element => parser?.renderActions({ blockId, appId, ...element }, BLOCK_CONTEXT.ACTION, parser))} + <>{renderedElements?.map(element => parser?.renderActions({ blockId, appId, ...element }, BlockContext.ACTION, parser))} ); return ( diff --git a/app/containers/UIKit/Context.tsx b/app/containers/UIKit/Context.tsx index e3958014..e6bde5d2 100644 --- a/app/containers/UIKit/Context.tsx +++ b/app/containers/UIKit/Context.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { StyleSheet, View } from 'react-native'; -import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit'; +import { BlockContext } from '@rocket.chat/ui-kit'; import { IContext } from './interfaces'; @@ -13,5 +13,5 @@ const styles = StyleSheet.create({ }); export const Context = ({ elements, parser }: IContext) => ( - {elements?.map(element => parser?.renderContext(element, BLOCK_CONTEXT.CONTEXT, parser))} + {elements?.map(element => parser?.renderContext(element, BlockContext.CONTEXT, parser))} ); diff --git a/app/containers/UIKit/DatePicker.tsx b/app/containers/UIKit/DatePicker.tsx index 0b8bff20..f8ddaebc 100644 --- a/app/containers/UIKit/DatePicker.tsx +++ b/app/containers/UIKit/DatePicker.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { StyleSheet, Text, View } from 'react-native'; import DateTimePicker, { Event } from '@react-native-community/datetimepicker'; import Touchable from 'react-native-platform-touchable'; -import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit'; +import { BlockContext } from '@rocket.chat/ui-kit'; import moment from 'moment'; import Button from '../Button'; @@ -58,7 +58,7 @@ export const DatePicker = ({ element, language, action, context, loading, value, let button = placeholder ?