pixel-react 1.22.10 → 1.22.11

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.
package/lib/index.d.ts CHANGED
@@ -6194,7 +6194,7 @@ interface TableProps {
6194
6194
 
6195
6195
  declare const StepLandingTable: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<TableProps & React__default.RefAttributes<any>>>;
6196
6196
 
6197
- interface RichTextEditorProps {
6197
+ interface RichTextEditorProps$1 {
6198
6198
  convertedContent: string;
6199
6199
  label?: string;
6200
6200
  setConvertedContent: (content: string) => void;
@@ -6213,7 +6213,7 @@ interface RichTextEditorProps {
6213
6213
  onFocus?: (event?: React.FocusEvent<HTMLTextAreaElement>) => void;
6214
6214
  }
6215
6215
 
6216
- declare const TextEditor: FC<RichTextEditorProps>;
6216
+ declare const TextEditor: FC<RichTextEditorProps$1>;
6217
6217
 
6218
6218
  interface NoDataFoundProps {
6219
6219
  iconName: string;
@@ -6465,6 +6465,176 @@ declare const passesFilters: (facetQueries: DynamicObj$1[], response: DynamicObj
6465
6465
  declare const restoreSelectedFilters: (urlFilters: DynamicObj$1[], setSelectedFilters: (filters: string[]) => void, setModifiedOnState: (filters: DynamicObj$1) => void, setInitialFilterData: (filters: string[]) => void, setInitialModifiedOnState: (filters: DynamicObj$1) => void) => void;
6466
6466
  declare const getFiltersFromUrl: (params: URLSearchParams) => DynamicObj$1[];
6467
6467
 
6468
+ type RichTextToolbarOption = 'bold' | 'italic' | 'underline' | 'strike' | 'heading1' | 'heading2' | 'heading3' | 'bulletList' | 'orderedList' | 'blockquote' | 'code' | 'codeBlock' | 'link' | 'image' | 'attachment' | 'undo' | 'redo' | 'clear';
6469
+ /**
6470
+ * Uploads an image and resolves with its http(s) URL
6471
+ */
6472
+ type RichTextImageUpload = (file: File) => Promise<string>;
6473
+ /**
6474
+ * Uploads an attached file and resolves with its http(s) URL
6475
+ */
6476
+ type RichTextFileUpload = (file: File) => Promise<string>;
6477
+ /**
6478
+ * Why an attached file was not inserted:
6479
+ * - `'type'`: it doesn't match `fileAttachmentAccept`
6480
+ * - `'size'`: it is larger than `maxFileSize`
6481
+ * - `'upload'`: the upload failed or resolved with an unsafe URL
6482
+ */
6483
+ type RichTextFileAttachmentError = 'type' | 'size' | 'upload';
6484
+ /**
6485
+ * Format of the editor `value` and of the content passed to `onChange`, `onFocus` and `onBlur`
6486
+ */
6487
+ type RichTextOutputFormat = 'html' | 'text';
6488
+ interface RichTextDynamicValue {
6489
+ /**
6490
+ * Text shown in the suggestion list
6491
+ */
6492
+ label: string;
6493
+ /**
6494
+ * Identifier stored on the token as `data-id` and shown as `{{value}}`
6495
+ */
6496
+ value: string;
6497
+ }
6498
+ interface RichTextEditorProps {
6499
+ /**
6500
+ * Content of the editor, in the format set by `outputFormat`
6501
+ */
6502
+ value?: string;
6503
+ /**
6504
+ * Format of `value` and of the content passed to `onChange`, `onFocus` and `onBlur`.
6505
+ * - `'html'`: the editor HTML, with formatting
6506
+ * - `'text'`: plain text, one line per block. Formatting, links and images are
6507
+ * dropped and dynamic values are written as `{{value}}`
6508
+ * @default 'html'
6509
+ */
6510
+ outputFormat?: RichTextOutputFormat;
6511
+ /**
6512
+ * Called with the editor content (see `outputFormat`) and its text character count
6513
+ * whenever the content changes
6514
+ */
6515
+ onChange?: (value: string, charCount: number) => void;
6516
+ /**
6517
+ * Called with the text character count on mount and whenever it changes
6518
+ * (including external `value` updates). Use it to run min/max length
6519
+ * validation in the parent form and pass the result back via `error`/`helperText`
6520
+ */
6521
+ onCharCountChange?: (charCount: number) => void;
6522
+ /**
6523
+ * Label shown above the editor
6524
+ */
6525
+ label?: string;
6526
+ /**
6527
+ * Shows a required asterisk next to the label
6528
+ */
6529
+ required?: boolean;
6530
+ /**
6531
+ * Placeholder shown when the editor is empty
6532
+ */
6533
+ placeholder?: string;
6534
+ /**
6535
+ * Makes the editor non-editable and hides the toolbar
6536
+ */
6537
+ readOnly?: boolean;
6538
+ /**
6539
+ * Hides the toolbar while keeping the editor editable
6540
+ */
6541
+ toolbarHidden?: boolean;
6542
+ /**
6543
+ * Toolbar buttons to show, in order. Defaults to all options
6544
+ */
6545
+ toolbarOptions?: RichTextToolbarOption[];
6546
+ /**
6547
+ * Values offered when the user types `dynamicValueTrigger`. Picking one inserts it
6548
+ * as a token: `<span data-type="dynamicValue" data-id="{value}" data-label="{label}">`.
6549
+ * The feature is disabled (typing the trigger does nothing) when this is empty or omitted
6550
+ */
6551
+ dynamicValues?: RichTextDynamicValue[];
6552
+ /**
6553
+ * Called with the dynamic values present in the content (document order, no duplicates)
6554
+ * on mount and whenever they change, including external `value` updates
6555
+ */
6556
+ onDynamicValuesChange?: (dynamicValues: RichTextDynamicValue[]) => void;
6557
+ /**
6558
+ * Character that opens the dynamic value list
6559
+ * @default '<'
6560
+ */
6561
+ dynamicValueTrigger?: string;
6562
+ /**
6563
+ * Enables inserting images via the toolbar `image` button, paste and drop.
6564
+ * When false, the `image` toolbar option is hidden and pasted/dropped images are ignored
6565
+ * @default false
6566
+ */
6567
+ allowImageUpload?: boolean;
6568
+ /**
6569
+ * Uploads images picked, pasted or dropped into the editor and resolves with their URL.
6570
+ * When omitted, images are embedded in the HTML as base64 data URLs
6571
+ */
6572
+ onImageUpload?: RichTextImageUpload;
6573
+ /**
6574
+ * Enables attaching local files via the toolbar `attachment` button, and via
6575
+ * paste and drop for files that aren't inserted as images. Each file is inserted
6576
+ * as a download chip:
6577
+ * `<a data-type="fileAttachment" href="{url}" data-name="{name}" data-size="{bytes}" download>`.
6578
+ * When false, the `attachment` toolbar option is hidden
6579
+ * @default false
6580
+ */
6581
+ allowFileAttachment?: boolean;
6582
+ /**
6583
+ * Uploads attached files and resolves with their URL. When omitted, files are
6584
+ * embedded in the HTML as base64 data URLs, which only works for images
6585
+ */
6586
+ onFileUpload?: RichTextFileUpload;
6587
+ /**
6588
+ * File types that can be attached, in `accept` attribute syntax
6589
+ * (e.g. `'image/*'`, `'.pdf,.docx'`)
6590
+ * @default 'image/*'
6591
+ */
6592
+ fileAttachmentAccept?: string;
6593
+ /**
6594
+ * Maximum size of an attached file, in bytes
6595
+ */
6596
+ maxFileSize?: number;
6597
+ /**
6598
+ * Called for each attached file that was not inserted, with the reason
6599
+ */
6600
+ onFileAttachmentError?: (file: File, reason: RichTextFileAttachmentError) => void;
6601
+ /**
6602
+ * Applies error styling
6603
+ */
6604
+ error?: boolean;
6605
+ /**
6606
+ * Text shown below the editor (error message when `error` is true)
6607
+ */
6608
+ helperText?: string;
6609
+ /**
6610
+ * Minimum height of the editable area
6611
+ */
6612
+ minHeight?: number | string;
6613
+ /**
6614
+ * Maximum height of the editable area, scrolls beyond this
6615
+ */
6616
+ maxHeight?: number | string;
6617
+ /**
6618
+ * Minimum number of text characters. Shows an error after blur when the
6619
+ * content is non-empty but shorter than this
6620
+ */
6621
+ minLength?: number;
6622
+ /**
6623
+ * Maximum number of text characters. Input beyond this is blocked and a
6624
+ * `count/maxLength` counter is shown below the editor
6625
+ */
6626
+ maxLength?: number;
6627
+ /**
6628
+ * Focuses the editor on mount
6629
+ */
6630
+ autoFocus?: boolean;
6631
+ onFocus?: (value: string) => void;
6632
+ onBlur?: (value: string) => void;
6633
+ className?: string;
6634
+ }
6635
+
6636
+ declare const RichTextEditor: FC<RichTextEditorProps>;
6637
+
6468
6638
  declare const EMAIL_REGEX: RegExp;
6469
6639
  declare const URL_REGEX: RegExp;
6470
6640
  declare const PHONE_REGEX: RegExp;
@@ -6644,5 +6814,5 @@ interface InsightCardProps {
6644
6814
 
6645
6815
  declare const InsightCard: ({ title, bullets, color, width, height, iconName }: InsightCardProps) => React$1.JSX.Element;
6646
6816
 
6647
- export { AADHAAR_REGEX, ALPHABET_ONLY_REGEX, ALPHABET_WITH_SPACES_ONLY_REGEX, ALPHANUMERIC_PARENTHESIS_REGEX, ALPHANUMERIC_REGEX, ALPHANUMERIC_WITH_DOT_REGEX, ALPHANUMERIC_WITH_ROUND_BRACES_REGEX, ALPHA_NUM_EXTENDED_REGEX, ALPHA_NUM_REGEX, Accordion, AddContentButton, AddResourceButton, AiToggle, AllProjectsDropdown, AnimatedSetting, AppHeader, AttachMedia, AttachmentButton, AudioPlayer, AutoTruncateText, Avatar, BASE64_REGEX, BIG_END_WHITESPACE, BINARY_NUMBER_REGEX, BODY_TAG_TYPE_VALIDATION, BarChart, Card as Box, BrowserTabs, Button, CAMEL_CASE_REGEX, CERTIFICATES_NAME_REGEX, CHECK_CAMEL_CASE, CREDIT_CARD_REGEX, CURRENCY_GENERIC_REGEX, CardPanel, ChatModal, ChatModalAi, Checkbox, Chip, ChipWithCount, ChooseFile, Col, Comments, ConditionalDropdown, ConnectingBranch, Container, ContentCard, CreateVariableSlider, DATE_REGEX, DECIMAL_NUMBER_REGEX, DRIVING_LICENSE_REGEX, DYNAMIC_VALUE_PATTERN_REGEX, DYNAMIC_VALUE_TYPE_REGEX, DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX, DYNAMIC_VALUE__PLACEHOLDER_REGEX, DashboardDonutChart, CustomDatePicker as DatePicker, DebugToolsPanel, DonutChart, DotLoader, DownloadClient, DragAndDrop, Drawer, Dropzone, ELEMENTS_TRAILING_SPACE_REGEX, ELEMENTS_WHITE_SPACE_REGEX, EMAIL_FORMAT_REGEX, EMAIL_REGEX, EMAIL_VALIDATION_REGEX, EXCEL_SPACING_REGEX, EXECUTION_ID_VALIDATION, EditLabel, EditTextField, Editor, ErrorBoundary, ExcelFile as Excel, ExpandableMenu, FILENAME_VALIDATION_REGEX, FILE_EXTENSION_REGEX, FILE_NAME_REGEX, FieldSet, FileDropzone, FilePreview, ForwardedForms as Form, formatString as FormatString, GSTIN_REGEX, HEXADECIMAL_NUMBER_REGEX, HEX_COLOR_REGEX, HSL_COLOR_REGEX, HTML_ATTRIBUTE_REGEX, HTML_FILE_TYPE_VALIDATION, HTML_TAG_REGEX, MemoizedHighlightText as HighlightText, HistoryCard, INDIAN_CURRENCY_REGEX, INDIAN_PASSPORT_REGEX, INDIAN_PHONE_REGEX, INDIAN_PIN_CODE_REGEX, INTERNATIONAL_PHONE_REGEX, INVALID_EMAIL_REGEX, IPV4_REGEX, IPV6_REGEX, Icon, IconButton, IconRadialChart, IconRadioGroup, Input, InputWithDropdown, InsightCard, JAVASCRIPT_FILE_TYPE_VALIDATION, LINKEDIN_PROFILE_REGEX, LINK_VALIDATION_REGEX, LabelEditTextField, LayoutWithDrawer, LineChart, LineLoader, Link, Loader, MAC_ADDRESS_REGEX, MEMORY_VALIDATION_REGEX, MachineInputField, MediaPreview, MediaViewerModal as MediaViewerModel, MenuOption, MessageBox, MetricCard, MiniModal, MobileSkin, Modal, ModuleChip, MultiRadialChart, MultiSelect, NlpInput as NLPInput, NLP_DESCRIPTION_REGEX, NO_LEADING_TRAILING_SPACE_REGEX, NUMBERS_ONLY_REGEX, NUMBER_REGEX, NetworkErrorBoundary, NoDataAvailable, NoDataContent, NoResultFound, OsTree, OtpVerification, OverviewModal, PAN_CARD_REGEX, PARAMETER_ALPHANUMERIC_REGEX, PASSWORD_COMPLEX_REGEX, PASSWORD_SIMPLE_REGEX, PHONE_REGEX, POSTAL_CODE_REGEX, Paper, PhoneInputField, PieChart, PopUpModal, PrePostTable, ProcessedSourceSelector, ProgressBar, Prompt, PromptContainer, RGB_COLOR_REGEX, ROMAN_NUMERALS_REGEX, RadialChart, RadioButton, RadioGroup, Recaptcha, Row, SCRIPT_REGEX, SERVER_HOST_REGEX, SSN_REGEX, START_END_WHITESPACE_REGEX, STEP_GROUP_NAME_REGEX, ScoreGaugeChart, ScriptGenerationLoader, ScriptSwitchButton, Search, Select, SelectionSwitcher, SequentialConnectingBranch, SessionDropdown, SessionManager, StackedBarChart, StateDropdown, StatusBadge, StatusButton, StatusCard, StatusIndicator, StepLandingTable, StepResultStats, StorageUsageBar, SwitchButton, TIME_REGEX, TWITTER_HANDLE_REGEX, Table, TreeTable as TableTree, TableTreeFn, TableWithAccordion, Tabs, TabsWithSilder, Textarea as TextArea, TextEditor, ThemeProvider, Toaster, Toastify, Toggle, ToggleSwitch, Tooltip, TooltipService, TruncatedTooltip, Typography, UNIT_REGEX, URL_REGEX, USERNAME_REGEX, USERNAME_SPECIAL_REGEX, US_ZIP_CODE_REGEX, UUID_REGEX, VALID_NAME_PATTERN, VEHICLE_REGISTRATION_REGEX, VariableDropdown, VariableInput, VariableSuggestionInputDropDown, WHITESPACE_REGEX, WeightageTable, XML_FILE_TYPE_VALIDATION, ZoomControl, addPrePostStepGroup, addStepGroup, autoScrollToTableLastRow, capitalize, checkEmpty, checkMicrophoneAccess, cleanAllTooltips, clearStore, compareArrays, compareObjects, computeTreeCountsAndFormatNodes, convertFormDataToObject, convertToBytes, convertToGB, convertToISO, copyToClipboard, debounce, deleteStoreValue, ffid, findAndInsert, formatDate, formatResponseDate, getEncryptedData, getExtension, getExtensionWithPeriod, getFiltersFromUrl, getNavigateToKey, getSequentialPayload, getStoreValue, getTopVisibleNodeKey, getTreeDetails, handleTimeZoneChange, handleTreeExpandAllCollapseAll, handleTreeNodeExpandCollapse, handleTreeNodeSect, handleUnCheckAllTreeNodesWithUpdates, hasDuplicateFile, isEmptyObject, isTextTruncated, nlpInputDelay, passesFilters, rearrangeDragItem, restoreSelectedFilters, saveFileFromBlob, scrollToView, setStoreValue, throttle, toCamelCase, toast, toggleShowHideEntity, truncateText, updateSearchTree, updateTreeState, useBeforeUnload, useClickOutside, useDeviceType, useFileDropzone, useKeyboardActions, useTheme, useTriggerControl, validateFileContent };
6817
+ export { AADHAAR_REGEX, ALPHABET_ONLY_REGEX, ALPHABET_WITH_SPACES_ONLY_REGEX, ALPHANUMERIC_PARENTHESIS_REGEX, ALPHANUMERIC_REGEX, ALPHANUMERIC_WITH_DOT_REGEX, ALPHANUMERIC_WITH_ROUND_BRACES_REGEX, ALPHA_NUM_EXTENDED_REGEX, ALPHA_NUM_REGEX, Accordion, AddContentButton, AddResourceButton, AiToggle, AllProjectsDropdown, AnimatedSetting, AppHeader, AttachMedia, AttachmentButton, AudioPlayer, AutoTruncateText, Avatar, BASE64_REGEX, BIG_END_WHITESPACE, BINARY_NUMBER_REGEX, BODY_TAG_TYPE_VALIDATION, BarChart, Card as Box, BrowserTabs, Button, CAMEL_CASE_REGEX, CERTIFICATES_NAME_REGEX, CHECK_CAMEL_CASE, CREDIT_CARD_REGEX, CURRENCY_GENERIC_REGEX, CardPanel, ChatModal, ChatModalAi, Checkbox, Chip, ChipWithCount, ChooseFile, Col, Comments, ConditionalDropdown, ConnectingBranch, Container, ContentCard, CreateVariableSlider, DATE_REGEX, DECIMAL_NUMBER_REGEX, DRIVING_LICENSE_REGEX, DYNAMIC_VALUE_PATTERN_REGEX, DYNAMIC_VALUE_TYPE_REGEX, DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX, DYNAMIC_VALUE__PLACEHOLDER_REGEX, DashboardDonutChart, CustomDatePicker as DatePicker, DebugToolsPanel, DonutChart, DotLoader, DownloadClient, DragAndDrop, Drawer, Dropzone, ELEMENTS_TRAILING_SPACE_REGEX, ELEMENTS_WHITE_SPACE_REGEX, EMAIL_FORMAT_REGEX, EMAIL_REGEX, EMAIL_VALIDATION_REGEX, EXCEL_SPACING_REGEX, EXECUTION_ID_VALIDATION, EditLabel, EditTextField, Editor, ErrorBoundary, ExcelFile as Excel, ExpandableMenu, FILENAME_VALIDATION_REGEX, FILE_EXTENSION_REGEX, FILE_NAME_REGEX, FieldSet, FileDropzone, FilePreview, ForwardedForms as Form, formatString as FormatString, GSTIN_REGEX, HEXADECIMAL_NUMBER_REGEX, HEX_COLOR_REGEX, HSL_COLOR_REGEX, HTML_ATTRIBUTE_REGEX, HTML_FILE_TYPE_VALIDATION, HTML_TAG_REGEX, MemoizedHighlightText as HighlightText, HistoryCard, INDIAN_CURRENCY_REGEX, INDIAN_PASSPORT_REGEX, INDIAN_PHONE_REGEX, INDIAN_PIN_CODE_REGEX, INTERNATIONAL_PHONE_REGEX, INVALID_EMAIL_REGEX, IPV4_REGEX, IPV6_REGEX, Icon, IconButton, IconRadialChart, IconRadioGroup, Input, InputWithDropdown, InsightCard, JAVASCRIPT_FILE_TYPE_VALIDATION, LINKEDIN_PROFILE_REGEX, LINK_VALIDATION_REGEX, LabelEditTextField, LayoutWithDrawer, LineChart, LineLoader, Link, Loader, MAC_ADDRESS_REGEX, MEMORY_VALIDATION_REGEX, MachineInputField, MediaPreview, MediaViewerModal as MediaViewerModel, MenuOption, MessageBox, MetricCard, MiniModal, MobileSkin, Modal, ModuleChip, MultiRadialChart, MultiSelect, NlpInput as NLPInput, NLP_DESCRIPTION_REGEX, NO_LEADING_TRAILING_SPACE_REGEX, NUMBERS_ONLY_REGEX, NUMBER_REGEX, NetworkErrorBoundary, NoDataAvailable, NoDataContent, NoResultFound, OsTree, OtpVerification, OverviewModal, PAN_CARD_REGEX, PARAMETER_ALPHANUMERIC_REGEX, PASSWORD_COMPLEX_REGEX, PASSWORD_SIMPLE_REGEX, PHONE_REGEX, POSTAL_CODE_REGEX, Paper, PhoneInputField, PieChart, PopUpModal, PrePostTable, ProcessedSourceSelector, ProgressBar, Prompt, PromptContainer, RGB_COLOR_REGEX, ROMAN_NUMERALS_REGEX, RadialChart, RadioButton, RadioGroup, Recaptcha, RichTextEditor, Row, SCRIPT_REGEX, SERVER_HOST_REGEX, SSN_REGEX, START_END_WHITESPACE_REGEX, STEP_GROUP_NAME_REGEX, ScoreGaugeChart, ScriptGenerationLoader, ScriptSwitchButton, Search, Select, SelectionSwitcher, SequentialConnectingBranch, SessionDropdown, SessionManager, StackedBarChart, StateDropdown, StatusBadge, StatusButton, StatusCard, StatusIndicator, StepLandingTable, StepResultStats, StorageUsageBar, SwitchButton, TIME_REGEX, TWITTER_HANDLE_REGEX, Table, TreeTable as TableTree, TableTreeFn, TableWithAccordion, Tabs, TabsWithSilder, Textarea as TextArea, TextEditor, ThemeProvider, Toaster, Toastify, Toggle, ToggleSwitch, Tooltip, TooltipService, TruncatedTooltip, Typography, UNIT_REGEX, URL_REGEX, USERNAME_REGEX, USERNAME_SPECIAL_REGEX, US_ZIP_CODE_REGEX, UUID_REGEX, VALID_NAME_PATTERN, VEHICLE_REGISTRATION_REGEX, VariableDropdown, VariableInput, VariableSuggestionInputDropDown, WHITESPACE_REGEX, WeightageTable, XML_FILE_TYPE_VALIDATION, ZoomControl, addPrePostStepGroup, addStepGroup, autoScrollToTableLastRow, capitalize, checkEmpty, checkMicrophoneAccess, cleanAllTooltips, clearStore, compareArrays, compareObjects, computeTreeCountsAndFormatNodes, convertFormDataToObject, convertToBytes, convertToGB, convertToISO, copyToClipboard, debounce, deleteStoreValue, ffid, findAndInsert, formatDate, formatResponseDate, getEncryptedData, getExtension, getExtensionWithPeriod, getFiltersFromUrl, getNavigateToKey, getSequentialPayload, getStoreValue, getTopVisibleNodeKey, getTreeDetails, handleTimeZoneChange, handleTreeExpandAllCollapseAll, handleTreeNodeExpandCollapse, handleTreeNodeSect, handleUnCheckAllTreeNodesWithUpdates, hasDuplicateFile, isEmptyObject, isTextTruncated, nlpInputDelay, passesFilters, rearrangeDragItem, restoreSelectedFilters, saveFileFromBlob, scrollToView, setStoreValue, throttle, toCamelCase, toast, toggleShowHideEntity, truncateText, updateSearchTree, updateTreeState, useBeforeUnload, useClickOutside, useDeviceType, useFileDropzone, useKeyboardActions, useTheme, useTriggerControl, validateFileContent };
6648
6818
  export type { HighlightTextPart, HighlightTextSegment, RootNode$1 as RootNode, TreeNodeProps, WeightageCellRenderProps, WeightageColumnLabels, WeightageGroup, WeightageRow, WeightageTableProps };