@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.js
CHANGED
|
@@ -1126,7 +1126,7 @@ const contentStyle$e = {
|
|
|
1126
1126
|
const iconStyle$i = {
|
|
1127
1127
|
label: 'Alert-iconStyle', flexShrink: 0, marginTop: 1, color: 'var(--alert-accent)'
|
|
1128
1128
|
};
|
|
1129
|
-
const bodyStyle$
|
|
1129
|
+
const bodyStyle$f = {
|
|
1130
1130
|
label: 'Alert-bodyStyle', flex: 1, minWidth: 0
|
|
1131
1131
|
};
|
|
1132
1132
|
const titleStyle$J = {
|
|
@@ -1198,7 +1198,7 @@ const variantIcons = {
|
|
|
1198
1198
|
*/
|
|
1199
1199
|
const Alert = ({ variant = 'primary', title, children, dismissible = false, onDismiss, className = '', }) => {
|
|
1200
1200
|
const IconComponent = variantIcons[variant];
|
|
1201
|
-
return (jsxRuntime.jsx("div", { className: cx(sx(alertStyle$5), sx(variantStyles$8[variant]), className), role: "alert", children: jsxRuntime.jsxs("div", { className: sx(contentStyle$e), children: [jsxRuntime.jsx(IconComponent, { className: sx(iconStyle$i), size: 20 }), jsxRuntime.jsxs("div", { className: sx(bodyStyle$
|
|
1201
|
+
return (jsxRuntime.jsx("div", { className: cx(sx(alertStyle$5), sx(variantStyles$8[variant]), className), role: "alert", children: jsxRuntime.jsxs("div", { className: sx(contentStyle$e), children: [jsxRuntime.jsx(IconComponent, { className: sx(iconStyle$i), size: 20 }), jsxRuntime.jsxs("div", { className: sx(bodyStyle$f), children: [title && jsxRuntime.jsx("h4", { className: sx(titleStyle$J), children: title }), jsxRuntime.jsx("div", { className: sx(messageStyle$3), children: children })] }), dismissible && onDismiss && (jsxRuntime.jsx("button", { type: "button", onClick: onDismiss, className: sx(dismissButtonStyle), "aria-label": "Dismiss alert", children: jsxRuntime.jsx(CloseIcon, { size: 16 }) }))] }) }));
|
|
1202
1202
|
};
|
|
1203
1203
|
|
|
1204
1204
|
const avatarSizeStyles = {
|
|
@@ -2013,12 +2013,12 @@ const labelTextSizeStyles = {
|
|
|
2013
2013
|
lg: { fontSize: 'var(--text-base)' },
|
|
2014
2014
|
};
|
|
2015
2015
|
/** Helper and error text hang under the label, indented past the box. */
|
|
2016
|
-
const helperTextStyle$
|
|
2016
|
+
const helperTextStyle$7 = {
|
|
2017
2017
|
label: 'Checkbox-helperTextStyle',
|
|
2018
2018
|
fontSize: 'var(--text-xs)',
|
|
2019
2019
|
color: 'var(--color-gray-500)',
|
|
2020
2020
|
};
|
|
2021
|
-
const errorTextStyle$
|
|
2021
|
+
const errorTextStyle$7 = {
|
|
2022
2022
|
label: 'Checkbox-errorTextStyle',
|
|
2023
2023
|
fontSize: 'var(--text-xs)',
|
|
2024
2024
|
color: 'var(--color-red-500)',
|
|
@@ -2065,7 +2065,7 @@ const Checkbox = React.forwardRef(({ label, size = 'md', helperText, error, inde
|
|
|
2065
2065
|
? indicator({ checked: !!checked, indeterminate, disabled: !!disabled })
|
|
2066
2066
|
: indeterminate
|
|
2067
2067
|
? jsxRuntime.jsx(IndeterminateIcon, {})
|
|
2068
|
-
: jsxRuntime.jsx(CheckIcon, {}) })] }), label && (jsxRuntime.jsx("span", { className: cx(sx(labelTextStyle), sx(labelTextSizeStyles[size])), children: label }))] }), error && (jsxRuntime.jsx("span", { id: errorId, className: cx(sx(errorTextStyle$
|
|
2068
|
+
: jsxRuntime.jsx(CheckIcon, {}) })] }), label && (jsxRuntime.jsx("span", { className: cx(sx(labelTextStyle), sx(labelTextSizeStyles[size])), children: label }))] }), error && (jsxRuntime.jsx("span", { id: errorId, className: cx(sx(errorTextStyle$7), sx(assistiveOffsetStyles[size])), children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: cx(sx(helperTextStyle$7), sx(assistiveOffsetStyles[size])), children: helperText }))] }));
|
|
2069
2069
|
});
|
|
2070
2070
|
Checkbox.displayName = 'Checkbox';
|
|
2071
2071
|
|
|
@@ -2194,12 +2194,12 @@ const inputDisabledStyle = {
|
|
|
2194
2194
|
cursor: 'not-allowed',
|
|
2195
2195
|
color: 'var(--color-gray-500)',
|
|
2196
2196
|
};
|
|
2197
|
-
const helperTextStyle$
|
|
2197
|
+
const helperTextStyle$6 = {
|
|
2198
2198
|
label: 'Datepicker-helperTextStyle',
|
|
2199
2199
|
fontSize: 'var(--text-xs)',
|
|
2200
2200
|
color: 'var(--color-gray-500)',
|
|
2201
2201
|
};
|
|
2202
|
-
const errorTextStyle$
|
|
2202
|
+
const errorTextStyle$6 = {
|
|
2203
2203
|
label: 'Datepicker-errorTextStyle',
|
|
2204
2204
|
fontSize: 'var(--text-xs)',
|
|
2205
2205
|
color: 'var(--color-red-500)',
|
|
@@ -2220,7 +2220,7 @@ const Datepicker = React.forwardRef(({ size = 'md', label, helperText, error, fu
|
|
|
2220
2220
|
!error && !disabled && sx(inputWrapperHoverStyle), error && sx(inputWrapperErrorStyle), disabled && sx(inputWrapperDisabledStyle));
|
|
2221
2221
|
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: sx(labelStyle$h), children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [jsxRuntime.jsx("span", { className: cx(sx(iconStyle$f), sx(iconSizeStyles$1[size])), children: jsxRuntime.jsx(CalendarIcon, {}) }), jsxRuntime.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]
|
|
2222
2222
|
.filter(Boolean)
|
|
2223
|
-
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
2223
|
+
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: sx(errorTextStyle$6), children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: sx(helperTextStyle$6), children: helperText }))] }));
|
|
2224
2224
|
});
|
|
2225
2225
|
Datepicker.displayName = 'Datepicker';
|
|
2226
2226
|
|
|
@@ -2917,12 +2917,12 @@ const disabledStyle$6 = {
|
|
|
2917
2917
|
cursor: 'not-allowed',
|
|
2918
2918
|
},
|
|
2919
2919
|
};
|
|
2920
|
-
const helperTextStyle$
|
|
2920
|
+
const helperTextStyle$5 = {
|
|
2921
2921
|
label: 'Input-helperTextStyle',
|
|
2922
2922
|
fontSize: 'var(--fs-xs)',
|
|
2923
2923
|
color: 'var(--fg-3)',
|
|
2924
2924
|
};
|
|
2925
|
-
const errorTextStyle$
|
|
2925
|
+
const errorTextStyle$5 = {
|
|
2926
2926
|
label: 'Input-errorTextStyle',
|
|
2927
2927
|
fontSize: 'var(--fs-xs)',
|
|
2928
2928
|
color: 'var(--color-error)',
|
|
@@ -3036,7 +3036,7 @@ const Input = React.forwardRef(({ size = 'md', sizing = 'fixed', label, helperTe
|
|
|
3036
3036
|
// The fixed-height class still applies its horizontal padding and gap;
|
|
3037
3037
|
// the padded classes that follow override height and the vertical rhythm.
|
|
3038
3038
|
sx(sizeStyles$8[size]), paddedClasses(sizing, size), error && sx(errorStyle$4), disabled && sx(disabledStyle$6));
|
|
3039
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: sx(labelStyle$g), children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: sx(iconStyle$e), children: leftIcon }), jsxRuntime.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 && jsxRuntime.jsx("span", { className: sx(iconStyle$e), children: rightIcon })] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: sx(errorTextStyle$
|
|
3039
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: sx(labelStyle$g), children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: sx(iconStyle$e), children: leftIcon }), jsxRuntime.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 && jsxRuntime.jsx("span", { className: sx(iconStyle$e), children: rightIcon })] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: sx(errorTextStyle$5), children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: `${inputId}-helper`, className: sx(helperTextStyle$5), children: helperText }))] }));
|
|
3040
3040
|
});
|
|
3041
3041
|
Input.displayName = 'Input';
|
|
3042
3042
|
/**
|
|
@@ -3052,7 +3052,7 @@ const Textarea = React.forwardRef(({ size = 'md', sizing = 'fixed', label, helpe
|
|
|
3052
3052
|
// `.textarea.paddedSm` — the type scale the padded rules put on a
|
|
3053
3053
|
// descendant `.input` that a bare <textarea> does not have.
|
|
3054
3054
|
sizing === 'padded' && sx(textareaPaddedSizeStyles[size]), error && sx(errorStyle$4), disabled && sx(disabledStyle$6));
|
|
3055
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: textareaId, className: sx(labelStyle$g), children: label })), jsxRuntime.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 && (jsxRuntime.jsx("span", { id: `${textareaId}-error`, className: sx(errorTextStyle$
|
|
3055
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: textareaId, className: sx(labelStyle$g), children: label })), jsxRuntime.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 && (jsxRuntime.jsx("span", { id: `${textareaId}-error`, className: sx(errorTextStyle$5), children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: `${textareaId}-helper`, className: sx(helperTextStyle$5), children: helperText }))] }));
|
|
3056
3056
|
});
|
|
3057
3057
|
Textarea.displayName = 'Textarea';
|
|
3058
3058
|
|
|
@@ -3443,12 +3443,12 @@ const paddedSizeStyles = {
|
|
|
3443
3443
|
},
|
|
3444
3444
|
},
|
|
3445
3445
|
};
|
|
3446
|
-
const helperTextStyle$
|
|
3446
|
+
const helperTextStyle$4 = {
|
|
3447
3447
|
label: 'Select-helperTextStyle',
|
|
3448
3448
|
fontSize: 'var(--text-xs)',
|
|
3449
3449
|
color: 'var(--color-gray-500)',
|
|
3450
3450
|
};
|
|
3451
|
-
const errorTextStyle$
|
|
3451
|
+
const errorTextStyle$4 = {
|
|
3452
3452
|
label: 'Select-errorTextStyle',
|
|
3453
3453
|
fontSize: 'var(--text-xs)',
|
|
3454
3454
|
color: 'var(--color-red-500)',
|
|
@@ -3485,7 +3485,7 @@ const Select = React.forwardRef(({ options, optionGroups, size = 'md', label, pl
|
|
|
3485
3485
|
};
|
|
3486
3486
|
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: selectId, className: sx(labelStyle$e), children: label })), jsxRuntime.jsxs("div", { className: selectWrapperClasses, children: [leftIcon && jsxRuntime.jsx("span", { className: sx(leftIconStyle), children: leftIcon }), jsxRuntime.jsxs("select", { ref: ref, id: selectId, className: sx(selectStyle$2), disabled: disabled, "aria-invalid": !!error, "aria-describedby": [error ? errorId : null, helperText ? helperId : null]
|
|
3487
3487
|
.filter(Boolean)
|
|
3488
|
-
.join(' ') || undefined, ...props, children: [placeholder && (jsxRuntime.jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsxRuntime.jsx("span", { className: sx(chevronStyle$5), children: jsxRuntime.jsx(ChevronDownIcon, {}) })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
3488
|
+
.join(' ') || undefined, ...props, children: [placeholder && (jsxRuntime.jsx("option", { value: "", disabled: true, children: placeholder })), renderOptions()] }), jsxRuntime.jsx("span", { className: sx(chevronStyle$5), children: jsxRuntime.jsx(ChevronDownIcon, {}) })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: sx(errorTextStyle$4), children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: sx(helperTextStyle$4), children: helperText }))] }));
|
|
3489
3489
|
});
|
|
3490
3490
|
Select.displayName = 'Select';
|
|
3491
3491
|
|
|
@@ -3527,14 +3527,14 @@ const sizeStyles$6 = {
|
|
|
3527
3527
|
xl: { width: 40, height: 40 },
|
|
3528
3528
|
};
|
|
3529
3529
|
/** The theme's own helper — this was a verbatim copy of it. */
|
|
3530
|
-
const srOnlyStyle$
|
|
3530
|
+
const srOnlyStyle$6 = srOnly;
|
|
3531
3531
|
|
|
3532
3532
|
/**
|
|
3533
3533
|
* Indeterminate loading indicator for waits with no known duration.
|
|
3534
3534
|
* Exposes its label to screen readers, so give it one that says what is loading.
|
|
3535
3535
|
*/
|
|
3536
3536
|
const Spinner = ({ size = 'md', className = '', color, label = 'Loading...', }) => {
|
|
3537
|
-
return (jsxRuntime.jsxs("span", { className: cx(sx(spinnerStyle$1), sx(sizeStyles$6[size]), className), role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxRuntime.jsxs("svg", { className: sx(svgStyle), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: sx(trackStyle), cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntime.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" })] }), jsxRuntime.jsx("span", { className: sx(srOnlyStyle$
|
|
3537
|
+
return (jsxRuntime.jsxs("span", { className: cx(sx(spinnerStyle$1), sx(sizeStyles$6[size]), className), role: "status", "aria-label": label, style: color ? { color } : undefined, children: [jsxRuntime.jsxs("svg", { className: sx(svgStyle), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: sx(trackStyle), cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntime.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" })] }), jsxRuntime.jsx("span", { className: sx(srOnlyStyle$6), children: label })] }));
|
|
3538
3538
|
};
|
|
3539
3539
|
|
|
3540
3540
|
const statusVariantStyles = (theme) => ({
|
|
@@ -3858,12 +3858,12 @@ const sizeStyles$5 = {
|
|
|
3858
3858
|
},
|
|
3859
3859
|
},
|
|
3860
3860
|
};
|
|
3861
|
-
const helperTextStyle$
|
|
3861
|
+
const helperTextStyle$3 = {
|
|
3862
3862
|
label: 'Timepicker-helperTextStyle',
|
|
3863
3863
|
fontSize: 'var(--text-xs)',
|
|
3864
3864
|
color: 'var(--color-gray-500)',
|
|
3865
3865
|
};
|
|
3866
|
-
const errorTextStyle$
|
|
3866
|
+
const errorTextStyle$3 = {
|
|
3867
3867
|
label: 'Timepicker-errorTextStyle',
|
|
3868
3868
|
fontSize: 'var(--text-xs)',
|
|
3869
3869
|
color: 'var(--color-red-500)',
|
|
@@ -3882,7 +3882,7 @@ const Timepicker = React.forwardRef(({ size = 'md', label, helperText, error, fu
|
|
|
3882
3882
|
const inputWrapperClasses = cx(sx(inputWrapperStyle$2), sx(sizeStyles$5[size]), error ? sx(errorStyle$2) : '', disabled ? sx(disabledStyle$4) : '');
|
|
3883
3883
|
return (jsxRuntime.jsxs("div", { className: wrapperClasses, children: [label && (jsxRuntime.jsx("label", { htmlFor: inputId, className: sx(labelStyle$d), children: label })), jsxRuntime.jsxs("div", { className: inputWrapperClasses, children: [jsxRuntime.jsx("span", { className: sx(iconStyle$d), children: jsxRuntime.jsx(ClockIcon$1, {}) }), jsxRuntime.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]
|
|
3884
3884
|
.filter(Boolean)
|
|
3885
|
-
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: sx(errorTextStyle$
|
|
3885
|
+
.join(' ') || undefined, ...props })] }), error && (jsxRuntime.jsx("span", { id: errorId, className: sx(errorTextStyle$3), children: error })), helperText && !error && (jsxRuntime.jsx("span", { id: helperId, className: sx(helperTextStyle$3), children: helperText }))] }));
|
|
3886
3886
|
});
|
|
3887
3887
|
Timepicker.displayName = 'Timepicker';
|
|
3888
3888
|
|
|
@@ -4566,11 +4566,11 @@ const openStyle$3 = {
|
|
|
4566
4566
|
transform: 'rotate(90deg)',
|
|
4567
4567
|
},
|
|
4568
4568
|
};
|
|
4569
|
-
const headerStyle$
|
|
4569
|
+
const headerStyle$N = {
|
|
4570
4570
|
label: 'Accordion-headerStyle',
|
|
4571
4571
|
flex: 1,
|
|
4572
4572
|
};
|
|
4573
|
-
const bodyStyle$
|
|
4573
|
+
const bodyStyle$e = {
|
|
4574
4574
|
label: 'Accordion-bodyStyle',
|
|
4575
4575
|
position: 'relative',
|
|
4576
4576
|
paddingLeft: 24,
|
|
@@ -4640,7 +4640,7 @@ const Accordion = ({ header, children, defaultOpen = true, open: controlledOpen,
|
|
|
4640
4640
|
}
|
|
4641
4641
|
onOpenChange?.(newOpen);
|
|
4642
4642
|
};
|
|
4643
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(accordionStyle), className), children: [jsxRuntime.jsxs("div", { className: sx(headerContainerStyle), children: [jsxRuntime.jsx("button", { type: "button", className: sx(toggleStyle$4), onClick: handleToggle, "aria-expanded": isOpen, children: jsxRuntime.jsx(CaretIcon, { className: cx(sx(caretStyle), isOpen && sx(openStyle$3)) }) }), jsxRuntime.jsx("div", { className: sx(headerStyle$
|
|
4643
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(accordionStyle), className), children: [jsxRuntime.jsxs("div", { className: sx(headerContainerStyle), children: [jsxRuntime.jsx("button", { type: "button", className: sx(toggleStyle$4), onClick: handleToggle, "aria-expanded": isOpen, children: jsxRuntime.jsx(CaretIcon, { className: cx(sx(caretStyle), isOpen && sx(openStyle$3)) }) }), jsxRuntime.jsx("div", { className: sx(headerStyle$N), children: header })] }), jsxRuntime.jsxs("div", { className: cx(sx(bodyStyle$e), isOpen ? sx(visibleStyle) : sx(hiddenStyle$2)), "aria-hidden": !isOpen, children: [showTimeline && (jsxRuntime.jsxs("div", { className: sx(timelineStyle$1), children: [jsxRuntime.jsx("div", { className: sx(lineStyle) }), jsxRuntime.jsx(CaretIcon, { className: sx(endCaretStyle) })] })), jsxRuntime.jsx("div", { className: sx(contentStyle$9), children: children })] })] }));
|
|
4644
4644
|
};
|
|
4645
4645
|
Accordion.displayName = 'Accordion';
|
|
4646
4646
|
|
|
@@ -4775,7 +4775,7 @@ const contactStyle$1 = {
|
|
|
4775
4775
|
display: 'flex',
|
|
4776
4776
|
gap: 12,
|
|
4777
4777
|
};
|
|
4778
|
-
const bodyStyle$
|
|
4778
|
+
const bodyStyle$d = {
|
|
4779
4779
|
label: 'ContactCard-bodyStyle',
|
|
4780
4780
|
display: 'flex',
|
|
4781
4781
|
flexDirection: 'column',
|
|
@@ -4822,7 +4822,7 @@ const linkTextStyle = {
|
|
|
4822
4822
|
const ContactCard$1 = ({ name, title, phone, email, action, showAvatar = true, className = '', }) => {
|
|
4823
4823
|
if (!action && !name)
|
|
4824
4824
|
return null;
|
|
4825
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(contactStyle$1), className), children: [name && showAvatar && jsxRuntime.jsx(Avatar, { name: name, size: 36 }), jsxRuntime.jsxs("div", { className: sx(bodyStyle$
|
|
4825
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(contactStyle$1), className), children: [name && showAvatar && jsxRuntime.jsx(Avatar, { name: name, size: 36 }), jsxRuntime.jsxs("div", { className: sx(bodyStyle$d), children: [jsxRuntime.jsxs("div", { className: sx(identityStyle$2), children: [action || jsxRuntime.jsx("span", { className: sx(nameStyle$6), children: name }), title && jsxRuntime.jsx("span", { className: sx(titleStyle$H), children: title })] }), phone && (jsxRuntime.jsxs("a", { href: `tel:${phone}`, className: sx(linkStyle$1), children: [jsxRuntime.jsx(PhoneIcon, { size: 16, "aria-hidden": "true" }), jsxRuntime.jsx("span", { className: sx(linkTextStyle), children: phone })] })), email && (jsxRuntime.jsxs("a", { href: `mailto:${email}`, className: sx(linkStyle$1), children: [jsxRuntime.jsx(MailIcon, { size: 16, "aria-hidden": "true" }), jsxRuntime.jsx("span", { className: sx(linkTextStyle), children: email })] }))] })] }));
|
|
4826
4826
|
};
|
|
4827
4827
|
ContactCard$1.displayName = 'ContactCard';
|
|
4828
4828
|
|
|
@@ -5150,7 +5150,7 @@ const titleStyle$G = {
|
|
|
5150
5150
|
fontWeight: 'var(--fw-semibold)',
|
|
5151
5151
|
lineHeight: 'var(--lh-base)',
|
|
5152
5152
|
};
|
|
5153
|
-
const descriptionStyle$
|
|
5153
|
+
const descriptionStyle$b = {
|
|
5154
5154
|
label: 'EmptyState-descriptionStyle',
|
|
5155
5155
|
maxWidth: '46ch',
|
|
5156
5156
|
margin: 0,
|
|
@@ -5158,7 +5158,7 @@ const descriptionStyle$a = {
|
|
|
5158
5158
|
fontSize: 'var(--fs-sm)',
|
|
5159
5159
|
lineHeight: 'var(--lh-sm)',
|
|
5160
5160
|
};
|
|
5161
|
-
const actionsStyle$
|
|
5161
|
+
const actionsStyle$d = {
|
|
5162
5162
|
label: 'EmptyState-actionsStyle',
|
|
5163
5163
|
display: 'flex',
|
|
5164
5164
|
flexWrap: 'wrap',
|
|
@@ -5168,7 +5168,7 @@ const actionsStyle$c = {
|
|
|
5168
5168
|
};
|
|
5169
5169
|
|
|
5170
5170
|
/** Placeholder shown when a list, table, or panel has nothing to display. */
|
|
5171
|
-
const EmptyState$1 = ({ title, description, icon, actionLabel, onAction, secondaryActionLabel, onSecondaryAction, size = 'md', children, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(emptyStateStyle$1), sx(sizeStyles$4[size]), className), "data-test": "empty-state", children: [icon && jsxRuntime.jsx("div", { className: sx(iconStyle$b), "aria-hidden": "true", children: icon }), jsxRuntime.jsx("p", { className: sx(titleStyle$G), children: title }), description && jsxRuntime.jsx("p", { className: sx(descriptionStyle$
|
|
5171
|
+
const EmptyState$1 = ({ title, description, icon, actionLabel, onAction, secondaryActionLabel, onSecondaryAction, size = 'md', children, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(emptyStateStyle$1), sx(sizeStyles$4[size]), className), "data-test": "empty-state", children: [icon && jsxRuntime.jsx("div", { className: sx(iconStyle$b), "aria-hidden": "true", children: icon }), jsxRuntime.jsx("p", { className: sx(titleStyle$G), children: title }), description && jsxRuntime.jsx("p", { className: sx(descriptionStyle$b), children: description }), (actionLabel || secondaryActionLabel) && (jsxRuntime.jsxs("div", { className: sx(actionsStyle$d), children: [actionLabel && (jsxRuntime.jsx(Button, { size: "sm", onClick: onAction, "data-test": "empty-state-action", children: actionLabel })), secondaryActionLabel && (jsxRuntime.jsx(Button, { size: "sm", variant: "secondary", onClick: onSecondaryAction, "data-test": "empty-state-secondary-action", children: secondaryActionLabel }))] })), children] }));
|
|
5172
5172
|
|
|
5173
5173
|
/** FieldLayout's compiled rules. */
|
|
5174
5174
|
const fieldStyle$4 = {
|
|
@@ -5252,7 +5252,7 @@ const errorStyle$1 = {
|
|
|
5252
5252
|
label: 'FieldLayout-errorStyle',
|
|
5253
5253
|
color: 'var(--color-error, #940000)',
|
|
5254
5254
|
};
|
|
5255
|
-
const noteStyle$
|
|
5255
|
+
const noteStyle$4 = {
|
|
5256
5256
|
label: 'FieldLayout-noteStyle',
|
|
5257
5257
|
color: 'var(--color-stone, #787878)',
|
|
5258
5258
|
};
|
|
@@ -5294,7 +5294,7 @@ const FieldLayout = ({ children, label, labelPosition = 'top', showLabel = true,
|
|
|
5294
5294
|
const hasError = Boolean(error);
|
|
5295
5295
|
const describedBy = [hint ? hintId : '', hasError ? errorId : ''].filter(Boolean).join(' ') || undefined;
|
|
5296
5296
|
const hintElement = hint ? (jsxRuntime.jsx("p", { id: hintId, className: cx(sx(messageStyle$2), sx(hintStyle$1), labelPosition === 'top' ? '' : sx(hintBesideStyle(Boolean(label && showLabel)))), children: hint })) : null;
|
|
5297
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(fieldStyle$4), sx(labelPositionStyles[labelPosition]), className), children: [label && showLabel && (jsxRuntime.jsxs("label", { htmlFor: id, className: cx(sx(labelStyle$b), hasError ? sx(labelErrorStyle) : ''), children: [label, required && !disabled && (jsxRuntime.jsx("span", { className: sx(requiredStyle$2), "aria-hidden": "true", children: "*" })), tooltip && (jsxRuntime.jsx(Tooltip, { className: sx(tooltipStyle$1), content: tooltip, children: jsxRuntime.jsx(InfoIcon$1, { size: 16 }) }))] })), labelPosition === 'top' && hintElement, jsxRuntime.jsxs("div", { className: sx(controlStyle$2), children: [leftIcon && !disabled && (jsxRuntime.jsx("span", { className: cx(sx(iconStyle$a), sx(iconLeftStyle)), "aria-hidden": "true", children: leftIcon })), children({ id, describedBy, hasError }), rightIcon && !disabled && (jsxRuntime.jsx("span", { className: cx(sx(iconStyle$a), sx(iconRightStyle)), "aria-hidden": "true", children: rightIcon }))] }), hasError && (jsxRuntime.jsx("p", { id: errorId, className: cx(sx(messageStyle$2), sx(errorStyle$1)), children: error })), note && jsxRuntime.jsx("p", { className: cx(sx(messageStyle$2), sx(noteStyle$
|
|
5297
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(fieldStyle$4), sx(labelPositionStyles[labelPosition]), className), children: [label && showLabel && (jsxRuntime.jsxs("label", { htmlFor: id, className: cx(sx(labelStyle$b), hasError ? sx(labelErrorStyle) : ''), children: [label, required && !disabled && (jsxRuntime.jsx("span", { className: sx(requiredStyle$2), "aria-hidden": "true", children: "*" })), tooltip && (jsxRuntime.jsx(Tooltip, { className: sx(tooltipStyle$1), content: tooltip, children: jsxRuntime.jsx(InfoIcon$1, { size: 16 }) }))] })), labelPosition === 'top' && hintElement, jsxRuntime.jsxs("div", { className: sx(controlStyle$2), children: [leftIcon && !disabled && (jsxRuntime.jsx("span", { className: cx(sx(iconStyle$a), sx(iconLeftStyle)), "aria-hidden": "true", children: leftIcon })), children({ id, describedBy, hasError }), rightIcon && !disabled && (jsxRuntime.jsx("span", { className: cx(sx(iconStyle$a), sx(iconRightStyle)), "aria-hidden": "true", children: rightIcon }))] }), hasError && (jsxRuntime.jsx("p", { id: errorId, className: cx(sx(messageStyle$2), sx(errorStyle$1)), children: error })), note && jsxRuntime.jsx("p", { className: cx(sx(messageStyle$2), sx(noteStyle$4)), children: note }), labelPosition !== 'top' && hintElement] }));
|
|
5298
5298
|
};
|
|
5299
5299
|
FieldLayout.displayName = 'FieldLayout';
|
|
5300
5300
|
|
|
@@ -5646,14 +5646,14 @@ const inputErrorStyle = {
|
|
|
5646
5646
|
boxShadow: '0 0 0 3px rgba(220, 38, 38, 0.1) !important',
|
|
5647
5647
|
},
|
|
5648
5648
|
};
|
|
5649
|
-
const helperTextStyle$
|
|
5649
|
+
const helperTextStyle$2 = {
|
|
5650
5650
|
label: 'FormField-helperTextStyle',
|
|
5651
5651
|
fontSize: 'var(--font-size-xs)',
|
|
5652
5652
|
color: 'var(--color-neutral-500)',
|
|
5653
5653
|
margin: 0,
|
|
5654
5654
|
lineHeight: 'var(--line-height-normal)',
|
|
5655
5655
|
};
|
|
5656
|
-
const errorTextStyle$
|
|
5656
|
+
const errorTextStyle$2 = {
|
|
5657
5657
|
label: 'FormField-errorTextStyle',
|
|
5658
5658
|
fontSize: 'var(--font-size-xs)',
|
|
5659
5659
|
color: 'var(--color-status-error)',
|
|
@@ -5711,12 +5711,12 @@ const FormField = React.forwardRef(({ label, helperText, error, required = false
|
|
|
5711
5711
|
}
|
|
5712
5712
|
return (jsxRuntime.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) }));
|
|
5713
5713
|
};
|
|
5714
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(formFieldStyle), className), children: [jsxRuntime.jsxs("label", { htmlFor: inputId, className: cx(sx(labelStyle$9), hideLabel && sx(visuallyHiddenStyle$2)), children: [label, required && jsxRuntime.jsx("span", { className: sx(requiredStyle$1), "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsxRuntime.jsx("p", { id: helperId, className: sx(helperTextStyle$
|
|
5714
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(formFieldStyle), className), children: [jsxRuntime.jsxs("label", { htmlFor: inputId, className: cx(sx(labelStyle$9), hideLabel && sx(visuallyHiddenStyle$2)), children: [label, required && jsxRuntime.jsx("span", { className: sx(requiredStyle$1), "aria-hidden": "true", children: "*" })] }), renderInput(), helperText && !hasError && (jsxRuntime.jsx("p", { id: helperId, className: sx(helperTextStyle$2), children: helperText })), hasError && (jsxRuntime.jsx("p", { id: errorId, className: sx(errorTextStyle$2), role: "alert", children: error }))] }));
|
|
5715
5715
|
});
|
|
5716
5716
|
FormField.displayName = 'FormField';
|
|
5717
5717
|
|
|
5718
5718
|
/** FormRow's compiled rules. */
|
|
5719
|
-
const rowStyle$
|
|
5719
|
+
const rowStyle$9 = {
|
|
5720
5720
|
label: 'FormRow-rowStyle',
|
|
5721
5721
|
display: 'grid',
|
|
5722
5722
|
width: '100%',
|
|
@@ -5765,7 +5765,7 @@ const FormRow = ({ children, columns, gap = 'md', className, stackOnMobile = tru
|
|
|
5765
5765
|
// With no children at all `colCount` is 0, which the module stylesheet met
|
|
5766
5766
|
// with a missing `.cols0` — no column rule. The cast keeps that shape honest.
|
|
5767
5767
|
const columnStyle = colsStyles[colCount];
|
|
5768
|
-
return (jsxRuntime.jsx("div", { className: cx(sx(rowStyle$
|
|
5768
|
+
return (jsxRuntime.jsx("div", { className: cx(sx(rowStyle$9), columnStyle ? sx(columnStyle) : '', sx(gapStyles$1[gap]), stackOnMobile ? sx(stackMobileStyle) : '', className || ''), children: children }));
|
|
5769
5769
|
};
|
|
5770
5770
|
FormRow.displayName = 'FormRow';
|
|
5771
5771
|
|
|
@@ -5777,7 +5777,7 @@ FormRow.displayName = 'FormRow';
|
|
|
5777
5777
|
* specificity of its argument, so nesting it keeps the win without any
|
|
5778
5778
|
* doubling. Everything else owned its own properties.
|
|
5779
5779
|
*/
|
|
5780
|
-
const sectionStyle$
|
|
5780
|
+
const sectionStyle$b = {
|
|
5781
5781
|
label: 'FormSection-sectionStyle',
|
|
5782
5782
|
width: '100%',
|
|
5783
5783
|
};
|
|
@@ -5787,14 +5787,14 @@ const sectionStyle$a = {
|
|
|
5787
5787
|
* Declared before `headerStyle` so its content-hashed class name can be
|
|
5788
5788
|
* resolved for the `:has()` below.
|
|
5789
5789
|
*/
|
|
5790
|
-
const descriptionStyle$
|
|
5790
|
+
const descriptionStyle$a = {
|
|
5791
5791
|
label: 'FormSection-descriptionStyle',
|
|
5792
5792
|
margin: '4px 0 0',
|
|
5793
5793
|
color: 'var(--fg-3, #5C5C5C)',
|
|
5794
5794
|
fontSize: 14,
|
|
5795
5795
|
lineHeight: 1.5,
|
|
5796
5796
|
};
|
|
5797
|
-
const headerStyle$
|
|
5797
|
+
const headerStyle$M = {
|
|
5798
5798
|
label: 'FormSection-headerStyle',
|
|
5799
5799
|
display: 'flex',
|
|
5800
5800
|
alignItems: 'center',
|
|
@@ -5804,7 +5804,7 @@ const headerStyle$L = {
|
|
|
5804
5804
|
rather than to the middle of the block. `:has()` is scored by its argument,
|
|
5805
5805
|
so this is (0,2,0) against the base rule's (0,1,0) — the same margin the
|
|
5806
5806
|
stylesheet had. */
|
|
5807
|
-
[`&:has(.${sx(descriptionStyle$
|
|
5807
|
+
[`&:has(.${sx(descriptionStyle$a)})`]: {
|
|
5808
5808
|
alignItems: 'flex-start',
|
|
5809
5809
|
},
|
|
5810
5810
|
};
|
|
@@ -5835,7 +5835,7 @@ const titleStyle$F = {
|
|
|
5835
5835
|
fontSize: 20,
|
|
5836
5836
|
},
|
|
5837
5837
|
};
|
|
5838
|
-
const fieldsetStyle = {
|
|
5838
|
+
const fieldsetStyle$2 = {
|
|
5839
5839
|
label: 'FormSection-fieldsetStyle',
|
|
5840
5840
|
display: 'flex',
|
|
5841
5841
|
flexDirection: 'column',
|
|
@@ -5892,12 +5892,12 @@ const statusStyles = {
|
|
|
5892
5892
|
const FormSection = ({ title, icon, description, action, status, disabled = false, children, className, id, dataTest, }) => {
|
|
5893
5893
|
const isSubmitted = status === 'submitted';
|
|
5894
5894
|
const isDisabled = disabled || isSubmitted;
|
|
5895
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(sectionStyle$
|
|
5895
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(sectionStyle$b), className), id: id, "data-test": dataTest, children: [jsxRuntime.jsxs("div", { className: sx(headerStyle$M), children: [icon && jsxRuntime.jsx("span", { className: sx(iconStyle$9), children: icon }), jsxRuntime.jsxs("div", { className: sx(headingStyle$5), children: [jsxRuntime.jsx("h2", { className: sx(titleStyle$F), children: title }), description && jsxRuntime.jsx("p", { className: sx(descriptionStyle$a), children: description })] }), action && jsxRuntime.jsx("div", { className: sx(actionStyle$1), children: action })] }), jsxRuntime.jsxs("fieldset", { disabled: isDisabled, className: cx(sx(fieldsetStyle$2), isDisabled && sx(disabledStyle$3)), children: [status && (jsxRuntime.jsxs("div", { className: sx(statusStyle$6), children: [jsxRuntime.jsx("span", { className: sx(statusLabelStyle), children: "Status:" }), jsxRuntime.jsx("span", { className: cx(sx(statusValueStyle), sx(statusStyles[status])), children: status === 'submitted' ? 'Submitted' : status === 'draft' ? 'Draft' : 'Not Submitted' })] })), children] })] }));
|
|
5896
5896
|
};
|
|
5897
5897
|
FormSection.displayName = 'FormSection';
|
|
5898
5898
|
|
|
5899
5899
|
/** Vertical grid the form fields sit in. */
|
|
5900
|
-
const stackStyle$
|
|
5900
|
+
const stackStyle$6 = {
|
|
5901
5901
|
label: 'FormStack-stackStyle',
|
|
5902
5902
|
display: 'grid',
|
|
5903
5903
|
};
|
|
@@ -5909,7 +5909,7 @@ const gapStyles = {
|
|
|
5909
5909
|
};
|
|
5910
5910
|
|
|
5911
5911
|
/** Standard vertical form-field rhythm used by Hub modal forms. */
|
|
5912
|
-
const FormStack = ({ children, gap = 'md', className = '' }) => (jsxRuntime.jsx("div", { className: cx(sx(stackStyle$
|
|
5912
|
+
const FormStack = ({ children, gap = 'md', className = '' }) => (jsxRuntime.jsx("div", { className: cx(sx(stackStyle$6), sx(gapStyles[gap]), className), children: children }));
|
|
5913
5913
|
|
|
5914
5914
|
/* IconRevealLink's rules — an icon that, on hover or keyboard focus, slides
|
|
5915
5915
|
its text label out beside it. The label is collapsed (zero width, clear,
|
|
@@ -6641,7 +6641,7 @@ const hintStyle = {
|
|
|
6641
6641
|
color: 'var(--fg-3)',
|
|
6642
6642
|
boxShadow: 'var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1))',
|
|
6643
6643
|
};
|
|
6644
|
-
const helperTextStyle = {
|
|
6644
|
+
const helperTextStyle$1 = {
|
|
6645
6645
|
label: 'MultiUserSearch-helperTextStyle',
|
|
6646
6646
|
fontSize: 'var(--fs-xs)',
|
|
6647
6647
|
color: 'var(--fg-3)',
|
|
@@ -6651,7 +6651,7 @@ const helperTextStyle = {
|
|
|
6651
6651
|
* Doubled: `.errorText` and `.helperText` were both (0,1,0) and both set
|
|
6652
6652
|
* `color`, so the error colour won only by sitting later in the file.
|
|
6653
6653
|
*/
|
|
6654
|
-
const errorTextStyle = {
|
|
6654
|
+
const errorTextStyle$1 = {
|
|
6655
6655
|
label: 'MultiUserSearch-errorTextStyle',
|
|
6656
6656
|
'&&': {
|
|
6657
6657
|
color: 'var(--color-error)',
|
|
@@ -6787,7 +6787,7 @@ const MultiUserSearch = ({ label = 'Search users', placeholder = 'Type to search
|
|
|
6787
6787
|
return (jsxRuntime.jsxs("div", { ref: containerRef, className: cx(sx(containerStyle$4), disabled && sx(disabledStyle$2), className), "data-test": dataTest, children: [label && (jsxRuntime.jsx("label", { className: sx(labelStyle$8), htmlFor: `${dataTest}-input`, children: label })), selectedUsers.length > 0 && (jsxRuntime.jsx("div", { className: sx(selectedUsersStyle), "data-test": `${dataTest}-selected`, children: selectedUsers.map((user) => (jsxRuntime.jsx(Badge, { variant: "info", size: "sm", className: sx(selectedBadgeStyle), "data-test": `${dataTest}-selected-${user.id}`, children: jsxRuntime.jsxs("span", { className: sx(badgeContentStyle), children: [user.name, jsxRuntime.jsx("button", { type: "button", className: sx(removeButtonStyle$1), onClick: () => removeSelection(user.id), "aria-label": `Remove ${user.name}`, disabled: disabled, children: jsxRuntime.jsx(CloseIcon, { size: 12 }) })] }) }, user.id))) })), jsxRuntime.jsxs("div", { className: sx(inputWrapperStyle$1), children: [jsxRuntime.jsx(Input, { ref: inputRef, id: `${dataTest}-input`, type: "search", placeholder: placeholder, value: query, onChange: handleInputChange, onFocus: handleInputFocus, onKeyDown: handleKeyDown, disabled: disabled, leftIcon: jsxRuntime.jsx(SearchIcon$1, { size: 16 }), rightIcon: loading ? jsxRuntime.jsx(Spinner, { size: "xs", label: "Searching" }) : undefined, "aria-expanded": isOpen, "aria-controls": `${dataTest}-listbox`, "aria-autocomplete": "list", "aria-activedescendant": highlightedIndex >= 0
|
|
6788
6788
|
? `${dataTest}-option-${availableOptions[highlightedIndex]?.id}`
|
|
6789
6789
|
: undefined, role: "combobox", fullWidth: true, "data-test": `${dataTest}-input` }), showDropdown && (jsxRuntime.jsxs("ul", { ref: listRef, id: `${dataTest}-listbox`, className: sx(listboxStyle), role: "listbox", "aria-label": "Search results", "data-test": `${dataTest}-listbox`, children: [loading && (jsxRuntime.jsxs("li", { className: sx(loadingItemStyle), role: "status", children: [jsxRuntime.jsx(Spinner, { size: "sm", label: "Searching users" }), jsxRuntime.jsx("span", { children: "Searching users\u2026" })] })), !loading &&
|
|
6790
|
-
availableOptions.map((option, index) => (jsxRuntime.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: [jsxRuntime.jsx("span", { className: sx(optionAvatarStyle$1), "aria-hidden": "true", children: jsxRuntime.jsx(UserIcon, { size: 16 }) }), jsxRuntime.jsxs("span", { className: sx(optionContentStyle), children: [jsxRuntime.jsx("span", { className: sx(optionNameStyle), children: option.name }), jsxRuntime.jsx("span", { className: sx(optionEmailStyle), children: option.email }), option.title && (jsxRuntime.jsx("span", { className: sx(optionTitleStyle), children: option.title }))] })] }, option.id))), showNoResults && (jsxRuntime.jsxs("li", { className: sx(noResultsStyle$1), role: "status", children: ["No users found matching \"", trimmedQuery, "\""] }))] })), showMinLengthHint && (jsxRuntime.jsxs("div", { className: sx(hintStyle), role: "status", children: ["Enter at least ", minSearchLength, " characters to search"] }))] }), (helperText || error) && (jsxRuntime.jsx("p", { className: cx(sx(helperTextStyle), error && sx(errorTextStyle)), role: error ? 'alert' : undefined, children: error || helperText }))] }));
|
|
6790
|
+
availableOptions.map((option, index) => (jsxRuntime.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: [jsxRuntime.jsx("span", { className: sx(optionAvatarStyle$1), "aria-hidden": "true", children: jsxRuntime.jsx(UserIcon, { size: 16 }) }), jsxRuntime.jsxs("span", { className: sx(optionContentStyle), children: [jsxRuntime.jsx("span", { className: sx(optionNameStyle), children: option.name }), jsxRuntime.jsx("span", { className: sx(optionEmailStyle), children: option.email }), option.title && (jsxRuntime.jsx("span", { className: sx(optionTitleStyle), children: option.title }))] })] }, option.id))), showNoResults && (jsxRuntime.jsxs("li", { className: sx(noResultsStyle$1), role: "status", children: ["No users found matching \"", trimmedQuery, "\""] }))] })), showMinLengthHint && (jsxRuntime.jsxs("div", { className: sx(hintStyle), role: "status", children: ["Enter at least ", minSearchLength, " characters to search"] }))] }), (helperText || error) && (jsxRuntime.jsx("p", { className: cx(sx(helperTextStyle$1), error && sx(errorTextStyle$1)), role: error ? 'alert' : undefined, children: error || helperText }))] }));
|
|
6791
6791
|
};
|
|
6792
6792
|
MultiUserSearch.displayName = 'MultiUserSearch';
|
|
6793
6793
|
|
|
@@ -7028,7 +7028,7 @@ const NavItem = ({ icon, label, active = false, collapsed = false, variant = 'de
|
|
|
7028
7028
|
* The header reserves its space even with nothing to show, fading in once a
|
|
7029
7029
|
* title arrives, so the page below does not jump as data loads.
|
|
7030
7030
|
*/
|
|
7031
|
-
const headerStyle$
|
|
7031
|
+
const headerStyle$L = {
|
|
7032
7032
|
label: 'PageHeader-headerStyle',
|
|
7033
7033
|
display: 'flex',
|
|
7034
7034
|
alignItems: 'flex-start',
|
|
@@ -7044,7 +7044,7 @@ const emptyStyle$n = {
|
|
|
7044
7044
|
opacity: 0,
|
|
7045
7045
|
pointerEvents: 'none',
|
|
7046
7046
|
};
|
|
7047
|
-
const bodyStyle$
|
|
7047
|
+
const bodyStyle$c = {
|
|
7048
7048
|
label: 'PageHeader-bodyStyle',
|
|
7049
7049
|
display: 'flex',
|
|
7050
7050
|
justifyContent: 'space-between',
|
|
@@ -7086,7 +7086,7 @@ const titleStyle$E = {
|
|
|
7086
7086
|
* The header keeps its height while `title` is empty and fades in once one
|
|
7087
7087
|
* arrives, so pages do not jump as their data loads.
|
|
7088
7088
|
*/
|
|
7089
|
-
const PageHeader = ({ title, pretitle, after, back, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$
|
|
7089
|
+
const PageHeader = ({ title, pretitle, after, back, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$L), !title && sx(emptyStyle$n), className), children: [back, jsxRuntime.jsx("div", { className: sx(bodyStyle$c), children: jsxRuntime.jsxs("div", { className: sx(textStyle), children: [pretitle && jsxRuntime.jsx("h2", { className: sx(pretitleStyle$1), children: pretitle }), jsxRuntime.jsxs("h1", { className: sx(titleStyle$E), children: [title, "\u00A0"] }), after] }) })] }));
|
|
7090
7090
|
PageHeader.displayName = 'PageHeader';
|
|
7091
7091
|
|
|
7092
7092
|
/**
|
|
@@ -7095,7 +7095,7 @@ PageHeader.displayName = 'PageHeader';
|
|
|
7095
7095
|
* The back arrow leads the section line, so the arrow and the page name both
|
|
7096
7096
|
* start on the page's left edge and the header lines up with the content below.
|
|
7097
7097
|
*/
|
|
7098
|
-
const headerStyle$
|
|
7098
|
+
const headerStyle$K = {
|
|
7099
7099
|
label: 'PageHeaderSubsection-headerStyle',
|
|
7100
7100
|
display: 'grid',
|
|
7101
7101
|
gridTemplateColumns: 'minmax(0, 1fr) auto',
|
|
@@ -7133,7 +7133,7 @@ const backButtonStyle$1 = {
|
|
|
7133
7133
|
outlineOffset: 2,
|
|
7134
7134
|
},
|
|
7135
7135
|
};
|
|
7136
|
-
const sectionStyle$
|
|
7136
|
+
const sectionStyle$a = {
|
|
7137
7137
|
label: 'PageHeaderSubsection-sectionStyle',
|
|
7138
7138
|
margin: 0,
|
|
7139
7139
|
color: 'var(--color-slate, #4a5c72)',
|
|
@@ -7153,13 +7153,13 @@ const titleStyle$D = {
|
|
|
7153
7153
|
fontWeight: 400,
|
|
7154
7154
|
lineHeight: '44px',
|
|
7155
7155
|
};
|
|
7156
|
-
const metaStyle$
|
|
7156
|
+
const metaStyle$2 = {
|
|
7157
7157
|
label: 'PageHeaderSubsection-metaStyle',
|
|
7158
7158
|
gridArea: 'meta',
|
|
7159
7159
|
minWidth: 0,
|
|
7160
7160
|
marginTop: 4,
|
|
7161
7161
|
};
|
|
7162
|
-
const actionsStyle$
|
|
7162
|
+
const actionsStyle$c = {
|
|
7163
7163
|
label: 'PageHeaderSubsection-actionsStyle',
|
|
7164
7164
|
gridArea: 'actions',
|
|
7165
7165
|
display: 'flex',
|
|
@@ -7179,7 +7179,7 @@ const PageHeaderSubsection = ({ sectionName, pageName, meta, onBack, backLabel =
|
|
|
7179
7179
|
else
|
|
7180
7180
|
window.history.back();
|
|
7181
7181
|
};
|
|
7182
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$
|
|
7182
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$K), className), "data-test": "page-header-subsection", children: [jsxRuntime.jsxs("div", { className: sx(sectionRowStyle), children: [!hideBack && (jsxRuntime.jsx("button", { type: "button", className: sx(backButtonStyle$1), onClick: handleBack, "aria-label": backLabel, "data-test": "page-header-subsection-back", children: jsxRuntime.jsx(BackIcon$1, {}) })), jsxRuntime.jsx("p", { className: sx(sectionStyle$a), children: sectionName })] }), jsxRuntime.jsx("h1", { className: sx(titleStyle$D), children: pageName }), meta && jsxRuntime.jsx("div", { className: sx(metaStyle$2), children: meta }), actions && jsxRuntime.jsx("div", { className: sx(actionsStyle$c), children: actions })] }));
|
|
7183
7183
|
};
|
|
7184
7184
|
PageHeaderSubsection.displayName = 'PageHeaderSubsection';
|
|
7185
7185
|
|
|
@@ -7191,7 +7191,7 @@ const toneColors = {
|
|
|
7191
7191
|
success: { panel: 'var(--color-alert-success-bg)', accent: 'var(--color-success-accent)' },
|
|
7192
7192
|
error: { panel: 'var(--color-alert-error-bg)', accent: 'var(--color-danger-accent)' },
|
|
7193
7193
|
};
|
|
7194
|
-
const rootStyle$
|
|
7194
|
+
const rootStyle$3 = {
|
|
7195
7195
|
label: 'PanelTabs-rootStyle',
|
|
7196
7196
|
display: 'flex',
|
|
7197
7197
|
flexDirection: 'column',
|
|
@@ -7307,7 +7307,7 @@ const PanelTabs = ({ options, value, onChange, 'aria-label': ariaLabel, children
|
|
|
7307
7307
|
choose(event.key === 'Home' ? 0 : options.length - 1);
|
|
7308
7308
|
}
|
|
7309
7309
|
};
|
|
7310
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(rootStyle$
|
|
7310
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(rootStyle$3), className), children: [jsxRuntime.jsx("div", { className: cx(sx(tabListStyle), sx(shortenStyle(shortenBelow))), role: "radiogroup", "aria-label": ariaLabel, children: options.map((option, index) => {
|
|
7311
7311
|
const selected = index === chosen;
|
|
7312
7312
|
return (jsxRuntime.jsxs("button", { ref: (element) => {
|
|
7313
7313
|
tabs.current[index] = element;
|
|
@@ -7410,7 +7410,7 @@ const focusRing = {
|
|
|
7410
7410
|
* current page is matched on `[aria-current="page"]` instead — the component
|
|
7411
7411
|
* sets that attribute from the same expression that sets `currentStyle`.
|
|
7412
7412
|
*/
|
|
7413
|
-
const pageStyle$
|
|
7413
|
+
const pageStyle$v = {
|
|
7414
7414
|
label: 'Pagination-pageStyle',
|
|
7415
7415
|
...buttonBase,
|
|
7416
7416
|
'&:hover:not([aria-current="page"])': {
|
|
@@ -7493,7 +7493,7 @@ const Pagination = ({ page, pageSize, totalItems, siblingCount = 1, pageSizeOpti
|
|
|
7493
7493
|
return;
|
|
7494
7494
|
onPageChange?.(next);
|
|
7495
7495
|
};
|
|
7496
|
-
return (jsxRuntime.jsxs("nav", { className: cx(sx(paginationStyle$3), className), "aria-label": ariaLabel, "data-test": "pagination", children: [!hideSummary && (jsxRuntime.jsxs("p", { className: sx(summaryStyle$6), "data-test": "pagination-summary", children: ["Showing ", firstItem, "\u2013", lastItem, " of ", totalItems, " ", itemLabel] })), jsxRuntime.jsxs("div", { className: sx(controlsStyle), children: [showSizeSelector && (jsxRuntime.jsxs("label", { className: sx(pageSizeStyle), children: [jsxRuntime.jsx("span", { children: "Rows per page" }), jsxRuntime.jsx("select", { value: pageSize, onChange: (event) => onPageSizeChange?.(Number(event.target.value)), "data-test": "pagination-page-size", children: pageSizeOptions.map((option) => (jsxRuntime.jsx("option", { value: option, children: option }, option))) })] })), jsxRuntime.jsxs("ul", { className: sx(pagesStyle), children: [jsxRuntime.jsx("li", { children: jsxRuntime.jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage - 1), disabled: currentPage <= 1, "aria-label": "Previous page", "data-test": "pagination-previous", children: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }) }) }), items.map((item, index) => item === 'ellipsis' ? (jsxRuntime.jsx("li", { className: sx(ellipsisStyle), "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`)) : (jsxRuntime.jsx("li", { children: jsxRuntime.jsx("button", { type: "button", className: cx(sx(pageStyle$
|
|
7496
|
+
return (jsxRuntime.jsxs("nav", { className: cx(sx(paginationStyle$3), className), "aria-label": ariaLabel, "data-test": "pagination", children: [!hideSummary && (jsxRuntime.jsxs("p", { className: sx(summaryStyle$6), "data-test": "pagination-summary", children: ["Showing ", firstItem, "\u2013", lastItem, " of ", totalItems, " ", itemLabel] })), jsxRuntime.jsxs("div", { className: sx(controlsStyle), children: [showSizeSelector && (jsxRuntime.jsxs("label", { className: sx(pageSizeStyle), children: [jsxRuntime.jsx("span", { children: "Rows per page" }), jsxRuntime.jsx("select", { value: pageSize, onChange: (event) => onPageSizeChange?.(Number(event.target.value)), "data-test": "pagination-page-size", children: pageSizeOptions.map((option) => (jsxRuntime.jsx("option", { value: option, children: option }, option))) })] })), jsxRuntime.jsxs("ul", { className: sx(pagesStyle), children: [jsxRuntime.jsx("li", { children: jsxRuntime.jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage - 1), disabled: currentPage <= 1, "aria-label": "Previous page", "data-test": "pagination-previous", children: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }) }) }), items.map((item, index) => item === 'ellipsis' ? (jsxRuntime.jsx("li", { className: sx(ellipsisStyle), "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`)) : (jsxRuntime.jsx("li", { children: jsxRuntime.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))), jsxRuntime.jsx("li", { children: jsxRuntime.jsx("button", { type: "button", className: sx(stepStyle), onClick: () => goTo(currentPage + 1), disabled: currentPage >= pageCount, "aria-label": "Next page", "data-test": "pagination-next", children: jsxRuntime.jsx(ChevronRightIcon$1, { size: 16 }) }) })] })] })] }));
|
|
7497
7497
|
};
|
|
7498
7498
|
|
|
7499
7499
|
/* Progress Bar */
|
|
@@ -7960,7 +7960,7 @@ const SearchField = React.forwardRef(({ placeholder = 'Search...', value, defaul
|
|
|
7960
7960
|
SearchField.displayName = 'SearchField';
|
|
7961
7961
|
|
|
7962
7962
|
/** The form's own vertical rhythm. */
|
|
7963
|
-
const formStyle$
|
|
7963
|
+
const formStyle$6 = {
|
|
7964
7964
|
label: 'SchoolContactForm-formStyle',
|
|
7965
7965
|
display: 'grid',
|
|
7966
7966
|
gap: 16,
|
|
@@ -8019,7 +8019,7 @@ const phoneFieldsStyle = {
|
|
|
8019
8019
|
* Layout for Hub's school-contact editor. Field controls stay injectable so
|
|
8020
8020
|
* consuming applications retain their form state, validation, and masking.
|
|
8021
8021
|
*/
|
|
8022
|
-
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(formStyle$
|
|
8022
|
+
const SchoolContactForm = ({ mode, createFromPortalUser, firstNameField, middleInitialField, lastNameField, businessPhoneField, cellPhoneField, emailField, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(formStyle$6), className), children: [mode === 'Add' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { className: sx(portalLabelStyle), children: "Create From Portal User" }), createFromPortalUser] }), jsxRuntime.jsx("div", { className: sx(dividerStyle$2), children: jsxRuntime.jsx("strong", { children: "OR" }) }), jsxRuntime.jsx("p", { className: sx(newContactLabelStyle), children: "Create New Contact Without Portal Access" })] })), jsxRuntime.jsxs("div", { className: sx(nameFieldsStyle), children: [firstNameField, middleInitialField, lastNameField] }), jsxRuntime.jsxs("div", { className: sx(phoneFieldsStyle), children: [businessPhoneField, cellPhoneField] }), jsxRuntime.jsx("div", { children: emailField })] }));
|
|
8023
8023
|
|
|
8024
8024
|
const segmentStyle$2 = {
|
|
8025
8025
|
label: 'Segment-segmentStyle',
|
|
@@ -8153,7 +8153,7 @@ SportCodeBadge.displayName = 'SportCodeBadge';
|
|
|
8153
8153
|
* the job this component exists for (tabbed dropdowns jumped as each tab's
|
|
8154
8154
|
* longest option changed).
|
|
8155
8155
|
*/
|
|
8156
|
-
const stackStyle$
|
|
8156
|
+
const stackStyle$5 = {
|
|
8157
8157
|
label: 'TabPanelStack-stackStyle',
|
|
8158
8158
|
display: 'grid',
|
|
8159
8159
|
};
|
|
@@ -8182,7 +8182,7 @@ const hiddenPanelStyle = {
|
|
|
8182
8182
|
* focus order and the accessibility tree (`aria-hidden` says so explicitly),
|
|
8183
8183
|
* so only the visible one can be read or tabbed to.
|
|
8184
8184
|
*/
|
|
8185
|
-
const TabPanelStack = ({ panels, activeId, idPrefix, className = '' }) => (jsxRuntime.jsx("div", { className: [sx(stackStyle$
|
|
8185
|
+
const TabPanelStack = ({ panels, activeId, idPrefix, className = '' }) => (jsxRuntime.jsx("div", { className: [sx(stackStyle$5), className].filter(Boolean).join(' '), children: panels.map(({ id, content, labelledBy }) => {
|
|
8186
8186
|
const active = id === activeId;
|
|
8187
8187
|
return (jsxRuntime.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));
|
|
8188
8188
|
}) }));
|
|
@@ -8402,7 +8402,7 @@ TabStrip.displayName = 'TabStrip';
|
|
|
8402
8402
|
* inherit the title's display font and size. `&&` (0,2,0) so a host's descendant
|
|
8403
8403
|
* rule (e.g. `.title span`, 0,1,1) can't restyle it either.
|
|
8404
8404
|
*/
|
|
8405
|
-
const rootStyle$
|
|
8405
|
+
const rootStyle$2 = {
|
|
8406
8406
|
label: 'TeamPicker-rootStyle',
|
|
8407
8407
|
'&&': {
|
|
8408
8408
|
fontFamily: 'var(--font-family-base, Inter, system-ui, sans-serif)',
|
|
@@ -8522,7 +8522,7 @@ const TeamPicker = ({ groups, groupOrder, activeGroup, onGroupChange, mode = 'si
|
|
|
8522
8522
|
onOnly(value);
|
|
8523
8523
|
}, children: "Only" }))] }, value));
|
|
8524
8524
|
};
|
|
8525
|
-
return (jsxRuntime.jsxs("div", { className: sx(rootStyle$
|
|
8525
|
+
return (jsxRuntime.jsxs("div", { className: sx(rootStyle$2), children: [jsxRuntime.jsx("div", { className: sx(tabRowStyle), children: jsxRuntime.jsx(TabStrip, { idPrefix: uid, accent: "teal", "aria-label": ariaLabel, activeTab: current, onTabChange: changeGroup, tabs: ids.map((id) => {
|
|
8526
8526
|
const values = (groups[id] ?? []).map(teamValue);
|
|
8527
8527
|
const count = values.filter((value) => selected.includes(value)).length;
|
|
8528
8528
|
const all = values.length > 0 && count === values.length;
|
|
@@ -8550,7 +8550,7 @@ TeamPicker.displayName = 'TeamPicker';
|
|
|
8550
8550
|
*/
|
|
8551
8551
|
/** Shrink-wrapped, as before: inline content stays beside it, and the icon
|
|
8552
8552
|
* trigger's right-aligned panel hangs from the icon, not the container. */
|
|
8553
|
-
const rootStyle = {
|
|
8553
|
+
const rootStyle$1 = {
|
|
8554
8554
|
label: 'SelectFilter-rootStyle',
|
|
8555
8555
|
position: 'relative',
|
|
8556
8556
|
display: 'inline-block',
|
|
@@ -8760,7 +8760,7 @@ const choicesStyle = {
|
|
|
8760
8760
|
overflowY: 'auto',
|
|
8761
8761
|
};
|
|
8762
8762
|
/** Extra content above the title, ruled off from the choices. */
|
|
8763
|
-
const headerStyle$
|
|
8763
|
+
const headerStyle$J = {
|
|
8764
8764
|
label: 'SelectFilter-headerStyle',
|
|
8765
8765
|
padding: '6px 12px 10px',
|
|
8766
8766
|
marginBottom: 'var(--space-1)',
|
|
@@ -8875,7 +8875,7 @@ const optionBodyStyle = {
|
|
|
8875
8875
|
};
|
|
8876
8876
|
const optionLabelStyle = { label: 'SelectFilter-optionLabelStyle', flex: 1 };
|
|
8877
8877
|
/** Text for assistive technology only (a trigger's state the eye reads from colour). */
|
|
8878
|
-
const srOnlyStyle$
|
|
8878
|
+
const srOnlyStyle$5 = { label: 'SelectFilter-srOnlyStyle', ...srOnly };
|
|
8879
8879
|
|
|
8880
8880
|
/**
|
|
8881
8881
|
* One flat option. A single pick is a button. A multi-select row is its
|
|
@@ -9108,7 +9108,7 @@ const SelectFilter = React.forwardRef(({ label, options = [], groupedOptions = {
|
|
|
9108
9108
|
else if (trigger === 'filter') {
|
|
9109
9109
|
triggerElement = (
|
|
9110
9110
|
// An outlined pill, blue while open or while a filter is in effect.
|
|
9111
|
-
jsxRuntime.jsxs("button", { "aria-expanded": isOpen, className: cx(sx(filterPillStyle), isOpen || active ? sx(filterPillActiveStyle) : ''), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [jsxRuntime.jsx(Icon, { name: "Filter", size: 16 }), triggerLabel, active && !(activeCount > 0) && jsxRuntime.jsx("span", { className: sx(srOnlyStyle$
|
|
9111
|
+
jsxRuntime.jsxs("button", { "aria-expanded": isOpen, className: cx(sx(filterPillStyle), isOpen || active ? sx(filterPillActiveStyle) : ''), "data-testid": `${label}-filter`, disabled: disabled, onClick: toggle, type: "button", children: [jsxRuntime.jsx(Icon, { name: "Filter", size: 16 }), triggerLabel, active && !(activeCount > 0) && jsxRuntime.jsx("span", { className: sx(srOnlyStyle$5), children: " (filter on)" }), activeCount > 0 && (jsxRuntime.jsx("span", { "aria-label": `${activeCount} on`, className: sx(filterCountStyle), children: activeCount }))] }));
|
|
9112
9112
|
}
|
|
9113
9113
|
else if (trigger === 'link') {
|
|
9114
9114
|
triggerElement = (jsxRuntime.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 ? (jsxRuntime.jsxs("span", { className: sx(teamValueStyle), children: [jsxRuntime.jsx(SportCodeBadge, { code: codeOf(singleTeam), group: singleTeamTab && isSportCodeGroup(singleTeamTab) ? singleTeamTab : undefined }), jsxRuntime.jsx("span", { children: singleTeam.name ?? singleTeam.label })] })) : (jsxRuntime.jsx("span", { children: triggerText })), chevron] }));
|
|
@@ -9116,13 +9116,13 @@ const SelectFilter = React.forwardRef(({ label, options = [], groupedOptions = {
|
|
|
9116
9116
|
else {
|
|
9117
9117
|
triggerElement = (jsxRuntime.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: [jsxRuntime.jsx("span", { className: sx(tagsStyle$1), children: isAll ? (jsxRuntime.jsxs("span", { className: sx(tagStyle), "data-testid": `${label}-option-all`, children: ["All ", label, "s"] })) : !chosen.length ? (jsxRuntime.jsx("span", { className: sx(placeholderStyle), children: placeholderText })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [chosen.slice(0, tagLimit).map(renderTag), remaining > 0 && (jsxRuntime.jsxs("span", { className: sx(tagStyle), "data-testid": `${label}-option-remaining`, children: ["+", remaining] }))] })) }), jsxRuntime.jsx("span", { className: sx(chevronButtonStyle), children: chevron })] }));
|
|
9118
9118
|
}
|
|
9119
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(rootStyle), fullWidth ? sx(fullWidthStyle) : '', className ?? ''), ref: (element) => {
|
|
9119
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(rootStyle$1), fullWidth ? sx(fullWidthStyle) : '', className ?? ''), ref: (element) => {
|
|
9120
9120
|
rootRef.current = element;
|
|
9121
9121
|
if (typeof ref === 'function')
|
|
9122
9122
|
ref(element);
|
|
9123
9123
|
else if (ref)
|
|
9124
9124
|
ref.current = element;
|
|
9125
|
-
}, children: [triggerElement, isOpen && (jsxRuntime.jsxs("div", { className: cx(sx(panelStyle$8), sx(trigger === 'icon' || trigger === 'filter' ? panelRightStyle : panelLeftStyle)), style: width ? { minWidth: width } : undefined, children: [header && jsxRuntime.jsx("div", { className: sx(headerStyle$
|
|
9125
|
+
}, children: [triggerElement, isOpen && (jsxRuntime.jsxs("div", { className: cx(sx(panelStyle$8), sx(trigger === 'icon' || trigger === 'filter' ? panelRightStyle : panelLeftStyle)), style: width ? { minWidth: width } : undefined, children: [header && jsxRuntime.jsx("div", { className: sx(headerStyle$J), children: header }), (title || showAllLink) && (jsxRuntime.jsxs("div", { className: sx(titleRowStyle$5), children: [title && jsxRuntime.jsx("span", { className: sx(titleStyle$C), children: title }), showAllLink && (jsxRuntime.jsx("button", { className: sx(allLinkStyle), onClick: selectAll, type: "button", children: "All" }))] })), jsxRuntime.jsx("div", { className: sx(choicesStyle), ref: choicesRef, children: grouped ? (
|
|
9126
9126
|
// Multi-select stages here (with a select-all per tab and "Only");
|
|
9127
9127
|
// Apply below commits it. A single pick commits at once.
|
|
9128
9128
|
jsxRuntime.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 ? (jsxRuntime.jsx("div", { className: sx(emptyStyle$l), children: "No options found" })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [multiselect && !hideCheckAll && (
|
|
@@ -9293,7 +9293,7 @@ const SupplierTypeToggle = ({ value, defaultValue = '', onChange, disabled = fal
|
|
|
9293
9293
|
};
|
|
9294
9294
|
|
|
9295
9295
|
/** Sticks to the top of the calendar column as the schedule scrolls past. */
|
|
9296
|
-
const headerStyle$
|
|
9296
|
+
const headerStyle$I = {
|
|
9297
9297
|
label: 'TeamCalendarHeader-headerStyle',
|
|
9298
9298
|
position: 'sticky',
|
|
9299
9299
|
top: 0,
|
|
@@ -9305,7 +9305,7 @@ const headerStyle$H = {
|
|
|
9305
9305
|
justifyContent: 'space-between',
|
|
9306
9306
|
},
|
|
9307
9307
|
};
|
|
9308
|
-
const rowStyle$
|
|
9308
|
+
const rowStyle$8 = {
|
|
9309
9309
|
label: 'TeamCalendarHeader-rowStyle',
|
|
9310
9310
|
display: 'flex',
|
|
9311
9311
|
justifyContent: 'space-between',
|
|
@@ -9359,7 +9359,7 @@ const contentStyle$8 = {
|
|
|
9359
9359
|
* It sticks to the top of its column so the team stays identifiable while the
|
|
9360
9360
|
* schedule scrolls.
|
|
9361
9361
|
*/
|
|
9362
|
-
const TeamCalendarHeader = ({ teamCode, teamFullName, children, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$
|
|
9362
|
+
const TeamCalendarHeader = ({ teamCode, teamFullName, children, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$I), className), children: [jsxRuntime.jsx("div", { className: sx(rowStyle$8), children: jsxRuntime.jsxs("div", { className: sx(identityStyle$1), children: [jsxRuntime.jsx("div", { className: sx(codeStyle$3), children: teamCode }), teamFullName && jsxRuntime.jsx("span", { className: sx(nameStyle$4), children: teamFullName })] }) }), jsxRuntime.jsx("div", { className: sx(contentStyle$8), children: children })] }));
|
|
9363
9363
|
TeamCalendarHeader.displayName = 'TeamCalendarHeader';
|
|
9364
9364
|
|
|
9365
9365
|
/**
|
|
@@ -9376,7 +9376,7 @@ const subMenuStyle = {
|
|
|
9376
9376
|
label: 'TeamHeader-subMenuStyle',
|
|
9377
9377
|
marginBottom: 24,
|
|
9378
9378
|
};
|
|
9379
|
-
const headerStyle$
|
|
9379
|
+
const headerStyle$H = {
|
|
9380
9380
|
label: 'TeamHeader-headerStyle',
|
|
9381
9381
|
display: 'flex',
|
|
9382
9382
|
alignItems: 'flex-start',
|
|
@@ -9442,7 +9442,7 @@ const titleStyle$B = {
|
|
|
9442
9442
|
lineHeight: '52px',
|
|
9443
9443
|
},
|
|
9444
9444
|
};
|
|
9445
|
-
const actionsStyle$
|
|
9445
|
+
const actionsStyle$b = {
|
|
9446
9446
|
label: 'TeamHeader-actionsStyle',
|
|
9447
9447
|
display: 'flex',
|
|
9448
9448
|
alignItems: 'center',
|
|
@@ -9457,7 +9457,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
9457
9457
|
const title = suppliedTitle ?? (teamCode && teamName
|
|
9458
9458
|
? `${teamCode} - ${teamName}`
|
|
9459
9459
|
: teamName || teamCode || '');
|
|
9460
|
-
const headerClasses = cx(sx(headerStyle$
|
|
9460
|
+
const headerClasses = cx(sx(headerStyle$H), !title && sx(emptyStyle$k), className);
|
|
9461
9461
|
const handleBack = () => {
|
|
9462
9462
|
if (onBack) {
|
|
9463
9463
|
onBack();
|
|
@@ -9467,7 +9467,7 @@ const TeamHeader = ({ title: suppliedTitle, teamCode, teamName, pretitle = 'Team
|
|
|
9467
9467
|
window.location.href = backHref;
|
|
9468
9468
|
}
|
|
9469
9469
|
};
|
|
9470
|
-
return (jsxRuntime.jsxs("div", { className: headerClasses, "data-test": "team-header", children: [jsxRuntime.jsxs("div", { className: sx(leftStyle$1), children: [(backHref || onBack) && (jsxRuntime.jsx("button", { type: "button", className: sx(backButtonStyle), onClick: handleBack, "aria-label": "Go back", "data-test": "team-header-back", children: jsxRuntime.jsx(BackIcon, {}) })), jsxRuntime.jsxs("div", { className: sx(titlesStyle), children: [pretitle && jsxRuntime.jsx("span", { className: sx(pretitleStyle), children: pretitle }), jsxRuntime.jsxs("h1", { className: sx(titleStyle$B), children: [title, "\u00A0"] })] })] }), actions && (jsxRuntime.jsx("div", { className: sx(actionsStyle$
|
|
9470
|
+
return (jsxRuntime.jsxs("div", { className: headerClasses, "data-test": "team-header", children: [jsxRuntime.jsxs("div", { className: sx(leftStyle$1), children: [(backHref || onBack) && (jsxRuntime.jsx("button", { type: "button", className: sx(backButtonStyle), onClick: handleBack, "aria-label": "Go back", "data-test": "team-header-back", children: jsxRuntime.jsx(BackIcon, {}) })), jsxRuntime.jsxs("div", { className: sx(titlesStyle), children: [pretitle && jsxRuntime.jsx("span", { className: sx(pretitleStyle), children: pretitle }), jsxRuntime.jsxs("h1", { className: sx(titleStyle$B), children: [title, "\u00A0"] })] })] }), actions && (jsxRuntime.jsx("div", { className: sx(actionsStyle$b), children: actions }))] }));
|
|
9471
9471
|
};
|
|
9472
9472
|
const DEFAULT_TABS$1 = [
|
|
9473
9473
|
{ id: 'profile', label: 'Profile' },
|
|
@@ -9611,7 +9611,7 @@ const locationStyle = {
|
|
|
9611
9611
|
fontWeight: 'var(--font-semibold)',
|
|
9612
9612
|
color: 'var(--color-gray-900)',
|
|
9613
9613
|
};
|
|
9614
|
-
const routeStyle$
|
|
9614
|
+
const routeStyle$4 = {
|
|
9615
9615
|
label: 'TripSegment-routeStyle',
|
|
9616
9616
|
display: 'flex',
|
|
9617
9617
|
alignItems: 'center',
|
|
@@ -9693,7 +9693,7 @@ const AirSegment = ({ flights, variant = 'light', className = '', }) => {
|
|
|
9693
9693
|
if (!flights || flights.length === 0) {
|
|
9694
9694
|
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: sx(emptyStyle$j), children: "No flights" }) }));
|
|
9695
9695
|
}
|
|
9696
|
-
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxRuntime.jsxs("div", { className: sx(itemStyle$3), children: [jsxRuntime.jsxs("div", { className: sx(itemHeaderStyle), children: [jsxRuntime.jsx(PlaneIcon$2, {}), jsxRuntime.jsx("span", { className: sx(itemTypeStyle), children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxRuntime.jsxs("div", { className: sx(routeStyle$
|
|
9696
|
+
return (jsxRuntime.jsx(TripSegment, { type: "air", variant: variant, className: className, children: flights.map((flight, i) => (jsxRuntime.jsxs("div", { className: sx(itemStyle$3), children: [jsxRuntime.jsxs("div", { className: sx(itemHeaderStyle), children: [jsxRuntime.jsx(PlaneIcon$2, {}), jsxRuntime.jsx("span", { className: sx(itemTypeStyle), children: flight.type === 'charter' ? 'Charter' : 'Commercial' })] }), jsxRuntime.jsxs("div", { className: sx(routeStyle$4), children: [jsxRuntime.jsx("span", { className: sx(locationStyle), children: flight.departure }), jsxRuntime.jsx(ArrowIcon, {}), jsxRuntime.jsx("span", { className: sx(locationStyle), children: flight.arrival })] }), jsxRuntime.jsxs("div", { className: sx(detailsStyle$3), children: [jsxRuntime.jsx("span", { children: flight.departureDate }), flight.departureTime && jsxRuntime.jsx("span", { children: flight.departureTime })] }), flight.airline && (jsxRuntime.jsxs("div", { className: sx(detailsStyle$3), children: [jsxRuntime.jsx("span", { children: flight.airline }), flight.flightNumber && jsxRuntime.jsxs("span", { children: ["#", flight.flightNumber] })] }))] }, i))) }));
|
|
9697
9697
|
};
|
|
9698
9698
|
/**
|
|
9699
9699
|
* GroundSegment component for displaying ground transportation
|
|
@@ -9702,7 +9702,7 @@ const GroundSegment = ({ segments, variant = 'light', className = '', }) => {
|
|
|
9702
9702
|
if (!segments || segments.length === 0) {
|
|
9703
9703
|
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: jsxRuntime.jsx("span", { className: sx(emptyStyle$j), children: "No ground transportation" }) }));
|
|
9704
9704
|
}
|
|
9705
|
-
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxRuntime.jsxs("div", { className: sx(itemStyle$3), children: [jsxRuntime.jsxs("div", { className: sx(itemHeaderStyle), children: [jsxRuntime.jsx(BusIcon$1, {}), jsxRuntime.jsx("span", { className: sx(itemTypeStyle), children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxRuntime.jsxs("div", { className: sx(routeStyle$
|
|
9705
|
+
return (jsxRuntime.jsx(TripSegment, { type: "ground", variant: variant, className: className, children: segments.map((segment, i) => (jsxRuntime.jsxs("div", { className: sx(itemStyle$3), children: [jsxRuntime.jsxs("div", { className: sx(itemHeaderStyle), children: [jsxRuntime.jsx(BusIcon$1, {}), jsxRuntime.jsx("span", { className: sx(itemTypeStyle), children: segment.type.charAt(0).toUpperCase() + segment.type.slice(1) })] }), jsxRuntime.jsxs("div", { className: sx(routeStyle$4), children: [jsxRuntime.jsx("span", { className: sx(locationStyle), children: segment.pickupLocation }), jsxRuntime.jsx(ArrowIcon, {}), jsxRuntime.jsx("span", { className: sx(locationStyle), children: segment.dropoffLocation })] }), jsxRuntime.jsxs("div", { className: sx(detailsStyle$3), children: [jsxRuntime.jsx("span", { children: segment.pickupDate }), segment.pickupTime && jsxRuntime.jsx("span", { children: segment.pickupTime })] }), segment.company && (jsxRuntime.jsxs("div", { className: sx(detailsStyle$3), children: [jsxRuntime.jsx("span", { children: segment.company }), segment.vehicleCount && jsxRuntime.jsxs("span", { children: [segment.vehicleCount, " vehicles"] })] }))] }, i))) }));
|
|
9706
9706
|
};
|
|
9707
9707
|
/**
|
|
9708
9708
|
* HotelSegment component for displaying hotel information
|
|
@@ -9749,7 +9749,7 @@ const panelStyle$7 = {
|
|
|
9749
9749
|
borderRadius: 'var(--radius-xl)',
|
|
9750
9750
|
backgroundColor: 'var(--bg-surface)',
|
|
9751
9751
|
};
|
|
9752
|
-
const panelTitleStyle = {
|
|
9752
|
+
const panelTitleStyle$1 = {
|
|
9753
9753
|
label: 'AcmiQuoteCalculator-panelTitleStyle',
|
|
9754
9754
|
margin: 0,
|
|
9755
9755
|
color: 'var(--fg-1)',
|
|
@@ -9820,7 +9820,7 @@ const legErrorStyle = {
|
|
|
9820
9820
|
color: 'var(--color-error)',
|
|
9821
9821
|
fontSize: 'var(--fs-sm)',
|
|
9822
9822
|
};
|
|
9823
|
-
const actionsStyle$
|
|
9823
|
+
const actionsStyle$a = {
|
|
9824
9824
|
label: 'AcmiQuoteCalculator-actionsStyle',
|
|
9825
9825
|
display: 'flex',
|
|
9826
9826
|
flexWrap: 'wrap',
|
|
@@ -10058,10 +10058,10 @@ const AcmiQuoteCalculator = ({ carrierOptions = ACMI_CARRIER_OPTIONS, aircraftOp
|
|
|
10058
10058
|
const seatHint = specs
|
|
10059
10059
|
? `Maximum ${specs.seats} passengers for this aircraft`
|
|
10060
10060
|
: 'Select an aircraft to see seat capacity';
|
|
10061
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(calculatorStyle$1), className), "data-test": "acmi-quote-calculator", children: [showErrors && errorList.length > 0 && (jsxRuntime.jsx(Alert, { variant: "error", title: "Fix these before calculating", children: jsxRuntime.jsx("ul", { className: sx(errorSummaryStyle$1), "data-test": "acmi-error-summary", children: errorList.map(([field, message]) => (jsxRuntime.jsx("li", { children: message }, field))) }) })), calculationError && (jsxRuntime.jsx(Alert, { variant: "error", title: "Quote could not be calculated", children: jsxRuntime.jsx("p", { className: sx(alertMessageStyle), "data-test": "acmi-calculation-error", children: calculationError }) })), jsxRuntime.jsxs("div", { className: sx(columnsStyle), children: [jsxRuntime.jsxs("section", { className: sx(panelStyle$7), "aria-label": "Quote configuration", children: [jsxRuntime.jsx("h3", { className: sx(panelTitleStyle), children: "Quote Configuration" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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 && (jsxRuntime.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" }))] }), jsxRuntime.jsxs("section", { className: sx(panelStyle$7), "aria-label": "Flight itinerary", children: [jsxRuntime.jsx("h3", { className: sx(panelTitleStyle), children: "Flight Itinerary" }), jsxRuntime.jsx(Alert, { variant: "primary", children: positioningMode === 'automatic' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["Enter ", jsxRuntime.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."] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["Enter ", jsxRuntime.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 && (jsxRuntime.jsx("p", { className: sx(legErrorStyle), role: "alert", "data-test": "acmi-legs-error", children: errors.legs })), jsxRuntime.jsx("ol", { className: sx(legsStyle$3), children: inputs.legs.map((leg, index) => (jsxRuntime.jsxs("li", { className: cx(sx(legStyle$2), positioningMode === 'automatic' && sx(automaticLegStyle)), "data-test": "acmi-leg", children: [jsxRuntime.jsxs("span", { className: sx(legIndexStyle$1), children: ["Leg ", index + 1] }), positioningMode === 'explicit' && (jsxRuntime.jsx(Select, { id: `${leg.id}-type`, size: "sm", label: "Leg type", options: [
|
|
10061
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(calculatorStyle$1), className), "data-test": "acmi-quote-calculator", children: [showErrors && errorList.length > 0 && (jsxRuntime.jsx(Alert, { variant: "error", title: "Fix these before calculating", children: jsxRuntime.jsx("ul", { className: sx(errorSummaryStyle$1), "data-test": "acmi-error-summary", children: errorList.map(([field, message]) => (jsxRuntime.jsx("li", { children: message }, field))) }) })), calculationError && (jsxRuntime.jsx(Alert, { variant: "error", title: "Quote could not be calculated", children: jsxRuntime.jsx("p", { className: sx(alertMessageStyle), "data-test": "acmi-calculation-error", children: calculationError }) })), jsxRuntime.jsxs("div", { className: sx(columnsStyle), children: [jsxRuntime.jsxs("section", { className: sx(panelStyle$7), "aria-label": "Quote configuration", children: [jsxRuntime.jsx("h3", { className: sx(panelTitleStyle$1), children: "Quote Configuration" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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 && (jsxRuntime.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" }))] }), jsxRuntime.jsxs("section", { className: sx(panelStyle$7), "aria-label": "Flight itinerary", children: [jsxRuntime.jsx("h3", { className: sx(panelTitleStyle$1), children: "Flight Itinerary" }), jsxRuntime.jsx(Alert, { variant: "primary", children: positioningMode === 'automatic' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["Enter ", jsxRuntime.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."] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["Enter ", jsxRuntime.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 && (jsxRuntime.jsx("p", { className: sx(legErrorStyle), role: "alert", "data-test": "acmi-legs-error", children: errors.legs })), jsxRuntime.jsx("ol", { className: sx(legsStyle$3), children: inputs.legs.map((leg, index) => (jsxRuntime.jsxs("li", { className: cx(sx(legStyle$2), positioningMode === 'automatic' && sx(automaticLegStyle)), "data-test": "acmi-leg", children: [jsxRuntime.jsxs("span", { className: sx(legIndexStyle$1), children: ["Leg ", index + 1] }), positioningMode === 'explicit' && (jsxRuntime.jsx(Select, { id: `${leg.id}-type`, size: "sm", label: "Leg type", options: [
|
|
10062
10062
|
{ value: 'live', label: 'Live' },
|
|
10063
10063
|
{ value: 'ferry', label: 'Ferry' },
|
|
10064
|
-
], value: leg.type ?? 'live', onChange: (event) => updateLeg(leg.id, { type: event.target.value }), "data-test": "acmi-leg-type" })), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) })] }, leg.id))) }), jsxRuntime.jsxs("div", { className: sx(actionsStyle$
|
|
10064
|
+
], value: leg.type ?? 'live', onChange: (event) => updateLeg(leg.id, { type: event.target.value }), "data-test": "acmi-leg-type" })), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) })] }, leg.id))) }), jsxRuntime.jsxs("div", { className: sx(actionsStyle$a), children: [jsxRuntime.jsx(Button, { variant: "outline", size: "sm", leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 16 }), onClick: addLeg, "data-test": "acmi-add-leg", children: "Add Flight Leg" }), jsxRuntime.jsx(Button, { size: "sm", loading: calculating, onClick: calculate, "data-test": "acmi-calculate", children: calculating ? 'Calculating' : 'Calculate Quote' }), result && onSubmitForApproval && (jsxRuntime.jsx(Button, { variant: "secondary", size: "sm", onClick: () => onSubmitForApproval(inputs), "data-test": "acmi-submit-approval", children: "Use This Total" }))] })] })] }), result && (jsxRuntime.jsxs("section", { className: sx(resultsStyle), "aria-label": "Quote summary", "data-test": "acmi-results", children: [jsxRuntime.jsx("h3", { className: sx(panelTitleStyle$1), children: "Quote Summary" }), jsxRuntime.jsxs("dl", { className: sx(resultGridStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Operating Subtotal" }), jsxRuntime.jsx("dd", { children: currency.format(result.operatingSubtotal) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Markup Applied" }), jsxRuntime.jsx("dd", { children: currency.format(result.markupAmount) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Insurance (Flat Fee)" }), jsxRuntime.jsx("dd", { children: currency.format(result.insuranceAmount) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Pre-Tax Total" }), jsxRuntime.jsx("dd", { children: currency.format(result.preTaxTotal) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Federal Excise Tax" }), jsxRuntime.jsx("dd", { children: currency.format(result.fet) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Segment Fees" }), jsxRuntime.jsx("dd", { children: currency.format(result.segmentFees) })] })] }), jsxRuntime.jsxs("p", { className: sx(finalPriceStyle), "data-test": "acmi-final-price", children: [jsxRuntime.jsx("span", { children: "Total Quoted Price" }), jsxRuntime.jsx("strong", { children: currency.format(result.finalPrice) })] }), result.pricingDetails && (jsxRuntime.jsxs("dl", { className: sx(contractFactsStyle), "data-test": "acmi-pricing-details", children: [jsxRuntime.jsxs("div", { "data-test": "acmi-ferry-floor", children: [jsxRuntime.jsx("dt", { children: "Ferry block time" }), jsxRuntime.jsxs("dd", { children: [result.pricingDetails.ferryBlockHours.toFixed(2), " h", result.pricingDetails.ferryMinimumHours
|
|
10065
10065
|
? ` · ${result.pricingDetails.ferryMinimumHours.toFixed(2)} h minimum per estimated SkyWest ferry leg`
|
|
10066
10066
|
: ''] })] }), jsxRuntime.jsxs("div", { "data-test": "acmi-fuel-buffer", children: [jsxRuntime.jsx("dt", { children: "Fuel buffer" }), jsxRuntime.jsxs("dd", { children: [(result.pricingDetails.fuelBufferPercent * 100).toFixed(0), "% \u00B7 ", currency.format(result.pricingDetails.fuelBufferAmount)] })] }), jsxRuntime.jsxs("div", { "data-test": "acmi-screening", children: [jsxRuntime.jsx("dt", { children: "Security screening" }), jsxRuntime.jsx("dd", { children: currency.format(result.pricingDetails.screeningAmount) })] })] })), result.legs && result.legs.length > 0 && (jsxRuntime.jsxs("div", { className: sx(pricedLegsStyle), "data-test": "acmi-priced-legs", children: [jsxRuntime.jsx("h4", { children: "Backend-priced itinerary" }), jsxRuntime.jsxs("div", { className: sx(pricedLegHeaderStyle), "aria-hidden": "true", children: [jsxRuntime.jsx("span", { children: "Leg" }), jsxRuntime.jsx("span", { children: "Type" }), jsxRuntime.jsx("span", { children: "Block" }), jsxRuntime.jsx("span", { children: "Total" })] }), result.legs.map((leg) => (jsxRuntime.jsxs("div", { className: sx(pricedLegStyle), "data-test": "acmi-priced-leg", children: [jsxRuntime.jsxs("span", { children: [leg.origin, " \u2192 ", leg.destination] }), jsxRuntime.jsx("span", { "data-test": "acmi-priced-leg-type", children: leg.type === 'ferry' ? 'Ferry' : 'Live' }), jsxRuntime.jsxs("span", { "data-test": "acmi-priced-leg-block", children: [leg.blockHours.toFixed(2), " h"] }), jsxRuntime.jsx("span", { children: currency.format(leg.total) })] }, leg.id)))] }))] }))] }));
|
|
10067
10067
|
};
|
|
@@ -10106,7 +10106,7 @@ const showHideAllStyle = {
|
|
|
10106
10106
|
opacity: 0.5,
|
|
10107
10107
|
},
|
|
10108
10108
|
};
|
|
10109
|
-
const filtersStyle$
|
|
10109
|
+
const filtersStyle$6 = {
|
|
10110
10110
|
label: 'AgentGroupTravelRequestsTable-filtersStyle',
|
|
10111
10111
|
display: 'flex',
|
|
10112
10112
|
flexWrap: 'wrap',
|
|
@@ -10223,7 +10223,7 @@ const iconButtonStyle$1 = {
|
|
|
10223
10223
|
cursor: 'pointer',
|
|
10224
10224
|
'&:hover': { background: 'var(--color-primary-light)' },
|
|
10225
10225
|
};
|
|
10226
|
-
const mutedStyle$
|
|
10226
|
+
const mutedStyle$3 = {
|
|
10227
10227
|
label: 'AgentGroupTravelRequestsTable-mutedStyle', color: 'var(--fg-4, var(--color-stone))'
|
|
10228
10228
|
};
|
|
10229
10229
|
const idLinkStyle = {
|
|
@@ -10336,7 +10336,7 @@ const subPnrPanelStyle = {
|
|
|
10336
10336
|
gap: 'var(--space-2)',
|
|
10337
10337
|
padding: 'var(--space-2) 0',
|
|
10338
10338
|
};
|
|
10339
|
-
const legendStyle$
|
|
10339
|
+
const legendStyle$4 = {
|
|
10340
10340
|
label: 'AgentGroupTravelRequestsTable-legendStyle',
|
|
10341
10341
|
margin: 0,
|
|
10342
10342
|
color: 'var(--fg-3, var(--color-slate))',
|
|
@@ -10463,12 +10463,12 @@ const AgentGroupTravelRequestsTable = ({ requests, sports = [], views = [], toda
|
|
|
10463
10463
|
setDateEdits((current) => ({ ...current, [id]: { ...current[id], submittedDate: value } }));
|
|
10464
10464
|
onSubmittedDateChange?.(id, value);
|
|
10465
10465
|
};
|
|
10466
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(wrapperStyle$2), className), "data-test": "agent-gtr-table", children: [jsxRuntime.jsxs("div", { className: sx(toolbarStyle$3), children: [jsxRuntime.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 ? jsxRuntime.jsx(ChevronUpIcon, { size: 16 }) : jsxRuntime.jsx(ChevronDownIcon$1, { size: 16 }), jsxRuntime.jsx("span", { children: allExpanded ? 'Collapse all PNRs' : 'Expand all PNRs' })] }), jsxRuntime.jsxs("div", { className: sx(filtersStyle$
|
|
10466
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(wrapperStyle$2), className), "data-test": "agent-gtr-table", children: [jsxRuntime.jsxs("div", { className: sx(toolbarStyle$3), children: [jsxRuntime.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 ? jsxRuntime.jsx(ChevronUpIcon, { size: 16 }) : jsxRuntime.jsx(ChevronDownIcon$1, { size: 16 }), jsxRuntime.jsx("span", { children: allExpanded ? 'Collapse all PNRs' : 'Expand all PNRs' })] }), jsxRuntime.jsxs("div", { className: sx(filtersStyle$6), children: [jsxRuntime.jsxs("label", { className: sx(filterFieldStyle$1), children: [jsxRuntime.jsx("span", { children: "Filter by sport" }), jsxRuntime.jsxs("select", { value: sportFilter, onChange: (event) => setSportFilter(event.target.value), "data-test": "agent-gtr-sport-filter", children: [jsxRuntime.jsx("option", { value: "", children: "All Sports" }), sports.map((sport) => (jsxRuntime.jsx("option", { value: sport.code, children: sport.label }, sport.code)))] })] }), views.length > 0 && (jsxRuntime.jsxs("label", { className: sx(filterFieldStyle$1), children: [jsxRuntime.jsx("span", { children: "Filter by view" }), jsxRuntime.jsxs("select", { value: viewFilter, onChange: (event) => setViewFilter(event.target.value), "data-test": "agent-gtr-view-filter", children: [jsxRuntime.jsx("option", { value: "", children: "All Accounts" }), views.map((view) => (jsxRuntime.jsx("option", { value: view.id, children: view.label }, view.id)))] })] }))] })] }), jsxRuntime.jsx("div", { className: sx(tableScrollStyle$2), children: jsxRuntime.jsxs("table", { className: sx(tableStyle$b), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { className: sx(colExpandStyle), children: jsxRuntime.jsx("span", { className: "sr-only", children: "Expand" }) }), jsxRuntime.jsx("th", { children: "Source" }), jsxRuntime.jsx("th", { children: "Master Trip" }), jsxRuntime.jsx("th", { children: "ID" }), jsxRuntime.jsx("th", { children: "Start Date" }), jsxRuntime.jsx("th", { children: "Name" }), jsxRuntime.jsx("th", { children: "Sport" }), jsxRuntime.jsxs("th", { children: [jsxRuntime.jsx(PlaneIcon$3, { size: 16 }), jsxRuntime.jsx("span", { className: "sr-only", children: "Carrier" })] }), jsxRuntime.jsx("th", { children: "Routing" }), jsxRuntime.jsx("th", { children: "Submitted" }), jsxRuntime.jsx("th", { children: "Type" }), jsxRuntime.jsx("th", { children: "Quote Sent" }), jsxRuntime.jsx("th", { children: "Confirmation" }), jsxRuntime.jsx("th", { children: "Deposit" }), jsxRuntime.jsx("th", { children: "Utilization" }), jsxRuntime.jsx("th", { children: "Names" }), jsxRuntime.jsx("th", { children: "Ticketing" }), jsxRuntime.jsx("th", { children: "PNR" }), jsxRuntime.jsx("th", { className: sx(colDeleteStyle), children: jsxRuntime.jsx("span", { className: "sr-only", children: "Delete" }) })] }) }), jsxRuntime.jsxs("tbody", { children: [!groups.length && (jsxRuntime.jsx("tr", { children: jsxRuntime.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) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx("tr", { className: sx(accountRowStyle), children: jsxRuntime.jsx("td", { colSpan: COLUMN_COUNT, children: group.accountName }) }), group.items.map((request) => {
|
|
10467
10467
|
const isMulti = request.pnrs.length > 1;
|
|
10468
10468
|
const isExpanded = expandedIds.has(request.id);
|
|
10469
10469
|
const startSoon = daysUntil(request.startDate, today) < 8;
|
|
10470
|
-
return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("tr", { className: sx(requestRowStyle), "data-test": "agent-gtr-row", children: [jsxRuntime.jsx("td", { className: sx(colExpandStyle), children: isMulti && (jsxRuntime.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 ? jsxRuntime.jsx(ChevronDownIcon$1, { size: 16 }) : jsxRuntime.jsx(ChevronRightIcon$1, { size: 16 }) })) }), jsxRuntime.jsx("td", { children: request.source === 'client' ? 'C' : 'A' }), jsxRuntime.jsx("td", { children: request.masterTripId ? (jsxRuntime.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: jsxRuntime.jsx(SearchIcon$1, { size: 16 }) })) : (jsxRuntime.jsx("span", { className: sx(mutedStyle$
|
|
10471
|
-
})] }, `account-${group.accountName}`)))] })] }) }), jsxRuntime.jsx("p", { className: sx(legendStyle$
|
|
10470
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("tr", { className: sx(requestRowStyle), "data-test": "agent-gtr-row", children: [jsxRuntime.jsx("td", { className: sx(colExpandStyle), children: isMulti && (jsxRuntime.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 ? jsxRuntime.jsx(ChevronDownIcon$1, { size: 16 }) : jsxRuntime.jsx(ChevronRightIcon$1, { size: 16 }) })) }), jsxRuntime.jsx("td", { children: request.source === 'client' ? 'C' : 'A' }), jsxRuntime.jsx("td", { children: request.masterTripId ? (jsxRuntime.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: jsxRuntime.jsx(SearchIcon$1, { size: 16 }) })) : (jsxRuntime.jsx("span", { className: sx(mutedStyle$3), children: "\u2014" })) }), jsxRuntime.jsx("td", { children: jsxRuntime.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 }) }), jsxRuntime.jsx("td", { className: cx(startSoon && sx(startSoonStyle)), children: formatShortDate$1(request.startDate) }), jsxRuntime.jsx("td", { children: truncate(request.name) }), jsxRuntime.jsx("td", { children: truncate(request.sport) }), jsxRuntime.jsx("td", { children: isMulti ? 'Multi' : request.carrier || '' }), jsxRuntime.jsx("td", { children: isMulti ? 'Multi' : request.routing }), jsxRuntime.jsx("td", { className: sx(colDateStyle), children: jsxRuntime.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" }) }), jsxRuntime.jsx("td", { children: computeTravelTypeCodes(request).join(', ') }), jsxRuntime.jsx("td", { className: sx(colDateStyle), children: jsxRuntime.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 }) => (jsxRuntime.jsx("td", { children: jsxRuntime.jsx(DueStatusCell, { status: request[field], today: today, onToggle: onToggleDueStatus ? () => onToggleDueStatus(request.id, field) : undefined }) }, field))), jsxRuntime.jsx("td", { children: isMulti ? (jsxRuntime.jsx(PnrButton, { label: "Multi", tone: groupPnrTone(request.pnrs), onClick: () => toggleExpanded(request.id), dataTest: "agent-gtr-pnr-multi" })) : (jsxRuntime.jsx(PnrButton, { label: request.pnrs[0].recordLocator.toUpperCase(), tone: pnrTone(request.pnrs[0]), onClick: () => handleCopyPnr(request.pnrs[0].recordLocator), dataTest: "agent-gtr-pnr" })) }), jsxRuntime.jsx("td", { className: sx(colDeleteStyle), children: !isMulti && onDeleteRequest && (jsxRuntime.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: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) })) })] }), isMulti && isExpanded && (jsxRuntime.jsx("tr", { className: sx(subPnrRowStyle), children: jsxRuntime.jsx("td", { colSpan: COLUMN_COUNT, children: jsxRuntime.jsx("div", { className: sx(subPnrPanelStyle), "data-test": "agent-gtr-sub-pnrs", children: request.pnrs.map((pnr) => (jsxRuntime.jsx(PnrButton, { label: pnr.recordLocator.toUpperCase(), tone: pnrTone(pnr), onClick: () => handleCopyPnr(pnr.recordLocator), dataTest: "agent-gtr-sub-pnr" }, pnr.id))) }) }) }))] }, request.id));
|
|
10471
|
+
})] }, `account-${group.accountName}`)))] })] }) }), jsxRuntime.jsx("p", { className: sx(legendStyle$4), children: "Types: A - Airline C - Car, H - Hotel" })] }));
|
|
10472
10472
|
};
|
|
10473
10473
|
|
|
10474
10474
|
/**
|
|
@@ -10502,7 +10502,7 @@ const tableStyle$a = {
|
|
|
10502
10502
|
};
|
|
10503
10503
|
/* Header — navy brand ground with the side rail's foreground ink, matching the
|
|
10504
10504
|
widget card headers. */
|
|
10505
|
-
const headerStyle$
|
|
10505
|
+
const headerStyle$G = {
|
|
10506
10506
|
label: 'Table-headerStyle',
|
|
10507
10507
|
backgroundColor: 'var(--color-primary, #19345f)',
|
|
10508
10508
|
borderBottom: '1px solid var(--nav-rail-border, rgb(255 255 255 / 8%))',
|
|
@@ -10539,11 +10539,11 @@ const sortableStyle$1 = {
|
|
|
10539
10539
|
[`&:hover .${sx(sortIconStyle$2)}`]: { opacity: 1 },
|
|
10540
10540
|
};
|
|
10541
10541
|
/* Body */
|
|
10542
|
-
const bodyStyle$
|
|
10542
|
+
const bodyStyle$b = {
|
|
10543
10543
|
label: 'Table-bodyStyle',
|
|
10544
10544
|
backgroundColor: 'white',
|
|
10545
10545
|
};
|
|
10546
|
-
const rowStyle$
|
|
10546
|
+
const rowStyle$7 = {
|
|
10547
10547
|
label: 'Table-rowStyle',
|
|
10548
10548
|
borderBottom: '1px solid var(--color-neutral-100)',
|
|
10549
10549
|
'&:last-child': { borderBottom: 'none' },
|
|
@@ -10605,23 +10605,23 @@ const stripedStyle = {
|
|
|
10605
10605
|
* object they are emitted in this order every time rather than depending on
|
|
10606
10606
|
* which style was injected first.
|
|
10607
10607
|
*/
|
|
10608
|
-
[`& .${sx(rowStyle$
|
|
10608
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}`]: {
|
|
10609
10609
|
backgroundColor: 'var(--color-primary-light)',
|
|
10610
10610
|
},
|
|
10611
|
-
[`& .${sx(rowStyle$
|
|
10611
|
+
[`& .${sx(rowStyle$7)}:nth-child(even)`]: {
|
|
10612
10612
|
backgroundColor: 'var(--color-neutral-50)',
|
|
10613
10613
|
},
|
|
10614
10614
|
};
|
|
10615
10615
|
const hoverableStyle = {
|
|
10616
10616
|
label: 'Table-hoverableStyle',
|
|
10617
|
-
[`& .${sx(rowStyle$
|
|
10617
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}`]: {
|
|
10618
10618
|
backgroundColor: 'var(--color-primary-light)',
|
|
10619
10619
|
},
|
|
10620
|
-
[`& .${sx(rowStyle$
|
|
10620
|
+
[`& .${sx(rowStyle$7)}:hover`]: {
|
|
10621
10621
|
backgroundColor: 'var(--color-neutral-50)',
|
|
10622
10622
|
},
|
|
10623
10623
|
/* Outweighs both of the above, exactly as `.hoverable .row.selected:hover` did. */
|
|
10624
|
-
[`& .${sx(rowStyle$
|
|
10624
|
+
[`& .${sx(rowStyle$7)}.${sx(selectedRowStyle)}:hover`]: {
|
|
10625
10625
|
backgroundColor: 'var(--color-primary-light-hover)',
|
|
10626
10626
|
},
|
|
10627
10627
|
};
|
|
@@ -10743,11 +10743,11 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
10743
10743
|
commitSelection(Array.from(merged));
|
|
10744
10744
|
};
|
|
10745
10745
|
const messageColSpan = columns.length + (selectable ? 1 : 0);
|
|
10746
|
-
return (jsxRuntime.jsx("div", { className: cx(sx(wrapperStyle$1), className), children: jsxRuntime.jsxs("table", { className: cx(sx(tableStyle$a), bordered && sx(borderedStyle$1), striped && sx(stripedStyle), hoverable && sx(hoverableStyle), compact && sx(compactStyle$1)), children: [jsxRuntime.jsx("thead", { className: sx(headerStyle$
|
|
10746
|
+
return (jsxRuntime.jsx("div", { className: cx(sx(wrapperStyle$1), className), children: jsxRuntime.jsxs("table", { className: cx(sx(tableStyle$a), bordered && sx(borderedStyle$1), striped && sx(stripedStyle), hoverable && sx(hoverableStyle), compact && sx(compactStyle$1)), children: [jsxRuntime.jsx("thead", { className: sx(headerStyle$G), children: jsxRuntime.jsxs("tr", { children: [selectable && (jsxRuntime.jsx("th", { scope: "col", className: cx(sx(headerCellStyle), sx(selectCellStyle$1)), children: jsxRuntime.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) => (jsxRuntime.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: jsxRuntime.jsxs("span", { className: sx(headerContentStyle$2), children: [column.label, column.sortable && (jsxRuntime.jsx("span", { className: sx(sortIconStyle$2), children: sortColumn === column.key ? (sortDirection === 'asc' ? '↑' : '↓') : ('↕') }))] }) }, column.key)))] }) }), jsxRuntime.jsx("tbody", { className: sx(bodyStyle$b), children: loading ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: messageColSpan, className: sx(loadingStyle$5), children: "Loading..." }) })) : sortedData.length === 0 ? (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: messageColSpan, className: sx(emptyStyle$h), children: emptyContent ?? emptyMessage }) })) : (sortedData.map((row, rowIndex) => {
|
|
10747
10747
|
const key = getRowKey(row, rowIndex);
|
|
10748
10748
|
const rowSelectable = isRowSelectable ? isRowSelectable(row, rowIndex) : true;
|
|
10749
10749
|
const isSelected = selectable && selectionSet.has(key);
|
|
10750
|
-
return (jsxRuntime.jsxs("tr", { className: cx(sx(rowStyle$
|
|
10750
|
+
return (jsxRuntime.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 && (jsxRuntime.jsx("td", { className: cx(sx(cellStyle$3), sx(selectCellStyle$1)), onClick: (event) => event.stopPropagation(), children: jsxRuntime.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) => (jsxRuntime.jsx("td", { className: cx(sx(cellStyle$3), sx(alignStyles[column.align || 'left'])), children: column.render
|
|
10751
10751
|
? column.render(row[column.key], row, rowIndex)
|
|
10752
10752
|
: row[column.key] }, column.key)))] }, key));
|
|
10753
10753
|
})) }), footer && jsxRuntime.jsx("tfoot", { children: footer })] }) }));
|
|
@@ -10759,7 +10759,7 @@ const Table = ({ columns, data, rowKey = 'id', bordered = false, striped = false
|
|
|
10759
10759
|
* A bordered card: a header band with the title and Version control, then the
|
|
10760
10760
|
* invoice table with its total row and legend.
|
|
10761
10761
|
*/
|
|
10762
|
-
const cardStyle$
|
|
10762
|
+
const cardStyle$g = {
|
|
10763
10763
|
label: 'AirInvoiceCard-cardStyle',
|
|
10764
10764
|
overflow: 'hidden',
|
|
10765
10765
|
backgroundColor: 'var(--bg-surface, #fff)',
|
|
@@ -10772,7 +10772,7 @@ const cardStyle$f = {
|
|
|
10772
10772
|
lineHeight: '22px',
|
|
10773
10773
|
};
|
|
10774
10774
|
/* ---------- Card header ---------- */
|
|
10775
|
-
const headerStyle$
|
|
10775
|
+
const headerStyle$F = {
|
|
10776
10776
|
label: 'AirInvoiceCard-headerStyle',
|
|
10777
10777
|
boxSizing: 'border-box',
|
|
10778
10778
|
/* Fixed to the height of the Version control's row so the two cards' headers match. */
|
|
@@ -10903,7 +10903,7 @@ const totalCellStyle$1 = {
|
|
|
10903
10903
|
gap: '4px 24px',
|
|
10904
10904
|
};
|
|
10905
10905
|
/* The legend reads as a footnote: regular weight, small, muted — even inside the bold total row. */
|
|
10906
|
-
const legendStyle$
|
|
10906
|
+
const legendStyle$3 = {
|
|
10907
10907
|
label: 'AirInvoiceCard-legendStyle',
|
|
10908
10908
|
display: 'inline-flex',
|
|
10909
10909
|
alignItems: 'center',
|
|
@@ -10939,10 +10939,10 @@ const versionControlShown = (versions) => versions.length > 1;
|
|
|
10939
10939
|
*/
|
|
10940
10940
|
const AirInvoiceCard = ({ title, lines, paymentStatus, total, versions = [], selectedVersionId, onVersionChange, className = '', }) => {
|
|
10941
10941
|
const showLegend = lines.some((line) => line.knownTraveler);
|
|
10942
|
-
const legend = (jsxRuntime.jsxs("span", { className: sx(legendStyle$
|
|
10942
|
+
const legend = (jsxRuntime.jsxs("span", { className: sx(legendStyle$3), "data-test": "air-invoice-legend", children: [jsxRuntime.jsx("span", { className: sx(knownTravelerStyle), children: jsxRuntime.jsx(CheckIcon$1, { size: 16 }) }), "= Known Traveler Number Loaded"] }));
|
|
10943
10943
|
const hasHeader = Boolean(title || versionControlShown(versions));
|
|
10944
10944
|
const versionControl = versionControlShown(versions) && (jsxRuntime.jsx(Dropdown, { label: "Version", alignment: "right", trigger: ({ isOpen, toggle }) => (jsxRuntime.jsxs("button", { type: "button", className: sx(versionButtonStyle), onClick: toggle, "aria-expanded": isOpen, "aria-haspopup": "menu", "data-test": "air-invoice-version", children: [jsxRuntime.jsx(LayersIcon, {}), "Version", jsxRuntime.jsx("span", { className: sx(versionCountStyle), children: versions.length }), jsxRuntime.jsx(ChevronDownIcon$1, { size: 16 })] })), children: versions.map((version) => (jsxRuntime.jsx(Dropdown.Item, { icon: version.id === selectedVersionId ? jsxRuntime.jsx(CheckIcon$1, { size: 14 }) : undefined, onClick: () => onVersionChange?.(version.id), children: version.label }, version.id))) }));
|
|
10945
|
-
return (jsxRuntime.jsxs("section", { className: cx(sx(cardStyle$
|
|
10945
|
+
return (jsxRuntime.jsxs("section", { className: cx(sx(cardStyle$g), className), "aria-label": "Air invoice", "data-test": "air-invoice-card", children: [hasHeader && (jsxRuntime.jsxs("div", { className: sx(headerStyle$F), children: [title && jsxRuntime.jsx("h2", { className: sx(titleStyle$A), children: title }), jsxRuntime.jsx("div", { className: sx(headerEndStyle), children: versionControl })] })), jsxRuntime.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 && (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { colSpan: 6, children: jsxRuntime.jsxs("span", { className: sx(totalCellStyle$1), children: ["Total", showLegend && legend] }) }), jsxRuntime.jsx("td", { className: sx(upperStyle), children: paymentStatus }), jsxRuntime.jsx("td", { "data-test": "air-invoice-total", children: total })] })) }), showLegend && !total && (jsxRuntime.jsx("p", { className: sx(legendBlockStyle), children: legend }))] }));
|
|
10946
10946
|
};
|
|
10947
10947
|
AirInvoiceCard.displayName = 'AirInvoiceCard';
|
|
10948
10948
|
|
|
@@ -11093,7 +11093,7 @@ const labelStyle$5 = {
|
|
|
11093
11093
|
textOverflow: 'ellipsis',
|
|
11094
11094
|
};
|
|
11095
11095
|
/* Footer */
|
|
11096
|
-
const footerStyle$
|
|
11096
|
+
const footerStyle$e = {
|
|
11097
11097
|
label: 'Sidenav-footerStyle',
|
|
11098
11098
|
padding: 'var(--space-5) var(--space-6)',
|
|
11099
11099
|
marginTop: 'auto',
|
|
@@ -11124,7 +11124,7 @@ const collapsedStyle$1 = {
|
|
|
11124
11124
|
padding: 0,
|
|
11125
11125
|
justifyContent: 'center',
|
|
11126
11126
|
},
|
|
11127
|
-
[`& .${sx(footerStyle$
|
|
11127
|
+
[`& .${sx(footerStyle$e)}`]: {
|
|
11128
11128
|
padding: 'var(--space-5) var(--space-4)',
|
|
11129
11129
|
display: 'flex',
|
|
11130
11130
|
justifyContent: 'center',
|
|
@@ -11150,7 +11150,7 @@ const Sidenav = ({ logo, logoCollapsed, items, activeKey, onItemClick, defaultEx
|
|
|
11150
11150
|
const isActive = item.key === activeKey;
|
|
11151
11151
|
const itemClasses = cx(sx(navItemStyle$1), isActive && sx(activeNavItemStyle));
|
|
11152
11152
|
return (jsxRuntime.jsxs("button", { className: itemClasses, onClick: () => handleItemClick(item), "aria-current": isActive ? 'page' : undefined, title: !expanded ? item.label : undefined, children: [jsxRuntime.jsx("span", { className: sx(iconStyle$3), children: item.icon }), expanded && jsxRuntime.jsx("span", { className: sx(labelStyle$5), children: item.label })] }, item.key));
|
|
11153
|
-
}) }), footer && jsxRuntime.jsx("div", { className: sx(footerStyle$
|
|
11153
|
+
}) }), footer && jsxRuntime.jsx("div", { className: sx(footerStyle$e), children: footer })] }));
|
|
11154
11154
|
};
|
|
11155
11155
|
Sidenav.displayName = 'Sidenav';
|
|
11156
11156
|
|
|
@@ -11395,7 +11395,7 @@ const noResultsStyle = {
|
|
|
11395
11395
|
fontSize: 14,
|
|
11396
11396
|
};
|
|
11397
11397
|
/* Actions */
|
|
11398
|
-
const actionsStyle$
|
|
11398
|
+
const actionsStyle$9 = {
|
|
11399
11399
|
label: 'Topbar-actionsStyle',
|
|
11400
11400
|
display: 'flex',
|
|
11401
11401
|
gap: 'var(--space-2, 8px)',
|
|
@@ -11460,7 +11460,7 @@ const Topbar = ({ account, accounts, onAccountSelect, onAccountClick, actions, l
|
|
|
11460
11460
|
const filteredAccounts = accounts?.filter(acc => acc.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
11461
11461
|
acc.code.toLowerCase().includes(searchQuery.toLowerCase())) || [];
|
|
11462
11462
|
const hasDropdown = accounts && accounts.length > 0;
|
|
11463
|
-
return (jsxRuntime.jsxs("header", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: sx(leftStyle), children: [leftContent, account && (jsxRuntime.jsxs("div", { className: sx(accountWrapperStyle), ref: dropdownRef, children: [jsxRuntime.jsxs("button", { className: cx(sx(accountSelectorStyle), isOpen && sx(openStyle$1)), onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsxRuntime.jsx("span", { className: sx(accountCodeStyle), children: account.code }), jsxRuntime.jsx("span", { className: sx(accountNameStyle), children: account.name }), hasDropdown && (jsxRuntime.jsx(ChevronDownIcon$1, { size: 16, className: cx(sx(chevronStyle$2), isOpen && sx(chevronOpenStyle)) }))] }), isOpen && hasDropdown && (jsxRuntime.jsxs("div", { className: sx(dropdownStyle), role: "listbox", children: [jsxRuntime.jsxs("div", { className: sx(dropdownSearchStyle), children: [jsxRuntime.jsxs("svg", { className: sx(searchIconStyle$1), width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "8" }), jsxRuntime.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })] }), jsxRuntime.jsx("input", { ref: searchInputRef, type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search accounts...", className: sx(searchInputStyle$1) })] }), jsxRuntime.jsx("div", { className: sx(dropdownListStyle), children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxRuntime.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: [jsxRuntime.jsx("span", { className: sx(dropdownItemCodeStyle), children: acc.code }), jsxRuntime.jsx("span", { className: sx(dropdownItemNameStyle), children: acc.name })] }, acc.code)))) : (jsxRuntime.jsx("div", { className: sx(noResultsStyle), children: "No accounts found" })) })] }))] }))] }), actions && jsxRuntime.jsx("div", { className: sx(actionsStyle$
|
|
11463
|
+
return (jsxRuntime.jsxs("header", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: sx(leftStyle), children: [leftContent, account && (jsxRuntime.jsxs("div", { className: sx(accountWrapperStyle), ref: dropdownRef, children: [jsxRuntime.jsxs("button", { className: cx(sx(accountSelectorStyle), isOpen && sx(openStyle$1)), onClick: handleToggle, "aria-expanded": isOpen, "aria-haspopup": hasDropdown ? 'listbox' : undefined, children: [jsxRuntime.jsx("span", { className: sx(accountCodeStyle), children: account.code }), jsxRuntime.jsx("span", { className: sx(accountNameStyle), children: account.name }), hasDropdown && (jsxRuntime.jsx(ChevronDownIcon$1, { size: 16, className: cx(sx(chevronStyle$2), isOpen && sx(chevronOpenStyle)) }))] }), isOpen && hasDropdown && (jsxRuntime.jsxs("div", { className: sx(dropdownStyle), role: "listbox", children: [jsxRuntime.jsxs("div", { className: sx(dropdownSearchStyle), children: [jsxRuntime.jsxs("svg", { className: sx(searchIconStyle$1), width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "8" }), jsxRuntime.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })] }), jsxRuntime.jsx("input", { ref: searchInputRef, type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: "Search accounts...", className: sx(searchInputStyle$1) })] }), jsxRuntime.jsx("div", { className: sx(dropdownListStyle), children: filteredAccounts.length > 0 ? (filteredAccounts.map((acc) => (jsxRuntime.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: [jsxRuntime.jsx("span", { className: sx(dropdownItemCodeStyle), children: acc.code }), jsxRuntime.jsx("span", { className: sx(dropdownItemNameStyle), children: acc.name })] }, acc.code)))) : (jsxRuntime.jsx("div", { className: sx(noResultsStyle), children: "No accounts found" })) })] }))] }))] }), actions && jsxRuntime.jsx("div", { className: sx(actionsStyle$9), children: actions })] }));
|
|
11464
11464
|
};
|
|
11465
11465
|
Topbar.displayName = 'Topbar';
|
|
11466
11466
|
|
|
@@ -11513,7 +11513,7 @@ const AppLayout = ({ navItems = [], activeNavKey, logo, collapsedLogo, account,
|
|
|
11513
11513
|
* Shares the AirInvoiceCard's shell — bordered card, header band with a small
|
|
11514
11514
|
* uppercase title — so the two read as a set when stacked on a page.
|
|
11515
11515
|
*/
|
|
11516
|
-
const cardStyle$
|
|
11516
|
+
const cardStyle$f = {
|
|
11517
11517
|
label: 'BookingDetailsCard-cardStyle',
|
|
11518
11518
|
overflow: 'hidden',
|
|
11519
11519
|
backgroundColor: 'var(--bg-surface, #fff)',
|
|
@@ -11525,7 +11525,7 @@ const cardStyle$e = {
|
|
|
11525
11525
|
fontSize: 15,
|
|
11526
11526
|
lineHeight: '22px',
|
|
11527
11527
|
};
|
|
11528
|
-
const headerStyle$
|
|
11528
|
+
const headerStyle$E = {
|
|
11529
11529
|
label: 'BookingDetailsCard-headerStyle',
|
|
11530
11530
|
boxSizing: 'border-box',
|
|
11531
11531
|
/* Fixed to the height of the Version control's row so the two cards' headers match. */
|
|
@@ -11576,7 +11576,7 @@ const detailsStyle$2 = {
|
|
|
11576
11576
|
},
|
|
11577
11577
|
};
|
|
11578
11578
|
/* A further section under the details, set off by a thin rule. */
|
|
11579
|
-
const sectionStyle$
|
|
11579
|
+
const sectionStyle$9 = {
|
|
11580
11580
|
label: 'BookingDetailsCard-sectionStyle',
|
|
11581
11581
|
padding: '16px 24px 20px',
|
|
11582
11582
|
};
|
|
@@ -11614,12 +11614,12 @@ const BookingDetailsCard = ({ details, title = 'Booking Details', refId, childre
|
|
|
11614
11614
|
if (details.length === 0 && !children)
|
|
11615
11615
|
return null;
|
|
11616
11616
|
const rows = Math.ceil(details.length / 2);
|
|
11617
|
-
return (jsxRuntime.jsxs("section", { className: cx(sx(cardStyle$
|
|
11617
|
+
return (jsxRuntime.jsxs("section", { className: cx(sx(cardStyle$f), className), "aria-label": "Booking details", "data-test": "booking-details-card", children: [jsxRuntime.jsxs("div", { className: sx(headerStyle$E), children: [jsxRuntime.jsx("h2", { className: sx(titleStyle$z), children: title }), refId && (jsxRuntime.jsxs("p", { className: sx(refStyle), "data-test": "booking-details-ref", children: ["Short\u2019s ID: ", jsxRuntime.jsx("span", { className: sx(refValueStyle), children: refId })] }))] }), details.length > 0 && (jsxRuntime.jsx("dl", { className: sx(detailsStyle$2), style: { gridTemplateRows: `repeat(${rows}, auto)` }, children: details.map((detail) => (jsxRuntime.jsxs("div", { className: sx(detailStyle$2), children: [jsxRuntime.jsx("dt", { className: sx(detailLabelStyle$1), children: detail.label }), jsxRuntime.jsx("dd", { className: sx(detailValueStyle$1), children: detail.value })] }, detail.label))) })), children && jsxRuntime.jsx("div", { className: cx(sx(sectionStyle$9), details.length > 0 && sx(sectionRuleStyle)), "data-test": "booking-details-section", children: children })] }));
|
|
11618
11618
|
};
|
|
11619
11619
|
BookingDetailsCard.displayName = 'BookingDetailsCard';
|
|
11620
11620
|
|
|
11621
11621
|
/* Card Component Styles */
|
|
11622
|
-
const cardStyle$
|
|
11622
|
+
const cardStyle$e = {
|
|
11623
11623
|
label: 'Card-cardStyle',
|
|
11624
11624
|
background: 'var(--bg-surface)',
|
|
11625
11625
|
borderRadius: 'var(--radius-2xl)',
|
|
@@ -11667,7 +11667,7 @@ const paddingStyles = {
|
|
|
11667
11667
|
},
|
|
11668
11668
|
};
|
|
11669
11669
|
/* Card Header */
|
|
11670
|
-
const headerStyle$
|
|
11670
|
+
const headerStyle$D = {
|
|
11671
11671
|
label: 'Card-headerStyle',
|
|
11672
11672
|
display: 'flex',
|
|
11673
11673
|
alignItems: 'flex-start',
|
|
@@ -11695,19 +11695,19 @@ const subtitleStyle$7 = {
|
|
|
11695
11695
|
fontSize: 'var(--fs-sm)',
|
|
11696
11696
|
color: 'var(--fg-3)',
|
|
11697
11697
|
};
|
|
11698
|
-
const actionsStyle$
|
|
11698
|
+
const actionsStyle$8 = {
|
|
11699
11699
|
label: 'Card-actionsStyle',
|
|
11700
11700
|
display: 'flex',
|
|
11701
11701
|
gap: 'var(--space-2)',
|
|
11702
11702
|
flexShrink: 0,
|
|
11703
11703
|
};
|
|
11704
11704
|
/* Card Body */
|
|
11705
|
-
const bodyStyle$
|
|
11705
|
+
const bodyStyle$a = {
|
|
11706
11706
|
label: 'Card-bodyStyle',
|
|
11707
11707
|
padding: 'var(--space-4)',
|
|
11708
11708
|
};
|
|
11709
11709
|
/* Card Footer */
|
|
11710
|
-
const footerStyle$
|
|
11710
|
+
const footerStyle$d = {
|
|
11711
11711
|
label: 'Card-footerStyle',
|
|
11712
11712
|
display: 'flex',
|
|
11713
11713
|
alignItems: 'center',
|
|
@@ -11730,7 +11730,7 @@ const footerStyle$b = {
|
|
|
11730
11730
|
* Card component for grouping related content.
|
|
11731
11731
|
*/
|
|
11732
11732
|
const Card = React.forwardRef(({ variant = 'default', padding = 'md', interactive = false, className = '', children, ...props }, ref) => {
|
|
11733
|
-
const classNames = cx(sx(cardStyle$
|
|
11733
|
+
const classNames = cx(sx(cardStyle$e), sx(variantStyles[variant]), sx(paddingStyles[padding]), interactive && sx(interactiveStyle), className);
|
|
11734
11734
|
return (jsxRuntime.jsx("div", { ref: ref, className: classNames, ...props, children: children }));
|
|
11735
11735
|
});
|
|
11736
11736
|
Card.displayName = 'Card';
|
|
@@ -11738,15 +11738,15 @@ Card.displayName = 'Card';
|
|
|
11738
11738
|
* Top of a Card: title, subtitle, and any header actions.
|
|
11739
11739
|
*/
|
|
11740
11740
|
const CardHeader = ({ title, subtitle, actions, className = '', children, ...props }) => {
|
|
11741
|
-
const classNames = cx(sx(headerStyle$
|
|
11742
|
-
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: sx(headerContentStyle$1), children: [title && jsxRuntime.jsx("h3", { className: sx(titleStyle$y), children: title }), subtitle && jsxRuntime.jsx("p", { className: sx(subtitleStyle$7), children: subtitle }), children] }), actions && jsxRuntime.jsx("div", { className: sx(actionsStyle$
|
|
11741
|
+
const classNames = cx(sx(headerStyle$D), className);
|
|
11742
|
+
return (jsxRuntime.jsxs("div", { className: classNames, ...props, children: [jsxRuntime.jsxs("div", { className: sx(headerContentStyle$1), children: [title && jsxRuntime.jsx("h3", { className: sx(titleStyle$y), children: title }), subtitle && jsxRuntime.jsx("p", { className: sx(subtitleStyle$7), children: subtitle }), children] }), actions && jsxRuntime.jsx("div", { className: sx(actionsStyle$8), children: actions })] }));
|
|
11743
11743
|
};
|
|
11744
11744
|
CardHeader.displayName = 'CardHeader';
|
|
11745
11745
|
/**
|
|
11746
11746
|
* Main content region of a Card, carrying the card padding.
|
|
11747
11747
|
*/
|
|
11748
11748
|
const CardBody = ({ className = '', children, ...props }) => {
|
|
11749
|
-
const classNames = cx(sx(bodyStyle$
|
|
11749
|
+
const classNames = cx(sx(bodyStyle$a), className);
|
|
11750
11750
|
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: children }));
|
|
11751
11751
|
};
|
|
11752
11752
|
CardBody.displayName = 'CardBody';
|
|
@@ -11754,7 +11754,7 @@ CardBody.displayName = 'CardBody';
|
|
|
11754
11754
|
* Bottom of a Card, for actions and summary detail.
|
|
11755
11755
|
*/
|
|
11756
11756
|
const CardFooter = ({ className = '', children, ...props }) => {
|
|
11757
|
-
const classNames = cx(sx(footerStyle$
|
|
11757
|
+
const classNames = cx(sx(footerStyle$d), className);
|
|
11758
11758
|
return (jsxRuntime.jsx("div", { className: classNames, ...props, children: children }));
|
|
11759
11759
|
};
|
|
11760
11760
|
CardFooter.displayName = 'CardFooter';
|
|
@@ -12442,7 +12442,7 @@ const alertStyle$4 = {
|
|
|
12442
12442
|
label: 'ContactList-alertStyle', width: '100%'
|
|
12443
12443
|
};
|
|
12444
12444
|
/* Card */
|
|
12445
|
-
const cardStyle$
|
|
12445
|
+
const cardStyle$d = {
|
|
12446
12446
|
label: 'ContactList-cardStyle',
|
|
12447
12447
|
backgroundColor: 'var(--color-white)',
|
|
12448
12448
|
border: '1px solid var(--color-gray-200)',
|
|
@@ -12450,7 +12450,7 @@ const cardStyle$c = {
|
|
|
12450
12450
|
overflow: 'hidden',
|
|
12451
12451
|
};
|
|
12452
12452
|
/* Header */
|
|
12453
|
-
const headerStyle$
|
|
12453
|
+
const headerStyle$C = {
|
|
12454
12454
|
label: 'ContactList-headerStyle',
|
|
12455
12455
|
padding: 'var(--space-4)',
|
|
12456
12456
|
borderBottom: '1px solid var(--color-gray-100)',
|
|
@@ -12611,7 +12611,7 @@ const emptyStyle$f = {
|
|
|
12611
12611
|
fontSize: 'var(--text-sm)',
|
|
12612
12612
|
};
|
|
12613
12613
|
/* Footer */
|
|
12614
|
-
const footerStyle$
|
|
12614
|
+
const footerStyle$c = {
|
|
12615
12615
|
label: 'ContactList-footerStyle',
|
|
12616
12616
|
padding: 'var(--space-3) var(--space-4)',
|
|
12617
12617
|
borderTop: '1px solid var(--color-gray-100)',
|
|
@@ -12647,7 +12647,7 @@ const PlusIcon$1 = () => (jsxRuntime.jsxs("svg", { width: "16", height: "16", vi
|
|
|
12647
12647
|
*/
|
|
12648
12648
|
const ContactList = ({ title = 'Contacts', tooltip, contacts, onEdit, onRemove, onAdd, showAdd = true, addLabel = 'Add Contact', alert, className = '', }) => {
|
|
12649
12649
|
const listClasses = cx(sx(containerStyle$3), className);
|
|
12650
|
-
return (jsxRuntime.jsxs("div", { className: listClasses, children: [alert && (jsxRuntime.jsx("div", { className: sx(alertStyle$4), children: alert })), jsxRuntime.jsxs("div", { className: sx(cardStyle$
|
|
12650
|
+
return (jsxRuntime.jsxs("div", { className: listClasses, children: [alert && (jsxRuntime.jsx("div", { className: sx(alertStyle$4), children: alert })), jsxRuntime.jsxs("div", { className: sx(cardStyle$d), children: [jsxRuntime.jsx("div", { className: sx(headerStyle$C), children: jsxRuntime.jsxs("div", { className: sx(titleRowStyle$4), children: [jsxRuntime.jsx("h3", { className: sx(titleStyle$x), children: title }), tooltip && (jsxRuntime.jsx("span", { className: sx(tooltipStyle), children: jsxRuntime.jsx(InfoIcon, {}) }))] }) }), jsxRuntime.jsxs("div", { className: sx(listStyle$4), children: [contacts.map((contact) => (jsxRuntime.jsxs("div", { className: sx(contactItemStyle), children: [jsxRuntime.jsxs("div", { className: sx(contactInfoStyle), children: [jsxRuntime.jsxs("div", { className: sx(contactNameStyle$1), children: [contact.name, contact.isPrimary && (jsxRuntime.jsx("span", { className: sx(badgeStyle$2), children: "Primary" })), contact.isSecondary && (jsxRuntime.jsx("span", { className: cx(sx(badgeStyle$2), sx(badgeSecondaryStyle)), children: "Secondary" }))] }), contact.role && (jsxRuntime.jsx("div", { className: sx(contactRoleStyle$1), children: contact.role })), jsxRuntime.jsxs("div", { className: sx(contactDetailsStyle$1), children: [contact.email && (jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, className: sx(contactLinkStyle$2), children: contact.email })), contact.phone && (jsxRuntime.jsx("span", { className: sx(contactPhoneStyle), children: contact.phone }))] })] }), jsxRuntime.jsxs("div", { className: sx(contactActionsStyle), children: [onEdit && (jsxRuntime.jsx("button", { type: "button", className: sx(actionButtonStyle$1), onClick: () => onEdit(contact), "aria-label": "Edit contact", children: jsxRuntime.jsx(EditIcon$1, {}) })), onRemove && (jsxRuntime.jsx("button", { type: "button", className: cx(sx(actionButtonStyle$1), sx(actionButtonDangerStyle)), onClick: () => onRemove(contact), "aria-label": "Remove contact", children: jsxRuntime.jsx(TrashIcon$1, {}) }))] })] }, contact.id))), contacts.length === 0 && (jsxRuntime.jsx("div", { className: sx(emptyStyle$f), children: "No contacts added" }))] }), showAdd && onAdd && (jsxRuntime.jsx("div", { className: sx(footerStyle$c), children: jsxRuntime.jsxs("button", { type: "button", className: sx(addButtonStyle$1), onClick: onAdd, children: [jsxRuntime.jsx(PlusIcon$1, {}), addLabel] }) }))] })] }));
|
|
12651
12651
|
};
|
|
12652
12652
|
ContactList.displayName = 'ContactList';
|
|
12653
12653
|
|
|
@@ -12773,7 +12773,7 @@ const sizeStyles$2 = {
|
|
|
12773
12773
|
top: blockSizeStyles,
|
|
12774
12774
|
bottom: blockSizeStyles,
|
|
12775
12775
|
};
|
|
12776
|
-
const headerStyle$
|
|
12776
|
+
const headerStyle$B = {
|
|
12777
12777
|
label: 'Drawer-headerStyle',
|
|
12778
12778
|
display: 'flex',
|
|
12779
12779
|
alignItems: 'center',
|
|
@@ -12815,13 +12815,13 @@ const closeButtonStyle$2 = {
|
|
|
12815
12815
|
outlineOffset: 2,
|
|
12816
12816
|
},
|
|
12817
12817
|
};
|
|
12818
|
-
const bodyStyle$
|
|
12818
|
+
const bodyStyle$9 = {
|
|
12819
12819
|
label: 'Drawer-bodyStyle',
|
|
12820
12820
|
flex: 1,
|
|
12821
12821
|
padding: 'var(--space-4)',
|
|
12822
12822
|
overflowY: 'auto',
|
|
12823
12823
|
};
|
|
12824
|
-
const footerStyle$
|
|
12824
|
+
const footerStyle$b = {
|
|
12825
12825
|
label: 'Drawer-footerStyle',
|
|
12826
12826
|
padding: 'var(--space-4)',
|
|
12827
12827
|
borderTop: '1px solid var(--color-neutral-200)',
|
|
@@ -12832,15 +12832,15 @@ const footerStyle$9 = {
|
|
|
12832
12832
|
/**
|
|
12833
12833
|
* Top of a Drawer: title and the close affordance.
|
|
12834
12834
|
*/
|
|
12835
|
-
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$
|
|
12835
|
+
const DrawerHeader = ({ title, children, showClose = true, onClose, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$B), className), children: [jsxRuntime.jsxs("div", { className: sx(headerContentStyle), children: [title && jsxRuntime.jsx("h2", { className: sx(titleStyle$w), children: title }), children] }), showClose && (jsxRuntime.jsx("button", { type: "button", className: sx(closeButtonStyle$2), onClick: onClose, "aria-label": "Close drawer", children: jsxRuntime.jsx("svg", { width: "20", height: "20", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] }));
|
|
12836
12836
|
/**
|
|
12837
12837
|
* Scrollable content region of a Drawer.
|
|
12838
12838
|
*/
|
|
12839
|
-
const DrawerBody = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: cx(sx(bodyStyle$
|
|
12839
|
+
const DrawerBody = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: cx(sx(bodyStyle$9), className), children: children }));
|
|
12840
12840
|
/**
|
|
12841
12841
|
* Bottom of a Drawer, for actions that stay visible while the body scrolls.
|
|
12842
12842
|
*/
|
|
12843
|
-
const DrawerFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: cx(sx(footerStyle$
|
|
12843
|
+
const DrawerFooter = ({ children, className = '' }) => (jsxRuntime.jsx("div", { className: cx(sx(footerStyle$b), className), children: children }));
|
|
12844
12844
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), ' +
|
|
12845
12845
|
'textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
12846
12846
|
/**
|
|
@@ -12998,7 +12998,7 @@ const openStyle = {
|
|
|
12998
12998
|
},
|
|
12999
12999
|
},
|
|
13000
13000
|
};
|
|
13001
|
-
const bodyStyle$
|
|
13001
|
+
const bodyStyle$8 = {
|
|
13002
13002
|
label: 'DueDatesDrawer-bodyStyle',
|
|
13003
13003
|
minHeight: 0,
|
|
13004
13004
|
flex: 1,
|
|
@@ -13046,7 +13046,7 @@ const emptyStyle$e = {
|
|
|
13046
13046
|
padding: '16px 8px 0',
|
|
13047
13047
|
color: 'var(--color-stone, #787878)',
|
|
13048
13048
|
};
|
|
13049
|
-
const cardStyle$
|
|
13049
|
+
const cardStyle$c = {
|
|
13050
13050
|
label: 'DueDatesDrawer-cardStyle',
|
|
13051
13051
|
display: 'flex',
|
|
13052
13052
|
flexDirection: 'column',
|
|
@@ -13170,7 +13170,7 @@ const DueDateCard$1 = ({ item, onToggle, onTaskClick }) => {
|
|
|
13170
13170
|
const completed = isTravelDueDateCompleted(item);
|
|
13171
13171
|
const dueDate = parseLocalDate$1(item.duedate);
|
|
13172
13172
|
const pastDue = !!dueDate && dueDate < new Date() && !completed;
|
|
13173
|
-
return (jsxRuntime.jsxs("article", { className: sx(cardStyle$
|
|
13173
|
+
return (jsxRuntime.jsxs("article", { className: sx(cardStyle$c), children: [jsxRuntime.jsxs("div", { className: sx(cardTitleStyle$3), children: [onToggle ? (jsxRuntime.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 ? jsxRuntime.jsx(CheckIcon$1, { size: 12 }) : null })) : (jsxRuntime.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 ? jsxRuntime.jsx(CheckIcon$1, { size: 12 }) : null })), jsxRuntime.jsx("h5", { children: item.tasktitle })] }), item.description && jsxRuntime.jsx("p", { children: item.description }), jsxRuntime.jsxs("div", { className: sx(tagsStyle), children: [jsxRuntime.jsx("span", { style: { backgroundColor: sportColor$1(item.sportCode) }, children: item.sportCode }), jsxRuntime.jsx("button", { type: "button", disabled: !item.masterTripGUID || !onTaskClick, onClick: () => item.masterTripGUID && onTaskClick?.(item.masterTripGUID), children: item.tripName })] }), completed && item.completeddatetime && jsxRuntime.jsxs("div", { className: sx(completionStyle), children: [jsxRuntime.jsx(CheckIcon$1, { size: 14 }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("em", { children: "on" }), " ", formatDate$8(item.completeddatetime, { month: 'numeric', day: 'numeric', year: '2-digit' }), " ", jsxRuntime.jsx("em", { children: "by" }), " ", item.completedby] })] })] }));
|
|
13174
13174
|
};
|
|
13175
13175
|
/** Hub's searchable, status-aware due-dates drawer. */
|
|
13176
13176
|
const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, overdueOnly, onClose, onToggle, onTaskClick, className = '' }) => {
|
|
@@ -13182,7 +13182,7 @@ const DueDatesDrawer = ({ isOpen, dueDates, selectedDate, selectedTrip, overdueO
|
|
|
13182
13182
|
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)));
|
|
13183
13183
|
return matches.length ? [[date, matches]] : [];
|
|
13184
13184
|
})), [dueDates, search, selectedDate, selectedTrip, overdueOnly]);
|
|
13185
|
-
return (jsxRuntime.jsxs("aside", { className: cx(sx(drawerStyle), isOpen && sx(openStyle), className), "aria-hidden": !isOpen, "aria-label": "Due Dates", children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx("h3", { children: "Due Dates" }), jsxRuntime.jsx("button", { type: "button", "aria-label": "Close due dates", onClick: onClose, children: jsxRuntime.jsx(CloseIcon, { size: 24 }) })] }), jsxRuntime.jsxs("div", { className: sx(bodyStyle$
|
|
13185
|
+
return (jsxRuntime.jsxs("aside", { className: cx(sx(drawerStyle), isOpen && sx(openStyle), className), "aria-hidden": !isOpen, "aria-label": "Due Dates", children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx("h3", { children: "Due Dates" }), jsxRuntime.jsx("button", { type: "button", "aria-label": "Close due dates", onClick: onClose, children: jsxRuntime.jsx(CloseIcon, { size: 24 }) })] }), jsxRuntime.jsxs("div", { className: sx(bodyStyle$8), children: [jsxRuntime.jsxs("label", { className: sx(searchStyle$1), children: [jsxRuntime.jsx(SearchIcon$1, { size: 16 }), jsxRuntime.jsx("input", { type: "search", placeholder: "Search", value: search, onChange: (event) => setSearch(event.target.value) })] }), !Object.keys(filtered).length ? jsxRuntime.jsx("div", { className: sx(emptyStyle$e), children: "No due dates found." }) : Object.entries(filtered).map(([date, items]) => (jsxRuntime.jsxs("section", { children: [jsxRuntime.jsx("h4", { children: formatDate$8(date, { month: 'long', day: 'numeric', year: 'numeric' }) }), jsxRuntime.jsx("div", { className: sx(cardsStyle$2), children: items.map((item) => jsxRuntime.jsx(DueDateCard$1, { item: item, onToggle: onToggle, onTaskClick: onTaskClick }, `${date}-${item.taskid}`)) })] }, date)))] })] }));
|
|
13186
13186
|
};
|
|
13187
13187
|
|
|
13188
13188
|
/**
|
|
@@ -13194,7 +13194,7 @@ const panelStyle$5 = {
|
|
|
13194
13194
|
label: 'Flyout-panelStyle',
|
|
13195
13195
|
background: 'var(--color-white)',
|
|
13196
13196
|
};
|
|
13197
|
-
const headerStyle$
|
|
13197
|
+
const headerStyle$A = {
|
|
13198
13198
|
label: 'Flyout-headerStyle',
|
|
13199
13199
|
'&&': { padding: 'var(--space-5) var(--space-6)' },
|
|
13200
13200
|
};
|
|
@@ -13212,7 +13212,7 @@ const titleStyle$v = {
|
|
|
13212
13212
|
fontWeight: 'var(--font-weight-bold)',
|
|
13213
13213
|
color: 'var(--color-ink)',
|
|
13214
13214
|
};
|
|
13215
|
-
const bodyStyle$
|
|
13215
|
+
const bodyStyle$7 = {
|
|
13216
13216
|
label: 'Flyout-bodyStyle',
|
|
13217
13217
|
'&&': { padding: 'var(--space-6)' },
|
|
13218
13218
|
};
|
|
@@ -13230,7 +13230,7 @@ const Flyout = ({ isOpen, onClose, title, icon, children, footer, width = 'min(4
|
|
|
13230
13230
|
const titleId = React.useId();
|
|
13231
13231
|
if (!isOpen || typeof document === 'undefined')
|
|
13232
13232
|
return null;
|
|
13233
|
-
return reactDom.createPortal(jsxRuntime.jsxs(Drawer, { "aria-labelledby": titleId, className: sx(panelStyle$5), isOpen: isOpen, onClose: onClose, position: "right", size: width, children: [jsxRuntime.jsx(DrawerHeader, { className: sx(headerStyle$
|
|
13233
|
+
return reactDom.createPortal(jsxRuntime.jsxs(Drawer, { "aria-labelledby": titleId, className: sx(panelStyle$5), isOpen: isOpen, onClose: onClose, position: "right", size: width, children: [jsxRuntime.jsx(DrawerHeader, { className: sx(headerStyle$A), children: jsxRuntime.jsxs("div", { className: sx(titleRowStyle$3), children: [icon, jsxRuntime.jsx("h2", { className: sx(titleStyle$v), id: titleId, children: title })] }) }), jsxRuntime.jsx(DrawerBody, { className: sx(bodyStyle$7), children: children }), footer && jsxRuntime.jsx(DrawerFooter, { children: footer })] }), document.body);
|
|
13234
13234
|
};
|
|
13235
13235
|
|
|
13236
13236
|
/**
|
|
@@ -13242,7 +13242,7 @@ const Flyout = ({ isOpen, onClose, title, icon, children, footer, width = 'min(4
|
|
|
13242
13242
|
* No specificity work was needed — the media query is the only override, and
|
|
13243
13243
|
* an at-rule always outranks the base declaration it sits beside.
|
|
13244
13244
|
*/
|
|
13245
|
-
const headerStyle$
|
|
13245
|
+
const headerStyle$z = {
|
|
13246
13246
|
label: 'GridHeaderRow-headerStyle',
|
|
13247
13247
|
display: 'none',
|
|
13248
13248
|
width: '100%',
|
|
@@ -13289,7 +13289,7 @@ const headingStyle$3 = {
|
|
|
13289
13289
|
* carrying its own labels, so a detached heading strip would caption nothing.
|
|
13290
13290
|
*/
|
|
13291
13291
|
function GridHeaderRow({ columns, gridTemplateColumns, above, below, className = '', style, }) {
|
|
13292
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$
|
|
13292
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$z), className), style: style, "data-testid": "grid-header-row", children: [above, jsxRuntime.jsx("div", { className: sx(gridStyle$8), style: { gridTemplateColumns }, role: "row", children: columns.map((column, i) => (jsxRuntime.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] }));
|
|
13293
13293
|
}
|
|
13294
13294
|
GridHeaderRow.displayName = 'GridHeaderRow';
|
|
13295
13295
|
|
|
@@ -13343,7 +13343,7 @@ const bannerStyle$2 = {
|
|
|
13343
13343
|
* The heading row only makes sense while the grid is a grid. Below 768px each
|
|
13344
13344
|
* row becomes a card and every cell carries its own label instead.
|
|
13345
13345
|
*/
|
|
13346
|
-
const headerStyle$
|
|
13346
|
+
const headerStyle$y = {
|
|
13347
13347
|
label: 'GridTable-headerStyle',
|
|
13348
13348
|
display: 'none',
|
|
13349
13349
|
width: '100%',
|
|
@@ -13393,7 +13393,7 @@ const sortIconStyle$1 = {
|
|
|
13393
13393
|
flexShrink: 0,
|
|
13394
13394
|
display: 'inline-flex',
|
|
13395
13395
|
};
|
|
13396
|
-
const bodyStyle$
|
|
13396
|
+
const bodyStyle$6 = {
|
|
13397
13397
|
label: 'GridTable-bodyStyle',
|
|
13398
13398
|
display: 'flex',
|
|
13399
13399
|
flexDirection: 'column',
|
|
@@ -13402,7 +13402,7 @@ const bodyStyle$5 = {
|
|
|
13402
13402
|
gap: 0,
|
|
13403
13403
|
},
|
|
13404
13404
|
};
|
|
13405
|
-
const rowStyle$
|
|
13405
|
+
const rowStyle$6 = {
|
|
13406
13406
|
label: 'GridTable-rowStyle',
|
|
13407
13407
|
padding: 8,
|
|
13408
13408
|
fontSize: 14,
|
|
@@ -13607,7 +13607,7 @@ const totalValueStyle = {
|
|
|
13607
13607
|
* `.footer .totalCell:first-child` is written against the generated class, so
|
|
13608
13608
|
* it keeps its (0,3,0) rank over the plain `.totalCell` rule without doubling.
|
|
13609
13609
|
*/
|
|
13610
|
-
const footerStyle$
|
|
13610
|
+
const footerStyle$a = {
|
|
13611
13611
|
label: 'GridTable-footerStyle',
|
|
13612
13612
|
display: 'none',
|
|
13613
13613
|
width: '100%',
|
|
@@ -13959,7 +13959,7 @@ function GridTable({ columns, data, gridTemplateColumns = `repeat(${columns.leng
|
|
|
13959
13959
|
// membership rather than truthiness so a legitimate empty-string key still
|
|
13960
13960
|
// counts as a match.
|
|
13961
13961
|
const markerBeforeMatches = rowMarker?.beforeKey != null && allKeys.includes(rowMarker.beforeKey);
|
|
13962
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(tableStyle$8), sharedColumns ? sx(sharedRootStyle) : '', className), style: rootStyle, children: [banner && jsxRuntime.jsx("div", { className: cx(sx(bannerStyle$2), span), children: banner }), !hideHeader && (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$
|
|
13962
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(tableStyle$8), sharedColumns ? sx(sharedRootStyle) : '', className), style: rootStyle, children: [banner && jsxRuntime.jsx("div", { className: cx(sx(bannerStyle$2), span), children: banner }), !hideHeader && (jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$y), subgrid), children: [sharedColumns && header.above != null ? jsxRuntime.jsx("div", { className: span, children: header.above }) : header.above, jsxRuntime.jsxs("div", { className: cx(sx(gridStyle$7), subgrid), style: trackStyle, children: [expandable && jsxRuntime.jsx("div", { className: sx(headingStyle$2), "aria-hidden": "true" }), columns.map((column, i) => (jsxRuntime.jsx(React.Fragment, { children: heading(column, { interactive: true }) }, i)))] }), sharedColumns && header.below != null ? jsxRuntime.jsx("div", { className: span, children: header.below }) : header.below] })), !sorted.length && !draftRow ? (jsxRuntime.jsx("div", { className: cx(sx(emptyStyle$d), span), children: emptyMessage })) : (jsxRuntime.jsxs("div", { className: cx(sx(bodyStyle$6), subgrid), children: [draftRow && jsxRuntime.jsx("div", { className: cx(sx(draftRowStyle), span), children: draftRow }), sorted.map((row, rowIndex) => {
|
|
13963
13963
|
const record = row;
|
|
13964
13964
|
const key = allKeys[rowIndex];
|
|
13965
13965
|
// Only an expandable table exposes expansion; without it, a lingering
|
|
@@ -13967,12 +13967,12 @@ function GridTable({ columns, data, gridTemplateColumns = `repeat(${columns.leng
|
|
|
13967
13967
|
// after expandable was turned off) must not leak `expanded: true` to
|
|
13968
13968
|
// renderers that have no toggle to collapse it.
|
|
13969
13969
|
const expanded = expandable && expandedKeys.has(key);
|
|
13970
|
-
return (jsxRuntime.jsxs(React.Fragment, { children: [marker && rowMarker?.beforeKey === key && marker, editRow?.key === key ? (jsxRuntime.jsx("div", { className: cx(sx(editRowStyle), bordered ? sx(borderedStyle) : '', span), "data-rowid": key, "data-testid": `row-${key}`, "data-editing": "true", children: editRow.content })) : (jsxRuntime.jsxs("div", { className: cx(sx(rowStyle$
|
|
13970
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [marker && rowMarker?.beforeKey === key && marker, editRow?.key === key ? (jsxRuntime.jsx("div", { className: cx(sx(editRowStyle), bordered ? sx(borderedStyle) : '', span), "data-rowid": key, "data-testid": `row-${key}`, "data-editing": "true", children: editRow.content })) : (jsxRuntime.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 && (jsxRuntime.jsx("div", { className: sx(expandCellStyle), children: jsxRuntime.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 ? jsxRuntime.jsx(ChevronDown, {}) : jsxRuntime.jsx(ChevronRight$3, {}) }) })), columns.map((column, colIndex) => {
|
|
13971
13971
|
const value = column.name ? record[column.name] : undefined;
|
|
13972
13972
|
const formatted = column.format ? column.format(value, row) : value;
|
|
13973
13973
|
return (jsxRuntime.jsxs("div", { className: cx(sx(cellWrapStyle), rowPainted ? sx(cellClearStyle) : ''), ...(column.name ? { 'data-colname': column.name } : {}), children: [column.label && jsxRuntime.jsx("div", { className: sx(stackedLabelStyle), children: heading(column, { interactive: false }) }), jsxRuntime.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 ? (jsxRuntime.jsx("span", { className: sx(valueStyle$2), children: formatted || jsxRuntime.jsx(jsxRuntime.Fragment, { children: "\u2013" }) })) : null })] }, colIndex));
|
|
13974
13974
|
})] }, key))] }, key));
|
|
13975
|
-
}), marker && rowMarker?.atEnd && !markerBeforeMatches && sorted.length > 0 && marker] })), totalRow && (jsxRuntime.jsx("div", { className: cx(sx(footerStyle$
|
|
13975
|
+
}), marker && rowMarker?.atEnd && !markerBeforeMatches && sorted.length > 0 && marker] })), totalRow && (jsxRuntime.jsx("div", { className: cx(sx(footerStyle$a), subgrid), children: jsxRuntime.jsxs("div", { className: cx(sx(gridStyle$7), subgrid), style: trackStyle, children: [expandable && jsxRuntime.jsx("div", { className: sx(totalCellStyle), "aria-hidden": "true" }), columns.map((_, i) => (jsxRuntime.jsx("div", { className: i === totalIndex ? sx(totalValueStyle) : sx(totalCellStyle), children: i === 0 ? totalRow.label : i === totalIndex ? total.toLocaleString() : null }, i)))] }) }))] }));
|
|
13976
13976
|
}
|
|
13977
13977
|
GridTable.displayName = 'GridTable';
|
|
13978
13978
|
|
|
@@ -14758,6 +14758,990 @@ const HubAppShell = ({ children, navItems, individualTravelItem, agentsItem, sou
|
|
|
14758
14758
|
return (jsxRuntime.jsxs("div", { className: cx(sx(shellStyle), expanded && sx(shellExpandedStyle), className), children: [loading && jsxRuntime.jsx("div", { className: sx(loadingStyle$4), role: "status", "aria-label": "Loading", "data-testid": "loading-overlay", children: jsxRuntime.jsx("span", {}) }), bannerLabel && jsxRuntime.jsx("div", { className: sx(qaBannerStyle), children: bannerLabel }), jsxRuntime.jsxs("aside", { className: sx(sidebarStyle$3), "data-expanded": expanded, children: [jsxRuntime.jsx("button", { type: "button", className: sx(expandButtonStyle), "aria-label": expanded ? 'Collapse sidebar' : 'Expand sidebar', onClick: () => setExpanded((value) => !value), children: expanded ? jsxRuntime.jsx(ChevronLeftIcon, { size: 14 }) : jsxRuntime.jsx(ChevronRightIcon$1, { size: 14 }) }), jsxRuntime.jsx("button", { type: "button", className: sx(logoStyle), "aria-label": "Go to Home", onClick: onLogoClick, children: logo ? (expanded ? logo : (collapsedLogo ?? logo)) : jsxRuntime.jsx(DefaultLogo, { expanded: expanded }) }), jsxRuntime.jsxs("nav", { className: sx(desktopNavStyle), "aria-label": "Hub navigation", children: [homeNavItem && jsxRuntime.jsx("div", { className: navigationDisabled ? sx(disabledNavStyle) : '', children: renderNavItem(homeNavItem) }), onLegacyPortal && jsxRuntime.jsxs("button", { type: "button", className: sx(navItemStyle), "aria-label": "Old Portal", title: "Old Portal", onClick: onLegacyPortal, "data-test": "hub-nav-legacy-portal", children: [jsxRuntime.jsx("span", { className: sx(navIconStyle), children: jsxRuntime.jsx(ArrowUpRightIcon, { size: 24 }) }), expanded && jsxRuntime.jsx("span", { children: "Old Portal" })] }), resolvedIndividualTravelItem && renderNavItem(resolvedIndividualTravelItem), jsxRuntime.jsx("div", { className: navigationDisabled ? sx(disabledNavStyle) : '', children: primaryNavItems.map((item) => renderNavItem(item)) })] }), jsxRuntime.jsxs("div", { className: sx(sidebarFooterStyle), children: [resolvedFooterNavItems.map((item) => renderNavItem(item)), jsxRuntime.jsxs("div", { className: sx(profileStyle), ref: profileRef, children: [jsxRuntime.jsxs("button", { type: "button", className: sx(avatarStyle$1), "aria-label": "User Information", onClick: () => setIsProfileOpen(!isProfileOpen), children: [jsxRuntime.jsx(Avatar, { initials: userInitials, size: expanded ? 28 : 'md' }), expanded && userName && jsxRuntime.jsx("span", { className: sx(userNameStyle), children: userName })] }), isProfileOpen && (renderProfileMenu || profileMenu) && (jsxRuntime.jsx("div", { className: sx(profileMenuStyle), children: renderProfileMenu ? renderProfileMenu(() => setIsProfileOpen(false)) : profileMenu }))] })] })] }), jsxRuntime.jsxs("div", { className: sx(mainStyle$4), children: [jsxRuntime.jsxs("header", { className: sx(topbarStyle), children: [jsxRuntime.jsx("div", { children: accountSelector ?? jsxRuntime.jsx(DefaultAccount, {}) }), renderTopbarActions ? renderTopbarActions(actions) : jsxRuntime.jsx(DefaultNavigationToggle, { ...actions })] }), isMobileNavOpen && jsxRuntime.jsxs("div", { className: sx(mobileNavStyle), children: [jsxRuntime.jsx("nav", { "aria-label": "Mobile Hub navigation", children: mobileNavItems.map((item) => renderNavItem(item, true)) }), (mobileExtras || onLegacyPortal) && jsxRuntime.jsxs("div", { className: sx(mobileExtrasStyle), role: "group", "aria-label": "Mobile navigation actions", children: [mobileExtras, onLegacyPortal && jsxRuntime.jsxs("button", { type: "button", className: sx(mobilePrimaryStyle), onClick: () => { onLegacyPortal(); closeMobileNav(); }, "data-test": "hub-mobile-legacy-portal", children: [jsxRuntime.jsx(ArrowUpRightIcon, { size: 20 }), jsxRuntime.jsx("span", { children: "Legacy Portal" })] })] }), mobileFooter && jsxRuntime.jsx("div", { className: sx(mobileFooterStyle), children: mobileFooter })] }), showContent && jsxRuntime.jsx("main", { className: cx(sx(contentStyle$6), contentDisabled && sx(contentDisabledStyle)), children: children })] })] }));
|
|
14759
14759
|
};
|
|
14760
14760
|
|
|
14761
|
+
/**
|
|
14762
|
+
* The Operations Response Center's domain: Incidents, the four Divisions
|
|
14763
|
+
* that act on them, their trip types, and the Routes that carry an Incident
|
|
14764
|
+
* to each Division. Shared by the intake form, the incident card, the resolve
|
|
14765
|
+
* dialog, the archive table and the page, so every surface uses the same words.
|
|
14766
|
+
*/
|
|
14767
|
+
/** The four Divisions in display order, each with its trip types. */
|
|
14768
|
+
const DIVISIONS = [
|
|
14769
|
+
{ value: 'agency', label: 'Agency', tripTypes: ['air', 'hotel', 'car', 'limo'] },
|
|
14770
|
+
{ value: 'charters', label: 'Charters', tripTypes: ['charter'] },
|
|
14771
|
+
{ value: 'stay', label: 'Stay', tripTypes: ['group-hotel'] },
|
|
14772
|
+
{ value: 'driven', label: 'Driven', tripTypes: ['bus'] },
|
|
14773
|
+
];
|
|
14774
|
+
/** Division key → display name. */
|
|
14775
|
+
const DIVISION_LABELS = {
|
|
14776
|
+
agency: 'Agency',
|
|
14777
|
+
charters: 'Charters',
|
|
14778
|
+
stay: 'Stay',
|
|
14779
|
+
driven: 'Driven',
|
|
14780
|
+
};
|
|
14781
|
+
/** Trip type → display name. */
|
|
14782
|
+
const TRIP_TYPE_LABELS = {
|
|
14783
|
+
air: 'Air',
|
|
14784
|
+
hotel: 'Hotel',
|
|
14785
|
+
car: 'Car',
|
|
14786
|
+
limo: 'Limo',
|
|
14787
|
+
charter: 'Charter',
|
|
14788
|
+
'group-hotel': 'Group hotel',
|
|
14789
|
+
bus: 'Bus',
|
|
14790
|
+
};
|
|
14791
|
+
/** Trip types in display order: Division order, then each Division's own order. */
|
|
14792
|
+
const TRIP_TYPES = DIVISIONS.flatMap((division) => division.tripTypes);
|
|
14793
|
+
/** The Division a trip type belongs to. */
|
|
14794
|
+
const tripTypeDivision = (tripType) => DIVISIONS.find((division) => division.tripTypes.includes(tripType)).value;
|
|
14795
|
+
/** Sorts trip types into display order, dropping duplicates. */
|
|
14796
|
+
const sortTripTypes = (tripTypes) => TRIP_TYPES.filter((tripType) => tripTypes.includes(tripType));
|
|
14797
|
+
/** Route status → display text. */
|
|
14798
|
+
const ROUTE_STATUS_LABELS = {
|
|
14799
|
+
'not-acknowledged': 'Not acknowledged',
|
|
14800
|
+
acknowledged: 'Acknowledged',
|
|
14801
|
+
complete: 'Complete',
|
|
14802
|
+
};
|
|
14803
|
+
/** Resolution → display text. */
|
|
14804
|
+
const RESOLUTION_LABELS = {
|
|
14805
|
+
resolved: 'Resolved',
|
|
14806
|
+
'logged-in-error': 'Logged in error',
|
|
14807
|
+
};
|
|
14808
|
+
/** Priority → display text. */
|
|
14809
|
+
const PRIORITY_LABELS = {
|
|
14810
|
+
routine: 'Routine',
|
|
14811
|
+
};
|
|
14812
|
+
/** Central time — STM's operations clock — unless a caller says otherwise. */
|
|
14813
|
+
const DEFAULT_INCIDENT_TIME_ZONE = 'America/Chicago';
|
|
14814
|
+
/** "12m", "1h 05m", "2d 3h" since `from`, measured at `now`; "Just now" under a minute. */
|
|
14815
|
+
const formatElapsed = (from, now) => {
|
|
14816
|
+
const minutes = Math.max(0, Math.floor((Date.parse(now) - Date.parse(from)) / 60000));
|
|
14817
|
+
if (minutes < 1)
|
|
14818
|
+
return 'Just now';
|
|
14819
|
+
if (minutes < 60)
|
|
14820
|
+
return `${minutes}m`;
|
|
14821
|
+
const hours = Math.floor(minutes / 60);
|
|
14822
|
+
if (hours < 24)
|
|
14823
|
+
return `${hours}h ${String(minutes % 60).padStart(2, '0')}m`;
|
|
14824
|
+
return `${Math.floor(hours / 24)}d ${hours % 24}h`;
|
|
14825
|
+
};
|
|
14826
|
+
/** "10:42 PM" in the given time zone. */
|
|
14827
|
+
const formatClockTime = (iso, timeZone = DEFAULT_INCIDENT_TIME_ZONE) => new Intl.DateTimeFormat('en-US', { hour: 'numeric', minute: '2-digit', timeZone }).format(new Date(iso));
|
|
14828
|
+
/** "Oct 14, 2026" in the given time zone. */
|
|
14829
|
+
const formatIncidentDate = (iso, timeZone = DEFAULT_INCIDENT_TIME_ZONE) => new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone }).format(new Date(iso));
|
|
14830
|
+
/** "2026-10-14" in the given time zone — the shape a date filter compares against. */
|
|
14831
|
+
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));
|
|
14832
|
+
|
|
14833
|
+
/** IncidentArchiveTable's compiled rules. */
|
|
14834
|
+
const rootStyle = {
|
|
14835
|
+
label: 'IncidentArchiveTable-rootStyle',
|
|
14836
|
+
display: 'flex',
|
|
14837
|
+
flexDirection: 'column',
|
|
14838
|
+
gap: 'var(--space-4)',
|
|
14839
|
+
minWidth: 0,
|
|
14840
|
+
};
|
|
14841
|
+
const filtersStyle$5 = {
|
|
14842
|
+
label: 'IncidentArchiveTable-filtersStyle',
|
|
14843
|
+
display: 'grid',
|
|
14844
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(11rem, 1fr))',
|
|
14845
|
+
alignItems: 'end',
|
|
14846
|
+
gap: 'var(--space-3)',
|
|
14847
|
+
};
|
|
14848
|
+
const numberStyle$1 = {
|
|
14849
|
+
label: 'IncidentArchiveTable-numberStyle',
|
|
14850
|
+
color: 'var(--fg-1)',
|
|
14851
|
+
fontFamily: 'var(--font-family-mono)',
|
|
14852
|
+
fontWeight: 'var(--fw-semibold)',
|
|
14853
|
+
whiteSpace: 'nowrap',
|
|
14854
|
+
};
|
|
14855
|
+
const stackStyle$4 = {
|
|
14856
|
+
label: 'IncidentArchiveTable-stackStyle',
|
|
14857
|
+
display: 'flex',
|
|
14858
|
+
flexDirection: 'column',
|
|
14859
|
+
gap: 'var(--space-0-5)',
|
|
14860
|
+
};
|
|
14861
|
+
const secondaryStyle = {
|
|
14862
|
+
label: 'IncidentArchiveTable-secondaryStyle',
|
|
14863
|
+
color: 'var(--fg-3)',
|
|
14864
|
+
fontSize: 'var(--fs-xs)',
|
|
14865
|
+
lineHeight: 'var(--lh-xs)',
|
|
14866
|
+
};
|
|
14867
|
+
const rootCauseStyle = {
|
|
14868
|
+
label: 'IncidentArchiveTable-rootCauseStyle',
|
|
14869
|
+
display: 'block',
|
|
14870
|
+
maxWidth: '40ch',
|
|
14871
|
+
color: 'var(--fg-1)',
|
|
14872
|
+
whiteSpace: 'normal',
|
|
14873
|
+
overflowWrap: 'anywhere',
|
|
14874
|
+
};
|
|
14875
|
+
/* Positioned so the sr-only text inside stays within the table's scroll box, not the page's. */
|
|
14876
|
+
const mutedStyle$2 = {
|
|
14877
|
+
label: 'IncidentArchiveTable-mutedStyle',
|
|
14878
|
+
position: 'relative',
|
|
14879
|
+
color: 'var(--fg-3)',
|
|
14880
|
+
};
|
|
14881
|
+
const srOnlyStyle$4 = { label: 'IncidentArchiveTable-srOnlyStyle', ...srOnly };
|
|
14882
|
+
/* The scroll box is ours, not Table's, so it can take focus and a name for keyboard scrolling. */
|
|
14883
|
+
const scrollRegionStyle = {
|
|
14884
|
+
label: 'IncidentArchiveTable-scrollRegionStyle',
|
|
14885
|
+
overflowX: 'auto',
|
|
14886
|
+
borderRadius: 'var(--radius-lg)',
|
|
14887
|
+
'&:focus-visible': {
|
|
14888
|
+
outline: '2px solid var(--color-primary)',
|
|
14889
|
+
outlineOffset: 2,
|
|
14890
|
+
},
|
|
14891
|
+
};
|
|
14892
|
+
const tableNoScrollStyle = {
|
|
14893
|
+
label: 'IncidentArchiveTable-tableNoScrollStyle',
|
|
14894
|
+
'&&': { overflowX: 'visible' },
|
|
14895
|
+
};
|
|
14896
|
+
|
|
14897
|
+
/** The Archive shows 50 resolved Incidents a page. */
|
|
14898
|
+
const ARCHIVE_PAGE_SIZE = 50;
|
|
14899
|
+
/**
|
|
14900
|
+
* The read-only Archive of resolved Incidents: newest first, 50 a page,
|
|
14901
|
+
* filterable by date range and account. Nothing here can be reopened.
|
|
14902
|
+
*/
|
|
14903
|
+
const IncidentArchiveTable = ({ incidents, totalItems, page, pageSize = ARCHIVE_PAGE_SIZE, accounts, filters, onFiltersChange, onPageChange, loading = false, timeZone = DEFAULT_INCIDENT_TIME_ZONE, className = '', }) => {
|
|
14904
|
+
const id = React.useId();
|
|
14905
|
+
const filtered = Boolean(filters.from || filters.to || filters.accountId);
|
|
14906
|
+
const update = (patch) => onFiltersChange?.({ ...filters, ...patch });
|
|
14907
|
+
const columns = [
|
|
14908
|
+
{
|
|
14909
|
+
key: 'number',
|
|
14910
|
+
label: 'Incident',
|
|
14911
|
+
render: (_value, row) => jsxRuntime.jsx("span", { className: sx(numberStyle$1), children: row.number }),
|
|
14912
|
+
},
|
|
14913
|
+
{
|
|
14914
|
+
key: 'createdAt',
|
|
14915
|
+
label: 'Logged',
|
|
14916
|
+
render: (_value, row) => (jsxRuntime.jsxs("span", { className: sx(stackStyle$4), children: [jsxRuntime.jsx("time", { dateTime: row.createdAt, children: formatIncidentDate(row.createdAt, timeZone) }), jsxRuntime.jsx("span", { className: sx(secondaryStyle), children: formatClockTime(row.createdAt, timeZone) })] })),
|
|
14917
|
+
},
|
|
14918
|
+
{
|
|
14919
|
+
key: 'accountName',
|
|
14920
|
+
label: 'Account',
|
|
14921
|
+
render: (_value, row) => (jsxRuntime.jsxs("span", { className: sx(stackStyle$4), children: [jsxRuntime.jsx("span", { children: row.accountName }), row.teamName && jsxRuntime.jsx("span", { className: sx(secondaryStyle), children: row.teamName })] })),
|
|
14922
|
+
},
|
|
14923
|
+
{
|
|
14924
|
+
key: 'leadDivision',
|
|
14925
|
+
label: 'Lead Division',
|
|
14926
|
+
render: (_value, row) => DIVISION_LABELS[row.leadDivision],
|
|
14927
|
+
},
|
|
14928
|
+
{
|
|
14929
|
+
key: 'tripTypes',
|
|
14930
|
+
label: 'Trip types',
|
|
14931
|
+
render: (_value, row) => row.tripTypes.map((tripType) => TRIP_TYPE_LABELS[tripType]).join(', '),
|
|
14932
|
+
},
|
|
14933
|
+
{
|
|
14934
|
+
key: 'resolution',
|
|
14935
|
+
label: 'Resolution',
|
|
14936
|
+
render: (_value, row) => (jsxRuntime.jsx(Badge, { variant: row.resolution === 'resolved' ? 'success' : 'warning', size: "sm", children: RESOLUTION_LABELS[row.resolution] })),
|
|
14937
|
+
},
|
|
14938
|
+
{
|
|
14939
|
+
key: 'rootCause',
|
|
14940
|
+
label: 'Root cause',
|
|
14941
|
+
render: (_value, row) => row.rootCause ? (jsxRuntime.jsx("span", { className: sx(rootCauseStyle), children: row.rootCause })) : (jsxRuntime.jsxs("span", { className: sx(mutedStyle$2), children: [jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u2014" }), jsxRuntime.jsx("span", { className: sx(srOnlyStyle$4), children: "No root cause" })] })),
|
|
14942
|
+
},
|
|
14943
|
+
{
|
|
14944
|
+
key: 'resolvedBy',
|
|
14945
|
+
label: 'Resolved by',
|
|
14946
|
+
render: (_value, row) => (jsxRuntime.jsxs("span", { className: sx(stackStyle$4), children: [jsxRuntime.jsx("span", { children: row.resolvedBy }), jsxRuntime.jsxs("time", { className: sx(secondaryStyle), dateTime: row.resolvedAt, children: [formatIncidentDate(row.resolvedAt, timeZone), " ", formatClockTime(row.resolvedAt, timeZone)] })] })),
|
|
14947
|
+
},
|
|
14948
|
+
];
|
|
14949
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(rootStyle), className), "data-test": "incident-archive", children: [jsxRuntime.jsxs("div", { className: sx(filtersStyle$5), role: "group", "aria-label": "Archive filters", children: [jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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 && (jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: () => onFiltersChange?.({}), "data-test": "incident-archive-clear", children: "Clear filters" }))] }), jsxRuntime.jsx("div", { className: sx(scrollRegionStyle), role: "region", "aria-label": "Resolved incidents", tabIndex: 0, "data-test": "incident-archive-scroll", children: jsxRuntime.jsx(Table, { className: sx(tableNoScrollStyle), columns: columns, data: incidents, rowKey: "id", loading: loading, emptyContent: jsxRuntime.jsx(EmptyState$1, { size: "sm", title: filtered ? 'No resolved incidents match' : 'No resolved incidents yet', description: filtered
|
|
14950
|
+
? 'Try a wider date range or a different account.'
|
|
14951
|
+
: 'Incidents land here once they are resolved or closed as logged in error.' }) }) }), totalItems > 0 && (jsxRuntime.jsx(Pagination, { page: page, pageSize: pageSize, totalItems: totalItems, itemLabel: "incidents", ariaLabel: "Archive pages", onPageChange: onPageChange }))] }));
|
|
14952
|
+
};
|
|
14953
|
+
IncidentArchiveTable.displayName = 'IncidentArchiveTable';
|
|
14954
|
+
|
|
14955
|
+
/** IncidentCard's compiled rules. One rule per element; every value is a token. */
|
|
14956
|
+
const cardStyle$b = {
|
|
14957
|
+
label: 'IncidentCard-cardStyle',
|
|
14958
|
+
display: 'flex',
|
|
14959
|
+
flexDirection: 'column',
|
|
14960
|
+
gap: 'var(--space-3)',
|
|
14961
|
+
minWidth: 0,
|
|
14962
|
+
};
|
|
14963
|
+
/* Doubled so it outranks Card's own border rule, which is injected after this one. */
|
|
14964
|
+
const overdueStyle = {
|
|
14965
|
+
label: 'IncidentCard-overdueStyle',
|
|
14966
|
+
'&&': {
|
|
14967
|
+
borderColor: 'var(--color-alert-error-border)',
|
|
14968
|
+
borderLeft: '4px solid var(--color-error)',
|
|
14969
|
+
},
|
|
14970
|
+
};
|
|
14971
|
+
const headerStyle$x = {
|
|
14972
|
+
label: 'IncidentCard-headerStyle',
|
|
14973
|
+
display: 'flex',
|
|
14974
|
+
flexWrap: 'wrap',
|
|
14975
|
+
alignItems: 'center',
|
|
14976
|
+
gap: 'var(--space-2)',
|
|
14977
|
+
};
|
|
14978
|
+
/* An overdue card's header is tinted so it reads as "needs someone" at a glance. */
|
|
14979
|
+
const overdueHeaderStyle = {
|
|
14980
|
+
label: 'IncidentCard-overdueHeaderStyle',
|
|
14981
|
+
padding: 'var(--space-2) var(--space-3)',
|
|
14982
|
+
borderRadius: 'var(--radius-lg)',
|
|
14983
|
+
background: 'var(--alert-error-bg)',
|
|
14984
|
+
};
|
|
14985
|
+
const numberStyle = {
|
|
14986
|
+
label: 'IncidentCard-numberStyle',
|
|
14987
|
+
margin: 0,
|
|
14988
|
+
color: 'var(--fg-1)',
|
|
14989
|
+
fontFamily: 'var(--font-family-mono)',
|
|
14990
|
+
fontSize: 'var(--fs-base)',
|
|
14991
|
+
fontWeight: 'var(--fw-semibold)',
|
|
14992
|
+
lineHeight: 'var(--lh-base)',
|
|
14993
|
+
};
|
|
14994
|
+
const syncingStyle = {
|
|
14995
|
+
label: 'IncidentCard-syncingStyle',
|
|
14996
|
+
color: 'var(--fg-3)',
|
|
14997
|
+
fontFamily: 'var(--font-family-base)',
|
|
14998
|
+
fontStyle: 'italic',
|
|
14999
|
+
fontWeight: 'var(--fw-medium)',
|
|
15000
|
+
};
|
|
15001
|
+
const elapsedStyle = {
|
|
15002
|
+
label: 'IncidentCard-elapsedStyle',
|
|
15003
|
+
marginLeft: 'auto',
|
|
15004
|
+
color: 'var(--fg-3)',
|
|
15005
|
+
fontSize: 'var(--fs-sm)',
|
|
15006
|
+
lineHeight: 'var(--lh-sm)',
|
|
15007
|
+
whiteSpace: 'nowrap',
|
|
15008
|
+
};
|
|
15009
|
+
const accountStyle = {
|
|
15010
|
+
label: 'IncidentCard-accountStyle',
|
|
15011
|
+
margin: 0,
|
|
15012
|
+
color: 'var(--fg-1)',
|
|
15013
|
+
fontSize: 'var(--fs-sm)',
|
|
15014
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15015
|
+
lineHeight: 'var(--lh-sm)',
|
|
15016
|
+
overflowWrap: 'anywhere',
|
|
15017
|
+
};
|
|
15018
|
+
const metaStyle$1 = {
|
|
15019
|
+
label: 'IncidentCard-metaStyle',
|
|
15020
|
+
display: 'grid',
|
|
15021
|
+
gridTemplateColumns: 'max-content minmax(0, 1fr)',
|
|
15022
|
+
columnGap: 'var(--space-3)',
|
|
15023
|
+
rowGap: 'var(--space-1)',
|
|
15024
|
+
margin: 0,
|
|
15025
|
+
fontSize: 'var(--fs-sm)',
|
|
15026
|
+
lineHeight: 'var(--lh-sm)',
|
|
15027
|
+
};
|
|
15028
|
+
const metaTermStyle = {
|
|
15029
|
+
label: 'IncidentCard-metaTermStyle',
|
|
15030
|
+
color: 'var(--fg-3)',
|
|
15031
|
+
};
|
|
15032
|
+
const metaValueStyle = {
|
|
15033
|
+
label: 'IncidentCard-metaValueStyle',
|
|
15034
|
+
margin: 0,
|
|
15035
|
+
color: 'var(--fg-1)',
|
|
15036
|
+
overflowWrap: 'anywhere',
|
|
15037
|
+
};
|
|
15038
|
+
const telLinkStyle = {
|
|
15039
|
+
label: 'IncidentCard-telLinkStyle',
|
|
15040
|
+
color: 'var(--fg-link)',
|
|
15041
|
+
fontWeight: 'var(--fw-medium)',
|
|
15042
|
+
whiteSpace: 'nowrap',
|
|
15043
|
+
'&:hover': { color: 'var(--fg-link-hover)' },
|
|
15044
|
+
'&:focus-visible': {
|
|
15045
|
+
outline: '2px solid var(--color-primary)',
|
|
15046
|
+
outlineOffset: 2,
|
|
15047
|
+
},
|
|
15048
|
+
};
|
|
15049
|
+
const narrativeStyle = {
|
|
15050
|
+
label: 'IncidentCard-narrativeStyle',
|
|
15051
|
+
margin: 0,
|
|
15052
|
+
color: 'var(--fg-1)',
|
|
15053
|
+
fontSize: 'var(--fs-sm)',
|
|
15054
|
+
lineHeight: 'var(--lh-sm)',
|
|
15055
|
+
whiteSpace: 'pre-wrap',
|
|
15056
|
+
overflowWrap: 'anywhere',
|
|
15057
|
+
};
|
|
15058
|
+
const loggedByStyle = {
|
|
15059
|
+
label: 'IncidentCard-loggedByStyle',
|
|
15060
|
+
margin: 0,
|
|
15061
|
+
color: 'var(--fg-3)',
|
|
15062
|
+
fontSize: 'var(--fs-xs)',
|
|
15063
|
+
lineHeight: 'var(--lh-xs)',
|
|
15064
|
+
};
|
|
15065
|
+
const sectionStyle$8 = {
|
|
15066
|
+
label: 'IncidentCard-sectionStyle',
|
|
15067
|
+
display: 'flex',
|
|
15068
|
+
flexDirection: 'column',
|
|
15069
|
+
gap: 'var(--space-2)',
|
|
15070
|
+
paddingTop: 'var(--space-3)',
|
|
15071
|
+
borderTop: '1px solid var(--border-color)',
|
|
15072
|
+
};
|
|
15073
|
+
const sectionHeaderStyle$3 = {
|
|
15074
|
+
label: 'IncidentCard-sectionHeaderStyle',
|
|
15075
|
+
display: 'flex',
|
|
15076
|
+
flexWrap: 'wrap',
|
|
15077
|
+
alignItems: 'baseline',
|
|
15078
|
+
justifyContent: 'space-between',
|
|
15079
|
+
gap: 'var(--space-2)',
|
|
15080
|
+
};
|
|
15081
|
+
const sectionTitleStyle$b = {
|
|
15082
|
+
label: 'IncidentCard-sectionTitleStyle',
|
|
15083
|
+
margin: 0,
|
|
15084
|
+
color: 'var(--fg-2)',
|
|
15085
|
+
fontSize: 'var(--fs-xs)',
|
|
15086
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15087
|
+
lineHeight: 'var(--lh-xs)',
|
|
15088
|
+
textTransform: 'uppercase',
|
|
15089
|
+
letterSpacing: '0.04em',
|
|
15090
|
+
};
|
|
15091
|
+
const progressStyle = {
|
|
15092
|
+
label: 'IncidentCard-progressStyle',
|
|
15093
|
+
color: 'var(--fg-2)',
|
|
15094
|
+
fontSize: 'var(--fs-xs)',
|
|
15095
|
+
fontWeight: 'var(--fw-medium)',
|
|
15096
|
+
lineHeight: 'var(--lh-xs)',
|
|
15097
|
+
};
|
|
15098
|
+
const plainListStyle = {
|
|
15099
|
+
label: 'IncidentCard-plainListStyle',
|
|
15100
|
+
display: 'flex',
|
|
15101
|
+
flexDirection: 'column',
|
|
15102
|
+
gap: 'var(--space-2)',
|
|
15103
|
+
margin: 0,
|
|
15104
|
+
padding: 0,
|
|
15105
|
+
listStyle: 'none',
|
|
15106
|
+
};
|
|
15107
|
+
const routeStyle$3 = {
|
|
15108
|
+
label: 'IncidentCard-routeStyle',
|
|
15109
|
+
display: 'flex',
|
|
15110
|
+
flexDirection: 'column',
|
|
15111
|
+
gap: 'var(--space-2)',
|
|
15112
|
+
padding: 'var(--space-2) var(--space-3)',
|
|
15113
|
+
borderRadius: 'var(--radius-lg)',
|
|
15114
|
+
background: 'var(--bg-subtle)',
|
|
15115
|
+
};
|
|
15116
|
+
/* An overdue Route carries the same red edge as its card, so the culprit is obvious. */
|
|
15117
|
+
const routeOverdueStyle = {
|
|
15118
|
+
label: 'IncidentCard-routeOverdueStyle',
|
|
15119
|
+
boxShadow: 'inset 3px 0 0 var(--color-error)',
|
|
15120
|
+
};
|
|
15121
|
+
const routeRowStyle = {
|
|
15122
|
+
label: 'IncidentCard-routeRowStyle',
|
|
15123
|
+
display: 'flex',
|
|
15124
|
+
flexWrap: 'wrap',
|
|
15125
|
+
alignItems: 'center',
|
|
15126
|
+
gap: 'var(--space-2)',
|
|
15127
|
+
};
|
|
15128
|
+
const routeDivisionStyle = {
|
|
15129
|
+
label: 'IncidentCard-routeDivisionStyle',
|
|
15130
|
+
minWidth: '9ch',
|
|
15131
|
+
color: 'var(--fg-1)',
|
|
15132
|
+
fontSize: 'var(--fs-sm)',
|
|
15133
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15134
|
+
lineHeight: 'var(--lh-sm)',
|
|
15135
|
+
};
|
|
15136
|
+
const routeStatusStyle = {
|
|
15137
|
+
label: 'IncidentCard-routeStatusStyle',
|
|
15138
|
+
flex: '1 1 12ch',
|
|
15139
|
+
color: 'var(--fg-2)',
|
|
15140
|
+
fontSize: 'var(--fs-xs)',
|
|
15141
|
+
lineHeight: 'var(--lh-xs)',
|
|
15142
|
+
};
|
|
15143
|
+
const routeAckedStyle = {
|
|
15144
|
+
label: 'IncidentCard-routeAckedStyle',
|
|
15145
|
+
color: 'var(--color-success-ink)',
|
|
15146
|
+
fontWeight: 'var(--fw-medium)',
|
|
15147
|
+
};
|
|
15148
|
+
const overdueTextStyle = {
|
|
15149
|
+
label: 'IncidentCard-overdueTextStyle',
|
|
15150
|
+
color: 'var(--color-error)',
|
|
15151
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15152
|
+
};
|
|
15153
|
+
const routeActionsStyle = {
|
|
15154
|
+
label: 'IncidentCard-routeActionsStyle',
|
|
15155
|
+
display: 'flex',
|
|
15156
|
+
flexWrap: 'wrap',
|
|
15157
|
+
gap: 'var(--space-1-5)',
|
|
15158
|
+
marginLeft: 'auto',
|
|
15159
|
+
};
|
|
15160
|
+
const tripTypeListStyle = {
|
|
15161
|
+
label: 'IncidentCard-tripTypeListStyle',
|
|
15162
|
+
display: 'flex',
|
|
15163
|
+
flexWrap: 'wrap',
|
|
15164
|
+
gap: 'var(--space-1-5)',
|
|
15165
|
+
margin: 0,
|
|
15166
|
+
padding: 0,
|
|
15167
|
+
listStyle: 'none',
|
|
15168
|
+
};
|
|
15169
|
+
const tripTypeChipStyle = {
|
|
15170
|
+
label: 'IncidentCard-tripTypeChipStyle',
|
|
15171
|
+
display: 'inline-flex',
|
|
15172
|
+
alignItems: 'center',
|
|
15173
|
+
gap: 'var(--space-0-5)',
|
|
15174
|
+
paddingLeft: 'var(--space-2)',
|
|
15175
|
+
border: '1px solid var(--border-color)',
|
|
15176
|
+
borderRadius: 'var(--radius-full)',
|
|
15177
|
+
background: 'var(--bg-surface)',
|
|
15178
|
+
color: 'var(--fg-1)',
|
|
15179
|
+
fontSize: 'var(--fs-xs)',
|
|
15180
|
+
fontWeight: 'var(--fw-medium)',
|
|
15181
|
+
lineHeight: 'var(--lh-xs)',
|
|
15182
|
+
};
|
|
15183
|
+
const tripTypeRemoveStyle = {
|
|
15184
|
+
label: 'IncidentCard-tripTypeRemoveStyle',
|
|
15185
|
+
display: 'inline-flex',
|
|
15186
|
+
alignItems: 'center',
|
|
15187
|
+
justifyContent: 'center',
|
|
15188
|
+
width: 'var(--space-6)',
|
|
15189
|
+
height: 'var(--space-6)',
|
|
15190
|
+
padding: 0,
|
|
15191
|
+
border: 0,
|
|
15192
|
+
borderRadius: 'var(--radius-full)',
|
|
15193
|
+
background: 'transparent',
|
|
15194
|
+
color: 'var(--fg-2)',
|
|
15195
|
+
cursor: 'pointer',
|
|
15196
|
+
'&:hover:not(:disabled)': { background: 'var(--bg-subtle)', color: 'var(--fg-1)' },
|
|
15197
|
+
'&:focus-visible': {
|
|
15198
|
+
outline: '2px solid var(--color-primary)',
|
|
15199
|
+
outlineOffset: 1,
|
|
15200
|
+
},
|
|
15201
|
+
'&:disabled': { color: 'var(--fg-disabled)', cursor: 'not-allowed' },
|
|
15202
|
+
};
|
|
15203
|
+
const addTripTypeStyle = {
|
|
15204
|
+
label: 'IncidentCard-addTripTypeStyle',
|
|
15205
|
+
display: 'flex',
|
|
15206
|
+
flexWrap: 'wrap',
|
|
15207
|
+
alignItems: 'flex-end',
|
|
15208
|
+
gap: 'var(--space-2)',
|
|
15209
|
+
'& > :first-child': { flex: '1 1 12rem', minWidth: 0 },
|
|
15210
|
+
};
|
|
15211
|
+
const noteStyle$3 = {
|
|
15212
|
+
label: 'IncidentCard-noteStyle',
|
|
15213
|
+
display: 'flex',
|
|
15214
|
+
flexDirection: 'column',
|
|
15215
|
+
gap: 'var(--space-0-5)',
|
|
15216
|
+
fontSize: 'var(--fs-sm)',
|
|
15217
|
+
lineHeight: 'var(--lh-sm)',
|
|
15218
|
+
};
|
|
15219
|
+
const noteMetaStyle = {
|
|
15220
|
+
label: 'IncidentCard-noteMetaStyle',
|
|
15221
|
+
color: 'var(--fg-3)',
|
|
15222
|
+
fontSize: 'var(--fs-xs)',
|
|
15223
|
+
lineHeight: 'var(--lh-xs)',
|
|
15224
|
+
};
|
|
15225
|
+
const noteAuthorStyle = {
|
|
15226
|
+
label: 'IncidentCard-noteAuthorStyle',
|
|
15227
|
+
color: 'var(--fg-1)',
|
|
15228
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15229
|
+
};
|
|
15230
|
+
const noteTextStyle = {
|
|
15231
|
+
label: 'IncidentCard-noteTextStyle',
|
|
15232
|
+
margin: 0,
|
|
15233
|
+
color: 'var(--fg-1)',
|
|
15234
|
+
whiteSpace: 'pre-wrap',
|
|
15235
|
+
overflowWrap: 'anywhere',
|
|
15236
|
+
};
|
|
15237
|
+
/* System notes record actions, not conversation: muted, italic and marked with an icon. */
|
|
15238
|
+
const systemNoteStyle = {
|
|
15239
|
+
label: 'IncidentCard-systemNoteStyle',
|
|
15240
|
+
display: 'flex',
|
|
15241
|
+
alignItems: 'flex-start',
|
|
15242
|
+
gap: 'var(--space-1-5)',
|
|
15243
|
+
color: 'var(--fg-2)',
|
|
15244
|
+
fontSize: 'var(--fs-xs)',
|
|
15245
|
+
fontStyle: 'italic',
|
|
15246
|
+
lineHeight: 'var(--lh-xs)',
|
|
15247
|
+
'& > svg': { flexShrink: 0 },
|
|
15248
|
+
};
|
|
15249
|
+
const emptyNotesStyle = {
|
|
15250
|
+
label: 'IncidentCard-emptyNotesStyle',
|
|
15251
|
+
margin: 0,
|
|
15252
|
+
color: 'var(--fg-3)',
|
|
15253
|
+
fontSize: 'var(--fs-xs)',
|
|
15254
|
+
lineHeight: 'var(--lh-xs)',
|
|
15255
|
+
};
|
|
15256
|
+
const noteFormStyle = {
|
|
15257
|
+
label: 'IncidentCard-noteFormStyle',
|
|
15258
|
+
display: 'flex',
|
|
15259
|
+
flexDirection: 'column',
|
|
15260
|
+
alignItems: 'flex-end',
|
|
15261
|
+
gap: 'var(--space-2)',
|
|
15262
|
+
'& > :first-child': { alignSelf: 'stretch' },
|
|
15263
|
+
};
|
|
15264
|
+
const disclosureStyle = {
|
|
15265
|
+
label: 'IncidentCard-disclosureStyle',
|
|
15266
|
+
alignSelf: 'flex-start',
|
|
15267
|
+
};
|
|
15268
|
+
/* Textarea's size ramp pins a single-line height; let `rows` set it instead. */
|
|
15269
|
+
const textareaRowsStyle$2 = {
|
|
15270
|
+
label: 'IncidentCard-textareaRowsStyle',
|
|
15271
|
+
'& textarea': { height: 'auto' },
|
|
15272
|
+
};
|
|
15273
|
+
const footerStyle$9 = {
|
|
15274
|
+
label: 'IncidentCard-footerStyle',
|
|
15275
|
+
display: 'flex',
|
|
15276
|
+
flexWrap: 'wrap',
|
|
15277
|
+
alignItems: 'center',
|
|
15278
|
+
justifyContent: 'flex-end',
|
|
15279
|
+
gap: 'var(--space-3)',
|
|
15280
|
+
};
|
|
15281
|
+
const readyStyle = {
|
|
15282
|
+
label: 'IncidentCard-readyStyle',
|
|
15283
|
+
display: 'inline-flex',
|
|
15284
|
+
alignItems: 'center',
|
|
15285
|
+
gap: 'var(--space-1)',
|
|
15286
|
+
marginRight: 'auto',
|
|
15287
|
+
color: 'var(--color-success-ink)',
|
|
15288
|
+
fontSize: 'var(--fs-xs)',
|
|
15289
|
+
fontWeight: 'var(--fw-medium)',
|
|
15290
|
+
lineHeight: 'var(--lh-xs)',
|
|
15291
|
+
};
|
|
15292
|
+
const srOnlyStyle$3 = { label: 'IncidentCard-srOnlyStyle', ...srOnly };
|
|
15293
|
+
|
|
15294
|
+
const NoteItem = ({ note, timeZone }) => {
|
|
15295
|
+
const time = (jsxRuntime.jsx("time", { dateTime: note.createdAt, className: sx(noteMetaStyle), children: formatClockTime(note.createdAt, timeZone) }));
|
|
15296
|
+
if (note.kind === 'system') {
|
|
15297
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(noteStyle$3), sx(systemNoteStyle)), "data-test": "incident-note", "data-kind": "system", children: [jsxRuntime.jsx(InfoIcon$1, { size: 14, "aria-hidden": "true" }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("span", { className: sx(srOnlyStyle$3), children: "Activity: " }), jsxRuntime.jsx("span", { children: note.text }), " \u00B7 ", time] })] }));
|
|
15298
|
+
}
|
|
15299
|
+
return (jsxRuntime.jsxs("div", { className: sx(noteStyle$3), "data-test": "incident-note", "data-kind": "user", children: [jsxRuntime.jsxs("span", { className: sx(noteMetaStyle), children: [jsxRuntime.jsx("span", { className: sx(noteAuthorStyle), title: note.authorEmail, children: note.authorName }), ' ', "\u00B7 ", time] }), jsxRuntime.jsx("p", { className: sx(noteTextStyle), children: note.text })] }));
|
|
15300
|
+
};
|
|
15301
|
+
/**
|
|
15302
|
+
* An Incident's append-only notes: the count and latest note at a glance, and
|
|
15303
|
+
* a disclosure with the whole thread (oldest first) and an Add note box.
|
|
15304
|
+
*/
|
|
15305
|
+
const IncidentNotes = ({ notes, incidentLabel, onAddNote, defaultExpanded = false, timeZone = DEFAULT_INCIDENT_TIME_ZONE, }) => {
|
|
15306
|
+
const id = React.useId();
|
|
15307
|
+
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
15308
|
+
const [draft, setDraft] = React.useState('');
|
|
15309
|
+
const latest = notes[notes.length - 1];
|
|
15310
|
+
const submit = (event) => {
|
|
15311
|
+
event.preventDefault();
|
|
15312
|
+
const text = draft.trim();
|
|
15313
|
+
if (!text)
|
|
15314
|
+
return;
|
|
15315
|
+
onAddNote?.(text);
|
|
15316
|
+
setDraft('');
|
|
15317
|
+
};
|
|
15318
|
+
const toggleLabel = expanded ? 'Hide notes' : notes.length ? `Show all notes (${notes.length})` : 'Add a note';
|
|
15319
|
+
return (jsxRuntime.jsxs("section", { className: sx(sectionStyle$8), "aria-label": `Notes for ${incidentLabel}`, "data-test": "incident-notes", children: [jsxRuntime.jsxs("div", { className: sx(sectionHeaderStyle$3), children: [jsxRuntime.jsx("p", { className: sx(sectionTitleStyle$b), children: "Notes" }), jsxRuntime.jsx("span", { className: sx(noteMetaStyle), "data-test": "incident-note-count", children: notes.length === 1 ? '1 note' : `${notes.length} notes` })] }), !expanded &&
|
|
15320
|
+
(latest ? (jsxRuntime.jsx(NoteItem, { note: latest, timeZone: timeZone })) : (jsxRuntime.jsx("p", { className: sx(emptyNotesStyle), children: "No notes yet." }))), jsxRuntime.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 }), jsxRuntime.jsx("div", { id: `${id}-thread`, hidden: !expanded, children: expanded && (jsxRuntime.jsxs("div", { className: sx(plainListStyle), children: [notes.length > 0 ? (jsxRuntime.jsx("ol", { className: sx(plainListStyle), "aria-label": `All notes for ${incidentLabel}`, children: notes.map((note) => (jsxRuntime.jsx("li", { children: jsxRuntime.jsx(NoteItem, { note: note, timeZone: timeZone }) }, note.id))) })) : (jsxRuntime.jsx("p", { className: sx(emptyNotesStyle), children: "No notes yet." })), jsxRuntime.jsxs("form", { className: sx(noteFormStyle), onSubmit: submit, "aria-label": `Add a note to ${incidentLabel}`, children: [jsxRuntime.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" }), jsxRuntime.jsx(Button, { type: "submit", size: "sm", disabled: !draft.trim(), "data-test": "incident-note-add", children: "Add note" })] })] })) })] }));
|
|
15321
|
+
};
|
|
15322
|
+
IncidentNotes.displayName = 'IncidentNotes';
|
|
15323
|
+
|
|
15324
|
+
/** A Not acknowledged Route turns overdue after this many minutes without acknowledgement. */
|
|
15325
|
+
const DEFAULT_STALE_AFTER_MINUTES = 60;
|
|
15326
|
+
const MINUTE_MS = 60 * 1000;
|
|
15327
|
+
/** Where the Route is in its lifecycle. Complete wins over acknowledged. */
|
|
15328
|
+
const routeStatus = (route) => {
|
|
15329
|
+
if (route.completedAt)
|
|
15330
|
+
return 'complete';
|
|
15331
|
+
if (route.acknowledgedAt)
|
|
15332
|
+
return 'acknowledged';
|
|
15333
|
+
return 'not-acknowledged';
|
|
15334
|
+
};
|
|
15335
|
+
/** Not acknowledged, and at least `staleAfterMinutes` since its own `notifiedAt`. */
|
|
15336
|
+
const isRouteOverdue = (route, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES) => routeStatus(route) === 'not-acknowledged' &&
|
|
15337
|
+
Date.parse(now) - Date.parse(route.notifiedAt) >= staleAfterMinutes * MINUTE_MS;
|
|
15338
|
+
/** The Incident's overdue Routes, in Route order. */
|
|
15339
|
+
const overdueRoutes = (incident, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES) => incident.routes.filter((route) => isRouteOverdue(route, now, staleAfterMinutes));
|
|
15340
|
+
/** True when any Route is overdue. */
|
|
15341
|
+
const isIncidentOverdue = (incident, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES) => overdueRoutes(incident, now, staleAfterMinutes).length > 0;
|
|
15342
|
+
/** Acknowledged (including Complete), Complete and total Route counts. */
|
|
15343
|
+
const routeProgress = (routes) => ({
|
|
15344
|
+
acknowledged: routes.filter((route) => routeStatus(route) !== 'not-acknowledged').length,
|
|
15345
|
+
complete: routes.filter((route) => routeStatus(route) === 'complete').length,
|
|
15346
|
+
total: routes.length,
|
|
15347
|
+
});
|
|
15348
|
+
/** Every Route is Complete — the card hints it is ready to resolve. Never resolves on its own. */
|
|
15349
|
+
const isReadyToResolve = (incident) => incident.routes.length > 0 && incident.routes.every((route) => routeStatus(route) === 'complete');
|
|
15350
|
+
/** A Route always keeps one trip type, so its last one cannot be removed. */
|
|
15351
|
+
const canRemoveTripType = (route) => route.tripTypes.length > 1;
|
|
15352
|
+
/** Trip types the Incident does not have yet, grouped by Division, for the Add trip type control. */
|
|
15353
|
+
const addableTripTypes = (incident) => {
|
|
15354
|
+
const present = new Set(incident.routes.flatMap((route) => route.tripTypes));
|
|
15355
|
+
return DIVISIONS.map((division) => ({
|
|
15356
|
+
division: division.value,
|
|
15357
|
+
tripTypes: division.tripTypes.filter((tripType) => !present.has(tripType)),
|
|
15358
|
+
})).filter((group) => group.tripTypes.length > 0);
|
|
15359
|
+
};
|
|
15360
|
+
/**
|
|
15361
|
+
* Alert Log order: overdue Incidents first, the longest-waiting first (by the
|
|
15362
|
+
* earliest overdue Route's `notifiedAt`); then everything else newest first.
|
|
15363
|
+
*/
|
|
15364
|
+
const orderAlertLog = (incidents, now, staleAfterMinutes = DEFAULT_STALE_AFTER_MINUTES) => {
|
|
15365
|
+
const waitingSince = (incident) => Math.min(...overdueRoutes(incident, now, staleAfterMinutes).map((route) => Date.parse(route.notifiedAt)));
|
|
15366
|
+
const overdue = incidents.filter((incident) => isIncidentOverdue(incident, now, staleAfterMinutes));
|
|
15367
|
+
const rest = incidents.filter((incident) => !isIncidentOverdue(incident, now, staleAfterMinutes));
|
|
15368
|
+
return [
|
|
15369
|
+
...overdue.sort((a, b) => waitingSince(a) - waitingSince(b)),
|
|
15370
|
+
...rest.sort((a, b) => Date.parse(b.createdAt) - Date.parse(a.createdAt)),
|
|
15371
|
+
];
|
|
15372
|
+
};
|
|
15373
|
+
const systemNote = (incident, actor, text) => ({
|
|
15374
|
+
id: `${incident.id}-note-${incident.notes.length + 1}`,
|
|
15375
|
+
authorName: actor.name,
|
|
15376
|
+
authorEmail: actor.email,
|
|
15377
|
+
text: `${actor.name} ${text}`,
|
|
15378
|
+
createdAt: actor.at,
|
|
15379
|
+
kind: 'system',
|
|
15380
|
+
});
|
|
15381
|
+
const updateRoute = (incident, division, actor, note, change) => {
|
|
15382
|
+
if (!incident.routes.some((route) => route.division === division))
|
|
15383
|
+
return incident;
|
|
15384
|
+
return {
|
|
15385
|
+
...incident,
|
|
15386
|
+
routes: incident.routes.map((route) => (route.division === division ? change(route) : route)),
|
|
15387
|
+
notes: [...incident.notes, systemNote(incident, actor, note)],
|
|
15388
|
+
};
|
|
15389
|
+
};
|
|
15390
|
+
/** Not acknowledged → Acknowledged. */
|
|
15391
|
+
const markRouteReceived = (incident, division, actor) => updateRoute(incident, division, actor, `marked ${DIVISION_LABELS[division]} received`, (route) => ({
|
|
15392
|
+
...route,
|
|
15393
|
+
acknowledgedBy: actor.name,
|
|
15394
|
+
acknowledgedByEmail: actor.email,
|
|
15395
|
+
acknowledgedAt: actor.at,
|
|
15396
|
+
}));
|
|
15397
|
+
/** Acknowledged → Complete. A Route that is not acknowledged is left as it is. */
|
|
15398
|
+
const completeRoute = (incident, division, actor) => {
|
|
15399
|
+
const route = incident.routes.find((item) => item.division === division);
|
|
15400
|
+
if (!route || routeStatus(route) !== 'acknowledged')
|
|
15401
|
+
return incident;
|
|
15402
|
+
return updateRoute(incident, division, actor, `marked ${DIVISION_LABELS[division]} complete`, (item) => ({
|
|
15403
|
+
...item,
|
|
15404
|
+
completedBy: actor.name,
|
|
15405
|
+
completedByEmail: actor.email,
|
|
15406
|
+
completedAt: actor.at,
|
|
15407
|
+
}));
|
|
15408
|
+
};
|
|
15409
|
+
/** Any status → Not acknowledged, clearing acknowledgement and completion and restarting the clock. */
|
|
15410
|
+
const renotifyRoute = (incident, division, actor) => updateRoute(incident, division, actor, `re-notified ${DIVISION_LABELS[division]}`, (route) => ({
|
|
15411
|
+
division: route.division,
|
|
15412
|
+
tripTypes: route.tripTypes,
|
|
15413
|
+
notifiedAt: actor.at,
|
|
15414
|
+
}));
|
|
15415
|
+
/** Appends to the Division's Route, or opens a new Not acknowledged Route for it. */
|
|
15416
|
+
const addTripTypeToIncident = (incident, division, tripType, actor) => {
|
|
15417
|
+
if (tripTypeDivision(tripType) !== division)
|
|
15418
|
+
return incident;
|
|
15419
|
+
const existing = incident.routes.find((route) => route.division === division);
|
|
15420
|
+
if (existing?.tripTypes.includes(tripType))
|
|
15421
|
+
return incident;
|
|
15422
|
+
const label = `added ${TRIP_TYPE_LABELS[tripType]} to ${DIVISION_LABELS[division]}`;
|
|
15423
|
+
if (existing) {
|
|
15424
|
+
return updateRoute(incident, division, actor, label, (route) => ({
|
|
15425
|
+
...route,
|
|
15426
|
+
tripTypes: sortTripTypes([...route.tripTypes, tripType]),
|
|
15427
|
+
}));
|
|
15428
|
+
}
|
|
15429
|
+
const order = DIVISIONS.map((item) => item.value);
|
|
15430
|
+
return {
|
|
15431
|
+
...incident,
|
|
15432
|
+
routes: [...incident.routes, { division, tripTypes: [tripType], notifiedAt: actor.at }].sort((a, b) => order.indexOf(a.division) - order.indexOf(b.division)),
|
|
15433
|
+
notes: [...incident.notes, systemNote(incident, actor, label)],
|
|
15434
|
+
};
|
|
15435
|
+
};
|
|
15436
|
+
/** Removes a trip type from its Route, unless it is the Route's last one. */
|
|
15437
|
+
const removeTripTypeFromIncident = (incident, division, tripType, actor) => {
|
|
15438
|
+
const route = incident.routes.find((item) => item.division === division);
|
|
15439
|
+
if (!route || !route.tripTypes.includes(tripType) || !canRemoveTripType(route))
|
|
15440
|
+
return incident;
|
|
15441
|
+
return updateRoute(incident, division, actor, `removed ${TRIP_TYPE_LABELS[tripType]} from ${DIVISION_LABELS[division]}`, (item) => ({ ...item, tripTypes: item.tripTypes.filter((value) => value !== tripType) }));
|
|
15442
|
+
};
|
|
15443
|
+
/** Appends a typed note. Blank text is ignored. */
|
|
15444
|
+
const addNoteToIncident = (incident, text, actor) => {
|
|
15445
|
+
const trimmed = text.trim();
|
|
15446
|
+
if (!trimmed)
|
|
15447
|
+
return incident;
|
|
15448
|
+
return {
|
|
15449
|
+
...incident,
|
|
15450
|
+
notes: [
|
|
15451
|
+
...incident.notes,
|
|
15452
|
+
{
|
|
15453
|
+
id: `${incident.id}-note-${incident.notes.length + 1}`,
|
|
15454
|
+
authorName: actor.name,
|
|
15455
|
+
authorEmail: actor.email,
|
|
15456
|
+
text: trimmed,
|
|
15457
|
+
createdAt: actor.at,
|
|
15458
|
+
kind: 'user',
|
|
15459
|
+
},
|
|
15460
|
+
],
|
|
15461
|
+
};
|
|
15462
|
+
};
|
|
15463
|
+
|
|
15464
|
+
/** `tel:` href from a display number; US 10-digit numbers get +1. */
|
|
15465
|
+
const toTelHref = (phone) => {
|
|
15466
|
+
const digits = phone.replace(/[^\d+]/g, '');
|
|
15467
|
+
return `tel:${/^\d{10}$/.test(digits) ? `+1${digits}` : digits}`;
|
|
15468
|
+
};
|
|
15469
|
+
const LAST_TRIP_TYPE_HINT = 'A Division keeps at least one trip type.';
|
|
15470
|
+
/** One Division's Route: status, lifecycle actions and its trip types. */
|
|
15471
|
+
const RouteItem = ({ incidentId, route, now, staleAfterMinutes, timeZone, lastTripTypeHintId, onMarkReceived, onComplete, onRenotify, onRemoveTripType, }) => {
|
|
15472
|
+
const name = DIVISION_LABELS[route.division];
|
|
15473
|
+
const status = routeStatus(route);
|
|
15474
|
+
const overdue = isRouteOverdue(route, now, staleAfterMinutes);
|
|
15475
|
+
const removable = canRemoveTripType(route);
|
|
15476
|
+
return (jsxRuntime.jsxs("li", { className: cx(sx(routeStyle$3), overdue && sx(routeOverdueStyle)), "data-test": `incident-route-${route.division}`, "data-status": status, "data-overdue": overdue || undefined, children: [jsxRuntime.jsxs("div", { className: sx(routeRowStyle), children: [jsxRuntime.jsx("span", { className: sx(routeDivisionStyle), children: name }), status === 'not-acknowledged' && (jsxRuntime.jsx("span", { className: sx(routeStatusStyle), "data-test": "incident-route-status", children: overdue ? (jsxRuntime.jsxs("span", { className: sx(overdueTextStyle), children: ["Not acknowledged \u00B7 waiting ", formatElapsed(route.notifiedAt, now)] })) : ('Not acknowledged') })), status === 'acknowledged' && (jsxRuntime.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' && (jsxRuntime.jsxs("span", { className: sx(routeStatusStyle), "data-test": "incident-route-status", children: [jsxRuntime.jsx(Badge, { variant: "success", size: "sm", children: "Complete" }), ' ', "by ", route.completedBy, " at ", formatClockTime(route.completedAt, timeZone)] })), jsxRuntime.jsxs("div", { className: sx(routeActionsStyle), children: [status === 'not-acknowledged' && (jsxRuntime.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' && (jsxRuntime.jsx(Button, { size: "sm", variant: "outline", onClick: () => onComplete?.(incidentId, route.division), "aria-label": `Complete ${name}`, "data-test": "incident-complete", children: "Complete" })), jsxRuntime.jsx(Button, { size: "sm", variant: "ghost", onClick: () => onRenotify?.(incidentId, route.division), "aria-label": `Re-notify ${name}`, "data-test": "incident-renotify", children: "Re-notify" })] })] }), jsxRuntime.jsx("ul", { className: sx(tripTypeListStyle), "aria-label": `${name} trip types`, children: route.tripTypes.map((tripType) => {
|
|
15477
|
+
const label = TRIP_TYPE_LABELS[tripType];
|
|
15478
|
+
const remove = (jsxRuntime.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: jsxRuntime.jsx(XIcon, { size: 12, "aria-hidden": "true" }) }));
|
|
15479
|
+
return (jsxRuntime.jsxs("li", { className: sx(tripTypeChipStyle), "data-test": `incident-trip-type-${tripType}`, children: [label, removable ? remove : jsxRuntime.jsx(Tooltip, { content: LAST_TRIP_TYPE_HINT, children: remove })] }, tripType));
|
|
15480
|
+
}) })] }));
|
|
15481
|
+
};
|
|
15482
|
+
/**
|
|
15483
|
+
* One Open Incident in the Alert Log: who called, what happened, each routed
|
|
15484
|
+
* Division with its trip types and lifecycle (Not acknowledged → Acknowledged
|
|
15485
|
+
* → Complete), and an append-only notes thread. Overdue Routes turn the card
|
|
15486
|
+
* red. Resolve is always available and always manual.
|
|
15487
|
+
*/
|
|
15488
|
+
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 = '', }) => {
|
|
15489
|
+
const id = React.useId();
|
|
15490
|
+
const titleId = `${id}-title`;
|
|
15491
|
+
const lastTripTypeHintId = `${id}-last-trip-type`;
|
|
15492
|
+
const Heading = `h${headingLevel}`;
|
|
15493
|
+
const [tripTypeToAdd, setTripTypeToAdd] = React.useState('');
|
|
15494
|
+
const overdueCount = overdueRoutes(incident, now, staleAfterMinutes).length;
|
|
15495
|
+
const overdue = overdueCount > 0;
|
|
15496
|
+
const { acknowledged, complete, total } = routeProgress(incident.routes);
|
|
15497
|
+
const ready = isReadyToResolve(incident);
|
|
15498
|
+
const elapsed = formatElapsed(incident.createdAt, now);
|
|
15499
|
+
const label = incident.number ?? 'syncing incident';
|
|
15500
|
+
const routed = new Set(incident.routes.map((route) => route.division));
|
|
15501
|
+
const addable = addableTripTypes(incident);
|
|
15502
|
+
const addTripType = () => {
|
|
15503
|
+
if (!tripTypeToAdd)
|
|
15504
|
+
return;
|
|
15505
|
+
onAddTripType?.(incident.id, tripTypeDivision(tripTypeToAdd), tripTypeToAdd);
|
|
15506
|
+
setTripTypeToAdd('');
|
|
15507
|
+
};
|
|
15508
|
+
return (jsxRuntime.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: [jsxRuntime.jsxs("div", { className: cx(sx(headerStyle$x), overdue && sx(overdueHeaderStyle)), children: [jsxRuntime.jsx(Heading, { id: titleId, className: sx(numberStyle), children: incident.number ?? (jsxRuntime.jsx("span", { className: sx(syncingStyle), "data-test": "incident-syncing", children: "Syncing\u2026" })) }), overdue && (jsxRuntime.jsxs(Badge, { variant: "error", dot: true, "data-test": "incident-needs-acknowledgement", children: ["Needs acknowledgement (", overdueCount, ")"] })), jsxRuntime.jsx("time", { className: sx(elapsedStyle), dateTime: incident.createdAt, title: `Logged ${formatClockTime(incident.createdAt, timeZone)}`, children: elapsed === 'Just now' ? elapsed : `${elapsed} ago` })] }), jsxRuntime.jsxs("p", { className: sx(accountStyle), children: [incident.accountName, incident.teamName && ` · ${incident.teamName}`] }), jsxRuntime.jsxs("dl", { className: sx(metaStyle$1), children: [jsxRuntime.jsx("dt", { className: sx(metaTermStyle), children: "Lead Division" }), jsxRuntime.jsx("dd", { className: sx(metaValueStyle), children: DIVISION_LABELS[incident.leadDivision] }), jsxRuntime.jsx("dt", { className: sx(metaTermStyle), children: "Caller" }), jsxRuntime.jsxs("dd", { className: sx(metaValueStyle), children: [incident.callerName && `${incident.callerName} · `, jsxRuntime.jsx("a", { className: sx(telLinkStyle), href: toTelHref(incident.callbackNumber), "data-test": "incident-callback", children: incident.callbackNumber })] }), incident.incidentType && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("dt", { className: sx(metaTermStyle), children: "Type" }), jsxRuntime.jsx("dd", { className: sx(metaValueStyle), children: incident.incidentType })] }))] }), jsxRuntime.jsx("p", { className: sx(narrativeStyle), "data-test": "incident-narrative", children: incident.narrative }), jsxRuntime.jsxs("p", { className: sx(loggedByStyle), children: ["Logged by ", incident.loggedBy, " (", DIVISION_LABELS[incident.loggingDivision], ") at", ' ', formatClockTime(incident.createdAt, timeZone)] }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$8), "aria-label": `Routes for ${label}`, children: [jsxRuntime.jsxs("div", { className: sx(sectionHeaderStyle$3), children: [jsxRuntime.jsx("p", { className: sx(sectionTitleStyle$b), children: "Routes" }), jsxRuntime.jsxs("span", { className: sx(progressStyle), "data-test": "incident-progress", children: ["Acknowledged ", acknowledged, "/", total, " \u00B7 Complete ", complete, "/", total] })] }), jsxRuntime.jsx("ul", { className: sx(plainListStyle), children: incident.routes.map((route) => (jsxRuntime.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))) }), jsxRuntime.jsx("span", { id: lastTripTypeHintId, className: sx(srOnlyStyle$3), children: LAST_TRIP_TYPE_HINT }), addable.length > 0 && (jsxRuntime.jsxs("div", { className: sx(addTripTypeStyle), children: [jsxRuntime.jsx(Select, { id: `${id}-add-trip-type`, label: "Add trip type", placeholder: "Choose a trip type", size: "sm", fullWidth: true, optionGroups: addable.map((group) => ({
|
|
15509
|
+
label: routed.has(group.division)
|
|
15510
|
+
? DIVISION_LABELS[group.division]
|
|
15511
|
+
: `${DIVISION_LABELS[group.division]} (new Route)`,
|
|
15512
|
+
options: group.tripTypes.map((tripType) => ({ value: tripType, label: TRIP_TYPE_LABELS[tripType] })),
|
|
15513
|
+
})), value: tripTypeToAdd, onChange: (event) => setTripTypeToAdd(event.target.value), "data-test": "incident-add-trip-type-select" }), jsxRuntime.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" })] }))] }), jsxRuntime.jsx(IncidentNotes, { notes: incident.notes, incidentLabel: label, timeZone: timeZone, defaultExpanded: defaultNotesExpanded, onAddNote: (text) => onAddNote?.(incident.id, text) }), jsxRuntime.jsxs("div", { className: sx(footerStyle$9), children: [ready && (jsxRuntime.jsxs("span", { className: sx(readyStyle), "data-test": "incident-ready-to-resolve", children: [jsxRuntime.jsx(CheckIcon$1, { size: 14, "aria-hidden": "true" }), "Every Route is complete \u2014 ready to resolve"] })), jsxRuntime.jsx(Button, { size: "sm", variant: "primary", onClick: () => onResolve?.(incident.id), "aria-label": `Resolve ${label}`, "data-test": "incident-resolve", children: "Resolve" })] })] }));
|
|
15514
|
+
};
|
|
15515
|
+
IncidentCard.displayName = 'IncidentCard';
|
|
15516
|
+
|
|
15517
|
+
/** IncidentIntakeForm's compiled rules. Compact by design: the target is intake in under a minute. */
|
|
15518
|
+
const formStyle$5 = {
|
|
15519
|
+
label: 'IncidentIntakeForm-formStyle',
|
|
15520
|
+
display: 'flex',
|
|
15521
|
+
flexDirection: 'column',
|
|
15522
|
+
gap: 'var(--space-3)',
|
|
15523
|
+
minWidth: 0,
|
|
15524
|
+
};
|
|
15525
|
+
const rowStyle$5 = {
|
|
15526
|
+
label: 'IncidentIntakeForm-rowStyle',
|
|
15527
|
+
display: 'grid',
|
|
15528
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(13rem, 1fr))',
|
|
15529
|
+
gap: 'var(--space-3)',
|
|
15530
|
+
};
|
|
15531
|
+
const fieldsetStyle$1 = {
|
|
15532
|
+
label: 'IncidentIntakeForm-fieldsetStyle',
|
|
15533
|
+
display: 'flex',
|
|
15534
|
+
flexDirection: 'column',
|
|
15535
|
+
gap: 'var(--space-1-5)',
|
|
15536
|
+
minWidth: 0,
|
|
15537
|
+
margin: 0,
|
|
15538
|
+
padding: 0,
|
|
15539
|
+
border: 0,
|
|
15540
|
+
};
|
|
15541
|
+
const legendStyle$2 = {
|
|
15542
|
+
label: 'IncidentIntakeForm-legendStyle',
|
|
15543
|
+
marginBottom: 'var(--space-1-5)',
|
|
15544
|
+
padding: 0,
|
|
15545
|
+
color: 'var(--fg-1)',
|
|
15546
|
+
fontSize: 'var(--fs-sm)',
|
|
15547
|
+
fontWeight: 'var(--fw-medium)',
|
|
15548
|
+
};
|
|
15549
|
+
const groupGridStyle = {
|
|
15550
|
+
label: 'IncidentIntakeForm-groupGridStyle',
|
|
15551
|
+
display: 'grid',
|
|
15552
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(9rem, 1fr))',
|
|
15553
|
+
gap: 'var(--space-2)',
|
|
15554
|
+
};
|
|
15555
|
+
/* One Division's trip types. A group with a ticked trip type is outlined: that Division gets a Route. */
|
|
15556
|
+
const divisionGroupStyle = {
|
|
15557
|
+
label: 'IncidentIntakeForm-divisionGroupStyle',
|
|
15558
|
+
minWidth: 0,
|
|
15559
|
+
margin: 0,
|
|
15560
|
+
padding: 'var(--space-2) var(--space-3)',
|
|
15561
|
+
border: '1px solid var(--border-color)',
|
|
15562
|
+
borderRadius: 'var(--radius-lg)',
|
|
15563
|
+
};
|
|
15564
|
+
const groupTickedStyle = {
|
|
15565
|
+
label: 'IncidentIntakeForm-groupTickedStyle',
|
|
15566
|
+
borderColor: 'var(--color-primary)',
|
|
15567
|
+
background: 'var(--bg-subtle)',
|
|
15568
|
+
};
|
|
15569
|
+
const groupLegendStyle = {
|
|
15570
|
+
label: 'IncidentIntakeForm-groupLegendStyle',
|
|
15571
|
+
padding: '0 var(--space-1)',
|
|
15572
|
+
color: 'var(--fg-2)',
|
|
15573
|
+
fontSize: 'var(--fs-xs)',
|
|
15574
|
+
fontWeight: 'var(--fw-semibold)',
|
|
15575
|
+
textTransform: 'uppercase',
|
|
15576
|
+
letterSpacing: '0.04em',
|
|
15577
|
+
};
|
|
15578
|
+
const tripTypeRowStyle = {
|
|
15579
|
+
label: 'IncidentIntakeForm-tripTypeRowStyle',
|
|
15580
|
+
display: 'flex',
|
|
15581
|
+
flexWrap: 'wrap',
|
|
15582
|
+
gap: 'var(--space-1-5) var(--space-3)',
|
|
15583
|
+
};
|
|
15584
|
+
const errorTextStyle = {
|
|
15585
|
+
label: 'IncidentIntakeForm-errorTextStyle',
|
|
15586
|
+
margin: 0,
|
|
15587
|
+
color: 'var(--color-error)',
|
|
15588
|
+
fontSize: 'var(--fs-xs)',
|
|
15589
|
+
};
|
|
15590
|
+
const helperTextStyle = {
|
|
15591
|
+
label: 'IncidentIntakeForm-helperTextStyle',
|
|
15592
|
+
margin: 0,
|
|
15593
|
+
color: 'var(--fg-3)',
|
|
15594
|
+
fontSize: 'var(--fs-xs)',
|
|
15595
|
+
};
|
|
15596
|
+
const footerStyle$8 = {
|
|
15597
|
+
label: 'IncidentIntakeForm-footerStyle',
|
|
15598
|
+
display: 'flex',
|
|
15599
|
+
flexWrap: 'wrap',
|
|
15600
|
+
alignItems: 'flex-end',
|
|
15601
|
+
justifyContent: 'flex-end',
|
|
15602
|
+
gap: 'var(--space-3)',
|
|
15603
|
+
paddingTop: 'var(--space-1)',
|
|
15604
|
+
};
|
|
15605
|
+
const actionsStyle$7 = {
|
|
15606
|
+
label: 'IncidentIntakeForm-actionsStyle',
|
|
15607
|
+
display: 'flex',
|
|
15608
|
+
gap: 'var(--space-2)',
|
|
15609
|
+
marginLeft: 'auto',
|
|
15610
|
+
};
|
|
15611
|
+
/* Textarea's size ramp pins a single-line height; let `rows` set it instead. */
|
|
15612
|
+
const textareaRowsStyle$1 = {
|
|
15613
|
+
label: 'IncidentIntakeForm-textareaRowsStyle',
|
|
15614
|
+
'& textarea': { height: 'auto' },
|
|
15615
|
+
};
|
|
15616
|
+
/* Select's own error text uses an off-token red that fails contrast; restate Input's error token. */
|
|
15617
|
+
const selectErrorTokenStyle = {
|
|
15618
|
+
label: 'IncidentIntakeForm-selectErrorTokenStyle',
|
|
15619
|
+
'& [id$="-error"]': { color: 'var(--color-error)' },
|
|
15620
|
+
};
|
|
15621
|
+
|
|
15622
|
+
const DIVISION_OPTIONS = DIVISIONS.map((division) => ({ value: division.value, label: division.label }));
|
|
15623
|
+
const FIELD_ORDER = ['account', 'callbackNumber', 'loggingDivision', 'tripTypes', 'narrative'];
|
|
15624
|
+
const emptyValues = (loggingDivision) => ({
|
|
15625
|
+
accountName: '',
|
|
15626
|
+
teamId: '',
|
|
15627
|
+
callbackNumber: '',
|
|
15628
|
+
callerName: '',
|
|
15629
|
+
loggingDivision,
|
|
15630
|
+
tripTypes: [],
|
|
15631
|
+
leadDivision: loggingDivision,
|
|
15632
|
+
incidentType: '',
|
|
15633
|
+
narrative: '',
|
|
15634
|
+
});
|
|
15635
|
+
/** Divisions with at least one ticked trip type, in display order — one Route each. */
|
|
15636
|
+
const divisionsForTripTypes = (tripTypes) => DIVISIONS.map((division) => division.value).filter((division) => tripTypes.some((tripType) => tripTypeDivision(tripType) === division));
|
|
15637
|
+
const findAccount = (accounts, name) => accounts.find((account) => account.name.toLowerCase() === name.trim().toLowerCase());
|
|
15638
|
+
/** The validation message per field, or nothing when the field is fine. */
|
|
15639
|
+
const validateIncidentIntake = (values, accounts) => {
|
|
15640
|
+
const errors = {};
|
|
15641
|
+
if (!values.accountName.trim())
|
|
15642
|
+
errors.account = 'Enter the client or account.';
|
|
15643
|
+
else if (!findAccount(accounts, values.accountName))
|
|
15644
|
+
errors.account = 'Choose an account from the list.';
|
|
15645
|
+
const digits = values.callbackNumber.replace(/\D/g, '');
|
|
15646
|
+
if (!digits)
|
|
15647
|
+
errors.callbackNumber = 'Enter a callback number.';
|
|
15648
|
+
else if (digits.length < 7)
|
|
15649
|
+
errors.callbackNumber = 'Callback number needs at least 7 digits.';
|
|
15650
|
+
if (!values.loggingDivision)
|
|
15651
|
+
errors.loggingDivision = 'Choose the Division you are logging as.';
|
|
15652
|
+
if (values.tripTypes.length === 0)
|
|
15653
|
+
errors.tripTypes = 'Tick at least one trip type.';
|
|
15654
|
+
if (!values.narrative.trim())
|
|
15655
|
+
errors.narrative = 'Describe the issue.';
|
|
15656
|
+
return errors;
|
|
15657
|
+
};
|
|
15658
|
+
/**
|
|
15659
|
+
* The "New incident" intake form. Trip types are ticked under their Division;
|
|
15660
|
+
* every Division with a ticked trip type gets one Route. Lead Division follows
|
|
15661
|
+
* Logging as until changed by hand; picking a Lead Division with nothing
|
|
15662
|
+
* ticked ticks its first trip type. Team is hidden when Agency leads.
|
|
15663
|
+
*/
|
|
15664
|
+
const IncidentIntakeForm = ({ accounts, defaultLoggingDivision, onSubmit, onLoggingDivisionChange, onCancel, submitting = false, ariaLabel = 'New incident', className = '', }) => {
|
|
15665
|
+
const id = React.useId();
|
|
15666
|
+
const [values, setValues] = React.useState(() => emptyValues(defaultLoggingDivision ?? ''));
|
|
15667
|
+
const [leadTouched, setLeadTouched] = React.useState(false);
|
|
15668
|
+
const [attempted, setAttempted] = React.useState(false);
|
|
15669
|
+
const fieldRefs = React.useRef({});
|
|
15670
|
+
const account = findAccount(accounts, values.accountName);
|
|
15671
|
+
const teamOptions = React.useMemo(() => (account?.teams ?? []).map((team) => ({ value: team.id, label: team.name })), [account]);
|
|
15672
|
+
const showTeam = values.leadDivision !== 'agency';
|
|
15673
|
+
const errors = attempted ? validateIncidentIntake(values, accounts) : {};
|
|
15674
|
+
const ticked = divisionsForTripTypes(values.tripTypes);
|
|
15675
|
+
const set = (key, value) => setValues((current) => ({ ...current, [key]: value }));
|
|
15676
|
+
const changeLogging = (division) => {
|
|
15677
|
+
setValues((current) => ({
|
|
15678
|
+
...current,
|
|
15679
|
+
loggingDivision: division,
|
|
15680
|
+
leadDivision: leadTouched ? current.leadDivision : division,
|
|
15681
|
+
}));
|
|
15682
|
+
onLoggingDivisionChange?.(division);
|
|
15683
|
+
};
|
|
15684
|
+
const changeLead = (division) => {
|
|
15685
|
+
setLeadTouched(true);
|
|
15686
|
+
setValues((current) => {
|
|
15687
|
+
const hasRoute = current.tripTypes.some((tripType) => tripTypeDivision(tripType) === division);
|
|
15688
|
+
const first = DIVISIONS.find((item) => item.value === division).tripTypes[0];
|
|
15689
|
+
return {
|
|
15690
|
+
...current,
|
|
15691
|
+
leadDivision: division,
|
|
15692
|
+
tripTypes: hasRoute ? current.tripTypes : sortTripTypes([...current.tripTypes, first]),
|
|
15693
|
+
};
|
|
15694
|
+
});
|
|
15695
|
+
};
|
|
15696
|
+
const toggleTripType = (tripType, checked) => setValues((current) => ({
|
|
15697
|
+
...current,
|
|
15698
|
+
tripTypes: checked
|
|
15699
|
+
? sortTripTypes([...current.tripTypes, tripType])
|
|
15700
|
+
: current.tripTypes.filter((value) => value !== tripType),
|
|
15701
|
+
}));
|
|
15702
|
+
const handleSubmit = (event) => {
|
|
15703
|
+
event.preventDefault();
|
|
15704
|
+
setAttempted(true);
|
|
15705
|
+
const found = validateIncidentIntake(values, accounts);
|
|
15706
|
+
const firstInvalid = FIELD_ORDER.find((key) => found[key]);
|
|
15707
|
+
if (firstInvalid) {
|
|
15708
|
+
fieldRefs.current[firstInvalid]?.focus();
|
|
15709
|
+
return;
|
|
15710
|
+
}
|
|
15711
|
+
const loggingDivision = values.loggingDivision;
|
|
15712
|
+
onSubmit({
|
|
15713
|
+
accountId: account.id,
|
|
15714
|
+
teamId: showTeam && values.teamId ? values.teamId : undefined,
|
|
15715
|
+
callbackNumber: values.callbackNumber.trim(),
|
|
15716
|
+
callerName: values.callerName.trim() || undefined,
|
|
15717
|
+
loggingDivision,
|
|
15718
|
+
tripTypes: values.tripTypes,
|
|
15719
|
+
divisions: divisionsForTripTypes(values.tripTypes),
|
|
15720
|
+
leadDivision: (values.leadDivision || loggingDivision),
|
|
15721
|
+
incidentType: values.incidentType.trim() || undefined,
|
|
15722
|
+
narrative: values.narrative.trim(),
|
|
15723
|
+
priority: 'routine',
|
|
15724
|
+
});
|
|
15725
|
+
setValues(emptyValues(loggingDivision));
|
|
15726
|
+
setLeadTouched(false);
|
|
15727
|
+
setAttempted(false);
|
|
15728
|
+
};
|
|
15729
|
+
return (jsxRuntime.jsxs("form", { className: cx(sx(formStyle$5), className), "aria-label": ariaLabel, noValidate: true, onSubmit: handleSubmit, "data-test": "incident-intake-form", children: [jsxRuntime.jsxs("div", { className: sx(rowStyle$5), children: [jsxRuntime.jsx(Input, { id: `${id}-account`, ref: (node) => {
|
|
15730
|
+
fieldRefs.current.account = node;
|
|
15731
|
+
}, 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" }), jsxRuntime.jsx("datalist", { id: `${id}-accounts`, children: accounts.map((option) => (jsxRuntime.jsx("option", { value: option.name }, option.id))) }), showTeam && (jsxRuntime.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" }))] }), jsxRuntime.jsxs("div", { className: sx(rowStyle$5), children: [jsxRuntime.jsx(Input, { id: `${id}-callback`, ref: (node) => {
|
|
15732
|
+
fieldRefs.current.callbackNumber = node;
|
|
15733
|
+
}, 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" }), jsxRuntime.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" })] }), jsxRuntime.jsxs("div", { className: sx(rowStyle$5), children: [jsxRuntime.jsx(Select, { id: `${id}-logging`, ref: (node) => {
|
|
15734
|
+
fieldRefs.current.loggingDivision = node;
|
|
15735
|
+
}, 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" }), jsxRuntime.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" })] }), jsxRuntime.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: [jsxRuntime.jsx("legend", { className: sx(legendStyle$2), children: "Trip types involved" }), jsxRuntime.jsx("div", { className: sx(groupGridStyle), children: DIVISIONS.map((division, groupIndex) => (jsxRuntime.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: [jsxRuntime.jsx("legend", { className: sx(groupLegendStyle), children: division.label }), jsxRuntime.jsx("div", { className: sx(tripTypeRowStyle), children: division.tripTypes.map((tripType, index) => (jsxRuntime.jsx(Checkbox, { ref: groupIndex === 0 && index === 0
|
|
15736
|
+
? (node) => {
|
|
15737
|
+
fieldRefs.current.tripTypes = node;
|
|
15738
|
+
}
|
|
15739
|
+
: 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 ? (jsxRuntime.jsx("p", { id: `${id}-trip-types-error`, className: sx(errorTextStyle), children: errors.tripTypes })) : (jsxRuntime.jsx("p", { id: `${id}-trip-types-help`, className: sx(helperTextStyle), children: "Each Division with a ticked trip type is notified." }))] }), jsxRuntime.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" }), jsxRuntime.jsx(Textarea, { id: `${id}-narrative`, ref: (node) => {
|
|
15740
|
+
fieldRefs.current.narrative = node;
|
|
15741
|
+
}, 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) }), jsxRuntime.jsx("div", { className: sx(footerStyle$8), children: jsxRuntime.jsxs("div", { className: sx(actionsStyle$7), children: [onCancel && (jsxRuntime.jsx(Button, { type: "button", variant: "secondary", onClick: onCancel, "data-test": "incident-intake-cancel", children: "Cancel" })), jsxRuntime.jsx(Button, { type: "submit", variant: "primary", loading: submitting, "data-test": "incident-intake-submit", children: "Log incident" })] }) })] }));
|
|
15742
|
+
};
|
|
15743
|
+
IncidentIntakeForm.displayName = 'IncidentIntakeForm';
|
|
15744
|
+
|
|
14761
15745
|
/**
|
|
14762
15746
|
* Explicit specificity keeps service and cancellation border colors stable
|
|
14763
15747
|
* regardless of style injection order: base < type (`&&`) < cancelled (`&&&`).
|
|
@@ -16223,7 +17207,7 @@ const scrollBodyStyle = {
|
|
|
16223
17207
|
minHeight: 0,
|
|
16224
17208
|
overflowY: 'auto',
|
|
16225
17209
|
};
|
|
16226
|
-
const bodyStyle$
|
|
17210
|
+
const bodyStyle$5 = {
|
|
16227
17211
|
label: 'Module-bodyStyle',
|
|
16228
17212
|
flex: 1,
|
|
16229
17213
|
fontSize: 14,
|
|
@@ -16296,7 +17280,7 @@ const Module = ({ title, icon, iconClassName = '', badge, before, children, afte
|
|
|
16296
17280
|
setOpen(!open);
|
|
16297
17281
|
}
|
|
16298
17282
|
};
|
|
16299
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(moduleStyle), className), children: [title && (jsxRuntime.jsx("div", { className: cx(sx(headerStyle$u), sx(headerSizeStyles[size]), !open && sx(closedStyle), headerClassName), children: jsxRuntime.jsxs("div", { className: cx(sx(titleRowStyle$1), sx(titleRowSizeStyles[size]), titleClassName), children: [icon && (jsxRuntime.jsx("span", { className: cx(sx(iconStyle$1), size !== 'sm' && sx(iconSpacedStyle), iconClassName), children: icon })), jsxRuntime.jsx("div", { className: sx(titleStyle$r), children: title }), badge && jsxRuntime.jsx("span", { className: sx(badgeStyle$1), children: badge }), jsxRuntime.jsxs("div", { className: sx(toolsStyle), children: [tools, useToggle && (jsxRuntime.jsx("button", { type: "button", className: sx(toggleBtnStyle), onClick: handleToggle, "aria-expanded": open, children: jsxRuntime.jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxRuntime.jsxs("div", { className: cx(sx(bodyWrapperStyle), scrollBody && sx(scrollBodyStyle)), children: [before, jsxRuntime.jsx("div", { className: cx(sx(bodyStyle$
|
|
17283
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(moduleStyle), className), children: [title && (jsxRuntime.jsx("div", { className: cx(sx(headerStyle$u), sx(headerSizeStyles[size]), !open && sx(closedStyle), headerClassName), children: jsxRuntime.jsxs("div", { className: cx(sx(titleRowStyle$1), sx(titleRowSizeStyles[size]), titleClassName), children: [icon && (jsxRuntime.jsx("span", { className: cx(sx(iconStyle$1), size !== 'sm' && sx(iconSpacedStyle), iconClassName), children: icon })), jsxRuntime.jsx("div", { className: sx(titleStyle$r), children: title }), badge && jsxRuntime.jsx("span", { className: sx(badgeStyle$1), children: badge }), jsxRuntime.jsxs("div", { className: sx(toolsStyle), children: [tools, useToggle && (jsxRuntime.jsx("button", { type: "button", className: sx(toggleBtnStyle), onClick: handleToggle, "aria-expanded": open, children: jsxRuntime.jsx(ChevronIcon, { direction: open ? 'up' : 'down' }) }))] })] }) })), jsxRuntime.jsxs("div", { className: cx(sx(bodyWrapperStyle), scrollBody && sx(scrollBodyStyle)), children: [before, jsxRuntime.jsx("div", { className: cx(sx(bodyStyle$5), sx(bodySizeStyles[size]), !open && sx(hiddenStyle), bodyClassName), children: children }), after] }), footer && (jsxRuntime.jsx("div", { className: cx(sx(footerStyle$6), !open && sx(hiddenStyle)), children: footer }))] }));
|
|
16300
17284
|
};
|
|
16301
17285
|
/**
|
|
16302
17286
|
* Horizontal divider for Module content
|
|
@@ -18284,6 +19268,82 @@ const RequestSummary = ({ sections, values, enabledSections = {}, submissionInfo
|
|
|
18284
19268
|
};
|
|
18285
19269
|
RequestSummary.displayName = 'RequestSummary';
|
|
18286
19270
|
|
|
19271
|
+
/** ResolveIncidentDialog's compiled rules. */
|
|
19272
|
+
const bodyStyle$4 = {
|
|
19273
|
+
label: 'ResolveIncidentDialog-bodyStyle',
|
|
19274
|
+
display: 'flex',
|
|
19275
|
+
flexDirection: 'column',
|
|
19276
|
+
gap: 'var(--space-4)',
|
|
19277
|
+
};
|
|
19278
|
+
const fieldsetStyle = {
|
|
19279
|
+
label: 'ResolveIncidentDialog-fieldsetStyle',
|
|
19280
|
+
display: 'flex',
|
|
19281
|
+
flexDirection: 'column',
|
|
19282
|
+
gap: 'var(--space-2)',
|
|
19283
|
+
margin: 0,
|
|
19284
|
+
padding: 0,
|
|
19285
|
+
border: 0,
|
|
19286
|
+
};
|
|
19287
|
+
const legendStyle$1 = {
|
|
19288
|
+
label: 'ResolveIncidentDialog-legendStyle',
|
|
19289
|
+
marginBottom: 'var(--space-2)',
|
|
19290
|
+
padding: 0,
|
|
19291
|
+
color: 'var(--fg-1)',
|
|
19292
|
+
fontSize: 'var(--fs-sm)',
|
|
19293
|
+
fontWeight: 'var(--fw-medium)',
|
|
19294
|
+
};
|
|
19295
|
+
const noteStyle$2 = {
|
|
19296
|
+
label: 'ResolveIncidentDialog-noteStyle',
|
|
19297
|
+
margin: 0,
|
|
19298
|
+
color: 'var(--fg-2)',
|
|
19299
|
+
fontSize: 'var(--fs-sm)',
|
|
19300
|
+
lineHeight: 'var(--lh-sm)',
|
|
19301
|
+
};
|
|
19302
|
+
/* Textarea's size ramp pins a single-line height; let `rows` set it instead. */
|
|
19303
|
+
const textareaRowsStyle = {
|
|
19304
|
+
label: 'ResolveIncidentDialog-textareaRowsStyle',
|
|
19305
|
+
'& textarea': { height: 'auto' },
|
|
19306
|
+
};
|
|
19307
|
+
|
|
19308
|
+
/**
|
|
19309
|
+
* Closes an Open Incident, taking it off the Alert Log and into the Archive.
|
|
19310
|
+
* "Resolved" requires a root cause; "Logged in error" needs none. There is no
|
|
19311
|
+
* reopening, so the confirm button says exactly what it does.
|
|
19312
|
+
*/
|
|
19313
|
+
const ResolveIncidentDialog = ({ isOpen, incidentNumber, accountName, unacknowledgedCount = 0, defaultResolution = 'resolved', onConfirm, onClose, submitting = false, }) => {
|
|
19314
|
+
const id = React.useId();
|
|
19315
|
+
const formId = `${id}-form`;
|
|
19316
|
+
const [resolution, setResolution] = React.useState(defaultResolution);
|
|
19317
|
+
const [rootCause, setRootCause] = React.useState('');
|
|
19318
|
+
const [attempted, setAttempted] = React.useState(false);
|
|
19319
|
+
const firstRadioRef = React.useRef(null);
|
|
19320
|
+
const rootCauseRef = React.useRef(null);
|
|
19321
|
+
React.useEffect(() => {
|
|
19322
|
+
if (!isOpen)
|
|
19323
|
+
return;
|
|
19324
|
+
setResolution(defaultResolution);
|
|
19325
|
+
setRootCause('');
|
|
19326
|
+
setAttempted(false);
|
|
19327
|
+
firstRadioRef.current?.focus();
|
|
19328
|
+
}, [isOpen, defaultResolution]);
|
|
19329
|
+
const rootCauseError = attempted && resolution === 'resolved' && !rootCause.trim() ? 'Enter the root cause.' : undefined;
|
|
19330
|
+
const handleSubmit = (event) => {
|
|
19331
|
+
event.preventDefault();
|
|
19332
|
+
setAttempted(true);
|
|
19333
|
+
if (resolution === 'resolved') {
|
|
19334
|
+
if (!rootCause.trim()) {
|
|
19335
|
+
rootCauseRef.current?.focus();
|
|
19336
|
+
return;
|
|
19337
|
+
}
|
|
19338
|
+
onConfirm({ resolution, rootCause: rootCause.trim() });
|
|
19339
|
+
return;
|
|
19340
|
+
}
|
|
19341
|
+
onConfirm({ resolution });
|
|
19342
|
+
};
|
|
19343
|
+
return (jsxRuntime.jsx(Modal, { isOpen: isOpen, onClose: onClose, size: "sm", title: incidentNumber ? `Resolve ${incidentNumber}` : 'Resolve incident', subtitle: accountName, footer: jsxRuntime.jsxs(ModalFooter, { children: [jsxRuntime.jsx(Button, { type: "button", variant: "secondary", onClick: onClose, "data-test": "resolve-incident-cancel", children: "Cancel" }), jsxRuntime.jsx(Button, { type: "submit", form: formId, loading: submitting, "data-test": "resolve-incident-confirm", children: resolution === 'resolved' ? 'Resolve incident' : 'Close as logged in error' })] }), children: jsxRuntime.jsxs("form", { id: formId, className: sx(bodyStyle$4), noValidate: true, onSubmit: handleSubmit, children: [jsxRuntime.jsxs("fieldset", { className: sx(fieldsetStyle), children: [jsxRuntime.jsx("legend", { className: sx(legendStyle$1), children: "Outcome" }), jsxRuntime.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" }), jsxRuntime.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' && (jsxRuntime.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 && (jsxRuntime.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."] }))] }) }));
|
|
19344
|
+
};
|
|
19345
|
+
ResolveIncidentDialog.displayName = 'ResolveIncidentDialog';
|
|
19346
|
+
|
|
18287
19347
|
/* RequestFormLayout's compiled rules.
|
|
18288
19348
|
*
|
|
18289
19349
|
* The chrome shared by every Hub travel request form. The offsets here are
|
|
@@ -29887,7 +30947,7 @@ const TripTable = ({ trips, variant = 'current', density = 'comfortable', vendor
|
|
|
29887
30947
|
* `.card:hover .chevron`), so the icon and the chevron are declared first and
|
|
29888
30948
|
* their generated class names resolved into `cardStyle` as computed keys.
|
|
29889
30949
|
*/
|
|
29890
|
-
const pageStyle$
|
|
30950
|
+
const pageStyle$u = {
|
|
29891
30951
|
label: 'AdministrationPage-pageStyle',
|
|
29892
30952
|
color: 'var(--color-ink)',
|
|
29893
30953
|
};
|
|
@@ -30024,10 +31084,10 @@ const AdministrationPage = ({ activeTab = 'system', enabledTabs = ADMINISTRATION
|
|
|
30024
31084
|
const resolvedActiveTab = visibleTabs.some((tab) => tab.key === activeTab)
|
|
30025
31085
|
? activeTab
|
|
30026
31086
|
: visibleTabs[0]?.key;
|
|
30027
|
-
return jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
31087
|
+
return jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$u), className), children: [jsxRuntime.jsx("header", { className: sx(headerStyle$n), children: jsxRuntime.jsx("h1", { children: "Administration\u00A0" }) }), visibleTabs.length > 0 && (jsxRuntime.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' ? (jsxRuntime.jsx("div", { className: sx(cardsStyle$1), children: resolvedCards.map((card) => (jsxRuntime.jsxs("button", { type: "button", className: sx(cardStyle$5), onClick: () => onCardClick?.(card), children: [jsxRuntime.jsx("span", { className: sx(cardIconStyle$1), children: card.icon }), jsxRuntime.jsxs("span", { className: sx(cardCopyStyle), children: [jsxRuntime.jsx("span", { className: sx(cardTitleStyle$2), children: card.title }), jsxRuntime.jsx("span", { className: sx(cardDescriptionStyle$1), children: card.description })] }), jsxRuntime.jsx(ChevronRightIcon$1, { className: sx(chevronStyle), size: 14 })] }, card.key))) })) : resolvedActiveTab === 'client' ? (jsxRuntime.jsx("p", { className: sx(comingSoonStyle), children: "Client administration settings coming soon." })) : (jsxRuntime.jsx("p", { className: sx(comingSoonStyle), "data-test": "administration-empty-tabs", children: "No administration sections are available." })))] });
|
|
30028
31088
|
};
|
|
30029
31089
|
|
|
30030
|
-
const pageStyle$
|
|
31090
|
+
const pageStyle$t = {
|
|
30031
31091
|
label: 'AgentGroupTravelRequestsPage-pageStyle',
|
|
30032
31092
|
display: 'flex',
|
|
30033
31093
|
flexDirection: 'column',
|
|
@@ -30064,12 +31124,12 @@ const quickLinksStyle = {
|
|
|
30064
31124
|
};
|
|
30065
31125
|
|
|
30066
31126
|
/** Hub's agent-facing Group Travel Request screen — the "Book a Trip" quick links plus the open-requests list. */
|
|
30067
|
-
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 = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
31127
|
+
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 = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$t), className), "data-test": "agent-gtr-page", children: [jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$9), onClick: onBackToBookATrip, children: "Book a Trip" }), jsxRuntime.jsx("h1", { className: sx(titleStyle$j), children: title }), jsxRuntime.jsxs("ul", { className: sx(quickLinksStyle), children: [jsxRuntime.jsx("li", { children: jsxRuntime.jsx(Button, { variant: "ghost", onClick: onSubmitNewRequest, children: "Submit a new group travel request" }) }), isStmEmployee && (jsxRuntime.jsx("li", { children: jsxRuntime.jsx(Button, { variant: "ghost", onClick: onSubmitAgentRequest, children: "Submit a new group travel request (agent use only)" }) })), jsxRuntime.jsx("li", { children: jsxRuntime.jsx(Button, { variant: "ghost", onClick: onSearchPastRequests, children: "Search past travel requests/Non-agent-only requests" }) }), isStmEmployee && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("li", { children: jsxRuntime.jsx(Button, { variant: "ghost", onClick: onShowCdsRequests, children: "Show all open CDS group travel requests" }) }), jsxRuntime.jsx("li", { children: jsxRuntime.jsx(Button, { variant: "ghost", onClick: onShowActionableItems, children: "Show this week's actionable items" }) }), jsxRuntime.jsx("li", { children: jsxRuntime.jsx(Button, { variant: "ghost", onClick: onAdministerViews, children: "Administer your views" }) })] }))] }), jsxRuntime.jsx(AgentGroupTravelRequestsTable, { requests: requests, sports: sports, views: views, today: today, onOpenRequest: onOpenRequest, onViewMasterTrip: onViewMasterTrip, onDeleteRequest: onDeleteRequest, onCopyPnr: onCopyPnr, onToggleDueStatus: onToggleDueStatus, onSubmittedDateChange: onSubmittedDateChange, onQuoteSentDateChange: onQuoteSentDateChange })] }));
|
|
30068
31128
|
|
|
30069
31129
|
/** CarrierProfilePage's compiled rules. A straight translation: the only
|
|
30070
31130
|
* overrides are the mobile media query, which is nested into the two styles
|
|
30071
31131
|
* it repadded, and an at-rule always outranks the declaration beside it. */
|
|
30072
|
-
const pageStyle$
|
|
31132
|
+
const pageStyle$s = {
|
|
30073
31133
|
label: 'CarrierProfilePage-pageStyle',
|
|
30074
31134
|
display: 'flex',
|
|
30075
31135
|
flexDirection: 'column',
|
|
@@ -30098,7 +31158,7 @@ const titleStyle$i = {
|
|
|
30098
31158
|
fontWeight: 'var(--fw-semibold)',
|
|
30099
31159
|
lineHeight: 'var(--lh-2xl)',
|
|
30100
31160
|
};
|
|
30101
|
-
const descriptionStyle$
|
|
31161
|
+
const descriptionStyle$9 = {
|
|
30102
31162
|
label: 'CarrierProfilePage-descriptionStyle',
|
|
30103
31163
|
maxWidth: '72ch',
|
|
30104
31164
|
margin: 0,
|
|
@@ -30320,12 +31380,12 @@ const CarrierProfilePage = ({ carrierName, preferences: initialPreferences, cate
|
|
|
30320
31380
|
render: (_value, item) => (jsxRuntime.jsxs("span", { className: sx(rowActionsStyle), children: [canEditAircraft && (jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", square: true, "aria-label": `Edit ${item.name}`, onClick: () => onEditAircraft?.(item.aircraftId), "data-test": "carrier-aircraft-edit", children: jsxRuntime.jsx(EditIcon$2, { size: 16 }) })), canDeleteAircraft && (jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", square: true, "aria-label": `Delete ${item.name}`, onClick: () => onDeleteAircraft?.(item.aircraftId), "data-test": "carrier-aircraft-delete", children: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) }))] })),
|
|
30321
31381
|
}] : []),
|
|
30322
31382
|
];
|
|
30323
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
31383
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$s), className), "data-test": "carrier-profile-page", children: [onBack && (jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$8), leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "carrier-profile-back", children: backLabel })), jsxRuntime.jsxs("header", { className: sx(headerStyle$m), children: [jsxRuntime.jsx("h1", { className: sx(titleStyle$i), children: "My Profile" }), jsxRuntime.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." })] }), jsxRuntime.jsx(Segment, { options: TAB_OPTIONS$2, value: tab, onChange: selectTab, "aria-label": "Profile section", className: sx(tabsStyle$4) }), tab === 'profile' && (jsxRuntime.jsxs("section", { className: sx(panelStyle$1), "aria-label": "Preferences", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$7), children: "Preferences" }), jsxRuntime.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." }), jsxRuntime.jsxs("div", { className: sx(formStyle$2), children: [jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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 && (jsxRuntime.jsx(Button, { className: sx(saveStyle), onClick: () => onSavePreferences?.(preferences), "data-test": "carrier-save-preferences", children: "Save" }))] })), tab === 'contacts' && (jsxRuntime.jsxs("section", { className: sx(panelStyle$1), "aria-label": "Contacts", children: [jsxRuntime.jsxs("h2", { className: sx(sectionTitleStyle$7), children: [carrierName, " contacts"] }), jsxRuntime.jsx(Table, { columns: contactColumns, data: contacts, rowKey: "contactId", emptyContent: jsxRuntime.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 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("h3", { className: sx(subTitleStyle), children: "Add a contact" }), jsxRuntime.jsxs("div", { className: sx(formStyle$2), children: [jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" })] }), jsxRuntime.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" }), jsxRuntime.jsx(Button, { className: sx(saveStyle), onClick: submitContact, "data-test": "carrier-contact-submit", children: "Add contact" })] }))] })), tab === 'aircraft' && (jsxRuntime.jsxs("section", { className: sx(panelStyle$1), "aria-label": "Aircraft", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$7), children: "Aircraft and seat maps" }), jsxRuntime.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." }), jsxRuntime.jsx(Table, { columns: aircraftColumns, data: aircraft, rowKey: "aircraftId", emptyContent: jsxRuntime.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." }) })] }))] }));
|
|
30324
31384
|
};
|
|
30325
31385
|
CarrierProfilePage.displayName = 'CarrierProfilePage';
|
|
30326
31386
|
|
|
30327
31387
|
/** ChampionshipBidDetailPage's compiled rules. */
|
|
30328
|
-
const pageStyle$
|
|
31388
|
+
const pageStyle$r = {
|
|
30329
31389
|
label: 'ChampionshipBidDetailPage-pageStyle',
|
|
30330
31390
|
display: 'flex',
|
|
30331
31391
|
flexDirection: 'column',
|
|
@@ -30480,7 +31540,7 @@ const ChampionshipBidDetailPage = ({ bid, loading = false, backLabel = 'NCAA Cha
|
|
|
30480
31540
|
const currency = React.useMemo(() => new Intl.NumberFormat(locale, { style: 'currency', currency: 'USD' }), [locale]);
|
|
30481
31541
|
const numbers = React.useMemo(() => new Intl.NumberFormat(locale), [locale]);
|
|
30482
31542
|
const status = bid ? detailStatus(bid) : undefined;
|
|
30483
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
31543
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$r), className), "data-test": "championship-bid-detail-page", children: [onBack && (jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", className: sx(breadcrumbStyle$7), leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "championship-bid-detail-back", children: backLabel })), loading ? (jsxRuntime.jsxs("div", { className: sx(loadingStyle), "data-test": "championship-bid-detail-loading", children: [jsxRuntime.jsx(Spinner, { size: "lg", label: "Loading championship bid detail" }), jsxRuntime.jsx("p", { children: "Loading championship bid detail\u2026" })] })) : bid && status ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("header", { className: sx(headerStyle$l), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("span", { className: sx(eyebrowStyle$6), children: ["NCAA Championship bid \u00B7 ", bid.bidId] }), jsxRuntime.jsx("h1", { className: sx(titleStyle$h), children: bid.bidName })] }), jsxRuntime.jsx("span", { "data-test": "championship-bid-detail-status", children: jsxRuntime.jsx(StatusBadge, { status: status.status, label: status.label }) })] }), jsxRuntime.jsxs("section", { className: sx(panelStyle), "aria-labelledby": "championship-bid-details-heading", children: [jsxRuntime.jsx("h2", { id: "championship-bid-details-heading", children: "Bid details" }), jsxRuntime.jsxs("dl", { className: sx(factsStyle$4), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Aircraft" }), jsxRuntime.jsx("dd", { children: bid.aircraftName || 'Not provided' })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Seats" }), jsxRuntime.jsx("dd", { children: bid.seats === undefined ? 'Not provided' : numbers.format(bid.seats) })] }), jsxRuntime.jsxs("div", { className: sx(totalFactStyle$1), children: [jsxRuntime.jsx("dt", { children: "Total cost" }), jsxRuntime.jsx("dd", { "data-test": "championship-bid-detail-total", children: bid.totalCost === undefined ? 'Not provided' : currency.format(bid.totalCost) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Cities" }), jsxRuntime.jsx("dd", { children: bid.cities || 'Not provided' })] })] })] }), jsxRuntime.jsxs("section", { className: sx(panelStyle), "aria-labelledby": "championship-bid-notes-heading", children: [jsxRuntime.jsx("h2", { id: "championship-bid-notes-heading", children: "Carrier notes" }), jsxRuntime.jsxs("div", { className: sx(notesGridStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h3", { children: "Restrictions" }), jsxRuntime.jsx("p", { children: bid.restrictions || 'No restrictions provided.' })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h3", { children: "Comments" }), jsxRuntime.jsx("p", { children: bid.comments || 'No comments provided.' })] })] })] }), jsxRuntime.jsxs("section", { className: sx(panelStyle), "aria-labelledby": "championship-bid-contract-heading", children: [jsxRuntime.jsx("h2", { id: "championship-bid-contract-heading", children: "Contract" }), jsxRuntime.jsxs("div", { className: sx(contractStyle), "data-test": "championship-bid-detail-contract", children: [jsxRuntime.jsx(DocumentIcon, { size: 20, "aria-hidden": "true" }), jsxRuntime.jsx("span", { children: bid.contractFileName || 'No contract on file' })] })] })] })) : (jsxRuntime.jsx("div", { "data-test": "championship-bid-detail-empty", children: jsxRuntime.jsx(EmptyState$1, { title: "Championship bid detail unavailable", description: "Return to the championship queue and select an available opportunity.", icon: jsxRuntime.jsx(DocumentIcon, { size: 30 }) }) }))] }));
|
|
30484
31544
|
};
|
|
30485
31545
|
ChampionshipBidDetailPage.displayName = 'ChampionshipBidDetailPage';
|
|
30486
31546
|
|
|
@@ -30492,7 +31552,7 @@ ChampionshipBidDetailPage.displayName = 'ChampionshipBidDetailPage';
|
|
|
30492
31552
|
* declaration block in the sheet; they are separate elements, so each keeps its
|
|
30493
31553
|
* own object.
|
|
30494
31554
|
*/
|
|
30495
|
-
const pageStyle$
|
|
31555
|
+
const pageStyle$q = {
|
|
30496
31556
|
label: 'ChampionshipBidsPage-pageStyle',
|
|
30497
31557
|
display: 'flex',
|
|
30498
31558
|
flexDirection: 'column',
|
|
@@ -30521,7 +31581,7 @@ const titleStyle$g = {
|
|
|
30521
31581
|
fontWeight: 'var(--fw-semibold)',
|
|
30522
31582
|
lineHeight: 'var(--lh-2xl)',
|
|
30523
31583
|
};
|
|
30524
|
-
const descriptionStyle$
|
|
31584
|
+
const descriptionStyle$8 = {
|
|
30525
31585
|
label: 'ChampionshipBidsPage-descriptionStyle',
|
|
30526
31586
|
maxWidth: '72ch',
|
|
30527
31587
|
margin: 0,
|
|
@@ -30691,7 +31751,7 @@ const ChampionshipBidsPage = ({ bids, bidType: controlledBidType, defaultBidType
|
|
|
30691
31751
|
render: (_value, bid) => onOpenBid ? (jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: () => onOpenBid(bid.bidId), "data-test": "championship-rebid", children: "Bid anyway" })) : jsxRuntime.jsx("span", { className: sx(mutedStyle), children: "\u2014" }),
|
|
30692
31752
|
});
|
|
30693
31753
|
}
|
|
30694
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
31754
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$q), className), "data-test": "championship-bids-page", children: [onBack && (jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$6), leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "championship-bids-back", children: backLabel })), jsxRuntime.jsxs("header", { className: sx(headerStyle$k), children: [jsxRuntime.jsx("h1", { className: sx(titleStyle$g), children: CHAMPIONSHIP_HEADINGS[bidType] }), jsxRuntime.jsx("p", { className: sx(descriptionStyle$8), children: "NCAA championship charter opportunities released to you. Award confirmations and signed contracts live in the Awarded queue." })] }), jsxRuntime.jsx(Segment, { options: TAB_OPTIONS$1, value: bidType, onChange: selectBidType, "aria-label": "Championship bid queue", className: sx(tabsStyle$3) }), jsxRuntime.jsx(Table, { columns: columns, data: pageBids, rowKey: "bidId", loading: loading, emptyContent: jsxRuntime.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." }) }), jsxRuntime.jsx(Pagination, { page: currentPage, pageSize: pageSize, totalItems: bids.length, itemLabel: "bids", ariaLabel: "Championship bids pagination", onPageChange: setPage, onPageSizeChange: (nextSize) => {
|
|
30695
31755
|
setPageSize(nextSize);
|
|
30696
31756
|
setPage(1);
|
|
30697
31757
|
} })] }));
|
|
@@ -30706,7 +31766,7 @@ ChampionshipBidsPage.displayName = 'ChampionshipBidsPage';
|
|
|
30706
31766
|
* eye on is `.breadcrumb`'s `!important`, which overrides the Breadcrumb
|
|
30707
31767
|
* component's own padding and has to survive the move verbatim.
|
|
30708
31768
|
*/
|
|
30709
|
-
const pageStyle$
|
|
31769
|
+
const pageStyle$p = {
|
|
30710
31770
|
label: 'CharterBidResponsePage-pageStyle',
|
|
30711
31771
|
display: 'flex',
|
|
30712
31772
|
flexDirection: 'column',
|
|
@@ -30854,12 +31914,12 @@ const CharterBidResponsePage = ({ program, trips, accountName, tripLevel = true,
|
|
|
30854
31914
|
const blockedReason = noBid || pricedInputs
|
|
30855
31915
|
? undefined
|
|
30856
31916
|
: 'Price the trip with the calculator before submitting, or tick “No Bid” to decline.';
|
|
30857
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
31917
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$p), className), "data-test": "charter-bid-response-page", children: [onBack && (jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$5), leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "charter-bid-back", children: backLabel })), jsxRuntime.jsxs("header", { className: sx(headerStyle$j), children: [jsxRuntime.jsx("span", { className: sx(eyebrowStyle$5), children: "Bid response" }), jsxRuntime.jsx("h1", { className: sx(titleStyle$f), children: tripLevel ? trips[0]?.tripName : program.bidName })] }), jsxRuntime.jsxs("section", { className: sx(summaryStyle$3), "aria-label": "Team overview", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$6), children: "Team Overview" }), jsxRuntime.jsxs("dl", { className: sx(factsStyle$3), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Team" }), jsxRuntime.jsx("dd", { children: accountName })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Sport" }), jsxRuntime.jsx("dd", { children: program.sport })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Season" }), jsxRuntime.jsx("dd", { children: program.season })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Year" }), jsxRuntime.jsx("dd", { children: program.year })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Due Date" }), jsxRuntime.jsx("dd", { children: formatDate$3(program.dueDate, locale) })] })] })] }), trips.map((trip, index) => (jsxRuntime.jsxs("section", { className: sx(summaryStyle$3), "aria-label": `Trip ${index + 1}`, children: [jsxRuntime.jsxs("h2", { className: sx(sectionTitleStyle$6), children: ["Trip ", index + 1] }), jsxRuntime.jsxs("p", { className: sx(tripMetaStyle), children: [jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: "Bid Type:" }), " ", trip.bidType] }), acmiCarrier && requestedCarrier && (jsxRuntime.jsxs("span", { "data-test": "charter-bid-requested-carrier", children: [jsxRuntime.jsx("strong", { children: "Requested Carrier:" }), " ", requestedCarrier] }))] }), jsxRuntime.jsxs("dl", { className: sx(factsStyle$3), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Depart Date" }), jsxRuntime.jsx("dd", { children: formatDate$3(trip.departureDate, locale) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Travel Party Size" }), jsxRuntime.jsx("dd", { children: trip.travelPartySize })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Route" }), jsxRuntime.jsx("dd", { children: trip.route })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Expires" }), jsxRuntime.jsx("dd", { children: formatDate$3(trip.expirationDate, locale) })] })] })] }, trip.tripGuid))), jsxRuntime.jsxs("section", { className: sx(calculatorStyle), "aria-label": "ACMI calculator", children: [jsxRuntime.jsxs("div", { className: sx(calculatorHeaderStyle), children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$6), children: "Price this trip" }), jsxRuntime.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 ? (jsxRuntime.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." })) : (jsxRuntime.jsx(AcmiQuoteCalculator, { defaultInputs: defaultInputs, result: acmiResult, onCalculate: handleCalculate, locale: locale }))] }), jsxRuntime.jsxs("div", { className: sx(submitBarStyle), children: [jsxRuntime.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" }), jsxRuntime.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 && (jsxRuntime.jsx("p", { className: sx(blockedReasonStyle$1), "data-test": "charter-bid-blocked-reason", children: blockedReason }))] })] }));
|
|
30858
31918
|
};
|
|
30859
31919
|
CharterBidResponsePage.displayName = 'CharterBidResponsePage';
|
|
30860
31920
|
|
|
30861
31921
|
/** CharterBidViewPage's compiled rules. */
|
|
30862
|
-
const pageStyle$
|
|
31922
|
+
const pageStyle$o = {
|
|
30863
31923
|
label: 'CharterBidViewPage-pageStyle',
|
|
30864
31924
|
display: 'flex',
|
|
30865
31925
|
flexDirection: 'column',
|
|
@@ -31043,7 +32103,7 @@ const SUBMISSION_LABELS = {
|
|
|
31043
32103
|
const CharterBidViewPage = ({ program, trip, bids = [], processingSubmission, onRefresh, backLabel = 'Regular Season Bids', onBack, locale = 'en-US', className = '', }) => {
|
|
31044
32104
|
const currency = React.useMemo(() => new Intl.NumberFormat(locale, { style: 'currency', currency: 'USD' }), [locale]);
|
|
31045
32105
|
const numbers = React.useMemo(() => new Intl.NumberFormat(locale), [locale]);
|
|
31046
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
32106
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$o), className), "data-test": "charter-bid-view-page", children: [onBack && (jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$4), leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "charter-bid-view-back", children: backLabel })), jsxRuntime.jsxs("header", { className: sx(headerStyle$i), children: [jsxRuntime.jsx("span", { className: sx(eyebrowStyle$4), children: "Bid response" }), jsxRuntime.jsx("h1", { className: sx(titleStyle$e), children: trip ? trip.tripName : program.bidName }), jsxRuntime.jsxs("p", { className: sx(subtitleStyle$4), children: [program.team, " \u00B7 ", program.sport, " \u00B7 ", program.season, " ", program.year] })] }), bids.length > 0 && (jsxRuntime.jsx("ol", { className: sx(bidsStyle), children: bids.map((bid, index) => (jsxRuntime.jsxs("li", { className: sx(bidStyle), "data-test": "charter-submitted-bid", children: [jsxRuntime.jsxs("div", { className: sx(bidHeaderStyle), children: [jsxRuntime.jsxs("h2", { className: sx(bidTitleStyle), children: ["Bid ", index + 1] }), jsxRuntime.jsx(StatusBadge, { status: "submitted" })] }), jsxRuntime.jsxs("dl", { className: sx(factsStyle$2), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Seats" }), jsxRuntime.jsx("dd", { children: bid.seats })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Max Payload (lbs)" }), jsxRuntime.jsx("dd", { children: numbers.format(bid.maxPayloadLbs) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Fuel Base ($)" }), jsxRuntime.jsx("dd", { children: currency.format(bid.fuelBasePrice) })] }), jsxRuntime.jsxs("div", { className: sx(totalFactStyle), children: [jsxRuntime.jsx("dt", { children: "Total Cost ($)" }), jsxRuntime.jsx("dd", { "data-test": "charter-bid-total", children: currency.format(bid.totalCost) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Catering Options" }), jsxRuntime.jsx("dd", { children: bid.cateringAvailable })] })] }), bid.notesFromOperator && bid.notesFromOperator.length > 0 && (jsxRuntime.jsxs("div", { className: sx(notesStyle), children: [jsxRuntime.jsx("h3", { className: sx(notesTitleStyle), children: "Notes from Operator" }), jsxRuntime.jsx("ul", { className: sx(notesListStyle), "data-test": "charter-bid-notes", children: bid.notesFromOperator.map((note) => (jsxRuntime.jsx("li", { children: note }, note))) })] }))] }, bid.id))) })), bids.length === 0 && processingSubmission && (jsxRuntime.jsxs("div", { className: sx(processingStyle), "data-test": "charter-bid-processing", children: [jsxRuntime.jsx(Spinner, { size: "lg", label: "Parsing your submission" }), jsxRuntime.jsx("h2", { className: sx(processingTitleStyle), children: "We are still reading your bid" }), jsxRuntime.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 && (jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: onRefresh, "data-test": "charter-bid-refresh", children: "Check again" }))] })), bids.length === 0 && !processingSubmission && (jsxRuntime.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." }))] }));
|
|
31047
32107
|
};
|
|
31048
32108
|
CharterBidViewPage.displayName = 'CharterBidViewPage';
|
|
31049
32109
|
|
|
@@ -31056,7 +32116,7 @@ CharterBidViewPage.displayName = 'CharterBidViewPage';
|
|
|
31056
32116
|
* members here, with the group's declarations first and the member's own after,
|
|
31057
32117
|
* so the last value still wins.
|
|
31058
32118
|
*/
|
|
31059
|
-
const pageStyle$
|
|
32119
|
+
const pageStyle$n = {
|
|
31060
32120
|
label: 'CharterManifestPage-pageStyle',
|
|
31061
32121
|
display: 'flex',
|
|
31062
32122
|
flexDirection: 'column',
|
|
@@ -31476,7 +32536,7 @@ const CharterManifestPage = ({ tripName, travelStartDate, travelEndDate, seats,
|
|
|
31476
32536
|
}
|
|
31477
32537
|
return a.lastName.localeCompare(b.lastName);
|
|
31478
32538
|
}), [passengers, sort]);
|
|
31479
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
32539
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$n), className), "data-screen-label": "Charter Trip Manifest", children: [jsxRuntime.jsxs("header", { className: sx(headerStyle$h), children: [jsxRuntime.jsxs("div", { className: sx(headerRowStyle$1), children: [jsxRuntime.jsx("button", { type: "button", "aria-label": "Back", className: sx(backStyle), onClick: onBack, children: jsxRuntime.jsx(ChevronLeftIcon, { size: 28 }) }), jsxRuntime.jsxs("h1", { children: [jsxRuntime.jsx("strong", { children: "Manifest" }), jsxRuntime.jsx(ChevronRightIcon$1, { size: 24 }), jsxRuntime.jsx("span", { children: tripName })] }), jsxRuntime.jsxs("div", { className: sx(headerActionsStyle), children: [jsxRuntime.jsx(StatusPill, { sendState: sendState, locked: locked }), jsxRuntime.jsx(Button, { variant: "outline", leftIcon: jsxRuntime.jsx(DocumentIcon, { size: 16 }), disabled: carrierName === 'No carrier selected', onClick: onGenerateFile, children: "Generate File" })] })] }), (travelStartDate || travelEndDate) && (jsxRuntime.jsxs("div", { className: sx(dateRowStyle), children: [jsxRuntime.jsx("span", { children: formatDate$2(travelStartDate) }), jsxRuntime.jsx("span", { className: sx(dateLineStyle), children: "\u25B6" }), jsxRuntime.jsx("span", { children: formatDate$2(travelEndDate) })] })), jsxRuntime.jsxs("div", { className: sx(metaRowStyle), children: [jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx(PlaneIcon$3, { size: 16 }), seats, " seats"] }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx(CubeIcon, { size: 16 }), "Payload limit ", payloadLimit.toLocaleString(), " lb"] })] })] }), jsxRuntime.jsxs("div", { className: sx(layoutStyle), children: [jsxRuntime.jsxs("aside", { className: sx(railStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: sx(eyebrowStyle$3), children: "Flight Manifest" }), jsxRuntime.jsx("div", { className: sx(scopeListStyle), children: [{ id: 'all', label: 'Full Trip', detail: 'All flight segments' }, ...segments].map((item) => (jsxRuntime.jsxs("button", { type: "button", className: cx(sx(scopeStyle), scope === item.id ? sx(activeScopeStyle) : ''), onClick: () => setScope(item.id), children: [jsxRuntime.jsx("strong", { children: item.label }), jsxRuntime.jsx("span", { children: item.detail })] }, item.id))) })] }), segments.length > 0 && (jsxRuntime.jsx(Button, { variant: "outline", size: "sm", disabled: locked, onClick: onSplitSegments, children: "Split by Segment" })), jsxRuntime.jsxs("div", { className: sx(carrierCardStyle), children: [jsxRuntime.jsx("div", { className: sx(eyebrowStyle$3), children: "Carrier" }), jsxRuntime.jsx("strong", { children: carrierName }), jsxRuntime.jsx("p", { children: carrierNote }), jsxRuntime.jsx(Button, { variant: "outline", size: "sm", fullWidth: true, disabled: locked, leftIcon: jsxRuntime.jsx(SettingsIcon, { size: 15 }), onClick: onChangeCarrier, children: "Change Carrier" })] })] }), jsxRuntime.jsxs("main", { className: sx(mainStyle$2), children: [jsxRuntime.jsx("section", { className: sx(capacityCardStyle), children: jsxRuntime.jsx(ManifestCapacityStats, { paxCount: passengers.length, seats: seats, paxWeight: passengerWeight, cargoWeight: cargoWeight, payloadLimit: payloadLimit }) }), jsxRuntime.jsxs("div", { className: sx(viewRowStyle), children: [jsxRuntime.jsx(ManifestViewToggle, { view: view, onView: setView, paxCount: passengers.length, eqCount: equipment.length, locked: locked }), locked && jsxRuntime.jsx("span", { className: sx(lockedMessageStyle), children: "Locked \u2014 coordinate any changes directly with the carrier." })] }), view === 'passengers' ? (jsxRuntime.jsxs("section", { children: [!locked && (jsxRuntime.jsxs("div", { className: sx(tableActionsStyle), children: [jsxRuntime.jsxs("strong", { children: [passengers.length, " Passengers"] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { children: "Order by" }), jsxRuntime.jsx("span", { className: sx(sortToggleStyle), children: ['name', 'type'].map((option) => (jsxRuntime.jsx("button", { type: "button", className: sort === option ? sx(activeSortStyle) : '', onClick: () => setSort(option), children: option }, option))) }), jsxRuntime.jsx(Button, { size: "sm", leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 15 }), onClick: onAddPassengers, children: "Add Passengers" })] })] })), jsxRuntime.jsx("div", { className: sx(tableWrapStyle$3), children: jsxRuntime.jsxs("table", { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { children: "#" }), jsxRuntime.jsx("th", { children: "Passenger" }), jsxRuntime.jsx("th", { children: "Type" }), jsxRuntime.jsx("th", { children: "TSA Screening" }), jsxRuntime.jsx("th", { children: "Personal" }), jsxRuntime.jsx("th", { children: "Carry-On" }), jsxRuntime.jsx("th", { children: "Checked" }), jsxRuntime.jsx("th", { children: "Seat" }), jsxRuntime.jsx("th", {})] }) }), jsxRuntime.jsxs("tbody", { children: [!sortedPassengers.length && jsxRuntime.jsx("tr", { children: jsxRuntime.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) => (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: index + 1 }), jsxRuntime.jsxs("td", { children: [jsxRuntime.jsx("strong", { children: passenger.lastName }), jsxRuntime.jsxs("span", { children: [", ", passenger.firstName] })] }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(TypeTag, { type: passenger.travelerType }) }), jsxRuntime.jsx("td", { children: passenger.screeningType || '—' }), jsxRuntime.jsxs("td", { children: [passenger.personalWeight ?? 0, " lb"] }), jsxRuntime.jsxs("td", { children: [passenger.carryOnWeight ?? 0, " lb"] }), jsxRuntime.jsxs("td", { children: [passenger.checkedWeight ?? 0, " lb"] }), jsxRuntime.jsx("td", { children: passenger.seatAssignment || '—' }), jsxRuntime.jsx("td", { children: !locked && jsxRuntime.jsx("button", { type: "button", "aria-label": `Remove ${passenger.firstName} ${passenger.lastName}`, className: sx(removeStyle), onClick: () => onRemovePassenger?.(passenger), children: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) }) })] }, passenger.id)))] })] }) })] })) : (jsxRuntime.jsxs("section", { children: [!locked && jsxRuntime.jsxs("div", { className: sx(tableActionsStyle), children: [jsxRuntime.jsxs("strong", { children: [equipment.length, " Equipment Items"] }), jsxRuntime.jsx(Button, { size: "sm", leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 15 }), onClick: onAddEquipment, children: "Add Equipment" })] }), jsxRuntime.jsx("div", { className: sx(tableWrapStyle$3), children: jsxRuntime.jsxs("table", { children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { children: "Equipment" }), jsxRuntime.jsx("th", { children: "Quantity" }), jsxRuntime.jsx("th", { children: "Weight" }), jsxRuntime.jsx("th", { children: "Total" }), jsxRuntime.jsx("th", {})] }) }), jsxRuntime.jsx("tbody", { children: equipment.map((item) => jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: jsxRuntime.jsx("strong", { children: item.name }) }), jsxRuntime.jsx("td", { children: item.quantity }), jsxRuntime.jsxs("td", { children: [item.weight.toLocaleString(), " lb"] }), jsxRuntime.jsxs("td", { children: [(item.quantity * item.weight).toLocaleString(), " lb"] }), jsxRuntime.jsx("td", { children: !locked && jsxRuntime.jsx("button", { type: "button", "aria-label": `Remove ${item.name}`, className: sx(removeStyle), onClick: () => onRemoveEquipment?.(item), children: jsxRuntime.jsx(TrashIcon$2, { size: 16 }) }) })] }, item.id)) })] }) })] })), !locked && (jsxRuntime.jsxs("section", { className: sx(finalizeStyle), children: [jsxRuntime.jsx(StatusPill, { sendState: sendState, locked: false }), jsxRuntime.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.' }), jsxRuntime.jsxs("div", { className: sx(finalizeActionsStyle), children: [sendState === 'none' && jsxRuntime.jsx(Button, { onClick: onSendInitial, children: "Send Initial Manifest" }), sendState === 'initial-sent' && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button, { onClick: onSendFinal, children: "Send Final Manifest" }), jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: onUndoInitial, children: "Undo initial" })] })] })] }))] })] })] }));
|
|
31480
32540
|
};
|
|
31481
32541
|
|
|
31482
32542
|
/**
|
|
@@ -31495,7 +32555,7 @@ const mutedCopy = {
|
|
|
31495
32555
|
margin: 0,
|
|
31496
32556
|
color: 'var(--color-slate)',
|
|
31497
32557
|
};
|
|
31498
|
-
const pageStyle$
|
|
32558
|
+
const pageStyle$m = {
|
|
31499
32559
|
label: 'ChartersAccessManagementPage-pageStyle',
|
|
31500
32560
|
maxWidth: 1180,
|
|
31501
32561
|
margin: '0 auto',
|
|
@@ -31540,7 +32600,7 @@ const eyebrowStyle$2 = {
|
|
|
31540
32600
|
letterSpacing: '.04em',
|
|
31541
32601
|
textTransform: 'uppercase',
|
|
31542
32602
|
};
|
|
31543
|
-
const descriptionStyle$
|
|
32603
|
+
const descriptionStyle$7 = {
|
|
31544
32604
|
label: 'ChartersAccessManagementPage-descriptionStyle',
|
|
31545
32605
|
...mutedCopy,
|
|
31546
32606
|
maxWidth: 700,
|
|
@@ -31867,7 +32927,7 @@ const ChartersAccessManagementPage = ({ accountName, memberships, availableAccou
|
|
|
31867
32927
|
const addUnavailableReason = !onAddAccess
|
|
31868
32928
|
? 'Adding STM Charters access is not available in this view.'
|
|
31869
32929
|
: undefined;
|
|
31870
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
32930
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$m), className), "data-test": "charters-access-management-page", children: [jsxRuntime.jsxs("header", { className: sx(headerStyle$g), children: [onBack && (jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "charters-access-back", children: "STM Charters" })), jsxRuntime.jsxs("div", { className: sx(headingRowStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("p", { className: sx(eyebrowStyle$2), children: ["STM Charters \u00B7 ", accountName] }), jsxRuntime.jsx("h1", { children: "Access Management" }), jsxRuntime.jsx("p", { className: sx(descriptionStyle$7), children: "Grant account users access to charter bids and choose who can manage membership." })] }), jsxRuntime.jsxs("div", { className: sx(summaryStyle$2), "aria-label": "Access summary", children: [jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: memberships.length }), " members"] }), jsxRuntime.jsxs("span", { children: [jsxRuntime.jsx("strong", { children: adminCount }), " admins"] })] })] })] }), loading && (jsxRuntime.jsxs("div", { className: sx(pageStateStyle$1), "data-test": "charters-access-loading", children: [jsxRuntime.jsx(Spinner, { size: "lg", label: "Loading STM Charters access" }), jsxRuntime.jsx("p", { children: "Loading STM Charters access\u2026" })] })), !loading && error && (jsxRuntime.jsxs("div", { className: sx(pageStateStyle$1), "data-test": "charters-access-error", children: [jsxRuntime.jsx(Alert, { variant: "error", title: "Access could not be loaded", children: error }), onRetry && (jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onRetry, "data-test": "charters-access-retry", children: "Try again" }))] })), !loading && !error && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [actionError && (jsxRuntime.jsx(Alert, { variant: "error", title: "Access change failed", dismissible: true, onDismiss: () => setActionError(undefined), className: sx(actionErrorStyle$1), children: jsxRuntime.jsx("span", { "data-test": "charters-access-action-error", children: actionError }) })), canManageAccess ? (jsxRuntime.jsxs("section", { className: sx(addPanelStyle), "data-test": "charters-access-add-panel", children: [jsxRuntime.jsxs("div", { className: sx(sectionHeadingStyle$1), children: [jsxRuntime.jsx("span", { className: sx(sectionIconStyle), children: jsxRuntime.jsx(UsersIcon$1, { size: 20 }) }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { children: "Add account users" }), jsxRuntime.jsxs("p", { children: ["Search and select one or more existing users of ", accountName, " to grant STM Charters access."] })] })] }), jsxRuntime.jsxs("div", { className: sx(addControlsStyle), children: [jsxRuntime.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" }), jsxRuntime.jsxs("div", { className: sx(addActionsRowStyle), children: [jsxRuntime.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" }), jsxRuntime.jsx(Button, { type: "button", onClick: addSelectedUsers, disabled: !hasSelectedUsers || Boolean(addUnavailableReason), loading: pendingAction === 'add', title: addUnavailableReason, "data-test": "charters-access-add", children: selectedUsers.length > 1
|
|
31871
32931
|
? `Add ${selectedUsers.length} users`
|
|
31872
32932
|
: 'Add access' })] })] })] })) : (jsxRuntime.jsx(Alert, { variant: "primary", title: "Read-only access", className: sx(readOnlyNoticeStyle$1), children: jsxRuntime.jsx("span", { "data-test": "charters-access-read-only", children: readOnlyMessage }) })), jsxRuntime.jsxs("section", { className: sx(membersPanelStyle), "aria-labelledby": "charters-access-members-heading", children: [jsxRuntime.jsxs("div", { className: sx(membersHeadingStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { id: "charters-access-members-heading", children: "People with STM Charters access" }), jsxRuntime.jsx("p", { children: "Members use carrier workflows. Admins can also manage this list." })] }), jsxRuntime.jsx(LockIcon$1, { size: 20, "aria-hidden": "true" })] }), memberships.length === 0 ? (jsxRuntime.jsx("div", { "data-test": "charters-access-empty", children: jsxRuntime.jsx(EmptyState$1, { title: "No STM Charters members", description: canManageAccess
|
|
31873
32933
|
? 'Search for an existing account user above to grant the first membership.'
|
|
@@ -31895,7 +32955,7 @@ ChartersAccessManagementPage.displayName = 'ChartersAccessManagementPage';
|
|
|
31895
32955
|
* `@media` block at the foot of the file is now nested inside `pageStyle`,
|
|
31896
32956
|
* which is the only rule it applied to.
|
|
31897
32957
|
*/
|
|
31898
|
-
const pageStyle$
|
|
32958
|
+
const pageStyle$l = {
|
|
31899
32959
|
label: 'ChartersHomePage-pageStyle',
|
|
31900
32960
|
display: 'flex',
|
|
31901
32961
|
flexDirection: 'column',
|
|
@@ -31920,7 +32980,7 @@ const titleStyle$c = {
|
|
|
31920
32980
|
fontWeight: 'var(--fw-semibold)',
|
|
31921
32981
|
lineHeight: 'var(--lh-2xl)',
|
|
31922
32982
|
};
|
|
31923
|
-
const descriptionStyle$
|
|
32983
|
+
const descriptionStyle$6 = {
|
|
31924
32984
|
label: 'ChartersHomePage-descriptionStyle',
|
|
31925
32985
|
maxWidth: '72ch',
|
|
31926
32986
|
margin: 0,
|
|
@@ -32163,7 +33223,7 @@ const CHARTER_CONTACT_GROUPS = [
|
|
|
32163
33223
|
* welcome paragraph and a PDF link; this keeps the same information architecture but
|
|
32164
33224
|
* puts a real card into each section with the queue count already visible.
|
|
32165
33225
|
*/
|
|
32166
|
-
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 = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
33226
|
+
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 = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$l), className), "data-test": "charters-home-page", children: [jsxRuntime.jsxs("header", { className: sx(headerStyle$f), children: [jsxRuntime.jsx("h1", { className: sx(titleStyle$c), children: title }), description && jsxRuntime.jsx("p", { className: sx(descriptionStyle$6), children: description }), onOpenTutorial && (jsxRuntime.jsx(Button, { variant: "outline", size: "sm", className: sx(tutorialStyle), leftIcon: jsxRuntime.jsx(DocumentIcon, { size: 16 }), onClick: onOpenTutorial, "data-test": "charters-tutorial", children: tutorialLabel }))] }), jsxRuntime.jsx("ul", { className: sx(cardsStyle), children: sections.map((section) => (jsxRuntime.jsx("li", { children: jsxRuntime.jsxs("button", { type: "button", className: sx(cardStyle$4), onClick: () => onOpenSection?.(section.key), "data-test": `charters-section-${section.key}`, children: [jsxRuntime.jsx("span", { className: sx(cardIconStyle), "aria-hidden": "true", children: section.icon ?? SECTION_ICONS[section.key] ?? jsxRuntime.jsx(PlaneIcon$3, { size: 20 }) }), jsxRuntime.jsxs("span", { className: sx(cardBodyStyle$2), children: [jsxRuntime.jsx("span", { className: sx(cardTitleStyle$1), children: section.title }), jsxRuntime.jsx("span", { className: sx(cardDescriptionStyle), children: section.description }), section.loading ? (jsxRuntime.jsx("span", { className: sx(cardLoadingStyle), "data-test": `charters-section-${section.key}-loading`, children: jsxRuntime.jsx(Spinner, { size: "xs", label: `Loading ${section.title}` }) })) : section.count !== undefined ? (jsxRuntime.jsxs("span", { className: sx(cardCountStyle), children: [jsxRuntime.jsx("strong", { children: section.count }), " ", section.countLabel ?? 'items'] })) : null] }), jsxRuntime.jsx("span", { className: sx(cardArrowStyle), "aria-hidden": "true", children: jsxRuntime.jsx(ArrowUpRightIcon, { size: 16 }) })] }) }, section.key))) }), jsxRuntime.jsxs("section", { className: sx(contactsStyle), "aria-label": "Contact us", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$5), children: "Questions? Talk to us" }), jsxRuntime.jsx("div", { className: sx(contactGroupsStyle), children: contactGroups.map((group) => (jsxRuntime.jsxs("div", { className: sx(contactGroupStyle$1), children: [jsxRuntime.jsx("h3", { className: sx(contactGroupTitleStyle), children: group.title }), jsxRuntime.jsx("ul", { className: sx(contactListStyle), children: group.contacts.map((contact) => (jsxRuntime.jsxs("li", { className: sx(contactStyle), children: [jsxRuntime.jsx("span", { className: sx(contactNameStyle), children: contact.name }), contact.role && jsxRuntime.jsx("span", { className: sx(contactRoleStyle), children: contact.role }), jsxRuntime.jsxs("span", { className: sx(contactLinksStyle), children: [contact.email && (jsxRuntime.jsxs("a", { href: `mailto:${contact.email}`, className: sx(contactLinkStyle), children: [jsxRuntime.jsx(MailIcon, { size: 14, "aria-hidden": "true" }), contact.email] })), contact.phone && (jsxRuntime.jsxs("a", { href: `tel:${contact.phone}`, className: sx(contactLinkStyle), children: [jsxRuntime.jsx(PhoneIcon, { size: 14, "aria-hidden": "true" }), contact.phone] }))] })] }, contact.name))) })] }, group.title))) })] })] }));
|
|
32167
33227
|
ChartersHomePage.displayName = 'ChartersHomePage';
|
|
32168
33228
|
|
|
32169
33229
|
/**
|
|
@@ -32181,7 +33241,7 @@ ChartersHomePage.displayName = 'ChartersHomePage';
|
|
|
32181
33241
|
* rather than classes stacked on one element, so `emergencyLabelStyle` simply
|
|
32182
33242
|
* carries the merged result.
|
|
32183
33243
|
*/
|
|
32184
|
-
const pageStyle$
|
|
33244
|
+
const pageStyle$k = {
|
|
32185
33245
|
label: 'ContactUsPage-pageStyle',
|
|
32186
33246
|
color: 'var(--color-ink, #282828)',
|
|
32187
33247
|
'@media print': {
|
|
@@ -32498,7 +33558,7 @@ const ContactUsPage = ({ title = 'Your Team of Experts', state, errorMessage = '
|
|
|
32498
33558
|
if (resolvedState === 'error' || resolvedState === 'empty') {
|
|
32499
33559
|
return (jsxRuntime.jsx("div", { className: sx(centeredStateStyle), "data-test": "contact-us-page", children: jsxRuntime.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.' }) }));
|
|
32500
33560
|
}
|
|
32501
|
-
return (jsxRuntime.jsx("div", { className: cx(sx(pageStyle$
|
|
33561
|
+
return (jsxRuntime.jsx("div", { className: cx(sx(pageStyle$k), className), "data-test": "contact-us-page", children: jsxRuntime.jsxs("div", { className: sx(containerStyle), children: [jsxRuntime.jsxs("div", { className: sx(headerRowStyle), children: [jsxRuntime.jsx(PageHeader, { title: title }), jsxRuntime.jsx("div", { className: sx(printRowStyle), children: jsxRuntime.jsxs("button", { type: "button", onClick: onPrint ?? (() => window.print()), children: [jsxRuntime.jsx(PrinterIcon, { size: 16 }), "Print"] }) })] }), children ?? (data ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!!(data.accountManagers?.length || data.travelAgents?.length) && (jsxRuntime.jsxs("div", { className: sx(primaryGridStyle), children: [jsxRuntime.jsx(SimpleContactCard, { title: "Account Manager", contacts: data.accountManagers }), jsxRuntime.jsx(SimpleContactCard, { title: "Travel Agent", contacts: data.travelAgents })] })), jsxRuntime.jsxs("div", { className: sx(stackStyle$1), children: [data.accountContacts ? (data.accountContacts.map((section, index) => (
|
|
32502
33562
|
// Two rows can share a description, so position is the stable key.
|
|
32503
33563
|
jsxRuntime.jsx(AccountContactCard, { section: section }, `${section.title}-${index}`)))) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(ContactCard, { title: "Group/Team Commercial Reservation Specialists", children: [jsxRuntime.jsx(ContactField, { label: "Business Hours:", children: jsxRuntime.jsx("span", { children: "Monday \u2013 Friday 8am-8pm ET" }) }), jsxRuntime.jsx(ContactField, { label: "Toll-Free Number:", children: jsxRuntime.jsx("span", { children: "866-902-9654" }) }), jsxRuntime.jsx(ContactField, { label: "After Hours/Emergency (24/7):", emergency: true, children: jsxRuntime.jsx("span", { className: sx(emergencyStyle), children: "866-902-9654" }) }), jsxRuntime.jsx(ContactField, { label: "Email:", children: jsxRuntime.jsx("a", { href: "mailto:teamtravel@shortstravel.com", children: "teamtravel@shortstravel.com" }) })] }), jsxRuntime.jsxs(ContactCard, { title: "Recruiting Travel Specialists", children: [jsxRuntime.jsx(ContactField, { label: "Business Hours:", children: jsxRuntime.jsx("span", { children: "Monday \u2013 Friday 8am-8pm ET" }) }), jsxRuntime.jsx(ContactField, { label: "Toll-Free Number:", children: jsxRuntime.jsx("span", { children: "866-902-9654" }) }), jsxRuntime.jsx(ContactField, { label: "After Hours/Emergency (24/7):", emergency: true, children: jsxRuntime.jsx("span", { className: sx(emergencyStyle), children: "866-902-9654" }) }), jsxRuntime.jsx(ContactField, { label: "Email:", children: jsxRuntime.jsx("a", { href: "mailto:recruiting@shortstravel.com", children: "recruiting@shortstravel.com" }) })] })] })), !!data.charterAirContacts?.length && jsxRuntime.jsx(ContactCard, { title: "Charter Air", children: jsxRuntime.jsx(PairedContacts, { contacts: data.charterAirContacts }) }), !!data.motorcoachContacts?.length && (jsxRuntime.jsxs(ContactCard, { title: "Charter Bus / Motorcoach", children: [jsxRuntime.jsx(PairedContacts, { contacts: data.motorcoachContacts }), jsxRuntime.jsx("p", { className: sx(motorcoachEmergencyStyle), children: "After Hours/Emergency (24/7): 319-423-3007" })] })), !!data.groupHotelContacts?.length && (jsxRuntime.jsx(ContactCard, { title: "Group Hotel", children: data.groupHotelContacts.map((contact, index) => (jsxRuntime.jsxs("div", { className: sx(contactPairStyle), children: [jsxRuntime.jsx(ContactColumn, { title: "Sales Contact", contact: contact }), jsxRuntime.jsx("div", { className: sx(contactColumnStyle) })] }, `${contact.email ?? contact.name}-${index}`))) }))] })] })) : jsxRuntime.jsx(GenericCards, { cards: cards })), showSupportFooter && (jsxRuntime.jsxs("footer", { className: sx(supportStyle), children: [jsxRuntime.jsx("h2", { children: "Short's Travel Website and Online Booking Tool Support" }), jsxRuntime.jsx("p", { children: "Monday \u2013 Friday 9am-9pm ET, except major holidays" }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { children: "319-257-5309" }), jsxRuntime.jsx("a", { href: "mailto:onlinesupport@shortstravel.com", children: "onlinesupport@shortstravel.com" })] })] }))] }) }));
|
|
32504
33564
|
};
|
|
@@ -32520,7 +33580,7 @@ const ContactUsPage = ({ title = 'Your Team of Experts', state, errorMessage = '
|
|
|
32520
33580
|
* The `pulse` keyframes are namespaced `stm-pulse` — injected at runtime they
|
|
32521
33581
|
* would otherwise be global and collide with a host's own `pulse`.
|
|
32522
33582
|
*/
|
|
32523
|
-
const pageStyle$
|
|
33583
|
+
const pageStyle$j = {
|
|
32524
33584
|
label: 'DashboardPage-pageStyle',
|
|
32525
33585
|
color: 'var(--color-ink, #282828)',
|
|
32526
33586
|
};
|
|
@@ -33416,7 +34476,7 @@ const DashboardPage = ({ greeting = 'Good morning', firstName, accountName, widg
|
|
|
33416
34476
|
const [dragFrom, setDragFrom] = React.useState(null);
|
|
33417
34477
|
const dragGhost = React.useRef(null);
|
|
33418
34478
|
const presentTypes = new Set(widgets.map((widget) => widget.type));
|
|
33419
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
34479
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$j), className), children: [welcomeHero && heroOpen && (jsxRuntime.jsxs("section", { className: sx(welcomeHeroStyle), "aria-label": "Welcome", children: [jsxRuntime.jsx("button", { type: "button", className: sx(welcomeCloseStyle), "aria-label": "Dismiss welcome", onClick: () => setHeroOpen(false), children: jsxRuntime.jsx(CloseIcon, { size: 20 }) }), welcomeHero] })), jsxRuntime.jsx("div", { className: sx(pageBannersStyle), children: jsxRuntime.jsx(PageBanners, { systemBanners: systemBanners, alertBanners: alertBanners, fullWidth: true, onDismiss: onBannerDismiss }) }), standingMessage && (jsxRuntime.jsx("section", { className: sx(standingMessageStyle), "aria-label": "Message", children: standingMessage })), jsxRuntime.jsxs("header", { className: sx(pageHeaderStyle$1), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("h1", { children: [greeting, firstName ? `, ${firstName}` : ''] }), accountName && jsxRuntime.jsxs("p", { children: ["Here's your personalized travel overview for ", accountName, "."] })] }), jsxRuntime.jsx("div", { className: sx(pageActionsStyle), children: editMode ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("button", { type: "button", className: sx(outlineButtonStyle), onClick: () => setCatalogOpen(true), children: [jsxRuntime.jsx(PlusIcon$2, { size: 20 }), "Add card"] }), jsxRuntime.jsx("button", { type: "button", className: sx(textButtonStyle$1), onClick: onReset, children: "Reset to default" }), jsxRuntime.jsxs("button", { type: "button", className: sx(primaryButtonStyle), onClick: () => { setEditMode(false); setCatalogOpen(false); }, children: [jsxRuntime.jsx(CheckIcon$1, { size: 20 }), "Done"] })] }) : jsxRuntime.jsxs("button", { type: "button", className: sx(customizeButtonStyle), onClick: () => setEditMode(true), children: [jsxRuntime.jsx(SettingsIcon, { size: 20 }), "Customize Your Home Page"] }) })] }), editMode && jsxRuntime.jsxs("div", { className: sx(editBannerStyle), children: [jsxRuntime.jsx(EditIcon$2, { size: 20 }), jsxRuntime.jsxs("span", { children: [jsxRuntime.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' && jsxRuntime.jsx("p", { className: sx(syncStatusStyle), "aria-live": "polite", children: "Saving layout\u2026" }), syncStatus === 'error' && jsxRuntime.jsx("p", { className: cx(sx(syncStatusStyle), sx(syncErrorStyle)), role: "alert", children: "Layout couldn't be saved. Changes are preserved locally." }), widgets.length ? jsxRuntime.jsx("div", { className: sx(gridStyle$2), children: widgets.map((widget, index) => jsxRuntime.jsx("div", { className: sx(sizeStyles[widget.size]), draggable: editMode, onDragStart: (event) => { if (!editMode)
|
|
33420
34480
|
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)
|
|
33421
34481
|
onReorder?.(dragFrom, index); setDragFrom(null); }, onDragEnd: () => { setDragFrom(null); dragGhost.current?.remove(); dragGhost.current = null; }, children: jsxRuntime.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)) }) : jsxRuntime.jsxs("div", { className: sx(emptyPageStyle), children: [jsxRuntime.jsx(PlusIcon$2, { size: 28 }), jsxRuntime.jsx("strong", { children: "Your home page is empty" }), jsxRuntime.jsx("span", { children: "Use \"Customize\" to add cards from the catalog." })] }), catalogOpen && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", className: sx(scrimStyle), "aria-label": "Close card catalog", onClick: () => setCatalogOpen(false) }), jsxRuntime.jsxs("aside", { className: sx(catalogStyle), role: "dialog", "aria-modal": "true", "aria-label": "Add cards", children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { children: "Add a card" }), jsxRuntime.jsx("p", { children: "Cards available to your role for this account" })] }), jsxRuntime.jsx("button", { type: "button", "aria-label": "Close card catalog", onClick: () => setCatalogOpen(false), children: jsxRuntime.jsx(CloseIcon, { size: 20 }) })] }), jsxRuntime.jsx("div", { className: sx(catalogBodyStyle), children: CATALOG.map((item) => jsxRuntime.jsxs("div", { className: sx(catalogItemStyle), children: [jsxRuntime.jsx("span", { className: sx(catalogIconStyle), children: jsxRuntime.jsx(WidgetIcon, { type: item.type }) }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: item.title }), jsxRuntime.jsx("span", { children: "Account" }), jsxRuntime.jsx("p", { children: item.description })] }), presentTypes.has(item.type) ? jsxRuntime.jsxs("span", { className: sx(addedStyle), children: [jsxRuntime.jsx(CheckIcon$1, { size: 16 }), "Added"] }) : jsxRuntime.jsxs("button", { type: "button", onClick: () => onAddWidget?.(item.type), children: [jsxRuntime.jsx(PlusIcon$2, { size: 16 }), "Add"] })] }, item.type)) }), jsxRuntime.jsx("footer", { children: "Each card can appear once on your home page." })] })] })] }));
|
|
33422
34482
|
};
|
|
@@ -33429,7 +34489,7 @@ const DashboardPage = ({ greeting = 'Good morning', firstName, accountName, widg
|
|
|
33429
34489
|
* object, and the single `@media (max-width: 767px)` block is split across the
|
|
33430
34490
|
* nine objects it used to style.
|
|
33431
34491
|
*/
|
|
33432
|
-
const pageStyle$
|
|
34492
|
+
const pageStyle$i = {
|
|
33433
34493
|
label: 'FeatureFlagManagementPage-pageStyle',
|
|
33434
34494
|
maxWidth: 1440,
|
|
33435
34495
|
margin: '0 auto',
|
|
@@ -33464,7 +34524,7 @@ const eyebrowStyle$1 = {
|
|
|
33464
34524
|
letterSpacing: '.08em',
|
|
33465
34525
|
textTransform: 'uppercase',
|
|
33466
34526
|
};
|
|
33467
|
-
const descriptionStyle$
|
|
34527
|
+
const descriptionStyle$5 = {
|
|
33468
34528
|
label: 'FeatureFlagManagementPage-descriptionStyle',
|
|
33469
34529
|
maxWidth: 720,
|
|
33470
34530
|
margin: '10px 0 0',
|
|
@@ -34136,7 +35196,7 @@ const FeatureFlagManagementPage = ({ definitions, rules, targetOptions, loading
|
|
|
34136
35196
|
const hasRuleActions = Boolean(onEditRule || onDeactivateRule);
|
|
34137
35197
|
const currentUserSearchError = userSearchError ?? internalUserSearchError;
|
|
34138
35198
|
const currentAudienceError = audienceError ?? internalAudienceError;
|
|
34139
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
35199
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$i), className), "data-test": "feature-flag-management-page", "aria-busy": busy, children: [jsxRuntime.jsxs("header", { className: sx(headerStyle$e), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", { className: sx(eyebrowStyle$1), children: "Administration \u00B7 System" }), jsxRuntime.jsx("h1", { children: "Feature Flags" }), jsxRuntime.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 && (jsxRuntime.jsx(Button, { type: "button", leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 16 }), onClick: openCreate, disabled: busy, "data-test": "feature-flag-create-rule", children: "Create rule" }))] }), busy && (jsxRuntime.jsxs("div", { className: sx(submittingStyle), role: "status", "data-test": "feature-flag-submitting", children: [jsxRuntime.jsx(Spinner, { size: "sm", label: "Saving feature rule" }), jsxRuntime.jsx("span", { children: "Saving feature rule\u2026" })] })), loading && (jsxRuntime.jsxs("div", { className: sx(pageStateStyle), "data-test": "feature-flag-loading", children: [jsxRuntime.jsx(Spinner, { size: "lg", label: "Loading feature flags" }), jsxRuntime.jsx("p", { children: "Loading feature flags\u2026" })] })), !loading && error && (jsxRuntime.jsxs("div", { className: sx(pageStateStyle), "data-test": "feature-flag-error", children: [jsxRuntime.jsx(Alert, { variant: "error", title: "Feature flags could not be loaded", children: error }), onRetry && (jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onRetry, "data-test": "feature-flag-retry", children: "Try again" }))] })), !loading && !error && definitions.length === 0 && (jsxRuntime.jsx("div", { "data-test": "feature-flag-definitions-empty", children: jsxRuntime.jsx(EmptyState$1, { title: "No feature definitions", description: "Publish immutable feature definitions before creating audience rules.", icon: jsxRuntime.jsx(SettingsIcon, { size: 30 }), size: "lg" }) })), !loading && !error && definitions.length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [actionError && (jsxRuntime.jsx(Alert, { variant: "error", title: "Feature rule change failed", dismissible: true, onDismiss: () => setActionError(undefined), className: sx(actionErrorStyle), children: jsxRuntime.jsx("span", { "data-test": "feature-flag-action-error", children: actionError }) })), jsxRuntime.jsxs("section", { className: sx(catalogPanelStyle), "aria-labelledby": "feature-catalog-heading", children: [jsxRuntime.jsxs("div", { className: sx(sectionHeadingStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { id: "feature-catalog-heading", children: "Feature catalog" }), jsxRuntime.jsx("p", { children: "Definitions and hierarchy are read-only in this view." })] }), jsxRuntime.jsxs(Badge, { size: "sm", children: [definitions.length, " definitions"] })] }), jsxRuntime.jsx("div", { className: sx(definitionListStyle), "data-test": "feature-flag-definitions", children: definitionRows.map(({ definition, depth }) => (jsxRuntime.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: [jsxRuntime.jsxs("div", { className: sx(definitionCopyStyle), children: [jsxRuntime.jsxs("div", { className: sx(definitionTitleStyle), children: [jsxRuntime.jsx("strong", { children: definition.name }), jsxRuntime.jsx("code", { children: definition.featureKey })] }), jsxRuntime.jsx("p", { children: definition.description }), definition.isActive === false && (jsxRuntime.jsx("p", { className: sx(killSwitchStyle), children: "Kill switch active. Targeting rules cannot enable this feature." }))] }), jsxRuntime.jsxs("div", { className: sx(definitionBadgesStyle), children: [jsxRuntime.jsx(Badge, { variant: definition.isActive === false ? 'error' : 'success', size: "sm", children: definition.isActive === false ? 'Inactive kill switch' : 'Active definition' }), jsxRuntime.jsxs(Badge, { variant: definition.defaultEnabled ? 'success' : 'default', size: "sm", children: ["Default ", definition.defaultEnabled ? 'enabled' : 'disabled'] })] })] }, definition.featureKey))) })] }), editor && (jsxRuntime.jsxs("section", { className: sx(editorPanelStyle), "data-test": "feature-flag-rule-editor", children: [jsxRuntime.jsxs("div", { className: sx(sectionHeadingStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { children: editor.mode === 'create' ? 'Create targeting rule' : 'Edit targeting rule' }), jsxRuntime.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' && (jsxRuntime.jsxs("code", { className: sx(versionStyle), children: ["Version ", editor.rule.rowVersion] }))] }), jsxRuntime.jsxs("form", { className: sx(ruleFormStyle), onSubmit: submitRule, noValidate: true, children: [jsxRuntime.jsx(Select, { label: "Feature", options: definitions.map((definition) => ({
|
|
34140
35200
|
value: definition.featureKey,
|
|
34141
35201
|
label: `${definition.name} · ${definition.featureKey}`,
|
|
34142
35202
|
disabled: definition.isActive === false,
|
|
@@ -34677,7 +35737,7 @@ GroupTravelRequestPage.displayName = 'GroupTravelRequestPage';
|
|
|
34677
35737
|
* split across the objects it styled: each `@media` lives inside the one style
|
|
34678
35738
|
* it applies to, so a rule and its responsive override stay together.
|
|
34679
35739
|
*/
|
|
34680
|
-
const pageStyle$
|
|
35740
|
+
const pageStyle$h = {
|
|
34681
35741
|
label: 'IndividualTravelPage-pageStyle',
|
|
34682
35742
|
minHeight: '100%',
|
|
34683
35743
|
padding: 24,
|
|
@@ -35415,7 +36475,7 @@ const IndividualTravelPage = ({ trips, tabCounts, enabledTabs = ['current', 'pas
|
|
|
35415
36475
|
: activeFilters
|
|
35416
36476
|
? 'No trips match the selected filters. Clear a filter or widen the date range.'
|
|
35417
36477
|
: emptyMessage;
|
|
35418
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
36478
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$h), className), "data-test": "individual-travel-page", "aria-busy": loading || refreshing, children: [jsxRuntime.jsxs("div", { className: sx(headerStyle$d), children: [jsxRuntime.jsx("h1", { className: sx(titleStyle$b), children: "Individual & Small Group Travel" }), onCreateRequest && (jsxRuntime.jsx(Button
|
|
35419
36479
|
// Explicit: the atom has no default, and inside a host form a
|
|
35420
36480
|
// bare <button> would submit it.
|
|
35421
36481
|
, {
|
|
@@ -35441,7 +36501,7 @@ const IndividualTravelPage = ({ trips, tabCounts, enabledTabs = ['current', 'pas
|
|
|
35441
36501
|
* the three columns and the narrow-screen tab strip — still comes from the
|
|
35442
36502
|
* RequestFormLayout organism, and the blocks from the FormSection molecule.
|
|
35443
36503
|
*/
|
|
35444
|
-
const pageStyle$
|
|
36504
|
+
const pageStyle$g = {
|
|
35445
36505
|
label: 'IndividualTravelRequestPage-pageStyle',
|
|
35446
36506
|
color: 'var(--color-ink, #282828)',
|
|
35447
36507
|
};
|
|
@@ -36909,9 +37969,9 @@ const IndividualTravelRequestFormPage = ({ currentTraveler, configuration, value
|
|
|
36909
37969
|
}
|
|
36910
37970
|
};
|
|
36911
37971
|
if (loading) {
|
|
36912
|
-
return (jsxRuntime.jsx(RequestFormLayout, { className: cx(sx(pageStyle$
|
|
37972
|
+
return (jsxRuntime.jsx(RequestFormLayout, { className: cx(sx(pageStyle$g), className), header: jsxRuntime.jsx(RequestFormHeader, { title: "Individual Travel Request" }), children: jsxRuntime.jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-form-loading", children: [jsxRuntime.jsx(Spinner, { label: "Loading travel request form" }), jsxRuntime.jsx("span", { children: "Loading request options\u2026" })] }) }));
|
|
36913
37973
|
}
|
|
36914
|
-
return (jsxRuntime.jsx("form", { ref: formRef, className: sx(formStyle), onSubmit: (event) => void handleSubmit(event), noValidate: true, "data-test": "individual-travel-request-form", "aria-busy": busy, children: jsxRuntime.jsxs(RequestFormLayout, { className: cx(sx(pageStyle$
|
|
37974
|
+
return (jsxRuntime.jsx("form", { ref: formRef, className: sx(formStyle), onSubmit: (event) => void handleSubmit(event), noValidate: true, "data-test": "individual-travel-request-form", "aria-busy": busy, children: jsxRuntime.jsxs(RequestFormLayout, { className: cx(sx(pageStyle$g), className), header: jsxRuntime.jsx(RequestFormHeader, { title: "Individual Travel Request", eventName: currentTraveler.displayName }), activePane: activePane, onPaneChange: setActivePane, mobileServices: availableServices.map((service) => (jsxRuntime.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, jsxRuntime.jsx("span", { children: service.label })] }, service.key))), sidebar: (jsxRuntime.jsxs("div", { "aria-label": "Travel types", "data-test": "individual-travel-request-service-sidebar", children: [jsxRuntime.jsx(ServiceToggleList, { services: availableServices, enabledServices: selectedServices, onToggle: (service, checked) => toggleService(service, checked), onClick: navigateToService, className: sx(serviceNavigationStyle), disabled: disabled }), jsxRuntime.jsxs("div", { className: sx(travelerRailStyle), children: [jsxRuntime.jsx("h3", { children: "Travelling" }), jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx(UsersIcon$1, { size: 17 }), " ", travelerRailSummary] })] })] })), summary: (jsxRuntime.jsx(RequestSummary, { sections: summarySections, values: {}, dataTest: "individual-travel-request-summary" })), footer: (onCancel || onSubmit) ? (jsxRuntime.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 && jsxRuntime.jsx("div", { className: sx(bannerStyle), "data-test": "individual-travel-request-form-notice", children: jsxRuntime.jsx(Alert, { variant: "warning", children: notice }) }), error && (jsxRuntime.jsx("div", { className: sx(bannerStyle), "data-test": "individual-travel-request-form-error", children: jsxRuntime.jsxs(Alert, { variant: "error", title: "The request form needs attention", children: [jsxRuntime.jsx("div", { children: error }), onRetry && jsxRuntime.jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: onRetry, "data-test": "individual-travel-request-form-retry", children: "Try again" })] }) })), readOnly && (jsxRuntime.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) && (jsxRuntime.jsxs("div", { ref: errorSummaryRef, className: sx(errorSummaryStyle), role: "alert", tabIndex: -1, "data-test": "individual-travel-request-form-validation", children: [jsxRuntime.jsx("h2", { children: "Review the request before submitting" }), submitError && jsxRuntime.jsx("p", { "data-test": "individual-travel-request-form-submit-error", children: submitError }), Object.keys(allErrors).length > 0 && jsxRuntime.jsx("ul", { children: Object.values(allErrors).map((message, index) => jsxRuntime.jsx("li", { children: message }, `${message}-${index}`)) })] })), activeService !== 'general' && !selectedServices[activeService] && (jsxRuntime.jsxs("div", { className: sx(mobileEnableStyle), "data-test": "individual-travel-request-mobile-enable", children: [jsxRuntime.jsxs("span", { children: ["Add ", SERVICE_LABELS[activeService], " to this request"] }), jsxRuntime.jsx(Toggle, { "aria-label": `Enable ${SERVICE_LABELS[activeService]}`, checked: false, onChange: () => enableFromStrip(activeService), size: "sm" })] })), jsxRuntime.jsxs(Section, { title: "Traveler information", description: "Tell the travel team who is traveling. Required fields are marked with an asterisk.", icon: jsxRuntime.jsx(UsersIcon$1, { size: 24 }), dataTest: "individual-travel-request-section-travelers", children: [jsxRuntime.jsxs("fieldset", { className: sx(choiceGroupStyle), children: [jsxRuntime.jsx("legend", { className: sx(legendStyle), children: "Travel for" }), jsxRuntime.jsxs("label", { className: sx(choiceStyle), children: [jsxRuntime.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" }), jsxRuntime.jsxs("span", { className: sx(choiceTextStyle), children: [jsxRuntime.jsx("strong", { children: currentTraveler.displayName }), jsxRuntime.jsx("small", { children: currentTraveler.email || 'Authenticated traveler' })] })] }), configuration.allowOtherTravelers && (jsxRuntime.jsxs("label", { className: sx(choiceStyle), children: [jsxRuntime.jsx("input", { type: "radio", name: "travelerType", value: "other", checked: resolvedValues.travelerType === 'other', disabled: disabled, onChange: () => commit({
|
|
36915
37975
|
...resolvedValues,
|
|
36916
37976
|
travelerType: 'other',
|
|
36917
37977
|
travelers: resolvedValues.travelers.length ? resolvedValues.travelers : [emptyTraveler()],
|
|
@@ -36983,7 +38043,7 @@ const IndividualTravelRequestDetailPage = ({ request, loading = false, error, no
|
|
|
36983
38043
|
: request
|
|
36984
38044
|
? `Travel request ${request.requestId}`
|
|
36985
38045
|
: 'Travel request';
|
|
36986
|
-
return (jsxRuntime.jsxs("main", { className: cx(sx(pageStyle$f), className), "data-test": "individual-travel-request-detail", "aria-busy": loading, children: [jsxRuntime.jsxs("header", { className: sx(pageHeaderStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", { className: sx(eyebrowStyle), children: "Individual travel" }), jsxRuntime.jsx("h1", { className: sx(titleStyle$a), children: title }), request && !loading && !error && (jsxRuntime.jsxs("div", { className: sx(detailMetaStyle), "data-test": "individual-travel-request-detail-meta", children: [jsxRuntime.jsxs("span", { children: ["Submitted ", jsxRuntime.jsx("time", { dateTime: request.submittedAt, children: formatDateTime$1(request.submittedAt) })] }), request.completedAt && jsxRuntime.jsxs("span", { children: ["Completed ", jsxRuntime.jsx("time", { dateTime: request.completedAt, children: formatDateTime$1(request.completedAt) })] })] }))] }), onBack && (jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "individual-travel-request-detail-back", children: backLabel }))] }), jsxRuntime.jsxs("div", { className: sx(contentStyle$3), children: [loading && (jsxRuntime.jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-loading", children: [jsxRuntime.jsx(Spinner, { label: "Loading travel request" }), jsxRuntime.jsx("span", { children: "Loading request details\u2026" })] })), !loading && error && (jsxRuntime.jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-error", children: [jsxRuntime.jsx(Alert, { variant: "error", title: "The travel request could not be loaded", children: error }), onRetry && jsxRuntime.jsx(Button, { type: "button", variant: "secondary", onClick: onRetry, "data-test": "individual-travel-request-detail-retry", children: "Try again" })] })), !loading && !error && !request && (jsxRuntime.jsx("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-empty", children: jsxRuntime.jsx("p", { children: "No travel request was supplied." }) })), !loading && !error && request && (jsxRuntime.jsxs("div", { className: sx(formStyle), children: [notice && jsxRuntime.jsx("div", { className: sx(bannerStyle), "data-test": "individual-travel-request-detail-notice", children: jsxRuntime.jsx(Alert, { variant: "warning", children: notice }) }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-general", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Request information" }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Request number", dataTest: "individual-travel-request-detail-request-id", children: request.requestId }), jsxRuntime.jsx(DetailField, { label: "Traveler type", children: request.travelerType === 'self' ? 'Self' : 'Other traveler' }), jsxRuntime.jsx(DetailField, { label: "Submitted by", children: request.submittedBy?.name }), jsxRuntime.jsx(DetailField, { label: "Submitter email", children: request.submittedBy?.email }), request.submittedBy?.phone && jsxRuntime.jsx(DetailField, { label: "Submitter phone", children: request.submittedBy.phone }), request.additionalEmails && jsxRuntime.jsx(DetailField, { label: "Additional email addresses", children: request.additionalEmails })] })] }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-travelers", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Travelers" }) }), jsxRuntime.jsx("div", { className: sx(detailTableWrapStyle), children: jsxRuntime.jsxs("table", { className: sx(detailTableStyle), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "Name" }), jsxRuntime.jsx("th", { scope: "col", children: "Date of birth" }), jsxRuntime.jsx("th", { scope: "col", children: "Gender" })] }) }), jsxRuntime.jsxs("tbody", { children: [request.travelers.map((traveler, index) => (jsxRuntime.jsxs("tr", { "data-test": `individual-travel-request-detail-traveler-${index + 1}`, children: [jsxRuntime.jsx("td", { children: travelerName(traveler) || '—' }), jsxRuntime.jsx("td", { children: formatDate(traveler.dateOfBirth) }), jsxRuntime.jsx("td", { children: traveler.gender || '—' })] }, `${travelerName(traveler)}-${index}`))), !request.travelers.length && jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, className: sx(emptyValueStyle), children: "No traveler details were supplied." }) })] })] }) })] }), Boolean(request.organizationAnswers?.length) && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-organization", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Organization information" }) }), jsxRuntime.jsx(AnswerList, { answers: request.organizationAnswers, prefix: "individual-travel-request-detail-organization-answer" })] })), Boolean(request.billingAnswers?.length) && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-billing", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Billing information" }) }), jsxRuntime.jsx(AnswerList, { answers: request.billingAnswers, prefix: "individual-travel-request-detail-billing-answer" })] })), request.airRequest && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-air", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Air Request" }), jsxRuntime.jsx("p", { className: sx(sectionDescriptionStyle), children: request.airRequest.tripType.replace('-', ' ') })] }) }), jsxRuntime.jsx("div", { className: sx(detailTableWrapStyle), children: jsxRuntime.jsxs("table", { className: sx(detailTableStyle), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "From" }), jsxRuntime.jsx("th", { scope: "col", children: "To" }), jsxRuntime.jsx("th", { scope: "col", children: "Depart" }), request.airRequest.tripType === 'round-trip' && jsxRuntime.jsx("th", { scope: "col", children: "Return" })] }) }), jsxRuntime.jsx("tbody", { children: request.airRequest.legs.map((leg, index) => (jsxRuntime.jsxs("tr", { "data-test": `individual-travel-request-detail-air-leg-${index + 1}`, children: [jsxRuntime.jsx("td", { children: leg.departureLocation }), jsxRuntime.jsx("td", { children: leg.arrivalLocation }), jsxRuntime.jsxs("td", { children: [formatDate(leg.departureDate), " \u00B7 ", leg.departureTime] }), request.airRequest?.tripType === 'round-trip' && jsxRuntime.jsxs("td", { children: [formatDate(leg.returnDate), " \u00B7 ", leg.returnTime || '—'] })] }, index))) })] }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Fare preference", children: request.airRequest.farePreference }), jsxRuntime.jsx(DetailField, { label: "Flight preference", children: request.airRequest.flightPreference }), jsxRuntime.jsx(DetailField, { label: "Preferred airline", children: request.airRequest.preferredAirline }), jsxRuntime.jsx(DetailField, { label: "Most important factor", children: request.airRequest.priority }), request.airRequest.details && jsxRuntime.jsx(DetailField, { label: "Air details", children: request.airRequest.details })] })] })), request.hotelRequest && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-hotel", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Hotel Request" }) }), jsxRuntime.jsx("div", { className: sx(detailTableWrapStyle), children: jsxRuntime.jsxs("table", { className: sx(detailTableStyle), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "City" }), jsxRuntime.jsx("th", { scope: "col", children: "Check in" }), jsxRuntime.jsx("th", { scope: "col", children: "Check out" })] }) }), jsxRuntime.jsx("tbody", { children: request.hotelRequest.legs.map((leg, index) => (jsxRuntime.jsxs("tr", { "data-test": `individual-travel-request-detail-hotel-leg-${index + 1}`, children: [jsxRuntime.jsx("td", { children: leg.city }), jsxRuntime.jsx("td", { children: formatDate(leg.checkInDate) }), jsxRuntime.jsx("td", { children: formatDate(leg.checkOutDate) })] }, index))) })] }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Bed preference", children: request.hotelRequest.bedPreference }), jsxRuntime.jsx(DetailField, { label: "Smoking preference", children: request.hotelRequest.smokingPreference }), jsxRuntime.jsx(DetailField, { label: "Preferred hotel", children: request.hotelRequest.preferredHotel })] })] })), request.carRequest && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-car", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Vehicle Rental Request" }) }), jsxRuntime.jsx("div", { className: sx(detailTableWrapStyle), children: jsxRuntime.jsxs("table", { className: sx(detailTableStyle), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "Pickup" }), jsxRuntime.jsx("th", { scope: "col", children: "Pickup date" }), jsxRuntime.jsx("th", { scope: "col", children: "Drop-off" }), jsxRuntime.jsx("th", { scope: "col", children: "Drop-off date" })] }) }), jsxRuntime.jsx("tbody", { children: request.carRequest.legs.map((leg, index) => (jsxRuntime.jsxs("tr", { "data-test": `individual-travel-request-detail-car-leg-${index + 1}`, children: [jsxRuntime.jsxs("td", { children: [leg.pickupCity, leg.pickupLocation ? ` · ${leg.pickupLocation}` : ''] }), jsxRuntime.jsxs("td", { children: [formatDate(leg.pickupDate), " \u00B7 ", leg.pickupTime] }), jsxRuntime.jsx("td", { children: leg.dropoffLocation || leg.pickupCity }), jsxRuntime.jsxs("td", { children: [formatDate(leg.dropoffDate), " \u00B7 ", leg.dropoffTime] })] }, index))) })] }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Vehicle type", children: request.carRequest.vehicleType }), jsxRuntime.jsx(DetailField, { label: "Rental company", children: request.carRequest.rentalCompany }), jsxRuntime.jsx(DetailField, { label: "Flight number or tail number", children: request.carRequest.flightNumberOrTailNumber })] })] })), request.busRequest && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-bus", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Bus Request" }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Pickup city", children: request.busRequest.pickupCity }), jsxRuntime.jsx(DetailField, { label: "Pickup location", children: request.busRequest.pickupLocation }), jsxRuntime.jsx(DetailField, { label: "Pickup date and time", children: formatDateTime$1(request.busRequest.pickupDateTime) }), jsxRuntime.jsx(DetailField, { label: "Drop-off city", children: request.busRequest.dropoffCity }), jsxRuntime.jsx(DetailField, { label: "Drop-off location", children: request.busRequest.dropoffLocation }), jsxRuntime.jsx(DetailField, { label: "Drop-off date and time", children: formatDateTime$1(request.busRequest.dropoffDateTime) }), jsxRuntime.jsx(DetailField, { label: "Vehicle type", children: request.busRequest.vehicleType }), request.busRequest.specialRequests && jsxRuntime.jsx(DetailField, { label: "Bus requests", children: request.busRequest.specialRequests })] })] })), request.specialRequests && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-special-requests", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Additional requests" }) }), jsxRuntime.jsx("p", { children: request.specialRequests })] }))] }))] })] }));
|
|
38046
|
+
return (jsxRuntime.jsxs("main", { className: cx(sx(pageStyle$g), className), "data-test": "individual-travel-request-detail", "aria-busy": loading, children: [jsxRuntime.jsxs("header", { className: sx(pageHeaderStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", { className: sx(eyebrowStyle), children: "Individual travel" }), jsxRuntime.jsx("h1", { className: sx(titleStyle$a), children: title }), request && !loading && !error && (jsxRuntime.jsxs("div", { className: sx(detailMetaStyle), "data-test": "individual-travel-request-detail-meta", children: [jsxRuntime.jsxs("span", { children: ["Submitted ", jsxRuntime.jsx("time", { dateTime: request.submittedAt, children: formatDateTime$1(request.submittedAt) })] }), request.completedAt && jsxRuntime.jsxs("span", { children: ["Completed ", jsxRuntime.jsx("time", { dateTime: request.completedAt, children: formatDateTime$1(request.completedAt) })] })] }))] }), onBack && (jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "sm", leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "individual-travel-request-detail-back", children: backLabel }))] }), jsxRuntime.jsxs("div", { className: sx(contentStyle$3), children: [loading && (jsxRuntime.jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-loading", children: [jsxRuntime.jsx(Spinner, { label: "Loading travel request" }), jsxRuntime.jsx("span", { children: "Loading request details\u2026" })] })), !loading && error && (jsxRuntime.jsxs("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-error", children: [jsxRuntime.jsx(Alert, { variant: "error", title: "The travel request could not be loaded", children: error }), onRetry && jsxRuntime.jsx(Button, { type: "button", variant: "secondary", onClick: onRetry, "data-test": "individual-travel-request-detail-retry", children: "Try again" })] })), !loading && !error && !request && (jsxRuntime.jsx("div", { className: sx(stateStyle), "data-test": "individual-travel-request-detail-empty", children: jsxRuntime.jsx("p", { children: "No travel request was supplied." }) })), !loading && !error && request && (jsxRuntime.jsxs("div", { className: sx(formStyle), children: [notice && jsxRuntime.jsx("div", { className: sx(bannerStyle), "data-test": "individual-travel-request-detail-notice", children: jsxRuntime.jsx(Alert, { variant: "warning", children: notice }) }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-general", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Request information" }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Request number", dataTest: "individual-travel-request-detail-request-id", children: request.requestId }), jsxRuntime.jsx(DetailField, { label: "Traveler type", children: request.travelerType === 'self' ? 'Self' : 'Other traveler' }), jsxRuntime.jsx(DetailField, { label: "Submitted by", children: request.submittedBy?.name }), jsxRuntime.jsx(DetailField, { label: "Submitter email", children: request.submittedBy?.email }), request.submittedBy?.phone && jsxRuntime.jsx(DetailField, { label: "Submitter phone", children: request.submittedBy.phone }), request.additionalEmails && jsxRuntime.jsx(DetailField, { label: "Additional email addresses", children: request.additionalEmails })] })] }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-travelers", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Travelers" }) }), jsxRuntime.jsx("div", { className: sx(detailTableWrapStyle), children: jsxRuntime.jsxs("table", { className: sx(detailTableStyle), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "Name" }), jsxRuntime.jsx("th", { scope: "col", children: "Date of birth" }), jsxRuntime.jsx("th", { scope: "col", children: "Gender" })] }) }), jsxRuntime.jsxs("tbody", { children: [request.travelers.map((traveler, index) => (jsxRuntime.jsxs("tr", { "data-test": `individual-travel-request-detail-traveler-${index + 1}`, children: [jsxRuntime.jsx("td", { children: travelerName(traveler) || '—' }), jsxRuntime.jsx("td", { children: formatDate(traveler.dateOfBirth) }), jsxRuntime.jsx("td", { children: traveler.gender || '—' })] }, `${travelerName(traveler)}-${index}`))), !request.travelers.length && jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, className: sx(emptyValueStyle), children: "No traveler details were supplied." }) })] })] }) })] }), Boolean(request.organizationAnswers?.length) && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-organization", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Organization information" }) }), jsxRuntime.jsx(AnswerList, { answers: request.organizationAnswers, prefix: "individual-travel-request-detail-organization-answer" })] })), Boolean(request.billingAnswers?.length) && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-billing", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Billing information" }) }), jsxRuntime.jsx(AnswerList, { answers: request.billingAnswers, prefix: "individual-travel-request-detail-billing-answer" })] })), request.airRequest && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-air", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Air Request" }), jsxRuntime.jsx("p", { className: sx(sectionDescriptionStyle), children: request.airRequest.tripType.replace('-', ' ') })] }) }), jsxRuntime.jsx("div", { className: sx(detailTableWrapStyle), children: jsxRuntime.jsxs("table", { className: sx(detailTableStyle), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "From" }), jsxRuntime.jsx("th", { scope: "col", children: "To" }), jsxRuntime.jsx("th", { scope: "col", children: "Depart" }), request.airRequest.tripType === 'round-trip' && jsxRuntime.jsx("th", { scope: "col", children: "Return" })] }) }), jsxRuntime.jsx("tbody", { children: request.airRequest.legs.map((leg, index) => (jsxRuntime.jsxs("tr", { "data-test": `individual-travel-request-detail-air-leg-${index + 1}`, children: [jsxRuntime.jsx("td", { children: leg.departureLocation }), jsxRuntime.jsx("td", { children: leg.arrivalLocation }), jsxRuntime.jsxs("td", { children: [formatDate(leg.departureDate), " \u00B7 ", leg.departureTime] }), request.airRequest?.tripType === 'round-trip' && jsxRuntime.jsxs("td", { children: [formatDate(leg.returnDate), " \u00B7 ", leg.returnTime || '—'] })] }, index))) })] }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Fare preference", children: request.airRequest.farePreference }), jsxRuntime.jsx(DetailField, { label: "Flight preference", children: request.airRequest.flightPreference }), jsxRuntime.jsx(DetailField, { label: "Preferred airline", children: request.airRequest.preferredAirline }), jsxRuntime.jsx(DetailField, { label: "Most important factor", children: request.airRequest.priority }), request.airRequest.details && jsxRuntime.jsx(DetailField, { label: "Air details", children: request.airRequest.details })] })] })), request.hotelRequest && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-hotel", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Hotel Request" }) }), jsxRuntime.jsx("div", { className: sx(detailTableWrapStyle), children: jsxRuntime.jsxs("table", { className: sx(detailTableStyle), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "City" }), jsxRuntime.jsx("th", { scope: "col", children: "Check in" }), jsxRuntime.jsx("th", { scope: "col", children: "Check out" })] }) }), jsxRuntime.jsx("tbody", { children: request.hotelRequest.legs.map((leg, index) => (jsxRuntime.jsxs("tr", { "data-test": `individual-travel-request-detail-hotel-leg-${index + 1}`, children: [jsxRuntime.jsx("td", { children: leg.city }), jsxRuntime.jsx("td", { children: formatDate(leg.checkInDate) }), jsxRuntime.jsx("td", { children: formatDate(leg.checkOutDate) })] }, index))) })] }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Bed preference", children: request.hotelRequest.bedPreference }), jsxRuntime.jsx(DetailField, { label: "Smoking preference", children: request.hotelRequest.smokingPreference }), jsxRuntime.jsx(DetailField, { label: "Preferred hotel", children: request.hotelRequest.preferredHotel })] })] })), request.carRequest && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-car", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Vehicle Rental Request" }) }), jsxRuntime.jsx("div", { className: sx(detailTableWrapStyle), children: jsxRuntime.jsxs("table", { className: sx(detailTableStyle), children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "Pickup" }), jsxRuntime.jsx("th", { scope: "col", children: "Pickup date" }), jsxRuntime.jsx("th", { scope: "col", children: "Drop-off" }), jsxRuntime.jsx("th", { scope: "col", children: "Drop-off date" })] }) }), jsxRuntime.jsx("tbody", { children: request.carRequest.legs.map((leg, index) => (jsxRuntime.jsxs("tr", { "data-test": `individual-travel-request-detail-car-leg-${index + 1}`, children: [jsxRuntime.jsxs("td", { children: [leg.pickupCity, leg.pickupLocation ? ` · ${leg.pickupLocation}` : ''] }), jsxRuntime.jsxs("td", { children: [formatDate(leg.pickupDate), " \u00B7 ", leg.pickupTime] }), jsxRuntime.jsx("td", { children: leg.dropoffLocation || leg.pickupCity }), jsxRuntime.jsxs("td", { children: [formatDate(leg.dropoffDate), " \u00B7 ", leg.dropoffTime] })] }, index))) })] }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Vehicle type", children: request.carRequest.vehicleType }), jsxRuntime.jsx(DetailField, { label: "Rental company", children: request.carRequest.rentalCompany }), jsxRuntime.jsx(DetailField, { label: "Flight number or tail number", children: request.carRequest.flightNumberOrTailNumber })] })] })), request.busRequest && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-bus", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Bus Request" }) }), jsxRuntime.jsxs("dl", { className: sx(detailGridStyle), children: [jsxRuntime.jsx(DetailField, { label: "Pickup city", children: request.busRequest.pickupCity }), jsxRuntime.jsx(DetailField, { label: "Pickup location", children: request.busRequest.pickupLocation }), jsxRuntime.jsx(DetailField, { label: "Pickup date and time", children: formatDateTime$1(request.busRequest.pickupDateTime) }), jsxRuntime.jsx(DetailField, { label: "Drop-off city", children: request.busRequest.dropoffCity }), jsxRuntime.jsx(DetailField, { label: "Drop-off location", children: request.busRequest.dropoffLocation }), jsxRuntime.jsx(DetailField, { label: "Drop-off date and time", children: formatDateTime$1(request.busRequest.dropoffDateTime) }), jsxRuntime.jsx(DetailField, { label: "Vehicle type", children: request.busRequest.vehicleType }), request.busRequest.specialRequests && jsxRuntime.jsx(DetailField, { label: "Bus requests", children: request.busRequest.specialRequests })] })] })), request.specialRequests && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$3), "data-test": "individual-travel-request-detail-special-requests", children: [jsxRuntime.jsx("div", { className: sx(sectionHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$4), children: "Additional requests" }) }), jsxRuntime.jsx("p", { children: request.specialRequests })] }))] }))] })] }));
|
|
36987
38047
|
};
|
|
36988
38048
|
|
|
36989
38049
|
/**
|
|
@@ -36995,7 +38055,7 @@ const IndividualTravelRequestDetailPage = ({ request, loading = false, error, no
|
|
|
36995
38055
|
* the first place, and `'& p'` / `'& ul, & ol'` say what `:global` was working
|
|
36996
38056
|
* around.
|
|
36997
38057
|
*/
|
|
36998
|
-
const pageStyle$
|
|
38058
|
+
const pageStyle$f = {
|
|
36999
38059
|
label: 'InfoCenterPage-pageStyle',
|
|
37000
38060
|
display: 'flex',
|
|
37001
38061
|
flexDirection: 'column',
|
|
@@ -37295,7 +38355,7 @@ const InfoCenterPage = ({ title = 'Info Center', accountName, articles = [], sta
|
|
|
37295
38355
|
};
|
|
37296
38356
|
const modalMeta = modalArticle ? metaFor(modalArticle.category) : null;
|
|
37297
38357
|
const ModalCategoryIcon = modalMeta?.icon;
|
|
37298
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
38358
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$f), className), children: [showBreadcrumb && (jsxRuntime.jsxs("nav", { className: sx(breadcrumbStyle$3), "aria-label": "Breadcrumb", children: [jsxRuntime.jsxs("a", { href: homeHref, children: [jsxRuntime.jsx(HomeIcon, { size: 14 }), "Home"] }), jsxRuntime.jsx("span", { children: "/" }), jsxRuntime.jsx("span", { children: "Info Center" })] })), jsxRuntime.jsxs("div", { className: sx(headerStyle$c), children: [jsxRuntime.jsxs("div", { className: sx(headerTextStyle), children: [jsxRuntime.jsx("h1", { className: sx(titleStyle$9), children: title }), accountName && (jsxRuntime.jsxs("p", { className: sx(subtitleStyle$3), children: ["Travel resources and program information for ", accountName, "."] }))] }), isAdmin && (jsxRuntime.jsxs(Button, { variant: "primary", size: "sm", onClick: onAddArticle, children: [jsxRuntime.jsx(PlusIcon$2, { size: 15 }), "Add Article"] }))] }), pageState === 'loading' && (jsxRuntime.jsxs("div", { className: sx(stateBlockStyle), children: [jsxRuntime.jsx(Spinner, { size: "md" }), jsxRuntime.jsx("span", { children: "Loading\u2026" })] })), pageState === 'error' && (jsxRuntime.jsxs("div", { className: cx(sx(stateBlockStyle), sx(stateErrorStyle)), children: [jsxRuntime.jsx(WarningIcon$1, { size: 28 }), jsxRuntime.jsx("p", { className: sx(stateTextStyle), children: "Unable to load Info Center resources." })] })), pageState === 'empty' && (jsxRuntime.jsxs("div", { className: sx(stateBlockStyle), children: [jsxRuntime.jsx(InfoIcon$1, { size: 28 }), jsxRuntime.jsx("p", { className: sx(stateTextStyle), children: "No resources available." })] })), pageState === 'data' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TabStrip, { className: sx(tabsStyle$1), tabs: [
|
|
37299
38359
|
{ id: 'All', label: 'All', icon: jsxRuntime.jsx(GridIcon, { size: 15 }) },
|
|
37300
38360
|
...categories.map((cat) => {
|
|
37301
38361
|
const m = metaFor(cat);
|
|
@@ -37319,7 +38379,7 @@ const InfoCenterPage = ({ title = 'Info Center', accountName, articles = [], sta
|
|
|
37319
38379
|
* between two module classes (`.costTotal .costLabel/.costValue`) becomes
|
|
37320
38380
|
* `costTotalTextStyle` — see the note there.
|
|
37321
38381
|
*/
|
|
37322
|
-
const pageStyle$
|
|
38382
|
+
const pageStyle$e = {
|
|
37323
38383
|
label: 'ItineraryPage-pageStyle',
|
|
37324
38384
|
display: 'flex',
|
|
37325
38385
|
flexDirection: 'column',
|
|
@@ -37769,13 +38829,13 @@ const ItineraryPage = ({ tripName, recordLocator, travelers, startDate, endDate,
|
|
|
37769
38829
|
const agentCard = agent && (jsxRuntime.jsxs("section", { className: sx(agentCardStyle), "aria-label": "Your travel team", children: [jsxRuntime.jsx("div", { className: sx(agentHeaderStyle), children: jsxRuntime.jsx("h2", { className: sx(agentTitleStyle), children: "Your Travel Team" }) }), jsxRuntime.jsxs("div", { className: sx(agentRowStyle), children: [jsxRuntime.jsxs("div", { className: sx(agentInfoStyle), children: [jsxRuntime.jsx("p", { className: sx(agentNameStyle), children: agent.name }), agent.role && jsxRuntime.jsx("p", { className: sx(agentRoleStyle), children: agent.role })] }), jsxRuntime.jsxs("ul", { className: sx(agentLinksStyle), children: [agent.email && (jsxRuntime.jsx(AgentContact, { icon: jsxRuntime.jsx(MailIcon, { size: 16 }), label: "Email", children: jsxRuntime.jsx("a", { className: sx(agentLinkStyle), href: `mailto:${agent.email}`, children: agent.email }) })), agent.businessHours && (jsxRuntime.jsx(AgentContact, { icon: jsxRuntime.jsx(CalendarIcon$1, { size: 16 }), label: "Business Hours", children: agent.businessHours })), agent.tollFreeNumber && (jsxRuntime.jsx(AgentContact, { icon: jsxRuntime.jsx(PhoneIcon, { size: 16 }), label: "Toll Free Number", children: jsxRuntime.jsx("a", { className: sx(agentLinkStyle), href: telHref(agent.tollFreeNumber), children: agent.tollFreeNumber }) })), agent.afterHoursPhone && (jsxRuntime.jsxs(AgentContact, { icon: jsxRuntime.jsx(HeadsetIcon, { size: 16 }), label: "After-Hours/Emergency Service", children: [jsxRuntime.jsx("a", { className: sx(agentLinkStyle), href: telHref(agent.afterHoursPhone), children: agent.afterHoursPhone }), agent.afterHoursNote && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [" ", agent.afterHoursNote] })] }))] })] })] }));
|
|
37770
38830
|
const titleRow = (jsxRuntime.jsxs("div", { className: sx(titleRowStyle), children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$3), children: "Air Invoice Details" }), showStatus && jsxRuntime.jsx(StatusBadge, { status: badge.variant, label: badge.label })] }));
|
|
37771
38831
|
const actions = showActions && (jsxRuntime.jsxs("div", { className: sx(actionsStyle$1), "aria-label": "Itinerary actions", children: [onPrint && jsxRuntime.jsx(Button, { type: "button", variant: "secondary", size: "sm", leftIcon: jsxRuntime.jsx(PrinterIcon, { size: 16 }), "data-test": "itinerary-print", onClick: onPrint, children: "Print" }), onEmail && jsxRuntime.jsx(Button, { type: "button", variant: "secondary", size: "sm", leftIcon: jsxRuntime.jsx(MailIcon, { size: 16 }), "data-test": "itinerary-email", onClick: onEmail, children: "Email" }), onAddToCalendar && jsxRuntime.jsx(Button, { type: "button", variant: "secondary", size: "sm", leftIcon: jsxRuntime.jsx(CalendarIcon$1, { size: 16 }), "data-test": "itinerary-add-to-calendar", onClick: onAddToCalendar, children: "Add to calendar" }), onDownloadInvoice && jsxRuntime.jsx(Button, { type: "button", variant: "secondary", size: "sm", leftIcon: jsxRuntime.jsx(DocumentIcon, { size: 16 }), "data-test": "itinerary-download-invoice", onClick: onDownloadInvoice, children: "Invoice PDF" })] }));
|
|
37772
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
38832
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$e), className), "data-test": "itinerary-page", children: [jsxRuntime.jsx(PageHeaderSubsection, { sectionName: sectionName, pageName: pageName ?? (travelers.length > 0 ? `Itinerary for ${itineraryPageName(travelers)}` : 'Itinerary'), meta: startDate && endDate ? jsxRuntime.jsx(TravelDateRange, { startDate: startDate, endDate: endDate }) : undefined, onBack: onBack, backLabel: backLabel }), !showInvoice && notices, !showInvoice && agentCard, showInvoice ? (jsxRuntime.jsxs("section", { className: sx(invoiceSectionStyle), "aria-label": "Booking and invoice", children: [jsxRuntime.jsxs("div", { className: sx(invoiceActionsStyle), children: [jsxRuntime.jsx(Segment, { size: "sm", options: VIEW_OPTIONS, value: view, onChange: changeView, "aria-label": "Itinerary view" }), actions] }), !itineraryOnly && notices, !itineraryOnly && agentCard, !itineraryOnly && bookingCard, !itineraryOnly && invoice && jsxRuntime.jsx(AirInvoiceCard, { ...invoice, title: "Air Invoice Details" })] })) : (jsxRuntime.jsxs("header", { className: sx(headerStyle$b), children: [jsxRuntime.jsxs("div", { className: sx(headerMainStyle$1), children: [titleRow, jsxRuntime.jsxs("dl", { className: sx(factsStyle$1), children: [recordLocator && (jsxRuntime.jsxs("div", { className: sx(factStyle), children: [jsxRuntime.jsx("dt", { className: sx(factLabelStyle), children: "Confirmation" }), jsxRuntime.jsx("dd", { className: cx(sx(factValueStyle), sx(monoStyle$1)), children: recordLocator })] })), startDate && endDate && (jsxRuntime.jsxs("div", { className: sx(factStyle), children: [jsxRuntime.jsx("dt", { className: sx(factLabelStyle), children: "Travel dates" }), jsxRuntime.jsx("dd", { className: sx(factValueStyle), children: formatItineraryDateRange(startDate, endDate) })] })), travelers.length > 0 && (jsxRuntime.jsxs("div", { className: sx(factStyle), children: [jsxRuntime.jsx("dt", { className: sx(factLabelStyle), children: travelers.length === 1 ? 'Traveler' : 'Travelers' }), jsxRuntime.jsx("dd", { className: sx(factValueStyle), title: travelers.join(', '), children: travelerLabel })] })), sportCode && (jsxRuntime.jsxs("div", { className: sx(factStyle), children: [jsxRuntime.jsx("dt", { className: sx(factLabelStyle), children: "Program" }), jsxRuntime.jsx("dd", { className: sx(factValueStyle), children: sportCode })] }))] })] }), actions] })), !showInvoice && bookingCard, !itineraryOnly && travelers.length > 1 && (jsxRuntime.jsxs("section", { className: sx(travelersStyle), "aria-label": "Travelers on this itinerary", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$3), children: "Travelers" }), jsxRuntime.jsx("ul", { className: sx(travelerListStyle), children: travelers.map((traveler) => jsxRuntime.jsx("li", { className: sx(travelerChipStyle), children: traveler }, traveler)) })] })), !itineraryOnly && !loading && !error && notice && (jsxRuntime.jsx("div", { "data-test": "itinerary-notice", children: jsxRuntime.jsx(Alert, { variant: "warning", title: "Additional booking details", children: notice }) })), jsxRuntime.jsxs("div", { className: sx(bodyStyle$1), children: [jsxRuntime.jsx("div", { className: sx(mainStyle$1), children: jsxRuntime.jsxs("div", { "data-test": loading ? 'itinerary-loading' : error ? 'itinerary-error' : undefined, children: [jsxRuntime.jsx(ItineraryTimeline, { segments: segments, loading: loading, error: error, onCheckIn: onCheckIn, renderVendorMark: renderVendorMark, showTypeTabs: true }), error && onRetry && (jsxRuntime.jsx("div", { className: sx(retryRowStyle), children: jsxRuntime.jsx(Button, { type: "button", variant: "secondary", size: "sm", onClick: onRetry, "data-test": "itinerary-retry", children: "Try again" }) }))] }) }), !loading && !error && (closingBanners.length > 0 || closingNotes) && (jsxRuntime.jsxs("div", { className: sx(noticesStyle), "data-test": "itinerary-closing", children: [closingBanners.length > 0 && jsxRuntime.jsx(PageBanners, { className: sx(bannersStyle), systemBanners: closingBanners, alertBanners: [] }), closingNotes && jsxRuntime.jsx("div", { className: sx(closingNotesStyle), children: closingNotes })] }))] })] }));
|
|
37773
38833
|
};
|
|
37774
38834
|
ItineraryPage.displayName = 'ItineraryPage';
|
|
37775
38835
|
|
|
37776
38836
|
/** NotFoundPage's compiled rules. A straight translation — nothing in the
|
|
37777
38837
|
* stylesheet overlapped, so no specificity work was needed. */
|
|
37778
|
-
const pageStyle$
|
|
38838
|
+
const pageStyle$d = {
|
|
37779
38839
|
label: 'NotFoundPage-pageStyle',
|
|
37780
38840
|
display: 'flex',
|
|
37781
38841
|
alignItems: 'center',
|
|
@@ -37842,13 +38902,13 @@ const DefaultIllustration = () => (jsxRuntime.jsxs("svg", { width: "120", height
|
|
|
37842
38902
|
* - Optional illustration
|
|
37843
38903
|
*/
|
|
37844
38904
|
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 = '', }) => {
|
|
37845
|
-
const pageClasses = cx(sx(pageStyle$
|
|
38905
|
+
const pageClasses = cx(sx(pageStyle$d), className);
|
|
37846
38906
|
return (jsxRuntime.jsx("div", { className: pageClasses, children: jsxRuntime.jsxs("div", { className: sx(cardStyle), children: [jsxRuntime.jsx("div", { className: sx(illustrationStyle), children: illustration || jsxRuntime.jsx(DefaultIllustration, {}) }), jsxRuntime.jsx("h1", { className: sx(errorCodeStyle), children: errorCode }), jsxRuntime.jsx("h2", { className: sx(titleStyle$8), children: title }), jsxRuntime.jsx("p", { className: sx(messageStyle), children: message }), action && (jsxRuntime.jsx("div", { className: sx(actionStyle), children: action }))] }) }));
|
|
37847
38907
|
};
|
|
37848
38908
|
NotFoundPage.displayName = 'NotFoundPage';
|
|
37849
38909
|
|
|
37850
38910
|
/** OffFleetLearnedExamplesPage's compiled rules — flat, no specificity ladder. */
|
|
37851
|
-
const pageStyle$
|
|
38911
|
+
const pageStyle$c = {
|
|
37852
38912
|
label: 'OffFleetLearnedExamplesPage-pageStyle',
|
|
37853
38913
|
display: 'flex',
|
|
37854
38914
|
flexDirection: 'column',
|
|
@@ -37872,7 +38932,7 @@ const titleStyle$7 = {
|
|
|
37872
38932
|
fontWeight: 'var(--fw-semibold)',
|
|
37873
38933
|
lineHeight: 'var(--lh-2xl)',
|
|
37874
38934
|
};
|
|
37875
|
-
const descriptionStyle$
|
|
38935
|
+
const descriptionStyle$4 = {
|
|
37876
38936
|
label: 'OffFleetLearnedExamplesPage-descriptionStyle',
|
|
37877
38937
|
maxWidth: '80ch',
|
|
37878
38938
|
margin: 0,
|
|
@@ -37968,7 +39028,7 @@ const OFF_FLEET_LEARNED_EMPTY_COPY = 'The corpus starts empty and only /api/Repr
|
|
|
37968
39028
|
* Learned examples — the corrections corpus. The empty state explains the mechanism
|
|
37969
39029
|
* rather than apologising, because an empty corpus is the correct starting state.
|
|
37970
39030
|
*/
|
|
37971
|
-
const OffFleetLearnedExamplesPage = ({ examples = [], onOpenExample, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
39031
|
+
const OffFleetLearnedExamplesPage = ({ examples = [], onOpenExample, className = '', }) => (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$c), className), "data-test": "off-fleet-learned-examples-page", children: [jsxRuntime.jsxs("header", { className: sx(headerStyle$a), children: [jsxRuntime.jsx("h1", { className: sx(titleStyle$7), children: "Learned examples" }), jsxRuntime.jsx("p", { className: sx(descriptionStyle$4), children: OFF_FLEET_LEARNED_DESCRIPTION })] }), examples.length === 0 ? (jsxRuntime.jsx(EmptyState$1, { title: "No examples yet", description: OFF_FLEET_LEARNED_EMPTY_COPY, icon: jsxRuntime.jsx(LightbulbIcon, { size: 32 }) })) : (jsxRuntime.jsx("ul", { className: sx(examplesStyle), children: examples.map((example) => (jsxRuntime.jsxs("li", { className: sx(exampleStyle), "data-test": "off-fleet-learned-example", children: [jsxRuntime.jsxs("div", { className: sx(exampleHeaderStyle), children: [jsxRuntime.jsx("span", { className: sx(operatorStyle), children: example.operator }), jsxRuntime.jsxs("span", { className: sx(metaStyle), children: [example.sourceFileName, " \u00B7 learned ", example.learnedLabel] }), onOpenExample && (jsxRuntime.jsx(Button, { variant: "outline", size: "sm", className: sx(openButtonStyle), onClick: () => onOpenExample(example.id), "data-test": "off-fleet-open-example", children: "Open" }))] }), jsxRuntime.jsxs("div", { className: sx(pairStyle), children: [jsxRuntime.jsxs("div", { className: sx(pairSideStyle), children: [jsxRuntime.jsx("h2", { className: sx(pairTitleStyle), children: "Raw text" }), jsxRuntime.jsx("pre", { className: sx(codeStyle), "data-test": "off-fleet-example-raw", children: example.rawText })] }), jsxRuntime.jsxs("div", { className: sx(pairSideStyle), children: [jsxRuntime.jsx("h2", { className: sx(pairTitleStyle), children: "Corrected JSON" }), jsxRuntime.jsx("pre", { className: sx(codeStyle), "data-test": "off-fleet-example-json", children: example.correctedJson })] })] })] }, example.id))) }))] }));
|
|
37972
39032
|
OffFleetLearnedExamplesPage.displayName = 'OffFleetLearnedExamplesPage';
|
|
37973
39033
|
|
|
37974
39034
|
/**
|
|
@@ -37977,7 +39037,7 @@ OffFleetLearnedExamplesPage.displayName = 'OffFleetLearnedExamplesPage';
|
|
|
37977
39037
|
* One rule per element, no shared properties between them, so no selector
|
|
37978
39038
|
* needed doubling on the way across.
|
|
37979
39039
|
*/
|
|
37980
|
-
const pageStyle$
|
|
39040
|
+
const pageStyle$b = {
|
|
37981
39041
|
label: 'OffFleetReviewQueuePage-pageStyle',
|
|
37982
39042
|
display: 'flex',
|
|
37983
39043
|
flexDirection: 'column',
|
|
@@ -38001,7 +39061,7 @@ const titleStyle$6 = {
|
|
|
38001
39061
|
fontWeight: 'var(--fw-semibold)',
|
|
38002
39062
|
lineHeight: 'var(--lh-2xl)',
|
|
38003
39063
|
};
|
|
38004
|
-
const descriptionStyle$
|
|
39064
|
+
const descriptionStyle$3 = {
|
|
38005
39065
|
label: 'OffFleetReviewQueuePage-descriptionStyle',
|
|
38006
39066
|
maxWidth: '80ch',
|
|
38007
39067
|
margin: 0,
|
|
@@ -38140,7 +39200,7 @@ const OffFleetReviewQueuePage = ({ submissions, counts, onReview, onOpenRawText,
|
|
|
38140
39200
|
render: (_value, submission) => (jsxRuntime.jsx(Button, { size: "sm", onClick: () => onReview?.(submission.id), "data-test": "off-fleet-review", children: "Review" })),
|
|
38141
39201
|
},
|
|
38142
39202
|
];
|
|
38143
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
39203
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$b), className), "data-test": "off-fleet-review-queue-page", children: [jsxRuntime.jsxs("header", { className: sx(headerStyle$9), children: [jsxRuntime.jsx("h1", { className: sx(titleStyle$6), children: "Review queue" }), jsxRuntime.jsx("p", { className: sx(descriptionStyle$3), children: OFF_FLEET_QUEUE_DESCRIPTION })] }), jsxRuntime.jsxs("div", { className: sx(statsStyle), "data-test": "off-fleet-stats", children: [jsxRuntime.jsx(Metric, { label: "Needs review", value: tally['needs-review'] }), jsxRuntime.jsx(Metric, { label: "Received", value: tally.received }), jsxRuntime.jsx(Metric, { label: "Processing", value: tally.processing }), jsxRuntime.jsx(Metric, { label: "Parsed", value: tally.parsed }), jsxRuntime.jsx(Metric, { label: "All submissions", value: tally.all })] }), jsxRuntime.jsx(Table, { columns: columns, data: submissions, rowKey: "id", loading: loading, emptyContent: jsxRuntime.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." }) })] }));
|
|
38144
39204
|
};
|
|
38145
39205
|
OffFleetReviewQueuePage.displayName = 'OffFleetReviewQueuePage';
|
|
38146
39206
|
|
|
@@ -38153,7 +39213,7 @@ OffFleetReviewQueuePage.displayName = 'OffFleetReviewQueuePage';
|
|
|
38153
39213
|
* `.section` together, is now split across the two style objects it applied to
|
|
38154
39214
|
* — an object owns every rule that targets it.
|
|
38155
39215
|
*/
|
|
38156
|
-
const pageStyle$
|
|
39216
|
+
const pageStyle$a = {
|
|
38157
39217
|
label: 'OffFleetSubmissionDetailPage-pageStyle',
|
|
38158
39218
|
display: 'flex',
|
|
38159
39219
|
flexDirection: 'column',
|
|
@@ -38508,12 +39568,155 @@ const OffFleetSubmissionDetailPage = ({ submissionId, fileName, statusLabel = 'N
|
|
|
38508
39568
|
target?.querySelector('input')?.focus();
|
|
38509
39569
|
};
|
|
38510
39570
|
const blocked = Boolean(blockedReason);
|
|
38511
|
-
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$
|
|
39571
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$a), className), "data-test": "off-fleet-submission-detail-page", children: [jsxRuntime.jsxs("div", { className: sx(topRowStyle), children: [onBack && (jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: sx(breadcrumbStyle$2), leftIcon: jsxRuntime.jsx(ChevronLeftIcon, { size: 16 }), onClick: onBack, "data-test": "off-fleet-detail-back", children: backLabel })), jsxRuntime.jsx(StatusBadge, { status: "in-review", label: statusLabel })] }), jsxRuntime.jsxs("header", { className: sx(headerStyle$8), children: [jsxRuntime.jsx("h1", { className: sx(titleStyle$5), children: fileName }), jsxRuntime.jsx("p", { className: sx(subtitleStyle$2), children: submissionId })] }), jsxRuntime.jsx(Alert, { variant: "warning", title: "Why this needs review", children: jsxRuntime.jsx("span", { className: sx(reasonStyle), "data-test": "off-fleet-detail-reason", children: failureReason }) }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Source document", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$2), children: "Source document" }), jsxRuntime.jsx("p", { className: sx(sectionHelpStyle$1), children: "Text the parser actually read \u2014 OCR damage included." }), jsxRuntime.jsx("pre", { className: sx(rawTextStyle), "data-test": "off-fleet-raw-text", children: rawText })] }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Submission", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$2), children: "Submission" }), jsxRuntime.jsxs("dl", { className: sx(factsStyle), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "File name" }), jsxRuntime.jsx("dd", { children: fileName })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Carrier" }), jsxRuntime.jsx("dd", { children: carrier })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Carrier Union" }), jsxRuntime.jsx("dd", { className: sx(monoStyle), children: carrierUnion })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Flight Program" }), jsxRuntime.jsx("dd", { className: sx(monoStyle), children: flightProgram })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Received" }), jsxRuntime.jsx("dd", { children: receivedAt })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("dt", { children: "Updated" }), jsxRuntime.jsx("dd", { children: updatedAt })] })] })] }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Segments", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$2), children: "Segments" }), jsxRuntime.jsxs("p", { className: sx(sectionHelpStyle$1), children: [charterSegmentCount, " charter segment(s) on this Flight Program"] }), jsxRuntime.jsx(Accordion, { defaultOpen: false, header: jsxRuntime.jsxs("span", { className: sx(accordionHeaderStyle), children: ["Trip segments available for matching (", charterSegmentCount, ")"] }), children: jsxRuntime.jsx("div", { className: sx(tableScrollStyle), children: jsxRuntime.jsxs("table", { className: sx(segmentTableStyle), "data-test": "off-fleet-segments", children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "Departs" }), jsxRuntime.jsx("th", { scope: "col", children: "Route" }), jsxRuntime.jsx("th", { scope: "col", children: "Trip" })] }) }), jsxRuntime.jsx("tbody", { children: tripSegments.map((segment) => (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: segment.departs }), jsxRuntime.jsxs("td", { children: [segment.origin, " \u2192 ", segment.destination] }), jsxRuntime.jsx("td", { className: sx(monoStyle), children: segment.tripGuid })] }, segment.id))) })] }) }) })] }), extractionJson && (jsxRuntime.jsx("section", { className: sx(sectionStyle$2), "aria-label": "Extraction JSON", children: jsxRuntime.jsx(Accordion, { defaultOpen: false, header: jsxRuntime.jsx("span", { className: sx(accordionHeaderStyle), children: "Extraction JSON as stored" }), children: jsxRuntime.jsx("pre", { className: sx(rawTextStyle), "data-test": "off-fleet-extraction-json", children: extractionJson }) }) })), jsxRuntime.jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Quote header", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$2), children: "Quote header" }), jsxRuntime.jsx("p", { className: sx(sectionHelpStyle$1), children: "Fields the parser maps onto the Salesforce Flight Quote. Blank means null." }), jsxRuntime.jsxs("div", { className: sx(headerGridStyle), children: [jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" })] })] }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Flight legs", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$2), children: "Flight legs" }), jsxRuntime.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." }), jsxRuntime.jsx("ol", { className: sx(legsStyle$1), children: legs.map((leg, index) => (jsxRuntime.jsxs("li", { className: sx(legStyle$1), ref: (node) => {
|
|
38512
39572
|
legRefs.current[leg.id] = node;
|
|
38513
39573
|
}, "data-test": "off-fleet-leg", children: [jsxRuntime.jsxs("div", { className: sx(legHeaderStyle), children: [jsxRuntime.jsxs("span", { className: sx(legIndexStyle), children: ["Leg ", index + 1] }), jsxRuntime.jsx(StatusBadge, { status: MATCH_BADGES[leg.match].status, label: MATCH_BADGES[leg.match].label }), jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: sx(removeLegStyle), onClick: () => removeLeg(leg.id), "data-test": "off-fleet-remove-leg", children: "Remove leg" })] }), jsxRuntime.jsxs("div", { className: sx(legGridStyle), children: [jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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" }), jsxRuntime.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))) }), jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: addLeg, "data-test": "off-fleet-add-leg", children: "Add leg" })] }), jsxRuntime.jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Ambiguity flag", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$2), children: "Ambiguity flag" }), jsxRuntime.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 && (jsxRuntime.jsxs("section", { className: sx(sectionStyle$2), "aria-label": "Pre-flight check", children: [jsxRuntime.jsx("h2", { className: sx(sectionTitleStyle$2), children: "Pre-flight check" }), jsxRuntime.jsx("div", { className: sx(tableScrollStyle), children: jsxRuntime.jsxs("table", { className: sx(preflightTableStyle), "data-test": "off-fleet-preflight", children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "col", children: "Leg" }), jsxRuntime.jsx("th", { scope: "col", children: "As stated" }), jsxRuntime.jsx("th", { scope: "col", children: "Per leg after normalization" })] }) }), jsxRuntime.jsx("tbody", { children: preflight.rows.map((row) => (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "row", children: row.leg }), jsxRuntime.jsx("td", { children: row.asStated }), jsxRuntime.jsx("td", { children: row.perLegAfterNormalization })] }, row.leg))) }), jsxRuntime.jsx("tfoot", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { scope: "row", children: "Total" }), jsxRuntime.jsx("td", {}), jsxRuntime.jsx("td", { "data-test": "off-fleet-preflight-total", children: preflight.total })] }) })] }) }), jsxRuntime.jsxs("p", { className: sx(unmatchedStyle), "data-test": "off-fleet-unmatched-count", children: [preflight.unmatchedCount, " of ", preflight.legCount, " leg(s) unmatched"] }), jsxRuntime.jsx("ul", { className: sx(groupingsStyle), "data-test": "off-fleet-trip-groupings", children: preflight.tripGroupings.map((grouping) => (jsxRuntime.jsxs("li", { className: sx(groupingStyle), children: [jsxRuntime.jsx("span", { className: sx(monoStyle), children: grouping.tripGuid }), jsxRuntime.jsxs("span", { children: [grouping.legCount, " leg(s) \u00B7 ", grouping.total] })] }, grouping.tripGuid))) }), jsxRuntime.jsx("p", { className: sx(consequenceStyle), children: "Each total becomes one QuoteLineItem against a new Flight Quote for that Trip." }), preflight.diagnostics?.map((diagnostic) => (jsxRuntime.jsxs("div", { className: sx(diagnosticStyle), children: [jsxRuntime.jsx("p", { className: sx(diagnosticMessageStyle), "data-test": "off-fleet-diagnostic", children: diagnostic.message }), jsxRuntime.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) => (jsxRuntime.jsx(Alert, { variant: "warning", children: jsxRuntime.jsx("span", { className: sx(reasonStyle), "data-test": "off-fleet-warning", children: warning }) }, warning)))] })), jsxRuntime.jsxs("div", { className: sx(actionsStyle), children: [jsxRuntime.jsx(Button, { disabled: blocked, onClick: () => onCheckCorrection?.({ quoteHeader, legs, ambiguityReason }), "data-test": "off-fleet-check-correction", children: "Check correction" }), jsxRuntime.jsx(Button, { variant: "secondary", disabled: blocked, onClick: onReprocess, "data-test": "off-fleet-reprocess", children: "Reprocess submission" }), blockedReason && (jsxRuntime.jsx("p", { className: sx(blockedReasonStyle), "data-test": "off-fleet-blocked-reason", children: blockedReason }))] })] }));
|
|
38514
39574
|
};
|
|
38515
39575
|
OffFleetSubmissionDetailPage.displayName = 'OffFleetSubmissionDetailPage';
|
|
38516
39576
|
|
|
39577
|
+
/** OperationsResponseCenterPage's compiled rules. Two panels on desktop; one column under 768px. */
|
|
39578
|
+
const pageStyle$9 = {
|
|
39579
|
+
label: 'OperationsResponseCenterPage-pageStyle',
|
|
39580
|
+
display: 'flex',
|
|
39581
|
+
flexDirection: 'column',
|
|
39582
|
+
gap: 'var(--space-4)',
|
|
39583
|
+
minHeight: '100%',
|
|
39584
|
+
padding: 'var(--space-5) var(--space-6)',
|
|
39585
|
+
background: 'var(--bg-page)',
|
|
39586
|
+
'@media (max-width: 767px)': {
|
|
39587
|
+
padding: 'var(--space-4)',
|
|
39588
|
+
},
|
|
39589
|
+
};
|
|
39590
|
+
const descriptionStyle$2 = {
|
|
39591
|
+
label: 'OperationsResponseCenterPage-descriptionStyle',
|
|
39592
|
+
maxWidth: '80ch',
|
|
39593
|
+
margin: 0,
|
|
39594
|
+
color: 'var(--fg-3)',
|
|
39595
|
+
fontSize: 'var(--fs-sm)',
|
|
39596
|
+
lineHeight: 'var(--lh-sm)',
|
|
39597
|
+
};
|
|
39598
|
+
const panelsStyle = {
|
|
39599
|
+
label: 'OperationsResponseCenterPage-panelsStyle',
|
|
39600
|
+
display: 'grid',
|
|
39601
|
+
gridTemplateColumns: 'minmax(22rem, 2fr) minmax(0, 3fr)',
|
|
39602
|
+
alignItems: 'start',
|
|
39603
|
+
gap: 'var(--space-4)',
|
|
39604
|
+
'@media (max-width: 767px)': {
|
|
39605
|
+
gridTemplateColumns: 'minmax(0, 1fr)',
|
|
39606
|
+
},
|
|
39607
|
+
};
|
|
39608
|
+
/* The intake panel leaves the flow on mobile; the New incident button opens it full-screen instead. */
|
|
39609
|
+
const intakePanelStyle = {
|
|
39610
|
+
label: 'OperationsResponseCenterPage-intakePanelStyle',
|
|
39611
|
+
minWidth: 0,
|
|
39612
|
+
'@media (max-width: 767px)': {
|
|
39613
|
+
display: 'none',
|
|
39614
|
+
},
|
|
39615
|
+
};
|
|
39616
|
+
const mobileOnlyStyle = {
|
|
39617
|
+
label: 'OperationsResponseCenterPage-mobileOnlyStyle',
|
|
39618
|
+
display: 'none',
|
|
39619
|
+
'@media (max-width: 767px)': {
|
|
39620
|
+
display: 'block',
|
|
39621
|
+
},
|
|
39622
|
+
};
|
|
39623
|
+
const logPanelStyle = {
|
|
39624
|
+
label: 'OperationsResponseCenterPage-logPanelStyle',
|
|
39625
|
+
minWidth: 0,
|
|
39626
|
+
};
|
|
39627
|
+
const panelTitleStyle = {
|
|
39628
|
+
label: 'OperationsResponseCenterPage-panelTitleStyle',
|
|
39629
|
+
margin: 0,
|
|
39630
|
+
color: 'var(--fg-1)',
|
|
39631
|
+
fontSize: 'var(--fs-lg)',
|
|
39632
|
+
fontWeight: 'var(--fw-semibold)',
|
|
39633
|
+
lineHeight: 'var(--lh-lg)',
|
|
39634
|
+
};
|
|
39635
|
+
const feedStyle = {
|
|
39636
|
+
label: 'OperationsResponseCenterPage-feedStyle',
|
|
39637
|
+
display: 'flex',
|
|
39638
|
+
flexDirection: 'column',
|
|
39639
|
+
gap: 'var(--space-3)',
|
|
39640
|
+
margin: 0,
|
|
39641
|
+
padding: 0,
|
|
39642
|
+
listStyle: 'none',
|
|
39643
|
+
};
|
|
39644
|
+
const archiveSurfaceStyle = {
|
|
39645
|
+
label: 'OperationsResponseCenterPage-archiveSurfaceStyle',
|
|
39646
|
+
minWidth: 0,
|
|
39647
|
+
};
|
|
39648
|
+
const feedToolbarStyle = {
|
|
39649
|
+
label: 'OperationsResponseCenterPage-feedToolbarStyle',
|
|
39650
|
+
display: 'flex',
|
|
39651
|
+
flexWrap: 'wrap',
|
|
39652
|
+
alignItems: 'center',
|
|
39653
|
+
gap: 'var(--space-2)',
|
|
39654
|
+
marginBottom: 'var(--space-3)',
|
|
39655
|
+
};
|
|
39656
|
+
/* A toggle chip: outlined when off, filled red when it is narrowing the log to overdue Incidents. */
|
|
39657
|
+
const filterChipStyle = {
|
|
39658
|
+
label: 'OperationsResponseCenterPage-filterChipStyle',
|
|
39659
|
+
display: 'inline-flex',
|
|
39660
|
+
alignItems: 'center',
|
|
39661
|
+
gap: 'var(--space-1-5)',
|
|
39662
|
+
minHeight: 'var(--space-8)',
|
|
39663
|
+
padding: '0 var(--space-3)',
|
|
39664
|
+
border: '1px solid var(--color-alert-error-border)',
|
|
39665
|
+
borderRadius: 'var(--radius-full)',
|
|
39666
|
+
background: 'var(--bg-surface)',
|
|
39667
|
+
color: 'var(--color-error)',
|
|
39668
|
+
fontFamily: 'inherit',
|
|
39669
|
+
fontSize: 'var(--fs-sm)',
|
|
39670
|
+
fontWeight: 'var(--fw-semibold)',
|
|
39671
|
+
lineHeight: 'var(--lh-sm)',
|
|
39672
|
+
cursor: 'pointer',
|
|
39673
|
+
'&:hover': { background: 'var(--alert-error-bg)' },
|
|
39674
|
+
'&:focus-visible': {
|
|
39675
|
+
outline: '2px solid var(--color-primary)',
|
|
39676
|
+
outlineOffset: 2,
|
|
39677
|
+
},
|
|
39678
|
+
'&[aria-pressed="true"]': {
|
|
39679
|
+
borderColor: 'var(--color-error)',
|
|
39680
|
+
background: 'var(--color-error)',
|
|
39681
|
+
color: 'var(--color-white)',
|
|
39682
|
+
},
|
|
39683
|
+
};
|
|
39684
|
+
|
|
39685
|
+
const PAGE_TITLE = 'Operations Response Center';
|
|
39686
|
+
const EMPTY_ARCHIVE = { incidents: [], totalItems: 0, page: 1, filters: {} };
|
|
39687
|
+
/**
|
|
39688
|
+
* The Operations Response Center: log an Incident on one side, watch the live
|
|
39689
|
+
* Alert Log of Open Incidents on the other. Incidents with a Route left
|
|
39690
|
+
* unacknowledged too long float to the top in red. Built for a Microsoft
|
|
39691
|
+
* Teams tab, so it carries its own heading and no Hub chrome; one column on mobile.
|
|
39692
|
+
*/
|
|
39693
|
+
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 = '', }) => {
|
|
39694
|
+
const drawerTitleId = React.useId();
|
|
39695
|
+
const [intakeOpen, setIntakeOpen] = React.useState(false);
|
|
39696
|
+
const [resolvingId, setResolvingId] = React.useState(null);
|
|
39697
|
+
const [needsAckOnly, setNeedsAckOnly] = React.useState(defaultNeedsAcknowledgementOnly);
|
|
39698
|
+
const ordered = React.useMemo(() => orderAlertLog(incidents, now, staleAfterMinutes), [incidents, now, staleAfterMinutes]);
|
|
39699
|
+
const overdueCount = ordered.filter((incident) => isIncidentOverdue(incident, now, staleAfterMinutes)).length;
|
|
39700
|
+
const shown = needsAckOnly
|
|
39701
|
+
? ordered.filter((incident) => isIncidentOverdue(incident, now, staleAfterMinutes))
|
|
39702
|
+
: ordered;
|
|
39703
|
+
const resolving = incidents.find((incident) => incident.id === resolvingId);
|
|
39704
|
+
if (view === 'archive') {
|
|
39705
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$9), className), "data-test": "operations-response-center-page", "data-view": "archive", children: [jsxRuntime.jsx(PageHeaderSubsection, { sectionName: PAGE_TITLE, pageName: "Archive", meta: jsxRuntime.jsx("p", { className: sx(descriptionStyle$2), children: "Resolved incidents, newest first. Read-only." }), onBack: onBack, backLabel: "Back to Alert Log" }), jsxRuntime.jsx(Card, { padding: "md", className: sx(archiveSurfaceStyle), children: jsxRuntime.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 }) })] }));
|
|
39706
|
+
}
|
|
39707
|
+
const intakeForm = (inDrawer) => (jsxRuntime.jsx(IncidentIntakeForm, { accounts: accounts, defaultLoggingDivision: defaultLoggingDivision, onLoggingDivisionChange: onLoggingDivisionChange, onCancel: inDrawer ? () => setIntakeOpen(false) : undefined, onSubmit: (draft) => {
|
|
39708
|
+
onCreateIncident?.(draft);
|
|
39709
|
+
if (inDrawer)
|
|
39710
|
+
setIntakeOpen(false);
|
|
39711
|
+
} }));
|
|
39712
|
+
return (jsxRuntime.jsxs("div", { className: cx(sx(pageStyle$9), className), "data-test": "operations-response-center-page", "data-view": "log", children: [jsxRuntime.jsx(PageHeader, { title: PAGE_TITLE, after: jsxRuntime.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." }) }), jsxRuntime.jsx("div", { className: sx(mobileOnlyStyle), children: jsxRuntime.jsx(Button, { size: "lg", fullWidth: true, leftIcon: jsxRuntime.jsx(PlusIcon$2, { size: 20 }), onClick: () => setIntakeOpen(true), "data-test": "operations-response-center-new-incident", children: "New incident" }) }), jsxRuntime.jsxs("div", { className: sx(panelsStyle), children: [jsxRuntime.jsx("section", { className: sx(intakePanelStyle), "aria-label": "New incident panel", children: jsxRuntime.jsx(Module, { title: jsxRuntime.jsx("h2", { className: sx(panelTitleStyle), children: "New incident" }), useToggle: false, children: intakeForm(false) }) }), jsxRuntime.jsx("section", { className: sx(logPanelStyle), "aria-label": "Alert Log panel", children: jsxRuntime.jsxs(Module, { title: jsxRuntime.jsx("h2", { className: sx(panelTitleStyle), children: "Alert Log" }), badge: ordered.length || undefined, useToggle: false, footer: jsxRuntime.jsx(Button, { variant: "secondary", fullWidth: true, onClick: onSeeAll, "data-test": "operations-response-center-see-all", children: "See All" }), children: [(overdueCount > 0 || needsAckOnly) && (jsxRuntime.jsx("div", { className: sx(feedToolbarStyle), children: jsxRuntime.jsxs("button", { type: "button", className: sx(filterChipStyle), "aria-pressed": needsAckOnly, onClick: () => setNeedsAckOnly((on) => !on), "data-test": "operations-response-center-needs-ack-filter", children: [jsxRuntime.jsx(WarningIcon$1, { size: 14, "aria-hidden": "true" }), "Needs acknowledgement (", overdueCount, ")"] }) })), shown.length === 0 ? (needsAckOnly ? (jsxRuntime.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." })) : (jsxRuntime.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." }))) : (jsxRuntime.jsx("ul", { className: sx(feedStyle), "aria-label": "Open incidents", "data-test": "operations-response-center-feed", children: shown.map((incident) => (jsxRuntime.jsx("li", { children: jsxRuntime.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))) }))] }) })] }), jsxRuntime.jsxs(Drawer, { isOpen: intakeOpen, onClose: () => setIntakeOpen(false), position: "right", size: "full", "aria-labelledby": drawerTitleId, children: [jsxRuntime.jsx(Drawer.Header, { children: jsxRuntime.jsx("h2", { id: drawerTitleId, className: sx(panelTitleStyle), children: "New incident" }) }), jsxRuntime.jsx(Drawer.Body, { children: intakeForm(true) })] }), jsxRuntime.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) => {
|
|
39713
|
+
if (resolving)
|
|
39714
|
+
onResolve?.(resolving.id, input);
|
|
39715
|
+
setResolvingId(null);
|
|
39716
|
+
} })] }));
|
|
39717
|
+
};
|
|
39718
|
+
OperationsResponseCenterPage.displayName = 'OperationsResponseCenterPage';
|
|
39719
|
+
|
|
38517
39720
|
const pageStyle$8 = {
|
|
38518
39721
|
label: 'RosterProgramNumbersPage-pageStyle',
|
|
38519
39722
|
display: 'flex',
|
|
@@ -39779,6 +40982,7 @@ TripDetailPage.displayName = 'TripDetailPage';
|
|
|
39779
40982
|
exports.ACMI_AIRCRAFT_OPTIONS = ACMI_AIRCRAFT_OPTIONS;
|
|
39780
40983
|
exports.ACMI_CARRIER_OPTIONS = ACMI_CARRIER_OPTIONS;
|
|
39781
40984
|
exports.ACMI_INSURANCE_FLAT = ACMI_INSURANCE_FLAT;
|
|
40985
|
+
exports.ARCHIVE_PAGE_SIZE = ARCHIVE_PAGE_SIZE;
|
|
39782
40986
|
exports.AccentCard = AccentCard;
|
|
39783
40987
|
exports.Accordion = Accordion;
|
|
39784
40988
|
exports.AcmiQuoteCalculator = AcmiQuoteCalculator;
|
|
@@ -39837,6 +41041,10 @@ exports.ContactCard = ContactCard$1;
|
|
|
39837
41041
|
exports.ContactList = ContactList;
|
|
39838
41042
|
exports.ContactUsPage = ContactUsPage;
|
|
39839
41043
|
exports.CubeIcon = CubeIcon;
|
|
41044
|
+
exports.DEFAULT_INCIDENT_TIME_ZONE = DEFAULT_INCIDENT_TIME_ZONE;
|
|
41045
|
+
exports.DEFAULT_STALE_AFTER_MINUTES = DEFAULT_STALE_AFTER_MINUTES;
|
|
41046
|
+
exports.DIVISIONS = DIVISIONS;
|
|
41047
|
+
exports.DIVISION_LABELS = DIVISION_LABELS;
|
|
39840
41048
|
exports.DOCUMENT_FILE_EXTENSIONS = DOCUMENT_FILE_EXTENSIONS;
|
|
39841
41049
|
exports.DashboardIcon = DashboardIcon;
|
|
39842
41050
|
exports.DashboardPage = DashboardPage;
|
|
@@ -39884,6 +41092,10 @@ exports.HubAppShell = HubAppShell;
|
|
|
39884
41092
|
exports.Icon = Icon;
|
|
39885
41093
|
exports.IconRevealLink = IconRevealLink;
|
|
39886
41094
|
exports.Icons = Icons;
|
|
41095
|
+
exports.IncidentArchiveTable = IncidentArchiveTable;
|
|
41096
|
+
exports.IncidentCard = IncidentCard;
|
|
41097
|
+
exports.IncidentIntakeForm = IncidentIntakeForm;
|
|
41098
|
+
exports.IncidentNotes = IncidentNotes;
|
|
39887
41099
|
exports.IndividualTravelPage = IndividualTravelPage;
|
|
39888
41100
|
exports.IndividualTravelRequestDetailPage = IndividualTravelRequestDetailPage;
|
|
39889
41101
|
exports.IndividualTravelRequestFormPage = IndividualTravelRequestFormPage;
|
|
@@ -39924,6 +41136,8 @@ exports.OFF_FLEET_QUEUE_DESCRIPTION = OFF_FLEET_QUEUE_DESCRIPTION;
|
|
|
39924
41136
|
exports.OffFleetLearnedExamplesPage = OffFleetLearnedExamplesPage;
|
|
39925
41137
|
exports.OffFleetReviewQueuePage = OffFleetReviewQueuePage;
|
|
39926
41138
|
exports.OffFleetSubmissionDetailPage = OffFleetSubmissionDetailPage;
|
|
41139
|
+
exports.OperationsResponseCenterPage = OperationsResponseCenterPage;
|
|
41140
|
+
exports.PRIORITY_LABELS = PRIORITY_LABELS;
|
|
39927
41141
|
exports.PageBanners = PageBanners;
|
|
39928
41142
|
exports.PageHeader = PageHeader;
|
|
39929
41143
|
exports.PageHeaderSubsection = PageHeaderSubsection;
|
|
@@ -39941,6 +41155,8 @@ exports.ProgressCircle = ProgressCircle;
|
|
|
39941
41155
|
exports.QuoteCostBreakdown = QuoteCostBreakdown;
|
|
39942
41156
|
exports.QuoteReviewActions = QuoteReviewActions;
|
|
39943
41157
|
exports.REGULAR_SEASON_BID_TYPES = REGULAR_SEASON_BID_TYPES;
|
|
41158
|
+
exports.RESOLUTION_LABELS = RESOLUTION_LABELS;
|
|
41159
|
+
exports.ROUTE_STATUS_LABELS = ROUTE_STATUS_LABELS;
|
|
39944
41160
|
exports.RailIcon = RailIcon;
|
|
39945
41161
|
exports.RefreshIcon = RefreshIcon;
|
|
39946
41162
|
exports.RegularSeasonBidsPage = RegularSeasonBidsPage;
|
|
@@ -39951,6 +41167,7 @@ exports.RequestFormHeader = RequestFormHeader;
|
|
|
39951
41167
|
exports.RequestFormLayout = RequestFormLayout;
|
|
39952
41168
|
exports.RequestServiceLink = RequestServiceLink;
|
|
39953
41169
|
exports.RequestSummary = RequestSummary;
|
|
41170
|
+
exports.ResolveIncidentDialog = ResolveIncidentDialog;
|
|
39954
41171
|
exports.ResultCount = ResultCount;
|
|
39955
41172
|
exports.RosterProgramNumbersPage = RosterProgramNumbersPage;
|
|
39956
41173
|
exports.RosterReportsPage = RosterReportsPage;
|
|
@@ -39979,6 +41196,8 @@ exports.StatusBadge = StatusBadge;
|
|
|
39979
41196
|
exports.SummarySection = SummarySection;
|
|
39980
41197
|
exports.SupplierTypeToggle = SupplierTypeToggle;
|
|
39981
41198
|
exports.TRIP_MONTH_OPTIONS = TRIP_MONTH_OPTIONS;
|
|
41199
|
+
exports.TRIP_TYPES = TRIP_TYPES;
|
|
41200
|
+
exports.TRIP_TYPE_LABELS = TRIP_TYPE_LABELS;
|
|
39982
41201
|
exports.TabPanelStack = TabPanelStack;
|
|
39983
41202
|
exports.TabStrip = TabStrip;
|
|
39984
41203
|
exports.Table = Table;
|
|
@@ -40032,6 +41251,9 @@ exports.WarningIcon = WarningIcon$1;
|
|
|
40032
41251
|
exports.XIcon = XIcon;
|
|
40033
41252
|
exports.absoluteFill = absoluteFill;
|
|
40034
41253
|
exports.accentColors = accentColors;
|
|
41254
|
+
exports.addNoteToIncident = addNoteToIncident;
|
|
41255
|
+
exports.addTripTypeToIncident = addTripTypeToIncident;
|
|
41256
|
+
exports.addableTripTypes = addableTripTypes;
|
|
40035
41257
|
exports.alertBandTokens = alertBandTokens;
|
|
40036
41258
|
exports.alertTokens = alertTokens;
|
|
40037
41259
|
exports.boxShadow = boxShadow;
|
|
@@ -40039,6 +41261,8 @@ exports.brandColors = brandColors;
|
|
|
40039
41261
|
exports.breakpoints = breakpoints;
|
|
40040
41262
|
exports.buildPaginationItems = buildPaginationItems;
|
|
40041
41263
|
exports.buttonReset = buttonReset;
|
|
41264
|
+
exports.canRemoveTripType = canRemoveTripType;
|
|
41265
|
+
exports.completeRoute = completeRoute;
|
|
40042
41266
|
exports.computeLineItemTotal = computeLineItemTotal;
|
|
40043
41267
|
exports.computeQuoteTotals = computeQuoteTotals;
|
|
40044
41268
|
exports.computeTravelTypeCodes = computeTravelTypeCodes;
|
|
@@ -40047,6 +41271,7 @@ exports.cx = cx;
|
|
|
40047
41271
|
exports.darkTheme = darkTheme;
|
|
40048
41272
|
exports.defaultTheme = lightTheme;
|
|
40049
41273
|
exports.deriveProgramBidStatus = deriveProgramBidStatus;
|
|
41274
|
+
exports.divisionsForTripTypes = divisionsForTripTypes;
|
|
40050
41275
|
exports.flexCenter = flexCenter;
|
|
40051
41276
|
exports.flexCol = flexCol;
|
|
40052
41277
|
exports.flexRow = flexRow;
|
|
@@ -40054,7 +41279,10 @@ exports.font = font;
|
|
|
40054
41279
|
exports.fontFamily = fontFamily;
|
|
40055
41280
|
exports.fontSize = fontSize;
|
|
40056
41281
|
exports.fontWeight = fontWeight;
|
|
41282
|
+
exports.formatClockTime = formatClockTime;
|
|
40057
41283
|
exports.formatCompactTripCost = formatCompactTripCost;
|
|
41284
|
+
exports.formatElapsed = formatElapsed;
|
|
41285
|
+
exports.formatIncidentDate = formatIncidentDate;
|
|
40058
41286
|
exports.formatItineraryDate = formatItineraryDate;
|
|
40059
41287
|
exports.formatItineraryDateRange = formatItineraryDateRange;
|
|
40060
41288
|
exports.formatItineraryMoney = formatItineraryMoney;
|
|
@@ -40072,8 +41300,11 @@ exports.iconNames = iconNames;
|
|
|
40072
41300
|
exports.iconRegistry = iconRegistry;
|
|
40073
41301
|
exports.injectGlobal = injectGlobal;
|
|
40074
41302
|
exports.isExpiringSoon = isExpiringSoon;
|
|
41303
|
+
exports.isIncidentOverdue = isIncidentOverdue;
|
|
40075
41304
|
exports.isProgramBiddable = isProgramBiddable;
|
|
40076
41305
|
exports.isQuoteActionable = isQuoteActionable;
|
|
41306
|
+
exports.isReadyToResolve = isReadyToResolve;
|
|
41307
|
+
exports.isRouteOverdue = isRouteOverdue;
|
|
40077
41308
|
exports.isSportCodeGroup = isSportCodeGroup;
|
|
40078
41309
|
exports.isTravelDueDateCompleted = isTravelDueDateCompleted;
|
|
40079
41310
|
exports.isTravelDueDateOverdue = isTravelDueDateOverdue;
|
|
@@ -40082,21 +41313,29 @@ exports.leading = leading;
|
|
|
40082
41313
|
exports.lightTheme = lightTheme;
|
|
40083
41314
|
exports.lineClamp = lineClamp;
|
|
40084
41315
|
exports.lineHeight = lineHeight;
|
|
41316
|
+
exports.markRouteReceived = markRouteReceived;
|
|
40085
41317
|
exports.matchesQuoteSearch = matchesQuoteSearch;
|
|
40086
41318
|
exports.merge = merge;
|
|
40087
41319
|
exports.moveTeamTravelCalendarPeriod = moveTeamTravelCalendarPeriod;
|
|
40088
41320
|
exports.navyColors = navyColors;
|
|
40089
41321
|
exports.neutralColors = neutralColors;
|
|
41322
|
+
exports.orderAlertLog = orderAlertLog;
|
|
40090
41323
|
exports.ordinalDay = ordinalDay;
|
|
41324
|
+
exports.overdueRoutes = overdueRoutes;
|
|
40091
41325
|
exports.parseClockTime = parseClockTime;
|
|
40092
41326
|
exports.parseItineraryDate = parseItineraryDate;
|
|
40093
41327
|
exports.primaryColors = primaryColors;
|
|
40094
41328
|
exports.radius = radius;
|
|
41329
|
+
exports.removeTripTypeFromIncident = removeTripTypeFromIncident;
|
|
41330
|
+
exports.renotifyRoute = renotifyRoute;
|
|
40095
41331
|
exports.rounded = rounded;
|
|
41332
|
+
exports.routeProgress = routeProgress;
|
|
41333
|
+
exports.routeStatus = routeStatus;
|
|
40096
41334
|
exports.semanticColors = semanticColors;
|
|
40097
41335
|
exports.shadow = shadow;
|
|
40098
41336
|
exports.sharedColumnWidth = sharedColumnWidth;
|
|
40099
41337
|
exports.size = size;
|
|
41338
|
+
exports.sortTripTypes = sortTripTypes;
|
|
40100
41339
|
exports.space = space;
|
|
40101
41340
|
exports.spacing = spacing;
|
|
40102
41341
|
exports.sportCodeVariant = sportCodeVariant;
|
|
@@ -40108,11 +41347,15 @@ exports.tabStripTabId = tabStripTabId;
|
|
|
40108
41347
|
exports.teamColors = teamColors;
|
|
40109
41348
|
exports.textColors = textColors;
|
|
40110
41349
|
exports.tintColors = tintColors;
|
|
41350
|
+
exports.toIncidentDateKey = toIncidentDateKey;
|
|
40111
41351
|
exports.toInlineStyle = toInlineStyle;
|
|
41352
|
+
exports.toTelHref = toTelHref;
|
|
40112
41353
|
exports.trans = trans;
|
|
40113
41354
|
exports.transition = transition;
|
|
41355
|
+
exports.tripTypeDivision = tripTypeDivision;
|
|
40114
41356
|
exports.truncate = truncate$1;
|
|
40115
41357
|
exports.useSharedColumnWidth = useSharedColumnWidth;
|
|
40116
41358
|
exports.useTheme = useTheme;
|
|
41359
|
+
exports.validateIncidentIntake = validateIncidentIntake;
|
|
40117
41360
|
exports.weight = weight;
|
|
40118
41361
|
//# sourceMappingURL=index.js.map
|