@sme.up/ketchup 6.2.0 → 6.3.0

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 (160) hide show
  1. package/dist/cjs/{f-button-5b69d882.js → f-button-94cb5f35.js} +2 -2
  2. package/dist/cjs/{f-cell-3a740c48.js → f-cell-76830a0d.js} +12 -14
  3. package/dist/cjs/{f-checkbox-57443ca3.js → f-checkbox-cd977193.js} +1 -1
  4. package/dist/cjs/{f-chip-02e83f82.js → f-chip-68d45fd3.js} +3 -3
  5. package/dist/cjs/{f-image-2a61ece2.js → f-image-0e71df7e.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-09126bdd.js → f-paginator-utils-46689c0a.js} +80 -403
  7. package/dist/cjs/{f-text-field-9ee20a67.js → f-text-field-b4229cef.js} +11 -3
  8. package/dist/cjs/{index-06b131ea.js → index-31125378.js} +9 -4
  9. package/dist/cjs/ketchup.cjs.js +3 -3
  10. package/dist/cjs/kup-accordion.cjs.entry.js +5 -6
  11. package/dist/cjs/kup-autocomplete_25.cjs.entry.js +116 -111
  12. package/dist/cjs/kup-box.cjs.entry.js +15 -17
  13. package/dist/cjs/kup-calendar.cjs.entry.js +9 -11
  14. package/dist/cjs/kup-cell.cjs.entry.js +9 -11
  15. package/dist/cjs/kup-dash-list.cjs.entry.js +5 -7
  16. package/dist/cjs/kup-dash_2.cjs.entry.js +4 -5
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +76 -17
  18. package/dist/cjs/kup-drawer.cjs.entry.js +4 -5
  19. package/dist/cjs/kup-echart.cjs.entry.js +17 -19
  20. package/dist/cjs/kup-family-tree.cjs.entry.js +140 -64
  21. package/dist/cjs/kup-form.cjs.entry.js +10 -12
  22. package/dist/cjs/kup-iframe.cjs.entry.js +4 -5
  23. package/dist/cjs/kup-image-list.cjs.entry.js +10 -12
  24. package/dist/cjs/kup-lazy.cjs.entry.js +4 -5
  25. package/dist/cjs/kup-magic-box.cjs.entry.js +5 -6
  26. package/dist/cjs/{kup-manager-02acbb37.js → kup-manager-7c514a30.js} +1400 -369
  27. package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -5
  28. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  29. package/dist/cjs/kup-photo-frame.cjs.entry.js +4 -5
  30. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-snackbar.cjs.entry.js +6 -7
  33. package/dist/cjs/loader.cjs.js +3 -3
  34. package/dist/collection/assets/dashboard.js +48 -0
  35. package/dist/collection/assets/family-tree.js +236 -19
  36. package/dist/collection/assets/index.js +4 -0
  37. package/dist/collection/assets/kupinteract.js +68 -0
  38. package/dist/collection/collection-manifest.json +5 -5
  39. package/dist/collection/components/kup-dashboard/kup-dashboard.css +7 -0
  40. package/dist/collection/components/kup-dashboard/kup-dashboard.js +67 -7
  41. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +42 -30
  42. package/dist/collection/components/kup-echart/kup-echart.js +9 -9
  43. package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +3 -1
  44. package/dist/collection/components/kup-family-tree/kup-family-tree.css +79 -9
  45. package/dist/collection/components/kup-family-tree/kup-family-tree.js +253 -65
  46. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
  47. package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
  48. package/dist/collection/f-components/f-text-field/f-text-field.js +9 -1
  49. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +48 -15
  50. package/dist/collection/managers/kup-data/kup-data.js +5 -5
  51. package/dist/collection/managers/kup-interact/kup-interact.js +3 -5
  52. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +2 -0
  53. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +131 -45
  54. package/dist/collection/utils/filters/filters-rows.js +4 -23
  55. package/dist/collection/utils/filters/filters-tree-items.js +2 -1
  56. package/dist/esm/{f-button-fd44ef70.js → f-button-cd948e50.js} +2 -2
  57. package/dist/esm/{f-cell-7b159a22.js → f-cell-474dd282.js} +6 -8
  58. package/dist/esm/{f-checkbox-c51c4a75.js → f-checkbox-e06cf07b.js} +1 -1
  59. package/dist/esm/{f-chip-c2e4c522.js → f-chip-d6f2eb94.js} +3 -3
  60. package/dist/esm/{f-image-2ab4b9aa.js → f-image-914a03ef.js} +2 -2
  61. package/dist/esm/{f-paginator-utils-ef537d82.js → f-paginator-utils-a4a52732.js} +44 -366
  62. package/dist/esm/{f-text-field-41c575eb.js → f-text-field-76341fe3.js} +11 -3
  63. package/dist/esm/{index-ad6ab214.js → index-e41330a5.js} +9 -4
  64. package/dist/esm/ketchup.js +3 -3
  65. package/dist/esm/kup-accordion.entry.js +3 -4
  66. package/dist/esm/kup-autocomplete_25.entry.js +17 -12
  67. package/dist/esm/kup-box.entry.js +9 -11
  68. package/dist/esm/kup-calendar.entry.js +5 -7
  69. package/dist/esm/kup-cell.entry.js +7 -9
  70. package/dist/esm/kup-dash-list.entry.js +2 -4
  71. package/dist/esm/kup-dash_2.entry.js +2 -3
  72. package/dist/esm/kup-dashboard.entry.js +74 -15
  73. package/dist/esm/kup-drawer.entry.js +2 -3
  74. package/dist/esm/kup-echart.entry.js +11 -13
  75. package/dist/esm/kup-family-tree.entry.js +138 -62
  76. package/dist/esm/kup-form.entry.js +7 -9
  77. package/dist/esm/kup-iframe.entry.js +2 -3
  78. package/dist/esm/kup-image-list.entry.js +8 -10
  79. package/dist/esm/kup-lazy.entry.js +2 -3
  80. package/dist/esm/kup-magic-box.entry.js +3 -4
  81. package/dist/esm/{kup-manager-22a475e6.js → kup-manager-86f440c7.js} +1379 -370
  82. package/dist/esm/kup-nav-bar.entry.js +2 -3
  83. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  84. package/dist/esm/kup-photo-frame.entry.js +2 -3
  85. package/dist/esm/kup-probe.entry.js +2 -2
  86. package/dist/esm/kup-qlik.entry.js +2 -2
  87. package/dist/esm/kup-snackbar.entry.js +4 -5
  88. package/dist/esm/loader.js +3 -3
  89. package/dist/ketchup/ketchup.esm.js +1 -1
  90. package/dist/ketchup/p-00e1133d.entry.js +9 -0
  91. package/dist/ketchup/p-066f344a.entry.js +1 -0
  92. package/dist/ketchup/p-0c6e0647.entry.js +1 -0
  93. package/dist/ketchup/p-151f7c17.entry.js +27 -0
  94. package/dist/ketchup/p-1e9c03b0.entry.js +1 -0
  95. package/dist/ketchup/{p-fc2b1229.js → p-21ea11cb.js} +3 -3
  96. package/dist/ketchup/{p-1959f835.entry.js → p-2f4e6c50.entry.js} +1 -1
  97. package/dist/ketchup/p-3586f59c.js +1 -0
  98. package/dist/ketchup/p-359fd90d.entry.js +1 -0
  99. package/dist/ketchup/{p-38d7584e.js → p-389fd0bf.js} +1 -1
  100. package/dist/ketchup/{p-cd5cfa7c.js → p-5552f156.js} +1 -1
  101. package/dist/ketchup/{p-264b1b19.entry.js → p-77aff9c1.entry.js} +1 -1
  102. package/dist/ketchup/{p-e9366aaf.entry.js → p-7cfdf53c.entry.js} +4 -4
  103. package/dist/ketchup/p-853a5178.entry.js +1 -0
  104. package/dist/ketchup/{p-edae3076.js → p-8673bd4e.js} +1 -1
  105. package/dist/ketchup/p-8b55b786.entry.js +1 -0
  106. package/dist/ketchup/p-95f5834b.entry.js +1 -0
  107. package/dist/ketchup/p-a2c595c4.js +1 -0
  108. package/dist/ketchup/p-ae91f27e.entry.js +1 -0
  109. package/dist/ketchup/{p-928c5c36.js → p-af664379.js} +1 -1
  110. package/dist/ketchup/p-b0b3989b.js +2 -0
  111. package/dist/ketchup/p-b3b65a61.entry.js +1 -0
  112. package/dist/ketchup/p-bc306a53.entry.js +1 -0
  113. package/dist/ketchup/{p-42080355.entry.js → p-c3783b77.entry.js} +1 -1
  114. package/dist/ketchup/{p-dc62a30f.js → p-cd4fc3fb.js} +1 -1
  115. package/dist/ketchup/p-cee76b14.entry.js +1 -0
  116. package/dist/ketchup/p-cfaea29b.entry.js +1 -0
  117. package/dist/ketchup/p-d2f51e7b.entry.js +1 -0
  118. package/dist/ketchup/p-df8e6a4d.entry.js +1 -0
  119. package/dist/ketchup/p-e60a1170.entry.js +1 -0
  120. package/dist/ketchup/p-e9a1ba04.entry.js +1 -0
  121. package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +6 -1
  122. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +7 -3
  123. package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +26 -5
  124. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +1 -0
  125. package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
  126. package/dist/types/components.d.ts +49 -7
  127. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
  128. package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +13 -6
  129. package/dist/types/managers/kup-data/kup-data.d.ts +2 -1
  130. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +9 -1
  131. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +7 -5
  132. package/dist/types/utils/filters/filters-rows.d.ts +0 -2
  133. package/package.json +2 -2
  134. package/dist/cjs/cell-utils-fe64a28c.js +0 -168
  135. package/dist/cjs/utils-4b208b48.js +0 -447
  136. package/dist/esm/cell-utils-cb5d4149.js +0 -160
  137. package/dist/esm/utils-2c1f4122.js +0 -428
  138. package/dist/ketchup/p-06c6cc68.js +0 -1
  139. package/dist/ketchup/p-0dacd4bc.entry.js +0 -1
  140. package/dist/ketchup/p-1c44dc62.entry.js +0 -1
  141. package/dist/ketchup/p-4bc9f98b.entry.js +0 -1
  142. package/dist/ketchup/p-578583db.entry.js +0 -1
  143. package/dist/ketchup/p-5866d507.entry.js +0 -1
  144. package/dist/ketchup/p-61059e9d.entry.js +0 -9
  145. package/dist/ketchup/p-664be494.entry.js +0 -1
  146. package/dist/ketchup/p-67cd575d.entry.js +0 -1
  147. package/dist/ketchup/p-682a367a.js +0 -1
  148. package/dist/ketchup/p-6ccf7eb2.entry.js +0 -1
  149. package/dist/ketchup/p-7230ab97.entry.js +0 -1
  150. package/dist/ketchup/p-752b4cef.entry.js +0 -1
  151. package/dist/ketchup/p-7de3e7ac.entry.js +0 -1
  152. package/dist/ketchup/p-9b36497d.entry.js +0 -1
  153. package/dist/ketchup/p-b982d137.entry.js +0 -1
  154. package/dist/ketchup/p-c0219e5e.js +0 -1
  155. package/dist/ketchup/p-c55fd0a7.entry.js +0 -1
  156. package/dist/ketchup/p-d154b3a0.entry.js +0 -1
  157. package/dist/ketchup/p-d2affb6f.entry.js +0 -27
  158. package/dist/ketchup/p-d3b542b3.js +0 -2
  159. package/dist/ketchup/p-d6c12c6c.js +0 -1
  160. package/dist/ketchup/p-da0eab60.entry.js +0 -1
