* POC: Grouping for ButtonWidget * Adds featureflag * improve feature flag experience for unfinished widgets * Styling of tabs * Adds activation group for ButtonWidget * Makes contentConfig & styleCOnfig optional to avoid typescript errors from tests * Adds UI for search * Fixes title, search & tabs UI to the top * fix: style issue * fix styles * refactor ProeprtyPaneTab * updates Button based on Figma design changes * POC for AudioWidget * chore: JSON Form Grouping & Reorganisation (#15033) * POC: JSON Form grouping * fix: Empty sections * Moves icon into a separate sub section * fix some sections based on updated Designs * fix styling issues * fix: double border * udpdates based on Figma updates * Updates order as per Figma * refactor and better naming of function * address review comments for JSON form configs * fix UI issues * reorder JSON form's array data section * Adds Button Form settings * Address QA comments * update JSON form with new design changes * Open array & object style by default * trigger ci * chore: Grouping & reorganisation of Video widget (#15297) * POC: JSON Form grouping * fix: Empty sections * Moves icon into a separate sub section * fix some sections based on updated Designs * fix styling issues * fix: double border * udpdates based on Figma updates * Updates order as per Figma * Content & Style Config for Video Widget * refactor and better naming of function * address review comments for JSON form configs * fix UI issues * ?? * chore: Grouping & reorganisation of Document Viewer widget (#15514) * Grouping & re-org for Document Viewer * fix: scroll issue * feat: Search properties in property pane (#14876) * Upgrades fuse.js package * Property pane search POC * POC: JSON Form grouping * fix: Empty sections * Moves icon into a separate sub section * fix some sections based on updated Designs * fix styling issues * fix: double border * udpdates based on Figma updates * Updates order as per Figma * fix unused variable after merge * Adds empty search UI * Makes the order of search result proper * Refactor PropertyControlGenerator * refactor and support for panel * Revert "Upgrades fuse.js package" This reverts commit 76d8038139ff4b8add79019a75eaaf40fd620e8e. * extract out search functionality to helper * cleanup * fix: panel issue * Focus on Search bar on opening the property pane * better naming * fix: fuzzy search params * refactor: As suggested in the code review * fix: section is not hidden when there's no children * fix: issue panel properties * Adds TextWidget * Adds RateWidget * Adds DividerWidget * Adds ProgressWidget * Adds ListWidget * adds TabWidget * Adds IframeWidget * Adds StatboxWidget * Adds ModalWidget * changes after design review
116 lines
3.2 KiB
TypeScript
116 lines
3.2 KiB
TypeScript
import { ButtonVariantTypes } from "components/constants";
|
|
import { Colors } from "constants/Colors";
|
|
import { THEMEING_TEXT_SIZES } from "constants/ThemeConstants";
|
|
import IconSVG from "./icon.svg";
|
|
import Widget from "./widget";
|
|
|
|
export const CONFIG = {
|
|
type: Widget.getWidgetType(),
|
|
name: "Stats Box",
|
|
iconSVG: IconSVG,
|
|
needsMeta: true,
|
|
isCanvas: true,
|
|
defaults: {
|
|
rows: 14,
|
|
columns: 16,
|
|
animateLoading: true,
|
|
widgetName: "Statbox",
|
|
backgroundColor: "white",
|
|
children: [],
|
|
blueprint: {
|
|
view: [
|
|
{
|
|
type: "CANVAS_WIDGET",
|
|
position: { top: 0, left: 0 },
|
|
props: {
|
|
containerStyle: "none",
|
|
canExtend: false,
|
|
detachFromLayout: true,
|
|
children: [],
|
|
version: 1,
|
|
blueprint: {
|
|
view: [
|
|
{
|
|
type: "TEXT_WIDGET",
|
|
size: {
|
|
rows: 4,
|
|
cols: 36,
|
|
},
|
|
position: { top: 0, left: 1 },
|
|
props: {
|
|
text: "Page Views",
|
|
fontSize: "0.75rem",
|
|
textColor: "#999999",
|
|
version: 1,
|
|
},
|
|
},
|
|
{
|
|
type: "TEXT_WIDGET",
|
|
size: {
|
|
rows: 4,
|
|
cols: 36,
|
|
},
|
|
position: {
|
|
top: 4,
|
|
left: 1,
|
|
},
|
|
props: {
|
|
text: "2.6 M",
|
|
fontSize: THEMEING_TEXT_SIZES.lg,
|
|
fontStyle: "BOLD",
|
|
version: 1,
|
|
},
|
|
},
|
|
{
|
|
type: "TEXT_WIDGET",
|
|
size: {
|
|
rows: 4,
|
|
cols: 36,
|
|
},
|
|
position: {
|
|
top: 8,
|
|
left: 1,
|
|
},
|
|
props: {
|
|
text: "21% more than last month",
|
|
fontSize: "0.75rem",
|
|
textColor: Colors.GREEN,
|
|
version: 1,
|
|
},
|
|
},
|
|
{
|
|
type: "ICON_BUTTON_WIDGET",
|
|
size: {
|
|
rows: 8,
|
|
cols: 16,
|
|
},
|
|
position: {
|
|
top: 2,
|
|
left: 46,
|
|
},
|
|
props: {
|
|
iconName: "arrow-top-right",
|
|
buttonStyle: "PRIMARY",
|
|
buttonVariant: ButtonVariantTypes.PRIMARY,
|
|
version: 1,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
properties: {
|
|
derived: Widget.getDerivedPropertiesMap(),
|
|
default: Widget.getDefaultPropertiesMap(),
|
|
meta: Widget.getMetaPropertiesMap(),
|
|
config: Widget.getPropertyPaneConfig(),
|
|
contentConfig: Widget.getPropertyPaneContentConfig(),
|
|
styleConfig: Widget.getPropertyPaneStyleConfig(),
|
|
},
|
|
};
|
|
|
|
export default Widget;
|