@equinor/amplify-component-lib 12.0.2 → 12.0.4
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/Chip/Chip.d.ts +1 -1
- 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/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyLinearScaleQuestion.js +1 -1
- package/dist/providers/SurveyProvider/SurveyProvider.js +1 -1
- package/package.json +1 -1
|
@@ -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/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: react0.ForwardRefExoticComponent<ExpandingIconButtonProps & react0.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { ExpandingIconButton };
|
|
@@ -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/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: react1.ForwardRefExoticComponent<IconToggleButtonProps & react1.RefAttributes<HTMLButtonElement>>;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { IconToggleButton };
|
|
@@ -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<HTMLDivElement | HTMLButtonElement>>;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { BaseChipProps, Chip, ClickableChipProps, DeletableChipProps };
|
|
@@ -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<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
15
15
|
onClick?: undefined;
|
|
16
16
|
onDelete?: undefined;
|
|
17
|
-
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<
|
|
17
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never> & Partial<Pick<styled_components11.FastOmit<((Omit<react55.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
18
18
|
onClick?: undefined;
|
|
19
19
|
onDelete?: undefined;
|
|
20
|
-
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<
|
|
20
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never>>> & string & Omit<react55.ForwardRefExoticComponent<(Omit<react55.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
|
|
21
21
|
onClick?: undefined;
|
|
22
22
|
onDelete?: undefined;
|
|
23
|
-
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<
|
|
23
|
+
}) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react55.Component<any, {}, any>>;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { ComboBoxChip };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react157 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: react157.ForwardRefExoticComponent<RadioProps$1 & react157.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 react159 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: react159.ForwardRefExoticComponent<SwitchProps$1 & react159.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_runtime6 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_runtime6.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_runtime7 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_runtime7.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { QuickFilter };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react199 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: react199.ForwardRefExoticComponent<ActionProps & react199.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Action };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react201 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: react201.ForwardRefExoticComponent<DescriptionProps & react201.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Description };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react203 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: react203.ForwardRefExoticComponent<MissingAccessesProps & react203.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MissingAccesses };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react197 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: react197.ForwardRefExoticComponent<TitleProps & react197.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Title };
|
|
@@ -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/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_runtime9.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { GenericError };
|
|
@@ -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/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_runtime10.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { MissingPermissions };
|
package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyLinearScaleQuestion.js
CHANGED
|
@@ -7,4 +7,4 @@ import{useSurvey as e}from"../../hooks/useSurvey.js";import{Radio as t}from"../.
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
align-items: center;
|
|
10
|
-
`,c=({questionId:r,linearScaleVm:c,...l})=>{let{currentAnswer:u,setCurrentAnswer:d}=e(),f=c.maxValue-c.minValue+1,p=e=>{`answer`in l&&`setAnswer`in l?l.setAnswer({...l.answer,numericAnswer:e}):d({id:r,numericAnswer:e})};return a(o,{$rangeAmount:f,children:[i(n,{children:c.minLabel}),Array.from({length:f}).map((e,o)=>a(s,{children:[i(n,{variant:`body_short`,children:c.minValue+o}),i(t,{"data-testid":`range-radio-${r.value}`,name:`range-${r.value}`,label:``,
|
|
10
|
+
`,c=({questionId:r,linearScaleVm:c,...l})=>{let{currentAnswer:u,setCurrentAnswer:d}=e(),f=c.maxValue-c.minValue+1,p=(`setAnswer`in l?l.answer:u)?.numericAnswer,m=e=>{`answer`in l&&`setAnswer`in l?l.setAnswer({...l.answer,numericAnswer:e}):d({id:r,numericAnswer:e})};return a(o,{$rangeAmount:f,children:[i(n,{children:c.minLabel}),Array.from({length:f}).map((e,o)=>a(s,{children:[i(n,{variant:`body_short`,children:c.minValue+o}),i(t,{"data-testid":`range-radio-${r.value}`,name:`range-${r.value}`,label:``,value:c.minValue+o,checked:p===c.minValue+o,onChange:()=>{m(c.minValue+o)}})]},`range-radio-${o}`)),i(n,{children:c.maxLabel})]})};export{c as SurveyLinearScaleQuestion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useToasts as e}from"../ToastProvider/ToastProvider.js";import{useConfetti as t}from"../ConfettiProvider/ConfettiProvider.js";import{SurveyDialog as n}from"./SurveyDialog/SurveyDialog.js";import{createContext as r,useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useActiveSurvey as l,useAnswerQuestionActiveSurvey as u,useRespondActiveSurvey as d}from"@equinor/subsurface-app-management";const f=r(void 0),p=({children:r})=>{let{showToast:p}=e(),{shower:m}=t(),{data:h}=l(),[g,_]=o(0),[v,y]=o(void 0),[b,x]=o(!1),S=a(void 0),{mutateAsync:C}=d(),{mutateAsync:w}=u();i(()=>{h&&S.current!==h.surveyId.value
|
|
1
|
+
import{useToasts as e}from"../ToastProvider/ToastProvider.js";import{useConfetti as t}from"../ConfettiProvider/ConfettiProvider.js";import{SurveyDialog as n}from"./SurveyDialog/SurveyDialog.js";import{createContext as r,useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useActiveSurvey as l,useAnswerQuestionActiveSurvey as u,useRespondActiveSurvey as d}from"@equinor/subsurface-app-management";const f=r(void 0),p=({children:r})=>{let{showToast:p}=e(),{shower:m}=t(),{data:h}=l(),[g,_]=o(0),[v,y]=o(void 0),[b,x]=o(!1),S=a(void 0),{mutateAsync:C}=d(),{mutateAsync:w}=u();i(()=>{if(h&&S.current!==h.surveyId.value){S.current=h.surveyId.value;let e=h.questions.findIndex(e=>e.answer===void 0);_(e>=0?e:0)}},[h]);let T=()=>{h&&(p({variant:`success`,title:`Survey completed`,description:`Thanks for helping us improve!`,duration:5}),h.showConfettiOnComplete&&m({mode:`shower`,shapes:[`square`],duration:5e3}))};return c(f.Provider,{value:{activeSurvey:h,activeQuestionIndex:g,setActiveQuestionIndex:_,answerQuestion:async e=>{if(!h||g===void 0||!h.questions[g])throw Error(`No active survey or question to answer`);let t=h.surveyResponseId?.value;t===void 0&&(t=(await C({surveyId:h.surveyId,optOut:!1})).value),await w({surveyResponseId:t??``,body:{id:h.questions[g].questionId,...e}}),y(void 0),g+1<h.questions.length?_(g+1):(_(void 0),T())},cancelSurvey:()=>{_(void 0),x(!0)},hideSurvey:()=>{h&&(_(void 0),C({surveyId:h.surveyId,optOut:!0}))},currentAnswer:v,setCurrentAnswer:y,isCancelled:b,completeSurvey:T},children:[r,s(n,{})]})};export{f as SurveyContext,p as SurveyProvider};
|