procode-lowcode-core 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +26 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +26 -12
- package/dist/index.js.map +1 -1
- package/dist/types/UIElement/UIElementDefinations/BaseScreenElement.d.ts +7 -0
- package/package.json +1 -1
- package/src/Renderer/CellRenderer/index.tsx +1 -0
- package/src/Renderer/ContainerRenderer/Container.tsx +1 -0
- package/src/Renderer/DrawerRenderer/Drawer.tsx +1 -0
- package/src/Renderer/DrawerRenderer/index.tsx +1 -0
- package/src/Renderer/FormRenderer/index.tsx +1 -0
- package/src/Renderer/LayoutRenderer/ColumnLayoutRenderer/index.tsx +1 -0
- package/src/Renderer/LayoutRenderer/GenericLayoutRenderer/index.tsx +1 -0
- package/src/Renderer/WidgetRenderer/Widget.tsx +17 -4
- package/src/Renderer/WidgetRenderer/useWidgetProps.ts +0 -1
- package/src/UIElement/UIElementDefinations/BaseScreenElement.ts +8 -0
|
@@ -17,10 +17,17 @@ type ValidationProps = {
|
|
|
17
17
|
screenDataField: string;
|
|
18
18
|
executeMode: ExecuteMode;
|
|
19
19
|
};
|
|
20
|
+
export type EffectiveStyle = {
|
|
21
|
+
selector: string;
|
|
22
|
+
target: string;
|
|
23
|
+
important?: boolean;
|
|
24
|
+
};
|
|
20
25
|
export type Style = {
|
|
21
26
|
id?: string;
|
|
22
27
|
className?: string;
|
|
23
28
|
inline?: React.CSSProperties;
|
|
29
|
+
important?: boolean;
|
|
30
|
+
effectiveStyles?: EffectiveStyle[];
|
|
24
31
|
};
|
|
25
32
|
export interface BaseScreenElement {
|
|
26
33
|
id: number | string;
|
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ export default function Container({
|
|
|
16
16
|
<div
|
|
17
17
|
id={widgetStyle?.id ?? ""}
|
|
18
18
|
className={`${widgetStyle?.className ?? ""}`}
|
|
19
|
+
data-prc-col-important={widgetStyle?.important ? widgetStyle?.className || undefined : undefined}
|
|
19
20
|
style={{ ...(widgetStyle?.inline ?? {}) }}
|
|
20
21
|
>
|
|
21
22
|
{children.map((element) => (
|
|
@@ -19,6 +19,7 @@ const Drawer = ({
|
|
|
19
19
|
<div
|
|
20
20
|
id={widgetStyle?.id ?? ""}
|
|
21
21
|
className={`prc-drawer ${widgetStyle?.className ?? ""}`}
|
|
22
|
+
data-prc-col-important={widgetStyle?.important ? widgetStyle?.className || undefined : undefined}
|
|
22
23
|
style={{ ...(widgetStyle?.inline ?? {}) }}
|
|
23
24
|
>
|
|
24
25
|
{children?.map((element: ScreenElement) => (
|
|
@@ -7,6 +7,7 @@ const DrawerRenderer = (props: DrawerElement) => {
|
|
|
7
7
|
id={props.overlay.widgetStyle?.id ?? ""}
|
|
8
8
|
style={{ ...(props.overlay.widgetStyle?.inline ?? {}) }}
|
|
9
9
|
className={`prc-drawer-shield ${props.overlay.widgetStyle?.className ?? ""}`}
|
|
10
|
+
data-prc-col-important={props.overlay.widgetStyle?.important ? props.overlay.widgetStyle?.className || undefined : undefined}
|
|
10
11
|
>
|
|
11
12
|
<Drawer {...props} />
|
|
12
13
|
</div>
|
|
@@ -23,6 +23,7 @@ const FormRenderer = ({
|
|
|
23
23
|
e.preventDefault();
|
|
24
24
|
}}
|
|
25
25
|
className={widgetStyle?.className || ""}
|
|
26
|
+
data-prc-col-important={widgetStyle?.important ? widgetStyle?.className || undefined : undefined}
|
|
26
27
|
id={widgetStyle?.id || ""}
|
|
27
28
|
style={{ ...(widgetStyle?.inline || {}) }}
|
|
28
29
|
>
|
|
@@ -18,6 +18,7 @@ const LayoutRenderer = ({
|
|
|
18
18
|
<div
|
|
19
19
|
id={widgetStyle?.id || ""}
|
|
20
20
|
className={`${widgetStyle?.className || ""}`}
|
|
21
|
+
data-prc-col-important={widgetStyle?.important ? widgetStyle?.className || undefined : undefined}
|
|
21
22
|
style={{
|
|
22
23
|
...(widgetStyle?.inline || {}),
|
|
23
24
|
display: "grid",
|
|
@@ -18,6 +18,7 @@ const GenericLayoutRenderer = ({
|
|
|
18
18
|
<div
|
|
19
19
|
id={widgetStyle?.id || ""}
|
|
20
20
|
className={`${widgetStyle?.className || ""}`}
|
|
21
|
+
data-prc-col-important={widgetStyle?.important ? widgetStyle?.className || undefined : undefined}
|
|
21
22
|
style={{
|
|
22
23
|
...(widgetStyle?.inline || {}),
|
|
23
24
|
display: "grid",
|
|
@@ -39,10 +39,23 @@ const Widget: React.FC<WidgetInjectorProps> = ({
|
|
|
39
39
|
.getCustomWidgetProvider()
|
|
40
40
|
?.getWidgets();
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
let WidgetComponent: React.FC<any> | undefined;
|
|
43
|
+
|
|
44
|
+
const targetFactory = widgetProps.targetWidgetFactory;
|
|
45
|
+
if (targetFactory === "CUSTOM") {
|
|
46
|
+
WidgetComponent = customWidgets?.get?.(widgetProps.widgetType);
|
|
47
|
+
} else if (targetFactory === "TEMPLATE") {
|
|
48
|
+
WidgetComponent = templateWidgets?.get?.(widgetProps.widgetType);
|
|
49
|
+
} else if (targetFactory === "DEFAULT") {
|
|
50
|
+
WidgetComponent = standardWidgets?.get?.(widgetProps.widgetType);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!WidgetComponent) {
|
|
54
|
+
WidgetComponent =
|
|
55
|
+
customWidgets?.get?.(widgetProps.widgetType) ??
|
|
56
|
+
templateWidgets?.get?.(widgetProps.widgetType) ??
|
|
57
|
+
standardWidgets?.get?.(widgetProps.widgetType);
|
|
58
|
+
}
|
|
46
59
|
|
|
47
60
|
if (!WidgetComponent) {
|
|
48
61
|
return (
|
|
@@ -17,10 +17,18 @@ type ValidationProps = {
|
|
|
17
17
|
executeMode: ExecuteMode;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
export type EffectiveStyle = {
|
|
21
|
+
selector: string;
|
|
22
|
+
target: string;
|
|
23
|
+
important?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
20
26
|
export type Style = {
|
|
21
27
|
id?: string;
|
|
22
28
|
className?: string;
|
|
23
29
|
inline?: React.CSSProperties;
|
|
30
|
+
important?: boolean;
|
|
31
|
+
effectiveStyles?: EffectiveStyle[];
|
|
24
32
|
};
|
|
25
33
|
|
|
26
34
|
export interface BaseScreenElement {
|