Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Introducing Layout Mode#529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
FalkWolsky merged 5 commits intodevfromfeat/Layout-Mode
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -142,5 +142,6 @@ export const sectionNames = {
validation: trans("prop.validation"),
layout: trans("prop.layout"),
style: trans("prop.style"),
data: trans("prop.data"),
meetings : trans("prop.meetings"), // added by Falk Wolsky
};
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,6 +24,7 @@ export const en = {
layout: "Layout",
style: "Style",
meetings : "Meeting Settings",
data: "Data",
},
passwordInput: {
label: "Password:",
Expand Down
20 changes: 20 additions & 0 deletionsclient/packages/lowcoder-design/src/icons/icon-ShowLayout.svg
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletionsclient/packages/lowcoder-design/src/icons/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,6 +64,7 @@ export { ReactComponent as WarningWhiteIcon } from "./icon-warning-white.svg";
export { ReactComponent as WarningIcon } from "./icon-warning.svg";
export { ReactComponent as WidthDragIcon } from "./icon-widthDrag.svg";
export { ReactComponent as ManyCheckboxIcon } from "./manyCheckbox.svg";
export { ReactComponent as Layout } from "./icon-ShowLayout.svg";
export { ReactComponent as Left } from "./icon-ShowLeft.svg";
export { ReactComponent as Middle } from "./icon-ShowMiddle.svg";
export { ReactComponent as Right } from "./icon-ShowRight.svg";
Expand Down
13 changes: 4 additions & 9 deletionsclient/packages/lowcoder/index.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,16 +2,11 @@
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no viewport-fit=cover"
/>
<meta
lang="en"
name="description"
content="A developer-friendly open-source low code platform to build internal apps within minutes."
/>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no viewport-fit=cover"/>
<meta lang="en" name="description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
<meta name="theme-color" content="#000000" />
<meta property="iframely:title" content="Lowcoder" />
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
<style>
html,
body {
Expand Down
1 change: 0 additions & 1 deletionclient/packages/lowcoder/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -104,7 +104,6 @@
"ua-parser-js": "^1.0.33",
"uuid": "^9.0.0",
"web-vitals": "^2.1.0",
"weixin-js-sdk": "^1.6.0",
"xlsx": "^0.18.5"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletionclient/packages/lowcoder/src/app-env.d.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,4 +42,4 @@ declare var REACT_APP_BUNDLE_TYPE: "sdk" | "app";
declare var REACT_APP_DISABLE_JS_SANDBOX: string;
declare var REACT_APP_BUNDLE_BUILTIN_PLUGIN: string;

declare module "weixin-js-sdk";
//declare module "weixin-js-sdk";
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,6 +24,8 @@ import {
} from "./buttonCompConstants";
import { RefControl } from "comps/controls/refControl";

import React, { useContext } from "react";

const FormLabel = styled(CommonBlueLabel)`
font-size: 13px;
margin-right: 4px;
Expand DownExpand Up@@ -161,24 +163,30 @@ const ButtonTmpComp = (function () {
{children.text.propertyView({ label: trans("text") })}
</Section>

<Section name={sectionNames.interaction}>
{children.type.propertyView({ label: trans("prop.type"), radioButton: true })}
{isDefault(children.type.getView())
? [
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
<><Section name={sectionNames.interaction}>
{children.type.propertyView({ label: trans("prop.type"), radioButton: true })}
{isDefault(children.type.getView())
? [
children.onEvent.getPropertyView(),
disabledPropertyView(children),
hiddenPropertyView(children),
loadingPropertyView(children),
]
: children.form.getPropertyView()}
</Section>

<Section name={sectionNames.layout}>
{children.prefixIcon.propertyView({ label: trans("button.prefixIcon") })}
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
{hiddenPropertyView(children)}
</Section>
: children.form.getPropertyView()}
</Section>
</>
)}

<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
<>
<Section name={sectionNames.layout}>
{children.prefixIcon.propertyView({ label: trans("button.prefixIcon") })}
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
</Section>
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
</>
)}
</>
))
.setExposeMethodConfigs(buttonRefMethods)
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,8 @@ import { UICompBuilder } from "comps/generators/uiCompBuilder";
import { disabledPropertyView, hiddenPropertyView } from "comps/utils/propertyUtils";
import { Section, sectionNames } from "lowcoder-design";
import { trans } from "i18n";
import React, { ReactElement } from "react";
import React, { ReactElement, useContext } from "react";
import { EditorContext } from "comps/editorState";
import styled from "styled-components";
import { ButtonEventHandlerControl } from "../../controls/eventHandlerControl";
import { DropdownOptionControl } from "../../controls/optionsControl";
Expand All@@ -19,16 +20,16 @@ import {
getButtonStyle,
} from "./buttonCompConstants";


const DropdownButton = styled(Dropdown.Button)`
width: 100%;

.ant-btn-group {
width: 100%;
}
`;

const LeftButtonWrapper = styled.div<{ $buttonStyle: ButtonStyleType }>`
width: calc(100% - 32px);
width: calc(100%);
${(props) => `margin: ${props.$buttonStyle.margin};`}
margin-right: 0;
.ant-btn {
Expand DownExpand Up@@ -66,7 +67,7 @@ const DropdownTmpComp = (function () {
options: DropdownOptionControl,
disabled: BoolCodeControl,
onEvent: ButtonEventHandlerControl,
style:withDefault(ButtonStyleControl, { background: "#FFFFFF" }),
style: ButtonStyleControl,
};
return new UICompBuilder(childrenMap, (props) => {
const hasIcon =
Expand All@@ -92,7 +93,6 @@ const DropdownTmpComp = (function () {

return (
<ButtonCompWrapper disabled={props.disabled}>
{console.log("props,", props)}
{props.onlyMenu ? (
<Dropdown
disabled={props.disabled}
Expand DownExpand Up@@ -131,18 +131,26 @@ const DropdownTmpComp = (function () {
<>
<Section name={sectionNames.basic}>
{children.options.propertyView({})}
{children.text.propertyView({ label: trans("text") })}
{children.onlyMenu.propertyView({ label: trans("dropdown.onlyMenu") })}
</Section>

<Section name={sectionNames.interaction}>
{disabledPropertyView(children)}
{!children.onlyMenu.getView() && children.onEvent.getPropertyView()}
</Section>

<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
<><Section name={sectionNames.interaction}>
{!children.onlyMenu.getView() && children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
{hiddenPropertyView(children)}
</Section>
</>
)}

<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
<>
<Section name={sectionNames.layout}>
{children.text.propertyView({ label: trans("label") })}
{children.onlyMenu.propertyView({ label: trans("dropdown.onlyMenu") })}
</Section>
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
</>
)}
</>
))
.build();
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,8 +20,11 @@ import { IconControl } from "comps/controls/iconControl";
import { hasIcon } from "comps/utils";
import { RefControl } from "comps/controls/refControl";

import { EditorContext } from "comps/editorState";
import React, { useContext } from "react";

const Link = styled(Button)<{ $style: LinkStyleType }>`
${(props) => `color: ${props.$style.text};margin: ${props.$style.margin}; padding: ${props.$style.padding};`}
${(props) => `color: ${props.$style.text};margin: ${props.$style.margin}; padding: ${props.$style.padding};`}
&.ant-btn {
display: inline-flex;
align-items: center;
Expand DownExpand Up@@ -93,19 +96,22 @@ const LinkTmpComp = (function () {
{children.text.propertyView({ label: trans("text") })}
</Section>

<Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
{loadingPropertyView(children)}
</Section>

<Section name={sectionNames.layout}>
{children.prefixIcon.propertyView({ label: trans("button.prefixIcon") })}
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
{hiddenPropertyView(children)}
</Section>
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
<><Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
{hiddenPropertyView(children)}
{loadingPropertyView(children)}
</Section>
<Section name={sectionNames.advanced}>
{children.prefixIcon.propertyView({ label: trans("button.prefixIcon") })}
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
</Section></>
)}

<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
<><Section name={sectionNames.style}>{children.style.getPropertyView()}</Section></>
)}
</>
);
})
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,11 +15,12 @@ import styled from "styled-components";
import { CommonNameConfig, NameConfig, withExposingConfigs } from "../../generators/withExposing";
import { hiddenPropertyView, disabledPropertyView } from "comps/utils/propertyUtils";
import { trans } from "i18n";
import React, { Suspense, useEffect, useRef, useState } from "react";
import React, { Suspense, useEffect, useRef, useState, useContext } from "react";
import { arrayStringExposingStateControl } from "comps/controls/codeStateControl";
import { BoolControl } from "comps/controls/boolControl";
import { ItemType } from "antd/lib/menu/hooks/useItems";
import { RefControl } from "comps/controls/refControl";
import { EditorContext } from "comps/editorState";

const Error = styled.div`
color: #f5222d;
Expand DownExpand Up@@ -212,20 +213,26 @@ const ScannerTmpComp = (function () {
<>
<Section name={sectionNames.basic}>
{children.text.propertyView({ label: trans("text") })}
{children.continuous.propertyView({ label: trans("scanner.continuous") })}
{children.continuous.getView() &&
children.uniqueData.propertyView({ label: trans("scanner.uniqueData") })}
{children.maskClosable.propertyView({ label: trans("scanner.maskClosable") })}
</Section>

<Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
</Section>

<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
<><Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
{hiddenPropertyView(children)}
</Section>
<Section name={sectionNames.advanced}>
{children.continuous.propertyView({ label: trans("scanner.continuous") })}
{children.continuous.getView() &&
children.uniqueData.propertyView({ label: trans("scanner.uniqueData") })}
{children.maskClosable.propertyView({ label: trans("scanner.maskClosable") })}
</Section>
</>
)}

<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
<><Section name={sectionNames.style}>{children.style.getPropertyView()}</Section></>
)}
</>
);
})
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,8 @@ import { ToggleButtonStyle } from "comps/controls/styleControlConstants";
import { styleControl } from "comps/controls/styleControl";
import { BoolControl } from "comps/controls/boolControl";
import { RefControl } from "comps/controls/refControl";
import React, { useContext } from "react";
import { EditorContext } from "comps/editorState";

const IconWrapper = styled.div`
display: flex;
Expand DownExpand Up@@ -90,38 +92,43 @@ const ToggleTmpComp = (function () {
label: trans("prop.defaultValue"),
tooltip: trans("toggleButton.valueDesc"),
})}
{children.showText.propertyView({ label: trans("toggleButton.showText") })}
{children.showText.getView() &&
children.trueText.propertyView({ label: trans("toggleButton.trueLabel") })}
{children.showText.getView() &&
children.falseText.propertyView({ label: trans("toggleButton.falseLabel") })}
</Section>

<Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
{loadingPropertyView(children)}
</Section>
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
<><Section name={sectionNames.interaction}>
{children.onEvent.getPropertyView()}
{disabledPropertyView(children)}
{hiddenPropertyView(children)}
{loadingPropertyView(children)}
</Section>
<Section name={sectionNames.advanced}>
{children.showText.propertyView({ label: trans("toggleButton.showText") })}
{children.showText.getView() &&
children.trueText.propertyView({ label: trans("toggleButton.trueLabel") })}
{children.showText.getView() &&
children.falseText.propertyView({ label: trans("toggleButton.falseLabel") })}
{children.trueIcon.propertyView({ label: trans("toggleButton.trueIconLabel") })}
{children.falseIcon.propertyView({ label: trans("toggleButton.falseIconLabel") })}
{children.showText.getView() &&
children.iconPosition.propertyView({
label: trans("toggleButton.iconPosition"),
radioButton: true,
})}
{children.alignment.propertyView({
label: trans("toggleButton.alignment"),
radioButton: true,
})}
</Section>
</>
)}

<Section name={sectionNames.layout}>
{children.trueIcon.propertyView({ label: trans("toggleButton.trueIconLabel") })}
{children.falseIcon.propertyView({ label: trans("toggleButton.falseIconLabel") })}
{children.showText.getView() &&
children.iconPosition.propertyView({
label: trans("toggleButton.iconPosition"),
radioButton: true,
})}
{children.alignment.propertyView({
label: trans("toggleButton.alignment"),
radioButton: true,
})}
{hiddenPropertyView(children)}
</Section>
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
<><Section name={sectionNames.style}>
{children.showBorder.propertyView({ label: trans("toggleButton.showBorder") })}
{children.style.getPropertyView()}
</Section></>
)}

<Section name={sectionNames.style}>
{children.showBorder.propertyView({ label: trans("toggleButton.showBorder") })}
{children.style.getPropertyView()}
</Section>
</>
))
.setExposeMethodConfigs(buttonRefMethods)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp