### Get MultipleSelect Field Example Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/multipleSelect Example of how to get a MultipleSelect field instance using the Lark Base SDK. ```typescript const multiSelectField = await table.getField(fieldId); ``` -------------------------------- ### getEnv - Get Environment Information Source: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge Retrieves information about the current environment, including the product (Lark or Feishu). ```typescript getEnv(): Promise; type Product = 'lark' | 'feishu'; interface Env { product: Product; } ``` -------------------------------- ### API Guide Link Source: https://lark-base-team.github.io/js-sdk-docs/en/start/finally Provides a direct link to the API documentation for further exploration of the SDK's capabilities. Users can search for specific APIs within the linked section. ```APIDOC API Documentation: Link: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Description: Access comprehensive API references and search for specific functionalities. ``` -------------------------------- ### Url Field Definition and Usage Example Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/url Demonstrates how to get an `IUrlField` object using a field ID and shows the corresponding TypeScript type definition for URL segments and transform values. ```typescript const urlField = await table.getField(fieldId); ``` ```typescript type IOpenUrlSegment = { type: IOpenSegmentType.Url; text: string; link: string; }; export type UrlTransformVal = string | IOpenUrlSegment | IOpenUrlSegment[]; ``` -------------------------------- ### Usage Example: Retrieving a Formula Field Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/formula Demonstrates how to obtain an instance of the Formula Field from a table using its ID. ```typescript const formulaField = await table.getField(fieldId); ``` -------------------------------- ### Get List of Views Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves a list of all available views in the table. Returns a promise that resolves to an array of IView objects. ```typescript getViewList: () =>Promise; ``` -------------------------------- ### Get Table Name and Currency Field Metadata Source: https://lark-base-team.github.io/js-sdk-docs/en/start/example Fetches the active table's name and a list of currency fields using the Lark Base SDK. This is typically used during component initialization. ```typescript useEffect(() => { constfn=async () => { consttable=await bitable.base.getActiveTable(); consttableName=await table.getName(); setInfo(`The table Name is ${tableName}`); setInfoType('success'); constfieldMetaList=await table.getFieldMetaListByType(FieldType.Currency); setMetaList(fieldMetaList); }; fn(); }, []); ``` -------------------------------- ### Replit Development Setup - Lark JS SDK Source: https://lark-base-team.github.io/js-sdk-docs/en/start/env Instructions for setting up the Lark JS SDK using Replit. This method is recommended for beginners and involves forking a Replit project, running it, and obtaining a URL for integration with Feishu multidimensional tables. ```javascript console.log("Plugin loaded successfully!"); // Example: Get current table name // const tableName = await $fn.currentTable.getTableName(); // console.log("Current Table Name:", tableName); ``` -------------------------------- ### Checkbox Field Usage Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/checkbox Example of how to get a Checkbox field instance using its ID. ```typescript const checkboxField = await table.getField(fieldId); ``` -------------------------------- ### Local Development Setup - Lark JS SDK Source: https://lark-base-team.github.io/js-sdk-docs/en/start/env Steps for setting up the Lark JS SDK for local development. This involves forking a GitHub repository, cloning it, and following the Readme.md instructions. The process includes obtaining a URL to integrate with Feishu multidimensional tables. ```javascript console.log("Plugin loaded successfully!"); // Example: Get current table name // const tableName = await $fn.currentTable.getTableName(); // console.log("Current Table Name:", tableName); ``` -------------------------------- ### Rating Field Interface Definition Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/rating Defines the IRatingField interface for the Rating field type and provides an example of how to get a Rating field instance. ```typescript constratingField=await table.getField(fieldId); ``` ```typescript typeIOpenNumber=number; ``` -------------------------------- ### Base JS SDK Setup and Prerequisites Source: https://lark-base-team.github.io/js-sdk-docs/en/start/core This snippet outlines the prerequisites and recommended learning for developing plugins with the Base JS SDK. It assumes basic front-end development knowledge and suggests TypeScript for enhanced development. ```markdown Prerequisites: * Basic knowledge of front-end development: HTML / CSS / JS * [React](https://reactjs.org/) (Students using UI frameworks such as Vue can also create plugins) Recommended learning: * [Typescript](https://www.typescriptlang.org/docs/) ``` -------------------------------- ### Currency Transformation Logic Source: https://lark-base-team.github.io/js-sdk-docs/en/start/example Implements the currency transformation logic. It fetches the active table, gets the selected currency field, retrieves the exchange rate, and updates the field values across all records. ```typescript consttransform=async () => { // If the user hasn't selected a currency or conversion field, do nothing if (!selectFieldId ||!currency) return; consttable=await bitable.base.getActiveTable(); // Get the currency field, using the ICurrencyField interface to indicate that we are getting a currency field // With TypeScript, we get a lot of type hints to help with development when we restrict the type of the field constcurrencyField=await table.getField(selectFieldId); constcurrentCurrency=await currencyField.getCurrencyCode(); // Set the currency code await currencyField.setCurrencyCode(currency); // Get the exchange rate for the currency constratio=awaitgetExchangeRate(currentCurrency, currency); if (!ratio) return; // First, get the recordId constrecordIdList=await table.getRecordIdList(); // Iterate through the records for (constrecordIdof recordIdList) { // Get the current currency value constcurrentVal=await currencyField.getValue(recordId); // Calculate the new value using the exchange rate await currencyField.setValue(recordId, currentVal * ratio); } } ``` -------------------------------- ### IGroupField Interface Example Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/group Demonstrates how to retrieve an IGroupField instance using a field ID. This is a common starting point for interacting with Group fields. ```typescript const groupField = await table.getField(fieldId); ``` -------------------------------- ### Base JS SDK Modules Overview Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/singleSelect Provides an overview of the main modules available in the Base JavaScript SDK, including API Guide, Base Module, Table Module, View Module, Record Module, Cell Module, Bridge Module, and UI Module. ```javascript import Base from '@lark-base-sdk/base'; import Table from '@lark-base-sdk/table'; import View from '@lark-base-sdk/view'; import Record from '@lark-base-sdk/record'; import Cell from '@lark-base-sdk/cell'; import Bridge from '@lark-base-sdk/bridge'; import UI from '@lark-base-sdk/ui'; ``` -------------------------------- ### Accessing Lookup Field Data Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/lookup Example of how to get a Lookup Field object and its type definition using the Lark Base JS SDK. ```typescript const lookupField = await table.getField(fieldId); ``` -------------------------------- ### Base JS SDK Modules Overview Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/multipleSelect Provides an overview of the main modules available in the Base JS SDK, including API Guide, Base Module, Table Module, View Module, Record Module, Cell Module, Bridge Module, and UI Module. ```javascript import { API } from '@lark-base-sdk/api'; import { Base } from '@lark-base-sdk/base'; import { Table } from '@lark-base-sdk/table'; import { View } from '@lark-base-sdk/view'; import { Record } from '@lark-base-sdk/record'; import { Cell } from '@lark-base-sdk/cell'; import { Bridge } from '@lark-base-sdk/bridge'; import { UI } from '@lark-base-sdk/ui'; ``` -------------------------------- ### Get Record List Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves the current array of records from a table. This method can be used with optional filters and sorting parameters. Example usage involves iterating through the records to access cell data. ```typescript getRecordsList(filter?: Formula, sort?: Sort): Promise; ``` ```typescript const recordList = await table.getRecordList(); for (const record of recordList) { const cell = await record.getCellByField(fieldId); const val = await cell.getValue(); } ``` -------------------------------- ### View Module API Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Documentation for different view types supported by the SDK. ```APIDOC View Module: Documentation for different view types supported by the SDK. Includes Grid view, Kanban view, Calendar view, Gantt view, Gallery view, and Form view. Refer to the specific documentation for detailed methods and usage for each view type. ``` -------------------------------- ### Get Phone Field Instance Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/phone Demonstrates how to get an instance of the Phone Field from a table using its field ID. This is a common operation for interacting with field data. ```typescript const phoneField = await table.getField(fieldId); ``` -------------------------------- ### View Module - Kanban View Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/multipleSelect Documentation for the Kanban view within the View Module of the Base JS SDK. ```javascript import { KanbanView } from '@lark-base-sdk/view/kanban'; ``` -------------------------------- ### Get Cell Attachment URLs Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves URLs for attachments within a specified cell. The returned temporary links are valid for 10 minutes. It's recommended to use AttachmentField for a more robust way to get attachment URLs. ```typescript getCellAttachmentUrls(tokens: string[], fieldId: string, recordId: string): Promise; ``` -------------------------------- ### Base JS SDK Modules Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/rating Overview of the main modules available in the Base JavaScript SDK. ```javascript import Base from '@lark-base-sdk/base'; import Table from '@lark-base-sdk/table'; import View from '@lark-base-sdk/view'; import Record from '@lark-base-sdk/record'; import Cell from '@lark-base-sdk/cell'; import Bridge from '@lark-base-sdk/bridge'; import UI from '@lark-base-sdk/ui'; ``` -------------------------------- ### Gantt View API - Lark Base JS SDK Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/kanban API documentation for the Gantt view in the Lark Base JS SDK. This section details methods for creating and managing Gantt charts for project scheduling. ```APIDOC Gantt View: Methods for creating and managing Gantt charts for project scheduling. GanttView(config: GanttConfig) Initializes a new Gantt view. config: Configuration object for the Gantt view. GanttConfig: container: The HTML element or selector for the Gantt container. options: Optional configuration options for the Gantt view. tasks: Array of task objects for the Gantt chart. startDate: The start date for the Gantt chart. Example: const gantt = new GanttView({ container: '#project-gantt', options: { tasks: [ { id: 'task1', name: 'Design', start: '2023-11-01', duration: 5 }, { id: 'task2', name: 'Development', start: '2023-11-06', duration: 10 } ], startDate: '2023-11-01' } }); ``` -------------------------------- ### Iterate Through Records and Get Cell Value Source: https://lark-base-team.github.io/js-sdk-docs/en/api/record Demonstrates how to fetch a list of records from a table and then iterate through each record to get a cell's value by its field ID. This method is functional but may have performance implications for large datasets. ```typescript const recordList = await table.getRecordList(); for (const record of recordList) { const cell = await record.getCellByField(fieldId); const val = await cell.getValue(); } ``` -------------------------------- ### Get Table Name Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves the name of the table. ```typescript getName: () => Promise; ``` -------------------------------- ### Kanban View API Documentation Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/kanban API documentation for the Kanban View module, including methods for getting view information, managing filters, and handling sorting. This module is in testing and requires version 0.3.5-alpha.1. ```APIDOC Kanban View API: WARNING: This module is in testing, please use version 0.3.5-alpha.1 package. Methods: id(): Get the view id. - Returns: string - The view ID. tableId(): Get the id of the table the current view belongs to. - Returns: string - The table ID. getType(): Get the type of the view. - Returns: string - The view type. getName(): Get the name of the view. - Returns: string - The view name. getMeta(): Get the meta information of the view. - Returns: object - The view's meta information. getFieldMetaList(): Get the list of field meta information for the view. - Returns: Array - An array of field meta objects. getVisibleRecordIdList(): Get the list of visible record IDs in the current view. - Returns: Array - An array of record IDs. getVisibleFieldIdList(): Get the list of visible field IDs in the current view. - Returns: Array - An array of field IDs. applySetting(setting: object): Apply a new setting to the view. - Parameters: - setting: An object containing the view settings to apply. - Returns: Promise getFilterInfo(): Get the current filter information for the view. - Returns: object - The filter information. addFilterCondition(filterCondition: object): Add a filter condition to the view. - Parameters: - filterCondition: An object representing the filter condition to add. - Returns: Promise deleteFilterCondition(filterId: string): Delete a filter condition from the view. - Parameters: - filterId: The ID of the filter condition to delete. - Returns: Promise updateFilterCondition(filterId: string, filterCondition: object): Update an existing filter condition. - Parameters: - filterId: The ID of the filter condition to update. - filterCondition: An object representing the updated filter condition. - Returns: Promise setFilterConjunction(conjunction: 'AND' | 'OR'): Set the conjunction for multiple filter conditions. - Parameters: - conjunction: The conjunction type ('AND' or 'OR'). - Returns: Promise getSortInfo(): Get the current sort information for the view. - Returns: object - The sort information. setAutoSort(sorts: Array): Set the automatic sort for the view. - Parameters: - sorts: An array of sort objects. - Returns: Promise addSort(sort: object): Add a sort condition to the view. - Parameters: - sort: An object representing the sort condition to add. - Returns: Promise deleteSort(sortId: string): Delete a sort condition from the view. - Parameters: - sortId: The ID of the sort condition to delete. - Returns: Promise updateSort(sortId: string, sort: object): Update an existing sort condition. - Parameters: - sortId: The ID of the sort condition to update. - sort: An object representing the updated sort condition. - Returns: Promise ``` -------------------------------- ### Render UI for Field and Currency Selection Source: https://lark-base-team.github.io/js-sdk-docs/en/start/example Renders a UI component that allows users to select a currency field and a target currency for conversion. It uses a Select component and displays alerts. ```typescript constformatFieldMetaList= (metaList:ICurrencyFieldMeta[]) => { return metaList.map(meta=> ({ label: meta.name, value: meta.id })); }; return
Select Field
Select Currency
``` -------------------------------- ### getTenantKey - Get Tenant ID Source: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge Retrieves the unique identifier for the current tenant. ```typescript getTenantKey(): Promise; ``` -------------------------------- ### getLanguage - Get Current Language Source: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge Retrieves the current language setting of the application. ```typescript getLanguage(): Promise; type Language = 'zh' | 'zh-TW' | 'zh-HK' | 'en' | 'ja' | 'fr' | 'hi' | 'id' | 'it' | 'ko' | 'pt' | 'ru' | 'th' | 'vi' | 'de' | 'es'; ``` -------------------------------- ### Local Development Plugin Publishing Source: https://lark-base-team.github.io/js-sdk-docs/en/start/release Steps to publish a locally developed plugin. This involves managing code on GitHub, using Replit for development and deployment, and submitting a form for official listing. Requires GitHub repository and Replit account. ```javascript 1. Manage plugin code on GitHub. 2. Create a Repl on Replit and import from GitHub. 3. Run the project using 'npm run start'. 4. Click the publish button, fill in information, and click 'Publish to Community'. 5. Copy the published Repl address. 6. Set the project to public and fill out the official listing form with the copied address. ``` -------------------------------- ### Base Module API Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Provides core functionalities for interacting with the Base SDK. ```APIDOC Base Module: Provides core functionalities for interacting with the Base SDK. Refer to the specific documentation for detailed methods and usage. ``` -------------------------------- ### Get View Type Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/grid Retrieves the type of the current view. For a grid view, this will return `ViewType.Grid`. ```typescript getType(): Promise; ``` -------------------------------- ### Import Exchange Rate API Source: https://lark-base-team.github.io/js-sdk-docs/en/start/example Imports necessary constants and the `getExchangeRate` function from local modules for currency conversion. ```typescript import { CURRENCY } from'./const'; import { getExchangeRate } from'./exchange-api'; ``` -------------------------------- ### getInstanceId - Get Plugin Instance ID Source: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge Retrieves the unique identifier for the current plugin instance. ```typescript getInstanceId(): Promise; ``` -------------------------------- ### Lark Base JS SDK API Documentation Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table This section outlines the API documentation for the Lark Base JS SDK, covering various modules and their functionalities. It includes details on Grid view, Kanban view, Calendar view, Gantt view, Gallery view, and Form view. ```APIDOC View Module: Grid view: Provides functionalities for interacting with grid views. Kanban view: Offers methods for managing kanban board views. Calendar view: Details for working with calendar views. Gantt view: Documentation for Gantt chart functionalities. Gallery view: API references for gallery views. Form view: Information on using and manipulating form views. ``` -------------------------------- ### Get Record Share Link Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Generates a sharing link for a specific record using its record ID. ```typescript getRecordShareLink(recordId: string); ``` -------------------------------- ### Lark Base JS SDK API Modules Source: https://lark-base-team.github.io/js-sdk-docs/en/api/base Overview of the main modules available in the Lark Base JavaScript SDK. ```APIDOC API Guide: Description: Provides guidance on using the Lark API. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Base Module: Description: Core functionalities of the Lark Base SDK. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/base Table Module: Description: Functionality related to tables within Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/table View Module: Description: Functionality for different view types in Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/view Record Module: Description: Functionality for managing records in Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/record Cell Module: Description: Functionality for interacting with cells in Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/cell Bridge Module: Description: Functionality for bridging between Lark and external applications. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge UI Module: Description: Functionality for customizing the user interface in Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/ui ``` -------------------------------- ### Get View Type Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt Retrieves the type of the current view. For a Gantt view, this method returns `ViewType.Gantt`. ```typescript getType(): Promise; ``` -------------------------------- ### Get Record by ID Source: https://lark-base-team.github.io/js-sdk-docs/en/api/record Shows how to retrieve a specific record from a RecordList using its unique identifier. ```typescript const record = await recordList.getRecordById(recordId); ``` -------------------------------- ### getLocale - Get Locale Information Source: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge Retrieves the current locale information, which specifies the language and regional settings. ```typescript getLocale(): Promise; type Locale = 'zh-CN' | 'zh-TW' | 'zh-HK' | 'en-US' | 'ja-JP' | 'fr-FR' | 'hi-IN' | 'id-ID' | 'it-IT' | 'ko-KR' | 'pt-BR' | 'ru-RU' | 'th-TH' | 'vi-VN' | 'de-DE' | 'es-ES'; ``` -------------------------------- ### UI Module API Documentation Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide API documentation for the UI module, which handles user interface interactions within the Lark application. ```APIDOC UI Module: Purpose: Handles user interface interactions. Documentation Link: https://lark-base-team.github.io/js-sdk-docs/en/api/ui ``` -------------------------------- ### View Module - Gallery View Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/multipleSelect Documentation for the Gallery view within the View Module of the Base JS SDK. ```javascript import { GalleryView } from '@lark-base-sdk/view/gallery'; ``` -------------------------------- ### Lark Base JS SDK API Modules Source: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge Overview of the main modules available in the Lark Base JavaScript SDK. ```APIDOC API Guide: Description: Provides guidance on using the Lark Base JS SDK. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Base Module: Description: Core functionalities of the Lark Base SDK. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/base Table Module: Description: Functionalities related to tables within Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/table View Module: Description: Manages different view types in Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/view Record Module: Description: Handles record operations in Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/record Cell Module: Description: Manages cell-level operations. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/cell Bridge Module: Description: Facilitates communication between Lark and external applications. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge UI Module: Description: Controls the user interface elements within Lark. Link: https://lark-base-team.github.io/js-sdk-docs/en/api/ui ``` -------------------------------- ### getTheme - Get Current Theme Mode Source: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge Retrieves the current theme mode (LIGHT or DARK) of the application. ```typescript getTheme(): Promise; declare enum ThemeModeType { LIGHT = "LIGHT", DARK = "DARK" } ``` -------------------------------- ### View Module - Gantt View Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/multipleSelect Documentation for the Gantt view within the View Module of the Base JS SDK. ```javascript import { GanttView } from '@lark-base-sdk/view/gantt'; ``` -------------------------------- ### getUserId - Get Current User ID Source: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge Retrieves the unique identifier for the current user interacting with the application. ```typescript getUserId(): Promise; ``` -------------------------------- ### View Module Overview Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view Provides an overview of the View Module and its sub-modules for different view types in the Lark Base JS SDK. ```javascript import { View } from '@lark-base-sdk/core'; // Accessing different view types const gridView = View.Grid; const kanbanView = View.Kanban; const calendarView = View.Calendar; const ganttView = View.Gantt; const galleryView = View.Gallery; const formView = View.Form; // View basic abilities // Filter, Sort, Group, Apply Settings ``` -------------------------------- ### Get Current View Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves the currently active view in the table. Returns a promise that resolves to an IView object. ```typescript getActiveView: () =>Promise; ``` -------------------------------- ### LoadApp Component State Initialization Source: https://lark-base-team.github.io/js-sdk-docs/en/start/example Initializes the state variables for the LoadApp component, including information display, currency field metadata, selected field ID, and selected currency type. This setup is crucial for managing the plugin's UI and data. ```typescript import { bitable, CurrencyCode, FieldType, ICurrencyField, ICurrencyFieldMeta } from'@lark-base-open/js-sdk'; import { CURRENCY } from'./const'; functionLoadApp() { const [info, setInfo] =useState('get table name, please waiting ....'); const [infoType, setInfoType] =useState('info'); const [currencyFieldMetaList, setMetaList] =useState([]) const [selectFieldId, setSelectFieldId] =useState(); const [currency, setCurrency] =useState(); ``` -------------------------------- ### Get Visible Field IDs Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/grid Retrieves a list containing the IDs of all fields that are currently visible within the Grid View. ```typescript getVisibleFieldIdList(): Promise; ``` -------------------------------- ### Replit Official Website Development Plugin Publishing Source: https://lark-base-team.github.io/js-sdk-docs/en/start/release Steps to publish a plugin developed on Replit for official listing. This process includes publishing the Repl to the community and submitting an application form. ```javascript 1. Click the project name in Replit to reveal the publish button. 2. Fill in the required information and click 'Publish to Community'. 3. Copy the published Repl address. 4. Set the project to public and complete the official listing form using the copied address. ``` -------------------------------- ### Get Filter Information Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/grid Retrieves the current filter configuration applied to the Grid View. Returns null if no filters are active. ```typescript getFilterInfo(): Promise; ``` -------------------------------- ### UI Module API Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Provides functionalities for UI interactions within the SDK. ```APIDOC UI Module: Provides functionalities for UI interactions within the SDK. Refer to the specific documentation for detailed methods and usage. ``` -------------------------------- ### Get Date Cell Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/date Retrieves the cell associated with a date field from a specified record or record ID. ```typescript getCell: (recordOrId:IRecordType|string) =>Promise; ``` -------------------------------- ### Base Module Initialization Source: https://lark-base-team.github.io/js-sdk-docs/en/api/base Initializes the base module from the bitable object to access base-related functionalities. ```typescript const base = bitable.base; ``` -------------------------------- ### Get List of View Metadata Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves metadata for all views in the table. Returns a promise that resolves to an array of IViewMeta objects. ```typescript getViewMetaList(): Promise; ``` ```typescript interface IViewMeta { id:string; name:string; type:ViewType; property:IBaseViewProperty; } ``` -------------------------------- ### View Module: Kanban View Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/rating API reference for interacting with Kanban views in the Base JS SDK. ```javascript // Example usage for Kanban View (specific methods not provided in source text) // import KanbanView from '@lark-base-sdk/view/kanban'; ``` -------------------------------- ### Bridge Module API Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Documentation for the Bridge module, likely for inter-module communication. ```APIDOC Bridge Module: Documentation for the Bridge module, likely for inter-module communication. Refer to the specific documentation for detailed methods and usage. ``` -------------------------------- ### Lark Base JS SDK - View Module API Reference Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gallery Provides API documentation for interacting with different view types within the Lark Base JS SDK. This includes functionalities for Grid, Kanban, Calendar, Gantt, Gallery, and Form views. ```APIDOC View Module: Grid view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/grid Kanban view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/kanban Calendar view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/calendar Gantt view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt Gallery view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gallery Form view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/form ``` -------------------------------- ### Get Active Table Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves the currently active table from the base. This is a common entry point for interacting with table data. ```typescript const table = await bitable.base.getActiveTable() ``` -------------------------------- ### Get Group Information Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt Retrieves the current grouping configuration for the Gantt view, including details about the fields used for grouping. ```typescript getGroupInfo(): Promise; // IGroupInfo definition can be found at: https://lark-base-team.github.io/js-sdk-docs/en/api/view#igroupinfo ``` -------------------------------- ### Lark JS SDK - View API Documentation Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt API documentation for interacting with Lark views, including retrieving view information, managing visible records and fields, and handling child records. ```APIDOC View: id: string tableId: string getType(): string getMeta(): object getFieldMetaList(): FieldMeta[] getVisibleRecordIdList(): string[] getVisibleFieldIdList(): string[] getChildRecordIdList(recordId: string): string[] ``` -------------------------------- ### Cell Module API Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Details on how to interact with cells in the SDK. ```APIDOC Cell Module: Details on how to interact with cells in the SDK. Refer to the specific documentation for detailed methods and usage. ``` -------------------------------- ### Get Sort Information Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt Retrieves the current sort configuration for the Gantt view. This includes details about the fields being sorted and their order. ```typescript getSortInfo(): Promise; // ISortInfo definition can be found at: https://lark-base-team.github.io/js-sdk-docs/en/api/view#isortinfo ``` -------------------------------- ### Get Filter Information Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt Retrieves the current filter configuration applied to the Gantt view. This includes details about active filters. ```typescript getFilterInfo(): Promise; ``` -------------------------------- ### Lark Base JS SDK API Documentation Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/grid This section provides detailed API documentation for the Lark Base JavaScript SDK. It covers various modules and their functionalities, including different view types like Grid, Kanban, Calendar, Gantt, Gallery, and Form. ```APIDOC API Guide: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Base Module: https://lark-base-team.github.io/js-sdk-docs/en/api/base Table Module: https://lark-base-team.github.io/js-sdk-docs/en/api/table View Module: https://lark-base-team.github.io/js-sdk-docs/en/api/view Grid view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/grid Kanban view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/kanban Calendar view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/calendar Gantt view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt Gallery view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gallery Form view: https://lark-base-team.github.io/js-sdk-docs/en/api/view/form Record Module: https://lark-base-team.github.io/js-sdk-docs/en/api/record Cell Module: https://lark-base-team.github.io/js-sdk-docs/en/api/cell Bridge Module: https://lark-base-team.github.io/js-sdk-docs/en/api/bridge UI Module: https://lark-base-team.github.io/js-sdk-docs/en/api/ui ``` -------------------------------- ### Get Visible Field IDs Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt Retrieves a list containing the IDs of all fields that are currently visible within the Gantt view. ```typescript getVisibleFieldIdList(): Promise; ``` -------------------------------- ### Field Module API - Common Fields Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Documentation for various field types in the SDK, including common ones. ```APIDOC Field Module: Documentation for various field types in the SDK. Includes: - Attachment Field - Auto Number Field - Barcode Field - Checkbox Field - Created By Field - Currency Field - Single Field (Single Link) - Duplex Field (Duplex Link) - Formula Field - Group Field - Location Field - Lookup Field - Modified By Field - Number Field - Phone Field - Rating Field - Progress Field - Multiple Select Field - Single Select Field - Text Field - Date Field - Created Time Field - Modified Time Field - URL Field - User Field Refer to the specific documentation for detailed methods and usage for each field type. ``` -------------------------------- ### Lark Base JS SDK - View Module Overview Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/calendar Provides an overview of the different view types available within the Lark Base JavaScript SDK's View Module. This includes Grid, Kanban, Calendar, Gantt, Gallery, and Form views. ```javascript /** * Lark Base JS SDK - View Module * * This module provides functionalities to interact with different view types in Lark. */ // Grid View // Documentation for Grid View API can be found at: https://lark-base-team.github.io/js-sdk-docs/en/api/view/grid // Kanban View // Documentation for Kanban View API can be found at: https://lark-base-team.github.io/js-sdk-docs/en/api/view/kanban // Calendar View // Documentation for Calendar View API can be found at: https://lark-base-team.github.io/js-sdk-docs/en/api/view/calendar // Gantt View // Documentation for Gantt View API can be found at: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gantt // Gallery View // Documentation for Gallery View API can be found at: https://lark-base-team.github.io/js-sdk-docs/en/api/view/gallery // Form View // Documentation for Form View API can be found at: https://lark-base-team.github.io/js-sdk-docs/en/api/view/form ``` -------------------------------- ### Get Active Table Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Retrieves the currently active table within the Lark Base environment. This is a fundamental step for most data manipulation operations. ```typescript import { bitable } from'@lark-base-open/js-sdk'; consttable=await bitable.base.getActiveTable(); ``` -------------------------------- ### Get Cell for User Field Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/user Details the method for retrieving the corresponding `Cell` for a given `Record` or record ID. ```typescript getCell: (recordOrId: IRecordType | string) => Promise; ``` -------------------------------- ### Gantt View API Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/currency API reference for the Gantt view, used for project management to visualize timelines and task dependencies. ```javascript import { GanttView } from '@lark-base-sdk/view'; // Example usage: const ganttView = new GanttView(); ganttView.addTask(); ``` -------------------------------- ### Get Number Formatter Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/number Retrieves the currently applied number format for a field. This allows inspection of the display settings. ```typescript getFormatter: () => Promise; ``` -------------------------------- ### Kanban View API - Lark Base JS SDK Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/kanban Provides API methods for interacting with the Kanban view in the Lark Base JS SDK. This includes functionalities for creating, updating, and managing Kanban boards and their elements. ```APIDOC Kanban View: Methods for managing Kanban boards and their elements. KanbanView(config: KanbanConfig) Initializes a new Kanban view. config: Configuration object for the Kanban view. KanbanConfig: container: The HTML element or selector for the Kanban container. options: Optional configuration options for the Kanban view. fields: Array of field configurations for the Kanban columns. cardTemplate: Function to render custom card content. Example: const kanban = new KanbanView({ container: '#kanban-board', options: { fields: [ { label: 'To Do', value: 'todo' }, { label: 'In Progress', value: 'in_progress' }, { label: 'Done', value: 'done' } ] } }); ``` -------------------------------- ### Get Text Field Cell Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/text Retrieves the cell associated with a specific record or record ID from a text field. ```typescript getCell: (recordOrId: IRecordType | string) => Promise; ``` -------------------------------- ### Kanban View Basic Information Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/kanban Retrieve fundamental information about the Kanban view, including its type and name. ```APIDOC getType(): Promise; - Get the view type. getName(): Promise; - Get the view name. ``` -------------------------------- ### Grid View API - Lark Base JS SDK Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/kanban API documentation for the Grid view in the Lark Base JS SDK. This section covers methods for displaying and interacting with data in a tabular grid format. ```APIDOC Grid View: Methods for displaying and interacting with data in a tabular grid. GridView(config: GridConfig) Initializes a new Grid view. config: Configuration object for the Grid view. GridConfig: container: The HTML element or selector for the Grid container. options: Optional configuration options for the Grid view. columns: Array of column definitions. data: Initial data to display in the grid. Example: const grid = new GridView({ container: '#data-grid', options: { columns: [ { title: 'Name', dataIndex: 'name' }, { title: 'Age', dataIndex: 'age' } ], data: [{ name: 'Alice', age: 30 }, { name: 'Bob', age: 25 }] } }); ``` -------------------------------- ### Get Date Field Value Source: https://lark-base-team.github.io/js-sdk-docs/en/api/field/date Retrieves the timestamp value of a date field from a specified record or record ID. ```typescript getValue: (recordOrId:IRecordType|string) =>Promise; ``` -------------------------------- ### Get View by ID Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves a specific view from the table using its unique ID. Returns a promise that resolves to an IView object. ```typescript getViewById: (id:string) =>Promise; ``` -------------------------------- ### Record Module API Documentation Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide API documentation for the Record module, which is primarily used for storing data within the Lark ecosystem. ```APIDOC Record Module: Purpose: Primarily used to store data. Documentation Link: https://lark-base-team.github.io/js-sdk-docs/en/api/record ``` -------------------------------- ### Base Module API Reference Source: https://lark-base-team.github.io/js-sdk-docs/en/api/base Provides access to various methods for interacting with the Lark Base, including retrieving tables, handling selections, and managing permissions. ```APIDOC Base Module: Methods to retrieve information from the `base` module. getActiveTable(): Promise - Retrieves the currently active table. - Returns: A Promise that resolves to the active ITable object. - Example: const table = await base.getActiveTable(); getTable(idOrName: string): Promise - Retrieves a table by its name or ID. - Parameters: - idOrName: The name or ID of the table to retrieve. - Returns: A Promise that resolves to the ITable object. - Example: const table = await base.getTable(idOrName); getTableById(id: string): Promise - Retrieves a table by its unique ID. getTableByName(name: string): Promise - Retrieves a table by its name. getTableList(): Promise - Retrieves a list of all tables available in the base. getSelection(): Promise - Retrieves the current selection within the active table. getTableMetaList(): Promise - Retrieves a list of metadata for all tables in the base. getPermission(): Promise - Retrieves the user's permission level for the current base. isEditable(): Promise - Checks if the current user has edit permissions for the base. batchUploadFile(files: File[]): Promise - Uploads multiple files in a batch. onTableDelete(callback: (data: IDeleteTableEvent) => void): void - Registers a callback for when a table is deleted. onTableAdd(callback: (data: IAddTableEvent) => void): void - Registers a callback for when a new table is added. onSelectionChange(callback: (data: ISelectionChangeEvent) => void): void - Registers a callback for when the user's selection changes. onPermissionChange(callback: (data: IPermissionChangeEvent) => void): void - Registers a callback for when user permissions change. ``` -------------------------------- ### Get Field List Source: https://lark-base-team.github.io/js-sdk-docs/en/api/table Retrieves the list of fields in a table. Supports specifying the expected type of fields for type checking and intellisense. ```typescript getFieldList: () =>Promise; // Example: constfieldList=await table.getFieldList(); ``` -------------------------------- ### Get Field Metadata List Source: https://lark-base-team.github.io/js-sdk-docs/en/api/view/grid Retrieves a list of metadata for all fields present in the Grid View, ordered according to their appearance in the user interface. ```typescript getFieldMetaList(): Promise; ``` -------------------------------- ### Record Module API Source: https://lark-base-team.github.io/js-sdk-docs/en/api/guide Provides functionalities for managing records within the SDK. ```APIDOC Record Module: Provides functionalities for managing records within the SDK. Refer to the specific documentation for detailed methods and usage. ```