@luscii-healthtech/web-ui 2.47.5 → 2.47.7

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.
@@ -13,7 +13,7 @@ export declare const BUTTON_ROLES: {
13
13
  readonly ICON: "icon";
14
14
  };
15
15
  declare type BUTTON_KEYS = keyof typeof BUTTON_ROLES;
16
- export declare type BUTTON_TYPE = typeof BUTTON_ROLES[BUTTON_KEYS];
16
+ export declare type BUTTON_TYPE = (typeof BUTTON_ROLES)[BUTTON_KEYS];
17
17
  export declare type ButtonType = "button" | "submit";
18
18
  export interface ButtonProps extends RestPropped {
19
19
  text?: string;
@@ -23,7 +23,7 @@ export interface ButtonProps extends RestPropped {
23
23
  link?: string;
24
24
  isPending?: boolean;
25
25
  isDisabled?: boolean;
26
- onClick?: (arg: any) => void;
26
+ onClick?: (arg: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
27
27
  className?: string;
28
28
  iconName?: string;
29
29
  hasIcon?: boolean;
@@ -1,7 +1,7 @@
1
1
  declare const imageSrc: {
2
- "no-open-alerts": any;
3
- "search-not-found": any;
4
- "no-notes-found": any;
2
+ "no-open-alerts": string;
3
+ "search-not-found": string;
4
+ "no-notes-found": string;
5
5
  };
6
6
  interface EmptyListMessageProps {
7
7
  text: string;
@@ -5,6 +5,7 @@ export interface LoadingIndicatorProps extends RestPropped {
5
5
  asSpinner?: boolean;
6
6
  className?: string;
7
7
  spinnerColor?: "blue" | "gray";
8
+ dataTestId?: string;
8
9
  }
9
- export declare function LoadingIndicator({ asModal, asSpinner, className, spinnerColor, ...restProps }: LoadingIndicatorProps): JSX.Element;
10
+ export declare function LoadingIndicator({ asModal, asSpinner, className, spinnerColor, dataTestId, ...restProps }: LoadingIndicatorProps): JSX.Element;
10
11
  export default LoadingIndicator;
@@ -19,9 +19,8 @@ export type Breadcrumb = {
19
19
  * @typedef {{ name?: string, icon?: string|Object, link?: string}} Breadcrumb
20
20
  *
21
21
  */
22
- declare function Page({ dataTestId, breadcrumbs, title, accessories, accessoryPosition, className, children, content, isLoading, isPolling, spinnerColor, navLayoutProps, showFeedbackBlock, feedbackBlock, navMenu, id, }: {
22
+ declare function Page({ dataTestId, title, accessories, accessoryPosition, className, children, content, isLoading, isPolling, spinnerColor, navLayoutProps, feedbackBlock, navMenu, id, }: {
23
23
  dataTestId?: string | undefined;
24
- breadcrumbs: any;
25
24
  title: any;
26
25
  accessories: any;
27
26
  accessoryPosition?: string | undefined;
@@ -32,7 +31,6 @@ declare function Page({ dataTestId, breadcrumbs, title, accessories, accessoryPo
32
31
  isPolling?: boolean | undefined;
33
32
  spinnerColor?: string | undefined;
34
33
  navLayoutProps?: {} | undefined;
35
- showFeedbackBlock?: boolean | undefined;
36
34
  feedbackBlock?: JSX.Element | undefined;
37
35
  navMenu: any;
38
36
  id: any;
@@ -6,5 +6,5 @@ interface StepsProps {
6
6
  step: string;
7
7
  };
8
8
  }
9
- export declare const Steps: ({ orderedStepTitles, currentStep, className, localization }: StepsProps) => JSX.Element;
9
+ export declare const Steps: ({ orderedStepTitles, currentStep, className, localization, }: StepsProps) => JSX.Element;
10
10
  export {};
@@ -1683,7 +1683,7 @@ var img$5 = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3
1683
1683
  var css_248z$6 = ".cweb-loading {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.cweb-loading .cweb-loading-text {\n margin-bottom: 24px;\n}\n\n.cweb-loading.as-modal {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 9999;\n background-color: rgba(255, 255, 255, 0.6);\n}\n\n.cweb-loading.as-modal .cweb-loading-panel {\n position: relative;\n width: 320px;\n min-height: 120px;\n border-radius: 4px;\n padding: 16px;\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.36);\n background-color: #ffffff;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n}\n\n.cweb-loading.as-modal .cweb-loading-panel:before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n right: 0;\n z-index: 1;\n height: 3px;\n background-color: #6abfa5;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}";
1684
1684
  styleInject(css_248z$6);
1685
1685
 
1686
- var _excluded$5 = ["asModal", "asSpinner", "className", "spinnerColor"];
1686
+ var _excluded$5 = ["asModal", "asSpinner", "className", "spinnerColor", "dataTestId"];
1687
1687
  function LoadingIndicator(_ref) {
1688
1688
  var _ref$asModal = _ref.asModal,
1689
1689
  asModal = _ref$asModal === void 0 ? false : _ref$asModal,
@@ -1693,6 +1693,8 @@ function LoadingIndicator(_ref) {
1693
1693
  className = _ref$className === void 0 ? "" : _ref$className,
1694
1694
  _ref$spinnerColor = _ref.spinnerColor,
1695
1695
  spinnerColor = _ref$spinnerColor === void 0 ? "blue" : _ref$spinnerColor,
1696
+ _ref$dataTestId = _ref.dataTestId,
1697
+ dataTestId = _ref$dataTestId === void 0 ? "loading-indicator" : _ref$dataTestId,
1696
1698
  restProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
1697
1699
 
1698
1700
  var spinnerToRender = spinnerColor === "blue" ? img$4 : img$5;
@@ -1700,7 +1702,8 @@ function LoadingIndicator(_ref) {
1700
1702
  "as-modal": asModal
1701
1703
  });
1702
1704
  return /*#__PURE__*/React__default.createElement("div", _extends({}, restProps, {
1703
- className: containerClassName
1705
+ className: containerClassName,
1706
+ "data-test-id": dataTestId
1704
1707
  }), /*#__PURE__*/React__default.createElement("img", {
1705
1708
  src: asSpinner ? spinnerToRender : img$3,
1706
1709
  "data-chromatic": "ignore",
@@ -2373,10 +2376,14 @@ var Carousel = function Carousel(_ref) {
2373
2376
  }, /*#__PURE__*/React__default.createElement("div", {
2374
2377
  className: "glider-track h-full"
2375
2378
  }, slides == null ? void 0 : slides.map(function (slide, index) {
2376
- return /*#__PURE__*/React__default.createElement("div", {
2377
- key: index,
2378
- className: "overflow-hidden"
2379
- }, slide);
2379
+ return (
2380
+ /*#__PURE__*/
2381
+ // eslint-disable-next-line react/no-array-index-key
2382
+ React__default.createElement("div", {
2383
+ key: index,
2384
+ className: "overflow-hidden"
2385
+ }, slide)
2386
+ );
2380
2387
  }))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
2381
2388
  };
2382
2389
 
@@ -3245,12 +3252,14 @@ var Dropdown = /*#__PURE__*/function (_PureComponent) {
3245
3252
  _proto.render = function render() {
3246
3253
  var _this2 = this;
3247
3254
 
3248
- // eslint-disable-next-line no-unused-vars
3255
+ /* eslint-disable @typescript-eslint/no-unused-vars */
3249
3256
  var _this$props = this.props,
3250
3257
  _this$props$placehold = _this$props.placeholder,
3251
3258
  placeholder = _this$props$placehold === void 0 ? "" : _this$props$placehold,
3252
3259
  className = _this$props.className,
3253
3260
  otherProps = _objectWithoutPropertiesLoose(_this$props, _excluded$b);
3261
+ /* eslint-enable @typescript-eslint/no-unused-vars */
3262
+
3254
3263
 
3255
3264
  var _this$state2 = this.state,
3256
3265
  selectedItem = _this$state2.selectedItem,
@@ -3388,18 +3397,22 @@ function InfoBlock(_ref) {
3388
3397
  }
3389
3398
 
3390
3399
  var InfoField = function InfoField(props) {
3391
- var clipboard = new ClipboardJS("button");
3392
- clipboard.on("success", function (e) {
3393
- props.onCopyToClipboard && props.onCopyToClipboard();
3394
- e.clearSelection();
3395
- });
3396
- var ContainerElement;
3400
+ React.useEffect(function () {
3401
+ var clipboard = new ClipboardJS("button");
3402
+ clipboard.on("success", function (e) {
3403
+ props.onCopyToClipboard && props.onCopyToClipboard();
3404
+ e.clearSelection();
3405
+ });
3406
+ return function () {
3407
+ return clipboard.destroy();
3408
+ };
3409
+ }, [props.onCopyToClipboard]);
3397
3410
  var containerProps;
3398
3411
 
3399
3412
  switch (props.linkType) {
3400
3413
  case "link":
3401
- ContainerElement = "a";
3402
3414
  containerProps = {
3415
+ element: "a",
3403
3416
  href: props.value,
3404
3417
  target: "_blank",
3405
3418
  rel: "noopener noreferrer"
@@ -3407,15 +3420,15 @@ var InfoField = function InfoField(props) {
3407
3420
  break;
3408
3421
 
3409
3422
  case "tel":
3410
- ContainerElement = "a";
3411
3423
  containerProps = {
3424
+ element: "a",
3412
3425
  href: "tel:" + props.value
3413
3426
  };
3414
3427
  break;
3415
3428
 
3416
3429
  case "clipboard":
3417
- ContainerElement = "button";
3418
3430
  containerProps = {
3431
+ element: "button",
3419
3432
  type: "button",
3420
3433
  "data-clipboard-text": props.value
3421
3434
  };
@@ -3423,10 +3436,13 @@ var InfoField = function InfoField(props) {
3423
3436
 
3424
3437
  case "none":
3425
3438
  default:
3426
- ContainerElement = "div";
3439
+ containerProps = {
3440
+ element: "div"
3441
+ };
3427
3442
  break;
3428
3443
  }
3429
3444
 
3445
+ var ContainerElement = containerProps.element;
3430
3446
  return /*#__PURE__*/React__default.createElement("div", {
3431
3447
  className: classNames("flex flex-row align-center items-center", props.className)
3432
3448
  }, props.icon, /*#__PURE__*/React__default.createElement(ContainerElement, _extends({
@@ -5045,7 +5061,9 @@ var Steps = function Steps(_ref) {
5045
5061
  className = _ref.className,
5046
5062
  localization = _ref.localization;
5047
5063
  var renderedSteps = orderedStepTitles.map(function (stepTitle, index) {
5048
- return /*#__PURE__*/React__default.createElement(Step, {
5064
+ return /*#__PURE__*/React__default.createElement(Step // eslint-disable-next-line react/no-array-index-key
5065
+ , {
5066
+ // eslint-disable-next-line react/no-array-index-key
5049
5067
  key: "step-" + index + "-" + stepTitle.split(" ")[0],
5050
5068
  title: stepTitle,
5051
5069
  stepNumber: index + 1,
@@ -6213,7 +6231,7 @@ var TabLinksSelect = function TabLinksSelect(_ref) {
6213
6231
  value: url,
6214
6232
  label: text
6215
6233
  };
6216
- });
6234
+ }); // eslint-disable-next-line @typescript-eslint/no-explicit-any
6217
6235
 
6218
6236
  var handleChange = function handleChange(value) {
6219
6237
  navigate(value == null ? void 0 : value.href);