@@ -17,6 +17,11 @@ export declare class KupTextField {
17
17
  * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
18
18
  */
19
19
  customStyle: string;
20
+ /**
21
+ * Number of decimals (should be used when inputType is number).
22
+ * @default null
23
+ */
24
+ decimals: number;
20
25
  /**
21
26
  * When set to true, the component is disabled.
22
27
  * @default false
@@ -32,7 +32,7 @@ import { KupDropdownButtonEventPayload } from "./components/kup-dropdown-button/
32
32
  import { KupEchartClickEventPayload, KupEchartLegendPlacement, KupEchartMaps, KupEchartTitle, KupEchartTypes } from "./components/kup-echart/kup-echart-declarations";
33
33
  import { GeoJSON } from "geojson";
34
34
  import { XAXisComponentOption, YAXisComponentOption } from "echarts";
35
- import { KupFamilyTreeData, KupFamilyTreeEventPayload } from "./components/kup-family-tree/kup-family-tree-declarations";
35
+ import { KupFamilyTreeData, KupFamilyTreeEventPayload, KupFamilyTreeLayout, KupFamilyTreeNode } from "./components/kup-family-tree/kup-family-tree-declarations";
36
36
  import { KupFormData, KupFormLayout } from "./components/kup-form/kup-form-declarations";
37
37
  import { KupBadge } from "./components/kup-badge/kup-badge";
38
38
  import { FImageData } from "./f-components/f-image/f-image-declarations";
@@ -1572,10 +1572,19 @@ export namespace Components {
1572
1572
  }
1573
1573
  interface KupFamilyTree {
1574
1574
  /**
1575
- * The component's initial render will fit the container.
1575
+ * The component will autofit everytime a node is expanded.
1576
1576
  * @default true
1577
1577
  */
1578
- "autofit": boolean;
1578
+ "autofitOnExpand": boolean;
1579
+ /**
1580
+ * The component's initial render will fit the container by invoking the runAutofit method.
1581
+ * @default true
1582
+ */
1583
+ "autofitOnLoad": boolean;
1584
+ /**
1585
+ * Collapses all nodes.
1586
+ */
1587
+ "collapseAll": (nodes?: KupFamilyTreeNode[]) => Promise<void>;
1579
1588
  /**
1580
1589
  * Nodes can be expanded/collapsed.
1581
1590
  * @default true
@@ -1592,6 +1601,10 @@ export namespace Components {
1592
1601
  * @default null
1593
1602
  */
1594
1603
  "data": KupFamilyTreeData;
1604
+ /**
1605
+ * Expands all nodes.
1606
+ */
1607
+ "expandAll": (nodes?: KupFamilyTreeNode[]) => Promise<void>;
1595
1608
  /**
1596
1609
  * Used to retrieve component's props values.
1597
1610
  * @param descriptions - When provided and true, the result will be the list of props with their description.
@@ -1602,16 +1615,25 @@ export namespace Components {
1602
1615
  * Layout of the boxes.
1603
1616
  * @default null
1604
1617
  */
1605
- "layout": KupBoxLayout;
1618
+ "layout": KupFamilyTreeLayout;
1606
1619
  /**
1607
1620
  * This method is used to trigger a new render of the component.
1608
1621
  */
1609
1622
  "refresh": () => Promise<void>;
1623
+ /**
1624
+ * This method causes the component to autofit its container's width.
1625
+ */
1626
+ "runAutofit": () => Promise<void>;
1610
1627
  /**
1611
1628
  * Sets the props to the component.
1612
1629
  * @param props - Object containing props that will be set to the component.
1613
1630
  */
1614
1631
  "setProps": (props: GenericObject) => Promise<void>;
1632
+ /**
1633
+ * Child nodes that have no children are arranged vertically.
1634
+ * @default false
1635
+ */
1636
+ "stackedLeaves": boolean;
1615
1637
  }
