2022-01-21 10:19:10 +00:00
|
|
|
import log from "loglevel";
|
|
|
|
|
import AudioRecorderWidget, {
|
|
|
|
|
CONFIG as AUDIO_RECORDER_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/AudioRecorderWidget";
|
|
|
|
|
import AudioWidget, {
|
|
|
|
|
CONFIG as AUDIO_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/AudioWidget";
|
|
|
|
|
import ButtonGroupWidget, {
|
|
|
|
|
CONFIG as BUTTON_GROUP_CONFIG,
|
|
|
|
|
} from "widgets/ButtonGroupWidget";
|
2020-08-28 17:23:07 +00:00
|
|
|
import ButtonWidget, {
|
2021-09-09 15:10:22 +00:00
|
|
|
CONFIG as BUTTON_WIDGET_CONFIG,
|
2020-08-28 17:23:07 +00:00
|
|
|
} from "widgets/ButtonWidget";
|
2022-02-02 14:15:07 +00:00
|
|
|
import SelectWidget, {
|
|
|
|
|
CONFIG as SELECT_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/SelectWidget";
|
2022-01-21 10:19:10 +00:00
|
|
|
import CameraWidget, {
|
|
|
|
|
CONFIG as CAMERA_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/CameraWidget";
|
|
|
|
|
import CanvasWidget, {
|
|
|
|
|
CONFIG as CANVAS_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/CanvasWidget";
|
2020-08-28 17:23:07 +00:00
|
|
|
import ChartWidget, {
|
2021-09-09 15:10:22 +00:00
|
|
|
CONFIG as CHART_WIDGET_CONFIG,
|
2020-08-28 17:23:07 +00:00
|
|
|
} from "widgets/ChartWidget";
|
2022-01-21 10:19:10 +00:00
|
|
|
import CheckboxGroupWidget, {
|
|
|
|
|
CONFIG as CHECKBOX_GROUP_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/CheckboxGroupWidget";
|
|
|
|
|
import CheckboxWidget, {
|
|
|
|
|
CONFIG as CHECKBOX_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/CheckboxWidget";
|
|
|
|
|
import CircularProgressWidget, {
|
|
|
|
|
CONFIG as CIRCULAR_PROGRESS_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/CircularProgressWidget";
|
|
|
|
|
import ContainerWidget, {
|
|
|
|
|
CONFIG as CONTAINER_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/ContainerWidget";
|
|
|
|
|
import CurrencyInputWidget, {
|
|
|
|
|
CONFIG as CURRENCY_INPUT_WIDGET_V2_CONFIG,
|
|
|
|
|
} from "widgets/CurrencyInputWidget";
|
2019-11-06 12:12:41 +00:00
|
|
|
import DatePickerWidget, {
|
2021-09-09 15:10:22 +00:00
|
|
|
CONFIG as DATE_PICKER_WIDGET_CONFIG,
|
2019-11-25 05:07:27 +00:00
|
|
|
} from "widgets/DatePickerWidget";
|
2021-02-23 12:35:09 +00:00
|
|
|
import DatePickerWidget2, {
|
2021-09-09 15:10:22 +00:00
|
|
|
CONFIG as DATE_PICKER_WIDGET_2_CONFIG,
|
2021-02-23 12:35:09 +00:00
|
|
|
} from "widgets/DatePickerWidget2";
|
2021-07-07 09:30:06 +00:00
|
|
|
import DividerWidget, {
|
2021-09-09 15:10:22 +00:00
|
|
|
CONFIG as DIVIDER_WIDGET_CONFIG,
|
2021-07-07 09:30:06 +00:00
|
|
|
} from "widgets/DividerWidget";
|
2022-02-02 14:15:07 +00:00
|
|
|
import MultiSelectWidgetV2, {
|
|
|
|
|
CONFIG as MULTI_SELECT_WIDGET_V2_CONFIG,
|
|
|
|
|
} from "widgets/MultiSelectWidgetV2";
|
2022-01-21 10:19:10 +00:00
|
|
|
import DocumentViewerWidget, {
|
|
|
|
|
CONFIG as DOCUMENT_VIEWER_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/DocumentViewerWidget";
|
|
|
|
|
import DropdownWidget, {
|
|
|
|
|
CONFIG as DROPDOWN_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/DropdownWidget";
|
|
|
|
|
import FilePickerWidget, {
|
|
|
|
|
CONFIG as FILEPICKER_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/FilepickerWidget";
|
|
|
|
|
import FilePickerWidgetV2, {
|
|
|
|
|
CONFIG as FILEPICKER_WIDGET_V2_CONFIG,
|
|
|
|
|
} from "widgets/FilePickerWidgetV2";
|
2021-09-09 15:10:22 +00:00
|
|
|
import FormButtonWidget, {
|
|
|
|
|
CONFIG as FORM_BUTTON_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/FormButtonWidget";
|
2022-01-21 10:19:10 +00:00
|
|
|
import FormWidget, { CONFIG as FORM_WIDGET_CONFIG } from "widgets/FormWidget";
|
2021-08-05 11:16:26 +00:00
|
|
|
import IconButtonWidget, {
|
2021-09-09 15:10:22 +00:00
|
|
|
CONFIG as ICON_BUTTON_WIDGET_CONFIG,
|
2021-08-05 11:16:26 +00:00
|
|
|
} from "widgets/IconButtonWidget";
|
2022-01-21 10:19:10 +00:00
|
|
|
import IconWidget, { CONFIG as ICON_WIDGET_CONFIG } from "widgets/IconWidget";
|
|
|
|
|
import IframeWidget, {
|
|
|
|
|
CONFIG as IFRAME_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/IframeWidget";
|
|
|
|
|
import ImageWidget, {
|
|
|
|
|
CONFIG as IMAGE_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/ImageWidget";
|
|
|
|
|
import InputWidget, {
|
|
|
|
|
CONFIG as INPUT_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/InputWidget";
|
|
|
|
|
import InputWidgetV2, {
|
|
|
|
|
CONFIG as INPUT_WIDGET_V2_CONFIG,
|
|
|
|
|
} from "widgets/InputWidgetV2";
|
|
|
|
|
import ListWidget, { CONFIG as LIST_WIDGET_CONFIG } from "widgets/ListWidget";
|
|
|
|
|
import MapChartWidget, {
|
|
|
|
|
CONFIG as MAP_CHART_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/MapChartWidget";
|
|
|
|
|
import MapWidget, { CONFIG as MAP_WIDGET_CONFIG } from "widgets/MapWidget";
|
|
|
|
|
import MenuButtonWidget, {
|
|
|
|
|
CONFIG as MENU_BUTTON_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/MenuButtonWidget";
|
|
|
|
|
import ModalWidget, {
|
|
|
|
|
CONFIG as MODAL_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/ModalWidget";
|
2021-09-17 09:08:35 +00:00
|
|
|
import MultiSelectTreeWidget, {
|
|
|
|
|
CONFIG as MULTI_SELECT_TREE_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/MultiSelectTreeWidget";
|
2022-01-21 10:19:10 +00:00
|
|
|
import MultiSelectWidget, {
|
|
|
|
|
CONFIG as MULTI_SELECT_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/MultiSelectWidget";
|
|
|
|
|
import PhoneInputWidget, {
|
|
|
|
|
CONFIG as PHONE_INPUT_WIDGET_V2_CONFIG,
|
|
|
|
|
} from "widgets/PhoneInputWidget";
|
2021-12-29 12:01:19 +00:00
|
|
|
import ProgressBarWidget, {
|
|
|
|
|
CONFIG as PROGRESSBAR_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/ProgressBarWidget";
|
2022-01-21 10:19:10 +00:00
|
|
|
import RadioGroupWidget, {
|
|
|
|
|
CONFIG as RADIO_GROUP_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/RadioGroupWidget";
|
|
|
|
|
import RateWidget, { CONFIG as RATE_WIDGET_CONFIG } from "widgets/RateWidget";
|
|
|
|
|
import RichTextEditorWidget, {
|
|
|
|
|
CONFIG as RICH_TEXT_EDITOR_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/RichTextEditorWidget";
|
|
|
|
|
import SingleSelectTreeWidget, {
|
|
|
|
|
CONFIG as SINGLE_SELECT_TREE_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/SingleSelectTreeWidget";
|
|
|
|
|
import SkeletonWidget, {
|
|
|
|
|
CONFIG as SKELETON_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/SkeletonWidget";
|
|
|
|
|
import StatboxWidget, {
|
|
|
|
|
CONFIG as STATBOX_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/StatboxWidget";
|
feat: JSON Form widget (#8472)
* initial layout
* updated parser to support nested array
* array field rendering
* changes
* ts fix
* minor revert FormWidget
* modified schema structure
* select and switch fields
* added checkbox field
* added RadioGroupField
* partial DateField and defaults, typing refactoring
* added label and field type change
* minor ts changes
* changes
* modified widget/utils for nested panelConfig, modified schema to object approach
* array/object label support
* hide field configuration when children not present
* added tooltip
* field visibility option
* disabled state
* upgraded tslib, form initial values
* custom field configuration - add/hide/edit
* field configuration - label change
* return input when field configuration reaches max depth
* minor changes
* form - scroll, fixedfooter, enitity defn and other minior changes
* form title
* unregister on unmount
* fixes
* zero state
* fix field padding
* patched updating form values, removed linting warnings
* configured action buttons
* minor fix
* minor change
* property pane - sort fields in field configuration
* refactor include all properties
* checkbox properties
* date properties
* refactor typings and radio group properties
* switch, multselect, select, array, object properties
* minor changes
* default value
* ts fixes
* checkbox field properties implementation
* date field prop implementation
* switch field
* select field and fix deep nested meta properties
* multiselect implementation
* minor change
* input field implementation
* fix position jump on field type change
* initial accordian
* field state property and auto-complete of JSONFormComputeControl
* merge fixes
* renamed FormBuilder to JSONForm
* source data validation minor change
* custom field default value fix
* Editable keys for custom field
* minor fixes
* replaced useFieldArray with custom logic, added widget icon
* array and object accordian with border/background styling
* minor change
* disabled states for array and objects
* default value minor fix
* form level styles
* modified logic for isDisabled for array and object, added disabledWhenInvalid, exposed isValid to fieldState for text input, removed useDisableChildren
* added isValid for all field types
* fixed reset to default values
* debounce form values update
* minor change
* minor change
* fix crash - source data change multi-select to array, fix crash - change of options
* fix positioning
* detect date type in source data
* fix crash - when object is passed to regex input field
* fixed default sourceData path for fields
* accodion keep children mounted on collapse
* jest test for schemaParser
* widget/helper and useRegisterFieldInvalid test
* tests for property config helper and generatePanelPropertyConfig
* fix input field validation not appearing
* fix date field type detection
* rename data -> formData
* handle null/undefined field value change in sourceData
* added null/undefined as valid values for defaultValue text field
* auto detect email field
* set formData default value on initial load
* switch field inline positioning
* field margin fix for row direction
* select full width
* fiex date field default value - out of range
* fix any field type to array
* array default value logic change
* base cypress test changes
* initial json form render cy test
* key sanitization
* fix fieldState update logic
* required design, object/array background color, accordion changes, fix - add new custom field
* minor change
* cypress tests
* fix date formatted value, field state cypress test
* cypress - field properties test and fixes
* rename test file
* fix accessort change to blank value, cypress tests
* fix array field default value for modified accessor
* minor fix
* added animate loading
* fix empty state, add new custom field
* test data fix
* fix warnings
* fix timePrecision visibility
* button styling
* ported input v2
* fix jest tests
* fix cypress tests
* perf changes
* perf improvement
* added comments
* multiselect changes
* input field perf refactor
* array field, object field refactor performance
* checkbox field refactor
* refectored date, radio, select and switch
* fixes
* test fixes
* fixes
* minor fix
* rename field renderer
* remove tracked fieldRenderer field
* cypress test fixes
* cypress changes
* array default value fixes
* arrayfield passedDefaultValue
* auto enabled JS mode for few properties, reverted swith and date property controls
* cypress changes
* added widget sniping mode and fixed object passedDefaultValue
* multiselect v2
* select v2
* fix jest tests
* test fixes
* field limit
* rename field type dropdown texts
* field type changes fixes
* jest fixes
* loading state submit button
* default source data for new widget
* modify limit message
* multiseelct default value changes and cypress fix
* select default value
* keep default value intact on field type change
* TextTable cypress text fix
* review changes
* fixed footer changes
* collapse styles section by default
* fixed footer changes
* form modes
* custom field key rentention
* fixed footer fix in view mode
* non ascii characters
* fix meta merge in dataTreeWidget
* minor fixes
* rename useRegisterFieldInvalid.ts -> useRegisterFieldValidity.ts
* modified dependency injection into evaluated values
* refactored fixedfooter logic
* minor change
* accessor update
* minor change
* fixes
* QA fixes date field, scroll content
* fix phone number field, removed visiblity option from array item
* fix sourceData autocomplete
* reset logic
* fix multiselect reset
* form values hydration on widget drag
* code review changes
* reverted order of merge dataTreeWidget
* fixes
* added button titles, fixed hydration issue
* default value fixes
* upgraded react hook form, modified array-level/field-level default value logic
* fixed select validation
* added icon entity explorer, modified icon align control
* modify accessor validation for mongo db _id
* update email field regex
* review changes
* explicitly handle empty source data validation
2022-03-24 07:13:25 +00:00
|
|
|
import JSONFormWidget, {
|
|
|
|
|
CONFIG as JSON_FORM_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/JSONFormWidget";
|
2021-12-09 12:02:47 +00:00
|
|
|
import SwitchGroupWidget, {
|
|
|
|
|
CONFIG as SWITCH_GROUP_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/SwitchGroupWidget";
|
2022-01-21 10:19:10 +00:00
|
|
|
import SwitchWidget, {
|
|
|
|
|
CONFIG as SWITCH_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/SwitchWidget";
|
|
|
|
|
import TableWidget, {
|
|
|
|
|
CONFIG as TABLE_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/TableWidget";
|
|
|
|
|
import TabsMigratorWidget, {
|
|
|
|
|
CONFIG as TABS_MIGRATOR_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/TabsMigrator";
|
|
|
|
|
import TabsWidget, { CONFIG as TABS_WIDGET_CONFIG } from "widgets/TabsWidget";
|
|
|
|
|
import TextWidget, { CONFIG as TEXT_WIDGET_CONFIG } from "widgets/TextWidget";
|
|
|
|
|
import VideoWidget, {
|
|
|
|
|
CONFIG as VIDEO_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/VideoWidget";
|
2022-04-01 16:02:19 +00:00
|
|
|
import ProgressWidget, {
|
|
|
|
|
CONFIG as PROGRESS_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/ProgressWidget";
|
2022-04-22 09:44:22 +00:00
|
|
|
import { registerWidget } from "./WidgetRegisterHelpers";
|
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description
This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.
As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes
This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)
### Why is this needed?
This PR is needed because, for the Lodash optimization from
https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.
However, just using `import type` in the current codebase will give you
this:
<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">
That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.
### Why enforce `import type`?
Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)
I’m doing this because I believe `import type` improves DX and makes
refactorings easier.
Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)
```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
It’s pretty hard, right?
What about now?
```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
Now, it’s clear that only `lodash` will be bundled.
This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.
This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.
## Type of change
- Chore (housekeeping or task changes that don't impact user perception)
## How Has This Been Tested?
This was tested to not break the build.
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 11:41:47 +00:00
|
|
|
import type { WidgetConfiguration } from "widgets/constants";
|
2022-07-14 07:02:35 +00:00
|
|
|
import TableWidgetV2, {
|
|
|
|
|
CONFIG as TABLE_WIDGET_CONFIG_V2,
|
|
|
|
|
} from "widgets/TableWidgetV2";
|
feat: implemented slider widgets (#15712)
* feat: implemented slider widget from mantine ui
* fix: remove widget from widgetName
* fix: memoize marks, use primitives for rangeslider value
* fix: use theme accentColor, remove xs and xl size
* fix: renamed slider widget, added searchTags, parity properties
* feat: added labels to the slider widgets.
* fix: Rename SingleSlider components to Slider
* feat: added basic disabled state
* feat: added category slider widget, handled label callback function
* fix: Renamed slider widgets fixed imports and bindings.
* feat: widget redesign, added hover, focus, disabled states.
* feat: added isDirty meta property to the slider widgets.
* feat: Added onChange action triggers to the slider widgets.
* feat: added show marks label property for category widget.
* fix: fixed initial feedback on designs, issues.
* feat: added the new tabbed property pane improvements.
* feat: changes to the slider property panes.
* fix: removed show label on hover and add tooltip always on property.
* fix: slider sizes changed inline with the designs
* feat: added initial logos.
* fix: slider size subtext.
* feat: added show marks to number and range sliders.
* fix: Label will show one decimal point if step Size is in decimal.
* feat: added validations for the slider widgets.
* fix: remove mark dots when show marks is off, change icons.
* fix: addressed validations feedback.
* fix: added stepsize validation number widget & fixed top label aligning.
* fix: Long label styles.
* fix: wrapping removed for long labels, handled focus state.
* fix: remove overflow hidden.
* fix: added pointerEvents none to Marks.
* fix: added default value in the Number Slider widget.
* fix: refactor marks remove un-necessary function calls.
* fix: Review changes done.
* fix: remove transformstyles outside component.
* fix: remove old proprty pane config.
* fix: remove any type from widget files.
* fix: small code refactor validations category slider.
* fix: removed throttle, fixed slider setting to zero issue.
* fix: Added validation for stepSize RangeSlider. Added clamp for nextValue in getChangeValue.
* fix: number and category slider fire events only if value has changed.
* fix: added 0 as default for the min value, range and number sliders.
* fix: remove tooltip always on from category slider.
* fix: minRange validation accept only numbers.
* fix: added old property pane method.
2022-09-22 15:56:50 +00:00
|
|
|
import NumberSliderWidget, {
|
|
|
|
|
CONFIG as NUMBER_SLIDER_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/NumberSliderWidget";
|
|
|
|
|
import RangeSliderWidget, {
|
|
|
|
|
CONFIG as RANGE_SLIDER_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/RangeSliderWidget";
|
|
|
|
|
import CategorySliderWidget, {
|
|
|
|
|
CONFIG as CATEGORY_SLIDER_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/CategorySliderWidget";
|
2022-09-16 04:55:32 +00:00
|
|
|
import CodeScannerWidget, {
|
|
|
|
|
CONFIG as CODE_SCANNER_WIDGET_CONFIG,
|
|
|
|
|
} from "widgets/CodeScannerWidget";
|
2023-02-14 16:07:31 +00:00
|
|
|
import ListWidgetV2, {
|
|
|
|
|
CONFIG as LIST_WIDGET_CONFIG_V2,
|
|
|
|
|
} from "widgets/ListWidgetV2";
|
feat: camera widget (#8069)
* feat: Camera Widget
-- Scaffold the basic structure of the widget
* feat: Camera Widget
-- Prototype a feature, taking picture
* feat: Camera Widget
-- Add types for MediaRecorder
-- Define media capture status and action types
-- Prototype basic video recording, playing features
* feat: Camera Widget
-- Implement video player
-- Add timer for recording and playing video
-- Add permission and error handling logic
-- Add device selectors
* feat: Camera Widget
-- Place control buttons above device inputs layer
-- Make the widget fully responsive
* feat: Camera Widget
-- Change the color of caret-down icon to white
-- Remove overlaying of web cam and video player
-- Add some padding for device inputs
* feat: Camera Widget
-- Add black background to the container of the widget
* feat: Camera Widget
-- Change the widget icon
* feat: Camera Widget
-- Implement the mute feature of a mic or a camera
* feat: Camera Widget
-- Check media device permissions before getting started
* feat: Camera Widget
-- Add a fullscreen control
* feat: Camera Widget
-- Set error text color to white
-- Change the layout of control panel
* feat: Camera Widget
-- Apply layout change for control panel according to app layout change
* feat: Camera Widget
-- Add a new derived property, videoURL
* feat: Switch Group Widget
-- Adopt theme changes
* feat: Camera Widget
-- Make background grey in case of both error and disabled status
* feat: Camera Widget
-- Update npm dependencies
* feat: Camera Widget
-- Fix on #8788, using muted property
* feat: Camera Widget
-- Show off the microphone setting icon only if the current mode is video
-- Set isMirrored property to true by default
* feat: Camera Widget
-- Add photo viewer
* feat: Camera Widget
-- Add onImageCapture, onRecordingStart, onRecordingStop actions instead of onMediaCapture
* feat: Camera Widget
-- Expose meta properties for the widget
* feat: Camera Widget
-- Fix on responsiveness issue
* feat: Camera Widget
-- Add type definitions for MediaStream recording
* feat: Camera Widget
-- Hide isMirroed property for video mode
* feat: Camera Widget
-- Wrap all the controls with TooltipComponent
* feat: Camera Widget
-- Implement enter, exit full screen feature
* feat: Camera Widget
-- Add a widget icon for entity explorer
* feat: Camera Widget
-- Fix on the typo for the label of onRecordingStop property
* feat: Camera Widget
-- Enable/disable media tracks
* feat: Camera Widget
-- Set the video's height to 100% in fullscreen mode
* feat: Camera Widget
-- Add overlayers on Webcam
* feat: Camera Widget
-- Set position to relative on fullscreen wrapper div
-- Set the photo viewer's height to 100%
* feat: Camera Widget
-- Add image, mediaCaptureStatus, timer meta properties to keep UI states when the widget is dragged
* feat: Camera Widget
-- Refactor code base, eliminating commented code blocks
* feat: Camera Widget
-- Revert all the changes needed for keeping status when the widget is dragged
-- Set mirroed property to false for video mode
2021-12-24 14:06:59 +00:00
|
|
|
|
2022-11-23 09:48:23 +00:00
|
|
|
export const ALL_WIDGETS_AND_CONFIG: [any, WidgetConfiguration][] = [
|
2022-01-13 05:24:12 +00:00
|
|
|
[CanvasWidget, CANVAS_WIDGET_CONFIG],
|
|
|
|
|
[SkeletonWidget, SKELETON_WIDGET_CONFIG],
|
|
|
|
|
[ContainerWidget, CONTAINER_WIDGET_CONFIG],
|
|
|
|
|
[TextWidget, TEXT_WIDGET_CONFIG],
|
|
|
|
|
[TableWidget, TABLE_WIDGET_CONFIG],
|
|
|
|
|
[CheckboxWidget, CHECKBOX_WIDGET_CONFIG],
|
|
|
|
|
[RadioGroupWidget, RADIO_GROUP_WIDGET_CONFIG],
|
|
|
|
|
[ButtonWidget, BUTTON_WIDGET_CONFIG],
|
|
|
|
|
[ImageWidget, IMAGE_WIDGET_CONFIG],
|
|
|
|
|
[VideoWidget, VIDEO_WIDGET_CONFIG],
|
|
|
|
|
[TabsWidget, TABS_WIDGET_CONFIG],
|
|
|
|
|
[ModalWidget, MODAL_WIDGET_CONFIG],
|
|
|
|
|
[ChartWidget, CHART_WIDGET_CONFIG],
|
|
|
|
|
[MapWidget, MAP_WIDGET_CONFIG],
|
|
|
|
|
[RichTextEditorWidget, RICH_TEXT_EDITOR_WIDGET_CONFIG],
|
|
|
|
|
[DatePickerWidget2, DATE_PICKER_WIDGET_2_CONFIG],
|
|
|
|
|
[SwitchWidget, SWITCH_WIDGET_CONFIG],
|
|
|
|
|
[FormWidget, FORM_WIDGET_CONFIG],
|
|
|
|
|
[RateWidget, RATE_WIDGET_CONFIG],
|
|
|
|
|
[IframeWidget, IFRAME_WIDGET_CONFIG],
|
|
|
|
|
[TabsMigratorWidget, TABS_MIGRATOR_WIDGET_CONFIG],
|
|
|
|
|
[DividerWidget, DIVIDER_WIDGET_CONFIG],
|
|
|
|
|
[MenuButtonWidget, MENU_BUTTON_WIDGET_CONFIG],
|
|
|
|
|
[IconButtonWidget, ICON_BUTTON_WIDGET_CONFIG],
|
|
|
|
|
[CheckboxGroupWidget, CHECKBOX_GROUP_WIDGET_CONFIG],
|
|
|
|
|
[FilePickerWidgetV2, FILEPICKER_WIDGET_V2_CONFIG],
|
|
|
|
|
[StatboxWidget, STATBOX_WIDGET_CONFIG],
|
|
|
|
|
[AudioRecorderWidget, AUDIO_RECORDER_WIDGET_CONFIG],
|
|
|
|
|
[DocumentViewerWidget, DOCUMENT_VIEWER_WIDGET_CONFIG],
|
|
|
|
|
[ButtonGroupWidget, BUTTON_GROUP_CONFIG],
|
|
|
|
|
[MultiSelectTreeWidget, MULTI_SELECT_TREE_WIDGET_CONFIG],
|
|
|
|
|
[SingleSelectTreeWidget, SINGLE_SELECT_TREE_WIDGET_CONFIG],
|
|
|
|
|
[SwitchGroupWidget, SWITCH_GROUP_WIDGET_CONFIG],
|
|
|
|
|
[AudioWidget, AUDIO_WIDGET_CONFIG],
|
|
|
|
|
[ProgressBarWidget, PROGRESSBAR_WIDGET_CONFIG],
|
|
|
|
|
[CameraWidget, CAMERA_WIDGET_CONFIG],
|
|
|
|
|
[MapChartWidget, MAP_CHART_WIDGET_CONFIG],
|
2022-02-02 14:15:07 +00:00
|
|
|
[SelectWidget, SELECT_WIDGET_CONFIG],
|
|
|
|
|
[MultiSelectWidgetV2, MULTI_SELECT_WIDGET_V2_CONFIG],
|
2022-01-18 07:52:24 +00:00
|
|
|
[InputWidgetV2, INPUT_WIDGET_V2_CONFIG],
|
|
|
|
|
[PhoneInputWidget, PHONE_INPUT_WIDGET_V2_CONFIG],
|
|
|
|
|
[CurrencyInputWidget, CURRENCY_INPUT_WIDGET_V2_CONFIG],
|
feat: JSON Form widget (#8472)
* initial layout
* updated parser to support nested array
* array field rendering
* changes
* ts fix
* minor revert FormWidget
* modified schema structure
* select and switch fields
* added checkbox field
* added RadioGroupField
* partial DateField and defaults, typing refactoring
* added label and field type change
* minor ts changes
* changes
* modified widget/utils for nested panelConfig, modified schema to object approach
* array/object label support
* hide field configuration when children not present
* added tooltip
* field visibility option
* disabled state
* upgraded tslib, form initial values
* custom field configuration - add/hide/edit
* field configuration - label change
* return input when field configuration reaches max depth
* minor changes
* form - scroll, fixedfooter, enitity defn and other minior changes
* form title
* unregister on unmount
* fixes
* zero state
* fix field padding
* patched updating form values, removed linting warnings
* configured action buttons
* minor fix
* minor change
* property pane - sort fields in field configuration
* refactor include all properties
* checkbox properties
* date properties
* refactor typings and radio group properties
* switch, multselect, select, array, object properties
* minor changes
* default value
* ts fixes
* checkbox field properties implementation
* date field prop implementation
* switch field
* select field and fix deep nested meta properties
* multiselect implementation
* minor change
* input field implementation
* fix position jump on field type change
* initial accordian
* field state property and auto-complete of JSONFormComputeControl
* merge fixes
* renamed FormBuilder to JSONForm
* source data validation minor change
* custom field default value fix
* Editable keys for custom field
* minor fixes
* replaced useFieldArray with custom logic, added widget icon
* array and object accordian with border/background styling
* minor change
* disabled states for array and objects
* default value minor fix
* form level styles
* modified logic for isDisabled for array and object, added disabledWhenInvalid, exposed isValid to fieldState for text input, removed useDisableChildren
* added isValid for all field types
* fixed reset to default values
* debounce form values update
* minor change
* minor change
* fix crash - source data change multi-select to array, fix crash - change of options
* fix positioning
* detect date type in source data
* fix crash - when object is passed to regex input field
* fixed default sourceData path for fields
* accodion keep children mounted on collapse
* jest test for schemaParser
* widget/helper and useRegisterFieldInvalid test
* tests for property config helper and generatePanelPropertyConfig
* fix input field validation not appearing
* fix date field type detection
* rename data -> formData
* handle null/undefined field value change in sourceData
* added null/undefined as valid values for defaultValue text field
* auto detect email field
* set formData default value on initial load
* switch field inline positioning
* field margin fix for row direction
* select full width
* fiex date field default value - out of range
* fix any field type to array
* array default value logic change
* base cypress test changes
* initial json form render cy test
* key sanitization
* fix fieldState update logic
* required design, object/array background color, accordion changes, fix - add new custom field
* minor change
* cypress tests
* fix date formatted value, field state cypress test
* cypress - field properties test and fixes
* rename test file
* fix accessort change to blank value, cypress tests
* fix array field default value for modified accessor
* minor fix
* added animate loading
* fix empty state, add new custom field
* test data fix
* fix warnings
* fix timePrecision visibility
* button styling
* ported input v2
* fix jest tests
* fix cypress tests
* perf changes
* perf improvement
* added comments
* multiselect changes
* input field perf refactor
* array field, object field refactor performance
* checkbox field refactor
* refectored date, radio, select and switch
* fixes
* test fixes
* fixes
* minor fix
* rename field renderer
* remove tracked fieldRenderer field
* cypress test fixes
* cypress changes
* array default value fixes
* arrayfield passedDefaultValue
* auto enabled JS mode for few properties, reverted swith and date property controls
* cypress changes
* added widget sniping mode and fixed object passedDefaultValue
* multiselect v2
* select v2
* fix jest tests
* test fixes
* field limit
* rename field type dropdown texts
* field type changes fixes
* jest fixes
* loading state submit button
* default source data for new widget
* modify limit message
* multiseelct default value changes and cypress fix
* select default value
* keep default value intact on field type change
* TextTable cypress text fix
* review changes
* fixed footer changes
* collapse styles section by default
* fixed footer changes
* form modes
* custom field key rentention
* fixed footer fix in view mode
* non ascii characters
* fix meta merge in dataTreeWidget
* minor fixes
* rename useRegisterFieldInvalid.ts -> useRegisterFieldValidity.ts
* modified dependency injection into evaluated values
* refactored fixedfooter logic
* minor change
* accessor update
* minor change
* fixes
* QA fixes date field, scroll content
* fix phone number field, removed visiblity option from array item
* fix sourceData autocomplete
* reset logic
* fix multiselect reset
* form values hydration on widget drag
* code review changes
* reverted order of merge dataTreeWidget
* fixes
* added button titles, fixed hydration issue
* default value fixes
* upgraded react hook form, modified array-level/field-level default value logic
* fixed select validation
* added icon entity explorer, modified icon align control
* modify accessor validation for mongo db _id
* update email field regex
* review changes
* explicitly handle empty source data validation
2022-03-24 07:13:25 +00:00
|
|
|
[JSONFormWidget, JSON_FORM_WIDGET_CONFIG],
|
2022-07-14 07:02:35 +00:00
|
|
|
[TableWidgetV2, TABLE_WIDGET_CONFIG_V2],
|
feat: implemented slider widgets (#15712)
* feat: implemented slider widget from mantine ui
* fix: remove widget from widgetName
* fix: memoize marks, use primitives for rangeslider value
* fix: use theme accentColor, remove xs and xl size
* fix: renamed slider widget, added searchTags, parity properties
* feat: added labels to the slider widgets.
* fix: Rename SingleSlider components to Slider
* feat: added basic disabled state
* feat: added category slider widget, handled label callback function
* fix: Renamed slider widgets fixed imports and bindings.
* feat: widget redesign, added hover, focus, disabled states.
* feat: added isDirty meta property to the slider widgets.
* feat: Added onChange action triggers to the slider widgets.
* feat: added show marks label property for category widget.
* fix: fixed initial feedback on designs, issues.
* feat: added the new tabbed property pane improvements.
* feat: changes to the slider property panes.
* fix: removed show label on hover and add tooltip always on property.
* fix: slider sizes changed inline with the designs
* feat: added initial logos.
* fix: slider size subtext.
* feat: added show marks to number and range sliders.
* fix: Label will show one decimal point if step Size is in decimal.
* feat: added validations for the slider widgets.
* fix: remove mark dots when show marks is off, change icons.
* fix: addressed validations feedback.
* fix: added stepsize validation number widget & fixed top label aligning.
* fix: Long label styles.
* fix: wrapping removed for long labels, handled focus state.
* fix: remove overflow hidden.
* fix: added pointerEvents none to Marks.
* fix: added default value in the Number Slider widget.
* fix: refactor marks remove un-necessary function calls.
* fix: Review changes done.
* fix: remove transformstyles outside component.
* fix: remove old proprty pane config.
* fix: remove any type from widget files.
* fix: small code refactor validations category slider.
* fix: removed throttle, fixed slider setting to zero issue.
* fix: Added validation for stepSize RangeSlider. Added clamp for nextValue in getChangeValue.
* fix: number and category slider fire events only if value has changed.
* fix: added 0 as default for the min value, range and number sliders.
* fix: remove tooltip always on from category slider.
* fix: minRange validation accept only numbers.
* fix: added old property pane method.
2022-09-22 15:56:50 +00:00
|
|
|
[NumberSliderWidget, NUMBER_SLIDER_WIDGET_CONFIG],
|
|
|
|
|
[RangeSliderWidget, RANGE_SLIDER_WIDGET_CONFIG],
|
|
|
|
|
[CategorySliderWidget, CATEGORY_SLIDER_WIDGET_CONFIG],
|
2022-09-16 04:55:32 +00:00
|
|
|
[CodeScannerWidget, CODE_SCANNER_WIDGET_CONFIG],
|
2023-02-14 16:07:31 +00:00
|
|
|
[ListWidgetV2, LIST_WIDGET_CONFIG_V2],
|
2022-05-25 09:38:32 +00:00
|
|
|
|
|
|
|
|
//Deprecated Widgets
|
|
|
|
|
[InputWidget, INPUT_WIDGET_CONFIG],
|
|
|
|
|
[DropdownWidget, DROPDOWN_WIDGET_CONFIG],
|
|
|
|
|
[DatePickerWidget, DATE_PICKER_WIDGET_CONFIG],
|
|
|
|
|
[IconWidget, ICON_WIDGET_CONFIG],
|
|
|
|
|
[FilePickerWidget, FILEPICKER_WIDGET_CONFIG],
|
|
|
|
|
[MultiSelectWidget, MULTI_SELECT_WIDGET_CONFIG],
|
|
|
|
|
[FormButtonWidget, FORM_BUTTON_WIDGET_CONFIG],
|
2022-04-01 16:02:19 +00:00
|
|
|
[ProgressWidget, PROGRESS_WIDGET_CONFIG],
|
2022-05-25 09:38:32 +00:00
|
|
|
[CircularProgressWidget, CIRCULAR_PROGRESS_WIDGET_CONFIG],
|
2023-02-14 16:07:31 +00:00
|
|
|
[ListWidget, LIST_WIDGET_CONFIG],
|
|
|
|
|
|
2022-02-09 07:15:10 +00:00
|
|
|
/*
|
|
|
|
|
* If a newly added widget works well inside the list widget,
|
|
|
|
|
* please add widget type in the List widget's allowed widget
|
|
|
|
|
* list, to make the new widget be droppable inside List widget.
|
|
|
|
|
*/
|
2022-01-13 05:24:12 +00:00
|
|
|
];
|
|
|
|
|
|
2021-09-09 15:10:22 +00:00
|
|
|
export const registerWidgets = () => {
|
|
|
|
|
const start = performance.now();
|
2022-01-21 10:19:10 +00:00
|
|
|
for (const widget of ALL_WIDGETS_AND_CONFIG) {
|
2022-01-13 05:24:12 +00:00
|
|
|
registerWidget(widget[0], widget[1] as WidgetConfiguration);
|
|
|
|
|
}
|
2021-09-17 09:08:35 +00:00
|
|
|
|
2021-09-09 15:10:22 +00:00
|
|
|
log.debug("Widget registration took: ", performance.now() - start, "ms");
|
|
|
|
|
};
|