PromucFlow_constructor/app/client/src/utils/WidgetFactory.tsx

271 lines
7.6 KiB
TypeScript
Raw Normal View History

perf: Widget re-rendering refactor (#14485) * initial commit * props hoc * changes * removed ignores and withWidgetProps * added extra props to canvasStructure * widget props changes * list widget changes * reintroduced widget props hook and other refactors * remove warnings * added deepequal for childWidgets selector * fix global hotkeys and tabs widget jest test * fix main container test fix * fixed view mode width * fix form widget values * minor fix * fix skeleton * form widget validity fix * jest test fix * fixed tests: GlobalHotkeys, Tabs, CanvasSelectectionArena and fixed main container rendering * minor fix * minor comments * reverted commented code * simplified structure, selective redux state updates and other inconsistencies * fix junit test cases * stop form widget from force rendering children * fix test case * random commit to re run tests * update isFormValid prop only if it exists * detangling circular dependency * fixing cypress tests * cleaned up code * clean up man cnavas props and fix jest cases * fix rendering order of child widgets for canvas * fix dropdown reset spec * adding comments * cleaning up unwanted code * fix multiselect widget on deploy * adressing review comments * addressing minor review comment changes * destructuring modal widget child and fix test case * fix communityIssues cypress spec * rewrite isVisible logic to match previous behaviour * merging widget props with component props before checking isVisible * adressing review comments for modal widget's isVisible Co-authored-by: rahulramesha <rahul@appsmith.com>
2022-08-19 10:10:36 +00:00
import { WidgetBuilder, WidgetProps, WidgetState } from "widgets/BaseWidget";
2020-03-06 09:45:21 +00:00
import React from "react";
import { PropertyPaneConfig } from "constants/PropertyControlConstants";
import { WidgetConfigProps } from "reducers/entityReducers/widgetConfigReducer";
import { RenderMode } from "constants/WidgetConstants";
import * as log from "loglevel";
import { WidgetFeatures } from "./WidgetFeatures";
import {
addPropertyConfigIds,
convertFunctionsToString,
enhancePropertyPaneConfig,
} from "./WidgetFactoryHelpers";
perf: Widget re-rendering refactor (#14485) * initial commit * props hoc * changes * removed ignores and withWidgetProps * added extra props to canvasStructure * widget props changes * list widget changes * reintroduced widget props hook and other refactors * remove warnings * added deepequal for childWidgets selector * fix global hotkeys and tabs widget jest test * fix main container test fix * fixed view mode width * fix form widget values * minor fix * fix skeleton * form widget validity fix * jest test fix * fixed tests: GlobalHotkeys, Tabs, CanvasSelectectionArena and fixed main container rendering * minor fix * minor comments * reverted commented code * simplified structure, selective redux state updates and other inconsistencies * fix junit test cases * stop form widget from force rendering children * fix test case * random commit to re run tests * update isFormValid prop only if it exists * detangling circular dependency * fixing cypress tests * cleaned up code * clean up man cnavas props and fix jest cases * fix rendering order of child widgets for canvas * fix dropdown reset spec * adding comments * cleaning up unwanted code * fix multiselect widget on deploy * adressing review comments * addressing minor review comment changes * destructuring modal widget child and fix test case * fix communityIssues cypress spec * rewrite isVisible logic to match previous behaviour * merging widget props with component props before checking isVisible * adressing review comments for modal widget's isVisible Co-authored-by: rahulramesha <rahul@appsmith.com>
2022-08-19 10:10:36 +00:00
import { CanvasWidgetStructure } from "widgets/constants";
2020-01-17 09:28:26 +00:00
type WidgetDerivedPropertyType = any;
export type DerivedPropertiesMap = Record<string, string>;
export type WidgetType = typeof WidgetFactory.widgetTypes[number];
class WidgetFactory {
static widgetTypes: Record<string, string> = {};
2020-04-13 08:24:13 +00:00
static widgetMap: Map<
WidgetType,
perf: Widget re-rendering refactor (#14485) * initial commit * props hoc * changes * removed ignores and withWidgetProps * added extra props to canvasStructure * widget props changes * list widget changes * reintroduced widget props hook and other refactors * remove warnings * added deepequal for childWidgets selector * fix global hotkeys and tabs widget jest test * fix main container test fix * fixed view mode width * fix form widget values * minor fix * fix skeleton * form widget validity fix * jest test fix * fixed tests: GlobalHotkeys, Tabs, CanvasSelectectionArena and fixed main container rendering * minor fix * minor comments * reverted commented code * simplified structure, selective redux state updates and other inconsistencies * fix junit test cases * stop form widget from force rendering children * fix test case * random commit to re run tests * update isFormValid prop only if it exists * detangling circular dependency * fixing cypress tests * cleaned up code * clean up man cnavas props and fix jest cases * fix rendering order of child widgets for canvas * fix dropdown reset spec * adding comments * cleaning up unwanted code * fix multiselect widget on deploy * adressing review comments * addressing minor review comment changes * destructuring modal widget child and fix test case * fix communityIssues cypress spec * rewrite isVisible logic to match previous behaviour * merging widget props with component props before checking isVisible * adressing review comments for modal widget's isVisible Co-authored-by: rahulramesha <rahul@appsmith.com>
2022-08-19 10:10:36 +00:00
WidgetBuilder<CanvasWidgetStructure, WidgetState>
2020-04-13 08:24:13 +00:00
> = new Map();
2020-01-17 09:28:26 +00:00
static widgetDerivedPropertiesGetterMap: Map<
WidgetType,
WidgetDerivedPropertyType
> = new Map();
static derivedPropertiesMap: Map<
WidgetType,
DerivedPropertiesMap
> = new Map();
2020-04-17 16:15:09 +00:00
static defaultPropertiesMap: Map<
WidgetType,
Record<string, string>
> = new Map();
static metaPropertiesMap: Map<WidgetType, Record<string, any>> = new Map();
static propertyPaneConfigsMap: Map<
WidgetType,
readonly PropertyPaneConfig[]
> = new Map();
chore: Grouping & Reorganisation for ButtonWidget, JSON Form widget and Audio Widget (#14379) * 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
2022-08-04 05:31:05 +00:00
static propertyPaneContentConfigsMap: Map<
WidgetType,
readonly PropertyPaneConfig[]
> = new Map();
static propertyPaneStyleConfigsMap: Map<
WidgetType,
readonly PropertyPaneConfig[]
> = new Map();
static loadingProperties: Map<WidgetType, Array<RegExp>> = new Map();
2019-09-09 09:08:54 +00:00
static widgetConfigMap: Map<
WidgetType,
Partial<WidgetProps> & WidgetConfigProps & { type: string }
> = new Map();
2019-09-09 09:08:54 +00:00
static registerWidgetBuilder(
widgetType: string,
2020-04-13 08:24:13 +00:00
widgetBuilder: WidgetBuilder<WidgetProps, WidgetState>,
2020-01-17 09:28:26 +00:00
derivedPropertiesMap: DerivedPropertiesMap,
2020-04-17 16:15:09 +00:00
defaultPropertiesMap: Record<string, string>,
metaPropertiesMap: Record<string, any>,
propertyPaneConfig?: PropertyPaneConfig[],
chore: Grouping & Reorganisation for ButtonWidget, JSON Form widget and Audio Widget (#14379) * 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
2022-08-04 05:31:05 +00:00
propertyPaneContentConfig?: PropertyPaneConfig[],
propertyPaneStyleConfig?: PropertyPaneConfig[],
features?: WidgetFeatures,
loadingProperties?: Array<RegExp>,
2019-09-09 09:08:54 +00:00
) {
if (!this.widgetTypes[widgetType]) {
this.widgetTypes[widgetType] = widgetType;
this.widgetMap.set(widgetType, widgetBuilder);
this.derivedPropertiesMap.set(widgetType, derivedPropertiesMap);
this.defaultPropertiesMap.set(widgetType, defaultPropertiesMap);
this.metaPropertiesMap.set(widgetType, metaPropertiesMap);
loadingProperties &&
this.loadingProperties.set(widgetType, loadingProperties);
if (propertyPaneConfig) {
const enhancedPropertyPaneConfig = enhancePropertyPaneConfig(
propertyPaneConfig,
features,
);
const serializablePropertyPaneConfig = convertFunctionsToString(
enhancedPropertyPaneConfig,
);
const finalPropertyPaneConfig = addPropertyConfigIds(
serializablePropertyPaneConfig,
);
this.propertyPaneConfigsMap.set(
widgetType,
Object.freeze(finalPropertyPaneConfig),
);
}
chore: Grouping & Reorganisation for ButtonWidget, JSON Form widget and Audio Widget (#14379) * 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
2022-08-04 05:31:05 +00:00
if (propertyPaneContentConfig) {
const enhancedPropertyPaneConfig = enhancePropertyPaneConfig(
propertyPaneContentConfig,
features,
);
const serializablePropertyPaneConfig = convertFunctionsToString(
enhancedPropertyPaneConfig,
);
const finalPropertyPaneConfig = addPropertyConfigIds(
serializablePropertyPaneConfig,
);
this.propertyPaneContentConfigsMap.set(
widgetType,
Object.freeze(finalPropertyPaneConfig),
);
}
if (propertyPaneStyleConfig) {
const enhancedPropertyPaneConfig = enhancePropertyPaneConfig(
propertyPaneStyleConfig,
features,
);
const serializablePropertyPaneConfig = convertFunctionsToString(
enhancedPropertyPaneConfig,
);
const finalPropertyPaneConfig = addPropertyConfigIds(
serializablePropertyPaneConfig,
);
this.propertyPaneStyleConfigsMap.set(
widgetType,
Object.freeze(finalPropertyPaneConfig),
);
}
}
2019-09-09 09:08:54 +00:00
}
static storeWidgetConfig(
widgetType: string,
config: Partial<WidgetProps> & WidgetConfigProps & { type: string },
) {
this.widgetConfigMap.set(widgetType, Object.freeze(config));
}
static createWidget(
perf: Widget re-rendering refactor (#14485) * initial commit * props hoc * changes * removed ignores and withWidgetProps * added extra props to canvasStructure * widget props changes * list widget changes * reintroduced widget props hook and other refactors * remove warnings * added deepequal for childWidgets selector * fix global hotkeys and tabs widget jest test * fix main container test fix * fixed view mode width * fix form widget values * minor fix * fix skeleton * form widget validity fix * jest test fix * fixed tests: GlobalHotkeys, Tabs, CanvasSelectectionArena and fixed main container rendering * minor fix * minor comments * reverted commented code * simplified structure, selective redux state updates and other inconsistencies * fix junit test cases * stop form widget from force rendering children * fix test case * random commit to re run tests * update isFormValid prop only if it exists * detangling circular dependency * fixing cypress tests * cleaned up code * clean up man cnavas props and fix jest cases * fix rendering order of child widgets for canvas * fix dropdown reset spec * adding comments * cleaning up unwanted code * fix multiselect widget on deploy * adressing review comments * addressing minor review comment changes * destructuring modal widget child and fix test case * fix communityIssues cypress spec * rewrite isVisible logic to match previous behaviour * merging widget props with component props before checking isVisible * adressing review comments for modal widget's isVisible Co-authored-by: rahulramesha <rahul@appsmith.com>
2022-08-19 10:10:36 +00:00
widgetData: CanvasWidgetStructure,
renderMode: RenderMode,
2020-03-06 09:45:21 +00:00
): React.ReactNode {
perf: Widget re-rendering refactor (#14485) * initial commit * props hoc * changes * removed ignores and withWidgetProps * added extra props to canvasStructure * widget props changes * list widget changes * reintroduced widget props hook and other refactors * remove warnings * added deepequal for childWidgets selector * fix global hotkeys and tabs widget jest test * fix main container test fix * fixed view mode width * fix form widget values * minor fix * fix skeleton * form widget validity fix * jest test fix * fixed tests: GlobalHotkeys, Tabs, CanvasSelectectionArena and fixed main container rendering * minor fix * minor comments * reverted commented code * simplified structure, selective redux state updates and other inconsistencies * fix junit test cases * stop form widget from force rendering children * fix test case * random commit to re run tests * update isFormValid prop only if it exists * detangling circular dependency * fixing cypress tests * cleaned up code * clean up man cnavas props and fix jest cases * fix rendering order of child widgets for canvas * fix dropdown reset spec * adding comments * cleaning up unwanted code * fix multiselect widget on deploy * adressing review comments * addressing minor review comment changes * destructuring modal widget child and fix test case * fix communityIssues cypress spec * rewrite isVisible logic to match previous behaviour * merging widget props with component props before checking isVisible * adressing review comments for modal widget's isVisible Co-authored-by: rahulramesha <rahul@appsmith.com>
2022-08-19 10:10:36 +00:00
const widgetProps = {
key: widgetData.widgetId,
2019-11-06 12:12:41 +00:00
isVisible: true,
2019-09-21 01:52:38 +00:00
...widgetData,
renderMode,
};
const widgetBuilder = this.widgetMap.get(widgetData.type);
if (widgetBuilder) {
const widget = widgetBuilder.buildWidget(widgetProps);
return widget;
} else {
2019-09-09 09:08:54 +00:00
const ex: WidgetCreationException = {
message:
"Widget Builder not registered for widget type" + widgetData.type,
2019-09-09 09:08:54 +00:00
};
log.error(ex);
2020-03-06 09:45:21 +00:00
return null;
}
2019-09-09 09:08:54 +00:00
}
2019-09-09 09:08:54 +00:00
static getWidgetTypes(): WidgetType[] {
return Array.from(this.widgetMap.keys());
}
2019-11-19 12:44:58 +00:00
2020-01-17 09:28:26 +00:00
static getWidgetDerivedPropertiesMap(
widgetType: WidgetType,
): DerivedPropertiesMap {
const map = this.derivedPropertiesMap.get(widgetType);
if (!map) {
log.error("Widget type validation is not defined");
2020-01-17 09:28:26 +00:00
return {};
}
return map;
}
2020-02-18 10:41:52 +00:00
2020-04-17 16:15:09 +00:00
static getWidgetDefaultPropertiesMap(
widgetType: WidgetType,
): Record<string, string> {
const map = this.defaultPropertiesMap.get(widgetType);
if (!map) {
log.error("Widget default properties not defined", widgetType);
2020-04-17 16:15:09 +00:00
return {};
}
return map;
}
static getWidgetMetaPropertiesMap(
widgetType: WidgetType,
): Record<string, unknown> {
2020-04-17 16:15:09 +00:00
const map = this.metaPropertiesMap.get(widgetType);
if (!map) {
log.error("Widget meta properties not defined: ", widgetType);
2020-04-17 16:15:09 +00:00
return {};
}
return map;
}
static getWidgetPropertyPaneConfig(
type: WidgetType,
): readonly PropertyPaneConfig[] {
const map = this.propertyPaneConfigsMap.get(type);
if (!map) {
log.error("Widget property pane configs not defined", type);
return [];
}
return map;
2020-04-17 16:15:09 +00:00
}
chore: Grouping & Reorganisation for ButtonWidget, JSON Form widget and Audio Widget (#14379) * 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
2022-08-04 05:31:05 +00:00
static getWidgetPropertyPaneContentConfig(
type: WidgetType,
): readonly PropertyPaneConfig[] {
const map = this.propertyPaneContentConfigsMap.get(type);
if (!map) {
return [];
}
return map;
}
static getWidgetPropertyPaneStyleConfig(
type: WidgetType,
): readonly PropertyPaneConfig[] {
const map = this.propertyPaneStyleConfigsMap.get(type);
if (!map) {
return [];
}
return map;
}
static getWidgetTypeConfigMap(): WidgetTypeConfigMap {
const typeConfigMap: WidgetTypeConfigMap = {};
2020-12-24 04:32:25 +00:00
WidgetFactory.getWidgetTypes().forEach((type) => {
typeConfigMap[type] = {
defaultProperties: WidgetFactory.getWidgetDefaultPropertiesMap(type),
derivedProperties: WidgetFactory.getWidgetDerivedPropertiesMap(type),
metaProperties: WidgetFactory.getWidgetMetaPropertiesMap(type),
};
});
return typeConfigMap;
}
static getLoadingProperties(type: WidgetType): Array<RegExp> | undefined {
return this.loadingProperties.get(type);
}
}
export type WidgetTypeConfigMap = Record<
string,
{
defaultProperties: Record<string, string>;
metaProperties: Record<string, any>;
List Widget Phase 2 (#4189) * update meta properties + default properties map * update widget registery * update get meta property * update metahoc + widgetfactory + data tree evaluator * try sending function as string to worker * revert data tree evaluator update * pass default props map from dataTreeWidget file * wip * save child meta properties * remove console.log * save meta and default map in list * update listwidget * remove console.log + unused variables * revert getMetaPropertiesMap function * fix data tree test * fix list widget test * fix entity definition test * fix overriting of item in updatedItems * remove todo comments * fix meta prop issue * revert making meta properties from undefiend to "" & fix filepicker bug * fix test case * change items to listData and updatedItems to items * remove console.log * fix test * extract derived properties to dervied.js * disabled top, left, right resize handler list widget container * add test for dervied js * add test for selectedItem * fix background color bug on hover * remove console.log * fix chart widget inside list widget * fix checkbox issue + points raised by yogesh * revert the createImmerReducer usage * fix parse derived properties * remove internal props object that fails the test * fix import typo * allow bottom resize handler * fix template height check * fix template height check * update template size check * fix the is visible invalid prop issue * fix migration of list widget phase 2 * fix migration * remove unused import * fix migration * fix migration * remove console.log * hide delete option for container in entity explorer * fix testcases * remove unused import * fix switch widget meta prop Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain> Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
2021-06-18 07:42:57 +00:00
derivedProperties: WidgetDerivedPropertyType;
}
>;
2019-08-29 11:22:09 +00:00
export interface WidgetCreationException {
2019-09-09 09:08:54 +00:00
message: string;
}
2019-09-09 09:08:54 +00:00
export default WidgetFactory;