@deviceinsight/ng-ui-basic-components 3.16.0 → 4.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +725 -0
- package/dist/index.js.map +1 -0
- package/dist/style.css +1 -0
- package/{lib/esm → dist/types}/components/accordion/Accordion.d.ts +3 -3
- package/dist/types/components/accordion/Accordion.d.ts.map +1 -0
- package/{lib/cjs → dist/types}/components/accordionComponents/AccordionItem.d.ts +3 -3
- package/dist/types/components/accordionComponents/AccordionItem.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/bubble/Bubble.d.ts +4 -16
- package/dist/types/components/bubble/Bubble.d.ts.map +1 -0
- package/dist/types/components/bubble/Bubble.stories.d.ts +17 -0
- package/dist/types/components/bubble/Bubble.stories.d.ts.map +1 -0
- package/{lib/cjs → dist/types}/components/button/Button.d.ts +3 -3
- package/dist/types/components/button/Button.d.ts.map +1 -0
- package/{lib/cjs → dist/types}/components/button/ButtonRow.d.ts +2 -2
- package/dist/types/components/button/ButtonRow.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/confirm/Confirm.d.ts +2 -2
- package/dist/types/components/confirm/Confirm.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/confirm/ConfirmProvider.d.ts +2 -2
- package/{lib/cjs → dist/types}/components/confirm/ConfirmProvider.d.ts.map +1 -1
- package/dist/types/components/confirm/useConfirm.d.ts +8 -0
- package/{lib/cjs → dist/types}/components/confirm/useConfirm.d.ts.map +1 -1
- package/{lib/cjs → dist/types}/components/confirm/withConfirm.d.ts +2 -2
- package/dist/types/components/confirm/withConfirm.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/icon/Icon.d.ts +3 -3
- package/dist/types/components/icon/Icon.d.ts.map +1 -0
- package/{lib/cjs → dist/types}/components/input/Checkbox.d.ts +1 -1
- package/dist/types/components/input/Checkbox.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/input/SearchBox.d.ts +3 -4
- package/dist/types/components/input/SearchBox.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/label/Label.d.ts +1 -1
- package/{lib/cjs → dist/types}/components/label/Label.d.ts.map +1 -1
- package/{lib/esm → dist/types}/components/modal/Modal.d.ts +1 -2
- package/dist/types/components/modal/Modal.d.ts.map +1 -0
- package/dist/types/components/modal/Modal.stories.d.ts +18 -0
- package/dist/types/components/modal/Modal.stories.d.ts.map +1 -0
- package/dist/types/components/modalComponents/ModalContainer.d.ts +6 -0
- package/{lib/cjs → dist/types}/components/modalComponents/ModalContainer.d.ts.map +1 -1
- package/dist/types/components/modalComponents/ModalWindow.d.ts +4 -0
- package/dist/types/components/modalComponents/ModalWindow.d.ts.map +1 -0
- package/dist/types/components/popup/Popup.d.ts +30 -0
- package/dist/types/components/popup/Popup.d.ts.map +1 -0
- package/dist/types/components/popup/Popup.stories.d.ts +27 -0
- package/dist/types/components/popup/Popup.stories.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/spinner/Spinner.d.ts +2 -2
- package/dist/types/components/spinner/Spinner.d.ts.map +1 -0
- package/{lib/cjs → dist/types}/components/spinner/SpinnerContainer.d.ts +2 -2
- package/dist/types/components/spinner/SpinnerContainer.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/tabs/Tabs.d.ts +4 -4
- package/dist/types/components/tabs/Tabs.d.ts.map +1 -0
- package/{lib/esm → dist/types}/components/tooltip/Tooltip.d.ts +4 -13
- package/dist/types/components/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/types/components/tooltip/Tooltip.stories.d.ts +16 -0
- package/dist/types/components/tooltip/Tooltip.stories.d.ts.map +1 -0
- package/dist/types/hooks/useOutsideClick.d.ts.map +1 -0
- package/{lib/cjs → dist/types}/index.d.ts +1 -0
- package/{lib/cjs → dist/types}/index.d.ts.map +1 -1
- package/dist/types/types/i18n.d.ts +5 -0
- package/dist/types/types/i18n.d.ts.map +1 -0
- package/package.json +55 -48
- package/lib/cjs/__mocks__/react-i18next.d.ts +0 -2
- package/lib/cjs/__mocks__/react-i18next.d.ts.map +0 -1
- package/lib/cjs/__mocks__/react-i18next.js +0 -18
- package/lib/cjs/assets/img/icon-arrow-back.png +0 -0
- package/lib/cjs/assets/img/icon_folder_closed.png +0 -0
- package/lib/cjs/assets/img/icon_folder_closed_light.png +0 -0
- package/lib/cjs/assets/img/icon_folder_open.png +0 -0
- package/lib/cjs/assets/img/icon_folder_open_light.png +0 -0
- package/lib/cjs/assets/img/icon_help_light_24.png +0 -0
- package/lib/cjs/assets/img/icon_variablenode.png +0 -0
- package/lib/cjs/assets/img/icon_variablenode_light.png +0 -0
- package/lib/cjs/assets/img/toastify_msg_error_24.png +0 -0
- package/lib/cjs/assets/img/toastify_msg_success_24.png +0 -0
- package/lib/cjs/assets/search-box.css +0 -29
- package/lib/cjs/assets/style.css +0 -219
- package/lib/cjs/assets/svg/icon_add.svg +0 -3
- package/lib/cjs/assets/svg/icon_calendar.svg +0 -50
- package/lib/cjs/assets/svg/icon_chevron_left.svg +0 -6
- package/lib/cjs/assets/svg/icon_chevron_right.svg +0 -6
- package/lib/cjs/assets/svg/icon_cross.svg +0 -3
- package/lib/cjs/assets/svg/icon_download.svg +0 -5
- package/lib/cjs/assets/svg/icon_duplicate.svg +0 -10
- package/lib/cjs/assets/svg/icon_edit.svg +0 -6
- package/lib/cjs/assets/svg/icon_folder_loading.svg +0 -21
- package/lib/cjs/assets/svg/icon_fullscreen.svg +0 -6
- package/lib/cjs/assets/svg/icon_gear.svg +0 -5
- package/lib/cjs/assets/svg/icon_help_light.svg +0 -3
- package/lib/cjs/assets/svg/icon_key.svg +0 -3
- package/lib/cjs/assets/svg/icon_lupe.svg +0 -14
- package/lib/cjs/assets/svg/icon_menu_horizontal.svg +0 -5
- package/lib/cjs/assets/svg/icon_menu_vertical.svg +0 -5
- package/lib/cjs/assets/svg/icon_reload.svg +0 -6
- package/lib/cjs/assets/svg/icon_star.svg +0 -4
- package/lib/cjs/assets/svg/icon_upload.svg +0 -7
- package/lib/cjs/assets/svg/icon_warning_triangle.svg +0 -12
- package/lib/cjs/assets/svg/triangle_down.svg +0 -3
- package/lib/cjs/assets/svg/triangle_left.svg +0 -3
- package/lib/cjs/assets/svg/triangle_right.svg +0 -3
- package/lib/cjs/assets/svg/triangle_up.svg +0 -3
- package/lib/cjs/assets/svg/triangle_up_and_down.svg +0 -4
- package/lib/cjs/components/accordion/Accordion.d.ts +0 -25
- package/lib/cjs/components/accordion/Accordion.d.ts.map +0 -1
- package/lib/cjs/components/accordion/Accordion.js +0 -60
- package/lib/cjs/components/accordionComponents/AccordionItem.d.ts.map +0 -1
- package/lib/cjs/components/accordionComponents/AccordionItem.js +0 -50
- package/lib/cjs/components/bubble/Bubble.d.ts +0 -35
- package/lib/cjs/components/bubble/Bubble.d.ts.map +0 -1
- package/lib/cjs/components/bubble/Bubble.js +0 -42
- package/lib/cjs/components/button/Button.d.ts.map +0 -1
- package/lib/cjs/components/button/Button.js +0 -22
- package/lib/cjs/components/button/ButtonRow.d.ts.map +0 -1
- package/lib/cjs/components/button/ButtonRow.js +0 -35
- package/lib/cjs/components/confirm/Confirm.d.ts +0 -19
- package/lib/cjs/components/confirm/Confirm.d.ts.map +0 -1
- package/lib/cjs/components/confirm/Confirm.js +0 -49
- package/lib/cjs/components/confirm/ConfirmProvider.d.ts +0 -14
- package/lib/cjs/components/confirm/ConfirmProvider.js +0 -63
- package/lib/cjs/components/confirm/useConfirm.d.ts +0 -9
- package/lib/cjs/components/confirm/useConfirm.js +0 -13
- package/lib/cjs/components/confirm/utils.js +0 -11
- package/lib/cjs/components/confirm/withConfirm.d.ts.map +0 -1
- package/lib/cjs/components/confirm/withConfirm.js +0 -43
- package/lib/cjs/components/icon/Icon.d.ts +0 -24
- package/lib/cjs/components/icon/Icon.d.ts.map +0 -1
- package/lib/cjs/components/icon/Icon.js +0 -116
- package/lib/cjs/components/input/Checkbox.d.ts.map +0 -1
- package/lib/cjs/components/input/Checkbox.js +0 -75
- package/lib/cjs/components/input/SearchBox.d.ts +0 -21
- package/lib/cjs/components/input/SearchBox.d.ts.map +0 -1
- package/lib/cjs/components/input/SearchBox.js +0 -90
- package/lib/cjs/components/label/Label.d.ts +0 -23
- package/lib/cjs/components/label/Label.js +0 -24
- package/lib/cjs/components/modal/Modal.d.ts +0 -29
- package/lib/cjs/components/modal/Modal.d.ts.map +0 -1
- package/lib/cjs/components/modal/Modal.js +0 -65
- package/lib/cjs/components/modalComponents/ModalContainer.d.ts +0 -6
- package/lib/cjs/components/modalComponents/ModalContainer.js +0 -12
- package/lib/cjs/components/modalComponents/ModalWindow.d.ts +0 -4
- package/lib/cjs/components/modalComponents/ModalWindow.d.ts.map +0 -1
- package/lib/cjs/components/modalComponents/ModalWindow.js +0 -50
- package/lib/cjs/components/popup/Popup.d.ts +0 -38
- package/lib/cjs/components/popup/Popup.d.ts.map +0 -1
- package/lib/cjs/components/popup/Popup.js +0 -78
- package/lib/cjs/components/popupComponents/PopupArea.d.ts +0 -18
- package/lib/cjs/components/popupComponents/PopupArea.d.ts.map +0 -1
- package/lib/cjs/components/popupComponents/PopupArea.js +0 -46
- package/lib/cjs/components/spinner/Spinner.d.ts +0 -20
- package/lib/cjs/components/spinner/Spinner.d.ts.map +0 -1
- package/lib/cjs/components/spinner/Spinner.js +0 -34
- package/lib/cjs/components/spinner/SpinnerContainer.d.ts.map +0 -1
- package/lib/cjs/components/spinner/SpinnerContainer.js +0 -24
- package/lib/cjs/components/tabs/Tabs.d.ts +0 -34
- package/lib/cjs/components/tabs/Tabs.d.ts.map +0 -1
- package/lib/cjs/components/tabs/Tabs.js +0 -75
- package/lib/cjs/components/tooltip/Tooltip.d.ts +0 -28
- package/lib/cjs/components/tooltip/Tooltip.d.ts.map +0 -1
- package/lib/cjs/components/tooltip/Tooltip.js +0 -39
- package/lib/cjs/hooks/useOutsideClick.d.ts.map +0 -1
- package/lib/cjs/hooks/useOutsideClick.js +0 -42
- package/lib/cjs/index.js +0 -46
- package/lib/cjs/types/i18n.d.ts +0 -5
- package/lib/cjs/types/i18n.d.ts.map +0 -1
- package/lib/cjs/types/i18n.js +0 -2
- package/lib/esm/__mocks__/react-i18next.d.ts +0 -2
- package/lib/esm/__mocks__/react-i18next.d.ts.map +0 -1
- package/lib/esm/__mocks__/react-i18next.js +0 -17
- package/lib/esm/assets/img/icon-arrow-back.png +0 -0
- package/lib/esm/assets/img/icon_folder_closed.png +0 -0
- package/lib/esm/assets/img/icon_folder_closed_light.png +0 -0
- package/lib/esm/assets/img/icon_folder_open.png +0 -0
- package/lib/esm/assets/img/icon_folder_open_light.png +0 -0
- package/lib/esm/assets/img/icon_help_light_24.png +0 -0
- package/lib/esm/assets/img/icon_variablenode.png +0 -0
- package/lib/esm/assets/img/icon_variablenode_light.png +0 -0
- package/lib/esm/assets/img/toastify_msg_error_24.png +0 -0
- package/lib/esm/assets/img/toastify_msg_success_24.png +0 -0
- package/lib/esm/assets/search-box.css +0 -29
- package/lib/esm/assets/style.css +0 -219
- package/lib/esm/assets/svg/icon_add.svg +0 -3
- package/lib/esm/assets/svg/icon_calendar.svg +0 -50
- package/lib/esm/assets/svg/icon_chevron_left.svg +0 -6
- package/lib/esm/assets/svg/icon_chevron_right.svg +0 -6
- package/lib/esm/assets/svg/icon_cross.svg +0 -3
- package/lib/esm/assets/svg/icon_download.svg +0 -5
- package/lib/esm/assets/svg/icon_duplicate.svg +0 -10
- package/lib/esm/assets/svg/icon_edit.svg +0 -6
- package/lib/esm/assets/svg/icon_folder_loading.svg +0 -21
- package/lib/esm/assets/svg/icon_fullscreen.svg +0 -6
- package/lib/esm/assets/svg/icon_gear.svg +0 -5
- package/lib/esm/assets/svg/icon_help_light.svg +0 -3
- package/lib/esm/assets/svg/icon_key.svg +0 -3
- package/lib/esm/assets/svg/icon_lupe.svg +0 -14
- package/lib/esm/assets/svg/icon_menu_horizontal.svg +0 -5
- package/lib/esm/assets/svg/icon_menu_vertical.svg +0 -5
- package/lib/esm/assets/svg/icon_reload.svg +0 -6
- package/lib/esm/assets/svg/icon_star.svg +0 -4
- package/lib/esm/assets/svg/icon_upload.svg +0 -7
- package/lib/esm/assets/svg/icon_warning_triangle.svg +0 -12
- package/lib/esm/assets/svg/triangle_down.svg +0 -3
- package/lib/esm/assets/svg/triangle_left.svg +0 -3
- package/lib/esm/assets/svg/triangle_right.svg +0 -3
- package/lib/esm/assets/svg/triangle_up.svg +0 -3
- package/lib/esm/assets/svg/triangle_up_and_down.svg +0 -4
- package/lib/esm/components/accordion/Accordion.d.ts.map +0 -1
- package/lib/esm/components/accordion/Accordion.js +0 -34
- package/lib/esm/components/accordionComponents/AccordionItem.d.ts +0 -32
- package/lib/esm/components/accordionComponents/AccordionItem.d.ts.map +0 -1
- package/lib/esm/components/accordionComponents/AccordionItem.js +0 -24
- package/lib/esm/components/bubble/Bubble.d.ts.map +0 -1
- package/lib/esm/components/bubble/Bubble.js +0 -36
- package/lib/esm/components/button/Button.d.ts +0 -33
- package/lib/esm/components/button/Button.d.ts.map +0 -1
- package/lib/esm/components/button/Button.js +0 -17
- package/lib/esm/components/button/ButtonRow.d.ts +0 -23
- package/lib/esm/components/button/ButtonRow.d.ts.map +0 -1
- package/lib/esm/components/button/ButtonRow.js +0 -10
- package/lib/esm/components/confirm/Confirm.d.ts.map +0 -1
- package/lib/esm/components/confirm/Confirm.js +0 -20
- package/lib/esm/components/confirm/ConfirmProvider.d.ts.map +0 -1
- package/lib/esm/components/confirm/ConfirmProvider.js +0 -34
- package/lib/esm/components/confirm/useConfirm.d.ts +0 -9
- package/lib/esm/components/confirm/useConfirm.d.ts.map +0 -1
- package/lib/esm/components/confirm/useConfirm.js +0 -10
- package/lib/esm/components/confirm/utils.d.ts +0 -4
- package/lib/esm/components/confirm/utils.d.ts.map +0 -1
- package/lib/esm/components/confirm/utils.js +0 -7
- package/lib/esm/components/confirm/withConfirm.d.ts +0 -7
- package/lib/esm/components/confirm/withConfirm.d.ts.map +0 -1
- package/lib/esm/components/confirm/withConfirm.js +0 -37
- package/lib/esm/components/icon/Icon.d.ts.map +0 -1
- package/lib/esm/components/icon/Icon.js +0 -110
- package/lib/esm/components/input/Checkbox.d.ts +0 -29
- package/lib/esm/components/input/Checkbox.d.ts.map +0 -1
- package/lib/esm/components/input/Checkbox.js +0 -50
- package/lib/esm/components/input/SearchBox.d.ts.map +0 -1
- package/lib/esm/components/input/SearchBox.js +0 -62
- package/lib/esm/components/label/Label.d.ts.map +0 -1
- package/lib/esm/components/label/Label.js +0 -18
- package/lib/esm/components/modal/Modal.d.ts.map +0 -1
- package/lib/esm/components/modal/Modal.js +0 -59
- package/lib/esm/components/modalComponents/ModalContainer.d.ts +0 -6
- package/lib/esm/components/modalComponents/ModalContainer.d.ts.map +0 -1
- package/lib/esm/components/modalComponents/ModalContainer.js +0 -6
- package/lib/esm/components/modalComponents/ModalWindow.d.ts +0 -4
- package/lib/esm/components/modalComponents/ModalWindow.d.ts.map +0 -1
- package/lib/esm/components/modalComponents/ModalWindow.js +0 -21
- package/lib/esm/components/popup/Popup.d.ts +0 -38
- package/lib/esm/components/popup/Popup.d.ts.map +0 -1
- package/lib/esm/components/popup/Popup.js +0 -49
- package/lib/esm/components/popupComponents/PopupArea.d.ts +0 -18
- package/lib/esm/components/popupComponents/PopupArea.d.ts.map +0 -1
- package/lib/esm/components/popupComponents/PopupArea.js +0 -17
- package/lib/esm/components/spinner/Spinner.d.ts.map +0 -1
- package/lib/esm/components/spinner/Spinner.js +0 -28
- package/lib/esm/components/spinner/SpinnerContainer.d.ts +0 -23
- package/lib/esm/components/spinner/SpinnerContainer.d.ts.map +0 -1
- package/lib/esm/components/spinner/SpinnerContainer.js +0 -18
- package/lib/esm/components/tabs/Tabs.d.ts.map +0 -1
- package/lib/esm/components/tabs/Tabs.js +0 -46
- package/lib/esm/components/tooltip/Tooltip.d.ts.map +0 -1
- package/lib/esm/components/tooltip/Tooltip.js +0 -33
- package/lib/esm/hooks/useOutsideClick.d.ts +0 -3
- package/lib/esm/hooks/useOutsideClick.d.ts.map +0 -1
- package/lib/esm/hooks/useOutsideClick.js +0 -40
- package/lib/esm/index.d.ts +0 -22
- package/lib/esm/index.d.ts.map +0 -1
- package/lib/esm/index.js +0 -21
- package/lib/esm/types/i18n.d.ts +0 -5
- package/lib/esm/types/i18n.d.ts.map +0 -1
- package/lib/esm/types/i18n.js +0 -1
- /package/{lib/cjs → dist/types}/components/confirm/utils.d.ts +0 -0
- /package/{lib/cjs → dist/types}/components/confirm/utils.d.ts.map +0 -0
- /package/{lib/cjs → dist/types}/hooks/useOutsideClick.d.ts +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PopupDirection } from '../popup/Popup';
|
|
3
|
-
export declare type Props = {
|
|
4
|
-
/** the Bubble content */
|
|
5
|
-
content: React.ReactNode;
|
|
6
|
-
/** inverts the colors */
|
|
7
|
-
inverted?: boolean;
|
|
8
|
-
/** @ignore */
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
/** @ignore */
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
/** @ignore */
|
|
13
|
-
className?: string;
|
|
14
|
-
/** hides the bubble */
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
/** changed the direction */
|
|
17
|
-
direction?: PopupDirection;
|
|
18
|
-
};
|
|
19
|
-
declare type State = {
|
|
20
|
-
active: boolean;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Bubbles are best used to provide some additional information like short instructions or help texts, which are then going to be displayed on Mouse-Over.
|
|
24
|
-
*/
|
|
25
|
-
export default class Bubble extends React.Component<Props, State> {
|
|
26
|
-
static defaultProps: {
|
|
27
|
-
inverted: boolean;
|
|
28
|
-
};
|
|
29
|
-
state: State;
|
|
30
|
-
handleMouseEnter: () => void;
|
|
31
|
-
handleMouseLeave: () => void;
|
|
32
|
-
render(): JSX.Element;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=Bubble.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../../../../src/components/bubble/Bubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAc,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAErD,oBAAY,KAAK,GAAG;IACnB,yBAAyB;IACzB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,cAAc;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,cAAc;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC;AAEF,aAAK,KAAK,GAAG;IACZ,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IAChE,MAAM,CAAC,YAAY,EAAE;QACpB,QAAQ,EAAE,OAAO,CAAC;KAClB,CAEC;IAEF,KAAK,EAAE,KAAK,CAEV;IAEF,gBAAgB,aAQd;IAEF,gBAAgB,aAId;IAEF,MAAM;CAmBN"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const Popup_1 = __importDefault(require("../popup/Popup"));
|
|
8
|
-
/**
|
|
9
|
-
* Bubbles are best used to provide some additional information like short instructions or help texts, which are then going to be displayed on Mouse-Over.
|
|
10
|
-
*/
|
|
11
|
-
class Bubble extends react_1.default.Component {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.state = {
|
|
15
|
-
active: false
|
|
16
|
-
};
|
|
17
|
-
this.handleMouseEnter = () => {
|
|
18
|
-
const { disabled } = this.props;
|
|
19
|
-
if (!disabled) {
|
|
20
|
-
this.setState({
|
|
21
|
-
active: true
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
this.handleMouseLeave = () => {
|
|
26
|
-
this.setState({
|
|
27
|
-
active: false
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
const { content, inverted, children, style, direction, className } = this.props;
|
|
33
|
-
const { active } = this.state;
|
|
34
|
-
return (react_1.default.createElement("span", { onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave },
|
|
35
|
-
react_1.default.createElement(Popup_1.default, { active: active, onHide: () => { }, handler: children, direction: direction ? direction : 'top', onHandlerClick: () => { }, className: `bubble ${inverted ? 'inverted' : ''} ${className ? className : ''}` },
|
|
36
|
-
react_1.default.createElement("span", { className: `bubble-content`, style: style }, content))));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.default = Bubble;
|
|
40
|
-
Bubble.defaultProps = {
|
|
41
|
-
inverted: false
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAC,qBAAqB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,oBAAY,KAAK,GAAG;IACnB,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,sBAAsB;IACtB,KAAK,CAAC,EAAE,CAAC,qBAAqB,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC;IAE5D,8BAA8B;IAC9B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAErC,sBAAsB;IACtB,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC;IAEvC,uBAAuB;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,cAAc;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,cAAc;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,cAAc;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,cAAc;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;;AA6CF,wBAAiE"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
8
|
-
const react_i18next_1 = require("react-i18next");
|
|
9
|
-
/**
|
|
10
|
-
* Buttons are used to inform the user about a potential user interaction, which then on interaction causes an action.
|
|
11
|
-
* To create a standardized look and feel, different props can be passed to the Button.
|
|
12
|
-
*/
|
|
13
|
-
function Button({ children, title, type, disabled, onClick, style, tabIndex, t, primary, danger, naked, className, small, ...rest }) {
|
|
14
|
-
let btnTitle = title;
|
|
15
|
-
if (title && typeof title !== 'string') {
|
|
16
|
-
btnTitle = t(title.id, {
|
|
17
|
-
defaultValue: title.defaultValue
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return (react_1.default.createElement("button", { "data-testid": rest['data-testid'], type: type || 'button', className: (0, classnames_1.default)('di button', className, { small, primary, danger, link: naked }), title: typeof btnTitle === 'string' ? btnTitle : undefined, disabled: disabled, onClick: onClick, style: style, tabIndex: tabIndex }, children));
|
|
21
|
-
}
|
|
22
|
-
exports.default = (0, react_i18next_1.withTranslation)()(Button);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonRow.d.ts","sourceRoot":"","sources":["../../../../src/components/button/ButtonRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,oBAAY,KAAK,GAAG;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,cAAc;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,SAAS;+CAA4C,KAAK;;;;CAI/D,CAAC;AAMF,eAAe,SAAS,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const React = __importStar(require("react"));
|
|
27
|
-
/**
|
|
28
|
-
* ButtonRows align Buttons nicely for all relevant and/or related user actions such as saving or canceling changes.
|
|
29
|
-
* To separate the ButtonRow from the content, the extra property `dividing` can be used.
|
|
30
|
-
*/
|
|
31
|
-
const ButtonRow = ({ children, dividing, className, style }) => (React.createElement("div", { style: style, className: `di button-row ${dividing ? 'dividing' : ''} ${className || ''}` }, children));
|
|
32
|
-
ButtonRow.defaultProps = {
|
|
33
|
-
dividing: false
|
|
34
|
-
};
|
|
35
|
-
exports.default = ButtonRow;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TranslationDescriptor } from '../../types/i18n';
|
|
3
|
-
export declare type Props = {
|
|
4
|
-
title: string | TranslationDescriptor;
|
|
5
|
-
message: string | React.ReactElement | TranslationDescriptor;
|
|
6
|
-
/** @ignore */
|
|
7
|
-
onAccept: (...args: Array<any>) => any;
|
|
8
|
-
/** @ignore */
|
|
9
|
-
onDecline: (...args: Array<any>) => any;
|
|
10
|
-
acceptButtonLabel?: string | TranslationDescriptor;
|
|
11
|
-
declineButtonLabel?: string | TranslationDescriptor;
|
|
12
|
-
acceptButtonStyle?: 'primary' | 'danger';
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Confirm enables the possibility to open up a dialog within a modal, requiring additional user actions.
|
|
16
|
-
* This component should not be used directly, instead use `@withConfirm` to inject a promise based confirm method
|
|
17
|
-
*/
|
|
18
|
-
export default function Confirm({ title, message, onAccept, onDecline, acceptButtonLabel, declineButtonLabel, acceptButtonStyle }: Props): JSX.Element;
|
|
19
|
-
//# sourceMappingURL=Confirm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.d.ts","sourceRoot":"","sources":["../../../../src/components/confirm/Confirm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAC,qBAAqB,EAAC,MAAM,kBAAkB,CAAC;AAGvD,oBAAY,KAAK,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,qBAAqB,CAAC;IACtC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,GAAG,qBAAqB,CAAC;IAE7D,cAAc;IACd,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC;IAEvC,cAAc;IACd,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC;IACxC,iBAAiB,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAC;IACnD,kBAAkB,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAC;IACpD,iBAAiB,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CACzC,CAAC;AAWF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,iBAA6B,EAC7B,EAAE,KAAK,eA6BP"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const React = __importStar(require("react"));
|
|
30
|
-
const react_i18next_1 = require("react-i18next");
|
|
31
|
-
const Modal_1 = __importDefault(require("../modal/Modal"));
|
|
32
|
-
const Button_1 = __importDefault(require("../button/Button"));
|
|
33
|
-
const utils_1 = require("./utils");
|
|
34
|
-
function transformTextToElement(message) {
|
|
35
|
-
if ((0, utils_1.isTranslationDescriptor)(message)) {
|
|
36
|
-
return React.createElement(react_i18next_1.Trans, { i18nKey: message.id }, message.defaultValue);
|
|
37
|
-
}
|
|
38
|
-
return message;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Confirm enables the possibility to open up a dialog within a modal, requiring additional user actions.
|
|
42
|
-
* This component should not be used directly, instead use `@withConfirm` to inject a promise based confirm method
|
|
43
|
-
*/
|
|
44
|
-
function Confirm({ title, message, onAccept, onDecline, acceptButtonLabel, declineButtonLabel, acceptButtonStyle = 'primary' }) {
|
|
45
|
-
return (React.createElement(Modal_1.default, { header: transformTextToElement(title), content: transformTextToElement(message), footer: React.createElement("div", null,
|
|
46
|
-
React.createElement(Button_1.default, { primary: acceptButtonStyle === 'primary', danger: acceptButtonStyle === 'danger', onClick: onAccept }, acceptButtonLabel ? (transformTextToElement(acceptButtonLabel)) : (React.createElement(react_i18next_1.Trans, { i18nKey: "form.accept" }, "Accept"))),
|
|
47
|
-
React.createElement(Button_1.default, { onClick: onDecline }, declineButtonLabel ? (transformTextToElement(declineButtonLabel)) : (React.createElement(react_i18next_1.Trans, { i18nKey: "form.decline" }, "Decline")))), width: 500 }));
|
|
48
|
-
}
|
|
49
|
-
exports.default = Confirm;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type ConfirmOptions = {
|
|
3
|
-
title: string;
|
|
4
|
-
message: string | React.ReactElement;
|
|
5
|
-
acceptButtonLabel?: string;
|
|
6
|
-
declineButtonLabel?: string;
|
|
7
|
-
acceptButtonStyle?: 'primary' | 'danger';
|
|
8
|
-
};
|
|
9
|
-
export declare const ConfirmContext: React.Context<{
|
|
10
|
-
confirm: (options: ConfirmOptions) => Promise<boolean>;
|
|
11
|
-
}>;
|
|
12
|
-
declare function ConfirmProvider({ children }: React.PropsWithChildren<Record<string, unknown>>): JSX.Element;
|
|
13
|
-
export default ConfirmProvider;
|
|
14
|
-
//# sourceMappingURL=ConfirmProvider.d.ts.map
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ConfirmContext = void 0;
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
|
-
const Confirm_1 = __importDefault(require("./Confirm"));
|
|
32
|
-
exports.ConfirmContext = (0, react_1.createContext)({
|
|
33
|
-
confirm: () => Promise.reject(new Error('ConfirmProvider is missing!'))
|
|
34
|
-
});
|
|
35
|
-
function ConfirmProvider({ children }) {
|
|
36
|
-
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
37
|
-
const [confirmProps, setConfirmProps] = (0, react_1.useState)({
|
|
38
|
-
title: '',
|
|
39
|
-
message: '',
|
|
40
|
-
onAccept: () => { },
|
|
41
|
-
onDecline: () => { }
|
|
42
|
-
});
|
|
43
|
-
async function confirm(options) {
|
|
44
|
-
return new Promise((resolve) => {
|
|
45
|
-
setVisible(true);
|
|
46
|
-
setConfirmProps({
|
|
47
|
-
...options,
|
|
48
|
-
onAccept: () => {
|
|
49
|
-
setVisible(false);
|
|
50
|
-
resolve(true);
|
|
51
|
-
},
|
|
52
|
-
onDecline: () => {
|
|
53
|
-
setVisible(false);
|
|
54
|
-
resolve(false);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return (react_1.default.createElement(exports.ConfirmContext.Provider, { value: { confirm } },
|
|
60
|
-
children,
|
|
61
|
-
visible && react_1.default.createElement(Confirm_1.default, { ...confirmProps })));
|
|
62
|
-
}
|
|
63
|
-
exports.default = ConfirmProvider;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export default function useConfirm(): (options: {
|
|
3
|
-
title: string;
|
|
4
|
-
message: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
5
|
-
acceptButtonLabel?: string | undefined;
|
|
6
|
-
declineButtonLabel?: string | undefined;
|
|
7
|
-
acceptButtonStyle?: "primary" | "danger" | undefined;
|
|
8
|
-
}) => Promise<boolean>;
|
|
9
|
-
//# sourceMappingURL=useConfirm.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const ConfirmProvider_1 = require("./ConfirmProvider");
|
|
5
|
-
function useConfirm() {
|
|
6
|
-
const context = (0, react_1.useContext)(ConfirmProvider_1.ConfirmContext);
|
|
7
|
-
if (!context) {
|
|
8
|
-
throw new Error('ConfirmProvider is missing');
|
|
9
|
-
}
|
|
10
|
-
const { confirm } = context;
|
|
11
|
-
return confirm;
|
|
12
|
-
}
|
|
13
|
-
exports.default = useConfirm;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTranslationDescriptor = void 0;
|
|
4
|
-
function isTranslationDescriptor(arg) {
|
|
5
|
-
const result = typeof arg === 'object' && typeof arg.id === 'string' && typeof arg.defaultValue === 'string';
|
|
6
|
-
if (result) {
|
|
7
|
-
console.warn('Please use strings instead of TranslationDescriptors to initialize the Confirm modal, because TranslationDescriptors are deprecated');
|
|
8
|
-
}
|
|
9
|
-
return result;
|
|
10
|
-
}
|
|
11
|
-
exports.isTranslationDescriptor = isTranslationDescriptor;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/confirm/withConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,qBAAqB,EAAC,MAAM,kBAAkB,CAAC;AAKvD,oBAAY,YAAY,GAAG;IAC1B,OAAO,EAAE,CACR,KAAK,EAAE,MAAM,GAAG,qBAAqB,EACrC,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,KAAK,CAAC,YAAY,EAC5D,iBAAiB,CAAC,EAAE,MAAM,GAAG,qBAAqB,EAClD,kBAAkB,CAAC,EAAE,MAAM,GAAG,qBAAqB,EACnD,uBAAuB,CAAC,EAAE,OAAO,EACjC,iBAAiB,CAAC,EAAE,SAAS,GAAG,QAAQ,KACpC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,GAAG,YAAY,CAAC,WAsCnD,CAAC,iBAO3C"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const react_i18next_1 = require("react-i18next");
|
|
8
|
-
const useConfirm_1 = __importDefault(require("./useConfirm"));
|
|
9
|
-
const ConfirmProvider_1 = __importDefault(require("./ConfirmProvider"));
|
|
10
|
-
const utils_1 = require("./utils");
|
|
11
|
-
function withConfirm(WrappedComponent) {
|
|
12
|
-
function WithConfirm(props) {
|
|
13
|
-
const confirm = (0, useConfirm_1.default)();
|
|
14
|
-
const { t } = (0, react_i18next_1.useTranslation)();
|
|
15
|
-
function trans(arg) {
|
|
16
|
-
if ((0, utils_1.isTranslationDescriptor)(arg)) {
|
|
17
|
-
return t(arg.id, { defaultValue: arg.defaultValue });
|
|
18
|
-
}
|
|
19
|
-
return arg;
|
|
20
|
-
}
|
|
21
|
-
async function deprecatedConfirm(title, message, acceptButtonLabel, declineButtonLabel, resolveWithConfirmation, acceptButtonStyle) {
|
|
22
|
-
const accepted = await confirm({
|
|
23
|
-
title: trans(title),
|
|
24
|
-
message: (0, utils_1.isTranslationDescriptor)(message) ? trans(message) : message,
|
|
25
|
-
acceptButtonLabel: acceptButtonLabel ? trans(acceptButtonLabel) : undefined,
|
|
26
|
-
declineButtonLabel: declineButtonLabel ? trans(declineButtonLabel) : undefined,
|
|
27
|
-
acceptButtonStyle
|
|
28
|
-
});
|
|
29
|
-
if (resolveWithConfirmation) {
|
|
30
|
-
return accepted;
|
|
31
|
-
}
|
|
32
|
-
else if (!accepted) {
|
|
33
|
-
return new Promise(() => { });
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return react_1.default.createElement(WrappedComponent, { ...props, confirm: deprecatedConfirm });
|
|
37
|
-
}
|
|
38
|
-
return function WithConfirmWrapper(props) {
|
|
39
|
-
return (react_1.default.createElement(ConfirmProvider_1.default, null,
|
|
40
|
-
react_1.default.createElement(WithConfirm, { ...props })));
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
exports.default = withConfirm;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare type Props = {
|
|
3
|
-
add?: boolean;
|
|
4
|
-
del?: boolean;
|
|
5
|
-
edit?: boolean;
|
|
6
|
-
config?: boolean;
|
|
7
|
-
duplicate?: boolean;
|
|
8
|
-
search?: boolean;
|
|
9
|
-
download?: boolean;
|
|
10
|
-
sync?: boolean;
|
|
11
|
-
fullscreen?: boolean;
|
|
12
|
-
star?: boolean;
|
|
13
|
-
/** key is reserved in React */
|
|
14
|
-
iconKey?: boolean;
|
|
15
|
-
documentation?: boolean;
|
|
16
|
-
/** renders a larger version of the icon (24x24) */
|
|
17
|
-
large?: boolean;
|
|
18
|
-
/** inverts the colors of the icon for display on dark background */
|
|
19
|
-
inverted?: boolean;
|
|
20
|
-
/** @ignore */
|
|
21
|
-
className?: string;
|
|
22
|
-
};
|
|
23
|
-
export default function Icon(props: Props): JSX.Element;
|
|
24
|
-
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/icon/Icon.tsx"],"names":[],"mappings":";AAeA,oBAAY,KAAK,GAAG;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,cAAc;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAkEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,KAAK,eAYxC"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const icon_add_svg_1 = __importDefault(require("../../assets/svg/icon_add.svg"));
|
|
8
|
-
const icon_cross_svg_1 = __importDefault(require("../../assets/svg/icon_cross.svg"));
|
|
9
|
-
const icon_edit_svg_1 = __importDefault(require("../../assets/svg/icon_edit.svg"));
|
|
10
|
-
const icon_gear_svg_1 = __importDefault(require("../../assets/svg/icon_gear.svg"));
|
|
11
|
-
const icon_duplicate_svg_1 = __importDefault(require("../../assets/svg/icon_duplicate.svg"));
|
|
12
|
-
const icon_download_svg_1 = __importDefault(require("../../assets/svg/icon_download.svg"));
|
|
13
|
-
const icon_lupe_svg_1 = __importDefault(require("../../assets/svg/icon_lupe.svg"));
|
|
14
|
-
const icon_key_svg_1 = __importDefault(require("../../assets/svg/icon_key.svg"));
|
|
15
|
-
const icon_reload_svg_1 = __importDefault(require("../../assets/svg/icon_reload.svg"));
|
|
16
|
-
const icon_fullscreen_svg_1 = __importDefault(require("../../assets/svg/icon_fullscreen.svg"));
|
|
17
|
-
const icon_help_light_svg_1 = __importDefault(require("../../assets/svg/icon_help_light.svg"));
|
|
18
|
-
const icon_star_svg_1 = __importDefault(require("../../assets/svg/icon_star.svg"));
|
|
19
|
-
function getSrc(props) {
|
|
20
|
-
const { add, del, edit, config, duplicate, search, download, sync, fullscreen, iconKey, documentation, star } = props;
|
|
21
|
-
if (add) {
|
|
22
|
-
return icon_add_svg_1.default;
|
|
23
|
-
}
|
|
24
|
-
else if (del) {
|
|
25
|
-
return icon_cross_svg_1.default;
|
|
26
|
-
}
|
|
27
|
-
else if (edit) {
|
|
28
|
-
return icon_edit_svg_1.default;
|
|
29
|
-
}
|
|
30
|
-
else if (config) {
|
|
31
|
-
return icon_gear_svg_1.default;
|
|
32
|
-
}
|
|
33
|
-
else if (duplicate) {
|
|
34
|
-
return icon_duplicate_svg_1.default;
|
|
35
|
-
}
|
|
36
|
-
else if (search) {
|
|
37
|
-
return icon_lupe_svg_1.default;
|
|
38
|
-
}
|
|
39
|
-
else if (download) {
|
|
40
|
-
return icon_download_svg_1.default;
|
|
41
|
-
}
|
|
42
|
-
else if (sync) {
|
|
43
|
-
return icon_reload_svg_1.default;
|
|
44
|
-
}
|
|
45
|
-
else if (fullscreen) {
|
|
46
|
-
return icon_fullscreen_svg_1.default;
|
|
47
|
-
}
|
|
48
|
-
else if (iconKey) {
|
|
49
|
-
return icon_key_svg_1.default;
|
|
50
|
-
}
|
|
51
|
-
else if (documentation) {
|
|
52
|
-
return icon_help_light_svg_1.default;
|
|
53
|
-
}
|
|
54
|
-
else if (star) {
|
|
55
|
-
return icon_star_svg_1.default;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
throw Error('getSrc: no icon type specified');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function getAlt(props) {
|
|
62
|
-
const { add, del, edit, config, duplicate, search, download, sync, fullscreen, iconKey, documentation, star } = props;
|
|
63
|
-
if (add) {
|
|
64
|
-
return 'icon add';
|
|
65
|
-
}
|
|
66
|
-
else if (del) {
|
|
67
|
-
return 'icon delete';
|
|
68
|
-
}
|
|
69
|
-
else if (edit) {
|
|
70
|
-
return 'icon edit';
|
|
71
|
-
}
|
|
72
|
-
else if (config) {
|
|
73
|
-
return 'icon config';
|
|
74
|
-
}
|
|
75
|
-
else if (duplicate) {
|
|
76
|
-
return 'icon duplicate';
|
|
77
|
-
}
|
|
78
|
-
else if (search) {
|
|
79
|
-
return 'icon search';
|
|
80
|
-
}
|
|
81
|
-
else if (download) {
|
|
82
|
-
return 'icon download';
|
|
83
|
-
}
|
|
84
|
-
else if (sync) {
|
|
85
|
-
return 'icon sync';
|
|
86
|
-
}
|
|
87
|
-
else if (fullscreen) {
|
|
88
|
-
return 'icon fullscreen';
|
|
89
|
-
}
|
|
90
|
-
else if (iconKey) {
|
|
91
|
-
return 'icon iconKey';
|
|
92
|
-
}
|
|
93
|
-
else if (documentation) {
|
|
94
|
-
return 'icon documentation';
|
|
95
|
-
}
|
|
96
|
-
else if (star) {
|
|
97
|
-
return 'icon star';
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
throw Error('getAlt: no icon type specified');
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
function Icon(props) {
|
|
104
|
-
let style;
|
|
105
|
-
if (props.large) {
|
|
106
|
-
style = { width: 24, height: 24 };
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
style = { width: 16, height: 16 };
|
|
110
|
-
}
|
|
111
|
-
if (props.inverted) {
|
|
112
|
-
style = { ...style, filter: 'invert(1)' };
|
|
113
|
-
}
|
|
114
|
-
return react_1.default.createElement("img", { src: getSrc(props), className: `di icon ${props.className || ''}`, alt: getAlt(props), style: style });
|
|
115
|
-
}
|
|
116
|
-
exports.default = Icon;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/input/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,qBAAqB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,oBAAY,KAAK,GAAG;IACnB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;IAEvC,mDAAmD;IACnD,KAAK,EAAE,OAAO,CAAC;IAEf,oDAAoD;IACpD,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAExC,qCAAqC;IACrC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAE9B,kDAAkD;IAClD,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAE9B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,cAAc;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,cAAc;IACd,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,cAAc;IACd,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;;AAqFF,wBAAyE"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const React = __importStar(require("react"));
|
|
27
|
-
const react_i18next_1 = require("react-i18next");
|
|
28
|
-
const getWrapperClassName = (type, small) => {
|
|
29
|
-
switch (type) {
|
|
30
|
-
case 'checkbox':
|
|
31
|
-
case 'radio':
|
|
32
|
-
return 'di checkbox';
|
|
33
|
-
case 'toggle':
|
|
34
|
-
return small ? 'di toggle toggle-small' : 'di toggle';
|
|
35
|
-
default:
|
|
36
|
-
throw Error(`type not support: ${type}`);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const getCheckboxClassName = (type, small) => {
|
|
40
|
-
switch (type) {
|
|
41
|
-
case 'checkbox':
|
|
42
|
-
return 'box';
|
|
43
|
-
case 'radio':
|
|
44
|
-
return 'radio';
|
|
45
|
-
case 'toggle':
|
|
46
|
-
return small ? 'switch switch-small' : 'switch';
|
|
47
|
-
default:
|
|
48
|
-
throw Error(`type not support: ${type}`);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Checkbox for enabling user interaction can have one of multiple types which are defined via the `type` prop.
|
|
53
|
-
*/
|
|
54
|
-
const Checkbox = ({ type = 'checkbox', value, onChange, title, label, disabled = false, toggleSmall = false, toggleColor = '#259b23', t, ...other }) => {
|
|
55
|
-
const style = type === 'toggle'
|
|
56
|
-
? {
|
|
57
|
-
backgroundColor: value ? toggleColor : 'gray'
|
|
58
|
-
}
|
|
59
|
-
: {};
|
|
60
|
-
const tooltip = title
|
|
61
|
-
? t(title.id, {
|
|
62
|
-
defaultValue: title.defaultValue
|
|
63
|
-
})
|
|
64
|
-
: undefined;
|
|
65
|
-
const labelText = label
|
|
66
|
-
? t(label.id, {
|
|
67
|
-
defaultValue: label.defaultValue
|
|
68
|
-
})
|
|
69
|
-
: null;
|
|
70
|
-
return (React.createElement("label", { title: tooltip, className: getWrapperClassName(type, toggleSmall), "data-testid": other['wrapper-data-testid'] },
|
|
71
|
-
React.createElement("input", { type: "checkbox", checked: value, disabled: disabled, onChange: () => onChange(!value), "data-testid": other['data-testid'] }),
|
|
72
|
-
React.createElement("div", { className: getCheckboxClassName(type, toggleSmall), style: style, "data-testid": other['innerdiv-data-testid'] }),
|
|
73
|
-
label && React.createElement("span", { className: "textlabel" }, labelText)));
|
|
74
|
-
};
|
|
75
|
-
exports.default = (0, react_i18next_1.withTranslation)()(Checkbox);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import '../../assets/search-box.css';
|
|
3
|
-
import { CSSProperties } from 'react';
|
|
4
|
-
import { TranslationDescriptor } from '../../types/i18n';
|
|
5
|
-
export declare type Props = {
|
|
6
|
-
/** Placeholder text for input field `(string | TranslationDescriptor)` */
|
|
7
|
-
placeholder: string | TranslationDescriptor;
|
|
8
|
-
/** Function to call if the input changes */
|
|
9
|
-
onChange: (value: string) => void;
|
|
10
|
-
/** Function to call if the search is triggered (button press or return in search field) */
|
|
11
|
-
onSubmit?: (value: string) => void;
|
|
12
|
-
/** if true, a button is shown that clears the input */
|
|
13
|
-
clearable?: boolean;
|
|
14
|
-
/** Value that should initially be displayed in the text box */
|
|
15
|
-
initialValue: string | null | undefined;
|
|
16
|
-
/** Wrapper styles */
|
|
17
|
-
style: CSSProperties | undefined;
|
|
18
|
-
};
|
|
19
|
-
declare const _default: React.ComponentType<Props>;
|
|
20
|
-
export default _default;
|
|
21
|
-
//# sourceMappingURL=SearchBox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../../src/components/input/SearchBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAgB,aAAa,EAAC,MAAM,OAAO,CAAC;AAInD,OAAO,EAAC,qBAAqB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,oBAAY,KAAK,GAAG;IACnB,0EAA0E;IAC1E,WAAW,EAAE,MAAM,GAAG,qBAAqB,CAAC;IAE5C,4CAA4C;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAExC,qBAAqB;IACrB,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;CACjC,CAAC;;AA2GF,wBAAoE"}
|