@svgrid/enterprise 3.0.1 → 3.0.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 (197) hide show
  1. package/dist/SvFormulaBar.svelte +606 -0
  2. package/dist/SvFormulaBar.svelte.d.ts +62 -0
  3. package/dist/SvPivotDesigner.svelte +65 -14
  4. package/dist/SvRibbonIcon.svelte +46 -0
  5. package/dist/SvRibbonIcon.svelte.d.ts +17 -0
  6. package/dist/SvSchemaChart.svelte +4 -2
  7. package/dist/SvSheet.svelte +4114 -0
  8. package/dist/SvSheet.svelte.d.ts +142 -0
  9. package/dist/SvSheetComment.svelte +98 -0
  10. package/dist/SvSheetComment.svelte.d.ts +22 -0
  11. package/dist/SvSheetConditionalFormat.svelte +162 -0
  12. package/dist/SvSheetConditionalFormat.svelte.d.ts +14 -0
  13. package/dist/SvSheetDataValidation.svelte +249 -0
  14. package/dist/SvSheetDataValidation.svelte.d.ts +14 -0
  15. package/dist/SvSheetFilterMenu.svelte +217 -0
  16. package/dist/SvSheetFilterMenu.svelte.d.ts +17 -0
  17. package/dist/SvSheetFindReplace.svelte +132 -0
  18. package/dist/SvSheetFindReplace.svelte.d.ts +10 -0
  19. package/dist/SvSheetFormatCells.svelte +421 -0
  20. package/dist/SvSheetFormatCells.svelte.d.ts +17 -0
  21. package/dist/SvSheetGoalSeek.svelte +144 -0
  22. package/dist/SvSheetGoalSeek.svelte.d.ts +12 -0
  23. package/dist/SvSheetInsertFunction.svelte +147 -0
  24. package/dist/SvSheetInsertFunction.svelte.d.ts +8 -0
  25. package/dist/SvSheetListPicker.svelte +89 -0
  26. package/dist/SvSheetListPicker.svelte.d.ts +16 -0
  27. package/dist/SvSheetManageRules.svelte +185 -0
  28. package/dist/SvSheetManageRules.svelte.d.ts +16 -0
  29. package/dist/SvSheetNameManager.svelte +225 -0
  30. package/dist/SvSheetNameManager.svelte.d.ts +11 -0
  31. package/dist/SvSheetPasteSpecial.svelte +105 -0
  32. package/dist/SvSheetPasteSpecial.svelte.d.ts +12 -0
  33. package/dist/SvSheetRemoveDuplicates.svelte +149 -0
  34. package/dist/SvSheetRemoveDuplicates.svelte.d.ts +12 -0
  35. package/dist/SvSheetRibbon.svelte +1201 -0
  36. package/dist/SvSheetRibbon.svelte.d.ts +34 -0
  37. package/dist/SvSheetSizeDialog.svelte +58 -0
  38. package/dist/SvSheetSizeDialog.svelte.d.ts +11 -0
  39. package/dist/SvSheetTabs.svelte +441 -0
  40. package/dist/SvSheetTabs.svelte.d.ts +36 -0
  41. package/dist/SvSheetTabs.test-harness.svelte.d.ts +17 -0
  42. package/dist/SvSheetTabs.test-harness.svelte.js +22 -0
  43. package/dist/SvSheetTextToColumns.svelte +172 -0
  44. package/dist/SvSheetTextToColumns.svelte.d.ts +13 -0
  45. package/dist/SvSheetValidationAlert.svelte +83 -0
  46. package/dist/SvSheetValidationAlert.svelte.d.ts +15 -0
  47. package/dist/cdn/svgrid-enterprise.svelte-external.js +18997 -5396
  48. package/dist/designer/assets/GridMenus-BlsvL_aU.js +8 -0
  49. package/dist/designer/assets/SvChartMenu-BYO9cYdy.css +1 -0
  50. package/dist/designer/assets/SvChartMenu-D9hEeHar.js +1 -0
  51. package/dist/designer/assets/SvDateRangeInput-BBRzrQeg.js +1 -0
  52. package/dist/designer/assets/SvDateTimePicker-DARvKUL2.js +1 -0
  53. package/dist/designer/assets/SvGridCellEditor-C7uQXYds.js +4 -0
  54. package/dist/designer/assets/SvGridChart-B8j1SSy3.js +3 -0
  55. package/dist/designer/assets/SvGridChart-BgLuPO7I.css +1 -0
  56. package/dist/designer/assets/SvGridChartBuilder-08YWWeqY.css +1 -0
  57. package/dist/designer/assets/SvGridChartBuilder-kvyIU_Rl.js +1 -0
  58. package/dist/designer/assets/SvGridChartPanel-4Pc8y5yO.css +1 -0
  59. package/dist/designer/assets/SvGridChartPanel-pT6ITc2P.js +4 -0
  60. package/dist/designer/assets/{SvGridChartView-DUc-1RUf.css → SvGridChartView-7msfnWZT.css} +1 -1
  61. package/dist/designer/assets/SvGridChartView-bg281UA1.js +1 -0
  62. package/dist/designer/assets/SvListBox-BDS66lmZ.js +110 -0
  63. package/dist/designer/assets/SvMenuList-DJ47ba1h.css +1 -0
  64. package/dist/designer/assets/SvMenuList-Dgq2D5VN.js +1 -0
  65. package/dist/designer/assets/SvTabs-DKmwb5p1.css +1 -0
  66. package/dist/designer/assets/SvTabs-UFCMTHXS.js +1 -0
  67. package/dist/designer/assets/chart-cIPUsbM5.js +1 -0
  68. package/dist/designer/assets/chart-export-B6bkQ3X8.js +11 -0
  69. package/dist/designer/assets/chart-export-pdf-BbA28-gt.js +11 -0
  70. package/dist/designer/assets/chart-panel-messages-DtTxpBUU.js +1 -0
  71. package/dist/designer/assets/chart-summary-Czu_5epb.js +1 -0
  72. package/dist/designer/assets/chart-trend-D5I5VEe8.js +1 -0
  73. package/dist/designer/assets/chart-validate-BMqM-qkF.js +1 -0
  74. package/dist/designer/assets/column-resize-BYDzR1Ve.js +1 -0
  75. package/dist/designer/assets/date-format-B8JbEtIG.js +1 -0
  76. package/dist/designer/assets/date-format-DKS-z0xS.css +1 -0
  77. package/dist/designer/assets/editor-contract-Bpoa7A5g.js +1 -0
  78. package/dist/designer/assets/focus-trap-CAreAhlU.js +1 -0
  79. package/dist/designer/assets/index-CMFgAoVV.css +1 -0
  80. package/dist/designer/assets/{index-C_a9Cj8Y.js → index-DwU7CAMm.js} +291 -290
  81. package/dist/designer/assets/list-option-BP_dWS66.js +1 -0
  82. package/dist/designer/assets/row-resize-DLktcqUK.js +1 -0
  83. package/dist/designer/assets/src-CITpcm6b.js +1 -0
  84. package/dist/designer/assets/src-EdI3Xqds.js +58 -0
  85. package/dist/designer/index.html +23 -14
  86. package/dist/export-pdf.d.ts +89 -0
  87. package/dist/export-pdf.js +130 -0
  88. package/dist/export.js +17 -10
  89. package/dist/index.d.ts +64 -1
  90. package/dist/index.js +68 -1
  91. package/dist/install.js +5 -0
  92. package/dist/node/studio.js +64 -2
  93. package/dist/pivot-chart.d.ts +25 -1
  94. package/dist/pivot-chart.js +25 -69
  95. package/dist/sheet/address.d.ts +43 -0
  96. package/dist/sheet/address.js +81 -0
  97. package/dist/sheet/ast.d.ts +94 -0
  98. package/dist/sheet/ast.js +56 -0
  99. package/dist/sheet/auto-filter.d.ts +66 -0
  100. package/dist/sheet/auto-filter.js +147 -0
  101. package/dist/sheet/autocomplete.d.ts +42 -0
  102. package/dist/sheet/autocomplete.js +162 -0
  103. package/dist/sheet/coerce.d.ts +31 -0
  104. package/dist/sheet/coerce.js +122 -0
  105. package/dist/sheet/commands.d.ts +89 -0
  106. package/dist/sheet/commands.js +230 -0
  107. package/dist/sheet/comments.d.ts +29 -0
  108. package/dist/sheet/comments.js +73 -0
  109. package/dist/sheet/conditional-formats.d.ts +144 -0
  110. package/dist/sheet/conditional-formats.js +316 -0
  111. package/dist/sheet/deps.d.ts +60 -0
  112. package/dist/sheet/deps.js +199 -0
  113. package/dist/sheet/document.d.ts +150 -0
  114. package/dist/sheet/document.js +264 -0
  115. package/dist/sheet/edit-keys.d.ts +14 -0
  116. package/dist/sheet/edit-keys.js +40 -0
  117. package/dist/sheet/entry.d.ts +31 -0
  118. package/dist/sheet/entry.js +76 -0
  119. package/dist/sheet/evaluate.d.ts +61 -0
  120. package/dist/sheet/evaluate.js +337 -0
  121. package/dist/sheet/find-replace.d.ts +62 -0
  122. package/dist/sheet/find-replace.js +152 -0
  123. package/dist/sheet/format-store.d.ts +99 -0
  124. package/dist/sheet/format-store.js +233 -0
  125. package/dist/sheet/freeze.d.ts +54 -0
  126. package/dist/sheet/freeze.js +58 -0
  127. package/dist/sheet/function-catalog.d.ts +10 -0
  128. package/dist/sheet/function-catalog.js +94 -0
  129. package/dist/sheet/functions.d.ts +28 -0
  130. package/dist/sheet/functions.js +362 -0
  131. package/dist/sheet/goal-seek.d.ts +73 -0
  132. package/dist/sheet/goal-seek.js +153 -0
  133. package/dist/sheet/index.d.ts +53 -0
  134. package/dist/sheet/index.js +53 -0
  135. package/dist/sheet/merges.d.ts +71 -0
  136. package/dist/sheet/merges.js +137 -0
  137. package/dist/sheet/names.d.ts +31 -0
  138. package/dist/sheet/names.js +87 -0
  139. package/dist/sheet/navigate.d.ts +52 -0
  140. package/dist/sheet/navigate.js +135 -0
  141. package/dist/sheet/number-format.d.ts +63 -0
  142. package/dist/sheet/number-format.js +508 -0
  143. package/dist/sheet/palette.d.ts +19 -0
  144. package/dist/sheet/palette.js +84 -0
  145. package/dist/sheet/parse.d.ts +13 -0
  146. package/dist/sheet/parse.js +108 -0
  147. package/dist/sheet/paste-special.d.ts +164 -0
  148. package/dist/sheet/paste-special.js +592 -0
  149. package/dist/sheet/protection.d.ts +21 -0
  150. package/dist/sheet/protection.js +48 -0
  151. package/dist/sheet/rects.d.ts +45 -0
  152. package/dist/sheet/rects.js +112 -0
  153. package/dist/sheet/refs.d.ts +82 -0
  154. package/dist/sheet/refs.js +266 -0
  155. package/dist/sheet/ribbon-icons.d.ts +31 -0
  156. package/dist/sheet/ribbon-icons.js +350 -0
  157. package/dist/sheet/ribbon.d.ts +173 -0
  158. package/dist/sheet/ribbon.js +753 -0
  159. package/dist/sheet/shortcuts.d.ts +164 -0
  160. package/dist/sheet/shortcuts.js +623 -0
  161. package/dist/sheet/structure.d.ts +87 -0
  162. package/dist/sheet/structure.js +166 -0
  163. package/dist/sheet/tables.d.ts +70 -0
  164. package/dist/sheet/tables.js +147 -0
  165. package/dist/sheet/tokenize.d.ts +54 -0
  166. package/dist/sheet/tokenize.js +304 -0
  167. package/dist/sheet/transforms.d.ts +76 -0
  168. package/dist/sheet/transforms.js +154 -0
  169. package/dist/sheet/validation.d.ts +92 -0
  170. package/dist/sheet/validation.js +241 -0
  171. package/dist/sheet/workbook.d.ts +72 -0
  172. package/dist/sheet/workbook.js +409 -0
  173. package/dist/sheet-enable.d.ts +6 -0
  174. package/dist/sheet-enable.js +46 -0
  175. package/dist/studio/ui-components.generated.js +63 -1
  176. package/dist/version.d.ts +1 -1
  177. package/dist/version.js +1 -1
  178. package/package.json +9 -4
  179. package/dist/designer/assets/GridMenus-B1JtIN21.js +0 -8
  180. package/dist/designer/assets/SvDateRangeInput-CjO7nn_x.js +0 -1
  181. package/dist/designer/assets/SvDateTimePicker-ByBD_ov6.js +0 -1
  182. package/dist/designer/assets/SvField-YDLipR6O.css +0 -1
  183. package/dist/designer/assets/SvField-cj1PFNgZ.js +0 -1
  184. package/dist/designer/assets/SvGridCellEditor-0W1L2hJ1.js +0 -2
  185. package/dist/designer/assets/SvGridChart-DBOR4xcz.js +0 -2
  186. package/dist/designer/assets/SvGridChart-fkMWeh1J.css +0 -1
  187. package/dist/designer/assets/SvGridChartPanel-symrhNnR.js +0 -11
  188. package/dist/designer/assets/SvGridChartView-BmRxq6mU.js +0 -1
  189. package/dist/designer/assets/SvListBox-1oUF6Iav.js +0 -110
  190. package/dist/designer/assets/chart-DXFganU8.js +0 -1
  191. package/dist/designer/assets/column-resize-C_inr5zT.js +0 -1
  192. package/dist/designer/assets/date-format-DGagAqRc.css +0 -1
  193. package/dist/designer/assets/date-format-onlYDsrY.js +0 -1
  194. package/dist/designer/assets/easing-zaypKrr0.js +0 -3
  195. package/dist/designer/assets/index-k2stW6L8.css +0 -1
  196. package/dist/designer/assets/row-resize-B0FWHcNr.js +0 -1
  197. package/dist/designer/assets/src-D9p27OGC.js +0 -58
