@sme.up/ketchup 5.2.0-SNAPSHOT → 5.2.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.
- package/dist/cjs/{cell-utils-5b16c180.js → cell-utils-153fb565.js} +2 -2
- package/dist/cjs/{f-button-3b9f32af.js → f-button-8f07d095.js} +2 -2
- package/dist/cjs/{f-cell-c6ad973a.js → f-cell-c08ad501.js} +8 -96
- package/dist/cjs/{f-chip-bed86c4a.js → f-chip-aa8d9253.js} +3 -3
- package/dist/cjs/{f-image-08a3d340.js → f-image-42025f08.js} +2 -2
- package/dist/cjs/f-text-field-b6300c8a.js +94 -0
- package/dist/cjs/f-text-field-mdc-a67f5dfe.js +2852 -0
- package/dist/cjs/{index-8d7bb3be.js → index-eb556444.js} +2 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +455 -3068
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +8 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +3 -3
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/kup-echart.cjs.entry.js +4 -4
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form-editor.cjs.entry.js +404 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-4227f0a2.js → kup-manager-04dc9671.js} +8391 -332
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-b9df398c.js → utils-a201de8b.js} +1 -1
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/assets/form-editor.js +338 -0
- package/dist/collection/assets/index.js +12 -0
- package/dist/collection/assets/kuptooltip.js +608 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +35 -0
- package/dist/collection/components/kup-card/kup-card.js +2 -2
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +44 -12
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.css +1 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +23 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.css +80 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.js +561 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
- package/dist/collection/components/kup-tree/kup-tree.css +10 -3
- package/dist/collection/components/kup-tree/kup-tree.js +75 -13
- package/dist/collection/managers/kup-debug/kup-debug.js +1 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +28 -1
- package/dist/collection/managers/kup-math/kup-math.js +11 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +3 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +191 -0
- package/dist/collection/types/GenericTypes.js +2 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-55b4278f.js} +2 -2
- package/dist/esm/{f-button-7e7607d8.js → f-button-ea5059eb.js} +2 -2
- package/dist/esm/{f-cell-e4d83c27.js → f-cell-d767085a.js} +8 -95
- package/dist/esm/{f-chip-51dfefaf.js → f-chip-e99f71a0.js} +3 -3
- package/dist/esm/{f-image-de331954.js → f-image-7bea0647.js} +2 -2
- package/dist/esm/f-text-field-662a1d4b.js +92 -0
- package/dist/esm/f-text-field-mdc-9fbbefc3.js +2850 -0
- package/dist/esm/{index-aeec9835.js → index-baeab1ac.js} +2 -1
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +439 -3052
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +8 -7
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +3 -3
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/kup-echart.entry.js +4 -4
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-form-editor.entry.js +400 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-0ab94726.js → kup-manager-25d71df2.js} +8391 -332
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-35c7a90d.js → utils-e4ea8310.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-67c64257.entry.js → p-04a941d9.entry.js} +1 -1
- package/dist/ketchup/{p-fea316ab.entry.js → p-12e5c8b7.entry.js} +1 -1
- package/dist/ketchup/{p-b5e1dbfa.entry.js → p-1e727a6c.entry.js} +1 -1
- package/dist/ketchup/{p-24df4f29.entry.js → p-2d322313.entry.js} +1 -1
- package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
- package/dist/ketchup/p-38dbf4b3.entry.js +1 -0
- package/dist/ketchup/{p-5d190cf5.js → p-3b867a04.js} +1 -1
- package/dist/ketchup/{p-3813281b.entry.js → p-3e4a0ce7.entry.js} +1 -1
- package/dist/ketchup/{p-f9c41e20.entry.js → p-423f8dd0.entry.js} +1 -1
- package/dist/ketchup/p-44ffd4c9.js +30 -0
- package/dist/ketchup/{p-33073f4a.js → p-52aaf54a.js} +1 -1
- package/dist/ketchup/p-5969f1e8.entry.js +9 -0
- package/dist/ketchup/p-65c045fa.entry.js +1 -0
- package/dist/ketchup/{p-8f735633.entry.js → p-700b2d70.entry.js} +1 -1
- package/dist/ketchup/{p-68fc1428.entry.js → p-72ce09e3.entry.js} +1 -1
- package/dist/ketchup/p-76cffe8d.js +1 -0
- package/dist/ketchup/{p-96101f09.entry.js → p-787615f8.entry.js} +1 -1
- package/dist/ketchup/p-8bd00b7f.entry.js +1 -0
- package/dist/ketchup/p-937cd436.js +1 -0
- package/dist/ketchup/{p-3445be1e.entry.js → p-95754af8.entry.js} +1 -1
- package/dist/ketchup/{p-d7af8156.entry.js → p-9a3c41c2.entry.js} +1 -1
- package/dist/ketchup/p-a341d44c.entry.js +1 -0
- package/dist/ketchup/{p-9bcda66f.entry.js → p-af8dad7a.entry.js} +1 -1
- package/dist/ketchup/{p-0751aaf6.entry.js → p-dacd04a5.entry.js} +1 -1
- package/dist/ketchup/{p-10c8d755.js → p-dae6ef38.js} +1 -1
- package/dist/ketchup/{p-c314b1e6.js → p-e20d4661.js} +1 -1
- package/dist/ketchup/p-ecb7069b.js +135 -0
- package/dist/ketchup/{p-4081f5f7.entry.js → p-f4fbf6df.entry.js} +1 -1
- package/dist/ketchup/p-ffa8ad2d.js +1 -0
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -0
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +4 -0
- package/dist/types/components/kup-form-editor/kup-form-editor-declarations.d.ts +79 -0
- package/dist/types/components/kup-form-editor/kup-form-editor.d.ts +72 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -1
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -1
- package/dist/types/components.d.ts +196 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +12 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +14 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +2 -1
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +40 -0
- package/dist/types/types/GenericTypes.d.ts +2 -0
- package/package.json +4 -3
- package/CHANGELOG.md +0 -5
- package/dist/ketchup/p-2d4f19f4.js +0 -1
- package/dist/ketchup/p-3aab1f0d.entry.js +0 -1
- package/dist/ketchup/p-47b57d97.js +0 -1
- package/dist/ketchup/p-5186885c.entry.js +0 -1
- package/dist/ketchup/p-78223dc0.entry.js +0 -143
- 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";
|
|
@@ -32,11 +32,13 @@ import { KupEchartClickEventPayload, KupEchartLegendPlacement, KupEchartMaps, Ku
|
|
|
32
32
|
import { GeoJSON } from "geojson";
|
|
33
33
|
import { XAXisComponentOption, YAXisComponentOption } from "echarts";
|
|
34
34
|
import { KupFieldChangeEvent, KupFieldSubmitEvent } from "./components/kup-field/kup-field-declarations";
|
|
35
|
+
import { KupForm, KupFormEditorEventPayload } from "./components/kup-form-editor/kup-form-editor-declarations";
|
|
35
36
|
import { KupBadge } from "./components/kup-badge/kup-badge";
|
|
36
37
|
import { FImageData } from "./f-components/f-image/f-image-declarations";
|
|
37
38
|
import { KupImageClickEventPayload } from "./components/kup-image/kup-image-declarations";
|
|
38
39
|
import { KupLazyRender } from "./components/kup-lazy/kup-lazy-declarations";
|
|
39
40
|
import { KupNavBarStyling } from "./components/kup-nav-bar/kup-nav-bar-declarations";
|
|
41
|
+
import { KupNumericPickerEventPayload } from "./components/kup-numeric-picker/kup-numeric-picker-declarations";
|
|
40
42
|
import { KupQlikGrid, QlikServer } from "./components/kup-qlik/kup-qlik-declarations";
|
|
41
43
|
import { KupRadioChangeEventPayload, KupRadioData } from "./components/kup-radio/kup-radio-declarations";
|
|
42
44
|
import { KupRatingClickEventPayload } from "./components/kup-rating/kup-rating-declarations";
|
|
@@ -1102,6 +1104,10 @@ export namespace Components {
|
|
|
1102
1104
|
* @returns List of props as object, each key will be a prop.
|
|
1103
1105
|
*/
|
|
1104
1106
|
"getProps": (descriptions?: boolean) => Promise<GenericObject>;
|
|
1107
|
+
/**
|
|
1108
|
+
* This method will get the selected rows of the component.
|
|
1109
|
+
*/
|
|
1110
|
+
"getSelectedRows": () => Promise<Array<KupDataTableRow>>;
|
|
1105
1111
|
/**
|
|
1106
1112
|
* When set to true it activates the global filter.
|
|
1107
1113
|
*/
|
|
@@ -1625,6 +1631,34 @@ export namespace Components {
|
|
|
1625
1631
|
*/
|
|
1626
1632
|
"type": string;
|
|
1627
1633
|
}
|
|
1634
|
+
interface KupFormEditor {
|
|
1635
|
+
/**
|
|
1636
|
+
* Custom style of the component.
|
|
1637
|
+
* @default ""
|
|
1638
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
1639
|
+
*/
|
|
1640
|
+
"customStyle": string;
|
|
1641
|
+
/**
|
|
1642
|
+
* The data of the component.
|
|
1643
|
+
* @default false
|
|
1644
|
+
*/
|
|
1645
|
+
"data": KupForm;
|
|
1646
|
+
/**
|
|
1647
|
+
* Used to retrieve component's props values.
|
|
1648
|
+
* @param descriptions - When provided and true, the result will be the list of props with their description.
|
|
1649
|
+
* @returns List of props as object, each key will be a prop.
|
|
1650
|
+
*/
|
|
1651
|
+
"getProps": (descriptions?: boolean) => Promise<GenericObject>;
|
|
1652
|
+
/**
|
|
1653
|
+
* This method is used to trigger a new render of the component.
|
|
1654
|
+
*/
|
|
1655
|
+
"refresh": () => Promise<void>;
|
|
1656
|
+
/**
|
|
1657
|
+
* Sets the props to the component.
|
|
1658
|
+
* @param props - Object containing props that will be set to the component.
|
|
1659
|
+
*/
|
|
1660
|
+
"setProps": (props: GenericObject) => Promise<void>;
|
|
1661
|
+
}
|
|
1628
1662
|
interface KupGauge {
|
|
1629
1663
|
/**
|
|
1630
1664
|
* Sets how much the arc of the gauge should be thick.
|
|
@@ -2048,6 +2082,78 @@ export namespace Components {
|
|
|
2048
2082
|
*/
|
|
2049
2083
|
"styling": KupNavBarStyling;
|
|
2050
2084
|
}
|
|
2085
|
+
interface KupNumericPicker {
|
|
2086
|
+
/**
|
|
2087
|
+
* Custom style of the component.
|
|
2088
|
+
* @default ""
|
|
2089
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
2090
|
+
*/
|
|
2091
|
+
"customStyle": string;
|
|
2092
|
+
/**
|
|
2093
|
+
* Props of the sub-components.
|
|
2094
|
+
* @default null
|
|
2095
|
+
*/
|
|
2096
|
+
"data": Object;
|
|
2097
|
+
/**
|
|
2098
|
+
* Defaults at false. When set to true, the component has decimals.
|
|
2099
|
+
* @default false
|
|
2100
|
+
*/
|
|
2101
|
+
"decimals": boolean;
|
|
2102
|
+
/**
|
|
2103
|
+
* Defaults at false. When set to true, the component is disabled.
|
|
2104
|
+
* @default false
|
|
2105
|
+
*/
|
|
2106
|
+
"disabled": boolean;
|
|
2107
|
+
/**
|
|
2108
|
+
* Used to retrieve component's props values.
|
|
2109
|
+
* @param descriptions - When provided and true, the result will be the list of props with their description.
|
|
2110
|
+
* @returns List of props as object, each key will be a prop.
|
|
2111
|
+
*/
|
|
2112
|
+
"getProps": (descriptions?: boolean) => Promise<GenericObject>;
|
|
2113
|
+
/**
|
|
2114
|
+
* Retrieves the component's value.
|
|
2115
|
+
* @returns Value of the component.
|
|
2116
|
+
*/
|
|
2117
|
+
"getValue": () => Promise<string>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Sets the initial value of the component
|
|
2120
|
+
* @default ""
|
|
2121
|
+
*/
|
|
2122
|
+
"initialValue": string;
|
|
2123
|
+
/**
|
|
2124
|
+
* when set, the component allows you to enter decimals with a maximum of characters.
|
|
2125
|
+
* @default null
|
|
2126
|
+
*/
|
|
2127
|
+
"maxDecimals": number;
|
|
2128
|
+
/**
|
|
2129
|
+
* When set, the component allows you to enter integer numbers with a maximum of characters.
|
|
2130
|
+
* @default null
|
|
2131
|
+
*/
|
|
2132
|
+
"maxIntegers": number;
|
|
2133
|
+
/**
|
|
2134
|
+
* When set, the component allows you to enter numbers with a maximum of characters, including decimals.
|
|
2135
|
+
* @default null
|
|
2136
|
+
*/
|
|
2137
|
+
"maxLength": number;
|
|
2138
|
+
/**
|
|
2139
|
+
* Defaults at false. When set to true, the component has negative number.
|
|
2140
|
+
* @default false
|
|
2141
|
+
*/
|
|
2142
|
+
"negative": boolean;
|
|
2143
|
+
/**
|
|
2144
|
+
* This method is used to trigger a new render of the component.
|
|
2145
|
+
*/
|
|
2146
|
+
"refresh": () => Promise<void>;
|
|
2147
|
+
/**
|
|
2148
|
+
* Sets the focus to the component.
|
|
2149
|
+
*/
|
|
2150
|
+
"setFocus": () => Promise<void>;
|
|
2151
|
+
/**
|
|
2152
|
+
* Sets the component's value.
|
|
2153
|
+
* @param value - Value to be set.
|
|
2154
|
+
*/
|
|
2155
|
+
"setValue": (value: string) => Promise<void>;
|
|
2156
|
+
}
|
|
2051
2157
|
interface KupPhotoFrame {
|
|
2052
2158
|
/**
|
|
2053
2159
|
* Custom style of the component.
|
|
@@ -3055,6 +3161,12 @@ declare global {
|
|
|
3055
3161
|
prototype: HTMLKupFieldElement;
|
|
3056
3162
|
new (): HTMLKupFieldElement;
|
|
3057
3163
|
};
|
|
3164
|
+
interface HTMLKupFormEditorElement extends Components.KupFormEditor, HTMLStencilElement {
|
|
3165
|
+
}
|
|
3166
|
+
var HTMLKupFormEditorElement: {
|
|
3167
|
+
prototype: HTMLKupFormEditorElement;
|
|
3168
|
+
new (): HTMLKupFormEditorElement;
|
|
3169
|
+
};
|
|
3058
3170
|
interface HTMLKupGaugeElement extends Components.KupGauge, HTMLStencilElement {
|
|
3059
3171
|
}
|
|
3060
3172
|
var HTMLKupGaugeElement: {
|
|
@@ -3103,6 +3215,12 @@ declare global {
|
|
|
3103
3215
|
prototype: HTMLKupNavBarElement;
|
|
3104
3216
|
new (): HTMLKupNavBarElement;
|
|
3105
3217
|
};
|
|
3218
|
+
interface HTMLKupNumericPickerElement extends Components.KupNumericPicker, HTMLStencilElement {
|
|
3219
|
+
}
|
|
3220
|
+
var HTMLKupNumericPickerElement: {
|
|
3221
|
+
prototype: HTMLKupNumericPickerElement;
|
|
3222
|
+
new (): HTMLKupNumericPickerElement;
|
|
3223
|
+
};
|
|
3106
3224
|
interface HTMLKupPhotoFrameElement extends Components.KupPhotoFrame, HTMLStencilElement {
|
|
3107
3225
|
}
|
|
3108
3226
|
var HTMLKupPhotoFrameElement: {
|
|
@@ -3210,6 +3328,7 @@ declare global {
|
|
|
3210
3328
|
"kup-dropdown-button": HTMLKupDropdownButtonElement;
|
|
3211
3329
|
"kup-echart": HTMLKupEchartElement;
|
|
3212
3330
|
"kup-field": HTMLKupFieldElement;
|
|
3331
|
+
"kup-form-editor": HTMLKupFormEditorElement;
|
|
3213
3332
|
"kup-gauge": HTMLKupGaugeElement;
|
|
3214
3333
|
"kup-grid": HTMLKupGridElement;
|
|
3215
3334
|
"kup-iframe": HTMLKupIframeElement;
|
|
@@ -3218,6 +3337,7 @@ declare global {
|
|
|
3218
3337
|
"kup-list": HTMLKupListElement;
|
|
3219
3338
|
"kup-magic-box": HTMLKupMagicBoxElement;
|
|
3220
3339
|
"kup-nav-bar": HTMLKupNavBarElement;
|
|
3340
|
+
"kup-numeric-picker": HTMLKupNumericPickerElement;
|
|
3221
3341
|
"kup-photo-frame": HTMLKupPhotoFrameElement;
|
|
3222
3342
|
"kup-probe": HTMLKupProbeElement;
|
|
3223
3343
|
"kup-progress-bar": HTMLKupProgressBarElement;
|
|
@@ -4576,6 +4696,20 @@ declare namespace LocalJSX {
|
|
|
4576
4696
|
*/
|
|
4577
4697
|
"type"?: string;
|
|
4578
4698
|
}
|
|
4699
|
+
interface KupFormEditor {
|
|
4700
|
+
/**
|
|
4701
|
+
* Custom style of the component.
|
|
4702
|
+
* @default ""
|
|
4703
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
4704
|
+
*/
|
|
4705
|
+
"customStyle"?: string;
|
|
4706
|
+
/**
|
|
4707
|
+
* The data of the component.
|
|
4708
|
+
* @default false
|
|
4709
|
+
*/
|
|
4710
|
+
"data"?: KupForm;
|
|
4711
|
+
"onKup-formeditor-save"?: (event: CustomEvent<KupFormEditorEventPayload>) => void;
|
|
4712
|
+
}
|
|
4579
4713
|
interface KupGauge {
|
|
4580
4714
|
/**
|
|
4581
4715
|
* Sets how much the arc of the gauge should be thick.
|
|
@@ -4875,6 +5009,63 @@ declare namespace LocalJSX {
|
|
|
4875
5009
|
*/
|
|
4876
5010
|
"styling"?: KupNavBarStyling;
|
|
4877
5011
|
}
|
|
5012
|
+
interface KupNumericPicker {
|
|
5013
|
+
/**
|
|
5014
|
+
* Custom style of the component.
|
|
5015
|
+
* @default ""
|
|
5016
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
5017
|
+
*/
|
|
5018
|
+
"customStyle"?: string;
|
|
5019
|
+
/**
|
|
5020
|
+
* Props of the sub-components.
|
|
5021
|
+
* @default null
|
|
5022
|
+
*/
|
|
5023
|
+
"data"?: Object;
|
|
5024
|
+
/**
|
|
5025
|
+
* Defaults at false. When set to true, the component has decimals.
|
|
5026
|
+
* @default false
|
|
5027
|
+
*/
|
|
5028
|
+
"decimals"?: boolean;
|
|
5029
|
+
/**
|
|
5030
|
+
* Defaults at false. When set to true, the component is disabled.
|
|
5031
|
+
* @default false
|
|
5032
|
+
*/
|
|
5033
|
+
"disabled"?: boolean;
|
|
5034
|
+
/**
|
|
5035
|
+
* Sets the initial value of the component
|
|
5036
|
+
* @default ""
|
|
5037
|
+
*/
|
|
5038
|
+
"initialValue"?: string;
|
|
5039
|
+
/**
|
|
5040
|
+
* when set, the component allows you to enter decimals with a maximum of characters.
|
|
5041
|
+
* @default null
|
|
5042
|
+
*/
|
|
5043
|
+
"maxDecimals"?: number;
|
|
5044
|
+
/**
|
|
5045
|
+
* When set, the component allows you to enter integer numbers with a maximum of characters.
|
|
5046
|
+
* @default null
|
|
5047
|
+
*/
|
|
5048
|
+
"maxIntegers"?: number;
|
|
5049
|
+
/**
|
|
5050
|
+
* When set, the component allows you to enter numbers with a maximum of characters, including decimals.
|
|
5051
|
+
* @default null
|
|
5052
|
+
*/
|
|
5053
|
+
"maxLength"?: number;
|
|
5054
|
+
/**
|
|
5055
|
+
* Defaults at false. When set to true, the component has negative number.
|
|
5056
|
+
* @default false
|
|
5057
|
+
*/
|
|
5058
|
+
"negative"?: boolean;
|
|
5059
|
+
"onKup-numericpicker-blur"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
|
|
5060
|
+
"onKup-numericpicker-change"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
|
|
5061
|
+
"onKup-numericpicker-cleariconclick"?: (event: CustomEvent<KupEventPayload>) => void;
|
|
5062
|
+
"onKup-numericpicker-click"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
|
|
5063
|
+
"onKup-numericpicker-focus"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
|
|
5064
|
+
"onKup-numericpicker-iconclick"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
|
|
5065
|
+
"onKup-numericpicker-input"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
|
|
5066
|
+
"onKup-numericpicker-itemclick"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
|
|
5067
|
+
"onKup-numericpicker-textfieldsubmit"?: (event: CustomEvent<KupNumericPickerEventPayload>) => void;
|
|
5068
|
+
}
|
|
4878
5069
|
interface KupPhotoFrame {
|
|
4879
5070
|
/**
|
|
4880
5071
|
* Custom style of the component.
|
|
@@ -5669,6 +5860,7 @@ declare namespace LocalJSX {
|
|
|
5669
5860
|
"kup-dropdown-button": KupDropdownButton;
|
|
5670
5861
|
"kup-echart": KupEchart;
|
|
5671
5862
|
"kup-field": KupField;
|
|
5863
|
+
"kup-form-editor": KupFormEditor;
|
|
5672
5864
|
"kup-gauge": KupGauge;
|
|
5673
5865
|
"kup-grid": KupGrid;
|
|
5674
5866
|
"kup-iframe": KupIframe;
|
|
@@ -5677,6 +5869,7 @@ declare namespace LocalJSX {
|
|
|
5677
5869
|
"kup-list": KupList;
|
|
5678
5870
|
"kup-magic-box": KupMagicBox;
|
|
5679
5871
|
"kup-nav-bar": KupNavBar;
|
|
5872
|
+
"kup-numeric-picker": KupNumericPicker;
|
|
5680
5873
|
"kup-photo-frame": KupPhotoFrame;
|
|
5681
5874
|
"kup-probe": KupProbe;
|
|
5682
5875
|
"kup-progress-bar": KupProgressBar;
|
|
@@ -5719,6 +5912,7 @@ declare module "@stencil/core" {
|
|
|
5719
5912
|
"kup-dropdown-button": LocalJSX.KupDropdownButton & JSXBase.HTMLAttributes<HTMLKupDropdownButtonElement>;
|
|
5720
5913
|
"kup-echart": LocalJSX.KupEchart & JSXBase.HTMLAttributes<HTMLKupEchartElement>;
|
|
5721
5914
|
"kup-field": LocalJSX.KupField & JSXBase.HTMLAttributes<HTMLKupFieldElement>;
|
|
5915
|
+
"kup-form-editor": LocalJSX.KupFormEditor & JSXBase.HTMLAttributes<HTMLKupFormEditorElement>;
|
|
5722
5916
|
"kup-gauge": LocalJSX.KupGauge & JSXBase.HTMLAttributes<HTMLKupGaugeElement>;
|
|
5723
5917
|
"kup-grid": LocalJSX.KupGrid & JSXBase.HTMLAttributes<HTMLKupGridElement>;
|
|
5724
5918
|
"kup-iframe": LocalJSX.KupIframe & JSXBase.HTMLAttributes<HTMLKupIframeElement>;
|
|
@@ -5727,6 +5921,7 @@ declare module "@stencil/core" {
|
|
|
5727
5921
|
"kup-list": LocalJSX.KupList & JSXBase.HTMLAttributes<HTMLKupListElement>;
|
|
5728
5922
|
"kup-magic-box": LocalJSX.KupMagicBox & JSXBase.HTMLAttributes<HTMLKupMagicBoxElement>;
|
|
5729
5923
|
"kup-nav-bar": LocalJSX.KupNavBar & JSXBase.HTMLAttributes<HTMLKupNavBarElement>;
|
|
5924
|
+
"kup-numeric-picker": LocalJSX.KupNumericPicker & JSXBase.HTMLAttributes<HTMLKupNumericPickerElement>;
|
|
5730
5925
|
"kup-photo-frame": LocalJSX.KupPhotoFrame & JSXBase.HTMLAttributes<HTMLKupPhotoFrameElement>;
|
|
5731
5926
|
"kup-probe": LocalJSX.KupProbe & JSXBase.HTMLAttributes<HTMLKupProbeElement>;
|
|
5732
5927
|
"kup-progress-bar": LocalJSX.KupProgressBar & JSXBase.HTMLAttributes<HTMLKupProgressBarElement>;
|
|
@@ -17,8 +17,10 @@ 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';
|
|
23
|
+
import { Options } from 'html2canvas';
|
|
22
24
|
/**
|
|
23
25
|
* Interface used to define the HTML element with Ketchup specific properties.
|
|
24
26
|
*/
|
|
@@ -45,6 +47,7 @@ export interface KupManager {
|
|
|
45
47
|
search: KupSearch;
|
|
46
48
|
theme: KupTheme;
|
|
47
49
|
toolbar: KupToolbar;
|
|
50
|
+
tooltip: KupTooltip;
|
|
48
51
|
utilities: KupManagerUtilities;
|
|
49
52
|
showMagicBox: () => void;
|
|
50
53
|
hideMagicBox: () => void;
|
|
@@ -52,6 +55,7 @@ export interface KupManager {
|
|
|
52
55
|
setLibraryLocalization: (locale: KupDatesLocales) => void;
|
|
53
56
|
addClickCallback: (cb: KupManagerClickCb, async?: boolean) => void;
|
|
54
57
|
removeClickCallback: (cb: KupManagerClickCb) => void;
|
|
58
|
+
rasterize: (el: HTMLElement, options?: Partial<Options>) => Promise<HTMLCanvasElement>;
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
57
61
|
* Interface for the KupManager utilities.
|
|
@@ -71,6 +75,7 @@ export interface KupManagerClickCb {
|
|
|
71
75
|
* Interface for the KupManager override settings.
|
|
72
76
|
*/
|
|
73
77
|
export interface KupManagerInitialization {
|
|
78
|
+
assetsPath?: string;
|
|
74
79
|
autoSetLocalization?: boolean;
|
|
75
80
|
dates?: KupManagerDatesSettings;
|
|
76
81
|
debug?: KupManagerDebugSettings;
|
|
@@ -80,6 +85,7 @@ export interface KupManagerInitialization {
|
|
|
80
85
|
objects?: KupManagerObjectsSettings;
|
|
81
86
|
scrollOnHover?: KupManagerScrollOnHoverSettings;
|
|
82
87
|
theme?: KupManagerThemeSettings;
|
|
88
|
+
tooltip?: KupManagerTooltipSettings;
|
|
83
89
|
}
|
|
84
90
|
/**
|
|
85
91
|
* KupDates initialization settings.
|
|
@@ -139,6 +145,12 @@ export interface KupManagerThemeSettings {
|
|
|
139
145
|
list?: KupThemeJSON;
|
|
140
146
|
name?: string;
|
|
141
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* KupDates initialization settings.
|
|
150
|
+
*/
|
|
151
|
+
export interface KupManagerTooltipSettings {
|
|
152
|
+
delay?: number;
|
|
153
|
+
}
|
|
142
154
|
/**
|
|
143
155
|
* KupTheme initialization settings.
|
|
144
156
|
*/
|
|
@@ -13,6 +13,8 @@ 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';
|
|
17
|
+
import { Options } from 'html2canvas';
|
|
16
18
|
/**
|
|
17
19
|
* This class controls every other Ketchup utility suite.
|
|
18
20
|
* @module KupManager
|
|
@@ -34,6 +36,7 @@ export declare class KupManager {
|
|
|
34
36
|
utilities: KupManagerUtilities;
|
|
35
37
|
theme: KupTheme;
|
|
36
38
|
toolbar: KupToolbar;
|
|
39
|
+
tooltip: KupTooltip;
|
|
37
40
|
/**
|
|
38
41
|
* Initializes KupManager.
|
|
39
42
|
*/
|
|
@@ -61,6 +64,17 @@ export declare class KupManager {
|
|
|
61
64
|
* @param {boolean} async - When true, the callback will be added asynchrounously to prevent instant firing if it was added through a click event.
|
|
62
65
|
*/
|
|
63
66
|
addClickCallback(cb: KupManagerClickCb, async?: boolean): void;
|
|
67
|
+
/**
|
|
68
|
+
* Rasterizes an HTMLElement, transforming into a canvas.
|
|
69
|
+
* @param {HTMLElement} el - Element to rasterize.
|
|
70
|
+
* @returns {HTMLCanvasElement} - Canvas created from the HTMLElement.
|
|
71
|
+
*
|
|
72
|
+
* CSS Mask is not supported:
|
|
73
|
+
* @see https://github.com/niklasvh/html2canvas/issues/2814
|
|
74
|
+
* Warning in console about sourcemap, claimed to be solved here but...:
|
|
75
|
+
* @see https://github.com/niklasvh/html2canvas/pull/2787/files
|
|
76
|
+
*/
|
|
77
|
+
rasterize(el: HTMLElement, options?: Partial<Options>): Promise<HTMLCanvasElement>;
|
|
64
78
|
/**
|
|
65
79
|
* Removes the given click callback.
|
|
66
80
|
* @param {KupManagerClickCb} cb - The callback to remove.
|
|
@@ -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,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
|
+
}
|
|
@@ -80,6 +80,7 @@ export declare enum KupTagNames {
|
|
|
80
80
|
DRAWER = "KUP-DRAWER",
|
|
81
81
|
DROPDOWN_BUTTON = "KUP-DROPDOWN-BUTTON",
|
|
82
82
|
FIELD = "KUP-FIELD",
|
|
83
|
+
FORM_EDITOR = "KUP-FORM-EDITOR",
|
|
83
84
|
GAUGE = "KUP-GAUGE",
|
|
84
85
|
GRID = "KUP-GRID",
|
|
85
86
|
IFRAME = "KUP-IFRAME",
|
|
@@ -88,6 +89,7 @@ export declare enum KupTagNames {
|
|
|
88
89
|
LIST = "KUP-LIST",
|
|
89
90
|
MAGIC_BOX = "KUP-MAGIC-BOX",
|
|
90
91
|
NAV_BAR = "KUP-NAV-BAR",
|
|
92
|
+
NUMERIC_PICKER = "KUP-NUMERIC-PICKER",
|
|
91
93
|
PROBE = "KUP-PROBE",
|
|
92
94
|
PROGRESS_BAR = "KUP-PROGRESS-BAR",
|
|
93
95
|
QLIK = "KUP-QLIK",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sme.up/ketchup",
|
|
3
|
-
"version": "5.2.0
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"smeup",
|
|
6
6
|
"KetchUP",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"d3-shape": "^3.1.0",
|
|
49
49
|
"dayjs": "^1.10.7",
|
|
50
50
|
"echarts": "^5.2.2",
|
|
51
|
+
"html2canvas": "^1.4.1",
|
|
51
52
|
"interactjs": "^1.10.11",
|
|
52
53
|
"jquery": "^3.6.0",
|
|
53
54
|
"numeral": "^2.0.6",
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
"vanilla-picker": "^2.12.1"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"@stencil/core": "^2.14.
|
|
59
|
+
"@stencil/core": "^2.14.2",
|
|
59
60
|
"@stencil/sass": "^1.4.1",
|
|
60
61
|
"@types/d3-shape": "^2.1.0",
|
|
61
62
|
"@types/geojson": "^7946.0.8",
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"jest": "^26.6.3",
|
|
68
69
|
"jest-cli": "^26.6.3",
|
|
69
70
|
"jest-environment-node": "^26.6.2",
|
|
70
|
-
"puppeteer": "^
|
|
71
|
+
"puppeteer": "^13.5.1",
|
|
71
72
|
"rimraf": "^3.0.2",
|
|
72
73
|
"sass": "^1.46.0"
|
|
73
74
|
},
|
package/CHANGELOG.md
DELETED
|
@@ -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{r as t,c as s,f as i,h as o,H as a,g as n}from"./p-8be1337b.js";import{k as r}from"./p-ee33cbe9.js";import{g as e,s as c}from"./p-10c8d755.js";import{c as l}from"./p-97e8ea42.js";import{F as p}from"./p-5d190cf5.js";import"./p-6c77a36c.js";import"./p-47b57d97.js";var h;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(h||(h={}));const u=class{constructor(i){t(this,i),this.kupActionClick=s(this,"kup-snackbar-actionclick",6),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.timeout=null,this.kupManager=r()}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}async getProps(t){return e(this,h,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){c(this,h,t)}async show(){this.visible=!0}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.timeout&&this.visible&&setTimeout((()=>{this.hide()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return o(a,{"kup-visible":this.visible},o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:l},o("div",{class:"snackbar"},o("div",{class:"snackbar__text"},this.text),this.actionButton||this.closeButton?o("div",{class:"snackbar__buttons"},this.actionButton?o("div",{class:"snackbar__action"},o(p,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?o("div",{class:"snackbar__close"},o(p,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}};u.style=":host{animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background:var(--kup-navbar-background-color);border-radius:5px;box-shadow:var(--kup-box-shadow);color:var(--kup-navbar-color);display:flex;justify-content:flex-start;max-width:672px;min-height:48px;min-width:344px}.snackbar__text{padding:14px 16px;white-space:nowrap}.snackbar__buttons{--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);align-items:center;display:flex;justify-content:flex-end;margin-right:8px;width:100%}.snackbar__close{--kup-button-font-size:11px;margin-left:8px}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{u as kup_snackbar}
|
|
@@ -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}
|