1616
1638
  interface KupForm {
1617
1639
  /**
@@ -2618,6 +2640,11 @@ export namespace Components {
2618
2640
  * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
2619
2641
  */
2620
2642
  "customStyle": string;
2643
+ /**
2644
+ * Number of decimals (should be used when inputType is number).
2645
+ * @default null
2646
+ */
2647
+ "decimals": number;
2621
2648
  /**
2622
2649
  * When set to true, the component is disabled.
2623
2650
  * @default false
@@ -4757,10 +4784,15 @@ declare namespace LocalJSX {
4757
4784
  }
4758
4785
  interface KupFamilyTree {
4759
4786
  /**
4760
- * The component's initial render will fit the container.
4787
+ * The component will autofit everytime a node is expanded.
4788
+ * @default true
4789
+ */
4790
+ "autofitOnExpand"?: boolean;
4791
+ /**
4792
+ * The component's initial render will fit the container by invoking the runAutofit method.
4761
4793
  * @default true
4762
4794
  */
4763
- "autofit"?: boolean;
4795
+ "autofitOnLoad"?: boolean;
4764
4796
  /**
4765
4797
  * Nodes can be expanded/collapsed.
4766
4798
  * @default true
@@ -4781,10 +4813,15 @@ declare namespace LocalJSX {
4781
4813
  * Layout of the boxes.
4782
4814
  * @default null
4783
4815
  */
4784
- "layout"?: KupBoxLayout;
4816
+ "layout"?: KupFamilyTreeLayout;
4785
4817
  "onKup-familytree-click"?: (event: KupFamilyTreeCustomEvent<KupFamilyTreeEventPayload>) => void;
4786
4818
  "onKup-familytree-contextmenu"?: (event: KupFamilyTreeCustomEvent<KupFamilyTreeEventPayload>) => void;
4787
4819
  "onKup-familytree-dblclick"?: (event: KupFamilyTreeCustomEvent<KupFamilyTreeEventPayload>) => void;
4820
+ /**
4821
+ * Child nodes that have no children are arranged vertically.
4822
+ * @default false
4823
+ */
4824
+ "stackedLeaves"?: boolean;
4788
4825
  }
