Skip to content

Commit

Permalink
remove hasHeader from every setting
Browse files Browse the repository at this point in the history
  • Loading branch information
nthangeniphumudzo committed Nov 26, 2024
1 parent d627c01 commit cf772eb
Show file tree
Hide file tree
Showing 26 changed files with 67 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const SettingsCollapsiblePanel: FC<ISettingsCollapsiblePanelProps> = (props) =>
return (
<SettingsCollapsiblePanelActionsContext.Provider value={settingsCollapsiblePanelActions}>
{show
? <CollapsiblePanel ghost={true} expandIconPosition='start' {...props} />
? <CollapsiblePanel ghost={true} expandIconPosition='start' {...props} hasHeaderBorder={false} />
: null}
</SettingsCollapsiblePanelActionsContext.Provider>
);
Expand Down
10 changes: 5 additions & 5 deletions shesha-reactjs/src/designer-components/address/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const AddressSettings: FC<ISettingsFormFactoryArgs<IAddressCompomentProps>> = ({

return (
<>
<SettingsCollapsiblePanel hasHeaderBorder={false} header="Display">
<SettingsCollapsiblePanel header="Display">
<ContextPropertyAutocomplete
id="415cc8ec-2fd1-4c5a-88e2-965153e16069"
readOnly={readOnly}
Expand Down Expand Up @@ -77,7 +77,7 @@ const AddressSettings: FC<ISettingsFormFactoryArgs<IAddressCompomentProps>> = ({
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Configuration">
<SettingsCollapsiblePanel header="Configuration">
<SettingsFormItem
name="minCharactersSearch"
label="Min Characters Before Search"
Expand Down Expand Up @@ -180,7 +180,7 @@ const AddressSettings: FC<ISettingsFormFactoryArgs<IAddressCompomentProps>> = ({
</Show>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Events">
<SettingsCollapsiblePanel header="Events">
<SettingsFormItem
label="On Change"
name="onChangeCustom"
Expand Down Expand Up @@ -221,13 +221,13 @@ const AddressSettings: FC<ISettingsFormFactoryArgs<IAddressCompomentProps>> = ({
/>
</SettingsFormItem>
</SettingsCollapsiblePanel>
<SettingsCollapsiblePanel hasHeaderBorder={false} header="Validation">
<SettingsCollapsiblePanel header="Validation">
<SettingsFormItem name="validate.required" label="Required" valuePropName="checked" jsSetting>
<Checkbox disabled={readOnly} />
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Security">
<SettingsCollapsiblePanel header="Security">
<SettingsFormItem
jsSetting
label="Permissions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ButtonGroupSettings: FC<ISettingsFormFactoryArgs<IButtonGroupComponentProp

return (
<>
<SettingsCollapsiblePanel hasHeaderBorder={false} header='UX'>
<SettingsCollapsiblePanel header='UX'>
<SettingsFormItem name="componentName" label="Component name" required={true}>
<Input readOnly={readOnly} />
</SettingsFormItem>
Expand Down Expand Up @@ -50,13 +50,13 @@ const ButtonGroupSettings: FC<ISettingsFormFactoryArgs<IButtonGroupComponentProp
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header='Customization'>
<SettingsCollapsiblePanel header='Customization'>
<SettingsFormItem name="items">
<ButtonGroupConfigurator readOnly={readOnly} />
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Security">
<SettingsCollapsiblePanel header="Security">
<SettingsFormItem
jsSetting
label="Permissions"
Expand Down
6 changes: 1 addition & 5 deletions shesha-reactjs/src/designer-components/charts/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const settingsForm = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: nanoid(),
components:
Expand Down Expand Up @@ -115,7 +114,6 @@ export const settingsForm = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: nanoid(),
components:
Expand Down Expand Up @@ -305,7 +303,6 @@ export const settingsForm = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
hidden: {
_code: "return getSettingValue(data?.dataMode) !== `url`",
_mode: "code",
Expand Down Expand Up @@ -368,7 +365,6 @@ export const settingsForm = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
hidden: {
_code: "return getSettingValue(data?.dataMode) === `url`",
_mode: "code",
Expand Down Expand Up @@ -419,7 +415,7 @@ export const settingsForm = new DesignerToolbarSettings()
parentId: 'root',
defaultValue: false,
validate: { required: true },

})
.addDropdown({
id: nanoid(),
Expand Down
6 changes: 3 additions & 3 deletions shesha-reactjs/src/designer-components/chevron/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ChevronSettings: FC<ISettingsFormFactoryArgs<IChevronProps>> = () => {

return (
<>
<SettingsCollapsiblePanel hasHeaderBorder={false} header='Display'>
<SettingsCollapsiblePanel header='Display'>
<ContextPropertyAutocomplete id="fb71cb51-884f-4f34-aa77-820c12276c95"
readOnly={values.readOnly}
defaultModelType={designerModelType ?? formSettings.modelType}
Expand Down Expand Up @@ -54,7 +54,7 @@ const ChevronSettings: FC<ISettingsFormFactoryArgs<IChevronProps>> = () => {
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header='Items'>
<SettingsCollapsiblePanel header='Items'>
<SettingsFormItem name="referenceList" label="Reference List" style={{ width: '100%' }} tooltip='Make sure to reselect the reference list if any changes are made to its items'>
<Autocomplete
dataSourceType="entitiesList"
Expand All @@ -68,7 +68,7 @@ const ChevronSettings: FC<ISettingsFormFactoryArgs<IChevronProps>> = () => {
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header='Styles'>
<SettingsCollapsiblePanel header='Styles'>
<SettingsFormItem name="colorSource" label="Color Source" jsSetting tooltip='Hex and RGB colors are supported'>
<Select disabled={values.readOnly}>
<Option value="primary">Primary Color</Option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ChildEntitiesTagGroupSettings: FC<ISettingsFormFactoryArgs<IChildEntitiesT

return (
<>
<SettingsCollapsiblePanel hasHeaderBorder={false} header='Display' >
<SettingsCollapsiblePanel header='Display' >
<ContextPropertyAutocomplete id="415cc8ec-2fd1-4c5a-88e2-965153e16069"
readOnly={readOnly}
defaultModelType={designerModelType ?? formSettings.modelType}
Expand Down Expand Up @@ -58,7 +58,7 @@ const ChildEntitiesTagGroupSettings: FC<ISettingsFormFactoryArgs<IChildEntitiesT
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header='Modal Display'>
<SettingsCollapsiblePanel header='Modal Display'>
<SettingsFormItem name="deleteConfirmationTitle" label="Delete Confirmation Title" jsSetting>
<Input readOnly={readOnly} />
</SettingsFormItem>
Expand All @@ -81,7 +81,7 @@ const ChildEntitiesTagGroupSettings: FC<ISettingsFormFactoryArgs<IChildEntitiesT
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header='Render'>
<SettingsCollapsiblePanel header='Render'>
{/*<SettingsFormItem name="capturedProperties" label="Captured Properties" jsSetting>
<Select mode="tags" />
</SettingsFormItem>*/}
Expand Down Expand Up @@ -119,7 +119,7 @@ const ChildEntitiesTagGroupSettings: FC<ISettingsFormFactoryArgs<IChildEntitiesT
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Security">
<SettingsCollapsiblePanel header="Security">
<SettingsFormItem
jsSetting
label="Permissions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const CollapsiblePanelComponent: IToolboxComponent<ICollapsiblePanelComponentPro
isSimpleDesign,
hideCollapseContent,
hideWhenEmpty,
hasHeaderBorder = true
} = model;

const panelContextState = useContext(PanelContext);
Expand Down Expand Up @@ -97,6 +98,7 @@ const CollapsiblePanelComponent: IToolboxComponent<ICollapsiblePanelComponentPro
headerColor={headerColor}
isSimpleDesign={isSimpleDesign}
parentPanel={panelPosition === 'parent'}
hasHeaderBorder={hasHeaderBorder}
hideCollapseContent={hideCollapseContent}
hideWhenEmpty={hideWhenEmpty}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const iconPickerFormSettings = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: 'pnl54bf6-f76d-4139-a850-c99bf06c8b69',
components: [...new DesignerToolbarSettings()
Expand Down Expand Up @@ -103,7 +102,6 @@ export const iconPickerFormSettings = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: 'pnl24bf6-f76d-4139-a850-c99bf06c8b71',
components: [...new DesignerToolbarSettings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ColumnsSettings: FC<ISettingsFormFactoryArgs<IColumnsComponentProps>> = (p
<StyleBox />
</SettingsFormItem>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Security">
<SettingsCollapsiblePanel header="Security">
<SettingsFormItem
jsSetting
label="Permissions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DataContextSettings: FC<ISettingsFormFactoryArgs<IDataContextComponentProp

return (
<>
<SettingsCollapsiblePanel hasHeaderBorder={false} header="Data context">
<SettingsCollapsiblePanel header="Data context">
<SettingsFormItem
name='componentName'
label="Component name"
Expand Down Expand Up @@ -150,7 +150,7 @@ const DataContextSettings: FC<ISettingsFormFactoryArgs<IDataContextComponentProp

</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Security">
<SettingsCollapsiblePanel header="Security">
<SettingsFormItem
jsSetting
label="Permissions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const DataListSettings: FC<ISettingsFormFactoryArgs<IDataListComponentProps>> =
</Select>
</SettingsFormItem>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Render">
<SettingsCollapsiblePanel header="Render">
<SettingsFormItem name="formSelectionMode" label="Form selection mode">
<Select disabled={readOnly} defaultValue={'none'}>
<Select.Option key='name' value='name'>Named form</Select.Option>
Expand Down Expand Up @@ -355,7 +355,7 @@ const DataListSettings: FC<ISettingsFormFactoryArgs<IDataListComponentProps>> =
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="CRUD">
<SettingsCollapsiblePanel header="CRUD">
<SettingsFormItem name="canEditInline" label="Can edit inline" jsSetting>
<Select disabled={readOnly} options={yesNoInheritOptions} />
</SettingsFormItem>
Expand Down Expand Up @@ -487,7 +487,7 @@ const DataListSettings: FC<ISettingsFormFactoryArgs<IDataListComponentProps>> =
</SettingsCollapsiblePanel>

<Show when={model.orientation === "vertical" || model.orientation === "horizontal"}>
<SettingsCollapsiblePanel hasHeaderBorder={false} header="Grouping">
<SettingsCollapsiblePanel header="Grouping">
<SettingsFormItem name="collapsible" label="Collapsible" valuePropName='checked' jsSetting>
<Checkbox disabled={readOnly} />
</SettingsFormItem>
Expand Down Expand Up @@ -515,7 +515,7 @@ const DataListSettings: FC<ISettingsFormFactoryArgs<IDataListComponentProps>> =
</SettingsCollapsiblePanel>
</Show>

<SettingsCollapsiblePanel hasHeaderBorder={false} header='Empty List'>
<SettingsCollapsiblePanel header='Empty List'>
<SettingsFormItem name="noDataText" label="Primary Text" jsSetting>
<Input defaultValue={"No Data"} readOnly={readOnly} />
</SettingsFormItem>
Expand All @@ -531,7 +531,7 @@ const DataListSettings: FC<ISettingsFormFactoryArgs<IDataListComponentProps>> =
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Security">
<SettingsCollapsiblePanel header="Security">
<SettingsFormItem
jsSetting
label="Permissions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const DataSourceSettings: FC<ISettingsFormFactoryArgs<IDataSourceComponentProps>
<EndpointsAutocomplete />
</SettingsFormItem>
}
<SettingsCollapsiblePanel hasHeaderBorder={false} header='Filters'>
<SettingsCollapsiblePanel header='Filters'>
<SettingsFormItem name="maxResultCount" label='Max result count' tooltip='Leave empty to get all records' jsSetting>
<InputNumber min={0} />
</SettingsFormItem>
Expand All @@ -53,7 +53,7 @@ const DataSourceSettings: FC<ISettingsFormFactoryArgs<IDataSourceComponentProps>
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Security">
<SettingsCollapsiblePanel header="Security">
<SettingsFormItem
jsSetting
label="Permissions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const TableSettings: FC<ISettingsFormFactoryArgs<ITableComponentProps>> = (props
</SettingsFormItem>


<SettingsCollapsiblePanel hasHeaderBorder={false} header='CRUD'>
<SettingsCollapsiblePanel header='CRUD'>
<SettingsFormItem
name="canEditInline"
label="Can edit inline"
Expand Down Expand Up @@ -349,7 +349,7 @@ const TableSettings: FC<ISettingsFormFactoryArgs<ITableComponentProps>> = (props
</SettingsFormItem>

</SettingsCollapsiblePanel>
<SettingsCollapsiblePanel hasHeaderBorder={false} header="Layout">
<SettingsCollapsiblePanel header="Layout">
<SettingsFormItem jsSetting
name="minHeight" label="Min Height" tooltip="The minimum height of the table (e.g. even when 0 rows). If blank then minimum height is 0.">
<InputNumber />
Expand Down Expand Up @@ -393,7 +393,7 @@ const TableSettings: FC<ISettingsFormFactoryArgs<ITableComponentProps>> = (props
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header='Empty Table'>
<SettingsCollapsiblePanel header='Empty Table'>
<SettingsFormItem name="noDataText" label="Primary Text" jsSetting>
<Input defaultValue={"No Data"} readOnly={readOnly} />
</SettingsFormItem>
Expand All @@ -409,7 +409,7 @@ const TableSettings: FC<ISettingsFormFactoryArgs<ITableComponentProps>> = (props
</SettingsFormItem>
</SettingsCollapsiblePanel>

<SettingsCollapsiblePanel hasHeaderBorder={false} header="Security">
<SettingsCollapsiblePanel header="Security">
<SettingsFormItem
jsSetting
label="Permissions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const entityPickerSettings = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: 'pnl54bf6-f76d-4139-a850-c99bf06c8b69',
components: [...new DesignerToolbarSettings()
Expand Down Expand Up @@ -234,7 +233,6 @@ export const entityPickerSettings = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: 'pnl24bf6-f76d-4139-a850-c99bf06c8b69',
components: [...new DesignerToolbarSettings()
Expand Down Expand Up @@ -402,7 +400,6 @@ export const entityPickerSettings = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: 'pnl34bf6-f76d-4139-a850-c99bf06c8b69',
components: [...new DesignerToolbarSettings()
Expand All @@ -424,7 +421,6 @@ export const entityPickerSettings = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: 'pnl44bf6-f76d-4139-a850-c99bf06c8b69',
components: [...new DesignerToolbarSettings()
Expand Down Expand Up @@ -483,7 +479,6 @@ export const entityPickerSettings = new DesignerToolbarSettings()
ghost: true,
version: 4,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: '44bf6-f76d-4139-a853-c99bf06c8b69',
components: [...new DesignerToolbarSettings()
Expand Down Expand Up @@ -527,7 +522,6 @@ export const entityPickerSettings = new DesignerToolbarSettings()
expandIconPosition: "start",
ghost: true,
collapsible: 'header',
hasHeaderBorder: false,
content: {
id: 'pnl24bf6-f76d-4139-a850-c99bf06c8b71',
components: [...new DesignerToolbarSettings()
Expand Down
Loading

0 comments on commit cf772eb

Please sign in to comment.