UPDATE: Adds Web browser wasm bindings (#30)

* UPDATE: Adds Web browser wasm bindings

* FIX: install wasm-pack in the GitHub actions
This commit is contained in:
Nicolás Hatcher Andrés
2024-04-07 12:41:33 +02:00
committed by GitHub
parent d445553d85
commit 489027991c
27 changed files with 1129 additions and 183 deletions

View File

@@ -55,6 +55,11 @@ pub fn get_milliseconds_since_epoch() -> i64 {
.as_millis() as i64
}
/// Number of milliseconds since January 1, 1970
/// Used by time and date functions. It takes the value from the environment:
/// * The Operative System
/// * The JavaScript environment
/// * Or mocked for tests
#[cfg(not(test))]
#[cfg(target_arch = "wasm32")]
pub fn get_milliseconds_since_epoch() -> i64 {
@@ -1761,11 +1766,11 @@ impl Model {
}
/// Returns data about the worksheets
pub fn get_sheets_info(&self) -> Vec<SheetInfo> {
pub fn get_worksheets_properties(&self) -> Vec<SheetProperties> {
self.workbook
.worksheets
.iter()
.map(|worksheet| SheetInfo {
.map(|worksheet| SheetProperties {
name: worksheet.get_name(),
state: worksheet.state.to_string(),
color: worksheet.color.clone(),