PromucFlow_constructor/app/client/src/widgets/MultiSelectTreeWidget/component/index.tsx

320 lines
8.3 KiB
TypeScript
Raw Normal View History

import React, {
ChangeEvent,
ReactNode,
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import TreeSelect, { TreeSelectProps as SelectProps } from "rc-tree-select";
import {
TreeSelectContainer,
DropdownStyles,
StyledIcon,
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
InputContainer,
} from "./index.styled";
import "rc-tree-select/assets/index.less";
2022-06-09 09:31:02 +00:00
import { DefaultValueType } from "rc-tree-select/lib/interface";
import { TreeNodeProps } from "rc-tree-select/lib/TreeNode";
import { CheckedStrategy } from "rc-tree-select/lib/utils/strategyUtil";
2022-06-09 08:38:08 +00:00
import { RenderMode, TextSize } from "constants/WidgetConstants";
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
import { Alignment, Button, Classes, InputGroup } from "@blueprintjs/core";
2022-06-09 08:38:08 +00:00
import { labelMargin, WidgetContainerDiff } from "widgets/WidgetUtils";
import Icon from "components/ads/Icon";
import { Colors } from "constants/Colors";
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
import { LabelPosition } from "components/constants";
import LabelWithTooltip from "components/ads/LabelWithTooltip";
2022-06-09 08:38:08 +00:00
import useDropdown from "widgets/useDropdown";
export interface TreeSelectProps
extends Required<
Pick<
SelectProps,
| "disabled"
| "placeholder"
| "loading"
| "dropdownStyle"
| "allowClear"
| "options"
>
> {
value?: DefaultValueType;
onChange: (value?: DefaultValueType, labelList?: ReactNode[]) => void;
expandAll: boolean;
mode: CheckedStrategy;
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
labelText: string;
labelAlignment?: Alignment;
labelPosition?: LabelPosition;
labelWidth?: number;
labelTextColor?: string;
labelTextSize?: TextSize;
labelStyle?: string;
compactMode: boolean;
dropDownWidth: number;
width: number;
isValid: boolean;
feat: App Theming (#9714) * fix style bugs * fix select styles * test: fix font size issue for cypress tests * incorporate ashit feedback * test: addresed review comments for cypress tests * add analytics events * height issue in view mode * incorporate code review feedbacks * incorporate code review feedbacks * refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations * feat: Makes shadow and radius controls keyboard accessible (#11547) * makes shadow and radius controls keyboard accessible * removes unused imports * moves options out of render method * fix: changed the misnomer background property name to the relevant property name * fix: border radius issue for the map widget * address qa bugs * address qa bugs * fix ux of theming pane when widget is selected * fix: * added backgroundColor to the video widget * restricted pop-over border radius to 0.375rem * added box shadow for the input group for select widget * fix: added delete icon in the delete theme modal * address qa bugs * change checkbox column size in config * add js convertible to button color * remove unused imports * test: fixed jest tests * fix primary color typo * fix: migrations for the theming * fix: * Removed background color from MultiTreeSelect and TreeSelect component. * grouped button's menu button pop over border radius restricting to 0.375rem. * test: updated Dsl migration UT * address qa bugs * address qa bugs * fix: address qa comments * address qa bugs * fix: * migration issue; * unit test cases; * fix rating widget scroll issue * fix youtube video border radius bug * fix select widget * fix select widgets styles * address qa bugs * merge conflicts * makes the reset button keyboard accessible (#12134) * -resolved merge conflicts * address qa bugs * fix: labelTextSize migration fixes * refactor: * made changes to the fontSizeUtils function * fixed the issue related to unit tests * fix button group widget * remove unused imports * fix: fixed the text size migration for the table widget * refactor: addressed review comments for the table widget theming migration * fix button group widget * add init calls for view mode * json form init theme changes * fix: added migration for boxShadow, borderRadius and textSizes for table widget * fix broken fields * test: fixed unit tests * wip * inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration * feat: init json form migration theming * json form primaryColor -> accentColor * update table widget * update table widget * object field label styling * fix: migration related to the JSON form * fix: fixed labelTextSize migration for JSON form nested widgets * property control nested stylesheet lookup * JSONForm label styles form array items * show label for checkbox field array item * fix button group widget * wip * refactor: addressed table widget review comments * refactor: addressed ashit review comments; * added childStylesheet for widgets * feat: Keyboard navigable Color Picker control (#11797) * Makes ColorPicker keyboard accessible * seperate out keyboard and mouse interactions * fix issue with not focusing back to input * Adds test for Color picker * chore: added comment for the boxShadow property * fix: * added unit test cases for the widget and property utils * resolved warning messages * wip * theme config update * fix merge conflicts * refactor: moved theming migration inside the migrations folder * fix qa bugs * fix jest test * fix: unit test cases * fix table column creation logic * refactor: addressed review comments for migrations * fix: Overriding margin and padding for custom render in the dropdown component (#12875) * * fix for custom render padding and margin in ADS dropdown * * fix for removing padding from normal render options * refactor: moved the boxShadow condition to the variable * fix qa bugs * fix: migration QA callouts for audio recorder widget * refactor: added updated comments for boxShadow migration for table widget * fix theme binfings for JSONForm fields under Object * fix table widget theming bug * fix: addressed code review comments * fix: unit test cases * fix: qa migration callouts * fix table widget theming bug * fix JSONForm currency input dropdown not submit form * Added new tests - AppThemingSpec * fix qa bugs * fix unit test * fix JSONForm cellBorderWidth to have default value post migration * fix unit test * fix qa bugs * remove unused imports * fix qa bugs * fix JSONForm input height issue * fix qa bugs * Updating Theming spec * * dropdown color fixes (#13249) * fix caching issue ; * Fixed Theming tests * fix tests * fix tab widget tests * fix: json form children level migration issue * fix table widget tests * Updated test * updated tests * updated test * updated tests * updated tests * updated pageload * fix cypress tests * remove cypress created files * fix color picker issues * Failure fixes * Fixed some more tests * fix: cypress test failures * fix tests * remove consoles * fix table tests * fix qa bugs * updating snapshots for AppPageLayout_spec as per new UI * fix rating widget bug * fix qa bugs * fix: * cypress failing tests * Migration QA callouts * Removed unused imports * update constract check algo * fix color contrast issue * fix: cypress failure test cases * update font sizes labels * fix regression bugs * fix: * JSON form labelTextSize issue fix * Updated comment for the fontSizeUtility function * migrations issues related to table widget borderRadius and boxShadow * fix: default labelTextSize issue for the Input and Select families * fix regression bugs * fix regression bugs * PassingParams spec - added wait time * fix: font family default value issue on JS toggle * fix js toggle issue in text widget * fix tests * fix tests * fix tests * fix cypress tests * fix regression bugs * fix regression bugs * fix: * refactored table widget migration function as per review comments, * added default value to the widget * fix: failing unit test cases * fix theming spec * fix cypress tests * test: fixed failed cypress test * incorporate ashit feedback * fix cypress tests * fix: addressed review comments * comment out table cypress test * fix merge conflicts * comment out color picker tests Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local> Co-authored-by: keyurparalkar <keyur@appsmith.com> Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Ashit Rath <ashit@appsmith.com> Co-authored-by: balajisoundar <balaji@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: apple <nandan@thinkify.io> Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 09:45:57 +00:00
borderRadius: string;
boxShadow?: string;
accentColor: string;
widgetId: string;
feat: App Theming (#9714) * fix style bugs * fix select styles * test: fix font size issue for cypress tests * incorporate ashit feedback * test: addresed review comments for cypress tests * add analytics events * height issue in view mode * incorporate code review feedbacks * incorporate code review feedbacks * refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations * feat: Makes shadow and radius controls keyboard accessible (#11547) * makes shadow and radius controls keyboard accessible * removes unused imports * moves options out of render method * fix: changed the misnomer background property name to the relevant property name * fix: border radius issue for the map widget * address qa bugs * address qa bugs * fix ux of theming pane when widget is selected * fix: * added backgroundColor to the video widget * restricted pop-over border radius to 0.375rem * added box shadow for the input group for select widget * fix: added delete icon in the delete theme modal * address qa bugs * change checkbox column size in config * add js convertible to button color * remove unused imports * test: fixed jest tests * fix primary color typo * fix: migrations for the theming * fix: * Removed background color from MultiTreeSelect and TreeSelect component. * grouped button's menu button pop over border radius restricting to 0.375rem. * test: updated Dsl migration UT * address qa bugs * address qa bugs * fix: address qa comments * address qa bugs * fix: * migration issue; * unit test cases; * fix rating widget scroll issue * fix youtube video border radius bug * fix select widget * fix select widgets styles * address qa bugs * merge conflicts * makes the reset button keyboard accessible (#12134) * -resolved merge conflicts * address qa bugs * fix: labelTextSize migration fixes * refactor: * made changes to the fontSizeUtils function * fixed the issue related to unit tests * fix button group widget * remove unused imports * fix: fixed the text size migration for the table widget * refactor: addressed review comments for the table widget theming migration * fix button group widget * add init calls for view mode * json form init theme changes * fix: added migration for boxShadow, borderRadius and textSizes for table widget * fix broken fields * test: fixed unit tests * wip * inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration * feat: init json form migration theming * json form primaryColor -> accentColor * update table widget * update table widget * object field label styling * fix: migration related to the JSON form * fix: fixed labelTextSize migration for JSON form nested widgets * property control nested stylesheet lookup * JSONForm label styles form array items * show label for checkbox field array item * fix button group widget * wip * refactor: addressed table widget review comments * refactor: addressed ashit review comments; * added childStylesheet for widgets * feat: Keyboard navigable Color Picker control (#11797) * Makes ColorPicker keyboard accessible * seperate out keyboard and mouse interactions * fix issue with not focusing back to input * Adds test for Color picker * chore: added comment for the boxShadow property * fix: * added unit test cases for the widget and property utils * resolved warning messages * wip * theme config update * fix merge conflicts * refactor: moved theming migration inside the migrations folder * fix qa bugs * fix jest test * fix: unit test cases * fix table column creation logic * refactor: addressed review comments for migrations * fix: Overriding margin and padding for custom render in the dropdown component (#12875) * * fix for custom render padding and margin in ADS dropdown * * fix for removing padding from normal render options * refactor: moved the boxShadow condition to the variable * fix qa bugs * fix: migration QA callouts for audio recorder widget * refactor: added updated comments for boxShadow migration for table widget * fix theme binfings for JSONForm fields under Object * fix table widget theming bug * fix: addressed code review comments * fix: unit test cases * fix: qa migration callouts * fix table widget theming bug * fix JSONForm currency input dropdown not submit form * Added new tests - AppThemingSpec * fix qa bugs * fix unit test * fix JSONForm cellBorderWidth to have default value post migration * fix unit test * fix qa bugs * remove unused imports * fix qa bugs * fix JSONForm input height issue * fix qa bugs * Updating Theming spec * * dropdown color fixes (#13249) * fix caching issue ; * Fixed Theming tests * fix tests * fix tab widget tests * fix: json form children level migration issue * fix table widget tests * Updated test * updated tests * updated test * updated tests * updated tests * updated pageload * fix cypress tests * remove cypress created files * fix color picker issues * Failure fixes * Fixed some more tests * fix: cypress test failures * fix tests * remove consoles * fix table tests * fix qa bugs * updating snapshots for AppPageLayout_spec as per new UI * fix rating widget bug * fix qa bugs * fix: * cypress failing tests * Migration QA callouts * Removed unused imports * update constract check algo * fix color contrast issue * fix: cypress failure test cases * update font sizes labels * fix regression bugs * fix: * JSON form labelTextSize issue fix * Updated comment for the fontSizeUtility function * migrations issues related to table widget borderRadius and boxShadow * fix: default labelTextSize issue for the Input and Select families * fix regression bugs * fix regression bugs * PassingParams spec - added wait time * fix: font family default value issue on JS toggle * fix js toggle issue in text widget * fix tests * fix tests * fix tests * fix cypress tests * fix regression bugs * fix regression bugs * fix: * refactored table widget migration function as per review comments, * added default value to the widget * fix: failing unit test cases * fix theming spec * fix cypress tests * test: fixed failed cypress test * incorporate ashit feedback * fix cypress tests * fix: addressed review comments * comment out table cypress test * fix merge conflicts * comment out color picker tests Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local> Co-authored-by: keyurparalkar <keyur@appsmith.com> Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Ashit Rath <ashit@appsmith.com> Co-authored-by: balajisoundar <balaji@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: apple <nandan@thinkify.io> Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 09:45:57 +00:00
filterText?: string;
isFilterable: boolean;
2022-06-08 09:57:53 +00:00
renderMode?: RenderMode;
}
const getSvg = (expanded: boolean) => (
<i
style={{
cursor: "pointer",
backgroundColor: "transparent",
display: "inline-flex",
width: "14px",
height: "100%",
}}
>
<StyledIcon
className="switcher-icon"
expanded={expanded}
fillColor={Colors.GREY_10}
name="dropdown"
/>
</i>
);
const switcherIcon = (treeNode: TreeNodeProps) => {
if (treeNode.isLeaf) {
return (
<i
style={{
cursor: "pointer",
backgroundColor: "white",
display: "inline-flex",
width: "14px",
}}
/>
);
}
return getSvg(treeNode.expanded);
};
function MultiTreeSelectComponent({
feat: App Theming (#9714) * fix style bugs * fix select styles * test: fix font size issue for cypress tests * incorporate ashit feedback * test: addresed review comments for cypress tests * add analytics events * height issue in view mode * incorporate code review feedbacks * incorporate code review feedbacks * refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations * feat: Makes shadow and radius controls keyboard accessible (#11547) * makes shadow and radius controls keyboard accessible * removes unused imports * moves options out of render method * fix: changed the misnomer background property name to the relevant property name * fix: border radius issue for the map widget * address qa bugs * address qa bugs * fix ux of theming pane when widget is selected * fix: * added backgroundColor to the video widget * restricted pop-over border radius to 0.375rem * added box shadow for the input group for select widget * fix: added delete icon in the delete theme modal * address qa bugs * change checkbox column size in config * add js convertible to button color * remove unused imports * test: fixed jest tests * fix primary color typo * fix: migrations for the theming * fix: * Removed background color from MultiTreeSelect and TreeSelect component. * grouped button's menu button pop over border radius restricting to 0.375rem. * test: updated Dsl migration UT * address qa bugs * address qa bugs * fix: address qa comments * address qa bugs * fix: * migration issue; * unit test cases; * fix rating widget scroll issue * fix youtube video border radius bug * fix select widget * fix select widgets styles * address qa bugs * merge conflicts * makes the reset button keyboard accessible (#12134) * -resolved merge conflicts * address qa bugs * fix: labelTextSize migration fixes * refactor: * made changes to the fontSizeUtils function * fixed the issue related to unit tests * fix button group widget * remove unused imports * fix: fixed the text size migration for the table widget * refactor: addressed review comments for the table widget theming migration * fix button group widget * add init calls for view mode * json form init theme changes * fix: added migration for boxShadow, borderRadius and textSizes for table widget * fix broken fields * test: fixed unit tests * wip * inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration * feat: init json form migration theming * json form primaryColor -> accentColor * update table widget * update table widget * object field label styling * fix: migration related to the JSON form * fix: fixed labelTextSize migration for JSON form nested widgets * property control nested stylesheet lookup * JSONForm label styles form array items * show label for checkbox field array item * fix button group widget * wip * refactor: addressed table widget review comments * refactor: addressed ashit review comments; * added childStylesheet for widgets * feat: Keyboard navigable Color Picker control (#11797) * Makes ColorPicker keyboard accessible * seperate out keyboard and mouse interactions * fix issue with not focusing back to input * Adds test for Color picker * chore: added comment for the boxShadow property * fix: * added unit test cases for the widget and property utils * resolved warning messages * wip * theme config update * fix merge conflicts * refactor: moved theming migration inside the migrations folder * fix qa bugs * fix jest test * fix: unit test cases * fix table column creation logic * refactor: addressed review comments for migrations * fix: Overriding margin and padding for custom render in the dropdown component (#12875) * * fix for custom render padding and margin in ADS dropdown * * fix for removing padding from normal render options * refactor: moved the boxShadow condition to the variable * fix qa bugs * fix: migration QA callouts for audio recorder widget * refactor: added updated comments for boxShadow migration for table widget * fix theme binfings for JSONForm fields under Object * fix table widget theming bug * fix: addressed code review comments * fix: unit test cases * fix: qa migration callouts * fix table widget theming bug * fix JSONForm currency input dropdown not submit form * Added new tests - AppThemingSpec * fix qa bugs * fix unit test * fix JSONForm cellBorderWidth to have default value post migration * fix unit test * fix qa bugs * remove unused imports * fix qa bugs * fix JSONForm input height issue * fix qa bugs * Updating Theming spec * * dropdown color fixes (#13249) * fix caching issue ; * Fixed Theming tests * fix tests * fix tab widget tests * fix: json form children level migration issue * fix table widget tests * Updated test * updated tests * updated test * updated tests * updated tests * updated pageload * fix cypress tests * remove cypress created files * fix color picker issues * Failure fixes * Fixed some more tests * fix: cypress test failures * fix tests * remove consoles * fix table tests * fix qa bugs * updating snapshots for AppPageLayout_spec as per new UI * fix rating widget bug * fix qa bugs * fix: * cypress failing tests * Migration QA callouts * Removed unused imports * update constract check algo * fix color contrast issue * fix: cypress failure test cases * update font sizes labels * fix regression bugs * fix: * JSON form labelTextSize issue fix * Updated comment for the fontSizeUtility function * migrations issues related to table widget borderRadius and boxShadow * fix: default labelTextSize issue for the Input and Select families * fix regression bugs * fix regression bugs * PassingParams spec - added wait time * fix: font family default value issue on JS toggle * fix js toggle issue in text widget * fix tests * fix tests * fix tests * fix cypress tests * fix regression bugs * fix regression bugs * fix: * refactored table widget migration function as per review comments, * added default value to the widget * fix: failing unit test cases * fix theming spec * fix cypress tests * test: fixed failed cypress test * incorporate ashit feedback * fix cypress tests * fix: addressed review comments * comment out table cypress test * fix merge conflicts * comment out color picker tests Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local> Co-authored-by: keyurparalkar <keyur@appsmith.com> Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Ashit Rath <ashit@appsmith.com> Co-authored-by: balajisoundar <balaji@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: apple <nandan@thinkify.io> Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 09:45:57 +00:00
accentColor,
allowClear,
feat: App Theming (#9714) * fix style bugs * fix select styles * test: fix font size issue for cypress tests * incorporate ashit feedback * test: addresed review comments for cypress tests * add analytics events * height issue in view mode * incorporate code review feedbacks * incorporate code review feedbacks * refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations * feat: Makes shadow and radius controls keyboard accessible (#11547) * makes shadow and radius controls keyboard accessible * removes unused imports * moves options out of render method * fix: changed the misnomer background property name to the relevant property name * fix: border radius issue for the map widget * address qa bugs * address qa bugs * fix ux of theming pane when widget is selected * fix: * added backgroundColor to the video widget * restricted pop-over border radius to 0.375rem * added box shadow for the input group for select widget * fix: added delete icon in the delete theme modal * address qa bugs * change checkbox column size in config * add js convertible to button color * remove unused imports * test: fixed jest tests * fix primary color typo * fix: migrations for the theming * fix: * Removed background color from MultiTreeSelect and TreeSelect component. * grouped button's menu button pop over border radius restricting to 0.375rem. * test: updated Dsl migration UT * address qa bugs * address qa bugs * fix: address qa comments * address qa bugs * fix: * migration issue; * unit test cases; * fix rating widget scroll issue * fix youtube video border radius bug * fix select widget * fix select widgets styles * address qa bugs * merge conflicts * makes the reset button keyboard accessible (#12134) * -resolved merge conflicts * address qa bugs * fix: labelTextSize migration fixes * refactor: * made changes to the fontSizeUtils function * fixed the issue related to unit tests * fix button group widget * remove unused imports * fix: fixed the text size migration for the table widget * refactor: addressed review comments for the table widget theming migration * fix button group widget * add init calls for view mode * json form init theme changes * fix: added migration for boxShadow, borderRadius and textSizes for table widget * fix broken fields * test: fixed unit tests * wip * inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration * feat: init json form migration theming * json form primaryColor -> accentColor * update table widget * update table widget * object field label styling * fix: migration related to the JSON form * fix: fixed labelTextSize migration for JSON form nested widgets * property control nested stylesheet lookup * JSONForm label styles form array items * show label for checkbox field array item * fix button group widget * wip * refactor: addressed table widget review comments * refactor: addressed ashit review comments; * added childStylesheet for widgets * feat: Keyboard navigable Color Picker control (#11797) * Makes ColorPicker keyboard accessible * seperate out keyboard and mouse interactions * fix issue with not focusing back to input * Adds test for Color picker * chore: added comment for the boxShadow property * fix: * added unit test cases for the widget and property utils * resolved warning messages * wip * theme config update * fix merge conflicts * refactor: moved theming migration inside the migrations folder * fix qa bugs * fix jest test * fix: unit test cases * fix table column creation logic * refactor: addressed review comments for migrations * fix: Overriding margin and padding for custom render in the dropdown component (#12875) * * fix for custom render padding and margin in ADS dropdown * * fix for removing padding from normal render options * refactor: moved the boxShadow condition to the variable * fix qa bugs * fix: migration QA callouts for audio recorder widget * refactor: added updated comments for boxShadow migration for table widget * fix theme binfings for JSONForm fields under Object * fix table widget theming bug * fix: addressed code review comments * fix: unit test cases * fix: qa migration callouts * fix table widget theming bug * fix JSONForm currency input dropdown not submit form * Added new tests - AppThemingSpec * fix qa bugs * fix unit test * fix JSONForm cellBorderWidth to have default value post migration * fix unit test * fix qa bugs * remove unused imports * fix qa bugs * fix JSONForm input height issue * fix qa bugs * Updating Theming spec * * dropdown color fixes (#13249) * fix caching issue ; * Fixed Theming tests * fix tests * fix tab widget tests * fix: json form children level migration issue * fix table widget tests * Updated test * updated tests * updated test * updated tests * updated tests * updated pageload * fix cypress tests * remove cypress created files * fix color picker issues * Failure fixes * Fixed some more tests * fix: cypress test failures * fix tests * remove consoles * fix table tests * fix qa bugs * updating snapshots for AppPageLayout_spec as per new UI * fix rating widget bug * fix qa bugs * fix: * cypress failing tests * Migration QA callouts * Removed unused imports * update constract check algo * fix color contrast issue * fix: cypress failure test cases * update font sizes labels * fix regression bugs * fix: * JSON form labelTextSize issue fix * Updated comment for the fontSizeUtility function * migrations issues related to table widget borderRadius and boxShadow * fix: default labelTextSize issue for the Input and Select families * fix regression bugs * fix regression bugs * PassingParams spec - added wait time * fix: font family default value issue on JS toggle * fix js toggle issue in text widget * fix tests * fix tests * fix tests * fix cypress tests * fix regression bugs * fix regression bugs * fix: * refactored table widget migration function as per review comments, * added default value to the widget * fix: failing unit test cases * fix theming spec * fix cypress tests * test: fixed failed cypress test * incorporate ashit feedback * fix cypress tests * fix: addressed review comments * comment out table cypress test * fix merge conflicts * comment out color picker tests Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local> Co-authored-by: keyurparalkar <keyur@appsmith.com> Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Ashit Rath <ashit@appsmith.com> Co-authored-by: balajisoundar <balaji@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: apple <nandan@thinkify.io> Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 09:45:57 +00:00
borderRadius,
boxShadow,
compactMode,
disabled,
dropdownStyle,
dropDownWidth,
expandAll,
filterText,
isFilterable,
isValid,
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
labelAlignment,
labelPosition,
labelStyle,
labelText,
labelTextColor,
labelTextSize,
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
labelWidth,
loading,
mode,
onChange,
options,
placeholder,
2022-06-08 09:57:53 +00:00
renderMode,
value,
widgetId,
width,
}: TreeSelectProps): JSX.Element {
const [key, setKey] = useState(Math.random());
const [filter, setFilter] = useState(filterText ?? "");
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
const _menu = useRef<HTMLElement | null>(null);
const labelRef = useRef<HTMLDivElement>(null);
const inputRef = useRef<HTMLInputElement>(null);
2022-06-08 09:57:53 +00:00
2022-04-04 05:12:33 +00:00
const [memoDropDownWidth, setMemoDropDownWidth] = useState(0);
2022-06-22 00:11:29 +00:00
const {
BackDrop,
getPopupContainer,
isOpen,
2022-06-22 00:11:29 +00:00
onKeyDown,
onOpen,
selectRef,
} = useDropdown({
2022-06-09 08:38:08 +00:00
inputRef,
renderMode,
});
// treeDefaultExpandAll is uncontrolled after first render,
// using this to force render to respond to changes in expandAll
useEffect(() => {
setKey(Math.random());
}, [expandAll]);
const clearButton = useMemo(
() =>
filter ? (
<Button icon="cross" minimal onClick={() => setFilter("")} />
) : null,
[filter],
);
2022-06-08 10:17:49 +00:00
const onQueryChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {
event.stopPropagation();
setFilter(event.target.value);
}, []);
2022-04-04 05:12:33 +00:00
useEffect(() => {
const parentWidth = width - WidgetContainerDiff;
if (compactMode && labelRef.current) {
2022-04-04 05:12:33 +00:00
const labelWidth = labelRef.current.getBoundingClientRect().width;
const widthDiff = parentWidth - labelWidth - labelMargin;
setMemoDropDownWidth(
widthDiff > dropDownWidth ? widthDiff : dropDownWidth,
);
return;
}
2022-04-04 05:12:33 +00:00
setMemoDropDownWidth(
parentWidth > dropDownWidth ? parentWidth : dropDownWidth,
);
}, [compactMode, dropDownWidth, width, labelText]);
const dropdownRender = useCallback(
(
menu: React.ReactElement<any, string | React.JSXElementConstructor<any>>,
) => (
<>
2022-06-09 08:38:08 +00:00
<BackDrop />
{isFilterable ? (
<InputGroup
inputRef={inputRef}
leftIcon="search"
onChange={onQueryChange}
2022-06-22 00:11:29 +00:00
onKeyDown={onKeyDown}
placeholder="Filter..."
rightElement={clearButton as JSX.Element}
small
type="text"
value={filter}
/>
) : null}
<div className={`${loading ? Classes.SKELETON : ""}`}>{menu}</div>
</>
),
[loading, isFilterable, filter, onQueryChange],
);
const onClear = useCallback(() => onChange([], []), []);
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
const onDropdownVisibleChange = (open: boolean) => {
onOpen(open);
// clear the search input on closing the widget
setFilter("");
};
return (
<TreeSelectContainer
feat: App Theming (#9714) * fix style bugs * fix select styles * test: fix font size issue for cypress tests * incorporate ashit feedback * test: addresed review comments for cypress tests * add analytics events * height issue in view mode * incorporate code review feedbacks * incorporate code review feedbacks * refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations * feat: Makes shadow and radius controls keyboard accessible (#11547) * makes shadow and radius controls keyboard accessible * removes unused imports * moves options out of render method * fix: changed the misnomer background property name to the relevant property name * fix: border radius issue for the map widget * address qa bugs * address qa bugs * fix ux of theming pane when widget is selected * fix: * added backgroundColor to the video widget * restricted pop-over border radius to 0.375rem * added box shadow for the input group for select widget * fix: added delete icon in the delete theme modal * address qa bugs * change checkbox column size in config * add js convertible to button color * remove unused imports * test: fixed jest tests * fix primary color typo * fix: migrations for the theming * fix: * Removed background color from MultiTreeSelect and TreeSelect component. * grouped button's menu button pop over border radius restricting to 0.375rem. * test: updated Dsl migration UT * address qa bugs * address qa bugs * fix: address qa comments * address qa bugs * fix: * migration issue; * unit test cases; * fix rating widget scroll issue * fix youtube video border radius bug * fix select widget * fix select widgets styles * address qa bugs * merge conflicts * makes the reset button keyboard accessible (#12134) * -resolved merge conflicts * address qa bugs * fix: labelTextSize migration fixes * refactor: * made changes to the fontSizeUtils function * fixed the issue related to unit tests * fix button group widget * remove unused imports * fix: fixed the text size migration for the table widget * refactor: addressed review comments for the table widget theming migration * fix button group widget * add init calls for view mode * json form init theme changes * fix: added migration for boxShadow, borderRadius and textSizes for table widget * fix broken fields * test: fixed unit tests * wip * inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration * feat: init json form migration theming * json form primaryColor -> accentColor * update table widget * update table widget * object field label styling * fix: migration related to the JSON form * fix: fixed labelTextSize migration for JSON form nested widgets * property control nested stylesheet lookup * JSONForm label styles form array items * show label for checkbox field array item * fix button group widget * wip * refactor: addressed table widget review comments * refactor: addressed ashit review comments; * added childStylesheet for widgets * feat: Keyboard navigable Color Picker control (#11797) * Makes ColorPicker keyboard accessible * seperate out keyboard and mouse interactions * fix issue with not focusing back to input * Adds test for Color picker * chore: added comment for the boxShadow property * fix: * added unit test cases for the widget and property utils * resolved warning messages * wip * theme config update * fix merge conflicts * refactor: moved theming migration inside the migrations folder * fix qa bugs * fix jest test * fix: unit test cases * fix table column creation logic * refactor: addressed review comments for migrations * fix: Overriding margin and padding for custom render in the dropdown component (#12875) * * fix for custom render padding and margin in ADS dropdown * * fix for removing padding from normal render options * refactor: moved the boxShadow condition to the variable * fix qa bugs * fix: migration QA callouts for audio recorder widget * refactor: added updated comments for boxShadow migration for table widget * fix theme binfings for JSONForm fields under Object * fix table widget theming bug * fix: addressed code review comments * fix: unit test cases * fix: qa migration callouts * fix table widget theming bug * fix JSONForm currency input dropdown not submit form * Added new tests - AppThemingSpec * fix qa bugs * fix unit test * fix JSONForm cellBorderWidth to have default value post migration * fix unit test * fix qa bugs * remove unused imports * fix qa bugs * fix JSONForm input height issue * fix qa bugs * Updating Theming spec * * dropdown color fixes (#13249) * fix caching issue ; * Fixed Theming tests * fix tests * fix tab widget tests * fix: json form children level migration issue * fix table widget tests * Updated test * updated tests * updated test * updated tests * updated tests * updated pageload * fix cypress tests * remove cypress created files * fix color picker issues * Failure fixes * Fixed some more tests * fix: cypress test failures * fix tests * remove consoles * fix table tests * fix qa bugs * updating snapshots for AppPageLayout_spec as per new UI * fix rating widget bug * fix qa bugs * fix: * cypress failing tests * Migration QA callouts * Removed unused imports * update constract check algo * fix color contrast issue * fix: cypress failure test cases * update font sizes labels * fix regression bugs * fix: * JSON form labelTextSize issue fix * Updated comment for the fontSizeUtility function * migrations issues related to table widget borderRadius and boxShadow * fix: default labelTextSize issue for the Input and Select families * fix regression bugs * fix regression bugs * PassingParams spec - added wait time * fix: font family default value issue on JS toggle * fix js toggle issue in text widget * fix tests * fix tests * fix tests * fix cypress tests * fix regression bugs * fix regression bugs * fix: * refactored table widget migration function as per review comments, * added default value to the widget * fix: failing unit test cases * fix theming spec * fix cypress tests * test: fixed failed cypress test * incorporate ashit feedback * fix cypress tests * fix: addressed review comments * comment out table cypress test * fix merge conflicts * comment out color picker tests Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local> Co-authored-by: keyurparalkar <keyur@appsmith.com> Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Ashit Rath <ashit@appsmith.com> Co-authored-by: balajisoundar <balaji@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: apple <nandan@thinkify.io> Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 09:45:57 +00:00
accentColor={accentColor}
allowClear={allowClear}
feat: App Theming (#9714) * fix style bugs * fix select styles * test: fix font size issue for cypress tests * incorporate ashit feedback * test: addresed review comments for cypress tests * add analytics events * height issue in view mode * incorporate code review feedbacks * incorporate code review feedbacks * refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations * feat: Makes shadow and radius controls keyboard accessible (#11547) * makes shadow and radius controls keyboard accessible * removes unused imports * moves options out of render method * fix: changed the misnomer background property name to the relevant property name * fix: border radius issue for the map widget * address qa bugs * address qa bugs * fix ux of theming pane when widget is selected * fix: * added backgroundColor to the video widget * restricted pop-over border radius to 0.375rem * added box shadow for the input group for select widget * fix: added delete icon in the delete theme modal * address qa bugs * change checkbox column size in config * add js convertible to button color * remove unused imports * test: fixed jest tests * fix primary color typo * fix: migrations for the theming * fix: * Removed background color from MultiTreeSelect and TreeSelect component. * grouped button's menu button pop over border radius restricting to 0.375rem. * test: updated Dsl migration UT * address qa bugs * address qa bugs * fix: address qa comments * address qa bugs * fix: * migration issue; * unit test cases; * fix rating widget scroll issue * fix youtube video border radius bug * fix select widget * fix select widgets styles * address qa bugs * merge conflicts * makes the reset button keyboard accessible (#12134) * -resolved merge conflicts * address qa bugs * fix: labelTextSize migration fixes * refactor: * made changes to the fontSizeUtils function * fixed the issue related to unit tests * fix button group widget * remove unused imports * fix: fixed the text size migration for the table widget * refactor: addressed review comments for the table widget theming migration * fix button group widget * add init calls for view mode * json form init theme changes * fix: added migration for boxShadow, borderRadius and textSizes for table widget * fix broken fields * test: fixed unit tests * wip * inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration * feat: init json form migration theming * json form primaryColor -> accentColor * update table widget * update table widget * object field label styling * fix: migration related to the JSON form * fix: fixed labelTextSize migration for JSON form nested widgets * property control nested stylesheet lookup * JSONForm label styles form array items * show label for checkbox field array item * fix button group widget * wip * refactor: addressed table widget review comments * refactor: addressed ashit review comments; * added childStylesheet for widgets * feat: Keyboard navigable Color Picker control (#11797) * Makes ColorPicker keyboard accessible * seperate out keyboard and mouse interactions * fix issue with not focusing back to input * Adds test for Color picker * chore: added comment for the boxShadow property * fix: * added unit test cases for the widget and property utils * resolved warning messages * wip * theme config update * fix merge conflicts * refactor: moved theming migration inside the migrations folder * fix qa bugs * fix jest test * fix: unit test cases * fix table column creation logic * refactor: addressed review comments for migrations * fix: Overriding margin and padding for custom render in the dropdown component (#12875) * * fix for custom render padding and margin in ADS dropdown * * fix for removing padding from normal render options * refactor: moved the boxShadow condition to the variable * fix qa bugs * fix: migration QA callouts for audio recorder widget * refactor: added updated comments for boxShadow migration for table widget * fix theme binfings for JSONForm fields under Object * fix table widget theming bug * fix: addressed code review comments * fix: unit test cases * fix: qa migration callouts * fix table widget theming bug * fix JSONForm currency input dropdown not submit form * Added new tests - AppThemingSpec * fix qa bugs * fix unit test * fix JSONForm cellBorderWidth to have default value post migration * fix unit test * fix qa bugs * remove unused imports * fix qa bugs * fix JSONForm input height issue * fix qa bugs * Updating Theming spec * * dropdown color fixes (#13249) * fix caching issue ; * Fixed Theming tests * fix tests * fix tab widget tests * fix: json form children level migration issue * fix table widget tests * Updated test * updated tests * updated test * updated tests * updated tests * updated pageload * fix cypress tests * remove cypress created files * fix color picker issues * Failure fixes * Fixed some more tests * fix: cypress test failures * fix tests * remove consoles * fix table tests * fix qa bugs * updating snapshots for AppPageLayout_spec as per new UI * fix rating widget bug * fix qa bugs * fix: * cypress failing tests * Migration QA callouts * Removed unused imports * update constract check algo * fix color contrast issue * fix: cypress failure test cases * update font sizes labels * fix regression bugs * fix: * JSON form labelTextSize issue fix * Updated comment for the fontSizeUtility function * migrations issues related to table widget borderRadius and boxShadow * fix: default labelTextSize issue for the Input and Select families * fix regression bugs * fix regression bugs * PassingParams spec - added wait time * fix: font family default value issue on JS toggle * fix js toggle issue in text widget * fix tests * fix tests * fix tests * fix cypress tests * fix regression bugs * fix regression bugs * fix: * refactored table widget migration function as per review comments, * added default value to the widget * fix: failing unit test cases * fix theming spec * fix cypress tests * test: fixed failed cypress test * incorporate ashit feedback * fix cypress tests * fix: addressed review comments * comment out table cypress test * fix merge conflicts * comment out color picker tests Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local> Co-authored-by: keyurparalkar <keyur@appsmith.com> Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Ashit Rath <ashit@appsmith.com> Co-authored-by: balajisoundar <balaji@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: apple <nandan@thinkify.io> Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 09:45:57 +00:00
borderRadius={borderRadius}
boxShadow={boxShadow}
compactMode={compactMode}
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
data-testid="multitreeselect-container"
isValid={isValid}
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
labelPosition={labelPosition}
ref={_menu as React.RefObject<HTMLDivElement>}
>
feat: App Theming (#9714) * fix style bugs * fix select styles * test: fix font size issue for cypress tests * incorporate ashit feedback * test: addresed review comments for cypress tests * add analytics events * height issue in view mode * incorporate code review feedbacks * incorporate code review feedbacks * refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations * feat: Makes shadow and radius controls keyboard accessible (#11547) * makes shadow and radius controls keyboard accessible * removes unused imports * moves options out of render method * fix: changed the misnomer background property name to the relevant property name * fix: border radius issue for the map widget * address qa bugs * address qa bugs * fix ux of theming pane when widget is selected * fix: * added backgroundColor to the video widget * restricted pop-over border radius to 0.375rem * added box shadow for the input group for select widget * fix: added delete icon in the delete theme modal * address qa bugs * change checkbox column size in config * add js convertible to button color * remove unused imports * test: fixed jest tests * fix primary color typo * fix: migrations for the theming * fix: * Removed background color from MultiTreeSelect and TreeSelect component. * grouped button's menu button pop over border radius restricting to 0.375rem. * test: updated Dsl migration UT * address qa bugs * address qa bugs * fix: address qa comments * address qa bugs * fix: * migration issue; * unit test cases; * fix rating widget scroll issue * fix youtube video border radius bug * fix select widget * fix select widgets styles * address qa bugs * merge conflicts * makes the reset button keyboard accessible (#12134) * -resolved merge conflicts * address qa bugs * fix: labelTextSize migration fixes * refactor: * made changes to the fontSizeUtils function * fixed the issue related to unit tests * fix button group widget * remove unused imports * fix: fixed the text size migration for the table widget * refactor: addressed review comments for the table widget theming migration * fix button group widget * add init calls for view mode * json form init theme changes * fix: added migration for boxShadow, borderRadius and textSizes for table widget * fix broken fields * test: fixed unit tests * wip * inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration * feat: init json form migration theming * json form primaryColor -> accentColor * update table widget * update table widget * object field label styling * fix: migration related to the JSON form * fix: fixed labelTextSize migration for JSON form nested widgets * property control nested stylesheet lookup * JSONForm label styles form array items * show label for checkbox field array item * fix button group widget * wip * refactor: addressed table widget review comments * refactor: addressed ashit review comments; * added childStylesheet for widgets * feat: Keyboard navigable Color Picker control (#11797) * Makes ColorPicker keyboard accessible * seperate out keyboard and mouse interactions * fix issue with not focusing back to input * Adds test for Color picker * chore: added comment for the boxShadow property * fix: * added unit test cases for the widget and property utils * resolved warning messages * wip * theme config update * fix merge conflicts * refactor: moved theming migration inside the migrations folder * fix qa bugs * fix jest test * fix: unit test cases * fix table column creation logic * refactor: addressed review comments for migrations * fix: Overriding margin and padding for custom render in the dropdown component (#12875) * * fix for custom render padding and margin in ADS dropdown * * fix for removing padding from normal render options * refactor: moved the boxShadow condition to the variable * fix qa bugs * fix: migration QA callouts for audio recorder widget * refactor: added updated comments for boxShadow migration for table widget * fix theme binfings for JSONForm fields under Object * fix table widget theming bug * fix: addressed code review comments * fix: unit test cases * fix: qa migration callouts * fix table widget theming bug * fix JSONForm currency input dropdown not submit form * Added new tests - AppThemingSpec * fix qa bugs * fix unit test * fix JSONForm cellBorderWidth to have default value post migration * fix unit test * fix qa bugs * remove unused imports * fix qa bugs * fix JSONForm input height issue * fix qa bugs * Updating Theming spec * * dropdown color fixes (#13249) * fix caching issue ; * Fixed Theming tests * fix tests * fix tab widget tests * fix: json form children level migration issue * fix table widget tests * Updated test * updated tests * updated test * updated tests * updated tests * updated pageload * fix cypress tests * remove cypress created files * fix color picker issues * Failure fixes * Fixed some more tests * fix: cypress test failures * fix tests * remove consoles * fix table tests * fix qa bugs * updating snapshots for AppPageLayout_spec as per new UI * fix rating widget bug * fix qa bugs * fix: * cypress failing tests * Migration QA callouts * Removed unused imports * update constract check algo * fix color contrast issue * fix: cypress failure test cases * update font sizes labels * fix regression bugs * fix: * JSON form labelTextSize issue fix * Updated comment for the fontSizeUtility function * migrations issues related to table widget borderRadius and boxShadow * fix: default labelTextSize issue for the Input and Select families * fix regression bugs * fix regression bugs * PassingParams spec - added wait time * fix: font family default value issue on JS toggle * fix js toggle issue in text widget * fix tests * fix tests * fix tests * fix cypress tests * fix regression bugs * fix regression bugs * fix: * refactored table widget migration function as per review comments, * added default value to the widget * fix: failing unit test cases * fix theming spec * fix cypress tests * test: fixed failed cypress test * incorporate ashit feedback * fix cypress tests * fix: addressed review comments * comment out table cypress test * fix merge conflicts * comment out color picker tests Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local> Co-authored-by: keyurparalkar <keyur@appsmith.com> Co-authored-by: Aswath K <aswath@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Ashit Rath <ashit@appsmith.com> Co-authored-by: balajisoundar <balaji@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: apple <nandan@thinkify.io> Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 09:45:57 +00:00
<DropdownStyles
accentColor={accentColor}
borderRadius={borderRadius}
dropDownWidth={memoDropDownWidth}
id={widgetId}
/>
{labelText && (
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
<LabelWithTooltip
alignment={labelAlignment}
className={`multitree-select-label`}
color={labelTextColor}
compact={compactMode}
disabled={disabled}
fontSize={labelTextSize}
fontStyle={labelStyle}
loading={loading}
position={labelPosition}
ref={labelRef}
text={labelText}
width={labelWidth}
/>
)}
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
<InputContainer compactMode={compactMode} labelPosition={labelPosition}>
<TreeSelect
allowClear={allowClear}
animation="slide-up"
choiceTransitionName="rc-tree-select-selection__choice-zoom"
className="rc-tree-select"
clearIcon={
<Icon
className="clear-icon"
fillColor={Colors.GREY_10}
name="close-x"
/>
}
disabled={disabled}
dropdownClassName={`tree-multiselect-dropdown multiselecttree-popover-width-${widgetId}`}
dropdownRender={dropdownRender}
dropdownStyle={dropdownStyle}
filterTreeNode
getPopupContainer={getPopupContainer}
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
inputIcon={
<Icon
className="dropdown-icon"
fillColor={disabled ? Colors.GREY_7 : Colors.GREY_10}
name="dropdown"
/>
}
key={key}
loading={loading}
maxTagCount={"responsive"}
maxTagPlaceholder={(e) => `+${e.length} more`}
multiple
notFoundContent="No Results Found"
onChange={onChange}
onClear={onClear}
onDropdownVisibleChange={onDropdownVisibleChange}
open={isOpen}
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
placeholder={placeholder}
2022-06-08 09:57:53 +00:00
ref={selectRef}
feat: Controls for labels in widgets to align the widgets in forms and other places (#10600) * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Create a new property control for a label position -- Create a new property control for a label alignment -- Prototype a label section for Input widget * feat: When there are multiple input widgets with different label lengths then the input box looks misaligned -- Add a property, labelWidth in the property pane * feat: Controls for labels in widgets to align the widgets in forms and other places -- Input widget: Implement all the requirements in case its type is Text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adapt the functionalty on other types of the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into DropdownWidget -- Clean up for the input widget and DRY * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectWidget -- Eliminate unnecessary component prop, columns * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalties into Tree Select widget -- Add styles for alignment between lable and input control over the widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add label functionalities into MultiSelectTreeWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Introduce label functionalities into DatePickerWidget2 -- Use width instead of columns prop in InputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RichTextEditorWidget -- Eliminate compactMode from StyledLabel * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into CheckboxGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement switch group for the correct meaning of right alignment * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply label functionalities into RadioGroupWidget -- Add new properties, alignment and inline for consistency * feat: Controls for labels in widgets to align the widgets in forms and other places -- Adjust cols and rows for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused StyledRadioProps * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete first MVP of enhanced SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Complete the first MVP of enhanced RadioGroupWidget -- Eliminate unused StyledSwitch component for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add min-height, align-self rules for LabelContainer * feat: Controls for labels in widgets to align the widgets in forms and other places -- Use original label property for RadioGroupWidget -- Add a migration for adding isInline and alignment properties for RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Update version to latest one in DSLMigrationsUtils.test.ts * fix failing jest test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement label functionalities on BaseInputWidget, InputWidgetV2, CurrencyInputWidget, PhoneInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DSLMigrationsUtils * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the label related test case which is failed in Input_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on #10119: The label text truncates on resizing the input widget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix scroll issue when shrink with MultiSelectWidget and MultiSelectTreeWidget * fix: Widget Popup test * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement width and alginment features on the level of label element -- Prevent actual inputs from DropdownWidget, MultiSelectWidget, SingleSelectTreeWidget, MultiSelectTreeWidget from overflow when resizing -- Enable label feature on a RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set label container's default width to 33% when width is not set * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix crash issue when labelWidth is filled by non-numeric value, eliminating passing NaN as its value * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set flex-grow to zero on input types other than TEXT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label features on newly created MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate LabelPositionTypes, directly using enum LabelPosition -- Add a comment for a constant LABEL_MAX_WIDTH_RATE -- Directly import React for LabelAlignmentOptionsControl -- Remove unnecessary constructor for LabelAlignmentOptionsControl -- Define handleAlign instance method as a higher-order function -- Only migrate alignment property for RadioGroupWidget -- Use Object.hasOwnProperty instead of in operator * feat: Controls for labels in widgets to align the widgets in forms and other places -- Migrate alignment property of RadioGroupWidget in case of currentDSL.version is 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Revert currentDSL.version to 52 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a Jest test case for RadioGroupWidget's alignment property migration * feat: Controls for labels in widgets to align the widgets in forms and other places -- Replace all nested ternary operators with if statements * feat: Controls for labels in widgets to align the widgets in forms and other places -- Implement label feature on new version of SelectWidget -- Add Cypress tests for widgets' label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor code for BaseInputWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change CSS selector for step buttons for Numeric BaseInputWidget -- Directly use migrateRadioGroupAlignmentProperty migration function without using transformDSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on typo about migrateRadioGroupAlignmentProperty * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add data-testid attributes for Cypress selectors * feat: Deprecate form button widget -- Assert flex-direction to row in CheckboxGroup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add a missing data-testid for SelectWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on failed test cases: CheckboxGroup_spec, DatePicker_2_spec, MultiSelectWidgetV2 * fix: Select popup DSL * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new property control, NumericInputControl -- Replace all the label properties with the newly created controls * feat: Controls for labels in widgets to align the widgets in forms and other places -- Create a new Cypress command, checkLabelWidth and apply to all related test cases -- Increase width in checkboxgroupDsl.json -- Rename className for label in MultiSelectWidgetV2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Reimplement the tooltip feature for labels -- Add missing props for labels in DateField, MultiSelectField, RadioGroupField, SelectField fields for JSONFormWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor property controls, including LabelPositionOptionsControl, LabelAlignmentOptionsControl, NumericInputControl to keep consistency -- Apply default values into label section * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract the label related parts from the various widgets as an independent component * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate TypeScript any type from BaseInputComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change labelPosition property type to DROP_DOWN -- Modify LabelAlignmentOptionsControl to use ButtonTabComponent * feat: Controls for labels in widgets to align the widgets in forms and other places -- Define getLabelWidth method into BaseWidget -- Extract the common CSS rules for the widget containers -- Revert rows and columns for SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed test case in DSLMigrationsUtils.test.ts * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on overflow issue on CheckboxGroupWidget -- Create a distinctive spec file for label feature -- Eliminate the redundant label specs with the relevant widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Delete unnecessary files, including Select_spec.js, LabelButton.tsx and LabelPositionOptionsControl.tsx -- Revise wrong comment for checkLabelForWidget Cypress command * feat: Controls for labels in widgets to align the widgets in forms and other places -- Do not set the label width only if its value is 0 -- Clean up the component for DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused imports in DatePickerWidget2 * feat: Controls for labels in widgets to align the widgets in forms and other places -- Make RadioGroupWidget's layout flexible in all modes * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on Cypress test case for RadioGroupWidget in Widgets_Labels_spec -- Change Cypress commands, including addAction, addSuccessMessage, enterActionValue to accept parentSelector * feat: Controls for labels in widgets to align the widgets in forms and other places -- Change getLabelWidth method to not have any argument -- Define some constants for label numbers -- Extract the common styles for SwitchGroupWidget and RadioGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Refactor some constants * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate unused width prop from RadioGroupWidget -- Get labelWidth from getLabelWidth * feat: Controls for labels in widgets to align the widgets in forms and other places -- Eliminate the min-height restriction on a label -- Eliminate the scroll on the earlier InputWidgetV2 which was not in compact mode * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add one more condition checking if the current input type is text * feat: Controls for labels in widgets to align the widgets in forms and other places -- Extract common code base for MultiSelectTreeWidget and MultiSelectWidgetV2 -- Apply a few CSS fixes on the scrollbar issue select related widgets * feat: Controls for labels in widgets to align the widgets in forms and other places -- Apply some tweaks for earlier widgets with labels so as not to be broken UX * feat: Controls for labels in widgets to align the widgets in forms and other places -- Fix on the failed Cypress test case in Widget_Popup_spec.js * feat: Controls for labels in widgets to align the widgets in forms and other places -- Add constants, LABEL_DEFAULT_WIDTH_RATE, SELECT_DEFAULT_HEIGHT, LABEL_MARGIN_OLD_SELECT * feat: Controls for labels in widgets to align the widgets in forms and other places -- Increase the widths of CheckboxGroupWidget and SwitchGroupWidget * feat: Controls for labels in widgets to align the widgets in forms and other places -- Set the font size to 14px for NumericInputControl Co-authored-by: ohansFavour <fohanekwu@gmail.com> Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-04-14 08:47:25 +00:00
removeIcon={
<Icon
className="remove-icon"
fillColor={Colors.GREY_10}
name="close-x"
/>
}
searchValue={filter}
showArrow
showCheckedStrategy={mode}
showSearch={false}
style={{ width: "100%" }}
switcherIcon={switcherIcon}
transitionName="rc-tree-select-dropdown-slide-up"
treeCheckable={
<span className={`rc-tree-select-tree-checkbox-inner`} />
}
treeData={options}
treeDefaultExpandAll={expandAll}
treeIcon
treeNodeFilterProp="label"
value={value}
/>
</InputContainer>
</TreeSelectContainer>
);
}
export default MultiTreeSelectComponent;