@stella-source/stellasource-dsl 3.4.0 → 3.5.0

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.
@@ -8,7 +8,7 @@ declare const _default: {
8
8
  control: {
9
9
  type: string;
10
10
  };
11
- options: (OrderStatusVariant | null)[];
11
+ options: string[];
12
12
  };
13
13
  };
14
14
  args: {
@@ -1,2 +1,2 @@
1
1
  import { OrderStatusVariant } from "./types";
2
- export declare const getOrderStatusLabel: (variant: OrderStatusVariant | null, isPurchaser?: boolean) => string;
2
+ export declare const getOrderStatusLabel: (variant?: `${OrderStatusVariant}` | string, isPurchaser?: boolean) => string;
@@ -15,6 +15,6 @@ export declare enum OrderStatusVariant {
15
15
  export interface OrderStatusProps {
16
16
  id?: string;
17
17
  className?: string;
18
- variant: OrderStatusVariant | null;
18
+ variant?: `${OrderStatusVariant}` | string;
19
19
  isPurchaser?: boolean;
20
20
  }
@@ -23147,6 +23147,9 @@ const OrderStatusLabel = styled.span `
23147
23147
  overflow: hidden;
23148
23148
  `;
23149
23149
 
23150
+ // This is used as a dictionary of all of the mapped strings to icons and labels.
23151
+ // It isn't being enforced because of the string type.
23152
+ // Still, any new status mappings need to be added here as it affects the tests and stories.
23150
23153
  var OrderStatusVariant;
23151
23154
  (function (OrderStatusVariant) {
23152
23155
  OrderStatusVariant["COMPLETED"] = "Completed";
@@ -23182,7 +23185,7 @@ const getOrderStatusLabel = (variant, isPurchaser) => {
23182
23185
  }
23183
23186
  };
23184
23187
 
23185
- const OrderStatus = ({ variant, id, className, isPurchaser, }) => {
23188
+ const OrderStatus = ({ variant = "", id, className, isPurchaser, }) => {
23186
23189
  const STATUS_ICON_MAP = {
23187
23190
  InfoNeeded: "warning",
23188
23191
  ViewPricing: "eye",
@@ -23201,6 +23204,7 @@ const OrderStatus = ({ variant, id, className, isPurchaser, }) => {
23201
23204
  const label = getOrderStatusLabel(variant, isPurchaser);
23202
23205
  return (a__default.createElement(OrderStatusComponent, { id: id, className: className },
23203
23206
  iconName && a__default.createElement(OrderStatusIcon, { iconName: iconName, size: 16 }),
23207
+ !iconName && label !== "--" && (a__default.createElement(OrderStatusIcon, { iconName: "warning", size: 16 })),
23204
23208
  a__default.createElement(OrderStatusLabel, null, label)));
23205
23209
  };
23206
23210