@omegagrid/grid-core 0.9.52 → 0.9.54

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.
@@ -1 +1 @@
1
- {"version":3,"file":"cssStyle.d.ts","sourceRoot":"","sources":["../../src/model/cssStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAuB,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE7F,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAIrF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAO7D;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAC,OAAO,GAAC,QAAQ,GAAC,QAAQ,GAAC,QAAQ,CAAC;AACvE,eAAO,MAAM,iBAAiB;WACtB,MAAM;WACN,cAAc;EAgBpB,CAAC;AAEH,eAAO,MAAM,iBAAiB,+CAQ1B,CAAC;AAEL,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GACP,iBAAiB,CAClE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,UAK5C;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,MAYjD,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,WAQ3C,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,QAAQ,EAAE,GAAG,KAAK,KAAI,QAiFrD,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,QAAQ,EAAE,GAAG,KAAK,KAAI,QAGtD,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,GAAG,KAAK,KAAG,QAmCzC,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,GAAG,QAAQ,GAAC,MAAM,KAAG,KA2FpD,CAAA"}
1
+ {"version":3,"file":"cssStyle.d.ts","sourceRoot":"","sources":["../../src/model/cssStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAuB,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE7F,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAIrF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAO7D;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAC,OAAO,GAAC,QAAQ,GAAC,QAAQ,GAAC,QAAQ,CAAC;AACvE,eAAO,MAAM,iBAAiB;WACtB,MAAM;WACN,cAAc;EAgBpB,CAAC;AAEH,eAAO,MAAM,iBAAiB,+CAQ1B,CAAC;AAEL,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GACP,iBAAiB,CAClE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,UAK5C;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,MAYjD,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,WAQ3C,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,QAAQ,EAAE,GAAG,KAAK,KAAI,QAiFrD,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,QAAQ,EAAE,GAAG,KAAK,KAAI,QAGtD,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,GAAG,KAAK,KAAG,QAmCzC,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,GAAG,QAAQ,GAAC,MAAM,KAAG,KA4FpD,CAAA"}
@@ -276,6 +276,7 @@ export const cssStyleToStyle = (s) => {
276
276
  break;
277
277
  case 'background':
278
278
  case 'backgroundColor':
279
+ case 'background-color':
279
280
  style.fgColor = convertCSSColor(value);
280
281
  break;
281
282
  case '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,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC;gBACxC,KAAK,CAAC,SAAS,CAAC,QAAQ,GAAG,KAAK,IAAI,KAAK,IAAI,QAAQ,CAAC;gBACtD,MAAM;YACP,KAAK,OAAO;gBACX,KAAK,CAAC,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;gBACrC,MAAM;YACP,KAAK,YAAY,CAAC;YAClB,KAAK,iBAAiB;gBACrB,KAAK,CAAC,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;gBACvC,MAAM;YACP,KAAK,UAAU,CAAC;YAChB,KAAK,WAAW;gBACf,KAAK,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;gBAC7B,MAAM;YACP,KAAK,YAAY,CAAC;YAClB,KAAK,aAAa;gBACjB,KAAK,CAAC,IAAI,GAAG,KAAK,IAAI,MAAM,CAAC;gBAC7B,MAAM;YACP,KAAK,WAAW,CAAC;YACjB,KAAK,YAAY;gBAChB,KAAK,CAAC,MAAM,GAAG,KAAK,IAAI,QAAQ,CAAC;gBACjC,MAAM;YACP;gBACC,KAAK,CAAC,CAAgB,CAAC,GAAG,KAAK,CAAC;gBAChC,MAAM;QACR,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC,CAAA","sourcesContent":["import { colors, dom, utils } from \"@omegagrid/core\";\nimport { Border, BorderStyle, HorizontalAlignment, Style, VerticalAlignment } from \"./style\";\n\nexport type CSSStyle = Partial<CSSStyleDeclaration> & { [propName: string]: string };\n\nconst DEFAULT_BORDER_COLOR = 'CCCCCC';\n\nexport function cssStyleFromString(strStyle: string): CSSStyle {\n\tconst style: CSSStyle = {};\n\tstrStyle.split(';').forEach(item => {\n\t\tconst [key, value] = item.split(':');\n\t\tstyle[key] = value.trim();\n\t});\n\treturn style;\n}\n\nexport type CSSBorderStyle = 'none'|'solid'|'double'|'dotted'|'dashed';\nexport const borderStyleCSSMap = new Map<BorderStyle, {\n\twidth: number, \n\tstyle: CSSBorderStyle,\n}>([\n\t['thin', {width: 1.5, style: 'solid'}],\n\t['medium', {width: 2, style: 'solid'}],\n\t['thick', {width: 3, style: 'solid'}],\n\t['double', {width: 3, style: 'double'}],\n\t['dotted', {width: 1.5, style: 'dotted'}],\n\t['hair', {width: 1, style: 'solid'}],\n\t['dashed', {width: 1.5, style: 'dashed'}],\n\t['mediumDashed', {width: 2, style: 'dashed'}],\n\t['dashDot', {width: 1.5, style: 'dashed'}],\n\t['mediumDashDot', {width: 2, style: 'dashed'}],\n\t['dashDotDot', {width: 1.5, style: 'dotted'}],\n\t['mediumDashDotDot', {width: 2, style: 'dotted'}],\n\t['slantDashDot', {width: 1.5, style: 'dashed'}],\n\t['none', {width: 1.5, style: 'solid'}],\n]);\n\nexport const borderCSSStyleMap = (() => {\n\tconst map = new Map<CSSBorderStyle, Map<number, BorderStyle>>();\n\tborderStyleCSSMap.forEach((value, key) => {\n\t\tlet widthMap: Map<number, BorderStyle> = map.get(value.style);\n\t\tif (!widthMap) widthMap = map.set(value.style, new Map()).get(value.style);\n\t\twidthMap.set(value.width, key);\n\t});\n\treturn map;\n})();\n\nexport function convertCSSVerticalAlignment(align: string) {\n\treturn (align == 'middle' ? 'center' : align) as VerticalAlignment;\n}\n\nexport function convertCSSColor(color: string) {\n\tcolor = color.charAt(0) == '#' ? color.substring(1) : color;\n\treturn color.length == 3\n\t\t? color[0] + color[0] + color[1] + color[1] + color[2] + color[2]\n\t\t: color;\n}\n\nexport const convertCSSBorder = (border: string): Border => {\n\tif (border == 'none') return null;\n\t\n\tconst chunks = border.split(' ');\n\tconst width = parseInt(chunks[0].charAt(0)) || 1;\n\tconst borderStyle = chunks.length > 1 ? (chunks[1] as CSSBorderStyle) : 'solid';\n\n\tconst widthMap = borderCSSStyleMap.get(borderStyle);\n\treturn {\n\t\tstyle: (widthMap ? widthMap.get(width) : null) ?? 'thin',\n\t\tcolor: chunks.length > 2 ? convertCSSColor(chunks[2]) : DEFAULT_BORDER_COLOR\n\t};\n}\n\nexport const convertToCSSBorder = (b: Border) => {\n\tconst borderStyle = borderStyleCSSMap.get(b.style || 'none');\n\tif (!borderStyle) return 'none';\n\treturn [\n\t\tdom.px(borderStyle.width),\n\t\tborderStyle.style,\n\t\tb.style == 'none' ? 'var(--og-cell-background)' : (b.color ? `#${b.color}` : 'var(--og-border-color)'),\n\t].join(' ');\n}\n\nexport const addPattern = (css: CSSStyle, s: Style) : CSSStyle => {\n\t// background-image: radial-gradient(rgb(255, 255, 255) 10%, transparent 10%), radial-gradient(rgb(255, 255, 255) 10%, transparent 10%);\n\t// background-position: 0px 0px, 4px 4px;\n\t// background-size: 8px 8px;\n\t// background-color: rgb(255, 51, 51);\n\n\t// console.log('addPattern', s.patternType, fgColor, bgColor);\n\n\tconst fg = '#' + (s.fgColor || '000000');\n\tconst bg = '#' + (s.bgColor || 'FFFFFF');\n\n\tswitch (s.patternType) {\n\t\tcase 'solid':\n\t\t\tcss.backgroundColor = fg || bg;\n\t\t\tbreak;\n\t\tcase 'darkGray':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.75);\n\t\t\tbreak;\n\t\tcase 'mediumGray':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.50);\n\t\t\tbreak;\n\t\tcase 'lightGray':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.25);\n\t\t\tbreak;\n\t\tcase 'gray125':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.125);\n\t\t\tbreak;\n\t\tcase 'gray0625':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.0625);\n\t\t\tbreak;\n\t\tcase 'darkHorizontal':\n\t\t\tcss.backgroundImage = `linear-gradient(0deg, ${fg} 33.33%, ${bg} 33.33%, ${bg} 50%, ${fg} 50%, ${fg} 83.33%, ${bg} 83.33%, ${bg} 100%)`;\n\t\t\tcss.backgroundSize = '6px 6px';\n\t\t\tbreak;\n\t\tcase 'darkVertical':\n\t\t\tcss.backgroundImage = `linear-gradient(90deg, ${fg} 33.33%, ${bg} 33.33%, ${bg} 50%, ${fg} 50%, ${fg} 83.33%, ${bg} 83.33%, ${bg} 100%)`;\n\t\t\tcss.backgroundSize = '6px 6px';\n\t\t\tbreak;\n\t\tcase 'darkDown':\n\t\t\tcss.backgroundImage = `linear-gradient(45deg, ${fg} 33.33%, ${bg} 33.33%, ${bg} 50%, ${fg} 50%, ${fg} 83.33%, ${bg} 83.33%, ${bg} 100%)`;\n\t\t\tcss.backgroundSize = '6px 6px';\n\t\t\tbreak;\n\t\tcase 'darkUp':\n\t\t\tcss.backgroundImage = `linear-gradient(-45deg, ${fg} 33.33%, ${bg} 33.33%, ${bg} 50%, ${fg} 50%, ${fg} 83.33%, ${bg} 83.33%, ${bg} 100%)`;\n\t\t\tcss.backgroundSize = '6px 6px';\n\t\t\tbreak;\n\t\tcase 'lightHorizontal':\n\t\t\tcss.backgroundImage = `linear-gradient(0deg, ${bg} 25%, ${fg} 25%, ${fg} 50%, ${bg} 50%, ${bg} 75%, ${fg} 75%, ${fg} 100%)`;\n\t\t\tcss.backgroundSize = '4px 4px';\n\t\t\tbreak;\n\t\tcase 'lightVertical':\n\t\t\tcss.backgroundImage = `linear-gradient(90deg, ${bg} 25%, ${fg} 25%, ${fg} 50%, ${bg} 50%, ${bg} 75%, ${fg} 75%, ${fg} 100%)`;\n\t\t\tcss.backgroundSize = '4px 4px';\n\t\t\tbreak;\n\t\tcase 'lightDown':\n\t\t\tcss.backgroundImage = `linear-gradient(45deg, ${bg} 25%, ${fg} 25%, ${fg} 50%, ${bg} 50%, ${bg} 75%, ${fg} 75%, ${fg} 100%)`;\n\t\t\tcss.backgroundSize = '4px 4px';\n\t\t\tbreak;\n\t\tcase 'lightUp':\n\t\t\tcss.backgroundImage = `linear-gradient(-45deg, ${bg} 25%, ${fg} 25%, ${fg} 50%, ${bg} 50%, ${bg} 75%, ${fg} 75%, ${fg} 100%)`;\n\t\t\tcss.backgroundSize = '4px 4px';\n\t\t\tbreak;\n\t\tcase 'darkGrid':\n\t\t\tcss.backgroundImage = `linear-gradient(${bg} 0.5px, transparent 0.5px), linear-gradient(90deg, ${bg} 0.5px, transparent 0.5px)`;\n\t\t\tcss.backgroundSize = '2px 2px';\n\t\t\tbreak;\n\t\tcase 'lightGrid':\n\t\t\tcss.backgroundImage = `linear-gradient(${bg} 0.5px, transparent 0.5px), linear-gradient(90deg, ${bg} 0.5px, transparent 0.5px)`;\n\t\t\tcss.backgroundSize = '1px 1px';\n\t\t\tbreak;\n\t\tcase 'darkTrellis':\n\t\t\tcss.backgroundImage = `linear-gradient(45deg, ${bg} 0.5px, transparent 0.5px), linear-gradient(90deg, ${bg} 0.5px, transparent 0.5px)`;\n\t\t\tcss.backgroundSize = '2px 2px';\n\t\t\tbreak;\n\t\tcase 'lightTrellis':\n\t\t\tcss.backgroundImage = `linear-gradient(45deg, ${bg} 0.5px, transparent 0.5px), linear-gradient(90deg, ${bg} 0.5px, transparent 0.5px)`;\n\t\t\tcss.backgroundSize = '1px 1px';\n\t\t\tbreak;\n\t}\n\n\treturn css;\n}\n\nexport const addGradient = (css: CSSStyle, s: Style) : CSSStyle => {\n\tcss.backgroundImage = `linear-gradient(${(s.angle ?? 0) + 90}deg,${s.stops.map(stop => `#${stop.rgb} ${stop.v * 100}%`).join(',')})`;\n\treturn css;\n}\n\nexport const styleToCSStyle = (s: Style): CSSStyle => {\n\tconst style: CSSStyle = s.cssStyle ? {...s.cssStyle} : {};\n\tif (s.bold != null) style.fontWeight = s.bold ? 'bold' : 'normal';\n\tif (s.italic) style.fontStyle = 'italic';\n\tif (s.underline) style.textDecoration = 'underline';\n\telse if (s.strike) style.textDecoration = 'line-through';\n\tif (s.sz) style.fontSize = dom.numToPixels(s.sz); // (s.sz * 0.75).toString() + 'px';\n\tif (s.color) style.color = '#' + s.color;\n\tif (s.top) style.borderTop = convertToCSSBorder(s.top);\n\tif (s.right) style.borderRight = convertToCSSBorder(s.right);\n\tif (s.bottom) style.borderBottom = convertToCSSBorder(s.bottom);\n\tif (s.left) style.borderLeft = convertToCSSBorder(s.left);\n\tif (s.top || s.right || s.bottom || s.left) style.zIndex = '1';\n\tif (s.alignment && s.alignment.vertical) {\n\t\tstyle.display = 'flex';\n\t\tstyle.justifyContent = s.alignment.horizontal;\n\t\tstyle.alignItems = s.alignment.vertical == 'top' ? 'start' : (s.alignment.vertical == 'bottom' ? 'end' : 'center');\n\t}\n\tif (s.alignment && s.alignment.horizontal) {\n\t\tstyle.textAlign = s.alignment.horizontal;\n\t}\n\tif (s.alignment && s.alignment.wrapText) {\n\t\tstyle.display = 'flex';\n\t\tstyle.justifyContent = style.justifyContent ?? style.textAlign ?? 'left';\n\t\tstyle.alignItems = style.alignItems ?? 'center';\n\t\tstyle.whiteSpace = 'pre-wrap';\n\t}\n\tif (s.patternType) addPattern(style, s);\n\telse if (s.stops && s.stops.length) addGradient(style, s);\n\telse if (s.fgColor) style.backgroundColor = '#' + s.fgColor;\n\telse if (s.bgColor) style.backgroundColor = '#' + s.bgColor;\n\t\n\t///TODO - rotation\n\t\n\treturn style;\n}\n\nexport const cssStyleToStyle = (s: CSSStyle|string): Style => {\n\tconst cssStyle: CSSStyle = utils.isObject(s) ? s as CSSStyle : cssStyleFromString(s as string);\n\tconst style: Style = {};\n\tlet border: Border;\n\tfor (const k in cssStyle) {\n\t\tconst value = cssStyle[k];\n\t\tif (value == null) continue;\n\t\tswitch(k) {\n\t\t\tcase 'borderTop':\n\t\t\tcase 'border-top':\n\t\t\t\tstyle.top = convertCSSBorder(value as string);\n\t\t\t\tbreak;\n\t\t\tcase 'borderTopColor':\n\t\t\tcase 'border-top-color':\n\t\t\t\tif (style.top) style.top.color = convertCSSColor(value as string);\n\t\t\t\telse style.top = {style: 'thin', color: convertCSSColor(value as string)};\n\t\t\t\tbreak;\n\t\t\tcase 'borderRight':\n\t\t\tcase 'border-right':\n\t\t\t\tstyle.right = convertCSSBorder(value as string);\n\t\t\t\tbreak;\n\t\t\tcase 'borderRightColor':\n\t\t\tcase 'border-right-color':\n\t\t\t\tif (style.right) style.right.color = convertCSSColor(value as string);\n\t\t\t\telse style.right = {style: 'thin', color: convertCSSColor(value as string)};\n\t\t\t\tbreak;\n\t\t\tcase 'borderBottom':\n\t\t\tcase 'border-bottom':\n\t\t\t\tstyle.bottom = convertCSSBorder(value as string);\n\t\t\t\tbreak;\n\t\t\tcase 'borderBottomColor':\n\t\t\tcase 'border-bottom-color':\n\t\t\t\tif (style.bottom) style.bottom.color = convertCSSColor(value as string);\n\t\t\t\telse style.bottom = {style: 'thin', color: convertCSSColor(value as string)};\n\t\t\t\tbreak;\n\t\t\tcase 'borderLeft':\n\t\t\tcase 'border-left':\n\t\t\t\tstyle.left = convertCSSBorder(value as string);\n\t\t\t\tbreak;\n\t\t\tcase 'borderLeftColor':\n\t\t\tcase 'border-left-color':\n\t\t\t\tif (style.left) style.left.color = convertCSSColor(value as string);\n\t\t\t\telse style.left = {style: 'thin', color: convertCSSColor(value as string)};\n\t\t\t\tbreak;\t\t\n\t\t\tcase 'border':\n\t\t\t\tborder = convertCSSBorder(value as string);\n\t\t\t\tstyle.top = style.top || border;\n\t\t\t\tstyle.right = style.right || border;\n\t\t\t\tstyle.bottom = style.bottom || border;\n\t\t\t\tstyle.left = style.left || border;\n\t\t\t\tbreak;\n\t\t\tcase 'textAlign':\n\t\t\tcase 'text-align':\n\t\t\t\tstyle.alignment = style.alignment || {};\n\t\t\t\tstyle.alignment.horizontal = value as HorizontalAlignment;\n\t\t\t\tbreak;\n\t\t\tcase 'verticalAlign':\n\t\t\tcase 'vertical-align':\n\t\t\t\tstyle.alignment = style.alignment || {};\n\t\t\t\tstyle.alignment.vertical = convertCSSVerticalAlignment(value);\n\t\t\t\tbreak;\n\t\t\tcase 'whiteSpace':\n\t\t\tcase 'white-space':\n\t\t\t\tstyle.alignment = style.alignment || {};\n\t\t\t\tstyle.alignment.wrapText = value && value != 'nowrap';\n\t\t\t\tbreak;\n\t\t\tcase 'color':\n\t\t\t\tstyle.color = convertCSSColor(value);\n\t\t\t\tbreak;\n\t\t\tcase 'background':\n\t\t\tcase 'backgroundColor':\n\t\t\t\tstyle.fgColor = convertCSSColor(value);\n\t\t\t\tbreak;\n\t\t\tcase 'fontSize':\n\t\t\tcase 'font-size':\n\t\t\t\tstyle.sz = parseFloat(value);\n\t\t\t\tbreak;\n\t\t\tcase 'fontWeight':\n\t\t\tcase 'font-weight':\n\t\t\t\tstyle.bold = value == 'bold';\n\t\t\t\tbreak;\n\t\t\tcase 'fontStyle':\n\t\t\tcase 'font-style':\n\t\t\t\tstyle.italic = value == 'italic';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstyle[k as keyof Style] = value;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn style;\n}\n"]}
1
+ {"version":3,"file":"cssStyle.js","sourceRoot":"","sources":["../../src/model/cssStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAKrD,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAEtC,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IAClD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAClC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACd,CAAC;AAGD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAGrC;IACF,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAC,CAAC;IACtC,CAAC,QAAQ,EAAE,EAAC,KAAK,EAAE,CAA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AAK,CAAC;gBAChC,MAAM;QACR,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC,CAAA","sourcesContent":["import { colors, dom, utils } from \"@omegagrid/core\";\nimport { Border, BorderStyle, HorizontalAlignment, Style, VerticalAlignment } from \"./style\";\n\nexport type CSSStyle = Partial<CSSStyleDeclaration> & { [propName: string]: string };\n\nconst DEFAULT_BORDER_COLOR = 'CCCCCC';\n\nexport function cssStyleFromString(strStyle: string): CSSStyle {\n\tconst style: CSSStyle = {};\n\tstrStyle.split(';').forEach(item => {\n\t\tconst [key, value] = item.split(':');\n\t\tstyle[key] = value.trim();\n\t});\n\treturn style;\n}\n\nexport type CSSBorderStyle = 'none'|'solid'|'double'|'dotted'|'dashed';\nexport const borderStyleCSSMap = new Map<BorderStyle, {\n\twidth: number, \n\tstyle: CSSBorderStyle,\n}>([\n\t['thin', {width: 1.5, style: 'solid'}],\n\t['medium', {width: 2, style: 'solid'}],\n\t['thick', {width: 3, style: 'solid'}],\n\t['double', {width: 3, style: 'double'}],\n\t['dotted', {width: 1.5, style: 'dotted'}],\n\t['hair', {width: 1, style: 'solid'}],\n\t['dashed', {width: 1.5, style: 'dashed'}],\n\t['mediumDashed', {width: 2, style: 'dashed'}],\n\t['dashDot', {width: 1.5, style: 'dashed'}],\n\t['mediumDashDot', {width: 2, style: 'dashed'}],\n\t['dashDotDot', {width: 1.5, style: 'dotted'}],\n\t['mediumDashDotDot', {width: 2, style: 'dotted'}],\n\t['slantDashDot', {width: 1.5, style: 'dashed'}],\n\t['none', {width: 1.5, style: 'solid'}],\n]);\n\nexport const borderCSSStyleMap = (() => {\n\tconst map = new Map<CSSBorderStyle, Map<number, BorderStyle>>();\n\tborderStyleCSSMap.forEach((value, key) => {\n\t\tlet widthMap: Map<number, BorderStyle> = map.get(value.style);\n\t\tif (!widthMap) widthMap = map.set(value.style, new Map()).get(value.style);\n\t\twidthMap.set(value.width, key);\n\t});\n\treturn map;\n})();\n\nexport function convertCSSVerticalAlignment(align: string) {\n\treturn (align == 'middle' ? 'center' : align) as VerticalAlignment;\n}\n\nexport function convertCSSColor(color: string) {\n\tcolor = color.charAt(0) == '#' ? color.substring(1) : color;\n\treturn color.length == 3\n\t\t? color[0] + color[0] + color[1] + color[1] + color[2] + color[2]\n\t\t: color;\n}\n\nexport const convertCSSBorder = (border: string): Border => {\n\tif (border == 'none') return null;\n\t\n\tconst chunks = border.split(' ');\n\tconst width = parseInt(chunks[0].charAt(0)) || 1;\n\tconst borderStyle = chunks.length > 1 ? (chunks[1] as CSSBorderStyle) : 'solid';\n\n\tconst widthMap = borderCSSStyleMap.get(borderStyle);\n\treturn {\n\t\tstyle: (widthMap ? widthMap.get(width) : null) ?? 'thin',\n\t\tcolor: chunks.length > 2 ? convertCSSColor(chunks[2]) : DEFAULT_BORDER_COLOR\n\t};\n}\n\nexport const convertToCSSBorder = (b: Border) => {\n\tconst borderStyle = borderStyleCSSMap.get(b.style || 'none');\n\tif (!borderStyle) return 'none';\n\treturn [\n\t\tdom.px(borderStyle.width),\n\t\tborderStyle.style,\n\t\tb.style == 'none' ? 'var(--og-cell-background)' : (b.color ? `#${b.color}` : 'var(--og-border-color)'),\n\t].join(' ');\n}\n\nexport const addPattern = (css: CSSStyle, s: Style) : CSSStyle => {\n\t// background-image: radial-gradient(rgb(255, 255, 255) 10%, transparent 10%), radial-gradient(rgb(255, 255, 255) 10%, transparent 10%);\n\t// background-position: 0px 0px, 4px 4px;\n\t// background-size: 8px 8px;\n\t// background-color: rgb(255, 51, 51);\n\n\t// console.log('addPattern', s.patternType, fgColor, bgColor);\n\n\tconst fg = '#' + (s.fgColor || '000000');\n\tconst bg = '#' + (s.bgColor || 'FFFFFF');\n\n\tswitch (s.patternType) {\n\t\tcase 'solid':\n\t\t\tcss.backgroundColor = fg || bg;\n\t\t\tbreak;\n\t\tcase 'darkGray':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.75);\n\t\t\tbreak;\n\t\tcase 'mediumGray':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.50);\n\t\t\tbreak;\n\t\tcase 'lightGray':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.25);\n\t\t\tbreak;\n\t\tcase 'gray125':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.125);\n\t\t\tbreak;\n\t\tcase 'gray0625':\n\t\t\tcss.backgroundColor = colors.darken(bg, 0.0625);\n\t\t\tbreak;\n\t\tcase 'darkHorizontal':\n\t\t\tcss.backgroundImage = `linear-gradient(0deg, ${fg} 33.33%, ${bg} 33.33%, ${bg} 50%, ${fg} 50%, ${fg} 83.33%, ${bg} 83.33%, ${bg} 100%)`;\n\t\t\tcss.backgroundSize = '6px 6px';\n\t\t\tbreak;\n\t\tcase 'darkVertical':\n\t\t\tcss.backgroundImage = `linear-gradient(90deg, ${fg} 33.33%, ${bg} 33.33%, ${bg} 50%, ${fg} 50%, ${fg} 83.33%, ${bg} 83.33%, ${bg} 100%)`;\n\t\t\tcss.backgroundSize = '6px 6px';\n\t\t\tbreak;\n\t\tcase 'darkDown':\n\t\t\tcss.backgroundImage = `linear-gradient(45deg, ${fg} 33.33%, ${bg} 33.33%, ${bg} 50%, ${fg} 50%, ${fg} 83.33%, ${bg} 83.33%, ${bg} 100%)`;\n\t\t\tcss.backgroundSize = '6px 6px';\n\t\t\tbreak;\n\t\tcase 'darkUp':\n\t\t\tcss.backgroundImage = `linear-gradient(-45deg, ${fg} 33.33%, ${bg} 33.33%, ${bg} 50%, ${fg} 50%, ${fg} 83.33%, ${bg} 83.33%, ${bg} 100%)`;\n\t\t\tcss.backgroundSize = '6px 6px';\n\t\t\tbreak;\n\t\tcase 'lightHorizontal':\n\t\t\tcss.backgroundImage = `linear-gradient(0deg, ${bg} 25%, ${fg} 25%, ${fg} 50%, ${bg} 50%, ${bg} 75%, ${fg} 75%, ${fg} 100%)`;\n\t\t\tcss.backgroundSize = '4px 4px';\n\t\t\tbreak;\n\t\tcase 'lightVertical':\n\t\t\tcss.backgroundImage = `linear-gradient(90deg, ${bg} 25%, ${fg} 25%, ${fg} 50%, ${bg} 50%, ${bg} 75%, ${fg} 75%, ${fg} 100%)`;\n\t\t\tcss.backgroundSize = '4px 4px';\n\t\t\tbreak;\n\t\tcase 'lightDown':\n\t\t\tcss.backgroundImage = `linear-gradient(45deg, ${bg} 25%, ${fg} 25%, ${fg} 50%, ${bg} 50%, ${bg} 75%, ${fg} 75%, ${fg} 100%)`;\n\t\t\tcss.backgroundSize = '4px 4px';\n\t\t\tbreak;\n\t\tcase 'lightUp':\n\t\t\tcss.backgroundImage = `linear-gradient(-45deg, ${bg} 25%, ${fg} 25%, ${fg} 50%, ${bg} 50%, ${bg} 75%, ${fg} 75%, ${fg} 100%)`;\n\t\t\tcss.backgroundSize = '4px 4px';\n\t\t\tbreak;\n\t\tcase 'darkGrid':\n\t\t\tcss.backgroundImage = `linear-gradient(${bg} 0.5px, transparent 0.5px), linear-gradient(90deg, ${bg} 0.5px, transparent 0.5px)`;\n\t\t\tcss.backgroundSize = '2px 2px';\n\t\t\tbreak;\n\t\tcase 'lightGrid':\n\t\t\tcss.backgroundImage = `linear-gradient(${bg} 0.5px, transparent 0.5px), linear-gradient(90deg, ${bg} 0.5px, transparent 0.5px)`;\n\t\t\tcss.backgroundSize = '1px 1px';\n\t\t\tbreak;\n\t\tcase 'darkTrellis':\n\t\t\tcss.backgroundImage = `linear-gradient(45deg, ${bg} 0.5px, transparent 0.5px), linear-gradient(90deg, ${bg} 0.5px, transparent 0.5px)`;\n\t\t\tcss.backgroundSize = '2px 2px';\n\t\t\tbreak;\n\t\tcase 'lightTrellis':\n\t\t\tcss.backgroundImage = `linear-gradient(45deg, ${bg} 0.5px, transparent 0.5px), linear-gradient(90deg, ${bg} 0.5px, transparent 0.5px)`;\n\t\t\tcss.backgroundSize = '1px 1px';\n\t\t\tbreak;\n\t}\n\n\treturn css;\n}\n\nexport const addGradient = (css: CSSStyle, s: Style) : CSSStyle => {\n\tcss.backgroundImage = `linear-gradient(${(s.angle ?? 0) + 90}deg,${s.stops.map(stop => `#${stop.rgb} ${stop.v * 100}%`).join(',')})`;\n\treturn css;\n}\n\nexport const styleToCSStyle = (s: Style): CSSStyle => {\n\tconst style: CSSStyle = s.cssStyle ? {...s.cssStyle} : {};\n\tif (s.bold != null) style.fontWeight = s.bold ? 'bold' : 'normal';\n\tif (s.italic) style.fontStyle = 'italic';\n\tif (s.underline) style.textDecoration = 'underline';\n\telse if (s.strike) style.textDecoration = 'line-through';\n\tif (s.sz) style.fontSize = dom.numToPixels(s.sz); // (s.sz * 0.75).toString() + 'px';\n\tif (s.color) style.color = '#' + s.color;\n\tif (s.top) style.borderTop = convertToCSSBorder(s.top);\n\tif (s.right) style.borderRight = convertToCSSBorder(s.right);\n\tif (s.bottom) style.borderBottom = convertToCSSBorder(s.bottom);\n\tif (s.left) style.borderLeft = convertToCSSBorder(s.left);\n\tif (s.top || s.right || s.bottom || s.left) style.zIndex = '1';\n\tif (s.alignment && s.alignment.vertical) {\n\t\tstyle.display = 'flex';\n\t\tstyle.justifyContent = s.alignment.horizontal;\n\t\tstyle.alignItems = s.alignment.vertical == 'top' ? 'start' : (s.alignment.vertical == 'bottom' ? 'end' : 'center');\n\t}\n\tif (s.alignment && s.alignment.horizontal) {\n\t\tstyle.textAlign = s.alignment.horizontal;\n\t}\n\tif (s.alignment && s.alignment.wrapText) {\n\t\tstyle.display = 'flex';\n\t\tstyle.justifyContent = style.justifyContent ?? style.textAlign ?? 'left';\n\t\tstyle.alignItems = style.alignItems ?? 'center';\n\t\tstyle.whiteSpace = 'pre-wrap';\n\t}\n\tif (s.patternType) addPattern(style, s);\n\telse if (s.stops && s.stops.length) addGradient(style, s);\n\telse if (s.fgColor) style.backgroundColor = '#' + s.fgColor;\n\telse if (s.bgColor) style.backgroundColor = '#' + s.bgColor;\n\t\n\t///TODO - rotation\n\t\n\treturn style;\n}\n\nexport const cssStyleToStyle = (s: CSSStyle|string): Style => {\n\tconst cssStyle: CSSStyle = utils.isObject(s) ? s as CSSStyle : cssStyleFromString(s as string);\n\tconst style: Style = {};\n\tlet border: Border;\n\tfor (const k in cssStyle) {\n\t\tconst value = cssStyle[k];\n\t\tif (value == null) continue;\n\t\tswitch(k) {\n\t\t\tcase 'borderTop':\n\t\t\tcase 'border-top':\n\t\t\t\tstyle.top = convertCSSBorder(value as string);\n\t\t\t\tbreak;\n\t\t\tcase 'borderTopColor':\n\t\t\tcase 'border-top-color':\n\t\t\t\tif (style.top) style.top.color = convertCSSColor(value as string);\n\t\t\t\telse style.top = {style: 'thin', color: convertCSSColor(value as string)};\n\t\t\t\tbreak;\n\t\t\tcase 'borderRight':\n\t\t\tcase 'border-right':\n\t\t\t\tstyle.right = convertCSSBorder(value as string);\n\t\t\t\tbreak;\n\t\t\tcase 'borderRightColor':\n\t\t\tcase 'border-right-color':\n\t\t\t\tif (style.right) style.right.color = convertCSSColor(value as string);\n\t\t\t\telse style.right = {style: 'thin', color: convertCSSColor(value as string)};\n\t\t\t\tbreak;\n\t\t\tcase 'borderBottom':\n\t\t\tcase 'border-bottom':\n\t\t\t\tstyle.bottom = convertCSSBorder(value as string);\n\t\t\t\tbreak;\n\t\t\tcase 'borderBottomColor':\n\t\t\tcase 'border-bottom-color':\n\t\t\t\tif (style.bottom) style.bottom.color = convertCSSColor(value as string);\n\t\t\t\telse style.bottom = {style: 'thin', color: convertCSSColor(value as string)};\n\t\t\t\tbreak;\n\t\t\tcase 'borderLeft':\n\t\t\tcase 'border-left':\n\t\t\t\tstyle.left = convertCSSBorder(value as string);\n\t\t\t\tbreak;\n\t\t\tcase 'borderLeftColor':\n\t\t\tcase 'border-left-color':\n\t\t\t\tif (style.left) style.left.color = convertCSSColor(value as string);\n\t\t\t\telse style.left = {style: 'thin', color: convertCSSColor(value as string)};\n\t\t\t\tbreak;\t\t\n\t\t\tcase 'border':\n\t\t\t\tborder = convertCSSBorder(value as string);\n\t\t\t\tstyle.top = style.top || border;\n\t\t\t\tstyle.right = style.right || border;\n\t\t\t\tstyle.bottom = style.bottom || border;\n\t\t\t\tstyle.left = style.left || border;\n\t\t\t\tbreak;\n\t\t\tcase 'textAlign':\n\t\t\tcase 'text-align':\n\t\t\t\tstyle.alignment = style.alignment || {};\n\t\t\t\tstyle.alignment.horizontal = value as HorizontalAlignment;\n\t\t\t\tbreak;\n\t\t\tcase 'verticalAlign':\n\t\t\tcase 'vertical-align':\n\t\t\t\tstyle.alignment = style.alignment || {};\n\t\t\t\tstyle.alignment.vertical = convertCSSVerticalAlignment(value);\n\t\t\t\tbreak;\n\t\t\tcase 'whiteSpace':\n\t\t\tcase 'white-space':\n\t\t\t\tstyle.alignment = style.alignment || {};\n\t\t\t\tstyle.alignment.wrapText = value && value != 'nowrap';\n\t\t\t\tbreak;\n\t\t\tcase 'color':\n\t\t\t\tstyle.color = convertCSSColor(value);\n\t\t\t\tbreak;\n\t\t\tcase 'background':\n\t\t\tcase 'backgroundColor':\n\t\t\tcase 'background-color':\n\t\t\t\tstyle.fgColor = convertCSSColor(value);\n\t\t\t\tbreak;\n\t\t\tcase 'fontSize':\n\t\t\tcase 'font-size':\n\t\t\t\tstyle.sz = parseFloat(value);\n\t\t\t\tbreak;\n\t\t\tcase 'fontWeight':\n\t\t\tcase 'font-weight':\n\t\t\t\tstyle.bold = value == 'bold';\n\t\t\t\tbreak;\n\t\t\tcase 'fontStyle':\n\t\t\tcase 'font-style':\n\t\t\t\tstyle.italic = value == 'italic';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstyle[k as keyof Style] = value;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn style;\n}\n"]}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ColorTypes, Direction, Size, Location, UIValueType, Matrix, KeyValue } from "@omegagrid/core";
1
+ import { ColorTypes, Direction, Size, Location, UIValueType, Matrix, KeyValue, MenuItem } from "@omegagrid/core";
2
2
  import { CSSStyle, CellModel, GridSource, Style, CommentItem, TableTheme } from "./model";
3
3
  import { CellRange } from "./common";
4
4
  export type Renderer = (div: HTMLDivElement, cell: CellModel) => HTMLDivElement;
@@ -25,6 +25,8 @@ export type CellAction = {
25
25
  text?: string;
26
26
  title?: string;
27
27
  color?: ColorTypes;
28
+ type?: 'button' | 'menu';
29
+ items?: MenuItem[];
28
30
  };
29
31
  export type CellValidationSource = {
30
32
  /** Allow invalid cell values */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,KAAK,cAAc,CAAC;AAChF,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,KAAK,cAAc,CAAC;AAE7G,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,KAAK,MAAM,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IAClC,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAA;CAErB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAC,OAAO,GAAC,YAAY,GAAC,eAAe,GAAC,YAAY,GAAC,eAAe,GAAC,UAAU,GAAC,aAAa,GAA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;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,CAAA"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColorTypes, Direction, Size, Location, UIValueType, Matrix, KeyValue } from \"@omegagrid/core\";\nimport { CSSStyle, CellModel, GridSource, Style, CommentItem, TableTheme } from \"./model\";\nimport { CellRange } from \"./common\";\n\nexport type Renderer = (div: HTMLDivElement, cell: CellModel) => HTMLDivElement;\nexport type CommentRenderer = (div: HTMLDivElement, comment: CommentItem, cell: CellModel) => HTMLDivElement;\n\nexport type Comparer = (a: CellModel, b: CellModel) => number;\n\nexport type FormulaFunction = (...args: unknown[]) => unknown;\n\nexport type BaseGroupModelSource = {\n\tmodels: GridSource[],\n\tthemes?: TableTheme[]\n\t//layout: TabSplitContainerModel\n}\n\nexport type EditType = 'value'|'style'|'insert_row'|'insert_column'|'delete_row'|'delete_column'|'move_row'|'move_column'|'autofill';\nexport type CellValueType = unknown; //number|string|boolean|object|null;\nexport type FilterValue = string|number|boolean|KeyValue[];\n\n/**\n * Actions = 'a',\n * Html = 'h'\n */\nexport type AditionalUIValueType = 'a'|'h';\n\nexport type CellType = UIValueType | AditionalUIValueType;\n\nexport type StyleSource = number|string|Style|CSSStyle;\n\nexport type CellAction = {\n\taction: string,\n\ticon?: string,\n\ttext?: string,\n\ttitle?: string,\n\tcolor?: ColorTypes\n}\n\nexport type CellValidationSource = {\n\t/** Allow invalid cell values */\n\tallowInvalid?: boolean,\n\n\t/** Validation pattern */\n\tpattern?: string|RegExp,\n\n\t/** Validation function */\n\tvalidate?: (cell: CellModel, value: unknown) => boolean,\n}\n\nexport type CellValidation = Omit<CellValidationSource, 'pattern'> & {\n\t/** Validation pattern */\n\tpattern?: RegExp,\n}\n\nexport type ShiftOptions = {\n\t/** Index of the first shifted row/column */\n\tindex: number;\n\t/** Number of rows/columns to shift */\n\toffset: number;\n\t/** Shift direction up/down for rows, left/right for columns */\n\tdirection: Direction;\n\t/** Name of the sheet where the shift occured */\n\tsheet?: string;\n\t/** Force shift on all references */\n\tallSheets?: boolean;\n\t/** Maximum affected index */\n\tmaxIndex?: number;\n\t/** Shift anchored coords */\n\tignoreAnchors?: boolean;\n}\n\nexport type FormulaFuncParamDescription = {\n\tname: string,\n\ttype: string,\n\tdescription: string,\n\toptional: boolean,\n\tdefault?: string\n}\n\nexport type FormulaFuncDescription = {\n\tname: string,\n\tparams: FormulaFuncParamDescription[],\n\treturns: string,\n\tdescription: string,\n\tlinks: string[]\n}\n\nexport type FormulaFuncGroupDescription = {\n\tname: string,\n\tfunctions: FormulaFuncDescription[]\n}\n\nexport type TabOptions = {\n\tcolor?: string,\n\thidden?: boolean,\n}\n\nexport type ObjectModel = {\n\tlocation: Location;\n\tsize: Size;\n\tzIndex?: number;\n}\n\nexport type SpillOptions = {\n\tcell: CellModel; \n\tvalues: Matrix;\n\tpropertyCell?: CellModel;\n\tdisplayValues?: Matrix<string>;\n}\n\nexport type SpillResult = {\n\tcells: CellModel[];\n\toldValues: CellValueType[];\n\trange: CellRange;\n}\n\nexport type AutofitOptions = {\n\tvisibleOnly?: boolean;\n}\n\nexport type CellSerializationOptions = {\n\tdisplayValue?: boolean;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColorTypes, Direction, Size, Location, UIValueType, Matrix, KeyValue, MenuItem } from \"@omegagrid/core\";\nimport { CSSStyle, CellModel, GridSource, Style, CommentItem, TableTheme } from \"./model\";\nimport { CellRange } from \"./common\";\n\nexport type Renderer = (div: HTMLDivElement, cell: CellModel) => HTMLDivElement;\nexport type CommentRenderer = (div: HTMLDivElement, comment: CommentItem, cell: CellModel) => HTMLDivElement;\n\nexport type Comparer = (a: CellModel, b: CellModel) => number;\n\nexport type FormulaFunction = (...args: unknown[]) => unknown;\n\nexport type BaseGroupModelSource = {\n\tmodels: GridSource[],\n\tthemes?: TableTheme[]\n\t//layout: TabSplitContainerModel\n}\n\nexport type EditType = 'value'|'style'|'insert_row'|'insert_column'|'delete_row'|'delete_column'|'move_row'|'move_column'|'autofill';\nexport type CellValueType = unknown; //number|string|boolean|object|null;\nexport type FilterValue = string|number|boolean|KeyValue[];\n\n/**\n * Actions = 'a',\n * Html = 'h'\n */\nexport type AditionalUIValueType = 'a'|'h';\n\nexport type CellType = UIValueType | AditionalUIValueType;\n\nexport type StyleSource = number|string|Style|CSSStyle;\n\nexport type CellAction = {\n\taction: string,\n\ticon?: string,\n\ttext?: string,\n\ttitle?: string,\n\tcolor?: ColorTypes,\n\ttype?: 'button'|'menu',\n\titems?: MenuItem[]\n}\n\nexport type CellValidationSource = {\n\t/** Allow invalid cell values */\n\tallowInvalid?: boolean,\n\n\t/** Validation pattern */\n\tpattern?: string|RegExp,\n\n\t/** Validation function */\n\tvalidate?: (cell: CellModel, value: unknown) => boolean,\n}\n\nexport type CellValidation = Omit<CellValidationSource, 'pattern'> & {\n\t/** Validation pattern */\n\tpattern?: RegExp,\n}\n\nexport type ShiftOptions = {\n\t/** Index of the first shifted row/column */\n\tindex: number;\n\t/** Number of rows/columns to shift */\n\toffset: number;\n\t/** Shift direction up/down for rows, left/right for columns */\n\tdirection: Direction;\n\t/** Name of the sheet where the shift occured */\n\tsheet?: string;\n\t/** Force shift on all references */\n\tallSheets?: boolean;\n\t/** Maximum affected index */\n\tmaxIndex?: number;\n\t/** Shift anchored coords */\n\tignoreAnchors?: boolean;\n}\n\nexport type FormulaFuncParamDescription = {\n\tname: string,\n\ttype: string,\n\tdescription: string,\n\toptional: boolean,\n\tdefault?: string\n}\n\nexport type FormulaFuncDescription = {\n\tname: string,\n\tparams: FormulaFuncParamDescription[],\n\treturns: string,\n\tdescription: string,\n\tlinks: string[]\n}\n\nexport type FormulaFuncGroupDescription = {\n\tname: string,\n\tfunctions: FormulaFuncDescription[]\n}\n\nexport type TabOptions = {\n\tcolor?: string,\n\thidden?: boolean,\n}\n\nexport type ObjectModel = {\n\tlocation: Location;\n\tsize: Size;\n\tzIndex?: number;\n}\n\nexport type SpillOptions = {\n\tcell: CellModel; \n\tvalues: Matrix;\n\tpropertyCell?: CellModel;\n\tdisplayValues?: Matrix<string>;\n}\n\nexport type SpillResult = {\n\tcells: CellModel[];\n\toldValues: CellValueType[];\n\trange: CellRange;\n}\n\nexport type AutofitOptions = {\n\tvisibleOnly?: boolean;\n}\n\nexport type CellSerializationOptions = {\n\tdisplayValue?: boolean;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omegagrid/grid-core",
3
- "version": "0.9.52",
3
+ "version": "0.9.54",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Grid model, no ui components",
6
6
  "main": "./dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "generate-functions-docs": "node ./scripts/generate-functions-docs.cjs"
29
29
  },
30
30
  "dependencies": {
31
- "@omegagrid/core": "^0.9.52",
32
- "@omegagrid/localize": "^0.9.52",
31
+ "@omegagrid/core": "^0.9.54",
32
+ "@omegagrid/localize": "^0.9.54",
33
33
  "@stdlib/stats": "^0.0.13",
34
34
  "color": "^4.2.3",
35
35
  "date-fns": "^3.2.0",