@sme.up/ketchup 5.2.0-SNAPSHOT → 5.2.1-SNAPSHOT

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 (131) hide show
  1. package/dist/cjs/{cell-utils-5b16c180.js → cell-utils-d96b2993.js} +2 -2
  2. package/dist/cjs/{f-button-3b9f32af.js → f-button-2b9b99b1.js} +2 -2
  3. package/dist/cjs/{f-cell-c6ad973a.js → f-cell-8351cb84.js} +8 -96
  4. package/dist/cjs/{f-chip-bed86c4a.js → f-chip-df59e1b0.js} +3 -3
  5. package/dist/cjs/{f-image-08a3d340.js → f-image-12bab3b5.js} +2 -2
  6. package/dist/cjs/f-text-field-e7c35b5b.js +94 -0
  7. package/dist/cjs/f-text-field-mdc-a67f5dfe.js +2852 -0
  8. package/dist/cjs/{index-8d7bb3be.js → index-eb556444.js} +2 -0
  9. package/dist/cjs/ketchup.cjs.js +3 -3
  10. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  11. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +365 -3041
  12. package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
  13. package/dist/cjs/kup-cell.cjs.entry.js +8 -7
  14. package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
  15. package/dist/cjs/kup-dash_2.cjs.entry.js +3 -3
  16. package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
  17. package/dist/cjs/kup-echart.cjs.entry.js +4 -4
  18. package/dist/cjs/kup-field.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
  20. package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
  21. package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
  22. package/dist/cjs/{kup-manager-4227f0a2.js → kup-manager-5c03da64.js} +373 -160
  23. package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
  24. package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
  25. package/dist/cjs/kup-photo-frame.cjs.entry.js +3 -3
  26. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  28. package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
  29. package/dist/cjs/loader.cjs.js +3 -3
  30. package/dist/cjs/{utils-b9df398c.js → utils-e99921c1.js} +1 -1
  31. package/dist/collection/assets/index.js +8 -0
  32. package/dist/collection/assets/kuptooltip.js +608 -0
  33. package/dist/collection/collection-manifest.json +2 -1
  34. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
  35. package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
  36. package/dist/collection/components/kup-card/kup-card.css +35 -0
  37. package/dist/collection/components/kup-card/kup-card.js +1 -0
  38. package/dist/collection/components/kup-data-table/kup-data-table.js +34 -5
  39. package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
  40. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
  41. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
  42. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
  43. package/dist/collection/managers/kup-debug/kup-debug.js +1 -0
  44. package/dist/collection/managers/kup-manager/kup-manager.js +12 -1
  45. package/dist/collection/managers/kup-math/kup-math.js +11 -1
  46. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
  47. package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
  48. package/dist/collection/managers/kup-tooltip/kup-tooltip.js +191 -0
  49. package/dist/collection/types/GenericTypes.js +1 -0
  50. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
  51. package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-f4bdbbc8.js} +2 -2
  52. package/dist/esm/{f-button-7e7607d8.js → f-button-54a49fd8.js} +2 -2
  53. package/dist/esm/{f-cell-e4d83c27.js → f-cell-d5dac50b.js} +8 -95
  54. package/dist/esm/{f-chip-51dfefaf.js → f-chip-a3035b4b.js} +3 -3
  55. package/dist/esm/{f-image-de331954.js → f-image-d32465e3.js} +2 -2
  56. package/dist/esm/f-text-field-c25cc63f.js +92 -0
  57. package/dist/esm/f-text-field-mdc-9fbbefc3.js +2850 -0
  58. package/dist/esm/{index-aeec9835.js → index-baeab1ac.js} +2 -1
  59. package/dist/esm/ketchup.js +3 -3
  60. package/dist/esm/kup-accordion.entry.js +4 -4
  61. package/dist/esm/kup-autocomplete_27.entry.js +349 -3025
  62. package/dist/esm/kup-calendar.entry.js +7 -7
  63. package/dist/esm/kup-cell.entry.js +8 -7
  64. package/dist/esm/kup-dash-list.entry.js +4 -4
  65. package/dist/esm/kup-dash_2.entry.js +3 -3
  66. package/dist/esm/kup-drawer.entry.js +3 -3
  67. package/dist/esm/kup-echart.entry.js +4 -4
  68. package/dist/esm/kup-field.entry.js +2 -2
  69. package/dist/esm/kup-iframe.entry.js +3 -3
  70. package/dist/esm/kup-lazy.entry.js +3 -3
  71. package/dist/esm/kup-magic-box.entry.js +4 -4
  72. package/dist/esm/{kup-manager-0ab94726.js → kup-manager-9316a184.js} +373 -160
  73. package/dist/esm/kup-nav-bar.entry.js +3 -3
  74. package/dist/esm/kup-numeric-picker.entry.js +419 -0
  75. package/dist/esm/kup-photo-frame.entry.js +3 -3
  76. package/dist/esm/kup-probe.entry.js +2 -2
  77. package/dist/esm/kup-qlik.entry.js +2 -2
  78. package/dist/esm/kup-snackbar.entry.js +5 -5
  79. package/dist/esm/loader.js +3 -3
  80. package/dist/esm/{utils-35c7a90d.js → utils-f24319a0.js} +1 -1
  81. package/dist/ketchup/ketchup.esm.js +1 -1
  82. package/dist/ketchup/{p-3813281b.entry.js → p-09d708c4.entry.js} +1 -1
  83. package/dist/ketchup/{p-4081f5f7.entry.js → p-11e72a8c.entry.js} +1 -1
  84. package/dist/ketchup/p-12773ca8.js +9 -0
  85. package/dist/ketchup/{p-0751aaf6.entry.js → p-203d6295.entry.js} +1 -1
  86. package/dist/ketchup/{p-33073f4a.js → p-34748c91.js} +1 -1
  87. package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
  88. package/dist/ketchup/{p-10c8d755.js → p-40f97429.js} +1 -1
  89. package/dist/ketchup/{p-3aab1f0d.entry.js → p-4173422f.entry.js} +1 -1
  90. package/dist/ketchup/{p-8f735633.entry.js → p-41741c28.entry.js} +1 -1
  91. package/dist/ketchup/{p-b5e1dbfa.entry.js → p-44192f30.entry.js} +1 -1
  92. package/dist/ketchup/{p-c314b1e6.js → p-44f8da2a.js} +1 -1
  93. package/dist/ketchup/p-4f56932b.js +1 -0
  94. package/dist/ketchup/p-669bde31.js +1 -0
  95. package/dist/ketchup/p-67842f1e.entry.js +1 -0
  96. package/dist/ketchup/{p-5d190cf5.js → p-7a74ad17.js} +1 -1
  97. package/dist/ketchup/{p-96101f09.entry.js → p-7ba8fa4a.entry.js} +1 -1
  98. package/dist/ketchup/p-7de0d7e1.js +1 -0
  99. package/dist/ketchup/{p-f9c41e20.entry.js → p-8418e8fa.entry.js} +1 -1
  100. package/dist/ketchup/p-96bf19aa.entry.js +1 -0
  101. package/dist/ketchup/{p-9bcda66f.entry.js → p-9a61d8dc.entry.js} +1 -1
  102. package/dist/ketchup/p-b0ddcce9.entry.js +9 -0
  103. package/dist/ketchup/{p-24df4f29.entry.js → p-b6c21223.entry.js} +1 -1
  104. package/dist/ketchup/{p-68fc1428.entry.js → p-bb8844bf.entry.js} +1 -1
  105. package/dist/ketchup/{p-67c64257.entry.js → p-c58a2a81.entry.js} +1 -1
  106. package/dist/ketchup/{p-3445be1e.entry.js → p-ca3d585b.entry.js} +1 -1
  107. package/dist/ketchup/{p-fea316ab.entry.js → p-e6709c26.entry.js} +1 -1
  108. package/dist/ketchup/{p-d7af8156.entry.js → p-e8e3c9da.entry.js} +1 -1
  109. package/dist/ketchup/p-ecb7069b.js +135 -0
  110. package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
  111. package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
  112. package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
  113. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -0
  114. package/dist/types/components/kup-data-table/kup-data-table.d.ts +4 -0
  115. package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
  116. package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
  117. package/dist/types/components.d.ts +144 -1
  118. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +10 -0
  119. package/dist/types/managers/kup-manager/kup-manager.d.ts +2 -0
  120. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
  121. package/dist/types/managers/kup-math/kup-math.d.ts +2 -1
  122. package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
  123. package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +40 -0
  124. package/dist/types/types/GenericTypes.d.ts +1 -0
  125. package/package.json +3 -3
  126. package/CHANGELOG.md +0 -5
  127. package/dist/ketchup/p-2d4f19f4.js +0 -1
  128. package/dist/ketchup/p-47b57d97.js +0 -1
  129. package/dist/ketchup/p-5186885c.entry.js +0 -1
  130. package/dist/ketchup/p-78223dc0.entry.js +0 -143
  131. package/dist/ketchup/p-ee33cbe9.js +0 -9
