-
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.
refactor: make fields and objects tabs declarative
- Loading branch information
1 parent
e3f5ce4
commit 1bab0b3
Showing
7 changed files
with
114 additions
and
153 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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Definition } from '../../metadata/file/classes/Definition.js'; | ||
|
||
interface TableColumn { | ||
readonly label: string; | ||
readonly field: string; | ||
} | ||
|
||
export interface Table { | ||
readonly name: string; | ||
readonly list: string; | ||
readonly definition: Definition; | ||
readonly columns: TableColumn[]; | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './Table.js'; |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import * as Table from './tables/index.js'; | ||
|
||
export const ALL_TABLES = [Table.OBJECTS, Table.FIELDS]; |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Table } from '../classes/Table.js'; | ||
import { CUSTOM_FIELD } from '../../metadata/file/index.js'; | ||
|
||
export const FIELDS: Table = { | ||
name: 'Fields', | ||
list: 'fields', | ||
definition: CUSTOM_FIELD, | ||
columns: [ | ||
{ label: 'Object', field: 'objectName' }, | ||
{ label: 'Name', field: 'name' }, | ||
{ label: 'Full Name', field: 'fullName' }, | ||
{ label: 'Label', field: 'label' }, | ||
{ label: 'Type', field: 'type' }, | ||
{ label: 'Required', field: 'required' }, | ||
{ label: 'Unique', field: 'unique' }, | ||
{ label: 'External ID', field: 'externalId' }, | ||
{ label: 'AI Prediction Field', field: 'isAIPredictionField' }, | ||
{ label: 'Case Sensitive', field: 'caseSensitive' }, | ||
{ label: 'Encryption Scheme (Shield)', field: 'encryptionScheme' }, | ||
{ label: 'Masking Type (Classic)', field: 'maskType' }, | ||
{ label: 'Masking Character (Classic)', field: 'maskChar' }, | ||
{ label: 'Description', field: 'description' }, | ||
{ label: 'Help Text', field: 'inlineHelpText' }, | ||
{ label: 'Default Value', field: 'defaultValue' }, | ||
{ label: 'Length', field: 'length' }, | ||
{ label: 'Visible Lines', field: 'visibleLines' }, | ||
{ label: 'Precision', field: 'precision' }, | ||
{ label: 'Scale', field: 'scale' }, | ||
{ label: 'Value Set', field: 'valueSet' }, | ||
{ label: 'Formula', field: 'formula' }, | ||
{ label: 'Treat Formula Blanks As', field: 'formulaTreatBlanksAs' }, | ||
{ label: 'Reference To', field: 'referenceTo' }, | ||
{ label: 'Relationship Name', field: 'relationshipName' }, | ||
{ label: 'Relationship Label', field: 'relationshipLabel' }, | ||
{ label: 'Relationship Order', field: 'relationshipOrder' }, | ||
{ label: 'Lookup Filter', field: 'lookupFilter' }, | ||
{ label: 'Delete Constraint', field: 'deleteConstraint' }, | ||
{ label: 'Reparentable Master Detail', field: 'reparentableMasterDetail' }, | ||
{ label: 'Write Requires Master Read', field: 'writeRequiresMasterRead' }, | ||
{ label: 'Summary Operation', field: 'summaryOperation' }, | ||
{ label: 'Summarized Field', field: 'summarizedField' }, | ||
{ label: 'Summary Filter Items', field: 'summaryFilterItems' }, | ||
{ label: 'Track Feed History', field: 'trackFeedHistory' }, | ||
{ label: 'Track History', field: 'trackHistory' }, | ||
{ label: 'Track Trending', field: 'trackTrending' }, | ||
{ label: 'Security Classification', field: 'securityClassification' }, | ||
{ label: 'Compliance Group', field: 'complianceGroup' }, | ||
{ label: 'Business Owner Group', field: 'businessOwnerGroup' }, | ||
{ label: 'Business Owner User', field: 'businessOwnerUser' }, | ||
{ label: 'Business Status', field: 'businessStatus' }, | ||
], | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Table } from '../classes/Table.js'; | ||
import { CUSTOM_OBJECT } from '../../metadata/file/index.js'; | ||
|
||
export const OBJECTS: Table = { | ||
name: 'Objects', | ||
list: 'objects', | ||
definition: CUSTOM_OBJECT, | ||
columns: [ | ||
{ label: 'Name', field: 'name' }, | ||
{ label: 'Label', field: 'label' }, | ||
{ label: 'Label (Plural)', field: 'pluralLabel' }, | ||
{ label: 'Gender', field: 'gender' }, | ||
{ label: 'Starts with', field: 'startsWith' }, | ||
{ label: 'Description', field: 'description' }, | ||
{ label: 'Default Internal Access', field: 'sharingModel' }, | ||
{ label: 'Default External Access', field: 'externalSharingModel' }, | ||
{ label: 'Deployment Status', field: 'deploymentStatus' }, | ||
{ label: 'Activities Enabled', field: 'enableActivities' }, | ||
{ label: 'Chatter Enabled', field: 'allowInChatterGroups' }, | ||
{ label: 'Feeds Enabled', field: 'enableFeeds' }, | ||
{ label: 'History Tracking Enabled', field: 'enableHistory' }, | ||
{ label: 'Reports Enabled', field: 'enableReports' }, | ||
{ label: 'Search Enabled', field: 'enableSearch' }, | ||
{ label: 'Platform Event Type', field: 'eventType' }, | ||
{ label: 'Platform Event Publish Behavior', field: 'publishBehavior' }, | ||
{ label: 'Permission Set License Required', field: 'enableLicensing' }, | ||
], | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './Objects.js'; | ||
export * from './Fields.js'; |