@doenet/v06-to-v07 0.7.26-dev.574 → 0.7.26-dev.575
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{index-LyXd__pZ.js → index-ninCM7FL.js} +62 -2
- package/{index-LyXd__pZ.js.map → index-ninCM7FL.js.map} +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{sha256-8sXzDnE0-DFnuPt73-BG1JUGfj.js → sha256-8sXzDnE0-BONvgjVL-DvMibb9d.js} +2 -2
- package/{sha256-8sXzDnE0-DFnuPt73-BG1JUGfj.js.map → sha256-8sXzDnE0-BONvgjVL-DvMibb9d.js.map} +1 -1
|
@@ -47588,7 +47588,7 @@ async function cidFromArrayBuffer(data) {
|
|
|
47588
47588
|
await crypto.subtle.digest("SHA-256", new Uint8Array());
|
|
47589
47589
|
digest = (data2) => crypto.subtle.digest("SHA-256", data2);
|
|
47590
47590
|
} catch (e22) {
|
|
47591
|
-
const sha256 = (await import("./sha256-8sXzDnE0-
|
|
47591
|
+
const sha256 = (await import("./sha256-8sXzDnE0-BONvgjVL-DvMibb9d.js").then((n2) => n2.s)).default;
|
|
47592
47592
|
digest = (data2) => sha256(data2, {
|
|
47593
47593
|
asBytes: true
|
|
47594
47594
|
});
|
|
@@ -210897,6 +210897,66 @@ class Spreadsheet extends BlockComponent {
|
|
|
210897
210897
|
};
|
|
210898
210898
|
}
|
|
210899
210899
|
};
|
|
210900
|
+
stateVariableDefinitions.cellsFixed = {
|
|
210901
|
+
additionalStateVariablesDefined: [
|
|
210902
|
+
{
|
|
210903
|
+
variableName: "cellsInHeader",
|
|
210904
|
+
forRenderer: true
|
|
210905
|
+
}
|
|
210906
|
+
],
|
|
210907
|
+
forRenderer: true,
|
|
210908
|
+
returnDependencies: () => ({
|
|
210909
|
+
numRows: {
|
|
210910
|
+
dependencyType: "stateVariable",
|
|
210911
|
+
variableName: "numRows"
|
|
210912
|
+
},
|
|
210913
|
+
numColumns: {
|
|
210914
|
+
dependencyType: "stateVariable",
|
|
210915
|
+
variableName: "numColumns"
|
|
210916
|
+
},
|
|
210917
|
+
cellIdxToRowCol: {
|
|
210918
|
+
dependencyType: "stateVariable",
|
|
210919
|
+
variableName: "cellIdxToRowCol"
|
|
210920
|
+
},
|
|
210921
|
+
cellDescendants: {
|
|
210922
|
+
dependencyType: "descendant",
|
|
210923
|
+
componentTypes: ["cell"],
|
|
210924
|
+
variableNames: ["fixed", "inHeader"],
|
|
210925
|
+
// A `<cell>` accepts any content, including another
|
|
210926
|
+
// spreadsheet. Those cells belong to that spreadsheet's
|
|
210927
|
+
// map, not to this one.
|
|
210928
|
+
recurseToMatchedChildren: false
|
|
210929
|
+
}
|
|
210930
|
+
}),
|
|
210931
|
+
definition({ dependencyValues }) {
|
|
210932
|
+
const { numRows, numColumns, cellIdxToRowCol } = dependencyValues;
|
|
210933
|
+
const cellsFixed = [];
|
|
210934
|
+
const cellsInHeader = [];
|
|
210935
|
+
for (let rowInd = 0; rowInd < numRows; rowInd++) {
|
|
210936
|
+
const fixedRow = [];
|
|
210937
|
+
const inHeaderRow = [];
|
|
210938
|
+
for (let colInd = 0; colInd < numColumns; colInd++) {
|
|
210939
|
+
fixedRow.push(false);
|
|
210940
|
+
inHeaderRow.push(false);
|
|
210941
|
+
}
|
|
210942
|
+
cellsFixed.push(fixedRow);
|
|
210943
|
+
cellsInHeader.push(inHeaderRow);
|
|
210944
|
+
}
|
|
210945
|
+
for (const cell of dependencyValues.cellDescendants) {
|
|
210946
|
+
const rowCol = cellIdxToRowCol[cell.componentIdx];
|
|
210947
|
+
if (!rowCol) {
|
|
210948
|
+
continue;
|
|
210949
|
+
}
|
|
210950
|
+
const [rowInd, colInd] = rowCol;
|
|
210951
|
+
if (!Number.isInteger(rowInd) || !Number.isInteger(colInd) || rowInd < 0 || colInd < 0 || rowInd >= numRows || colInd >= numColumns) {
|
|
210952
|
+
continue;
|
|
210953
|
+
}
|
|
210954
|
+
cellsFixed[rowInd][colInd] = cell.stateValues.fixed === true;
|
|
210955
|
+
cellsInHeader[rowInd][colInd] = cell.stateValues.inHeader === true;
|
|
210956
|
+
}
|
|
210957
|
+
return { setValue: { cellsFixed, cellsInHeader } };
|
|
210958
|
+
}
|
|
210959
|
+
};
|
|
210900
210960
|
stateVariableDefinitions.evaluatedCells = {
|
|
210901
210961
|
isArray: true,
|
|
210902
210962
|
public: true,
|
|
@@ -248114,4 +248174,4 @@ export {
|
|
|
248114
248174
|
getDefaultExportFromCjs$1 as g,
|
|
248115
248175
|
updateSyntaxFromV06toV07 as u
|
|
248116
248176
|
};
|
|
248117
|
-
//# sourceMappingURL=index-
|
|
248177
|
+
//# sourceMappingURL=index-ninCM7FL.js.map
|