@@ -24,7 +24,7 @@ import { KupChipEventPayload, KupChipNode } from "./components/kup-chip/kup-chip
24
24
  import { FChipType } from "./f-components/f-chip/f-chip-declarations";
25
25
  import { KupColorPickerEventPayload } from "./components/kup-color-picker/kup-color-picker-declarations";
26
26
  import { KupComboboxEventPayload, KupComboboxIconClickEventPayload } from "./components/kup-combobox/kup-combobox-declarations";
27
- import { GroupLabelDisplayMode, GroupObject, KupDatatableClickEventPayload, KupDatatableColumnMenuEventPayload, KupDatatableColumnMoveEventPayload, KupDatatableColumnRemoveEventPayload, KupDataTableDataset, KupDatatableLoadMoreClickEventPayload, KupDatatableRowActionClickEventPayload, KupDatatableRowSelectedEventPayload, LoadMoreMode, PaginatorPos, SelectionMode, ShowGrid, SortObject, TotalsMap } from "./components/kup-data-table/kup-data-table-declarations";
27
+ import { GroupLabelDisplayMode, GroupObject, KupDatatableClickEventPayload, KupDatatableColumnMenuEventPayload, KupDatatableColumnMoveEventPayload, KupDatatableColumnRemoveEventPayload, KupDataTableDataset, KupDatatableLoadMoreClickEventPayload, KupDataTableRow, KupDatatableRowActionClickEventPayload, KupDatatableRowSelectedEventPayload, LoadMoreMode, PaginatorPos, SelectionMode, ShowGrid, SortObject, TotalsMap } from "./components/kup-data-table/kup-data-table-declarations";
28
28
  import { GenericFilter, KupGlobalFilterMode } from "./utils/filters/filters-declarations";
29
29
  import { KupDatePickerEventPayload } from "./components/kup-date-picker/kup-date-picker-declarations";
30
30
  import { KupDropdownButtonEventPayload } from "./components/kup-dropdown-button/kup-dropdown-button-declarations";
@@ -37,6 +37,7 @@ import { FImageData } from "./f-components/f-image/f-image-declarations";
37
37
  import { KupImageClickEventPayload } from "./components/kup-image/kup-image-declarations";
38
38
  import { KupLazyRender } from "./components/kup-lazy/kup-lazy-declarations";
39
39
  import { KupNavBarStyling } from "./components/kup-nav-bar/kup-nav-bar-declarations";
40
+ import { KupNumericPickerEventPayload } from "./components/kup-numeric-picker/kup-numeric-picker-declarations";
40
41
  import { KupQlikGrid, QlikServer } from "./components/kup-qlik/kup-qlik-declarations";
41
42
  import { KupRadioChangeEventPayload, KupRadioData } from "./components/kup-radio/kup-radio-declarations";
42
43
  import { KupRatingClickEventPayload } from "./components/kup-rating/kup-rating-declarations";
