@shortstravelmgmt/component-lib 0.5.0 → 0.5.1-canary.95.g005e8f5
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/index.d.ts +511 -2
- package/dist/index.esm.js +1407 -204
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1446 -203
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1124,7 +1124,7 @@ const contentStyle$e = {
|
|
|
1124
1124
|
const iconStyle$i = {
|
|
1125
1125
|
label: 'Alert-iconStyle', flexShrink: 0, marginTop: 1, color: 'var(--alert-accent)'
|
|
1126
1126
|
};
|
|
1127
|
-
const bodyStyle$
|
|
1127
|
+
const bodyStyle$f = {
|
|
1128
1128
|
label: 'Alert-bodyStyle', flex: 1, minWidth: 0
|
|
1129
1129
|
};
|
|
1130
1130
|
const titleStyle$J = {
|
|
@@ -1196,7 +1196,7 @@ const variantIcons = {
|
|
|
1196
1196
|
*/
|
|
1197
1197
|
const Alert = ({ variant = 'primary', title, children, dismissible = false, onDismiss, className = '', }) => {
|
|
1198
1198
|
const IconComponent = variantIcons[variant];
|
|
1199
|
-
return (jsx("div", { className: cx(sx(alertStyle$5), sx(variantStyles$8[variant]), className), role: "alert", children: jsxs("div", { className: sx(contentStyle$e), children: [jsx(IconComponent, { className: sx(iconStyle$i), size: 20 }), jsxs("div", { className: sx(bodyStyle$
|
|
1199
|
+
return (jsx("div", { className: cx(sx(alertStyle$5), sx(variantStyles$8[variant]), className), role: "alert", children: jsxs("div", { className: sx(contentStyle$e), children: [jsx(IconComponent, { className: sx(iconStyle$i), size: 20 }), jsxs("div", { className: sx(bodyStyle$f), children: [title && jsx("h4", { className: sx(titleStyle$J), children: title }), jsx("div", { className: sx(messageStyle$3), children: children })] }), dismissible && onDismiss && (jsx("button", { type: "button", onClick: onDismiss, className: sx(dismissButtonStyle), "aria-label": "Dismiss alert", children: jsx(CloseIcon, { size: 16 }) }))] }) }));
|
|
1200
1200
|
};
|
|
1201
1201
|
|
|
1202
1202
|
const avatarSizeStyles = {
|
|
@@ -2011,12 +2011,12 @@ const labelTextSizeStyles = {
|
|
|
2011
2011
|
lg: { fontSize: 'var(--text-base)' },
|
|
2012
2012
|
};
|
|
2013
2013
|
/** Helper and error text hang under the label, indented past the box. */
|
|
2014
|
-
const helperTextStyle$
|
|
2014
|
+
const helperTextStyle$7 = {
|
|
2015
2015
|
label: 'Checkbox-helperTextStyle',
|
|
2016
2016
|
fontSize: 'var(--text-xs)',
|
|
2017
2017
|
color: 'var(--color-gray-500)',
|
|
2018
2018
|
};
|
|
2019
|
-
const errorTextStyle$
|
|
2019
|
+
const errorTextStyle$7 = {
|
|
2020
2020
|
label: 'Checkbox-errorTextStyle',
|
|
2021
2021
|
fontSize: 'var(--text-xs)',
|
|
2022
2022
|
color: 'var(--color-red-500)',
|
|
@@ -2063,7 +2063,7 @@ const Checkbox = forwardRef(({ label, size = 'md', helperText, error, indetermin
|
|
|
2063
2063
|
? indicator({ checked: !!checked, indeterminate, disabled: !!disabled })
|
|
2064
2064
|
: indeterminate
|
|
2065
2065
|
? jsx(IndeterminateIcon, {})
|
|
2066
|
-
: jsx(CheckIcon, {}) })] }), label && (jsx("span", { className: cx(sx(labelTextStyle), sx(labelTextSizeStyles[size])), children: label }))] }), error && (jsx("span", { id: errorId, className: cx(sx(errorTextStyle$
|
|
2066
|
+
: jsx(CheckIcon, {}) })] }), label && (jsx("span", { className: cx(sx(labelTextStyle), sx(labelTextSizeStyles[size])), children: label }))] }), error && (jsx("span", { id: errorId, className: cx(sx(errorTextStyle$7), sx(assistiveOffsetStyles[size])), children: error })), helperText && !error && (jsx("span", { id: helperId, className: cx(sx(helperTextStyle$7), sx(assistiveOffsetStyles[size])), children: helperText }))] }));
|
|
2067
2067
|
});
|
|
2068
2068
|
Checkbox.displayName = 'Checkbox';
|
|
2069
2069
|
|
|
@@ -2192,12 +2192,12 @@ const inputDisabledStyle = {
|
|
|
2192
2192
|
cursor: 'not-allowed',
|
|
2193
2193
|
color: 'var(--color-gray-500)',
|
|
2194
2194
|
};
|
|
2195
|
-
const helperTextStyle$
|
|
2195
|
+
const helperTextStyle$6 = {
|
|
2196
2196
|
label: 'Datepicker-helperTextStyle',
|
|
2197
2197
|
fontSize: 'var(--text-xs)',
|
|
2198
2198
|
color: 'var(--color-gray-500)',
|
|
2199
2199
|
};
|
|
2200
|
-
const errorTextStyle$
|
|
2200
|
+
const errorTextStyle$6 = {
|
|
2201
2201
|
label: 'Datepicker-errorTextStyle',
|
|
2202
2202
|
fontSize: 'var(--text-xs)',
|
|
2203
2203
|
color: 'var(--color-red-500)',
|
|
@@ -2218,7 +2218,7 @@ const Datepicker = forwardRef(({ size = 'md', label, helperText, error, fullWidt
|
|
|
2218
2218
|
!error && !disabled && sx(inputWrapperHoverStyle), error && sx(inputWrapperErrorStyle), disabled && sx(inputWrapperDisabledStyle));
|
|
2219
2219
|
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: sx(labelStyle$h), children: label })), jsxs("div", { className: inputWrapperClasses, children: [jsx("span", { className: cx(sx(iconStyle$f), sx(iconSizeStyles$1[size])), children: jsx(CalendarIcon, {}) }), jsx("input", { ref: ref, type: "date", id: inputId, className: cx(sx(inputStyle$6), sx(inputSizeStyles$1[size]), disabled && sx(inputDisabledStyle)), disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
2220
2220
|
.filter(Boolean)
|
|
2221
|
-
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
2221
|
+
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$6), children: error })), helperText && !error && (jsx("span", { id: helperId, className: sx(helperTextStyle$6), children: helperText }))] }));
|
|
2222
2222
|
});
|
|
2223
2223
|
Datepicker.displayName = 'Datepicker';
|
|
2224
2224
|
|
|
@@ -2915,12 +2915,12 @@ const disabledStyle$6 = {
|
|
|
2915
2915
|
cursor: 'not-allowed',
|
|
2916
2916
|
},
|
|
2917
2917
|
};
|
|
2918
|
-
const helperTextStyle$
|
|
2918
|
+
const helperTextStyle$5 = {
|
|
2919
2919
|
label: 'Input-helperTextStyle',
|
|
2920
2920
|
fontSize: 'var(--fs-xs)',
|
|
2921
2921
|
color: 'var(--fg-3)',
|
|
2922
2922
|
};
|
|
2923
|
-
const errorTextStyle$
|
|
2923
|
+
const errorTextStyle$5 = {
|
|
2924
2924
|
label: 'Input-errorTextStyle',
|
|
2925
2925
|
fontSize: 'var(--fs-xs)',
|
|
2926
2926
|
color: 'var(--color-error)',
|
|
@@ -3034,7 +3034,7 @@ const Input = forwardRef(({ size = 'md', sizing = 'fixed', label, helperText, er
|
|
|
3034
3034
|
// The fixed-height class still applies its horizontal padding and gap;
|
|
3035
3035
|
// the padded classes that follow override height and the vertical rhythm.
|
|
3036
3036
|
sx(sizeStyles$8[size]), paddedClasses(sizing, size), error && sx(errorStyle$4), disabled && sx(disabledStyle$6));
|
|
3037
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: sx(labelStyle$g), children: label })), jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsx("span", { className: sx(iconStyle$e), children: leftIcon }), jsx("input", { ref: ref, id: inputId, className: sx(inputStyle$5), disabled: disabled, "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : undefined, ...props }), rightIcon && jsx("span", { className: sx(iconStyle$e), children: rightIcon })] }), error && (jsx("span", { id: `${inputId}-error`, className: sx(errorTextStyle$
|
|
3037
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: sx(labelStyle$g), children: label })), jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsx("span", { className: sx(iconStyle$e), children: leftIcon }), jsx("input", { ref: ref, id: inputId, className: sx(inputStyle$5), disabled: disabled, "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : undefined, ...props }), rightIcon && jsx("span", { className: sx(iconStyle$e), children: rightIcon })] }), error && (jsx("span", { id: `${inputId}-error`, className: sx(errorTextStyle$5), children: error })), helperText && !error && (jsx("span", { id: `${inputId}-helper`, className: sx(helperTextStyle$5), children: helperText }))] }));
|
|
3038
3038
|
});
|
|
3039
3039
|
Input.displayName = 'Input';
|
|
3040
3040
|
/**
|
|
@@ -3050,7 +3050,7 @@ const Textarea = forwardRef(({ size = 'md', sizing = 'fixed', label, helperText,
|
|
|
3050
3050
|
// `.textarea.paddedSm` — the type scale the padded rules put on a
|
|
3051
3051
|
// descendant `.input` that a bare <textarea> does not have.
|
|
3052
3052
|
sizing === 'padded' && sx(textareaPaddedSizeStyles[size]), error && sx(errorStyle$4), disabled && sx(disabledStyle$6));
|
|
3053
|
-
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: textareaId, className: sx(labelStyle$g), children: label })), jsx("textarea", { ref: ref, id: textareaId, className: textareaClasses, disabled: disabled, rows: rows, "aria-invalid": !!error, "aria-describedby": error ? `${textareaId}-error` : helperText ? `${textareaId}-helper` : undefined, ...props }), error && (jsx("span", { id: `${textareaId}-error`, className: sx(errorTextStyle$
|
|
3053
|
+
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: textareaId, className: sx(labelStyle$g), children: label })), jsx("textarea", { ref: ref, id: textareaId, className: textareaClasses, disabled: disabled, rows: rows, "aria-invalid": !!error, "aria-describedby": error ? `${textareaId}-error` : helperText ? `${textareaId}-helper` : undefined, ...props }), error && (jsx("span", { id: `${textareaId}-error`, className: sx(errorTextStyle$5), children: error })), helperText && !error && (jsx("span", { id: `${textareaId}-helper`, className: sx(helperTextStyle$5), children: helperText }))] }));
|
|
3054
3054
|
});
|
|
3055
3055
|
Textarea.displayName = 'Textarea';
|
|
3056
3056
|
|
|
@@ -3441,12 +3441,12 @@ const paddedSizeStyles = {
|
|
|
3441
3441
|
},
|
|
3442
3442
|
},
|
|
3443
3443
|
};
|
|
3444
|
-
const helperTextStyle$
|
|
3444
|
+
const helperTextStyle$4 = {
|
|
3445
3445
|
label: 'Select-helperTextStyle',
|
|
3446
3446
|
fontSize: 'var(--text-xs)',
|
|
3447
3447
|
color: 'var(--color-gray-500)',
|
|
3448
3448
|
};
|
|
3449
|
-
const errorTextStyle$
|
|
3449
|
+
const errorTextStyle$4 = {
|
|
3450
3450
|
label: 'Select-errorTextStyle',
|
|
3451
3451
|
fontSize: 'var(--text-xs)',
|
|
3452
3452
|
color: 'var(--color-red-500)',
|
|
@@ -3483,7 +3483,7 @@ const Select = forwardRef(({ options, optionGroups, size = 'md', label, placehol
|
|
|
3483
3483
|
};
|
|
3484
3484
|
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: selectId, className: sx(labelStyle$e), children: label })), jsxs("div", { className: selectWrapperClasses, children: [leftIcon && jsx("span", { className: sx(leftIconStyle), children: leftIcon }), jsxs("select", { ref: ref, id: selectId, className: sx(selectStyle$2), disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
3485
3485
|
.filter(Boolean)
|
|
3486
|
-
.join(' ') || undefined, ...props, children: [placeholder && (jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsx("span", { className: sx(chevronStyle$5), children: jsx(ChevronDownIcon, {}) })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
3486
|
+
.join(' ') || undefined, ...props, children: [placeholder && (jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsx("span", { className: sx(chevronStyle$5), children: jsx(ChevronDownIcon, {}) })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$4), children: error })), helperText && !error && (jsx("span", { id: helperId, className: sx(helperTextStyle$4), children: helperText }))] }));
|
|
3487
3487
|
});
|
|
3488
3488
|
Select.displayName = 'Select';
|
|
3489
3489
|
|
|
@@ -3525,14 +3525,14 @@ const sizeStyles$6 = {
|
|
|
3525
3525
|
xl: { width: 40, height: 40 },
|
|
3526
3526
|
};
|
|
3527
3527
|
/** The theme's own helper — this was a verbatim copy of it. */
|
|
3528
|
-
const srOnlyStyle$
|
|
3528
|
+
const srOnlyStyle$6 = srOnly;
|
|
3529
3529
|
|
|
3530
3530
|
/**
|
|
3531
3531
|
* Indeterminate loading indicator for waits with no known duration.
|
|
3532
3532
|
* Exposes its label to screen readers, so give it one that says what is loading.
|
|
3533
3533
|
*/
|
|
3534
3534
|
const Spinner = ({ size = 'md', className = '', color, label = 'Loading...', }) => {
|
|
3535
|
-
return (jsxs("span", { className: cx(sx(spinnerStyle$1), sx(sizeStyles$6[size]), className), role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxs("svg", { className: sx(svgStyle), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: sx(trackStyle), cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsx("path", { className: sx(indicatorStyle), fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsx("span", { className: sx(srOnlyStyle$
|
|
3535
|
+
return (jsxs("span", { className: cx(sx(spinnerStyle$1), sx(sizeStyles$6[size]), className), role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxs("svg", { className: sx(svgStyle), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: sx(trackStyle), cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsx("path", { className: sx(indicatorStyle), fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsx("span", { className: sx(srOnlyStyle$6), children: label })] }));
|
|
3536
3536
|
};
|
|
3537
3537
|
|
|
3538
3538
|
const statusVariantStyles = (theme) => ({
|
|
@@ -3856,12 +3856,12 @@ const sizeStyles$5 = {
|
|
|
3856
3856
|
},
|
|
3857
3857
|
},
|
|
3858
3858
|
};
|
|
3859
|
-
const helperTextStyle$
|
|
3859
|
+
const helperTextStyle$3 = {
|
|
3860
3860
|
label: 'Timepicker-helperTextStyle',
|
|
3861
3861
|
fontSize: 'var(--text-xs)',
|
|
3862
3862
|
color: 'var(--color-gray-500)',
|
|
3863
3863
|
};
|
|
3864
|
-
const errorTextStyle$
|
|
3864
|
+
const errorTextStyle$3 = {
|
|
3865
3865
|
label: 'Timepicker-errorTextStyle',
|
|
3866
3866
|
fontSize: 'var(--text-xs)',
|
|
3867
3867
|
color: 'var(--color-red-500)',
|
|
@@ -3880,7 +3880,7 @@ const Timepicker = forwardRef(({ size = 'md', label, helperText, error, fullWidt
|
|
|
3880
3880
|
const inputWrapperClasses = cx(sx(inputWrapperStyle$2), sx(sizeStyles$5[size]), error ? sx(errorStyle$2) : '', disabled ? sx(disabledStyle$4) : '');
|
|
3881
3881
|
return (jsxs("div", { className: wrapperClasses, children: [label && (jsx("label", { htmlFor: inputId, className: sx(labelStyle$d), children: label })), jsxs("div", { className: inputWrapperClasses, children: [jsx("span", { className: sx(iconStyle$d), children: jsx(ClockIcon$1, {}) }), jsx("input", { ref: ref, type: "time", id: inputId, className: sx(inputStyle$4), disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
3882
3882
|
.filter(Boolean)
|
|
3883
|
-
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
3883
|
+
.join(' ') || undefined, ...props })] }), error && (jsx("span", { id: errorId, className: sx(errorTextStyle$3), children: error })), helperText && !error && (jsx("span", { id: helperId, className: sx(helperTextStyle$3), children: helperText }))] }));
|
|
3884
3884
|
});
|
|
3885
3885
|
Timepicker.displayName = 'Timepicker';
|
|
3886
3886
|
|
|
@@ -4564,11 +4564,11 @@ const openStyle$3 = {
|
|
|
4564
4564
|
transform: 'rotate(90deg)',
|
|
4565
4565
|
},
|
|
4566
4566
|
};
|
|
4567
|
-
const headerStyle$
|
|
4567
|
+
const headerStyle$N = {
|
|
4568
4568
|
label: 'Accordion-headerStyle',
|
|
4569
4569
|
flex: 1,
|
|
4570
4570
|
};
|
|
4571
|
-
const bodyStyle$
|
|
4571
|
+
const bodyStyle$e = {
|
|
4572
4572
|
label: 'Accordion-bodyStyle',
|
|
4573
4573
|
position: 'relative',
|
|
4574
4574
|
paddingLeft: 24,
|
|
@@ -4638,7 +4638,7 @@ const Accordion = ({ header, children, defaultOpen = true, open: controlledOpen,
|
|
|
4638
4638
|
}
|
|
4639
4639
|
onOpenChange?.(newOpen);
|
|
4640
4640
|
};
|
|
4641
|
-
return (jsxs("div", { className: cx(sx(accordionStyle), className), children: [jsxs("div", { className: sx(headerContainerStyle), children: [jsx("button", { type: "button", className: sx(toggleStyle$4), onClick: handleToggle, "aria-expanded": isOpen, children: jsx(CaretIcon, { className: cx(sx(caretStyle), isOpen && sx(openStyle$3)) }) }), jsx("div", { className: sx(headerStyle$
|
|
4641
|
+
return (jsxs("div", { className: cx(sx(accordionStyle), className), children: [jsxs("div", { className: sx(headerContainerStyle), children: [jsx("button", { type: "button", className: sx(toggleStyle$4), onClick: handleToggle, "aria-expanded": isOpen, children: jsx(CaretIcon, { className: cx(sx(caretStyle), isOpen && sx(openStyle$3)) }) }), jsx("div", { className: sx(headerStyle$N), children: header })] }), jsxs("div", { className: cx(sx(bodyStyle$e), isOpen ? sx(visibleStyle) : sx(hiddenStyle$2)), "aria-hidden": !isOpen, children: [showTimeline && (jsxs("div", { className: sx(timelineStyle$1), children: [jsx("div", { className: sx(lineStyle) }), jsx(CaretIcon, { className: sx(endCaretStyle) })] })), jsx("div", { className: sx(contentStyle$9), children: children })] })] }));
|
|
4642
4642
|
};
|
|
4643
4643
|
Accordion.displayName = 'Accordion';
|
|
4644
4644
|
|
|
@@ -4773,7 +4773,7 @@ const contactStyle$1 = {
|
|
|
4773
4773
|
display: 'flex',
|
|
4774
4774
|
gap: 12,
|
|
4775
4775
|
};
|
|
4776
|
-
const bodyStyle$
|
|
4776
|
+
const bodyStyle$d = {
|
|
4777
4777
|
label: 'ContactCard-bodyStyle',
|
|
4778
4778
|
display: 'flex',
|
|
4779
4779
|
flexDirection: 'column',
|
|
@@ -4820,7 +4820,7 @@ const linkTextStyle = {
|
|
|
4820
4820
|
const ContactCard$1 = ({ name, title, phone, email, action, showAvatar = true, className = '', }) => {
|
|
4821
4821
|
if (!action && !name)
|
|
4822
4822
|
return null;
|
|
4823
|
-
return (jsxs("div", { className: cx(sx(contactStyle$1), className), children: [name && showAvatar && jsx(Avatar, { name: name, size: 36 }), jsxs("div", { className: sx(bodyStyle$
|
|
4823
|
+
return (jsxs("div", { className: cx(sx(contactStyle$1), className), children: [name && showAvatar && jsx(Avatar, { name: name, size: 36 }), jsxs("div", { className: sx(bodyStyle$d), children: [jsxs("div", { className: sx(identityStyle$2), children: [action || jsx("span", { className: sx(nameStyle$6), children: name }), title && jsx("span", { className: sx(titleStyle$H), children: title })] }), phone && (jsxs("a", { href: `tel:${phone}`, className: sx(linkStyle$1), children: [jsx(PhoneIcon, { size: 16, "aria-hidden": "true" }), jsx("span", { className: sx(linkTextStyle), children: phone })] })), email && (jsxs("a", { href: `mailto:${email}`, className: sx(linkStyle$1), children: [jsx(MailIcon, { size: 16, "aria-hidden": "true" }), jsx("span", { className: sx(linkTextStyle), children: email })] }))] })] }));
|
|
4824
4824
|
};
|
|
4825
4825
|
ContactCard$1.displayName = 'ContactCard';
|
|
4826
4826
|
|
|
@@ -5148,7 +5148,7 @@ const titleStyle$G = {
|
|
|
5148
5148
|
fontWeight: 'var(--fw-semibold)',
|
|
5149
5149
|
lineHeight: 'var(--lh-base)',
|
|
5150
5150
|
};
|
|
5151
|
-
const descriptionStyle$
|
|
5151
|
+
const descriptionStyle$b = {
|
|
5152
5152
|
label: 'EmptyState-descriptionStyle',
|
|
5153
5153
|
maxWidth: '46ch',
|
|
5154
5154
|
margin: 0,
|
|
@@ -5156,7 +5156,7 @@ const descriptionStyle$a = {
|
|
|
5156
5156
|
fontSize: 'var(--fs-sm)',
|
|
5157
5157
|
lineHeight: 'var(--lh-sm)',
|
|
5158
5158
|
};
|
|
5159
|
-
const actionsStyle$
|
|
5159
|
+
const actionsStyle$d = {
|
|
5160
5160
|
label: 'EmptyState-actionsStyle',
|
|
5161
5161
|
display: 'flex',
|
|
5162
5162
|
flexWrap: 'wrap',
|
|
@@ -5166,7 +5166,7 @@ const actionsStyle$c = {
|
|
|
5166
5166
|
};
|
|
5167
5167
|
|
|
5168
5168
|
/** Placeholder shown when a list, table, or panel has nothing to display. */
|
|
5169
|
-
const EmptyState$1 = ({ title, description, icon, actionLabel, onAction, secondaryActionLabel, onSecondaryAction, size = 'md', children, className = '', }) => (jsxs("div", { className: cx(sx(emptyStateStyle$1), sx(sizeStyles$4[size]), className), "data-test": "empty-state", children: [icon && jsx("div", { className: sx(iconStyle$b), "aria-hidden": "true", children: icon }), jsx("p", { className: sx(titleStyle$G), children: title }), description && jsx("p", { className: sx(descriptionStyle$
|
|
5169
|
+
const EmptyState$1 = ({ title, description, icon, actionLabel, onAction, secondaryActionLabel, onSecondaryAction, size = 'md', children, className = '', }) => (jsxs("div", { className: cx(sx(emptyStateStyle$1), sx(sizeStyles$4[size]), className), "data-test": "empty-state", children: [icon && jsx("div", { className: sx(iconStyle$b), "aria-hidden": "true", children: icon }), jsx("p", { className: sx(titleStyle$G), children: title }), description && jsx("p", { className: sx(descriptionStyle$b), children: description }), (actionLabel || secondaryActionLabel) && (jsxs("div", { className: sx(actionsStyle$d), children: [actionLabel && (jsx(Button, { size: "sm", onClick: onAction, "data-test": "empty-state-action", children: actionLabel })), secondaryActionLabel && (jsx(Button, { size: "sm", variant: "secondary", onClick: onSecondaryAction, "data-test": "empty-state-secondary-action", children: secondaryActionLabel }))] })), children] }));
|
|
5170
5170
|
|
|
5171
5171
|
/** FieldLayout's compiled rules. */
|
|
5172
5172
|
const fieldStyle$4 = {
|
|
@@ -5250,7 +5250,7 @@ const errorStyle$1 = {
|
|
|
5250
5250
|
label: 'FieldLayout-errorStyle',
|
|
5251
5251
|
color: 'var(--color-error, #940000)',
|
|
5252
5252
|
};
|
|
5253
|
-
const noteStyle$
|
|
5253
|
+
const noteStyle$4 = {
|
|
5254
5254
|
label: 'FieldLayout-noteStyle',
|
|
5255
5255
|
color: 'var(--color-stone, #787878)',
|
|
5256
5256
|
};
|
|
@@ -5292,7 +5292,7 @@ const FieldLayout = ({ children, label, labelPosition = 'top', showLabel = true,
|
|
|
5292
5292
|
const hasError = Boolean(error);
|
|
5293
5293
|
const describedBy = [hint ? hintId : '', hasError ? errorId : ''].filter(Boolean).join(' ') || undefined;
|
|
5294
5294
|
const hintElement = hint ? (jsx("p", { id: hintId, className: cx(sx(messageStyle$2), sx(hintStyle$1), labelPosition === 'top' ? '' : sx(hintBesideStyle(Boolean(label && showLabel)))), children: hint })) : null;
|
|
5295
|
-
return (jsxs("div", { className: cx(sx(fieldStyle$4), sx(labelPositionStyles[labelPosition]), className), children: [label && showLabel && (jsxs("label", { htmlFor: id, className: cx(sx(labelStyle$b), hasError ? sx(labelErrorStyle) : ''), children: [label, required && !disabled && (jsx("span", { className: sx(requiredStyle$2), "aria-hidden": "true", children: "*" })), tooltip && (jsx(Tooltip, { className: sx(tooltipStyle$1), content: tooltip, children: jsx(InfoIcon$1, { size: 16 }) }))] })), labelPosition === 'top' && hintElement, jsxs("div", { className: sx(controlStyle$2), children: [leftIcon && !disabled && (jsx("span", { className: cx(sx(iconStyle$a), sx(iconLeftStyle)), "aria-hidden": "true", children: leftIcon })), children({ id, describedBy, hasError }), rightIcon && !disabled && (jsx("span", { className: cx(sx(iconStyle$a), sx(iconRightStyle)), "aria-hidden": "true", children: rightIcon }))] }), hasError && (jsx("p", { id: errorId, className: cx(sx(messageStyle$2), sx(errorStyle$1)), children: error })), note && jsx("p", { className: cx(sx(messageStyle$2), sx(noteStyle$
|
|
5295
|
+
return (jsxs("div", { className: cx(sx(fieldStyle$4), sx(labelPositionStyles[labelPosition]), className), children: [label && showLabel && (jsxs("label", { htmlFor: id, className: cx(sx(labelStyle$b), hasError ? sx(labelErrorStyle) : ''), children: [label, required && !disabled && (jsx("span", { className: sx(requiredStyle$2), "aria-hidden": "true", children: "*" })), tooltip && (jsx(Tooltip, { className: sx(tooltipStyle$1), content: tooltip, children: jsx(InfoIcon$1, { size: 16 }) }))] })), labelPosition === 'top' && hintElement, jsxs("div", { className: sx(controlStyle$2), children: [leftIcon && !disabled && (jsx("span", { className: cx(sx(iconStyle$a), sx(iconLeftStyle)), "aria-hidden": "true", children: leftIcon })), children({ id, describedBy, hasError }), rightIcon && !disabled && (jsx("span", { className: cx(sx(iconStyle$a), sx(iconRightStyle)), "aria-hidden": "true", children: rightIcon }))] }), hasError && (jsx("p", { id: errorId, className: cx(sx(messageStyle$2), sx(errorStyle$1)), children: error })), note && jsx("p", { className: cx(sx(messageStyle$2), sx(noteStyle$4)), children: note }), labelPosition !== 'top' && hintElement] }));
|
|
5296
5296
|
};
|
|
5297
5297
|
FieldLayout.displayName = 'FieldLayout';
|
|
5298
5298
|
|
|
@@ -5644,14 +5644,14 @@ const inputErrorStyle = {
|
|
|
5644
5644
|
boxShadow: '0 0 0 3px rgba(220, 38, 38, 0.1) !important',
|
|
5645
5645
|
},
|
|
5646
5646
|
};
|
|
5647
|
-
const helperTextStyle$
|
|
5647
|
+
const helperTextStyle$2 = {
|
|
5648
5648
|
label: 'FormField-helperTextStyle',
|
|
5649
5649
|
fontSize: 'var(--font-size-xs)',
|
|
5650
5650
|
color: 'var(--color-neutral-500)',
|
|
5651
5651
|
margin: 0,
|
|
5652
5652
|
lineHeight: 'var(--line-height-normal)',
|
|
5653
5653
|
};
|
|
5654
|
-
const errorTextStyle$
|
|
5654
|
+
const errorTextStyle$2 = {
|
|
5655
5655
|
label: 'FormField-errorTextStyle',
|
|
5656
5656
|
fontSize: 'var(--font-size-xs)',
|
|
5657
5657
|
color: 'var(--color-status-error)',
|
|
@@ -5709,12 +5709,12 @@ const FormField = forwardRef(({ label, helperText, error, required = false, hide
|
|
|
5709
5709
|
}
|
|
5710
5710
|
return (jsx(Input, { ref: ref, id: inputId, "aria-describedby": describedBy, "aria-invalid": hasError, "aria-required": required, ...inputProps, className: cx(sx(inputElementStyle), hasError && sx(inputErrorStyle), inputProps?.className) }));
|
|
5711
5711
|
};
|
|
5712
|
-
return (jsxs("div", { className: cx(sx(formFieldStyle), className), children: [jsxs("label", { htmlFor: inputId, className: cx(sx(labelStyle$9), hideLabel && sx(visuallyHiddenStyle$2)), children: [label, required && jsx("span", { className: sx(requiredStyle$1), "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsx("p", { id: helperId, className: sx(helperTextStyle$
|
|
5712
|
+
return (jsxs("div", { className: cx(sx(formFieldStyle), className), children: [jsxs("label", { htmlFor: inputId, className: cx(sx(labelStyle$9), hideLabel && sx(visuallyHiddenStyle$2)), children: [label, required && jsx("span", { className: sx(requiredStyle$1), "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsx("p", { id: helperId, className: sx(helperTextStyle$2), children: helperText })), hasError && (jsx("p", { id: errorId, className: sx(errorTextStyle$2), role: "alert", children: error }))] }));
|
|
5713
5713
|
});
|
|
5714
5714
|
FormField.displayName = 'FormField';
|
|
5715
5715
|
|
|
5716
5716
|
/** FormRow's compiled rules. */
|
|
5717
|
-
const rowStyle$
|
|
5717
|
+
const rowStyle$9 = {
|
|
5718
5718
|
label: 'FormRow-rowStyle',
|
|
5719
5719
|
display: 'grid',
|
|
5720
5720
|
width: '100%',
|
|
@@ -5763,7 +5763,7 @@ const FormRow = ({ children, columns, gap = 'md', className, stackOnMobile = tru
|
|
|
5763
5763
|
// With no children at all `colCount` is 0, which the module stylesheet met
|
|
5764
5764
|
// with a missing `.cols0` — no column rule. The cast keeps that shape honest.
|
|
5765
5765
|
const columnStyle = colsStyles[colCount];
|
|
5766
|
-
return (jsx("div", { className: cx(sx(rowStyle$
|
|
5766
|
+
return (jsx("div", { className: cx(sx(rowStyle$9), columnStyle ? sx(columnStyle) : '', sx(gapStyles$1[gap]), stackOnMobile ? sx(stackMobileStyle) : '', className || ''), children: children }));
|
|
5767
5767
|
};
|
|
5768
5768
|
FormRow.displayName = 'FormRow';
|
|
5769
5769
|
|
|
@@ -5775,7 +5775,7 @@ FormRow.displayName = 'FormRow';
|
|
|
5775
5775
|
* specificity of its argument, so nesting it keeps the win without any
|
|
5776
5776
|
* doubling. Everything else owned its own properties.
|
|
5777
5777
|
*/
|
|
5778
|
-
const sectionStyle$
|
|
5778
|
+
const sectionStyle$b = {
|
|
5779
5779
|
label: 'FormSection-sectionStyle',
|
|
5780
5780
|
width: '100%',
|
|
5781
5781
|
};
|
|
@@ -5785,14 +5785,14 @@ const sectionStyle$a = {
|
|
|
5785
5785
|
* Declared before `headerStyle` so its content-hashed class name can be
|
|
5786
5786
|
* resolved for the `:has()` below.
|
|
5787
5787
|
*/
|
|
5788
|
-
const descriptionStyle$
|
|
5788
|
+
const descriptionStyle$a = {
|
|
5789
5789
|
label: 'FormSection-descriptionStyle',
|
|
5790
5790
|
margin: '4px 0 0',
|
|
5791
5791
|
color: 'var(--fg-3, #5C5C5C)',
|
|
5792
5792
|
fontSize: 14,
|
|
5793
5793
|
lineHeight: 1.5,
|
|
5794
5794
|
};
|
|
5795
|
-
const headerStyle$
|
|
5795
|
+
const headerStyle$M = {
|
|
5796
5796
|
label: 'FormSection-headerStyle',
|
|
5797
5797
|
display: 'flex',
|
|
5798
5798
|
alignItems: 'center',
|
|
@@ -5802,7 +5802,7 @@ const headerStyle$L = {
|
|
|
5802
5802
|
rather than to the middle of the block. `:has()` is scored by its argument,
|
|
5803
5803
|
so this is (0,2,0) against the base rule's (0,1,0) — the same margin the
|
|
5804
5804
|
stylesheet had. */
|
|
5805
|
-
[`&:has(.${sx(descriptionStyle$
|
|
5805
|
+
[`&:has(.${sx(descriptionStyle$a)})`]: {
|
|
5806
5806
|
alignItems: 'flex-start',
|
|
5807
5807
|
},
|
|
5808
5808
|
};
|
|
@@ -5833,7 +5833,7 @@ const titleStyle$F = {
|
|
|
5833
5833
|
fontSize: 20,
|
|
5834
5834
|
},
|
|
5835
5835
|
};
|
|
5836
|
-
const fieldsetStyle = {
|
|
5836
|
+
const fieldsetStyle$2 = {
|
|
5837
5837
|
label: 'FormSection-fieldsetStyle',
|
|
5838
5838
|
display: 'flex',
|
|
5839
5839
|
flexDirection: 'column',
|
|
@@ -5890,12 +5890,12 @@ const statusStyles = {
|
|
|
5890
5890
|
const FormSection = ({ title, icon, description, action, status, disabled = false, children, className, id, dataTest, }) => {
|
|
5891
5891
|
const isSubmitted = status === 'submitted';
|
|
5892
5892
|
const isDisabled = disabled || isSubmitted;
|
|
5893
|
-
return (jsxs("div", { className: cx(sx(sectionStyle$
|
|
5893
|
+
return (jsxs("div", { className: cx(sx(sectionStyle$b), className), id: id, "data-test": dataTest, children: [jsxs("div", { className: sx(headerStyle$M), children: [icon && jsx("span", { className: sx(iconStyle$9), children: icon }), jsxs("div", { className: sx(headingStyle$5), children: [jsx("h2", { className: sx(titleStyle$F), children: title }), description && jsx("p", { className: sx(descriptionStyle$a), children: description })] }), action && jsx("div", { className: sx(actionStyle$1), children: action })] }), jsxs("fieldset", { disabled: isDisabled, className: cx(sx(fieldsetStyle$2), isDisabled && sx(disabledStyle$3)), children: [status && (jsxs("div", { className: sx(statusStyle$6), children: [jsx("span", { className: sx(statusLabelStyle), children: "Status:" }), jsx("span", { className: cx(sx(statusValueStyle), sx(statusStyles[status])), children: status === 'submitted' ? 'Submitted' : status === 'draft' ? 'Draft' : 'Not Submitted' })] })), children] })] }));
|
|
5894
5894
|
};
|
|
5895
5895
|
FormSection.displayName = 'FormSection';
|
|
5896
5896
|
|
|
5897
5897
|
/** Vertical grid the form fields sit in. */
|
|
5898
|
-
const stackStyle$
|
|
5898
|
+
const stackStyle$6 = {
|
|
5899
5899
|
label: 'FormStack-stackStyle',
|
|
5900
5900
|
display: 'grid',
|
|
5901
5901
|
};
|
|
@@ -5907,7 +5907,7 @@ const gapStyles = {
|
|
|
5907
5907
|
};
|
|
5908
5908
|
|
|
5909
5909
|
/** Standard vertical form-field rhythm used by Hub modal forms. */
|
|
5910
|
-
const FormStack = ({ children, gap = 'md', className = '' }) => (jsx("div", { className: cx(sx(stackStyle$
|
|
5910
|
+
const FormStack = ({ children, gap = 'md', className = '' }) => (jsx("div", { className: cx(sx(stackStyle$6), sx(gapStyles[gap]), className), children: children }));
|
|
5911
5911
|
|
|
5912
5912
|
/* IconRevealLink's rules — an icon that, on hover or keyboard focus, slides
|
|
5913
5913
|
its text label out beside it. The label is collapsed (zero width, clear,
|
|
@@ -6639,7 +6639,7 @@ const hintStyle = {
|
|
|
6639
6639
|
color: 'var(--fg-3)',
|
|
6640
6640
|
boxShadow: 'var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1))',
|
|
6641
6641
|
};
|
|
6642
|
-
const helperTextStyle = {
|
|
6642
|
+
const helperTextStyle$1 = {
|
|
6643
6643
|
label: 'MultiUserSearch-helperTextStyle',
|
|
6644
6644
|
fontSize: 'var(--fs-xs)',
|
|
6645
6645
|
color: 'var(--fg-3)',
|
|
@@ -6649,7 +6649,7 @@ const helperTextStyle = {
|
|
|
6649
6649
|
* Doubled: `.errorText` and `.helperText` were both (0,1,0) and both set
|
|
6650
6650
|
* `color`, so the error colour won only by sitting later in the file.
|
|
6651
6651
|
*/
|
|
6652
|
-
const errorTextStyle = {
|
|
6652
|
+
const errorTextStyle$1 = {
|
|
6653
6653
|
label: 'MultiUserSearch-errorTextStyle',
|
|
6654
6654
|
'&&': {
|
|
6655
6655
|
color: 'var(--color-error)',
|
|
@@ -6785,7 +6785,7 @@ const MultiUserSearch = ({ label = 'Search users', placeholder = 'Type to search
|
|
|
6785
6785
|
return (jsxs("div", { ref: containerRef, className: cx(sx(containerStyle$4), disabled && sx(disabledStyle$2), className), "data-test": dataTest, children: [label && (jsx("label", { className: sx(labelStyle$8), htmlFor: `${dataTest}-input`, children: label })), selectedUsers.length > 0 && (jsx("div", { className: sx(selectedUsersStyle), "data-test": `${dataTest}-selected`, children: selectedUsers.map((user) => (jsx(Badge, { variant: "info", size: "sm", className: sx(selectedBadgeStyle), "data-test": `${dataTest}-selected-${user.id}`, children: jsxs("span", { className: sx(badgeContentStyle), children: [user.name, jsx("button", { type: "button", className: sx(removeButtonStyle$1), onClick: () => removeSelection(user.id), "aria-label": `Remove ${user.name}`, disabled: disabled, children: jsx(CloseIcon, { size: 12 }) })] }) }, user.id))) })), jsxs("div", { className: sx(inputWrapperStyle$1), children: [jsx(Input, { ref: inputRef, id: `${dataTest}-input`, type: "search", placeholder: placeholder, value: query, onChange: handleInputChange, onFocus: handleInputFocus, onKeyDown: handleKeyDown, disabled: disabled, leftIcon: jsx(SearchIcon$1, { size: 16 }), rightIcon: loading ? jsx(Spinner, { size: "xs", label: "Searching" }) : undefined, "aria-expanded": isOpen, "aria-controls": `${dataTest}-listbox`, "aria-autocomplete": "list", "aria-activedescendant": highlightedIndex >= 0
|
|
6786
6786
|
? `${dataTest}-option-${availableOptions[highlightedIndex]?.id}`
|
|
6787
6787
|
: undefined, role: "combobox", fullWidth: true, "data-test": `${dataTest}-input` }), showDropdown && (jsxs("ul", { ref: listRef, id: `${dataTest}-listbox`, className: sx(listboxStyle), role: "listbox", "aria-label": "Search results", "data-test": `${dataTest}-listbox`, children: [loading && (jsxs("li", { className: sx(loadingItemStyle), role: "status", children: [jsx(Spinner, { size: "sm", label: "Searching users" }), jsx("span", { children: "Searching users\u2026" })] })), !loading &&
|
|
6788
|
-
availableOptions.map((option, index) => (jsxs("li", { id: `${dataTest}-option-${option.id}`, role: "option", "aria-selected": highlightedIndex === index, "aria-disabled": option.disabled, className: cx(sx(optionStyle$2), highlightedIndex === index && sx(highlightedStyle), option.disabled && sx(optionDisabledStyle)), onClick: () => selectOption(option), title: option.disabledReason, "data-test": `${dataTest}-option-${option.id}`, children: [jsx("span", { className: sx(optionAvatarStyle$1), "aria-hidden": "true", children: jsx(UserIcon, { size: 16 }) }), jsxs("span", { className: sx(optionContentStyle), children: [jsx("span", { className: sx(optionNameStyle), children: option.name }), jsx("span", { className: sx(optionEmailStyle), children: option.email }), option.title && (jsx("span", { className: sx(optionTitleStyle), children: option.title }))] })] }, option.id))), showNoResults && (jsxs("li", { className: sx(noResultsStyle$1), role: "status", children: ["No users found matching \"", trimmedQuery, "\""] }))] })), showMinLengthHint && (jsxs("div", { className: sx(hintStyle), role: "status", children: ["Enter at least ", minSearchLength, " characters to search"] }))] }), (helperText || error) && (jsx("p", { className: cx(sx(helperTextStyle), error && sx(errorTextStyle)), role: error ? 'alert' : undefined, children: error || helperText }))] }));
|
|
6788
|
+
availableOptions.map((option, index) => (jsxs("li", { id: `${dataTest}-option-${option.id}`, role: "option", "aria-selected": highlightedIndex === index, "aria-disabled": option.disabled, className: cx(sx(optionStyle$2), highlightedIndex === index && sx(highlightedStyle), option.disabled && sx(optionDisabledStyle)), onClick: () => selectOption(option), title: option.disabledReason, "data-test": `${dataTest}-option-${option.id}`, children: [jsx("span", { className: sx(optionAvatarStyle$1), "aria-hidden": "true", children: jsx(UserIcon, { size: 16 }) }), jsxs("span", { className: sx(optionContentStyle), children: [jsx("span", { className: sx(optionNameStyle), children: option.name }), jsx("span", { className: sx(optionEmailStyle), children: option.email }), option.title && (jsx("span", { className: sx(optionTitleStyle), children: option.title }))] })] }, option.id))), showNoResults && (jsxs("li", { className: sx(noResultsStyle$1), role: "status", children: ["No users found matching \"", trimmedQuery, "\""] }))] })), showMinLengthHint && (jsxs("div", { className: sx(hintStyle), role: "status", children: ["Enter at least ", minSearchLength, " characters to search"] }))] }), (helperText || error) && (jsx("p", { className: cx(sx(helperTextStyle$1), error && sx(errorTextStyle$1)), role: error ? 'alert' : undefined, children: error || helperText }))] }));
|
|
6789
6789
|
};
|
|
6790
6790
|
MultiUserSearch.displayName = 'MultiUserSearch';
|
|
6791
6791
|
|
|
@@ -7026,7 +7026,7 @@ const NavItem = ({ icon, label, active = false, collapsed = false, variant = 'de
|
|
|
7026
7026
|
* The header reserves its space even with nothing to show, fading in once a
|
|
7027
7027
|
* title arrives, so the page below does not jump as data loads.
|
|
7028
7028
|
*/
|
|
7029
|
-
const headerStyle$
|
|
7029
|
+
const headerStyle$L = {
|
|
7030
7030
|
label: 'PageHeader-headerStyle',
|
|
7031
7031
|
display: 'flex',
|
|
7032
7032
|
alignItems: 'flex-start',
|
|
@@ -7042,7 +7042,7 @@ const emptyStyle$n = {
|
|
|
7042
7042
|
opacity: 0,
|
|
7043
7043
|
pointerEvents: 'none',
|
|
7044
7044
|
};
|
|
7045
|
-
const bodyStyle$
|
|
7045
|
+
const bodyStyle$c = {
|
|
7046
7046
|
label: 'PageHeader-bodyStyle',
|
|
7047
7047
|
display: 'flex',
|
|
7048
7048
|
justifyContent: 'space-between',
|
|
@@ -7084,7 +7084,7 @@ const titleStyle$E = {
|
|
|
7084
7084
|
* The header keeps its height while `title` is empty and fades in once one
|
|
7085
7085
|
* arrives, so pages do not jump as their data loads.
|
|
7086
7086
|
*/
|
|
7087
|
-
const PageHeader = ({ title, pretitle, after, back, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$
|
|
7087
|
+
const PageHeader = ({ title, pretitle, after, back, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$L), !title && sx(emptyStyle$n), className), children: [back, jsx("div", { className: sx(bodyStyle$c), children: jsxs("div", { className: sx(textStyle), children: [pretitle && jsx("h2", { className: sx(pretitleStyle$1), children: pretitle }), jsxs("h1", { className: sx(titleStyle$E), children: [title, "\u00A0"] }), after] }) })] }));
|
|
7088
7088
|
PageHeader.displayName = 'PageHeader';
|
|
7089
7089
|
|
|
7090
7090
|
/**
|
|
@@ -7093,7 +7093,7 @@ PageHeader.displayName = 'PageHeader';
|
|
|
7093
7093
|
* The back arrow leads the section line, so the arrow and the page name both
|
|
7094
7094
|
* start on the page's left edge and the header lines up with the content below.
|
|
7095
7095
|
*/
|
|
7096
|
-
const headerStyle$
|
|
7096
|
+
const headerStyle$K = {
|
|
7097
7097
|
label: 'PageHeaderSubsection-headerStyle',
|
|
7098
7098
|
display: 'grid',
|
|
7099
7099
|
gridTemplateColumns: 'minmax(0, 1fr) auto',
|
|
@@ -7131,7 +7131,7 @@ const backButtonStyle$1 = {
|
|
|
7131
7131
|
outlineOffset: 2,
|
|
7132
7132
|
},
|
|
7133
7133
|
};
|
|
7134
|
-
const sectionStyle$
|
|
7134
|
+
const sectionStyle$a = {
|
|
7135
7135
|
label: 'PageHeaderSubsection-sectionStyle',
|
|
7136
7136
|
margin: 0,
|
|
7137
7137
|
color: 'var(--color-slate, #4a5c72)',
|
|
@@ -7151,13 +7151,13 @@ const titleStyle$D = {
|
|
|
7151
7151
|
fontWeight: 400,
|
|
7152
7152
|
lineHeight: '44px',
|
|
7153
7153
|
};
|
|
7154
|
-
const metaStyle$
|
|
7154
|
+
const metaStyle$2 = {
|
|
7155
7155
|
label: 'PageHeaderSubsection-metaStyle',
|
|
7156
7156
|
gridArea: 'meta',
|
|
7157
7157
|
minWidth: 0,
|
|
7158
7158
|
marginTop: 4,
|
|
7159
7159
|
};
|
|
7160
|
-
const actionsStyle$
|
|
7160
|
+
const actionsStyle$c = {
|
|
7161
7161
|
label: 'PageHeaderSubsection-actionsStyle',
|
|
7162
7162
|
gridArea: 'actions',
|
|
7163
7163
|
display: 'flex',
|
|
@@ -7177,7 +7177,7 @@ const PageHeaderSubsection = ({ sectionName, pageName, meta, onBack, backLabel =
|
|
|
7177
7177
|
else
|
|
7178
7178
|
window.history.back();
|
|
7179
7179
|
};
|
|
7180
|
-
return (jsxs("div", { className: cx(sx(headerStyle$
|
|
7180
|
+
return (jsxs("div", { className: cx(sx(headerStyle$K), className), "data-test": "page-header-subsection", children: [jsxs("div", { className: sx(sectionRowStyle), children: [!hideBack && (jsx("button", { type: "button", className: sx(backButtonStyle$1), onClick: handleBack, "aria-label": backLabel, "data-test": "page-header-subsection-back", children: jsx(BackIcon$1, {}) })), jsx("p", { className: sx(sectionStyle$a), children: sectionName })] }), jsx("h1", { className: sx(titleStyle$D), children: pageName }), meta && jsx("div", { className: sx(metaStyle$2), children: meta }), actions && jsx("div", { className: sx(actionsStyle$c), children: actions })] }));
|
|
7181
7181
|
};
|
|
7182
7182
|
PageHeaderSubsection.displayName = 'PageHeaderSubsection';
|
|
7183
7183
|
|
|
@@ -7189,7 +7189,7 @@ const toneColors = {
|
|
|
7189
7189
|
success: { panel: 'var(--color-alert-success-bg)', accent: 'var(--color-success-accent)' },
|
|
7190
7190
|
error: { panel: 'var(--color-alert-error-bg)', accent: 'var(--color-danger-accent)' },
|
|
7191
7191
|
};
|
|
7192
|
-
const rootStyle$
|
|
7192
|
+
const rootStyle$3 = {
|
|
7193
7193
|
label: 'PanelTabs-rootStyle',
|
|
7194
7194
|
display: 'flex',
|
|
7195
7195
|
flexDirection: 'column',
|
|
@@ -7305,7 +7305,7 @@ const PanelTabs = ({ options, value, onChange, 'aria-label': ariaLabel, children
|
|
|
7305
7305
|
choose(event.key === 'Home' ? 0 : options.length - 1);
|
|
7306
7306
|
}
|
|
7307
7307
|
};
|
|
7308
|
-
return (jsxs("div", { className: cx(sx(rootStyle$
|
|
7308
|
+
return (jsxs("div", { className: cx(sx(rootStyle$3), className), children: [jsx("div", { className: cx(sx(tabListStyle), sx(shortenStyle(shortenBelow))), role: "radiogroup", "aria-label": ariaLabel, children: options.map((option, index) => {
|
|
7309
7309
|
const selected = index === chosen;
|
|
7310
7310
|
return (jsxs("button", { ref: (element) => {
|
|
7311
7311
|
tabs.current[index] = element;
|
|
@@ -7408,7 +7408,7 @@ const focusRing = {
|
|
|
7408
7408
|
* current page is matched on `[aria-current="page"]` instead — the component
|
|
7409
7409
|
* sets that attribute from the same expression that sets `currentStyle`.
|
|
7410
7410
|
*/
|
|
7411
|
-
const pageStyle$
|
|
7411
|
+
const pageStyle$v = {
|
|
7412
7412
|
label: 'Pagination-pageStyle',
|
|
7413
7413
|
...buttonBase,
|
|
7414
7414
|
'&:hover:not([aria-current="page"])': {
|
|
@@ -7491,7 +7491,7 @@ const Pagination = ({ page, pageSize, totalItems, siblingCount = 1, pageSizeOpti
|
|
|
7491
7491
|
return;
|
|
7492
7492
|
onPageChange?.(next);
|
|
7493
7493
|
};
|
|
7494
|
-
return (jsxs("nav", { className: cx(sx(paginationStyle$3), className), "aria-label": ariaLabel, "data-test": "pagination", children: [!hideSummary && (jsxs("p", { className: sx(summaryStyle$6), "data-test": "pagination-summary", children: ["Showing ", firstItem, "\u2013", lastItem, " of ", totalItems, " ", itemLabel] })), jsxs("div", { className: sx(controlsStyle), children: [showSizeSelector && (jsxs("label", { className: sx(pageSizeStyle), children: [jsx("span", { children: "Rows per page" }), jsx("select", { value: pageSize, onChange: (event) => onPageSizeChange?.(Number(event.target.value)), "data-test": "pagination-page-size", children: pageSizeOptions.map((option) => (jsx("option", { value: option, children: option }, option))) })] })), jsxs("ul", { className: sx(pagesStyle), children: [jsx("li", { children: jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage - 1), disabled: currentPage <= 1, "aria-label": "Previous page", "data-test": "pagination-previous", children: jsx(ChevronLeftIcon, { size: 16 }) }) }), items.map((item, index) => item === 'ellipsis' ? (jsx("li", { className: sx(ellipsisStyle), "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`)) : (jsx("li", { children: jsx("button", { type: "button", className: cx(sx(pageStyle$
|
|
7494
|
+
return (jsxs("nav", { className: cx(sx(paginationStyle$3), className), "aria-label": ariaLabel, "data-test": "pagination", children: [!hideSummary && (jsxs("p", { className: sx(summaryStyle$6), "data-test": "pagination-summary", children: ["Showing ", firstItem, "\u2013", lastItem, " of ", totalItems, " ", itemLabel] })), jsxs("div", { className: sx(controlsStyle), children: [showSizeSelector && (jsxs("label", { className: sx(pageSizeStyle), children: [jsx("span", { children: "Rows per page" }), jsx("select", { value: pageSize, onChange: (event) => onPageSizeChange?.(Number(event.target.value)), "data-test": "pagination-page-size", children: pageSizeOptions.map((option) => (jsx("option", { value: option, children: option }, option))) })] })), jsxs("ul", { className: sx(pagesStyle), children: [jsx("li", { children: jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage - 1), disabled: currentPage <= 1, "aria-label": "Previous page", "data-test": "pagination-previous", children: jsx(ChevronLeftIcon, { size: 16 }) }) }), items.map((item, index) => item === 'ellipsis' ? (jsx("li", { className: sx(ellipsisStyle), "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`)) : (jsx("li", { children: jsx("button", { type: "button", className: cx(sx(pageStyle$v), item === currentPage && sx(currentStyle)), onClick: () => goTo(item), "aria-label": `Page ${item}`, "aria-current": item === currentPage ? 'page' : undefined, "data-test": `pagination-page-${item}`, children: item }) }, item))), jsx("li", { children: jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage + 1), disabled: currentPage >= pageCount, "aria-label": "Next page", "data-test": "pagination-next", children: jsx(ChevronRightIcon$1, { size: 16 }) }) })] })] })] }));
|
|
7495
7495
|
};
|
|
7496
7496
|
|
|
7497
7497
|
/* Progress Bar */
|
|
@@ -7958,7 +7958,7 @@ const SearchField = forwardRef(({ placeholder = 'Search...', value, defaultValue
|
|
|
7958
7958
|
SearchField.displayName = 'SearchField';
|
|
7959
7959
|
|
|
7960
7960
|
/** The form's own vertical rhythm. */
|
|
7961
|
-
const formStyle$
|
|
7961
|
+
const formStyle$6 = {
|
|
7962
7962
|
label: 'SchoolContactForm-formStyle',
|
|
7963
7963
|
display: 'grid',
|
|
7964
7964
|
gap: 16,
|
|
@@ -8017,7 +8017,7 @@ const phoneFieldsStyle = {
|
|
|
8017
8017
|
* Layout for Hub's school-contact editor. Field controls stay injectable so
|
|
8018
8018
|
* consuming applications retain their form state, validation, and masking.
|
|
8019
8019
|
*/
|
|
8020
|
-
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxs("div", { className: cx(sx(formStyle$
|
|
8020
|
+
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxs("div", { className: cx(sx(formStyle$6), className), children: [mode === 'Add' && (jsxs(Fragment, { children: [jsxs("div", { children: [jsx("label", { className: sx(portalLabelStyle), children: "Create From Portal User" }), createFromPortalUser] }), jsx("div", { className: sx(dividerStyle$2), children: jsx("strong", { children: "OR" }) }), jsx("p", { className: sx(newContactLabelStyle), children: "Create New Contact Without Portal Access" })] })), jsxs("div", { className: sx(nameFieldsStyle), children: [firstNameField, middleInitialField, lastNameField] }), jsxs("div", { className: sx(phoneFieldsStyle), children: [businessPhoneField, cellPhoneField] }), jsx("div", { children: emailField })] }));
|
|
8021
8021
|
|
|
8022
8022
|
const segmentStyle$2 = {
|
|
8023
8023
|
label: 'Segment-segmentStyle',
|
|
@@ -8151,7 +8151,7 @@ SportCodeBadge.displayName = 'SportCodeBadge';
|
|
|
8151
8151
|
* the job this component exists for (tabbed dropdowns jumped as each tab's
|
|
8152
8152
|
* longest option changed).
|
|
8153
8153
|
*/
|
|
8154
|
-
const stackStyle$
|
|
8154
|
+
const stackStyle$5 = {
|
|
8155
8155
|
label: 'TabPanelStack-stackStyle',
|
|
8156
8156
|
display: 'grid',
|
|
8157
8157
|
};
|
|
@@ -8180,7 +8180,7 @@ const hiddenPanelStyle = {
|
|
|
8180
8180
|
* focus order and the accessibility tree (`aria-hidden` says so explicitly),
|
|
8181
8181
|
* so only the visible one can be read or tabbed to.
|
|
8182
8182
|
*/
|
|
8183
|
-
const TabPanelStack = ({ panels, activeId, idPrefix, className = '' }) => (jsx("div", { className: [sx(stackStyle$
|
|
8183
|
+
const TabPanelStack = ({ panels, activeId, idPrefix, className = '' }) => (jsx("div", { className: [sx(stackStyle$5), className].filter(Boolean).join(' '), children: panels.map(({ id, content, labelledBy }) => {
|
|
8184
8184
|
const active = id === activeId;
|
|
8185
8185
|
return (jsx("div", { id: idPrefix ? `${idPrefix}-${id}` : undefined, role: "tabpanel", "aria-labelledby": labelledBy, "aria-hidden": active ? undefined : true, className: [sx(panelStyle$9), !active && sx(hiddenPanelStyle)].filter(Boolean).join(' '), children: content }, id));
|
|
8186
8186
|
}) }));
|
|
@@ -8400,7 +8400,7 @@ TabStrip.displayName = 'TabStrip';
|
|
|
8400
8400
|
* inherit the title's display font and size. `&&` (0,2,0) so a host's descendant
|
|
8401
8401
|
* rule (e.g. `.title span`, 0,1,1) can't restyle it either.
|
|
8402
8402
|
*/
|
|
8403
|
-
const rootStyle$
|
|
8403
|
+
const rootStyle$2 = {
|
|
8404
8404
|
label: 'TeamPicker-rootStyle',
|
|
8405
8405
|
'&&': {
|
|
8406
8406
|
fontFamily: 'var(--font-family-base, Inter, system-ui, sans-serif)',
|
|
@@ -8520,7 +8520,7 @@ const TeamPicker = ({ groups, groupOrder, activeGroup, onGroupChange, mode = 'si
|
|
|
8520
8520
|
onOnly(value);
|
|
8521
8521
|
}, children: "Only" }))] }, value));
|
|
8522
8522
|
};
|
|
8523
|
-
return (jsxs("div", { className: sx(rootStyle$
|
|
8523
|
+
return (jsxs("div", { className: sx(rootStyle$2), children: [jsx("div", { className: sx(tabRowStyle), children: jsx(TabStrip, { idPrefix: uid, accent: "teal", "aria-label": ariaLabel, activeTab: current, onTabChange: changeGroup, tabs: ids.map((id) => {
|
|
8524
8524
|
const values = (groups[id] ?? []).map(teamValue);
|
|
8525
8525
|
const count = values.filter((value) => selected.includes(value)).length;
|
|
8526
8526
|
const all = values.length > 0 && count === values.length;
|
|
@@ -8548,7 +8548,7 @@ TeamPicker.displayName = 'TeamPicker';
|
|
|
8548
8548
|
*/
|
|
8549
8549
|
/** Shrink-wrapped, as before: inline content stays beside it, and the icon
|
|
8550
8550
|
* trigger's right-aligned panel hangs from the icon, not the container. */
|
|
8551
|
-
const rootStyle = {
|
|
8551
|
+
const rootStyle$1 = {
|
|
8552
8552
|
label: 'SelectFilter-rootStyle',
|
|
8553
8553
|
position: 'relative',
|
|
8554
8554
|
display: 'inline-block',
|
|
@@ -8758,7 +8758,7 @@ const choicesStyle = {
|
|
|
8758
8758
|
overflowY: 'auto',
|
|
8759
8759
|
};
|
|
8760
8760
|
/** Extra content above the title, ruled off from the choices. */
|
|
8761
|
-
const headerStyle$
|
|
8761
|
+
const headerStyle$J = {
|
|
8762
8762
|
label: 'SelectFilter-headerStyle',
|
|
8763
8763
|
padding: '6px 12px 10px',
|
|
8764
8764
|
marginBottom: 'var(--space-1)',
|
|
@@ -8873,7 +8873,7 @@ const optionBodyStyle = {
|
|
|
8873
8873
|
};
|
|
8874
8874
|
const optionLabelStyle = { label: 'SelectFilter-optionLabelStyle', flex: 1 };
|
|
8875
8875
|
/** Text for assistive technology only (a trigger's state the eye reads from colour). */
|
|
8876
|
-
const srOnlyStyle$
|
|
8876
|
+
const srOnlyStyle$5 = { label: 'SelectFilter-srOnlyStyle', ...srOnly };
|
|
8877
8877
|
|
|
8878
8878
|
/**
|
|
8879
8879
|
* One flat option. A single pick is a button. A multi-select row is its
|
|
@@ -9106,7 +9106,7 @@ const SelectFilter = forwardRef(({ label, options = [], groupedOptions = {}, gro
|
|
|
9106
9106
|
else if (trigger === 'filter') {
|
|
9107
9107
|
triggerElement = (
|
|
9108
9108
|
// An outlined pill, blue while open or while a filter is in effect.
|
|
9109
|
-
jsxs("button", { "aria-expanded": isOpen, className: cx(sx(filterPillStyle), isOpen || active ? sx(filterPillActiveStyle) : ''), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [jsx(Icon, { name: "Filter", size: 16 }), triggerLabel, active && !(activeCount > 0) && jsx("span", { className: sx(srOnlyStyle$
|
|
9109
|
+
jsxs("button", { "aria-expanded": isOpen, className: cx(sx(filterPillStyle), isOpen || active ? sx(filterPillActiveStyle) : ''), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [jsx(Icon, { name: "Filter", size: 16 }), triggerLabel, active && !(activeCount > 0) && jsx("span", { className: sx(srOnlyStyle$5), children: " (filter on)" }), activeCount > 0 && (jsx("span", { "aria-label": `${activeCount} on`, className: sx(filterCountStyle), children: activeCount }))] }));
|
|
9110
9110
|
}
|
|
9111
9111
|
else if (trigger === 'link') {
|
|
9112
9112
|
triggerElement = (jsxs("button", { "aria-expanded": isOpen, "aria-label": `Filter by ${label}: ${triggerText}`, className: sx(linkTriggerStyle), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [singleTeam ? (jsxs("span", { className: sx(teamValueStyle), children: [jsx(SportCodeBadge, { code: codeOf(singleTeam), group: singleTeamTab && isSportCodeGroup(singleTeamTab) ? singleTeamTab : undefined }), jsx("span", { children: singleTeam.name ?? singleTeam.label })] })) : (jsx("span", { children: triggerText })), chevron] }));
|
|
@@ -9114,13 +9114,13 @@ const SelectFilter = forwardRef(({ label, options = [], groupedOptions = {}, gro
|
|
|
9114
9114
|
else {
|
|
9115
9115
|
triggerElement = (jsxs("button", { "aria-expanded": isOpen, "aria-label": `${label}: ${triggerText}`, className: cx(sx(fieldTriggerStyle), fullWidth ? sx(fieldTriggerFullStyle) : '', disabled ? sx(fieldTriggerDisabledStyle) : ''), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [jsx("span", { className: sx(tagsStyle$1), children: isAll ? (jsxs("span", { className: sx(tagStyle), "data-testid": `${label}-option-all`, children: ["All ", label, "s"] })) : !chosen.length ? (jsx("span", { className: sx(placeholderStyle), children: placeholderText })) : (jsxs(Fragment, { children: [chosen.slice(0, tagLimit).map(renderTag), remaining > 0 && (jsxs("span", { className: sx(tagStyle), "data-testid": `${label}-option-remaining`, children: ["+", remaining] }))] })) }), jsx("span", { className: sx(chevronButtonStyle), children: chevron })] }));
|
|
9116
9116
|
}
|
|
9117
|
-
return (jsxs("div", { className: cx(sx(rootStyle), fullWidth ? sx(fullWidthStyle) : '', className ?? ''), ref: (element) => {
|
|
9117
|
+
return (jsxs("div", { className: cx(sx(rootStyle$1), fullWidth ? sx(fullWidthStyle) : '', className ?? ''), ref: (element) => {
|
|
9118
9118
|
rootRef.current = element;
|
|
9119
9119
|
if (typeof ref === 'function')
|
|
9120
9120
|
ref(element);
|
|
9121
9121
|
else if (ref)
|
|
9122
9122
|
ref.current = element;
|
|
9123
|
-
}, children: [triggerElement, isOpen && (jsxs("div", { className: cx(sx(panelStyle$8), sx(trigger === 'icon' || trigger === 'filter' ? panelRightStyle : panelLeftStyle)), style: width ? { minWidth: width } : undefined, children: [header && jsx("div", { className: sx(headerStyle$
|
|
9123
|
+
}, children: [triggerElement, isOpen && (jsxs("div", { className: cx(sx(panelStyle$8), sx(trigger === 'icon' || trigger === 'filter' ? panelRightStyle : panelLeftStyle)), style: width ? { minWidth: width } : undefined, children: [header && jsx("div", { className: sx(headerStyle$J), children: header }), (title || showAllLink) && (jsxs("div", { className: sx(titleRowStyle$5), children: [title && jsx("span", { className: sx(titleStyle$C), children: title }), showAllLink && (jsx("button", { className: sx(allLinkStyle), onClick: selectAll, type: "button", children: "All" }))] })), jsx("div", { className: sx(choicesStyle), ref: choicesRef, children: grouped ? (
|
|
9124
9124
|
// Multi-select stages here (with a select-all per tab and "Only");
|
|
9125
9125
|
// Apply below commits it. A single pick commits at once.
|
|
9126
9126
|
jsx(TeamPicker, { activeGroup: activeTab, "aria-label": `${label} groups`, emptyMessage: "No options found", groupOrder: tabs, groups: teamGroups, mode: multiselect ? 'multiple' : 'single', onGroupChange: setActiveTab, onOnly: (key) => only(byKey(key)), onSelect: (key) => select(byKey(key)), onToggle: (key) => select(byKey(key)), onToggleGroup: (_, keys) => toggleGroup(keys.map(byKey)), selected: staged.map(keyOf) })) : currentOptions.length === 0 ? (jsx("div", { className: sx(emptyStyle$l), children: "No options found" })) : (jsxs(Fragment, { children: [multiselect && !hideCheckAll && (
|
|
@@ -9291,7 +9291,7 @@ const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = fal
|
|
|
9291
9291
|
};
|
|
9292
9292
|
|
|
9293
9293
|
/** Sticks to the top of the calendar column as the schedule scrolls past. */
|
|
9294
|
-
const headerStyle$
|
|
9294
|
+
const headerStyle$I = {
|
|
9295
9295
|
label: 'TeamCalendarHeader-headerStyle',
|
|
9296
9296
|
position: 'sticky',
|
|
9297
9297
|
top: 0,
|
|
@@ -9303,7 +9303,7 @@ const headerStyle$H = {
|
|
|
9303
9303
|
justifyContent: 'space-between',
|
|
9304
9304
|
},
|
|
9305
9305
|
};
|
|
9306
|
-
const rowStyle$
|
|
9306
|
+
const rowStyle$8 = {
|
|
9307
9307
|
label: 'TeamCalendarHeader-rowStyle',
|
|
9308
9308
|
display: 'flex',
|
|
9309
9309
|
justifyContent: 'space-between',
|
|
@@ -9357,7 +9357,7 @@ const contentStyle$8 = {
|
|
|
9357
9357
|
* It sticks to the top of its column so the team stays identifiable while the
|
|
9358
9358
|
* schedule scrolls.
|
|
9359
9359
|
*/
|
|
9360
|
-
const TeamCalendarHeader = ({ teamCode, teamFullName, children, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$
|
|
9360
|
+
const TeamCalendarHeader = ({ teamCode, teamFullName, children, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$I), className), children: [jsx("div", { className: sx(rowStyle$8), children: jsxs("div", { className: sx(identityStyle$1), children: [jsx("div", { className: sx(codeStyle$3), children: teamCode }), teamFullName && jsx("span", { className: sx(nameStyle$4), children: teamFullName })] }) }), jsx("div", { className: sx(contentStyle$8), children: children })] }));
|
|
9361
9361
|
TeamCalendarHeader.displayName = 'TeamCalendarHeader';
|
|
9362
9362
|
|
|
9363
9363
|
/**
|
|
@@ -9374,7 +9374,7 @@ const subMenuStyle = {
|
|
|
9374
9374
|
label: 'TeamHeader-subMenuStyle',
|
|
9375
9375
|
marginBottom: 24,
|
|
9376
9376
|
};
|
|
9377
|
-
const headerStyle$
|
|
9377
|
+
const headerStyle$H = {
|
|
9378
9378
|
label: 'TeamHeader-headerStyle',
|
|
9379
9379
|
display: 'flex',
|
|
9380
9380
|
alignItems: 'flex-start',
|
|
@@ -9440,7 +9440,7 @@ const titleStyle$B = {
|
|
|
9440
9440
|
lineHeight: '52px',
|
|
9441
9441
|
},
|
|
9442
9442
|
};
|
|
9443
|
-
const actionsStyle$
|
|
9443
|
+
const actionsStyle$b = {
|
|
9444
9444
|
label: 'TeamHeader-actionsStyle',
|
|
9445
9445
|
display: 'flex',
|
|
9446
9446
|
alignItems: 'center',
|
|
@@ -9455,7 +9455,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
9455
9455
|
const title = suppliedTitle ?? (teamCode && teamName
|
|
9456
9456
|
? `${teamCode} - ${teamName}`
|
|
9457
9457
|
: teamName || teamCode || '');
|
|
9458
|
-
const headerClasses = cx(sx(headerStyle$
|
|
9458
|
+
const headerClasses = cx(sx(headerStyle$H), !title && sx(emptyStyle$k), className);
|
|
9459
9459
|
const handleBack = () => {
|
|
9460
9460
|
if (onBack) {
|
|
9461
9461
|
onBack();
|
|
@@ -9465,7 +9465,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
9465
9465
|
window.location.href = backHref;
|
|
9466
9466
|
}
|
|
9467
9467
|
};
|
|
9468
|
-
return (jsxs("div", { className: headerClasses, "data-test": "team-header", children: [jsxs("div", { className: sx(leftStyle$1), children: [(backHref || onBack) && (jsx("button", { type: "button", className: sx(backButtonStyle), onClick: handleBack, "aria-label": "Go back", "data-test": "team-header-back", children: jsx(BackIcon, {}) })), jsxs("div", { className: sx(titlesStyle), children: [pretitle && jsx("span", { className: sx(pretitleStyle), children: pretitle }), jsxs("h1", { className: sx(titleStyle$B), children: [title, "\u00A0"] })] })] }), actions && (jsx("div", { className: sx(actionsStyle$
|
|
9468
|
+
return (jsxs("div", { className: headerClasses, "data-test": "team-header", children: [jsxs("div", { className: sx(leftStyle$1), children: [(backHref || onBack) && (jsx("button", { type: "button", className: sx(backButtonStyle), onClick: handleBack, "aria-label": "Go back", "data-test": "team-header-back", children: jsx(BackIcon, {}) })), jsxs("div", { className: sx(titlesStyle), children: [pretitle && jsx("span", { className: sx(pretitleStyle), children: pretitle }), jsxs("h1", { className: sx(titleStyle$B), children: [title, "\u00A0"] })] })] }), actions && (jsx("div", { className: sx(actionsStyle$b), children: actions }))] }));
|
|
9469
9469
|
};
|
|
9470
9470
|
const DEFAULT_TABS$1 = [
|
|
9471
9471
|
{ id: 'profile', label: 'Profile' },
|
|
@@ -9609,7 +9609,7 @@ const locationStyle = {
|
|
|
9609
9609
|
fontWeight: 'var(--font-semibold)',
|
|
9610
9610
|
color: 'var(--color-gray-900)',
|
|
9611
9611
|
};
|
|
9612
|
-
const routeStyle$
|
|
9612
|
+
const routeStyle$4 = {
|
|
9613
9613
|
label: 'TripSegment-routeStyle',
|
|
9614
9614
|
display: 'flex',
|
|
9615
9615
|
alignItems: 'center',
|
|
@@ -9691,7 +9691,7 @@ const AirSegment = ({ flights, variant = 'light', className = '', }) => {
|
|
|
9691
9691
|
if (!flights || flights.length === 0) {
|
|
9692
9692
|
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsx("span", { className: sx(emptyStyle$j), children: "No flights" }) }));
|
|
9693
9693
|
}
|
|
9694
|
-
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxs("div", { className: sx(itemStyle$3), children: [jsxs("div", { className: sx(itemHeaderStyle), children: [jsx(PlaneIcon$2, {}), jsx("span", { className: sx(itemTypeStyle), children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxs("div", { className: sx(routeStyle$
|
|
9694
|
+
return (jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxs("div", { className: sx(itemStyle$3), children: [jsxs("div", { className: sx(itemHeaderStyle), children: [jsx(PlaneIcon$2, {}), jsx("span", { className: sx(itemTypeStyle), children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxs("div", { className: sx(routeStyle$4), children: [jsx("span", { className: sx(locationStyle), children: flight.departure }), jsx(ArrowIcon, {}), jsx("span", { className: sx(locationStyle), children: flight.arrival })] }), jsxs("div", { className: sx(detailsStyle$3), children: [jsx("span", { children: flight.departureDate }), flight.departureTime && jsx("span", { children: flight.departureTime })] }), flight.airline && (jsxs("div", { className: sx(detailsStyle$3), children: [jsx("span", { children: flight.airline }), flight.flightNumber && jsxs("span", { children: ["#", flight.flightNumber] })] }))] }, i))) }));
|
|
9695
9695
|
};
|
|
9696
9696
|
/**
|
|
9697
9697
|
* GroundSegment component for displaying ground transportation
|
|
@@ -9700,7 +9700,7 @@ const GroundSegment = ({ segments, variant = 'light', className = '', }) => {
|
|
|
9700
9700
|
if (!segments || segments.length === 0) {
|
|
9701
9701
|
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsx("span", { className: sx(emptyStyle$j), children: "No ground transportation" }) }));
|
|
9702
9702
|
}
|
|
9703
|
-
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxs("div", { className: sx(itemStyle$3), children: [jsxs("div", { className: sx(itemHeaderStyle), children: [jsx(BusIcon$1, {}), jsx("span", { className: sx(itemTypeStyle), children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxs("div", { className: sx(routeStyle$
|
|
9703
|
+
return (jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxs("div", { className: sx(itemStyle$3), children: [jsxs("div", { className: sx(itemHeaderStyle), children: [jsx(BusIcon$1, {}), jsx("span", { className: sx(itemTypeStyle), children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxs("div", { className: sx(routeStyle$4), children: [jsx("span", { className: sx(locationStyle), children: segment.pickupLocation }), jsx(ArrowIcon, {}), jsx("span", { className: sx(locationStyle), children: segment.dropoffLocation })] }), jsxs("div", { className: sx(detailsStyle$3), children: [jsx("span", { children: segment.pickupDate }), segment.pickupTime && jsx("span", { children: segment.pickupTime })] }), segment.company && (jsxs("div", { className: sx(detailsStyle$3), children: [jsx("span", { children: segment.company }), segment.vehicleCount && jsxs("span", { children: [segment.vehicleCount, " vehicles"] })] }))] }, i))) }));
|
|
9704
9704
|
};
|
|
9705
9705
|
/**
|
|
9706
9706
|
* HotelSegment component for displaying hotel information
|
|
@@ -9747,7 +9747,7 @@ const panelStyle$7 = {
|
|
|
9747
9747
|
borderRadius: 'var(--radius-xl)',
|
|
9748
9748
|
backgroundColor: 'var(--bg-surface)',
|
|
9749
9749
|
};
|
|
9750
|
-
const panelTitleStyle = {
|
|
9750
|
+
const panelTitleStyle$1 = {
|
|
9751
9751
|
label: 'AcmiQuoteCalculator-panelTitleStyle',
|
|
9752
9752
|
margin: 0,
|
|
9753
9753
|
color: 'var(--fg-1)',
|
|
@@ -9818,7 +9818,7 @@ const legErrorStyle = {
|
|
|
9818
9818
|
color: 'var(--color-error)',
|
|
9819
9819
|
fontSize: 'var(--fs-sm)',
|
|
9820
9820
|
};
|
|
9821
|
-
const actionsStyle$
|
|
9821
|
+
const actionsStyle$a = {
|
|
9822
9822
|
label: 'AcmiQuoteCalculator-actionsStyle',
|
|
9823
9823
|
display: 'flex',
|
|
9824
9824
|
flexWrap: 'wrap',
|
|
@@ -10056,10 +10056,10 @@ const AcmiQuoteCalculator = ({ carrierOptions = ACMI_CARRIER_OPTIONS, aircraftOp
|
|
|
10056
10056
|
const seatHint = specs
|
|
10057
10057
|
? `Maximum ${specs.seats} passengers for this aircraft`
|
|
10058
10058
|
: 'Select an aircraft to see seat capacity';
|
|
10059
|
-
return (jsxs("div", { className: cx(sx(calculatorStyle$1), className), "data-test": "acmi-quote-calculator", children: [showErrors && errorList.length > 0 && (jsx(Alert, { variant: "error", title: "Fix these before calculating", children: jsx("ul", { className: sx(errorSummaryStyle$1), "data-test": "acmi-error-summary", children: errorList.map(([field, message]) => (jsx("li", { children: message }, field))) }) })), calculationError && (jsx(Alert, { variant: "error", title: "Quote could not be calculated", children: jsx("p", { className: sx(alertMessageStyle), "data-test": "acmi-calculation-error", children: calculationError }) })), jsxs("div", { className: sx(columnsStyle), children: [jsxs("section", { className: sx(panelStyle$7), "aria-label": "Quote configuration", children: [jsx("h3", { className: sx(panelTitleStyle), children: "Quote Configuration" }), jsx(Select, { id: "acmi-carrier", label: "Carrier", placeholder: "Select Carrier\u2026", options: carrierOptions, value: inputs.carrier, error: showErrors ? errors.carrier : undefined, onChange: (event) => updateCarrier(event.target.value), "data-test": "acmi-carrier" }), jsx(Select, { id: "acmi-aircraft", label: "Aircraft Type", placeholder: "Select Aircraft\u2026", options: availableAircraftOptions, value: inputs.aircraft, disabled: !inputs.carrier, error: showErrors ? errors.aircraft : undefined, onChange: (event) => update('aircraft', event.target.value), "data-test": "acmi-aircraft" }), jsx(Input, { id: "acmi-passengers", type: "number", label: "Number of Passengers", placeholder: "Enter passenger count", helperText: seatHint, value: inputs.passengers, error: showErrors ? errors.passengers : undefined, onChange: (event) => update('passengers', event.target.value), "data-test": "acmi-passengers" }), jsx(Input, { id: "acmi-fuel-price", type: "number", step: "0.01", label: "Fuel Price ($/gallon)", placeholder: "e.g. 5.50", value: inputs.fuelPrice, error: showErrors ? errors.fuelPrice : undefined, onChange: (event) => update('fuelPrice', event.target.value), "data-test": "acmi-fuel-price" }), jsx(Input, { id: "acmi-markup", type: "number", step: "0.1", label: "Markup %", helperText: "Standard is 7% \u2014 adjustable as needed", value: inputs.markupPercent, onChange: (event) => update('markupPercent', event.target.value), "data-test": "acmi-markup" }), jsx(Input, { id: "acmi-insurance", label: "Insurance (Flat Fee)", helperText: `${currency.format(insuranceFlat)} per trip (locked)`, value: currency.format(insuranceFlat), readOnly: true, disabled: true, "data-test": "acmi-insurance" }), jsx(Input, { id: "acmi-crew-nights", type: "number", label: "Crew Nights (RON)", helperText: "Number of nights crew stays away from base", value: inputs.crewNights, onChange: (event) => update('crewNights', event.target.value), "data-test": "acmi-crew-nights" }), showTripMonth && (jsx(Select, { id: "acmi-trip-month", label: "Trip Month (for Historic Winds)", options: TRIP_MONTH_OPTIONS, helperText: "Use this only when the configured pricing service applies a historic winds profile.", value: inputs.tripMonth, onChange: (event) => update('tripMonth', event.target.value), "data-test": "acmi-trip-month" }))] }), jsxs("section", { className: sx(panelStyle$7), "aria-label": "Flight itinerary", children: [jsx("h3", { className: sx(panelTitleStyle), children: "Flight Itinerary" }), jsx(Alert, { variant: "primary", children: positioningMode === 'automatic' ? (jsxs(Fragment, { children: ["Enter ", jsx("strong", { children: "live legs only" }), ", in trip order. The host pricing engine adds positioning ferry legs automatically. Leave flight time blank to use its route estimate; an entered time is treated as an explicit contractual input."] })) : (jsxs(Fragment, { children: ["Enter ", jsx("strong", { children: "every flown leg in order" }), ", including positioning. Mark each leg as live or ferry. Leave flight time blank to use the pricing engine\u2019s route estimate; an entered time is treated as an explicit contractual input."] })) }), showErrors && errors.legs && (jsx("p", { className: sx(legErrorStyle), role: "alert", "data-test": "acmi-legs-error", children: errors.legs })), jsx("ol", { className: sx(legsStyle$3), children: inputs.legs.map((leg, index) => (jsxs("li", { className: cx(sx(legStyle$2), positioningMode === 'automatic' && sx(automaticLegStyle)), "data-test": "acmi-leg", children: [jsxs("span", { className: sx(legIndexStyle$1), children: ["Leg ", index + 1] }), positioningMode === 'explicit' && (jsx(Select, { id: `${leg.id}-type`, size: "sm", label: "Leg type", options: [
|
|
10059
|
+
return (jsxs("div", { className: cx(sx(calculatorStyle$1), className), "data-test": "acmi-quote-calculator", children: [showErrors && errorList.length > 0 && (jsx(Alert, { variant: "error", title: "Fix these before calculating", children: jsx("ul", { className: sx(errorSummaryStyle$1), "data-test": "acmi-error-summary", children: errorList.map(([field, message]) => (jsx("li", { children: message }, field))) }) })), calculationError && (jsx(Alert, { variant: "error", title: "Quote could not be calculated", children: jsx("p", { className: sx(alertMessageStyle), "data-test": "acmi-calculation-error", children: calculationError }) })), jsxs("div", { className: sx(columnsStyle), children: [jsxs("section", { className: sx(panelStyle$7), "aria-label": "Quote configuration", children: [jsx("h3", { className: sx(panelTitleStyle$1), children: "Quote Configuration" }), jsx(Select, { id: "acmi-carrier", label: "Carrier", placeholder: "Select Carrier\u2026", options: carrierOptions, value: inputs.carrier, error: showErrors ? errors.carrier : undefined, onChange: (event) => updateCarrier(event.target.value), "data-test": "acmi-carrier" }), jsx(Select, { id: "acmi-aircraft", label: "Aircraft Type", placeholder: "Select Aircraft\u2026", options: availableAircraftOptions, value: inputs.aircraft, disabled: !inputs.carrier, error: showErrors ? errors.aircraft : undefined, onChange: (event) => update('aircraft', event.target.value), "data-test": "acmi-aircraft" }), jsx(Input, { id: "acmi-passengers", type: "number", label: "Number of Passengers", placeholder: "Enter passenger count", helperText: seatHint, value: inputs.passengers, error: showErrors ? errors.passengers : undefined, onChange: (event) => update('passengers', event.target.value), "data-test": "acmi-passengers" }), jsx(Input, { id: "acmi-fuel-price", type: "number", step: "0.01", label: "Fuel Price ($/gallon)", placeholder: "e.g. 5.50", value: inputs.fuelPrice, error: showErrors ? errors.fuelPrice : undefined, onChange: (event) => update('fuelPrice', event.target.value), "data-test": "acmi-fuel-price" }), jsx(Input, { id: "acmi-markup", type: "number", step: "0.1", label: "Markup %", helperText: "Standard is 7% \u2014 adjustable as needed", value: inputs.markupPercent, onChange: (event) => update('markupPercent', event.target.value), "data-test": "acmi-markup" }), jsx(Input, { id: "acmi-insurance", label: "Insurance (Flat Fee)", helperText: `${currency.format(insuranceFlat)} per trip (locked)`, value: currency.format(insuranceFlat), readOnly: true, disabled: true, "data-test": "acmi-insurance" }), jsx(Input, { id: "acmi-crew-nights", type: "number", label: "Crew Nights (RON)", helperText: "Number of nights crew stays away from base", value: inputs.crewNights, onChange: (event) => update('crewNights', event.target.value), "data-test": "acmi-crew-nights" }), showTripMonth && (jsx(Select, { id: "acmi-trip-month", label: "Trip Month (for Historic Winds)", options: TRIP_MONTH_OPTIONS, helperText: "Use this only when the configured pricing service applies a historic winds profile.", value: inputs.tripMonth, onChange: (event) => update('tripMonth', event.target.value), "data-test": "acmi-trip-month" }))] }), jsxs("section", { className: sx(panelStyle$7), "aria-label": "Flight itinerary", children: [jsx("h3", { className: sx(panelTitleStyle$1), children: "Flight Itinerary" }), jsx(Alert, { variant: "primary", children: positioningMode === 'automatic' ? (jsxs(Fragment, { children: ["Enter ", jsx("strong", { children: "live legs only" }), ", in trip order. The host pricing engine adds positioning ferry legs automatically. Leave flight time blank to use its route estimate; an entered time is treated as an explicit contractual input."] })) : (jsxs(Fragment, { children: ["Enter ", jsx("strong", { children: "every flown leg in order" }), ", including positioning. Mark each leg as live or ferry. Leave flight time blank to use the pricing engine\u2019s route estimate; an entered time is treated as an explicit contractual input."] })) }), showErrors && errors.legs && (jsx("p", { className: sx(legErrorStyle), role: "alert", "data-test": "acmi-legs-error", children: errors.legs })), jsx("ol", { className: sx(legsStyle$3), children: inputs.legs.map((leg, index) => (jsxs("li", { className: cx(sx(legStyle$2), positioningMode === 'automatic' && sx(automaticLegStyle)), "data-test": "acmi-leg", children: [jsxs("span", { className: sx(legIndexStyle$1), children: ["Leg ", index + 1] }), positioningMode === 'explicit' && (jsx(Select, { id: `${leg.id}-type`, size: "sm", label: "Leg type", options: [
|
|
10060
10060
|
{ value: 'live', label: 'Live' },
|
|
10061
10061
|
{ value: 'ferry', label: 'Ferry' },
|
|
10062
|
-
], value: leg.type ?? 'live', onChange: (event) => updateLeg(leg.id, { type: event.target.value }), "data-test": "acmi-leg-type" })), jsx(Input, { id: `${leg.id}-origin`, size: "sm", label: "From", maxLength: 4, value: leg.origin, onChange: (event) => updateLeg(leg.id, { origin: event.target.value.toUpperCase() }), "data-test": "acmi-leg-origin" }), jsx(Input, { id: `${leg.id}-destination`, size: "sm", label: "To", maxLength: 4, value: leg.destination, onChange: (event) => updateLeg(leg.id, { destination: event.target.value.toUpperCase() }), "data-test": "acmi-leg-destination" }), jsx(Input, { id: `${leg.id}-flight-time`, size: "sm", type: "number", step: "0.1", label: "Flight time (h, optional)", value: leg.flightTime, onChange: (event) => updateLeg(leg.id, { flightTime: event.target.value }), "data-test": "acmi-leg-flight-time" }), jsx(Button, { variant: "ghost", size: "sm", square: true, "aria-label": `Remove leg ${index + 1}`, disabled: inputs.legs.length === 1, onClick: () => removeLeg(leg.id), "data-test": "acmi-remove-leg", children: jsx(TrashIcon$2, { size: 16 }) })] }, leg.id))) }), jsxs("div", { className: sx(actionsStyle$
|
|
10062
|
+
], value: leg.type ?? 'live', onChange: (event) => updateLeg(leg.id, { type: event.target.value }), "data-test": "acmi-leg-type" })), jsx(Input, { id: `${leg.id}-origin`, size: "sm", label: "From", maxLength: 4, value: leg.origin, onChange: (event) => updateLeg(leg.id, { origin: event.target.value.toUpperCase() }), "data-test": "acmi-leg-origin" }), jsx(Input, { id: `${leg.id}-destination`, size: "sm", label: "To", maxLength: 4, value: leg.destination, onChange: (event) => updateLeg(leg.id, { destination: event.target.value.toUpperCase() }), "data-test": "acmi-leg-destination" }), jsx(Input, { id: `${leg.id}-flight-time`, size: "sm", type: "number", step: "0.1", label: "Flight time (h, optional)", value: leg.flightTime, onChange: (event) => updateLeg(leg.id, { flightTime: event.target.value }), "data-test": "acmi-leg-flight-time" }), jsx(Button, { variant: "ghost", size: "sm", square: true, "aria-label": `Remove leg ${index + 1}`, disabled: inputs.legs.length === 1, onClick: () => removeLeg(leg.id), "data-test": "acmi-remove-leg", children: jsx(TrashIcon$2, { size: 16 }) })] }, leg.id))) }), jsxs("div", { className: sx(actionsStyle$a), children: [jsx(Button, { variant: "outline", size: "sm", leftIcon: jsx(PlusIcon$2, { size: 16 }), onClick: addLeg, "data-test": "acmi-add-leg", children: "Add Flight Leg" }), jsx(Button, { size: "sm", loading: calculating, onClick: calculate, "data-test": "acmi-calculate", children: calculating ? 'Calculating' : 'Calculate Quote' }), result && onSubmitForApproval && (jsx(Button, { variant: "secondary", size: "sm", onClick: () => onSubmitForApproval(inputs), "data-test": "acmi-submit-approval", children: "Use This Total" }))] })] })] }), result && (jsxs("section", { className: sx(resultsStyle), "aria-label": "Quote summary", "data-test": "acmi-results", children: [jsx("h3", { className: sx(panelTitleStyle$1), children: "Quote Summary" }), jsxs("dl", { className: sx(resultGridStyle), children: [jsxs("div", { children: [jsx("dt", { children: "Operating Subtotal" }), jsx("dd", { children: currency.format(result.operatingSubtotal) })] }), jsxs("div", { children: [jsx("dt", { children: "Markup Applied" }), jsx("dd", { children: currency.format(result.markupAmount) })] }), jsxs("div", { children: [jsx("dt", { children: "Insurance (Flat Fee)" }), jsx("dd", { children: currency.format(result.insuranceAmount) })] }), jsxs("div", { children: [jsx("dt", { children: "Pre-Tax Total" }), jsx("dd", { children: currency.format(result.preTaxTotal) })] }), jsxs("div", { children: [jsx("dt", { children: "Federal Excise Tax" }), jsx("dd", { children: currency.format(result.fet) })] }), jsxs("div", { children: [jsx("dt", { children: "Segment Fees" }), jsx("dd", { children: currency.format(result.segmentFees) })] })] }), jsxs("p", { className: sx(finalPriceStyle), "data-test": "acmi-final-price", children: [jsx("span", { children: "Total Quoted Price" }), jsx("strong", { children: currency.format(result.finalPrice) })] }), result.pricingDetails && (jsxs("dl", { className: sx(contractFactsStyle), "data-test": "acmi-pricing-details", children: [jsxs("div", { "data-test": "acmi-ferry-floor", children: [jsx("dt", { children: "Ferry block time" }), jsxs("dd", { children: [result.pricingDetails.ferryBlockHours.toFixed(2), " h", result.pricingDetails.ferryMinimumHours
|
|
10063
10063
|
? ` · ${result.pricingDetails.ferryMinimumHours.toFixed(2)} h minimum per estimated SkyWest ferry leg`
|
|
10064
10064
|
: ''] })] }), jsxs("div", { "data-test": "acmi-fuel-buffer", children: [jsx("dt", { children: "Fuel buffer" }), jsxs("dd", { children: [(result.pricingDetails.fuelBufferPercent * 100).toFixed(0), "% \u00B7 ", currency.format(result.pricingDetails.fuelBufferAmount)] })] }), jsxs("div", { "data-test": "acmi-screening", children: [jsx("dt", { children: "Security screening" }), jsx("dd", { children: currency.format(result.pricingDetails.screeningAmount) })] })] })), result.legs && result.legs.length > 0 && (jsxs("div", { className: sx(pricedLegsStyle), "data-test": "acmi-priced-legs", children: [jsx("h4", { children: "Backend-priced itinerary" }), jsxs("div", { className: sx(pricedLegHeaderStyle), "aria-hidden": "true", children: [jsx("span", { children: "Leg" }), jsx("span", { children: "Type" }), jsx("span", { children: "Block" }), jsx("span", { children: "Total" })] }), result.legs.map((leg) => (jsxs("div", { className: sx(pricedLegStyle), "data-test": "acmi-priced-leg", children: [jsxs("span", { children: [leg.origin, " \u2192 ", leg.destination] }), jsx("span", { "data-test": "acmi-priced-leg-type", children: leg.type === 'ferry' ? 'Ferry' : 'Live' }), jsxs("span", { "data-test": "acmi-priced-leg-block", children: [leg.blockHours.toFixed(2), " h"] }), jsx("span", { children: currency.format(leg.total) })] }, leg.id)))] }))] }))] }));
|
|
10065
10065
|
};
|
|
@@ -10104,7 +10104,7 @@ const showHideAllStyle = {
|
|
|
10104
10104
|
opacity: 0.5,
|
|
10105
10105
|
},
|
|
10106
10106
|
};
|
|
10107
|
-
const filtersStyle$
|
|
10107
|
+
const filtersStyle$6 = {
|
|
10108
10108
|
label: 'AgentGroupTravelRequestsTable-filtersStyle',
|
|
10109
10109
|
display: 'flex',
|
|
10110
10110
|
flexWrap: 'wrap',
|
|
@@ -10221,7 +10221,7 @@ const iconButtonStyle$1 = {
|
|
|
10221
10221
|
cursor: 'pointer',
|
|
10222
10222
|
'&:hover': { background: 'var(--color-primary-light)' },
|
|
10223
10223
|
};
|
|
10224
|
-
const mutedStyle$
|
|
10224
|
+
const mutedStyle$3 = {
|
|
10225
10225
|
label: 'AgentGroupTravelRequestsTable-mutedStyle', color: 'var(--fg-4, var(--color-stone))'
|
|
10226
10226
|
};
|
|
10227
10227
|
const idLinkStyle = {
|
|
@@ -10334,7 +10334,7 @@ const subPnrPanelStyle = {
|
|
|
10334
10334
|
gap: 'var(--space-2)',
|
|
10335
10335
|
padding: 'var(--space-2) 0',
|
|
10336
10336
|
};
|
|
10337
|
-
const legendStyle$
|
|
10337
|
+
const legendStyle$4 = {
|
|
10338
10338
|
label: 'AgentGroupTravelRequestsTable-legendStyle',
|
|
10339
10339
|
margin: 0,
|
|
10340
10340
|
color: 'var(--fg-3, var(--color-slate))',
|
|
@@ -10461,12 +10461,12 @@ const AgentGroupTravelRequestsTable = ({ requests, sports = [], views = [], toda
|
|
|
10461
10461
|
setDateEdits((current) => ({ ...current, [id]: { ...current[id], submittedDate: value } }));
|
|
10462
10462
|
onSubmittedDateChange?.(id, value);
|
|
10463
10463
|
};
|
|
10464
|
-
return (jsxs("div", { className: cx(sx(wrapperStyle$2), className), "data-test": "agent-gtr-table", children: [jsxs("div", { className: sx(toolbarStyle$3), children: [jsxs("button", { type: "button", className: sx(showHideAllStyle), title: "Show/Hide all PNRs", onClick: toggleExpandAll, disabled: multiPnrIds.length === 0, "data-test": "agent-gtr-toggle-all", children: [allExpanded ? jsx(ChevronUpIcon, { size: 16 }) : jsx(ChevronDownIcon$1, { size: 16 }), jsx("span", { children: allExpanded ? 'Collapse all PNRs' : 'Expand all PNRs' })] }), jsxs("div", { className: sx(filtersStyle$
|
|
10464
|
+
return (jsxs("div", { className: cx(sx(wrapperStyle$2), className), "data-test": "agent-gtr-table", children: [jsxs("div", { className: sx(toolbarStyle$3), children: [jsxs("button", { type: "button", className: sx(showHideAllStyle), title: "Show/Hide all PNRs", onClick: toggleExpandAll, disabled: multiPnrIds.length === 0, "data-test": "agent-gtr-toggle-all", children: [allExpanded ? jsx(ChevronUpIcon, { size: 16 }) : jsx(ChevronDownIcon$1, { size: 16 }), jsx("span", { children: allExpanded ? 'Collapse all PNRs' : 'Expand all PNRs' })] }), jsxs("div", { className: sx(filtersStyle$6), children: [jsxs("label", { className: sx(filterFieldStyle$1), children: [jsx("span", { children: "Filter by sport" }), jsxs("select", { value: sportFilter, onChange: (event) => setSportFilter(event.target.value), "data-test": "agent-gtr-sport-filter", children: [jsx("option", { value: "", children: "All Sports" }), sports.map((sport) => (jsx("option", { value: sport.code, children: sport.label }, sport.code)))] })] }), views.length > 0 && (jsxs("label", { className: sx(filterFieldStyle$1), children: [jsx("span", { children: "Filter by view" }), jsxs("select", { value: viewFilter, onChange: (event) => setViewFilter(event.target.value), "data-test": "agent-gtr-view-filter", children: [jsx("option", { value: "", children: "All Accounts" }), views.map((view) => (jsx("option", { value: view.id, children: view.label }, view.id)))] })] }))] })] }), jsx("div", { className: sx(tableScrollStyle$2), children: jsxs("table", { className: sx(tableStyle$b), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: sx(colExpandStyle), children: jsx("span", { className: "sr-only", children: "Expand" }) }), jsx("th", { children: "Source" }), jsx("th", { children: "Master Trip" }), jsx("th", { children: "ID" }), jsx("th", { children: "Start Date" }), jsx("th", { children: "Name" }), jsx("th", { children: "Sport" }), jsxs("th", { children: [jsx(PlaneIcon$3, { size: 16 }), jsx("span", { className: "sr-only", children: "Carrier" })] }), jsx("th", { children: "Routing" }), jsx("th", { children: "Submitted" }), jsx("th", { children: "Type" }), jsx("th", { children: "Quote Sent" }), jsx("th", { children: "Confirmation" }), jsx("th", { children: "Deposit" }), jsx("th", { children: "Utilization" }), jsx("th", { children: "Names" }), jsx("th", { children: "Ticketing" }), jsx("th", { children: "PNR" }), jsx("th", { className: sx(colDeleteStyle), children: jsx("span", { className: "sr-only", children: "Delete" }) })] }) }), jsxs("tbody", { children: [!groups.length && (jsx("tr", { children: jsx("td", { colSpan: COLUMN_COUNT, className: sx(emptyStyle$i), "data-test": "agent-gtr-empty", children: "No open group travel requests match these filters." }) })), groups.map((group) => (jsxs(Fragment$1, { children: [jsx("tr", { className: sx(accountRowStyle), children: jsx("td", { colSpan: COLUMN_COUNT, children: group.accountName }) }), group.items.map((request) => {
|
|
10465
10465
|
const isMulti = request.pnrs.length > 1;
|
|
10466
10466
|
const isExpanded = expandedIds.has(request.id);
|
|
10467
10467
|
const startSoon = daysUntil(request.startDate, today) < 8;
|
|
10468
|
-
return (jsxs(Fragment$1, { children: [jsxs("tr", { className: sx(requestRowStyle), "data-test": "agent-gtr-row", children: [jsx("td", { className: sx(colExpandStyle), children: isMulti && (jsx("button", { type: "button", className: sx(expanderStyle$1), "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} PNRs for ${request.name}`, onClick: () => toggleExpanded(request.id), "data-test": "agent-gtr-expand-row", children: isExpanded ? jsx(ChevronDownIcon$1, { size: 16 }) : jsx(ChevronRightIcon$1, { size: 16 }) })) }), jsx("td", { children: request.source === 'client' ? 'C' : 'A' }), jsx("td", { children: request.masterTripId ? (jsx("button", { type: "button", className: sx(iconButtonStyle$1), "aria-label": `View master trip ${request.masterTripId}`, title: `View Master Trip ${request.masterTripId}`, onClick: () => onViewMasterTrip?.(request.masterTripId), children: jsx(SearchIcon$1, { size: 16 }) })) : (jsx("span", { className: sx(mutedStyle$
|
|
10469
|
-
})] }, `account-${group.accountName}`)))] })] }) }), jsx("p", { className: sx(legendStyle$
|
|
10468
|
+
return (jsxs(Fragment$1, { children: [jsxs("tr", { className: sx(requestRowStyle), "data-test": "agent-gtr-row", children: [jsx("td", { className: sx(colExpandStyle), children: isMulti && (jsx("button", { type: "button", className: sx(expanderStyle$1), "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} PNRs for ${request.name}`, onClick: () => toggleExpanded(request.id), "data-test": "agent-gtr-expand-row", children: isExpanded ? jsx(ChevronDownIcon$1, { size: 16 }) : jsx(ChevronRightIcon$1, { size: 16 }) })) }), jsx("td", { children: request.source === 'client' ? 'C' : 'A' }), jsx("td", { children: request.masterTripId ? (jsx("button", { type: "button", className: sx(iconButtonStyle$1), "aria-label": `View master trip ${request.masterTripId}`, title: `View Master Trip ${request.masterTripId}`, onClick: () => onViewMasterTrip?.(request.masterTripId), children: jsx(SearchIcon$1, { size: 16 }) })) : (jsx("span", { className: sx(mutedStyle$3), children: "\u2014" })) }), jsx("td", { children: jsx("button", { type: "button", className: cx(sx(idLinkStyle), request.notes && sx(hasNotesStyle)), title: request.notes || undefined, onClick: () => onOpenRequest?.(request.id), "data-test": "agent-gtr-open-request", children: request.id }) }), jsx("td", { className: cx(startSoon && sx(startSoonStyle)), children: formatShortDate$1(request.startDate) }), jsx("td", { children: truncate(request.name) }), jsx("td", { children: truncate(request.sport) }), jsx("td", { children: isMulti ? 'Multi' : request.carrier || '' }), jsx("td", { children: isMulti ? 'Multi' : request.routing }), jsx("td", { className: sx(colDateStyle), children: jsx(Datepicker, { "aria-label": `Submitted date for request ${request.id}`, size: "sm", value: dateEdits[request.id]?.submittedDate ?? request.submittedDate ?? '', onChange: (event) => handleSubmittedDateChange(request.id, event.target.value), "data-test": "agent-gtr-submitted-date" }) }), jsx("td", { children: computeTravelTypeCodes(request).join(', ') }), jsx("td", { className: sx(colDateStyle), children: jsx(Datepicker, { "aria-label": `Quote sent date for request ${request.id}`, size: "sm", value: dateEdits[request.id]?.quoteSentDate ?? request.quoteSentDate ?? '', onChange: (event) => handleQuoteSentDateChange(request.id, event.target.value), "data-test": "agent-gtr-quote-sent-date" }) }), DUE_FIELDS.map(({ field }) => (jsx("td", { children: jsx(DueStatusCell, { status: request[field], today: today, onToggle: onToggleDueStatus ? () => onToggleDueStatus(request.id, field) : undefined }) }, field))), jsx("td", { children: isMulti ? (jsx(PnrButton, { label: "Multi", tone: groupPnrTone(request.pnrs), onClick: () => toggleExpanded(request.id), dataTest: "agent-gtr-pnr-multi" })) : (jsx(PnrButton, { label: request.pnrs[0].recordLocator.toUpperCase(), tone: pnrTone(request.pnrs[0]), onClick: () => handleCopyPnr(request.pnrs[0].recordLocator), dataTest: "agent-gtr-pnr" })) }), jsx("td", { className: sx(colDeleteStyle), children: !isMulti && onDeleteRequest && (jsx("button", { type: "button", className: sx(deleteButtonStyle), "aria-label": `Delete request ${request.id}`, title: "Click to delete this trip", onClick: () => onDeleteRequest(request.id), "data-test": "agent-gtr-delete", children: jsx(TrashIcon$2, { size: 16 }) })) })] }), isMulti && isExpanded && (jsx("tr", { className: sx(subPnrRowStyle), children: jsx("td", { colSpan: COLUMN_COUNT, children: jsx("div", { className: sx(subPnrPanelStyle), "data-test": "agent-gtr-sub-pnrs", children: request.pnrs.map((pnr) => (jsx(PnrButton, { label: pnr.recordLocator.toUpperCase(), tone: pnrTone(pnr), onClick: () => handleCopyPnr(pnr.recordLocator), dataTest: "agent-gtr-sub-pnr" }, pnr.id))) }) }) }))] }, request.id));
|
|
10469
|
+
})] }, `account-${group.accountName}`)))] })] }) }), jsx("p", { className: sx(legendStyle$4), children: "Types: A - Airline C - Car, H - Hotel" })] }));
|
|
10470
10470
|
};
|
|
10471
10471
|
|
|
10472
10472
|
/**
|
|
@@ -10500,7 +10500,7 @@ const tableStyle$a = {
|
|
|
10500
10500
|
};
|
|
10501
10501
|
/* Header — navy brand ground with the side rail's foreground ink, matching the
|
|
10502
10502
|
widget card headers. */
|
|
10503
|
-
const headerStyle$
|
|
10503
|
+
const headerStyle$G = {
|
|
10504
10504
|
label: 'Table-headerStyle',
|
|
10505
10505
|
backgroundColor: 'var(--color-primary, #19345f)',
|
|
10506
10506
|
borderBottom: '1px solid var(--nav-rail-border, rgb(255 255 255 / 8%))',
|
|
@@ -10537,11 +10537,11 @@ const sortableStyle$1 = {
|
|
|
10537
10537
|
[`&:hover .${sx(sortIconStyle$2)}`]: { opacity: 1 },
|
|
10538
10538
|
};
|
|
10539
10539
|
/* Body */
|
|
10540
|
-
const bodyStyle$
|
|
10540
|
+
const bodyStyle$b = {
|
|
10541
10541
|
label: 'Table-bodyStyle',
|
|
10542
10542
|
backgroundColor: 'white',
|
|
10543
10543
|
};
|
|
10544
|
-
const rowStyle$
|
|
10544
|
+
const rowStyle$7 = {
|
|
10545
10545
|
label: 'Table-rowStyle',
|
|
10546
10546
|
borderBottom: '1px solid var(--color-neutral-100)',
|
|
10547
10547
|
'&:last-child': { borderBottom: 'none' },
|
|
@@ -10603,23 +10603,23 @@ const stripedStyle = {
|
|
|
10603
10603
|
* object they are emitted in this order every time rather than depending on
|
|
10604
10604
|
* which style was injected first.
|
|
10605
10605
|
*/
|
|
10606
|
-
[`& .${sx(rowStyle$
|
|
10606
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}`]: {
|
|
10607
10607
|
backgroundColor: 'var(--color-primary-light)',
|
|
10608
10608
|
},
|
|
10609
|
-
[`& .${sx(rowStyle$
|
|
10609
|
+
[`& .${sx(rowStyle$7)}:nth-child(even)`]: {
|
|
10610
10610
|
backgroundColor: 'var(--color-neutral-50)',
|
|
10611
10611
|
},
|
|
10612
10612
|
};
|
|
10613
10613
|
const hoverableStyle = {
|
|
10614
10614
|
label: 'Table-hoverableStyle',
|
|
10615
|
-
[`& .${sx(rowStyle$
|
|
10615
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}`]: {
|
|
10616
10616
|
backgroundColor: 'var(--color-primary-light)',
|
|
10617
10617
|
},
|
|
10618
|
-
[`& .${sx(rowStyle$
|
|
10618
|
+
[`& .${sx(rowStyle$7)}:hover`]: {
|
|
10619
10619
|
backgroundColor: 'var(--color-neutral-50)',
|
|
10620
10620
|
},
|
|
10621
10621
|
/* Outweighs both of the above, exactly as `.hoverable .row.selected:hover` did. */
|
|
10622
|
-
[`& .${sx(rowStyle$
|
|
10622
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}:hover`]: {
|
|
10623
10623
|
backgroundColor: 'var(--color-primary-light-hover)',
|
|
10624
10624
|
},
|
|
10625
10625
|
};
|
|
@@ -10741,11 +10741,11 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
10741
10741
|
commitSelection(Array.from(merged));
|
|
10742
10742
|
};
|
|
10743
10743
|
const messageColSpan = columns.length + (selectable ? 1 : 0);
|
|
10744
|
-
return (jsx("div", { className: cx(sx(wrapperStyle$1), className), children: jsxs("table", { className: cx(sx(tableStyle$a), bordered && sx(borderedStyle$1), striped && sx(stripedStyle), hoverable && sx(hoverableStyle), compact && sx(compactStyle$1)), children: [jsx("thead", { className: sx(headerStyle$
|
|
10744
|
+
return (jsx("div", { className: cx(sx(wrapperStyle$1), className), children: jsxs("table", { className: cx(sx(tableStyle$a), bordered && sx(borderedStyle$1), striped && sx(stripedStyle), hoverable && sx(hoverableStyle), compact && sx(compactStyle$1)), children: [jsx("thead", { className: sx(headerStyle$G), children: jsxs("tr", { children: [selectable && (jsx("th", { scope: "col", className: cx(sx(headerCellStyle), sx(selectCellStyle$1)), children: jsx(Checkbox, { size: "sm", "aria-label": selectAllLabel, checked: allSelected, indeterminate: someSelected, disabled: selectableRows.length === 0, onChange: toggleAll, "data-test": "table-select-all" }) })), columns.map((column) => (jsx("th", { className: cx(sx(headerCellStyle), column.sortable && sx(sortableStyle$1), sx(alignStyles[column.align || 'left'])), style: column.width ? { width: column.width } : undefined, onClick: () => handleSort(column), children: jsxs("span", { className: sx(headerContentStyle$2), children: [column.label, column.sortable && (jsx("span", { className: sx(sortIconStyle$2), children: sortColumn === column.key ? (sortDirection === 'asc' ? '↑' : '↓') : ('↕') }))] }) }, column.key)))] }) }), jsx("tbody", { className: sx(bodyStyle$b), children: loading ? (jsx("tr", { children: jsx("td", { colSpan: messageColSpan, className: sx(loadingStyle$5), children: "Loading..." }) })) : sortedData.length === 0 ? (jsx("tr", { children: jsx("td", { colSpan: messageColSpan, className: sx(emptyStyle$h), children: emptyContent ?? emptyMessage }) })) : (sortedData.map((row, rowIndex) => {
|
|
10745
10745
|
const key = getRowKey(row, rowIndex);
|
|
10746
10746
|
const rowSelectable = isRowSelectable ? isRowSelectable(row, rowIndex) : true;
|
|
10747
10747
|
const isSelected = selectable && selectionSet.has(key);
|
|
10748
|
-
return (jsxs("tr", { className: cx(sx(rowStyle$
|
|
10748
|
+
return (jsxs("tr", { className: cx(sx(rowStyle$7), onRowClick && sx(clickableStyle), isSelected && sx(selectedRowStyle), rowClassName?.(row, rowIndex)), "data-selected": selectable ? isSelected : undefined, onClick: () => onRowClick?.(row, rowIndex), children: [selectable && (jsx("td", { className: cx(sx(cellStyle$3), sx(selectCellStyle$1)), onClick: (event) => event.stopPropagation(), children: jsx(Checkbox, { size: "sm", "aria-label": rowSelectionLabel ? rowSelectionLabel(row, rowIndex) : `Select row ${key}`, checked: isSelected, disabled: !rowSelectable, onChange: () => toggleRow(key), "data-test": "table-select-row" }) })), columns.map((column) => (jsx("td", { className: cx(sx(cellStyle$3), sx(alignStyles[column.align || 'left'])), children: column.render
|
|
10749
10749
|
? column.render(row[column.key], row, rowIndex)
|
|
10750
10750
|
: row[column.key] }, column.key)))] }, key));
|
|
10751
10751
|
})) }), footer && jsx("tfoot", { children: footer })] }) }));
|
|
@@ -10757,7 +10757,7 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
10757
10757
|
* A bordered card: a header band with the title and Version control, then the
|
|
10758
10758
|
* invoice table with its total row and legend.
|
|
10759
10759
|
*/
|
|
10760
|
-
const cardStyle$
|
|
10760
|
+
const cardStyle$g = {
|
|
10761
10761
|
label: 'AirInvoiceCard-cardStyle',
|
|
10762
10762
|
overflow: 'hidden',
|
|
10763
10763
|
backgroundColor: 'var(--bg-surface, #fff)',
|
|
@@ -10770,7 +10770,7 @@ const cardStyle$f = {
|
|
|
10770
10770
|
lineHeight: '22px',
|
|
10771
10771
|
};
|
|
10772
10772
|
/* ---------- Card header ---------- */
|
|
10773
|
-
const headerStyle$
|
|
10773
|
+
const headerStyle$F = {
|
|
10774
10774
|
label: 'AirInvoiceCard-headerStyle',
|
|
10775
10775
|
boxSizing: 'border-box',
|
|
10776
10776
|
/* Fixed to the height of the Version control's row so the two cards' headers match. */
|
|
@@ -10901,7 +10901,7 @@ const totalCellStyle$1 = {
|
|
|
10901
10901
|
gap: '4px 24px',
|
|
10902
10902
|
};
|
|
10903
10903
|
/* The legend reads as a footnote: regular weight, small, muted — even inside the bold total row. */
|
|
10904
|
-
const legendStyle$
|
|
10904
|
+
const legendStyle$3 = {
|
|
10905
10905
|
label: 'AirInvoiceCard-legendStyle',
|
|
10906
10906
|
display: 'inline-flex',
|
|
10907
10907
|
alignItems: 'center',
|
|
@@ -10937,10 +10937,10 @@ const versionControlShown = (versions) => versions.length > 1;
|
|
|
10937
10937
|
*/
|
|
10938
10938
|
const AirInvoiceCard = ({ title, lines, paymentStatus, total, versions = [], selectedVersionId, onVersionChange, className = '', }) => {
|
|
10939
10939
|
const showLegend = lines.some((line) => line.knownTraveler);
|
|
10940
|
-
const legend = (jsxs("span", { className: sx(legendStyle$
|
|
10940
|
+
const legend = (jsxs("span", { className: sx(legendStyle$3), "data-test": "air-invoice-legend", children: [jsx("span", { className: sx(knownTravelerStyle), children: jsx(CheckIcon$1, { size: 16 }) }), "= Known Traveler Number Loaded"] }));
|
|
10941
10941
|
const hasHeader = Boolean(title || versionControlShown(versions));
|
|
10942
10942
|
const versionControl = versionControlShown(versions) && (jsx(Dropdown, { label: "Version", alignment: "right", trigger: ({ isOpen, toggle }) => (jsxs("button", { type: "button", className: sx(versionButtonStyle), onClick: toggle, "aria-expanded": isOpen, "aria-haspopup": "menu", "data-test": "air-invoice-version", children: [jsx(LayersIcon, {}), "Version", jsx("span", { className: sx(versionCountStyle), children: versions.length }), jsx(ChevronDownIcon$1, { size: 16 })] })), children: versions.map((version) => (jsx(Dropdown.Item, { icon: version.id === selectedVersionId ? jsx(CheckIcon$1, { size: 14 }) : undefined, onClick: () => onVersionChange?.(version.id), children: version.label }, version.id))) }));
|
|
10943
|
-
return (jsxs("section", { className: cx(sx(cardStyle$
|
|
10943
|
+
return (jsxs("section", { className: cx(sx(cardStyle$g), className), "aria-label": "Air invoice", "data-test": "air-invoice-card", children: [hasHeader && (jsxs("div", { className: sx(headerStyle$F), children: [title && jsx("h2", { className: sx(titleStyle$A), children: title }), jsx("div", { className: sx(headerEndStyle), children: versionControl })] })), jsx(Table, { className: sx(tableStyle$9), columns: columns, data: lines, hoverable: false, rowClassName: (line) => cx(line.isVoid && sx(voidRowStyle), line.struckThrough && sx(struckRowStyle)) || undefined, footer: total && (jsxs("tr", { children: [jsx("td", { colSpan: 6, children: jsxs("span", { className: sx(totalCellStyle$1), children: ["Total", showLegend && legend] }) }), jsx("td", { className: sx(upperStyle), children: paymentStatus }), jsx("td", { "data-test": "air-invoice-total", children: total })] })) }), showLegend && !total && (jsx("p", { className: sx(legendBlockStyle), children: legend }))] }));
|
|
10944
10944
|
};
|
|
10945
10945
|
AirInvoiceCard.displayName = 'AirInvoiceCard';
|
|
10946
10946
|
|
|
@@ -11091,7 +11091,7 @@ const labelStyle$5 = {
|
|
|
11091
11091
|
textOverflow: 'ellipsis',
|
|
11092
11092
|
};
|
|
11093
11093
|
/* Footer */
|
|
11094
|
-
const footerStyle$
|
|
11094
|
+
const footerStyle$e = {
|
|
11095
11095
|
label: 'Sidenav-footerStyle',
|
|
11096
11096
|
padding: 'var(--space-5) var(--space-6)',
|
|
11097
11097
|
marginTop: 'auto',
|
|
@@ -11122,7 +11122,7 @@ const collapsedStyle$1 = {
|
|
|
11122
11122
|
padding: 0,
|
|
11123
11123
|
justifyContent: 'center',
|
|
11124
11124
|
},
|
|
11125
|
-
[`& .${sx(footerStyle$
|
|
11125
|
+
[`& .${sx(footerStyle$e)}`]: {
|
|
11126
11126
|
padding: 'var(--space-5) var(--space-4)',
|
|
11127
11127
|
display: 'flex',
|
|
11128
11128
|
justifyContent: 'center',
|
|
@@ -11148,7 +11148,7 @@ const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultEx
|
|
|
11148
11148
|
const isActive = item.key === activeKey;
|
|
11149
11149
|
const itemClasses = cx(sx(navItemStyle$1), isActive && sx(activeNavItemStyle));
|
|
11150
11150
|
return (jsxs("button", { className: itemClasses, onClick: () => handleItemClick(item), "aria-current": isActive ? 'page' : undefined, title: !expanded ? item.label : undefined, children: [jsx("span", { className: sx(iconStyle$3), children: item.icon }), expanded && jsx("span", { className: sx(labelStyle$5), children: item.label })] }, item.key));
|
|
11151
|
-
}) }), footer && jsx("div", { className: sx(footerStyle$
|
|
11151
|
+
}) }), footer && jsx("div", { className: sx(footerStyle$e), children: footer })] }));
|
|
11152
11152
|
};
|
|
11153
11153
|
Sidenav.displayName = 'Sidenav';
|
|
11154
11154
|
|
|
@@ -11393,7 +11393,7 @@ const noResultsStyle = {
|
|
|
11393
11393
|
fontSize: 14,
|
|
11394
11394
|
};
|
|
11395
11395
|
/* Actions */
|
|
11396
|
-
const actionsStyle$
|
|
11396
|
+
const actionsStyle$9 = {
|
|
11397
11397
|
label: 'Topbar-actionsStyle',
|
|
11398
11398
|
display: 'flex',
|
|
11399
11399
|
gap: 'var(--space-2, 8px)',
|
|
@@ -11458,7 +11458,7 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
11458
11458
|
const filteredAccounts = accounts?.filter(acc => acc.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
11459
11459
|
acc.code.toLowerCase().includes(searchQuery.toLowerCase())) || [];
|
|
11460
11460
|
const hasDropdown = accounts && accounts.length > 0;
|
|
11461
|
-
return (jsxs("header", { className: classNames, ...props, children: [jsxs("div", { className: sx(leftStyle), children: [leftContent, account && (jsxs("div", { className: sx(accountWrapperStyle), ref: dropdownRef, children: [jsxs("button", { className: cx(sx(accountSelectorStyle), isOpen && sx(openStyle$1)), onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsx("span", { className: sx(accountCodeStyle), children: account.code }), jsx("span", { className: sx(accountNameStyle), children: account.name }), hasDropdown && (jsx(ChevronDownIcon$1, { size: 16, className: cx(sx(chevronStyle$2), isOpen && sx(chevronOpenStyle)) }))] }), isOpen && hasDropdown && (jsxs("div", { className: sx(dropdownStyle), role: "listbox", children: [jsxs("div", { className: sx(dropdownSearchStyle), children: [jsxs("svg", { className: sx(searchIconStyle$1), width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("circle", { cx: "11", cy: "11", r: "8" }), jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })] }), jsx("input", { ref: searchInputRef, type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search accounts...", className: sx(searchInputStyle$1) })] }), jsx("div", { className: sx(dropdownListStyle), children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxs("button", { className: cx(sx(dropdownItemStyle), acc.code === account.code && sx(selectedStyle$2)), onClick: () => handleSelectAccount(acc), role: "option", "aria-selected": acc.code === account.code, children: [jsx("span", { className: sx(dropdownItemCodeStyle), children: acc.code }), jsx("span", { className: sx(dropdownItemNameStyle), children: acc.name })] }, acc.code)))) : (jsx("div", { className: sx(noResultsStyle), children: "No accounts found" })) })] }))] }))] }), actions && jsx("div", { className: sx(actionsStyle$
|
|
11461
|
+
return (jsxs("header", { className: classNames, ...props, children: [jsxs("div", { className: sx(leftStyle), children: [leftContent, account && (jsxs("div", { className: sx(accountWrapperStyle), ref: dropdownRef, children: [jsxs("button", { className: cx(sx(accountSelectorStyle), isOpen && sx(openStyle$1)), onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsx("span", { className: sx(accountCodeStyle), children: account.code }), jsx("span", { className: sx(accountNameStyle), children: account.name }), hasDropdown && (jsx(ChevronDownIcon$1, { size: 16, className: cx(sx(chevronStyle$2), isOpen && sx(chevronOpenStyle)) }))] }), isOpen && hasDropdown && (jsxs("div", { className: sx(dropdownStyle), role: "listbox", children: [jsxs("div", { className: sx(dropdownSearchStyle), children: [jsxs("svg", { className: sx(searchIconStyle$1), width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsx("circle", { cx: "11", cy: "11", r: "8" }), jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })] }), jsx("input", { ref: searchInputRef, type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search accounts...", className: sx(searchInputStyle$1) })] }), jsx("div", { className: sx(dropdownListStyle), children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxs("button", { className: cx(sx(dropdownItemStyle), acc.code === account.code && sx(selectedStyle$2)), onClick: () => handleSelectAccount(acc), role: "option", "aria-selected": acc.code === account.code, children: [jsx("span", { className: sx(dropdownItemCodeStyle), children: acc.code }), jsx("span", { className: sx(dropdownItemNameStyle), children: acc.name })] }, acc.code)))) : (jsx("div", { className: sx(noResultsStyle), children: "No accounts found" })) })] }))] }))] }), actions && jsx("div", { className: sx(actionsStyle$9), children: actions })] }));
|
|
11462
11462
|
};
|
|
11463
11463
|
Topbar.displayName = 'Topbar';
|
|
11464
11464
|
|
|
@@ -11511,7 +11511,7 @@ const AppLayout = ({ navItems = [], activeNavKey, logo, collapsedLogo, account,
|
|
|
11511
11511
|
* Shares the AirInvoiceCard's shell — bordered card, header band with a small
|
|
11512
11512
|
* uppercase title — so the two read as a set when stacked on a page.
|
|
11513
11513
|
*/
|
|
11514
|
-
const cardStyle$
|
|
11514
|
+
const cardStyle$f = {
|
|
11515
11515
|
label: 'BookingDetailsCard-cardStyle',
|
|
11516
11516
|
overflow: 'hidden',
|
|
11517
11517
|
backgroundColor: 'var(--bg-surface, #fff)',
|
|
@@ -11523,7 +11523,7 @@ const cardStyle$e = {
|
|
|
11523
11523
|
fontSize: 15,
|
|
11524
11524
|
lineHeight: '22px',
|
|
11525
11525
|
};
|
|
11526
|
-
const headerStyle$
|
|
11526
|
+
const headerStyle$E = {
|
|
11527
11527
|
label: 'BookingDetailsCard-headerStyle',
|
|
11528
11528
|
boxSizing: 'border-box',
|
|
11529
11529
|
/* Fixed to the height of the Version control's row so the two cards' headers match. */
|
|
@@ -11574,7 +11574,7 @@ const detailsStyle$2 = {
|
|
|
11574
11574
|
},
|
|
11575
11575
|
};
|
|
11576
11576
|
/* A further section under the details, set off by a thin rule. */
|
|
11577
|
-
const sectionStyle$
|
|
11577
|
+
const sectionStyle$9 = {
|
|
11578
11578
|
label: 'BookingDetailsCard-sectionStyle',
|
|
11579
11579
|
padding: '16px 24px 20px',
|
|
11580
11580
|
};
|
|
@@ -11612,12 +11612,12 @@ const BookingDetailsCard = ({ details, title = 'Booking Details', refId, childre
|
|
|
11612
11612
|
if (details.length === 0 && !children)
|
|
11613
11613
|
return null;
|
|
11614
11614
|
const rows = Math.ceil(details.length / 2);
|
|
11615
|
-
return (jsxs("section", { className: cx(sx(cardStyle$
|
|
11615
|
+
return (jsxs("section", { className: cx(sx(cardStyle$f), className), "aria-label": "Booking details", "data-test": "booking-details-card", children: [jsxs("div", { className: sx(headerStyle$E), children: [jsx("h2", { className: sx(titleStyle$z), children: title }), refId && (jsxs("p", { className: sx(refStyle), "data-test": "booking-details-ref", children: ["Short\u2019s ID: ", jsx("span", { className: sx(refValueStyle), children: refId })] }))] }), details.length > 0 && (jsx("dl", { className: sx(detailsStyle$2), style: { gridTemplateRows: `repeat(${rows}, auto)` }, children: details.map((detail) => (jsxs("div", { className: sx(detailStyle$2), children: [jsx("dt", { className: sx(detailLabelStyle$1), children: detail.label }), jsx("dd", { className: sx(detailValueStyle$1), children: detail.value })] }, detail.label))) })), children && jsx("div", { className: cx(sx(sectionStyle$9), details.length > 0 && sx(sectionRuleStyle)), "data-test": "booking-details-section", children: children })] }));
|
|
11616
11616
|
};
|
|
11617
11617
|
BookingDetailsCard.displayName = 'BookingDetailsCard';
|
|
11618
11618
|
|
|
11619
11619
|
/* Card Component Styles */
|
|
11620
|
-
const cardStyle$
|
|
11620
|
+
const cardStyle$e = {
|
|
11621
11621
|
label: 'Card-cardStyle',
|
|
11622
11622
|
background: 'var(--bg-surface)',
|
|
11623
11623
|
borderRadius: 'var(--radius-2xl)',
|
|
@@ -11665,7 +11665,7 @@ const paddingStyles = {
|
|
|
11665
11665
|
},
|
|
11666
11666
|
};
|
|
11667
11667
|
/* Card Header */
|
|
11668
|
-
const headerStyle$
|
|
11668
|
+
const headerStyle$D = {
|
|
11669
11669
|
label: 'Card-headerStyle',
|
|
11670
11670
|
display: 'flex',
|
|
11671
11671
|
alignItems: 'flex-start',
|
|
@@ -11693,19 +11693,19 @@ const subtitleStyle$7 = {
|
|
|
11693
11693
|
fontSize: 'var(--fs-sm)',
|
|
11694
11694
|
color: 'var(--fg-3)',
|
|
11695
11695
|
};
|
|
11696
|
-
const actionsStyle$
|
|
11696
|
+
const actionsStyle$8 = {
|
|
11697
11697
|
label: 'Card-actionsStyle',
|
|
11698
11698
|
display: 'flex',
|
|
11699
11699
|
gap: 'var(--space-2)',
|
|
11700
11700
|
flexShrink: 0,
|
|
11701
11701
|
};
|
|
11702
11702
|
/* Card Body */
|
|
11703
|
-
const bodyStyle$
|
|
11703
|
+
const bodyStyle$a = {
|
|
11704
11704
|
label: 'Card-bodyStyle',
|
|
11705
11705
|
padding: 'var(--space-4)',
|
|
11706
11706
|
};
|
|
11707
11707
|
/* Card Footer */
|
|
11708
|
-
const footerStyle$
|
|
11708
|
+
const footerStyle$d = {
|
|
11709
11709
|
label: 'Card-footerStyle',
|
|
11710
11710
|
display: 'flex',
|
|
11711
11711
|
alignItems: 'center',
|
|
@@ -11728,7 +11728,7 @@ const footerStyle$b = {
|
|
|
11728
11728
|
* Card component for grouping related content.
|
|
11729
11729
|
*/
|
|
11730
11730
|
const Card = forwardRef(({ variant = 'default', padding = 'md', interactive = false, className = '', children, ...props }, ref) => {
|
|
11731
|
-
const classNames = cx(sx(cardStyle$
|
|
11731
|
+
const classNames = cx(sx(cardStyle$e), sx(variantStyles[variant]), sx(paddingStyles[padding]), interactive && sx(interactiveStyle), className);
|
|
11732
11732
|
return (jsx("div", { ref: ref, className: classNames, ...props, children: children }));
|
|
11733
11733
|
});
|
|
11734
11734
|
Card.displayName = 'Card';
|
|
@@ -11736,15 +11736,15 @@ Card.displayName = 'Card';
|
|
|
11736
11736
|
* Top of a Card: title, subtitle, and any header actions.
|
|
11737
11737
|
*/
|
|
11738
11738
|
const CardHeader = ({ title, subtitle, actions, className = '', children, ...props }) => {
|
|
11739
|
-
const classNames = cx(sx(headerStyle$
|
|
11740
|
-
return (jsxs("div", { className: classNames, ...props, children: [jsxs("div", { className: sx(headerContentStyle$1), children: [title && jsx("h3", { className: sx(titleStyle$y), children: title }), subtitle && jsx("p", { className: sx(subtitleStyle$7), children: subtitle }), children] }), actions && jsx("div", { className: sx(actionsStyle$
|
|
11739
|
+
const classNames = cx(sx(headerStyle$D), className);
|
|
11740
|
+
return (jsxs("div", { className: classNames, ...props, children: [jsxs("div", { className: sx(headerContentStyle$1), children: [title && jsx("h3", { className: sx(titleStyle$y), children: title }), subtitle && jsx("p", { className: sx(subtitleStyle$7), children: subtitle }), children] }), actions && jsx("div", { className: sx(actionsStyle$8), children: actions })] }));
|
|
11741
11741
|
};
|
|
11742
11742
|
CardHeader.displayName = 'CardHeader';
|
|
11743
11743
|
/**
|
|
11744
11744
|
* Main content region of a Card, carrying the card padding.
|
|
11745
11745
|
*/
|
|
11746
11746
|
const CardBody = ({ className = '', children, ...props }) => {
|
|
11747
|
-
const classNames = cx(sx(bodyStyle$
|
|
11747
|
+
const classNames = cx(sx(bodyStyle$a), className);
|
|
11748
11748
|
return (jsx("div", { className: classNames, ...props, children: children }));
|
|
11749
11749
|
};
|
|
11750
11750
|
CardBody.displayName = 'CardBody';
|
|
@@ -11752,7 +11752,7 @@ CardBody.displayName = 'CardBody';
|
|
|
11752
11752
|
* Bottom of a Card, for actions and summary detail.
|
|
11753
11753
|
*/
|
|
11754
11754
|
const CardFooter = ({ className = '', children, ...props }) => {
|
|
11755
|
-
const classNames = cx(sx(footerStyle$
|
|
11755
|
+
const classNames = cx(sx(footerStyle$d), className);
|
|
11756
11756
|
return (jsx("div", { className: classNames, ...props, children: children }));
|
|
11757
11757
|
};
|
|
11758
11758
|
CardFooter.displayName = 'CardFooter';
|
|
@@ -12440,7 +12440,7 @@ const alertStyle$4 = {
|
|
|
12440
12440
|
label: 'ContactList-alertStyle', width: '100%'
|
|
12441
12441
|
};
|
|
12442
12442
|
/* Card */
|
|
12443
|
-
const cardStyle$
|
|
12443
|
+
const cardStyle$d = {
|
|
12444
12444
|
label: 'ContactList-cardStyle',
|
|
12445
12445
|
backgroundColor: 'var(--color-white)',
|
|
12446
12446
|
border: '1px solid var(--color-gray-200)',
|
|
@@ -12448,7 +12448,7 @@ const cardStyle$c = {
|
|
|
12448
12448
|
overflow: 'hidden',
|
|
12449
12449
|
};
|
|
12450
12450
|
/* Header */
|
|
12451
|
-
const headerStyle$
|
|
12451
|
+
const headerStyle$C = {
|
|
12452
12452
|
label: 'ContactList-headerStyle',
|
|
12453
12453
|
padding: 'var(--space-4)',
|
|
12454
12454
|
borderBottom: '1px solid var(--color-gray-100)',
|
|
@@ -12609,7 +12609,7 @@ const emptyStyle$f = {
|
|
|
12609
12609
|
fontSize: 'var(--text-sm)',
|
|
12610
12610
|
};
|
|
12611
12611
|
/* Footer */
|
|
12612
|
-
const footerStyle$
|
|
12612
|
+
const footerStyle$c = {
|
|
12613
12613
|
label: 'ContactList-footerStyle',
|
|
12614
12614
|
padding: 'var(--space-3) var(--space-4)',
|
|
12615
12615
|
borderTop: '1px solid var(--color-gray-100)',
|
|
@@ -12645,7 +12645,7 @@ const PlusIcon$1 = () => (jsxs("svg", { width: "16", height: "16", viewBox: "0 0
|
|
|
12645
12645
|
*/
|
|
12646
12646
|
const ContactList = ({ title = 'Contacts', tooltip, contacts, onEdit, onRemove, onAdd, showAdd = true, addLabel = 'Add Contact', alert, className = '', }) => {
|
|
12647
12647
|
const listClasses = cx(sx(containerStyle$3), className);
|
|
12648
|
-
return (jsxs("div", { className: listClasses, children: [alert && (jsx("div", { className: sx(alertStyle$4), children: alert })), jsxs("div", { className: sx(cardStyle$
|
|
12648
|
+
return (jsxs("div", { className: listClasses, children: [alert && (jsx("div", { className: sx(alertStyle$4), children: alert })), jsxs("div", { className: sx(cardStyle$d), children: [jsx("div", { className: sx(headerStyle$C), children: jsxs("div", { className: sx(titleRowStyle$4), children: [jsx("h3", { className: sx(titleStyle$x), children: title }), tooltip && (jsx("span", { className: sx(tooltipStyle), children: jsx(InfoIcon, {}) }))] }) }), jsxs("div", { className: sx(listStyle$4), children: [contacts.map((contact) => (jsxs("div", { className: sx(contactItemStyle), children: [jsxs("div", { className: sx(contactInfoStyle), children: [jsxs("div", { className: sx(contactNameStyle$1), children: [contact.name, contact.isPrimary && (jsx("span", { className: sx(badgeStyle$2), children: "Primary" })), contact.isSecondary && (jsx("span", { className: cx(sx(badgeStyle$2), sx(badgeSecondaryStyle)), children: "Secondary" }))] }), contact.role && (jsx("div", { className: sx(contactRoleStyle$1), children: contact.role })), jsxs("div", { className: sx(contactDetailsStyle$1), children: [contact.email && (jsx("a", { href: `mailto:${contact.email}`, className: sx(contactLinkStyle$2), children: contact.email })), contact.phone && (jsx("span", { className: sx(contactPhoneStyle), children: contact.phone }))] })] }), jsxs("div", { className: sx(contactActionsStyle), children: [onEdit && (jsx("button", { type: "button", className: sx(actionButtonStyle$1), onClick: () => onEdit(contact), "aria-label": "Edit contact", children: jsx(EditIcon$1, {}) })), onRemove && (jsx("button", { type: "button", className: cx(sx(actionButtonStyle$1), sx(actionButtonDangerStyle)), onClick: () => onRemove(contact), "aria-label": "Remove contact", children: jsx(TrashIcon$1, {}) }))] })] }, contact.id))), contacts.length === 0 && (jsx("div", { className: sx(emptyStyle$f), children: "No contacts added" }))] }), showAdd && onAdd && (jsx("div", { className: sx(footerStyle$c), children: jsxs("button", { type: "button", className: sx(addButtonStyle$1), onClick: onAdd, children: [jsx(PlusIcon$1, {}), addLabel] }) }))] })] }));
|
|
12649
12649
|
};
|
|
12650
12650
|
ContactList.displayName = 'ContactList';
|
|
12651
12651
|
|
|
@@ -12771,7 +12771,7 @@ const sizeStyles$2 = {
|
|
|
12771
12771
|
top: blockSizeStyles,
|
|
12772
12772
|
bottom: blockSizeStyles,
|
|
12773
12773
|
};
|
|
12774
|
-
const headerStyle$
|
|
12774
|
+
const headerStyle$B = {
|
|
12775
12775
|
label: 'Drawer-headerStyle',
|
|
12776
12776
|
display: 'flex',
|
|
12777
12777
|
alignItems: 'center',
|
|
@@ -12813,13 +12813,13 @@ const closeButtonStyle$2 = {
|
|
|
12813
12813
|
outlineOffset: 2,
|
|
12814
12814
|
},
|
|
12815
12815
|
};
|
|
12816
|
-
const bodyStyle$
|
|
12816
|
+
const bodyStyle$9 = {
|
|
12817
12817
|
label: 'Drawer-bodyStyle',
|
|
12818
12818
|
flex: 1,
|
|
12819
12819
|
padding: 'var(--space-4)',
|
|
12820
12820
|
overflowY: 'auto',
|
|
12821
12821
|
};
|
|
12822
|
-
const footerStyle$
|
|
12822
|
+
const footerStyle$b = {
|
|
12823
12823
|
label: 'Drawer-footerStyle',
|
|
12824
12824
|
padding: 'var(--space-4)',
|
|
12825
12825
|
borderTop: '1px solid var(--color-neutral-200)',
|
|
@@ -12830,15 +12830,15 @@ const footerStyle$9 = {
|
|
|
12830
12830
|
/**
|
|
12831
12831
|
* Top of a Drawer: title and the close affordance.
|
|
12832
12832
|
*/
|
|
12833
|
-
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$
|
|
12833
|
+
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxs("div", { className: cx(sx(headerStyle$B), className), children: [jsxs("div", { className: sx(headerContentStyle), children: [title && jsx("h2", { className: sx(titleStyle$w), children: title }), children] }), showClose && (jsx("button", { type: "button", className: sx(closeButtonStyle$2), onClick: onClose, "aria-label": "Close drawer", children: jsx("svg", { width: "20", height: "20", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] }));
|
|
12834
12834
|
/**
|
|
12835
12835
|
* Scrollable content region of a Drawer.
|
|
12836
12836
|
*/
|
|
12837
|
-
const DrawerBody = ({ children, className = '' }) => (jsx("div", { className: cx(sx(bodyStyle$
|
|
12837
|
+
const DrawerBody = ({ children, className = '' }) => (jsx("div", { className: cx(sx(bodyStyle$9), className), children: children }));
|
|
12838
12838
|
/**
|
|
12839
12839
|
* Bottom of a Drawer, for actions that stay visible while the body scrolls.
|
|
12840
12840
|
*/
|
|
12841
|
-
const DrawerFooter = ({ children, className = '' }) => (jsx("div", { className: cx(sx(footerStyle$
|
|
12841
|
+
const DrawerFooter = ({ children, className = '' }) => (jsx("div", { className: cx(sx(footerStyle$b), className), children: children }));
|
|
12842
12842
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), ' +
|
|
12843
12843
|
'textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
12844
12844
|
/**
|
|
@@ -12996,7 +12996,7 @@ const openStyle = {
|
|
|
12996
12996
|
},
|
|
12997
12997
|
},
|
|
12998
12998
|
};
|
|
12999
|
-
const bodyStyle$
|
|
12999
|
+
const bodyStyle$8 = {
|
|
13000
13000
|
label: 'DueDatesDrawer-bodyStyle',
|
|
13001
13001
|
minHeight: 0,
|
|
13002
13002
|
flex: 1,
|
|
@@ -13044,7 +13044,7 @@ const emptyStyle$e = {
|
|
|
13044
13044
|
padding: '16px 8px 0',
|
|
13045
13045
|
color: 'var(--color-stone, #787878)',
|
|
13046
13046
|
};
|
|
13047
|
-
const cardStyle$
|
|
13047
|
+
const cardStyle$c = {
|
|
13048
13048
|
label: 'DueDatesDrawer-cardStyle',
|
|
13049
13049
|
display: 'flex',
|
|
13050
13050
|
flexDirection: 'column',
|
|
@@ -13168,7 +13168,7 @@ const DueDateCard$1 = ({ item, onToggle, onTaskClick }) => {
|
|
|
13168
13168
|
const completed = isTravelDueDateCompleted(item);
|
|
13169
13169
|
const dueDate = parseLocalDate$1(item.duedate);
|
|
13170
13170
|
const pastDue = !!dueDate && dueDate < new Date() && !completed;
|
|
13171
|
-
return (jsxs("article", { className: sx(cardStyle$
|
|
13171
|
+
return (jsxs("article", { className: sx(cardStyle$c), children: [jsxs("div", { className: sx(cardTitleStyle$3), children: [onToggle ? (jsx("button", { type: "button", "aria-label": `${completed ? 'Reopen' : 'Complete'} ${item.tasktitle}`, className: cx(sx(statusStyle$5), completed ? sx(completedStyle) : pastDue ? sx(pastDueStyle) : ''), onClick: () => onToggle(item), "data-test": `due-date-toggle-${item.taskid}`, children: completed ? jsx(CheckIcon$1, { size: 12 }) : null })) : (jsx("span", { "aria-label": `${completed ? 'Completed' : pastDue ? 'Past due' : 'Incomplete'}: ${item.tasktitle}`, className: cx(sx(statusStyle$5), sx(readOnlyStatusStyle), completed ? sx(completedStyle) : pastDue ? sx(pastDueStyle) : ''), "data-test": `due-date-status-${item.taskid}`, children: completed ? jsx(CheckIcon$1, { size: 12 }) : null })), jsx("h5", { children: item.tasktitle })] }), item.description && jsx("p", { children: item.description }), jsxs("div", { className: sx(tagsStyle), children: [jsx("span", { style: { backgroundColor: sportColor$1(item.sportCode) }, children: item.sportCode }), jsx("button", { type: "button", disabled: !item.masterTripGUID || !onTaskClick, onClick: () => item.masterTripGUID && onTaskClick?.(item.masterTripGUID), children: item.tripName })] }), completed && item.completeddatetime && jsxs("div", { className: sx(completionStyle), children: [jsx(CheckIcon$1, { size: 14 }), jsxs("span", { children: [jsx("em", { children: "on" }), " ", formatDate$8(item.completeddatetime, { month: 'numeric', day: 'numeric', year: '2-digit' }), " ", jsx("em", { children: "by" }), " ", item.completedby] })] })] }));
|
|
13172
13172
|
};
|
|
13173
13173
|
/** Hub's searchable, status-aware due-dates drawer. */
|
|
13174
13174
|
const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, overdueOnly, onClose, onToggle, onTaskClick, className = '' }) => {
|
|
@@ -13180,7 +13180,7 @@ const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, overdueO
|
|
|
13180
13180
|
const matches = items.filter((item) => (!selectedTrip || item.masterTripGUID === String(selectedTrip)) && (!overdueOnly || isTravelDueDateOverdue(item)) && (!normalized || item.tasktitle.toLowerCase().includes(normalized) || item.sportCode.toLowerCase().includes(normalized) || item.description.toLowerCase().includes(normalized)));
|
|
13181
13181
|
return matches.length ? [[date, matches]] : [];
|
|
13182
13182
|
})), [dueDates, search, selectedDate, selectedTrip, overdueOnly]);
|
|
13183
|
-
return (jsxs("aside", { className: cx(sx(drawerStyle), isOpen && sx(openStyle), className), "aria-hidden": !isOpen, "aria-label": "Due Dates", children: [jsxs("header", { children: [jsx("h3", { children: "Due Dates" }), jsx("button", { type: "button", "aria-label": "Close due dates", onClick: onClose, children: jsx(CloseIcon, { size: 24 }) })] }), jsxs("div", { className: sx(bodyStyle$
|
|
13183
|
+
return (jsxs("aside", { className: cx(sx(drawerStyle), isOpen && sx(openStyle), className), "aria-hidden": !isOpen, "aria-label": "Due Dates", children: [jsxs("header", { children: [jsx("h3", { children: "Due Dates" }), jsx("button", { type: "button", "aria-label": "Close due dates", onClick: onClose, children: jsx(CloseIcon, { size: 24 }) })] }), jsxs("div", { className: sx(bodyStyle$8), children: [jsxs("label", { className: sx(searchStyle$1), children: [jsx(SearchIcon$1, { size: 16 }), jsx("input", { type: "search", placeholder: "Search", value: search, onChange: (event) => setSearch(event.target.value) })] }), !Object.keys(filtered).length ? jsx("div", { className: sx(emptyStyle$e), children: "No due dates found." }) : Object.entries(filtered).map(([date, items]) => (jsxs("section", { children: [jsx("h4", { children: formatDate$8(date, { month: 'long', day: 'numeric', year: 'numeric' }) }), jsx("div", { className: sx(cardsStyle$2), children: items.map((item) => jsx(DueDateCard$1, { item: item, onToggle: onToggle, onTaskClick: onTaskClick }, `${date}-${item.taskid}`)) })] }, date)))] })] }));
|
|
13184
13184
|
};
|
|
13185
13185
|
|
|
13186
13186
|
/**
|
|
@@ -13192,7 +13192,7 @@ const panelStyle$5 = {
|
|
|
13192
13192
|
label: 'Flyout-panelStyle',
|
|
13193
13193
|
background: 'var(--color-white)',
|
|
13194
13194
|
};
|
|
13195
|
-
const headerStyle$
|
|
13195
|
+
const headerStyle$A = {
|
|
13196
13196
|
label: 'Flyout-headerStyle',
|
|
13197
13197
|
'&&': { padding: 'var(--space-5) var(--space-6)' },
|
|
13198
13198
|
};
|
|
@@ -13210,7 +13210,7 @@ const titleStyle$v = {
|
|
|
13210
13210
|
fontWeight: 'var(--font-weight-bold)',
|
|
13211
13211
|
color: 'var(--color-ink)',
|
|
13212
13212
|
};
|
|
13213
|
-
const bodyStyle$
|
|
13213
|
+
const bodyStyle$7 = {
|
|
13214
13214
|
label: 'Flyout-bodyStyle',
|
|
13215
13215
|
'&&': { padding: 'var(--space-6)' },
|
|
13216
13216
|
};
|
|
@@ -13228,7 +13228,7 @@ const Flyout = ({ isOpen, onClose, title, icon, children, footer, width = 'min(4
|
|
|
13228
13228
|
const titleId = useId();
|
|
13229
13229
|
if (!isOpen || typeof document === 'undefined')
|
|
13230
13230
|
return null;
|
|
13231
|
-
return createPortal(jsxs(Drawer, { "aria-labelledby": titleId, className: sx(panelStyle$5), isOpen: isOpen, onClose: onClose, position: "right", size: width, children: [jsx(DrawerHeader, { className: sx(headerStyle$
|
|
13231
|
+
return createPortal(jsxs(Drawer, { "aria-labelledby": titleId, className: sx(panelStyle$5), isOpen: isOpen, onClose: onClose, position: "right", size: width, children: [jsx(DrawerHeader, { className: sx(headerStyle$A), children: jsxs("div", { className: sx(titleRowStyle$3), children: [icon, jsx("h2", { className: sx(titleStyle$v), id: titleId, children: title })] }) }), jsx(DrawerBody, { className: sx(bodyStyle$7), children: children }), footer && jsx(DrawerFooter, { children: footer })] }), document.body);
|
|
13232
13232
|
};
|
|
13233
13233
|
|
|
13234
13234
|
/**
|
|
@@ -13240,7 +13240,7 @@ const Flyout = ({ isOpen, onClose, title, icon, children, footer, width = 'min(4
|
|
|
13240
13240
|
* No specificity work was needed — the media query is the only override, and
|
|
13241
13241
|
* an at-rule always outranks the base declaration it sits beside.
|
|
13242
13242
|
*/
|
|
13243
|
-
const headerStyle$
|
|
13243
|
+
const headerStyle$z = {
|
|
13244
13244
|
label: 'GridHeaderRow-headerStyle',
|
|
13245
13245
|
display: 'none',
|
|
13246
13246
|
width: '100%',
|
|
@@ -13287,7 +13287,7 @@ const headingStyle$3 = {
|
|
|
13287
13287
|
* carrying its own labels, so a detached heading strip would caption nothing.
|
|
13288
13288
|
*/
|
|
13289
13289
|
function GridHeaderRow({ columns, gridTemplateColumns, above, below, className = '', style, }) {
|
|
13290
|
-
return (jsxs("div", { className: cx(sx(headerStyle$
|
|
13290
|
+
return (jsxs("div", { className: cx(sx(headerStyle$z), className), style: style, "data-testid": "grid-header-row", children: [above, jsx("div", { className: sx(gridStyle$8), style: { gridTemplateColumns }, role: "row", children: columns.map((column, i) => (jsxs("div", { role: "columnheader", className: cx(sx(headingStyle$3), column.labelClassName), children: [column.icon, column.label, column.labelAs?.({ name: column.name })] }, column.name ?? i))) }), below] }));
|
|
13291
13291
|
}
|
|
13292
13292
|
GridHeaderRow.displayName = 'GridHeaderRow';
|
|
13293
13293
|
|
|
@@ -13341,7 +13341,7 @@ const bannerStyle$2 = {
|
|
|
13341
13341
|
* The heading row only makes sense while the grid is a grid. Below 768px each
|
|
13342
13342
|
* row becomes a card and every cell carries its own label instead.
|
|
13343
13343
|
*/
|
|
13344
|
-
const headerStyle$
|
|
13344
|
+
const headerStyle$y = {
|
|
13345
13345
|
label: 'GridTable-headerStyle',
|
|
13346
13346
|
display: 'none',
|
|
13347
13347
|
width: '100%',
|
|
@@ -13391,7 +13391,7 @@ const sortIconStyle$1 = {
|
|
|
13391
13391
|
flexShrink: 0,
|
|
13392
13392
|
display: 'inline-flex',
|
|
13393
13393
|
};
|
|
13394
|
-
const bodyStyle$
|
|
13394
|
+
const bodyStyle$6 = {
|
|
13395
13395
|
label: 'GridTable-bodyStyle',
|
|
13396
13396
|
display: 'flex',
|
|
13397
13397
|
flexDirection: 'column',
|
|
@@ -13400,7 +13400,7 @@ const bodyStyle$5 = {
|
|
|
13400
13400
|
gap: 0,
|
|
13401
13401
|
},
|
|
13402
13402
|
};
|
|
13403
|
-
const rowStyle$
|
|
13403
|
+
const rowStyle$6 = {
|
|
13404
13404
|
label: 'GridTable-rowStyle',
|
|
13405
13405
|
padding: 8,
|
|
13406
13406
|
fontSize: 14,
|
|
@@ -13605,7 +13605,7 @@ const totalValueStyle = {
|
|
|
13605
13605
|
* `.footer .totalCell:first-child` is written against the generated class, so
|
|
13606
13606
|
* it keeps its (0,3,0) rank over the plain `.totalCell` rule without doubling.
|
|
13607
13607
|
*/
|
|
13608
|
-
const footerStyle$
|
|
13608
|
+
const footerStyle$a = {
|
|
13609
13609
|
label: 'GridTable-footerStyle',
|
|
13610
13610
|
display: 'none',
|
|
13611
13611
|
width: '100%',
|
|
@@ -13957,7 +13957,7 @@ function GridTable({ columns, data, gridTemplateColumns = `repeat(${columns.leng
|
|
|
13957
13957
|
// membership rather than truthiness so a legitimate empty-string key still
|
|
13958
13958
|
// counts as a match.
|
|
13959
13959
|
const markerBeforeMatches = rowMarker?.beforeKey != null && allKeys.includes(rowMarker.beforeKey);
|
|
13960
|
-
return (jsxs("div", { className: cx(sx(tableStyle$8), sharedColumns ? sx(sharedRootStyle) : '', className), style: rootStyle, children: [banner && jsx("div", { className: cx(sx(bannerStyle$2), span), children: banner }), !hideHeader && (jsxs("div", { className: cx(sx(headerStyle$
|
|
13960
|
+
return (jsxs("div", { className: cx(sx(tableStyle$8), sharedColumns ? sx(sharedRootStyle) : '', className), style: rootStyle, children: [banner && jsx("div", { className: cx(sx(bannerStyle$2), span), children: banner }), !hideHeader && (jsxs("div", { className: cx(sx(headerStyle$y), subgrid), children: [sharedColumns && header.above != null ? jsx("div", { className: span, children: header.above }) : header.above, jsxs("div", { className: cx(sx(gridStyle$7), subgrid), style: trackStyle, children: [expandable && jsx("div", { className: sx(headingStyle$2), "aria-hidden": "true" }), columns.map((column, i) => (jsx(React.Fragment, { children: heading(column, { interactive: true }) }, i)))] }), sharedColumns && header.below != null ? jsx("div", { className: span, children: header.below }) : header.below] })), !sorted.length && !draftRow ? (jsx("div", { className: cx(sx(emptyStyle$d), span), children: emptyMessage })) : (jsxs("div", { className: cx(sx(bodyStyle$6), subgrid), children: [draftRow && jsx("div", { className: cx(sx(draftRowStyle), span), children: draftRow }), sorted.map((row, rowIndex) => {
|
|
13961
13961
|
const record = row;
|
|
13962
13962
|
const key = allKeys[rowIndex];
|
|
13963
13963
|
// Only an expandable table exposes expansion; without it, a lingering
|
|
@@ -13965,12 +13965,12 @@ function GridTable({ columns, data, gridTemplateColumns = `repeat(${columns.leng
|
|
|
13965
13965
|
// after expandable was turned off) must not leak `expanded: true` to
|
|
13966
13966
|
// renderers that have no toggle to collapse it.
|
|
13967
13967
|
const expanded = expandable && expandedKeys.has(key);
|
|
13968
|
-
return (jsxs(React.Fragment, { children: [marker && rowMarker?.beforeKey === key && marker, editRow?.key === key ? (jsx("div", { className: cx(sx(editRowStyle), bordered ? sx(borderedStyle) : '', span), "data-rowid": key, "data-testid": `row-${key}`, "data-editing": "true", children: editRow.content })) : (jsxs("div", { className: cx(sx(rowStyle$
|
|
13968
|
+
return (jsxs(React.Fragment, { children: [marker && rowMarker?.beforeKey === key && marker, editRow?.key === key ? (jsx("div", { className: cx(sx(editRowStyle), bordered ? sx(borderedStyle) : '', span), "data-rowid": key, "data-testid": `row-${key}`, "data-editing": "true", children: editRow.content })) : (jsxs("div", { className: cx(sx(rowStyle$6), bordered ? sx(borderedStyle) : '', rowPainted ? sx(rowPaintedStyle) : '', flashRowKey === key ? sx(rowPainted ? flashRowPaintedStyle : flashRowStyle) : '', subgrid), style: trackStyle, "data-rowid": key, "data-testid": `row-${key}`, "data-flash": flashRowKey === key ? 'true' : undefined, children: [expandable && (jsx("div", { className: sx(expandCellStyle), children: jsx("button", { type: "button", className: sx(expandButtonStyle$1), onClick: () => toggleRow(key), "aria-expanded": expanded, "aria-label": `${expanded ? 'Collapse' : 'Expand'} ${typeof expandLabel === 'function' ? expandLabel(row, rowIndex) : expandLabel}`, children: expanded ? jsx(ChevronDown, {}) : jsx(ChevronRight$3, {}) }) })), columns.map((column, colIndex) => {
|
|
13969
13969
|
const value = column.name ? record[column.name] : undefined;
|
|
13970
13970
|
const formatted = column.format ? column.format(value, row) : value;
|
|
13971
13971
|
return (jsxs("div", { className: cx(sx(cellWrapStyle), rowPainted ? sx(cellClearStyle) : ''), ...(column.name ? { 'data-colname': column.name } : {}), children: [column.label && jsx("div", { className: sx(stackedLabelStyle), children: heading(column, { interactive: false }) }), jsx("div", { className: cx(sx(cellStyle$2), alignTop ? sx(cellTopStyle) : '', column.className ?? ''), children: column.as ? (column.as({ row, rowIndex, name: column.name, expanded })) : column.name ? (jsx("span", { className: sx(valueStyle$2), children: formatted || jsx(Fragment, { children: "\u2013" }) })) : null })] }, colIndex));
|
|
13972
13972
|
})] }, key))] }, key));
|
|
13973
|
-
}), marker && rowMarker?.atEnd && !markerBeforeMatches && sorted.length > 0 && marker] })), totalRow && (jsx("div", { className: cx(sx(footerStyle$
|
|
13973
|
+
}), marker && rowMarker?.atEnd && !markerBeforeMatches && sorted.length > 0 && marker] })), totalRow && (jsx("div", { className: cx(sx(footerStyle$a), subgrid), children: jsxs("div", { className: cx(sx(gridStyle$7), subgrid), style: trackStyle, children: [expandable && jsx("div", { className: sx(totalCellStyle), "aria-hidden": "true" }), columns.map((_, i) => (jsx("div", { className: i === totalIndex ? sx(totalValueStyle) : sx(totalCellStyle), children: i === 0 ? totalRow.label : i === totalIndex ? total.toLocaleString() : null }, i)))] }) }))] }));
|
|
13974
13974
|
}
|
|
13975
13975
|
GridTable.displayName = 'GridTable';
|
|
13976
13976
|
|
|
@@ -14756,6 +14756,990 @@ const HubAppShell = ({ children, navItems, individualTravelItem, agentsItem, sou
|
|
|
14756
14756
|
return (jsxs("div", { className: cx(sx(shellStyle), expanded && sx(shellExpandedStyle), className), children: [loading && jsx("div", { className: sx(loadingStyle$4), role: "status", "aria-label": "Loading", "data-testid": "loading-overlay", children: jsx("span", {}) }), bannerLabel && jsx("div", { className: sx(qaBannerStyle), children: bannerLabel }), jsxs("aside", { className: sx(sidebarStyle$3), "data-expanded": expanded, children: [jsx("button", { type: "button", className: sx(expandButtonStyle), "aria-label": expanded ? 'Collapse sidebar' : 'Expand sidebar', onClick: () => setExpanded((value) => !value), children: expanded ? jsx(ChevronLeftIcon, { size: 14 }) : jsx(ChevronRightIcon$1, { size: 14 }) }), jsx("button", { type: "button", className: sx(logoStyle), "aria-label": "Go to Home", onClick: onLogoClick, children: logo ? (expanded ? logo : (collapsedLogo ?? logo)) : jsx(DefaultLogo, { expanded: expanded }) }), jsxs("nav", { className: sx(desktopNavStyle), "aria-label": "Hub navigation", children: [homeNavItem && jsx("div", { className: navigationDisabled ? sx(disabledNavStyle) : '', children: renderNavItem(homeNavItem) }), onLegacyPortal && jsxs("button", { type: "button", className: sx(navItemStyle), "aria-label": "Old Portal", title: "Old Portal", onClick: onLegacyPortal, "data-test": "hub-nav-legacy-portal", children: [jsx("span", { className: sx(navIconStyle), children: jsx(ArrowUpRightIcon, { size: 24 }) }), expanded && jsx("span", { children: "Old Portal" })] }), resolvedIndividualTravelItem && renderNavItem(resolvedIndividualTravelItem), jsx("div", { className: navigationDisabled ? sx(disabledNavStyle) : '', children: primaryNavItems.map((item) => renderNavItem(item)) })] }), jsxs("div", { className: sx(sidebarFooterStyle), children: [resolvedFooterNavItems.map((item) => renderNavItem(item)), jsxs("div", { className: sx(profileStyle), ref: profileRef, children: [jsxs("button", { type: "button", className: sx(avatarStyle$1), "aria-label": "User Information", onClick: () => setIsProfileOpen(!isProfileOpen), children: [jsx(Avatar, { initials: userInitials, size: expanded ? 28 : 'md' }), expanded && userName && jsx("span", { className: sx(userNameStyle), children: userName })] }), isProfileOpen && (renderProfileMenu || profileMenu) && (jsx("div", { className: sx(profileMenuStyle), children: renderProfileMenu ? renderProfileMenu(() => setIsProfileOpen(false)) : profileMenu }))] })] })] }), jsxs("div", { className: sx(mainStyle$4), children: [jsxs("header", { className: sx(topbarStyle), children: [jsx("div", { children: accountSelector ?? jsx(DefaultAccount, {}) }), renderTopbarActions ? renderTopbarActions(actions) : jsx(DefaultNavigationToggle, { ...actions })] }), isMobileNavOpen && jsxs("div", { className: sx(mobileNavStyle), children: [jsx("nav", { "aria-label": "Mobile Hub navigation", children: mobileNavItems.map((item) => renderNavItem(item, true)) }), (mobileExtras || onLegacyPortal) && jsxs("div", { className: sx(mobileExtrasStyle), role: "group", "aria-label": "Mobile navigation actions", children: [mobileExtras, onLegacyPortal && jsxs("button", { type: "button", className: sx(mobilePrimaryStyle), onClick: () => { onLegacyPortal(); closeMobileNav(); }, "data-test": "hub-mobile-legacy-portal", children: [jsx(ArrowUpRightIcon, { size: 20 }), jsx("span", { children: "Legacy Portal" })] })] }), mobileFooter && jsx("div", { className: sx(mobileFooterStyle), children: mobileFooter })] }), showContent && jsx("main", { className: cx(sx(contentStyle$6), contentDisabled && sx(contentDisabledStyle)), children: children })] })] }));
|
|
14757
14757
|
};
|
|
14758
14758
|
|
|
14759
|
+
/**
|
|
14760
|
+
* The Operations Response Center's domain: Incidents, the four Divisions
|
|
14761
|
+
* that act on them, their trip types, and the Routes that carry an Incident
|
|
14762
|
+
* to each Division. Shared by the intake form, the incident card, the resolve
|
|
14763
|
+
* dialog, the archive table and the page, so every surface uses the same words.
|
|
14764
|
+
*/
|
|
14765
|
+
/** The four Divisions in display order, each with its trip types. */
|
|
14766
|
+
const DIVISIONS = [
|
|
14767
|
+
{ value: 'agency', label: 'Agency', tripTypes: ['air', 'hotel', 'car', 'limo'] },
|
|
14768
|
+
{ value: 'charters', label: 'Charters', tripTypes: ['charter'] },
|
|
14769
|
+
{ value: 'stay', label: 'Stay', tripTypes: ['group-hotel'] },
|
|
14770
|
+
{ value: 'driven', label: 'Driven', tripTypes: ['bus'] },
|
|
14771
|
+
];
|
|
14772
|
+
/** Division key → display name. */
|
|
14773
|
+
const DIVISION_LABELS = {
|
|
14774
|
+
agency: 'Agency',
|
|
14775
|
+
charters: 'Charters',
|
|
14776
|
+
stay: 'Stay',
|
|
14777
|
+
driven: 'Driven',
|
|
14778
|
+
};
|
|
14779
|
+
/** Trip type → display name. */
|
|
14780
|
+
const TRIP_TYPE_LABELS = {
|
|
14781
|
+
air: 'Air',
|
|
14782
|
+
hotel: 'Hotel',
|
|
14783
|
+
car: 'Car',
|
|
14784
|
+
limo: 'Limo',
|
|
14785
|
+
charter: 'Charter',
|
|
14786
|
+
'group-hotel': 'Group hotel',
|
|
14787
|
+
bus: 'Bus',
|
|
14788
|
+
};
|
|
14789
|
+
/** Trip types in display order: Division order, then each Division's own order. */
|
|
14790
|
+
const TRIP_TYPES = DIVISIONS.flatMap((division) => division.tripTypes);
|
|
14791
|
+
/** The Division a trip type belongs to. */
|
|
14792
|
+
const tripTypeDivision = (tripType) => DIVISIONS.find((division) => division.tripTypes.includes(tripType)).value;
|
|
14793
|
+
/** Sorts trip types into display order, dropping duplicates. */
|
|
14794
|
+
const sortTripTypes = (tripTypes) => TRIP_TYPES.filter((tripType) => tripTypes.includes(tripType));
|
|
14795
|
+
/** Route status → display text. */
|
|
14796
|
+
const ROUTE_STATUS_LABELS = {
|
|
14797
|
+
'not-acknowledged': 'Not acknowledged',
|
|
14798
|
+
acknowledged: 'Acknowledged',
|
|
14799
|
+
complete: 'Complete',
|
|
14800
|
+
};
|
|
14801
|
+
/** Resolution → display text. */
|
|
14802
|
+
const RESOLUTION_LABELS = {
|
|
14803
|
+
resolved: 'Resolved',
|
|
14804
|
+
'logged-in-error': 'Logged in error',
|
|
14805
|
+
};
|
|
14806
|
+
/** Priority → display text. */
|
|
14807
|
+
const PRIORITY_LABELS = {
|
|
14808
|
+
routine: 'Routine',
|
|
14809
|
+
};
|
|
14810
|
+
/** Central time — STM's operations clock — unless a caller says otherwise. */
|
|
14811
|
+
const DEFAULT_INCIDENT_TIME_ZONE = 'America/Chicago';
|
|
14812
|
+
/** "12m", "1h 05m", "2d 3h" since `from`, measured at `now`; "Just now" under a minute. */
|
|
14813
|
+
const formatElapsed = (from, now) => {
|
|
14814
|
+
const minutes = Math.max(0, Math.floor((Date.parse(now) - Date.parse(from)) / 60000));
|
|
14815
|
+
if (minutes < 1)
|
|
14816
|
+
return 'Just now';
|
|
14817
|
+
if (minutes < 60)
|
|
14818
|
+
return `${minutes}m`;
|
|
14819
|
+
const hours = Math.floor(minutes / 60);
|
|
14820
|
+
if (hours < 24)
|
|
14821
|
+
return `${hours}h ${String(minutes % 60).padStart(2, '0')}m`;
|
|
14822
|
+
return `${Math.floor(hours / 24)}d ${hours % 24}h`;
|
|
14823
|
+
};
|
|
14824
|
+
/** "10:42 PM" in the given time zone. */
|
|
14825
|
+
const formatClockTime = (iso, timeZone = DEFAULT_INCIDENT_TIME_ZONE) => new Intl.DateTimeFormat('en-US', { hour: 'numeric', minute: '2-digit', timeZone }).format(new Date(iso));
|
|
14826
|
+
/** "Oct 14, 2026" in the given time zone. */
|
|
14827
|
+
const formatIncidentDate = (iso, timeZone = DEFAULT_INCIDENT_TIME_ZONE) => new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone }).format(new Date(iso));
|
|
14828
|
+
/** "2026-10-14" in the given time zone — the shape a date filter compares against. */
|
|
14829
|
+
const toIncidentDateKey = (iso, timeZone = DEFAULT_INCIDENT_TIME_ZONE) => new Intl.DateTimeFormat('en-CA', { year: 'numeric', month: '2-digit', day: '2-digit', timeZone }).format(new Date(iso));
|
|
14830
|
+
|
|
14831
|
+
/** IncidentArchiveTable's compiled rules. */
|
|
14832
|
+
const rootStyle = {
|
|
14833
|
+
label: 'IncidentArchiveTable-rootStyle',
|
|
14834
|
+
display: 'flex',
|
|
14835
|
+
flexDirection: 'column',
|
|
14836
|
+
gap: 'var(--space-4)',
|
|
14837
|
+
minWidth: 0,
|
|
14838
|
+
};
|
|
14839
|
+
const filtersStyle$5 = {
|
|
14840
|
+
label: 'IncidentArchiveTable-filtersStyle',
|
|
14841
|
+
display: 'grid',
|
|
14842
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(11rem, 1fr))',
|
|
14843
|
+
alignItems: 'end',
|
|
14844
|
+
gap: 'var(--space-3)',
|
|
14845
|
+
};
|
|
14846
|
+
const numberStyle$1 = {
|
|
14847
|
+
label: 'IncidentArchiveTable-numberStyle',
|
|
14848
|
+
color: 'var(--fg-1)',
|
|
14849
|
+
fontFamily: 'var(--font-family-mono)',
|
|
14850
|
+
fontWeight: 'var(--fw-semibold)',
|
|
14851
|
+
whiteSpace: 'nowrap',
|
|
14852
|
+
};
|
|
14853
|
+
const stackStyle$4 = {
|
|
14854
|
+
label: 'IncidentArchiveTable-stackStyle',
|
|
14855
|
+
display: 'flex',
|
|
14856
|
+
flexDirection: 'column',
|
|
14857
|
+
gap: 'var(--space-0-5)',
|
|
14858
|
+
};
|
|
14859
|
+
const secondaryStyle = {
|
|
14860
|
+
label: 'IncidentArchiveTable-secondaryStyle',
|
|
14861
|
+
color: 'var(--fg-3)',
|
|
14862
|
+
fontSize: 'var(--fs-xs)',
|
|
14863
|
+
lineHeight: 'var(--lh-xs)',
|
|
14864
|
+
};
|
|
14865
|
+
const rootCauseStyle = {
|
|
14866
|
+
label: 'IncidentArchiveTable-rootCauseStyle',
|
|
14867
|
+
display: 'block',
|
|
14868
|
+
maxWidth: '40ch',
|
|
14869
|
+
color: 'var(--fg-1)',
|
|
14870
|
+
whiteSpace: 'normal',
|
|
14871
|
+
overflowWrap: 'anywhere',
|
|
14872
|
+
};
|
|
14873
|
+
/* Positioned so the sr-only text inside stays within the table's scroll box, not the page's. */
|
|
14874
|
+
const mutedStyle$2 = {
|
|
14875
|
+
label: 'IncidentArchiveTable-mutedStyle',
|
|
14876
|
+
position: 'relative',
|
|
14877
|
+
color: 'var(--fg-3)',
|
|
14878
|
+
};
|
|
14879
|
+
const srOnlyStyle$4 = { label: 'IncidentArchiveTable-srOnlyStyle', ...srOnly };
|
|
14880
|
+
/* The scroll box is ours, not Table's, so it can take focus and a name for keyboard scrolling. */
|
|
14881
|
+
const scrollRegionStyle = {
|
|
14882
|
+
label: 'IncidentArchiveTable-scrollRegionStyle',
|
|
14883
|
+
overflowX: 'auto',
|
|
14884
|
+
borderRadius: 'var(--radius-lg)',
|
|
14885
|
+
'&:focus-visible': {
|
|
14886
|
+
outline: '2px solid var(--color-primary)',
|
|
14887
|
+
outlineOffset: 2,
|
|
14888
|
+
},
|
|
14889
|
+
};
|
|
14890
|
+
const tableNoScrollStyle = {
|
|
14891
|
+
label: 'IncidentArchiveTable-tableNoScrollStyle',
|
|
14892
|
+
'&&': { overflowX: 'visible' },
|
|
14893
|
+
};
|
|
14894
|
+
|
|
14895
|
+
/** The Archive shows 50 resolved Incidents a page. */
|
|
14896
|
+
const ARCHIVE_PAGE_SIZE = 50;
|
|
14897
|
+
/**
|
|
14898
|
+
* The read-only Archive of resolved Incidents: newest first, 50 a page,
|
|
14899
|
+
* filterable by date range and account. Nothing here can be reopened.
|
|
14900
|
+
*/
|
|
14901
|
+
const IncidentArchiveTable = ({ incidents, totalItems, page, pageSize = ARCHIVE_PAGE_SIZE, accounts, filters, onFiltersChange, onPageChange, loading = false, timeZone = DEFAULT_INCIDENT_TIME_ZONE, className = '', }) => {
|
|
14902
|
+
const id = useId();
|
|
14903
|
+
const filtered = Boolean(filters.from || filters.to || filters.accountId);
|
|
14904
|
+
const update = (patch) => onFiltersChange?.({ ...filters, ...patch });
|
|
14905
|
+
const columns = [
|
|
14906
|
+
{
|
|
14907
|
+
key: 'number',
|
|
14908
|
+
label: 'Incident',
|
|
14909
|
+
render: (_value, row) => jsx("span", { className: sx(numberStyle$1), children: row.number }),
|
|
14910
|
+
},
|
|
14911
|
+
{
|
|
14912
|
+
key: 'createdAt',
|
|
14913
|
+
label: 'Logged',
|
|
14914
|
+
render: (_value, row) => (jsxs("span", { className: sx(stackStyle$4), children: [jsx("time", { dateTime: row.createdAt, children: formatIncidentDate(row.createdAt, timeZone) }), jsx("span", { className: sx(secondaryStyle), children: formatClockTime(row.createdAt, timeZone) })] })),
|
|
14915
|
+
},
|
|
14916
|
+
{
|
|
14917
|
+
key: 'accountName',
|
|
14918
|
+
label: 'Account',
|
|
14919
|
+
render: (_value, row) => (jsxs("span", { className: sx(stackStyle$4), children: [jsx("span", { children: row.accountName }), row.teamName && jsx("span", { className: sx(secondaryStyle), children: row.teamName })] })),
|
|
14920
|
+
},
|
|
14921
|
+
{
|
|
14922
|
+
key: 'leadDivision',
|
|
14923
|
+
label: 'Lead Division',
|
|
14924
|
+
render: (_value, row) => DIVISION_LABELS[row.leadDivision],
|
|
14925
|
+
},
|
|
14926
|
+
{
|
|
14927
|
+
key: 'tripTypes',
|
|
14928
|
+
label: 'Trip types',
|
|
14929
|
+
render: (_value, row) => row.tripTypes.map((tripType) => TRIP_TYPE_LABELS[tripType]).join(', '),
|
|
14930
|
+
},
|
|
14931
|
+
{
|
|
14932
|
+
key: 'resolution',
|
|
14933
|
+
label: 'Resolution',
|
|
14934
|
+
render: (_value, row) => (jsx(Badge, { variant: row.resolution === 'resolved' ? 'success' : 'warning', size: "sm", children: RESOLUTION_LABELS[row.resolution] })),
|
|
14935
|
+
},
|
|
14936
|
+
{
|
|
14937
|
+
key: 'rootCause',
|
|
14938
|
+
label: 'Root cause',
|
|
14939
|
+
render: (_value, row) => row.rootCause ? (jsx("span", { className: sx(rootCauseStyle), children: row.rootCause })) : (jsxs("span", { className: sx(mutedStyle$2), children: [jsx("span", { "aria-hidden": "true", children: "\u2014" }), jsx("span", { className: sx(srOnlyStyle$4), children: "No root cause" })] })),
|
|
14940
|
+
},
|
|
14941
|
+
{
|
|
14942
|
+
key: 'resolvedBy',
|
|
14943
|
+
label: 'Resolved by',
|
|
14944
|
+
render: (_value, row) => (jsxs("span", { className: sx(stackStyle$4), children: [jsx("span", { children: row.resolvedBy }), jsxs("time", { className: sx(secondaryStyle), dateTime: row.resolvedAt, children: [formatIncidentDate(row.resolvedAt, timeZone), " ", formatClockTime(row.resolvedAt, timeZone)] })] })),
|
|
14945
|
+
},
|
|
14946
|
+
];
|
|
14947
|
+
return (jsxs("div", { className: cx(sx(rootStyle), className), "data-test": "incident-archive", children: [jsxs("div", { className: sx(filtersStyle$5), role: "group", "aria-label": "Archive filters", children: [jsx(Datepicker, { id: `${id}-from`, label: "From", size: "sm", value: filters.from ?? '', max: filters.to, onChange: (event) => update({ from: event.target.value || undefined }), fullWidth: true, "data-test": "incident-archive-from" }), jsx(Datepicker, { id: `${id}-to`, label: "To", size: "sm", value: filters.to ?? '', min: filters.from, onChange: (event) => update({ to: event.target.value || undefined }), fullWidth: true, "data-test": "incident-archive-to" }), jsx(Select, { id: `${id}-account`, label: "Account", size: "sm", options: [{ value: '', label: 'All accounts' }, ...accounts.map((a) => ({ value: a.id, label: a.name }))], value: filters.accountId ?? '', onChange: (event) => update({ accountId: event.target.value || undefined }), fullWidth: true, "data-test": "incident-archive-account" }), filtered && (jsx(Button, { variant: "ghost", size: "sm", onClick: () => onFiltersChange?.({}), "data-test": "incident-archive-clear", children: "Clear filters" }))] }), jsx("div", { className: sx(scrollRegionStyle), role: "region", "aria-label": "Resolved incidents", tabIndex: 0, "data-test": "incident-archive-scroll", children: jsx(Table, { className: sx(tableNoScrollStyle), columns: columns, data: incidents, rowKey: "id", loading: loading, emptyContent: jsx(EmptyState$1, { size: "sm", title: filtered ? 'No resolved incidents match' : 'No resolved incidents yet', description: filtered
|
|
14948
|
+
? 'Try a wider date range or a different account.'
|
|
14949
|
+
: 'Incidents land here once they are resolved or closed as logged in error.' }) }) }), totalItems > 0 && (jsx(Pagination, { page: page, pageSize: pageSize, totalItems: totalItems, itemLabel: "incidents", ariaLabel: "Archive pages", onPageChange: onPageChange }))] }));
|
|
14950
|
+
};
|
|
14951
|
+
IncidentArchiveTable.displayName = 'IncidentArchiveTable';
|
|
14952
|
+
|
|
14953
|
+
/** IncidentCard's compiled rules. One rule per element; every value is a token. */
|
|
14954
|
+
const cardStyle$b = {
|
|
14955
|
+
label: 'IncidentCard-cardStyle',
|
|
14956
|
+
display: 'flex',
|
|
14957
|
+
flexDirection: 'column',
|
|
14958
|
+
gap: 'var(--space-3)',
|
|
14959
|
+
minWidth: 0,
|
|
14960
|
+
};
|
|
14961
|
+
/* Doubled so it outranks Card's own border rule, which is injected after this one. */
|
|
14962
|
+
const overdueStyle = {
|
|
14963
|
+
label: 'IncidentCard-overdueStyle',
|
|
14964
|
+
'&&': {
|
|
14965
|
+
borderColor: 'var(--color-alert-error-border)',
|
|
14966
|
+
borderLeft: '4px solid var(--color-error)',
|
|
14967
|
+
},
|
|
14968
|
+
};
|
|
14969
|
+
const headerStyle$x = {
|
|
14970
|
+
label: 'IncidentCard-headerStyle',
|
|
14971
|
+
display: 'flex',
|
|
14972
|
+
flexWrap: 'wrap',
|
|
14973
|
+
alignItems: 'center',
|
|
14974
|
+
gap: 'var(--space-2)',
|
|
14975
|
+
};
|
|
14976
|
+
/* An overdue card's header is tinted so it reads as "needs someone" at a glance. */
|
|
14977
|
+
const overdueHeaderStyle = {
|
|
14978
|
+
label: 'IncidentCard-overdueHeaderStyle',
|
|
14979
|
+
padding: 'var(--space-2) var(--space-3)',
|
|
14980
|
+
borderRadius: 'var(--radius-lg)',
|
|
14981
|
+
background: 'var(--alert-error-bg)',
|
|
14982
|
+
};
|
|
14983
|
+
const numberStyle = {
|
|
14984
|
+
label: 'IncidentCard-numberStyle',
|
|
14985
|
+
margin: 0,
|
|
14986
|
+
color: 'var(--fg-1)',
|
|
14987
|
+
fontFamily: 'var(--font-family-mono)',
|
|
14988
|
+
fontSize: 'var(--fs-base)',
|
|
14989
|
+
fontWeight: 'var(--fw-semibold)',
|
|
14990
|
+
lineHeight: 'var(--lh-base)',
|
|
14991
|
+
};
|
|
14992
|
+
const syncingStyle = {
|
|
14993
|
+
label: 'IncidentCard-syncingStyle',
|
|
14994
|
+
color: 'var(--fg-3)',
|
|
14995
|
+
fontFamily: 'var(--font-family-base)',
|
|
14996
|
+
fontStyle: 'italic',
|
|
14997
|
+
fontWeight: 'var(--fw-medium)',
|
|
14998
|
+
};
|
|
14999
|
+
const elapsedStyle = {
|
|
15000
|
+
label: 'IncidentCard-elapsedStyle',
|
|
15001
|
+
marginLeft: 'auto',
|
|
15002
|
+
color: 'var(--fg-3)',
|
|
15003
|
+
fontSize: 'var(--fs-sm)',
|
|
15004
|
+
lineHeight: 'var(--lh-sm)',
|
|
15005
|
+
whiteSpace: 'nowrap',
|
|
15006
|
+
};
|
|
15007
|
+
const accountStyle = {
|
|
15008
|
+
label: 'IncidentCard-accountStyle',
|
|
15009
|
+
margin: 0,
|
|
15010
|
+
color: 'var(--fg-1)',
|
|
15011
|
+
fontSize: 'var(--fs-sm)',
|
|
15012
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15013
|
+
lineHeight: 'var(--lh-sm)',
|
|
15014
|
+
overflowWrap: 'anywhere',
|
|
15015
|
+
};
|
|
15016
|
+
const metaStyle$1 = {
|
|
15017
|
+
label: 'IncidentCard-metaStyle',
|
|
15018
|
+
display: 'grid',
|
|
15019
|
+
gridTemplateColumns: 'max-content minmax(0, 1fr)',
|
|
15020
|
+
columnGap: 'var(--space-3)',
|
|
15021
|
+
rowGap: 'var(--space-1)',
|
|
15022
|
+
margin: 0,
|
|
15023
|
+
fontSize: 'var(--fs-sm)',
|
|
15024
|
+
lineHeight: 'var(--lh-sm)',
|
|
15025
|
+
};
|
|
15026
|
+
const metaTermStyle = {
|
|
15027
|
+
label: 'IncidentCard-metaTermStyle',
|
|
15028
|
+
color: 'var(--fg-3)',
|
|
15029
|
+
};
|
|
15030
|
+
const metaValueStyle = {
|
|
15031
|
+
label: 'IncidentCard-metaValueStyle',
|
|
15032
|
+
margin: 0,
|
|
15033
|
+
color: 'var(--fg-1)',
|
|
15034
|
+
overflowWrap: 'anywhere',
|
|
15035
|
+
};
|
|
15036
|
+
const telLinkStyle = {
|
|
15037
|
+
label: 'IncidentCard-telLinkStyle',
|
|
15038
|
+
color: 'var(--fg-link)',
|
|
15039
|
+
fontWeight: 'var(--fw-medium)',
|
|
15040
|
+
whiteSpace: 'nowrap',
|
|
15041
|
+
'&:hover': { color: 'var(--fg-link-hover)' },
|
|
15042
|
+
'&:focus-visible': {
|
|
15043
|
+
outline: '2px solid var(--color-primary)',
|
|
15044
|
+
outlineOffset: 2,
|
|
15045
|
+
},
|
|
15046
|
+
};
|
|
15047
|
+
const narrativeStyle = {
|
|
15048
|
+
label: 'IncidentCard-narrativeStyle',
|
|
15049
|
+
margin: 0,
|
|
15050
|
+
color: 'var(--fg-1)',
|
|
15051
|
+
fontSize: 'var(--fs-sm)',
|
|
15052
|
+
lineHeight: 'var(--lh-sm)',
|
|
15053
|
+
whiteSpace: 'pre-wrap',
|
|
15054
|
+
overflowWrap: 'anywhere',
|
|
15055
|
+
};
|
|
15056
|
+
const loggedByStyle = {
|
|
15057
|
+
label: 'IncidentCard-loggedByStyle',
|
|
15058
|
+
margin: 0,
|
|
15059
|
+
color: 'var(--fg-3)',
|
|
15060
|
+
fontSize: 'var(--fs-xs)',
|
|
15061
|
+
lineHeight: 'var(--lh-xs)',
|
|
15062
|
+
};
|
|
15063
|
+
const sectionStyle$8 = {
|
|
15064
|
+
label: 'IncidentCard-sectionStyle',
|
|
15065
|
+
display: 'flex',
|
|
15066
|
+
flexDirection: 'column',
|
|
15067
|
+
gap: 'var(--space-2)',
|
|
15068
|
+
paddingTop: 'var(--space-3)',
|
|
15069
|
+
borderTop: '1px solid var(--border-color)',
|
|
15070
|
+
};
|
|
15071
|
+
const sectionHeaderStyle$3 = {
|
|
15072
|
+
label: 'IncidentCard-sectionHeaderStyle',
|
|
15073
|
+
display: 'flex',
|
|
15074
|
+
flexWrap: 'wrap',
|
|
15075
|
+
alignItems: 'baseline',
|
|
15076
|
+
justifyContent: 'space-between',
|
|
15077
|
+
gap: 'var(--space-2)',
|
|
15078
|
+
};
|
|
15079
|
+
const sectionTitleStyle$b = {
|
|
15080
|
+
label: 'IncidentCard-sectionTitleStyle',
|
|
15081
|
+
margin: 0,
|
|
15082
|
+
color: 'var(--fg-2)',
|
|
15083
|
+
fontSize: 'var(--fs-xs)',
|
|
15084
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15085
|
+
lineHeight: 'var(--lh-xs)',
|
|
15086
|
+
textTransform: 'uppercase',
|
|
15087
|
+
letterSpacing: '0.04em',
|
|
15088
|
+
};
|
|
15089
|
+
const progressStyle = {
|
|
15090
|
+
label: 'IncidentCard-progressStyle',
|
|
15091
|
+
color: 'var(--fg-2)',
|
|
15092
|
+
fontSize: 'var(--fs-xs)',
|
|
15093
|
+
fontWeight: 'var(--fw-medium)',
|
|
15094
|
+
lineHeight: 'var(--lh-xs)',
|
|
15095
|
+
};
|
|
15096
|
+
const plainListStyle = {
|
|
15097
|
+
label: 'IncidentCard-plainListStyle',
|
|
15098
|
+
display: 'flex',
|
|
15099
|
+
flexDirection: 'column',
|
|
15100
|
+
gap: 'var(--space-2)',
|
|
15101
|
+
margin: 0,
|
|
15102
|
+
padding: 0,
|
|
15103
|
+
listStyle: 'none',
|
|
15104
|
+
};
|
|
15105
|
+
const routeStyle$3 = {
|
|
15106
|
+
label: 'IncidentCard-routeStyle',
|
|
15107
|
+
display: 'flex',
|
|
15108
|
+
flexDirection: 'column',
|
|
15109
|
+
gap: 'var(--space-2)',
|
|
15110
|
+
padding: 'var(--space-2) var(--space-3)',
|
|
15111
|
+
borderRadius: 'var(--radius-lg)',
|
|
15112
|
+
background: 'var(--bg-subtle)',
|
|
15113
|
+
};
|
|
15114
|
+
/* An overdue Route carries the same red edge as its card, so the culprit is obvious. */
|
|
15115
|
+
const routeOverdueStyle = {
|
|
15116
|
+
label: 'IncidentCard-routeOverdueStyle',
|
|
15117
|
+
boxShadow: 'inset 3px 0 0 var(--color-error)',
|
|
15118
|
+
};
|
|
15119
|
+
const routeRowStyle = {
|
|
15120
|
+
label: 'IncidentCard-routeRowStyle',
|
|
15121
|
+
display: 'flex',
|
|
15122
|
+
flexWrap: 'wrap',
|
|
15123
|
+
alignItems: 'center',
|
|
15124
|
+
gap: 'var(--space-2)',
|
|
15125
|
+
};
|
|
15126
|
+
const routeDivisionStyle = {
|
|
15127
|
+
label: 'IncidentCard-routeDivisionStyle',
|
|
15128
|
+
minWidth: '9ch',
|
|
15129
|
+
color: 'var(--fg-1)',
|
|
15130
|
+
fontSize: 'var(--fs-sm)',
|
|
15131
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15132
|
+
lineHeight: 'var(--lh-sm)',
|
|
15133
|
+
};
|
|
15134
|
+
const routeStatusStyle = {
|
|
15135
|
+
label: 'IncidentCard-routeStatusStyle',
|
|
15136
|
+
flex: '1 1 12ch',
|
|
15137
|
+
color: 'var(--fg-2)',
|
|
15138
|
+
fontSize: 'var(--fs-xs)',
|
|
15139
|
+
lineHeight: 'var(--lh-xs)',
|
|
15140
|
+
};
|
|
15141
|
+
const routeAckedStyle = {
|
|
15142
|
+
label: 'IncidentCard-routeAckedStyle',
|
|
15143
|
+
color: 'var(--color-success-ink)',
|
|
15144
|
+
fontWeight: 'var(--fw-medium)',
|
|
15145
|
+
};
|
|
15146
|
+
const overdueTextStyle = {
|
|
15147
|
+
label: 'IncidentCard-overdueTextStyle',
|
|
15148
|
+
color: 'var(--color-error)',
|
|
15149
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15150
|
+
};
|
|
15151
|
+
const routeActionsStyle = {
|
|
15152
|
+
label: 'IncidentCard-routeActionsStyle',
|
|
15153
|
+
display: 'flex',
|
|
15154
|
+
flexWrap: 'wrap',
|
|
15155
|
+
gap: 'var(--space-1-5)',
|
|
15156
|
+
marginLeft: 'auto',
|
|
15157
|
+
};
|
|
15158
|
+
const tripTypeListStyle = {
|
|
15159
|
+
label: 'IncidentCard-tripTypeListStyle',
|
|
15160
|
+
display: 'flex',
|
|
15161
|
+
flexWrap: 'wrap',
|
|
15162
|
+
gap: 'var(--space-1-5)',
|
|
15163
|
+
margin: 0,
|
|
15164
|
+
padding: 0,
|
|
15165
|
+
listStyle: 'none',
|
|
15166
|
+
};
|
|
15167
|
+
const tripTypeChipStyle = {
|
|
15168
|
+
label: 'IncidentCard-tripTypeChipStyle',
|
|
15169
|
+
display: 'inline-flex',
|
|
15170
|
+
alignItems: 'center',
|
|
15171
|
+
gap: 'var(--space-0-5)',
|
|
15172
|
+
paddingLeft: 'var(--space-2)',
|
|
15173
|
+
border: '1px solid var(--border-color)',
|
|
15174
|
+
borderRadius: 'var(--radius-full)',
|
|
15175
|
+
background: 'var(--bg-surface)',
|
|
15176
|
+
color: 'var(--fg-1)',
|
|
15177
|
+
fontSize: 'var(--fs-xs)',
|
|
15178
|
+
fontWeight: 'var(--fw-medium)',
|
|
15179
|
+
lineHeight: 'var(--lh-xs)',
|
|
15180
|
+
};
|
|
15181
|
+
const tripTypeRemoveStyle = {
|
|
15182
|
+
label: 'IncidentCard-tripTypeRemoveStyle',
|
|
15183
|
+
display: 'inline-flex',
|
|
15184
|
+
alignItems: 'center',
|
|
15185
|
+
justifyContent: 'center',
|
|
15186
|
+
width: 'var(--space-6)',
|
|
15187
|
+
height: 'var(--space-6)',
|
|
15188
|
+
padding: 0,
|
|
15189
|
+
border: 0,
|
|
15190
|
+
borderRadius: 'var(--radius-full)',
|
|
15191
|
+
background: 'transparent',
|
|
15192
|
+
color: 'var(--fg-2)',
|
|
15193
|
+
cursor: 'pointer',
|
|
15194
|
+
'&:hover:not(:disabled)': { background: 'var(--bg-subtle)', color: 'var(--fg-1)' },
|
|
15195
|
+
'&:focus-visible': {
|
|
15196
|
+
outline: '2px solid var(--color-primary)',
|
|
15197
|
+
outlineOffset: 1,
|
|
15198
|
+
},
|
|
15199
|
+
'&:disabled': { color: 'var(--fg-disabled)', cursor: 'not-allowed' },
|
|
15200
|
+
};
|
|
15201
|
+
const addTripTypeStyle = {
|
|
15202
|
+
label: 'IncidentCard-addTripTypeStyle',
|
|
15203
|
+
display: 'flex',
|
|
15204
|
+
flexWrap: 'wrap',
|
|
15205
|
+
alignItems: 'flex-end',
|
|
15206
|
+
gap: 'var(--space-2)',
|
|
15207
|
+
'& > :first-child': { flex: '1 1 12rem', minWidth: 0 },
|
|
15208
|
+
};
|
|
15209
|
+
const noteStyle$3 = {
|
|
15210
|
+
label: 'IncidentCard-noteStyle',
|
|
15211
|
+
display: 'flex',
|
|
15212
|
+
flexDirection: 'column',
|
|
15213
|
+
gap: 'var(--space-0-5)',
|
|
15214
|
+
fontSize: 'var(--fs-sm)',
|
|
15215
|
+
lineHeight: 'var(--lh-sm)',
|
|
15216
|
+
};
|
|
15217
|
+
const noteMetaStyle = {
|
|
15218
|
+
label: 'IncidentCard-noteMetaStyle',
|
|
15219
|
+
color: 'var(--fg-3)',
|
|
15220
|
+
fontSize: 'var(--fs-xs)',
|
|
15221
|
+
lineHeight: 'var(--lh-xs)',
|
|
15222
|
+
};
|
|
15223
|
+
const noteAuthorStyle = {
|
|
15224
|
+
label: 'IncidentCard-noteAuthorStyle',
|
|
15225
|
+
color: 'var(--fg-1)',
|
|
15226
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15227
|
+
};
|
|
15228
|
+
const noteTextStyle = {
|
|
15229
|
+
label: 'IncidentCard-noteTextStyle',
|
|
15230
|
+
margin: 0,
|
|
15231
|
+
color: 'var(--fg-1)',
|
|
15232
|
+
whiteSpace: 'pre-wrap',
|
|
15233
|
+
overflowWrap: 'anywhere',
|
|
15234
|
+
};
|
|
15235
|
+
/* System notes record actions, not conversation: muted, italic and marked with an icon. */
|
|
15236
|
+
const systemNoteStyle = {
|
|
15237
|
+
label: 'IncidentCard-systemNoteStyle',
|
|
15238
|
+
display: 'flex',
|
|
15239
|
+
alignItems: 'flex-start',
|
|
15240
|
+
gap: 'var(--space-1-5)',
|
|
15241
|
+
color: 'var(--fg-2)',
|
|
15242
|
+
fontSize: 'var(--fs-xs)',
|
|
15243
|
+
fontStyle: 'italic',
|
|
15244
|
+
lineHeight: 'var(--lh-xs)',
|
|
15245
|
+
'& > svg': { flexShrink: 0 },
|
|
15246
|
+
};
|
|
15247
|
+
const emptyNotesStyle = {
|
|
15248
|
+
label: 'IncidentCard-emptyNotesStyle',
|
|
15249
|
+
margin: 0,
|
|
15250
|
+
color: 'var(--fg-3)',
|
|
15251
|
+
fontSize: 'var(--fs-xs)',
|
|
15252
|
+
lineHeight: 'var(--lh-xs)',
|
|
15253
|
+
};
|
|
15254
|
+
const noteFormStyle = {
|
|
15255
|
+
label: 'IncidentCard-noteFormStyle',
|
|
15256
|
+
display: 'flex',
|
|
15257
|
+
flexDirection: 'column',
|
|
15258
|
+
alignItems: 'flex-end',
|
|
15259
|
+
gap: 'var(--space-2)',
|
|
15260
|
+
'& > :first-child': { alignSelf: 'stretch' },
|
|
15261
|
+
};
|
|
15262
|
+
const disclosureStyle = {
|
|
15263
|
+
label: 'IncidentCard-disclosureStyle',
|
|
15264
|
+
alignSelf: 'flex-start',
|
|
15265
|
+
};
|
|
15266
|
+
/* Textarea's size ramp pins a single-line height; let `rows` set it instead. */
|
|
15267
|
+
const textareaRowsStyle$2 = {
|
|
15268
|
+
label: 'IncidentCard-textareaRowsStyle',
|
|
15269
|
+
'& textarea': { height: 'auto' },
|
|
15270
|
+
};
|
|
15271
|
+
const footerStyle$9 = {
|
|
15272
|
+
label: 'IncidentCard-footerStyle',
|
|
15273
|
+
display: 'flex',
|
|
15274
|
+
flexWrap: 'wrap',
|
|
15275
|
+
alignItems: 'center',
|
|
15276
|
+
justifyContent: 'flex-end',
|
|
15277
|
+
gap: 'var(--space-3)',
|
|
15278
|
+
};
|
|
15279
|
+
const readyStyle = {
|
|
15280
|
+
label: 'IncidentCard-readyStyle',
|
|
15281
|
+
display: 'inline-flex',
|
|
15282
|
+
alignItems: 'center',
|
|
15283
|
+
gap: 'var(--space-1)',
|
|
15284
|
+
marginRight: 'auto',
|
|
15285
|
+
color: 'var(--color-success-ink)',
|
|
15286
|
+
fontSize: 'var(--fs-xs)',
|
|
15287
|
+
fontWeight: 'var(--fw-medium)',
|
|
15288
|
+
lineHeight: 'var(--lh-xs)',
|
|
15289
|
+
};
|
|
15290
|
+
const srOnlyStyle$3 = { label: 'IncidentCard-srOnlyStyle', ...srOnly };
|
|
15291
|
+
|
|
15292
|
+
const NoteItem = ({ note, timeZone }) => {
|
|
15293
|
+
const time = (jsx("time", { dateTime: note.createdAt, className: sx(noteMetaStyle), children: formatClockTime(note.createdAt, timeZone) }));
|
|
15294
|
+
if (note.kind === 'system') {
|
|
15295
|
+
return (jsxs("div", { className: cx(sx(noteStyle$3), sx(systemNoteStyle)), "data-test": "incident-note", "data-kind": "system", children: [jsx(InfoIcon$1, { size: 14, "aria-hidden": "true" }), jsxs("span", { children: [jsx("span", { className: sx(srOnlyStyle$3), children: "Activity: " }), jsx("span", { children: note.text }), " \u00B7 ", time] })] }));
|
|
15296
|
+
}
|
|
15297
|
+
return (jsxs("div", { className: sx(noteStyle$3), "data-test": "incident-note", "data-kind": "user", children: [jsxs("span", { className: sx(noteMetaStyle), children: [jsx("span", { className: sx(noteAuthorStyle), title: note.authorEmail, children: note.authorName }), ' ', "\u00B7 ", time] }), jsx("p", { className: sx(noteTextStyle), children: note.text })] }));
|
|
15298
|
+
};
|
|
15299
|
+
/**
|
|
15300
|
+
* An Incident's append-only notes: the count and latest note at a glance, and
|
|
15301
|
+
* a disclosure with the whole thread (oldest first) and an Add note box.
|
|
15302
|
+
*/
|
|
15303
|
+
const IncidentNotes = ({ notes, incidentLabel, onAddNote, defaultExpanded = false, timeZone = DEFAULT_INCIDENT_TIME_ZONE, }) => {
|
|
15304
|
+
const id = useId();
|
|
15305
|
+
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
15306
|
+
const [draft, setDraft] = useState('');
|
|
15307
|
+
const latest = notes[notes.length - 1];
|
|
15308
|
+
const submit = (event) => {
|
|
15309
|
+
event.preventDefault();
|
|
15310
|
+
const text = draft.trim();
|
|
15311
|
+
if (!text)
|
|
15312
|
+
return;
|
|
15313
|
+
onAddNote?.(text);
|
|
15314
|
+
setDraft('');
|
|
15315
|
+
};
|
|
15316
|
+
const toggleLabel = expanded ? 'Hide notes' : notes.length ? `Show all notes (${notes.length})` : 'Add a note';
|
|
15317
|
+
return (jsxs("section", { className: sx(sectionStyle$8), "aria-label": `Notes for ${incidentLabel}`, "data-test": "incident-notes", children: [jsxs("div", { className: sx(sectionHeaderStyle$3), children: [jsx("p", { className: sx(sectionTitleStyle$b), children: "Notes" }), jsx("span", { className: sx(noteMetaStyle), "data-test": "incident-note-count", children: notes.length === 1 ? '1 note' : `${notes.length} notes` })] }), !expanded &&
|
|
15318
|
+
(latest ? (jsx(NoteItem, { note: latest, timeZone: timeZone })) : (jsx("p", { className: sx(emptyNotesStyle), children: "No notes yet." }))), jsx(Button, { variant: "ghost", size: "sm", className: sx(disclosureStyle), "aria-expanded": expanded, "aria-controls": `${id}-thread`, onClick: () => setExpanded((open) => !open), "data-test": "incident-notes-toggle", children: toggleLabel }), jsx("div", { id: `${id}-thread`, hidden: !expanded, children: expanded && (jsxs("div", { className: sx(plainListStyle), children: [notes.length > 0 ? (jsx("ol", { className: sx(plainListStyle), "aria-label": `All notes for ${incidentLabel}`, children: notes.map((note) => (jsx("li", { children: jsx(NoteItem, { note: note, timeZone: timeZone }) }, note.id))) })) : (jsx("p", { className: sx(emptyNotesStyle), children: "No notes yet." })), jsxs("form", { className: sx(noteFormStyle), onSubmit: submit, "aria-label": `Add a note to ${incidentLabel}`, children: [jsx(Textarea, { id: `${id}-new-note`, label: "New note", rows: 2, value: draft, onChange: (event) => setDraft(event.target.value), helperText: "Notes are permanent; they cannot be edited or deleted.", fullWidth: true, size: "sm", className: sx(textareaRowsStyle$2), "data-test": "incident-note-input" }), jsx(Button, { type: "submit", size: "sm", disabled: !draft.trim(), "data-test": "incident-note-add", children: "Add note" })] })] })) })] }));
|
|
15319
|
+
};
|
|
15320
|
+
IncidentNotes.displayName = 'IncidentNotes';
|
|
15321
|
+
|
|
15322
|
+
/** A Not acknowledged Route turns overdue after this many minutes without acknowledgement. */
|
|
15323
|
+
const DEFAULT_STALE_AFTER_MINUTES = 60;
|
|
15324
|
+
const MINUTE_MS = 60 * 1000;
|
|
15325
|
+
/** Where the Route is in its lifecycle. Complete wins over acknowledged. */
|
|
15326
|
+
const routeStatus = (route) => {
|
|
15327
|
+
if (route.completedAt)
|
|
15328
|
+
return 'complete';
|
|
15329
|
+
if (route.acknowledgedAt)
|
|
15330
|
+
return 'acknowledged';
|
|
15331
|
+
return 'not-acknowledged';
|
|
15332
|
+
};
|
|
15333
|
+
/** Not acknowledged, and at least `staleAfterMinutes` since its own `notifiedAt`. */
|
|
15334
|
+
const isRouteOverdue = (route, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES) => routeStatus(route) === 'not-acknowledged' &&
|
|
15335
|
+
Date.parse(now) - Date.parse(route.notifiedAt) >= staleAfterMinutes * MINUTE_MS;
|
|
15336
|
+
/** The Incident's overdue Routes, in Route order. */
|
|
15337
|
+
const overdueRoutes = (incident, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES) => incident.routes.filter((route) => isRouteOverdue(route, now, staleAfterMinutes));
|
|
15338
|
+
/** True when any Route is overdue. */
|
|
15339
|
+
const isIncidentOverdue = (incident, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES) => overdueRoutes(incident, now, staleAfterMinutes).length > 0;
|
|
15340
|
+
/** Acknowledged (including Complete), Complete and total Route counts. */
|
|
15341
|
+
const routeProgress = (routes) => ({
|
|
15342
|
+
acknowledged: routes.filter((route) => routeStatus(route) !== 'not-acknowledged').length,
|
|
15343
|
+
complete: routes.filter((route) => routeStatus(route) === 'complete').length,
|
|
15344
|
+
total: routes.length,
|
|
15345
|
+
});
|
|
15346
|
+
/** Every Route is Complete — the card hints it is ready to resolve. Never resolves on its own. */
|
|
15347
|
+
const isReadyToResolve = (incident) => incident.routes.length > 0 && incident.routes.every((route) => routeStatus(route) === 'complete');
|
|
15348
|
+
/** A Route always keeps one trip type, so its last one cannot be removed. */
|
|
15349
|
+
const canRemoveTripType = (route) => route.tripTypes.length > 1;
|
|
15350
|
+
/** Trip types the Incident does not have yet, grouped by Division, for the Add trip type control. */
|
|
15351
|
+
const addableTripTypes = (incident) => {
|
|
15352
|
+
const present = new Set(incident.routes.flatMap((route) => route.tripTypes));
|
|
15353
|
+
return DIVISIONS.map((division) => ({
|
|
15354
|
+
division: division.value,
|
|
15355
|
+
tripTypes: division.tripTypes.filter((tripType) => !present.has(tripType)),
|
|
15356
|
+
})).filter((group) => group.tripTypes.length > 0);
|
|
15357
|
+
};
|
|
15358
|
+
/**
|
|
15359
|
+
* Alert Log order: overdue Incidents first, the longest-waiting first (by the
|
|
15360
|
+
* earliest overdue Route's `notifiedAt`); then everything else newest first.
|
|
15361
|
+
*/
|
|
15362
|
+
const orderAlertLog = (incidents, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES) => {
|
|
15363
|
+
const waitingSince = (incident) => Math.min(...overdueRoutes(incident, now, staleAfterMinutes).map((route) => Date.parse(route.notifiedAt)));
|
|
15364
|
+
const overdue = incidents.filter((incident) => isIncidentOverdue(incident, now, staleAfterMinutes));
|
|
15365
|
+
const rest = incidents.filter((incident) => !isIncidentOverdue(incident, now, staleAfterMinutes));
|
|
15366
|
+
return [
|
|
15367
|
+
...overdue.sort((a, b) => waitingSince(a) - waitingSince(b)),
|
|
15368
|
+
...rest.sort((a, b) => Date.parse(b.createdAt) - Date.parse(a.createdAt)),
|
|
15369
|
+
];
|
|
15370
|
+
};
|
|
15371
|
+
const systemNote = (incident, actor, text) => ({
|
|
15372
|
+
id: `${incident.id}-note-${incident.notes.length + 1}`,
|
|
15373
|
+
authorName: actor.name,
|
|
15374
|
+
authorEmail: actor.email,
|
|
15375
|
+
text: `${actor.name} ${text}`,
|
|
15376
|
+
createdAt: actor.at,
|
|
15377
|
+
kind: 'system',
|
|
15378
|
+
});
|
|
15379
|
+
const updateRoute = (incident, division, actor, note, change) => {
|
|
15380
|
+
if (!incident.routes.some((route) => route.division === division))
|
|
15381
|
+
return incident;
|
|
15382
|
+
return {
|
|
15383
|
+
...incident,
|
|
15384
|
+
routes: incident.routes.map((route) => (route.division === division ? change(route) : route)),
|
|
15385
|
+
notes: [...incident.notes, systemNote(incident, actor, note)],
|
|
15386
|
+
};
|
|
15387
|
+
};
|
|
15388
|
+
/** Not acknowledged → Acknowledged. */
|
|
15389
|
+
const markRouteReceived = (incident, division, actor) => updateRoute(incident, division, actor, `marked ${DIVISION_LABELS[division]} received`, (route) => ({
|
|
15390
|
+
...route,
|
|
15391
|
+
acknowledgedBy: actor.name,
|
|
15392
|
+
acknowledgedByEmail: actor.email,
|
|
15393
|
+
acknowledgedAt: actor.at,
|
|
15394
|
+
}));
|
|
15395
|
+
/** Acknowledged → Complete. A Route that is not acknowledged is left as it is. */
|
|
15396
|
+
const completeRoute = (incident, division, actor) => {
|
|
15397
|
+
const route = incident.routes.find((item) => item.division === division);
|
|
15398
|
+
if (!route || routeStatus(route) !== 'acknowledged')
|
|
15399
|
+
return incident;
|
|
15400
|
+
return updateRoute(incident, division, actor, `marked ${DIVISION_LABELS[division]} complete`, (item) => ({
|
|
15401
|
+
...item,
|
|
15402
|
+
completedBy: actor.name,
|
|
15403
|
+
completedByEmail: actor.email,
|
|
15404
|
+
completedAt: actor.at,
|
|
15405
|
+
}));
|
|
15406
|
+
};
|
|
15407
|
+
/** Any status → Not acknowledged, clearing acknowledgement and completion and restarting the clock. */
|
|
15408
|
+
const renotifyRoute = (incident, division, actor) => updateRoute(incident, division, actor, `re-notified ${DIVISION_LABELS[division]}`, (route) => ({
|
|
15409
|
+
division: route.division,
|
|
15410
|
+
tripTypes: route.tripTypes,
|
|
15411
|
+
notifiedAt: actor.at,
|
|
15412
|
+
}));
|
|
15413
|
+
/** Appends to the Division's Route, or opens a new Not acknowledged Route for it. */
|
|
15414
|
+
const addTripTypeToIncident = (incident, division, tripType, actor) => {
|
|
15415
|
+
if (tripTypeDivision(tripType) !== division)
|
|
15416
|
+
return incident;
|
|
15417
|
+
const existing = incident.routes.find((route) => route.division === division);
|
|
15418
|
+
if (existing?.tripTypes.includes(tripType))
|
|
15419
|
+
return incident;
|
|
15420
|
+
const label = `added ${TRIP_TYPE_LABELS[tripType]} to ${DIVISION_LABELS[division]}`;
|
|
15421
|
+
if (existing) {
|
|
15422
|
+
return updateRoute(incident, division, actor, label, (route) => ({
|
|
15423
|
+
...route,
|
|
15424
|
+
tripTypes: sortTripTypes([...route.tripTypes, tripType]),
|
|
15425
|
+
}));
|
|
15426
|
+
}
|
|
15427
|
+
const order = DIVISIONS.map((item) => item.value);
|
|
15428
|
+
return {
|
|
15429
|
+
...incident,
|
|
15430
|
+
routes: [...incident.routes, { division, tripTypes: [tripType], notifiedAt: actor.at }].sort((a, b) => order.indexOf(a.division) - order.indexOf(b.division)),
|
|
15431
|
+
notes: [...incident.notes, systemNote(incident, actor, label)],
|
|
15432
|
+
};
|
|
15433
|
+
};
|
|
15434
|
+
/** Removes a trip type from its Route, unless it is the Route's last one. */
|
|
15435
|
+
const removeTripTypeFromIncident = (incident, division, tripType, actor) => {
|
|
15436
|
+
const route = incident.routes.find((item) => item.division === division);
|
|
15437
|
+
if (!route || !route.tripTypes.includes(tripType) || !canRemoveTripType(route))
|
|
15438
|
+
return incident;
|
|
15439
|
+
return updateRoute(incident, division, actor, `removed ${TRIP_TYPE_LABELS[tripType]} from ${DIVISION_LABELS[division]}`, (item) => ({ ...item, tripTypes: item.tripTypes.filter((value) => value !== tripType) }));
|
|
15440
|
+
};
|
|
15441
|
+
/** Appends a typed note. Blank text is ignored. */
|
|
15442
|
+
const addNoteToIncident = (incident, text, actor) => {
|
|
15443
|
+
const trimmed = text.trim();
|
|
15444
|
+
if (!trimmed)
|
|
15445
|
+
return incident;
|
|
15446
|
+
return {
|
|
15447
|
+
...incident,
|
|
15448
|
+
notes: [
|
|
15449
|
+
...incident.notes,
|
|
15450
|
+
{
|
|
15451
|
+
id: `${incident.id}-note-${incident.notes.length + 1}`,
|
|
15452
|
+
authorName: actor.name,
|
|
15453
|
+
authorEmail: actor.email,
|
|
15454
|
+
text: trimmed,
|
|
15455
|
+
createdAt: actor.at,
|
|
15456
|
+
kind: 'user',
|
|
15457
|
+
},
|
|
15458
|
+
],
|
|
15459
|
+
};
|
|
15460
|
+
};
|
|
15461
|
+
|
|
15462
|
+
/** `tel:` href from a display number; US 10-digit numbers get +1. */
|
|
15463
|
+
const toTelHref = (phone) => {
|
|
15464
|
+
const digits = phone.replace(/[^\d+]/g, '');
|
|
15465
|
+
return `tel:${/^\d{10}$/.test(digits) ? `+1${digits}` : digits}`;
|
|
15466
|
+
};
|
|
15467
|
+
const LAST_TRIP_TYPE_HINT = 'A Division keeps at least one trip type.';
|
|
15468
|
+
/** One Division's Route: status, lifecycle actions and its trip types. */
|
|
15469
|
+
const RouteItem = ({ incidentId, route, now, staleAfterMinutes, timeZone, lastTripTypeHintId, onMarkReceived, onComplete, onRenotify, onRemoveTripType, }) => {
|
|
15470
|
+
const name = DIVISION_LABELS[route.division];
|
|
15471
|
+
const status = routeStatus(route);
|
|
15472
|
+
const overdue = isRouteOverdue(route, now, staleAfterMinutes);
|
|
15473
|
+
const removable = canRemoveTripType(route);
|
|
15474
|
+
return (jsxs("li", { className: cx(sx(routeStyle$3), overdue && sx(routeOverdueStyle)), "data-test": `incident-route-${route.division}`, "data-status": status, "data-overdue": overdue || undefined, children: [jsxs("div", { className: sx(routeRowStyle), children: [jsx("span", { className: sx(routeDivisionStyle), children: name }), status === 'not-acknowledged' && (jsx("span", { className: sx(routeStatusStyle), "data-test": "incident-route-status", children: overdue ? (jsxs("span", { className: sx(overdueTextStyle), children: ["Not acknowledged \u00B7 waiting ", formatElapsed(route.notifiedAt, now)] })) : ('Not acknowledged') })), status === 'acknowledged' && (jsxs("span", { className: cx(sx(routeStatusStyle), sx(routeAckedStyle)), "data-test": "incident-route-status", children: ["Received by ", route.acknowledgedBy, " at ", formatClockTime(route.acknowledgedAt, timeZone)] })), status === 'complete' && (jsxs("span", { className: sx(routeStatusStyle), "data-test": "incident-route-status", children: [jsx(Badge, { variant: "success", size: "sm", children: "Complete" }), ' ', "by ", route.completedBy, " at ", formatClockTime(route.completedAt, timeZone)] })), jsxs("div", { className: sx(routeActionsStyle), children: [status === 'not-acknowledged' && (jsx(Button, { size: "sm", variant: "outline", onClick: () => onMarkReceived?.(incidentId, route.division), "aria-label": `Mark received for ${name}`, "data-test": "incident-mark-received", children: "Mark received" })), status === 'acknowledged' && (jsx(Button, { size: "sm", variant: "outline", onClick: () => onComplete?.(incidentId, route.division), "aria-label": `Complete ${name}`, "data-test": "incident-complete", children: "Complete" })), jsx(Button, { size: "sm", variant: "ghost", onClick: () => onRenotify?.(incidentId, route.division), "aria-label": `Re-notify ${name}`, "data-test": "incident-renotify", children: "Re-notify" })] })] }), jsx("ul", { className: sx(tripTypeListStyle), "aria-label": `${name} trip types`, children: route.tripTypes.map((tripType) => {
|
|
15475
|
+
const label = TRIP_TYPE_LABELS[tripType];
|
|
15476
|
+
const remove = (jsx("button", { type: "button", className: sx(tripTypeRemoveStyle), disabled: !removable, "aria-label": `Remove ${label} from ${name}`, "aria-describedby": removable ? undefined : lastTripTypeHintId, onClick: () => onRemoveTripType?.(incidentId, route.division, tripType), "data-test": "incident-remove-trip-type", children: jsx(XIcon, { size: 12, "aria-hidden": "true" }) }));
|
|
15477
|
+
return (jsxs("li", { className: sx(tripTypeChipStyle), "data-test": `incident-trip-type-${tripType}`, children: [label, removable ? remove : jsx(Tooltip, { content: LAST_TRIP_TYPE_HINT, children: remove })] }, tripType));
|
|
15478
|
+
}) })] }));
|
|
15479
|
+
};
|
|
15480
|
+
/**
|
|
15481
|
+
* One Open Incident in the Alert Log: who called, what happened, each routed
|
|
15482
|
+
* Division with its trip types and lifecycle (Not acknowledged → Acknowledged
|
|
15483
|
+
* → Complete), and an append-only notes thread. Overdue Routes turn the card
|
|
15484
|
+
* red. Resolve is always available and always manual.
|
|
15485
|
+
*/
|
|
15486
|
+
const IncidentCard = ({ incident, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES, timeZone = DEFAULT_INCIDENT_TIME_ZONE, onMarkReceived, onComplete, onRenotify, onAddTripType, onRemoveTripType, onAddNote, onResolve, defaultNotesExpanded = false, headingLevel = 3, className = '', }) => {
|
|
15487
|
+
const id = useId();
|
|
15488
|
+
const titleId = `${id}-title`;
|
|
15489
|
+
const lastTripTypeHintId = `${id}-last-trip-type`;
|
|
15490
|
+
const Heading = `h${headingLevel}`;
|
|
15491
|
+
const [tripTypeToAdd, setTripTypeToAdd] = useState('');
|
|
15492
|
+
const overdueCount = overdueRoutes(incident, now, staleAfterMinutes).length;
|
|
15493
|
+
const overdue = overdueCount > 0;
|
|
15494
|
+
const { acknowledged, complete, total } = routeProgress(incident.routes);
|
|
15495
|
+
const ready = isReadyToResolve(incident);
|
|
15496
|
+
const elapsed = formatElapsed(incident.createdAt, now);
|
|
15497
|
+
const label = incident.number ?? 'syncing incident';
|
|
15498
|
+
const routed = new Set(incident.routes.map((route) => route.division));
|
|
15499
|
+
const addable = addableTripTypes(incident);
|
|
15500
|
+
const addTripType = () => {
|
|
15501
|
+
if (!tripTypeToAdd)
|
|
15502
|
+
return;
|
|
15503
|
+
onAddTripType?.(incident.id, tripTypeDivision(tripTypeToAdd), tripTypeToAdd);
|
|
15504
|
+
setTripTypeToAdd('');
|
|
15505
|
+
};
|
|
15506
|
+
return (jsxs(Card, { variant: "default", padding: "md", role: "article", "aria-labelledby": titleId, className: cx(sx(cardStyle$b), overdue && sx(overdueStyle), className), "data-test": "incident-card", "data-overdue": overdue || undefined, children: [jsxs("div", { className: cx(sx(headerStyle$x), overdue && sx(overdueHeaderStyle)), children: [jsx(Heading, { id: titleId, className: sx(numberStyle), children: incident.number ?? (jsx("span", { className: sx(syncingStyle), "data-test": "incident-syncing", children: "Syncing\u2026" })) }), overdue && (jsxs(Badge, { variant: "error", dot: true, "data-test": "incident-needs-acknowledgement", children: ["Needs acknowledgement (", overdueCount, ")"] })), jsx("time", { className: sx(elapsedStyle), dateTime: incident.createdAt, title: `Logged ${formatClockTime(incident.createdAt, timeZone)}`, children: elapsed === 'Just now' ? elapsed : `${elapsed} ago` })] }), jsxs("p", { className: sx(accountStyle), children: [incident.accountName, incident.teamName && ` · ${incident.teamName}`] }), jsxs("dl", { className: sx(metaStyle$1), children: [jsx("dt", { className: sx(metaTermStyle), children: "Lead Division" }), jsx("dd", { className: sx(metaValueStyle), children: DIVISION_LABELS[incident.leadDivision] }), jsx("dt", { className: sx(metaTermStyle), children: "Caller" }), jsxs("dd", { className: sx(metaValueStyle), children: [incident.callerName && `${incident.callerName} · `, jsx("a", { className: sx(telLinkStyle), href: toTelHref(incident.callbackNumber), "data-test": "incident-callback", children: incident.callbackNumber })] }), incident.incidentType && (jsxs(Fragment, { children: [jsx("dt", { className: sx(metaTermStyle), children: "Type" }), jsx("dd", { className: sx(metaValueStyle), children: incident.incidentType })] }))] }), jsx("p", { className: sx(narrativeStyle), "data-test": "incident-narrative", children: incident.narrative }), jsxs("p", { className: sx(loggedByStyle), children: ["Logged by ", incident.loggedBy, " (", DIVISION_LABELS[incident.loggingDivision], ") at", ' ', formatClockTime(incident.createdAt, timeZone)] }), jsxs("section", { className: sx(sectionStyle$8), "aria-label": `Routes for ${label}`, children: [jsxs("div", { className: sx(sectionHeaderStyle$3), children: [jsx("p", { className: sx(sectionTitleStyle$b), children: "Routes" }), jsxs("span", { className: sx(progressStyle), "data-test": "incident-progress", children: ["Acknowledged ", acknowledged, "/", total, " \u00B7 Complete ", complete, "/", total] })] }), jsx("ul", { className: sx(plainListStyle), children: incident.routes.map((route) => (jsx(RouteItem, { incidentId: incident.id, route: route, now: now, staleAfterMinutes: staleAfterMinutes, timeZone: timeZone, lastTripTypeHintId: lastTripTypeHintId, onMarkReceived: onMarkReceived, onComplete: onComplete, onRenotify: onRenotify, onRemoveTripType: onRemoveTripType }, route.division))) }), jsx("span", { id: lastTripTypeHintId, className: sx(srOnlyStyle$3), children: LAST_TRIP_TYPE_HINT }), addable.length > 0 && (jsxs("div", { className: sx(addTripTypeStyle), children: [jsx(Select, { id: `${id}-add-trip-type`, label: "Add trip type", placeholder: "Choose a trip type", size: "sm", fullWidth: true, optionGroups: addable.map((group) => ({
|
|
15507
|
+
label: routed.has(group.division)
|
|
15508
|
+
? DIVISION_LABELS[group.division]
|
|
15509
|
+
: `${DIVISION_LABELS[group.division]} (new Route)`,
|
|
15510
|
+
options: group.tripTypes.map((tripType) => ({ value: tripType, label: TRIP_TYPE_LABELS[tripType] })),
|
|
15511
|
+
})), value: tripTypeToAdd, onChange: (event) => setTripTypeToAdd(event.target.value), "data-test": "incident-add-trip-type-select" }), jsx(Button, { size: "sm", variant: "secondary", disabled: !tripTypeToAdd, onClick: addTripType, "aria-label": `Add trip type to ${label}`, "data-test": "incident-add-trip-type", children: "Add" })] }))] }), jsx(IncidentNotes, { notes: incident.notes, incidentLabel: label, timeZone: timeZone, defaultExpanded: defaultNotesExpanded, onAddNote: (text) => onAddNote?.(incident.id, text) }), jsxs("div", { className: sx(footerStyle$9), children: [ready && (jsxs("span", { className: sx(readyStyle), "data-test": "incident-ready-to-resolve", children: [jsx(CheckIcon$1, { size: 14, "aria-hidden": "true" }), "Every Route is complete \u2014 ready to resolve"] })), jsx(Button, { size: "sm", variant: "primary", onClick: () => onResolve?.(incident.id), "aria-label": `Resolve ${label}`, "data-test": "incident-resolve", children: "Resolve" })] })] }));
|
|
15512
|
+
};
|
|
15513
|
+
IncidentCard.displayName = 'IncidentCard';
|
|
15514
|
+
|
|
15515
|
+
/** IncidentIntakeForm's compiled rules. Compact by design: the target is intake in under a minute. */
|
|
15516
|
+
const formStyle$5 = {
|
|
15517
|
+
label: 'IncidentIntakeForm-formStyle',
|
|
15518
|
+
display: 'flex',
|
|
15519
|
+
flexDirection: 'column',
|
|
15520
|
+
gap: 'var(--space-3)',
|
|
15521
|
+
minWidth: 0,
|
|
15522
|
+
};
|
|
15523
|
+
const rowStyle$5 = {
|
|
15524
|
+
label: 'IncidentIntakeForm-rowStyle',
|
|
15525
|
+
display: 'grid',
|
|
15526
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(13rem, 1fr))',
|
|
15527
|
+
gap: 'var(--space-3)',
|
|
15528
|
+
};
|
|
15529
|
+
const fieldsetStyle$1 = {
|
|
15530
|
+
label: 'IncidentIntakeForm-fieldsetStyle',
|
|
15531
|
+
display: 'flex',
|
|
15532
|
+
flexDirection: 'column',
|
|
15533
|
+
gap: 'var(--space-1-5)',
|
|
15534
|
+
minWidth: 0,
|
|
15535
|
+
margin: 0,
|
|
15536
|
+
padding: 0,
|
|
15537
|
+
border: 0,
|
|
15538
|
+
};
|
|
15539
|
+
const legendStyle$2 = {
|
|
15540
|
+
label: 'IncidentIntakeForm-legendStyle',
|
|
15541
|
+
marginBottom: 'var(--space-1-5)',
|
|
15542
|
+
padding: 0,
|
|
15543
|
+
color: 'var(--fg-1)',
|
|
15544
|
+
fontSize: 'var(--fs-sm)',
|
|
15545
|
+
fontWeight: 'var(--fw-medium)',
|
|
15546
|
+
};
|
|
15547
|
+
const groupGridStyle = {
|
|
15548
|
+
label: 'IncidentIntakeForm-groupGridStyle',
|
|
15549
|
+
display: 'grid',
|
|
15550
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(9rem, 1fr))',
|
|
15551
|
+
gap: 'var(--space-2)',
|
|
15552
|
+
};
|
|
15553
|
+
/* One Division's trip types. A group with a ticked trip type is outlined: that Division gets a Route. */
|
|
15554
|
+
const divisionGroupStyle = {
|
|
15555
|
+
label: 'IncidentIntakeForm-divisionGroupStyle',
|
|
15556
|
+
minWidth: 0,
|
|
15557
|
+
margin: 0,
|
|
15558
|
+
padding: 'var(--space-2) var(--space-3)',
|
|
15559
|
+
border: '1px solid var(--border-color)',
|
|
15560
|
+
borderRadius: 'var(--radius-lg)',
|
|
15561
|
+
};
|
|
15562
|
+
const groupTickedStyle = {
|
|
15563
|
+
label: 'IncidentIntakeForm-groupTickedStyle',
|
|
15564
|
+
borderColor: 'var(--color-primary)',
|
|
15565
|
+
background: 'var(--bg-subtle)',
|
|
15566
|
+
};
|
|
15567
|
+
const groupLegendStyle = {
|
|
15568
|
+
label: 'IncidentIntakeForm-groupLegendStyle',
|
|
15569
|
+
padding: '0 var(--space-1)',
|
|
15570
|
+
color: 'var(--fg-2)',
|
|
15571
|
+
fontSize: 'var(--fs-xs)',
|
|
15572
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15573
|
+
textTransform: 'uppercase',
|
|
15574
|
+
letterSpacing: '0.04em',
|
|
15575
|
+
};
|
|
15576
|
+
const tripTypeRowStyle = {
|
|
15577
|
+
label: 'IncidentIntakeForm-tripTypeRowStyle',
|
|
15578
|
+
display: 'flex',
|
|
15579
|
+
flexWrap: 'wrap',
|
|
15580
|
+
gap: 'var(--space-1-5) var(--space-3)',
|
|
15581
|
+
};
|
|
15582
|
+
const errorTextStyle = {
|
|
15583
|
+
label: 'IncidentIntakeForm-errorTextStyle',
|
|
15584
|
+
margin: 0,
|
|
15585
|
+
color: 'var(--color-error)',
|
|
15586
|
+
fontSize: 'var(--fs-xs)',
|
|
15587
|
+
};
|
|
15588
|
+
const helperTextStyle = {
|
|
15589
|
+
label: 'IncidentIntakeForm-helperTextStyle',
|
|
15590
|
+
margin: 0,
|
|
15591
|
+
color: 'var(--fg-3)',
|
|
15592
|
+
fontSize: 'var(--fs-xs)',
|
|
15593
|
+
};
|
|
15594
|
+
const footerStyle$8 = {
|
|
15595
|
+
label: 'IncidentIntakeForm-footerStyle',
|
|
15596
|
+
display: 'flex',
|
|
15597
|
+
flexWrap: 'wrap',
|
|
15598
|
+
alignItems: 'flex-end',
|
|
15599
|
+
justifyContent: 'flex-end',
|
|
15600
|
+
gap: 'var(--space-3)',
|
|
15601
|
+
paddingTop: 'var(--space-1)',
|
|
15602
|
+
};
|
|
15603
|
+
const actionsStyle$7 = {
|
|
15604
|
+
label: 'IncidentIntakeForm-actionsStyle',
|
|
15605
|
+
display: 'flex',
|
|
15606
|
+
gap: 'var(--space-2)',
|
|
15607
|
+
marginLeft: 'auto',
|
|
15608
|
+
};
|
|
15609
|
+
/* Textarea's size ramp pins a single-line height; let `rows` set it instead. */
|
|
15610
|
+
const textareaRowsStyle$1 = {
|
|
15611
|
+
label: 'IncidentIntakeForm-textareaRowsStyle',
|
|
15612
|
+
'& textarea': { height: 'auto' },
|
|
15613
|
+
};
|
|
15614
|
+
/* Select's own error text uses an off-token red that fails contrast; restate Input's error token. */
|
|
15615
|
+
const selectErrorTokenStyle = {
|
|
15616
|
+
label: 'IncidentIntakeForm-selectErrorTokenStyle',
|
|
15617
|
+
'& [id$="-error"]': { color: 'var(--color-error)' },
|
|
15618
|
+
};
|
|
15619
|
+
|
|
15620
|
+
const DIVISION_OPTIONS = DIVISIONS.map((division) => ({ value: division.value, label: division.label }));
|
|
15621
|
+
const FIELD_ORDER = ['account', 'callbackNumber', 'loggingDivision', 'tripTypes', 'narrative'];
|
|
15622
|
+
const emptyValues = (loggingDivision) => ({
|
|
15623
|
+
accountName: '',
|
|
15624
|
+
teamId: '',
|
|
15625
|
+
callbackNumber: '',
|
|
15626
|
+
callerName: '',
|
|
15627
|
+
loggingDivision,
|
|
15628
|
+
tripTypes: [],
|
|
15629
|
+
leadDivision: loggingDivision,
|
|
15630
|
+
incidentType: '',
|
|
15631
|
+
narrative: '',
|
|
15632
|
+
});
|
|
15633
|
+
/** Divisions with at least one ticked trip type, in display order — one Route each. */
|
|
15634
|
+
const divisionsForTripTypes = (tripTypes) => DIVISIONS.map((division) => division.value).filter((division) => tripTypes.some((tripType) => tripTypeDivision(tripType) === division));
|
|
15635
|
+
const findAccount = (accounts, name) => accounts.find((account) => account.name.toLowerCase() === name.trim().toLowerCase());
|
|
15636
|
+
/** The validation message per field, or nothing when the field is fine. */
|
|
15637
|
+
const validateIncidentIntake = (values, accounts) => {
|
|
15638
|
+
const errors = {};
|
|
15639
|
+
if (!values.accountName.trim())
|
|
15640
|
+
errors.account = 'Enter the client or account.';
|
|
15641
|
+
else if (!findAccount(accounts, values.accountName))
|
|
15642
|
+
errors.account = 'Choose an account from the list.';
|
|
15643
|
+
const digits = values.callbackNumber.replace(/\D/g, '');
|
|
15644
|
+
if (!digits)
|
|
15645
|
+
errors.callbackNumber = 'Enter a callback number.';
|
|
15646
|
+
else if (digits.length < 7)
|
|
15647
|
+
errors.callbackNumber = 'Callback number needs at least 7 digits.';
|
|
15648
|
+
if (!values.loggingDivision)
|
|
15649
|
+
errors.loggingDivision = 'Choose the Division you are logging as.';
|
|
15650
|
+
if (values.tripTypes.length === 0)
|
|
15651
|
+
errors.tripTypes = 'Tick at least one trip type.';
|
|
15652
|
+
if (!values.narrative.trim())
|
|
15653
|
+
errors.narrative = 'Describe the issue.';
|
|
15654
|
+
return errors;
|
|
15655
|
+
};
|
|
15656
|
+
/**
|
|
15657
|
+
* The "New incident" intake form. Trip types are ticked under their Division;
|
|
15658
|
+
* every Division with a ticked trip type gets one Route. Lead Division follows
|
|
15659
|
+
* Logging as until changed by hand; picking a Lead Division with nothing
|
|
15660
|
+
* ticked ticks its first trip type. Team is hidden when Agency leads.
|
|
15661
|
+
*/
|
|
15662
|
+
const IncidentIntakeForm = ({ accounts, defaultLoggingDivision, onSubmit, onLoggingDivisionChange, onCancel, submitting = false, ariaLabel = 'New incident', className = '', }) => {
|
|
15663
|
+
const id = useId();
|
|
15664
|
+
const [values, setValues] = useState(() => emptyValues(defaultLoggingDivision ?? ''));
|
|
15665
|
+
const [leadTouched, setLeadTouched] = useState(false);
|
|
15666
|
+
const [attempted, setAttempted] = useState(false);
|
|
15667
|
+
const fieldRefs = useRef({});
|
|
15668
|
+
const account = findAccount(accounts, values.accountName);
|
|
15669
|
+
const teamOptions = useMemo(() => (account?.teams ?? []).map((team) => ({ value: team.id, label: team.name })), [account]);
|
|
15670
|
+
const showTeam = values.leadDivision !== 'agency';
|
|
15671
|
+
const errors = attempted ? validateIncidentIntake(values, accounts) : {};
|
|
15672
|
+
const ticked = divisionsForTripTypes(values.tripTypes);
|
|
15673
|
+
const set = (key, value) => setValues((current) => ({ ...current, [key]: value }));
|
|
15674
|
+
const changeLogging = (division) => {
|
|
15675
|
+
setValues((current) => ({
|
|
15676
|
+
...current,
|
|
15677
|
+
loggingDivision: division,
|
|
15678
|
+
leadDivision: leadTouched ? current.leadDivision : division,
|
|
15679
|
+
}));
|
|
15680
|
+
onLoggingDivisionChange?.(division);
|
|
15681
|
+
};
|
|
15682
|
+
const changeLead = (division) => {
|
|
15683
|
+
setLeadTouched(true);
|
|
15684
|
+
setValues((current) => {
|
|
15685
|
+
const hasRoute = current.tripTypes.some((tripType) => tripTypeDivision(tripType) === division);
|
|
15686
|
+
const first = DIVISIONS.find((item) => item.value === division).tripTypes[0];
|
|
15687
|
+
return {
|
|
15688
|
+
...current,
|
|
15689
|
+
leadDivision: division,
|
|
15690
|
+
tripTypes: hasRoute ? current.tripTypes : sortTripTypes([...current.tripTypes, first]),
|
|
15691
|
+
};
|
|
15692
|
+
});
|
|
15693
|
+
};
|
|
15694
|
+
const toggleTripType = (tripType, checked) => setValues((current) => ({
|
|
15695
|
+
...current,
|
|
15696
|
+
tripTypes: checked
|
|
15697
|
+
? sortTripTypes([...current.tripTypes, tripType])
|
|
15698
|
+
: current.tripTypes.filter((value) => value !== tripType),
|
|
15699
|
+
}));
|
|
15700
|
+
const handleSubmit = (event) => {
|
|
15701
|
+
event.preventDefault();
|
|
15702
|
+
setAttempted(true);
|
|
15703
|
+
const found = validateIncidentIntake(values, accounts);
|
|
15704
|
+
const firstInvalid = FIELD_ORDER.find((key) => found[key]);
|
|
15705
|
+
if (firstInvalid) {
|
|
15706
|
+
fieldRefs.current[firstInvalid]?.focus();
|
|
15707
|
+
return;
|
|
15708
|
+
}
|
|
15709
|
+
const loggingDivision = values.loggingDivision;
|
|
15710
|
+
onSubmit({
|
|
15711
|
+
accountId: account.id,
|
|
15712
|
+
teamId: showTeam && values.teamId ? values.teamId : undefined,
|
|
15713
|
+
callbackNumber: values.callbackNumber.trim(),
|
|
15714
|
+
callerName: values.callerName.trim() || undefined,
|
|
15715
|
+
loggingDivision,
|
|
15716
|
+
tripTypes: values.tripTypes,
|
|
15717
|
+
divisions: divisionsForTripTypes(values.tripTypes),
|
|
15718
|
+
leadDivision: (values.leadDivision || loggingDivision),
|
|
15719
|
+
incidentType: values.incidentType.trim() || undefined,
|
|
15720
|
+
narrative: values.narrative.trim(),
|
|
15721
|
+
priority: 'routine',
|
|
15722
|
+
});
|
|
15723
|
+
setValues(emptyValues(loggingDivision));
|
|
15724
|
+
setLeadTouched(false);
|
|
15725
|
+
setAttempted(false);
|
|
15726
|
+
};
|
|
15727
|
+
return (jsxs("form", { className: cx(sx(formStyle$5), className), "aria-label": ariaLabel, noValidate: true, onSubmit: handleSubmit, "data-test": "incident-intake-form", children: [jsxs("div", { className: sx(rowStyle$5), children: [jsx(Input, { id: `${id}-account`, ref: (node) => {
|
|
15728
|
+
fieldRefs.current.account = node;
|
|
15729
|
+
}, label: "Client / Account", placeholder: "Start typing a school\u2026", list: `${id}-accounts`, autoComplete: "off", value: values.accountName, onChange: (event) => setValues((current) => ({ ...current, accountName: event.target.value, teamId: '' })), error: errors.account, required: true, fullWidth: true, size: "sm", "data-test": "incident-intake-account" }), jsx("datalist", { id: `${id}-accounts`, children: accounts.map((option) => (jsx("option", { value: option.name }, option.id))) }), showTeam && (jsx(Select, { id: `${id}-team`, label: "Team (optional)", placeholder: account ? (teamOptions.length ? 'Select a team' : 'No teams on this account') : 'Choose an account first', options: teamOptions, value: values.teamId, onChange: (event) => set('teamId', event.target.value), disabled: !account || teamOptions.length === 0, fullWidth: true, size: "sm", "data-test": "incident-intake-team" }))] }), jsxs("div", { className: sx(rowStyle$5), children: [jsx(Input, { id: `${id}-callback`, ref: (node) => {
|
|
15730
|
+
fieldRefs.current.callbackNumber = node;
|
|
15731
|
+
}, label: "Callback number", type: "tel", inputMode: "tel", autoComplete: "off", value: values.callbackNumber, onChange: (event) => set('callbackNumber', event.target.value), error: errors.callbackNumber, required: true, fullWidth: true, size: "sm", "data-test": "incident-intake-callback" }), jsx(Input, { id: `${id}-caller`, label: "Caller name (optional)", autoComplete: "off", value: values.callerName, onChange: (event) => set('callerName', event.target.value), fullWidth: true, size: "sm", "data-test": "incident-intake-caller" })] }), jsxs("div", { className: sx(rowStyle$5), children: [jsx(Select, { id: `${id}-logging`, ref: (node) => {
|
|
15732
|
+
fieldRefs.current.loggingDivision = node;
|
|
15733
|
+
}, label: "Logging as", placeholder: "Select your Division", options: DIVISION_OPTIONS, value: values.loggingDivision, onChange: (event) => changeLogging(event.target.value), helperText: "Remembered for your next incident.", error: errors.loggingDivision, "aria-required": "true", className: sx(selectErrorTokenStyle), fullWidth: true, size: "sm", "data-test": "incident-intake-logging-division" }), jsx(Select, { id: `${id}-lead`, label: "Lead Division", placeholder: "Defaults to Logging as", options: DIVISION_OPTIONS, value: values.leadDivision, onChange: (event) => changeLead(event.target.value), helperText: "If nothing of it is ticked, its first trip type is ticked below.", fullWidth: true, size: "sm", "data-test": "incident-intake-lead-division" })] }), jsxs("fieldset", { className: sx(fieldsetStyle$1), "aria-describedby": errors.tripTypes ? `${id}-trip-types-error` : `${id}-trip-types-help`, "data-test": "incident-intake-trip-types", children: [jsx("legend", { className: sx(legendStyle$2), children: "Trip types involved" }), jsx("div", { className: sx(groupGridStyle), children: DIVISIONS.map((division, groupIndex) => (jsxs("fieldset", { className: cx(sx(divisionGroupStyle), ticked.includes(division.value) && sx(groupTickedStyle)), "data-test": `incident-intake-division-${division.value}`, "data-ticked": ticked.includes(division.value) || undefined, children: [jsx("legend", { className: sx(groupLegendStyle), children: division.label }), jsx("div", { className: sx(tripTypeRowStyle), children: division.tripTypes.map((tripType, index) => (jsx(Checkbox, { ref: groupIndex === 0 && index === 0
|
|
15734
|
+
? (node) => {
|
|
15735
|
+
fieldRefs.current.tripTypes = node;
|
|
15736
|
+
}
|
|
15737
|
+
: undefined, size: "sm", label: TRIP_TYPE_LABELS[tripType], checked: values.tripTypes.includes(tripType), onChange: (event) => toggleTripType(tripType, event.target.checked), "data-test": `incident-intake-trip-type-${tripType}` }, tripType))) })] }, division.value))) }), errors.tripTypes ? (jsx("p", { id: `${id}-trip-types-error`, className: sx(errorTextStyle), children: errors.tripTypes })) : (jsx("p", { id: `${id}-trip-types-help`, className: sx(helperTextStyle), children: "Each Division with a ticked trip type is notified." }))] }), jsx(Input, { id: `${id}-type`, label: "Incident type (optional)", placeholder: "e.g. Charter delay, bus no-show", autoComplete: "off", value: values.incidentType, onChange: (event) => set('incidentType', event.target.value), fullWidth: true, size: "sm", "data-test": "incident-intake-type" }), jsx(Textarea, { id: `${id}-narrative`, ref: (node) => {
|
|
15738
|
+
fieldRefs.current.narrative = node;
|
|
15739
|
+
}, label: "Issue narrative", rows: 4, value: values.narrative, onChange: (event) => set('narrative', event.target.value), error: errors.narrative, required: true, fullWidth: true, size: "sm", "data-test": "incident-intake-narrative", className: sx(textareaRowsStyle$1) }), jsx("div", { className: sx(footerStyle$8), children: jsxs("div", { className: sx(actionsStyle$7), children: [onCancel && (jsx(Button, { type: "button", variant: "secondary", onClick: onCancel, "data-test": "incident-intake-cancel", children: "Cancel" })), jsx(Button, { type: "submit", variant: "primary", loading: submitting, "data-test": "incident-intake-submit", children: "Log incident" })] }) })] }));
|
|
15740
|
+
};
|
|
15741
|
+
IncidentIntakeForm.displayName = 'IncidentIntakeForm';
|
|
15742
|
+
|
|
14759
15743
|
/**
|
|
14760
15744
|
* Explicit specificity keeps service and cancellation border colors stable
|
|
14761
15745
|
* regardless of style injection order: base < type (`&&`) < cancelled (`&&&`).
|
|
@@ -16221,7 +17205,7 @@ const scrollBodyStyle = {
|
|
|
16221
17205
|
minHeight: 0,
|
|
16222
17206
|
overflowY: 'auto',
|
|
16223
17207
|
};
|
|
16224
|
-
const bodyStyle$
|
|
17208
|
+
const bodyStyle$5 = {
|
|
16225
17209
|
label: 'Module-bodyStyle',
|
|
16226
17210
|
flex: 1,
|
|
16227
17211
|
fontSize: 14,
|
|
@@ -16294,7 +17278,7 @@ const Module = ({ title, icon, iconClassName = '', badge, before, children, afte
|
|
|
16294
17278
|
setOpen(!open);
|
|
16295
17279
|
}
|
|
16296
17280
|
};
|
|
16297
|
-
return (jsxs("div", { className: cx(sx(moduleStyle), className), children: [title && (jsx("div", { className: cx(sx(headerStyle$u), sx(headerSizeStyles[size]), !open && sx(closedStyle), headerClassName), children: jsxs("div", { className: cx(sx(titleRowStyle$1), sx(titleRowSizeStyles[size]), titleClassName), children: [icon && (jsx("span", { className: cx(sx(iconStyle$1), size !== 'sm' && sx(iconSpacedStyle), iconClassName), children: icon })), jsx("div", { className: sx(titleStyle$r), children: title }), badge && jsx("span", { className: sx(badgeStyle$1), children: badge }), jsxs("div", { className: sx(toolsStyle), children: [tools, useToggle && (jsx("button", { type: "button", className: sx(toggleBtnStyle), onClick: handleToggle, "aria-expanded": open, children: jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxs("div", { className: cx(sx(bodyWrapperStyle), scrollBody && sx(scrollBodyStyle)), children: [before, jsx("div", { className: cx(sx(bodyStyle$
|
|
17281
|
+
return (jsxs("div", { className: cx(sx(moduleStyle), className), children: [title && (jsx("div", { className: cx(sx(headerStyle$u), sx(headerSizeStyles[size]), !open && sx(closedStyle), headerClassName), children: jsxs("div", { className: cx(sx(titleRowStyle$1), sx(titleRowSizeStyles[size]), titleClassName), children: [icon && (jsx("span", { className: cx(sx(iconStyle$1), size !== 'sm' && sx(iconSpacedStyle), iconClassName), children: icon })), jsx("div", { className: sx(titleStyle$r), children: title }), badge && jsx("span", { className: sx(badgeStyle$1), children: badge }), jsxs("div", { className: sx(toolsStyle), children: [tools, useToggle && (jsx("button", { type: "button", className: sx(toggleBtnStyle), onClick: handleToggle, "aria-expanded": open, children: jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxs("div", { className: cx(sx(bodyWrapperStyle), scrollBody && sx(scrollBodyStyle)), children: [before, jsx("div", { className: cx(sx(bodyStyle$5), sx(bodySizeStyles[size]), !open && sx(hiddenStyle), bodyClassName), children: children }), after] }), footer && (jsx("div", { className: cx(sx(footerStyle$6), !open && sx(hiddenStyle)), children: footer }))] }));
|
|
16298
17282
|
};
|
|
16299
17283
|
/**
|
|
16300
17284
|
* Horizontal divider for Module content
|
|
@@ -18282,6 +19266,82 @@ const RequestSummary = ({ sections, values, enabledSections = {}, submissionInfo
|
|
|
18282
19266
|
};
|
|
18283
19267
|
RequestSummary.displayName = 'RequestSummary';
|
|
18284
19268
|
|
|
19269
|
+
/** ResolveIncidentDialog's compiled rules. */
|
|
19270
|
+
const bodyStyle$4 = {
|
|
19271
|
+
label: 'ResolveIncidentDialog-bodyStyle',
|
|
19272
|
+
display: 'flex',
|
|
19273
|
+
flexDirection: 'column',
|
|
19274
|
+
gap: 'var(--space-4)',
|
|
19275
|
+
};
|
|
19276
|
+
const fieldsetStyle = {
|
|
19277
|
+
label: 'ResolveIncidentDialog-fieldsetStyle',
|
|
19278
|
+
display: 'flex',
|
|
19279
|
+
flexDirection: 'column',
|
|
19280
|
+
gap: 'var(--space-2)',
|
|
19281
|
+
margin: 0,
|
|
19282
|
+
padding: 0,
|
|
19283
|
+
border: 0,
|
|
19284
|
+
};
|
|
19285
|
+
const legendStyle$1 = {
|
|
19286
|
+
label: 'ResolveIncidentDialog-legendStyle',
|
|
19287
|
+
marginBottom: 'var(--space-2)',
|
|
19288
|
+
padding: 0,
|
|
19289
|
+
color: 'var(--fg-1)',
|
|
19290
|
+
fontSize: 'var(--fs-sm)',
|
|
19291
|
+
fontWeight: 'var(--fw-medium)',
|
|
19292
|
+
};
|
|
19293
|
+
const noteStyle$2 = {
|
|
19294
|
+
label: 'ResolveIncidentDialog-noteStyle',
|
|
19295
|
+
margin: 0,
|
|
19296
|
+
color: 'var(--fg-2)',
|
|
19297
|
+
fontSize: 'var(--fs-sm)',
|
|
19298
|
+
lineHeight: 'var(--lh-sm)',
|
|
19299
|
+
};
|
|
19300
|
+
/* Textarea's size ramp pins a single-line height; let `rows` set it instead. */
|
|
19301
|
+
const textareaRowsStyle = {
|
|
19302
|
+
label: 'ResolveIncidentDialog-textareaRowsStyle',
|
|
19303
|
+
'& textarea': { height: 'auto' },
|
|
19304
|
+
};
|
|
19305
|
+
|
|
19306
|
+
/**
|
|
19307
|
+
* Closes an Open Incident, taking it off the Alert Log and into the Archive.
|
|
19308
|
+
* "Resolved" requires a root cause; "Logged in error" needs none. There is no
|
|
19309
|
+
* reopening, so the confirm button says exactly what it does.
|
|
19310
|
+
*/
|
|
19311
|
+
const ResolveIncidentDialog = ({ isOpen, incidentNumber, accountName, unacknowledgedCount = 0, defaultResolution = 'resolved', onConfirm, onClose, submitting = false, }) => {
|
|
19312
|
+
const id = useId();
|
|
19313
|
+
const formId = `${id}-form`;
|
|
19314
|
+
const [resolution, setResolution] = useState(defaultResolution);
|
|
19315
|
+
const [rootCause, setRootCause] = useState('');
|
|
19316
|
+
const [attempted, setAttempted] = useState(false);
|
|
19317
|
+
const firstRadioRef = useRef(null);
|
|
19318
|
+
const rootCauseRef = useRef(null);
|
|
19319
|
+
useEffect(() => {
|
|
19320
|
+
if (!isOpen)
|
|
19321
|
+
return;
|
|
19322
|
+
setResolution(defaultResolution);
|
|
19323
|
+
setRootCause('');
|
|
19324
|
+
setAttempted(false);
|
|
19325
|
+
firstRadioRef.current?.focus();
|
|
19326
|
+
}, [isOpen, defaultResolution]);
|
|
19327
|
+
const rootCauseError = attempted && resolution === 'resolved' && !rootCause.trim() ? 'Enter the root cause.' : undefined;
|
|
19328
|
+
const handleSubmit = (event) => {
|
|
19329
|
+
event.preventDefault();
|
|
19330
|
+
setAttempted(true);
|
|
19331
|
+
if (resolution === 'resolved') {
|
|
19332
|
+
if (!rootCause.trim()) {
|
|
19333
|
+
rootCauseRef.current?.focus();
|
|
19334
|
+
return;
|
|
19335
|
+
}
|
|
19336
|
+
onConfirm({ resolution, rootCause: rootCause.trim() });
|
|
19337
|
+
return;
|
|
19338
|
+
}
|
|
19339
|
+
onConfirm({ resolution });
|
|
19340
|
+
};
|
|
19341
|
+
return (jsx(Modal, { isOpen: isOpen, onClose: onClose, size: "sm", title: incidentNumber ? `Resolve ${incidentNumber}` : 'Resolve incident', subtitle: accountName, footer: jsxs(ModalFooter, { children: [jsx(Button, { type: "button", variant: "secondary", onClick: onClose, "data-test": "resolve-incident-cancel", children: "Cancel" }), jsx(Button, { type: "submit", form: formId, loading: submitting, "data-test": "resolve-incident-confirm", children: resolution === 'resolved' ? 'Resolve incident' : 'Close as logged in error' })] }), children: jsxs("form", { id: formId, className: sx(bodyStyle$4), noValidate: true, onSubmit: handleSubmit, children: [jsxs("fieldset", { className: sx(fieldsetStyle), children: [jsx("legend", { className: sx(legendStyle$1), children: "Outcome" }), jsx(Checkbox, { ref: firstRadioRef, type: "radio", name: `${id}-outcome`, value: "resolved", label: "Resolved", helperText: "The issue was handled. Record the root cause.", checked: resolution === 'resolved', onChange: () => setResolution('resolved'), "data-test": "resolve-incident-resolved" }), jsx(Checkbox, { type: "radio", name: `${id}-outcome`, value: "logged-in-error", label: "Logged in error", helperText: "Duplicate, test or not a real incident. No root cause needed.", checked: resolution === 'logged-in-error', onChange: () => setResolution('logged-in-error'), "data-test": "resolve-incident-logged-in-error" })] }), resolution === 'resolved' && (jsx(Textarea, { id: `${id}-root-cause`, ref: rootCauseRef, label: "Root cause", rows: 3, value: rootCause, onChange: (event) => setRootCause(event.target.value), error: rootCauseError, required: true, fullWidth: true, size: "sm", "data-test": "resolve-incident-root-cause", className: sx(textareaRowsStyle) })), unacknowledgedCount > 0 && (jsxs("p", { className: sx(noteStyle$2), "data-test": "resolve-incident-unacknowledged", children: [unacknowledgedCount === 1 ? '1 Division has' : `${unacknowledgedCount} Divisions have`, " not acknowledged yet. You can still resolve."] }))] }) }));
|
|
19342
|
+
};
|
|
19343
|
+
ResolveIncidentDialog.displayName = 'ResolveIncidentDialog';
|
|
19344
|
+
|
|
18285
19345
|
/* RequestFormLayout's compiled rules.
|
|
18286
19346
|
*
|
|
18287
19347
|
* The chrome shared by every Hub travel request form. The offsets here are
|
|
@@ -29885,7 +30945,7 @@ const TripTable = ({ trips, variant = 'current', density = 'comfortable', vendor
|
|
|
29885
30945
|
* `.card:hover .chevron`), so the icon and the chevron are declared first and
|
|
29886
30946
|
* their generated class names resolved into `cardStyle` as computed keys.
|
|
29887
30947
|
*/
|
|
29888
|
-
const pageStyle$
|
|
30948
|
+
const pageStyle$u = {
|
|
29889
30949
|
label: 'AdministrationPage-pageStyle',
|
|
29890
30950
|
color: 'var(--color-ink)',
|
|
29891
30951
|
};
|
|
@@ -30022,10 +31082,10 @@ const AdministrationPage = ({ activeTab = 'system', enabledTabs = ADMINISTRATION
|
|
|
30022
31082
|
const resolvedActiveTab = visibleTabs.some((tab) => tab.key === activeTab)
|
|
30023
31083
|
? activeTab
|
|
30024
31084
|
: visibleTabs[0]?.key;
|
|
30025
|
-
return jsxs("div", { className: cx(sx(pageStyle$
|
|
31085
|
+
return jsxs("div", { className: cx(sx(pageStyle$u), className), children: [jsx("header", { className: sx(headerStyle$n), children: jsx("h1", { children: "Administration\u00A0" }) }), visibleTabs.length > 0 && (jsx(TabStrip, { className: sx(tabsStyle$5), tabs: visibleTabs.map((tab) => ({ id: tab.key, label: tab.label })), activeTab: resolvedActiveTab, onTabChange: (id) => onTabChange?.(id), "aria-label": "Administration sections" })), children ?? (resolvedActiveTab === 'system' ? (jsx("div", { className: sx(cardsStyle$1), children: resolvedCards.map((card) => (jsxs("button", { type: "button", className: sx(cardStyle$5), onClick: () => onCardClick?.(card), children: [jsx("span", { className: sx(cardIconStyle$1), children: card.icon }), jsxs("span", { className: sx(cardCopyStyle), children: [jsx("span", { className: sx(cardTitleStyle$2), children: card.title }), jsx("span", { className: sx(cardDescriptionStyle$1), children: card.description })] }), jsx(ChevronRightIcon$1, { className: sx(chevronStyle), size: 14 })] }, card.key))) })) : resolvedActiveTab === 'client' ? (jsx("p", { className: sx(comingSoonStyle), children: "Client administration settings coming soon." })) : (jsx("p", { className: sx(comingSoonStyle), "data-test": "administration-empty-tabs", children: "No administration sections are available." })))] });
|
|
30026
31086
|
};
|
|
30027
31087
|
|
|
30028
|
-
const pageStyle$
|
|
31088
|
+
const pageStyle$t = {
|
|
30029
31089
|
label: 'AgentGroupTravelRequestsPage-pageStyle',
|
|
30030
31090
|
display: 'flex',
|
|
30031
31091
|
flexDirection: 'column',
|
|
@@ -30062,12 +31122,12 @@ const quickLinksStyle = {
|
|
|
30062
31122
|
};
|
|
30063
31123
|
|
|
30064
31124
|
/** Hub's agent-facing Group Travel Request screen — the "Book a Trip" quick links plus the open-requests list. */
|
|
30065
|
-
const AgentGroupTravelRequestsPage = ({ title = 'Group Travel Request', requests, sports, views, today, isStmEmployee = true, onBackToBookATrip, onSubmitNewRequest, onSubmitAgentRequest, onSearchPastRequests, onShowCdsRequests, onShowActionableItems, onAdministerViews, onOpenRequest, onViewMasterTrip, onDeleteRequest, onCopyPnr, onToggleDueStatus, onSubmittedDateChange, onQuoteSentDateChange, className = '', }) => (jsxs("div", { className: cx(sx(pageStyle$
|
|
31125
|
+
const AgentGroupTravelRequestsPage = ({ title = 'Group Travel Request', requests, sports, views, today, isStmEmployee = true, onBackToBookATrip, onSubmitNewRequest, onSubmitAgentRequest, onSearchPastRequests, onShowCdsRequests, onShowActionableItems, onAdministerViews, onOpenRequest, onViewMasterTrip, onDeleteRequest, onCopyPnr, onToggleDueStatus, onSubmittedDateChange, onQuoteSentDateChange, className = '', }) => (jsxs("div", { className: cx(sx(pageStyle$t), className), "data-test": "agent-gtr-page", children: [jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$9), onClick: onBackToBookATrip, children: "Book a Trip" }), jsx("h1", { className: sx(titleStyle$j), children: title }), jsxs("ul", { className: sx(quickLinksStyle), children: [jsx("li", { children: jsx(Button, { variant: "ghost", onClick: onSubmitNewRequest, children: "Submit a new group travel request" }) }), isStmEmployee && (jsx("li", { children: jsx(Button, { variant: "ghost", onClick: onSubmitAgentRequest, children: "Submit a new group travel request (agent use only)" }) })), jsx("li", { children: jsx(Button, { variant: "ghost", onClick: onSearchPastRequests, children: "Search past travel requests/Non-agent-only requests" }) }), isStmEmployee && (jsxs(Fragment, { children: [jsx("li", { children: jsx(Button, { variant: "ghost", onClick: onShowCdsRequests, children: "Show all open CDS group travel requests" }) }), jsx("li", { children: jsx(Button, { variant: "ghost", onClick: onShowActionableItems, children: "Show this week's actionable items" }) }), jsx("li", { children: jsx(Button, { variant: "ghost", onClick: onAdministerViews, children: "Administer your views" }) })] }))] }), jsx(AgentGroupTravelRequestsTable, { requests: requests, sports: sports, views: views, today: today, onOpenRequest: onOpenRequest, onViewMasterTrip: onViewMasterTrip, onDeleteRequest: onDeleteRequest, onCopyPnr: onCopyPnr, onToggleDueStatus: onToggleDueStatus, onSubmittedDateChange: onSubmittedDateChange, onQuoteSentDateChange: onQuoteSentDateChange })] }));
|
|
30066
31126
|
|
|
30067
31127
|
/** CarrierProfilePage's compiled rules. A straight translation: the only
|
|
30068
31128
|
* overrides are the mobile media query, which is nested into the two styles
|
|
30069
31129
|
* it repadded, and an at-rule always outranks the declaration beside it. */
|
|
30070
|
-
const pageStyle$
|
|
31130
|
+
const pageStyle$s = {
|
|
30071
31131
|
label: 'CarrierProfilePage-pageStyle',
|
|
30072
31132
|
display: 'flex',
|
|
30073
31133
|
flexDirection: 'column',
|
|
@@ -30096,7 +31156,7 @@ const titleStyle$i = {
|
|
|
30096
31156
|
fontWeight: 'var(--fw-semibold)',
|
|
30097
31157
|
lineHeight: 'var(--lh-2xl)',
|
|
30098
31158
|
};
|
|
30099
|
-
const descriptionStyle$
|
|
31159
|
+
const descriptionStyle$9 = {
|
|
30100
31160
|
label: 'CarrierProfilePage-descriptionStyle',
|
|
30101
31161
|
maxWidth: '72ch',
|
|
30102
31162
|
margin: 0,
|
|
@@ -30318,12 +31378,12 @@ const CarrierProfilePage = ({ carrierName, preferences: initialPreferences, cate
|
|
|
30318
31378
|
render: (_value, item) => (jsxs("span", { className: sx(rowActionsStyle), children: [canEditAircraft && (jsx(Button, { variant: "ghost", size: "sm", square: true, "aria-label": `Edit ${item.name}`, onClick: () => onEditAircraft?.(item.aircraftId), "data-test": "carrier-aircraft-edit", children: jsx(EditIcon$2, { size: 16 }) })), canDeleteAircraft && (jsx(Button, { variant: "ghost", size: "sm", square: true, "aria-label": `Delete ${item.name}`, onClick: () => onDeleteAircraft?.(item.aircraftId), "data-test": "carrier-aircraft-delete", children: jsx(TrashIcon$2, { size: 16 }) }))] })),
|
|
30319
31379
|
}] : []),
|
|
30320
31380
|
];
|
|
30321
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
31381
|
+
return (jsxs("div", { className: cx(sx(pageStyle$s), className), "data-test": "carrier-profile-page", children: [onBack && (jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$8), leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "carrier-profile-back", children: backLabel })), jsxs("header", { className: sx(headerStyle$m), children: [jsx("h1", { className: sx(titleStyle$i), children: "My Profile" }), jsx("p", { className: sx(descriptionStyle$9), children: "Keep your default bid values, bid contacts, and aircraft up to date \u2014 STM quotes you from exactly what is here." })] }), jsx(Segment, { options: TAB_OPTIONS$2, value: tab, onChange: selectTab, "aria-label": "Profile section", className: sx(tabsStyle$4) }), tab === 'profile' && (jsxs("section", { className: sx(panelStyle$1), "aria-label": "Preferences", children: [jsx("h2", { className: sx(sectionTitleStyle$7), children: "Preferences" }), jsx("p", { className: sx(sectionCopyStyle$1), children: "These values pre-fill every bid response form, so you only change them when a bid differs from your norm." }), jsxs("div", { className: sx(formStyle$2), children: [jsx(Input, { id: "carrier-available-seats", type: "number", label: "# of Available Seats", value: preferences.availableSeats, disabled: !canSavePreferences, onChange: (event) => updatePreference('availableSeats', event.target.value), "data-test": "carrier-available-seats" }), jsx(Input, { id: "carrier-max-payload", type: "number", label: "Max Payload (lbs)", value: preferences.maxPayload, disabled: !canSavePreferences, onChange: (event) => updatePreference('maxPayload', event.target.value), "data-test": "carrier-max-payload" }), jsx(Input, { id: "carrier-fuel-base", label: "Fuel Base ($)", inputMode: "decimal", value: preferences.fuelBase, disabled: !canSavePreferences, onChange: (event) => updatePreference('fuelBase', event.target.value), "data-test": "carrier-fuel-base" }), jsx(Select, { id: "carrier-catering", label: "Catering Options Included", placeholder: "Select a catering option", options: cateringOptions.map((option) => ({ value: option, label: option })), value: preferences.cateringOptions, disabled: !canSavePreferences, onChange: (event) => updatePreference('cateringOptions', event.target.value), "data-test": "carrier-catering" })] }), canSavePreferences && (jsx(Button, { className: sx(saveStyle), onClick: () => onSavePreferences?.(preferences), "data-test": "carrier-save-preferences", children: "Save" }))] })), tab === 'contacts' && (jsxs("section", { className: sx(panelStyle$1), "aria-label": "Contacts", children: [jsxs("h2", { className: sx(sectionTitleStyle$7), children: [carrierName, " contacts"] }), jsx(Table, { columns: contactColumns, data: contacts, rowKey: "contactId", emptyContent: jsx(EmptyState$1, { size: "sm", title: "No contacts currently exist.", description: "Add at least one bid contact so STM knows who to email about new opportunities." }) }), canAddContact && (jsxs(Fragment, { children: [jsx("h3", { className: sx(subTitleStyle), children: "Add a contact" }), jsxs("div", { className: sx(formStyle$2), children: [jsx(Input, { id: "carrier-contact-name", label: "Name", maxLength: 50, required: true, value: newContact.name, error: contactErrors.name, onChange: (event) => setNewContact({ ...newContact, name: event.target.value }), "data-test": "carrier-contact-name" }), jsx(Select, { id: "carrier-contact-type", label: "Contact type", options: contactTypes.map((type) => ({ value: type, label: type })), value: newContact.contactType, onChange: (event) => setNewContact({ ...newContact, contactType: event.target.value }), "data-test": "carrier-contact-type" }), jsx(Input, { id: "carrier-contact-phone", label: "Work phone", maxLength: 20, required: true, value: newContact.workPhone, error: contactErrors.workPhone, onChange: (event) => setNewContact({ ...newContact, workPhone: event.target.value }), "data-test": "carrier-contact-phone" }), jsx(Input, { id: "carrier-contact-email", type: "email", label: "Email address", maxLength: 255, required: true, value: newContact.email, error: contactErrors.email, onChange: (event) => setNewContact({ ...newContact, email: event.target.value }), "data-test": "carrier-contact-email" })] }), jsx(Checkbox, { label: "Contact for new bids", helperText: "New bid opportunities are emailed to every contact with this checked.", checked: newContact.bidContact, onChange: (event) => setNewContact({ ...newContact, bidContact: event.target.checked }), "data-test": "carrier-contact-bid-contact" }), jsx(Button, { className: sx(saveStyle), onClick: submitContact, "data-test": "carrier-contact-submit", children: "Add contact" })] }))] })), tab === 'aircraft' && (jsxs("section", { className: sx(panelStyle$1), "aria-label": "Aircraft", children: [jsx("h2", { className: sx(sectionTitleStyle$7), children: "Aircraft and seat maps" }), jsx("p", { className: sx(sectionCopyStyle$1), children: "Only aircraft listed here can be offered on a bid, and their seat counts and payloads pre-fill the bid response form." }), jsx(Table, { columns: aircraftColumns, data: aircraft, rowKey: "aircraftId", emptyContent: jsx(EmptyState$1, { size: "sm", title: "No aircraft on file", description: "Add the airframes you operate so they appear in the Aircraft Type picker when you bid." }) })] }))] }));
|
|
30322
31382
|
};
|
|
30323
31383
|
CarrierProfilePage.displayName = 'CarrierProfilePage';
|
|
30324
31384
|
|
|
30325
31385
|
/** ChampionshipBidDetailPage's compiled rules. */
|
|
30326
|
-
const pageStyle$
|
|
31386
|
+
const pageStyle$r = {
|
|
30327
31387
|
label: 'ChampionshipBidDetailPage-pageStyle',
|
|
30328
31388
|
display: 'flex',
|
|
30329
31389
|
flexDirection: 'column',
|
|
@@ -30478,7 +31538,7 @@ const ChampionshipBidDetailPage = ({ bid, loading = false, backLabel = 'NCAA Cha
|
|
|
30478
31538
|
const currency = useMemo(() => new Intl.NumberFormat(locale, { style: 'currency', currency: 'USD' }), [locale]);
|
|
30479
31539
|
const numbers = useMemo(() => new Intl.NumberFormat(locale), [locale]);
|
|
30480
31540
|
const status = bid ? detailStatus(bid) : undefined;
|
|
30481
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
31541
|
+
return (jsxs("div", { className: cx(sx(pageStyle$r), className), "data-test": "championship-bid-detail-page", children: [onBack && (jsx(Button, { type: "button", variant: "ghost", size: "sm", className: sx(breadcrumbStyle$7), leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "championship-bid-detail-back", children: backLabel })), loading ? (jsxs("div", { className: sx(loadingStyle), "data-test": "championship-bid-detail-loading", children: [jsx(Spinner, { size: "lg", label: "Loading championship bid detail" }), jsx("p", { children: "Loading championship bid detail\u2026" })] })) : bid && status ? (jsxs(Fragment, { children: [jsxs("header", { className: sx(headerStyle$l), children: [jsxs("div", { children: [jsxs("span", { className: sx(eyebrowStyle$6), children: ["NCAA Championship bid \u00B7 ", bid.bidId] }), jsx("h1", { className: sx(titleStyle$h), children: bid.bidName })] }), jsx("span", { "data-test": "championship-bid-detail-status", children: jsx(StatusBadge, { status: status.status, label: status.label }) })] }), jsxs("section", { className: sx(panelStyle), "aria-labelledby": "championship-bid-details-heading", children: [jsx("h2", { id: "championship-bid-details-heading", children: "Bid details" }), jsxs("dl", { className: sx(factsStyle$4), children: [jsxs("div", { children: [jsx("dt", { children: "Aircraft" }), jsx("dd", { children: bid.aircraftName || 'Not provided' })] }), jsxs("div", { children: [jsx("dt", { children: "Seats" }), jsx("dd", { children: bid.seats === undefined ? 'Not provided' : numbers.format(bid.seats) })] }), jsxs("div", { className: sx(totalFactStyle$1), children: [jsx("dt", { children: "Total cost" }), jsx("dd", { "data-test": "championship-bid-detail-total", children: bid.totalCost === undefined ? 'Not provided' : currency.format(bid.totalCost) })] }), jsxs("div", { children: [jsx("dt", { children: "Cities" }), jsx("dd", { children: bid.cities || 'Not provided' })] })] })] }), jsxs("section", { className: sx(panelStyle), "aria-labelledby": "championship-bid-notes-heading", children: [jsx("h2", { id: "championship-bid-notes-heading", children: "Carrier notes" }), jsxs("div", { className: sx(notesGridStyle), children: [jsxs("div", { children: [jsx("h3", { children: "Restrictions" }), jsx("p", { children: bid.restrictions || 'No restrictions provided.' })] }), jsxs("div", { children: [jsx("h3", { children: "Comments" }), jsx("p", { children: bid.comments || 'No comments provided.' })] })] })] }), jsxs("section", { className: sx(panelStyle), "aria-labelledby": "championship-bid-contract-heading", children: [jsx("h2", { id: "championship-bid-contract-heading", children: "Contract" }), jsxs("div", { className: sx(contractStyle), "data-test": "championship-bid-detail-contract", children: [jsx(DocumentIcon, { size: 20, "aria-hidden": "true" }), jsx("span", { children: bid.contractFileName || 'No contract on file' })] })] })] })) : (jsx("div", { "data-test": "championship-bid-detail-empty", children: jsx(EmptyState$1, { title: "Championship bid detail unavailable", description: "Return to the championship queue and select an available opportunity.", icon: jsx(DocumentIcon, { size: 30 }) }) }))] }));
|
|
30482
31542
|
};
|
|
30483
31543
|
ChampionshipBidDetailPage.displayName = 'ChampionshipBidDetailPage';
|
|
30484
31544
|
|
|
@@ -30490,7 +31550,7 @@ ChampionshipBidDetailPage.displayName = 'ChampionshipBidDetailPage';
|
|
|
30490
31550
|
* declaration block in the sheet; they are separate elements, so each keeps its
|
|
30491
31551
|
* own object.
|
|
30492
31552
|
*/
|
|
30493
|
-
const pageStyle$
|
|
31553
|
+
const pageStyle$q = {
|
|
30494
31554
|
label: 'ChampionshipBidsPage-pageStyle',
|
|
30495
31555
|
display: 'flex',
|
|
30496
31556
|
flexDirection: 'column',
|
|
@@ -30519,7 +31579,7 @@ const titleStyle$g = {
|
|
|
30519
31579
|
fontWeight: 'var(--fw-semibold)',
|
|
30520
31580
|
lineHeight: 'var(--lh-2xl)',
|
|
30521
31581
|
};
|
|
30522
|
-
const descriptionStyle$
|
|
31582
|
+
const descriptionStyle$8 = {
|
|
30523
31583
|
label: 'ChampionshipBidsPage-descriptionStyle',
|
|
30524
31584
|
maxWidth: '72ch',
|
|
30525
31585
|
margin: 0,
|
|
@@ -30689,7 +31749,7 @@ const ChampionshipBidsPage = ({ bids, bidType: controlledBidType, defaultBidType
|
|
|
30689
31749
|
render: (_value, bid) => onOpenBid ? (jsx(Button, { variant: "outline", size: "sm", onClick: () => onOpenBid(bid.bidId), "data-test": "championship-rebid", children: "Bid anyway" })) : jsx("span", { className: sx(mutedStyle), children: "\u2014" }),
|
|
30690
31750
|
});
|
|
30691
31751
|
}
|
|
30692
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
31752
|
+
return (jsxs("div", { className: cx(sx(pageStyle$q), className), "data-test": "championship-bids-page", children: [onBack && (jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$6), leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "championship-bids-back", children: backLabel })), jsxs("header", { className: sx(headerStyle$k), children: [jsx("h1", { className: sx(titleStyle$g), children: CHAMPIONSHIP_HEADINGS[bidType] }), jsx("p", { className: sx(descriptionStyle$8), children: "NCAA championship charter opportunities released to you. Award confirmations and signed contracts live in the Awarded queue." })] }), jsx(Segment, { options: TAB_OPTIONS$1, value: bidType, onChange: selectBidType, "aria-label": "Championship bid queue", className: sx(tabsStyle$3) }), jsx(Table, { columns: columns, data: pageBids, rowKey: "bidId", loading: loading, emptyContent: jsx(EmptyState$1, { size: "sm", title: "No such bids currently exist.", description: "Championship opportunities appear here as soon as the NCAA releases them to your carrier." }) }), jsx(Pagination, { page: currentPage, pageSize: pageSize, totalItems: bids.length, itemLabel: "bids", ariaLabel: "Championship bids pagination", onPageChange: setPage, onPageSizeChange: (nextSize) => {
|
|
30693
31753
|
setPageSize(nextSize);
|
|
30694
31754
|
setPage(1);
|
|
30695
31755
|
} })] }));
|
|
@@ -30704,7 +31764,7 @@ ChampionshipBidsPage.displayName = 'ChampionshipBidsPage';
|
|
|
30704
31764
|
* eye on is `.breadcrumb`'s `!important`, which overrides the Breadcrumb
|
|
30705
31765
|
* component's own padding and has to survive the move verbatim.
|
|
30706
31766
|
*/
|
|
30707
|
-
const pageStyle$
|
|
31767
|
+
const pageStyle$p = {
|
|
30708
31768
|
label: 'CharterBidResponsePage-pageStyle',
|
|
30709
31769
|
display: 'flex',
|
|
30710
31770
|
flexDirection: 'column',
|
|
@@ -30852,12 +31912,12 @@ const CharterBidResponsePage = ({ program, trips, accountName, tripLevel = true,
|
|
|
30852
31912
|
const blockedReason = noBid || pricedInputs
|
|
30853
31913
|
? undefined
|
|
30854
31914
|
: 'Price the trip with the calculator before submitting, or tick “No Bid” to decline.';
|
|
30855
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
31915
|
+
return (jsxs("div", { className: cx(sx(pageStyle$p), className), "data-test": "charter-bid-response-page", children: [onBack && (jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$5), leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "charter-bid-back", children: backLabel })), jsxs("header", { className: sx(headerStyle$j), children: [jsx("span", { className: sx(eyebrowStyle$5), children: "Bid response" }), jsx("h1", { className: sx(titleStyle$f), children: tripLevel ? trips[0]?.tripName : program.bidName })] }), jsxs("section", { className: sx(summaryStyle$3), "aria-label": "Team overview", children: [jsx("h2", { className: sx(sectionTitleStyle$6), children: "Team Overview" }), jsxs("dl", { className: sx(factsStyle$3), children: [jsxs("div", { children: [jsx("dt", { children: "Team" }), jsx("dd", { children: accountName })] }), jsxs("div", { children: [jsx("dt", { children: "Sport" }), jsx("dd", { children: program.sport })] }), jsxs("div", { children: [jsx("dt", { children: "Season" }), jsx("dd", { children: program.season })] }), jsxs("div", { children: [jsx("dt", { children: "Year" }), jsx("dd", { children: program.year })] }), jsxs("div", { children: [jsx("dt", { children: "Due Date" }), jsx("dd", { children: formatDate$3(program.dueDate, locale) })] })] })] }), trips.map((trip, index) => (jsxs("section", { className: sx(summaryStyle$3), "aria-label": `Trip ${index + 1}`, children: [jsxs("h2", { className: sx(sectionTitleStyle$6), children: ["Trip ", index + 1] }), jsxs("p", { className: sx(tripMetaStyle), children: [jsxs("span", { children: [jsx("strong", { children: "Bid Type:" }), " ", trip.bidType] }), acmiCarrier && requestedCarrier && (jsxs("span", { "data-test": "charter-bid-requested-carrier", children: [jsx("strong", { children: "Requested Carrier:" }), " ", requestedCarrier] }))] }), jsxs("dl", { className: sx(factsStyle$3), children: [jsxs("div", { children: [jsx("dt", { children: "Depart Date" }), jsx("dd", { children: formatDate$3(trip.departureDate, locale) })] }), jsxs("div", { children: [jsx("dt", { children: "Travel Party Size" }), jsx("dd", { children: trip.travelPartySize })] }), jsxs("div", { children: [jsx("dt", { children: "Route" }), jsx("dd", { children: trip.route })] }), jsxs("div", { children: [jsx("dt", { children: "Expires" }), jsx("dd", { children: formatDate$3(trip.expirationDate, locale) })] })] })] }, trip.tripGuid))), jsxs("section", { className: sx(calculatorStyle), "aria-label": "ACMI calculator", children: [jsxs("div", { className: sx(calculatorHeaderStyle), children: [jsx("h2", { className: sx(sectionTitleStyle$6), children: "Price this trip" }), jsx("p", { className: sx(sectionCopyStyle), children: "Every bid is priced here, so the total you submit is always built from the same carrier, aircraft, fuel, and leg inputs." })] }), noBid ? (jsx(Alert, { variant: "warning", title: "You are declining this opportunity", children: "Pricing is switched off while \u201CNo Bid\u201D is ticked. Untick it to build a quote instead." })) : (jsx(AcmiQuoteCalculator, { defaultInputs: defaultInputs, result: acmiResult, onCalculate: handleCalculate, locale: locale }))] }), jsxs("div", { className: sx(submitBarStyle), children: [jsx(Checkbox, { label: "No Bid Submitted for this Request", helperText: "Declines the opportunity. Pricing is switched off and nothing is quoted.", checked: noBid, onChange: (event) => setNoBid(event.target.checked), "data-test": "charter-bid-no-bid" }), jsx(Button, { fullWidth: true, loading: submitting, disabled: Boolean(blockedReason), onClick: () => onSubmitBid?.({ inputs: noBid ? null : pricedInputs, noBid }), "data-test": "charter-bid-submit", children: noBid ? 'Submit No Bid' : 'Submit Bid' }), blockedReason && (jsx("p", { className: sx(blockedReasonStyle$1), "data-test": "charter-bid-blocked-reason", children: blockedReason }))] })] }));
|
|
30856
31916
|
};
|
|
30857
31917
|
CharterBidResponsePage.displayName = 'CharterBidResponsePage';
|
|
30858
31918
|
|
|
30859
31919
|
/** CharterBidViewPage's compiled rules. */
|
|
30860
|
-
const pageStyle$
|
|
31920
|
+
const pageStyle$o = {
|
|
30861
31921
|
label: 'CharterBidViewPage-pageStyle',
|
|
30862
31922
|
display: 'flex',
|
|
30863
31923
|
flexDirection: 'column',
|
|
@@ -31041,7 +32101,7 @@ const SUBMISSION_LABELS = {
|
|
|
31041
32101
|
const CharterBidViewPage = ({ program, trip, bids = [], processingSubmission, onRefresh, backLabel = 'Regular Season Bids', onBack, locale = 'en-US', className = '', }) => {
|
|
31042
32102
|
const currency = useMemo(() => new Intl.NumberFormat(locale, { style: 'currency', currency: 'USD' }), [locale]);
|
|
31043
32103
|
const numbers = useMemo(() => new Intl.NumberFormat(locale), [locale]);
|
|
31044
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
32104
|
+
return (jsxs("div", { className: cx(sx(pageStyle$o), className), "data-test": "charter-bid-view-page", children: [onBack && (jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$4), leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "charter-bid-view-back", children: backLabel })), jsxs("header", { className: sx(headerStyle$i), children: [jsx("span", { className: sx(eyebrowStyle$4), children: "Bid response" }), jsx("h1", { className: sx(titleStyle$e), children: trip ? trip.tripName : program.bidName }), jsxs("p", { className: sx(subtitleStyle$4), children: [program.team, " \u00B7 ", program.sport, " \u00B7 ", program.season, " ", program.year] })] }), bids.length > 0 && (jsx("ol", { className: sx(bidsStyle), children: bids.map((bid, index) => (jsxs("li", { className: sx(bidStyle), "data-test": "charter-submitted-bid", children: [jsxs("div", { className: sx(bidHeaderStyle), children: [jsxs("h2", { className: sx(bidTitleStyle), children: ["Bid ", index + 1] }), jsx(StatusBadge, { status: "submitted" })] }), jsxs("dl", { className: sx(factsStyle$2), children: [jsxs("div", { children: [jsx("dt", { children: "Seats" }), jsx("dd", { children: bid.seats })] }), jsxs("div", { children: [jsx("dt", { children: "Max Payload (lbs)" }), jsx("dd", { children: numbers.format(bid.maxPayloadLbs) })] }), jsxs("div", { children: [jsx("dt", { children: "Fuel Base ($)" }), jsx("dd", { children: currency.format(bid.fuelBasePrice) })] }), jsxs("div", { className: sx(totalFactStyle), children: [jsx("dt", { children: "Total Cost ($)" }), jsx("dd", { "data-test": "charter-bid-total", children: currency.format(bid.totalCost) })] }), jsxs("div", { children: [jsx("dt", { children: "Catering Options" }), jsx("dd", { children: bid.cateringAvailable })] })] }), bid.notesFromOperator && bid.notesFromOperator.length > 0 && (jsxs("div", { className: sx(notesStyle), children: [jsx("h3", { className: sx(notesTitleStyle), children: "Notes from Operator" }), jsx("ul", { className: sx(notesListStyle), "data-test": "charter-bid-notes", children: bid.notesFromOperator.map((note) => (jsx("li", { children: note }, note))) })] }))] }, bid.id))) })), bids.length === 0 && processingSubmission && (jsxs("div", { className: sx(processingStyle), "data-test": "charter-bid-processing", children: [jsx(Spinner, { size: "lg", label: "Parsing your submission" }), jsx("h2", { className: sx(processingTitleStyle), children: "We are still reading your bid" }), jsxs("p", { className: sx(processingCopyStyle), children: ["Your ", SUBMISSION_LABELS[processingSubmission], " arrived and is being parsed into a quote. This normally takes a couple of minutes \u2014 nothing is lost while it runs, and you do not need to submit it again."] }), onRefresh && (jsx(Button, { variant: "outline", size: "sm", onClick: onRefresh, "data-test": "charter-bid-refresh", children: "Check again" }))] })), bids.length === 0 && !processingSubmission && (jsx(EmptyState$1, { title: "No bid submitted for this opportunity.", description: "Nothing has been received against this trip yet. Submit a bid from the Open queue while it is still live." }))] }));
|
|
31045
32105
|
};
|
|
31046
32106
|
CharterBidViewPage.displayName = 'CharterBidViewPage';
|
|
31047
32107
|
|
|
@@ -31054,7 +32114,7 @@ CharterBidViewPage.displayName = 'CharterBidViewPage';
|
|
|
31054
32114
|
* members here, with the group's declarations first and the member's own after,
|
|
31055
32115
|
* so the last value still wins.
|
|
31056
32116
|
*/
|
|
31057
|
-
const pageStyle$
|
|
32117
|
+
const pageStyle$n = {
|
|
31058
32118
|
label: 'CharterManifestPage-pageStyle',
|
|
31059
32119
|
display: 'flex',
|
|
31060
32120
|
flexDirection: 'column',
|
|
@@ -31474,7 +32534,7 @@ const CharterManifestPage = ({ tripName, travelStartDate, travelEndDate, seats,
|
|
|
31474
32534
|
}
|
|
31475
32535
|
return a.lastName.localeCompare(b.lastName);
|
|
31476
32536
|
}), [passengers, sort]);
|
|
31477
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
32537
|
+
return (jsxs("div", { className: cx(sx(pageStyle$n), className), "data-screen-label": "Charter Trip Manifest", children: [jsxs("header", { className: sx(headerStyle$h), children: [jsxs("div", { className: sx(headerRowStyle$1), children: [jsx("button", { type: "button", "aria-label": "Back", className: sx(backStyle), onClick: onBack, children: jsx(ChevronLeftIcon, { size: 28 }) }), jsxs("h1", { children: [jsx("strong", { children: "Manifest" }), jsx(ChevronRightIcon$1, { size: 24 }), jsx("span", { children: tripName })] }), jsxs("div", { className: sx(headerActionsStyle), children: [jsx(StatusPill, { sendState: sendState, locked: locked }), jsx(Button, { variant: "outline", leftIcon: jsx(DocumentIcon, { size: 16 }), disabled: carrierName === 'No carrier selected', onClick: onGenerateFile, children: "Generate File" })] })] }), (travelStartDate || travelEndDate) && (jsxs("div", { className: sx(dateRowStyle), children: [jsx("span", { children: formatDate$2(travelStartDate) }), jsx("span", { className: sx(dateLineStyle), children: "\u25B6" }), jsx("span", { children: formatDate$2(travelEndDate) })] })), jsxs("div", { className: sx(metaRowStyle), children: [jsxs("span", { children: [jsx(PlaneIcon$3, { size: 16 }), seats, " seats"] }), jsxs("span", { children: [jsx(CubeIcon, { size: 16 }), "Payload limit ", payloadLimit.toLocaleString(), " lb"] })] })] }), jsxs("div", { className: sx(layoutStyle), children: [jsxs("aside", { className: sx(railStyle), children: [jsxs("div", { children: [jsx("div", { className: sx(eyebrowStyle$3), children: "Flight Manifest" }), jsx("div", { className: sx(scopeListStyle), children: [{ id: 'all', label: 'Full Trip', detail: 'All flight segments' }, ...segments].map((item) => (jsxs("button", { type: "button", className: cx(sx(scopeStyle), scope === item.id ? sx(activeScopeStyle) : ''), onClick: () => setScope(item.id), children: [jsx("strong", { children: item.label }), jsx("span", { children: item.detail })] }, item.id))) })] }), segments.length > 0 && (jsx(Button, { variant: "outline", size: "sm", disabled: locked, onClick: onSplitSegments, children: "Split by Segment" })), jsxs("div", { className: sx(carrierCardStyle), children: [jsx("div", { className: sx(eyebrowStyle$3), children: "Carrier" }), jsx("strong", { children: carrierName }), jsx("p", { children: carrierNote }), jsx(Button, { variant: "outline", size: "sm", fullWidth: true, disabled: locked, leftIcon: jsx(SettingsIcon, { size: 15 }), onClick: onChangeCarrier, children: "Change Carrier" })] })] }), jsxs("main", { className: sx(mainStyle$2), children: [jsx("section", { className: sx(capacityCardStyle), children: jsx(ManifestCapacityStats, { paxCount: passengers.length, seats: seats, paxWeight: passengerWeight, cargoWeight: cargoWeight, payloadLimit: payloadLimit }) }), jsxs("div", { className: sx(viewRowStyle), children: [jsx(ManifestViewToggle, { view: view, onView: setView, paxCount: passengers.length, eqCount: equipment.length, locked: locked }), locked && jsx("span", { className: sx(lockedMessageStyle), children: "Locked \u2014 coordinate any changes directly with the carrier." })] }), view === 'passengers' ? (jsxs("section", { children: [!locked && (jsxs("div", { className: sx(tableActionsStyle), children: [jsxs("strong", { children: [passengers.length, " Passengers"] }), jsxs("div", { children: [jsx("span", { children: "Order by" }), jsx("span", { className: sx(sortToggleStyle), children: ['name', 'type'].map((option) => (jsx("button", { type: "button", className: sort === option ? sx(activeSortStyle) : '', onClick: () => setSort(option), children: option }, option))) }), jsx(Button, { size: "sm", leftIcon: jsx(PlusIcon$2, { size: 15 }), onClick: onAddPassengers, children: "Add Passengers" })] })] })), jsx("div", { className: sx(tableWrapStyle$3), children: jsxs("table", { children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { children: "#" }), jsx("th", { children: "Passenger" }), jsx("th", { children: "Type" }), jsx("th", { children: "TSA Screening" }), jsx("th", { children: "Personal" }), jsx("th", { children: "Carry-On" }), jsx("th", { children: "Checked" }), jsx("th", { children: "Seat" }), jsx("th", {})] }) }), jsxs("tbody", { children: [!sortedPassengers.length && jsx("tr", { children: jsx("td", { colSpan: 9, className: sx(emptyStyle$3), children: "No passengers on this manifest yet. Add passengers from the master list." }) }), sortedPassengers.map((passenger, index) => (jsxs("tr", { children: [jsx("td", { children: index + 1 }), jsxs("td", { children: [jsx("strong", { children: passenger.lastName }), jsxs("span", { children: [", ", passenger.firstName] })] }), jsx("td", { children: jsx(TypeTag, { type: passenger.travelerType }) }), jsx("td", { children: passenger.screeningType || '—' }), jsxs("td", { children: [passenger.personalWeight ?? 0, " lb"] }), jsxs("td", { children: [passenger.carryOnWeight ?? 0, " lb"] }), jsxs("td", { children: [passenger.checkedWeight ?? 0, " lb"] }), jsx("td", { children: passenger.seatAssignment || '—' }), jsx("td", { children: !locked && jsx("button", { type: "button", "aria-label": `Remove ${passenger.firstName} ${passenger.lastName}`, className: sx(removeStyle), onClick: () => onRemovePassenger?.(passenger), children: jsx(TrashIcon$2, { size: 16 }) }) })] }, passenger.id)))] })] }) })] })) : (jsxs("section", { children: [!locked && jsxs("div", { className: sx(tableActionsStyle), children: [jsxs("strong", { children: [equipment.length, " Equipment Items"] }), jsx(Button, { size: "sm", leftIcon: jsx(PlusIcon$2, { size: 15 }), onClick: onAddEquipment, children: "Add Equipment" })] }), jsx("div", { className: sx(tableWrapStyle$3), children: jsxs("table", { children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { children: "Equipment" }), jsx("th", { children: "Quantity" }), jsx("th", { children: "Weight" }), jsx("th", { children: "Total" }), jsx("th", {})] }) }), jsx("tbody", { children: equipment.map((item) => jsxs("tr", { children: [jsx("td", { children: jsx("strong", { children: item.name }) }), jsx("td", { children: item.quantity }), jsxs("td", { children: [item.weight.toLocaleString(), " lb"] }), jsxs("td", { children: [(item.quantity * item.weight).toLocaleString(), " lb"] }), jsx("td", { children: !locked && jsx("button", { type: "button", "aria-label": `Remove ${item.name}`, className: sx(removeStyle), onClick: () => onRemoveEquipment?.(item), children: jsx(TrashIcon$2, { size: 16 }) }) })] }, item.id)) })] }) })] })), !locked && (jsxs("section", { className: sx(finalizeStyle), children: [jsx(StatusPill, { sendState: sendState, locked: false }), jsx("p", { children: sendState === 'initial-sent' ? 'Initial manifest sent. The final manifest may be sent within 3 days of departure.' : 'No manifest has been transmitted to the carrier yet.' }), jsxs("div", { className: sx(finalizeActionsStyle), children: [sendState === 'none' && jsx(Button, { onClick: onSendInitial, children: "Send Initial Manifest" }), sendState === 'initial-sent' && jsxs(Fragment, { children: [jsx(Button, { onClick: onSendFinal, children: "Send Final Manifest" }), jsx(Button, { variant: "ghost", size: "sm", onClick: onUndoInitial, children: "Undo initial" })] })] })] }))] })] })] }));
|
|
31478
32538
|
};
|
|
31479
32539
|
|
|
31480
32540
|
/**
|
|
@@ -31493,7 +32553,7 @@ const mutedCopy = {
|
|
|
31493
32553
|
margin: 0,
|
|
31494
32554
|
color: 'var(--color-slate)',
|
|
31495
32555
|
};
|
|
31496
|
-
const pageStyle$
|
|
32556
|
+
const pageStyle$m = {
|
|
31497
32557
|
label: 'ChartersAccessManagementPage-pageStyle',
|
|
31498
32558
|
maxWidth: 1180,
|
|
31499
32559
|
margin: '0 auto',
|
|
@@ -31538,7 +32598,7 @@ const eyebrowStyle$2 = {
|
|
|
31538
32598
|
letterSpacing: '.04em',
|
|
31539
32599
|
textTransform: 'uppercase',
|
|
31540
32600
|
};
|
|
31541
|
-
const descriptionStyle$
|
|
32601
|
+
const descriptionStyle$7 = {
|
|
31542
32602
|
label: 'ChartersAccessManagementPage-descriptionStyle',
|
|
31543
32603
|
...mutedCopy,
|
|
31544
32604
|
maxWidth: 700,
|
|
@@ -31865,7 +32925,7 @@ const ChartersAccessManagementPage = ({ accountName, memberships, availableAccou
|
|
|
31865
32925
|
const addUnavailableReason = !onAddAccess
|
|
31866
32926
|
? 'Adding STM Charters access is not available in this view.'
|
|
31867
32927
|
: undefined;
|
|
31868
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
32928
|
+
return (jsxs("div", { className: cx(sx(pageStyle$m), className), "data-test": "charters-access-management-page", children: [jsxs("header", { className: sx(headerStyle$g), children: [onBack && (jsx(Button, { type: "button", variant: "ghost", size: "sm", leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "charters-access-back", children: "STM Charters" })), jsxs("div", { className: sx(headingRowStyle), children: [jsxs("div", { children: [jsxs("p", { className: sx(eyebrowStyle$2), children: ["STM Charters \u00B7 ", accountName] }), jsx("h1", { children: "Access Management" }), jsx("p", { className: sx(descriptionStyle$7), children: "Grant account users access to charter bids and choose who can manage membership." })] }), jsxs("div", { className: sx(summaryStyle$2), "aria-label": "Access summary", children: [jsxs("span", { children: [jsx("strong", { children: memberships.length }), " members"] }), jsxs("span", { children: [jsx("strong", { children: adminCount }), " admins"] })] })] })] }), loading && (jsxs("div", { className: sx(pageStateStyle$1), "data-test": "charters-access-loading", children: [jsx(Spinner, { size: "lg", label: "Loading STM Charters access" }), jsx("p", { children: "Loading STM Charters access\u2026" })] })), !loading && error && (jsxs("div", { className: sx(pageStateStyle$1), "data-test": "charters-access-error", children: [jsx(Alert, { variant: "error", title: "Access could not be loaded", children: error }), onRetry && (jsx(Button, { type: "button", variant: "outline", onClick: onRetry, "data-test": "charters-access-retry", children: "Try again" }))] })), !loading && !error && (jsxs(Fragment, { children: [actionError && (jsx(Alert, { variant: "error", title: "Access change failed", dismissible: true, onDismiss: () => setActionError(undefined), className: sx(actionErrorStyle$1), children: jsx("span", { "data-test": "charters-access-action-error", children: actionError }) })), canManageAccess ? (jsxs("section", { className: sx(addPanelStyle), "data-test": "charters-access-add-panel", children: [jsxs("div", { className: sx(sectionHeadingStyle$1), children: [jsx("span", { className: sx(sectionIconStyle), children: jsx(UsersIcon$1, { size: 20 }) }), jsxs("div", { children: [jsx("h2", { children: "Add account users" }), jsxs("p", { children: ["Search and select one or more existing users of ", accountName, " to grant STM Charters access."] })] })] }), jsxs("div", { className: sx(addControlsStyle), children: [jsx(MultiUserSearch, { label: "Search account users", placeholder: "Type to search by name or email", options: userSearchOptions, selectedIds: selectedUserIds, onSearch: handleUserSearch, onSelectionChange: setSelectedUserIds, loading: accountUserSearchLoading, disabled: Boolean(pendingAction), error: accountUserSearchError, helperText: "Select one or more users, then choose their role below.", "data-test": "charters-access-user-search" }), jsxs("div", { className: sx(addActionsRowStyle), children: [jsx(Select, { label: "STM Charters role", options: ROLE_OPTIONS, value: newRole, onChange: (event) => setNewRole(event.target.value), disabled: Boolean(pendingAction), "data-test": "charters-access-new-role" }), jsx(Button, { type: "button", onClick: addSelectedUsers, disabled: !hasSelectedUsers || Boolean(addUnavailableReason), loading: pendingAction === 'add', title: addUnavailableReason, "data-test": "charters-access-add", children: selectedUsers.length > 1
|
|
31869
32929
|
? `Add ${selectedUsers.length} users`
|
|
31870
32930
|
: 'Add access' })] })] })] })) : (jsx(Alert, { variant: "primary", title: "Read-only access", className: sx(readOnlyNoticeStyle$1), children: jsx("span", { "data-test": "charters-access-read-only", children: readOnlyMessage }) })), jsxs("section", { className: sx(membersPanelStyle), "aria-labelledby": "charters-access-members-heading", children: [jsxs("div", { className: sx(membersHeadingStyle), children: [jsxs("div", { children: [jsx("h2", { id: "charters-access-members-heading", children: "People with STM Charters access" }), jsx("p", { children: "Members use carrier workflows. Admins can also manage this list." })] }), jsx(LockIcon$1, { size: 20, "aria-hidden": "true" })] }), memberships.length === 0 ? (jsx("div", { "data-test": "charters-access-empty", children: jsx(EmptyState$1, { title: "No STM Charters members", description: canManageAccess
|
|
31871
32931
|
? 'Search for an existing account user above to grant the first membership.'
|
|
@@ -31893,7 +32953,7 @@ ChartersAccessManagementPage.displayName = 'ChartersAccessManagementPage';
|
|
|
31893
32953
|
* `@media` block at the foot of the file is now nested inside `pageStyle`,
|
|
31894
32954
|
* which is the only rule it applied to.
|
|
31895
32955
|
*/
|
|
31896
|
-
const pageStyle$
|
|
32956
|
+
const pageStyle$l = {
|
|
31897
32957
|
label: 'ChartersHomePage-pageStyle',
|
|
31898
32958
|
display: 'flex',
|
|
31899
32959
|
flexDirection: 'column',
|
|
@@ -31918,7 +32978,7 @@ const titleStyle$c = {
|
|
|
31918
32978
|
fontWeight: 'var(--fw-semibold)',
|
|
31919
32979
|
lineHeight: 'var(--lh-2xl)',
|
|
31920
32980
|
};
|
|
31921
|
-
const descriptionStyle$
|
|
32981
|
+
const descriptionStyle$6 = {
|
|
31922
32982
|
label: 'ChartersHomePage-descriptionStyle',
|
|
31923
32983
|
maxWidth: '72ch',
|
|
31924
32984
|
margin: 0,
|
|
@@ -32161,7 +33221,7 @@ const CHARTER_CONTACT_GROUPS = [
|
|
|
32161
33221
|
* welcome paragraph and a PDF link; this keeps the same information architecture but
|
|
32162
33222
|
* puts a real card into each section with the queue count already visible.
|
|
32163
33223
|
*/
|
|
32164
|
-
const ChartersHomePage = ({ title = 'STM Charters', description = 'Bid on flight opportunities for regular season and NCAA championship travel.', sections = CHARTER_SECTIONS, contactGroups = CHARTER_CONTACT_GROUPS, tutorialLabel = 'Portal overview (PDF)', onOpenTutorial, onOpenSection, className = '', }) => (jsxs("div", { className: cx(sx(pageStyle$
|
|
33224
|
+
const ChartersHomePage = ({ title = 'STM Charters', description = 'Bid on flight opportunities for regular season and NCAA championship travel.', sections = CHARTER_SECTIONS, contactGroups = CHARTER_CONTACT_GROUPS, tutorialLabel = 'Portal overview (PDF)', onOpenTutorial, onOpenSection, className = '', }) => (jsxs("div", { className: cx(sx(pageStyle$l), className), "data-test": "charters-home-page", children: [jsxs("header", { className: sx(headerStyle$f), children: [jsx("h1", { className: sx(titleStyle$c), children: title }), description && jsx("p", { className: sx(descriptionStyle$6), children: description }), onOpenTutorial && (jsx(Button, { variant: "outline", size: "sm", className: sx(tutorialStyle), leftIcon: jsx(DocumentIcon, { size: 16 }), onClick: onOpenTutorial, "data-test": "charters-tutorial", children: tutorialLabel }))] }), jsx("ul", { className: sx(cardsStyle), children: sections.map((section) => (jsx("li", { children: jsxs("button", { type: "button", className: sx(cardStyle$4), onClick: () => onOpenSection?.(section.key), "data-test": `charters-section-${section.key}`, children: [jsx("span", { className: sx(cardIconStyle), "aria-hidden": "true", children: section.icon ?? SECTION_ICONS[section.key] ?? jsx(PlaneIcon$3, { size: 20 }) }), jsxs("span", { className: sx(cardBodyStyle$2), children: [jsx("span", { className: sx(cardTitleStyle$1), children: section.title }), jsx("span", { className: sx(cardDescriptionStyle), children: section.description }), section.loading ? (jsx("span", { className: sx(cardLoadingStyle), "data-test": `charters-section-${section.key}-loading`, children: jsx(Spinner, { size: "xs", label: `Loading ${section.title}` }) })) : section.count !== undefined ? (jsxs("span", { className: sx(cardCountStyle), children: [jsx("strong", { children: section.count }), " ", section.countLabel ?? 'items'] })) : null] }), jsx("span", { className: sx(cardArrowStyle), "aria-hidden": "true", children: jsx(ArrowUpRightIcon, { size: 16 }) })] }) }, section.key))) }), jsxs("section", { className: sx(contactsStyle), "aria-label": "Contact us", children: [jsx("h2", { className: sx(sectionTitleStyle$5), children: "Questions? Talk to us" }), jsx("div", { className: sx(contactGroupsStyle), children: contactGroups.map((group) => (jsxs("div", { className: sx(contactGroupStyle$1), children: [jsx("h3", { className: sx(contactGroupTitleStyle), children: group.title }), jsx("ul", { className: sx(contactListStyle), children: group.contacts.map((contact) => (jsxs("li", { className: sx(contactStyle), children: [jsx("span", { className: sx(contactNameStyle), children: contact.name }), contact.role && jsx("span", { className: sx(contactRoleStyle), children: contact.role }), jsxs("span", { className: sx(contactLinksStyle), children: [contact.email && (jsxs("a", { href: `mailto:${contact.email}`, className: sx(contactLinkStyle), children: [jsx(MailIcon, { size: 14, "aria-hidden": "true" }), contact.email] })), contact.phone && (jsxs("a", { href: `tel:${contact.phone}`, className: sx(contactLinkStyle), children: [jsx(PhoneIcon, { size: 14, "aria-hidden": "true" }), contact.phone] }))] })] }, contact.name))) })] }, group.title))) })] })] }));
|
|
32165
33225
|
ChartersHomePage.displayName = 'ChartersHomePage';
|
|
32166
33226
|
|
|
32167
33227
|
/**
|
|
@@ -32179,7 +33239,7 @@ ChartersHomePage.displayName = 'ChartersHomePage';
|
|
|
32179
33239
|
* rather than classes stacked on one element, so `emergencyLabelStyle` simply
|
|
32180
33240
|
* carries the merged result.
|
|
32181
33241
|
*/
|
|
32182
|
-
const pageStyle$
|
|
33242
|
+
const pageStyle$k = {
|
|
32183
33243
|
label: 'ContactUsPage-pageStyle',
|
|
32184
33244
|
color: 'var(--color-ink, #282828)',
|
|
32185
33245
|
'@media print': {
|
|
@@ -32496,7 +33556,7 @@ const ContactUsPage = ({ title = 'Your Team of Experts', state, errorMessage = '
|
|
|
32496
33556
|
if (resolvedState === 'error' || resolvedState === 'empty') {
|
|
32497
33557
|
return (jsx("div", { className: sx(centeredStateStyle), "data-test": "contact-us-page", children: jsx("div", { "data-test": `contact-us-${resolvedState}`, role: resolvedState === 'error' ? 'alert' : 'status', className: resolvedState === 'error' ? sx(errorStyle) : sx(warningStyle), children: resolvedState === 'error' ? errorMessage : 'No contact information available.' }) }));
|
|
32498
33558
|
}
|
|
32499
|
-
return (jsx("div", { className: cx(sx(pageStyle$
|
|
33559
|
+
return (jsx("div", { className: cx(sx(pageStyle$k), className), "data-test": "contact-us-page", children: jsxs("div", { className: sx(containerStyle), children: [jsxs("div", { className: sx(headerRowStyle), children: [jsx(PageHeader, { title: title }), jsx("div", { className: sx(printRowStyle), children: jsxs("button", { type: "button", onClick: onPrint ?? (() => window.print()), children: [jsx(PrinterIcon, { size: 16 }), "Print"] }) })] }), children ?? (data ? (jsxs(Fragment, { children: [!!(data.accountManagers?.length || data.travelAgents?.length) && (jsxs("div", { className: sx(primaryGridStyle), children: [jsx(SimpleContactCard, { title: "Account Manager", contacts: data.accountManagers }), jsx(SimpleContactCard, { title: "Travel Agent", contacts: data.travelAgents })] })), jsxs("div", { className: sx(stackStyle$1), children: [data.accountContacts ? (data.accountContacts.map((section, index) => (
|
|
32500
33560
|
// Two rows can share a description, so position is the stable key.
|
|
32501
33561
|
jsx(AccountContactCard, { section: section }, `${section.title}-${index}`)))) : (jsxs(Fragment, { children: [jsxs(ContactCard, { title: "Group/Team Commercial Reservation Specialists", children: [jsx(ContactField, { label: "Business Hours:", children: jsx("span", { children: "Monday \u2013 Friday 8am-8pm ET" }) }), jsx(ContactField, { label: "Toll-Free Number:", children: jsx("span", { children: "866-902-9654" }) }), jsx(ContactField, { label: "After Hours/Emergency (24/7):", emergency: true, children: jsx("span", { className: sx(emergencyStyle), children: "866-902-9654" }) }), jsx(ContactField, { label: "Email:", children: jsx("a", { href: "mailto:teamtravel@shortstravel.com", children: "teamtravel@shortstravel.com" }) })] }), jsxs(ContactCard, { title: "Recruiting Travel Specialists", children: [jsx(ContactField, { label: "Business Hours:", children: jsx("span", { children: "Monday \u2013 Friday 8am-8pm ET" }) }), jsx(ContactField, { label: "Toll-Free Number:", children: jsx("span", { children: "866-902-9654" }) }), jsx(ContactField, { label: "After Hours/Emergency (24/7):", emergency: true, children: jsx("span", { className: sx(emergencyStyle), children: "866-902-9654" }) }), jsx(ContactField, { label: "Email:", children: jsx("a", { href: "mailto:recruiting@shortstravel.com", children: "recruiting@shortstravel.com" }) })] })] })), !!data.charterAirContacts?.length && jsx(ContactCard, { title: "Charter Air", children: jsx(PairedContacts, { contacts: data.charterAirContacts }) }), !!data.motorcoachContacts?.length && (jsxs(ContactCard, { title: "Charter Bus / Motorcoach", children: [jsx(PairedContacts, { contacts: data.motorcoachContacts }), jsx("p", { className: sx(motorcoachEmergencyStyle), children: "After Hours/Emergency (24/7): 319-423-3007" })] })), !!data.groupHotelContacts?.length && (jsx(ContactCard, { title: "Group Hotel", children: data.groupHotelContacts.map((contact, index) => (jsxs("div", { className: sx(contactPairStyle), children: [jsx(ContactColumn, { title: "Sales Contact", contact: contact }), jsx("div", { className: sx(contactColumnStyle) })] }, `${contact.email ?? contact.name}-${index}`))) }))] })] })) : jsx(GenericCards, { cards: cards })), showSupportFooter && (jsxs("footer", { className: sx(supportStyle), children: [jsx("h2", { children: "Short's Travel Website and Online Booking Tool Support" }), jsx("p", { children: "Monday \u2013 Friday 9am-9pm ET, except major holidays" }), jsxs("div", { children: [jsx("span", { children: "319-257-5309" }), jsx("a", { href: "mailto:onlinesupport@shortstravel.com", children: "onlinesupport@shortstravel.com" })] })] }))] }) }));
|
|
32502
33562
|
};
|
|
@@ -32518,7 +33578,7 @@ const ContactUsPage = ({ title = 'Your Team of Experts', state, errorMessage = '
|
|
|
32518
33578
|
* The `pulse` keyframes are namespaced `stm-pulse` — injected at runtime they
|
|
32519
33579
|
* would otherwise be global and collide with a host's own `pulse`.
|
|
32520
33580
|
*/
|
|
32521
|
-
const pageStyle$
|
|
33581
|
+
const pageStyle$j = {
|
|
32522
33582
|
label: 'DashboardPage-pageStyle',
|
|
32523
33583
|
color: 'var(--color-ink, #282828)',
|
|
32524
33584
|
};
|
|
@@ -33414,7 +34474,7 @@ const DashboardPage = ({ greeting = 'Good morning', firstName, accountName, widg
|
|
|
33414
34474
|
const [dragFrom, setDragFrom] = useState(null);
|
|
33415
34475
|
const dragGhost = useRef(null);
|
|
33416
34476
|
const presentTypes = new Set(widgets.map((widget) => widget.type));
|
|
33417
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
34477
|
+
return (jsxs("div", { className: cx(sx(pageStyle$j), className), children: [welcomeHero && heroOpen && (jsxs("section", { className: sx(welcomeHeroStyle), "aria-label": "Welcome", children: [jsx("button", { type: "button", className: sx(welcomeCloseStyle), "aria-label": "Dismiss welcome", onClick: () => setHeroOpen(false), children: jsx(CloseIcon, { size: 20 }) }), welcomeHero] })), jsx("div", { className: sx(pageBannersStyle), children: jsx(PageBanners, { systemBanners: systemBanners, alertBanners: alertBanners, fullWidth: true, onDismiss: onBannerDismiss }) }), standingMessage && (jsx("section", { className: sx(standingMessageStyle), "aria-label": "Message", children: standingMessage })), jsxs("header", { className: sx(pageHeaderStyle$1), children: [jsxs("div", { children: [jsxs("h1", { children: [greeting, firstName ? `, ${firstName}` : ''] }), accountName && jsxs("p", { children: ["Here's your personalized travel overview for ", accountName, "."] })] }), jsx("div", { className: sx(pageActionsStyle), children: editMode ? jsxs(Fragment, { children: [jsxs("button", { type: "button", className: sx(outlineButtonStyle), onClick: () => setCatalogOpen(true), children: [jsx(PlusIcon$2, { size: 20 }), "Add card"] }), jsx("button", { type: "button", className: sx(textButtonStyle$1), onClick: onReset, children: "Reset to default" }), jsxs("button", { type: "button", className: sx(primaryButtonStyle), onClick: () => { setEditMode(false); setCatalogOpen(false); }, children: [jsx(CheckIcon$1, { size: 20 }), "Done"] })] }) : jsxs("button", { type: "button", className: sx(customizeButtonStyle), onClick: () => setEditMode(true), children: [jsx(SettingsIcon, { size: 20 }), "Customize Your Home Page"] }) })] }), editMode && jsxs("div", { className: sx(editBannerStyle), children: [jsx(EditIcon$2, { size: 20 }), jsxs("span", { children: [jsx("strong", { children: "Customizing your home page." }), " Drag cards to reorder, resize with S / M / L, or remove cards. Your layout saves automatically."] })] }), syncStatus === 'saving' && jsx("p", { className: sx(syncStatusStyle), "aria-live": "polite", children: "Saving layout\u2026" }), syncStatus === 'error' && jsx("p", { className: cx(sx(syncStatusStyle), sx(syncErrorStyle)), role: "alert", children: "Layout couldn't be saved. Changes are preserved locally." }), widgets.length ? jsx("div", { className: sx(gridStyle$2), children: widgets.map((widget, index) => jsx("div", { className: sx(sizeStyles[widget.size]), draggable: editMode, onDragStart: (event) => { if (!editMode)
|
|
33418
34478
|
return; setDragFrom(index); const ghost = document.createElement('div'); ghost.className = sx(dragGhostStyle); document.body.appendChild(ghost); dragGhost.current = ghost; event.dataTransfer.setDragImage(ghost, 0, 0); }, onDragOver: (event) => event.preventDefault(), onDrop: () => { if (dragFrom !== null && dragFrom !== index)
|
|
33419
34479
|
onReorder?.(dragFrom, index); setDragFrom(null); }, onDragEnd: () => { setDragFrom(null); dragGhost.current?.remove(); dragGhost.current = null; }, children: jsx(WidgetCard, { widget: widget, editMode: editMode, index: index, count: widgets.length, onRefresh: onRefresh, onRemove: onRemove, onResize: onResize, onReorder: onReorder, onTravelerRangeChange: onTravelerRangeChange, onNavigate: onNavigate }) }, widget.id)) }) : jsxs("div", { className: sx(emptyPageStyle), children: [jsx(PlusIcon$2, { size: 28 }), jsx("strong", { children: "Your home page is empty" }), jsx("span", { children: "Use \"Customize\" to add cards from the catalog." })] }), catalogOpen && jsxs(Fragment, { children: [jsx("button", { type: "button", className: sx(scrimStyle), "aria-label": "Close card catalog", onClick: () => setCatalogOpen(false) }), jsxs("aside", { className: sx(catalogStyle), role: "dialog", "aria-modal": "true", "aria-label": "Add cards", children: [jsxs("header", { children: [jsxs("div", { children: [jsx("h2", { children: "Add a card" }), jsx("p", { children: "Cards available to your role for this account" })] }), jsx("button", { type: "button", "aria-label": "Close card catalog", onClick: () => setCatalogOpen(false), children: jsx(CloseIcon, { size: 20 }) })] }), jsx("div", { className: sx(catalogBodyStyle), children: CATALOG.map((item) => jsxs("div", { className: sx(catalogItemStyle), children: [jsx("span", { className: sx(catalogIconStyle), children: jsx(WidgetIcon, { type: item.type }) }), jsxs("div", { children: [jsx("strong", { children: item.title }), jsx("span", { children: "Account" }), jsx("p", { children: item.description })] }), presentTypes.has(item.type) ? jsxs("span", { className: sx(addedStyle), children: [jsx(CheckIcon$1, { size: 16 }), "Added"] }) : jsxs("button", { type: "button", onClick: () => onAddWidget?.(item.type), children: [jsx(PlusIcon$2, { size: 16 }), "Add"] })] }, item.type)) }), jsx("footer", { children: "Each card can appear once on your home page." })] })] })] }));
|
|
33420
34480
|
};
|
|
@@ -33427,7 +34487,7 @@ const DashboardPage = ({ greeting = 'Good morning', firstName, accountName, widg
|
|
|
33427
34487
|
* object, and the single `@media (max-width: 767px)` block is split across the
|
|
33428
34488
|
* nine objects it used to style.
|
|
33429
34489
|
*/
|
|
33430
|
-
const pageStyle$
|
|
34490
|
+
const pageStyle$i = {
|
|
33431
34491
|
label: 'FeatureFlagManagementPage-pageStyle',
|
|
33432
34492
|
maxWidth: 1440,
|
|
33433
34493
|
margin: '0 auto',
|
|
@@ -33462,7 +34522,7 @@ const eyebrowStyle$1 = {
|
|
|
33462
34522
|
letterSpacing: '.08em',
|
|
33463
34523
|
textTransform: 'uppercase',
|
|
33464
34524
|
};
|
|
33465
|
-
const descriptionStyle$
|
|
34525
|
+
const descriptionStyle$5 = {
|
|
33466
34526
|
label: 'FeatureFlagManagementPage-descriptionStyle',
|
|
33467
34527
|
maxWidth: 720,
|
|
33468
34528
|
margin: '10px 0 0',
|
|
@@ -34134,7 +35194,7 @@ const FeatureFlagManagementPage = ({ definitions, rules, targetOptions, loading
|
|
|
34134
35194
|
const hasRuleActions = Boolean(onEditRule || onDeactivateRule);
|
|
34135
35195
|
const currentUserSearchError = userSearchError ?? internalUserSearchError;
|
|
34136
35196
|
const currentAudienceError = audienceError ?? internalAudienceError;
|
|
34137
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
35197
|
+
return (jsxs("div", { className: cx(sx(pageStyle$i), className), "data-test": "feature-flag-management-page", "aria-busy": busy, children: [jsxs("header", { className: sx(headerStyle$e), children: [jsxs("div", { children: [jsx("p", { className: sx(eyebrowStyle$1), children: "Administration \u00B7 System" }), jsx("h1", { children: "Feature Flags" }), jsx("p", { className: sx(descriptionStyle$5), children: "Review the immutable feature catalog and manage prioritized audience rules." })] }), onCreateRule && !editor && !loading && !error && hasActiveDefinitions && rules.length > 0 && (jsx(Button, { type: "button", leftIcon: jsx(PlusIcon$2, { size: 16 }), onClick: openCreate, disabled: busy, "data-test": "feature-flag-create-rule", children: "Create rule" }))] }), busy && (jsxs("div", { className: sx(submittingStyle), role: "status", "data-test": "feature-flag-submitting", children: [jsx(Spinner, { size: "sm", label: "Saving feature rule" }), jsx("span", { children: "Saving feature rule\u2026" })] })), loading && (jsxs("div", { className: sx(pageStateStyle), "data-test": "feature-flag-loading", children: [jsx(Spinner, { size: "lg", label: "Loading feature flags" }), jsx("p", { children: "Loading feature flags\u2026" })] })), !loading && error && (jsxs("div", { className: sx(pageStateStyle), "data-test": "feature-flag-error", children: [jsx(Alert, { variant: "error", title: "Feature flags could not be loaded", children: error }), onRetry && (jsx(Button, { type: "button", variant: "outline", onClick: onRetry, "data-test": "feature-flag-retry", children: "Try again" }))] })), !loading && !error && definitions.length === 0 && (jsx("div", { "data-test": "feature-flag-definitions-empty", children: jsx(EmptyState$1, { title: "No feature definitions", description: "Publish immutable feature definitions before creating audience rules.", icon: jsx(SettingsIcon, { size: 30 }), size: "lg" }) })), !loading && !error && definitions.length > 0 && (jsxs(Fragment, { children: [actionError && (jsx(Alert, { variant: "error", title: "Feature rule change failed", dismissible: true, onDismiss: () => setActionError(undefined), className: sx(actionErrorStyle), children: jsx("span", { "data-test": "feature-flag-action-error", children: actionError }) })), jsxs("section", { className: sx(catalogPanelStyle), "aria-labelledby": "feature-catalog-heading", children: [jsxs("div", { className: sx(sectionHeadingStyle), children: [jsxs("div", { children: [jsx("h2", { id: "feature-catalog-heading", children: "Feature catalog" }), jsx("p", { children: "Definitions and hierarchy are read-only in this view." })] }), jsxs(Badge, { size: "sm", children: [definitions.length, " definitions"] })] }), jsx("div", { className: sx(definitionListStyle), "data-test": "feature-flag-definitions", children: definitionRows.map(({ definition, depth }) => (jsxs("article", { className: cx(sx(definitionStyle), definition.isActive === false && sx(inactiveDefinitionStyle)), style: { marginInlineStart: `${depth * 24}px` }, "data-test": `feature-flag-definition-${definition.featureKey}`, "data-depth": depth, children: [jsxs("div", { className: sx(definitionCopyStyle), children: [jsxs("div", { className: sx(definitionTitleStyle), children: [jsx("strong", { children: definition.name }), jsx("code", { children: definition.featureKey })] }), jsx("p", { children: definition.description }), definition.isActive === false && (jsx("p", { className: sx(killSwitchStyle), children: "Kill switch active. Targeting rules cannot enable this feature." }))] }), jsxs("div", { className: sx(definitionBadgesStyle), children: [jsx(Badge, { variant: definition.isActive === false ? 'error' : 'success', size: "sm", children: definition.isActive === false ? 'Inactive kill switch' : 'Active definition' }), jsxs(Badge, { variant: definition.defaultEnabled ? 'success' : 'default', size: "sm", children: ["Default ", definition.defaultEnabled ? 'enabled' : 'disabled'] })] })] }, definition.featureKey))) })] }), editor && (jsxs("section", { className: sx(editorPanelStyle), "data-test": "feature-flag-rule-editor", children: [jsxs("div", { className: sx(sectionHeadingStyle), children: [jsxs("div", { children: [jsx("h2", { children: editor.mode === 'create' ? 'Create targeting rule' : 'Edit targeting rule' }), jsx("p", { children: "The most specific target wins, then account scope, then priority; deny wins an exact tie. Changes require an audit reason." })] }), editor.mode === 'edit' && (jsxs("code", { className: sx(versionStyle), children: ["Version ", editor.rule.rowVersion] }))] }), jsxs("form", { className: sx(ruleFormStyle), onSubmit: submitRule, noValidate: true, children: [jsx(Select, { label: "Feature", options: definitions.map((definition) => ({
|
|
34138
35198
|
value: definition.featureKey,
|
|
34139
35199
|
label: `${definition.name} · ${definition.featureKey}`,
|
|
34140
35200
|
disabled: definition.isActive === false,
|
|
@@ -34675,7 +35735,7 @@ GroupTravelRequestPage.displayName = 'GroupTravelRequestPage';
|
|
|
34675
35735
|
* split across the objects it styled: each `@media` lives inside the one style
|
|
34676
35736
|
* it applies to, so a rule and its responsive override stay together.
|
|
34677
35737
|
*/
|
|
34678
|
-
const pageStyle$
|
|
35738
|
+
const pageStyle$h = {
|
|
34679
35739
|
label: 'IndividualTravelPage-pageStyle',
|
|
34680
35740
|
minHeight: '100%',
|
|
34681
35741
|
padding: 24,
|
|
@@ -35413,7 +36473,7 @@ const IndividualTravelPage = ({ trips, tabCounts, enabledTabs = ['current', 'pas
|
|
|
35413
36473
|
: activeFilters
|
|
35414
36474
|
? 'No trips match the selected filters. Clear a filter or widen the date range.'
|
|
35415
36475
|
: emptyMessage;
|
|
35416
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
36476
|
+
return (jsxs("div", { className: cx(sx(pageStyle$h), className), "data-test": "individual-travel-page", "aria-busy": loading || refreshing, children: [jsxs("div", { className: sx(headerStyle$d), children: [jsx("h1", { className: sx(titleStyle$b), children: "Individual & Small Group Travel" }), onCreateRequest && (jsx(Button
|
|
35417
36477
|
// Explicit: the atom has no default, and inside a host form a
|
|
35418
36478
|
// bare <button> would submit it.
|
|
35419
36479
|
, {
|
|
@@ -35439,7 +36499,7 @@ const IndividualTravelPage = ({ trips, tabCounts, enabledTabs = ['current', 'pas
|
|
|
35439
36499
|
* the three columns and the narrow-screen tab strip — still comes from the
|
|
35440
36500
|
* RequestFormLayout organism, and the blocks from the FormSection molecule.
|
|
35441
36501
|
*/
|
|
35442
|
-
const pageStyle$
|
|
36502
|
+
const pageStyle$g = {
|
|
35443
36503
|
label: 'IndividualTravelRequestPage-pageStyle',
|
|
35444
36504
|
color: 'var(--color-ink, #282828)',
|
|
35445
36505
|
};
|
|
@@ -36907,9 +37967,9 @@ const IndividualTravelRequestFormPage = ({ currentTraveler, configuration, value
|
|
|
36907
37967
|
}
|
|
36908
37968
|
};
|
|
36909
37969
|
if (loading) {
|
|
36910
|
-
return (jsx(RequestFormLayout, { className: cx(sx(pageStyle$
|
|
37970
|
+
return (jsx(RequestFormLayout, { className: cx(sx(pageStyle$g), className), header: jsx(RequestFormHeader, { title: "Individual Travel Request" }), children: jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-form-loading", children: [jsx(Spinner, { label: "Loading travel request form" }), jsx("span", { children: "Loading request options\u2026" })] }) }));
|
|
36911
37971
|
}
|
|
36912
|
-
return (jsx("form", { ref: formRef, className: sx(formStyle), onSubmit: (event) => void handleSubmit(event), noValidate: true, "data-test": "individual-travel-request-form", "aria-busy": busy, children: jsxs(RequestFormLayout, { className: cx(sx(pageStyle$
|
|
37972
|
+
return (jsx("form", { ref: formRef, className: sx(formStyle), onSubmit: (event) => void handleSubmit(event), noValidate: true, "data-test": "individual-travel-request-form", "aria-busy": busy, children: jsxs(RequestFormLayout, { className: cx(sx(pageStyle$g), className), header: jsx(RequestFormHeader, { title: "Individual Travel Request", eventName: currentTraveler.displayName }), activePane: activePane, onPaneChange: setActivePane, mobileServices: availableServices.map((service) => (jsxs("button", { type: "button", "aria-pressed": activeService === service.key, onClick: () => navigateToService(service.key), "data-test": `individual-travel-request-mobile-service-${service.key}`, children: [service.icon, jsx("span", { children: service.label })] }, service.key))), sidebar: (jsxs("div", { "aria-label": "Travel types", "data-test": "individual-travel-request-service-sidebar", children: [jsx(ServiceToggleList, { services: availableServices, enabledServices: selectedServices, onToggle: (service, checked) => toggleService(service, checked), onClick: navigateToService, className: sx(serviceNavigationStyle), disabled: disabled }), jsxs("div", { className: sx(travelerRailStyle), children: [jsx("h3", { children: "Travelling" }), jsxs("p", { children: [jsx(UsersIcon$1, { size: 17 }), " ", travelerRailSummary] })] })] })), summary: (jsx(RequestSummary, { sections: summarySections, values: {}, dataTest: "individual-travel-request-summary" })), footer: (onCancel || onSubmit) ? (jsx(RequestFormFooter, { onPrevious: onCancel, submitsForm: Boolean(onSubmit), isFirstPage: true, isLastPage: true, isSubmitting: busy, previousText: "Cancel", nextText: submitLabel, previousButtonDataTest: "individual-travel-request-cancel", nextButtonDataTest: "individual-travel-request-submit" })) : undefined, children: [notice && jsx("div", { className: sx(bannerStyle), "data-test": "individual-travel-request-form-notice", children: jsx(Alert, { variant: "warning", children: notice }) }), error && (jsx("div", { className: sx(bannerStyle), "data-test": "individual-travel-request-form-error", children: jsxs(Alert, { variant: "error", title: "The request form needs attention", children: [jsx("div", { children: error }), onRetry && jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: onRetry, "data-test": "individual-travel-request-form-retry", children: "Try again" })] }) })), readOnly && (jsx("p", { className: sx(readOnlyNoticeStyle), "data-test": "individual-travel-request-form-read-only", children: "Request submission is unavailable. Form fields are shown for reference only." })), (Object.keys(allErrors).length > 0 || submitError) && (jsxs("div", { ref: errorSummaryRef, className: sx(errorSummaryStyle), role: "alert", tabIndex: -1, "data-test": "individual-travel-request-form-validation", children: [jsx("h2", { children: "Review the request before submitting" }), submitError && jsx("p", { "data-test": "individual-travel-request-form-submit-error", children: submitError }), Object.keys(allErrors).length > 0 && jsx("ul", { children: Object.values(allErrors).map((message, index) => jsx("li", { children: message }, `${message}-${index}`)) })] })), activeService !== 'general' && !selectedServices[activeService] && (jsxs("div", { className: sx(mobileEnableStyle), "data-test": "individual-travel-request-mobile-enable", children: [jsxs("span", { children: ["Add ", SERVICE_LABELS[activeService], " to this request"] }), jsx(Toggle, { "aria-label": `Enable ${SERVICE_LABELS[activeService]}`, checked: false, onChange: () => enableFromStrip(activeService), size: "sm" })] })), jsxs(Section, { title: "Traveler information", description: "Tell the travel team who is traveling. Required fields are marked with an asterisk.", icon: jsx(UsersIcon$1, { size: 24 }), dataTest: "individual-travel-request-section-travelers", children: [jsxs("fieldset", { className: sx(choiceGroupStyle), children: [jsx("legend", { className: sx(legendStyle), children: "Travel for" }), jsxs("label", { className: sx(choiceStyle), children: [jsx("input", { type: "radio", name: "travelerType", value: "self", checked: resolvedValues.travelerType === 'self' || !configuration.allowOtherTravelers, disabled: disabled, onChange: () => commit({ ...resolvedValues, travelerType: 'self', travelers: [] }), "data-test": "individual-travel-request-traveler-self" }), jsxs("span", { className: sx(choiceTextStyle), children: [jsx("strong", { children: currentTraveler.displayName }), jsx("small", { children: currentTraveler.email || 'Authenticated traveler' })] })] }), configuration.allowOtherTravelers && (jsxs("label", { className: sx(choiceStyle), children: [jsx("input", { type: "radio", name: "travelerType", value: "other", checked: resolvedValues.travelerType === 'other', disabled: disabled, onChange: () => commit({
|
|
36913
37973
|
...resolvedValues,
|
|
36914
37974
|
travelerType: 'other',
|
|
36915
37975
|
travelers: resolvedValues.travelers.length ? resolvedValues.travelers : [emptyTraveler()],
|
|
@@ -36981,7 +38041,7 @@ const IndividualTravelRequestDetailPage = ({ request, loading = false, error, no
|
|
|
36981
38041
|
: request
|
|
36982
38042
|
? `Travel request ${request.requestId}`
|
|
36983
38043
|
: 'Travel request';
|
|
36984
|
-
return (jsxs("main", { className: cx(sx(pageStyle$f), className), "data-test": "individual-travel-request-detail", "aria-busy": loading, children: [jsxs("header", { className: sx(pageHeaderStyle), children: [jsxs("div", { children: [jsx("p", { className: sx(eyebrowStyle), children: "Individual travel" }), jsx("h1", { className: sx(titleStyle$a), children: title }), request && !loading && !error && (jsxs("div", { className: sx(detailMetaStyle), "data-test": "individual-travel-request-detail-meta", children: [jsxs("span", { children: ["Submitted ", jsx("time", { dateTime: request.submittedAt, children: formatDateTime$1(request.submittedAt) })] }), request.completedAt && jsxs("span", { children: ["Completed ", jsx("time", { dateTime: request.completedAt, children: formatDateTime$1(request.completedAt) })] })] }))] }), onBack && (jsx(Button, { type: "button", variant: "ghost", size: "sm", leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "individual-travel-request-detail-back", children: backLabel }))] }), jsxs("div", { className: sx(contentStyle$3), children: [loading && (jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-loading", children: [jsx(Spinner, { label: "Loading travel request" }), jsx("span", { children: "Loading request details\u2026" })] })), !loading && error && (jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-error", children: [jsx(Alert, { variant: "error", title: "The travel request could not be loaded", children: error }), onRetry && jsx(Button, { type: "button", variant: "secondary", onClick: onRetry, "data-test": "individual-travel-request-detail-retry", children: "Try again" })] })), !loading && !error && !request && (jsx("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-empty", children: jsx("p", { children: "No travel request was supplied." }) })), !loading && !error && request && (jsxs("div", { className: sx(formStyle), children: [notice && jsx("div", { className: sx(bannerStyle), "data-test": "individual-travel-request-detail-notice", children: jsx(Alert, { variant: "warning", children: notice }) }), jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-general", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Request information" }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Request number", dataTest: "individual-travel-request-detail-request-id", children: request.requestId }), jsx(DetailField, { label: "Traveler type", children: request.travelerType === 'self' ? 'Self' : 'Other traveler' }), jsx(DetailField, { label: "Submitted by", children: request.submittedBy?.name }), jsx(DetailField, { label: "Submitter email", children: request.submittedBy?.email }), request.submittedBy?.phone && jsx(DetailField, { label: "Submitter phone", children: request.submittedBy.phone }), request.additionalEmails && jsx(DetailField, { label: "Additional email addresses", children: request.additionalEmails })] })] }), jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-travelers", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Travelers" }) }), jsx("div", { className: sx(detailTableWrapStyle), children: jsxs("table", { className: sx(detailTableStyle), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "Name" }), jsx("th", { scope: "col", children: "Date of birth" }), jsx("th", { scope: "col", children: "Gender" })] }) }), jsxs("tbody", { children: [request.travelers.map((traveler, index) => (jsxs("tr", { "data-test": `individual-travel-request-detail-traveler-${index + 1}`, children: [jsx("td", { children: travelerName(traveler) || '—' }), jsx("td", { children: formatDate(traveler.dateOfBirth) }), jsx("td", { children: traveler.gender || '—' })] }, `${travelerName(traveler)}-${index}`))), !request.travelers.length && jsx("tr", { children: jsx("td", { colSpan: 3, className: sx(emptyValueStyle), children: "No traveler details were supplied." }) })] })] }) })] }), Boolean(request.organizationAnswers?.length) && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-organization", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Organization information" }) }), jsx(AnswerList, { answers: request.organizationAnswers, prefix: "individual-travel-request-detail-organization-answer" })] })), Boolean(request.billingAnswers?.length) && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-billing", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Billing information" }) }), jsx(AnswerList, { answers: request.billingAnswers, prefix: "individual-travel-request-detail-billing-answer" })] })), request.airRequest && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-air", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsxs("div", { children: [jsx("h2", { className: sx(sectionTitleStyle$4), children: "Air Request" }), jsx("p", { className: sx(sectionDescriptionStyle), children: request.airRequest.tripType.replace('-', ' ') })] }) }), jsx("div", { className: sx(detailTableWrapStyle), children: jsxs("table", { className: sx(detailTableStyle), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "From" }), jsx("th", { scope: "col", children: "To" }), jsx("th", { scope: "col", children: "Depart" }), request.airRequest.tripType === 'round-trip' && jsx("th", { scope: "col", children: "Return" })] }) }), jsx("tbody", { children: request.airRequest.legs.map((leg, index) => (jsxs("tr", { "data-test": `individual-travel-request-detail-air-leg-${index + 1}`, children: [jsx("td", { children: leg.departureLocation }), jsx("td", { children: leg.arrivalLocation }), jsxs("td", { children: [formatDate(leg.departureDate), " \u00B7 ", leg.departureTime] }), request.airRequest?.tripType === 'round-trip' && jsxs("td", { children: [formatDate(leg.returnDate), " \u00B7 ", leg.returnTime || '—'] })] }, index))) })] }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Fare preference", children: request.airRequest.farePreference }), jsx(DetailField, { label: "Flight preference", children: request.airRequest.flightPreference }), jsx(DetailField, { label: "Preferred airline", children: request.airRequest.preferredAirline }), jsx(DetailField, { label: "Most important factor", children: request.airRequest.priority }), request.airRequest.details && jsx(DetailField, { label: "Air details", children: request.airRequest.details })] })] })), request.hotelRequest && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-hotel", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Hotel Request" }) }), jsx("div", { className: sx(detailTableWrapStyle), children: jsxs("table", { className: sx(detailTableStyle), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "City" }), jsx("th", { scope: "col", children: "Check in" }), jsx("th", { scope: "col", children: "Check out" })] }) }), jsx("tbody", { children: request.hotelRequest.legs.map((leg, index) => (jsxs("tr", { "data-test": `individual-travel-request-detail-hotel-leg-${index + 1}`, children: [jsx("td", { children: leg.city }), jsx("td", { children: formatDate(leg.checkInDate) }), jsx("td", { children: formatDate(leg.checkOutDate) })] }, index))) })] }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Bed preference", children: request.hotelRequest.bedPreference }), jsx(DetailField, { label: "Smoking preference", children: request.hotelRequest.smokingPreference }), jsx(DetailField, { label: "Preferred hotel", children: request.hotelRequest.preferredHotel })] })] })), request.carRequest && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-car", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Vehicle Rental Request" }) }), jsx("div", { className: sx(detailTableWrapStyle), children: jsxs("table", { className: sx(detailTableStyle), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "Pickup" }), jsx("th", { scope: "col", children: "Pickup date" }), jsx("th", { scope: "col", children: "Drop-off" }), jsx("th", { scope: "col", children: "Drop-off date" })] }) }), jsx("tbody", { children: request.carRequest.legs.map((leg, index) => (jsxs("tr", { "data-test": `individual-travel-request-detail-car-leg-${index + 1}`, children: [jsxs("td", { children: [leg.pickupCity, leg.pickupLocation ? ` · ${leg.pickupLocation}` : ''] }), jsxs("td", { children: [formatDate(leg.pickupDate), " \u00B7 ", leg.pickupTime] }), jsx("td", { children: leg.dropoffLocation || leg.pickupCity }), jsxs("td", { children: [formatDate(leg.dropoffDate), " \u00B7 ", leg.dropoffTime] })] }, index))) })] }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Vehicle type", children: request.carRequest.vehicleType }), jsx(DetailField, { label: "Rental company", children: request.carRequest.rentalCompany }), jsx(DetailField, { label: "Flight number or tail number", children: request.carRequest.flightNumberOrTailNumber })] })] })), request.busRequest && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-bus", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Bus Request" }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Pickup city", children: request.busRequest.pickupCity }), jsx(DetailField, { label: "Pickup location", children: request.busRequest.pickupLocation }), jsx(DetailField, { label: "Pickup date and time", children: formatDateTime$1(request.busRequest.pickupDateTime) }), jsx(DetailField, { label: "Drop-off city", children: request.busRequest.dropoffCity }), jsx(DetailField, { label: "Drop-off location", children: request.busRequest.dropoffLocation }), jsx(DetailField, { label: "Drop-off date and time", children: formatDateTime$1(request.busRequest.dropoffDateTime) }), jsx(DetailField, { label: "Vehicle type", children: request.busRequest.vehicleType }), request.busRequest.specialRequests && jsx(DetailField, { label: "Bus requests", children: request.busRequest.specialRequests })] })] })), request.specialRequests && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-special-requests", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Additional requests" }) }), jsx("p", { children: request.specialRequests })] }))] }))] })] }));
|
|
38044
|
+
return (jsxs("main", { className: cx(sx(pageStyle$g), className), "data-test": "individual-travel-request-detail", "aria-busy": loading, children: [jsxs("header", { className: sx(pageHeaderStyle), children: [jsxs("div", { children: [jsx("p", { className: sx(eyebrowStyle), children: "Individual travel" }), jsx("h1", { className: sx(titleStyle$a), children: title }), request && !loading && !error && (jsxs("div", { className: sx(detailMetaStyle), "data-test": "individual-travel-request-detail-meta", children: [jsxs("span", { children: ["Submitted ", jsx("time", { dateTime: request.submittedAt, children: formatDateTime$1(request.submittedAt) })] }), request.completedAt && jsxs("span", { children: ["Completed ", jsx("time", { dateTime: request.completedAt, children: formatDateTime$1(request.completedAt) })] })] }))] }), onBack && (jsx(Button, { type: "button", variant: "ghost", size: "sm", leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "individual-travel-request-detail-back", children: backLabel }))] }), jsxs("div", { className: sx(contentStyle$3), children: [loading && (jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-loading", children: [jsx(Spinner, { label: "Loading travel request" }), jsx("span", { children: "Loading request details\u2026" })] })), !loading && error && (jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-error", children: [jsx(Alert, { variant: "error", title: "The travel request could not be loaded", children: error }), onRetry && jsx(Button, { type: "button", variant: "secondary", onClick: onRetry, "data-test": "individual-travel-request-detail-retry", children: "Try again" })] })), !loading && !error && !request && (jsx("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-empty", children: jsx("p", { children: "No travel request was supplied." }) })), !loading && !error && request && (jsxs("div", { className: sx(formStyle), children: [notice && jsx("div", { className: sx(bannerStyle), "data-test": "individual-travel-request-detail-notice", children: jsx(Alert, { variant: "warning", children: notice }) }), jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-general", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Request information" }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Request number", dataTest: "individual-travel-request-detail-request-id", children: request.requestId }), jsx(DetailField, { label: "Traveler type", children: request.travelerType === 'self' ? 'Self' : 'Other traveler' }), jsx(DetailField, { label: "Submitted by", children: request.submittedBy?.name }), jsx(DetailField, { label: "Submitter email", children: request.submittedBy?.email }), request.submittedBy?.phone && jsx(DetailField, { label: "Submitter phone", children: request.submittedBy.phone }), request.additionalEmails && jsx(DetailField, { label: "Additional email addresses", children: request.additionalEmails })] })] }), jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-travelers", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Travelers" }) }), jsx("div", { className: sx(detailTableWrapStyle), children: jsxs("table", { className: sx(detailTableStyle), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "Name" }), jsx("th", { scope: "col", children: "Date of birth" }), jsx("th", { scope: "col", children: "Gender" })] }) }), jsxs("tbody", { children: [request.travelers.map((traveler, index) => (jsxs("tr", { "data-test": `individual-travel-request-detail-traveler-${index + 1}`, children: [jsx("td", { children: travelerName(traveler) || '—' }), jsx("td", { children: formatDate(traveler.dateOfBirth) }), jsx("td", { children: traveler.gender || '—' })] }, `${travelerName(traveler)}-${index}`))), !request.travelers.length && jsx("tr", { children: jsx("td", { colSpan: 3, className: sx(emptyValueStyle), children: "No traveler details were supplied." }) })] })] }) })] }), Boolean(request.organizationAnswers?.length) && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-organization", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Organization information" }) }), jsx(AnswerList, { answers: request.organizationAnswers, prefix: "individual-travel-request-detail-organization-answer" })] })), Boolean(request.billingAnswers?.length) && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-billing", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Billing information" }) }), jsx(AnswerList, { answers: request.billingAnswers, prefix: "individual-travel-request-detail-billing-answer" })] })), request.airRequest && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-air", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsxs("div", { children: [jsx("h2", { className: sx(sectionTitleStyle$4), children: "Air Request" }), jsx("p", { className: sx(sectionDescriptionStyle), children: request.airRequest.tripType.replace('-', ' ') })] }) }), jsx("div", { className: sx(detailTableWrapStyle), children: jsxs("table", { className: sx(detailTableStyle), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "From" }), jsx("th", { scope: "col", children: "To" }), jsx("th", { scope: "col", children: "Depart" }), request.airRequest.tripType === 'round-trip' && jsx("th", { scope: "col", children: "Return" })] }) }), jsx("tbody", { children: request.airRequest.legs.map((leg, index) => (jsxs("tr", { "data-test": `individual-travel-request-detail-air-leg-${index + 1}`, children: [jsx("td", { children: leg.departureLocation }), jsx("td", { children: leg.arrivalLocation }), jsxs("td", { children: [formatDate(leg.departureDate), " \u00B7 ", leg.departureTime] }), request.airRequest?.tripType === 'round-trip' && jsxs("td", { children: [formatDate(leg.returnDate), " \u00B7 ", leg.returnTime || '—'] })] }, index))) })] }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Fare preference", children: request.airRequest.farePreference }), jsx(DetailField, { label: "Flight preference", children: request.airRequest.flightPreference }), jsx(DetailField, { label: "Preferred airline", children: request.airRequest.preferredAirline }), jsx(DetailField, { label: "Most important factor", children: request.airRequest.priority }), request.airRequest.details && jsx(DetailField, { label: "Air details", children: request.airRequest.details })] })] })), request.hotelRequest && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-hotel", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Hotel Request" }) }), jsx("div", { className: sx(detailTableWrapStyle), children: jsxs("table", { className: sx(detailTableStyle), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "City" }), jsx("th", { scope: "col", children: "Check in" }), jsx("th", { scope: "col", children: "Check out" })] }) }), jsx("tbody", { children: request.hotelRequest.legs.map((leg, index) => (jsxs("tr", { "data-test": `individual-travel-request-detail-hotel-leg-${index + 1}`, children: [jsx("td", { children: leg.city }), jsx("td", { children: formatDate(leg.checkInDate) }), jsx("td", { children: formatDate(leg.checkOutDate) })] }, index))) })] }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Bed preference", children: request.hotelRequest.bedPreference }), jsx(DetailField, { label: "Smoking preference", children: request.hotelRequest.smokingPreference }), jsx(DetailField, { label: "Preferred hotel", children: request.hotelRequest.preferredHotel })] })] })), request.carRequest && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-car", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Vehicle Rental Request" }) }), jsx("div", { className: sx(detailTableWrapStyle), children: jsxs("table", { className: sx(detailTableStyle), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "Pickup" }), jsx("th", { scope: "col", children: "Pickup date" }), jsx("th", { scope: "col", children: "Drop-off" }), jsx("th", { scope: "col", children: "Drop-off date" })] }) }), jsx("tbody", { children: request.carRequest.legs.map((leg, index) => (jsxs("tr", { "data-test": `individual-travel-request-detail-car-leg-${index + 1}`, children: [jsxs("td", { children: [leg.pickupCity, leg.pickupLocation ? ` · ${leg.pickupLocation}` : ''] }), jsxs("td", { children: [formatDate(leg.pickupDate), " \u00B7 ", leg.pickupTime] }), jsx("td", { children: leg.dropoffLocation || leg.pickupCity }), jsxs("td", { children: [formatDate(leg.dropoffDate), " \u00B7 ", leg.dropoffTime] })] }, index))) })] }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Vehicle type", children: request.carRequest.vehicleType }), jsx(DetailField, { label: "Rental company", children: request.carRequest.rentalCompany }), jsx(DetailField, { label: "Flight number or tail number", children: request.carRequest.flightNumberOrTailNumber })] })] })), request.busRequest && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-bus", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Bus Request" }) }), jsxs("dl", { className: sx(detailGridStyle), children: [jsx(DetailField, { label: "Pickup city", children: request.busRequest.pickupCity }), jsx(DetailField, { label: "Pickup location", children: request.busRequest.pickupLocation }), jsx(DetailField, { label: "Pickup date and time", children: formatDateTime$1(request.busRequest.pickupDateTime) }), jsx(DetailField, { label: "Drop-off city", children: request.busRequest.dropoffCity }), jsx(DetailField, { label: "Drop-off location", children: request.busRequest.dropoffLocation }), jsx(DetailField, { label: "Drop-off date and time", children: formatDateTime$1(request.busRequest.dropoffDateTime) }), jsx(DetailField, { label: "Vehicle type", children: request.busRequest.vehicleType }), request.busRequest.specialRequests && jsx(DetailField, { label: "Bus requests", children: request.busRequest.specialRequests })] })] })), request.specialRequests && (jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-special-requests", children: [jsx("div", { className: sx(sectionHeaderStyle), children: jsx("h2", { className: sx(sectionTitleStyle$4), children: "Additional requests" }) }), jsx("p", { children: request.specialRequests })] }))] }))] })] }));
|
|
36985
38045
|
};
|
|
36986
38046
|
|
|
36987
38047
|
/**
|
|
@@ -36993,7 +38053,7 @@ const IndividualTravelRequestDetailPage = ({ request, loading = false, error, no
|
|
|
36993
38053
|
* the first place, and `'& p'` / `'& ul, & ol'` say what `:global` was working
|
|
36994
38054
|
* around.
|
|
36995
38055
|
*/
|
|
36996
|
-
const pageStyle$
|
|
38056
|
+
const pageStyle$f = {
|
|
36997
38057
|
label: 'InfoCenterPage-pageStyle',
|
|
36998
38058
|
display: 'flex',
|
|
36999
38059
|
flexDirection: 'column',
|
|
@@ -37293,7 +38353,7 @@ const InfoCenterPage = ({ title = 'Info Center', accountName, articles = [], sta
|
|
|
37293
38353
|
};
|
|
37294
38354
|
const modalMeta = modalArticle ? metaFor(modalArticle.category) : null;
|
|
37295
38355
|
const ModalCategoryIcon = modalMeta?.icon;
|
|
37296
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
38356
|
+
return (jsxs("div", { className: cx(sx(pageStyle$f), className), children: [showBreadcrumb && (jsxs("nav", { className: sx(breadcrumbStyle$3), "aria-label": "Breadcrumb", children: [jsxs("a", { href: homeHref, children: [jsx(HomeIcon, { size: 14 }), "Home"] }), jsx("span", { children: "/" }), jsx("span", { children: "Info Center" })] })), jsxs("div", { className: sx(headerStyle$c), children: [jsxs("div", { className: sx(headerTextStyle), children: [jsx("h1", { className: sx(titleStyle$9), children: title }), accountName && (jsxs("p", { className: sx(subtitleStyle$3), children: ["Travel resources and program information for ", accountName, "."] }))] }), isAdmin && (jsxs(Button, { variant: "primary", size: "sm", onClick: onAddArticle, children: [jsx(PlusIcon$2, { size: 15 }), "Add Article"] }))] }), pageState === 'loading' && (jsxs("div", { className: sx(stateBlockStyle), children: [jsx(Spinner, { size: "md" }), jsx("span", { children: "Loading\u2026" })] })), pageState === 'error' && (jsxs("div", { className: cx(sx(stateBlockStyle), sx(stateErrorStyle)), children: [jsx(WarningIcon$1, { size: 28 }), jsx("p", { className: sx(stateTextStyle), children: "Unable to load Info Center resources." })] })), pageState === 'empty' && (jsxs("div", { className: sx(stateBlockStyle), children: [jsx(InfoIcon$1, { size: 28 }), jsx("p", { className: sx(stateTextStyle), children: "No resources available." })] })), pageState === 'data' && (jsxs(Fragment, { children: [jsx(TabStrip, { className: sx(tabsStyle$1), tabs: [
|
|
37297
38357
|
{ id: 'All', label: 'All', icon: jsx(GridIcon, { size: 15 }) },
|
|
37298
38358
|
...categories.map((cat) => {
|
|
37299
38359
|
const m = metaFor(cat);
|
|
@@ -37317,7 +38377,7 @@ const InfoCenterPage = ({ title = 'Info Center', accountName, articles = [], sta
|
|
|
37317
38377
|
* between two module classes (`.costTotal .costLabel/.costValue`) becomes
|
|
37318
38378
|
* `costTotalTextStyle` — see the note there.
|
|
37319
38379
|
*/
|
|
37320
|
-
const pageStyle$
|
|
38380
|
+
const pageStyle$e = {
|
|
37321
38381
|
label: 'ItineraryPage-pageStyle',
|
|
37322
38382
|
display: 'flex',
|
|
37323
38383
|
flexDirection: 'column',
|
|
@@ -37767,13 +38827,13 @@ const ItineraryPage = ({ tripName, recordLocator, travelers, startDate, endDate,
|
|
|
37767
38827
|
const agentCard = agent && (jsxs("section", { className: sx(agentCardStyle), "aria-label": "Your travel team", children: [jsx("div", { className: sx(agentHeaderStyle), children: jsx("h2", { className: sx(agentTitleStyle), children: "Your Travel Team" }) }), jsxs("div", { className: sx(agentRowStyle), children: [jsxs("div", { className: sx(agentInfoStyle), children: [jsx("p", { className: sx(agentNameStyle), children: agent.name }), agent.role && jsx("p", { className: sx(agentRoleStyle), children: agent.role })] }), jsxs("ul", { className: sx(agentLinksStyle), children: [agent.email && (jsx(AgentContact, { icon: jsx(MailIcon, { size: 16 }), label: "Email", children: jsx("a", { className: sx(agentLinkStyle), href: `mailto:${agent.email}`, children: agent.email }) })), agent.businessHours && (jsx(AgentContact, { icon: jsx(CalendarIcon$1, { size: 16 }), label: "Business Hours", children: agent.businessHours })), agent.tollFreeNumber && (jsx(AgentContact, { icon: jsx(PhoneIcon, { size: 16 }), label: "Toll Free Number", children: jsx("a", { className: sx(agentLinkStyle), href: telHref(agent.tollFreeNumber), children: agent.tollFreeNumber }) })), agent.afterHoursPhone && (jsxs(AgentContact, { icon: jsx(HeadsetIcon, { size: 16 }), label: "After-Hours/Emergency Service", children: [jsx("a", { className: sx(agentLinkStyle), href: telHref(agent.afterHoursPhone), children: agent.afterHoursPhone }), agent.afterHoursNote && jsxs(Fragment, { children: [" ", agent.afterHoursNote] })] }))] })] })] }));
|
|
37768
38828
|
const titleRow = (jsxs("div", { className: sx(titleRowStyle), children: [jsx("h2", { className: sx(sectionTitleStyle$3), children: "Air Invoice Details" }), showStatus && jsx(StatusBadge, { status: badge.variant, label: badge.label })] }));
|
|
37769
38829
|
const actions = showActions && (jsxs("div", { className: sx(actionsStyle$1), "aria-label": "Itinerary actions", children: [onPrint && jsx(Button, { type: "button", variant: "secondary", size: "sm", leftIcon: jsx(PrinterIcon, { size: 16 }), "data-test": "itinerary-print", onClick: onPrint, children: "Print" }), onEmail && jsx(Button, { type: "button", variant: "secondary", size: "sm", leftIcon: jsx(MailIcon, { size: 16 }), "data-test": "itinerary-email", onClick: onEmail, children: "Email" }), onAddToCalendar && jsx(Button, { type: "button", variant: "secondary", size: "sm", leftIcon: jsx(CalendarIcon$1, { size: 16 }), "data-test": "itinerary-add-to-calendar", onClick: onAddToCalendar, children: "Add to calendar" }), onDownloadInvoice && jsx(Button, { type: "button", variant: "secondary", size: "sm", leftIcon: jsx(DocumentIcon, { size: 16 }), "data-test": "itinerary-download-invoice", onClick: onDownloadInvoice, children: "Invoice PDF" })] }));
|
|
37770
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
38830
|
+
return (jsxs("div", { className: cx(sx(pageStyle$e), className), "data-test": "itinerary-page", children: [jsx(PageHeaderSubsection, { sectionName: sectionName, pageName: pageName ?? (travelers.length > 0 ? `Itinerary for ${itineraryPageName(travelers)}` : 'Itinerary'), meta: startDate && endDate ? jsx(TravelDateRange, { startDate: startDate, endDate: endDate }) : undefined, onBack: onBack, backLabel: backLabel }), !showInvoice && notices, !showInvoice && agentCard, showInvoice ? (jsxs("section", { className: sx(invoiceSectionStyle), "aria-label": "Booking and invoice", children: [jsxs("div", { className: sx(invoiceActionsStyle), children: [jsx(Segment, { size: "sm", options: VIEW_OPTIONS, value: view, onChange: changeView, "aria-label": "Itinerary view" }), actions] }), !itineraryOnly && notices, !itineraryOnly && agentCard, !itineraryOnly && bookingCard, !itineraryOnly && invoice && jsx(AirInvoiceCard, { ...invoice, title: "Air Invoice Details" })] })) : (jsxs("header", { className: sx(headerStyle$b), children: [jsxs("div", { className: sx(headerMainStyle$1), children: [titleRow, jsxs("dl", { className: sx(factsStyle$1), children: [recordLocator && (jsxs("div", { className: sx(factStyle), children: [jsx("dt", { className: sx(factLabelStyle), children: "Confirmation" }), jsx("dd", { className: cx(sx(factValueStyle), sx(monoStyle$1)), children: recordLocator })] })), startDate && endDate && (jsxs("div", { className: sx(factStyle), children: [jsx("dt", { className: sx(factLabelStyle), children: "Travel dates" }), jsx("dd", { className: sx(factValueStyle), children: formatItineraryDateRange(startDate, endDate) })] })), travelers.length > 0 && (jsxs("div", { className: sx(factStyle), children: [jsx("dt", { className: sx(factLabelStyle), children: travelers.length === 1 ? 'Traveler' : 'Travelers' }), jsx("dd", { className: sx(factValueStyle), title: travelers.join(', '), children: travelerLabel })] })), sportCode && (jsxs("div", { className: sx(factStyle), children: [jsx("dt", { className: sx(factLabelStyle), children: "Program" }), jsx("dd", { className: sx(factValueStyle), children: sportCode })] }))] })] }), actions] })), !showInvoice && bookingCard, !itineraryOnly && travelers.length > 1 && (jsxs("section", { className: sx(travelersStyle), "aria-label": "Travelers on this itinerary", children: [jsx("h2", { className: sx(sectionTitleStyle$3), children: "Travelers" }), jsx("ul", { className: sx(travelerListStyle), children: travelers.map((traveler) => jsx("li", { className: sx(travelerChipStyle), children: traveler }, traveler)) })] })), !itineraryOnly && !loading && !error && notice && (jsx("div", { "data-test": "itinerary-notice", children: jsx(Alert, { variant: "warning", title: "Additional booking details", children: notice }) })), jsxs("div", { className: sx(bodyStyle$1), children: [jsx("div", { className: sx(mainStyle$1), children: jsxs("div", { "data-test": loading ? 'itinerary-loading' : error ? 'itinerary-error' : undefined, children: [jsx(ItineraryTimeline, { segments: segments, loading: loading, error: error, onCheckIn: onCheckIn, renderVendorMark: renderVendorMark, showTypeTabs: true }), error && onRetry && (jsx("div", { className: sx(retryRowStyle), children: jsx(Button, { type: "button", variant: "secondary", size: "sm", onClick: onRetry, "data-test": "itinerary-retry", children: "Try again" }) }))] }) }), !loading && !error && (closingBanners.length > 0 || closingNotes) && (jsxs("div", { className: sx(noticesStyle), "data-test": "itinerary-closing", children: [closingBanners.length > 0 && jsx(PageBanners, { className: sx(bannersStyle), systemBanners: closingBanners, alertBanners: [] }), closingNotes && jsx("div", { className: sx(closingNotesStyle), children: closingNotes })] }))] })] }));
|
|
37771
38831
|
};
|
|
37772
38832
|
ItineraryPage.displayName = 'ItineraryPage';
|
|
37773
38833
|
|
|
37774
38834
|
/** NotFoundPage's compiled rules. A straight translation — nothing in the
|
|
37775
38835
|
* stylesheet overlapped, so no specificity work was needed. */
|
|
37776
|
-
const pageStyle$
|
|
38836
|
+
const pageStyle$d = {
|
|
37777
38837
|
label: 'NotFoundPage-pageStyle',
|
|
37778
38838
|
display: 'flex',
|
|
37779
38839
|
alignItems: 'center',
|
|
@@ -37840,13 +38900,13 @@ const DefaultIllustration = () => (jsxs("svg", { width: "120", height: "120", vi
|
|
|
37840
38900
|
* - Optional illustration
|
|
37841
38901
|
*/
|
|
37842
38902
|
const NotFoundPage = ({ errorCode = '404', title = 'Page Not Found', message = 'The page you are looking for does not exist or you do not have permission to access it.', action, illustration, className = '', }) => {
|
|
37843
|
-
const pageClasses = cx(sx(pageStyle$
|
|
38903
|
+
const pageClasses = cx(sx(pageStyle$d), className);
|
|
37844
38904
|
return (jsx("div", { className: pageClasses, children: jsxs("div", { className: sx(cardStyle), children: [jsx("div", { className: sx(illustrationStyle), children: illustration || jsx(DefaultIllustration, {}) }), jsx("h1", { className: sx(errorCodeStyle), children: errorCode }), jsx("h2", { className: sx(titleStyle$8), children: title }), jsx("p", { className: sx(messageStyle), children: message }), action && (jsx("div", { className: sx(actionStyle), children: action }))] }) }));
|
|
37845
38905
|
};
|
|
37846
38906
|
NotFoundPage.displayName = 'NotFoundPage';
|
|
37847
38907
|
|
|
37848
38908
|
/** OffFleetLearnedExamplesPage's compiled rules — flat, no specificity ladder. */
|
|
37849
|
-
const pageStyle$
|
|
38909
|
+
const pageStyle$c = {
|
|
37850
38910
|
label: 'OffFleetLearnedExamplesPage-pageStyle',
|
|
37851
38911
|
display: 'flex',
|
|
37852
38912
|
flexDirection: 'column',
|
|
@@ -37870,7 +38930,7 @@ const titleStyle$7 = {
|
|
|
37870
38930
|
fontWeight: 'var(--fw-semibold)',
|
|
37871
38931
|
lineHeight: 'var(--lh-2xl)',
|
|
37872
38932
|
};
|
|
37873
|
-
const descriptionStyle$
|
|
38933
|
+
const descriptionStyle$4 = {
|
|
37874
38934
|
label: 'OffFleetLearnedExamplesPage-descriptionStyle',
|
|
37875
38935
|
maxWidth: '80ch',
|
|
37876
38936
|
margin: 0,
|
|
@@ -37966,7 +39026,7 @@ const OFF_FLEET_LEARNED_EMPTY_COPY = 'The corpus starts empty and only /api/Repr
|
|
|
37966
39026
|
* Learned examples — the corrections corpus. The empty state explains the mechanism
|
|
37967
39027
|
* rather than apologising, because an empty corpus is the correct starting state.
|
|
37968
39028
|
*/
|
|
37969
|
-
const OffFleetLearnedExamplesPage = ({ examples = [], onOpenExample, className = '', }) => (jsxs("div", { className: cx(sx(pageStyle$
|
|
39029
|
+
const OffFleetLearnedExamplesPage = ({ examples = [], onOpenExample, className = '', }) => (jsxs("div", { className: cx(sx(pageStyle$c), className), "data-test": "off-fleet-learned-examples-page", children: [jsxs("header", { className: sx(headerStyle$a), children: [jsx("h1", { className: sx(titleStyle$7), children: "Learned examples" }), jsx("p", { className: sx(descriptionStyle$4), children: OFF_FLEET_LEARNED_DESCRIPTION })] }), examples.length === 0 ? (jsx(EmptyState$1, { title: "No examples yet", description: OFF_FLEET_LEARNED_EMPTY_COPY, icon: jsx(LightbulbIcon, { size: 32 }) })) : (jsx("ul", { className: sx(examplesStyle), children: examples.map((example) => (jsxs("li", { className: sx(exampleStyle), "data-test": "off-fleet-learned-example", children: [jsxs("div", { className: sx(exampleHeaderStyle), children: [jsx("span", { className: sx(operatorStyle), children: example.operator }), jsxs("span", { className: sx(metaStyle), children: [example.sourceFileName, " \u00B7 learned ", example.learnedLabel] }), onOpenExample && (jsx(Button, { variant: "outline", size: "sm", className: sx(openButtonStyle), onClick: () => onOpenExample(example.id), "data-test": "off-fleet-open-example", children: "Open" }))] }), jsxs("div", { className: sx(pairStyle), children: [jsxs("div", { className: sx(pairSideStyle), children: [jsx("h2", { className: sx(pairTitleStyle), children: "Raw text" }), jsx("pre", { className: sx(codeStyle), "data-test": "off-fleet-example-raw", children: example.rawText })] }), jsxs("div", { className: sx(pairSideStyle), children: [jsx("h2", { className: sx(pairTitleStyle), children: "Corrected JSON" }), jsx("pre", { className: sx(codeStyle), "data-test": "off-fleet-example-json", children: example.correctedJson })] })] })] }, example.id))) }))] }));
|
|
37970
39030
|
OffFleetLearnedExamplesPage.displayName = 'OffFleetLearnedExamplesPage';
|
|
37971
39031
|
|
|
37972
39032
|
/**
|
|
@@ -37975,7 +39035,7 @@ OffFleetLearnedExamplesPage.displayName = 'OffFleetLearnedExamplesPage';
|
|
|
37975
39035
|
* One rule per element, no shared properties between them, so no selector
|
|
37976
39036
|
* needed doubling on the way across.
|
|
37977
39037
|
*/
|
|
37978
|
-
const pageStyle$
|
|
39038
|
+
const pageStyle$b = {
|
|
37979
39039
|
label: 'OffFleetReviewQueuePage-pageStyle',
|
|
37980
39040
|
display: 'flex',
|
|
37981
39041
|
flexDirection: 'column',
|
|
@@ -37999,7 +39059,7 @@ const titleStyle$6 = {
|
|
|
37999
39059
|
fontWeight: 'var(--fw-semibold)',
|
|
38000
39060
|
lineHeight: 'var(--lh-2xl)',
|
|
38001
39061
|
};
|
|
38002
|
-
const descriptionStyle$
|
|
39062
|
+
const descriptionStyle$3 = {
|
|
38003
39063
|
label: 'OffFleetReviewQueuePage-descriptionStyle',
|
|
38004
39064
|
maxWidth: '80ch',
|
|
38005
39065
|
margin: 0,
|
|
@@ -38138,7 +39198,7 @@ const OffFleetReviewQueuePage = ({ submissions, counts, onReview, onOpenRawText,
|
|
|
38138
39198
|
render: (_value, submission) => (jsx(Button, { size: "sm", onClick: () => onReview?.(submission.id), "data-test": "off-fleet-review", children: "Review" })),
|
|
38139
39199
|
},
|
|
38140
39200
|
];
|
|
38141
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
39201
|
+
return (jsxs("div", { className: cx(sx(pageStyle$b), className), "data-test": "off-fleet-review-queue-page", children: [jsxs("header", { className: sx(headerStyle$9), children: [jsx("h1", { className: sx(titleStyle$6), children: "Review queue" }), jsx("p", { className: sx(descriptionStyle$3), children: OFF_FLEET_QUEUE_DESCRIPTION })] }), jsxs("div", { className: sx(statsStyle), "data-test": "off-fleet-stats", children: [jsx(Metric, { label: "Needs review", value: tally['needs-review'] }), jsx(Metric, { label: "Received", value: tally.received }), jsx(Metric, { label: "Processing", value: tally.processing }), jsx(Metric, { label: "Parsed", value: tally.parsed }), jsx(Metric, { label: "All submissions", value: tally.all })] }), jsx(Table, { columns: columns, data: submissions, rowKey: "id", loading: loading, emptyContent: jsx(EmptyState$1, { size: "sm", title: "Nothing waiting on review", description: "Submissions land here only when the parser cannot reconcile a quote against a Trip segment. An empty queue means every off-fleet quote matched." }) })] }));
|
|
38142
39202
|
};
|
|
38143
39203
|
OffFleetReviewQueuePage.displayName = 'OffFleetReviewQueuePage';
|
|
38144
39204
|
|
|
@@ -38151,7 +39211,7 @@ OffFleetReviewQueuePage.displayName = 'OffFleetReviewQueuePage';
|
|
|
38151
39211
|
* `.section` together, is now split across the two style objects it applied to
|
|
38152
39212
|
* — an object owns every rule that targets it.
|
|
38153
39213
|
*/
|
|
38154
|
-
const pageStyle$
|
|
39214
|
+
const pageStyle$a = {
|
|
38155
39215
|
label: 'OffFleetSubmissionDetailPage-pageStyle',
|
|
38156
39216
|
display: 'flex',
|
|
38157
39217
|
flexDirection: 'column',
|
|
@@ -38506,12 +39566,155 @@ const OffFleetSubmissionDetailPage = ({ submissionId, fileName, statusLabel = 'N
|
|
|
38506
39566
|
target?.querySelector('input')?.focus();
|
|
38507
39567
|
};
|
|
38508
39568
|
const blocked = Boolean(blockedReason);
|
|
38509
|
-
return (jsxs("div", { className: cx(sx(pageStyle$
|
|
39569
|
+
return (jsxs("div", { className: cx(sx(pageStyle$a), className), "data-test": "off-fleet-submission-detail-page", children: [jsxs("div", { className: sx(topRowStyle), children: [onBack && (jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$2), leftIcon: jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "off-fleet-detail-back", children: backLabel })), jsx(StatusBadge, { status: "in-review", label: statusLabel })] }), jsxs("header", { className: sx(headerStyle$8), children: [jsx("h1", { className: sx(titleStyle$5), children: fileName }), jsx("p", { className: sx(subtitleStyle$2), children: submissionId })] }), jsx(Alert, { variant: "warning", title: "Why this needs review", children: jsx("span", { className: sx(reasonStyle), "data-test": "off-fleet-detail-reason", children: failureReason }) }), jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Source document", children: [jsx("h2", { className: sx(sectionTitleStyle$2), children: "Source document" }), jsx("p", { className: sx(sectionHelpStyle$1), children: "Text the parser actually read \u2014 OCR damage included." }), jsx("pre", { className: sx(rawTextStyle), "data-test": "off-fleet-raw-text", children: rawText })] }), jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Submission", children: [jsx("h2", { className: sx(sectionTitleStyle$2), children: "Submission" }), jsxs("dl", { className: sx(factsStyle), children: [jsxs("div", { children: [jsx("dt", { children: "File name" }), jsx("dd", { children: fileName })] }), jsxs("div", { children: [jsx("dt", { children: "Carrier" }), jsx("dd", { children: carrier })] }), jsxs("div", { children: [jsx("dt", { children: "Carrier Union" }), jsx("dd", { className: sx(monoStyle), children: carrierUnion })] }), jsxs("div", { children: [jsx("dt", { children: "Flight Program" }), jsx("dd", { className: sx(monoStyle), children: flightProgram })] }), jsxs("div", { children: [jsx("dt", { children: "Received" }), jsx("dd", { children: receivedAt })] }), jsxs("div", { children: [jsx("dt", { children: "Updated" }), jsx("dd", { children: updatedAt })] })] })] }), jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Segments", children: [jsx("h2", { className: sx(sectionTitleStyle$2), children: "Segments" }), jsxs("p", { className: sx(sectionHelpStyle$1), children: [charterSegmentCount, " charter segment(s) on this Flight Program"] }), jsx(Accordion, { defaultOpen: false, header: jsxs("span", { className: sx(accordionHeaderStyle), children: ["Trip segments available for matching (", charterSegmentCount, ")"] }), children: jsx("div", { className: sx(tableScrollStyle), children: jsxs("table", { className: sx(segmentTableStyle), "data-test": "off-fleet-segments", children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "Departs" }), jsx("th", { scope: "col", children: "Route" }), jsx("th", { scope: "col", children: "Trip" })] }) }), jsx("tbody", { children: tripSegments.map((segment) => (jsxs("tr", { children: [jsx("td", { children: segment.departs }), jsxs("td", { children: [segment.origin, " \u2192 ", segment.destination] }), jsx("td", { className: sx(monoStyle), children: segment.tripGuid })] }, segment.id))) })] }) }) })] }), extractionJson && (jsx("section", { className: sx(sectionStyle$2), "aria-label": "Extraction JSON", children: jsx(Accordion, { defaultOpen: false, header: jsx("span", { className: sx(accordionHeaderStyle), children: "Extraction JSON as stored" }), children: jsx("pre", { className: sx(rawTextStyle), "data-test": "off-fleet-extraction-json", children: extractionJson }) }) })), jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Quote header", children: [jsx("h2", { className: sx(sectionTitleStyle$2), children: "Quote header" }), jsx("p", { className: sx(sectionHelpStyle$1), children: "Fields the parser maps onto the Salesforce Flight Quote. Blank means null." }), jsxs("div", { className: sx(headerGridStyle), children: [jsx(Input, { id: "off-fleet-operator", label: "Operator", helperText: "As stated in the document", value: quoteHeader.operator, onChange: (event) => updateHeader('operator', event.target.value), "data-test": "off-fleet-operator" }), jsx(Input, { id: "off-fleet-charterer", label: "Charterer", helperText: "School or organisation, only if explicit", value: quoteHeader.charterer, onChange: (event) => updateHeader('charterer', event.target.value), "data-test": "off-fleet-charterer" }), jsx(Input, { id: "off-fleet-quote-date", type: "date", label: "Quote date", helperText: "Date of the quote, not of a flight", value: quoteHeader.quoteDate, onChange: (event) => updateHeader('quoteDate', event.target.value), "data-test": "off-fleet-quote-date" }), jsx(Input, { id: "off-fleet-currency", label: "Currency", helperText: "ISO code the document prices in", value: quoteHeader.currency, onChange: (event) => updateHeader('currency', event.target.value), "data-test": "off-fleet-currency" }), jsx(Input, { id: "off-fleet-fuel-base", label: "Fuel base price", helperText: "Numeric, no currency symbol", value: quoteHeader.fuelBasePrice, onChange: (event) => updateHeader('fuelBasePrice', event.target.value), "data-test": "off-fleet-fuel-base" }), jsx(Input, { id: "off-fleet-unit-price", label: "Unit price", helperText: "Only if distinct from the leg table", value: quoteHeader.unitPrice, onChange: (event) => updateHeader('unitPrice', event.target.value), "data-test": "off-fleet-unit-price" }), jsx(Select, { id: "off-fleet-price-basis", label: "Price basis", helperText: "How the stated prices group onto legs. Changing this changes every per-leg price.", options: PRICE_BASIS_OPTIONS, value: quoteHeader.priceBasis, onChange: (event) => updateHeader('priceBasis', event.target.value), className: sx(wideFieldStyle), "data-test": "off-fleet-price-basis" }), jsx(Input, { id: "off-fleet-stated-total", label: "Stated total", helperText: "Only if the document states one. Checked to \u00B1$1 after normalization.", value: quoteHeader.statedTotal, onChange: (event) => updateHeader('statedTotal', event.target.value), "data-test": "off-fleet-stated-total" })] })] }), jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Flight legs", children: [jsx("h2", { className: sx(sectionTitleStyle$2), children: "Flight legs" }), jsx("p", { className: sx(sectionHelpStyle$1), children: "One row per leg \u2014 one takeoff, one landing. Order matters for per round trip: legs are paired top-down." }), jsx("ol", { className: sx(legsStyle$1), children: legs.map((leg, index) => (jsxs("li", { className: sx(legStyle$1), ref: (node) => {
|
|
38510
39570
|
legRefs.current[leg.id] = node;
|
|
38511
39571
|
}, "data-test": "off-fleet-leg", children: [jsxs("div", { className: sx(legHeaderStyle), children: [jsxs("span", { className: sx(legIndexStyle), children: ["Leg ", index + 1] }), jsx(StatusBadge, { status: MATCH_BADGES[leg.match].status, label: MATCH_BADGES[leg.match].label }), jsx(Button, { variant: "ghost", size: "sm", className: sx(removeLegStyle), onClick: () => removeLeg(leg.id), "data-test": "off-fleet-remove-leg", children: "Remove leg" })] }), jsxs("div", { className: sx(legGridStyle), children: [jsx(Input, { id: `${leg.id}-date`, size: "sm", type: "date", label: "Date", value: leg.date, onChange: (event) => updateLeg(leg.id, { date: event.target.value }), "data-test": "off-fleet-leg-date" }), jsx(Input, { id: `${leg.id}-from`, size: "sm", label: "From", value: leg.from, onChange: (event) => updateLeg(leg.id, { from: event.target.value.toUpperCase() }), "data-test": "off-fleet-leg-from" }), jsx(Input, { id: `${leg.id}-to`, size: "sm", label: "To", value: leg.to, onChange: (event) => updateLeg(leg.id, { to: event.target.value.toUpperCase() }), "data-test": "off-fleet-leg-to" }), jsx(Input, { id: `${leg.id}-etd`, size: "sm", label: "ETD", value: leg.etd, onChange: (event) => updateLeg(leg.id, { etd: event.target.value }), "data-test": "off-fleet-leg-etd" }), jsx(Input, { id: `${leg.id}-eta`, size: "sm", label: "ETA", value: leg.eta, onChange: (event) => updateLeg(leg.id, { eta: event.target.value }), "data-test": "off-fleet-leg-eta" }), jsx(Input, { id: `${leg.id}-aircraft`, size: "sm", label: "Aircraft", value: leg.aircraft, onChange: (event) => updateLeg(leg.id, { aircraft: event.target.value }), "data-test": "off-fleet-leg-aircraft" }), jsx(Input, { id: `${leg.id}-seats`, size: "sm", label: "Seats", value: leg.seats, onChange: (event) => updateLeg(leg.id, { seats: event.target.value }), "data-test": "off-fleet-leg-seats" }), jsx(Input, { id: `${leg.id}-price`, size: "sm", label: "Price", value: leg.price, onChange: (event) => updateLeg(leg.id, { price: event.target.value }), "data-test": "off-fleet-leg-price" })] })] }, leg.id))) }), jsx(Button, { variant: "outline", size: "sm", onClick: addLeg, "data-test": "off-fleet-add-leg", children: "Add leg" })] }), jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Ambiguity flag", children: [jsx("h2", { className: sx(sectionTitleStyle$2), children: "Ambiguity flag" }), jsx(Textarea, { id: "off-fleet-ambiguity", label: "Ambiguity reason", helperText: "What a human still cannot tell from the document. Left blank, the extraction is treated as unambiguous.", rows: 3, value: ambiguityReason, onChange: (event) => setAmbiguityReason(event.target.value), "data-test": "off-fleet-ambiguity" })] }), preflight && (jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Pre-flight check", children: [jsx("h2", { className: sx(sectionTitleStyle$2), children: "Pre-flight check" }), jsx("div", { className: sx(tableScrollStyle), children: jsxs("table", { className: sx(preflightTableStyle), "data-test": "off-fleet-preflight", children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { scope: "col", children: "Leg" }), jsx("th", { scope: "col", children: "As stated" }), jsx("th", { scope: "col", children: "Per leg after normalization" })] }) }), jsx("tbody", { children: preflight.rows.map((row) => (jsxs("tr", { children: [jsx("th", { scope: "row", children: row.leg }), jsx("td", { children: row.asStated }), jsx("td", { children: row.perLegAfterNormalization })] }, row.leg))) }), jsx("tfoot", { children: jsxs("tr", { children: [jsx("th", { scope: "row", children: "Total" }), jsx("td", {}), jsx("td", { "data-test": "off-fleet-preflight-total", children: preflight.total })] }) })] }) }), jsxs("p", { className: sx(unmatchedStyle), "data-test": "off-fleet-unmatched-count", children: [preflight.unmatchedCount, " of ", preflight.legCount, " leg(s) unmatched"] }), jsx("ul", { className: sx(groupingsStyle), "data-test": "off-fleet-trip-groupings", children: preflight.tripGroupings.map((grouping) => (jsxs("li", { className: sx(groupingStyle), children: [jsx("span", { className: sx(monoStyle), children: grouping.tripGuid }), jsxs("span", { children: [grouping.legCount, " leg(s) \u00B7 ", grouping.total] })] }, grouping.tripGuid))) }), jsx("p", { className: sx(consequenceStyle), children: "Each total becomes one QuoteLineItem against a new Flight Quote for that Trip." }), preflight.diagnostics?.map((diagnostic) => (jsxs("div", { className: sx(diagnosticStyle), children: [jsx("p", { className: sx(diagnosticMessageStyle), "data-test": "off-fleet-diagnostic", children: diagnostic.message }), jsx(Button, { variant: "outline", size: "sm", onClick: () => jumpToLeg(diagnostic.legId), "data-test": "off-fleet-jump-to-leg", children: "Jump to leg" })] }, diagnostic.legId))), preflight.warnings?.map((warning) => (jsx(Alert, { variant: "warning", children: jsx("span", { className: sx(reasonStyle), "data-test": "off-fleet-warning", children: warning }) }, warning)))] })), jsxs("div", { className: sx(actionsStyle), children: [jsx(Button, { disabled: blocked, onClick: () => onCheckCorrection?.({ quoteHeader, legs, ambiguityReason }), "data-test": "off-fleet-check-correction", children: "Check correction" }), jsx(Button, { variant: "secondary", disabled: blocked, onClick: onReprocess, "data-test": "off-fleet-reprocess", children: "Reprocess submission" }), blockedReason && (jsx("p", { className: sx(blockedReasonStyle), "data-test": "off-fleet-blocked-reason", children: blockedReason }))] })] }));
|
|
38512
39572
|
};
|
|
38513
39573
|
OffFleetSubmissionDetailPage.displayName = 'OffFleetSubmissionDetailPage';
|
|
38514
39574
|
|
|
39575
|
+
/** OperationsResponseCenterPage's compiled rules. Two panels on desktop; one column under 768px. */
|
|
39576
|
+
const pageStyle$9 = {
|
|
39577
|
+
label: 'OperationsResponseCenterPage-pageStyle',
|
|
39578
|
+
display: 'flex',
|
|
39579
|
+
flexDirection: 'column',
|
|
39580
|
+
gap: 'var(--space-4)',
|
|
39581
|
+
minHeight: '100%',
|
|
39582
|
+
padding: 'var(--space-5) var(--space-6)',
|
|
39583
|
+
background: 'var(--bg-page)',
|
|
39584
|
+
'@media (max-width: 767px)': {
|
|
39585
|
+
padding: 'var(--space-4)',
|
|
39586
|
+
},
|
|
39587
|
+
};
|
|
39588
|
+
const descriptionStyle$2 = {
|
|
39589
|
+
label: 'OperationsResponseCenterPage-descriptionStyle',
|
|
39590
|
+
maxWidth: '80ch',
|
|
39591
|
+
margin: 0,
|
|
39592
|
+
color: 'var(--fg-3)',
|
|
39593
|
+
fontSize: 'var(--fs-sm)',
|
|
39594
|
+
lineHeight: 'var(--lh-sm)',
|
|
39595
|
+
};
|
|
39596
|
+
const panelsStyle = {
|
|
39597
|
+
label: 'OperationsResponseCenterPage-panelsStyle',
|
|
39598
|
+
display: 'grid',
|
|
39599
|
+
gridTemplateColumns: 'minmax(22rem, 2fr) minmax(0, 3fr)',
|
|
39600
|
+
alignItems: 'start',
|
|
39601
|
+
gap: 'var(--space-4)',
|
|
39602
|
+
'@media (max-width: 767px)': {
|
|
39603
|
+
gridTemplateColumns: 'minmax(0, 1fr)',
|
|
39604
|
+
},
|
|
39605
|
+
};
|
|
39606
|
+
/* The intake panel leaves the flow on mobile; the New incident button opens it full-screen instead. */
|
|
39607
|
+
const intakePanelStyle = {
|
|
39608
|
+
label: 'OperationsResponseCenterPage-intakePanelStyle',
|
|
39609
|
+
minWidth: 0,
|
|
39610
|
+
'@media (max-width: 767px)': {
|
|
39611
|
+
display: 'none',
|
|
39612
|
+
},
|
|
39613
|
+
};
|
|
39614
|
+
const mobileOnlyStyle = {
|
|
39615
|
+
label: 'OperationsResponseCenterPage-mobileOnlyStyle',
|
|
39616
|
+
display: 'none',
|
|
39617
|
+
'@media (max-width: 767px)': {
|
|
39618
|
+
display: 'block',
|
|
39619
|
+
},
|
|
39620
|
+
};
|
|
39621
|
+
const logPanelStyle = {
|
|
39622
|
+
label: 'OperationsResponseCenterPage-logPanelStyle',
|
|
39623
|
+
minWidth: 0,
|
|
39624
|
+
};
|
|
39625
|
+
const panelTitleStyle = {
|
|
39626
|
+
label: 'OperationsResponseCenterPage-panelTitleStyle',
|
|
39627
|
+
margin: 0,
|
|
39628
|
+
color: 'var(--fg-1)',
|
|
39629
|
+
fontSize: 'var(--fs-lg)',
|
|
39630
|
+
fontWeight: 'var(--fw-semibold)',
|
|
39631
|
+
lineHeight: 'var(--lh-lg)',
|
|
39632
|
+
};
|
|
39633
|
+
const feedStyle = {
|
|
39634
|
+
label: 'OperationsResponseCenterPage-feedStyle',
|
|
39635
|
+
display: 'flex',
|
|
39636
|
+
flexDirection: 'column',
|
|
39637
|
+
gap: 'var(--space-3)',
|
|
39638
|
+
margin: 0,
|
|
39639
|
+
padding: 0,
|
|
39640
|
+
listStyle: 'none',
|
|
39641
|
+
};
|
|
39642
|
+
const archiveSurfaceStyle = {
|
|
39643
|
+
label: 'OperationsResponseCenterPage-archiveSurfaceStyle',
|
|
39644
|
+
minWidth: 0,
|
|
39645
|
+
};
|
|
39646
|
+
const feedToolbarStyle = {
|
|
39647
|
+
label: 'OperationsResponseCenterPage-feedToolbarStyle',
|
|
39648
|
+
display: 'flex',
|
|
39649
|
+
flexWrap: 'wrap',
|
|
39650
|
+
alignItems: 'center',
|
|
39651
|
+
gap: 'var(--space-2)',
|
|
39652
|
+
marginBottom: 'var(--space-3)',
|
|
39653
|
+
};
|
|
39654
|
+
/* A toggle chip: outlined when off, filled red when it is narrowing the log to overdue Incidents. */
|
|
39655
|
+
const filterChipStyle = {
|
|
39656
|
+
label: 'OperationsResponseCenterPage-filterChipStyle',
|
|
39657
|
+
display: 'inline-flex',
|
|
39658
|
+
alignItems: 'center',
|
|
39659
|
+
gap: 'var(--space-1-5)',
|
|
39660
|
+
minHeight: 'var(--space-8)',
|
|
39661
|
+
padding: '0 var(--space-3)',
|
|
39662
|
+
border: '1px solid var(--color-alert-error-border)',
|
|
39663
|
+
borderRadius: 'var(--radius-full)',
|
|
39664
|
+
background: 'var(--bg-surface)',
|
|
39665
|
+
color: 'var(--color-error)',
|
|
39666
|
+
fontFamily: 'inherit',
|
|
39667
|
+
fontSize: 'var(--fs-sm)',
|
|
39668
|
+
fontWeight: 'var(--fw-semibold)',
|
|
39669
|
+
lineHeight: 'var(--lh-sm)',
|
|
39670
|
+
cursor: 'pointer',
|
|
39671
|
+
'&:hover': { background: 'var(--alert-error-bg)' },
|
|
39672
|
+
'&:focus-visible': {
|
|
39673
|
+
outline: '2px solid var(--color-primary)',
|
|
39674
|
+
outlineOffset: 2,
|
|
39675
|
+
},
|
|
39676
|
+
'&[aria-pressed="true"]': {
|
|
39677
|
+
borderColor: 'var(--color-error)',
|
|
39678
|
+
background: 'var(--color-error)',
|
|
39679
|
+
color: 'var(--color-white)',
|
|
39680
|
+
},
|
|
39681
|
+
};
|
|
39682
|
+
|
|
39683
|
+
const PAGE_TITLE = 'Operations Response Center';
|
|
39684
|
+
const EMPTY_ARCHIVE = { incidents: [], totalItems: 0, page: 1, filters: {} };
|
|
39685
|
+
/**
|
|
39686
|
+
* The Operations Response Center: log an Incident on one side, watch the live
|
|
39687
|
+
* Alert Log of Open Incidents on the other. Incidents with a Route left
|
|
39688
|
+
* unacknowledged too long float to the top in red. Built for a Microsoft
|
|
39689
|
+
* Teams tab, so it carries its own heading and no Hub chrome; one column on mobile.
|
|
39690
|
+
*/
|
|
39691
|
+
const OperationsResponseCenterPage = ({ view = 'log', incidents, archive = EMPTY_ARCHIVE, accounts, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES, timeZone = DEFAULT_INCIDENT_TIME_ZONE, defaultLoggingDivision, defaultNeedsAcknowledgementOnly = false, onCreateIncident, onLoggingDivisionChange, onMarkReceived, onComplete, onRenotify, onAddTripType, onRemoveTripType, onAddNote, onResolve, onSeeAll, onBack, onArchiveFiltersChange, onArchivePageChange, className = '', }) => {
|
|
39692
|
+
const drawerTitleId = useId();
|
|
39693
|
+
const [intakeOpen, setIntakeOpen] = useState(false);
|
|
39694
|
+
const [resolvingId, setResolvingId] = useState(null);
|
|
39695
|
+
const [needsAckOnly, setNeedsAckOnly] = useState(defaultNeedsAcknowledgementOnly);
|
|
39696
|
+
const ordered = useMemo(() => orderAlertLog(incidents, now, staleAfterMinutes), [incidents, now, staleAfterMinutes]);
|
|
39697
|
+
const overdueCount = ordered.filter((incident) => isIncidentOverdue(incident, now, staleAfterMinutes)).length;
|
|
39698
|
+
const shown = needsAckOnly
|
|
39699
|
+
? ordered.filter((incident) => isIncidentOverdue(incident, now, staleAfterMinutes))
|
|
39700
|
+
: ordered;
|
|
39701
|
+
const resolving = incidents.find((incident) => incident.id === resolvingId);
|
|
39702
|
+
if (view === 'archive') {
|
|
39703
|
+
return (jsxs("div", { className: cx(sx(pageStyle$9), className), "data-test": "operations-response-center-page", "data-view": "archive", children: [jsx(PageHeaderSubsection, { sectionName: PAGE_TITLE, pageName: "Archive", meta: jsx("p", { className: sx(descriptionStyle$2), children: "Resolved incidents, newest first. Read-only." }), onBack: onBack, backLabel: "Back to Alert Log" }), jsx(Card, { padding: "md", className: sx(archiveSurfaceStyle), children: jsx(IncidentArchiveTable, { incidents: archive.incidents, totalItems: archive.totalItems, page: archive.page, filters: archive.filters, loading: archive.loading, accounts: accounts, timeZone: timeZone, onFiltersChange: onArchiveFiltersChange, onPageChange: onArchivePageChange }) })] }));
|
|
39704
|
+
}
|
|
39705
|
+
const intakeForm = (inDrawer) => (jsx(IncidentIntakeForm, { accounts: accounts, defaultLoggingDivision: defaultLoggingDivision, onLoggingDivisionChange: onLoggingDivisionChange, onCancel: inDrawer ? () => setIntakeOpen(false) : undefined, onSubmit: (draft) => {
|
|
39706
|
+
onCreateIncident?.(draft);
|
|
39707
|
+
if (inDrawer)
|
|
39708
|
+
setIntakeOpen(false);
|
|
39709
|
+
} }));
|
|
39710
|
+
return (jsxs("div", { className: cx(sx(pageStyle$9), className), "data-test": "operations-response-center-page", "data-view": "log", children: [jsx(PageHeader, { title: PAGE_TITLE, after: jsx("p", { className: sx(descriptionStyle$2), children: "Log incidents, route them to the Divisions and trip types that must act, and see them through to resolution." }) }), jsx("div", { className: sx(mobileOnlyStyle), children: jsx(Button, { size: "lg", fullWidth: true, leftIcon: jsx(PlusIcon$2, { size: 20 }), onClick: () => setIntakeOpen(true), "data-test": "operations-response-center-new-incident", children: "New incident" }) }), jsxs("div", { className: sx(panelsStyle), children: [jsx("section", { className: sx(intakePanelStyle), "aria-label": "New incident panel", children: jsx(Module, { title: jsx("h2", { className: sx(panelTitleStyle), children: "New incident" }), useToggle: false, children: intakeForm(false) }) }), jsx("section", { className: sx(logPanelStyle), "aria-label": "Alert Log panel", children: jsxs(Module, { title: jsx("h2", { className: sx(panelTitleStyle), children: "Alert Log" }), badge: ordered.length || undefined, useToggle: false, footer: jsx(Button, { variant: "secondary", fullWidth: true, onClick: onSeeAll, "data-test": "operations-response-center-see-all", children: "See All" }), children: [(overdueCount > 0 || needsAckOnly) && (jsx("div", { className: sx(feedToolbarStyle), children: jsxs("button", { type: "button", className: sx(filterChipStyle), "aria-pressed": needsAckOnly, onClick: () => setNeedsAckOnly((on) => !on), "data-test": "operations-response-center-needs-ack-filter", children: [jsx(WarningIcon$1, { size: 14, "aria-hidden": "true" }), "Needs acknowledgement (", overdueCount, ")"] }) })), shown.length === 0 ? (needsAckOnly ? (jsx(EmptyState$1, { size: "sm", title: "Nothing needs acknowledgement", description: "Every Route has been acknowledged within the hour. Turn the filter off to see every open incident." })) : (jsx(EmptyState$1, { size: "sm", title: "No open incidents", description: "New incidents appear here as soon as they are logged. Resolved ones move to the Archive." }))) : (jsx("ul", { className: sx(feedStyle), "aria-label": "Open incidents", "data-test": "operations-response-center-feed", children: shown.map((incident) => (jsx("li", { children: jsx(IncidentCard, { incident: incident, now: now, staleAfterMinutes: staleAfterMinutes, timeZone: timeZone, onMarkReceived: onMarkReceived, onComplete: onComplete, onRenotify: onRenotify, onAddTripType: onAddTripType, onRemoveTripType: onRemoveTripType, onAddNote: onAddNote, onResolve: setResolvingId }) }, incident.id))) }))] }) })] }), jsxs(Drawer, { isOpen: intakeOpen, onClose: () => setIntakeOpen(false), position: "right", size: "full", "aria-labelledby": drawerTitleId, children: [jsx(Drawer.Header, { children: jsx("h2", { id: drawerTitleId, className: sx(panelTitleStyle), children: "New incident" }) }), jsx(Drawer.Body, { children: intakeForm(true) })] }), jsx(ResolveIncidentDialog, { isOpen: Boolean(resolving), incidentNumber: resolving?.number, accountName: resolving?.accountName, unacknowledgedCount: resolving?.routes.filter((route) => routeStatus(route) === 'not-acknowledged').length ?? 0, onClose: () => setResolvingId(null), onConfirm: (input) => {
|
|
39711
|
+
if (resolving)
|
|
39712
|
+
onResolve?.(resolving.id, input);
|
|
39713
|
+
setResolvingId(null);
|
|
39714
|
+
} })] }));
|
|
39715
|
+
};
|
|
39716
|
+
OperationsResponseCenterPage.displayName = 'OperationsResponseCenterPage';
|
|
39717
|
+
|
|
38515
39718
|
const pageStyle$8 = {
|
|
38516
39719
|
label: 'RosterProgramNumbersPage-pageStyle',
|
|
38517
39720
|
display: 'flex',
|
|
@@ -39774,5 +40977,5 @@ const TripDetailPage = ({ header, airSegment, groundSegment, hotelSegment, files
|
|
|
39774
40977
|
};
|
|
39775
40978
|
TripDetailPage.displayName = 'TripDetailPage';
|
|
39776
40979
|
|
|
39777
|
-
export { ACMI_AIRCRAFT_OPTIONS, ACMI_CARRIER_OPTIONS, ACMI_INSURANCE_FLAT, AccentCard, Accordion, AcmiQuoteCalculator, AdministrationPage, AgentGroupTravelRequestsPage, AgentGroupTravelRequestsTable, AirInvoiceCard, AirSegment, Alert, AppLayout, ArrowDownLeftIcon, ArrowUpRightIcon, Avatar, AvatarGroup, BID_TYPE_HEADINGS, BackLink, Badge, BookingDetailsCard, BuildingIcon, BusIcon$2 as BusIcon, Button, ButtonStyled, CARRIER_CATERING_OPTIONS, CARRIER_CONTACT_TYPES, CHAMPIONSHIP_BID_TYPES, CHAMPIONSHIP_HEADINGS, CHARTER_CONTACT_GROUPS, CHARTER_SECTIONS, CalendarIcon$1 as CalendarIcon, CalendarTypeSelector, CalendarViewSelector, CarIcon$1 as CarIcon, Card, CardBody, CardFooter, CardHeader, CarrierProfilePage, ChampionshipBidDetailPage, ChampionshipBidsPage, CharterBidResponsePage, CharterBidViewPage, CharterManifestPage, CharterSourcingEmailPreview, ChartersAccessManagementPage, ChartersHomePage, CheckIcon$1 as CheckIcon, Checkbox, ChevronDownIcon$1 as ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon$1 as ChevronRightIcon, ChevronUpIcon, ClientSelector, CloseIcon, ConfirmModal, ContactCard$1 as ContactCard, ContactList, ContactUsPage, CubeIcon, DOCUMENT_FILE_EXTENSIONS, DashboardIcon, DashboardPage, Datepicker, DetailList, DocumentIcon, DownloadIcon, Drawer, DrawerBody, DrawerFooter, DrawerHeader, Dropdown, DueDatesDrawer, EditIcon$2 as EditIcon, EmptyState$1 as EmptyState, EyeIcon, FeatureFlagManagementPage, FieldLayout, FileUploadButton, FilterChip, FilterIcon$1 as FilterIcon, Flyout, FormField, FormRow, FormSection, FormStack, GridHeaderRow, GridIcon, GridTable, GroundSegment, GroupTravelRequestPage, HUB_ADMIN_ITEM, HUB_AGENTS_ITEM, HUB_INDIVIDUAL_TRAVEL_ITEM, HUB_NAV_ITEMS, HUB_OFF_FLEET_ITEM, HUB_SOURCING_ITEM, HUB_STM_CHARTERS_ITEM, HandIcon, HeadsetIcon, HomeIcon, HotelIcon$3 as HotelIcon, HotelSegment, HubAppShell, Icon, IconRevealLink, Icons, IndividualTravelPage, IndividualTravelRequestDetailPage, IndividualTravelRequestFormPage, InfoCenterPage, InfoIcon$1 as InfoIcon, InfoTile, Input, ItineraryPage, ItinerarySegmentCard, ItineraryTimeline, LightbulbIcon, LimoIcon, ListboxSelect, LockIcon$1 as LockIcon, LogoIcon, LogoutIcon, MailIcon, ManifestCapacityStats, ManifestViewToggle, MegaphoneIcon, MembershipPrograms, MenuIcon, Metric, MinusIcon, Modal, ModalFooter, Module, ModuleDivider, ModuleVerticalDivider, MultiUserSearch, NavCard, NavItem, NextTripCard, NotFoundPage, OFF_FLEET_LEARNED_DESCRIPTION, OFF_FLEET_LEARNED_EMPTY_COPY, OFF_FLEET_QUEUE_DESCRIPTION, OffFleetLearnedExamplesPage, OffFleetReviewQueuePage, OffFleetSubmissionDetailPage, PageBanners, PageHeader, PageHeaderSubsection, Pagination, PanelTabs, PhoneIcon, PlaneIcon$3 as PlaneIcon, PlusIcon$2 as PlusIcon, PreferencesPanel, PrinterIcon, ProfileMenu, Progress, ProgressBar, ProgressCircle, QuoteCostBreakdown, QuoteReviewActions, REGULAR_SEASON_BID_TYPES, RailIcon, RefreshIcon, RegularSeasonBidsPage, RegularSeasonBidsTable, ReportIcon, RequestFormFooter, RequestFormHeader, RequestFormLayout, RequestServiceLink, RequestSummary, ResultCount, RosterProgramNumbersPage, RosterReportsPage, RosterToolbar, SOURCING_COST_CATEGORIES, SOURCING_COST_CATEGORY_LABELS, SUPPLIER_TYPE_OPTIONS, SchoolContactForm, SearchField, SearchIcon$1 as SearchIcon, Segment, SegmentedSelector, Select, SelectFilter, ServiceToggle, ServiceToggleList, SettingsIcon, Sidenav, SingleTeamPanelSelector, SourcingQuoteDetailPage, SourcingReviewQueuePage, SourcingReviewQueueTable, Spinner, SportCodeBadge, StatusBadge, SummarySection, SupplierTypeToggle, TRIP_MONTH_OPTIONS, TabPanelStack, TabStrip, Table, TableCell, Tag, TeamCalendarHeader, TeamCard, TeamContactsPanel, TeamEquipmentForm, TeamHeader, TeamImportForm, TeamManagementPage, TeamPicker, TeamProgramForm, TeamRosterMemberForm, TeamScheduleActions, TeamScheduleCompactTable, TeamScheduleEditor, TeamScheduleExpandedTable, TeamSchedulePage, TeamSubMenu, TeamTravelCalendarCardView, TeamTravelCalendarListView, TeamTravelCalendarPage, TeamTravelCalendarToolbar, TeamTravelCalendarView, TeamUserAccessForm, Textarea, ThemeProvider, Timepicker, Title, Toggle, Tooltip, Topbar, TrashIcon$2 as TrashIcon, TravelBoard, TravelDateRange, TravelServiceIcon, TravelSummaryMetrics, TravelerForm, TrendDownIcon, TrendUpIcon, TripDetailPage, TripSegment, TripTable, TypeIcon, UploadIcon, UserIcon, UsersIcon$1 as UsersIcon, WarningIcon$1 as WarningIcon, XIcon, absoluteFill, accentColors, alertBandTokens, alertTokens, boxShadow, brandColors, breakpoints, buildPaginationItems, buttonReset, computeLineItemTotal, computeQuoteTotals, computeTravelTypeCodes, css, cx, darkTheme, lightTheme as defaultTheme, deriveProgramBidStatus, flexCenter, flexCol, flexRow, font, fontFamily, fontSize, fontWeight, formatCompactTripCost, formatItineraryDate, formatItineraryDateRange, formatItineraryMoney, formatTeamScheduleDueDate, formatTeamScheduleTravelDates, getCharterSourcingEmailRoute, getCharterSourcingEmailSubject, getPageCount, getSegmentDate, getSegmentStartMinutes, getSegmentTitle, getTeamTravelCalendarPeriodLabel, groupSegmentsByDay, iconNames, iconRegistry, injectGlobal, isExpiringSoon, isProgramBiddable, isQuoteActionable, isSportCodeGroup, isTravelDueDateCompleted, isTravelDueDateOverdue, itineraryPageName, leading, lightTheme, lineClamp, lineHeight, matchesQuoteSearch, merge, moveTeamTravelCalendarPeriod, navyColors, neutralColors, ordinalDay, parseClockTime, parseItineraryDate, primaryColors, radius, rounded, semanticColors, shadow, sharedColumnWidth, size, space, spacing, sportCodeVariant, srOnly, statusColors, styled, sx, tabStripTabId, teamColors, textColors, tintColors, toInlineStyle, trans, transition, truncate$1 as truncate, useSharedColumnWidth, useTheme, weight };
|
|
40980
|
+
export { ACMI_AIRCRAFT_OPTIONS, ACMI_CARRIER_OPTIONS, ACMI_INSURANCE_FLAT, ARCHIVE_PAGE_SIZE, AccentCard, Accordion, AcmiQuoteCalculator, AdministrationPage, AgentGroupTravelRequestsPage, AgentGroupTravelRequestsTable, AirInvoiceCard, AirSegment, Alert, AppLayout, ArrowDownLeftIcon, ArrowUpRightIcon, Avatar, AvatarGroup, BID_TYPE_HEADINGS, BackLink, Badge, BookingDetailsCard, BuildingIcon, BusIcon$2 as BusIcon, Button, ButtonStyled, CARRIER_CATERING_OPTIONS, CARRIER_CONTACT_TYPES, CHAMPIONSHIP_BID_TYPES, CHAMPIONSHIP_HEADINGS, CHARTER_CONTACT_GROUPS, CHARTER_SECTIONS, CalendarIcon$1 as CalendarIcon, CalendarTypeSelector, CalendarViewSelector, CarIcon$1 as CarIcon, Card, CardBody, CardFooter, CardHeader, CarrierProfilePage, ChampionshipBidDetailPage, ChampionshipBidsPage, CharterBidResponsePage, CharterBidViewPage, CharterManifestPage, CharterSourcingEmailPreview, ChartersAccessManagementPage, ChartersHomePage, CheckIcon$1 as CheckIcon, Checkbox, ChevronDownIcon$1 as ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon$1 as ChevronRightIcon, ChevronUpIcon, ClientSelector, CloseIcon, ConfirmModal, ContactCard$1 as ContactCard, ContactList, ContactUsPage, CubeIcon, DEFAULT_INCIDENT_TIME_ZONE, DEFAULT_STALE_AFTER_MINUTES, DIVISIONS, DIVISION_LABELS, DOCUMENT_FILE_EXTENSIONS, DashboardIcon, DashboardPage, Datepicker, DetailList, DocumentIcon, DownloadIcon, Drawer, DrawerBody, DrawerFooter, DrawerHeader, Dropdown, DueDatesDrawer, EditIcon$2 as EditIcon, EmptyState$1 as EmptyState, EyeIcon, FeatureFlagManagementPage, FieldLayout, FileUploadButton, FilterChip, FilterIcon$1 as FilterIcon, Flyout, FormField, FormRow, FormSection, FormStack, GridHeaderRow, GridIcon, GridTable, GroundSegment, GroupTravelRequestPage, HUB_ADMIN_ITEM, HUB_AGENTS_ITEM, HUB_INDIVIDUAL_TRAVEL_ITEM, HUB_NAV_ITEMS, HUB_OFF_FLEET_ITEM, HUB_SOURCING_ITEM, HUB_STM_CHARTERS_ITEM, HandIcon, HeadsetIcon, HomeIcon, HotelIcon$3 as HotelIcon, HotelSegment, HubAppShell, Icon, IconRevealLink, Icons, IncidentArchiveTable, IncidentCard, IncidentIntakeForm, IncidentNotes, IndividualTravelPage, IndividualTravelRequestDetailPage, IndividualTravelRequestFormPage, InfoCenterPage, InfoIcon$1 as InfoIcon, InfoTile, Input, ItineraryPage, ItinerarySegmentCard, ItineraryTimeline, LightbulbIcon, LimoIcon, ListboxSelect, LockIcon$1 as LockIcon, LogoIcon, LogoutIcon, MailIcon, ManifestCapacityStats, ManifestViewToggle, MegaphoneIcon, MembershipPrograms, MenuIcon, Metric, MinusIcon, Modal, ModalFooter, Module, ModuleDivider, ModuleVerticalDivider, MultiUserSearch, NavCard, NavItem, NextTripCard, NotFoundPage, OFF_FLEET_LEARNED_DESCRIPTION, OFF_FLEET_LEARNED_EMPTY_COPY, OFF_FLEET_QUEUE_DESCRIPTION, OffFleetLearnedExamplesPage, OffFleetReviewQueuePage, OffFleetSubmissionDetailPage, OperationsResponseCenterPage, PRIORITY_LABELS, PageBanners, PageHeader, PageHeaderSubsection, Pagination, PanelTabs, PhoneIcon, PlaneIcon$3 as PlaneIcon, PlusIcon$2 as PlusIcon, PreferencesPanel, PrinterIcon, ProfileMenu, Progress, ProgressBar, ProgressCircle, QuoteCostBreakdown, QuoteReviewActions, REGULAR_SEASON_BID_TYPES, RESOLUTION_LABELS, ROUTE_STATUS_LABELS, RailIcon, RefreshIcon, RegularSeasonBidsPage, RegularSeasonBidsTable, ReportIcon, RequestFormFooter, RequestFormHeader, RequestFormLayout, RequestServiceLink, RequestSummary, ResolveIncidentDialog, ResultCount, RosterProgramNumbersPage, RosterReportsPage, RosterToolbar, SOURCING_COST_CATEGORIES, SOURCING_COST_CATEGORY_LABELS, SUPPLIER_TYPE_OPTIONS, SchoolContactForm, SearchField, SearchIcon$1 as SearchIcon, Segment, SegmentedSelector, Select, SelectFilter, ServiceToggle, ServiceToggleList, SettingsIcon, Sidenav, SingleTeamPanelSelector, SourcingQuoteDetailPage, SourcingReviewQueuePage, SourcingReviewQueueTable, Spinner, SportCodeBadge, StatusBadge, SummarySection, SupplierTypeToggle, TRIP_MONTH_OPTIONS, TRIP_TYPES, TRIP_TYPE_LABELS, TabPanelStack, TabStrip, Table, TableCell, Tag, TeamCalendarHeader, TeamCard, TeamContactsPanel, TeamEquipmentForm, TeamHeader, TeamImportForm, TeamManagementPage, TeamPicker, TeamProgramForm, TeamRosterMemberForm, TeamScheduleActions, TeamScheduleCompactTable, TeamScheduleEditor, TeamScheduleExpandedTable, TeamSchedulePage, TeamSubMenu, TeamTravelCalendarCardView, TeamTravelCalendarListView, TeamTravelCalendarPage, TeamTravelCalendarToolbar, TeamTravelCalendarView, TeamUserAccessForm, Textarea, ThemeProvider, Timepicker, Title, Toggle, Tooltip, Topbar, TrashIcon$2 as TrashIcon, TravelBoard, TravelDateRange, TravelServiceIcon, TravelSummaryMetrics, TravelerForm, TrendDownIcon, TrendUpIcon, TripDetailPage, TripSegment, TripTable, TypeIcon, UploadIcon, UserIcon, UsersIcon$1 as UsersIcon, WarningIcon$1 as WarningIcon, XIcon, absoluteFill, accentColors, addNoteToIncident, addTripTypeToIncident, addableTripTypes, alertBandTokens, alertTokens, boxShadow, brandColors, breakpoints, buildPaginationItems, buttonReset, canRemoveTripType, completeRoute, computeLineItemTotal, computeQuoteTotals, computeTravelTypeCodes, css, cx, darkTheme, lightTheme as defaultTheme, deriveProgramBidStatus, divisionsForTripTypes, flexCenter, flexCol, flexRow, font, fontFamily, fontSize, fontWeight, formatClockTime, formatCompactTripCost, formatElapsed, formatIncidentDate, formatItineraryDate, formatItineraryDateRange, formatItineraryMoney, formatTeamScheduleDueDate, formatTeamScheduleTravelDates, getCharterSourcingEmailRoute, getCharterSourcingEmailSubject, getPageCount, getSegmentDate, getSegmentStartMinutes, getSegmentTitle, getTeamTravelCalendarPeriodLabel, groupSegmentsByDay, iconNames, iconRegistry, injectGlobal, isExpiringSoon, isIncidentOverdue, isProgramBiddable, isQuoteActionable, isReadyToResolve, isRouteOverdue, isSportCodeGroup, isTravelDueDateCompleted, isTravelDueDateOverdue, itineraryPageName, leading, lightTheme, lineClamp, lineHeight, markRouteReceived, matchesQuoteSearch, merge, moveTeamTravelCalendarPeriod, navyColors, neutralColors, orderAlertLog, ordinalDay, overdueRoutes, parseClockTime, parseItineraryDate, primaryColors, radius, removeTripTypeFromIncident, renotifyRoute, rounded, routeProgress, routeStatus, semanticColors, shadow, sharedColumnWidth, size, sortTripTypes, space, spacing, sportCodeVariant, srOnly, statusColors, styled, sx, tabStripTabId, teamColors, textColors, tintColors, toIncidentDateKey, toInlineStyle, toTelHref, trans, transition, tripTypeDivision, truncate$1 as truncate, useSharedColumnWidth, useTheme, validateIncidentIntake, weight };
|
|
39778
40981
|
//# sourceMappingURL=index.esm.js.map
|