@guiexpert/demo-table-models 1.1.97 → 1.1.99

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.
@@ -0,0 +1,20 @@
1
+ import { TableModelAndOptionsIf, TableDirection } from '@guiexpert/table';
2
+ import { RtlCitySalesIf } from '../model/rtl-city-sales.if.js';
3
+
4
+ /**
5
+ * Sales of branches in Arabic cities per month (since 1.1.98) – data for right-to-left demos. The same count and
6
+ * seed give the same rows.
7
+ *
8
+ * @param count - number of branches (default 2,000; cities repeat with a higher branch number)
9
+ * @param seed - the same seed gives the same rows
10
+ */
11
+ export declare function generateRtlCitySales(count?: number, seed?: number): RtlCitySalesIf[];
12
+ /**
13
+ * Right-to-left demo (since 1.1.98): Arabic headers and data, row numbers and the city fixed at the **start** (on the
14
+ * right in right-to-left), a calculated total fixed at the end, a total row, range selection and focus.
15
+ * The same model works left-to-right – pass `"ltr"` to compare.
16
+ *
17
+ * @param direction - `"rtl"` (default), `"ltr"` or `"auto"` (`tableOptions.direction`)
18
+ * @param rows - the rows (default: {@link generateRtlCitySales})
19
+ */
20
+ export declare function createRtlCitiesModelAndOptions(direction?: TableDirection, rows?: RtlCitySalesIf[]): TableModelAndOptionsIf;
@@ -0,0 +1,19 @@
1
+ import { SpreadsheetParamIf, SpreadsheetTableModel, TableOptionsIf } from '@guiexpert/table';
2
+
3
+ /**
4
+ * A quote with cell formulas (A1 references): positions with quantity, unit price and discount, a net amount per row,
5
+ * subtotal, shipping (free from 1,000), VAT and total. Formulas are text with `=` – the sheet calculates them.
6
+ *
7
+ * @returns {unknown[][]} rows × columns A–F (inputs, not values)
8
+ */
9
+ export declare function createSpreadsheetQuoteData(): unknown[][];
10
+ /**
11
+ * Model and options of the quote sheet ({@link createSpreadsheetQuoteData}): 100 rows × A–H, wider columns.
12
+ *
13
+ * @param {Partial<SpreadsheetParamIf>} [param] - merged over the defaults (e.g. `tableOptions: { direction: "rtl" }`)
14
+ * @returns {{ tableModel: SpreadsheetTableModel, tableOptions: TableOptionsIf }} for a table or a wrapper
15
+ */
16
+ export declare function createSpreadsheetQuoteModelAndOptions(param?: Partial<SpreadsheetParamIf>): {
17
+ tableModel: SpreadsheetTableModel;
18
+ tableOptions: TableOptionsIf;
19
+ };
@@ -24,8 +24,8 @@ export declare const tableOptions: {
24
24
  };
25
25
  columnsDraggable: boolean;
26
26
  columnsResizable: boolean;
27
- overflowX: "scroll" | "auto";
28
- overflowY: "scroll" | "auto";
27
+ overflowX: "auto" | "scroll";
28
+ overflowY: "auto" | "scroll";
29
29
  horizontalBorderVisible: boolean;
30
30
  verticalBorderVisible: boolean;
31
31
  footerSeparatorBorderVisible: boolean;
@@ -59,5 +59,11 @@ export declare const tableOptions: {
59
59
  fillHandle?: boolean | Partial<import('@guiexpert/table').FillHandleOptionsIf> | undefined;
60
60
  masterDetail?: Partial<import('@guiexpert/table').MasterDetailOptionsIf<any>> | undefined;
61
61
  batchEdit?: boolean | Partial<import('@guiexpert/table').BatchEditOptionsIf> | undefined;
62
+ editing?: boolean | Partial<import('@guiexpert/table').EditingOptionsIf> | undefined;
63
+ clipboard?: boolean | Partial<import('@guiexpert/table').ClipboardOptionsIf> | undefined;
64
+ undo?: boolean | Partial<import('@guiexpert/table').UndoOptionsIf> | undefined;
65
+ cellFormulas?: boolean | Partial<import('@guiexpert/table').CellFormulaOptionsIf> | undefined;
66
+ spreadsheet?: boolean | Partial<import('@guiexpert/table').SpreadsheetOptionsIf> | undefined;
67
+ direction?: import('@guiexpert/table').TableDirection | undefined;
62
68
  };
