@bikdotai/bik-component-library 0.0.865-beta.6 → 0.0.865-beta.8

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.
Files changed (124) hide show
  1. package/dist/cjs/components/button/Button.js +1 -1
  2. package/dist/cjs/components/button/Button.js.map +1 -1
  3. package/dist/cjs/components/button/Button.styled.js +2 -2
  4. package/dist/cjs/components/button/Button.styled.js.map +1 -1
  5. package/dist/cjs/components/chip-selector/ChipSelector.js +2 -0
  6. package/dist/cjs/components/chip-selector/ChipSelector.js.map +1 -0
  7. package/dist/cjs/components/chip-selector/ChipSelector.styled.js +36 -0
  8. package/dist/cjs/components/chip-selector/ChipSelector.styled.js.map +1 -0
  9. package/dist/cjs/components/chip-selector/ChipSelectorGroup.js +2 -0
  10. package/dist/cjs/components/chip-selector/ChipSelectorGroup.js.map +1 -0
  11. package/dist/cjs/components/combo-box/ComboBox.js +2 -0
  12. package/dist/cjs/components/combo-box/ComboBox.js.map +1 -0
  13. package/dist/cjs/components/combo-box/ComboBox.styled.js +33 -0
  14. package/dist/cjs/components/combo-box/ComboBox.styled.js.map +1 -0
  15. package/dist/cjs/components/datePicker/DatePickerWrapper.js +1 -1
  16. package/dist/cjs/components/datePicker/DatePickerWrapper.js.map +1 -1
  17. package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
  18. package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
  19. package/dist/cjs/components/schedule-builder/RefreshSegmentToggle.js +2 -0
  20. package/dist/cjs/components/schedule-builder/RefreshSegmentToggle.js.map +1 -0
  21. package/dist/cjs/components/schedule-builder/ScheduleBuilder.js +2 -0
  22. package/dist/cjs/components/schedule-builder/ScheduleBuilder.js.map +1 -0
  23. package/dist/cjs/components/schedule-builder/ScheduleBuilder.styled.js +138 -0
  24. package/dist/cjs/components/schedule-builder/ScheduleBuilder.styled.js.map +1 -0
  25. package/dist/cjs/components/schedule-builder/ScheduleEndPicker.js +2 -0
  26. package/dist/cjs/components/schedule-builder/ScheduleEndPicker.js.map +1 -0
  27. package/dist/cjs/components/schedule-builder/ScheduleFrequencyPicker.js +2 -0
  28. package/dist/cjs/components/schedule-builder/ScheduleFrequencyPicker.js.map +1 -0
  29. package/dist/cjs/components/schedule-builder/ScheduleHelper.js +2 -0
  30. package/dist/cjs/components/schedule-builder/ScheduleHelper.js.map +1 -0
  31. package/dist/cjs/components/schedule-builder/SendModeSelector.js +2 -0
  32. package/dist/cjs/components/schedule-builder/SendModeSelector.js.map +1 -0
  33. package/dist/cjs/components/schedule-builder/StartDateTimePicker.js +2 -0
  34. package/dist/cjs/components/schedule-builder/StartDateTimePicker.js.map +1 -0
  35. package/dist/cjs/components/schedule-builder/UpcomingRunsPreview.js +2 -0
  36. package/dist/cjs/components/schedule-builder/UpcomingRunsPreview.js.map +1 -0
  37. package/dist/cjs/components/schedule-builder/model.js +2 -0
  38. package/dist/cjs/components/schedule-builder/model.js.map +1 -0
  39. package/dist/cjs/components/tag/Tag.js +1 -1
  40. package/dist/cjs/components/tag/Tag.js.map +1 -1
  41. package/dist/cjs/components/tag/Tag.styled.js +4 -4
  42. package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
  43. package/dist/cjs/components/tag/model.js.map +1 -1
  44. package/dist/cjs/icons/BIK AI specific/WandSparkles.js +1 -1
  45. package/dist/cjs/icons/BIK AI specific/WandSparkles.js.map +1 -1
  46. package/dist/cjs/index.js +1 -1
  47. package/dist/esm/components/button/Button.js +19 -21
  48. package/dist/esm/components/button/Button.js.map +1 -1
  49. package/dist/esm/components/button/Button.styled.d.ts +0 -1
  50. package/dist/esm/components/button/Button.styled.js +5 -5
  51. package/dist/esm/components/button/Button.styled.js.map +1 -1
  52. package/dist/esm/components/button/model.d.ts +0 -5
  53. package/dist/esm/components/chip-selector/ChipSelector.d.ts +9 -0
  54. package/dist/esm/components/chip-selector/ChipSelector.js +27 -0
  55. package/dist/esm/components/chip-selector/ChipSelector.js.map +1 -0
  56. package/dist/esm/components/chip-selector/ChipSelector.styled.d.ts +10 -0
  57. package/dist/esm/components/chip-selector/ChipSelector.styled.js +48 -0
  58. package/dist/esm/components/chip-selector/ChipSelector.styled.js.map +1 -0
  59. package/dist/esm/components/chip-selector/ChipSelectorGroup.d.ts +10 -0
  60. package/dist/esm/components/chip-selector/ChipSelectorGroup.js +48 -0
  61. package/dist/esm/components/chip-selector/ChipSelectorGroup.js.map +1 -0
  62. package/dist/esm/components/chip-selector/index.d.ts +4 -0
  63. package/dist/esm/components/chip-selector/model.d.ts +106 -0
  64. package/dist/esm/components/combo-box/ComboBox.d.ts +15 -0
  65. package/dist/esm/components/combo-box/ComboBox.js +118 -0
  66. package/dist/esm/components/combo-box/ComboBox.js.map +1 -0
  67. package/dist/esm/components/combo-box/ComboBox.styled.d.ts +12 -0
  68. package/dist/esm/components/combo-box/ComboBox.styled.js +40 -0
  69. package/dist/esm/components/combo-box/ComboBox.styled.js.map +1 -0
  70. package/dist/esm/components/combo-box/index.d.ts +3 -0
  71. package/dist/esm/components/combo-box/model.d.ts +55 -0
  72. package/dist/esm/components/datePicker/DatePickerWrapper.d.ts +7 -0
  73. package/dist/esm/components/datePicker/DatePickerWrapper.js +66 -64
  74. package/dist/esm/components/datePicker/DatePickerWrapper.js.map +1 -1
  75. package/dist/esm/components/datePicker/index.d.ts +1 -0
  76. package/dist/esm/components/dropdown-button/DropdownButton.d.ts +0 -5
  77. package/dist/esm/components/dropdown-button/DropdownButton.js +3 -4
  78. package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
  79. package/dist/esm/components/schedule-builder/RefreshSegmentToggle.d.ts +22 -0
  80. package/dist/esm/components/schedule-builder/RefreshSegmentToggle.js +31 -0
  81. package/dist/esm/components/schedule-builder/RefreshSegmentToggle.js.map +1 -0
  82. package/dist/esm/components/schedule-builder/ScheduleBuilder.d.ts +79 -0
  83. package/dist/esm/components/schedule-builder/ScheduleBuilder.js +103 -0
  84. package/dist/esm/components/schedule-builder/ScheduleBuilder.js.map +1 -0
  85. package/dist/esm/components/schedule-builder/ScheduleBuilder.styled.d.ts +81 -0
  86. package/dist/esm/components/schedule-builder/ScheduleBuilder.styled.js +168 -0
  87. package/dist/esm/components/schedule-builder/ScheduleBuilder.styled.js.map +1 -0
  88. package/dist/esm/components/schedule-builder/ScheduleEndPicker.d.ts +17 -0
  89. package/dist/esm/components/schedule-builder/ScheduleEndPicker.js +105 -0
  90. package/dist/esm/components/schedule-builder/ScheduleEndPicker.js.map +1 -0
  91. package/dist/esm/components/schedule-builder/ScheduleFrequencyPicker.d.ts +21 -0
  92. package/dist/esm/components/schedule-builder/ScheduleFrequencyPicker.js +136 -0
  93. package/dist/esm/components/schedule-builder/ScheduleFrequencyPicker.js.map +1 -0
  94. package/dist/esm/components/schedule-builder/ScheduleHelper.d.ts +110 -0
  95. package/dist/esm/components/schedule-builder/ScheduleHelper.js +196 -0
  96. package/dist/esm/components/schedule-builder/ScheduleHelper.js.map +1 -0
  97. package/dist/esm/components/schedule-builder/SendModeSelector.d.ts +21 -0
  98. package/dist/esm/components/schedule-builder/SendModeSelector.js +39 -0
  99. package/dist/esm/components/schedule-builder/SendModeSelector.js.map +1 -0
  100. package/dist/esm/components/schedule-builder/StartDateTimePicker.d.ts +44 -0
  101. package/dist/esm/components/schedule-builder/StartDateTimePicker.js +119 -0
  102. package/dist/esm/components/schedule-builder/StartDateTimePicker.js.map +1 -0
  103. package/dist/esm/components/schedule-builder/UpcomingRunsPreview.d.ts +19 -0
  104. package/dist/esm/components/schedule-builder/UpcomingRunsPreview.js +44 -0
  105. package/dist/esm/components/schedule-builder/UpcomingRunsPreview.js.map +1 -0
  106. package/dist/esm/components/schedule-builder/index.d.ts +17 -0
  107. package/dist/esm/components/schedule-builder/model.d.ts +69 -0
  108. package/dist/esm/components/schedule-builder/model.js +8 -0
  109. package/dist/esm/components/schedule-builder/model.js.map +1 -0
  110. package/dist/esm/components/tag/Tag.d.ts +1 -1
  111. package/dist/esm/components/tag/Tag.js +41 -48
  112. package/dist/esm/components/tag/Tag.js.map +1 -1
  113. package/dist/esm/components/tag/Tag.styled.d.ts +0 -3
  114. package/dist/esm/components/tag/Tag.styled.js +9 -6
  115. package/dist/esm/components/tag/Tag.styled.js.map +1 -1
  116. package/dist/esm/components/tag/model.d.ts +0 -11
  117. package/dist/esm/components/tag/model.js.map +1 -1
  118. package/dist/esm/icons/BIK AI specific/WandSparkles.js +1 -1
  119. package/dist/esm/icons/BIK AI specific/WandSparkles.js.map +1 -1
  120. package/dist/esm/icons/index.d.ts +25 -25
  121. package/dist/esm/index.d.ts +3 -0
  122. package/dist/esm/index.js +618 -577
  123. package/dist/esm/index.js.map +1 -1
  124. package/package.json +1 -1
