* feat: Add Scanner Variant - Click to scan and always on to code scanenr * feat: Enhancements for code scanner's property pane - update help text, hide properties on always on * feat: Add Image Mirror button to code scanner * feat: Update code scanner video fit to contain * feat: Add DSL migrations for Code Scanner * feat: Make always on the default scanner layout, rename scannerVarient to scannerLayout * feat: Stop scanning and detecting codes in background for code scanner widget * test: Add Cypress tests for different scanner layouts for code scanner * refactor: fix minor code callouts here and there * refactor: Restructure cypress test suite * feat: Increase code scanner delay to avoid unintended detections * refactor: combine two different conditions into one ternary * feat: Remove one cy test case Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
40 lines
1014 B
TypeScript
40 lines
1014 B
TypeScript
import IconSVG from "./icon.svg";
|
|
import Widget from "./widget";
|
|
import { ButtonPlacementTypes } from "components/constants";
|
|
import { ScannerLayout } from "./constants";
|
|
|
|
export const CONFIG = {
|
|
type: Widget.getWidgetType(),
|
|
name: "Code Scanner",
|
|
iconSVG: IconSVG,
|
|
needsMeta: true,
|
|
searchTags: [
|
|
"barcode scanner",
|
|
"qr scanner",
|
|
"code detector",
|
|
"barcode reader",
|
|
],
|
|
defaults: {
|
|
rows: 33,
|
|
label: "Scan a QR/Barcode",
|
|
columns: 25,
|
|
widgetName: "CodeScanner",
|
|
isDefaultClickDisabled: true,
|
|
scannerLayout: ScannerLayout.ALWAYS_ON,
|
|
version: 1,
|
|
isRequired: false,
|
|
isDisabled: false,
|
|
animateLoading: true,
|
|
placement: ButtonPlacementTypes.CENTER,
|
|
},
|
|
properties: {
|
|
derived: Widget.getDerivedPropertiesMap(),
|
|
default: Widget.getDefaultPropertiesMap(),
|
|
meta: Widget.getMetaPropertiesMap(),
|
|
styleConfig: Widget.getPropertyPaneStyleConfig(),
|
|
contentConfig: Widget.getPropertyPaneContentConfig(),
|
|
},
|
|
};
|
|
|
|
export default Widget;
|