@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.
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/OrderStatus/OrderStatus.stories.d.ts +1 -1
- package/dist/cjs/types/components/OrderStatus/helpers.d.ts +1 -1
- package/dist/cjs/types/components/OrderStatus/types.d.ts +1 -1
- package/dist/esm/index.esm.js +5 -1
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/types/components/OrderStatus/OrderStatus.stories.d.ts +1 -1
- package/dist/esm/types/components/OrderStatus/helpers.d.ts +1 -1
- package/dist/esm/types/components/OrderStatus/types.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OrderStatusVariant } from "./types";
|
|
2
|
-
export declare const getOrderStatusLabel: (variant
|
|
2
|
+
export declare const getOrderStatusLabel: (variant?: `${OrderStatusVariant}` | string, isPurchaser?: boolean) => string;
|
package/dist/esm/index.esm.js
CHANGED
|
@@ -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
|
|