@altinn/altinn-components 0.30.1 → 0.30.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.
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import "../Searchbar/AutocompleteBase.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
7
|
import { MetaItem as o } from "../Metadata/MetaItem.js";
|
|
8
|
-
import { MetaProgress as
|
|
9
|
-
var
|
|
10
|
-
const
|
|
8
|
+
import { MetaProgress as p } from "../Metadata/MetaProgress.js";
|
|
9
|
+
var c = /* @__PURE__ */ ((r) => (r["not-applicable"] = "NOT_APPLICABLE", r.draft = "DRAFT", r.awaiting = "AWAITING", r.completed = "COMPLETED", r["in-progress"] = "IN_PROGRESS", r["requires-attention"] = "REQUIRES_ATTENTION", r))(c || {});
|
|
10
|
+
const A = ({ loading: r, size: n = "xs", value: t = "not-applicable", label: e }) => {
|
|
11
11
|
if (r)
|
|
12
12
|
return null;
|
|
13
13
|
switch (t) {
|
|
14
|
-
case "new":
|
|
15
|
-
return null;
|
|
16
14
|
case "draft":
|
|
17
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ i(o, { size: n, variant: "dotted", children: e || t });
|
|
16
|
+
case "awaiting":
|
|
17
|
+
return /* @__PURE__ */ i(o, { size: n, variant: "outline", children: e || t });
|
|
18
18
|
case "requires-attention":
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ i(o, { variant: "solid", children: e || t });
|
|
20
20
|
case "in-progress":
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ i(p, { size: n, variant: "outline", progress: 75, children: e || t });
|
|
22
22
|
case "completed":
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ i(p, { size: n, variant: "outline", progress: 100, children: e || t });
|
|
24
24
|
default:
|
|
25
|
-
return
|
|
25
|
+
return null;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
A as DialogStatus,
|
|
30
|
+
c as DialogStatusEnum
|
|
31
31
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MetaItemSize } from '../Metadata';
|
|
2
2
|
export declare enum DialogStatusEnum {
|
|
3
|
+
/** No explicit status. This is the default. */
|
|
4
|
+
'not-applicable' = "NOT_APPLICABLE",
|
|
3
5
|
/** Used to indicate user-initiated dialogs not yet sent. */
|
|
4
6
|
draft = "DRAFT",
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
/** The dialogue is considered new. Typically used for simple messages that do not require any interaction, or as an initial step for dialogues. This is the default. */
|
|
8
|
-
new = "NEW",
|
|
7
|
+
/** Awaiting action by the service owner. Indicates that the dialog is in a state where the party representative has no further tasks, and the responsibility lies with the service owner. */
|
|
8
|
+
awaiting = "AWAITING",
|
|
9
9
|
/** The dialogue was completed. This typically means that the dialogue is moved to a GUI archive or similar. */
|
|
10
10
|
completed = "COMPLETED",
|
|
11
11
|
/** Started. In a serial process, this is used to indicate that, for example, a form filling is ongoing. */
|
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof meta>;
|
|
16
16
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export declare const Draft: Story;
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const Awaiting: Story;
|
|
19
19
|
export declare const RequiresAttention: Story;
|
|
20
20
|
export declare const InProgress: Story;
|
|
21
21
|
export declare const Completed: Story;
|