jspreadsheet 12.8.1 → 12.8.2

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +38 -23
  2. package/dist/index.js +602 -637
  3. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -264,30 +264,43 @@ declare namespace jspreadsheet {
264
264
  };
265
265
  }
266
266
 
267
- /** Options for shape media (updated with your list) */
267
+ /** Options for shape media. Canonical names follow the OOXML preset names (ST_ShapeType). */
268
268
  interface MediaShapeOptions {
269
- type: 'simpleLine' | 'lineWithArrow' | 'doubleArrowLine' | 'elbowConnector' | 'elbowArrowConnector' |
270
- 'doubleArrowElbowConnector' | 'curvedElbowConnector' | 'curvedArrowConnector' | 'curvedDoubleArrowConnector' |
271
- 'rectangle' | 'rounded-rectangle' | 'singleCutCornerRectangle' | 'doubleCutCornerRectangle' |
272
- 'oppositeCutCornerRectangle' | 'roundedTopRightRectangle' | 'roundedTopLeftRectangle' |
273
- 'roundedTopRightBottomLeftRectangle' | 'ellipse' | 'triangle' | 'right-triangle' | 'parallelogram' |
274
- 'trapezium' | 'diamond' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'decagon' |
275
- 'ovalInterfaceIcon' | 'cutCircle' | 'circlewithtoprightoutsideangle' | 'doubleLineSquare' |
276
- 'doubledtoprighangle' | 'doubleLineShape' | 'mouldingCrown' | 'crossIcon' | 'plaqueShape' |
277
- 'cylinderShape' | 'cubeShape' | 'bevelShape' | 'donutShape' | 'blockShape' | 'blockArk' |
278
- 'smileyFace' | 'heart' | 'lightningBolt' | 'sun' | 'crescentMoon' | 'cloud' | 'arcCurve' |
279
- 'leftSquareBrackets' | 'rightSquareBrackets' | 'squareBracketsPair' | 'leftFlowerBracket' |
280
- 'rightFlowerBracket' | 'flowerBrackets' | 'rightBlockArrow' | 'leftBlockArrow' | 'upBlockArrow' |
281
- 'downBlockArrow' | 'upDownArrow' | 'leftRightArrow' | 'quadArrow' | 'leftRightUpArrow' |
282
- 'bentArrow' | 'uTurnArrow' | 'leftUpArrow' | 'bentUpArrow' | 'curvedRightArrow' | 'curvedLeftArrow' |
283
- 'curvedUpArrow' | 'curvedDownArrow' | 'stripedRightArrow' | 'notchedRightArrow' | 'pentagonArrow' |
284
- 'chevron' | 'rightArrowCallout' | 'downArrowCallout' | 'leftArrowCallout' | 'upArrowCallout' |
285
- 'leftRightArrowCallout' | 'quadArrowCallout' | 'circularArrow' | 'plus' | 'minus' | 'multiplication' |
286
- 'division' | 'equal' | 'notEqualTo' | 'predefinedTask' | 'internalStorage' | 'document' |
287
- 'multitaskingDocuments' | 'terminator' | 'preparation' | 'manualInput' | 'manualOperation' |
288
- 'offpageConnector' | 'card' | 'punchedTape' | 'swimmingJunction' | 'orShape' | 'collateShape' |
289
- 'sortShape' | 'extractShape' | 'mergeShape' | 'storedDataShape' | 'delayShape' |
290
- 'sequentialAccessStorageShape' | 'directAccessStorage' | 'displayShape';
269
+ type:
270
+ // Lines
271
+ 'line' | 'lineWithArrow' | 'doubleArrowLine' | 'bentConnector3' | 'elbowArrowConnector' |
272
+ 'doubleArrowElbowConnector' | 'curvedConnector3' | 'curvedArrowConnector' | 'curvedDoubleArrowConnector' |
273
+ // Rectangles
274
+ 'rect' | 'roundRect' | 'snip1Rect' | 'snip2SameRect' | 'snip2DiagRect' | 'round1Rect' |
275
+ 'roundedTopLeftRectangle' | 'round2DiagRect' |
276
+ // Basic forms
277
+ 'ellipse' | 'triangle' | 'rtTriangle' | 'parallelogram' | 'trapezoid' | 'diamond' | 'pentagon' |
278
+ 'hexagon' | 'heptagon' | 'octagon' | 'decagon' | 'pie' | 'chord' | 'teardrop' | 'frame' |
279
+ 'halfFrame' | 'corner' | 'diagStripe' | 'plus' | 'plaque' | 'can' | 'cube' | 'bevel' | 'donut' |
280
+ 'noSmoking' | 'blockArc' | 'smileyFace' | 'heart' | 'lightningBolt' | 'sun' | 'moon' | 'cloud' |
281
+ 'arc' | 'leftBracket' | 'rightBracket' | 'bracketPair' | 'leftBrace' | 'rightBrace' | 'bracePair' |
282
+ // Block arrows
283
+ 'rightArrow' | 'leftArrow' | 'upArrow' | 'downArrow' | 'upDownArrow' | 'leftRightArrow' |
284
+ 'quadArrow' | 'leftRightUpArrow' | 'bentArrow' | 'uturnArrow' | 'leftUpArrow' | 'bentUpArrow' |
285
+ 'curvedRightArrow' | 'curvedLeftArrow' | 'curvedUpArrow' | 'curvedDownArrow' | 'stripedRightArrow' |
286
+ 'notchedRightArrow' | 'homePlate' | 'chevron' | 'rightArrowCallout' | 'downArrowCallout' |
287
+ 'leftArrowCallout' | 'upArrowCallout' | 'leftRightArrowCallout' | 'quadArrowCallout' | 'circularArrow' |
288
+ // Stars and callouts
289
+ 'star4' | 'star5' | 'star6' | 'star8' | 'irregularSeal1' | 'wedgeRectCallout' |
290
+ 'wedgeRoundRectCallout' | 'wedgeEllipseCallout' |
291
+ // Equation shapes
292
+ 'mathPlus' | 'mathMinus' | 'mathMultiply' | 'mathDivide' | 'mathEqual' | 'mathNotEqual' |
293
+ // Flowchart
294
+ 'flowChartPredefinedProcess' | 'flowChartInternalStorage' | 'flowChartDocument' |
295
+ 'flowChartMultidocument' | 'flowChartTerminator' | 'flowChartPreparation' | 'flowChartManualInput' |
296
+ 'flowChartManualOperation' | 'flowChartOffpageConnector' | 'flowChartPunchedCard' |
297
+ 'flowChartPunchedTape' | 'flowChartSummingJunction' | 'flowChartOr' | 'flowChartCollate' |
298
+ 'flowChartSort' | 'flowChartExtract' | 'flowChartMerge' | 'flowChartOnlineStorage' |
299
+ 'flowChartDelay' | 'flowChartMagneticTape' | 'flowChartMagneticDrum' | 'flowChartDisplay' |
300
+ // OOXML presets aliased to an equivalent drawing
301
+ 'flowChartProcess' | 'flowChartDecision' | 'flowChartAlternateProcess' | 'flowChartInputOutput' |
302
+ 'flowChartConnector' | 'flowChartMagneticDisk' | 'straightConnector1' | 'bentConnector2' |
303
+ 'curvedConnector2';
291
304
  backgroundColor?: string;
292
305
  borderColor?: string;
293
306
  fontColor?: string;
@@ -1136,6 +1149,8 @@ declare namespace jspreadsheet {
1136
1149
  onresizecolumn?: (worksheet: worksheetInstance, column: number | Array<number>, width: number | Array<number>, oldWidth: number | Array<number>) => void;
1137
1150
  /** Before the selection happens */
1138
1151
  onbeforeselection?: (worksheet: worksheetInstance, px: number, py: number, ux: number, uy: number, origin?: object) => boolean | undefined;
1152
+ /** When a border is changed. */
1153
+ onborder?: (worksheet: worksheetInstance, x1: number, y1: number, x2: number, y2: number, borderAlias: string, color: string) => void;
1139
1154
  /** When the selection is changed. */
1140
1155
  onselection?: (worksheet: worksheetInstance, px: number, py: number, ux: number, uy: number, origin?: object) => void;
1141
1156
  /** Before the comments is added or updated. Return false to cancel the event, void to accept the action or a object. */