forked from bcgov/common-hosted-form-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from RyanBirtch-aot/map-layer
Display Settings Updated for Map Layer
- Loading branch information
Showing
2 changed files
with
110 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 93 additions & 28 deletions
121
components/src/components/Map/editForm/Component.edit.display.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,93 @@ | ||
import common from '../../Common/Simple.edit.display'; | ||
export default [ | ||
...common, | ||
{ | ||
key: 'refreshOnChange', | ||
ignore: true, | ||
}, | ||
{ | ||
key: 'className', | ||
ignore: true, | ||
}, | ||
{ | ||
key: 'prefix', | ||
ignore: true, | ||
}, | ||
{ | ||
key: 'suffix', | ||
ignore: true, | ||
}, | ||
{ | ||
key: 'labelPosition', | ||
ignore: true, | ||
}, | ||
{ | ||
key: 'placeholder', | ||
ignore: true, | ||
}, | ||
]; | ||
export default { | ||
key: 'customDisplay', | ||
label: 'Display', | ||
weight: 10, | ||
components: [ | ||
{ | ||
key: 'label', | ||
label: 'Label', | ||
type: 'textfield', | ||
input: true, | ||
tooltip: 'The label for this field.', | ||
}, | ||
{ | ||
key: 'hideLabel', | ||
label: 'Hide Label', | ||
type: 'checkbox', | ||
tooltip: | ||
'Check to hide the label for this component. This allows you to show the label in the form Builder, but not when it is rendered', | ||
input: true, | ||
}, | ||
{ | ||
key: 'labelPosition', | ||
label: 'Label Position', | ||
type: 'select', | ||
input: true, | ||
data: { | ||
values: [ | ||
{ value: 'top', label: 'Top' }, | ||
{ value: 'left-left', label: 'Left (Left-aligned)' }, | ||
{ value: 'left-right', label: 'Left (Right-aligned)' }, | ||
{ value: 'right-left', label: 'Right (Left-aligned)' }, | ||
{ value: 'right-right', label: 'Right (Right-aligned)' }, | ||
{ value: 'bottom', label: 'Bottom' }, | ||
], | ||
}, | ||
tooltip: 'Position of the label relative to the field.', | ||
}, | ||
{ | ||
key: 'description', | ||
label: 'Text Description (optional)', | ||
type: 'textarea', | ||
input: true, | ||
placeholder: 'This will appear below the map', | ||
tooltip: 'Enter a description for the map component here', | ||
}, | ||
{ | ||
key: 'tooltip', | ||
label: 'Tooltip', | ||
type: 'textarea', | ||
input: true, | ||
tooltip: 'Add a tooltip to provide additional information.', | ||
placeholder: 'Add a tooltip beside the label', | ||
}, | ||
{ | ||
key: 'customClass', | ||
label: 'Custom CSS Class', | ||
type: 'textfield', | ||
input: true, | ||
tooltip: | ||
'Assign one or more CSS class names to customize the appearance of this component.', | ||
}, | ||
|
||
// { | ||
// // You can ignore existing fields. | ||
// key: 'placeholder', | ||
// ignore: true, | ||
// }, | ||
// { | ||
// key: 'tableView', | ||
// ignore: true, | ||
// }, | ||
// { | ||
// key: 'hidden', | ||
// ignore: true, | ||
// }, | ||
// { | ||
// key: 'autofocus', | ||
// ignore: true, | ||
// }, | ||
// { | ||
// key: 'tabindex', | ||
// ignore: true, | ||
// }, | ||
// { | ||
// key: 'modalEdit', | ||
// ignore: true, | ||
// }, | ||
// { | ||
// key: 'disabled', | ||
// ignore: true, | ||
// }, | ||
], | ||
}; |