@@ -0,0 +1,81 @@
1
+ /**
2
+ * A labelled field column — "Start date" and "Time" sit side by side.
3
+ * 6px label-to-input gap comes from the design's `input-large` component.
4
+ */
5
+ export declare const FieldColumn: import('styled-components').StyledComponent<"div", any, {}, never>;
6
+ export declare const DateFieldColumn: import('styled-components').StyledComponent<"div", any, {}, never>;
7
+ /**
8
+ * Same share as the date column plus the am/pm dropdown's footprint (84px
9
+ * wide + 8px gap), so the time box itself matches the date box rather than
10
+ * being squeezed by the dropdown sitting beside it.
11
+ */
12
+ export declare const TimeFieldColumn: import('styled-components').StyledComponent<"div", any, {}, never>;
13
+ /**
14
+ * The Start date / Time row.
15
+ *
16
+ * Aligned to the top rather than centred: the time field grows taller when its
17
+ * validation message appears, and a centred row would shift the date field up
18
+ * and down with it.
19
+ */
20
+ export declare const FieldsRow: import('styled-components').StyledComponent<"div", any, {}, never>;
21
+ /** Wraps the date picker so its button matches the 48px input height. */
22
+ export declare const DatePickerSlot: import('styled-components').StyledComponent<"div", any, {}, never>;
23
+ /**
24
+ * The time box and its am/pm dropdown.
25
+ *
26
+ * Top-aligned rather than centred: the validation message renders inside the
27
+ * time slot, so a centred row would push am/pm downward as the message appears.
28
+ */
29
+ export declare const TimeInputRow: import('styled-components').StyledComponent<"div", any, {}, never>;
30
+ /** The hh:mm dropdown takes the free space; am/pm is fixed beside it. */
31
+ export declare const TimeDropdownSlot: import('styled-components').StyledComponent<"div", any, {}, never>;
32
+ export declare const MeridiemDropdownSlot: import('styled-components').StyledComponent<"div", any, {}, never>;
33
+ /**
34
+ * Frequency field. Fills its column, which is a DateFieldColumn so it takes the
35
+ * same share as Start date above it — the design has both as 337px halves of the
36
+ * 690px row, rather than a fixed 220px box that drifts as the panel resizes.
37
+ */
38
+ export declare const FrequencyDropdownSlot: import('styled-components').StyledComponent<"div", any, {}, never>;
39
+ /**
40
+ * Monthly date grid. Fixed at 337px so six CHIP_WIDTH chips and their 8px gaps
41
+ * wrap onto a tidy 6-per-row grid rather than reflowing with the panel width.
42
+ */
43
+ export declare const MonthDateGridSlot: import('styled-components').StyledComponent<"div", any, {}, never>;
44
+ /**
45
+ * Icon + text caption under a picker, for both validation errors and the
46
+ * skipped-month note. The icon is pinned to its 16px box and aligned to the
47
+ * first line — as a bare flex child it would stretch and open a wide gap.
48
+ */
49
+ export declare const CaptionWithIcon: import('styled-components').StyledComponent<"div", any, {}, never>;
50
+ /** Field label row — holds the caption and its required asterisk. */
51
+ export declare const FieldLabel: import('styled-components').StyledComponent<"div", any, {}, never>;
52
+ /** Frequency and time read in semibold inside the summary line. */
53
+ export declare const SummaryHighlight: import('styled-components').StyledComponent<"span", any, {}, never>;
54
+ export declare const RequiredMark: import('styled-components').StyledComponent<"span", any, {}, never>;
55
+ /** A single selectable send-mode card. */
56
+ export declare const SendModeOption: import('styled-components').StyledComponent<"div", any, {
57
+ active: boolean;
58
+ disabled: boolean;
59
+ }, never>;
60
+ /** The row of send-mode cards. */
61
+ export declare const SendModeRow: import('styled-components').StyledComponent<"div", any, {}, never>;
62
+ /** 1px rule between the send-mode radios and the fields below. */
63
+ export declare const SectionDivider: import('styled-components').StyledComponent<"div", any, {}, never>;
64
+ /** "Ends" row wraps when the three options do not fit on one line. */
65
+ export declare const EndsRow: import('styled-components').StyledComponent<"div", any, {}, never>;
66
+ /** 44px wide, 32px tall — the design's small input. */
67
+ export declare const RunCountInputWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
68
+ export declare const EndDateWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
69
+ export declare const UpcomingRunItem: import('styled-components').StyledComponent<"div", any, {
70
+ isLast: boolean;
71
+ }, never>;
72
+ export declare const UpcomingRunDot: import('styled-components').StyledComponent<"div", any, {}, never>;
73
+ export declare const RefreshSegmentRow: import('styled-components').StyledComponent<"div", any, {}, never>;
74
+ export declare const RefreshSegmentCopy: import('styled-components').StyledComponent<"div", any, {}, never>;
75
+ /** Generic vertical stack — the library cannot rely on the app's utility classes. */
76
+ export declare const Column: import('styled-components').StyledComponent<"div", any, {
77
+ gap?: number | undefined;
78
+ }, never>;
79
+ export declare const Row: import('styled-components').StyledComponent<"div", any, {
80
+ gap?: number | undefined;
81
+ }, never>;
@@ -0,0 +1,168 @@
1
+ import i from "styled-components";
2
+ import { COLORS as t } from "../../constants/Theme.js";
3
+ const o = 84, n = 8, d = i.div`
4
+ display: flex;
5
+ flex-direction: column;
6
+ min-width: 0;
7
+ gap: 6px;
8
+ `, l = i(d)`
9
+ flex: 1 1 0;
10
+ `, a = i(d)`
11
+ flex: 1 1 ${o + n}px;
12
+ `, s = i.div`
13
+ display: flex;
14
+ flex-direction: row;
15
+ gap: 16px;
16
+ width: 100%;
17
+ align-items: flex-start;
18
+ `, x = i.div`
19
+ height: 48px;
20
+ `, c = i.div`
21
+ display: flex;
22
+ flex-direction: row;
23
+ gap: ${n}px;
24
+ align-items: flex-start;
25
+ `, g = i.div`
26
+ flex: 1;
27
+ min-width: 0;
28
+ `, f = i.div`
29
+ flex: 0 0 ${o}px;
30
+ `, h = i.div`
31
+ width: 100%;
32
+ min-width: 0;
33
+ `, m = i.div`
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: 8px;
37
+ width: 337px;
38
+ max-width: 100%;
39
+ `, w = i.div`
40
+ display: flex;
41
+ flex-direction: row;
42
+ align-items: flex-start;
43
+ gap: 4px;
44
+
45
+ svg {
46
+ flex: 0 0 16px;
47
+ width: 16px;
48
+ height: 16px;
49
+ }
50
+ `, u = i.div`
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 2px;
54
+ `, v = i.span`
55
+ font-weight: 600;
56
+ `, y = i.span`
57
+ color: ${t.content.negative};
58
+ `, b = i.div`
59
+ box-sizing: border-box;
60
+ display: flex;
61
+ flex-direction: row;
62
+ align-items: center;
63
+ gap: 4px;
64
+ padding: 16px;
65
+ flex: 1;
66
+ height: 56px;
67
+ border-radius: 4px;
68
+ border: 1px solid
69
+ ${(e) => e.active ? t.background.inverseLight : t.stroke.primary};
70
+ background: ${(e) => e.active ? t.background.brandLight : t.surface.standard};
71
+ cursor: ${(e) => e.disabled ? "not-allowed" : "pointer"};
72
+ opacity: ${(e) => e.disabled ? 0.6 : 1};
73
+ `, R = i.div`
74
+ display: flex;
75
+ flex-direction: row;
76
+ gap: 16px;
77
+ width: 100%;
78
+ `, k = i.div`
79
+ height: 1px;
80
+ width: 100%;
81
+ background: ${t.stroke.primary};
82
+ `, $ = i.div`
83
+ display: flex;
84
+ flex-direction: row;
85
+ align-items: center;
86
+ gap: 12px;
87
+ flex-wrap: wrap;
88
+ `, S = i.div`
89
+ width: 44px;
90
+ `, D = i.div`
91
+ width: 168px;
92
+ `, C = i.div`
93
+ position: relative;
94
+ display: flex;
95
+ flex-direction: row;
96
+ align-items: center;
97
+ gap: 8px;
98
+
99
+ /* connector spanning the 16px gap to the next run */
100
+ ::before {
101
+ content: '';
102
+ position: absolute;
103
+ left: 4.5px;
104
+ top: 100%;
105
+ height: 16px;
106
+ width: 1px;
107
+ background: ${(e) => e.isLast ? "transparent" : t.stroke.brandLightAlt};
108
+ }
109
+ `, I = i.div`
110
+ width: 10px;
111
+ height: 10px;
112
+ border-radius: 50%;
113
+ background: ${t.background.inverseLight};
114
+ flex-shrink: 0;
115
+ z-index: 1;
116
+ `, L = i.div`
117
+ display: flex;
118
+ flex-direction: row;
119
+ align-items: center;
120
+ gap: 12px;
121
+ width: 100%;
122
+ justify-content: space-between;
123
+ padding-top: 16px;
124
+ border-top: 1px solid ${t.stroke.primary};
125
+ `, M = i.div`
126
+ display: flex;
127
+ flex-direction: column;
128
+ gap: 4px;
129
+ `, F = i.div`
130
+ display: flex;
131
+ flex-direction: column;
132
+ gap: ${(e) => e.gap ?? 12}px;
133
+ width: 100%;
134
+ `, T = i.div`
135
+ display: flex;
136
+ flex-direction: row;
137
+ align-items: center;
138
+ gap: ${(e) => e.gap ?? 8}px;
139
+ `;
140
+ export {
141
+ w as CaptionWithIcon,
142
+ F as Column,
143
+ l as DateFieldColumn,
144
+ x as DatePickerSlot,
145
+ D as EndDateWrapper,
146
+ $ as EndsRow,
147
+ d as FieldColumn,
148
+ u as FieldLabel,
149
+ s as FieldsRow,
150
+ h as FrequencyDropdownSlot,
151
+ f as MeridiemDropdownSlot,
152
+ m as MonthDateGridSlot,
153
+ M as RefreshSegmentCopy,
154
+ L as RefreshSegmentRow,
155
+ y as RequiredMark,
156
+ T as Row,
157
+ S as RunCountInputWrapper,
158
+ k as SectionDivider,
159
+ b as SendModeOption,
160
+ R as SendModeRow,
161
+ v as SummaryHighlight,
162
+ g as TimeDropdownSlot,
163
+ a as TimeFieldColumn,
164
+ c as TimeInputRow,
165
+ I as UpcomingRunDot,
166
+ C as UpcomingRunItem
167
+ };
168
+ //# sourceMappingURL=ScheduleBuilder.styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScheduleBuilder.styled.js","sources":["../../../../src/components/schedule-builder/ScheduleBuilder.styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { COLORS } from '../../constants/Theme';\n\n/** Fixed width of the am/pm dropdown, and the gap separating it from the time box. */\nconst MERIDIEM_SLOT_WIDTH = 84;\nconst TIME_ROW_GAP = 8;\n\n/**\n * A labelled field column — \"Start date\" and \"Time\" sit side by side.\n * 6px label-to-input gap comes from the design's `input-large` component.\n */\nexport const FieldColumn = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-width: 0;\n\tgap: 6px;\n`;\n\nexport const DateFieldColumn = styled(FieldColumn)`\n\tflex: 1 1 0;\n`;\n\n/**\n * Same share as the date column plus the am/pm dropdown's footprint (84px\n * wide + 8px gap), so the time box itself matches the date box rather than\n * being squeezed by the dropdown sitting beside it.\n */\nexport const TimeFieldColumn = styled(FieldColumn)`\n\tflex: 1 1 ${MERIDIEM_SLOT_WIDTH + TIME_ROW_GAP}px;\n`;\n\n/**\n * The Start date / Time row.\n *\n * Aligned to the top rather than centred: the time field grows taller when its\n * validation message appears, and a centred row would shift the date field up\n * and down with it.\n */\nexport const FieldsRow = styled.div`\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: 16px;\n\twidth: 100%;\n\talign-items: flex-start;\n`;\n\n/** Wraps the date picker so its button matches the 48px input height. */\nexport const DatePickerSlot = styled.div`\n\theight: 48px;\n`;\n\n/**\n * The time box and its am/pm dropdown.\n *\n * Top-aligned rather than centred: the validation message renders inside the\n * time slot, so a centred row would push am/pm downward as the message appears.\n */\nexport const TimeInputRow = styled.div`\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: ${TIME_ROW_GAP}px;\n\talign-items: flex-start;\n`;\n\n/** The hh:mm dropdown takes the free space; am/pm is fixed beside it. */\nexport const TimeDropdownSlot = styled.div`\n\tflex: 1;\n\tmin-width: 0;\n`;\n\nexport const MeridiemDropdownSlot = styled.div`\n\tflex: 0 0 ${MERIDIEM_SLOT_WIDTH}px;\n`;\n\n/**\n * Frequency field. Fills its column, which is a DateFieldColumn so it takes the\n * same share as Start date above it — the design has both as 337px halves of the\n * 690px row, rather than a fixed 220px box that drifts as the panel resizes.\n */\nexport const FrequencyDropdownSlot = styled.div`\n\twidth: 100%;\n\tmin-width: 0;\n`;\n\n/**\n * Monthly date grid. Fixed at 337px so six CHIP_WIDTH chips and their 8px gaps\n * wrap onto a tidy 6-per-row grid rather than reflowing with the panel width.\n */\nexport const MonthDateGridSlot = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\twidth: 337px;\n\tmax-width: 100%;\n`;\n\n/**\n * Icon + text caption under a picker, for both validation errors and the\n * skipped-month note. The icon is pinned to its 16px box and aligned to the\n * first line — as a bare flex child it would stretch and open a wide gap.\n */\nexport const CaptionWithIcon = styled.div`\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: flex-start;\n\tgap: 4px;\n\n\tsvg {\n\t\tflex: 0 0 16px;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t}\n`;\n\n/** Field label row — holds the caption and its required asterisk. */\nexport const FieldLabel = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 2px;\n`;\n\n/** Frequency and time read in semibold inside the summary line. */\nexport const SummaryHighlight = styled.span`\n\tfont-weight: 600;\n`;\n\nexport const RequiredMark = styled.span`\n\tcolor: ${COLORS.content.negative};\n`;\n\n/** A single selectable send-mode card. */\nexport const SendModeOption = styled.div<{\n\tactive: boolean;\n\tdisabled: boolean;\n}>`\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 4px;\n\tpadding: 16px;\n\tflex: 1;\n\theight: 56px;\n\tborder-radius: 4px;\n\tborder: 1px solid\n\t\t${(props) =>\n\t\t\tprops.active ? COLORS.background.inverseLight : COLORS.stroke.primary};\n\tbackground: ${(props) =>\n\t\tprops.active ? COLORS.background.brandLight : COLORS.surface.standard};\n\tcursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n\topacity: ${(props) => (props.disabled ? 0.6 : 1)};\n`;\n\n/** The row of send-mode cards. */\nexport const SendModeRow = styled.div`\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: 16px;\n\twidth: 100%;\n`;\n\n/** 1px rule between the send-mode radios and the fields below. */\nexport const SectionDivider = styled.div`\n\theight: 1px;\n\twidth: 100%;\n\tbackground: ${COLORS.stroke.primary};\n`;\n\n/** \"Ends\" row wraps when the three options do not fit on one line. */\nexport const EndsRow = styled.div`\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 12px;\n\tflex-wrap: wrap;\n`;\n\n/** 44px wide, 32px tall — the design's small input. */\nexport const RunCountInputWrapper = styled.div`\n\twidth: 44px;\n`;\n\nexport const EndDateWrapper = styled.div`\n\twidth: 168px;\n`;\n\nexport const UpcomingRunItem = styled.div<{ isLast: boolean }>`\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 8px;\n\n\t/* connector spanning the 16px gap to the next run */\n\t::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tleft: 4.5px;\n\t\ttop: 100%;\n\t\theight: 16px;\n\t\twidth: 1px;\n\t\tbackground: ${(props) =>\n\t\t\tprops.isLast ? 'transparent' : COLORS.stroke.brandLightAlt};\n\t}\n`;\n\nexport const UpcomingRunDot = styled.div`\n\twidth: 10px;\n\theight: 10px;\n\tborder-radius: 50%;\n\tbackground: ${COLORS.background.inverseLight};\n\tflex-shrink: 0;\n\tz-index: 1;\n`;\n\nexport const RefreshSegmentRow = styled.div`\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 12px;\n\twidth: 100%;\n\tjustify-content: space-between;\n\tpadding-top: 16px;\n\tborder-top: 1px solid ${COLORS.stroke.primary};\n`;\n\nexport const RefreshSegmentCopy = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n`;\n\n/** Generic vertical stack — the library cannot rely on the app's utility classes. */\nexport const Column = styled.div<{ gap?: number }>`\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: ${(props) => props.gap ?? 12}px;\n\twidth: 100%;\n`;\n\nexport const Row = styled.div<{ gap?: number }>`\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: ${(props) => props.gap ?? 8}px;\n`;\n"],"names":["MERIDIEM_SLOT_WIDTH","TIME_ROW_GAP","FieldColumn","styled","DateFieldColumn","TimeFieldColumn","FieldsRow","DatePickerSlot","TimeInputRow","TimeDropdownSlot","MeridiemDropdownSlot","FrequencyDropdownSlot","MonthDateGridSlot","CaptionWithIcon","FieldLabel","SummaryHighlight","RequiredMark","COLORS","SendModeOption","props","SendModeRow","SectionDivider","EndsRow","RunCountInputWrapper","EndDateWrapper","UpcomingRunItem","UpcomingRunDot","RefreshSegmentRow","RefreshSegmentCopy","Column","Row"],"mappings":";;AAIA,MAAMA,IAAsB,IACtBC,IAAe,GAMRC,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOrBC,IAAkBD,EAAOD,CAAW;AAAA;AAAA,GASpCG,IAAkBF,EAAOD,CAAW;AAAA,aACpCF,IAAsBC,CAAY;AAAA,GAUlCK,IAAYH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASnBI,IAAiBJ,EAAO;AAAA;AAAA,GAUxBK,IAAeL,EAAO;AAAA;AAAA;AAAA,QAG3BF,CAAY;AAAA;AAAA,GAKPQ,IAAmBN,EAAO;AAAA;AAAA;AAAA,GAK1BO,IAAuBP,EAAO;AAAA,aAC9BH,CAAmB;AAAA,GAQnBW,IAAwBR,EAAO;AAAA;AAAA;AAAA,GAS/BS,IAAoBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAa3BU,IAAkBV,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAczBW,IAAaX,EAAO;AAAA;AAAA;AAAA;AAAA,GAOpBY,IAAmBZ,EAAO;AAAA;AAAA,GAI1Ba,IAAeb,EAAO;AAAA,UACzBc,EAAO,QAAQ,QAAQ;AAAA,GAIpBC,IAAiBf,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAcjC,CAACgB,MACFA,EAAM,SAASF,EAAO,WAAW,eAAeA,EAAO,OAAO,OAAO;AAAA,eACzD,CAACE,MACdA,EAAM,SAASF,EAAO,WAAW,aAAaA,EAAO,QAAQ,QAAQ;AAAA,WAC5D,CAACE,MAAWA,EAAM,WAAW,gBAAgB,SAAU;AAAA,YACtD,CAACA,MAAWA,EAAM,WAAW,MAAM,CAAE;AAAA,GAIpCC,IAAcjB,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAQrBkB,IAAiBlB,EAAO;AAAA;AAAA;AAAA,eAGtBc,EAAO,OAAO,OAAO;AAAA,GAIvBK,IAAUnB,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASjBoB,IAAuBpB,EAAO;AAAA;AAAA,GAI9BqB,IAAiBrB,EAAO;AAAA;AAAA,GAIxBsB,IAAkBtB,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAetB,CAACgB,MACdA,EAAM,SAAS,gBAAgBF,EAAO,OAAO,aAAa;AAAA;AAAA,GAIhDS,IAAiBvB,EAAO;AAAA;AAAA;AAAA;AAAA,eAItBc,EAAO,WAAW,YAAY;AAAA;AAAA;AAAA,GAKhCU,IAAoBxB,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAQfc,EAAO,OAAO,OAAO;AAAA,GAGjCW,IAAqBzB,EAAO;AAAA;AAAA;AAAA;AAAA,GAO5B0B,IAAS1B,EAAO;AAAA;AAAA;AAAA,QAGrB,CAACgB,MAAUA,EAAM,OAAO,EAAE;AAAA;AAAA,GAIrBW,IAAM3B,EAAO;AAAA;AAAA;AAAA;AAAA,QAIlB,CAACgB,MAAUA,EAAM,OAAO,CAAC;AAAA;"}
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { RecurrenceValue } from './model';
3
+ export interface ScheduleEndPickerProps {
4
+ value: RecurrenceValue;
5
+ onChange: (patch: Partial<RecurrenceValue>) => void;
6
+ /** Earliest selectable end date — normally the series' own start date. */
7
+ minEndDate?: Date;
8
+ 'data-test'?: string;
9
+ }
10
+ /**
11
+ * "Never / After N runs / On <date>".
12
+ *
13
+ * The run-count input and the end-date picker stay mounted and go disabled with
14
+ * their mode rather than unmounting, so the row keeps its width and the controls
15
+ * do not jump as the merchant switches between them.
16
+ */
17
+ export declare const ScheduleEndPicker: React.FC<ScheduleEndPickerProps>;
@@ -0,0 +1,105 @@
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import { COLORS as s } from "../../constants/Theme.js";
3
+ import { BodySecondary as R } from "../TypographyStyle.js";
4
+ import { RECURRENCE_END_MODE as e } from "./model.js";
5
+ import { FieldColumn as u, FieldLabel as N, EndsRow as O, Row as p, RunCountInputWrapper as D, EndDateWrapper as _ } from "./ScheduleBuilder.styled.js";
6
+ import { MAX_RECURRENCE_RUNS as m } from "./ScheduleHelper.js";
7
+ import { RadioButton as l } from "../radioButton/RadioButton.js";
8
+ import { Input as S } from "../input/Input.js";
9
+ import { DatePickerWrapper as h } from "../datePicker/DatePickerWrapper.js";
10
+ const c = s.background.inverseLight, F = ({
11
+ value: o,
12
+ onChange: t,
13
+ minEndDate: f,
14
+ "data-test": A
15
+ }) => {
16
+ const n = o?.endMode ?? e.NEVER;
17
+ return /* @__PURE__ */ a(u, { "data-test": A, children: [
18
+ /* @__PURE__ */ r(N, { children: /* @__PURE__ */ r(R, { color: s.content.primary, children: "Ends" }) }),
19
+ /* @__PURE__ */ a(O, { children: [
20
+ /* @__PURE__ */ r(
21
+ l,
22
+ {
23
+ isActive: n === e.NEVER,
24
+ label: "Never",
25
+ value: e.NEVER,
26
+ onValueChange: () => t({ endMode: e.NEVER }),
27
+ activeColor: c,
28
+ skipSelectingOff: n === e.NEVER
29
+ }
30
+ ),
31
+ /* @__PURE__ */ a(p, { gap: 8, children: [
32
+ /* @__PURE__ */ r(
33
+ l,
34
+ {
35
+ isActive: n === e.AFTER_RUNS,
36
+ label: "After",
37
+ value: e.AFTER_RUNS,
38
+ onValueChange: () => t({ endMode: e.AFTER_RUNS }),
39
+ activeColor: c,
40
+ skipSelectingOff: n === e.AFTER_RUNS
41
+ }
42
+ ),
43
+ /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(
44
+ S,
45
+ {
46
+ variant: "small",
47
+ type: "number",
48
+ placeholder: String(m),
49
+ value: o?.endAfterRuns ? String(o.endAfterRuns) : "",
50
+ state: n === e.AFTER_RUNS ? "none" : "disabled",
51
+ onChangeText: (i) => {
52
+ const d = i.replace(/\D/g, "");
53
+ if (!d) {
54
+ t({ endAfterRuns: void 0 });
55
+ return;
56
+ }
57
+ t({
58
+ endAfterRuns: Math.min(
59
+ Number(d),
60
+ m
61
+ )
62
+ });
63
+ }
64
+ }
65
+ ) }),
66
+ /* @__PURE__ */ r(R, { color: s.content.primary, children: "runs" })
67
+ ] }),
68
+ /* @__PURE__ */ a(p, { gap: 8, children: [
69
+ /* @__PURE__ */ r(
70
+ l,
71
+ {
72
+ isActive: n === e.ON_DATE,
73
+ label: "On",
74
+ value: e.ON_DATE,
75
+ onValueChange: () => t({ endMode: e.ON_DATE }),
76
+ activeColor: c,
77
+ skipSelectingOff: n === e.ON_DATE
78
+ }
79
+ ),
80
+ /* @__PURE__ */ r(_, { children: /* @__PURE__ */ r(
81
+ h,
82
+ {
83
+ val: o?.endOnDate ? new Date(o.endOnDate * 1e3) : void 0,
84
+ disabled: n !== e.ON_DATE,
85
+ onChange: (i) => {
86
+ const d = Array.isArray(i) ? i[0] : i;
87
+ if (!d) return;
88
+ const E = new Date(d);
89
+ E.setHours(23, 59, 59, 0), t({
90
+ endMode: e.ON_DATE,
91
+ endOnDate: Math.floor(E.getTime() / 1e3)
92
+ });
93
+ },
94
+ calendarProps: { minDate: f },
95
+ pickerStyles: { top: 8, zIndex: 4 }
96
+ }
97
+ ) })
98
+ ] })
99
+ ] })
100
+ ] });
101
+ };
102
+ export {
103
+ F as ScheduleEndPicker
104
+ };
105
+ //# sourceMappingURL=ScheduleEndPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScheduleEndPicker.js","sources":["../../../../src/components/schedule-builder/ScheduleEndPicker.tsx"],"sourcesContent":["import React from 'react';\nimport { COLORS } from '../../constants/Theme';\nimport { DatePickerWrapper } from '../datePicker';\nimport { Input } from '../input';\nimport { RadioButton } from '../radioButton';\nimport { BodySecondary } from '../TypographyStyle';\nimport { RECURRENCE_END_MODE, RecurrenceValue } from './model';\nimport {\n\tEndDateWrapper,\n\tEndsRow,\n\tFieldColumn,\n\tFieldLabel,\n\tRow,\n\tRunCountInputWrapper,\n} from './ScheduleBuilder.styled';\nimport { MAX_RECURRENCE_RUNS } from './ScheduleHelper';\n\n/**\n * Radios in this section read brand purple when selected. The library defaults\n * to the positive green, which is not what the design shows.\n */\nconst RADIO_ACTIVE_COLOR = COLORS.background.inverseLight;\n\nexport interface ScheduleEndPickerProps {\n\tvalue: RecurrenceValue;\n\tonChange: (patch: Partial<RecurrenceValue>) => void;\n\t/** Earliest selectable end date — normally the series' own start date. */\n\tminEndDate?: Date;\n\t'data-test'?: string;\n}\n\n/**\n * \"Never / After N runs / On <date>\".\n *\n * The run-count input and the end-date picker stay mounted and go disabled with\n * their mode rather than unmounting, so the row keeps its width and the controls\n * do not jump as the merchant switches between them.\n */\nexport const ScheduleEndPicker: React.FC<ScheduleEndPickerProps> = ({\n\tvalue,\n\tonChange,\n\tminEndDate,\n\t'data-test': dataTest,\n}) => {\n\tconst endMode = value?.endMode ?? RECURRENCE_END_MODE.NEVER;\n\n\treturn (\n\t\t<FieldColumn data-test={dataTest}>\n\t\t\t<FieldLabel>\n\t\t\t\t<BodySecondary color={COLORS.content.primary}>Ends</BodySecondary>\n\t\t\t</FieldLabel>\n\t\t\t<EndsRow>\n\t\t\t\t<RadioButton\n\t\t\t\t\tisActive={endMode === RECURRENCE_END_MODE.NEVER}\n\t\t\t\t\tlabel=\"Never\"\n\t\t\t\t\tvalue={RECURRENCE_END_MODE.NEVER}\n\t\t\t\t\tonValueChange={() => onChange({ endMode: RECURRENCE_END_MODE.NEVER })}\n\t\t\t\t\tactiveColor={RADIO_ACTIVE_COLOR}\n\t\t\t\t\t// Inert only once selected — an end mode is always required, so the\n\t\t\t\t\t// active option cannot be clicked off.\n\t\t\t\t\tskipSelectingOff={endMode === RECURRENCE_END_MODE.NEVER}\n\t\t\t\t/>\n\n\t\t\t\t<Row gap={8}>\n\t\t\t\t\t<RadioButton\n\t\t\t\t\t\tisActive={endMode === RECURRENCE_END_MODE.AFTER_RUNS}\n\t\t\t\t\t\tlabel=\"After\"\n\t\t\t\t\t\tvalue={RECURRENCE_END_MODE.AFTER_RUNS}\n\t\t\t\t\t\tonValueChange={() =>\n\t\t\t\t\t\t\tonChange({ endMode: RECURRENCE_END_MODE.AFTER_RUNS })\n\t\t\t\t\t\t}\n\t\t\t\t\t\tactiveColor={RADIO_ACTIVE_COLOR}\n\t\t\t\t\t\tskipSelectingOff={endMode === RECURRENCE_END_MODE.AFTER_RUNS}\n\t\t\t\t\t/>\n\t\t\t\t\t<RunCountInputWrapper>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tvariant=\"small\"\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tplaceholder={String(MAX_RECURRENCE_RUNS)}\n\t\t\t\t\t\t\tvalue={value?.endAfterRuns ? String(value.endAfterRuns) : ''}\n\t\t\t\t\t\t\tstate={\n\t\t\t\t\t\t\t\tendMode === RECURRENCE_END_MODE.AFTER_RUNS ? 'none' : 'disabled'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChangeText={(input: string) => {\n\t\t\t\t\t\t\t\tconst digitsOnly = input.replace(/\\D/g, '');\n\t\t\t\t\t\t\t\tif (!digitsOnly) {\n\t\t\t\t\t\t\t\t\tonChange({ endAfterRuns: undefined });\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\tendAfterRuns: Math.min(\n\t\t\t\t\t\t\t\t\t\tNumber(digitsOnly),\n\t\t\t\t\t\t\t\t\t\tMAX_RECURRENCE_RUNS,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</RunCountInputWrapper>\n\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>runs</BodySecondary>\n\t\t\t\t</Row>\n\n\t\t\t\t<Row gap={8}>\n\t\t\t\t\t<RadioButton\n\t\t\t\t\t\tisActive={endMode === RECURRENCE_END_MODE.ON_DATE}\n\t\t\t\t\t\tlabel=\"On\"\n\t\t\t\t\t\tvalue={RECURRENCE_END_MODE.ON_DATE}\n\t\t\t\t\t\tonValueChange={() =>\n\t\t\t\t\t\t\tonChange({ endMode: RECURRENCE_END_MODE.ON_DATE })\n\t\t\t\t\t\t}\n\t\t\t\t\t\tactiveColor={RADIO_ACTIVE_COLOR}\n\t\t\t\t\t\tskipSelectingOff={endMode === RECURRENCE_END_MODE.ON_DATE}\n\t\t\t\t\t/>\n\t\t\t\t\t<EndDateWrapper>\n\t\t\t\t\t\t<DatePickerWrapper\n\t\t\t\t\t\t\tval={\n\t\t\t\t\t\t\t\tvalue?.endOnDate ? new Date(value.endOnDate * 1000) : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisabled={endMode !== RECURRENCE_END_MODE.ON_DATE}\n\t\t\t\t\t\t\tonChange={(picked: Date | Date[]) => {\n\t\t\t\t\t\t\t\tconst dateValue = Array.isArray(picked) ? picked[0] : picked;\n\t\t\t\t\t\t\t\tif (!dateValue) return;\n\t\t\t\t\t\t\t\t// End of the chosen day, so a run landing that day still fires.\n\t\t\t\t\t\t\t\tconst endOfDay = new Date(dateValue);\n\t\t\t\t\t\t\t\tendOfDay.setHours(23, 59, 59, 0);\n\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\tendMode: RECURRENCE_END_MODE.ON_DATE,\n\t\t\t\t\t\t\t\t\tendOnDate: Math.floor(endOfDay.getTime() / 1000),\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tcalendarProps={{ minDate: minEndDate }}\n\t\t\t\t\t\t\tpickerStyles={{ top: 8, zIndex: 4 }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</EndDateWrapper>\n\t\t\t\t</Row>\n\t\t\t</EndsRow>\n\t\t</FieldColumn>\n\t);\n};\n"],"names":["RADIO_ACTIVE_COLOR","COLORS","ScheduleEndPicker","value","onChange","minEndDate","dataTest","endMode","RECURRENCE_END_MODE","jsxs","FieldColumn","jsx","FieldLabel","BodySecondary","EndsRow","RadioButton","Row","RunCountInputWrapper","Input","MAX_RECURRENCE_RUNS","input","digitsOnly","EndDateWrapper","DatePickerWrapper","picked","dateValue","endOfDay"],"mappings":";;;;;;;;;AAqBA,MAAMA,IAAqBC,EAAO,WAAW,cAiBhCC,IAAsD,CAAC;AAAA,EACnE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAaC;AACd,MAAM;AACL,QAAMC,IAAUJ,GAAO,WAAWK,EAAoB;AAEtD,SACC,gBAAAC,EAACC,GAAA,EAAY,aAAWJ,GACvB,UAAA;AAAA,IAAA,gBAAAK,EAACC,GAAA,EACA,4BAACC,GAAA,EAAc,OAAOZ,EAAO,QAAQ,SAAS,kBAAI,EAAA,CACnD;AAAA,sBACCa,GAAA,EACA,UAAA;AAAA,MAAA,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACA,UAAUR,MAAYC,EAAoB;AAAA,UAC1C,OAAM;AAAA,UACN,OAAOA,EAAoB;AAAA,UAC3B,eAAe,MAAMJ,EAAS,EAAE,SAASI,EAAoB,OAAO;AAAA,UACpE,aAAaR;AAAA,UAGb,kBAAkBO,MAAYC,EAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,MAGnD,gBAAAC,EAACO,GAAA,EAAI,KAAK,GACT,UAAA;AAAA,QAAA,gBA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X;AAAA,UAACY;AAAA,UAAA;AAAA,YACA,KACCpB,GAAO,YAAY,IAAI,KAAKA,EAAM,YAAY,GAAI,IAAI;AAAA,YAEvD,UAAUI,MAAYC,EAAoB;AAAA,YAC1C,UAAU,CAACgB,MAA0B;AACpC,oBAAMC,IAAY,MAAM,QAAQD,CAAM,IAAIA,EAAO,CAAC,IAAIA;AACtD,kBAAI,CAACC,EAAW;AAEhB,oBAAMC,IAAW,IAAI,KAAKD,CAAS;AACnC,cAAAC,EAAS,SAAS,IAAI,IAAI,IAAI,CAAC,GAC/BtB,EAAS;AAAA,gBACR,SAASI,EAAoB;AAAA,gBAC7B,WAAW,KAAK,MAAMkB,EAAS,QAAA,IAAY,GAAI;AAAA,cAAA,CAC/C;AAAA,YACF;AAAA,YACA,eAAe,EAAE,SAASrB,EAAA;AAAA,YAC1B,cAAc,EAAE,KAAK,GAAG,QAAQ,EAAA;AAAA,UAAE;AAAA,QAAA,EACnC,CACD;AAAA,MAAA,EAAA,CACD;AAAA,IAAA,EAAA,CACD;AAAA,EAAA,GACD;AAEF;"}
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { RecurrenceValue } from './model';
3
+ export interface ScheduleFrequencyPickerProps {
4
+ value: RecurrenceValue;
5
+ onChange: (patch: Partial<RecurrenceValue>) => void;
6
+ /**
7
+ * Width of the frequency menu. Defaults to matching its button — pass a
8
+ * measured width when the button sits in a narrow column and the menu should
9
+ * still be readable.
10
+ */
11
+ frequencyMenuWidth?: string;
12
+ 'data-test'?: string;
13
+ }
14
+ /**
15
+ * Frequency, plus whichever "Repeat on" picker that frequency needs.
16
+ *
17
+ * Daily needs no picker, weekly needs day chips, monthly needs a preset dropdown
18
+ * and — for Custom — the 1-31 date grid. All three live here so a caller does not
19
+ * have to know which control belongs to which frequency.
20
+ */
21
+ export declare const ScheduleFrequencyPicker: React.FC<ScheduleFrequencyPickerProps>;
@@ -0,0 +1,136 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { COLORS as o } from "../../constants/Theme.js";
3
+ import y from "../../icons/Informational/General/Info.js";
4
+ import { ChipSelectorGroup as O } from "../chip-selector/ChipSelectorGroup.js";
5
+ import { BodySecondary as a, BodyCaption as u } from "../TypographyStyle.js";
6
+ import { RECURRENCE_FREQUENCY as c, MONTHLY_REPEAT_OPTION as h } from "./model.js";
7
+ import { Column as g, FieldsRow as A, DateFieldColumn as C, FieldLabel as s, FrequencyDropdownSlot as M, FieldColumn as b, CaptionWithIcon as m, Row as W, MonthDateGridSlot as N } from "./ScheduleBuilder.styled.js";
8
+ import { ScheduleHelper as P, getSkippedMonthCaption as Y, LAST_DAY_CHIP_VALUE as R, DAY_CHIP_OPTIONS as k, CHIP_WIDTH as v, DATE_CHIP_OPTIONS as w } from "./ScheduleHelper.js";
9
+ import { Dropdown as T } from "../dropdown/Dropdown.js";
10
+ const E = [
11
+ { label: "Daily", value: c.DAILY },
12
+ { label: "Weekly", value: c.WEEKLY },
13
+ { label: "Monthly", value: c.MONTHLY }
14
+ ], H = [
15
+ { label: "First", value: h.FIRST },
16
+ { label: "Last", value: h.LAST },
17
+ { label: "Custom", value: h.CUSTOM }
18
+ ], Q = ({ value: l, onChange: d, frequencyMenuWidth: L, "data-test": D }) => {
19
+ const i = new P(l), f = i.frequency === c.WEEKLY, p = i.frequency === c.MONTHLY, I = p && l?.monthlyRepeatOption === h.CUSTOM, S = Y(l?.datesOfMonth), _ = [
20
+ ...l?.datesOfMonth ?? [],
21
+ ...l?.lastDaySelected ? [R] : []
22
+ ];
23
+ return /* @__PURE__ */ n(g, { gap: 12, "data-test": D, children: [
24
+ /* @__PURE__ */ n(A, { children: [
25
+ /* @__PURE__ */ n(C, { children: [
26
+ /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(a, { color: o.content.primary, children: "Select frequency" }) }),
27
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
28
+ T,
29
+ {
30
+ size: "default",
31
+ isSearchable: !1,
32
+ isMultiSelect: !1,
33
+ options: E,
34
+ buttonWidth: "100%",
35
+ width: L || "100%",
36
+ placeHolderHeight: "48px",
37
+ placeHolder: "Select frequency",
38
+ value: E.find(
39
+ (t) => t.value === i.frequency
40
+ )?.label,
41
+ onSelect: (t) => {
42
+ const r = Array.isArray(t) ? t[0] : t;
43
+ r?.value && d({
44
+ frequency: r.value
45
+ });
46
+ }
47
+ }
48
+ ) })
49
+ ] }),
50
+ !f && !p && /* @__PURE__ */ e(C, { "aria-hidden": !0 }),
51
+ f && /* @__PURE__ */ n(b, { children: [
52
+ /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(a, { color: o.content.primary, children: "Repeat on" }) }),
53
+ /* @__PURE__ */ e(
54
+ O,
55
+ {
56
+ "data-test": "recurrence-days-of-week",
57
+ ariaLabel: "Repeat on",
58
+ chipWidth: v,
59
+ options: k,
60
+ value: l?.daysOfWeek ?? [],
61
+ onChange: (t) => d({
62
+ daysOfWeek: t.filter(
63
+ (r) => typeof r == "number"
64
+ )
65
+ })
66
+ }
67
+ ),
68
+ i.isMissingWeeklyDays && /* @__PURE__ */ n(m, { children: [
69
+ /* @__PURE__ */ e(y, { size: 16, color: o.content.negative }),
70
+ /* @__PURE__ */ e(u, { color: o.content.negative, children: "Select day(s) above to send this weekly recurring" })
71
+ ] })
72
+ ] }),
73
+ p && /* @__PURE__ */ n(b, { children: [
74
+ /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(a, { color: o.content.primary, children: "Repeat every" }) }),
75
+ /* @__PURE__ */ n(W, { gap: 8, children: [
76
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
77
+ T,
78
+ {
79
+ size: "default",
80
+ isSearchable: !1,
81
+ isMultiSelect: !1,
82
+ options: H,
83
+ buttonWidth: "100%",
84
+ width: "220px",
85
+ placeHolderHeight: "48px",
86
+ placeHolder: "Select",
87
+ value: H.find(
88
+ (t) => t.value === l?.monthlyRepeatOption
89
+ )?.label,
90
+ onSelect: (t) => {
91
+ const r = Array.isArray(t) ? t[0] : t;
92
+ r?.value && d({
93
+ monthlyRepeatOption: r.value
94
+ });
95
+ }
96
+ }
97
+ ) }),
98
+ /* @__PURE__ */ e(a, { color: o.content.primary, children: "day of the month" })
99
+ ] })
100
+ ] })
101
+ ] }),
102
+ I && /* @__PURE__ */ n(N, { children: [
103
+ /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(a, { color: o.content.primary, children: "Repeat on" }) }),
104
+ /* @__PURE__ */ e(
105
+ O,
106
+ {
107
+ "data-test": "recurrence-dates-of-month",
108
+ ariaLabel: "Repeat on dates",
109
+ chipWidth: v,
110
+ options: w,
111
+ size: "small",
112
+ wrap: !0,
113
+ value: _,
114
+ onChange: (t) => d({
115
+ datesOfMonth: t.filter(
116
+ (r) => typeof r == "number"
117
+ ),
118
+ lastDaySelected: t.includes(R)
119
+ })
120
+ }
121
+ ),
122
+ !!S && /* @__PURE__ */ n(m, { children: [
123
+ /* @__PURE__ */ e(y, { size: 16, color: o.content.secondary }),
124
+ /* @__PURE__ */ e(u, { color: o.content.secondary, children: S })
125
+ ] }),
126
+ i.isMissingMonthlyDates && /* @__PURE__ */ n(m, { children: [
127
+ /* @__PURE__ */ e(y, { size: 16, color: o.content.negative }),
128
+ /* @__PURE__ */ e(u, { color: o.content.negative, children: "Select day(s) above to send this monthly recurring" })
129
+ ] })
130
+ ] })
131
+ ] });
132
+ };
133
+ export {
134
+ Q as ScheduleFrequencyPicker
135
+ };
136
+ //# sourceMappingURL=ScheduleFrequencyPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScheduleFrequencyPicker.js","sources":["../../../../src/components/schedule-builder/ScheduleFrequencyPicker.tsx"],"sourcesContent":["import React from 'react';\nimport { COLORS } from '../../constants/Theme';\nimport Info from '../../icons/Informational/General/Info';\nimport { ChipSelectorGroup } from '../chip-selector';\nimport { Dropdown, DropdownOption, SingleOption } from '../dropdown';\nimport { BodyCaption, BodySecondary } from '../TypographyStyle';\nimport {\n\tMONTHLY_REPEAT_OPTION,\n\tRECURRENCE_FREQUENCY,\n\tRecurrenceValue,\n} from './model';\nimport {\n\tCaptionWithIcon,\n\tColumn,\n\tDateFieldColumn,\n\tFieldColumn,\n\tFieldLabel,\n\tFieldsRow,\n\tFrequencyDropdownSlot,\n\tMonthDateGridSlot,\n\tRow,\n} from './ScheduleBuilder.styled';\nimport {\n\tCHIP_WIDTH,\n\tDATE_CHIP_OPTIONS,\n\tDAY_CHIP_OPTIONS,\n\tgetSkippedMonthCaption,\n\tLAST_DAY_CHIP_VALUE,\n\tScheduleHelper,\n} from './ScheduleHelper';\n\nconst FREQUENCY_OPTIONS: SingleOption[] = [\n\t{ label: 'Daily', value: RECURRENCE_FREQUENCY.DAILY },\n\t{ label: 'Weekly', value: RECURRENCE_FREQUENCY.WEEKLY },\n\t{ label: 'Monthly', value: RECURRENCE_FREQUENCY.MONTHLY },\n];\n\n/** \"Repeat every\" presets for a monthly recurrence. */\nconst MONTHLY_REPEAT_OPTIONS: SingleOption[] = [\n\t{ label: 'First', value: MONTHLY_REPEAT_OPTION.FIRST },\n\t{ label: 'Last', value: MONTHLY_REPEAT_OPTION.LAST },\n\t{ label: 'Custom', value: MONTHLY_REPEAT_OPTION.CUSTOM },\n];\n\nexport interface ScheduleFrequencyPickerProps {\n\tvalue: RecurrenceValue;\n\tonChange: (patch: Partial<RecurrenceValue>) => void;\n\t/**\n\t * Width of the frequency menu. Defaults to matching its button — pass a\n\t * measured width when the button sits in a narrow column and the menu should\n\t * still be readable.\n\t */\n\tfrequencyMenuWidth?: string;\n\t'data-test'?: string;\n}\n\n/**\n * Frequency, plus whichever \"Repeat on\" picker that frequency needs.\n *\n * Daily needs no picker, weekly needs day chips, monthly needs a preset dropdown\n * and — for Custom — the 1-31 date grid. All three live here so a caller does not\n * have to know which control belongs to which frequency.\n */\nexport const ScheduleFrequencyPicker: React.FC<\n\tScheduleFrequencyPickerProps\n> = ({ value, onChange, frequencyMenuWidth, 'data-test': dataTest }) => {\n\tconst helper = new ScheduleHelper(value);\n\tconst isWeekly = helper.frequency === RECURRENCE_FREQUENCY.WEEKLY;\n\tconst isMonthly = helper.frequency === RECURRENCE_FREQUENCY.MONTHLY;\n\tconst isCustomMonthly =\n\t\tisMonthly && value?.monthlyRepeatOption === MONTHLY_REPEAT_OPTION.CUSTOM;\n\n\tconst skippedMonthCaption = getSkippedMonthCaption(value?.datesOfMonth);\n\n\t/** The last-day sentinel rides alongside the numeric dates in one chip group. */\n\tconst monthlyChipValue: (string | number)[] = [\n\t\t...(value?.datesOfMonth ?? []),\n\t\t...(value?.lastDaySelected ? [LAST_DAY_CHIP_VALUE] : []),\n\t];\n\n\treturn (\n\t\t<Column gap={12} data-test={dataTest}>\n\t\t\t<FieldsRow>\n\t\t\t\t{/*\n Same flex share as the Start date column above it, per the design\n where both fields are 337px halves of the 690px row.\n */}\n\t\t\t\t<DateFieldColumn>\n\t\t\t\t\t<FieldLabel>\n\t\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t\tSelect frequency\n\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t</FieldLabel>\n\t\t\t\t\t<FrequencyDropdownSlot>\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\tisSearchable={false}\n\t\t\t\t\t\t\tisMultiSelect={false}\n\t\t\t\t\t\t\toptions={FREQUENCY_OPTIONS}\n\t\t\t\t\t\t\tbuttonWidth=\"100%\"\n\t\t\t\t\t\t\twidth={frequencyMenuWidth || '100%'}\n\t\t\t\t\t\t\tplaceHolderHeight=\"48px\"\n\t\t\t\t\t\t\tplaceHolder=\"Select frequency\"\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tFREQUENCY_OPTIONS.find(\n\t\t\t\t\t\t\t\t\t(option) => option.value === helper.frequency,\n\t\t\t\t\t\t\t\t)?.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonSelect={(\n\t\t\t\t\t\t\t\tselected: DropdownOption | DropdownOption[] | null,\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tconst normalized = (\n\t\t\t\t\t\t\t\t\tArray.isArray(selected) ? selected[0] : selected\n\t\t\t\t\t\t\t\t) as SingleOption | null;\n\t\t\t\t\t\t\t\tif (!normalized?.value) return;\n\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\tfrequency: normalized.value as RECURRENCE_FREQUENCY,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FrequencyDropdownSlot>\n\t\t\t\t</DateFieldColumn>\n\t\t\t\t{/*\n Holds the other half of the row when no picker follows, so the\n frequency field stays the same width as Start date instead of\n stretching across the whole row.\n */}\n\t\t\t\t{!isWeekly && !isMonthly && <DateFieldColumn aria-hidden />}\n\t\t\t\t{isWeekly && (\n\t\t\t\t\t<FieldColumn>\n\t\t\t\t\t\t<FieldLabel>\n\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tRepeat on\n\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t</FieldLabel>\n\t\t\t\t\t\t<ChipSelectorGroup\n\t\t\t\t\t\t\tdata-test=\"recurrence-days-of-week\"\n\t\t\t\t\t\t\tariaLabel=\"Repeat on\"\n\t\t\t\t\t\t\tchipWidth={CHIP_WIDTH}\n\t\t\t\t\t\t\toptions={DAY_CHIP_OPTIONS}\n\t\t\t\t\t\t\tvalue={value?.daysOfWeek ?? []}\n\t\t\t\t\t\t\tonChange={(days) =>\n\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\tdaysOfWeek: days.filter(\n\t\t\t\t\t\t\t\t\t\t(day): day is number => typeof day === 'number',\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{helper.isMissingWeeklyDays && (\n\t\t\t\t\t\t\t<CaptionWithIcon>\n\t\t\t\t\t\t\t\t<Info size={16} color={COLORS.content.negative} />\n\t\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.negative}>\n\t\t\t\t\t\t\t\t\tSelect day(s) above to send this weekly recurring\n\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t</CaptionWithIcon>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</FieldColumn>\n\t\t\t\t)}\n\t\t\t\t{isMonthly && (\n\t\t\t\t\t<FieldColumn>\n\t\t\t\t\t\t<FieldLabel>\n\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tRepeat every\n\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t</FieldLabel>\n\t\t\t\t\t\t<Row gap={8}>\n\t\t\t\t\t\t\t<FrequencyDropdownSlot>\n\t\t\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\t\t\tisSearchable={false}\n\t\t\t\t\t\t\t\t\tisMultiSelect={false}\n\t\t\t\t\t\t\t\t\toptions={MONTHLY_REPEAT_OPTIONS}\n\t\t\t\t\t\t\t\t\tbuttonWidth=\"100%\"\n\t\t\t\t\t\t\t\t\twidth=\"220px\"\n\t\t\t\t\t\t\t\t\tplaceHolderHeight=\"48px\"\n\t\t\t\t\t\t\t\t\tplaceHolder=\"Select\"\n\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\tMONTHLY_REPEAT_OPTIONS.find(\n\t\t\t\t\t\t\t\t\t\t\t(option) => option.value === value?.monthlyRepeatOption,\n\t\t\t\t\t\t\t\t\t\t)?.label\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonSelect={(\n\t\t\t\t\t\t\t\t\t\tselected: DropdownOption | DropdownOption[] | null,\n\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\tconst normalized = (\n\t\t\t\t\t\t\t\t\t\t\tArray.isArray(selected) ? selected[0] : selected\n\t\t\t\t\t\t\t\t\t\t) as SingleOption | null;\n\t\t\t\t\t\t\t\t\t\tif (!normalized?.value) return;\n\t\t\t\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\t\t\t\tmonthlyRepeatOption:\n\t\t\t\t\t\t\t\t\t\t\t\tnormalized.value as MONTHLY_REPEAT_OPTION,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FrequencyDropdownSlot>\n\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tday of the month\n\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</FieldColumn>\n\t\t\t\t)}\n\t\t\t</FieldsRow>\n\n\t\t\t{isCustomMonthly && (\n\t\t\t\t<MonthDateGridSlot>\n\t\t\t\t\t<FieldLabel>\n\t\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t\tRepeat on\n\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t</FieldLabel>\n\t\t\t\t\t<ChipSelectorGroup\n\t\t\t\t\t\tdata-test=\"recurrence-dates-of-month\"\n\t\t\t\t\t\tariaLabel=\"Repeat on dates\"\n\t\t\t\t\t\tchipWidth={CHIP_WIDTH}\n\t\t\t\t\t\toptions={DATE_CHIP_OPTIONS}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\twrap\n\t\t\t\t\t\tvalue={monthlyChipValue}\n\t\t\t\t\t\tonChange={(selected) =>\n\t\t\t\t\t\t\tonChange({\n\t\t\t\t\t\t\t\tdatesOfMonth: selected.filter(\n\t\t\t\t\t\t\t\t\t(item): item is number => typeof item === 'number',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tlastDaySelected: selected.includes(LAST_DAY_CHIP_VALUE),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{!!skippedMonthCaption && (\n\t\t\t\t\t\t<CaptionWithIcon>\n\t\t\t\t\t\t\t<Info size={16} color={COLORS.content.secondary} />\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\t{skippedMonthCaption}\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</CaptionWithIcon>\n\t\t\t\t\t)}\n\t\t\t\t\t{helper.isMissingMonthlyDates && (\n\t\t\t\t\t\t<CaptionWithIcon>\n\t\t\t\t\t\t\t<Info size={16} color={COLORS.content.negative} />\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.negative}>\n\t\t\t\t\t\t\t\tSelect day(s) above to send this monthly recurring\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</CaptionWithIcon>\n\t\t\t\t\t)}\n\t\t\t\t</MonthDateGridSlot>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\n"],"names":["FREQUENCY_OPTIONS","RECURRENCE_FREQUENCY","MONTHLY_REPEAT_OPTIONS","MONTHLY_REPEAT_OPTION","ScheduleFrequencyPicker","value","onChange","frequencyMenuWidth","dataTest","helper","ScheduleHelper","isWeekly","isMonthly","isCustomMonthly","skippedMonthCaption","getSkippedMonthCaption","monthlyChipValue","LAST_DAY_CHIP_VALUE","jsxs","Column","FieldsRow","DateFieldColumn","jsx","FieldLabel","BodySecondary","COLORS","FrequencyDropdownSlot","Dropdown","option","selected","normalized","FieldColumn","ChipSelectorGroup","CHIP_WIDTH","DAY_CHIP_OPTIONS","days","day","CaptionWithIcon","Info","BodyCaption","Row","MonthDateGridSlot","DATE_CHIP_OPTIONS","item"],"mappings":";;;;;;;;;AA+BA,MAAMA,IAAoC;AAAA,EACzC,EAAE,OAAO,SAAS,OAAOC,EAAqB,MAAA;AAAA,EAC9C,EAAE,OAAO,UAAU,OAAOA,EAA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