4789
4826
  interface KupForm {
4790
4827
  /**
@@ -5536,6 +5573,11 @@ declare namespace LocalJSX {
5536
5573
  * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
5537
5574
  */
5538
5575
  "customStyle"?: string;
5576
+ /**
5577
+ * Number of decimals (should be used when inputType is number).
5578
+ * @default null
5579
+ */
5580
+ "decimals"?: number;
5539
5581
  /**
5540
5582
  * When set to true, the component is disabled.
5541
5583
  * @default false
@@ -3,6 +3,7 @@ import type { FComponent } from '../../types/GenericTypes';
3
3
  * Props of the f-text-field component.
4
4
  */
5
5
  export interface FTextFieldProps extends FComponent {
6
+ decimals?: number;
6
7
  disabled?: boolean;
7
8
  fullHeight?: boolean;
8
9
  fullWidth?: boolean;
@@ -1,4 +1,6 @@
1
- import { KupDataCell, KupDataDataset, KupDataFindCellFilters } from './kup-data-declarations';
1
+ import { ValueDisplayedValue } from '../../utils/filters/filters-declarations';
2
+ import { KupObj } from '../kup-objects/kup-objects-declarations';
3
+ import { KupDataCell, KupDataColumn, KupDataDataset, KupDataFindCellFilters } from './kup-data-declarations';
2
4
  /**
3
5
  * Finds all the cells matching the filters criteria in the input dataset.
4
6
  * @param {KupDataDataset} dataset - Input dataset.
@@ -7,12 +9,17 @@ import { KupDataCell, KupDataDataset, KupDataFindCellFilters } from './kup-data-
7
9
  */
8
10
  export declare function findCell(dataset: KupDataDataset, filters: KupDataFindCellFilters): KupDataCell[];
9
11
  /**
10
- * Returns all the cells values of the specified columns.
11
- * @param {KupDataDataset} dataset - Input dataset.
12
- * @param {string[]} columns - Columns included in the search. When missing, searches all columns.
13
- * @returns {string[]} Values of the cells.
12
+ * Returns all the cells values of the specified column, sorted if required.
13
+ * @param {Array<KupDataRow>} dataset - Input dataset.
14
+ * @param {KupDataColumn} column - Column included in the search. When missing, returns empty array.
15
+ * @returns {ValueDisplayedValue[]} Values of the cells, sorted.
14
16
  */
15
- export declare function getCellValue(dataset: KupDataDataset, columns?: string[]): string[];
17
+ export declare function getCellValue(dataset: KupDataDataset, column: KupDataColumn, sorted?: boolean): ValueDisplayedValue[];
18
+ export declare function addColumnValueFromRow(values: {
19
+ value: string;
20
+ displayedValue?: string;
21
+ obj?: KupObj;
22
+ }[], column: KupDataColumn, cell: KupDataCell): void;
16
23
  /**
17
24
  * Overrides the given cell attributes for the specified columns.
18
25
  * If no columns are provided, the value will be applied to every column of the dataset.
@@ -1,6 +1,7 @@
1
1
  import { KupDataCell, KupDataColumn, KupDataDataset, KupDataDatasetSort, KupDataFindCellFilters, KupDataNewColumn, KupDataNewColumnOptions, KupDataNewColumnTypes, KupDataNode, KupDataNodeDrilldownInfo, KupDataRow } from './kup-data-declarations';
2
2
  import { FCellShapes, FCellTypes } from '../../f-components/f-cell/f-cell-declarations';
3
3
  import { TreeNodePath } from '../../components/kup-tree/kup-tree-declarations';
4
+ import { ValueDisplayedValue } from '../../utils/filters/filters-declarations';
4
5
  /**
5
6
  * Handles data operations.
6
7
  * @module KupData
@@ -8,7 +9,7 @@ import { TreeNodePath } from '../../components/kup-tree/kup-tree-declarations';
8
9
  export declare class KupData {
9
10
  cell: {
10
11
  find(dataset: KupDataDataset, filters: KupDataFindCellFilters): KupDataCell[];
11
- getValue(dataset: KupDataDataset, columns?: string[]): string[];
12
+ getValue(dataset: KupDataDataset, column: KupDataColumn, sorted?: boolean): ValueDisplayedValue[];
12
13
  replace(dataset: KupDataDataset, cell: KupDataCell, columns?: string[]): KupDataCell[];
13
14
  getType(cell: KupDataCell, shape?: FCellShapes): FCellTypes;
14
15
  };
@@ -5,15 +5,23 @@ export interface KupScrollOnHoverElement extends HTMLElement {
5
5
  scrollOnHover: {
6
6
  active: boolean;
7
7
  children: NodeListOf<HTMLElement>;
8
+ percentages: KupScrollOnHoverPercentages;
8
9
  rect: DOMRect;
10
+ vertical: boolean;
9
11
  x: number;
10
12
  y: number;
11
13
  };
12
14
  }
15
+ export interface KupScrollOnHoverPercentages {
16
+ back: number;
17
+ forward: number;
18
+ }
13
19
  /**
14
20
  * The direction to which ScollableElement can be scrolled.
15
21
  */
16
22
  export declare enum ScrollOnHoverDirection {
23
+ BOTTOM = "bottom",
17
24
  LEFT = "left",
18
- RIGHT = "right"
25
+ RIGHT = "right",
26
+ TOP = "top"
19
27
  }
@@ -1,4 +1,4 @@
1
- import { KupScrollOnHoverElement, ScrollOnHoverDirection } from './kup-scroll-on-hover-declarations';
1
+ import { KupScrollOnHoverElement, KupScrollOnHoverPercentages, ScrollOnHoverDirection } from './kup-scroll-on-hover-declarations';
2
2
  /**
3
3
  * Lets the user scroll an element's overflow by hovering with the mouse on its left/right edge.
4
4
  * @module KupScrollOnHover
@@ -19,8 +19,10 @@ export declare class KupScrollOnHover {
19
19
  * Watches the given element in order to trigger the scroll on hover when conditions are met.
20
20
  * Children nodes with the "hover-scrolling-child" will be watched and scrolled when el scrolls.
21
21
  * @param {KupScrollOnHoverElement} el - Element to watch.
22
+ * @param {boolean} vertical - Enables vertical scroll.
23
+ * @param {KupScrollOnHoverPercentages} percentages - Sets how big is the area in which the scroll is enabled.
22
24
  */
23
- register(el: KupScrollOnHoverElement): void;
25
+ register(el: KupScrollOnHoverElement, vertical?: boolean, percentages?: KupScrollOnHoverPercentages): void;
24
26
  /**
25
27
  * Removes the given element from ScrollOnHover watchlist.
26
28
  * @param {KupScrollOnHoverElement} el - Element to unregister.
@@ -46,11 +48,11 @@ export declare class KupScrollOnHover {
46
48
  * The actual recursive scroll function.
47
49
  * @param {KupScrollOnHoverElement} el - The scrolled element.
48
50
  * @param {number} maxScrollLeft - Left coordinates to which the recursiveness must be stopped.
49
- * @param {number} percRight - Range of the right scrollable area.
50
- * @param {number} percLeft - Range of the left scrollable area.
51
+ * @param {number} percForward - Range of the right (or bottom) area.
52
+ * @param {number} percBack - Range of the left (or top) scrollable area.
51
53
  * @param {ScrollOnHoverDirection} direction - Direction of the scroll.
52
54
  */
53
- run(el: KupScrollOnHoverElement, maxScrollLeft: number, percRight: number, percLeft: number, direction: ScrollOnHoverDirection): void;
55
+ run(el: KupScrollOnHoverElement, maxScrollLeft: number, percForward: number, percBack: number, direction: ScrollOnHoverDirection): void;
54
56
  /**
55
57
  * Scrolls children of the element having the "hover-scrolling-child" class
56
58
  * @param {KupScrollOnHoverElement} el - The scrolled element.
@@ -27,6 +27,4 @@ export declare class FiltersRows extends Filters {
27
27
  */
28
28
  filterRows(rows?: Array<KupDataRow>, filters?: GenericFilter, globalFilter?: string, columns?: KupDataColumn[], columnFilters?: FiltersColumnMenu): Array<KupDataRow>;
29
29
  getColumnValues(comp: KupDataTable | KupTree, column: KupDataColumn, globalFilterValue: string, columnFilters?: FiltersColumnMenu): ValueDisplayedValue[];
30
- extractColumnValues(rows: Array<KupDataRow>, column: KupDataColumn, values: ValueDisplayedValue[]): ValueDisplayedValue[];
31
- addColumnValueFromRow(values: ValueDisplayedValue[], column: KupDataColumn, cell: KupDataCell): void;
32
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/ketchup",
3
- "version": "6.2.0",
3
+ "version": "6.3.0",
4
4
  "keywords": [
5
5
  "smeup",
6
6
  "KetchUP",
@@ -56,7 +56,7 @@
56
56
  "vanilla-picker": "^2.12.1"
57
57
  },
58
58
  "devDependencies": {
59
- "@stencil/core": "^2.17.0",
59
+ "@stencil/core": "^2.17.3",
60
60
  "@stencil/sass": "^1.4.1",
61
61
  "@types/d3-shape": "^3.0.2",
62
62
  "@types/geojson": "^7946.0.8",
@@ -1,168 +0,0 @@
1
- 'use strict';
2
-
3
- const utils = require('./utils-4b208b48.js');
4
- const kupManager = require('./kup-manager-02acbb37.js');
5
-
6
- const dom = document.documentElement;
7
- // -------------
8
- // COMMONS
9
- // -------------
10
- function getCellValueForDisplay(column, cell) {
11
- if (cell != null) {
12
- if (cell.displayedValue != null) {
13
- return cell.displayedValue;
14
- }
15
- }
16
- let formattedValue = _getCellValueForDisplay(cell.value, column, cell);
17
- if (cell != null) {
18
- cell.displayedValue = formattedValue;
19
- }
20
- return formattedValue;
21
- }
22
- function getValueForDisplay2(values, column) {
23
- if (values == null) {
24
- return '';
25
- }
26
- if (values.displayedValue == null || values.displayedValue.trim() == '') {
27
- values.displayedValue = _getCellValueForDisplay(values.value, column, null);
28
- }
29
- return values.displayedValue;
30
- }
31
- function formatToNumber(cell) {
32
- if (cell.obj) {
33
- return dom.ketchup.math.numberify(cell.obj.k);
34
- }
35
- return dom.ketchup.math.numberify(cell.value);
36
- }
37
- function _getCellValueForDisplay(value, column, cell) {
38
- let obj = column != null ? column.obj : null;
39
- if (cell != null) {
40
- obj = cell.obj ? cell.obj : obj;
41
- }
42
- return getValueForDisplay(value, obj, column != null ? column.decimals : null);
43
- }
44
- function getValueForDisplay(value, obj, decimals) {
45
- if (value == null || value.trim() == '') {
46
- return value;
47
- }
48
- if (dom.ketchup.objects.isNumber(obj)) {
49
- return utils.unformattedStringToFormattedStringNumber(value, decimals ? decimals : -1, obj ? obj.p : '');
50
- }
51
- if (dom.ketchup.objects.isDate(obj) &&
52
- dom.ketchup.dates.isValid(value, kupManager.KupDatesFormats.ISO_DATE)) {
53
- return dom.ketchup.dates.format(value);
54
- }
55
- if (dom.ketchup.objects.isTime(obj)) {
56
- return utils.unformattedStringToFormattedStringTime(value, dom.ketchup.objects.isTimeWithSeconds(obj), obj.t + obj.p);
57
- }
58
- if (dom.ketchup.objects.isTimestamp(obj)) {
59
- return utils.unformattedStringToFormattedStringTimestamp(value);
60
- }
61
- return value;
62
- }
63
- function getColumnByName(columns, name) {
64
- if (columns == null) {
65
- return null;
66
- }
67
- for (let column of columns) {
68
- if (column.name === name) {
69
- return column;
70
- }
71
- }
72
- return null;
73
- }
74
- function compareCell(cell1, cell2, sortMode) {
75
- return compareValues(cell1.obj, cell1.value, cell2.obj, cell2.value, sortMode);
76
- }
77
- function compareValues(obj1, value1, obj2, value2, sortMode) {
78
- const sm = sortMode === 'A' ? 1 : -1;
79
- if (obj1 == null || obj2 == null) {
80
- return sm * localCompareAsInJava(value1, value2);
81
- }
82
- // If either the type or the parameter of the current object are not equal.
83
- if (!(obj1.t === obj2.t && obj1.p === obj2.p)) {
84
- let compare = localCompareAsInJava(obj1.t, obj2.t);
85
- if (compare === 0) {
86
- compare = localCompareAsInJava(obj1.p, obj2.p);
87
- }
88
- return compare * sm;
89
- }
90
- let s1 = value1;
91
- let s2 = value2;
92
- if (s1 == s2) {
93
- return 0;
94
- }
95
- if (s1 == '') {
96
- return sm * -1;
97
- }
98
- if (s2 == '') {
99
- return sm * 1;
100
- }
101
- let v1 = s1;
102
- let v2 = s2;
103
- if (dom.ketchup.objects.isNumber(obj1)) {
104
- v1 = utils.stringToNumber(s1);
105
- v2 = utils.stringToNumber(s2);
106
- }
107
- else if (dom.ketchup.objects.isDate(obj1)) {
108
- v1 = dom.ketchup.dates.toDate(dom.ketchup.dates.format(s1, kupManager.KupDatesFormats.ISO_DATE));
109
- v2 = dom.ketchup.dates.toDate(dom.ketchup.dates.format(s2, kupManager.KupDatesFormats.ISO_DATE));
110
- }
111
- else if (dom.ketchup.objects.isTime(obj1)) {
112
- let manageSeconds = dom.ketchup.objects.isTimeWithSeconds(obj1);
113
- v1 = dom.ketchup.dates.toDate(dom.ketchup.dates.format(s1, manageSeconds
114
- ? kupManager.KupDatesFormats.ISO_TIME
115
- : kupManager.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
116
- v2 = dom.ketchup.dates.toDate(dom.ketchup.dates.format(s2, manageSeconds
117
- ? kupManager.KupDatesFormats.ISO_TIME
118
- : kupManager.KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
119
- }
120
- else if (dom.ketchup.objects.isTimestamp(obj1)) {
121
- v1 = dom.ketchup.dates.toDate(dom.ketchup.dates.format(s1, kupManager.KupDatesFormats.ISO_DATE_TIME));
122
- v2 = dom.ketchup.dates.toDate(dom.ketchup.dates.format(s2, kupManager.KupDatesFormats.ISO_DATE_TIME));
123
- }
124
- if (v1 > v2) {
125
- return sm * 1;
126
- }
127
- if (v1 < v2) {
128
- return sm * -1;
129
- }
130
- return 0;
131
- }
132
- /**
133
- * Given two strings to compare, the functions decides which string comes before the other or if they are equal.
134
- * This is meant as a replacement for the JavaScript function localCompare() which produces a slightly different result from
135
- * the Java version of compareTo().
136
- *
137
- * Re-implemented from java source method compareTo() of java.lang.String
138
- * @param t1 firstString the first string to be compared
139
- * @param t2 anotherString the another string to be compared to the first one
140
- * @returns the value 0 if the anotherString is equal to
141
- * firstString; a value less than 0 if firstString
142
- * is lexicographically less than the anotherString; and a
143
- * value greater than 0 if firstString is
144
- * lexicographically greater than the anotherString.
145
- */
146
- function localCompareAsInJava(t1, t2) {
147
- let t1Length = t1 == null ? 0 : t1.length;
148
- let t2Length = t2 == null ? 0 : t2.length;
149
- const lim = Math.min(t1Length, t2Length);
150
- let k = 0;
151
- while (k < lim) {
152
- const c1 = t1[k];
153
- const c2 = t2[k];
154
- if (c1 !== c2) {
155
- return c1.charCodeAt(0) - c2.charCodeAt(0);
156
- }
157
- k++;
158
- }
159
- return t1Length - t2Length;
160
- }
161
-
162
- exports.compareCell = compareCell;
163
- exports.compareValues = compareValues;
164
- exports.formatToNumber = formatToNumber;
165
- exports.getCellValueForDisplay = getCellValueForDisplay;
166
- exports.getColumnByName = getColumnByName;
167
- exports.getValueForDisplay = getValueForDisplay;
168
- exports.getValueForDisplay2 = getValueForDisplay2;