@equinor/amplify-component-lib 12.0.1 → 12.0.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/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
- package/dist/deprecated/IconToggleButton.d.ts +2 -2
- package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
- package/dist/molecules/Chip/Chip.d.ts +1 -1
- package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/Select/Select.styles.d.ts +4 -4
- package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
- package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
- package/dist/organisms/Filter/Filter.d.ts +2 -2
- package/dist/organisms/Filter/QuickFilter.d.ts +2 -2
- package/dist/organisms/Status/Action.d.ts +2 -2
- package/dist/organisms/Status/Description.d.ts +2 -2
- package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
- package/dist/organisms/Status/Title.d.ts +2 -2
- package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
- package/dist/organisms/Status/collections/MissingPermissions.d.ts +2 -2
- package/dist/organisms/Status/collections/PageNotFound.d.ts +2 -2
- package/dist/organisms/Status/collections/ServerError.d.ts +2 -2
- package/dist/organisms/TopBar/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyDialog.js +1 -1
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyMultipleChoiceQuestion.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react1 from "react";
|
|
2
2
|
import { IconData } from "@equinor/eds-icons";
|
|
3
3
|
|
|
4
4
|
//#region src/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts
|
|
@@ -12,6 +12,6 @@ interface ExpandingIconButtonProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Being deprecated from amplify-component-lib move into app if you want the implementation
|
|
14
14
|
*/
|
|
15
|
-
declare const ExpandingIconButton:
|
|
15
|
+
declare const ExpandingIconButton: react1.ForwardRefExoticComponent<ExpandingIconButtonProps & react1.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { ExpandingIconButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react0 from "react";
|
|
2
2
|
import { IconData } from "@equinor/eds-icons";
|
|
3
3
|
|
|
4
4
|
//#region src/deprecated/IconToggleButton.d.ts
|
|
@@ -21,6 +21,6 @@ interface IconToggleButtonProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated Being deprecated from amplify-component-lib move into app if you want the implementation
|
|
23
23
|
*/
|
|
24
|
-
declare const IconToggleButton:
|
|
24
|
+
declare const IconToggleButton: react0.ForwardRefExoticComponent<IconToggleButtonProps & react0.RefAttributes<HTMLButtonElement>>;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { IconToggleButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Acquire as e}from"./Icons/Acquire.js";import{Adca as t}from"./Icons/Adca.js";import{AtWork as n}from"./Icons/Atwork.js";import{Bravos as r}from"./Icons/Bravos.js";import{Dasha as i}from"./Icons/Dasha.js";import{DataDeliveryPlan as a}from"./Icons/DataDeliveryPlan.js";import{FluidSymphony as o}from"./Icons/FluidSymphony.js";import{FluxMaps as s}from"./Icons/FluxMaps.js";import{ForecastDataInventory as c}from"./Icons/ForecastDataInventory.js";import{ForecastFormatter as l}from"./Icons/ForecastFormatter.js";import{JsEmbark as u}from"./Icons/JsEmbark.js";import{LoggingQualification as d}from"./Icons/LoggingQualification.js";import{Orca as f}from"./Icons/Orca.js";import{Premo as p}from"./Icons/Premo.js";import{Pwex as m}from"./Icons/Pwex.js";import{Recap as h}from"./Icons/Recap.js";import{Sam as g}from"./Icons/Sam.js";import{SubsurfacePortal as _}from"./Icons/SubsurfacePortal.js";import{Fallback as v}from"./Fallback.js";import{forwardRef as y}from"react";import{jsx as b}from"react/jsx-runtime";const x=[{appName:[`adca`],component:t},{appName:[`portal`,`embark`,`jsembark`],component:u},{appName:[`acquire`],component:e},{appName:[`dasha`],component:i},{appName:[`forecast formatter`,`Forecast formatter`,`Forecast Formatter`,`forecast-formatter`],component:l},{appName:[`fdi`],component:c},{appName:[`fluid-symphony`,`Fluid Symphony`],component:o},{appName:[`orca`],component:f},{appName:[`logging-qualification`,`logging qualification`,`ltg`],component:d},{appName:[`flux-maps`,`fluxmaps`,`flux maps`],component:s},{appName:[`recap`],component:h},{appName:[`pwex`],component:m},{appName:[`bravos`],component:r},{appName:[`premo`],component:p},{appName:[`sam`],component:g},{appName:[`subsurface portal`],component:_},{appName:[`atwork`],component:n},{appName:[`data delivery plan`,`data-delivery-plan`],component:a}],S=y(({name:e,size:t=48,iconOnly:n=!1,withHover:r=!1,grayScale:i=!1},a)=>{let o=x.find(
|
|
1
|
+
import{Acquire as e}from"./Icons/Acquire.js";import{Adca as t}from"./Icons/Adca.js";import{AtWork as n}from"./Icons/Atwork.js";import{Bravos as r}from"./Icons/Bravos.js";import{Dasha as i}from"./Icons/Dasha.js";import{DataDeliveryPlan as a}from"./Icons/DataDeliveryPlan.js";import{FluidSymphony as o}from"./Icons/FluidSymphony.js";import{FluxMaps as s}from"./Icons/FluxMaps.js";import{ForecastDataInventory as c}from"./Icons/ForecastDataInventory.js";import{ForecastFormatter as l}from"./Icons/ForecastFormatter.js";import{JsEmbark as u}from"./Icons/JsEmbark.js";import{LoggingQualification as d}from"./Icons/LoggingQualification.js";import{Orca as f}from"./Icons/Orca.js";import{Premo as p}from"./Icons/Premo.js";import{Pwex as m}from"./Icons/Pwex.js";import{Recap as h}from"./Icons/Recap.js";import{Sam as g}from"./Icons/Sam.js";import{SubsurfacePortal as _}from"./Icons/SubsurfacePortal.js";import{Fallback as v}from"./Fallback.js";import{forwardRef as y}from"react";import{jsx as b}from"react/jsx-runtime";const x=[{appName:[`adca`],component:t},{appName:[`portal`,`embark`,`jsembark`,`js embark`],component:u},{appName:[`acquire`],component:e},{appName:[`dasha`],component:i},{appName:[`forecast formatter`,`Forecast formatter`,`Forecast Formatter`,`forecast-formatter`],component:l},{appName:[`fdi`,`forecast data inventory`],component:c},{appName:[`fluid-symphony`,`Fluid Symphony`],component:o},{appName:[`orca`],component:f},{appName:[`logging-qualification`,`logging qualification`,`ltg`],component:d},{appName:[`flux-maps`,`fluxmaps`,`flux maps`],component:s},{appName:[`recap`],component:h},{appName:[`pwex`],component:m},{appName:[`bravos`],component:r},{appName:[`premo`],component:p},{appName:[`sam`],component:g},{appName:[`subsurface portal`],component:_},{appName:[`atwork`],component:n},{appName:[`data delivery plan`,`data-delivery-plan`],component:a}],S=y(({name:e,size:t=48,iconOnly:n=!1,withHover:r=!1,grayScale:i=!1},a)=>{let o=e.toLowerCase(),s=x.find(e=>e.appName.some(e=>e.toLowerCase()===o));return s===void 0?b(v,{size:t,ref:a,iconOnly:n,withHover:r,grayScale:i,name:e}):b(s.component,{size:t,ref:a,iconOnly:n,withHover:r,grayScale:i})});S.displayName=`ApplicationIcon`;export{S as ApplicationIcon};
|
|
@@ -25,6 +25,6 @@ type DeletableChipProps = BaseChipProps & InteractiveChipBase & {
|
|
|
25
25
|
onDelete: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
|
|
26
26
|
};
|
|
27
27
|
type ChipProps = Omit<HTMLAttributes<HTMLDivElement | HTMLButtonElement>, 'onClick'> & (ReadOnlyChipProps | ClickableChipProps | DeletableChipProps);
|
|
28
|
-
declare const Chip: react6.ForwardRefExoticComponent<ChipProps & react6.RefAttributes<
|
|
28
|
+
declare const Chip: react6.ForwardRefExoticComponent<ChipProps & react6.RefAttributes<HTMLButtonElement | HTMLDivElement>>;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { BaseChipProps, Chip, ClickableChipProps, DeletableChipProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Variants } from "../../atoms/types/variants.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react8 from "react";
|
|
3
3
|
import { DatePickerProps } from "@equinor/eds-core-react";
|
|
4
4
|
|
|
5
5
|
//#region src/molecules/DatePicker/DatePicker.d.ts
|
|
@@ -9,11 +9,11 @@ type DatePickerProps$1 = Omit<DatePickerProps, 'variant' | 'defaultValue'> & {
|
|
|
9
9
|
meta?: string;
|
|
10
10
|
loading?: boolean;
|
|
11
11
|
};
|
|
12
|
-
declare const DatePicker$1:
|
|
12
|
+
declare const DatePicker$1: react8.ForwardRefExoticComponent<Omit<DatePickerProps, "defaultValue" | "variant"> & {
|
|
13
13
|
variant?: Variants;
|
|
14
14
|
defaultValue?: Date | undefined;
|
|
15
15
|
meta?: string;
|
|
16
16
|
loading?: boolean;
|
|
17
|
-
} &
|
|
17
|
+
} & react8.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { DatePicker$1 as DatePicker, DatePickerProps$1 as DatePickerProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Variants } from "../../atoms/types/variants.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react10 from "react";
|
|
3
3
|
import { DateRangePickerProps } from "@equinor/eds-core-react";
|
|
4
4
|
|
|
5
5
|
//#region src/molecules/DateRangePicker/DateRangePicker.d.ts
|
|
@@ -8,10 +8,10 @@ type DateRangePickerProps$1 = Omit<DateRangePickerProps, 'variant'> & {
|
|
|
8
8
|
meta?: string;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare const DateRangePicker$1:
|
|
11
|
+
declare const DateRangePicker$1: react10.ForwardRefExoticComponent<Omit<DateRangePickerProps, "variant"> & {
|
|
12
12
|
variant?: Variants;
|
|
13
13
|
meta?: string;
|
|
14
14
|
loading?: boolean;
|
|
15
|
-
} &
|
|
15
|
+
} & react10.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { DateRangePicker$1 as DateRangePicker, DateRangePickerProps$1 as DateRangePickerProps };
|
|
@@ -11,15 +11,15 @@ interface ComboBoxChipProps {
|
|
|
11
11
|
$lightBackground?: boolean;
|
|
12
12
|
className: string;
|
|
13
13
|
}
|
|
14
|
-
declare const ComboBoxChip: styled_components_dist_types5.IStyledComponentBase<"web", styled_components11.FastOmit<styled_components11.FastOmit<((Omit<react55.HTMLAttributes<
|
|
14
|
+
declare const ComboBoxChip: styled_components_dist_types5.IStyledComponentBase<"web", styled_components11.FastOmit<styled_components11.FastOmit<((Omit<react55.HTMLAttributes<HTMLButtonElement | HTMLDivElement>, "onClick"> & ((BaseChipProps & {
|
|
15
15
|
onClick?: undefined;
|
|
16
16
|
onDelete?: undefined;
|
|
17
|
-
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<
|
|
17
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLButtonElement | HTMLDivElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never> & Partial<Pick<styled_components11.FastOmit<((Omit<react55.HTMLAttributes<HTMLButtonElement | HTMLDivElement>, "onClick"> & ((BaseChipProps & {
|
|
18
18
|
onClick?: undefined;
|
|
19
19
|
onDelete?: undefined;
|
|
20
|
-
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<
|
|
20
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLButtonElement | HTMLDivElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never>>> & string & Omit<react55.ForwardRefExoticComponent<(Omit<react55.HTMLAttributes<HTMLButtonElement | HTMLDivElement>, "onClick"> & ((BaseChipProps & {
|
|
21
21
|
onClick?: undefined;
|
|
22
22
|
onDelete?: undefined;
|
|
23
|
-
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<
|
|
23
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLButtonElement | HTMLDivElement>>, keyof react55.Component<any, {}, any>>;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { ComboBoxChip };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react159 from "react";
|
|
2
2
|
import { RadioProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Radio/Radio.d.ts
|
|
@@ -7,6 +7,6 @@ interface RadioProps$1 extends RadioProps {
|
|
|
7
7
|
outlined?: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const Radio$1:
|
|
10
|
+
declare const Radio$1: react159.ForwardRefExoticComponent<RadioProps$1 & react159.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Radio$1 as Radio, RadioProps$1 as RadioProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react157 from "react";
|
|
2
2
|
import { SwitchProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Switch/Switch.d.ts
|
|
5
5
|
interface SwitchProps$1 extends SwitchProps {
|
|
6
6
|
outlined?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Switch$1:
|
|
8
|
+
declare const Switch$1: react157.ForwardRefExoticComponent<SwitchProps$1 & react157.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Switch$1 as Switch, SwitchProps$1 as SwitchProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilterProps } from "./Filter.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/Filter/Filter.d.ts
|
|
5
5
|
|
|
@@ -32,6 +32,6 @@ declare function Filter<T extends string>({
|
|
|
32
32
|
id,
|
|
33
33
|
openOnFocus,
|
|
34
34
|
...rest
|
|
35
|
-
}: FilterProps<T>):
|
|
35
|
+
}: FilterProps<T>): react_jsx_runtime7.JSX.Element;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { Filter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectOptionRequired } from "../../molecules/Select/Select.types.js";
|
|
2
2
|
import { FilterProps } from "./Filter.types.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/organisms/Filter/QuickFilter.d.ts
|
|
6
6
|
interface QuickFilterProps<T extends string> {
|
|
@@ -14,6 +14,6 @@ declare function QuickFilter<T extends string>({
|
|
|
14
14
|
items,
|
|
15
15
|
onQuickFilter,
|
|
16
16
|
label
|
|
17
|
-
}: QuickFilterProps<T>):
|
|
17
|
+
}: QuickFilterProps<T>): react_jsx_runtime6.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { QuickFilter };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react197 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Action.d.ts
|
|
4
4
|
interface ActionProps {
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
buttonText?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const Action:
|
|
8
|
+
declare const Action: react197.ForwardRefExoticComponent<ActionProps & react197.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Action };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react199 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Description.d.ts
|
|
4
4
|
interface DescriptionProps {
|
|
5
5
|
text?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const Description:
|
|
7
|
+
declare const Description: react199.ForwardRefExoticComponent<DescriptionProps & react199.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Description };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react201 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/MissingAccesses.d.ts
|
|
4
4
|
interface AccessType {
|
|
@@ -9,6 +9,6 @@ interface MissingAccessesProps {
|
|
|
9
9
|
accesses?: AccessType[];
|
|
10
10
|
text?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const MissingAccesses:
|
|
12
|
+
declare const MissingAccesses: react201.ForwardRefExoticComponent<MissingAccessesProps & react201.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MissingAccesses };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react203 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Title.d.ts
|
|
4
4
|
interface TitleProps {
|
|
5
5
|
title?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const Title:
|
|
7
|
+
declare const Title: react203.ForwardRefExoticComponent<TitleProps & react203.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Title };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/GenericError.d.ts
|
|
4
4
|
interface GenericErrorProps {
|
|
@@ -14,6 +14,6 @@ declare const GenericError: ({
|
|
|
14
14
|
redirectFallbackUrl,
|
|
15
15
|
onBackClick,
|
|
16
16
|
hideBackButton
|
|
17
|
-
}: GenericErrorProps) =>
|
|
17
|
+
}: GenericErrorProps) => react_jsx_runtime10.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { GenericError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/MissingPermissions.d.ts
|
|
4
4
|
interface MissingPermissionsProps {
|
|
@@ -14,6 +14,6 @@ declare const MissingPermissions: ({
|
|
|
14
14
|
redirectFallbackUrl,
|
|
15
15
|
onBackClick,
|
|
16
16
|
hideBackButton
|
|
17
|
-
}: MissingPermissionsProps) =>
|
|
17
|
+
}: MissingPermissionsProps) => react_jsx_runtime9.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { MissingPermissions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/PageNotFound.d.ts
|
|
4
4
|
interface PageNotFoundProps {
|
|
@@ -12,6 +12,6 @@ declare const PageNotFound: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: PageNotFoundProps) =>
|
|
15
|
+
}: PageNotFoundProps) => react_jsx_runtime11.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { PageNotFound };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/ServerError.d.ts
|
|
4
4
|
interface ServerErrorProps {
|
|
@@ -12,6 +12,6 @@ declare const ServerError: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: ServerErrorProps) =>
|
|
15
|
+
}: ServerErrorProps) => react_jsx_runtime12.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { ServerError };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react195 from "react";
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/TopBar/Actions.d.ts
|
|
5
|
-
declare const Actions:
|
|
5
|
+
declare const Actions: react195.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react195.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Actions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Field } from "../../../atoms/types/Field.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react193 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/TopBar/FieldMenu/FieldMenu.d.ts
|
|
5
5
|
interface FieldMenuProps {
|
|
@@ -8,6 +8,6 @@ interface FieldMenuProps {
|
|
|
8
8
|
itemNameSingular?: string;
|
|
9
9
|
showAccessITLink?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare const FieldMenu:
|
|
11
|
+
declare const FieldMenu: react193.ForwardRefExoticComponent<FieldMenuProps & react193.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { FieldMenu };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSurvey as e}from"../hooks/useSurvey.js";import{SurveyQuestion as t}from"./SurveyQuestion/SurveyQuestion.js";import{Content as n}from"./SurveyDialog.styles.js";import{SurveyProgress as r}from"./SurveyProgress.js";import{Dialog as i}from"../../../molecules/Dialog/Dialog.js";import{UmuxDialog as a}from"./UmuxDialog.js";import{useState as o}from"react";import{Typography as s}from"@equinor/eds-core-react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{QuestionType as u,SurveyType as d}from"@equinor/subsurface-app-management";const f=()=>{let{activeSurvey:f,activeQuestionIndex:p,setActiveQuestionIndex:m,cancelSurvey:h,hideSurvey:g,answerQuestion:_,currentAnswer:v,setCurrentAnswer:y,isCancelled:b}=e(),[x,S]=o(!1);if(!f||p===void 0||b)return null;let C=[{text:p===0?`Maybe later`:`Back`,variant:`ghost`,onClick:()=>{if(p===0){h();return}let e=f.questions[p-1].answer;e&&(m(p-1),y({id:f.questions[p-1].questionId,...e}))}},{text:p===0?`Get started`:p===f.questions.length-1?`Complete`:`Next`,disabled:(()=>{if(!v)return!0;let e=f?.questions[p??0];switch(e.type){case u.CHOICE:return!v.selectedOptionIds||v.selectedOptionIds.length===0||v.selectedOptionIds.length>(e.
|
|
1
|
+
import{useSurvey as e}from"../hooks/useSurvey.js";import{SurveyQuestion as t}from"./SurveyQuestion/SurveyQuestion.js";import{Content as n}from"./SurveyDialog.styles.js";import{SurveyProgress as r}from"./SurveyProgress.js";import{Dialog as i}from"../../../molecules/Dialog/Dialog.js";import{UmuxDialog as a}from"./UmuxDialog.js";import{useState as o}from"react";import{Typography as s}from"@equinor/eds-core-react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{QuestionType as u,SurveyType as d}from"@equinor/subsurface-app-management";const f=()=>{let{activeSurvey:f,activeQuestionIndex:p,setActiveQuestionIndex:m,cancelSurvey:h,hideSurvey:g,answerQuestion:_,currentAnswer:v,setCurrentAnswer:y,isCancelled:b}=e(),[x,S]=o(!1);if(!f||p===void 0||b)return null;let C=[{text:p===0?`Maybe later`:`Back`,variant:`ghost`,onClick:()=>{if(p===0){h();return}let e=f.questions[p-1].answer;e&&(m(p-1),y({id:f.questions[p-1].questionId,...e}))}},{text:p===0?`Get started`:p===f.questions.length-1?`Complete`:`Next`,disabled:(()=>{if(!v)return!0;let e=f?.questions[p??0];switch(e.type){case u.CHOICE:return!v.selectedOptionIds||v.selectedOptionIds.length===0||v.selectedOptionIds.length>(e.multipleChoiceVm?.maxSelectableOptions??0);case u.LINEAR_SCALE:return v.numericAnswer===void 0;case u.TEXT:return!v.textAnswer||v.textAnswer.trim()===``}})(),onClick:async()=>{v&&(S(!0),await _({...v,selectedOptionIds:v?.selectedOptionIds??[]}),S(!1))},isLoading:x}];return f.surveyType===d.UMUX?c(a,{}):c(i,{open:!0,width:650,title:f.title,onClose:h,actions:p===0?[{text:`Do not show me this again`,variant:`ghost`,onClick:g,position:`left`},...C]:C,children:l(n,{children:[c(r,{}),c(s,{variant:`body_short_bold`,children:f.questions[p].questionText}),c(t,{})]})})};export{f as SurveyDialog};
|
package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyMultipleChoiceQuestion.js
CHANGED
|
@@ -2,4 +2,4 @@ import{spacings as e}from"../../../../atoms/style/spacings.js";import{useSurvey
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: ${e.medium};
|
|
5
|
-
`,o=({questionId:e,
|
|
5
|
+
`,o=({questionId:e,multipleChoiceVm:r})=>{let{currentAnswer:o,setCurrentAnswer:s}=t();return i(a,{children:r.options.map(t=>{let a=o?.selectedOptionIds?.some(e=>e.value===t.id.value);return i(n,{label:t.optionText,checked:a,disabled:!a&&r.maxSelectableOptions===(o?.selectedOptionIds?.length??0),onChange:n=>{s(r=>{let i=(r&&r.selectedOptionIds)??[];if(n.target.checked)i.push(t.id);else{let e=i.findIndex(e=>e.value===t.id.value);i.splice(e,1)}return{...r,id:e,selectedOptionIds:i}})}},t.id.value)})})};export{o as SurveyMultipleChoiceQuestion};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/amplify-component-lib",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "Frontend Typescript components for the Amplify team",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@equinor/eds-icons": "^0.22.0",
|
|
55
|
-
"@equinor/subsurface-app-management": "5.4.
|
|
55
|
+
"@equinor/subsurface-app-management": "5.4.6",
|
|
56
56
|
"@eslint/js": "^9.22.0",
|
|
57
57
|
"@faker-js/faker": "^9.6.0",
|
|
58
58
|
"@storybook/addon-coverage": "^2.0.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"@equinor/eds-core-react": "0.44.0",
|
|
115
115
|
"@equinor/eds-data-grid-react": "^0.7.5",
|
|
116
116
|
"@equinor/eds-icons": "*",
|
|
117
|
-
"@equinor/subsurface-app-management": "^5.4.
|
|
117
|
+
"@equinor/subsurface-app-management": "^5.4.6",
|
|
118
118
|
"@tanstack/react-query": "*",
|
|
119
119
|
"@tanstack/react-router": "*",
|
|
120
120
|
"@tiptap/core": "^3.1.0",
|