@@ -1102,6 +1103,10 @@ export namespace Components {
1102
1103
  * @returns List of props as object, each key will be a prop.
1103
1104
  */
1104
1105
  "getProps": (descriptions?: boolean) => Promise<GenericObject>;
1106
+ /**
1107
+ * This method will get the selected rows of the component.
1108
+ */
1109
+ "getSelectedRows": () => Promise<Array<KupDataTableRow>>;
1105
1110
  /**
1106
1111
  * When set to true it activates the global filter.
1107
1112
  */
@@ -2048,6 +2053,78 @@ export namespace Components {
2048
2053
  */
2049
2054
  "styling": KupNavBarStyling;
2050
2055
  }
2056
+ interface KupNumericPicker {
2057
+ /**
2058
+ * Custom style of the component.
2059
+ * @default ""
2060
+ * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
2061
+ */
2062
+ "customStyle": string;
2063
+ /**
2064
+ * Props of the sub-components.
2065
+ * @default null
2066
+ */
2067
+ "data": Object;
2068
+ /**
2069
+ * Defaults at false. When set to true, the component has decimals.
2070
+ * @default false
2071
+ */
2072
+ "decimals": boolean;
2073
+ /**
2074
+ * Defaults at false. When set to true, the component is disabled.
2075
+ * @default false
2076
+ */
2077
+ "disabled": boolean;
2078
+ /**
2079
+ * Used to retrieve component's props values.
2080
+ * @param descriptions - When provided and true, the result will be the list of props with their description.
2081
+ * @returns List of props as object, each key will be a prop.
2082
+ */
2083
+ "getProps": (descriptions?: boolean) => Promise<GenericObject>;
2084
+ /**
2085
+ * Retrieves the component's value.
2086
+ * @returns Value of the component.
2087
+ */
2088
+ "getValue": () => Promise<string>;
2089
+ /**
2090
+ * Sets the initial value of the component
2091
+ * @default ""
2092
+ */
2093
+ "initialValue": string;
2094
+ /**
2095
+ * when set, the component allows you to enter decimals with a maximum of characters.
2096
+ * @default null
2097
+ */
2098
+ "maxDecimals": number;
2099
+ /**
2100
+ * When set, the component allows you to enter integer numbers with a maximum of characters.
2101
+ * @default null
2102
+ */
2103
+ "maxIntegers": number;
2104
+ /**
2105
+ * When set, the component allows you to enter numbers with a maximum of characters, including decimals.
2106
+ * @default null
2107
+ */
2108
+ "maxLength": number;
2109
+ /**
2110
+ * Defaults at false. When set to true, the component has negative number.
2111
+ * @default false
2112
+ */
2113
+ "negative": boolean;
2114
+ /**
2115
+ * This method is used to trigger a new render of the component.
2116
+ */
2117
+ "refresh": () => Promise<void>;
2118
+ /**
2119
+ * Sets the focus to the component.
2120
+ */
2121
+ "setFocus": () => Promise<void>;
2122
+ /**
2123
+ * Sets the component's value.
2124
+ * @param value - Value to be set.
2125
+ */
2126
+ "setValue": (value: string) => Promise<void>;
2127
+ }
2051
2128
  interface KupPhotoFrame {
2052
2129
  /**
2053
2130
  * Custom style of the component.
@@ -3103,6 +3180,12 @@ declare global {
3103
3180
  prototype: HTMLKupNavBarElement;
3104
3181
  new (): HTMLKupNavBarElement;
3105
3182
  };
3183
+ interface HTMLKupNumericPickerElement extends Components.KupNumericPicker, HTMLStencilElement {
3184
+ }
3185
+ var HTMLKupNumericPickerElement: {
3186
+ prototype: HTMLKupNumericPickerElement;
3187
+ new (): HTMLKupNumericPickerElement;
3188
+ };
3106
3189
  interface HTMLKupPhotoFrameElement extends Components.KupPhotoFrame, HTMLStencilElement {
3107
3190
  }
3108
3191
  var HTMLKupPhotoFrameElement: {
@@ -3218,6 +3301,7 @@ declare global {
3218
3301
  "kup-list": HTMLKupListElement;
3219
3302
  "kup-magic-box": HTMLKupMagicBoxElement;
3220
3303
  "kup-nav-bar": HTMLKupNavBarElement;
3304
+ "kup-numeric-picker": HTMLKupNumericPickerElement;
3221
3305
  "kup-photo-frame": HTMLKupPhotoFrameElement;
3222
3306
  "kup-probe": HTMLKupProbeElement;
3223
3307
  "kup-progress-bar": HTMLKupProgressBarElement;
@@ -4875,6 +4959,63 @@ declare namespace LocalJSX {
4875
4959
  */
4876
4960
  "styling"?: KupNavBarStyling;
4877
4961
  }
4962
+ interface KupNumericPicker {
4963
+ /**
4964
+ * Custom style of the component.
4965
+ * @default ""
4966
+ * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
4967
+ */
4968
+ "customStyle"?: string;
4969
+ /**
4970
+ * Props of the sub-components.
4971
+ * @default null
4972
+ */
4973
+ "data"?: Object;
4974
+ /**
4975
+ * Defaults at false. When set to true, the component has decimals.
4976
+ * @default false
4977
+ */
4978
+ "decimals"?: boolean;
4979
+ /**
4980
+ * Defaults at false. When set to true, the component is disabled.
4981
+ * @default false
4982
+ */
4983
+ "disabled"?: boolean;
4984
+ /**
4985
+ * Sets the initial value of the component
4986
+ * @default ""
4987
+ */
4988
+ "initialValue"?: string;
4989
+ /**
4990
+ * when set, the component allows you to enter decimals with a maximum of characters.
4991
+ * @default null
4992
+ */
4993
+ "maxDecimals"?: number;
4994
+ /**
4995
+ * When set, the component allows you to enter integer numbers with a maximum of characters.
4996
+ * @default null
4997
+ */
4998
+ "maxIntegers"?: number;
4999
+ /**
5000
+ * When set, the component allows you to enter numbers with a maximum of characters, including decimals.
5001
+ * @default null
5002
+ */
5003
+ "maxLength"?: number;
5004
+ /**
5005
+ * Defaults at false. When set to true, the component has negative number.
5006
+ * @default false
5007
+ */
5008
+ "negative"?: boolean;
5009
+ "onKup-numericpicker-blur"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
5010
+ "onKup-numericpicker-change"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
5011
+ "onKup-numericpicker-cleariconclick"?: (event: CustomEvent<KupEventPayload>) => void;
5012
+ "onKup-numericpicker-click"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
5013
+ "onKup-numericpicker-focus"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
5014
+ "onKup-numericpicker-iconclick"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
5015
+ "onKup-numericpicker-input"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
5016
+ "onKup-numericpicker-itemclick"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
5017
+ "onKup-numericpicker-textfieldsubmit"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
5018
+ }
4878
5019
  interface KupPhotoFrame {
4879
5020
  /**
4880
5021
  * Custom style of the component.
@@ -5677,6 +5818,7 @@ declare namespace LocalJSX {
5677
5818
  "kup-list": KupList;
5678
5819
  "kup-magic-box": KupMagicBox;
5679
5820
  "kup-nav-bar": KupNavBar;
5821
+ "kup-numeric-picker": KupNumericPicker;
5680
5822
  "kup-photo-frame": KupPhotoFrame;
5681
5823
  "kup-probe": KupProbe;
5682
5824
  "kup-progress-bar": KupProgressBar;
@@ -5727,6 +5869,7 @@ declare module "@stencil/core" {
5727
5869
  "kup-list": LocalJSX.KupList & JSXBase.HTMLAttributes<HTMLKupListElement>;
5728
5870
  "kup-magic-box": LocalJSX.KupMagicBox & JSXBase.HTMLAttributes<HTMLKupMagicBoxElement>;
5729
5871
  "kup-nav-bar": LocalJSX.KupNavBar & JSXBase.HTMLAttributes<HTMLKupNavBarElement>;
5872
+ "kup-numeric-picker": LocalJSX.KupNumericPicker & JSXBase.HTMLAttributes<HTMLKupNumericPickerElement>;
5730
5873
  "kup-photo-frame": LocalJSX.KupPhotoFrame & JSXBase.HTMLAttributes<HTMLKupPhotoFrameElement>;
5731
5874
  "kup-probe": LocalJSX.KupProbe & JSXBase.HTMLAttributes<HTMLKupProbeElement>;
5732
5875
  "kup-progress-bar": LocalJSX.KupProgressBar & JSXBase.HTMLAttributes<HTMLKupProgressBarElement>;
@@ -17,6 +17,7 @@ import type { KupSearch } from '../kup-search/kup-search';
17
17
  import type { KupTheme } from '../kup-theme/kup-theme';
18
18
  import type { KupThemeJSON } from '../kup-theme/kup-theme-declarations';
19
19
  import type { KupToolbar } from '../kup-toolbar/kup-toolbar';
20
+ import type { KupTooltip } from '../kup-tooltip/kup-tooltip';
20
21
  import type { ResizeObserver } from 'resize-observer';
21
22
  import { KupMathLocales } from '../kup-math/kup-math-declarations';
22
23
  /**
@@ -45,6 +46,7 @@ export interface KupManager {
45
46
  search: KupSearch;
46
47
  theme: KupTheme;
47
48
  toolbar: KupToolbar;
49
+ tooltip: KupTooltip;
48
50
  utilities: KupManagerUtilities;
49
51
  showMagicBox: () => void;
50
52
  hideMagicBox: () => void;
@@ -71,6 +73,7 @@ export interface KupManagerClickCb {
71
73
  * Interface for the KupManager override settings.
72
74
  */
73
75
  export interface KupManagerInitialization {
76
+ assetsPath?: string;
74
77
  autoSetLocalization?: boolean;
75
78
  dates?: KupManagerDatesSettings;
76
79
  debug?: KupManagerDebugSettings;
@@ -80,6 +83,7 @@ export interface KupManagerInitialization {
80
83
  objects?: KupManagerObjectsSettings;
81
84
  scrollOnHover?: KupManagerScrollOnHoverSettings;
82
85
  theme?: KupManagerThemeSettings;
86
+ tooltip?: KupManagerTooltipSettings;
83
87
  }
84
88
  /**
85
89
  * KupDates initialization settings.
@@ -139,6 +143,12 @@ export interface KupManagerThemeSettings {
139
143
  list?: KupThemeJSON;
140
144
  name?: string;
141
145
  }
146
+ /**
147
+ * KupDates initialization settings.
148
+ */
149
+ export interface KupManagerTooltipSettings {
150
+ delay?: number;
151
+ }
142
152
  /**
143
153
  * KupTheme initialization settings.
144
154
  */
@@ -13,6 +13,7 @@ import { KupDates } from '../kup-dates/kup-dates';
13
13
  import { KupDatesLocales } from '../kup-dates/kup-dates-declarations';
14
14
  import { KupSearch } from '../kup-search/kup-search';
15
15
  import { KupMath } from '../kup-math/kup-math';
16
+ import { KupTooltip } from '../kup-tooltip/kup-tooltip';
16
17
  /**
17
18
  * This class controls every other Ketchup utility suite.
18
19
  * @module KupManager
@@ -34,6 +35,7 @@ export declare class KupManager {
34
35
  utilities: KupManagerUtilities;
35
36
  theme: KupTheme;
36
37
  toolbar: KupToolbar;
38
+ tooltip: KupTooltip;
37
39
  /**
38
40
  * Initializes KupManager.
39
41
  */
@@ -19,3 +19,9 @@ export declare enum KupMathLocales {
19
19
  pl = "pl",
20
20
  ru = "ru"
21
21
  }
22
+ /**
23
+ * Interface related to the numbers factory function.
24
+ */
25
+ export interface KupMathNumbers {
26
+ toLocaleString: (value: string) => string;
27
+ }
@@ -6,7 +6,7 @@ import 'numeral/locales/it';
6
6
  import 'numeral/locales/pl';
7
7
  import 'numeral/locales/ru';
8
8
  import { KupComponent } from '../../types/GenericTypes';
9
- import { KupMathFormulas, KupMathLocales } from './kup-math-declarations';
9
+ import { KupMathFormulas, KupMathLocales, KupMathNumbers } from './kup-math-declarations';
10
10
  /**
11
11
  * Handles mathematical operations and number formatting/conversion.
12
12
  * @module KupMath
@@ -15,6 +15,7 @@ export declare class KupMath {
15
15
  formulas: KupMathFormulas;
16
16
  locale: KupMathLocales;
17
17
  managedComponents: Set<KupComponent>;
18
+ numbers: KupMathNumbers;
18
19
  numeral: typeof numeral;
19
20
  /**
20
21
  * Initializes KupMath.
@@ -0,0 +1,8 @@
1
+ export interface KupTooltipAnchor extends HTMLElement {
2
+ kupTooltip: KupTooltipCallbacks;
3
+ }
4
+ export interface KupTooltipCallbacks {
5
+ enter: (e?: PointerEvent) => void;
6
+ over: (e?: PointerEvent) => void;
7
+ leave: (e?: PointerEvent) => void;
8
+ }
@@ -0,0 +1,40 @@
1
+ import { KupDynamicPositionAnchor } from '../kup-dynamic-position/kup-dynamic-position-declarations';
2
+ import { KupTooltipAnchor } from './kup-tooltip-declarations';
3
+ /**
4
+ * Handles application-wide tooltip using card component.
5
+ * @module KupTooltip
6
+ */
7
+ export declare class KupTooltip {
8
+ #private;
9
+ currentAnchor: KupTooltipAnchor;
10
+ delay: number;
11
+ element: HTMLKupCardElement;
12
+ managedElements: Set<KupTooltipAnchor>;
13
+ timeout: ReturnType<typeof setTimeout>;
14
+ /**
15
+ * Initializes KupTooltip.
16
+ */
17
+ constructor(delay?: number);
18
+ hide(): void;
19
+ show(anchor?: KupDynamicPositionAnchor, options?: Partial<HTMLKupCardElement>): void;
20
+ /**
21
+ * Returns whether an element was previously registered or not.
22
+ * @param {KupTooltipAnchor} element - Element to test.
23
+ * @returns {boolean} True if the element was registered.
24
+ */
25
+ isRegistered(element: KupTooltipAnchor): boolean;
26
+ /**
27
+ * Registers an HTMLElement as KupTooltipAnchor, triggering callback invocation on mouse over.
28
+ * @param {KupTooltipAnchor} element - The HTML element to be registered.
29
+ * @param {(e: PointerEvent) => void} cbEnter - Callback invoked when hovering on the the element for the first time.
30
+ * @param {(e: PointerEvent) => void} cbOver - Callback invoked when hovering on the element.
31
+ * @param {(e: PointerEvent) => void} cbLeave - Callback invoked when leaving the element.
32
+ */
33
+ register(element: KupTooltipAnchor, cbEnter?: (e: PointerEvent) => void, cbOver?: (e: PointerEvent) => void, cbLeave?: (e: PointerEvent) => void): void;
34
+ /**
35
+ * Unregisters an HTMLElement, preventing its attached callback from being invoked.
36
+ *
37
+ * @param {KupTooltipAnchor} element - - The HTML element to be unregistered.
38
+ */
39
+ unregister(element: KupTooltipAnchor): void;
40
+ }
@@ -88,6 +88,7 @@ export declare enum KupTagNames {
88
88
  LIST = "KUP-LIST",
89
89
  MAGIC_BOX = "KUP-MAGIC-BOX",
90
90
  NAV_BAR = "KUP-NAV-BAR",
91
+ NUMERIC_PICKER = "KUP-NUMERIC-PICKER",
91
92
  PROBE = "KUP-PROBE",
92
93
  PROGRESS_BAR = "KUP-PROGRESS-BAR",
93
94
  QLIK = "KUP-QLIK",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/ketchup",
3
- "version": "5.2.0-SNAPSHOT",
3
+ "version": "5.2.1-SNAPSHOT",
4
4
  "keywords": [
5
5
  "smeup",
6
6
  "KetchUP",
@@ -55,7 +55,7 @@
55
55
  "vanilla-picker": "^2.12.1"
56
56
  },
57
57
  "devDependencies": {
58
- "@stencil/core": "^2.14.1",
58
+ "@stencil/core": "^2.14.2",
59
59
  "@stencil/sass": "^1.4.1",
60
60
  "@types/d3-shape": "^2.1.0",
61
61
  "@types/geojson": "^7946.0.8",
@@ -67,7 +67,7 @@
67
67
  "jest": "^26.6.3",
68
68
  "jest-cli": "^26.6.3",
69
69
  "jest-environment-node": "^26.6.2",
70
- "puppeteer": "^10.0.0",
70
+ "puppeteer": "^13.5.1",
71
71
  "rimraf": "^3.0.2",
72
72
  "sass": "^1.46.0"
73
73
  },
package/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- # KetchUP Changelog
2
-
3
- ## 24/06/2019 - Pre release
4
-
5
- Migrated from Stencil@0.18.x to Stencil@1.0.7
@@ -1 +0,0 @@
1
- import{a as e,c,b as t}from"./p-ee33cbe9.js";import{h as n,a}from"./p-8be1337b.js";import{b as l}from"./p-33073f4a.js";import{d as i}from"./p-10c8d755.js";import{F as s}from"./p-47b57d97.js";import{F as r}from"./p-c314b1e6.js";const o=(e,c)=>n("div",Object.assign({class:`f-text-field ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.shaped?"kup-shaped":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.leadingLabel||e.trailingLabel?n("div",{class:"mdc-form-field "+(e.leadingLabel?"mdc-form-field--align-end":"")},[u(e),d(e),n("label",null,e.label)]):[u(e),d(e)],c);function u(c){const t=c.textArea||c.outlined;let l,i;if(!c.label||c.leadingLabel||c.trailingLabel||(l=n("label",{class:"mdc-floating-label",htmlFor:"kup-input"},c.label)),c.icon){let t,l="";if(Object.values(e).indexOf(c.icon)>-1)l=c.icon.replace("--","");else{let e=`url('${a(`./assets/svg/${c.icon}.svg`)}') no-repeat center`;t={mask:e,webkitMask:e}}i=n("span",{style:t,onClick:c.onIconClick,class:`mdc-text-field__icon kup-icon action ${l}`})}return n("div",{class:{"is-clearable":c.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":c.disabled,"mdc-text-field--filled":!c.fullWidth&&!t,"mdc-text-field--no-label":!c.label,"mdc-text-field--fullwidth":c.fullWidth,"mdc-text-field--outlined":t,"mdc-text-field--textarea":c.textArea,"mdc-text-field--with-leading-icon":c.icon&&!c.trailingIcon,"mdc-text-field--with-trailing-icon":c.icon&&c.trailingIcon}},c.textArea&&c.maxLength?n("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",c.maxLength):void 0,c.trailingIcon?void 0:i,c.textArea?n("span",{class:"mdc-text-field__resizer"},n("textarea",{class:"mdc-text-field__input",disabled:c.disabled,readOnly:c.readOnly,maxlength:c.maxLength,value:c.value,onBlur:c.onBlur,onClick:c.onClick,onChange:c.onChange,onFocus:c.onFocus,onInput:c.onInput,onKeyDown:c.onKeyDown})):n("input",{type:c.inputType?c.inputType:"text",step:c.step,min:c.min,max:c.max,class:"mdc-text-field__input",disabled:c.disabled,readOnly:c.readOnly,placeholder:c.fullWidth?c.label:void 0,maxlength:c.maxLength,value:c.value,onBlur:c.onBlur,onClick:c.onClick,onChange:c.onChange,onFocus:c.onFocus,onInput:c.onInput,onKeyDown:c.onKeyDown}),c.isClearable?n("span",{class:`mdc-text-field__icon kup-icon ${e.CLEAR.replace("--","")}`,onClick:c.onClearIconClick}):void 0,c.trailingIcon?i:void 0,c.fullWidth||t?void 0:l,t?n("div",{class:"mdc-notched-outline"},n("div",{class:"mdc-notched-outline__leading"}),n("div",{class:"mdc-notched-outline__notch"},l),n("div",{class:"mdc-notched-outline__trailing"})):n("span",{class:"mdc-line-ripple"}))}function d(e){if(!1!==e.helperEnabled){if(e.helper)return n("div",{class:"mdc-text-field-helper-line"},n("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!e.helperWhenFocused}},e.helper),e.maxLength&&!e.textArea?n("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",e.maxLength.toString()):void 0);if(e.maxLength&&!e.textArea)return n("div",{class:"mdc-text-field-helper-line"},n("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",e.maxLength))}}const p=[c.DATA_TABLE,c.TREE];var b,k,m,f,h;!function(e){e.CLICK="kup-cell-click",e.ICON_CLICK="kup-cell-iconclick",e.INPUT="kup-cell-input",e.UPDATE="kup-cell-update"}(b||(b={})),function(e){e.DENSE="dense",e.MEDIUM="medium",e.NONE="",e.WIDE="wide"}(k||(k={})),function(e){e.BG_DANGER="danger-bg",e.BG_GREEN="green-bg",e.BG_GREY="grey-bg",e.BG_ORANGE="orange-bg",e.BG_PURPLE="purple-bg",e.BG_SUCCESS="success-bg",e.BG_TEAL="teal-bg",e.BG_WARNING="warning-bg",e.C_BG_DANGER="c-danger-bg",e.C_BG_GREEN="c-green-bg",e.C_BG_GREY="c-grey-bg",e.C_BG_ORANGE="c-orange-bg",e.C_BG_PURPLE="c-purple-bg",e.C_BG_SUCCESS="c-success-bg",e.C_BG_TEAL="c-teal-bg",e.C_BG_WARNING="c-warning-bg",e.C_CENTERED="c-centered",e.C_FITTED="c-fitted",e.C_PADDED="c-padded",e.C_PADDED_HOR="c-padded-hor",e.C_PADDED_VER="c-padded-ver",e.C_ROUND="c-round",e.C_RIGHT_ALIGNED="c-right-aligned",e.C_SHAPED="c-shaped",e.C_TEXT_VERTICAL="c-vertical-text",e.CLICKABLE="clickable",e.HOVER_DISPLAY="display-on-hover",e.HOVER_EXPAND="expand-on-hover",e.HOVER_REDUCE="reduce-on-hover",e.INDICATOR_TOPRIGHT="top-right-indicator",e.LINK="link",e.MONOSPACE="monospace",e.OBJ="obj",e.SHAPED="shaped",e.TEXT_DANGER="danger-text",e.TEXT_INFO="info-text",e.TEXT_PRIMARY="primary-text",e.TEXT_PURPLE="purple-text",e.TEXT_SECONDARY="secondary-text",e.TEXT_STRONG="strong-text",e.TEXT_SUCCESS="success-text",e.TEXT_WARNING="warning-text",e.UNDERLINED="underlined"}(m||(m={})),function(e){e.AUTOCOMPLETE="ACP",e.BUTTON_LIST="BTN",e.CHART="GRA",e.CHECKBOX="CHK",e.CHIP="CHI",e.COLOR_PICKER="CLP",e.COMBOBOX="CMB",e.EDITOR="EDT",e.GAUGE="GAU",e.IMAGE="IMG",e.KNOB="KNB",e.PROGRESS_BAR="PGB",e.RADIO="RAD",e.RATING="RTG",e.TEXT_FIELD="ITX"}(f||(f={})),function(e){e.AUTOCOMPLETE="autocomplete",e.BAR="bar",e.BUTTON="button",e.BUTTON_LIST="button-list",e.CHART="chart",e.CHECKBOX="checkbox",e.CHIP="chips",e.COLOR_PICKER="color-picker",e.COMBOBOX="combobox",e.DATE="date",e.DATETIME="datetime",e.EDITOR="editor",e.GAUGE="gauge",e.ICON="icon",e.IMAGE="image",e.KNOB="knob",e.LINK="link",e.NUMBER="number",e.PROGRESS_BAR="progress-bar",e.RADIO="radio",e.RATING="rating",e.STRING="string",e.TIME="time"}(h||(h={}));const g=[h.AUTOCOMPLETE,h.CHECKBOX,h.COLOR_PICKER,h.COMBOBOX,h.DATE,h.NUMBER,h.RATING,h.STRING,h.TIME],x=[h.BAR,h.BUTTON,h.BUTTON_LIST,h.CHART,h.CHIP,h.COLOR_PICKER,h.GAUGE,h.KNOB,h.PROGRESS_BAR,h.RADIO,h.RATING],v=e=>{const c={"data-indeterminate":!!e.indeterminate},t={checkbox:!0,"checkbox--checked":!(!e.checked||e.indeterminate),"checkbox--disabled":!!e.disabled,"checkbox--indeterminate":!!e.indeterminate};return n("div",Object.assign({class:`f-checkbox ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),n("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},n("div",{class:t},n("input",Object.assign({type:"checkbox",class:"checkbox__native-control",checked:e.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus},c,{value:e.checked?"on":"off"})),n("div",{class:"checkbox__background",onClick:e.onChange},n("svg",{class:"checkbox__checkmark",viewBox:"0 0 24 24"},n("path",{class:"checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),n("div",{class:"checkbox__mixedmark"}))),e.label?n("label",null,e.label):void 0))},_=document.documentElement,j=e=>{const a=e.cell,u=e.column,d=e.row,k=e.shape?e.shape:a.shape?a.shape:u.shape?u.shape:null,j=!_.ketchup.objects.isEmptyKupObj(a.obj),O=!(!a.isEditable||!e.editable),$=e.previousValue!==a.value?a.value:"",y=function(e,c){const t=e.obj;if(c)switch(c.toUpperCase()){case f.AUTOCOMPLETE:return h.AUTOCOMPLETE;case f.BUTTON_LIST:return h.BUTTON_LIST;case f.CHART:return h.CHART;case f.CHECKBOX:return h.CHECKBOX;case f.CHIP:return h.CHIP;case f.COLOR_PICKER:return h.COLOR_PICKER;case f.COMBOBOX:return h.COMBOBOX;case f.EDITOR:return h.EDITOR;case f.GAUGE:return h.GAUGE;case f.IMAGE:return h.IMAGE;case f.KNOB:return h.KNOB;case f.PROGRESS_BAR:return h.PROGRESS_BAR;case f.RADIO:return h.RADIO;case f.RATING:return h.RATING;case f.TEXT_FIELD:return h.STRING}return _.ketchup.objects.isBar(t)?h.BAR:_.ketchup.objects.isButton(t)?h.BUTTON:_.ketchup.objects.isChart(t)?h.CHART:_.ketchup.objects.isCheckbox(t)?h.CHECKBOX:_.ketchup.objects.isColor(t)?h.COLOR_PICKER:_.ketchup.objects.isIcon(t)?h.ICON:_.ketchup.objects.isImage(t)?h.IMAGE:_.ketchup.objects.isLink(t)?h.LINK:_.ketchup.objects.isProgressBar(t)?h.PROGRESS_BAR:_.ketchup.objects.isRadio(t)?h.RADIO:_.ketchup.objects.isKupObjList(t)?h.CHIP:_.ketchup.objects.isNumber(t)?h.NUMBER:_.ketchup.objects.isDate(t)?h.DATE:_.ketchup.objects.isTimestamp(t)?h.DATETIME:_.ketchup.objects.isTime(t)?h.TIME:_.ketchup.objects.isVoCodver(t)?h.ICON:h.STRING}(a,k),C=Object.assign({},a.data);let B=a.cssClass?a.cssClass:u.cssClass?u.cssClass:"";const I={"f-cell":!0,[m.OBJ]:!!j,[y+"-cell"]:!0,[e.wrapperClass]:!!e.wrapperClass,[e.density]:!(!e.density||y===h.BAR),[B]:!!B};let z=$;O&&g.includes(y)?z=function(e,c,t,a,l){switch(e){case h.AUTOCOMPLETE:return n("kup-autocomplete",Object.assign({},t.data,{class:"kup-full-width","onkup-autocomplete-change":c=>w(c,l,e,b.UPDATE),"onkup-autocomplete-input":c=>w(c,l,e,b.INPUT),"onkup-autocomplete-iconclick":c=>w(c,l,e,b.ICON_CLICK)}));case h.CHECKBOX:return p.includes(l.component.rootElement.tagName)&&(c[m.C_CENTERED]=!0),n(v,Object.assign({},t.data,{onChange:c=>w(c,l,e,b.UPDATE)}));case h.COLOR_PICKER:return n("kup-color-picker",Object.assign({},t.data,{class:"kup-full-width",disabled:!1,"onkup-colorpicker-change":c=>w(c,l,e,b.UPDATE)}));case h.COMBOBOX:return n("kup-combobox",Object.assign({},t.data,{class:"kup-full-width","onkup-combobox-change":c=>w(c,l,e,b.UPDATE),"onkup-combobox-input":c=>w(c,l,e,b.INPUT),"onkup-combobox-iconclick":c=>w(c,l,e,b.ICON_CLICK)}));case h.DATE:return n("kup-date-picker",Object.assign({initialValue:t.value},t.data,{class:"kup-full-width","onkup-datepicker-change":c=>w(c,l,e,b.UPDATE),"onkup-datepicker-input":c=>w(c,l,e,b.INPUT)}));case h.RATING:return n("kup-rating",Object.assign({},t.data,{disabled:!1,"onkup-rating-click":c=>w(c,l,e,b.UPDATE)}));case h.TIME:return n("kup-time-picker",Object.assign({initialValue:t.value},t.data,{class:"kup-full-width","onkup-timepicker-change":c=>w(c,l,e,b.UPDATE),"onkup-timepicker-input":c=>w(c,l,e,b.INPUT)}));case h.NUMBER:c[m.C_RIGHT_ALIGNED]=!0;case h.STRING:return n(o,Object.assign({},t.data,{icon:t.icon?t.icon:a.icon?a.icon:null,fullWidth:!0,inputType:e===h.NUMBER?"number":null,value:e===h.NUMBER?i(t.value).toString():t.value,onChange:c=>w(c,l,e,b.UPDATE),onInput:c=>w(c,l,e,b.INPUT),onIconClick:c=>w(c,l,e,b.ICON_CLICK)}))}}(y,I,a,u,e):a.data&&x.includes(y)?(e.setSizes&&function(e,c,t){switch(e){case h.BAR:c.sizeY||(c.sizeY="26px");break;case h.BUTTON:let e="";c.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case h.CHART:c.sizeX||(c.sizeX="100%"),c.sizeY||(c.sizeY="100%");break;case h.CHIP:case h.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}(y,C,a),z=e.renderKup?function(e,c,t,a,l,o,u){switch(e){case h.BAR:return t.data?n("div",{style:{height:t.sizeY,width:"100%"}},n(s,Object.assign({},t))):n("kup-image",Object.assign({},t));case h.BUTTON:return p.includes(u.component.rootElement.tagName)&&(c[m.C_CENTERED]=!0),n("kup-button",Object.assign({},t,{"onkup-button-click":c=>w(c,u,e,b.CLICK)}));case h.BUTTON_LIST:return p.includes(u.component.rootElement.tagName)&&(c[m.C_CENTERED]=!0),t["data-storage"]={cell:a,row:l,column:o},n("kup-button-list",Object.assign({},t));case h.CHART:return p.includes(u.component.rootElement.tagName)&&(c[m.C_CENTERED]=!0),n("kup-chart",Object.assign({},t));case h.CHIP:return n(r,Object.assign({},t));case h.COLOR_PICKER:return n("kup-color-picker",Object.assign({},t,{class:"kup-full-width",disabled:!0}));case h.GAUGE:return n("kup-gauge",Object.assign({value:i(a.value),"width-component":"280px"},t));case h.KNOB:case h.PROGRESS_BAR:return n("kup-progress-bar",Object.assign({},t));case h.RADIO:return p.includes(u.component.rootElement.tagName)&&(c[m.C_CENTERED]=!0),t.disabled=l.readOnly,n("kup-radio",Object.assign({},t));case h.RATING:return n("kup-rating",Object.assign({},t,{disabled:!0}))}}(y,I,C,a,d,u,e):n("span",{class:"cell-"+y+" placeholder"})):(e.setSizes&&function(e,t,n,a){switch(e){case h.CHECKBOX:case h.ICON:t.sizeX||(t.sizeX="18px"),t.sizeY||(t.sizeY="18px"),n.style?n.style.height||(n.style.minHeight=t.sizeY):n.style={minHeight:t.sizeY};break;case h.IMAGE:a.component.rootElement.tagName===c.BOX?(t.sizeY||(t.sizeY="auto"),void 0===t.fit&&(t.fit=!0)):t.sizeX||(t.sizeX="auto"),t.sizeY||(t.sizeY="64px")}}(y,C,a,e),z=function(e,c,t,a,r,o,u){switch(e){case h.AUTOCOMPLETE:case h.COMBOBOX:case h.DATE:case h.DATETIME:case h.TIME:if(t&&""!=t){const e=l(o,r);return n("div",{class:"f-cell__text"},e)}return t;case h.CHECKBOX:return p.includes(u.component.rootElement.tagName)&&(a[m.C_CENTERED]=!0),n(s,{resource:c.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case h.EDITOR:return n("div",{innerHTML:r.value});case h.ICON:case h.IMAGE:return p.includes(u.component.rootElement.tagName)&&(a[m.C_CENTERED]=!0),c.badgeData&&(a[m.C_PADDED]=!0),n(s,Object.assign({},c));case h.LINK:return n("a",{href:t,target:"_blank"},r.value);case h.NUMBER:if(t&&""!=t){const e=i(r.value),c=l(o,r);return e<0&&(a[m.TEXT_DANGER]=!0),p.includes(u.component.rootElement.tagName)&&(a[m.C_RIGHT_ALIGNED]=!0),n("div",{class:"f-cell__text"},c)}return n("div",{class:"f-cell__text"},t);default:return n("div",{class:"f-cell__text"},t)}}(y,C,z,I,a,u,e));let F=null;!O&&(u.icon||a.icon)&&z&&(F=n(s,Object.assign({},{color:`rgba(var(${t.TEXT}-rgb), 0.375)`,resource:a.icon?a.icon:u.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let T=null;_.ketchup.debug.isDebug()&&j?T=a.obj.t+"; "+a.obj.p+"; "+a.obj.k+";":null!=a.title&&""!=a.title.trim()&&(T=a.title);let H=null;if(a.info){const e=Object.assign({},a.info);e.color||(e.color=`var(${t.INFO})`),e.icon||(e.icon="info"),H=n(s,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return n("div",{class:I,style:a.style},n("div",{class:"f-cell__content",style:a.styleContent,title:T},e.indents,H,F,z))};function w(e,c,t,n){const a=c.cell,i=c.column,s=c.component,r=c.row;let o="INPUT"===e.target.tagName?e.target.value:e.detail.value;if(n===b.UPDATE){switch(t){case h.AUTOCOMPLETE:case h.COMBOBOX:case h.DATE:case h.TIME:a.data&&(a.data.initialValue=o);break;case h.CHECKBOX:o="on"===o?"0":"1",a.data&&(a.data.checked="0"!==o)}a.obj&&(a.obj.k=o.toString()),a.value=o.toString(),a.displayedValue=null,a.displayedValue=l(i,a)}if(s&&s.rootElement){const c=new CustomEvent(n,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:s,id:s.rootElement.id,cell:a,column:i,event:e,row:r,type:t}});s.rootElement.dispatchEvent(c);try{s.refresh()}catch(e){}}}export{o as F,j as a,v as b,k as c}
@@ -1 +0,0 @@
1
- import{h as e,a as t}from"./p-8be1337b.js";import{b as s}from"./p-ee33cbe9.js";var i;!function(e){e.BAR="bar"}(i||(i={}));const a=a=>{let r,o;a.resource?a.resource.indexOf(".")>-1||a.resource.indexOf("/")>-1||a.resource.indexOf("\\")>-1?(o={"--kup_image_height":a.sizeY?a.sizeY:"auto","--kup_image_width":a.sizeX?a.sizeX:"100%"},r=e("img",{src:a.resource})):(o={"--kup_image_height":a.sizeY?a.sizeY:"100%","--kup_image_width":a.sizeX?a.sizeX:"100%"},r=function(i){const a={"f-image__icon":!0},r={background:i.color?i.color:`var(${s.ICON})`};if(i.resource.indexOf("--kup")>-1){let e=i.resource.replace("--","");a["kup-icon"]=!0,a[e]=!0}else{const e=t(`./assets/svg/${i.resource}.svg`);r.mask=`url('${e}') no-repeat center`,r.webkitMask=`url('${e}') no-repeat center`}return e("div",{class:a,style:r})}(a)):a.data&&(o={"--kup_image_height":a.sizeY?a.sizeY:"100%","--kup_image_width":a.sizeX?a.sizeX:"100%"},r=function(t){const s=[];let a=0;for(let r=0;r<t.length;r++){let o;t[r].shape||(t[r].shape=i.BAR),t[r].color||(t[r].color="transparent"),t[r].height||(t[r].height="100%"),t[r].width||(t[r].width="100%");const n="step-"+r,c="css-step bottom-aligned",l={backgroundColor:t[r].color,left:a+"%",height:t[r].height,width:t[r].width};a+=parseFloat(t[r].width),o=e("span",{id:n,class:c,style:l}),s.push(o)}return e("div",{class:"f-image__css"},s)}(a.data));const n=[];if(a.badgeData)for(let t=0;t<a.badgeData.length;t++)n.push(e("kup-badge",Object.assign({},a.badgeData[t])));return e("div",Object.assign({class:`f-image ${a.wrapperClass?a.wrapperClass:""} ${a.fit?"kup-fit":""}`},a.dataSet,{id:a.id,style:o,title:a.title,onClick:a.onClick}),r,...n)};export{a as F}
@@ -1 +0,0 @@
1
- import{r as t,f as s,h as i,H as e,g as h}from"./p-8be1337b.js";import{k as o,m as n,i as r}from"./p-ee33cbe9.js";import{g as l,s as a}from"./p-10c8d755.js";import{c}from"./p-97e8ea42.js";import{c as d,a as p}from"./p-2d4f19f4.js";import"./p-33073f4a.js";import"./p-47b57d97.js";import"./p-c314b1e6.js";var m;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the cell.",t.density="The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.",t.dragEnabled="When set to true, the component is draggable."}(m||(m={}));const u=class{constructor(s){t(this,s),this.customStyle="",this.data=null,this.density=d.NONE,this.dragEnabled=!1,this.kupManager=o()}async addCssClasses(t){if(this.data.cssClass||(this.data.cssClass=""),t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)<0&&(this.data.cssClass+=` ${i}`)}this.refresh()}async getProps(t){return l(this,m,t)}async refresh(){s(this)}async removeCssClasses(t){if(this.data.cssClass){if(t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)>0&&(this.data.cssClass=this.data.cssClass.replace(new RegExp(i,"g"),""))}this.refresh()}}async setProps(t){a(this,m,t)}didRenderInteractables(){if(this.dragEnabled){const t=()=>({cell:this.data,column:this.generateColumn(),id:this.rootElement.id,multiple:!1,row:this.generateRow()});this.kupManager.interact.draggable(this.rootElement.shadowRoot.querySelector("#"+c),{cursorChecker:()=>null},{callback:t},n.BADGE)}}generateColumn(){return{name:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:"KUPCELL",title:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:this.kupManager.language.translate(r.EMPTY_OBJECT)}}generateRow(){const t=this.generateColumn(),s={cells:{}};return s.cells[t.name]=this.data,s}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.didRenderInteractables(),this.kupManager.debug.logRender(this,!0)}render(){const t={cell:this.data,column:this.generateColumn(),component:this,density:this.density,editable:this.data.isEditable,renderKup:!0,row:this.generateRow()};return i(e,null,i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:c},i(p,Object.assign({},t))))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return h(this)}};u.style=":host{display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}";export{u as kup_cell}