@@ -0,0 +1,11 @@
1
+ import type { Workbook } from './sheet/workbook.js';
2
+ type Props = {
3
+ open?: boolean;
4
+ workbook: Workbook;
5
+ /** Called after every change, so the shell recomputes and repaints. */
6
+ onChange: () => void;
7
+ onClose?: () => void;
8
+ };
9
+ declare const SvSheetNameManager: import("svelte").Component<Props, {}, "open">;
10
+ type SvSheetNameManager = ReturnType<typeof SvSheetNameManager>;
11
+ export default SvSheetNameManager;
@@ -0,0 +1,105 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Excel's Paste Special: what to paste (everything, values, formulas or
4
+ * formats), an operation to combine the pasted numbers with what is there,
5
+ * and whether to skip blanks or transpose. The shell keeps what Ctrl+C
6
+ * took and applies the choice through `planPaste` / `resolvePasteCell`;
7
+ * this component only asks the question.
8
+ */
9
+ import { SvModal } from '@svgrid/grid'
10
+ import type { PasteSpecialOptions, PasteWhat, PasteOperation } from './sheet/paste-special'
11
+
12
+ type Props = {
13
+ open?: boolean
14
+ /** Whether the sheet has anything to paste; Excel greys the whole
15
+ * dialog out without a copy, this one says so. */
16
+ hasClipboard: boolean
17
+ onPaste: (options: PasteSpecialOptions) => void
18
+ onClose?: () => void
19
+ }
20
+
21
+ let { open = $bindable(false), hasClipboard, onPaste, onClose }: Props = $props()
22
+
23
+ let what = $state<PasteWhat>('all')
24
+ let operation = $state<PasteOperation>('none')
25
+ let skipBlanks = $state(false)
26
+ let transpose = $state(false)
27
+
28
+ const WHAT: ReadonlyArray<{ value: PasteWhat; label: string }> = [
29
+ { value: 'all', label: 'All' },
30
+ { value: 'formulas', label: 'Formulas' },
31
+ { value: 'values', label: 'Values' },
32
+ { value: 'formats', label: 'Formats' },
33
+ ]
34
+ const OPERATIONS: ReadonlyArray<{ value: PasteOperation; label: string }> = [
35
+ { value: 'none', label: 'None' },
36
+ { value: 'add', label: 'Add' },
37
+ { value: 'subtract', label: 'Subtract' },
38
+ { value: 'multiply', label: 'Multiply' },
39
+ { value: 'divide', label: 'Divide' },
40
+ ]
41
+
42
+ function ok() {
43
+ onPaste({ what, operation, skipBlanks, transpose })
44
+ open = false
45
+ onClose?.()
46
+ }
47
+
48
+ function close() {
49
+ open = false
50
+ onClose?.()
51
+ }
52
+ </script>
53
+
54
+ <SvModal bind:open onClose={onClose} title="Paste Special" size="sm">
55
+ <div class="sv-sheet-dialog" role="group" aria-label="Paste Special">
56
+ {#if !hasClipboard}
57
+ <p class="status">Nothing has been copied from the sheet yet. Copy a range first, then Paste Special.</p>
58
+ {/if}
59
+ <div class="columns">
60
+ <fieldset class="group">
61
+ <legend>Paste</legend>
62
+ {#each WHAT as choice (choice.value)}
63
+ <label class="check"><input type="radio" name="sheet-paste-what" value={choice.value} bind:group={what} /> {choice.label}</label>
64
+ {/each}
65
+ </fieldset>
66
+ <fieldset class="group">
67
+ <legend>Operation</legend>
68
+ {#each OPERATIONS as choice (choice.value)}
69
+ <label class="check"><input type="radio" name="sheet-paste-op" value={choice.value} bind:group={operation} /> {choice.label}</label>
70
+ {/each}
71
+ </fieldset>
72
+ </div>
73
+ <div class="checks">
74
+ <label class="check"><input type="checkbox" bind:checked={skipBlanks} /> Skip blanks</label>
75
+ <label class="check"><input type="checkbox" bind:checked={transpose} /> Transpose</label>
76
+ </div>
77
+ </div>
78
+ {#snippet footer()}
79
+ <div class="sv-sheet-dialog-buttons">
80
+ <button type="button" class="btn primary" onclick={ok} disabled={!hasClipboard}>OK</button>
81
+ <button type="button" class="btn" onclick={close}>Cancel</button>
82
+ </div>
83
+ {/snippet}
84
+ </SvModal>
85
+
86
+ <style>
87
+ .columns {
88
+ display: grid;
89
+ grid-template-columns: 1fr 1fr;
90
+ gap: 12px;
91
+ }
92
+ .group {
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: 4px;
96
+ margin: 0;
97
+ padding: 6px 10px 8px;
98
+ border: 1px solid var(--sg-border, #d1d1d1);
99
+ border-radius: var(--sg-radius, 3px);
100
+ }
101
+ .group legend {
102
+ padding: 0 4px;
103
+ font-weight: 600;
104
+ }
105
+ </style>
@@ -0,0 +1,12 @@
1
+ import type { PasteSpecialOptions } from './sheet/paste-special.js';
2
+ type Props = {
3
+ open?: boolean;
4
+ /** Whether the sheet has anything to paste; Excel greys the whole
5
+ * dialog out without a copy, this one says so. */
6
+ hasClipboard: boolean;
7
+ onPaste: (options: PasteSpecialOptions) => void;
8
+ onClose?: () => void;
9
+ };
10
+ declare const SvSheetPasteSpecial: import("svelte").Component<Props, {}, "open">;
11
+ type SvSheetPasteSpecial = ReturnType<typeof SvSheetPasteSpecial>;
12
+ export default SvSheetPasteSpecial;
@@ -0,0 +1,149 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Excel's Remove Duplicates: the columns of the block around the
4
+ * selection, tick the ones that decide what a duplicate is, say whether
5
+ * the first row is headers, OK. Survivors close up from the top and the
6
+ * rows they vacated go blank, in one batch, so it is one Ctrl+Z; the
7
+ * sentence Excel's dialog ends on is handed back for the status bar.
8
+ */
9
+ import { untrack } from 'svelte'
10
+ import { SvModal } from '@svgrid/grid'
11
+ import type { GridCommandContext } from '@svgrid/grid/shortcuts'
12
+ import type { Workbook } from './sheet/workbook'
13
+ import { findDuplicates } from './sheet/transforms'
14
+ import { colToLetters } from './sheet/address'
15
+
16
+ type Props = {
17
+ open?: boolean
18
+ workbook: Workbook
19
+ cmd: () => GridCommandContext | null
20
+ onDone: (message: string) => void
21
+ onClose?: () => void
22
+ }
23
+
24
+ let { open = $bindable(false), workbook, cmd, onDone, onClose }: Props = $props()
25
+
26
+ type Block = { top: number; left: number; bottom: number; right: number }
27
+ let block = $state<Block>({ top: 0, left: 0, bottom: 0, right: 0 })
28
+ let chosen = $state<boolean[]>([])
29
+ let hasHeaders = $state(true)
30
+
31
+ const raw = (r: number, c: number) => workbook.getRaw(workbook.active, r, c)
32
+
33
+ const headers = $derived.by(() =>
34
+ Array.from({ length: block.right - block.left + 1 }, (_, i) => {
35
+ const letter = colToLetters(block.left + i)
36
+ return hasHeaders ? raw(block.top, block.left + i) || `Column ${letter}` : `Column ${letter}`
37
+ }),
38
+ )
39
+
40
+ /**
41
+ * The block: the selection when it is a range, else everything used from
42
+ * the active cell's column rightwards, top row down, the way Excel grows
43
+ * a single cell to its current region.
44
+ */
45
+ $effect(() => {
46
+ if (!open) return
47
+ untrack(prepare)
48
+ })
49
+
50
+ function prepare() {
51
+ const c = cmd()
52
+ const range = c?.ranges[c.ranges.length - 1]
53
+ const rows = Math.max(workbook.rowCount(workbook.active) - 1, 0)
54
+ const cols = Math.max(workbook.colCount(workbook.active) - 1, 0)
55
+ if (range && (range[0] !== range[2] || range[1] !== range[3])) {
56
+ block = { top: range[0], left: range[1], bottom: Math.min(range[2], rows), right: Math.min(range[3], cols) }
57
+ } else {
58
+ const left = c?.activeCell?.colIndex ?? 0
59
+ block = { top: 0, left, bottom: rows, right: Math.max(cols, left) }
60
+ }
61
+ chosen = Array.from({ length: block.right - block.left + 1 }, () => true)
62
+ }
63
+
64
+ function remove() {
65
+ const c = cmd()
66
+ if (!c) return
67
+ const first = hasHeaders ? block.top + 1 : block.top
68
+ const width = block.right - block.left + 1
69
+ const rows = Array.from({ length: Math.max(block.bottom - first + 1, 0) }, (_, i) =>
70
+ Array.from({ length: width }, (_, k) => raw(first + i, block.left + k)),
71
+ )
72
+ const columns = chosen.flatMap((on, i) => (on ? [i] : []))
73
+ const report = findDuplicates(rows, { columns })
74
+ const message = `${report.remove.length} duplicate value${report.remove.length === 1 ? '' : 's'} found and removed; ${report.keep.length} unique value${report.keep.length === 1 ? '' : 's'} remain.`
75
+ if (report.remove.length > 0) {
76
+ const kept = report.keep.map((i) => rows[i]!)
77
+ c.batch(() => {
78
+ for (let i = 0; i < rows.length; i += 1) {
79
+ const source = kept[i]
80
+ for (let k = 0; k < width; k += 1) {
81
+ c.setCellValue(first + i, block.left + k, source ? source[k] ?? '' : '')
82
+ }
83
+ }
84
+ })
85
+ }
86
+ open = false
87
+ if (report.remove.length > 0) {
88
+ c.setSelection(block.top, block.left)
89
+ c.extendSelection(first + (report.keep.length || 1) - 1, block.right)
90
+ }
91
+ onDone(message)
92
+ onClose?.()
93
+ }
94
+
95
+ function close() {
96
+ open = false
97
+ onClose?.()
98
+ }
99
+ </script>
100
+
101
+ <SvModal bind:open onClose={onClose} title="Remove Duplicates" size="sm">
102
+ <div class="sv-sheet-dialog" role="group" aria-label="Remove Duplicates">
103
+ <p class="lead">To delete duplicate values, select one or more columns that contain duplicates.</p>
104
+ <div class="checks">
105
+ <button type="button" class="small" onclick={() => (chosen = chosen.map(() => true))}>Select All</button>
106
+ <button type="button" class="small" onclick={() => (chosen = chosen.map(() => false))}>Unselect All</button>
107
+ <label class="check"><input type="checkbox" bind:checked={hasHeaders} /> My data has headers</label>
108
+ </div>
109
+ <fieldset class="group">
110
+ <legend>Columns</legend>
111
+ {#each headers as header, i (i)}
112
+ <label class="check"><input type="checkbox" bind:checked={chosen[i]} /> {header}</label>
113
+ {/each}
114
+ </fieldset>
115
+ </div>
116
+ {#snippet footer()}
117
+ <div class="sv-sheet-dialog-buttons">
118
+ <button type="button" class="btn primary" onclick={remove} disabled={!chosen.some(Boolean)}>OK</button>
119
+ <button type="button" class="btn" onclick={close}>Cancel</button>
120
+ </div>
121
+ {/snippet}
122
+ </SvModal>
123
+
124
+ <style>
125
+ .lead { margin: 0; }
126
+ .group {
127
+ display: flex;
128
+ flex-direction: column;
129
+ gap: 4px;
130
+ max-height: 200px;
131
+ overflow: auto;
132
+ margin: 0;
133
+ padding: 6px 10px 8px;
134
+ border: 1px solid var(--sg-border, #d1d1d1);
135
+ border-radius: var(--sg-radius, 3px);
136
+ }
137
+ .group legend { padding: 0 4px; font-weight: 600; }
138
+ .small {
139
+ height: 24px;
140
+ padding: 0 10px;
141
+ font: inherit;
142
+ font-size: 12px;
143
+ color: var(--sg-fg, #242424);
144
+ background: var(--sg-bg, #fff);
145
+ border: 1px solid var(--sg-border, #d1d1d1);
146
+ border-radius: var(--sg-radius, 3px);
147
+ cursor: pointer;
148
+ }
149
+ </style>
@@ -0,0 +1,12 @@
1
+ import type { GridCommandContext } from '@svgrid/grid/shortcuts';
2
+ import type { Workbook } from './sheet/workbook.js';
3
+ type Props = {
4
+ open?: boolean;
5
+ workbook: Workbook;
6
+ cmd: () => GridCommandContext | null;
7
+ onDone: (message: string) => void;
8
+ onClose?: () => void;
9
+ };
10
+ declare const SvSheetRemoveDuplicates: import("svelte").Component<Props, {}, "open">;
11
+ type SvSheetRemoveDuplicates = ReturnType<typeof SvSheetRemoveDuplicates>;
12
+ export default SvSheetRemoveDuplicates;