63
69
  export declare function createTimeTableModel(): TableModelIf;
@@ -24,8 +24,8 @@ export declare function createTreePeopleTableOptions(addDemoSelection?: boolean)
24
24
  };
25
25
  externalFilterFunction: (_value: TreeRow<PersonIf>, _index: number, _array: PersonIf[]) => boolean;
26
26
  getSelectionModel: () => SelectionModel;
27
- overflowX: "scroll" | "auto";
28
- overflowY: "scroll" | "auto";
27
+ overflowX: "auto" | "scroll";
28
+ overflowY: "auto" | "scroll";
29
29
  horizontalBorderVisible: boolean;
30
30
  verticalBorderVisible: boolean;
31
31
  footerSeparatorBorderVisible: boolean;
@@ -60,6 +60,12 @@ export declare function createTreePeopleTableOptions(addDemoSelection?: boolean)
60
60
  fillHandle?: boolean | Partial<import('@guiexpert/table').FillHandleOptionsIf> | undefined;
61
61
  masterDetail?: Partial<import('@guiexpert/table').MasterDetailOptionsIf<any>> | undefined;
62
62
  batchEdit?: boolean | Partial<import('@guiexpert/table').BatchEditOptionsIf> | undefined;
63
+ editing?: boolean | Partial<import('@guiexpert/table').EditingOptionsIf> | undefined;
64
+ clipboard?: boolean | Partial<import('@guiexpert/table').ClipboardOptionsIf> | undefined;
65
+ undo?: boolean | Partial<import('@guiexpert/table').UndoOptionsIf> | undefined;
66
+ cellFormulas?: boolean | Partial<import('@guiexpert/table').CellFormulaOptionsIf> | undefined;
67
+ spreadsheet?: boolean | Partial<import('@guiexpert/table').SpreadsheetOptionsIf> | undefined;
68
+ direction?: import('@guiexpert/table').TableDirection | undefined;
63
69
  };
64
70
  export declare function createTreePeopleColumnDefs(): ColumnDefIf[];
65
71
  export declare function createTreePeopleModelAndOptions(addDemoSelection?: boolean): TableModelAndOptionsIf;
@@ -0,0 +1,23 @@
1
+ /** One row of the right-to-left demo (since 1.1.98): sales of a branch in an Arabic city per month. */
2
+ export interface RtlCitySalesIf {
3
+ id: number;
4
+ /** city in Arabic, e.g. "الرياض" */
5
+ city: string;
6
+ /** country in Arabic */
7
+ country: string;
8
+ /** branch code – mixed Arabic and Latin text with digits, e.g. "فرع RUH-01" */
9
+ branch: string;
10
+ /** sales per month, January (m1) … December (m12) */
11
+ m1: number;
12
+ m2: number;
13
+ m3: number;
14
+ m4: number;
15
+ m5: number;
16
+ m6: number;
17
+ m7: number;
18
+ m8: number;
19
+ m9: number;
20
+ m10: number;
21
+ m11: number;
22
+ m12: number;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guiexpert/demo-table-models",
3
- "version": "1.1.97",
3
+ "version": "1.1.99",
4
4
  "license": "MIT",
5
5
  "author": "Dr. Marc Kronberg <info@gui.expert> (https://gui.expert)",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "tslib": "^2.3.0",
34
- "@guiexpert/table": "^1.1.97"
34
+ "@guiexpert/table": "^1.1.99"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^20.11.17",