UNPKG

527 kBJavaScriptView Raw
1import { any, bool, func, object } from 'prop-types';
2import { Children, Component, Fragment, PureComponent, createContext, createElement, createRef, forwardRef, isValidElement } from 'react';
3import { classNames, elementChildren, isElementOfType, variationName, wrapWithComponent } from '@shopify/react-utilities';
4import { classNames as classNames$1, variationName as variationName$1 } from '@shopify/react-utilities/styles';
5import { __decorate, __rest } from 'tslib';
6import { autobind, debounce, memoize } from '@shopify/javascript-utilities/decorators';
7import { Rect, getRectForNode } from '@shopify/javascript-utilities/geometry';
8import throttle from 'lodash-decorators/throttle';
9import { addEventListener, removeEventListener } from '@shopify/javascript-utilities/events';
10import { createUniqueIDFactory, noop } from '@shopify/javascript-utilities/other';
11import get from 'lodash/get';
12import merge from 'lodash/merge';
13import replace from 'lodash/replace';
14import hoistStatics from 'hoist-non-react-statics';
15import compose from '@shopify/react-compose';
16import { read, write } from '@shopify/javascript-utilities/fastdom';
17import { clamp } from '@shopify/javascript-utilities/math';
18import isEqual from 'lodash/isEqual';
19import { Months, Weekdays, abbreviationForWeekday, dateIsInRange, dateIsSelected, getNewRange, getNextDisplayMonth, getNextDisplayYear, getPreviousDisplayMonth, getPreviousDisplayYear, getWeeksForMonth, isDateAfter, isDateBefore, isSameDay } from '@shopify/javascript-utilities/dates';
20import capitalize from 'lodash/capitalize';
21import 'core-js/fn/array/some';
22import 'core-js/fn/string/ends-with';
23import { CSSTransition, Transition, TransitionGroup } from 'react-transition-group';
24import { createPortal, findDOMNode } from 'react-dom';
25import { findFirstFocusableNode, focusFirstFocusableNode, focusLastFocusableNode } from '@shopify/javascript-utilities/focus';
26import { isServer } from '@shopify/react-utilities/target';
27import { closest, nodeContainsDescendant } from '@shopify/javascript-utilities/dom';
28import memoize$1 from 'lodash/memoize';
29import pick from 'lodash/pick';
30
31if (typeof window !== 'undefined') {
32 window.Polaris = window.Polaris || {};
33 window.Polaris.VERSION = '0.1.6';
34}
35
36/* eslint-disable shopify/typescript/prefer-pascal-case-enums */
37// eslint-disable-next-line shopify/typescript/prefer-singular-enums
38var Keys;
39(function (Keys) {
40 Keys[Keys["BACKSPACE"] = 8] = "BACKSPACE";
41 Keys[Keys["TAB"] = 9] = "TAB";
42 Keys[Keys["ENTER"] = 13] = "ENTER";
43 Keys[Keys["SHIFT"] = 16] = "SHIFT";
44 Keys[Keys["CTRL"] = 17] = "CTRL";
45 Keys[Keys["ALT"] = 18] = "ALT";
46 Keys[Keys["PAUSE"] = 19] = "PAUSE";
47 Keys[Keys["CAPS_LOCK"] = 20] = "CAPS_LOCK";
48 Keys[Keys["ESCAPE"] = 27] = "ESCAPE";
49 Keys[Keys["SPACE"] = 32] = "SPACE";
50 Keys[Keys["PAGE_UP"] = 33] = "PAGE_UP";
51 Keys[Keys["PAGE_DOWN"] = 34] = "PAGE_DOWN";
52 Keys[Keys["END"] = 35] = "END";
53 Keys[Keys["HOME"] = 36] = "HOME";
54 Keys[Keys["LEFT_ARROW"] = 37] = "LEFT_ARROW";
55 Keys[Keys["UP_ARROW"] = 38] = "UP_ARROW";
56 Keys[Keys["RIGHT_ARROW"] = 39] = "RIGHT_ARROW";
57 Keys[Keys["DOWN_ARROW"] = 40] = "DOWN_ARROW";
58 Keys[Keys["INSERT"] = 45] = "INSERT";
59 Keys[Keys["DELETE"] = 46] = "DELETE";
60 Keys[Keys["KEY_0"] = 48] = "KEY_0";
61 Keys[Keys["KEY_1"] = 49] = "KEY_1";
62 Keys[Keys["KEY_2"] = 50] = "KEY_2";
63 Keys[Keys["KEY_3"] = 51] = "KEY_3";
64 Keys[Keys["KEY_4"] = 52] = "KEY_4";
65 Keys[Keys["KEY_5"] = 53] = "KEY_5";
66 Keys[Keys["KEY_6"] = 54] = "KEY_6";
67 Keys[Keys["KEY_7"] = 55] = "KEY_7";
68 Keys[Keys["KEY_8"] = 56] = "KEY_8";
69 Keys[Keys["KEY_9"] = 57] = "KEY_9";
70 Keys[Keys["KEY_A"] = 65] = "KEY_A";
71 Keys[Keys["KEY_B"] = 66] = "KEY_B";
72 Keys[Keys["KEY_C"] = 67] = "KEY_C";
73 Keys[Keys["KEY_D"] = 68] = "KEY_D";
74 Keys[Keys["KEY_E"] = 69] = "KEY_E";
75 Keys[Keys["KEY_F"] = 70] = "KEY_F";
76 Keys[Keys["KEY_G"] = 71] = "KEY_G";
77 Keys[Keys["KEY_H"] = 72] = "KEY_H";
78 Keys[Keys["KEY_I"] = 73] = "KEY_I";
79 Keys[Keys["KEY_J"] = 74] = "KEY_J";
80 Keys[Keys["KEY_K"] = 75] = "KEY_K";
81 Keys[Keys["KEY_L"] = 76] = "KEY_L";
82 Keys[Keys["KEY_M"] = 77] = "KEY_M";
83 Keys[Keys["KEY_N"] = 78] = "KEY_N";
84 Keys[Keys["KEY_O"] = 79] = "KEY_O";
85 Keys[Keys["KEY_P"] = 80] = "KEY_P";
86 Keys[Keys["KEY_Q"] = 81] = "KEY_Q";
87 Keys[Keys["KEY_R"] = 82] = "KEY_R";
88 Keys[Keys["KEY_S"] = 83] = "KEY_S";
89 Keys[Keys["KEY_T"] = 84] = "KEY_T";
90 Keys[Keys["KEY_U"] = 85] = "KEY_U";
91 Keys[Keys["KEY_V"] = 86] = "KEY_V";
92 Keys[Keys["KEY_W"] = 87] = "KEY_W";
93 Keys[Keys["KEY_X"] = 88] = "KEY_X";
94 Keys[Keys["KEY_Y"] = 89] = "KEY_Y";
95 Keys[Keys["KEY_Z"] = 90] = "KEY_Z";
96 Keys[Keys["LEFT_META"] = 91] = "LEFT_META";
97 Keys[Keys["RIGHT_META"] = 92] = "RIGHT_META";
98 Keys[Keys["SELECT"] = 93] = "SELECT";
99 Keys[Keys["NUMPAD_0"] = 96] = "NUMPAD_0";
100 Keys[Keys["NUMPAD_1"] = 97] = "NUMPAD_1";
101 Keys[Keys["NUMPAD_2"] = 98] = "NUMPAD_2";
102 Keys[Keys["NUMPAD_3"] = 99] = "NUMPAD_3";
103 Keys[Keys["NUMPAD_4"] = 100] = "NUMPAD_4";
104 Keys[Keys["NUMPAD_5"] = 101] = "NUMPAD_5";
105 Keys[Keys["NUMPAD_6"] = 102] = "NUMPAD_6";
106 Keys[Keys["NUMPAD_7"] = 103] = "NUMPAD_7";
107 Keys[Keys["NUMPAD_8"] = 104] = "NUMPAD_8";
108 Keys[Keys["NUMPAD_9"] = 105] = "NUMPAD_9";
109 Keys[Keys["MULTIPLY"] = 106] = "MULTIPLY";
110 Keys[Keys["ADD"] = 107] = "ADD";
111 Keys[Keys["SUBTRACT"] = 109] = "SUBTRACT";
112 Keys[Keys["DECIMAL"] = 110] = "DECIMAL";
113 Keys[Keys["DIVIDE"] = 111] = "DIVIDE";
114 Keys[Keys["F1"] = 112] = "F1";
115 Keys[Keys["F2"] = 113] = "F2";
116 Keys[Keys["F3"] = 114] = "F3";
117 Keys[Keys["F4"] = 115] = "F4";
118 Keys[Keys["F5"] = 116] = "F5";
119 Keys[Keys["F6"] = 117] = "F6";
120 Keys[Keys["F7"] = 118] = "F7";
121 Keys[Keys["F8"] = 119] = "F8";
122 Keys[Keys["F9"] = 120] = "F9";
123 Keys[Keys["F10"] = 121] = "F10";
124 Keys[Keys["F11"] = 122] = "F11";
125 Keys[Keys["F12"] = 123] = "F12";
126 Keys[Keys["NUM_LOCK"] = 144] = "NUM_LOCK";
127 Keys[Keys["SCROLL_LOCK"] = 145] = "SCROLL_LOCK";
128 Keys[Keys["SEMICOLON"] = 186] = "SEMICOLON";
129 Keys[Keys["EQUALS"] = 187] = "EQUALS";
130 Keys[Keys["COMMA"] = 188] = "COMMA";
131 Keys[Keys["DASH"] = 189] = "DASH";
132 Keys[Keys["PERIOD"] = 190] = "PERIOD";
133 Keys[Keys["FORWARD_SLASH"] = 191] = "FORWARD_SLASH";
134 Keys[Keys["GRAVE_ACCENT"] = 192] = "GRAVE_ACCENT";
135 Keys[Keys["OPEN_BRACKET"] = 219] = "OPEN_BRACKET";
136 Keys[Keys["BACK_SLASH"] = 220] = "BACK_SLASH";
137 Keys[Keys["CLOSE_BRACKET"] = 221] = "CLOSE_BRACKET";
138 Keys[Keys["SINGLE_QUOTE"] = 222] = "SINGLE_QUOTE";
139})(Keys || (Keys = {}));
140/* eslint-enable shopify/typescript/prefer-pascal-case-enums */
141const contentContextTypes = {
142 withinContentContainer: bool
143};
144
145var styles$1 = {
146 "SettingAction": "p_bu",
147 "Setting": "p_u4",
148 "Action": "p_i6",
149};
150
151function SettingAction$1({ action, children }) {
152 return createElement(
153 'div',
154 { className: styles$1.SettingAction },
155 createElement(
156 'div',
157 { className: styles$1.Setting },
158 children
159 ),
160 createElement(
161 'div',
162 { className: styles$1.Action },
163 action
164 )
165 );
166}
167
168var styles$2 = {
169 "TermsOfService": "p_xv",
170 "Content": "p_gt",
171};
172
173// eslint-disable-next-line shopify/strict-component-boundaries
174function AccountConnection$1({ connected = false, action, avatarUrl, accountName = '', title, details, termsOfService }) {
175 const initials = accountName ? accountName.split(/\s+/).map(name => name[0]).join('') : undefined;
176 const avatarMarkup = connected ? createElement(Avatar$2, { accessibilityLabel: '', name: accountName, initials: initials, source: avatarUrl }) : null;
177 let titleMarkup = null;
178 if (title) {
179 titleMarkup = createElement(
180 'div',
181 null,
182 title
183 );
184 } else if (accountName) {
185 titleMarkup = createElement(
186 'div',
187 null,
188 accountName
189 );
190 }
191 const detailsMarkup = details ? createElement(
192 'div',
193 null,
194 createElement(
195 TextStyle$1,
196 { variation: 'subdued' },
197 details
198 )
199 ) : null;
200 const termsOfServiceMarkup = termsOfService ? createElement(
201 'div',
202 { className: styles$2.TermsOfService },
203 termsOfService
204 ) : null;
205 const actionElement = action ? buttonFrom(action, { primary: !connected }) : null;
206 return createElement(
207 Card$1,
208 { sectioned: true },
209 createElement(
210 SettingAction$1,
211 { action: actionElement },
212 createElement(
213 Stack$1,
214 null,
215 avatarMarkup,
216 createElement(
217 Stack$1.Item,
218 { fill: true },
219 createElement(
220 'div',
221 { className: styles$2.Content },
222 titleMarkup,
223 detailsMarkup
224 )
225 )
226 )
227 ),
228 termsOfServiceMarkup
229 );
230}
231
232var index_common = {
233 colorPurpleLighter: 'rgb(246, 240, 253)',
234 colorPurpleLight: 'rgb(227, 208, 255)',
235 colorPurpleBase: 'rgb(156, 106, 222)',
236 colorPurpleDark: 'rgb(80, 36, 143)',
237 colorPurpleDarker: 'rgb(35, 0, 81)',
238 colorPurpleText: 'rgb(80, 73, 90)',
239 colorIndigoLighter: 'rgb(244, 245, 250)',
240 colorIndigoLight: 'rgb(179, 188, 245)',
241 colorIndigoBase: 'rgb(92, 106, 196)',
242 colorIndigoDark: 'rgb(32, 46, 120)',
243 colorIndigoDarker: 'rgb(0, 6, 57)',
244 colorIndigoText: 'rgb(62, 65, 85)',
245 colorBlueLighter: 'rgb(235, 245, 250)',
246 colorBlueLight: 'rgb(180, 225, 250)',
247 colorBlueBase: 'rgb(0, 122, 206)',
248 colorBlueDark: 'rgb(8, 78, 138)',
249 colorBlueDarker: 'rgb(0, 20, 41)',
250 colorBlueText: 'rgb(62, 78, 87)',
251 colorTealLighter: 'rgb(224, 245, 245)',
252 colorTealLight: 'rgb(183, 236, 236)',
253 colorTealBase: 'rgb(71, 193, 191)',
254 colorTealDark: 'rgb(0, 132, 142)',
255 colorTealDarker: 'rgb(0, 49, 53)',
256 colorTealText: 'rgb(64, 83, 82)',
257 colorGreenLighter: 'rgb(227, 241, 223)',
258 colorGreenLight: 'rgb(187, 229, 179)',
259 colorGreenBase: 'rgb(80, 184, 60)',
260 colorGreenDark: 'rgb(16, 128, 67)',
261 colorGreenDarker: 'rgb(23, 54, 48)',
262 colorGreenText: 'rgb(65, 79, 62)',
263 colorYellowLighter: 'rgb(252, 241, 205)',
264 colorYellowLight: 'rgb(255, 234, 138)',
265 colorYellowBase: 'rgb(238, 194, 0)',
266 colorYellowDark: 'rgb(156, 111, 25)',
267 colorYellowDarker: 'rgb(87, 59, 0)',
268 colorYellowText: 'rgb(89, 81, 48)',
269 colorOrangeLighter: 'rgb(252, 235, 219)',
270 colorOrangeLight: 'rgb(255, 197, 139)',
271 colorOrangeBase: 'rgb(244, 147, 66)',
272 colorOrangeDark: 'rgb(192, 87, 23)',
273 colorOrangeDarker: 'rgb(74, 21, 4)',
274 colorOrangeText: 'rgb(89, 68, 48)',
275 colorRedLighter: 'rgb(251, 234, 229)',
276 colorRedLight: 'rgb(254, 173, 154)',
277 colorRedBase: 'rgb(222, 54, 24)',
278 colorRedDark: 'rgb(191, 7, 17)',
279 colorRedDarker: 'rgb(51, 1, 1)',
280 colorRedText: 'rgb(88, 60, 53)',
281 colorWhiteBase: 'rgb(255, 255, 255)',
282 colorSkyLighter: 'rgb(249, 250, 251)',
283 colorSkyLight: 'rgb(244, 246, 248)',
284 colorSkyBase: 'rgb(223, 227, 232)',
285 colorSkyDark: 'rgb(196, 205, 213)',
286 colorInkLightest: 'rgb(145, 158, 171)',
287 colorInkLighter: 'rgb(99, 115, 129)',
288 colorInkLight: 'rgb(69, 79, 91)',
289 colorInkBase: 'rgb(33, 43, 54)',
290 colorBlackBase: 'rgb(0, 0, 0)',
291 spacingNone: 0,
292 spacingExtraTight: '4px',
293 spacingTight: '8px',
294 spacingBase: '16px',
295 spacingLoose: '20px',
296 spacingExtraLoose: '32px',
297 fontStackBase:
298 "-apple-system, 'BlinkMacSystemFont', 'San Francisco', 'Roboto', 'Segoe UI', 'Helvetica Neue', sans-serif",
299 fontStackMonospace: "Monaco, Consolas, 'Lucida Console', monospace",
300};
301
302var polarisTokens = index_common;
303
304const Breakpoints = {
305 navBarCollapsed: '769px',
306 stackedContent: '1043px'
307};
308const noWindowMatches = {
309 media: '',
310 addListener: noop,
311 removeListener: noop,
312 matches: false
313};
314
315function stackedContent() {
316 return typeof window === 'undefined' ? noWindowMatches : window.matchMedia(`(max-width: ${Breakpoints.stackedContent})`);
317}
318
319class StickyManager {
320 constructor(container) {
321 this.stickyItems = [];
322 this.stuckItems = [];
323 if (container) {
324 this.setContainer(container);
325 }
326 }
327 registerStickyItem(stickyItem) {
328 this.stickyItems.push(stickyItem);
329 }
330 unregisterStickyItem(nodeToRemove) {
331 const nodeIndex = this.stickyItems.findIndex(({ stickyNode }) => nodeToRemove === stickyNode);
332 this.stickyItems.splice(nodeIndex, 1);
333 }
334 setContainer(el) {
335 this.container = el;
336 addEventListener(this.container, 'scroll', this.handleScroll);
337 addEventListener(window, 'resize', this.handleResize);
338 this.manageStickyItems();
339 }
340 removeScrollListener() {
341 if (this.container) {
342 removeEventListener(this.container, 'scroll', this.handleScroll);
343 removeEventListener(window, 'resize', this.handleResize);
344 }
345 }
346 handleResize() {
347 this.manageStickyItems();
348 }
349 handleScroll() {
350 this.manageStickyItems();
351 }
352 manageStickyItems() {
353 if (this.stickyItems.length <= 0) {
354 return;
355 }
356 const scrollTop = scrollTopFor(this.container);
357 const containerTop = getRectForNode(this.container).top;
358 this.stickyItems.forEach(stickyItem => {
359 const { handlePositioning } = stickyItem;
360 const { sticky, top, left, width } = this.evaluateStickyItem(stickyItem, scrollTop, containerTop);
361 this.updateStuckItems(stickyItem, sticky);
362 handlePositioning(sticky, top, left, width);
363 });
364 }
365 evaluateStickyItem(stickyItem, scrollTop, containerTop) {
366 const { stickyNode, placeHolderNode, boundingElement, offset, disableWhenStacked } = stickyItem;
367 if (disableWhenStacked && stackedContent().matches) {
368 return {
369 sticky: false,
370 top: 0,
371 left: 0,
372 width: 'auto'
373 };
374 }
375 const stickyOffset = offset ? this.getOffset(stickyNode) + parseInt(polarisTokens.spacingLoose, 10) : this.getOffset(stickyNode);
376 const scrollPosition = scrollTop + stickyOffset;
377 const placeHolderNodeCurrentTop = placeHolderNode.getBoundingClientRect().top - containerTop + scrollTop;
378 const top = containerTop + stickyOffset;
379 const width = placeHolderNode.getBoundingClientRect().width;
380 const left = placeHolderNode.getBoundingClientRect().left;
381 let sticky;
382 if (boundingElement == null) {
383 sticky = scrollPosition >= placeHolderNodeCurrentTop;
384 } else {
385 const stickyItemHeight = stickyNode.getBoundingClientRect().height;
386 const stickyItemBottomPosition = boundingElement.getBoundingClientRect().bottom - stickyItemHeight + scrollTop - containerTop;
387 sticky = scrollPosition >= placeHolderNodeCurrentTop && scrollPosition < stickyItemBottomPosition;
388 }
389 return {
390 sticky,
391 top,
392 left,
393 width
394 };
395 }
396 updateStuckItems(item, sticky) {
397 const { stickyNode } = item;
398 if (sticky && !this.isNodeStuck(stickyNode)) {
399 this.addStuckItem(item);
400 } else if (!sticky && this.isNodeStuck(stickyNode)) {
401 this.removeStuckItem(item);
402 }
403 }
404 addStuckItem(stickyItem) {
405 this.stuckItems.push(stickyItem);
406 }
407 removeStuckItem(stickyItem) {
408 const { stickyNode: nodeToRemove } = stickyItem;
409 const nodeIndex = this.stuckItems.findIndex(({ stickyNode }) => nodeToRemove === stickyNode);
410 this.stuckItems.splice(nodeIndex, 1);
411 }
412 getOffset(node) {
413 if (this.stuckItems.length === 0) {
414 return 0;
415 }
416 let offset = 0;
417 let count = 0;
418 const stuckNodesLength = this.stuckItems.length;
419 const nodeRect = getRectForNode(node);
420 while (count < stuckNodesLength) {
421 const stuckNode = this.stuckItems[count].stickyNode;
422 if (stuckNode !== node) {
423 const stuckNodeRect = getRectForNode(stuckNode);
424 if (!horizontallyOverlaps(nodeRect, stuckNodeRect)) {
425 offset += getRectForNode(stuckNode).height;
426 }
427 } else {
428 break;
429 }
430 count++;
431 }
432 return offset;
433 }
434 isNodeStuck(node) {
435 const nodeFound = this.stuckItems.findIndex(({ stickyNode }) => node === stickyNode);
436 return nodeFound >= 0;
437 }
438}
439__decorate([throttle(50), autobind], StickyManager.prototype, "handleResize", null);
440__decorate([throttle(50), autobind], StickyManager.prototype, "handleScroll", null);
441function isDocument(node) {
442 return node === document;
443}
444function scrollTopFor(container) {
445 return isDocument(container) ? document.body.scrollTop || document.documentElement.scrollTop : container.scrollTop;
446}
447function horizontallyOverlaps(rect1, rect2) {
448 const rect1Left = rect1.left;
449 const rect1Right = rect1.left + rect1.width;
450 const rect2Left = rect2.left;
451 const rect2Right = rect2.left + rect2.width;
452 return rect2Right < rect1Left || rect1Right < rect2Left;
453}
454
455const polarisAppProviderContextTypes = {
456 polaris: any,
457 easdk: any
458};
459
460var Polaris = {"Avatar":{"label":"Avatar","labelWithInitials":"Avatar with initials {initials}"},"Badge":{"PROGRESS_LABELS":{"incomplete":"Incomplete","partiallyComplete":"Partially complete","complete":"Complete"},"STATUS_LABELS":{"info":"Info","success":"Success","warning":"Warning","attention":"Attention","new":"New"}},"Button":{"spinnerAccessibilityLabel":"Loading"},"Common":{"checkbox":"checkbox","undo":"Undo"},"DataTable":{"sortAccessibilityLabel":"sort {direction} by","navAccessibilityLabel":"Scroll table {direction} one column","totalsRowHeading":"Totals"},"DatePicker":{"previousMonth":"Show previous month, {previousMonthName} {showPreviousYear}","nextMonth":"Show next month, {nextMonth} {nextYear}","today":"Today "},"DropZone":{"overlayTextFile":"Drop file to upload","overlayTextImage":"Drop image to upload","errorOverlayTextFile":"File type is not valid","errorOverlayTextImage":"Image type is not valid","FileUpload":{"actionTitleFile":"Add file","actionTitleImage":"Add image","actionHintFile":"or drop files to upload","actionHintImage":"or drop images to upload"}},"EmptySearchResult":{"altText":"Empty search results"},"Icon":{"backdropWarning":"The {color} icon doesn’t accept backdrops. The icon colors that have backdrops are: {colorsWithBackDrops}"},"Modal":{"iFrameTitle":"body markup","modalWarning":"These required properties are missing from Modal: {missingProps}","actionWarning":"Modals inside of an embedded app will ignore: {actionWarnings}"},"Pagination":{"previous":"Previous","next":"Next","pagination":"Pagination"},"ProgressBar":{"negativeWarningMessage":"Values passed to the progress prop shouldn’t be negative. Resetting {progress} to 0.","exceedWarningMessage":"Values passed to the progress prop shouldn’t exceed 100. Setting {progress} to 100."},"ResourceList":{"sortingLabel":"Sort by","defaultItemSingular":"item","defaultItemPlural":"items","showing":"Showing {itemsCount} {resource}","selected":"{selectedItemsCount} selected","allItemsSelected":"All {itemsLength}+ {resourceNamePlural} in your store are selected.","selectAllItems":"Select all {itemsLength}+ {resourceNamePlural} in your store","emptySearchResultTitle":"No {resourceNamePlural} found","emptySearchResultDescription":"Try changing the filters or search term","selectButtonText":"Select","a11yCheckboxDeselectAllSingle":"Deselect {resourceNameSingular}","a11yCheckboxSelectAllSingle":"Select {resourceNameSingular}","a11yCheckboxDeselectAllMultiple":"Deselect all {itemsLength} {resourceNamePlural}","a11yCheckboxSelectAllMultiple":"Select all {itemsLength} {resourceNamePlural}","ariaLiveSingular":"{itemsLength} item","ariaLivePlural":"{itemsLength} items","Item":{"selectItem":"Select: {accessibilityLabel}","deselectItem":"Deselect: {accessibilityLabel}","actionsDropdown":"Actions dropdown"},"BulkActions":{"actionsActivatorLabel":"Actions","moreActionsActivatorLabel":"More actions","warningMessage":"To provide a better user experience. There should only be a maximum of {maxPromotedActions} promoted actions."},"FilterCreator":{"filterButtonLabel":"Filter","selectFilterKeyPlaceholder":"Select a filter…","addFilterButtonLabel":"Add filter","showAllWhere":"Show all {resourceNamePlural} where:"},"FilterControl":{"textFieldLabel":"Search {resourceNamePlural}"},"FilterValueSelector":{"selectFilterValuePlaceholder":"Select a filter…"},"DateSelector":{"dateFilterLabel":"Select a value","dateValueLabel":"Date","dateValueError":"Match YYYY-MM-DD format","dateValuePlaceholder":"YYYY-MM-DD","SelectOptions":{"PastWeek":"in the last week","PastMonth":"in the last month","PastQuarter":"in the last 3 months","PastYear":"in the last year","ComingWeek":"next week","ComingMonth":"next month","ComingQuarter":"in the next 3 months","ComingYear":"in the next year","OnOrBefore":"on or before","OnOrAfter":"on or after"},"FilterLabelForValue":{"past_week":"in the last week","past_month":"in the last month","past_quarter":"in the last 3 months","past_year":"in the last year","coming_week":"next week","coming_month":"next month","coming_quarter":"in the next 3 months","coming_year":"in the next year","on_or_before":"before {date}","on_or_after":"after {date}"}}},"Spinner":{"warningMessage":"The color {color} is not meant to be used on {size} spinners. The colors available on large spinners are: {colors}"},"Tag":{"ariaLabel":"Remove {children}"}};
461var en = {
462 Polaris: Polaris
463};
464
465class Intl {
466 constructor(translation) {
467 this.translation = translation;
468 this.setTranslation(translation);
469 }
470 setTranslation(translation) {
471 const i18n = Array.isArray(translation) ? merge({}, ...translation) : translation;
472 this.translation = i18n ? merge({}, en, i18n) : en;
473 }
474 translate(id, replacements) {
475 return translate(id, this.translation, replacements);
476 }
477 translationKeyExists(path) {
478 return Boolean(get(this.translation, path));
479 }
480}
481__decorate([autobind], Intl.prototype, "translate", null);
482
483class Link {
484 constructor(linkComponent) {
485 this.linkComponent = linkComponent;
486 }
487 setLinkComponent(link) {
488 this.linkComponent = link;
489 }
490 getLinkComponent() {
491 return this.linkComponent;
492 }
493}
494
495function transformBreadcrumb(breadcrumb, shopOrigin) {
496 if (breadcrumb.content == null) {
497 throw new Error(`No content provided for breadcrumb (${JSON.stringify(breadcrumb)})`);
498 }
499 let target$$1;
500 if (breadcrumb.target) {
501 target$$1 = breadcrumb.target;
502 } else if (breadcrumb.url) {
503 target$$1 = getTargetFromURL(breadcrumb.url, shopOrigin);
504 } else {
505 target$$1 = undefined;
506 }
507 return {
508 label: breadcrumb.content,
509 href: breadcrumb.url,
510 target: target$$1,
511 message: target$$1 === 'app' ? generateCallback(breadcrumb.url) : breadcrumb.onAction
512 };
513}
514function transformAction(shopOrigin) {
515 return action => {
516 let style;
517 if (action.disabled) {
518 style = 'disabled';
519 } else if (action.destructive) {
520 style = 'danger';
521 }
522 let target$$1;
523 if (action.target) {
524 target$$1 = action.target;
525 } else if (action.url) {
526 target$$1 = action.external ? 'new' : getTargetFromURL(action.url, shopOrigin);
527 } else {
528 target$$1 = undefined;
529 }
530 return {
531 label: action.content,
532 href: action.url,
533 target: target$$1,
534 message: target$$1 === 'app' ? generateCallback(action.url) : action.onAction,
535 style
536 };
537 };
538}
539function transformActionGroup(shopOrigin) {
540 return actionGroup => {
541 return {
542 type: 'dropdown',
543 label: actionGroup.title,
544 links: actionGroup.actions.map(transformAction(shopOrigin))
545 };
546 };
547}
548// see https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Generic_syntax for more info on the URI scheme
549function getTargetFromURL(url, shopOrigin) {
550 if (isRootRelative(url) || isOriginHost(url, shopOrigin)) {
551 return 'shopify';
552 } else if (isSameHost(url) || isFragment(url) || isRelative(url) || isSchemeRelative(url)) {
553 return 'app';
554 } else {
555 return 'new';
556 }
557}
558function isRootRelative(url) {
559 return url.charAt(0) === '/' && url.charAt(1) !== '/';
560}
561function isOriginHost(url, shopOrigin) {
562 return shopOrigin && url.indexOf(shopOrigin) !== -1;
563}
564function isSameHost(url) {
565 const hostIndex = url.indexOf(window.location.hostname);
566 const firstDotIndex = url.indexOf('.');
567 return hostIndex >= 0 && hostIndex < firstDotIndex;
568}
569function isFragment(url) {
570 return url.charAt(0) === '#';
571}
572function isRelative(url) {
573 return url.charAt(0) !== '/' && url.toLowerCase().indexOf('http') !== 0;
574}
575function isSchemeRelative(url) {
576 return url.indexOf('//') === 0;
577}
578function generateCallback(url) {
579 if (url == null) {
580 return;
581 }
582 return () => {
583 window.location.assign(url);
584 };
585}
586function transformPagination(pagination) {
587 if (pagination == null) {
588 return undefined;
589 }
590 const { hasNext, hasPrevious, nextURL, previousURL, onNext, onPrevious } = pagination;
591 const finalPagination = {};
592 if (hasNext) {
593 if (onNext) {
594 finalPagination.next = { message: onNext };
595 } else if (nextURL) {
596 finalPagination.next = { href: nextURL };
597 }
598 }
599 if (hasPrevious) {
600 if (onPrevious) {
601 finalPagination.previous = { message: onPrevious };
602 } else if (previousURL) {
603 finalPagination.previous = { href: previousURL };
604 }
605 }
606 return finalPagination;
607}
608
609class Bar {
610 constructor(messenger) {
611 this.messenger = messenger;
612 }
613 update(config) {
614 const { title, icon, breadcrumbs, secondaryActions, actionGroups, primaryAction, pagination } = config;
615 this.messenger.send('Shopify.API.Bar.initialize', {
616 buttons: {
617 primary: primaryAction ? transformAction(this.messenger.targetOrigin)(primaryAction) : undefined,
618 secondary: [...(secondaryActions || []).map(transformAction(this.messenger.targetOrigin)), ...(actionGroups || []).map(transformActionGroup(this.messenger.targetOrigin))]
619 },
620 title,
621 icon,
622 breadcrumb: getLastLevelBreadcrumb(breadcrumbs, this.messenger.targetOrigin),
623 pagination: transformPagination(pagination)
624 });
625 if (actionGroups) {
626 document.addEventListener('click', this.closeDropdown);
627 } else {
628 document.removeEventListener('click', this.closeDropdown);
629 }
630 }
631 closeDropdown() {
632 this.messenger.send('Shopify.API.Bar.closeDropdown');
633 }
634}
635__decorate([autobind], Bar.prototype, "closeDropdown", null);
636function getLastLevelBreadcrumb(breadcrumbs, shopOrigin) {
637 return breadcrumbs && breadcrumbs.length > 0 ? transformBreadcrumb(breadcrumbs[breadcrumbs.length - 1], shopOrigin) : undefined;
638}
639
640class Modal {
641 constructor(messenger) {
642 this.messenger = messenger;
643 }
644 open(config) {
645 const { title, primaryAction, secondaryActions, src, width, height, onClose } = config;
646 if (onClose != null) {
647 this.storeCloseCallback(onClose);
648 }
649 this.messenger.send('Shopify.API.Modal.open', {
650 src,
651 title,
652 width,
653 height,
654 buttons: {
655 primary: primaryAction ? transformAction(this.messenger.targetOrigin)(primaryAction) : undefined,
656 secondary: secondaryActions ? secondaryActions.map(transformAction(this.messenger.targetOrigin)) : undefined
657 }
658 });
659 }
660 alert(config) {
661 const { children, title, destructive, confirmContent, cancelContent, onClose, onConfirm } = config;
662 this.storeCloseCallback(result => {
663 if (result) {
664 if (onConfirm) {
665 onConfirm();
666 }
667 } else if (onClose) {
668 onClose();
669 }
670 });
671 if (onClose && cancelContent) {
672 this.messenger.send('Shopify.API.Modal.confirm', {
673 message: {
674 title,
675 message: children,
676 okButton: confirmContent,
677 cancelButton: cancelContent,
678 style: destructive ? 'danger' : undefined
679 }
680 });
681 } else {
682 this.messenger.send('Shopify.API.Modal.alert', {
683 message: {
684 title,
685 message: children,
686 okButton: confirmContent,
687 style: destructive ? 'danger' : undefined
688 }
689 });
690 }
691 }
692 close(result, data) {
693 if (this.closeCallback == null) {
694 return;
695 }
696 this.messenger.send('Shopify.API.Modal.close', {
697 result,
698 data
699 });
700 }
701 storeCloseCallback(callback) {
702 this.closeCallback = callback;
703 }
704 callCloseCallback(result, data) {
705 const { closeCallback } = this;
706 if (typeof closeCallback === 'function') {
707 delete this.closeCallback;
708 closeCallback(result, data);
709 }
710 }
711}
712
713class ResourcePicker {
714 constructor(messenger, modal) {
715 this.messenger = messenger;
716 this.modal = modal;
717 }
718 close() {
719 this.modal.close();
720 }
721 open({ title, products, collections, allowMultiple = false, showHidden = true, onCancel, onSelection }) {
722 this.modal.storeCloseCallback((success, data) => {
723 if (!success) {
724 if (onCancel != null) {
725 onCancel();
726 }
727 return;
728 }
729 if (onSelection == null) {
730 return;
731 }
732 onSelection(data);
733 });
734 const resources = [];
735 if (products) {
736 resources.push('products');
737 }
738 if (collections) {
739 resources.push('collections');
740 }
741 if (collections) {
742 this.messenger.send('Shopify.API.Modal.collectionPicker', {
743 title,
744 selectMultiple: allowMultiple,
745 // eslint-disable-next-line camelcase
746 show_hidden: showHidden,
747 // eslint-disable-next-line camelcase
748 selectable_resources: resources
749 });
750 } else {
751 this.messenger.send('Shopify.API.Modal.productPicker', {
752 title,
753 selectMultiple: allowMultiple,
754 // eslint-disable-next-line camelcase
755 show_hidden: showHidden,
756 // eslint-disable-next-line camelcase
757 selectable_resources: resources
758 });
759 }
760 }
761}
762
763// eslint-disable-next-line typescript/no-var-requires
764const CoreWeakMap = require('core-js/library/es6/weak-map');
765class Messenger {
766 constructor(target$$1, handlers, options) {
767 this.target = target$$1;
768 this.handlers = handlers;
769 this.targetOrigin = '*';
770 this.queue = [];
771 this.callbacks = {};
772 this.callbacksToID = new CoreWeakMap();
773 this.callbackIndex = 0;
774 if (typeof window === 'undefined') {
775 return;
776 }
777 this.name = options.name;
778 this.targetOrigin = options.targetOrigin;
779 this.debug = options.debug || false;
780 if (!this.targetOrigin.match(/^http(s)?:\/\//)) {
781 this.warn('warning: targetOrigin should include the protocol');
782 }
783 window.addEventListener('message', this.handleMessage.bind(this), false);
784 }
785 setTarget(target$$1) {
786 this.target = target$$1;
787 this.tryToDequeue();
788 }
789 send(message, data) {
790 const normalizedPayload = this.normalizePayload(data);
791 const newMessage = {
792 message,
793 data: normalizedPayload
794 };
795 const messageString = JSON.stringify(newMessage);
796 if (this.target != null) {
797 this.log(`Posting message: ${messageString} to ${this.targetOrigin} }`);
798 this.target.postMessage(messageString, this.targetOrigin);
799 } else {
800 this.log(`Queueing message: ${messageString}`);
801 this.queue.push(newMessage);
802 }
803 return normalizedPayload;
804 }
805 tryToDequeue() {
806 const { queue, target: target$$1 } = this;
807 if (target$$1 == null || queue.length === 0) {
808 return;
809 }
810 this.queue.forEach(message => {
811 target$$1.postMessage(message, '*');
812 });
813 this.queue.length = 0;
814 }
815 log(message) {
816 if (!this.debug) {
817 return;
818 }
819 // eslint-disable-next-line no-console
820 console.log(`[${this.name} Messenger]: ${message}`);
821 }
822 warn(message) {
823 if (!this.debug) {
824 return;
825 }
826 // eslint-disable-next-line no-console
827 console.warn(`[${this.name} Messenger]: ${message}`);
828 }
829 storeCallback(callback) {
830 // Optimization, so we don’t store a new callback ID for callbacks
831 // we have sent before
832 if (this.callbacksToID.has(callback)) {
833 return this.callbacksToID.get(callback);
834 }
835 const id = `EASDKCallback${this.callbackIndex++}`;
836 this.callbacks[id] = callback;
837 this.callbacksToID.set(callback, id);
838 return id;
839 }
840 normalizePayload(payload) {
841 if (payload == null) {
842 return payload;
843 }
844 if (typeof payload === 'function') {
845 return this.storeCallback(payload);
846 } else if (payload instanceof Array) {
847 return payload.map(newPayload => {
848 return this.normalizePayload(newPayload);
849 });
850 } else if (typeof payload === 'object') {
851 return Object.keys(payload).reduce((newPayload, key) => {
852 newPayload[key] = this.normalizePayload(payload[key]);
853 return newPayload;
854 }, {});
855 } else {
856 return payload;
857 }
858 }
859 handleMessage(event) {
860 if (!this.isFromTargetOrigin(event)) {
861 this.log(`client received ${event.data} from unknown origin ${event.origin}. Expected ${this.targetOrigin}`);
862 return;
863 }
864 this.log(`Received message: ${event.data} from ${event.origin}`);
865 let receivedMessage;
866 try {
867 receivedMessage = JSON.parse(event.data);
868 } catch (error) {
869 // eslint-disable-next-line no-console
870 console.error(`Received received invalid JSON and cannot process the message. ${error} : ${event.data} : ${JSON.stringify(event.data)}`);
871 return;
872 }
873 if (receivedMessage.message === Messenger.Messages.SET_WINDOW_LOCATION) {
874 this.windowLocation = receivedMessage.data;
875 } else {
876 this.invokeCallback(receivedMessage);
877 this.invokeHandler(receivedMessage);
878 }
879 }
880 isFromTargetOrigin({ origin }) {
881 return origin != null && origin === this.targetOrigin;
882 }
883 invokeCallback(receivedMessage) {
884 const callback = this.callbacks[receivedMessage.message];
885 if (typeof callback === 'function') {
886 // eslint-disable-next-line callback-return
887 callback();
888 }
889 }
890 invokeHandler(receivedMessage) {
891 const handler = this.handlers[receivedMessage.message];
892 if (typeof handler === 'function') {
893 handler(receivedMessage.data);
894 }
895 }
896 set windowLocation(location) {
897 window.location = location;
898 }
899}
900Messenger.Messages = Object.freeze({
901 SET_WINDOW_LOCATION: 'Shopify.API.setWindowLocation'
902});
903
904class EASDK {
905 constructor({ apiKey, shopOrigin, debug, forceRedirect }, metadata) {
906 checkFrameRedirect(apiKey, shopOrigin, forceRedirect);
907 this.messenger = new Messenger(window.parent, {
908 'Shopify.API.initialize': data => {
909 if (data && data.User && data.User.current) {
910 this.currentUser = data.User.current;
911 }
912 },
913 'Shopify.API.Modal.close': ({ result, data }) => {
914 this.Modal.callCloseCallback(result, data);
915 }
916 }, {
917 name: 'iframe',
918 targetOrigin: shopOrigin,
919 debug
920 });
921 this.Bar = new Bar(this.messenger);
922 this.Modal = new Modal(this.messenger);
923 this.ResourcePicker = new ResourcePicker(this.messenger, this.Modal);
924 this.messenger.send('Shopify.API.initialize', {
925 apiKey,
926 shopOrigin,
927 metadata,
928 debug,
929 forceRedirect
930 });
931 }
932 startLoading() {
933 this.messenger.send('Shopify.API.Bar.loading.on');
934 }
935 stopLoading() {
936 this.messenger.send('Shopify.API.Bar.loading.off');
937 }
938 showFlashNotice(message, options = {}) {
939 const { error = false } = options;
940 const type = error ? 'Shopify.API.flash.error' : 'Shopify.API.flash.notice';
941 this.messenger.send(type, { message });
942 }
943 pushState(location) {
944 this.messenger.send('Shopify.API.pushState', { location });
945 }
946 redirect(location) {
947 this.messenger.send('Shopify.API.redirect', { location });
948 }
949}
950__decorate([autobind], EASDK.prototype, "startLoading", null);
951__decorate([autobind], EASDK.prototype, "stopLoading", null);
952__decorate([autobind], EASDK.prototype, "showFlashNotice", null);
953__decorate([autobind], EASDK.prototype, "pushState", null);
954__decorate([autobind], EASDK.prototype, "redirect", null);
955function checkFrameRedirect(apiKey, shopOrigin = 'https://myshopify.com', forceRedirect) {
956 if (window !== window.parent) {
957 return;
958 }
959 let redirectUrl = `${shopOrigin}/admin/apps/`;
960 if (apiKey) {
961 redirectUrl = `${redirectUrl}${apiKey}${window.location.pathname}${window.location.search}`;
962 }
963 if (forceRedirect) {
964 window.location.assign(redirectUrl);
965 } else {
966 // eslint-disable-next-line no-console
967 console.warn(`Embedded app was not loaded in an iframe and redirecting is disabled. Set forceRedirect to true and this page will redirect to: ${redirectUrl}`);
968 }
969}
970
971var name = "@combine-labs/combine-polaris";
972var description = "Combine Lab's product component library. Forked from Shopify's Polaris.";
973var version = "0.1.6";
974var license = "MIT";
975var author = "Steve Kaschinske <steve.kaschinske@gmail.com>";
976var homepage = "https://github.com/Combine-Labs/combine-polaris";
977var repository = "https://github.com/Combine-Labs/combine-polaris";
978var publishConfig = {"access":"public"};
979var keywords = ["combine labs","react","components","component library"];
980var main = "index.js";
981var module$1 = "index.es.js";
982var types = "types/index.d.ts";
983var scripts = {"lint":"npm-run-all lint:js lint:css","lint:css":"stylelint './**/*.scss' --max-warnings 0","lint:js":"eslint './**/*.{js,jsx,ts,tsx}' --max-warnings 0 --format codeframe","format":"npm-run-all format:js format:css format:prettier","format:css":"yarn run lint:css --fix","format:js":"yarn run lint:js --fix","format:prettier":"prettier '**/*.{json,md,yml}' --write","ts":"tsc --noEmit","test":"jest --config ./config/jest/config.json","test:coverage":"yarn test --coverage --no-cache","test:ci":"yarn test --runInBand --coverage","test:watch":"yarn test --watch","check":"npm-run-all lint ts test","check:ci":"npm-run-all lint ts test:ci","clean":"rimraf build build-esnext esnext styles types docs 'build-intermediate' 'index.*' 'embedded.js' './src/styles/polaris-tokens' './tophat/.cache' './tophat/assets' 'styles.{css,scss}'","optimize":"node ./scripts/optimize.js","prebuild":"npm-run-all clean optimize copy-polaris-tokens","build":"babel-node ./scripts/build.js","build-shrink-ray":"yarn run copy-polaris-tokens && node ./scripts/build-shrink-ray.js","copy-polaris-tokens":"rimraf ./src/styles/polaris-tokens && shx cp -r ./node_modules/@shopify/polaris-tokens/dist ./src/styles/polaris-tokens","dev":"yarn run copy-polaris-tokens && webpack-dev-server --config ./playground/webpack.config.js --content-base ./playground/ --hot --inline","tophat":"yarn run copy-polaris-tokens && node ./tophat/index.js --watch","test:percy":"node ./tophat/snapshots.js","test:a11y":"node ./scripts/pa11y.js","start":"node ./tophat/index.js","heroku-postbuild":"yarn run copy-polaris-tokens && webpack --config ./tophat/webpack.config.js --output-path ./tophat/assets"};
984var stylelint = {"extends":["stylelint-config-shopify/prettier"],"rules":{"selector-class-pattern":"^[a-zA-Z][a-zA-Z0-9-]+$","selector-pseudo-class-no-unknown":[true,{"ignorePseudoClasses":["global"]}]}};
985var devDependencies = {"@babel/generator":"^7.0.0-beta.51","@babel/parser":"^7.0.0-beta.51","@babel/standalone":"^7.0.0-beta.51","@percy/puppeteer":"^0.3.2","@shopify/js-uploader":"github:shopify/js-uploader","@shopify/polaris-tokens":"^1.2.0","@shopify/react-serialize":"^1.0.6","@types/enzyme":"^3.1.13","@types/jest":"^21.1.2","@types/lodash":"^4.14.108","@types/lodash-decorators":"^4.0.0","@types/node":"^8.10.17","@types/react-helmet":"^5.0.6","@types/react-hot-loader":"^3.0.6","@types/react-router-dom":"^4.2.7","archiver":"^2.1.0","awesome-typescript-loader":"^3.1.3","aws-sdk":"^2.58.0","babel":"^6.23.0","babel-cli":"^6.26.0","babel-core":"^6.26.3","babel-jest":"^21.2.0","babel-loader":"^7.1.2","babel-plugin-transform-jsx-html":"^1.0.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx":"^6.24.1","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-shopify":"^16.2.0","babel-preset-stage-0":"^6.24.1","babel-register":"^6.26.0","chalk":"^2.4.1","change-case":"^3.0.1","codecov":"^3.0.4","copyfiles":"^1.2.0","crypto":"^1.0.1","css-loader":"^0.28.3","cssnano":"^3.10.0","enzyme":"^3.6.0","enzyme-adapter-react-16":"^1.5.0","eslint":"^5.5.0","eslint-plugin-shopify":"^25.0.1","express":"^4.16.3","file-loader":"^1.1.11","fs-extra":"^4.0.2","generic-names":"^1.0.2","glob":"^7.1.2","gray-matter":"^4.0.1","identity-obj-proxy":"^3.0.0","image-webpack-loader":"^3.3.1","in-publish":"^2.0.0","isomorphic-fetch":"^2.2.1","jest":"^21.2.1","node-sass":"^4.5.3","npm-run-all":"^4.0.2","object-hash":"^1.3.0","pa11y":"^5.0.4","postcss":"^6.0.1","postcss-loader":"^2.0.5","postcss-modules-extract-imports":"^1.1.0","postcss-modules-local-by-default":"^1.2.0","postcss-modules-parser":"^1.1.1","postcss-modules-scope":"^1.1.0","postcss-modules-values":"^1.3.0","postcss-shopify":"^1.0.0","prettier":"^1.14.2","puppeteer":"^1.5.0","react":"^16.4.0","react-dom":"^16.4.0","react-helmet":"^5.2.0","react-router-dom":"^4.3.1","react-test-renderer":"^16.3.1","rimraf":"^2.6.1","rollup":"^0.50.0","rollup-plugin-babel":"^3.0.2","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-json":"^2.1.1","rollup-plugin-node-resolve":"^3.0.0","rollup-pluginutils":"^2.0.1","sass-loader":"^7.0.3","sass-resources-loader":"^1.3.3","semver":"^5.4.1","shelljs":"^0.7.7","shx":"^0.2.2","style-loader":"^0.19.0","stylelint":"^9.5.0","stylelint-config-shopify":"^7.0.2","svgo":"^0.7.2","tslint":"^5.8.0","typescript":"^2.9.1","url-loader":"^1.0.1","webpack":"^3.7.1","webpack-bundle-analyzer":"^2.11.1","webpack-dev-server":"^2.9.3","yargs":"^12.0.1"};
986var peerDependencies = {"react":"^16.3.1","react-dom":"^16.3.1"};
987var files = ["esnext","styles","types","docs","index.js","index.es.js","styles.css","styles.scss","embedded.js","embedded.d.ts"];
988var dependencies = {"@shopify/images":"^1.1.0","@shopify/javascript-utilities":"^2.2.0","@shopify/react-compose":"^0.1.6","@shopify/react-html":"^3.0.3","@shopify/react-utilities":"^2.0.3","@types/prop-types":"^15.5.2","@types/react":"16.4.1","@types/react-dom":"^16.0.6","@types/react-transition-group":"^2.0.7","babel-runtime":"^6.23.0","core-js":"^2.5.1","hoist-non-react-statics":"^2.5.0","lodash":"^4.17.4","lodash-decorators":"^4.3.5","prop-types":"^15.6.1","react-transition-group":"^2.3.0","tslib":"^1.8.0"};
989var packageJSON = {
990 name: name,
991 description: description,
992 version: version,
993 license: license,
994 author: author,
995 homepage: homepage,
996 repository: repository,
997 publishConfig: publishConfig,
998 keywords: keywords,
999 main: main,
1000 module: module$1,
1001 types: types,
1002 scripts: scripts,
1003 stylelint: stylelint,
1004 devDependencies: devDependencies,
1005 peerDependencies: peerDependencies,
1006 files: files,
1007 dependencies: dependencies,
1008 "private": false,
1009 "jsnext:main": "index.es.js"
1010};
1011
1012const METADATA = {
1013 interface: {
1014 name: packageJSON.name,
1015 version: packageJSON.version
1016 }
1017};
1018const REPLACE_REGEX = /{([^}]*)}/g;
1019function translate(id, translations, replacements) {
1020 const text = get(translations, id);
1021 if (!text) {
1022 return '';
1023 }
1024 if (replacements) {
1025 return replace(text, REPLACE_REGEX, match => {
1026 const replacement = match.substring(1, match.length - 1);
1027 if (!replacements.hasOwnProperty(replacement)) {
1028 throw new Error(`No replacement found for key '${replacement}'. The following replacements were passed: ${Object.keys(replacements).map(key => `'${key}'`).join(', ')}`);
1029 }
1030 return replacements[replacement];
1031 });
1032 }
1033 return text;
1034}
1035function withAppProvider() {
1036 return function addProvider(WrappedComponent) {
1037 // eslint-disable-next-line react/prefer-stateless-function
1038 class WithProvider extends Component {
1039 render() {
1040 const { polaris, easdk } = this.context;
1041 const polarisContext = Object.assign({}, polaris, { easdk });
1042 if (!polaris) {
1043 throw new Error(`The <AppProvider> component is required as of v2.0 of Polaris React. See
1044 https://polaris.shopify.com/components/structure/app-provider for implementation
1045 instructions.`);
1046 }
1047 return createElement(WrappedComponent, Object.assign({}, this.props, { polaris: polarisContext }));
1048 }
1049 }
1050 WithProvider.contextTypes = WrappedComponent.contextTypes ? merge(WrappedComponent.contextTypes, polarisAppProviderContextTypes) : polarisAppProviderContextTypes;
1051 const FinalComponent = hoistStatics(WithProvider, WrappedComponent);
1052 return FinalComponent;
1053 };
1054}
1055function withSticky() {
1056 return function addStickyManager(WrappedComponent) {
1057 class WithStickyManager extends Component {
1058 constructor(props, context) {
1059 super(props);
1060 this.stickyManager = new StickyManager();
1061 const { polaris, easdk } = context;
1062 this.polarisContext = Object.assign({}, polaris, { stickyManager: this.stickyManager, easdk });
1063 }
1064 getChildContext() {
1065 const _a = this.polarisContext,
1066 { easdk } = _a,
1067 rest = __rest(_a, ["easdk"]);
1068 return {
1069 polaris: rest,
1070 easdk
1071 };
1072 }
1073 render() {
1074 return createElement(WrappedComponent, Object.assign({}, this.props, { polaris: this.polarisContext }));
1075 }
1076 }
1077 WithStickyManager.childContextTypes = polarisAppProviderContextTypes;
1078 WithStickyManager.contextTypes = WrappedComponent.contextTypes ? merge(WrappedComponent.contextTypes, polarisAppProviderContextTypes) : polarisAppProviderContextTypes;
1079 const FinalComponent = hoistStatics(WithStickyManager, WrappedComponent);
1080 return FinalComponent;
1081 };
1082}
1083function createPolarisContext({ i18n, linkComponent, apiKey, shopOrigin, forceRedirect, debug, stickyManager } = {}) {
1084 const intl = new Intl(i18n);
1085 const link = new Link(linkComponent);
1086 const easdk = apiKey && shopOrigin ? new EASDK({
1087 apiKey,
1088 shopOrigin,
1089 forceRedirect,
1090 debug
1091 }, METADATA) : undefined;
1092 return {
1093 polaris: {
1094 intl,
1095 link,
1096 stickyManager: stickyManager || new StickyManager()
1097 },
1098 easdk
1099 };
1100}
1101
1102class AppProvider$1 extends Component {
1103 constructor(props) {
1104 super(props);
1105 this.stickyManager = new StickyManager();
1106 this.polarisContext = createPolarisContext(Object.assign({}, props, { stickyManager: this.stickyManager }));
1107 }
1108 componentDidMount() {
1109 if (document != null) {
1110 this.stickyManager.setContainer(document);
1111 }
1112 }
1113 // eslint-disable-next-line react/no-deprecated
1114 componentWillReceiveProps({ i18n, linkComponent, apiKey, shopOrigin, forceRedirect, debug }) {
1115 if (i18n !== this.props.i18n || linkComponent !== this.props.linkComponent || apiKey !== this.props.apiKey || shopOrigin !== this.props.shopOrigin || forceRedirect !== this.props.forceRedirect || debug !== this.props.debug) {
1116 const stickyManager = this.stickyManager;
1117 this.polarisContext = createPolarisContext({
1118 i18n,
1119 linkComponent,
1120 apiKey,
1121 shopOrigin,
1122 forceRedirect,
1123 debug,
1124 stickyManager
1125 });
1126 }
1127 }
1128 getChildContext() {
1129 return this.polarisContext;
1130 }
1131 render() {
1132 return Children.only(this.props.children);
1133 }
1134}
1135AppProvider$1.childContextTypes = polarisAppProviderContextTypes;
1136
1137var add = {"viewBox":"0 0 20 20","body":"<path d=\"M17 9h-6V3a1 1 0 1 0-2 0v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2\" fill-rule=\"evenodd\"/>"};
1138
1139var alert = {"viewBox":"0 0 20 20","body":"<path d=\"M10 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm-1-8h2V6H9v4zm0 4h2v-2H9v2z\" fill-rule=\"evenodd\"/>"};
1140
1141var arrowDown = {"viewBox":"0 0 20 20","body":"<path d=\"M10.707 17.707l5-5a.999.999 0 1 0-1.414-1.414L11 14.586V3a1 1 0 1 0-2 0v11.586l-3.293-3.293a.999.999 0 1 0-1.414 1.414l5 5a.999.999 0 0 0 1.414 0\" fill-rule=\"evenodd\"/>"};
1142
1143var arrowLeft = {"viewBox":"0 0 20 20","body":"<path d=\"M17 9H5.414l3.293-3.293a.999.999 0 1 0-1.414-1.414l-5 5a.999.999 0 0 0 0 1.414l5 5a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L5.414 11H17a1 1 0 1 0 0-2\" fill-rule=\"evenodd\"/>"};
1144
1145var arrowRight = {"viewBox":"0 0 20 20","body":"<path d=\"M17.707 9.293l-5-5a.999.999 0 1 0-1.414 1.414L14.586 9H3a1 1 0 1 0 0 2h11.586l-3.293 3.293a.999.999 0 1 0 1.414 1.414l5-5a.999.999 0 0 0 0-1.414\" fill-rule=\"evenodd\"/>"};
1146
1147var arrowUp = {"viewBox":"0 0 20 20","body":"<path d=\"M11 17V5.414l3.293 3.293a.999.999 0 1 0 1.414-1.414l-5-5a.999.999 0 0 0-1.414 0l-5 5a.997.997 0 0 0 0 1.414.999.999 0 0 0 1.414 0L9 5.414V17a1 1 0 1 0 2 0\" fill-rule=\"evenodd\"/>"};
1148
1149var arrowUpDown = {"viewBox":"0 0 20 20","body":"<path d=\"M13 8l-3-3-3 3h6zm-.1 4L10 14.9 7.1 12h5.8z\" fill-rule=\"evenodd\"/>"};
1150
1151var calendar = {"viewBox":"0 0 20 20","body":"<path d=\"M4 8h12V6H4v2zm9 4h2v-2h-2v2zm-4 0h2v-2H9v2zm0 4h2v-2H9v2zm-4-4h2v-2H5v2zm0 4h2v-2H5v2zM17 4h-2V3a1 1 0 1 0-2 0v1H7V3a1 1 0 1 0-2 0v1H3a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1z\" fill-rule=\"evenodd\"/>"};
1152
1153var cancel = {"viewBox":"0 0 20 20","body":"<path d=\"M11.414 10l6.293-6.293a.999.999 0 1 0-1.414-1.414L10 8.586 3.707 2.293a.999.999 0 1 0-1.414 1.414L8.586 10l-6.293 6.293a.999.999 0 1 0 1.414 1.414L10 11.414l6.293 6.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L11.414 10z\" fill-rule=\"evenodd\"/>"};
1154
1155var cancelSmall = {"viewBox":"0 0 20 20","body":"<path d=\"M11.414 10l4.293-4.293a.999.999 0 1 0-1.414-1.414L10 8.586 5.707 4.293a.999.999 0 1 0-1.414 1.414L8.586 10l-4.293 4.293a.999.999 0 1 0 1.414 1.414L10 11.414l4.293 4.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L11.414 10z\" fill-rule=\"evenodd\"/>"};
1156
1157var caretDown = {"viewBox":"0 0 20 20","body":"<path d=\"M5 8l5 5 5-5z\" fill-rule=\"evenodd\"/>"};
1158
1159var caretUp = {"viewBox":"0 0 20 20","body":"<path d=\"M15 12l-5-5-5 5z\" />"};
1160
1161var checkmark = {"viewBox":"0 0 20 20","body":"<path d=\"M8.315 13.859l-3.182-3.417a.506.506 0 0 1 0-.684l.643-.683a.437.437 0 0 1 .642 0l2.22 2.393 4.942-5.327a.437.437 0 0 1 .643 0l.643.684a.504.504 0 0 1 0 .683l-5.91 6.35a.437.437 0 0 1-.642 0\"/>"};
1162
1163var chevronDown = {"viewBox":"0 0 20 20","body":"<path d=\"M10 14a.997.997 0 0 1-.707-.293l-5-5a.999.999 0 1 1 1.414-1.414L10 11.586l4.293-4.293a.999.999 0 1 1 1.414 1.414l-5 5A.997.997 0 0 1 10 14\" fill-rule=\"evenodd\"/>"};
1164
1165var chevronLeft = {"viewBox":"0 0 20 20","body":"<path d=\"M12 16a.997.997 0 0 1-.707-.293l-5-5a.999.999 0 0 1 0-1.414l5-5a.999.999 0 1 1 1.414 1.414L8.414 10l4.293 4.293A.999.999 0 0 1 12 16\" fill-rule=\"evenodd\"/>"};
1166
1167var chevronRight = {"viewBox":"0 0 20 20","body":"<path d=\"M8 16a.999.999 0 0 1-.707-1.707L11.586 10 7.293 5.707a.999.999 0 1 1 1.414-1.414l5 5a.999.999 0 0 1 0 1.414l-5 5A.997.997 0 0 1 8 16\" fill-rule=\"evenodd\"/>"};
1168
1169var chevronUp = {"viewBox":"0 0 20 20","body":"<path d=\"M15 13a.997.997 0 0 1-.707-.293L10 8.414l-4.293 4.293a.999.999 0 1 1-1.414-1.414l5-5a.999.999 0 0 1 1.414 0l5 5A.999.999 0 0 1 15 13\" fill-rule=\"evenodd\"/>"};
1170
1171var circleCancel = {"viewBox":"0 0 20 20","body":"<path d=\"M14.242 12.829l-1.414 1.414L10 11.413l-2.828 2.83-1.414-1.414 2.828-2.83-2.828-2.827 1.414-1.414L10 8.586l2.828-2.828 1.414 1.414L11.414 10l2.828 2.829zM10 1.999A8 8 0 1 0 10 18a8 8 0 0 0 0-16z\" fill-rule=\"evenodd\"/>"};
1172
1173var circleChevronDown = {"viewBox":"0 0 20 20","body":"<path d=\"M10 13.414L5.293 8.707l1.414-1.414L10 10.586l3.293-3.293 1.414 1.414L10 13.414zM10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\" fill-rule=\"evenodd\"/>"};
1174
1175var circleChevronLeft = {"viewBox":"0 0 20 20","body":"<path d=\"M11.293 5.293l1.414 1.414L9.414 10l3.293 3.293-1.414 1.414L6.586 10l4.707-4.707zM10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\" fill-rule=\"evenodd\"/>"};
1176
1177var circleChevronRight = {"viewBox":"0 0 20 20","body":"<path d=\"M8.707 14.707l-1.414-1.414L10.586 10 7.293 6.707l1.414-1.414L13.414 10l-4.707 4.707zM10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16z\" fill-rule=\"evenodd\"/>"};
1178
1179var circleChevronUp = {"viewBox":"0 0 20 20","body":"<path d=\"M14.707 11.293l-1.414 1.414L10 9.414l-3.293 3.293-1.414-1.414L10 6.586l4.707 4.707zM18 10a8 8 0 1 0-16 0 8 8 0 0 0 16 0z\" fill-rule=\"evenodd\"/>"};
1180
1181var circleInformation = {"viewBox":"0 0 20 20","body":"<path d=\"M19 10c0 4.971-4.029 9-9 9s-9-4.029-9-9 4.029-9 9-9 9 4.029 9 9z\" fill=\"currentColor\"/><path d=\"M10 0C4.486 0 0 4.486 0 10s4.486 10 10 10 10-4.486 10-10S15.514 0 10 0zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8zm1-5v-3a1 1 0 0 0-1-1H9a1 1 0 1 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2zm-1-5.9a1.1 1.1 0 1 0 0-2.2 1.1 1.1 0 0 0 0 2.2z\" />"};
1182
1183var circlePlus = {"viewBox":"0 0 20 20","body":"<path d=\"M15 11h-4v4H9v-4H5V9h4V5h2v4h4v2zm-5-9a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\" fill-rule=\"evenodd\"/>"};
1184
1185var conversation = {"viewBox":"0 0 20 20","body":"<path d=\"M13 11h2V9h-2v2zm-4 0h2V9H9v2zm-4 0h2V9H5v2zm5-9c-4.411 0-8 3.589-8 8 0 1.504.425 2.908 1.15 4.111l-1.069 2.495a1 1 0 0 0 1.314 1.313l2.494-1.069A7.939 7.939 0 0 0 10 18c4.411 0 8-3.589 8-8s-3.589-8-8-8z\" fill-rule=\"evenodd\"/>"};
1186
1187var deleteIcon = {"viewBox":"0 0 20 20","body":"<path d=\"M16 6H4a1 1 0 1 0 0 2h1v9a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V8h1a1 1 0 1 0 0-2zM9 4a1 1 0 1 1 0-2h2a1 1 0 1 1 0 2H9zm2 12h2V8h-2v8zm-4 0h2V8H7v8z\" fill-rule=\"evenodd\"/>"};
1188
1189var disable = {"viewBox":"0 0 20 20","body":"<path d=\"M10 16a5.961 5.961 0 0 1-3.471-1.115l8.356-8.356A5.961 5.961 0 0 1 16 10c0 3.309-2.691 6-6 6m0-12c1.294 0 2.49.416 3.471 1.115l-8.356 8.356A5.961 5.961 0 0 1 4 10c0-3.309 2.691-6 6-6m0-2c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8\" fill-rule=\"evenodd\"/>"};
1190
1191var dispute = {"viewBox":"0 0 20 20","body":"<path d=\"M9 10h2V6H9v4zm0 4h2v-2H9v2zm-7-4c0 4.411 3.589 8 8 8a7.939 7.939 0 0 0 4.111-1.15l2.494 1.069a1 1 0 0 0 1.314-1.313l-1.069-2.495A7.939 7.939 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8z\" fill-rule=\"evenodd\"/>"};
1192
1193var duplicate = {"viewBox":"0 0 20 20","body":"<path d=\"M8 12h8V4H8v8zm4 4H4V8h2v5a1 1 0 0 0 1 1h5v2zm5-14H7a1 1 0 0 0-1 1v3H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-3h3a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1z\" fill-rule=\"evenodd\"/>"};
1194
1195var embed = {"viewBox":"0 0 20 20","body":"<path d=\"M17 13a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-3a1 1 0 1 1 2 0v2h12v-2a1 1 0 0 1 1-1zm0-11a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0V4H4v2a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1h14zm.555 7.168a1.001 1.001 0 0 1 0 1.664l-3 2a1 1 0 0 1-1.109-1.664L15.198 10l-1.752-1.168a1 1 0 1 1 1.109-1.664l3 2zM6.832 7.445a1 1 0 0 1-.277 1.387L4.803 10l1.752 1.168a1 1 0 1 1-1.11 1.664l-3-2a1.001 1.001 0 0 1 0-1.664l3-2a1 1 0 0 1 1.387.277zM9 14.001a1 1 0 0 1-.948-1.317l2-6a1 1 0 0 1 1.896.633l-2 6A.999.999 0 0 1 9 14z\" fill-rule=\"evenodd\"/>"};
1196
1197var exportIcon = {"viewBox":"0 0 20 20","body":"<path d=\"M13.707 6.707a.997.997 0 0 1-1.414 0L11 5.414V13a1 1 0 1 1-2 0V5.414L7.707 6.707a.999.999 0 1 1-1.414-1.414l3-3a.999.999 0 0 1 1.414 0l3 3a.999.999 0 0 1 0 1.414zM17 18H3a1 1 0 1 1 0-2h14a1 1 0 1 1 0 2z\"/>"};
1198
1199var external = {"viewBox":"0 0 20 20","body":"<path d=\"M17 2a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0V5.414l-7.293 7.293a.997.997 0 0 1-1.414 0 .999.999 0 0 1 0-1.414L14.586 4H13a1 1 0 1 1 0-2h4zm-4 9a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2H4v8h8v-4a1 1 0 0 1 1-1z\" fill-rule=\"evenodd\"/>"};
1200
1201var help = {"viewBox":"0 0 20 20","body":"<circle cx=\"10\" cy=\"10\" r=\"9\" fill=\"currentColor\"/><path d=\"M10 0C4.486 0 0 4.486 0 10s4.486 10 10 10 10-4.486 10-10S15.514 0 10 0m0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8m0-4a1 1 0 1 0 0 2 1 1 0 1 0 0-2m0-10C8.346 4 7 5.346 7 7a1 1 0 1 0 2 0 1.001 1.001 0 1 1 1.591.808C9.58 8.548 9 9.616 9 10.737V11a1 1 0 1 0 2 0v-.263c0-.653.484-1.105.773-1.317A3.013 3.013 0 0 0 13 7c0-1.654-1.346-3-3-3\" />"};
1202
1203var horizontalDots = {"viewBox":"0 0 20 20","body":"<path d=\"M6 10a2 2 0 1 1-4.001-.001A2 2 0 0 1 6 10zm6 0a2 2 0 1 1-4.001-.001A2 2 0 0 1 12 10zm6 0a2 2 0 1 1-4.001-.001A2 2 0 0 1 18 10z\" fill-rule=\"evenodd\"/>"};
1204
1205var importIcon = {"viewBox":"0 0 20 20","body":"<path d=\"M9.293 13.707l-3-3a.999.999 0 1 1 1.414-1.414L9 10.586V3a1 1 0 1 1 2 0v7.586l1.293-1.293a.999.999 0 1 1 1.414 1.414l-3 3a.999.999 0 0 1-1.414 0zM17 16a1 1 0 1 1 0 2H3a1 1 0 1 1 0-2h14z\"/>"};
1206
1207var menu = {"viewBox":"0 0 32 32","body":"<path d=\"M30.4 17.6H1.6a1.6 1.6 0 1 1 0-3.2h28.8a1.6 1.6 0 1 1 0 3.2zm0-11.2H1.6a1.6 1.6 0 1 1 0-3.2h28.8a1.6 1.6 0 1 1 0 3.2zm0 22.4H1.6a1.6 1.6 0 1 1 0-3.2h28.8a1.6 1.6 0 1 1 0 3.2z\"/>"};
1208
1209var notes = {"viewBox":"0 0 20 20","body":"<path d=\"M6 11h8V9H6v2zm0 4h8v-2H6v2zm0-8h4V5H6v2zm9.707-1.707l-3-3A.996.996 0 0 0 12 2H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V6a.997.997 0 0 0-.293-.707z\" fill-rule=\"evenodd\"/>"};
1210
1211var notification = {"viewBox":"0 0 20 20","body":"<path d=\"M16 8c0-2.967-2.167-5.432-5-5.91V1a1 1 0 1 0-2 0v1.09C6.167 2.568 4 5.033 4 8c0 2.957 0 4.586-1.707 6.293A1 1 0 0 0 3 16h4.183A2.909 2.909 0 0 0 7 17c0 1.654 1.345 3 3 3s3-1.346 3-3c0-.353-.07-.687-.184-1H17a1 1 0 0 0 .707-1.707C16 12.586 16 10.957 16 8zM5.011 14C6 12.208 6 10.285 6 8c0-2.206 1.794-4 4-4s4 1.794 4 4c0 2.285 0 4.208.989 6H5.011zM11 17a1.001 1.001 0 0 1-2 0 1 1 0 0 1 2 0z\"/>"};
1212
1213var print = {"viewBox":"0 0 20 20","body":"<path d=\"M14 11h2V9h-2v2zM7 7h6V4H7v3zm0 9h6v-2H7v2zm10-9h-2V3a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v4H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2v1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h2a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1z\" fill-rule=\"evenodd\"/>"};
1214
1215var subtract = {"viewBox":"0 0 20 20","body":"<path d=\"M15 9H5a1 1 0 1 0 0 2h10a1 1 0 1 0 0-2\" fill-rule=\"evenodd\"/>"};
1216
1217var refresh = {"viewBox":"0 0 20 20","body":"<path d=\"M17 11a1 1 0 0 1 1 1c0 1.654-1.346 3-3 3H5.414l1.293 1.293a.999.999 0 1 1-1.414 1.414l-3-3a.999.999 0 0 1 0-1.414l3-3a.999.999 0 1 1 1.414 1.414L5.414 13H15c.552 0 1-.449 1-1a1 1 0 0 1 1-1zM3 9a1 1 0 0 1-1-1c0-1.654 1.346-3 3-3h9.586l-1.293-1.293a.999.999 0 1 1 1.414-1.414l3 3a.999.999 0 0 1 0 1.414l-3 3a.997.997 0 0 1-1.414 0 .999.999 0 0 1 0-1.414L14.586 7H5c-.552 0-1 .449-1 1a1 1 0 0 1-1 1z\" fill-rule=\"evenodd\"/>"};
1218
1219var risk = {"viewBox":"0 0 20 20","body":"<path d=\"M9 12h2V8H9v4zm0 4h2v-2H9v2zm8.895.509l-7-14c-.339-.678-1.451-.678-1.79 0l-7 14A.999.999 0 0 0 3 17.956h14a1.001 1.001 0 0 0 .895-1.447z\" fill-rule=\"evenodd\"/>"};
1220
1221var save = {"viewBox":"0 0 20 20","body":"<path d=\"M17 4h-3a1 1 0 1 0 0 2h2v10H4V4h3.586L9 5.414v5.172L7.707 9.293a1 1 0 0 0-1.414 1.414l3 3a.996.996 0 0 0 1.414 0l3-3a1 1 0 0 0-1.414-1.414L11 10.586V5a.997.997 0 0 0-.293-.707l-2-2A.994.994 0 0 0 8 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1z\"/>"};
1222
1223var search = {"viewBox":"0 0 20 20","body":"<path d=\"M8 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8m9.707 4.293l-4.82-4.82A5.968 5.968 0 0 0 14 8 6 6 0 0 0 2 8a6 6 0 0 0 6 6 5.968 5.968 0 0 0 3.473-1.113l4.82 4.82a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414\" fill-rule=\"evenodd\"/>"};
1224
1225var view = {"viewBox":"0 0 20 20","body":"<path d=\"M17.928 9.628C17.836 9.399 15.611 4 9.999 4S2.162 9.399 2.07 9.628a1.017 1.017 0 0 0 0 .744C2.162 10.601 4.387 16 9.999 16s7.837-5.399 7.929-5.628a1.017 1.017 0 0 0 0-.744zM9.999 14a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6A2 2 0 1 0 10 12.001 2 2 0 0 0 10 8z\"/>"};
1226
1227var edit = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjAgMjAiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTUgMTcuNTg2TDEzLjkxNCAxNi41bC43OTMtLjc5M2EuOTk5Ljk5OSAwIDEgMC0xLjQxNC0xLjQxNGwtLjc5My43OTNMMTEuNDE0IDE0IDE0IDExLjQxNCAxNy41ODYgMTUgMTUgMTcuNTg2ek0zLjQzNyAxNC44NTJsMS43MTEgMS43MTEtMi41NjcuODU2Ljg1Ni0yLjU2N3pNNC45MTQgNy41bC43OTMtLjc5M2EuOTk5Ljk5OSAwIDEgMC0xLjQxNC0xLjQxNGwtLjc5My43OTNMMi40MTQgNSA1IDIuNDE0IDguNTg2IDYgNiA4LjU4NiA0LjkxNCA3LjV6bTEyLjU1MS00Ljk2NWExLjgzIDEuODMgMCAwIDEgMCAyLjU4NkwxNyA1LjU4NiAxNC40MTQgM2wuNDY1LS40NjVhMS44MyAxLjgzIDAgMCAxIDIuNTg2IDB6TTQuNDE1IDEzTDEzIDQuNDE0IDE1LjU4NiA3IDcgMTUuNTg2IDQuNDE0IDEzem0xNS4yOTIgMS4yOTNMMTUuNDE0IDEwbDMu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QxNCAxLjQxNEwxMCAxMS40MTRsMi4yOTMgMi4yOTNhLjk5Ny45OTcgMCAwIDAgMS40MTQgMCAuOTk5Ljk5OSAwIDAgMCAwLTEuNDE0TDExLjQxNCAxMGwyLjI5My0yLjI5M2EuOTk5Ljk5OSAwIDAgMCAwLTEuNDE0Ii8+PC9nPjwvc3ZnPgo=';
1288
1289var requestChanges = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZD0iTTcuNCA4LjAxNWMzLjEuMDQ3IDQuMzU1LjIzMiA1LjY0NC44MjdDMTUuMTE2IDkuNzk4IDE2IDExLjcwOSAxNiAxNWExIDEgMCAwIDEtMiAwYzAtNC4wMzUtLjc3OS00Ljg0Ny02LjU2NC00Ljk3OGwyLjI3MSAyLjI3YTEgMSAwIDEgMS0xLjQxNCAxLjQxNWwtNC00YTEgMSAwIDAgMSAwLTEuNDE0bDQtNGExIDEgMCAwIDEgMS40MTQgMS40MTRMNy40IDguMDE1eiIvPjwvc3ZnPgo=';
1290
1291var styles$3 = {
1292 "Icon": "p_uo",
1293 "hasBackdrop": "p_g1",
1294 "isColored": "p_zk",
1295 "colorWhite": "p_f6",
1296 "colorBlack": "p_i7",
1297 "colorSkyLighter": "p_gx",
1298 "colorSkyLight": "p_n7",
1299 "colorSky": "p_q9",
1300 "colorSkyDark": "p_jb",
1301 "colorInkLightest": "p_hr",
1302 "colorInkLighter": "p_r6",
1303 "colorInkLight": "p_wa",
1304 "colorInk": "p_v0",
1305 "colorBlueLighter": "p_nu",
1306 "colorBlueLight": "p_ax",
1307 "colorBlue": "p_le",
1308 "colorBlueDark": "p_d2",
1309 "colorBlueDarker": "p_rv",
1310 "colorIndigoLighter": "p_c9",
1311 "colorIndigoLight": "p_od",
1312 "colorIndigo": "p_l8",
1313 "colorIndigoDark": "p_o4",
1314 "colorIndigoDarker": "p_g4",
1315 "colorTealLighter": "p_wn",
1316 "colorTealLight": "p_g0",
1317 "colorTeal": "p_j2",
1318 "colorTealDark": "p_rb",
1319 "colorTealDarker": "p_vy",
1320 "colorGreenLighter": "p_xn",
1321 "colorGreen": "p_zv",
1322 "colorGreenDark": "p_l1",
1323 "colorYellowLighter": "p_zm",
1324 "colorYellow": "p_d6",
1325 "colorYellowDark": "p_hu",
1326 "colorOrange": "p_qq",
1327 "colorOrangeDark": "p_m2",
1328 "colorRedLighter": "p_u2",
1329 "colorRed": "p_op",
1330 "colorRedDark": "p_mu",
1331 "colorPurple": "p_nz",
1332 "Svg": "p_f7",
1333 "Placeholder": "p_sh",
1334};
1335
1336const BUNDLED_ICONS = {
1337 add,
1338 alert,
1339 arrowDown,
1340 arrowLeft,
1341 arrowRight,
1342 arrowUp,
1343 arrowUpDown,
1344 calendar,
1345 cancel,
1346 cancelSmall,
1347 caretDown,
1348 caretUp,
1349 checkmark,
1350 chevronDown,
1351 chevronLeft,
1352 chevronRight,
1353 chevronUp,
1354 circleCancel,
1355 circleChevronDown,
1356 circleChevronLeft,
1357 circleChevronRight,
1358 circleChevronUp,
1359 circleInformation,
1360 circlePlus,
1361 conversation,
1362 delete: deleteIcon,
1363 disable,
1364 dispute,
1365 duplicate,
1366 embed,
1367 export: exportIcon,
1368 external,
1369 help,
1370 horizontalDots,
1371 import: importIcon,
1372 menu,
1373 notes,
1374 notification,
1375 print,
1376 refresh,
1377 risk,
1378 save,
1379 search,
1380 subtract,
1381 view,
1382 edit,
1383 checkmarkLarge,
1384 clock,
1385 notificationCircle,
1386 activity,
1387 location,
1388 misc,
1389 person,
1390 tag,
1391 warning,
1392 mail,
1393 phone,
1394 attentionFilled,
1395 circleCheckmark,
1396 circleInformationFilled,
1397 property,
1398 date,
1399 dateStart,
1400 dateEnd,
1401 breakOption,
1402 areaSales,
1403 areaGross,
1404 warningCircle,
1405 warningTriangle,
1406 comment,
1407 landlord,
1408 draft,
1409 inApprovals,
1410 executed,
1411 completed,
1412 failed,
1413 requestChanges
1414};
1415const COLORS_WITH_BACKDROPS = ['teal', 'tealDark', 'greenDark', 'redDark', 'yellowDark', 'ink', 'inkLighter', 'inkLightest'];
1416function Icon$1({ source, color, backdrop, accessibilityLabel, polaris: { intl } }) {
1417 if (color && backdrop && COLORS_WITH_BACKDROPS.indexOf(color) < 0) {
1418 // eslint-disable-next-line no-console
1419 console.warn(intl.translate('Polaris.Icon.backdropWarning', {
1420 color,
1421 colorsWithBackDrops: COLORS_WITH_BACKDROPS.join(', ')
1422 }));
1423 }
1424 const className = classNames$1(styles$3.Icon, color && styles$3[variationName$1('color', color)], color && color !== 'white' && styles$3.isColored, backdrop && styles$3.hasBackdrop);
1425 let contentMarkup;
1426 if (source === 'placeholder') {
1427 contentMarkup = createElement('div', { className: styles$3.Placeholder });
1428 } else {
1429 const iconSource = typeof source === 'string' ? BUNDLED_ICONS[source] : source;
1430 contentMarkup = iconSource && iconSource.viewBox && iconSource.body && createElement('svg', { className: styles$3.Svg, viewBox: iconSource.viewBox, dangerouslySetInnerHTML: { __html: iconSource.body }, focusable: 'false', 'aria-hidden': 'true' });
1431 }
1432 return createElement(
1433 'span',
1434 { className: className, 'aria-label': accessibilityLabel },
1435 contentMarkup
1436 );
1437}
1438var Icon$2 = withAppProvider()(Icon$1);
1439
1440const scrollable = {
1441 props: { 'data-polaris-scrollable': true },
1442 selector: '[data-polaris-scrollable]'
1443};
1444const overlay = {
1445 props: { 'data-polaris-overlay': true },
1446 selector: '[data-polaris-overlay]'
1447};
1448const layer = {
1449 props: { 'data-polaris-layer': true },
1450 selector: '[data-polaris-layer]'
1451};
1452const unstyled = {
1453 props: { 'data-polaris-unstyled': true },
1454 selector: '[data-polaris-unstyled]'
1455};
1456// these match our values in duration.scss
1457var Duration;
1458(function (Duration) {
1459 Duration[Duration["Instant"] = 0] = "Instant";
1460 Duration[Duration["Fast"] = 100] = "Fast";
1461 Duration[Duration["Base"] = 200] = "Base";
1462 Duration[Duration["Slow"] = 300] = "Slow";
1463 Duration[Duration["Slower"] = 400] = "Slower";
1464 Duration[Duration["Slowest"] = 500] = "Slowest";
1465})(Duration || (Duration = {}));
1466
1467const { Provider, Consumer } = createContext({
1468 forwardedRef: null
1469});
1470
1471function withRef$1() {
1472 return function addForwardRef(WrappedComponent) {
1473 // eslint-disable-next-line react/prefer-stateless-function
1474 class WithRef extends Component {
1475 render() {
1476 return createElement(
1477 Consumer,
1478 null,
1479 ctx => createElement(WrappedComponent, Object.assign({}, this.props, { ref: ctx.forwardedRef }))
1480 );
1481 }
1482 }
1483 const FinalComponent = hoistStatics(WithRef, WrappedComponent);
1484 return FinalComponent;
1485 };
1486}
1487
1488// eslint-disable-next-line shopify/strict-component-boundaries
1489function compose$1(...wrappingFunctions) {
1490 return function wrapComponent(OriginalComponent) {
1491 const Result = compose(...wrappingFunctions)(OriginalComponent);
1492 return forwardRef((props, ref) => {
1493 return createElement(
1494 Provider,
1495 { value: { forwardedRef: ref } },
1496 createElement(Result, props)
1497 );
1498 });
1499 };
1500}
1501
1502class UnstyledLink$1 extends PureComponent {
1503 render() {
1504 const _a = this.props,
1505 { polaris, external, url } = _a,
1506 rest = __rest(_a, ["polaris", "external", "url"]);
1507 if (polaris && polaris.link) {
1508 const LinkComponent = polaris.link.getLinkComponent();
1509 if (LinkComponent) {
1510 const _b = this.props,
1511 { polaris } = _b,
1512 rest = __rest(_b, ["polaris"]);
1513 return createElement(LinkComponent, Object.assign({}, unstyled.props, rest));
1514 }
1515 }
1516 const target$$1 = external ? '_blank' : undefined;
1517 const rel = external ? 'noopener noreferrer' : undefined;
1518 return createElement('a', Object.assign({ target: target$$1 }, rest, { href: url, rel: rel }, unstyled.props));
1519 }
1520}
1521var UnstyledLink$2 = compose$1(withAppProvider(), withRef$1())(UnstyledLink$1);
1522
1523var styles$4 = {
1524 "VisuallyHidden": "p_bb",
1525};
1526
1527function VisuallyHidden$1({ children }) {
1528 return createElement(
1529 'span',
1530 { className: styles$4.VisuallyHidden },
1531 children
1532 );
1533}
1534
1535var styles$5 = {
1536 "Badge": "p_cf",
1537 "Pip": "p_f3",
1538 "statusSuccess": "p_mn",
1539 "statusInfo": "p_sf",
1540 "statusAttention": "p_ee",
1541 "statusWarning": "p_ny",
1542 "statusDanger": "p_cy",
1543 "statusNew": "p_lx",
1544 "progressIncomplete": "p_ci",
1545 "progressPartiallyComplete": "p_rt",
1546 "progressComplete": "p_lw",
1547 "Icon": "p_qn",
1548 "hasIcon": "p_pk",
1549};
1550
1551const PROGRESS_LABELS = {
1552 incomplete: 'incomplete',
1553 partiallyComplete: 'partiallyComplete',
1554 complete: 'complete'
1555};
1556const STATUS_LABELS = {
1557 info: 'info',
1558 success: 'success',
1559 warning: 'warning',
1560 attention: 'attention',
1561 new: 'new',
1562 danger: 'danger'
1563};
1564function Badge$1({ children, status, progress, icon, polaris: { intl } }) {
1565 const className = classNames$1(styles$5.Badge, status && styles$5[variationName$1('status', status)], progress && styles$5[variationName$1('progress', progress)], icon && styles$5.hasIcon);
1566 let progressMarkup;
1567 switch (progress) {
1568 case PROGRESS_LABELS.incomplete:
1569 progressMarkup = intl.translate('Polaris.Badge.PROGRESS_LABELS.incomplete');
1570 break;
1571 case PROGRESS_LABELS.partiallyComplete:
1572 progressMarkup = intl.translate('Polaris.Badge.PROGRESS_LABELS.partiallyComplete');
1573 break;
1574 case PROGRESS_LABELS.complete:
1575 progressMarkup = intl.translate('Polaris.Badge.PROGRESS_LABELS.complete');
1576 break;
1577 }
1578 const pipMarkup = progress ? createElement(
1579 'span',
1580 { className: styles$5.Pip },
1581 createElement(
1582 VisuallyHidden$1,
1583 null,
1584 progressMarkup
1585 )
1586 ) : null;
1587 const iconMarkup = icon ? createElement(
1588 'span',
1589 { className: styles$5.Icon },
1590 createElement(Icon$2, { source: icon })
1591 ) : null;
1592 let statusMarkup;
1593 switch (status) {
1594 case STATUS_LABELS.info:
1595 statusMarkup = intl.translate('Polaris.Badge.STATUS_LABELS.info');
1596 break;
1597 case STATUS_LABELS.success:
1598 statusMarkup = intl.translate('Polaris.Badge.STATUS_LABELS.success');
1599 break;
1600 case STATUS_LABELS.warning:
1601 statusMarkup = intl.translate('Polaris.Badge.STATUS_LABELS.warning');
1602 break;
1603 case STATUS_LABELS.attention:
1604 statusMarkup = intl.translate('Polaris.Badge.STATUS_LABELS.attention');
1605 break;
1606 case STATUS_LABELS.danger:
1607 statusMarkup = intl.translate('Polaris.Badge.STATUS_LABELS.danger');
1608 break;
1609 case STATUS_LABELS.new:
1610 statusMarkup = intl.translate('Polaris.Badge.STATUS_LABELS.new');
1611 break;
1612 }
1613 const statusLabelMarkup = status ? createElement(
1614 VisuallyHidden$1,
1615 null,
1616 statusMarkup
1617 ) : null;
1618 return createElement(
1619 'span',
1620 { className: className },
1621 statusLabelMarkup,
1622 pipMarkup,
1623 iconMarkup,
1624 children
1625 );
1626}
1627var Badge$2 = withAppProvider()(Badge$1);
1628
1629var styles$6 = {
1630 "ActionList": "p_ah",
1631 "Section-withoutTitle": "p_hh",
1632 "Actions": "p_ca",
1633 "Section": "p_w3",
1634 "Title": "p_n9",
1635 "Item": "p_wo",
1636 "destructive": "p_jy",
1637 "disabled": "p_er",
1638 "Image": "p_bj",
1639 "Content": "p_qx",
1640 "Text": "p_nr",
1641 "BadgeWrapper": "p_do",
1642};
1643
1644function Item$1({ badge, content, url, onAction, icon, iconColor, image, disabled, external, destructive, ellipsis }) {
1645 const className = classNames(styles$6.Item, disabled && styles$6.disabled, destructive && styles$6.destructive);
1646 let imageElement = null;
1647 if (icon) {
1648 imageElement = createElement(
1649 'div',
1650 { className: styles$6.Image },
1651 createElement(Icon$2, { source: icon, color: iconColor })
1652 );
1653 } else if (image) {
1654 imageElement = createElement('div', { role: 'presentation', className: styles$6.Image, style: { backgroundImage: `url(${image}` } });
1655 }
1656 const contentMarkup = ellipsis && content ? `${content}…` : content;
1657 const badgeMarkup = badge && createElement(
1658 'span',
1659 { className: styles$6.BadgeWrapper },
1660 createElement(
1661 Badge$2,
1662 { status: badge.status },
1663 badge.content
1664 )
1665 );
1666 const textMarkup = imageElement ? createElement(
1667 'div',
1668 { className: styles$6.Text },
1669 contentMarkup
1670 ) : contentMarkup;
1671 const contentElement = createElement(
1672 'div',
1673 { className: styles$6.Content },
1674 imageElement,
1675 textMarkup,
1676 badgeMarkup
1677 );
1678 const control = url ? createElement(
1679 UnstyledLink$2,
1680 { url: url, onClick: onAction, className: styles$6.Item, external: external },
1681 contentElement
1682 ) : createElement(
1683 'button',
1684 { onClick: onAction, className: className, disabled: disabled, type: 'button' },
1685 contentElement
1686 );
1687 return createElement(
1688 'li',
1689 null,
1690 control
1691 );
1692}
1693
1694function Section$1({ section, hasMultipleSections, onActionAnyItem }) {
1695 const handleAction = itemOnAction => {
1696 return () => {
1697 if (itemOnAction) {
1698 itemOnAction();
1699 }
1700 if (onActionAnyItem) {
1701 onActionAnyItem();
1702 }
1703 };
1704 };
1705 const actionMarkup = section.items.map((_a, index) => {
1706 var { content, onAction } = _a,
1707 item = __rest(_a, ["content", "onAction"]);
1708 return createElement(Item$1, Object.assign({ key: `${content}-${index}`, content: content, onAction: handleAction(onAction) }, item));
1709 });
1710 const className = section.title ? null : styles$6['Section-withoutTitle'];
1711 const titleMarkup = section.title ? createElement(
1712 'p',
1713 { className: styles$6.Title },
1714 section.title
1715 ) : null;
1716 const sectionMarkup = createElement(
1717 'div',
1718 { className: className },
1719 titleMarkup,
1720 createElement(
1721 'ul',
1722 { className: styles$6.Actions },
1723 actionMarkup
1724 )
1725 );
1726 return hasMultipleSections ? createElement(
1727 'li',
1728 { className: styles$6.Section },
1729 sectionMarkup
1730 ) : sectionMarkup;
1731}
1732
1733function ActionList$1({ items, sections = [], onActionAnyItem }) {
1734 let finalSections = [];
1735 if (items) {
1736 finalSections = [{ items }, ...sections];
1737 } else if (sections) {
1738 finalSections = sections;
1739 }
1740 const hasMultipleSections = finalSections.length > 1;
1741 const Element = hasMultipleSections ? 'ul' : 'div';
1742 const sectionMarkup = finalSections.map((section, index) => {
1743 return createElement(Section$1, { key: section.title || index, section: section, onActionAnyItem: onActionAnyItem, hasMultipleSections: hasMultipleSections });
1744 });
1745 return createElement(
1746 Element,
1747 { className: styles$6.ActionList },
1748 sectionMarkup
1749 );
1750}
1751
1752function Image$1(_a) {
1753 var { sourceSet, source, crossOrigin } = _a,
1754 rest = __rest(_a, ["sourceSet", "source", "crossOrigin"]);
1755 const finalSourceSet = sourceSet ? sourceSet.map(({ source: subSource, descriptor }) => `${subSource} ${descriptor}`).join(',') : null;
1756 return finalSourceSet ?
1757 // eslint-disable-next-line jsx-a11y/alt-text
1758 createElement("img", Object.assign({ src: source, srcSet: finalSourceSet, crossOrigin: crossOrigin }, rest)) :
1759 // eslint-disable-next-line jsx-a11y/alt-text
1760 createElement("img", Object.assign({ src: source }, rest, { crossOrigin: crossOrigin }));
1761}
1762
1763var styles$7 = {
1764 "Avatar": "p_lb",
1765 "sizeExtraSmall": "p_yr",
1766 "sizeSmall": "p_rx",
1767 "sizeMedium": "p_xt",
1768 "sizeLarge": "p_fz",
1769 "styleOne": "p_n3",
1770 "styleTwo": "p_ry",
1771 "styleThree": "p_ld",
1772 "styleFour": "p_wm",
1773 "styleFive": "p_a6",
1774 "styleSix": "p_dr",
1775 "hasImage": "p_qp",
1776 "Image": "p_ed",
1777 "Initials": "p_qj",
1778 "Svg": "p_p0",
1779};
1780
1781var avatar1 = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSIjMjQ1YjQ4IiBkPSJNMCAwaDEwMHYxMDBIMHoiLz48cGF0aCBmaWxsPSIjMmRiMTY3IiBkPSJNNjkgMHY2NS42NWwtMi0uMDF2MTkuODVsMiAuMDJWMTAwSDBWMGg2OXoiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNNjcgNjUuNjR2MTkuODVsLTI1LjU3LS4xOUMzMiA4NS4yMiAyNS42IDgxLjQ2I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Two: avatar2,
1804 avatarThree: avatar3,
1805 avatarFour: avatar4,
1806 avatarFive: avatar5,
1807 avatarSix: avatar6,
1808 avatarSeven: avatar7,
1809 avatarEight: avatar8,
1810 avatarNine: avatar9
1811});
1812
1813const STYLE_CLASSES = ['one', 'two', 'three', 'four', 'five', 'six'];
1814const AVATAR_IMAGES = Object.keys(avatars).map(key => avatars[key]);
1815function Avatar$1({ name, source, initials, customer, size = 'medium', accessibilityLabel, polaris: { intl } }) {
1816 const nameString = name || initials;
1817 let finalSource;
1818 let label;
1819 if (accessibilityLabel) {
1820 label = accessibilityLabel;
1821 } else if (name) {
1822 label = name;
1823 } else if (initials) {
1824 const splitInitials = initials.split('').join(' ');
1825 label = intl.translate('Polaris.Avatar.labelWithInitials', {
1826 initials: splitInitials
1827 });
1828 } else {
1829 label = intl.translate('Polaris.Avatar.label');
1830 }
1831 if (source) {
1832 finalSource = source;
1833 } else if (customer) {
1834 finalSource = customerPlaceholder(nameString);
1835 }
1836 const className = classNames$1(styles$7.Avatar, styles$7[variationName$1('style', styleClass(nameString))], size && styles$7[variationName$1('size', size)], finalSource && styles$7.hasImage);
1837 const imageMarkUp = finalSource ? createElement(Image$1, { className: styles$7.Image, source: finalSource, alt: '', role: 'presentation' }) : null;
1838 // Use `dominant-baseline: central` instead of `dy` when Edge supports it.
1839 const verticalOffset = '0.35em';
1840 const initialsMarkup = initials ? createElement(
1841 'span',
1842 { className: styles$7.Initials },
1843 createElement(
1844 'svg',
1845 { className: styles$7.Svg, viewBox: '0 0 48 48' },
1846 createElement(
1847 'text',
1848 { x: '50%', y: '50%', dy: verticalOffset, fill: 'currentColor', fontSize: '26', textAnchor: 'middle' },
1849 initials
1850 )
1851 )
1852 ) : null;
1853 return createElement(
1854 'span',
1855 { 'aria-label': label, role: 'img', className: className },
1856 initialsMarkup,
1857 imageMarkUp
1858 );
1859}
1860function styleClass(name) {
1861 return name ? STYLE_CLASSES[name.charCodeAt(0) % STYLE_CLASSES.length] : STYLE_CLASSES[0];
1862}
1863function customerPlaceholder(name) {
1864 return name ? AVATAR_IMAGES[name.charCodeAt(0) % AVATAR_IMAGES.length] : AVATAR_IMAGES[0];
1865}
1866var Avatar$2 = withAppProvider()(Avatar$1);
1867
1868function handleMouseUpByBlurring({ currentTarget }) {
1869 currentTarget.blur();
1870}
1871
1872var styles$8 = {
1873 "Spinner": "p_i0",
1874 "loading": "p_e6",
1875 "sizeSmall": "p_iw",
1876 "sizeLarge": "p_u8",
1877 "colorWhite": "p_yg",
1878 "colorTeal": "p_cu",
1879 "colorInkLightest": "p_i5",
1880};
1881
1882var spinnerSVGLarge = {"viewBox":"0 0 44 44","body":"<path d=\"M15.542 1.487A21.507 21.507 0 0 0 .5 22c0 11.874 9.626 21.5 21.5 21.5 9.847 0 18.364-6.675 20.809-16.072a1.5 1.5 0 0 0-2.904-.756C37.803 34.755 30.473 40.5 22 40.5 11.783 40.5 3.5 32.217 3.5 22c0-8.137 5.3-15.247 12.942-17.65a1.5 1.5 0 1 0-.9-2.863z\" />"};
1883
1884var spinnerSVGSmall = {"viewBox":"0 0 20 20","body":"<path d=\"M7.229 1.173a9.25 9.25 0 1 0 11.655 11.412 1.25 1.25 0 1 0-2.4-.698 6.75 6.75 0 1 1-8.506-8.329 1.25 1.25 0 1 0-.75-2.385z\" />"};
1885
1886const COLORS_FOR_LARGE_SPINNER = ['teal', 'inkLightest'];
1887function Spinner$1({ size = 'large', color = 'teal', accessibilityLabel, polaris: { intl } }) {
1888 if (size === 'large' && COLORS_FOR_LARGE_SPINNER.indexOf(color) < 0) {
1889 if (process.env.NODE_ENV === 'development') {
1890 // eslint-disable-next-line no-console
1891 console.warn(intl.translate('Polaris.Spinner.warningMessage', {
1892 color,
1893 size,
1894 colors: COLORS_FOR_LARGE_SPINNER.join(', ')
1895 }));
1896 }
1897 // eslint-disable-next-line no-param-reassign
1898 size = 'small';
1899 }
1900 const className = classNames$1(styles$8.Spinner, color && styles$8[variationName$1('color', color)], size && styles$8[variationName$1('size', size)]);
1901 const spinnerSVG = size === 'large' ? spinnerSVGLarge : spinnerSVGSmall;
1902 return createElement('svg', { viewBox: spinnerSVG.viewBox, dangerouslySetInnerHTML: { __html: spinnerSVG.body }, className: className, 'aria-label': accessibilityLabel, role: 'status' });
1903}
1904var Spinner$2 = withAppProvider()(Spinner$1);
1905
1906var styles$9 = {
1907 "Indicator": "p_lr",
1908 "pulseIndicator": "p_dm",
1909 "bounce": "p_y3",
1910 "pulse": "p_ak",
1911};
1912
1913function Indicator$1({ pulse = true }) {
1914 const className = classNames$1(styles$9.Indicator, pulse && styles$9.pulseIndicator);
1915 return createElement('span', { className: className });
1916}
1917
1918var styles$10 = {
1919 "Button": "p_vk",
1920 "disabled": "p_tk",
1921 "Content": "p_ei",
1922 "Icon": "p_m8",
1923 "Spinner": "p_t3",
1924 "sizeSlim": "p_tj",
1925 "primary": "p_pt",
1926 "destructive": "p_m1",
1927 "outline": "p_ay",
1928 "loading": "p_ew",
1929 "plain": "p_i4",
1930 "fullWidth": "p_ri",
1931 "sizeLarge": "p_eh",
1932 "iconOnly": "p_a2",
1933 "minimal": "p_yq",
1934};
1935
1936function Button$1({ id, url, disabled, loading, children, accessibilityLabel, ariaControls, ariaExpanded, onClick, onFocus, onBlur, external, icon, primary, outline, minimal, destructive, disclosure, plain, submit, size = 'medium', fullWidth, polaris: { intl } }) {
1937 const indicator = false;
1938 const isDisabled = disabled || loading;
1939 const className = classNames(styles$10.Button, primary && styles$10.primary, outline && styles$10.outline, minimal && styles$10.minimal, destructive && styles$10.destructive, isDisabled && styles$10.disabled, loading && styles$10.loading, plain && styles$10.plain, size && size !== 'medium' && styles$10[variationName('size', size)], fullWidth && styles$10.fullWidth, icon && children == null && styles$10.iconOnly);
1940 const disclosureIconMarkup = disclosure ? createElement(
1941 IconWrapper,
1942 null,
1943 createElement(Icon$2, { source: loading ? 'placeholder' : 'caretDown' })
1944 ) : null;
1945 let iconMarkup;
1946 if (icon) {
1947 const iconInner = isIconSource(icon) ? createElement(Icon$2, { source: loading ? 'placeholder' : icon }) : icon;
1948 iconMarkup = createElement(
1949 IconWrapper,
1950 null,
1951 iconInner
1952 );
1953 }
1954 const childMarkup = children ? createElement(
1955 'span',
1956 null,
1957 children
1958 ) : null;
1959 const spinnerColor = primary || destructive ? 'white' : 'inkLightest';
1960 const spinnerSVGMarkup = loading ? createElement(
1961 'span',
1962 { className: styles$10.Spinner },
1963 createElement(Spinner$2, { size: 'small', color: spinnerColor, accessibilityLabel: intl.translate('Polaris.Button.spinnerAccessibilityLabel') })
1964 ) : null;
1965 const indicatorMarkup = indicator && createElement(Indicator$1, null);
1966 const content = iconMarkup || disclosureIconMarkup ? createElement(
1967 'span',
1968 { className: styles$10.Content },
1969 spinnerSVGMarkup,
1970 iconMarkup,
1971 childMarkup,
1972 disclosureIconMarkup
1973 ) : createElement(
1974 'span',
1975 { className: styles$10.Content },
1976 spinnerSVGMarkup,
1977 childMarkup
1978 );
1979 const type = submit ? 'submit' : 'button';
1980 return url ? createElement(
1981 UnstyledLink$2,
1982 { id: id, url: url, external: external, onClick: onClick, onFocus: onFocus, onBlur: onBlur, onMouseUp: handleMouseUpByBlurring, className: className, disabled: isDisabled, 'aria-label': accessibilityLabel },
1983 indicatorMarkup,
1984 content
1985 ) : createElement(
1986 'button',
1987 { id: id, type: type, onClick: onClick, onFocus: onFocus, onBlur: onBlur, onMouseUp: handleMouseUpByBlurring, className: className, disabled: isDisabled, 'aria-label': accessibilityLabel, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, role: loading ? 'alert' : undefined, 'aria-busy': loading ? true : undefined },
1988 indicatorMarkup,
1989 content
1990 );
1991}
1992function IconWrapper({ children }) {
1993 return createElement(
1994 'span',
1995 { className: styles$10.Icon },
1996 children
1997 );
1998}
1999function isIconSource(x) {
2000 return typeof x === 'string' || typeof x === 'object' && x.body;
2001}
2002var Button$2 = withAppProvider()(Button$1);
2003
2004function buttonsFrom(actions, overrides = {}) {
2005 if (Array.isArray(actions)) {
2006 return actions.map((action, index) => buttonFrom(action, overrides, index));
2007 } else {
2008 const action = actions;
2009 return buttonFrom(action, overrides);
2010 }
2011}
2012function buttonFrom(_a, overrides, key) {
2013 var { content, onAction } = _a,
2014 action = __rest(_a, ["content", "onAction"]);
2015 return createElement(
2016 Button$2,
2017 Object.assign({ key: key, onClick: onAction }, action, overrides),
2018 content
2019 );
2020}
2021
2022var styles$11 = {
2023 "Heading": "p_l2",
2024};
2025
2026function Heading$1({ element: Element = 'h2', children }) {
2027 return createElement(
2028 Element,
2029 { className: styles$11.Heading },
2030 children
2031 );
2032}
2033
2034var styles$12 = {
2035 "ButtonGroup": "p_ug",
2036 "Item": "p_l9",
2037 "Item-plain": "p_d4",
2038 "segmented": "p_n2",
2039 "Item-focused": "p_o9",
2040 "fullWidth": "p_s0",
2041 "connectedTop": "p_vn",
2042};
2043
2044class Item$3 extends PureComponent {
2045 constructor() {
2046 super(...arguments);
2047 this.state = { focused: false };
2048 }
2049 render() {
2050 const { button } = this.props;
2051 const { focused } = this.state;
2052 const className = classNames$1(styles$12.Item, focused && styles$12['Item-focused'], button.props.plain && styles$12['Item-plain']);
2053 return createElement(
2054 'div',
2055 { className: className, onFocus: this.handleFocus, onBlur: this.handleBlur },
2056 button
2057 );
2058 }
2059 handleFocus() {
2060 this.setState({ focused: true });
2061 }
2062 handleBlur() {
2063 this.setState({ focused: false });
2064 }
2065}
2066__decorate([autobind], Item$3.prototype, "handleFocus", null);
2067__decorate([autobind], Item$3.prototype, "handleBlur", null);
2068
2069function ButtonGroup$1({ children, segmented, fullWidth, connectedTop }) {
2070 const className = classNames$1(styles$12.ButtonGroup, segmented && styles$12.segmented, fullWidth && styles$12.fullWidth, connectedTop && styles$12.connectedTop);
2071 const contents = elementChildren(children).map((child, index) => createElement(Item$3, { button: child, key: index }));
2072 return createElement(
2073 'div',
2074 { className: className },
2075 contents
2076 );
2077}
2078
2079var styles$13 = {
2080 "Banner": "p_zt",
2081 "withinContentContainer": "p_o7",
2082 "statusSuccess": "p_np",
2083 "statusInfo": "p_r5",
2084 "statusWarning": "p_d1",
2085 "statusCritical": "p_dh",
2086 "Ribbon": "p_h6",
2087 "Actions": "p_xz",
2088 "Dismiss": "p_i9",
2089 "withinPage": "p_hp",
2090 "hasDismiss": "p_fm",
2091 "Heading": "p_gi",
2092 "Content": "p_im",
2093 "SecondaryAction": "p_bt",
2094 "Text": "p_lm",
2095};
2096
2097var successIcon = {"viewBox":"0 0 20 20","body":"<g fill-rule=\"evenodd\"><circle fill=\"currentColor\" cx=\"10\" cy=\"10\" r=\"9\"/><path d=\"M10 0C4.486 0 0 4.486 0 10s4.486 10 10 10 10-4.486 10-10S15.514 0 10 0m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m2.293-10.707L9 10.586 7.707 9.293a1 1 0 1 0-1.414 1.414l2 2a.997.997 0 0 0 1.414 0l4-4a1 1 0 1 0-1.414-1.414\" /></g>"};
2098
2099var fallbackIcon = {"viewBox":"0 0 20 20","body":"<g fill-rule=\"evenodd\"><path fill=\"currentColor\" d=\"M2 3h11v4h6l-2 4 2 4H8v-4H3\"/><path d=\"M16.105 11.447L17.381 14H9v-2h4a1 1 0 0 0 1-1V8h3.38l-1.274 2.552a.993.993 0 0 0 0 .895zM2.69 4H12v6H4.027L2.692 4zm15.43 7l1.774-3.553A1 1 0 0 0 19 6h-5V3c0-.554-.447-1-1-1H2.248L1.976.782a1 1 0 1 0-1.953.434l4 18a1.006 1.006 0 0 0 1.193.76 1 1 0 0 0 .76-1.194L4.47 12H7v3a1 1 0 0 0 1 1h11c.346 0 .67-.18.85-.476a.993.993 0 0 0 .044-.972l-1.775-3.553z\" /></g>"};
2100
2101var warningIcon = {"viewBox":"0 0 20 20","body":"<g fill-rule=\"evenodd\"><circle fill=\"currentColor\" cx=\"10\" cy=\"10\" r=\"9\"/><path d=\"M10 0C4.486 0 0 4.486 0 10s4.486 10 10 10 10-4.486 10-10S15.514 0 10 0m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-13a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V6a1 1 0 0 0-1-1m0 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2\" /></g>"};
2102
2103var criticalIcon = {"viewBox":"0 0 20 20","body":"<g fill-rule=\"evenodd\"><circle fill=\"currentColor\" cx=\"10\" cy=\"10\" r=\"9\"/><path d=\"M2 10c0-1.846.635-3.543 1.688-4.897l11.209 11.209A7.954 7.954 0 0 1 10 18c-4.411 0-8-3.589-8-8m14.312 4.897L5.103 3.688A7.954 7.954 0 0 1 10 2c4.411 0 8 3.589 8 8a7.952 7.952 0 0 1-1.688 4.897M0 10c0 5.514 4.486 10 10 10s10-4.486 10-10S15.514 0 10 0 0 4.486 0 10\" /></g>"};
2104
2105var infoIcon = {"viewBox":"0 0 20 20","body":"<g fill-rule=\"evenodd\"><circle cx=\"10\" cy=\"10\" r=\"9\" fill=\"currentColor\"/><path d=\"M10 0C4.486 0 0 4.486 0 10s4.486 10 10 10 10-4.486 10-10S15.514 0 10 0m0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8m1-5v-3a1 1 0 0 0-1-1H9a1 1 0 1 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2m-1-5.9a1.1 1.1 0 1 0 0-2.2 1.1 1.1 0 0 0 0 2.2\"/></g>"};
2106
2107class Banner$1 extends PureComponent {
2108 render() {
2109 const { icon, action, secondaryAction, title, children, status, onDismiss } = this.props;
2110 const { withinContentContainer } = this.context;
2111 let color;
2112 let defaultIcon;
2113 let ariaRoleType = 'status';
2114 switch (status) {
2115 case 'success':
2116 color = 'greenDark';
2117 defaultIcon = successIcon;
2118 break;
2119 case 'info':
2120 color = 'blueDark';
2121 defaultIcon = infoIcon;
2122 break;
2123 case 'warning':
2124 color = 'yellowDark';
2125 defaultIcon = warningIcon;
2126 ariaRoleType = 'alert';
2127 break;
2128 case 'critical':
2129 color = 'redDark';
2130 defaultIcon = criticalIcon;
2131 ariaRoleType = 'alert';
2132 break;
2133 default:
2134 color = 'inkLighter';
2135 defaultIcon = fallbackIcon;
2136 }
2137 const className = classNames$1(styles$13.Banner, status && styles$13[variationName$1('status', status)], onDismiss && styles$13.hasDismiss, withinContentContainer ? styles$13.withinContentContainer : styles$13.withinPage);
2138 const id = uniqueID();
2139 const iconName = icon || defaultIcon;
2140 let headingMarkup = null;
2141 let headingID;
2142 if (title) {
2143 headingID = `${id}Heading`;
2144 headingMarkup = createElement(
2145 'div',
2146 { className: styles$13.Heading, id: headingID },
2147 createElement(
2148 Heading$1,
2149 { element: 'p' },
2150 title
2151 )
2152 );
2153 }
2154 const buttonSizeValue = withinContentContainer ? 'slim' : undefined;
2155 const secondaryActionMarkup = secondaryAction ? secondaryActionFrom(secondaryAction) : null;
2156 const actionMarkup = action ? createElement(
2157 'div',
2158 { className: styles$13.Actions },
2159 createElement(
2160 ButtonGroup$1,
2161 null,
2162 buttonFrom(action, { outline: true, size: buttonSizeValue }),
2163 secondaryActionMarkup
2164 )
2165 ) : null;
2166 let contentMarkup = null;
2167 let contentID;
2168 if (children || actionMarkup) {
2169 contentID = `${id}Content`;
2170 contentMarkup = createElement(
2171 'div',
2172 { className: styles$13.Content, id: contentID },
2173 children,
2174 actionMarkup
2175 );
2176 }
2177 const dismissButton = onDismiss ? createElement(
2178 'div',
2179 { className: styles$13.Dismiss },
2180 createElement(Button$2, { plain: true, icon: 'cancelSmall', onClick: onDismiss, accessibilityLabel: 'Dismiss notification' })
2181 ) : null;
2182 return createElement(
2183 'div',
2184 { className: className
2185 // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
2186 , tabIndex: 0, role: ariaRoleType, 'aria-live': 'polite', onMouseUp: handleMouseUp, 'aria-labelledby': headingID, 'aria-describedby': contentID },
2187 dismissButton,
2188 createElement(
2189 'div',
2190 { className: styles$13.Ribbon },
2191 createElement(Icon$2, { source: iconName, color: color, backdrop: true })
2192 ),
2193 createElement(
2194 'div',
2195 null,
2196 headingMarkup,
2197 contentMarkup
2198 )
2199 );
2200 }
2201}
2202Banner$1.contextTypes = contentContextTypes;
2203let index = 1;
2204function uniqueID() {
2205 return `Banner${index++}`;
2206}
2207function handleMouseUp({ currentTarget }) {
2208 currentTarget.blur();
2209}
2210function secondaryActionFrom(action) {
2211 if (action.url) {
2212 return createElement(
2213 UnstyledLink$2,
2214 { className: styles$13.SecondaryAction, url: action.url, external: action.external },
2215 createElement(
2216 'span',
2217 { className: styles$13.Text },
2218 action.content
2219 )
2220 );
2221 }
2222 return createElement(
2223 'button',
2224 { className: styles$13.SecondaryAction, onClick: action.onAction },
2225 createElement(
2226 'span',
2227 { className: styles$13.Text },
2228 action.content
2229 )
2230 );
2231}
2232
2233var styles$14 = {
2234 "Breadcrumb": "p_w7",
2235 "Icon": "p_kb",
2236 "Content": "p_o6",
2237};
2238
2239class Breadcrumbs$1 extends PureComponent {
2240 render() {
2241 const { breadcrumbs } = this.props;
2242 const breadcrumb = breadcrumbs[breadcrumbs.length - 1];
2243 if (breadcrumb == null) {
2244 return null;
2245 }
2246 const { content } = breadcrumb;
2247 const contentMarkup = createElement(
2248 Fragment,
2249 null,
2250 createElement(
2251 'span',
2252 { className: styles$14.Icon },
2253 createElement(Icon$2, { source: 'chevronLeft' })
2254 ),
2255 createElement(
2256 'span',
2257 { className: styles$14.Content },
2258 content
2259 )
2260 );
2261 const breadcrumbMarkup = 'url' in breadcrumb ? createElement(
2262 UnstyledLink$2,
2263 { key: content, url: breadcrumb.url, className: styles$14.Breadcrumb, onMouseUp: handleMouseUpByBlurring },
2264 contentMarkup
2265 ) : createElement(
2266 'button',
2267 { key: content, className: styles$14.Breadcrumb, onClick: breadcrumb.onAction, onMouseUp: handleMouseUpByBlurring, type: 'button' },
2268 contentMarkup
2269 );
2270 return (
2271 // eslint-disable-next-line jsx-a11y/no-redundant-roles
2272 createElement(
2273 'nav',
2274 { role: 'navigation' },
2275 breadcrumbMarkup
2276 )
2277 );
2278 }
2279}
2280
2281var styles$15 = {
2282 "Stack": "p_qc",
2283 "Item": "p_yo",
2284 "noWrap": "p_jj",
2285 "vertical": "p_kn",
2286 "spacingNone": "p_w6",
2287 "spacingExtraTight": "p_sj",
2288 "spacingTight": "p_la",
2289 "spacingLoose": "p_s2",
2290 "spacingExtraLoose": "p_ud",
2291 "distributionLeading": "p_ft",
2292 "distributionTrailing": "p_gj",
2293 "distributionCenter": "p_mc",
2294 "distributionEqualSpacing": "p_cl",
2295 "distributionFill": "p_bv",
2296 "distributionFillEvenly": "p_au",
2297 "alignmentLeading": "p_bc",
2298 "alignmentTrailing": "p_d0",
2299 "alignmentCenter": "p_t1",
2300 "alignmentFill": "p_xr",
2301 "alignmentBaseline": "p_dd",
2302 "Item-fill": "p_ye",
2303};
2304
2305function Item$5({ children, fill }) {
2306 const className = classNames$1(styles$15.Item, fill && styles$15['Item-fill']);
2307 return createElement(
2308 'div',
2309 { className: className },
2310 children
2311 );
2312}
2313
2314class Stack$1 extends PureComponent {
2315 render() {
2316 const { children, vertical, spacing, distribution, alignment, wrap } = this.props;
2317 const className = classNames$1(styles$15.Stack, vertical && styles$15.vertical, spacing && styles$15[variationName$1('spacing', spacing)], distribution && styles$15[variationName$1('distribution', distribution)], alignment && styles$15[variationName$1('alignment', alignment)], wrap === false && styles$15.noWrap);
2318 const itemMarkup = elementChildren(children).map((child, index) => {
2319 const props = { key: index };
2320 return wrapWithComponent(child, Item$5, props);
2321 });
2322 return createElement(
2323 'div',
2324 { className: className },
2325 itemMarkup
2326 );
2327 }
2328}
2329Stack$1.Item = Item$5;
2330
2331var styles$16 = {
2332 "Card": "p_z4",
2333 "subdued": "p_b5",
2334 "emphasis": "p_ai",
2335 "Header": "p_k2",
2336 "Section": "p_an",
2337 "Section-fullWidth": "p_sc",
2338 "Section-subdued": "p_t7",
2339 "SectionHeader": "p_kp",
2340 "Footer": "p_yl",
2341};
2342
2343function Header$1({ children, title, actions }) {
2344 const actionMarkup = actions ? createElement(
2345 ButtonGroup$1,
2346 null,
2347 buttonsFrom(actions, { plain: true })
2348 ) : null;
2349 const titleMarkup = isValidElement(title) ? title : createElement(
2350 Heading$1,
2351 null,
2352 title
2353 );
2354 const headingMarkup = actionMarkup || children ? createElement(
2355 Stack$1,
2356 { alignment: 'baseline' },
2357 createElement(
2358 Stack$1.Item,
2359 { fill: true },
2360 titleMarkup
2361 ),
2362 actionMarkup,
2363 children
2364 ) : titleMarkup;
2365 return createElement(
2366 'div',
2367 { className: styles$16.Header },
2368 headingMarkup
2369 );
2370}
2371
2372var styles$17 = {
2373 "Subheading": "p_u6",
2374};
2375
2376function Subheading$1({ element: Element = 'h3', children }) {
2377 const ariaLabel = typeof children === 'string' ? children : undefined;
2378 return createElement(
2379 Element,
2380 { 'aria-label': ariaLabel, className: styles$17.Subheading },
2381 children
2382 );
2383}
2384
2385function Section$3({ children, title, subdued, fullWidth, actions }) {
2386 const actionMarkup = actions ? createElement(
2387 ButtonGroup$1,
2388 null,
2389 buttonsFrom(actions, { plain: true })
2390 ) : null;
2391 const headerContent = title ? createElement(
2392 'div',
2393 { className: styles$16.SectionHeader },
2394 createElement(
2395 Stack$1,
2396 { alignment: 'baseline' },
2397 createElement(
2398 Stack$1.Item,
2399 { fill: true },
2400 createElement(
2401 Subheading$1,
2402 null,
2403 title
2404 )
2405 ),
2406 actionMarkup
2407 )
2408 ) : null;
2409 const className = classNames$1(styles$16.Section, subdued && styles$16['Section-subdued'], fullWidth && styles$16['Section-fullWidth']);
2410 return createElement(
2411 'div',
2412 { className: className },
2413 headerContent,
2414 children
2415 );
2416}
2417
2418var propflowStyles = {
2419 "Card": "p_sw",
2420 "subdued": "p_pj",
2421 "Header": "p_p2",
2422 "Section": "p_r2",
2423 "Section-fullWidth": "p_il",
2424 "Section-subdued": "p_y9",
2425 "SectionHeader": "p_vp",
2426 "Footer": "p_xy",
2427};
2428
2429class Card$1 extends PureComponent {
2430 constructor() {
2431 super(...arguments);
2432 this.styles = this.props.project === 'propflow' ? propflowStyles : styles$16;
2433 }
2434 getChildContext() {
2435 return {
2436 withinContentContainer: true
2437 };
2438 }
2439 render() {
2440 const { children, title, subdued, emphasis, sectioned, actions, primaryFooterAction, secondaryFooterAction } = this.props;
2441 const className = classNames$1(this.styles.Card, emphasis && this.styles.emphasis, subdued && this.styles.subdued);
2442 const headerMarkup = title ? createElement(Header$1, { actions: actions, title: title }) : null;
2443 const content = sectioned ? createElement(
2444 Section$3,
2445 null,
2446 children
2447 ) : children;
2448 const primaryFooterActionMarkup = primaryFooterAction ? buttonFrom(primaryFooterAction, { primary: true }) : null;
2449 const secondaryFooterActionMarkup = secondaryFooterAction ? buttonFrom(secondaryFooterAction) : null;
2450 const footerMarkup = primaryFooterActionMarkup || secondaryFooterActionMarkup ? createElement(
2451 'div',
2452 { className: this.styles.Footer },
2453 createElement(
2454 ButtonGroup$1,
2455 null,
2456 primaryFooterActionMarkup,
2457 secondaryFooterActionMarkup
2458 )
2459 ) : null;
2460 return createElement(
2461 'div',
2462 { className: className },
2463 headerMarkup,
2464 content,
2465 footerMarkup
2466 );
2467 }
2468}
2469Card$1.Section = Section$3;
2470Card$1.Header = Header$1;
2471Card$1.childContextTypes = contentContextTypes;
2472
2473var styles$18 = {
2474 "TextContainer": "p_zd",
2475 "spacingTight": "p_tm",
2476 "spacingLoose": "p_h9",
2477 "alignmentLeft": "p_hq",
2478 "alignmentCenter": "p_y7",
2479 "alignmentRight": "p_qa",
2480};
2481
2482function TextContainer$1({ spacing, alignment, children }) {
2483 const className = classNames$1(styles$18.TextContainer, spacing && styles$18[variationName$1('spacing', spacing)], alignment && styles$18[variationName$1('alignment', alignment)]);
2484 return createElement(
2485 'div',
2486 { className: className },
2487 children
2488 );
2489}
2490
2491var styles$19 = {
2492 "CalloutCard": "p_bk",
2493 "Image": "p_vu",
2494 "Content": "p_ae",
2495 "Title": "p_mm",
2496 "Buttons": "p_mv",
2497};
2498
2499function CalloutCard$1({ title, children, illustration, primaryAction, secondaryAction }) {
2500 const primaryActionMarkup = buttonFrom(primaryAction);
2501 const secondaryActionMarkup = secondaryAction ? buttonFrom(secondaryAction, { plain: true }) : null;
2502 const buttonMarkup = secondaryActionMarkup ? createElement(
2503 ButtonGroup$1,
2504 null,
2505 primaryActionMarkup,
2506 secondaryActionMarkup
2507 ) : primaryActionMarkup;
2508 return createElement(
2509 Card$1,
2510 { sectioned: true },
2511 createElement(
2512 'div',
2513 { className: styles$19.CalloutCard },
2514 createElement(
2515 'div',
2516 { className: styles$19.Content },
2517 createElement(
2518 'div',
2519 { className: styles$19.Title },
2520 createElement(
2521 Heading$1,
2522 null,
2523 title
2524 )
2525 ),
2526 createElement(
2527 TextContainer$1,
2528 null,
2529 children
2530 ),
2531 createElement(
2532 'div',
2533 { className: styles$19.Buttons },
2534 buttonMarkup
2535 )
2536 ),
2537 createElement(Image$1, { alt: '', className: styles$19.Image, source: illustration })
2538 )
2539 );
2540}
2541
2542var styles$20 = {
2543 "Caption": "p_dw",
2544};
2545
2546function Caption$1({ children }) {
2547 return createElement(
2548 'p',
2549 { className: styles$20.Caption },
2550 children
2551 );
2552}
2553
2554var styles$21 = {
2555 "InlineError": "p_dg",
2556 "Icon": "p_xs",
2557};
2558
2559function InlineError$1({ message, fieldID }) {
2560 if (!message) {
2561 return null;
2562 }
2563 return createElement(
2564 'div',
2565 { id: `${fieldID}Error`, className: styles$21.InlineError },
2566 createElement(
2567 'div',
2568 { className: styles$21.Icon },
2569 createElement(Icon$2, { source: 'alert' })
2570 ),
2571 message
2572 );
2573}
2574
2575var styles$22 = {
2576 "Choice": "p_a4",
2577 "labelHidden": "p_mi",
2578 "Label": "p_qu",
2579 "Control": "p_y2",
2580 "disabled": "p_cn",
2581 "Descriptions": "p_kx",
2582 "HelpText": "p_v5",
2583};
2584
2585function Choice$1({ id, label, disabled, error, children, labelHidden, helpText }) {
2586 const className = classNames$1(styles$22.Choice, labelHidden && styles$22.labelHidden, disabled && styles$22.disabled);
2587 const labelMarkup = createElement(
2588 'label',
2589 { className: className, htmlFor: id },
2590 createElement(
2591 'span',
2592 { className: styles$22.Control },
2593 children
2594 ),
2595 createElement(
2596 'span',
2597 { className: styles$22.Label },
2598 label
2599 )
2600 );
2601 const helpTextMarkup = helpText ? createElement(
2602 'div',
2603 { className: styles$22.HelpText, id: helpTextID(id) },
2604 helpText
2605 ) : null;
2606 const errorMarkup = error && typeof error !== 'boolean' && createElement(
2607 'div',
2608 { className: styles$22.Error },
2609 createElement(InlineError$1, { message: error, fieldID: id })
2610 );
2611 const descriptionMarkup = helpTextMarkup || errorMarkup ? createElement(
2612 'div',
2613 { className: styles$22.Descriptions },
2614 errorMarkup,
2615 helpTextMarkup
2616 ) : null;
2617 return descriptionMarkup ? createElement(
2618 'div',
2619 null,
2620 labelMarkup,
2621 descriptionMarkup
2622 ) : labelMarkup;
2623}
2624function helpTextID(id) {
2625 return `${id}HelpText`;
2626}
2627
2628var styles$23 = {
2629 "Checkbox": "p_zy",
2630 "error": "p_ix",
2631 "Backdrop": "p_tp",
2632 "Icon": "p_pr",
2633 "Input": "p_d7",
2634 "Input-indeterminate": "p_ol",
2635 "disabled": "p_wk",
2636};
2637
2638const getUniqueID = createUniqueIDFactory('Checkbox');
2639function Checkbox$1({ id = getUniqueID(), label, labelHidden, helpText, checked = false, error, disabled, onChange, onFocus, onBlur, name, value }) {
2640 function handleChange(event) {
2641 if (onChange == null) {
2642 return;
2643 }
2644 const { currentTarget } = event;
2645 onChange(currentTarget.checked, id);
2646 }
2647 const describedBy = [];
2648 if (error) {
2649 describedBy.push(`${id}Error`);
2650 }
2651 if (helpText) {
2652 describedBy.push(helpTextID(id));
2653 }
2654 const ariaDescribedBy = describedBy.length ? describedBy.join(' ') : undefined;
2655 const wrapperClassName = classNames$1(styles$23.Checkbox, error && styles$23.error);
2656 const isIndeterminate = checked === 'indeterminate';
2657 const isChecked = !isIndeterminate && Boolean(checked);
2658 const indeterminateAttributes = isIndeterminate ? { indeterminate: 'true', 'aria-checked': 'mixed' } : { 'aria-checked': isChecked };
2659 const iconSource = isIndeterminate ? 'subtract' : 'checkmark';
2660 const inputClassName = classNames$1(styles$23.Input, isIndeterminate && styles$23['Input-indeterminate']);
2661 return (
2662 /* eslint-disable jsx-a11y/no-redundant-roles, jsx-a11y/role-has-required-aria-props */
2663 createElement(
2664 Choice$1,
2665 { id: id, label: label, labelHidden: labelHidden, helpText: helpText, error: error, disabled: disabled },
2666 createElement(
2667 'span',
2668 { className: wrapperClassName },
2669 createElement('input', Object.assign({ id: id, name: name, value: value, type: 'checkbox', checked: isChecked, disabled: disabled, className: inputClassName, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, 'aria-invalid': error != null, 'aria-describedby': ariaDescribedBy, role: 'checkbox' }, indeterminateAttributes)),
2670 createElement('span', { className: styles$23.Backdrop }),
2671 createElement(
2672 'span',
2673 { className: styles$23.Icon },
2674 createElement(Icon$2, { source: iconSource })
2675 )
2676 )
2677 )
2678 /* eslint-disable jsx-a11y/no-redundant-roles, jsx-a11y/role-has-required-aria-props */
2679
2680 );
2681}
2682var Checkbox$2 = withAppProvider()(Checkbox$1);
2683
2684var styles$24 = {
2685 "RadioButton": "p_wi",
2686 "Input": "p_pl",
2687 "Backdrop": "p_yj",
2688 "Icon": "p_ly",
2689};
2690
2691const getUniqueID$2 = createUniqueIDFactory('RadioButton');
2692function RadioButton$1({ label, labelHidden, helpText, checked, disabled, onChange, onFocus, onBlur, id = getUniqueID$2(), name = id, value }) {
2693 function handleChange({ currentTarget }) {
2694 if (onChange == null) {
2695 return;
2696 }
2697 onChange(currentTarget.checked, id);
2698 }
2699 const describedBy = helpText ? helpTextID(id) : undefined;
2700 return createElement(
2701 Choice$1,
2702 { label: label, labelHidden: labelHidden, disabled: disabled, id: id, helpText: helpText },
2703 createElement(
2704 'span',
2705 { className: styles$24.RadioButton },
2706 createElement('input', { id: id, name: name, value: value, type: 'radio', checked: checked, disabled: disabled, className: styles$24.Input, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, 'aria-describedby': describedBy }),
2707 createElement('span', { className: styles$24.Backdrop }),
2708 createElement('span', { className: styles$24.Icon })
2709 )
2710 );
2711}
2712
2713var styles$25 = {
2714 "ChoiceList": "p_mr",
2715 "titleHidden": "p_zs",
2716 "Title": "p_b4",
2717 "Choices": "p_ib",
2718 "ChoiceChildren": "p_rr",
2719 "ChoiceError": "p_ch",
2720};
2721
2722const getUniqueID$1 = createUniqueIDFactory('ChoiceList');
2723function ChoiceList$1({ title, titleHidden, allowMultiple, choices, selected, onChange = noop, error, name = getUniqueID$1() }) {
2724 const ControlComponent = allowMultiple ? Checkbox$2 : RadioButton$1;
2725 const finalName = allowMultiple ? `${name}[]` : name;
2726 const className = classNames$1(styles$25.ChoiceList, titleHidden && styles$25.titleHidden);
2727 const titleMarkup = title ? createElement(
2728 'legend',
2729 { className: styles$25.Title },
2730 title
2731 ) : null;
2732 const choicesMarkup = choices.map(choice => {
2733 const { value, label, helpText, disabled } = choice;
2734 function handleChange(checked) {
2735 onChange(updateSelectedChoices(choice, checked, selected, allowMultiple), name);
2736 }
2737 const isSelected = choiceIsSelected(choice, selected);
2738 const children = choice.renderChildren ? createElement(
2739 'div',
2740 { className: styles$25.ChoiceChildren },
2741 choice.renderChildren(isSelected)
2742 ) : null;
2743 return createElement(
2744 'li',
2745 { key: value },
2746 createElement(ControlComponent, { name: finalName, value: value, label: label, disabled: disabled, checked: choiceIsSelected(choice, selected), helpText: helpText, onChange: handleChange }),
2747 children
2748 );
2749 });
2750 const errorMarkup = error && createElement(
2751 'div',
2752 { className: styles$25.ChoiceError },
2753 createElement(InlineError$1, { message: error, fieldID: finalName })
2754 );
2755 return createElement(
2756 'fieldset',
2757 { className: className, id: finalName, 'aria-invalid': error != null, 'aria-describedby': `${finalName}Error` },
2758 titleMarkup,
2759 createElement(
2760 'ul',
2761 { className: styles$25.Choices },
2762 choicesMarkup
2763 ),
2764 errorMarkup
2765 );
2766}
2767function choiceIsSelected({ value }, selected) {
2768 return selected.indexOf(value) >= 0;
2769}
2770function updateSelectedChoices({ value }, checked, selected, allowMultiple = false) {
2771 if (checked) {
2772 return allowMultiple ? [...selected, value] : [value];
2773 }
2774 return selected.filter(selectedChoice => selectedChoice !== value);
2775}
2776var ChoiceList$2 = withAppProvider()(ChoiceList$1);
2777
2778var styles$26 = {
2779 "Collapsible": "p_by",
2780 "animating": "p_cz",
2781 "open": "p_h4",
2782};
2783
2784const CONTEXT_TYPES = {
2785 parentCollapsibleExpanding: bool
2786};
2787class Collapsible$1 extends Component {
2788 constructor() {
2789 super(...arguments);
2790 this.state = {
2791 height: null,
2792 animationState: 'idle'
2793 };
2794 this.node = null;
2795 this.heightNode = null;
2796 }
2797 getChildContext() {
2798 const { open } = this.props;
2799 const { animationState } = this.state;
2800 const { parentCollapsibleExpanding } = this.context;
2801 return {
2802 parentCollapsibleExpanding: parentCollapsibleExpanding || open && animationState !== 'idle'
2803 };
2804 }
2805 // eslint-disable-next-line react/no-deprecated
2806 componentWillReceiveProps({ open: willOpen }) {
2807 const { open } = this.props;
2808 if (open !== willOpen) {
2809 this.setState({ animationState: 'measuring' });
2810 }
2811 }
2812 componentDidUpdate({ open: wasOpen }) {
2813 const { animationState } = this.state;
2814 const { parentCollapsibleExpanding } = this.context;
2815 if (parentCollapsibleExpanding && animationState !== 'idle') {
2816 // eslint-disable-next-line react/no-did-update-set-state
2817 this.setState({
2818 animationState: 'idle'
2819 });
2820 return;
2821 }
2822 read(() => {
2823 switch (animationState) {
2824 case 'idle':
2825 break;
2826 case 'measuring':
2827 this.setState({
2828 animationState: wasOpen ? 'closingStart' : 'openingStart',
2829 height: wasOpen && this.heightNode ? this.heightNode.scrollHeight : 0
2830 });
2831 break;
2832 case 'closingStart':
2833 this.setState({
2834 animationState: 'closing',
2835 height: 0
2836 });
2837 break;
2838 case 'openingStart':
2839 this.setState({
2840 animationState: 'opening',
2841 height: this.heightNode ? this.heightNode.scrollHeight : 0
2842 });
2843 }
2844 });
2845 }
2846 componentDidMount() {
2847 if (this.node == null) {
2848 return;
2849 }
2850 addEventListener(this.node, 'transitionend', this.handleTransitionEnd);
2851 }
2852 componentWillUnmount() {
2853 if (this.node == null) {
2854 return;
2855 }
2856 removeEventListener(this.node, 'transitionend', this.handleTransitionEnd);
2857 }
2858 render() {
2859 const { id, open, children } = this.props;
2860 const { animationState, height } = this.state;
2861 const animating = animationState !== 'idle';
2862 const wrapperClassName = classNames$1(styles$26.Collapsible, open && styles$26.open, animating && styles$26.animating);
2863 const displayHeight = collapsibleHeight(open, animationState, height);
2864 const content = animating || open ? children : null;
2865 return createElement(
2866 'div',
2867 { id: id, 'aria-hidden': !open, style: { height: displayHeight }, className: wrapperClassName, ref: this.bindNode },
2868 createElement(
2869 'div',
2870 { ref: this.bindHeightNode },
2871 content
2872 )
2873 );
2874 }
2875 bindNode(node) {
2876 this.node = node;
2877 }
2878 bindHeightNode(node) {
2879 this.heightNode = node;
2880 }
2881 handleTransitionEnd(event) {
2882 const { target: target$$1 } = event;
2883 if (target$$1 === this.node) {
2884 this.setState({ animationState: 'idle', height: null });
2885 }
2886 }
2887}
2888Collapsible$1.contextTypes = CONTEXT_TYPES;
2889Collapsible$1.childContextTypes = CONTEXT_TYPES;
2890__decorate([autobind], Collapsible$1.prototype, "bindNode", null);
2891__decorate([autobind], Collapsible$1.prototype, "bindHeightNode", null);
2892__decorate([autobind], Collapsible$1.prototype, "handleTransitionEnd", null);
2893function collapsibleHeight(open, animationState, height) {
2894 if (animationState === 'idle' && open) {
2895 return open ? 'auto' : undefined;
2896 }
2897 if (animationState === 'measuring') {
2898 return open ? undefined : 'auto';
2899 }
2900 return `${height || 0}px`;
2901}
2902var Collapsible$2 = withAppProvider()(Collapsible$1);
2903
2904function rgbString(color) {
2905 const { red, green, blue } = color;
2906 if (color.hasOwnProperty('alpha')) {
2907 return `rgba(${red}, ${green}, ${blue}, ${color.alpha})`;
2908 } else {
2909 return `rgb(${red}, ${green}, ${blue})`;
2910 }
2911}
2912const rgbaString = rgbString;
2913function rgbToHex({ red, green, blue }) {
2914 return `#${componentToHex(red)}${componentToHex(green)}${componentToHex(blue)}`;
2915}
2916function componentToHex(component) {
2917 const hex = component.toString(16);
2918 return hex.length === 1 ? `0${hex}` : hex;
2919}
2920function hsbToHex(color) {
2921 return rgbToHex(hsbToRgb(color));
2922}
2923function hsbToRgb(color) {
2924 const { hue, saturation, brightness, alpha = 1 } = color;
2925 const chroma = brightness * saturation;
2926 const huePrime = hue / 60;
2927 const hueDelta = 1 - Math.abs(huePrime % 2 - 1);
2928 const intermediateValue = chroma * hueDelta;
2929 let red = 0;
2930 let green = 0;
2931 let blue = 0;
2932 if (huePrime >= 0 && huePrime <= 1) {
2933 red = chroma;
2934 green = intermediateValue;
2935 blue = 0;
2936 }
2937 if (huePrime >= 1 && huePrime <= 2) {
2938 red = intermediateValue;
2939 green = chroma;
2940 blue = 0;
2941 }
2942 if (huePrime >= 2 && huePrime <= 3) {
2943 red = 0;
2944 green = chroma;
2945 blue = intermediateValue;
2946 }
2947 if (huePrime >= 3 && huePrime <= 4) {
2948 red = 0;
2949 green = intermediateValue;
2950 blue = chroma;
2951 }
2952 if (huePrime >= 4 && huePrime <= 5) {
2953 red = intermediateValue;
2954 green = 0;
2955 blue = chroma;
2956 }
2957 if (huePrime >= 5 && huePrime <= 6) {
2958 red = chroma;
2959 green = 0;
2960 blue = intermediateValue;
2961 }
2962 const chromaBrightnessDelta = brightness - chroma;
2963 red += chromaBrightnessDelta;
2964 green += chromaBrightnessDelta;
2965 blue += chromaBrightnessDelta;
2966 return {
2967 red: Math.round(red * 255),
2968 green: Math.round(green * 255),
2969 blue: Math.round(blue * 255),
2970 alpha
2971 };
2972}
2973function rgbToHsb(color) {
2974 const { alpha = 1 } = color;
2975 const red = color.red / 255;
2976 const green = color.green / 255;
2977 const blue = color.blue / 255;
2978 const largestComponent = Math.max(red, green, blue);
2979 const smallestComponent = Math.min(red, green, blue);
2980 const delta = largestComponent - smallestComponent;
2981 const saturation = largestComponent === 0 ? 0 : delta / largestComponent;
2982 let huePercentage = 0;
2983 switch (largestComponent) {
2984 case red:
2985 huePercentage = (green - blue) / delta + (green < blue ? 6 : 0);
2986 break;
2987 case green:
2988 huePercentage = (blue - red) / delta + 2;
2989 break;
2990 case blue:
2991 huePercentage = (red - green) / delta + 4;
2992 }
2993 const hue = Math.round(huePercentage / 6 * 360);
2994 return {
2995 hue: clamp(hue, 0, 360) || 0,
2996 saturation: clamp(saturation, 0, 1),
2997 brightness: clamp(largestComponent, 0, 1),
2998 alpha
2999 };
3000}
3001
3002// see https://github.com/oliviertassinari/react-event-listener/
3003class EventListener$1 extends PureComponent {
3004 componentDidMount() {
3005 this.attachListener();
3006 }
3007 // eslint-disable-next-line react/no-deprecated
3008 componentWillUpdate() {
3009 this.detachListener();
3010 }
3011 componentDidUpdate() {
3012 this.attachListener();
3013 }
3014 componentWillUnmount() {
3015 this.detachListener();
3016 }
3017 render() {
3018 return null;
3019 }
3020 attachListener() {
3021 const { event, handler, capture, passive } = this.props;
3022 addEventListener(window, event, handler, { capture, passive });
3023 }
3024 detachListener() {
3025 const { event, handler, capture } = this.props;
3026 removeEventListener(window, event, handler, capture);
3027 }
3028}
3029
3030var styles$27 = {
3031 "ColorPicker": "p_m4",
3032 "MainColor": "p_ma",
3033 "Dragger": "p_rp",
3034 "ColorLayer": "p_x5",
3035 "HuePicker": "p_zw",
3036 "AlphaPicker": "p_bz",
3037 "Slidable": "p_f2",
3038};
3039
3040class Slidable$1 extends PureComponent {
3041 constructor() {
3042 super(...arguments);
3043 this.state = {
3044 dragging: false
3045 };
3046 this.node = null;
3047 this.draggerNode = null;
3048 }
3049 componentDidMount() {
3050 const { onDraggerHeight } = this.props;
3051 if (onDraggerHeight == null) {
3052 return;
3053 }
3054 const { draggerNode } = this;
3055 if (draggerNode == null) {
3056 return;
3057 }
3058 onDraggerHeight(draggerNode.clientWidth);
3059 if (process.env.NODE_ENV === 'development') {
3060 setTimeout(() => {
3061 onDraggerHeight(draggerNode.clientWidth);
3062 }, 0);
3063 }
3064 }
3065 render() {
3066 const { dragging } = this.state;
3067 const { draggerX = 0, draggerY = 0 } = this.props;
3068 const draggerPositioning = {
3069 transform: `translate3d(${draggerX}px, ${draggerY}px, 0)`
3070 };
3071 const moveListener = dragging ? createElement(EventListener$1, { event: 'mousemove', handler: this.handleMove }) : null;
3072 const touchMoveListener = dragging ? createElement(EventListener$1, { event: 'touchmove', handler: this.handleMove }) : null;
3073 const endDragListener = dragging ? createElement(EventListener$1, { event: 'mouseup', handler: this.handleDragEnd }) : null;
3074 const touchEndListener = dragging ? createElement(EventListener$1, { event: 'touchend', handler: this.handleDragEnd }) : null;
3075 const touchCancelListener = dragging ? createElement(EventListener$1, { event: 'touchcancel', handler: this.handleDragEnd }) : null;
3076 return createElement(
3077 'div',
3078 { ref: this.setNode, className: styles$27.Slidable, onMouseDown: this.startDrag, onTouchStart: this.startDrag },
3079 endDragListener,
3080 moveListener,
3081 touchMoveListener,
3082 touchEndListener,
3083 touchCancelListener,
3084 createElement('div', { style: draggerPositioning, className: styles$27.Dragger, ref: this.setDraggerNode })
3085 );
3086 }
3087 setDraggerNode(node) {
3088 this.draggerNode = node;
3089 }
3090 setNode(node) {
3091 this.node = node;
3092 }
3093 startDrag(event) {
3094 if (event.type === 'mousedown') {
3095 const mouseEvent = event;
3096 this.handleDraggerMove(mouseEvent.clientX, mouseEvent.clientY);
3097 }
3098 this.setState({ dragging: true });
3099 }
3100 handleDragEnd() {
3101 this.setState({ dragging: false });
3102 }
3103 handleMove(event) {
3104 event.stopImmediatePropagation();
3105 event.stopPropagation();
3106 event.preventDefault();
3107 if (event.type === 'mousemove') {
3108 const mouseEvent = event;
3109 this.handleDraggerMove(mouseEvent.clientX, mouseEvent.clientY);
3110 return;
3111 }
3112 const touchEvent = event;
3113 this.handleDraggerMove(touchEvent.touches[0].clientX, touchEvent.touches[0].clientY);
3114 }
3115 handleDraggerMove(x, y) {
3116 if (this.node == null) {
3117 return;
3118 }
3119 const { onChange } = this.props;
3120 const rect = this.node.getBoundingClientRect();
3121 const offsetX = x - rect.left;
3122 const offsetY = y - rect.top;
3123 onChange({ x: offsetX, y: offsetY });
3124 }
3125}
3126__decorate([autobind], Slidable$1.prototype, "setDraggerNode", null);
3127__decorate([autobind], Slidable$1.prototype, "setNode", null);
3128__decorate([autobind], Slidable$1.prototype, "startDrag", null);
3129__decorate([autobind], Slidable$1.prototype, "handleDragEnd", null);
3130__decorate([autobind], Slidable$1.prototype, "handleMove", null);
3131__decorate([autobind], Slidable$1.prototype, "handleDraggerMove", null);
3132
3133const VERTICAL_PADDING = 13;
3134class AlphaPicker$1 extends PureComponent {
3135 constructor() {
3136 super(...arguments);
3137 this.state = {
3138 sliderHeight: 0,
3139 draggerHeight: 0
3140 };
3141 }
3142 render() {
3143 const { color, alpha } = this.props;
3144 const { sliderHeight, draggerHeight } = this.state;
3145 const offset = offsetForAlpha(alpha, sliderHeight, draggerHeight);
3146 const draggerY = clamp(offset, 0, sliderHeight);
3147 const background = alphaGradientForColor(color);
3148 return createElement(
3149 'div',
3150 { className: styles$27.AlphaPicker, ref: this.setSliderHeight },
3151 createElement('div', { className: styles$27.ColorLayer, style: { background } }),
3152 createElement(Slidable$1, { draggerY: draggerY, draggerX: 0, onChange: this.handleChange, onDraggerHeight: this.setDraggerHeight })
3153 );
3154 }
3155 setSliderHeight(node) {
3156 if (node == null) {
3157 return;
3158 }
3159 this.setState({ sliderHeight: node.clientHeight });
3160 if (process.env.NODE_ENV === 'development') {
3161 setTimeout(() => {
3162 this.setState({ sliderHeight: node.clientHeight });
3163 }, 0);
3164 }
3165 }
3166 setDraggerHeight(height) {
3167 this.setState({
3168 draggerHeight: height
3169 });
3170 }
3171 handleChange({ y }) {
3172 const { onChange } = this.props;
3173 const { sliderHeight } = this.state;
3174 const offsetY = clamp(y, 0, sliderHeight);
3175 const alpha = alphaForOffset(offsetY, sliderHeight);
3176 onChange(alpha);
3177 }
3178}
3179__decorate([autobind], AlphaPicker$1.prototype, "setSliderHeight", null);
3180__decorate([autobind], AlphaPicker$1.prototype, "setDraggerHeight", null);
3181__decorate([autobind], AlphaPicker$1.prototype, "handleChange", null);
3182function alphaForOffset(offset, sliderHeight) {
3183 const selectionHeight = offset - VERTICAL_PADDING;
3184 const slidableArea = sliderHeight - VERTICAL_PADDING * 2;
3185 return clamp(1 - selectionHeight / slidableArea, 0, 1);
3186}
3187function offsetForAlpha(alpha, sliderHeight, draggerHeight) {
3188 const slidableArea = sliderHeight - (draggerHeight + VERTICAL_PADDING);
3189 return clamp((1 - alpha) * slidableArea + VERTICAL_PADDING, 0, sliderHeight - draggerHeight);
3190}
3191function alphaGradientForColor(color) {
3192 const { red, green, blue } = hsbToRgb(color);
3193 const rgb = `${red}, ${green}, ${blue}`;
3194 return `linear-gradient(to top, rgba(${rgb}, 0) 18px, rgba(${rgb}, 1) calc(100% - 18px))`;
3195}
3196
3197const VERTICAL_PADDING$1 = 13;
3198class HuePicker$1 extends PureComponent {
3199 constructor() {
3200 super(...arguments);
3201 this.state = {
3202 sliderHeight: 0,
3203 draggerHeight: 0
3204 };
3205 }
3206 render() {
3207 const { hue } = this.props;
3208 const { sliderHeight, draggerHeight } = this.state;
3209 const offset = offsetForHue(hue, sliderHeight, draggerHeight);
3210 const draggerY = clamp(offset, 0, sliderHeight);
3211 return createElement(
3212 'div',
3213 { className: styles$27.HuePicker, ref: this.setSliderHeight },
3214 createElement(Slidable$1, { draggerY: draggerY, draggerX: 0, onChange: this.handleChange, onDraggerHeight: this.setDraggerHeight })
3215 );
3216 }
3217 setSliderHeight(node) {
3218 if (node == null) {
3219 return;
3220 }
3221 this.setState({ sliderHeight: node.clientHeight });
3222 if (process.env.NODE_ENV === 'development') {
3223 setTimeout(() => {
3224 this.setState({ sliderHeight: node.clientHeight });
3225 }, 0);
3226 }
3227 }
3228 setDraggerHeight(height) {
3229 this.setState({
3230 draggerHeight: height
3231 });
3232 }
3233 handleChange({ y }) {
3234 const { onChange } = this.props;
3235 const { sliderHeight } = this.state;
3236 const offsetY = clamp(y, 0, sliderHeight);
3237 const hue = hueForOffset(offsetY, sliderHeight);
3238 onChange(hue);
3239 }
3240}
3241__decorate([autobind], HuePicker$1.prototype, "setSliderHeight", null);
3242__decorate([autobind], HuePicker$1.prototype, "setDraggerHeight", null);
3243__decorate([autobind], HuePicker$1.prototype, "handleChange", null);
3244function offsetForHue(hue, sliderHeight, draggerHeight) {
3245 const slidableArea = sliderHeight - (draggerHeight + VERTICAL_PADDING$1);
3246 return clamp(hue / 360 * slidableArea + VERTICAL_PADDING$1, 0, sliderHeight - draggerHeight);
3247}
3248function hueForOffset(offset, sliderHeight) {
3249 const selectionHeight = offset - VERTICAL_PADDING$1;
3250 const slidableArea = sliderHeight - VERTICAL_PADDING$1 * 2;
3251 return clamp(selectionHeight / slidableArea * 360, 0, 360);
3252}
3253
3254class ColorPicker$1 extends PureComponent {
3255 constructor() {
3256 super(...arguments);
3257 this.state = {
3258 pickerSize: 0
3259 };
3260 this.colorNode = null;
3261 }
3262 componentDidMount() {
3263 const { colorNode } = this;
3264 if (colorNode == null) {
3265 return;
3266 }
3267 // eslint-disable-next-line react/no-did-mount-set-state
3268 this.setState({ pickerSize: colorNode.clientWidth });
3269 if (process.env.NODE_ENV === 'development') {
3270 setTimeout(() => {
3271 this.setState({ pickerSize: colorNode.clientWidth });
3272 }, 0);
3273 }
3274 }
3275 render() {
3276 const { id, color, allowAlpha } = this.props;
3277 const { hue, saturation, brightness, alpha: providedAlpha } = color;
3278 const { pickerSize } = this.state;
3279 const alpha = providedAlpha != null && allowAlpha ? providedAlpha : 1;
3280 const { red, green, blue } = hsbToRgb({ hue, saturation: 1, brightness: 1 });
3281 const colorString = `rgba(${red}, ${green}, ${blue}, ${alpha})`;
3282 const draggerX = clamp(saturation * pickerSize, 0, pickerSize);
3283 const draggerY = clamp(pickerSize - brightness * pickerSize, 0, pickerSize);
3284 const alphaSliderMarkup = allowAlpha ? createElement(AlphaPicker$1, { alpha: alpha, color: color, onChange: this.handleAlphaChange }) : null;
3285 return createElement(
3286 'div',
3287 { className: styles$27.ColorPicker, id: id },
3288 createElement(
3289 'div',
3290 { ref: this.setColorNode, className: styles$27.MainColor },
3291 createElement('div', { className: styles$27.ColorLayer, style: { backgroundColor: colorString } }),
3292 createElement(Slidable$1, { onChange: this.handleDraggerMove, draggerX: draggerX, draggerY: draggerY })
3293 ),
3294 createElement(HuePicker$1, { hue: hue, onChange: this.handleHueChange }),
3295 alphaSliderMarkup
3296 );
3297 }
3298 setColorNode(node) {
3299 this.colorNode = node;
3300 }
3301 handleHueChange(hue) {
3302 const { color: { brightness, saturation, alpha = 1 }, onChange } = this.props;
3303 onChange({ hue, brightness, saturation, alpha });
3304 }
3305 handleAlphaChange(alpha) {
3306 const { color: { hue, brightness, saturation }, onChange } = this.props;
3307 onChange({ hue, brightness, saturation, alpha });
3308 }
3309 handleDraggerMove({ x, y }) {
3310 const { pickerSize } = this.state;
3311 const { color: { hue, alpha = 1 }, onChange } = this.props;
3312 const saturation = clamp(x / pickerSize, 0, 1);
3313 const brightness = clamp(1 - y / pickerSize, 0, 1);
3314 onChange({ hue, saturation, brightness, alpha });
3315 }
3316}
3317__decorate([autobind], ColorPicker$1.prototype, "setColorNode", null);
3318__decorate([autobind], ColorPicker$1.prototype, "handleHueChange", null);
3319__decorate([autobind], ColorPicker$1.prototype, "handleAlphaChange", null);
3320__decorate([autobind], ColorPicker$1.prototype, "handleDraggerMove", null);
3321
3322var styles$28 = {
3323 "Connected": "p_g3",
3324 "Item": "p_li",
3325 "Item-primary": "p_zc",
3326 "Item-connection": "p_yn",
3327 "Item-focused": "p_e7",
3328};
3329
3330var ItemPosition;
3331(function (ItemPosition) {
3332 ItemPosition[ItemPosition["Left"] = 0] = "Left";
3333 ItemPosition[ItemPosition["Primary"] = 1] = "Primary";
3334 ItemPosition[ItemPosition["Right"] = 2] = "Right";
3335})(ItemPosition || (ItemPosition = {}));
3336class Item$7 extends PureComponent {
3337 constructor() {
3338 super(...arguments);
3339 this.state = { focused: false };
3340 }
3341 render() {
3342 const { focused } = this.state;
3343 const { children, position } = this.props;
3344 const className = classNames$1(styles$28.Item, focused && styles$28['Item-focused'], position === ItemPosition.Primary ? styles$28['Item-primary'] : styles$28['Item-connection']);
3345 return createElement(
3346 'div',
3347 { onBlur: this.handleBlur, onFocus: this.handleFocus, className: className },
3348 children
3349 );
3350 }
3351 handleBlur() {
3352 this.setState({ focused: false });
3353 }
3354 handleFocus() {
3355 this.setState({ focused: true });
3356 }
3357}
3358__decorate([autobind], Item$7.prototype, "handleBlur", null);
3359__decorate([autobind], Item$7.prototype, "handleFocus", null);
3360
3361function Connected$1({ children, left, right }) {
3362 if (left == null && right == null) {
3363 return Children.only(children);
3364 }
3365 const leftConnectionMarkup = left ? createElement(
3366 Item$7,
3367 { position: ItemPosition.Left },
3368 left
3369 ) : null;
3370 const rightConnectionMarkup = right ? createElement(
3371 Item$7,
3372 { position: ItemPosition.Right },
3373 right
3374 ) : null;
3375 return createElement(
3376 'div',
3377 { className: styles$28.Connected },
3378 leftConnectionMarkup,
3379 createElement(
3380 Item$7,
3381 { position: ItemPosition.Primary },
3382 children
3383 ),
3384 rightConnectionMarkup
3385 );
3386}
3387
3388var styles$29 = {
3389 "DataField": "p_fd",
3390 "Icon": "p_fc",
3391 "SecondaryData": "p_qv",
3392 "Content": "p_fy",
3393};
3394
3395var styles$30 = {
3396 "Label": "p_jk",
3397 "hidden": "p_co",
3398 "Text": "p_vd",
3399 "Optional": "p_yv",
3400};
3401
3402function labelID(id) {
3403 return `${id}Label`;
3404}
3405function Label$1({ children, id, hidden, optional }) {
3406 const className = classNames$1(styles$30.Label, hidden && styles$30.hidden);
3407 const optionalMarkup = optional ? createElement(
3408 'span',
3409 { className: styles$30.Optional },
3410 '(Optional)'
3411 ) : null;
3412 return createElement(
3413 'div',
3414 { className: className },
3415 createElement(
3416 'label',
3417 { id: labelID(id), htmlFor: id, className: styles$30.Text },
3418 children,
3419 ' ',
3420 optionalMarkup
3421 )
3422 );
3423}
3424
3425function DataField$1({ children, data, secondaryData, label, icon, iconColor }) {
3426 const labelMarkup = label ? createElement(
3427 Label$1,
3428 { id: 'Data Field Label' },
3429 label
3430 ) : null;
3431 const iconMarkup = icon ? createElement(
3432 'div',
3433 { className: styles$29.Icon },
3434 createElement(Icon$2, { source: icon, color: iconColor ? iconColor : "inkLighter" })
3435 ) : null;
3436 const secondaryDataMarkup = secondaryData ? createElement(
3437 'span',
3438 { className: styles$29.SecondaryData },
3439 ' \xB7 ',
3440 secondaryData
3441 ) : null;
3442 const contentMarkup = children ? createElement(
3443 'div',
3444 null,
3445 children
3446 ) : null;
3447 const emptyMarkup = !children && !data ? createElement(
3448 'span',
3449 { className: styles$29.SecondaryData },
3450 '--'
3451 ) : null;
3452 return createElement(
3453 'div',
3454 { className: styles$29.DataField },
3455 iconMarkup,
3456 createElement(
3457 'div',
3458 { className: styles$29.Content },
3459 labelMarkup,
3460 createElement(
3461 'div',
3462 { className: styles$29.Data },
3463 data,
3464 secondaryDataMarkup
3465 ),
3466 contentMarkup,
3467 emptyMarkup
3468 )
3469 );
3470}
3471
3472var styles$31 = {
3473 "DataTable": "p_m0",
3474 "hasFooter": "p_ht",
3475 "ScrollContainer": "p_ik",
3476 "Navigation": "p_e8",
3477 "Navigation-left": "p_ki",
3478 "Navigation-right": "p_re",
3479 "Navigation-button": "p_yy",
3480 "Navigation-chevron": "p_ic",
3481 "Pip": "p_u3",
3482 "Pip-visible": "p_fs",
3483 "Table": "p_yi",
3484 "TableFoot": "p_fi",
3485 "Cell": "p_hz",
3486 "Cell-numeric": "p_wy",
3487 "Cell-fixed": "p_dn",
3488 "Cell-truncated": "p_nx",
3489 "Cell-header": "p_p1",
3490 "Cell-sortable": "p_du",
3491 "Heading": "p_t2",
3492 "Icon": "p_fq",
3493 "Heading-left": "p_h7",
3494 "Cell-sorted": "p_j6",
3495 "Cell-total": "p_br",
3496 "Cell-footer": "p_c2",
3497 "collapsed": "p_ao",
3498};
3499
3500function Cell$1({ height, content, contentType, fixed, truncate, header, total, footer, sorted, sortable, sortDirection, defaultSortDirection, polaris: { intl: { translate } }, onSort }) {
3501 const numeric = contentType === 'numeric';
3502 const className = classNames$1(styles$31.Cell, fixed && styles$31['Cell-fixed'], fixed && truncate && styles$31['Cell-truncated'], header && styles$31['Cell-header'], total && styles$31['Cell-total'], footer && styles$31['Cell-footer'], numeric && styles$31['Cell-numeric'], sortable && styles$31['Cell-sortable'], sorted && styles$31['Cell-sorted']);
3503 const headerClassName = classNames$1(header && styles$31.Heading, header && contentType === 'text' && styles$31['Heading-left']);
3504 const iconClassName = classNames$1(sortable && styles$31.Icon);
3505 const style = {
3506 height: height ? `${height}px` : undefined
3507 };
3508 const direction = sorted ? sortDirection : defaultSortDirection;
3509 const source = `caret${direction === 'ascending' ? 'Up' : 'Down'}`;
3510 const oppositeDirection = sortDirection === 'ascending' ? 'descending' : 'ascending';
3511 const sortAccessibilityLabel = translate('Polaris.DataTable.sortAccessibilityLabel', { direction: sorted ? oppositeDirection : direction });
3512 const iconMarkup = createElement(
3513 'span',
3514 { className: iconClassName },
3515 createElement(Icon$2, { source: source, accessibilityLabel: sortAccessibilityLabel })
3516 );
3517 const sortableHeadingContent = createElement(
3518 'button',
3519 { className: headerClassName, onClick: onSort },
3520 iconMarkup,
3521 content
3522 );
3523 const columnHeadingContent = sortable ? sortableHeadingContent : content;
3524 const headingMarkup = header ? createElement(
3525 'th',
3526 { className: className, scope: 'col', 'aria-sort': sortDirection, style: style },
3527 columnHeadingContent
3528 ) : createElement(
3529 'th',
3530 { className: className, scope: 'row', style: style },
3531 content
3532 );
3533 const cellMarkup = header || fixed ? headingMarkup : createElement(
3534 'td',
3535 { className: className, style: style },
3536 content
3537 );
3538 return cellMarkup;
3539}
3540var Cell$2 = withAppProvider()(Cell$1);
3541
3542var chevronLeft$1 = 'data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDE2YS45OTcuOTk3IDAgMCAxLS43MDctLjI5M2wtNS01YS45OTkuOTk5IDAgMCAxIDAtMS40MTRsNS01YS45OTkuOTk5IDAgMSAxIDEuNDE0IDEuNDE0TDguNDE0IDEwbDQuMjkzIDQuMjkzQS45OTkuOTk5IDAgMCAxIDEyIDE2IiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4K';
3543
3544var chevronRight$1 = 'data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMTZhLjk5OS45OTkgMCAwIDEtLjcwNy0xLjcwN0wxMS41ODYgMTAgNy4yOTMgNS43MDdhLjk5OS45OTkgMCAxIDEgMS40MTQtMS40MTRsNSA1YS45OTkuOTk5IDAgMCAxIDAgMS40MTRsLTUgNUEuOTk3Ljk5NyAwIDAgMSA4IDE2IiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4K';
3545
3546function Navigation$1({ isScrolledFarthestLeft, isScrolledFarthestRight, navigateTableLeft, navigateTableRight, polaris: { intl: { translate } } }) {
3547 const leftA11yLabel = translate('Polaris.DataTable.navAccessibilityLabel', {
3548 direction: 'left'
3549 });
3550 const rightA11yLabel = translate('Polaris.DataTable.navAccessibilityLabel', {
3551 direction: 'right'
3552 });
3553 const leftButton = isScrolledFarthestLeft ? null : createElement(
3554 'div',
3555 { className: styles$31['Navigation-left'] },
3556 createElement(
3557 'a',
3558 { 'aria-label': leftA11yLabel, className: styles$31['Navigation-button'], onClick: navigateTableLeft },
3559 createElement('img', { src: chevronLeft$1, className: styles$31['Navigation-chevron'] })
3560 )
3561 );
3562 const rightButton = isScrolledFarthestRight ? null : createElement(
3563 'div',
3564 { className: styles$31['Navigation-right'] },
3565 createElement(
3566 'a',
3567 { 'aria-label': rightA11yLabel, className: styles$31['Navigation-button'], onClick: navigateTableRight },
3568 createElement('img', { src: chevronRight$1, className: styles$31['Navigation-chevron'] })
3569 )
3570 );
3571 return createElement(
3572 'div',
3573 { className: styles$31.Navigation },
3574 leftButton,
3575 rightButton
3576 );
3577}
3578var Navigation$2 = withAppProvider()(Navigation$1);
3579
3580class DataTable$1 extends PureComponent {
3581 constructor(props) {
3582 super(props);
3583 this.state = {
3584 collapsed: false,
3585 columnVisibilityData: [],
3586 heights: [],
3587 preservedScrollPosition: {},
3588 isScrolledFarthestLeft: true,
3589 isScrolledFarthestRight: false
3590 };
3591 this.dataTable = createRef();
3592 this.scrollContainer = createRef();
3593 this.table = createRef();
3594 const { translate } = props.polaris.intl;
3595 this.totalsRowHeading = translate('Polaris.DataTable.totalsRowHeading');
3596 }
3597 componentDidMount() {
3598 // We need to defer the calculation in development so the styles have time to be injected.
3599 if (process.env.NODE_ENV === 'development') {
3600 setTimeout(() => {
3601 this.handleResize();
3602 }, 10);
3603 } else {
3604 this.handleResize();
3605 }
3606 }
3607 componentDidUpdate(prevProps) {
3608 if (isEqual(prevProps, this.props)) {
3609 return;
3610 }
3611 this.handleResize();
3612 }
3613 render() {
3614 const { columnContentTypes, headings, totals, rows, truncate, footerContent, sortable, defaultSortDirection = 'ascending', initialSortColumnIndex = 0 } = this.props;
3615 const { collapsed, heights, sortedColumnIndex = initialSortColumnIndex, sortDirection = defaultSortDirection, isScrolledFarthestLeft, isScrolledFarthestRight } = this.state;
3616 const className = classNames$1(styles$31.DataTable, collapsed && styles$31.collapsed, footerContent && styles$31.hasFooter);
3617 const wrapperClassName = classNames$1(styles$31.TableWrapper, collapsed && styles$31.collapsed);
3618 const footerClassName = classNames$1(footerContent && styles$31.TableFoot);
3619 const footerMarkup = footerContent ? createElement(
3620 'tfoot',
3621 { className: footerClassName },
3622 createElement(
3623 'tr',
3624 null,
3625 this.renderFooter()
3626 )
3627 ) : null;
3628 const totalsMarkup = totals ? createElement(
3629 'tr',
3630 null,
3631 totals.map(this.renderTotals)
3632 ) : null;
3633 const headingMarkup = createElement(
3634 'tr',
3635 null,
3636 headings.map((heading, headingIndex) => {
3637 let sortableHeadingProps;
3638 const id = `heading-cell-${headingIndex}`;
3639 if (sortable) {
3640 const isSortable = sortable[headingIndex];
3641 const isSorted = sortedColumnIndex === headingIndex;
3642 const direction = isSorted ? sortDirection : 'none';
3643 sortableHeadingProps = {
3644 defaultSortDirection,
3645 sorted: isSorted,
3646 sortable: isSortable,
3647 sortDirection: direction,
3648 onSort: this.defaultOnSort(headingIndex)
3649 };
3650 }
3651 const height = !truncate ? heights[0] : undefined;
3652 return createElement(Cell$2, Object.assign({ header: true, key: id, height: height, content: heading, contentType: columnContentTypes[headingIndex], fixed: headingIndex === 0, truncate: truncate }, sortableHeadingProps));
3653 })
3654 );
3655 const bodyMarkup = rows.map(this.defaultRenderRow);
3656 const style = footerContent ? { marginBottom: `${heights[heights.length - 1]}px` } : undefined;
3657 return createElement(
3658 'div',
3659 { className: wrapperClassName },
3660 createElement(Navigation$2, { isScrolledFarthestLeft: isScrolledFarthestLeft, isScrolledFarthestRight: isScrolledFarthestRight, navigateTableLeft: this.navigateTable('left'), navigateTableRight: this.navigateTable('right') }),
3661 createElement(
3662 'div',
3663 { className: className, ref: this.dataTable },
3664 createElement(
3665 'div',
3666 { className: styles$31.ScrollContainer, ref: this.scrollContainer, style: style },
3667 createElement(EventListener$1, { event: 'resize', handler: this.handleResize }),
3668 createElement(EventListener$1, { capture: true, event: 'scroll', handler: this.scrollListener }),
3669 createElement(
3670 'table',
3671 { className: styles$31.Table, ref: this.table },
3672 createElement(
3673 'thead',
3674 null,
3675 headingMarkup,
3676 totalsMarkup
3677 ),
3678 createElement(
3679 'tbody',
3680 null,
3681 bodyMarkup
3682 ),
3683 footerMarkup
3684 )
3685 )
3686 )
3687 );
3688 }
3689 handleResize() {
3690 const { footerContent, truncate } = this.props;
3691 const { table: { current: table }, scrollContainer: { current: scrollContainer } } = this;
3692 let collapsed = false;
3693 if (table && scrollContainer) {
3694 collapsed = table.scrollWidth > scrollContainer.clientWidth;
3695 scrollContainer.scrollLeft = 0;
3696 }
3697 this.setState(Object.assign({ collapsed, heights: [] }, this.calculateColumnVisibilityData(collapsed)), () => {
3698 if (footerContent || !truncate) {
3699 this.setHeightsAndScrollPosition();
3700 }
3701 });
3702 }
3703 tallestCellHeights() {
3704 const { footerContent, truncate } = this.props;
3705 const { table: { current: table } } = this;
3706 let { heights } = this.state;
3707 if (table) {
3708 const rows = Array.from(table.getElementsByTagName('tr'));
3709 if (!truncate) {
3710 return heights = rows.map(row => {
3711 const fixedCell = row.childNodes[0];
3712 return Math.max(row.clientHeight, fixedCell.clientHeight);
3713 });
3714 }
3715 if (footerContent) {
3716 const footerCellHeight = rows[rows.length - 1].childNodes[0].clientHeight;
3717 heights = [footerCellHeight];
3718 }
3719 }
3720 return heights;
3721 }
3722 resetScrollPosition() {
3723 const { scrollContainer: { current: scrollContainer } } = this;
3724 if (scrollContainer) {
3725 const { preservedScrollPosition: { left, top } } = this.state;
3726 if (left) {
3727 scrollContainer.scrollLeft = left;
3728 }
3729 if (top) {
3730 window.scrollTo(0, top);
3731 }
3732 }
3733 }
3734 setHeightsAndScrollPosition() {
3735 this.setState({ heights: this.tallestCellHeights() }, this.resetScrollPosition);
3736 }
3737 calculateColumnVisibilityData(collapsed) {
3738 const { table: { current: table }, scrollContainer: { current: scrollContainer }, dataTable: { current: dataTable } } = this;
3739 if (collapsed && table && scrollContainer && dataTable) {
3740 const headerCells = table.querySelectorAll('[class*=header]');
3741 const collapsedHeaderCells = Array.from(headerCells).slice(1);
3742 const fixedColumnWidth = headerCells[0].offsetWidth;
3743 const firstVisibleColumnIndex = collapsedHeaderCells.length - 1;
3744 const tableLeftVisibleEdge = scrollContainer.scrollLeft + fixedColumnWidth;
3745 const tableRightVisibleEdge = scrollContainer.scrollLeft + dataTable.offsetWidth;
3746 const tableData = {
3747 fixedColumnWidth,
3748 firstVisibleColumnIndex,
3749 tableLeftVisibleEdge,
3750 tableRightVisibleEdge
3751 };
3752 const columnVisibilityData = collapsedHeaderCells.map(measureColumn(tableData));
3753 const lastColumn = columnVisibilityData[columnVisibilityData.length - 1];
3754 return Object.assign({ fixedColumnWidth,
3755 columnVisibilityData }, getPrevAndCurrentColumns(tableData, columnVisibilityData), { isScrolledFarthestLeft: tableLeftVisibleEdge === fixedColumnWidth, isScrolledFarthestRight: lastColumn.rightEdge <= tableRightVisibleEdge });
3756 }
3757 return {
3758 columnVisibilityData: [],
3759 previousColumn: undefined,
3760 currentColumn: undefined
3761 };
3762 }
3763 scrollListener() {
3764 this.setState(prevState => Object.assign({}, this.calculateColumnVisibilityData(prevState.collapsed)));
3765 }
3766 navigateTable(direction) {
3767 const { currentColumn, previousColumn, fixedColumnWidth } = this.state;
3768 const { scrollContainer: { current: scrollContainer } } = this;
3769 const handleScroll = () => {
3770 if (!currentColumn || !previousColumn || !fixedColumnWidth) {
3771 return;
3772 }
3773 if (scrollContainer) {
3774 scrollContainer.scrollLeft = direction === 'right' ? currentColumn.rightEdge - fixedColumnWidth : previousColumn.leftEdge - fixedColumnWidth;
3775 requestAnimationFrame(() => {
3776 this.setState(prevState => Object.assign({}, this.calculateColumnVisibilityData(prevState.collapsed)));
3777 });
3778 }
3779 };
3780 return handleScroll;
3781 }
3782 renderTotals(total, index) {
3783 const id = `totals-cell-${index}`;
3784 const { heights } = this.state;
3785 const { truncate = false } = this.props;
3786 let content;
3787 let contentType;
3788 if (index === 0) {
3789 content = this.totalsRowHeading;
3790 }
3791 if (total !== '' && index > 0) {
3792 contentType = 'numeric';
3793 content = total;
3794 }
3795 return createElement(Cell$2, { total: true, fixed: index === 0, key: id, height: heights[1], content: content, contentType: contentType, truncate: truncate });
3796 }
3797 defaultRenderRow(row, index) {
3798 const className = classNames$1(styles$31.TableRow);
3799 const { columnContentTypes, totals, footerContent, truncate = false } = this.props;
3800 const { heights } = this.state;
3801 const bodyCellHeights = totals ? heights.slice(2) : heights.slice(1);
3802 if (footerContent) {
3803 bodyCellHeights.pop();
3804 }
3805 return createElement(
3806 'tr',
3807 { key: `row-${index}`, className: className },
3808 row.map((content, cellIndex) => {
3809 const id = `cell-${cellIndex}-row-${index}`;
3810 return createElement(Cell$2, { key: id, height: bodyCellHeights[index], content: content, contentType: columnContentTypes[cellIndex], fixed: cellIndex === 0, truncate: truncate });
3811 })
3812 );
3813 }
3814 renderFooter() {
3815 const { heights } = this.state;
3816 const footerCellHeight = heights[heights.length - 1];
3817 return createElement(Cell$2, { footer: true, height: footerCellHeight, content: this.props.footerContent, truncate: this.props.truncate });
3818 }
3819 defaultOnSort(headingIndex) {
3820 const { onSort, truncate, defaultSortDirection = 'ascending', initialSortColumnIndex } = this.props;
3821 const { sortDirection, sortedColumnIndex = initialSortColumnIndex } = this.state;
3822 let newSortDirection = defaultSortDirection;
3823 if (sortedColumnIndex === headingIndex) {
3824 newSortDirection = sortDirection === 'ascending' ? 'descending' : 'ascending';
3825 }
3826 const handleSort = () => {
3827 this.setState({
3828 sortDirection: newSortDirection,
3829 sortedColumnIndex: headingIndex
3830 }, () => {
3831 if (onSort) {
3832 onSort(headingIndex, newSortDirection);
3833 if (!truncate && this.scrollContainer.current) {
3834 const preservedScrollPosition = {
3835 left: this.scrollContainer.current.scrollLeft,
3836 top: window.scrollY
3837 };
3838 this.setState({ preservedScrollPosition });
3839 this.handleResize();
3840 }
3841 }
3842 });
3843 };
3844 return handleSort;
3845 }
3846}
3847__decorate([autobind, debounce()], DataTable$1.prototype, "handleResize", null);
3848__decorate([autobind], DataTable$1.prototype, "tallestCellHeights", null);
3849__decorate([autobind], DataTable$1.prototype, "resetScrollPosition", null);
3850__decorate([autobind], DataTable$1.prototype, "setHeightsAndScrollPosition", null);
3851__decorate([autobind], DataTable$1.prototype, "calculateColumnVisibilityData", null);
3852__decorate([autobind], DataTable$1.prototype, "scrollListener", null);
3853__decorate([autobind], DataTable$1.prototype, "navigateTable", null);
3854__decorate([autobind], DataTable$1.prototype, "renderTotals", null);
3855__decorate([autobind], DataTable$1.prototype, "defaultRenderRow", null);
3856__decorate([autobind], DataTable$1.prototype, "renderFooter", null);
3857__decorate([autobind], DataTable$1.prototype, "defaultOnSort", null);
3858function measureColumn(tableData) {
3859 return function (column, index) {
3860 const { firstVisibleColumnIndex, tableLeftVisibleEdge: tableStart, tableRightVisibleEdge: tableEnd, fixedColumnWidth } = tableData;
3861 const leftEdge = column.offsetLeft + fixedColumnWidth;
3862 const rightEdge = leftEdge + column.offsetWidth;
3863 const isVisibleLeft = isEdgeVisible(leftEdge, tableStart, tableEnd);
3864 const isVisibleRight = isEdgeVisible(rightEdge, tableStart, tableEnd);
3865 const isVisible = isVisibleLeft || isVisibleRight;
3866 if (isVisible) {
3867 tableData.firstVisibleColumnIndex = Math.min(firstVisibleColumnIndex, index);
3868 }
3869 return { leftEdge, rightEdge, isVisible };
3870 };
3871}
3872function isEdgeVisible(position, start, end) {
3873 const minVisiblePixels = 30;
3874 return position >= start + minVisiblePixels && position <= end - minVisiblePixels;
3875}
3876function getPrevAndCurrentColumns(tableData, columnData) {
3877 const { firstVisibleColumnIndex } = tableData;
3878 const previousColumnIndex = Math.max(firstVisibleColumnIndex - 1, 0);
3879 const previousColumn = columnData[previousColumnIndex];
3880 const currentColumn = columnData[firstVisibleColumnIndex];
3881 return { previousColumn, currentColumn };
3882}
3883var DataTable$2 = withAppProvider()(DataTable$1);
3884
3885function DatePreference$1({ children }) {
3886 const datePreference = "Spelled";
3887 const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
3888 const d = new Date(children);
3889 //const now = new Date();
3890 var date = "";
3891 if (datePreference === "Spelled") {
3892 // 4 Mar, 5 Feb 2020
3893 date = d.getDate() + " " + months[d.getMonth()] + " " + d.getFullYear();
3894 } else if (datePreference === "American") {
3895 // 3/4/2018, 2/5/2020
3896 date = d.getMonth() + 1 + "/" + d.getDate() + "/" + d.getFullYear();
3897 } else {
3898 // 4/3/2018, 5/2/2020
3899 date = d.getDate() + "/" + (d.getMonth() + 1) + "/" + d.getFullYear();
3900 }
3901 return createElement(
3902 "span",
3903 null,
3904 date
3905 );
3906}
3907
3908var styles$32 = {
3909 "DatePicker": "p_hj",
3910 "MonthContainer": "p_xq",
3911 "Month": "p_ha",
3912 "Month-current": "p_kv",
3913 "Week": "p_jc",
3914 "WeekHeadings": "p_dl",
3915 "Day": "p_sp",
3916 "EmptyDay": "p_j0",
3917 "Day-today": "p_dk",
3918 "Day-inRange": "p_lk",
3919 "Day-selected": "p_sa",
3920 "Day-disabled": "p_cq",
3921 "Weekday": "p_vl",
3922 "Weekday-current": "p_vb",
3923 "Header": "p_nd",
3924 "Title": "p_aq",
3925};
3926
3927class Day$1 extends PureComponent {
3928 constructor() {
3929 super(...arguments);
3930 this.dayNode = null;
3931 }
3932 componentDidUpdate(prevProps) {
3933 if (!prevProps.focused && this.props.focused && this.dayNode) {
3934 this.dayNode.focus();
3935 }
3936 }
3937 render() {
3938 const { day, focused, onClick, onHover = noop, onFocus = noop, selected, inRange, inHoveringRange, disabled, polaris: { intl } } = this.props;
3939 const handleHover = onHover.bind(null, day);
3940 if (!day) {
3941 return createElement('div', { className: styles$32.EmptyDay, onMouseOver: handleHover });
3942 }
3943 const handleClick = onClick && !disabled ? onClick.bind(null, day) : noop;
3944 const today = isSameDay(new Date(), day);
3945 const className = classNames$1(styles$32.Day, selected && styles$32['Day-selected'], disabled && styles$32['Day-disabled'], today && styles$32['Day-today'], (inRange || inHoveringRange) && !disabled && styles$32['Day-inRange']);
3946 const date = day.getDate();
3947 const tabIndex = (focused || selected || today || date === 1) && !disabled ? 0 : -1;
3948 const ariaLabel = [`${today ? intl.translate('Polaris.DatePicker.today') : ''}`, `${Months[day.getMonth()]} `, `${date} `, `${day.getFullYear()}`].join('');
3949 return createElement(
3950 'button',
3951 {
3952 // eslint-disable-next-line react/jsx-no-bind
3953 onFocus: onFocus.bind(null, day), type: 'button', ref: this.setNode, tabIndex: tabIndex, className: className, onMouseOver: handleHover
3954 // eslint-disable-next-line react/jsx-no-bind
3955 , onClick: handleClick, 'aria-label': ariaLabel, 'aria-selected': selected, 'aria-disabled': disabled, role: 'gridcell' },
3956 date
3957 );
3958 }
3959 setNode(node) {
3960 this.dayNode = node;
3961 }
3962}
3963__decorate([autobind], Day$1.prototype, "setNode", null);
3964var Day$2 = withAppProvider()(Day$1);
3965
3966function Weekday$1({ label, title, current }) {
3967 const className = classNames$1(styles$32.Weekday, current && styles$32['Weekday-current']);
3968 return createElement(
3969 'div',
3970 { 'aria-label': Weekdays[label], className: className },
3971 title
3972 );
3973}
3974
3975const WEEKDAYS = [Weekdays.Sunday, Weekdays.Monday, Weekdays.Tuesday, Weekdays.Wednesday, Weekdays.Thursday, Weekdays.Friday, Weekdays.Saturday];
3976function Month$1({ focusedDate, selected, hoverDate, disableDatesBefore, disableDatesAfter, allowRange, onChange = noop, onHover = noop, onFocus = noop, month, year, weekStartsOn }) {
3977 const isInHoveringRange = allowRange ? hoveringDateIsInRange : () => false;
3978 const now = new Date();
3979 const current = now.getMonth() === month && now.getFullYear() === year;
3980 const className = classNames$1(styles$32.Title, current && styles$32['Month-current']);
3981 const weeks = getWeeksForMonth(month, year, weekStartsOn);
3982 const weekdays = getWeekdaysOrdered(weekStartsOn).map(weekday => createElement(Weekday$1, { key: weekday, title: abbreviationForWeekday(weekday), current: current && new Date().getDay() === weekday, label: weekday }));
3983 function handleDateClick(selectedDate) {
3984 onChange(getNewRange(allowRange && selected, selectedDate));
3985 }
3986 function renderWeek(day, dayIndex) {
3987 if (day == null) {
3988 const lastDayOfMonth = new Date(year, month + 1, 0);
3989 return (
3990 // eslint-disable-next-line react/jsx-no-bind
3991 createElement(Day$2, { key: dayIndex, onHover: onHover.bind(null, lastDayOfMonth) })
3992 );
3993 }
3994 const disabled = disableDatesBefore && isDateBefore(day, disableDatesBefore) || disableDatesAfter && isDateAfter(day, disableDatesAfter);
3995 return createElement(Day$2, { focused: focusedDate != null && isSameDay(day, focusedDate), day: day, key: dayIndex, onFocus: onFocus, onClick: handleDateClick, onHover: onHover, selected: selected != null && dateIsSelected(day, selected), inRange: selected != null && dateIsInRange(day, selected), disabled: disabled, inHoveringRange: selected != null && hoverDate != null && isInHoveringRange(day, selected, hoverDate) });
3996 }
3997 const weeksMarkup = weeks.map((week, index) => createElement(
3998 'div',
3999 { role: 'row', className: styles$32.Week, key: index },
4000 week.map(renderWeek)
4001 ));
4002 return createElement(
4003 'div',
4004 { role: 'grid', className: styles$32.Month },
4005 createElement(
4006 'div',
4007 { className: className },
4008 Months[month],
4009 ' ',
4010 year
4011 ),
4012 createElement(
4013 'div',
4014 { role: 'rowheader', className: styles$32.WeekHeadings },
4015 weekdays
4016 ),
4017 weeksMarkup
4018 );
4019}
4020function hoveringDateIsInRange(day, range, hoverEndDate) {
4021 if (day == null) {
4022 return false;
4023 }
4024 const { start, end } = range;
4025 return Boolean(start === end && day > start && day <= hoverEndDate);
4026}
4027function getWeekdaysOrdered(weekStartsOn) {
4028 const weekDays = [...WEEKDAYS];
4029 const restOfDays = weekDays.splice(weekStartsOn);
4030 return [...restOfDays, ...weekDays];
4031}
4032
4033class DatePicker$1 extends PureComponent {
4034 constructor() {
4035 super(...arguments);
4036 this.state = {
4037 hoverDate: undefined,
4038 focusDate: undefined
4039 };
4040 }
4041 componentDidUpdate(prevProps) {
4042 const selectedPropDidChange = !isSameSelectedDate(prevProps.selected, this.props.selected);
4043 if (selectedPropDidChange) {
4044 this.resetFocus();
4045 }
4046 }
4047 render() {
4048 const { id, selected, month, year, allowRange, multiMonth, disableDatesBefore, disableDatesAfter, weekStartsOn = Weekdays.Sunday, polaris: { intl } } = this.props;
4049 const { hoverDate, focusDate } = this.state;
4050 const showNextYear = getNextDisplayYear(month, year);
4051 const showNextMonth = getNextDisplayMonth(month);
4052 const showNextToNextYear = getNextDisplayYear(showNextMonth, showNextYear);
4053 const showNextToNextMonth = getNextDisplayMonth(showNextMonth);
4054 const showPreviousYear = getPreviousDisplayYear(month, year);
4055 const showPreviousMonth = getPreviousDisplayMonth(month);
4056 const previousMonthName = Months[showPreviousMonth];
4057 const nextMonth = multiMonth ? Months[showNextToNextMonth] : Months[showNextMonth];
4058 const nextYear = multiMonth ? showNextToNextYear : showNextYear;
4059 const secondDatePicker = multiMonth ? createElement(Month$1, { onFocus: this.handleFocus, focusedDate: focusDate, month: showNextMonth, year: showNextYear, selected: deriveRange(selected), hoverDate: hoverDate, onChange: this.handleDateSelection, onHover: this.handleHover, disableDatesBefore: disableDatesBefore, disableDatesAfter: disableDatesAfter, allowRange: allowRange, weekStartsOn: weekStartsOn }) : null;
4060 return createElement(
4061 'div',
4062 { id: id, className: styles$32.DatePicker, onKeyDown: handleKeyDown, onKeyUp: this.handleKeyUp },
4063 createElement(
4064 'div',
4065 { className: styles$32.Header },
4066 createElement(Button$2, { plain: true, icon: 'arrowLeft', accessibilityLabel: intl.translate('Polaris.DatePicker.previousMonth', {
4067 previousMonthName,
4068 showPreviousYear
4069 })
4070 // eslint-disable-next-line react/jsx-no-bind
4071 , onClick: this.handleMonthChangeClick.bind(null, showPreviousMonth, showPreviousYear) }),
4072 createElement(Button$2, { plain: true, icon: 'arrowRight', accessibilityLabel: intl.translate('Polaris.DatePicker.nextMonth', {
4073 nextMonth,
4074 nextYear
4075 })
4076 // eslint-disable-next-line react/jsx-no-bind
4077 , onClick: this.handleMonthChangeClick.bind(null, showNextMonth, showNextYear) })
4078 ),
4079 createElement(
4080 'div',
4081 { className: styles$32.MonthContainer },
4082 createElement(Month$1, { onFocus: this.handleFocus, focusedDate: focusDate, month: month, year: year, selected: deriveRange(selected), hoverDate: hoverDate, onChange: this.handleDateSelection, onHover: this.handleHover, disableDatesBefore: disableDatesBefore, disableDatesAfter: disableDatesAfter, allowRange: allowRange, weekStartsOn: weekStartsOn }),
4083 secondDatePicker
4084 )
4085 );
4086 }
4087 handleFocus(date) {
4088 this.setState({ focusDate: date });
4089 }
4090 resetFocus() {
4091 this.setState({ focusDate: undefined });
4092 }
4093 handleKeyUp(event) {
4094 const { key } = event;
4095 const { selected, disableDatesBefore, disableDatesAfter } = this.props;
4096 const { focusDate } = this.state;
4097 const range = deriveRange(selected);
4098 const focusedDate = focusDate || range && range.start;
4099 if (focusedDate == null) {
4100 return;
4101 }
4102 if (key === 'ArrowUp') {
4103 const previousWeek = new Date(focusedDate);
4104 previousWeek.setDate(focusedDate.getDate() - 7);
4105 if (!(disableDatesBefore && isDateBefore(previousWeek, disableDatesBefore))) {
4106 this.setFocusDateAndHandleMonthChange(previousWeek);
4107 }
4108 }
4109 if (key === 'ArrowDown') {
4110 const nextWeek = new Date(focusedDate);
4111 nextWeek.setDate(focusedDate.getDate() + 7);
4112 if (!(disableDatesAfter && isDateAfter(nextWeek, disableDatesAfter))) {
4113 this.setFocusDateAndHandleMonthChange(nextWeek);
4114 }
4115 }
4116 if (key === 'ArrowRight') {
4117 const tomorrow = new Date(focusedDate);
4118 tomorrow.setDate(focusedDate.getDate() + 1);
4119 if (!(disableDatesAfter && isDateAfter(tomorrow, disableDatesAfter))) {
4120 this.setFocusDateAndHandleMonthChange(tomorrow);
4121 }
4122 }
4123 if (key === 'ArrowLeft') {
4124 const yesterday = new Date(focusedDate);
4125 yesterday.setDate(focusedDate.getDate() - 1);
4126 if (!(disableDatesBefore && isDateBefore(yesterday, disableDatesBefore))) {
4127 this.setFocusDateAndHandleMonthChange(yesterday);
4128 }
4129 }
4130 }
4131 setFocusDateAndHandleMonthChange(date) {
4132 const { onMonthChange } = this.props;
4133 if (onMonthChange) {
4134 onMonthChange(date.getMonth(), date.getFullYear());
4135 }
4136 this.setState({
4137 hoverDate: date,
4138 focusDate: date
4139 });
4140 }
4141 handleDateSelection(range) {
4142 const { end } = range;
4143 const { onChange = noop } = this.props;
4144 this.setState({ hoverDate: end, focusDate: new Date(end) }, () => onChange(range));
4145 }
4146 handleMonthChangeClick(month, year) {
4147 const { onMonthChange } = this.props;
4148 if (!onMonthChange) {
4149 return;
4150 }
4151 this.setState({
4152 focusDate: undefined
4153 });
4154 onMonthChange(month, year);
4155 }
4156 handleHover(date) {
4157 this.setState({
4158 hoverDate: date
4159 });
4160 }
4161}
4162__decorate([autobind], DatePicker$1.prototype, "handleFocus", null);
4163__decorate([autobind], DatePicker$1.prototype, "resetFocus", null);
4164__decorate([autobind], DatePicker$1.prototype, "handleKeyUp", null);
4165__decorate([autobind], DatePicker$1.prototype, "setFocusDateAndHandleMonthChange", null);
4166__decorate([autobind], DatePicker$1.prototype, "handleDateSelection", null);
4167__decorate([autobind], DatePicker$1.prototype, "handleMonthChangeClick", null);
4168__decorate([autobind], DatePicker$1.prototype, "handleHover", null);
4169function handleKeyDown(event) {
4170 const { key } = event;
4171 if (key === 'ArrowUp' || key === 'ArrowDown' || key === 'ArrowLeft' || key === 'ArrowRight') {
4172 event.preventDefault();
4173 event.stopPropagation();
4174 }
4175}
4176function isSameSelectedDate(previousDate, currentDate) {
4177 if (previousDate == null || currentDate == null) {
4178 return previousDate == null && currentDate == null;
4179 }
4180 if (previousDate instanceof Date || currentDate instanceof Date) {
4181 return previousDate instanceof Date && currentDate instanceof Date && isSameDay(previousDate, currentDate);
4182 }
4183 return isSameDay(previousDate.start, currentDate.start) && isSameDay(previousDate.end, currentDate.end);
4184}
4185function deriveRange(selected) {
4186 return selected instanceof Date ? { start: selected, end: selected } : selected;
4187}
4188var DatePicker$2 = withAppProvider()(DatePicker$1);
4189
4190var styles$33 = {
4191 "DescriptionList": "p_bw",
4192 "Term": "p_on",
4193 "Description": "p_uj",
4194 "dense": "p_am",
4195};
4196
4197const getUniqueTermKey = createUniqueIDFactory(`Term`);
4198const getUniqueDescriptionKey = createUniqueIDFactory(`Description`);
4199function DescriptionList$1({ items, dense }) {
4200 const terms = items.reduce((allTerms, { term, description }) => [...allTerms, createElement(
4201 'dt',
4202 { key: getUniqueTermKey(), className: styles$33.Term },
4203 term
4204 ), createElement(
4205 'dd',
4206 { key: getUniqueDescriptionKey(), className: styles$33.Description },
4207 description ? description : '--'
4208 )], []);
4209 const className = classNames$1(styles$33.DescriptionList, dense && styles$33.dense);
4210 return createElement(
4211 'dl',
4212 { className: className },
4213 terms
4214 );
4215}
4216
4217var styles$34 = {
4218 "DisplayText": "p_ne",
4219 "sizeSmall": "p_wx",
4220 "sizeMedium": "p_tb",
4221 "sizeLarge": "p_ti",
4222 "sizeExtraLarge": "p_ww",
4223};
4224
4225function DisplayText$1({ element: Element = 'p', children, size = 'medium' }) {
4226 const className = classNames$1(styles$34.DisplayText, size && styles$34[variationName$1('size', size)]);
4227 return createElement(
4228 Element,
4229 { className: className },
4230 children
4231 );
4232}
4233
4234var styles$35 = {
4235 "hidden": "p_f9",
4236 "LabelWrapper": "p_e4",
4237 "HelpText": "p_w5",
4238 "Error": "p_we",
4239};
4240
4241function Labelled$1(_a) {
4242 var { id, label, error, action, helpText, children, labelHidden, optional } = _a,
4243 rest = __rest(_a, ["id", "label", "error", "action", "helpText", "children", "labelHidden", "optional"]);
4244 const className = classNames$1(labelHidden && styles$35.hidden);
4245 const actionMarkup = action ? buttonFrom(action, { plain: true }) : null;
4246 const helpTextMarkup = helpText ? createElement(
4247 'div',
4248 { className: styles$35.HelpText, id: helpTextID$1(id) },
4249 helpText
4250 ) : null;
4251 const errorMarkup = error && typeof error !== 'boolean' && createElement(
4252 'div',
4253 { className: styles$35.Error },
4254 createElement(InlineError$1, { message: error, fieldID: id })
4255 );
4256 const labelMarkup = label ? createElement(
4257 'div',
4258 { className: styles$35.LabelWrapper },
4259 createElement(
4260 Label$1,
4261 Object.assign({ id: id }, rest, { hidden: false, optional: optional }),
4262 label
4263 ),
4264 actionMarkup
4265 ) : null;
4266 return createElement(
4267 'div',
4268 { className: className },
4269 labelMarkup,
4270 children,
4271 errorMarkup,
4272 helpTextMarkup
4273 );
4274}
4275
4276function helpTextID$1(id) {
4277 return `${id}HelpText`;
4278}
4279
4280function withContext$1(Consumer) {
4281 return function addContext(WrappedComponent) {
4282 // eslint-disable-next-line react/prefer-stateless-function
4283 class WithContext extends Component {
4284 render() {
4285 return createElement(
4286 Consumer,
4287 null,
4288 ctx => {
4289 const _a = this.props,
4290 { context } = _a,
4291 rest = __rest(_a, ["context"]);
4292 return createElement(WrappedComponent, Object.assign({}, rest, { context: Object.assign({}, context, ctx) }));
4293 }
4294 );
4295 }
4296 }
4297 const FinalComponent = hoistStatics(WithContext, WrappedComponent);
4298 return FinalComponent;
4299 };
4300}
4301
4302const { Provider: Provider$1, Consumer: Consumer$1 } = createContext({
4303 size: 'extraLarge',
4304 type: 'file'
4305});
4306
4307var IconDragDrop = {"viewBox":"0 0 20 20","body":"<path fill-rule=\"evenodd\" d=\"M19.317 12.052L14 10.28V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h5.28l1.772 5.317a.998.998 0 0 0 1.843.13l1.85-3.701 3.703-1.851a1 1 0 0 0-.131-1.843zM2 16a1 1 0 1 0-2 0v1a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2M16 2a1 1 0 1 0 2 0V1a1 1 0 0 0-1-1h-1a1 1 0 1 0 0 2M6 2h1a1 1 0 1 0 0-2H6a1 1 0 1 0 0 2m5 0h1a1 1 0 1 0 0-2h-1a1 1 0 1 0 0 2M2 0H1a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0 1 1 0 1 0 0-2M1 8a1 1 0 0 0 1-1V6a1 1 0 1 0-2 0v1a1 1 0 0 0 1 1m0 5a1 1 0 0 0 1-1v-1a1 1 0 1 0-2 0v1a1 1 0 0 0 1 1m13.553 1.105a1.002 1.002 0 0 0-.447.447l-.921 1.841-1.604-4.812 4.813 1.604-1.841.92zM6 12.002V6h6v3.612l-1.683-.561a.998.998 0 1 0-1.265 1.265L9.612 12H6zM7 16H6a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2M17 5a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0V6a1 1 0 0 0-1-1\"/>"};
4308
4309var AssetFileUpload = 'data:image/svg+xml;base64,PH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DEuMzEtMS44MS4wMi0zLjYxLjEzLTUuNDEuMTQtMS44LjAxLTMuNjEuMjYtNS40Mi4xN2EuNDMuNDMgMCAwIDEtLjQxLS40NS40Ni40NiAwIDAgMSAwLS4yYy40NS0uNzcuOS0xLjU0IDEuMjktMi4zNC4zOS0uOC44OC0xLjU1IDEuMy0yLjMzLjg4LTEuNTMgMS41OC0zLjE3IDIuNDEtNC43N0w3NiA1Ni4zNyA3Ny4yNyA1NGMuNzMtMS42IDEuNTctMy4xOSAyLjM2LTQuNzh6IiBmaWxsPSIjREVFNEY1IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48Y2lyY2xlIGZpbGw9IiNERUU0RjUiIGZpbGwtcnVsZT0ibm9uemVybyIgY3g9IjEwOC42NCIgY3k9Ijg4LjI1IiByPSIxOS41Ii8+PHBhdGggZD0iTTEwOC42NCA3OC42NnYxOS4xOG03LjE4LTkuNTlsLTcuMTgtOS41OS03LjE4IDkuNTkiIHN0cm9rZT0iI0ZGRiIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L2c+PC9zdmc+Cg==';
4312
4313var styles$36 = {
4314 "FileUpload": "p_km",
4315 "Image": "p_j8",
4316 "sizeExtraLarge": "p_yd",
4317 "sizeLarge": "p_v6",
4318};
4319
4320class FileUpload$1 extends Component {
4321 constructor(props) {
4322 super(props);
4323 const { polaris: { intl: { translate } }, context: { type } } = props;
4324 const suffix = capitalize(type);
4325 this.state = {
4326 actionTitle: translate(`Polaris.DropZone.FileUpload.actionTitle${suffix}`),
4327 actionHint: translate(`Polaris.DropZone.FileUpload.actionHint${suffix}`)
4328 };
4329 }
4330 updateStateFromProps(props) {
4331 const { actionTitle, actionHint } = this.state;
4332 if (props.actionTitle && props.actionTitle !== actionTitle) {
4333 this.setState({ actionTitle: props.actionTitle });
4334 }
4335 if (props.actionHint && props.actionHint !== actionHint) {
4336 this.setState({ actionHint: props.actionHint });
4337 }
4338 }
4339 // eslint-disable-next-line react/no-deprecated
4340 componentWillReceiveProps(props) {
4341 this.updateStateFromProps(props);
4342 }
4343 // eslint-disable-next-line react/no-deprecated
4344 componentWillMount() {
4345 this.updateStateFromProps(this.props);
4346 }
4347 render() {
4348 const { context: { size, type } } = this.props;
4349 const { actionTitle, actionHint } = this.state;
4350 const imageClasses = classNames$1(styles$36.Image, size && size === 'extraLarge' && styles$36.sizeExtraLarge, size && size === 'large' && styles$36.sizeLarge);
4351 const extraLargeView = size === 'extraLarge' ? createElement(
4352 Stack$1,
4353 { vertical: true },
4354 type === 'file' && createElement('img', { className: imageClasses, src: AssetFileUpload, alt: '' }),
4355 type === 'image' && createElement('img', { className: imageClasses, src: AssetImageUpload, alt: '' }),
4356 createElement(
4357 Button$2,
4358 null,
4359 actionTitle
4360 ),
4361 createElement(
4362 TextStyle$1,
4363 { variation: 'subdued' },
4364 actionHint
4365 )
4366 ) : null;
4367 const largeView = size === 'large' ? createElement(
4368 Stack$1,
4369 { vertical: true, spacing: 'tight' },
4370 type === 'file' && createElement('img', { className: imageClasses, src: AssetFileUpload, alt: '' }),
4371 type === 'image' && createElement('img', { className: imageClasses, src: AssetImageUpload, alt: '' }),
4372 createElement(
4373 Button$2,
4374 { size: 'slim' },
4375 actionTitle
4376 ),
4377 createElement(
4378 Caption$1,
4379 null,
4380 createElement(
4381 TextStyle$1,
4382 { variation: 'subdued' },
4383 actionHint
4384 )
4385 )
4386 ) : null;
4387 const mediumView = size === 'medium' ? createElement(
4388 Stack$1,
4389 { vertical: true, spacing: 'tight' },
4390 createElement(
4391 Link$2,
4392 null,
4393 actionTitle
4394 ),
4395 createElement(
4396 Caption$1,
4397 null,
4398 createElement(
4399 TextStyle$1,
4400 { variation: 'subdued' },
4401 actionHint
4402 )
4403 )
4404 ) : null;
4405 const smallView = size === 'small' ? createElement(
4406 Stack$1,
4407 { vertical: true, spacing: 'tight' },
4408 createElement(Icon$2, { source: IconDragDrop, color: 'inkLightest' })
4409 ) : null;
4410 return createElement(
4411 'div',
4412 { className: styles$36.FileUpload },
4413 smallView,
4414 mediumView,
4415 largeView,
4416 extraLargeView
4417 );
4418 }
4419}
4420var FileUpload$2 = compose$1(withContext$1(Consumer$1), withAppProvider(), withRef$1())(FileUpload$1);
4421
4422var IconAlertCircle = {"viewBox":"0 0 20 20","body":"<path fill-rule=\"evenodd\" d=\"M10 0C4.486 0 0 4.486 0 10s4.486 10 10 10 10-4.486 10-10S15.514 0 10 0m0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8m0-7a1 1 0 0 0 1-1V6a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1m0 1.9a1.1 1.1 0 1 0 0 2.2 1.1 1.1 0 0 0 0-2.2\"/>"};
4423
4424const dragEvents = ['dragover', 'dragenter', 'drop'];
4425function fileAccepted(file, accept) {
4426 return file.type === 'application/x-moz-file' || accepts(file, accept);
4427}
4428function getDataTransferFiles(event) {
4429 if (isDragEvent(event)) {
4430 const dt = event.dataTransfer;
4431 if (dt.files && dt.files.length) {
4432 return Array.from(dt.files);
4433 } else if (dt.items && dt.items.length) {
4434 // Chrome is the only browser that allows to read the file list on drag
4435 // events and uses `items` instead of `files` in this case.
4436 return Array.from(dt.items);
4437 }
4438 } else if (event.target && event.target.files) {
4439 // Return files from even when a file was selected from an upload dialog
4440 return Array.from(event.target.files);
4441 }
4442 return [];
4443}
4444function accepts(file, acceptedFiles) {
4445 if (file && acceptedFiles) {
4446 const fileName = file.name || '';
4447 const mimeType = file.type || '';
4448 const baseMimeType = mimeType.replace(/\/.*$/, '');
4449 const acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
4450 return acceptedFilesArray.some(type => {
4451 const validType = type.trim();
4452 if (validType.charAt(0) === '.') {
4453 return fileName.toLowerCase().endsWith(validType.toLowerCase());
4454 } else if (/\/\*$/.test(validType)) {
4455 // This is something like a image/* mime type
4456 return baseMimeType === validType.replace(/\/.*$/, '');
4457 }
4458 return mimeType === validType;
4459 });
4460 }
4461 return true;
4462}
4463function isDragEvent(event) {
4464 return dragEvents.indexOf(event.type) > 0;
4465}
4466
4467var styles$37 = {
4468 "DropZone": "p_pd",
4469 "hasOutline": "p_q3",
4470 "isDragging": "p_fa",
4471 "isDisabled": "p_o0",
4472 "sizeExtraLarge": "p_ui",
4473 "sizeLarge": "p_u9",
4474 "sizeMedium": "p_k9",
4475 "sizeSmall": "p_qe",
4476 "Container": "p_nq",
4477 "Overlay": "p_c4",
4478 "hasError": "p_v2",
4479};
4480
4481const getUniqueID$3 = createUniqueIDFactory('DropZone');
4482class DropZone$1 extends Component {
4483 constructor(props) {
4484 super(props);
4485 this.node = null;
4486 this.dropNode = null;
4487 this.dragTargets = [];
4488 const { polaris: { intl: { translate } }, type } = props;
4489 const suffix = capitalize(type);
4490 this.state = {
4491 type,
4492 id: props.id || getUniqueID$3(),
4493 size: 'extraLarge',
4494 dragging: false,
4495 error: false,
4496 overlayText: translate(`Polaris.DropZone.overlayText${suffix}`),
4497 errorOverlayText: translate(`Polaris.DropZone.errorOverlayText${suffix}`)
4498 };
4499 }
4500 static getDerivedStateFromProps(nextProps, prevState) {
4501 const { id, error, type, overlayText, errorOverlayText } = prevState;
4502 const newState = {};
4503 if (nextProps.id != null && id !== nextProps.id) {
4504 newState.id = nextProps.id || id;
4505 }
4506 if (nextProps.error != null && error !== nextProps.error) {
4507 newState.error = nextProps.error;
4508 }
4509 if (nextProps.type != null && type !== nextProps.type) {
4510 newState.type = nextProps.type;
4511 }
4512 if (nextProps.overlayText != null && overlayText !== nextProps.overlayText) {
4513 newState.overlayText = nextProps.overlayText;
4514 }
4515 if (nextProps.errorOverlayText != null && errorOverlayText !== nextProps.errorOverlayText) {
4516 newState.errorOverlayText = nextProps.errorOverlayText;
4517 }
4518 return Object.keys(newState).length ? newState : null;
4519 }
4520 get getContext() {
4521 return {
4522 size: this.state.size,
4523 type: this.state.type || 'file'
4524 };
4525 }
4526 render() {
4527 const { id, dragging, error, size, overlayText, errorOverlayText } = this.state;
4528 const { label, labelAction, labelHidden, children, disabled, outline, accept, active, overlay, allowMultiple } = this.props;
4529 const inputAttributes = {
4530 id,
4531 accept,
4532 disabled,
4533 type: 'file',
4534 multiple: allowMultiple,
4535 ref: this.setInputNode,
4536 onChange: this.handleDrop,
4537 autoComplete: 'off'
4538 };
4539 const classes = classNames$1(styles$37.DropZone, outline && styles$37.hasOutline, (active || dragging) && styles$37.isDragging, error && styles$37.hasError, size && size === 'extraLarge' && styles$37.sizeExtraLarge, size && size === 'large' && styles$37.sizeLarge, size && size === 'medium' && styles$37.sizeMedium, size && size === 'small' && styles$37.sizeSmall);
4540 const dragOverlay = (active || dragging) && !error && overlay ? createElement(
4541 'div',
4542 { className: styles$37.Overlay },
4543 createElement(
4544 Stack$1,
4545 { vertical: true, spacing: 'tight' },
4546 createElement(Icon$2, { source: IconDragDrop, color: 'blue' }),
4547 size === 'extraLarge' && createElement(
4548 DisplayText$1,
4549 { size: 'small', element: 'p' },
4550 overlayText
4551 ),
4552 (size === 'medium' || size === 'large') && createElement(
4553 Caption$1,
4554 null,
4555 overlayText
4556 )
4557 )
4558 ) : null;
4559 const dragErrorOverlay = dragging && error ? createElement(
4560 'div',
4561 { className: styles$37.Overlay },
4562 createElement(
4563 Stack$1,
4564 { vertical: true, spacing: 'tight' },
4565 createElement(Icon$2, { source: IconAlertCircle, color: 'red' }),
4566 size === 'extraLarge' && createElement(
4567 DisplayText$1,
4568 { size: 'small', element: 'p' },
4569 errorOverlayText
4570 ),
4571 (size === 'medium' || size === 'large') && createElement(
4572 Caption$1,
4573 null,
4574 overlayText
4575 )
4576 )
4577 ) : null;
4578 const dropZoneMarkup = createElement(
4579 'div',
4580 { ref: this.setNode, className: classes, 'aria-disabled': disabled, onClick: this.handleClick, onDragStart: handleDragStart },
4581 dragOverlay,
4582 dragErrorOverlay,
4583 createElement(
4584 'div',
4585 { className: styles$37.Container },
4586 children
4587 ),
4588 createElement(
4589 VisuallyHidden$1,
4590 null,
4591 createElement('input', inputAttributes)
4592 )
4593 );
4594 const labelledDropzoneMarkup = label ? createElement(
4595 Labelled$1,
4596 { id: id, label: label, action: labelAction, labelHidden: labelHidden },
4597 dropZoneMarkup
4598 ) : dropZoneMarkup;
4599 return createElement(
4600 Provider$1,
4601 { value: this.getContext },
4602 labelledDropzoneMarkup
4603 );
4604 }
4605 componentDidMount() {
4606 this.dragTargets = [];
4607 // eslint-disable-next-line react/no-did-mount-set-state
4608 this.setState({ error: this.props.error });
4609 if (!this.dropNode) {
4610 return;
4611 }
4612 addEventListener(this.dropNode, 'drop', this.handleDrop);
4613 addEventListener(this.dropNode, 'dragover', this.handleDragOver);
4614 addEventListener(this.dropNode, 'dragenter', this.handleDragEnter);
4615 addEventListener(this.dropNode, 'dragleave', this.handleDragLeave);
4616 addEventListener(window, 'resize', this.adjustSize);
4617 if (this.props.openFileDialog) {
4618 this.triggerFileDialog();
4619 }
4620 }
4621 componentWillUnmount() {
4622 if (!this.dropNode) {
4623 return;
4624 }
4625 removeEventListener(this.dropNode, 'drop', this.handleDrop);
4626 removeEventListener(this.dropNode, 'dragover', this.handleDragOver);
4627 removeEventListener(this.dropNode, 'dragenter', this.handleDragEnter);
4628 removeEventListener(this.dropNode, 'dragleave', this.handleDragLeave);
4629 removeEventListener(window, 'resize', this.adjustSize);
4630 }
4631 componentDidUpdate() {
4632 if (this.props.openFileDialog) {
4633 this.triggerFileDialog();
4634 }
4635 }
4636 triggerFileDialog() {
4637 this.open();
4638 if (this.props.onFileDialogClose) {
4639 this.props.onFileDialogClose();
4640 }
4641 }
4642 open() {
4643 if (!this.fileInputNode) {
4644 return;
4645 }
4646 this.fileInputNode.click();
4647 }
4648 adjustSize() {
4649 if (!this.node) {
4650 return;
4651 }
4652 let size = 'extraLarge';
4653 const width = this.node.getBoundingClientRect().width;
4654 if (width < 100) {
4655 size = 'small';
4656 } else if (width < 160) {
4657 size = 'medium';
4658 } else if (width < 300) {
4659 size = 'large';
4660 }
4661 this.setState({ size });
4662 }
4663 getValidatedFiles(files) {
4664 const { accept, allowMultiple, customValidator } = this.props;
4665 const acceptedFiles = [];
4666 const rejectedFiles = [];
4667 Array.from(files).forEach(file => {
4668 if (!fileAccepted(file, accept) || customValidator && !customValidator(file)) {
4669 rejectedFiles.push(file);
4670 } else {
4671 acceptedFiles.push(file);
4672 }
4673 });
4674 if (!allowMultiple) {
4675 acceptedFiles.splice(1, acceptedFiles.length);
4676 rejectedFiles.push(...acceptedFiles.slice(1));
4677 }
4678 return {
4679 files,
4680 acceptedFiles,
4681 rejectedFiles
4682 };
4683 }
4684 setNode(node) {
4685 const { dropOnPage } = this.props;
4686 this.node = node;
4687 this.dropNode = dropOnPage ? document : node;
4688 this.adjustSize();
4689 }
4690 setInputNode(node) {
4691 this.fileInputNode = node;
4692 }
4693 handleClick(event) {
4694 const { onClick, disabled } = this.props;
4695 if (disabled) {
4696 return;
4697 }
4698 return onClick ? onClick(event) : this.open();
4699 }
4700 handleDrop(event) {
4701 event.preventDefault();
4702 event.stopPropagation();
4703 const { disabled, onDrop, onDropAccepted, onDropRejected } = this.props;
4704 if (disabled) {
4705 return;
4706 }
4707 const fileList = getDataTransferFiles(event);
4708 const { files, acceptedFiles, rejectedFiles } = this.getValidatedFiles(fileList);
4709 this.dragTargets = [];
4710 this.setState({ dragging: false, error: rejectedFiles.length > 0 });
4711 if (onDrop) {
4712 onDrop(files, acceptedFiles, rejectedFiles);
4713 }
4714 if (onDropAccepted && acceptedFiles.length) {
4715 onDropAccepted(acceptedFiles);
4716 }
4717 if (onDropRejected && rejectedFiles.length) {
4718 onDropRejected(rejectedFiles);
4719 }
4720 }
4721 handleDragEnter(event) {
4722 event.preventDefault();
4723 event.stopPropagation();
4724 const { dragging } = this.state;
4725 const { disabled, onDragEnter } = this.props;
4726 if (disabled) {
4727 return;
4728 }
4729 const fileList = getDataTransferFiles(event);
4730 if (event.target && this.dragTargets.indexOf(event.target) === -1) {
4731 this.dragTargets.push(event.target);
4732 }
4733 if (dragging) {
4734 return false;
4735 }
4736 const { rejectedFiles } = this.getValidatedFiles(fileList);
4737 this.setState({ dragging: true, error: rejectedFiles.length > 0 });
4738 if (onDragEnter) {
4739 onDragEnter();
4740 }
4741 }
4742 handleDragOver(event) {
4743 event.preventDefault();
4744 event.stopPropagation();
4745 const { disabled, onDragOver } = this.props;
4746 if (disabled) {
4747 return;
4748 }
4749 if (onDragOver) {
4750 onDragOver();
4751 }
4752 return false;
4753 }
4754 handleDragLeave(event) {
4755 event.preventDefault();
4756 const { disabled, onDragLeave } = this.props;
4757 if (disabled) {
4758 return;
4759 }
4760 this.dragTargets = this.dragTargets.filter(el => {
4761 return el !== event.target && this.dropNode && this.dropNode.contains(el);
4762 });
4763 if (this.dragTargets.length > 0) {
4764 return;
4765 }
4766 this.setState({ dragging: false, error: false });
4767 if (onDragLeave) {
4768 onDragLeave();
4769 }
4770 }
4771}
4772DropZone$1.FileUpload = FileUpload$2;
4773DropZone$1.defaultProps = {
4774 type: 'file',
4775 outline: true,
4776 overlay: true,
4777 allowMultiple: true
4778};
4779__decorate([autobind], DropZone$1.prototype, "triggerFileDialog", null);
4780__decorate([autobind], DropZone$1.prototype, "open", null);
4781__decorate([autobind, debounce(50, { trailing: true })], DropZone$1.prototype, "adjustSize", null);
4782__decorate([autobind], DropZone$1.prototype, "getValidatedFiles", null);
4783__decorate([autobind], DropZone$1.prototype, "setNode", null);
4784__decorate([autobind], DropZone$1.prototype, "setInputNode", null);
4785__decorate([autobind], DropZone$1.prototype, "handleClick", null);
4786__decorate([autobind], DropZone$1.prototype, "handleDrop", null);
4787__decorate([autobind], DropZone$1.prototype, "handleDragEnter", null);
4788__decorate([autobind], DropZone$1.prototype, "handleDragOver", null);
4789__decorate([autobind], DropZone$1.prototype, "handleDragLeave", null);
4790function handleDragStart(event) {
4791 event.preventDefault();
4792 event.stopPropagation();
4793}
4794var DropZone$2 = withAppProvider()(DropZone$1);
4795
4796var emptySearch =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wIDEgLjEzMy41MDYuMjk0LjI5NCAwIDAgMS0uNDc3LjE3em00LjEgMS4zNDNjLjA2Ny0uNTUzLS41MDctMS4xLS45NjItLjkyMWEuOS45IDAgMCAwLS4xNjcgMS4zNzIuNjg3LjY4NyAwIDAgMCAxLjEyOS0uNDUxIiBmaWxsPSIjZmZjNzU3Ii8+PHBhdGggZD0iTTcxLjQxIDQ2LjE1NGMtLjAyMi0uMTg4LS4yNDItLjMyNC0uMzI1LS40NTVsLS4wMzgtLjAzNWMtLjAwOC0uMDI5LS4wMjctLjA3OC0uMDQxLS4wNjJhLjE3Mi4xNzIgMCAwIDAtLjA5My4wMjVjLS4wNTUuMDQyLS4yNDEuMTI0LS4yNjMuMjktLjAxMi4zMy4yNDUuNTg5LjQuNTIzLjA3Mi0uMDUuMTUzLjAwNS4yNzMtLjAyMmEuMjMyLjIzMiAwIDAgMCAuMDg2LS4yNjMuNDE2LjQxNiAwIDEgMSAuODA2LS4xMjdsLS4wMTEuMjI0YTEuMSAxLjEgMCAwIDEtLjQxNS44MDkgMS4yNTggMS4yNTggMCAwIDEtLjkuMTMgMS4wMzkgMS4wMzkgMCAwIDEtLjcxMi0uNTUyIDEuNDggMS40OCAwIDAgMS0uMTQ5LS44LjkxMi45MTIgMCAwIDEgLjMzOC0uODI5Ljk4Ni45ODYgMCAwIDEgLjUyOC0uMTExYy4wODYuMDI2LjE2Mi0uMDE2LjI0NS0uMDIxYS43NjIuNzYyIDAgMCAxIC4yMTEuMDk0IDIuODg2IDIuODg2IDAgMCAxIC4zMDkuMjU3Yy4xLjA2OC4yNTkuMTA2LjMyMy4yMjhhMS4wOTIgMS4wOTIgMCAwIDEgLjIyNS44LjQuNCAwIDAgMS0uNzg1LS4wMTV6IiBmaWxsPSIjZmZjNzU3Ii8+PC9zdmc+Cg==';
4797
4798var styles$38 = {
4799 "Image": "p_d9",
4800};
4801
4802class EmptySearchResult$1 extends PureComponent {
4803 render() {
4804 const { title, description, withIllustration, polaris: { intl } } = this.props;
4805 const altText = intl.translate('Polaris.EmptySearchResult.altText');
4806 const descriptionMarkup = description ? createElement(
4807 'p',
4808 null,
4809 description
4810 ) : null;
4811 const illustrationMarkup = withIllustration ? createElement(Image$1, { alt: altText, source: emptySearch, className: styles$38.Image, draggable: false }) : null;
4812 return createElement(
4813 Stack$1,
4814 { alignment: 'center', vertical: true },
4815 illustrationMarkup,
4816 createElement(
4817 DisplayText$1,
4818 { size: 'small' },
4819 title
4820 ),
4821 createElement(
4822 TextStyle$1,
4823 { variation: 'subdued' },
4824 descriptionMarkup
4825 )
4826 );
4827 }
4828}
4829var EmptySearchResult$2 = withAppProvider()(EmptySearchResult$1);
4830
4831var styles$39 = {
4832 "EmptyState": "p_l6",
4833 "imageContained": "p_pv",
4834 "Image": "p_e5",
4835 "Section": "p_cs",
4836 "ImageContainer": "p_ms",
4837 "DetailsContainer": "p_fg",
4838 "Details": "p_p5",
4839 "Content": "p_un",
4840 "Actions": "p_pw",
4841};
4842
4843class EmptyState$1 extends PureComponent {
4844 render() {
4845 const { children, heading, image, largeImage, imageContained, action, secondaryAction } = this.props;
4846 const className = classNames$1(styles$39.EmptyState, imageContained && styles$39.imageContained);
4847 const imageMarkup = largeImage ? createElement(Image$1, { alt: '', role: 'presentation', className: styles$39.Image, source: largeImage, sourceSet: [{ source: image, descriptor: '568w' }, { source: largeImage, descriptor: '1136w' }], sizes: '(max-width: 568px) 60vw' }) : createElement(Image$1, { role: 'presentation', alt: '', className: styles$39.Image, source: image });
4848 const secondaryActionMarkup = secondaryAction ? buttonFrom(secondaryAction, { plain: true }) : null;
4849 return createElement(
4850 'div',
4851 { className: className },
4852 createElement(
4853 'div',
4854 { className: styles$39.Section },
4855 createElement(
4856 'div',
4857 { className: styles$39.DetailsContainer },
4858 createElement(
4859 'div',
4860 { className: styles$39.Details },
4861 createElement(
4862 TextContainer$1,
4863 null,
4864 createElement(
4865 DisplayText$1,
4866 { size: 'medium' },
4867 heading
4868 ),
4869 createElement(
4870 'div',
4871 { className: styles$39.Content },
4872 children
4873 )
4874 ),
4875 createElement(
4876 'div',
4877 { className: styles$39.Actions },
4878 createElement(
4879 Stack$1,
4880 { alignment: 'center' },
4881 buttonFrom(action, { primary: true, size: 'large' }),
4882 secondaryActionMarkup
4883 )
4884 )
4885 )
4886 ),
4887 createElement(
4888 'div',
4889 { className: styles$39.ImageContainer },
4890 imageMarkup
4891 )
4892 )
4893 );
4894 }
4895}
4896
4897var styles$40 = {
4898 "Truncate": "p_mz",
4899};
4900
4901function Truncate$1({ children }) {
4902 return createElement(
4903 'span',
4904 { className: styles$40.Truncate },
4905 children
4906 );
4907}
4908
4909var styles$41 = {
4910 "ExceptionList": "p_l4",
4911 "Item": "p_v1",
4912 "Icon": "p_k6",
4913 "statusWarning": "p_ff",
4914 "statusCritical": "p_nm",
4915 "Bullet": "p_kf",
4916 "Title": "p_zf",
4917 "Description": "p_cg",
4918};
4919
4920function ExceptionList$1({ items: itemsList }) {
4921 const items = itemsList.map((item, index) => {
4922 const { status, icon, title, description, truncate = false } = item;
4923 const itemClasses = classNames$1(styles$41.Item, status && styles$41[variationName$1('status', status)]);
4924 const iconMarkup = icon ? createElement(Icon$2, { source: icon }) : createElement('span', { className: styles$41.Bullet });
4925 const titleMarkup = title && createElement(
4926 'span',
4927 { className: styles$41.Title },
4928 title
4929 );
4930 const descriptionMarkup = description && createElement(
4931 'span',
4932 { className: styles$41.Description },
4933 description
4934 );
4935 const Element = truncate ? Truncate$1 : Fragment;
4936 return createElement(
4937 'li',
4938 { className: itemClasses, key: index },
4939 createElement(
4940 'span',
4941 { className: styles$41.Icon },
4942 iconMarkup
4943 ),
4944 createElement(
4945 Element,
4946 null,
4947 titleMarkup,
4948 descriptionMarkup
4949 )
4950 );
4951 });
4952 return createElement(
4953 'ul',
4954 { className: styles$41.ExceptionList },
4955 items
4956 );
4957}
4958
4959class Form$1 extends PureComponent {
4960 render() {
4961 const { acceptCharset, action, autoComplete, children, encType, implicitSubmit = true, method, name, noValidate, target: target$$1 } = this.props;
4962 const autoCompleteInputs = normalizeAutoComplete(autoComplete);
4963 const submitMarkup = implicitSubmit ? createElement(
4964 VisuallyHidden$1,
4965 null,
4966 createElement('button', { type: 'submit', 'aria-hidden': 'true' })
4967 ) : null;
4968 return createElement(
4969 'form',
4970 { acceptCharset: acceptCharset, action: action, autoComplete: autoCompleteInputs, encType: encType, method: method, name: name, noValidate: noValidate, target: target$$1, onSubmit: this.handleSubmit },
4971 children,
4972 submitMarkup
4973 );
4974 }
4975 handleSubmit(event) {
4976 const { preventDefault = true, onSubmit } = this.props;
4977 if (!preventDefault) {
4978 return;
4979 }
4980 event.preventDefault();
4981 onSubmit(event);
4982 }
4983}
4984__decorate([autobind], Form$1.prototype, "handleSubmit", null);
4985function normalizeAutoComplete(autoComplete) {
4986 if (autoComplete == null) {
4987 return autoComplete;
4988 }
4989 return autoComplete ? 'on' : 'off';
4990}
4991
4992var styles$42 = {
4993 "DateTextField": "p_nv",
4994 "DatePicker": "p_uh",
4995};
4996
4997const VALID_DATE_REGEX = /^\d{4}-\d{1,2}-\d{1,2}$/;
4998var DateFilterOption;
4999(function (DateFilterOption) {
5000 DateFilterOption["PastWeek"] = "past_week";
5001 DateFilterOption["PastMonth"] = "past_month";
5002 DateFilterOption["PastQuarter"] = "past_quarter";
5003 DateFilterOption["PastYear"] = "past_year";
5004 DateFilterOption["ComingWeek"] = "coming_week";
5005 DateFilterOption["ComingMonth"] = "coming_month";
5006 DateFilterOption["ComingQuarter"] = "coming_quarter";
5007 DateFilterOption["ComingYear"] = "coming_year";
5008 DateFilterOption["OnOrBefore"] = "on_or_before";
5009 DateFilterOption["OnOrAfter"] = "on_or_after";
5010})(DateFilterOption || (DateFilterOption = {}));
5011class DateSelector$1 extends PureComponent {
5012 constructor() {
5013 super(...arguments);
5014 this.state = {
5015 datePickerMonth: this.now.getMonth(),
5016 datePickerYear: this.now.getFullYear(),
5017 initialConsumerFilterKey: this.props.filterKey
5018 };
5019 }
5020 render() {
5021 const { filterValue, filterKey, filterMinKey, filterMaxKey, dateOptionType, polaris: { intl } } = this.props;
5022 const { selectedDate, datePickerMonth, datePickerYear, userInputDateError } = this.state;
5023 const dateFilterOption = getDateFilterOption(filterValue, filterKey, filterMinKey, filterMaxKey);
5024 const showDatePredicate = dateFilterOption === DateFilterOption.OnOrBefore || dateFilterOption === DateFilterOption.OnOrAfter;
5025 const datePredicateMarkup = showDatePredicate && createElement(
5026 Fragment,
5027 null,
5028 createElement(
5029 'div',
5030 { className: styles$42.DateTextField },
5031 createElement(TextField$1, { label: intl.translate('Polaris.ResourceList.DateSelector.dateValueLabel'), placeholder: intl.translate('Polaris.ResourceList.DateSelector.dateValuePlaceholder'), value: this.dateTextFieldValue, error: userInputDateError, prefix: createElement(Icon$2, { source: 'calendar', color: 'skyDark' }), autoComplete: false, onChange: this.handleDateFieldChange, onBlur: this.handleDateBlur })
5032 ),
5033 createElement(
5034 'div',
5035 { className: styles$42.DatePicker },
5036 createElement(DatePicker$2, { selected: selectedDate, month: datePickerMonth, year: datePickerYear, onChange: this.handleDatePickerChange, onMonthChange: this.handleDatePickerMonthChange })
5037 )
5038 );
5039 return createElement(
5040 Fragment,
5041 null,
5042 createElement(Select$1, { label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.dateFilterLabel'), labelHidden: true, options: dateOptionType ? this.dateOptionTypes[dateOptionType] : this.dateOptionTypes.full, placeholder: intl.translate('Polaris.ResourceList.FilterValueSelector.selectFilterValuePlaceholder'), value: dateFilterOption, onChange: this.handleDateFilterOptionsChange }),
5043 datePredicateMarkup
5044 );
5045 }
5046 get dateComparatorOptions() {
5047 const { polaris: { intl } } = this.props;
5048 return [{
5049 value: DateFilterOption.OnOrBefore,
5050 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.OnOrBefore')
5051 }, {
5052 value: DateFilterOption.OnOrAfter,
5053 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.OnOrAfter')
5054 }];
5055 }
5056 get datePastOptions() {
5057 const { polaris: { intl } } = this.props;
5058 return [{
5059 value: DateFilterOption.PastWeek,
5060 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.PastWeek')
5061 }, {
5062 value: DateFilterOption.PastMonth,
5063 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.PastMonth')
5064 }, {
5065 value: DateFilterOption.PastQuarter,
5066 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.PastQuarter')
5067 }, {
5068 value: DateFilterOption.PastYear,
5069 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.PastYear')
5070 }];
5071 }
5072 get dateFutureOptions() {
5073 const { polaris: { intl } } = this.props;
5074 return [{
5075 value: DateFilterOption.ComingWeek,
5076 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.ComingWeek')
5077 }, {
5078 value: DateFilterOption.ComingMonth,
5079 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.ComingMonth')
5080 }, {
5081 value: DateFilterOption.ComingQuarter,
5082 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.ComingQuarter')
5083 }, {
5084 value: DateFilterOption.ComingYear,
5085 label: intl.translate('Polaris.ResourceList.DateSelector.SelectOptions.ComingYear')
5086 }];
5087 }
5088 get dateOptionTypes() {
5089 return {
5090 past: [...this.datePastOptions, ...this.dateComparatorOptions],
5091 future: [...this.dateFutureOptions, ...this.dateComparatorOptions],
5092 full: [...this.datePastOptions, ...this.dateFutureOptions, ...this.dateComparatorOptions]
5093 };
5094 }
5095 get now() {
5096 return new Date();
5097 }
5098 get dateTextFieldValue() {
5099 const { userInputDate, selectedDate } = this.state;
5100 if (!userInputDate && !selectedDate) {
5101 return undefined;
5102 }
5103 if (userInputDate !== undefined) {
5104 return userInputDate;
5105 }
5106 if (selectedDate) {
5107 return formatDateValue(selectedDate);
5108 }
5109 }
5110 handleDateFilterOptionsChange(newOption) {
5111 const { onFilterValueChange, onFilterKeyChange, filterMinKey, filterMaxKey } = this.props;
5112 const { initialConsumerFilterKey, selectedDate } = this.state;
5113 if (!initialConsumerFilterKey) {
5114 return;
5115 }
5116 if (newOption === DateFilterOption.OnOrBefore) {
5117 onFilterKeyChange(filterMaxKey);
5118 onFilterValueChange(selectedDate ? formatDateValue(selectedDate) : undefined);
5119 return;
5120 }
5121 if (newOption === DateFilterOption.OnOrAfter) {
5122 onFilterKeyChange(filterMinKey);
5123 onFilterValueChange(selectedDate ? formatDateValue(selectedDate) : undefined);
5124 return;
5125 }
5126 onFilterKeyChange(initialConsumerFilterKey);
5127 onFilterValueChange(newOption);
5128 }
5129 handleDateFieldChange(value) {
5130 const { onFilterValueChange } = this.props;
5131 const { userInputDateError } = this.state;
5132 if (value.length === 0) {
5133 this.setState({
5134 selectedDate: undefined
5135 }, () => {
5136 onFilterValueChange(undefined);
5137 });
5138 }
5139 if (userInputDateError && isValidDate(value)) {
5140 this.setState({
5141 userInputDateError: undefined
5142 });
5143 }
5144 this.setState({
5145 userInputDate: value
5146 });
5147 }
5148 handleDateBlur() {
5149 const { polaris: { intl }, onFilterValueChange } = this.props;
5150 if (!this.dateTextFieldValue || !isValidDate(this.dateTextFieldValue)) {
5151 this.setState({
5152 selectedDate: undefined,
5153 userInputDateError: intl.translate('Polaris.ResourceList.DateSelector.dateValueError')
5154 });
5155 onFilterValueChange(undefined);
5156 return;
5157 }
5158 const { userInputDate } = this.state;
5159 if (!userInputDate) {
5160 return;
5161 }
5162 const nextDate = new Date(userInputDate.replace(/-/g, '/'));
5163 this.setState({
5164 selectedDate: nextDate,
5165 datePickerMonth: nextDate.getMonth(),
5166 datePickerYear: nextDate.getFullYear(),
5167 userInputDate: undefined,
5168 userInputDateError: undefined
5169 }, this.handleDateChanged);
5170 }
5171 handleDateChanged() {
5172 const { onFilterValueChange } = this.props;
5173 const { selectedDate } = this.state;
5174 if (!selectedDate) {
5175 return;
5176 }
5177 onFilterValueChange(formatDateValue(selectedDate));
5178 }
5179 handleDatePickerChange({ end: nextDate }) {
5180 this.setState({
5181 selectedDate: new Date(nextDate),
5182 userInputDate: undefined,
5183 userInputDateError: undefined
5184 }, this.handleDateChanged);
5185 }
5186 handleDatePickerMonthChange(month, year) {
5187 this.setState({ datePickerMonth: month, datePickerYear: year });
5188 }
5189}
5190__decorate([autobind], DateSelector$1.prototype, "handleDateFilterOptionsChange", null);
5191__decorate([autobind], DateSelector$1.prototype, "handleDateFieldChange", null);
5192__decorate([autobind], DateSelector$1.prototype, "handleDateBlur", null);
5193__decorate([autobind], DateSelector$1.prototype, "handleDatePickerChange", null);
5194__decorate([autobind], DateSelector$1.prototype, "handleDatePickerMonthChange", null);
5195function isValidDate(date) {
5196 if (!date) {
5197 return false;
5198 }
5199 return VALID_DATE_REGEX.test(date) && !isNaN(new Date(date).getTime());
5200}
5201function getDateFilterOption(filterValue, filterKey, filterMinKey, filterMaxKey) {
5202 if (filterKey === filterMaxKey) {
5203 return DateFilterOption.OnOrBefore;
5204 }
5205 if (filterKey === filterMinKey) {
5206 return DateFilterOption.OnOrAfter;
5207 }
5208 return filterValue;
5209}
5210function formatDateValue(date) {
5211 return date.toISOString().slice(0, 10);
5212}
5213var DateSelector$2 = withAppProvider()(DateSelector$1);
5214
5215var FilterType;
5216(function (FilterType) {
5217 FilterType[FilterType["Select"] = 0] = "Select";
5218 FilterType[FilterType["TextField"] = 1] = "TextField";
5219 FilterType[FilterType["DateSelector"] = 2] = "DateSelector";
5220})(FilterType || (FilterType = {}));
5221
5222class FilterValueSelector extends PureComponent {
5223 componentDidMount() {
5224 const { filter: { operatorText, type } } = this.props;
5225 if (type === FilterType.DateSelector || !operatorText || typeof operatorText === 'string' || operatorText.length === 0) {
5226 return;
5227 }
5228 this.handleOperatorOptionChange(operatorText[0].key);
5229 }
5230 render() {
5231 const { filter, filterKey, value, onChange, onFilterKeyChange, polaris: { intl } } = this.props;
5232 const { operatorText } = filter;
5233 const showOperatorOptions = filter.type !== FilterType.DateSelector && operatorText && typeof operatorText !== 'string';
5234 const operatorOptionsMarkup = showOperatorOptions ? createElement(Select$1, { label: filter.label, labelHidden: true, options: buildOperatorOptions(operatorText), value: filterKey, onChange: this.handleOperatorOptionChange }) : null;
5235 const selectedFilterLabel = typeof operatorText === 'string' ? operatorText : '';
5236 switch (filter.type) {
5237 case FilterType.Select:
5238 return createElement(
5239 Stack$1,
5240 { vertical: true },
5241 operatorOptionsMarkup,
5242 createElement(Select$1, { label: selectedFilterLabel, options: filter.options, placeholder: intl.translate('Polaris.ResourceList.FilterValueSelector.selectFilterValuePlaceholder'), value: value, onChange: onChange })
5243 );
5244 case FilterType.TextField:
5245 return createElement(
5246 Stack$1,
5247 { vertical: true },
5248 operatorOptionsMarkup,
5249 createElement(TextField$1, { label: selectedFilterLabel, value: value, type: filter.textFieldType, onChange: onChange })
5250 );
5251 case FilterType.DateSelector:
5252 return createElement(DateSelector$2, { dateOptionType: filter.dateOptionType, filterValue: value, filterKey: filterKey, filterMinKey: filter.minKey, filterMaxKey: filter.maxKey, onFilterValueChange: onChange, onFilterKeyChange: onFilterKeyChange });
5253 default:
5254 return null;
5255 }
5256 }
5257 handleOperatorOptionChange(operatorKey) {
5258 const { value, onChange, onFilterKeyChange } = this.props;
5259 onFilterKeyChange(operatorKey);
5260 if (!value) {
5261 return;
5262 }
5263 onChange(value);
5264 }
5265}
5266__decorate([autobind], FilterValueSelector.prototype, "handleOperatorOptionChange", null);
5267function buildOperatorOptions(operatorText) {
5268 if (!operatorText || typeof operatorText === 'string') {
5269 return [];
5270 }
5271 return operatorText.map(({ key, optionLabel }) => {
5272 return { value: key, label: optionLabel };
5273 });
5274}
5275var FilterValueSelector$1 = withAppProvider()(FilterValueSelector);
5276
5277class FilterCreator extends PureComponent {
5278 constructor() {
5279 super(...arguments);
5280 this.state = {
5281 popoverActive: false
5282 };
5283 this.node = null;
5284 }
5285 get canAddFilter() {
5286 return Boolean(this.state.selectedFilter && this.state.selectedFilterKey && this.state.selectedFilterValue);
5287 }
5288 render() {
5289 const { filters, resourceName, disabled, polaris: { intl } } = this.props;
5290 const { popoverActive, selectedFilter, selectedFilterKey, selectedFilterValue } = this.state;
5291 const activator = createElement(
5292 Button$2,
5293 { onClick: this.togglePopover, disclosure: true, disabled: disabled, onFocus: this.handleButtonFocus },
5294 intl.translate('Polaris.ResourceList.FilterCreator.filterButtonLabel')
5295 );
5296 const filterOptions = filters.map(({ key, label }) => ({
5297 value: key,
5298 label
5299 }));
5300 const filterValueSelectionMarkup = selectedFilter ? createElement(FilterValueSelector$1, { filter: selectedFilter, filterKey: selectedFilterKey, value: selectedFilterValue, onFilterKeyChange: this.handleFilterKeyChange, onChange: this.handleFilterValueChange }) : null;
5301 const addFilterButtonMarkup = selectedFilter ? createElement(
5302 Button$2,
5303 { onClick: this.handleAddFilter, disabled: !this.canAddFilter },
5304 intl.translate('Polaris.ResourceList.FilterCreator.addFilterButtonLabel')
5305 ) : null;
5306 return createElement(
5307 Popover$1,
5308 { active: popoverActive, activator: activator, onClose: this.togglePopover, sectioned: true, fullHeight: true },
5309 createElement(
5310 Form$1,
5311 { onSubmit: this.handleAddFilter },
5312 createElement(
5313 FormLayout$1,
5314 null,
5315 createElement(Select$1, { label: intl.translate('Polaris.ResourceList.FilterCreator.showAllWhere', { resourceNamePlural: resourceName.plural.toLocaleLowerCase() }), placeholder: intl.translate('Polaris.ResourceList.FilterCreator.selectFilterKeyPlaceholder'), options: filterOptions, onChange: this.handleFilterKeyChange, value: selectedFilter && selectedFilter.key }),
5316 filterValueSelectionMarkup,
5317 addFilterButtonMarkup
5318 )
5319 )
5320 );
5321 }
5322 handleButtonFocus(...args) {
5323 const event = args[0];
5324 if (!this.node && event) {
5325 this.node = event.target;
5326 }
5327 }
5328 togglePopover() {
5329 this.setState(({ popoverActive }) => ({ popoverActive: !popoverActive }));
5330 }
5331 handleFilterKeyChange(filterKey) {
5332 const { filters } = this.props;
5333 const foundFilter = filters.find(filter => {
5334 const { minKey, maxKey, operatorText } = filter;
5335 if (minKey || maxKey) {
5336 return filter.key === filterKey || minKey === filterKey || maxKey === filterKey;
5337 }
5338 if (operatorText && typeof operatorText !== 'string') {
5339 return filter.key === filterKey || operatorText.filter(({ key }) => key === filterKey).length === 1;
5340 }
5341 return filter.key === filterKey;
5342 });
5343 if (!foundFilter) {
5344 return;
5345 }
5346 this.setState({
5347 selectedFilter: foundFilter,
5348 selectedFilterKey: filterKey,
5349 selectedFilterValue: undefined
5350 });
5351 }
5352 handleFilterValueChange(filterValue) {
5353 this.setState({ selectedFilterValue: filterValue });
5354 }
5355 handleAddFilter() {
5356 const { onAddFilter } = this.props;
5357 const { selectedFilterKey } = this.state;
5358 if (!onAddFilter || !this.canAddFilter || !selectedFilterKey) {
5359 return;
5360 }
5361 onAddFilter({
5362 key: selectedFilterKey,
5363 value: this.state.selectedFilterValue || ''
5364 });
5365 this.setState({
5366 popoverActive: false,
5367 selectedFilter: undefined,
5368 selectedFilterValue: undefined
5369 });
5370 if (this.node != null) {
5371 this.node.focus();
5372 }
5373 }
5374}
5375__decorate([autobind], FilterCreator.prototype, "handleButtonFocus", null);
5376__decorate([autobind], FilterCreator.prototype, "togglePopover", null);
5377__decorate([autobind], FilterCreator.prototype, "handleFilterKeyChange", null);
5378__decorate([autobind], FilterCreator.prototype, "handleFilterValueChange", null);
5379__decorate([autobind], FilterCreator.prototype, "handleAddFilter", null);
5380var FilterCreator$1 = withAppProvider()(FilterCreator);
5381
5382var styles$43 = {
5383 "Controls": "p_so",
5384 "Search": "p_qi",
5385 "AppliedFilters": "p_vg",
5386 "AppliedFilter": "p_us",
5387};
5388
5389var styles$44 = {
5390 "Select": "p_hd",
5391 "disabled": "p_ng",
5392 "Content": "p_e3",
5393 "InlineLabel": "p_gn",
5394 "Icon": "p_w1",
5395 "Backdrop": "p_tu",
5396 "error": "p_b6",
5397 "Input": "p_ir",
5398 "placeholder": "p_ok",
5399 "SelectedOption": "p_mj",
5400};
5401
5402const PLACEHOLDER_VALUE = '';
5403const getUniqueID$5 = createUniqueIDFactory('Select');
5404function Select$1({ options: optionsProp, groups: groupsProp, label, labelAction, labelHidden: labelHiddenProp, labelInline, disabled, helpText, placeholder, id = getUniqueID$5(), name, value = PLACEHOLDER_VALUE, error, onChange, onFocus, onBlur }) {
5405 const labelHidden = labelInline ? true : labelHiddenProp;
5406 const className = classNames$1(styles$44.Select, error && styles$44.error, disabled && styles$44.disabled);
5407 const handleChange = onChange ? event => onChange(event.currentTarget.value, id) : undefined;
5408 const describedBy = [];
5409 if (helpText) {
5410 describedBy.push(helpTextID$1(id));
5411 }
5412 if (error) {
5413 describedBy.push(`${id}Error`);
5414 }
5415 if (groupsProp != null) {
5416 // eslint-disable-next-line no-console
5417 console.warn('Deprecation: the `groups` prop is deprecated and will be removed in the next major version. Pass groups to the `options` prop instead.');
5418 }
5419 const options = optionsProp || groupsProp || [];
5420 let normalizedOptions = options.map(normalizeOption);
5421 if (placeholder) {
5422 normalizedOptions = [{
5423 label: placeholder,
5424 value: PLACEHOLDER_VALUE,
5425 disabled: true
5426 }, ...normalizedOptions];
5427 }
5428 const inlineLabelMarkup = labelInline && createElement(
5429 'span',
5430 { className: styles$44.InlineLabel },
5431 label
5432 );
5433 const selectedOption = getSelectedOption(normalizedOptions, value);
5434 const contentMarkup = createElement(
5435 'div',
5436 { className: styles$44.Content, 'aria-hidden': true },
5437 inlineLabelMarkup,
5438 createElement(
5439 'span',
5440 { className: styles$44.SelectedOption },
5441 selectedOption
5442 ),
5443 createElement(
5444 'span',
5445 { className: styles$44.Icon },
5446 createElement(Icon$2, { source: 'arrowUpDown' })
5447 )
5448 );
5449 const optionsMarkup = normalizedOptions.map(renderOption);
5450 return createElement(
5451 Labelled$1,
5452 { id: id, label: label, error: error, action: labelAction, labelHidden: labelHidden, helpText: helpText },
5453 createElement(
5454 'div',
5455 { className: className },
5456 createElement(
5457 'select',
5458 { id: id, name: name, value: value, className: styles$44.Input, disabled: disabled, onFocus: onFocus, onBlur: onBlur, onChange: handleChange, 'aria-invalid': Boolean(error), 'aria-describedby': describedBy.length ? describedBy.join(' ') : undefined },
5459 optionsMarkup
5460 ),
5461 contentMarkup,
5462 createElement('div', { className: styles$44.Backdrop })
5463 )
5464 );
5465}
5466function isString(option) {
5467 return typeof option === 'string';
5468}
5469function isGroup(option) {
5470 return option.options != null;
5471}
5472function normalizeStringOption(option) {
5473 return {
5474 label: option,
5475 value: option
5476 };
5477}
5478/**
5479 * Converts a string option (and each string option in a Group) into
5480 * an Option object.
5481 */
5482function normalizeOption(option) {
5483 if (isString(option)) {
5484 return normalizeStringOption(option);
5485 } else if (isGroup(option)) {
5486 const { title, options } = option;
5487 return {
5488 title,
5489 options: options.map(option => {
5490 return isString(option) ? normalizeStringOption(option) : option;
5491 })
5492 };
5493 }
5494 return option;
5495}
5496/**
5497 * Gets the text to display in the UI, for the currently selected option
5498 */
5499function getSelectedOption(options, value) {
5500 const flatOptions = flattenOptions(options);
5501 let selectedOption = flatOptions.find(option => value === option.value);
5502 if (selectedOption === undefined) {
5503 // Get the first visible option (not the hidden placeholder)
5504 selectedOption = flatOptions.find(option => !option.hidden);
5505 }
5506 return selectedOption ? selectedOption.label : '';
5507}
5508/**
5509 * Ungroups an options array
5510 */
5511function flattenOptions(options) {
5512 let flatOptions = [];
5513 options.forEach(optionOrGroup => {
5514 if (isGroup(optionOrGroup)) {
5515 flatOptions = flatOptions.concat(optionOrGroup.options);
5516 } else {
5517 flatOptions.push(optionOrGroup);
5518 }
5519 });
5520 return flatOptions;
5521}
5522function renderSingleOption(option) {
5523 const { value, label } = option,
5524 rest = __rest(option, ["value", "label"]);
5525 return createElement(
5526 'option',
5527 Object.assign({ key: value, value: value }, rest),
5528 label
5529 );
5530}
5531function renderOption(optionOrGroup) {
5532 if (isGroup(optionOrGroup)) {
5533 const { title, options } = optionOrGroup;
5534 return createElement(
5535 'optgroup',
5536 { label: title, key: title },
5537 options.map(renderSingleOption)
5538 );
5539 }
5540 return renderSingleOption(optionOrGroup);
5541}
5542
5543var selectIcon = {"viewBox":"0 0 20 20","body":"<path d=\"M9 14.41l-3.71-3.7 1.42-1.42L9 11.59l5.29-5.3 1.42 1.42L9 14.41zM17 2H3c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h14c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1z\" />"};
5544
5545var styles$45 = {
5546 "CheckableButton": "p_mh",
5547 "CheckableButton-measuring": "p_ec",
5548 "CheckableButton-plain": "p_uc",
5549 "CheckableButton-selectMode": "p_uy",
5550 "CheckableButton-selected": "p_if",
5551 "Checkbox": "p_fw",
5552 "Label": "p_rs",
5553};
5554
5555function CheckableButton$1({ accessibilityLabel, label = '', onToggleAll, selected, selectMode, plain, measuring, disabled }) {
5556 const className = plain ? classNames$1(styles$45.CheckableButton, styles$45['CheckableButton-plain']) : classNames$1(styles$45.CheckableButton, selectMode && styles$45['CheckableButton-selectMode'], selected && styles$45['CheckableButton-selected'], measuring && styles$45['CheckableButton-measuring']);
5557 return createElement(
5558 'div',
5559 { className: className, onClick: onToggleAll },
5560 createElement(
5561 'div',
5562 { className: styles$45.Checkbox },
5563 createElement(Checkbox$2, { label: accessibilityLabel, labelHidden: true, checked: selected, disabled: disabled })
5564 ),
5565 createElement(
5566 'span',
5567 { className: styles$45.Label },
5568 label
5569 )
5570 );
5571}
5572var CheckableButton$2 = withAppProvider()(CheckableButton$1);
5573
5574var styles$46 = {
5575 "Button": "p_i8",
5576 "Group-measuring": "p_mt",
5577 "Group": "p_oc",
5578 "Group-entering": "p_m7",
5579 "Group-exiting": "p_zu",
5580 "Group-entered": "p_kt",
5581 "Group-exited": "p_oy",
5582 "Group-smallScreen": "p_ru",
5583 "Group-largeScreen": "p_cp",
5584 "ButtonGroup": "p_ni",
5585 "Button-cancel": "p_rl",
5586 "Popover": "p_sn",
5587 "ActionContent": "p_dp",
5588 "ActionIcon": "p_mb",
5589 "disabled": "p_js",
5590 "PaginatedSelectAll": "p_c1",
5591 "Slide": "p_gq",
5592 "Slide-appear": "p_hi",
5593 "Slide-enter": "p_gc",
5594 "Slide-exit": "p_bf",
5595 "Slide-appearing": "p_ii",
5596 "Slide-entering": "p_a1",
5597};
5598
5599class BulkActionButton extends PureComponent {
5600 componentDidMount() {
5601 const { handleMeasurement } = this.props;
5602 if (handleMeasurement) {
5603 const bulkActionButtonNode = findDOMNode(this);
5604 const width = bulkActionButtonNode instanceof Element && bulkActionButtonNode.getBoundingClientRect().width || 0;
5605 handleMeasurement(width);
5606 }
5607 }
5608 render() {
5609 const { url, external, onAction, content, disclosure, accessibilityLabel, disabled } = this.props;
5610 const disclosureIconMarkup = disclosure ? createElement(
5611 'span',
5612 { className: styles$46.ActionIcon },
5613 createElement(Icon$2, { source: 'caretDown' })
5614 ) : null;
5615 const contentMarkup = disclosureIconMarkup ? createElement(
5616 'span',
5617 { className: styles$46.ActionContent },
5618 createElement(
5619 'span',
5620 null,
5621 content
5622 ),
5623 disclosureIconMarkup
5624 ) : content;
5625 if (url) {
5626 return createElement(
5627 UnstyledLink$2,
5628 { external: external, url: url, onMouseUp: handleMouseUpByBlurring, className: styles$46.Button, 'aria-label': accessibilityLabel },
5629 contentMarkup
5630 );
5631 }
5632 const className = classNames(styles$46.Button, disabled && styles$46.disabled);
5633 return createElement(
5634 'button',
5635 { className: className, onClick: onAction, onMouseUp: handleMouseUpByBlurring, 'aria-label': accessibilityLabel, type: 'button', disabled: disabled },
5636 contentMarkup
5637 );
5638 }
5639}
5640
5641const MAX_PROMOTED_ACTIONS = 2;
5642const slideClasses = {
5643 appear: classNames$1(styles$46.Slide, styles$46['Slide-appear']),
5644 appearActive: classNames$1(styles$46.Slide, styles$46['Slide-appearing']),
5645 enter: classNames$1(styles$46.Slide, styles$46['Slide-enter']),
5646 enterActive: classNames$1(styles$46.Slide, styles$46['Slide-entering']),
5647 exit: classNames$1(styles$46.Slide, styles$46['Slide-exit'])
5648};
5649class BulkActions$1 extends PureComponent {
5650 constructor() {
5651 super(...arguments);
5652 this.state = {
5653 smallScreenPopoverVisible: false,
5654 largeScreenPopoverVisible: false,
5655 containerWidth: 0,
5656 measuring: true
5657 };
5658 this.promotedActionsWidths = [];
5659 this.bulkActionsWidth = 0;
5660 this.addedMoreActionsWidthForMeasuring = 0;
5661 }
5662 get numberOfPromotedActionsToRender() {
5663 const { promotedActions } = this.props;
5664 const { containerWidth, measuring } = this.state;
5665 if (!promotedActions) {
5666 return 0;
5667 }
5668 if (containerWidth >= this.bulkActionsWidth || measuring) {
5669 return promotedActions.length;
5670 }
5671 let sufficientSpace = false;
5672 let counter = promotedActions.length - 1;
5673 let totalWidth = 0;
5674 while (!sufficientSpace && counter >= 0) {
5675 totalWidth += this.promotedActionsWidths[counter];
5676 const widthWithRemovedAction = this.bulkActionsWidth - totalWidth + this.addedMoreActionsWidthForMeasuring;
5677 if (containerWidth >= widthWithRemovedAction) {
5678 sufficientSpace = true;
5679 } else {
5680 counter--;
5681 }
5682 }
5683 return counter;
5684 }
5685 get hasActions() {
5686 const { promotedActions, actions } = this.props;
5687 return Boolean(promotedActions && promotedActions.length > 0 || actions && actions.length > 0);
5688 }
5689 get actionSections() {
5690 const { actions } = this.props;
5691 if (!actions || actions.length === 0) {
5692 return;
5693 }
5694 if (instanceOfBulkActionListSectionArray(actions)) {
5695 return actions;
5696 }
5697 if (instanceOfBulkActionArray(actions)) {
5698 return [{
5699 items: actions
5700 }];
5701 }
5702 }
5703 componentDidMount() {
5704 const { actions, promotedActions } = this.props;
5705 if (promotedActions && !actions && this.moreActionsNode) {
5706 this.addedMoreActionsWidthForMeasuring = this.moreActionsNode.getBoundingClientRect().width;
5707 }
5708 this.bulkActionsWidth = this.largeScreenButtonsNode ? this.largeScreenButtonsNode.getBoundingClientRect().width - this.addedMoreActionsWidthForMeasuring : 0;
5709 if (this.containerNode) {
5710 // eslint-disable-next-line react/no-did-mount-set-state
5711 this.setState({
5712 containerWidth: this.containerNode.getBoundingClientRect().width,
5713 measuring: false
5714 });
5715 }
5716 }
5717 render() {
5718 const { selectMode, accessibilityLabel, label = '', onToggleAll, selected, disabled, promotedActions, paginatedSelectAllText = null, paginatedSelectAllAction, polaris: { intl } } = this.props;
5719 if (promotedActions && promotedActions.length > MAX_PROMOTED_ACTIONS) {
5720 // eslint-disable-next-line no-console
5721 console.warn(intl.translate('Polaris.ResourceList.BulkActions.warningMessage', {
5722 maxPromotedActions: MAX_PROMOTED_ACTIONS
5723 }));
5724 }
5725 const { smallScreenPopoverVisible, largeScreenPopoverVisible, measuring } = this.state;
5726 const paginatedSelectAllActionMarkup = paginatedSelectAllAction ? createElement(
5727 Button$2,
5728 { onClick: paginatedSelectAllAction.onAction, plain: true, disabled: disabled },
5729 paginatedSelectAllAction.content
5730 ) : null;
5731 const paginatedSelectAllTextMarkup = paginatedSelectAllText && paginatedSelectAllAction ? createElement(
5732 'span',
5733 { 'aria-live': 'polite' },
5734 paginatedSelectAllText
5735 ) : paginatedSelectAllText;
5736 const paginatedSelectAllMarkup = paginatedSelectAllActionMarkup || paginatedSelectAllTextMarkup ? createElement(
5737 'div',
5738 { className: styles$46.PaginatedSelectAll },
5739 paginatedSelectAllTextMarkup,
5740 ' ',
5741 paginatedSelectAllActionMarkup
5742 ) : null;
5743 const cancelButtonClassName = classNames$1(styles$46.Button, styles$46['Button-cancel']);
5744 const cancelButton = createElement(
5745 'button',
5746 { className: cancelButtonClassName
5747 // eslint-disable-next-line react/jsx-no-bind
5748 , onClick: this.setSelectMode.bind(this, false) },
5749 'Cancel'
5750 );
5751 const numberOfPromotedActionsToRender = this.numberOfPromotedActionsToRender;
5752 const allActionsPopover = this.hasActions ? createElement(
5753 'div',
5754 { className: styles$46.Popover, ref: this.setMoreActionsNode },
5755 createElement(
5756 Popover$1,
5757 { active: smallScreenPopoverVisible, activator: createElement(BulkActionButton, { disclosure: true, onAction: this.toggleSmallScreenPopover, content: intl.translate('Polaris.ResourceList.BulkActions.actionsActivatorLabel') }), onClose: this.toggleSmallScreenPopover },
5758 createElement(ActionList$1, { items: promotedActions, sections: this.actionSections, onActionAnyItem: this.toggleSmallScreenPopover })
5759 )
5760 ) : null;
5761 const promotedActionsMarkup = promotedActions && numberOfPromotedActionsToRender > 0 ? [...promotedActions].slice(0, numberOfPromotedActionsToRender).map((action, index) => createElement(BulkActionButton, Object.assign({}, action, { key: index, handleMeasurement: this.handleMeasurement }))) : null;
5762 const rolledInPromotedActions = promotedActions && numberOfPromotedActionsToRender < promotedActions.length ? [...promotedActions].slice(numberOfPromotedActionsToRender) : [];
5763 const activatorLabel = !promotedActions || promotedActions && numberOfPromotedActionsToRender === 0 && !measuring ? intl.translate('Polaris.ResourceList.BulkActions.actionsActivatorLabel') : intl.translate('Polaris.ResourceList.BulkActions.moreActionsActivatorLabel');
5764 let combinedActions = [];
5765 if (this.actionSections && rolledInPromotedActions.length > 0) {
5766 combinedActions = [{ items: rolledInPromotedActions }, ...this.actionSections];
5767 } else if (this.actionSections) {
5768 combinedActions = this.actionSections;
5769 } else if (rolledInPromotedActions.length > 0) {
5770 combinedActions = [{ items: rolledInPromotedActions }];
5771 }
5772 const actionsPopover = this.actionSections || rolledInPromotedActions.length > 0 || measuring ? createElement(
5773 'div',
5774 { className: styles$46.Popover, ref: this.setMoreActionsNode },
5775 createElement(
5776 Popover$1,
5777 { active: largeScreenPopoverVisible, activator: createElement(BulkActionButton, { disclosure: true, onAction: this.toggleLargeScreenPopover, content: activatorLabel, disabled: disabled }), onClose: this.toggleLargeScreenPopover },
5778 createElement(ActionList$1, { sections: combinedActions, onActionAnyItem: this.toggleLargeScreenPopover })
5779 )
5780 ) : null;
5781 const checkableButtonProps = {
5782 accessibilityLabel,
5783 label,
5784 selected,
5785 selectMode,
5786 onToggleAll,
5787 measuring,
5788 disabled
5789 };
5790 const smallScreenGroup = createElement(
5791 Transition,
5792 { timeout: 0, 'in': selectMode, key: 'smallGroup' },
5793 status => {
5794 const smallScreenGroupClassName = classNames$1(styles$46.Group, styles$46['Group-smallScreen'], styles$46[`Group-${status}`]);
5795 return createElement(
5796 'div',
5797 { className: smallScreenGroupClassName },
5798 createElement(
5799 'div',
5800 { className: styles$46.ButtonGroup },
5801 createElement(
5802 CSSTransition,
5803 { 'in': selectMode, timeout: Duration.Base, classNames: slideClasses, appear: true },
5804 createElement(CheckableButton$2, checkableButtonProps)
5805 ),
5806 allActionsPopover,
5807 cancelButton
5808 ),
5809 paginatedSelectAllMarkup
5810 );
5811 }
5812 );
5813 const largeScreenGroup = createElement(
5814 Transition,
5815 { timeout: 0, 'in': selectMode, key: 'largeGroup' },
5816 status => {
5817 const largeScreenGroupClassName = classNames$1(styles$46.Group, styles$46['Group-largeScreen'], !measuring && styles$46[`Group-${status}`], measuring && styles$46['Group-measuring']);
5818 return createElement(
5819 'div',
5820 { className: largeScreenGroupClassName },
5821 createElement(EventListener$1, { event: 'resize', handler: this.handleResize }),
5822 createElement(
5823 'div',
5824 { className: styles$46.ButtonGroup, ref: this.setLargeScreenButtonsNode },
5825 createElement(CheckableButton$2, checkableButtonProps),
5826 promotedActionsMarkup,
5827 actionsPopover
5828 ),
5829 paginatedSelectAllMarkup
5830 );
5831 }
5832 );
5833 return createElement(
5834 'div',
5835 { ref: this.setContainerNode },
5836 smallScreenGroup,
5837 largeScreenGroup
5838 );
5839 }
5840 setLargeScreenButtonsNode(node) {
5841 this.largeScreenButtonsNode = node;
5842 }
5843 setContainerNode(node) {
5844 this.containerNode = node;
5845 }
5846 setMoreActionsNode(node) {
5847 this.moreActionsNode = node;
5848 }
5849 setSelectMode(val) {
5850 const { onSelectModeToggle } = this.props;
5851 if (onSelectModeToggle) {
5852 onSelectModeToggle(val);
5853 }
5854 }
5855 toggleSmallScreenPopover() {
5856 this.setState(({ smallScreenPopoverVisible }) => ({
5857 smallScreenPopoverVisible: !smallScreenPopoverVisible
5858 }));
5859 }
5860 toggleLargeScreenPopover() {
5861 this.setState(({ largeScreenPopoverVisible }) => ({
5862 largeScreenPopoverVisible: !largeScreenPopoverVisible
5863 }));
5864 }
5865 handleResize() {
5866 const { smallScreenPopoverVisible, largeScreenPopoverVisible } = this.state;
5867 if (this.containerNode) {
5868 const containerWidth = this.containerNode.getBoundingClientRect().width;
5869 if (containerWidth > 0) {
5870 this.setState({ containerWidth });
5871 }
5872 }
5873 if (smallScreenPopoverVisible || largeScreenPopoverVisible) {
5874 this.setState({
5875 smallScreenPopoverVisible: false,
5876 largeScreenPopoverVisible: false
5877 });
5878 }
5879 }
5880 handleMeasurement(width) {
5881 const { measuring } = this.state;
5882 if (measuring) {
5883 this.promotedActionsWidths.push(width);
5884 }
5885 }
5886}
5887__decorate([autobind], BulkActions$1.prototype, "setLargeScreenButtonsNode", null);
5888__decorate([autobind], BulkActions$1.prototype, "setContainerNode", null);
5889__decorate([autobind], BulkActions$1.prototype, "setMoreActionsNode", null);
5890__decorate([autobind], BulkActions$1.prototype, "setSelectMode", null);
5891__decorate([autobind], BulkActions$1.prototype, "toggleSmallScreenPopover", null);
5892__decorate([autobind], BulkActions$1.prototype, "toggleLargeScreenPopover", null);
5893__decorate([autobind, debounce(50, { trailing: true })], BulkActions$1.prototype, "handleResize", null);
5894__decorate([autobind], BulkActions$1.prototype, "handleMeasurement", null);
5895function instanceOfBulkActionListSectionArray(actions) {
5896 const validList = actions.filter(action => {
5897 return action.items;
5898 });
5899 return actions.length === validList.length;
5900}
5901function instanceOfBulkActionArray(actions) {
5902 const validList = actions.filter(action => {
5903 return !action.items;
5904 });
5905 return actions.length === validList.length;
5906}
5907var BulkActions$2 = withAppProvider()(BulkActions$1);
5908
5909const getUniqueID$7 = createUniqueIDFactory('portal-');
5910class Portal$1 extends PureComponent {
5911 constructor() {
5912 super(...arguments);
5913 this.portalId = this.props.idPrefix !== '' ? `${this.props.idPrefix}-${getUniqueID$7()}` : getUniqueID$7();
5914 }
5915 // eslint-disable-next-line react/no-deprecated
5916 componentWillMount() {
5917 if (isServer) {
5918 return;
5919 }
5920 this.portalNode = document.createElement('div');
5921 this.portalNode.setAttribute('data-portal-id', this.portalId);
5922 document.body.appendChild(this.portalNode);
5923 }
5924 componentWillUnmount() {
5925 if (isServer) {
5926 return;
5927 }
5928 document.body.removeChild(this.portalNode);
5929 }
5930 render() {
5931 if (isServer) {
5932 return null;
5933 }
5934 return createPortal(this.props.children, this.portalNode);
5935 }
5936}
5937Portal$1.defaultProps = { idPrefix: '' };
5938
5939const contextTypes = {
5940 scrollToPosition: func
5941};
5942
5943class ScrollTo$1 extends Component {
5944 constructor() {
5945 super(...arguments);
5946 this.ref = createRef();
5947 }
5948 componentDidMount() {
5949 const { scrollToPosition } = this.context;
5950 if (!scrollToPosition || !this.ref.current) {
5951 return;
5952 }
5953 scrollToPosition(this.ref.current.offsetTop);
5954 }
5955 render() {
5956 const getUniqueId = createUniqueIDFactory(`ScrollTo`);
5957 // eslint-disable-next-line jsx-a11y/anchor-is-valid
5958 return createElement('a', { id: getUniqueId(), ref: this.ref });
5959 }
5960}
5961ScrollTo$1.contextTypes = contextTypes;
5962
5963var styles$47 = {
5964 "Scrollable": "p_b3",
5965 "horizontal": "p_w0",
5966 "vertical": "p_ag",
5967 "hasTopShadow": "p_kg",
5968 "hasBottomShadow": "p_fp",
5969};
5970
5971const MAX_SCROLL_DISTANCE = 100;
5972const DELTA_THRESHOLD = 0.2;
5973const DELTA_PERCENTAGE = 0.2;
5974const EVENTS_TO_LOCK = ['scroll', 'touchmove', 'wheel'];
5975const PREFERS_REDUCED_MOTION = prefersReducedMotion();
5976class Scrollable$1 extends Component {
5977 constructor() {
5978 super(...arguments);
5979 this.state = {
5980 topShadow: false,
5981 bottomShadow: false,
5982 scrollPosition: 0
5983 };
5984 }
5985 static forNode(node) {
5986 return closest(node, scrollable.selector) || document;
5987 }
5988 getChildContext() {
5989 return {
5990 scrollToPosition: this.scrollToPosition
5991 };
5992 }
5993 componentDidMount() {
5994 const { polaris } = this.props;
5995 if (this.scrollArea == null) {
5996 return;
5997 }
5998 polaris.stickyManager.setContainer(this.scrollArea);
5999 addEventListener(this.scrollArea, 'scroll', () => {
6000 window.requestAnimationFrame(this.handleScroll);
6001 });
6002 addEventListener(window, 'resize', this.handleResize);
6003 window.requestAnimationFrame(() => {
6004 this.handleScroll();
6005 if (this.props.hint) {
6006 this.scrollHint();
6007 }
6008 });
6009 }
6010 componentWillUnmount() {
6011 const { polaris } = this.props;
6012 if (this.scrollArea == null) {
6013 return;
6014 }
6015 removeEventListener(this.scrollArea, 'scroll', this.handleScroll);
6016 removeEventListener(window, 'resize', this.handleResize);
6017 polaris.stickyManager.removeScrollListener();
6018 }
6019 componentDidUpdate() {
6020 const { scrollPosition } = this.state;
6021 if (scrollPosition && this.scrollArea && scrollPosition > 0) {
6022 this.scrollArea.scrollTop = scrollPosition;
6023 }
6024 }
6025 render() {
6026 const { topShadow, bottomShadow } = this.state;
6027 const _a = this.props,
6028 { children, className, horizontal, vertical = true, shadow, hint } = _a,
6029 rest = __rest(_a, ["children", "className", "horizontal", "vertical", "shadow", "hint"]);
6030 const finalClassName = classNames$1(className, styles$47.Scrollable, vertical && styles$47.vertical, horizontal && styles$47.horizontal, topShadow && styles$47.hasTopShadow, bottomShadow && styles$47.hasBottomShadow);
6031 return createElement(
6032 'div',
6033 Object.assign({ className: finalClassName }, scrollable.props, rest, { ref: this.setScrollArea }),
6034 children
6035 );
6036 }
6037 setScrollArea(scrollArea) {
6038 this.scrollArea = scrollArea;
6039 }
6040 handleScroll() {
6041 const { scrollArea } = this;
6042 const { shadow } = this.props;
6043 if (scrollArea == null) {
6044 return;
6045 }
6046 const { scrollTop, clientHeight, scrollHeight } = scrollArea;
6047 const shouldBottomShadow = Boolean(shadow && !(scrollTop + clientHeight >= scrollHeight));
6048 const shouldTopShadow = Boolean(shadow && scrollTop > 0);
6049 this.setState({
6050 topShadow: shouldTopShadow,
6051 bottomShadow: shouldBottomShadow,
6052 scrollPosition: scrollTop
6053 });
6054 }
6055 handleResize() {
6056 this.handleScroll();
6057 }
6058 scrollHint() {
6059 const { scrollArea } = this;
6060 if (scrollArea == null) {
6061 return;
6062 }
6063 const { clientHeight, scrollHeight } = scrollArea;
6064 if (PREFERS_REDUCED_MOTION || this.state.scrollPosition > 0 || scrollHeight <= clientHeight) {
6065 return;
6066 }
6067 const scrollDistance = scrollHeight - clientHeight;
6068 this.toggleLock();
6069 this.setState({
6070 scrollPosition: scrollDistance > MAX_SCROLL_DISTANCE ? MAX_SCROLL_DISTANCE : scrollDistance
6071 }, () => {
6072 window.requestAnimationFrame(this.scrollStep);
6073 });
6074 }
6075 scrollStep() {
6076 this.setState(({ scrollPosition }) => {
6077 const delta = scrollPosition * DELTA_PERCENTAGE;
6078 return {
6079 scrollPosition: delta < DELTA_THRESHOLD ? 0 : scrollPosition - delta
6080 };
6081 }, () => {
6082 if (this.state.scrollPosition > 0) {
6083 window.requestAnimationFrame(this.scrollStep);
6084 } else {
6085 this.toggleLock(false);
6086 }
6087 });
6088 }
6089 toggleLock(shouldLock = true) {
6090 const { scrollArea } = this;
6091 if (scrollArea == null) {
6092 return;
6093 }
6094 EVENTS_TO_LOCK.forEach(eventName => {
6095 if (shouldLock) {
6096 addEventListener(scrollArea, eventName, prevent);
6097 } else {
6098 removeEventListener(scrollArea, eventName, prevent);
6099 }
6100 });
6101 }
6102 scrollToPosition(scrollY) {
6103 this.setState({ scrollPosition: scrollY });
6104 }
6105}
6106Scrollable$1.childContextTypes = contextTypes;
6107Scrollable$1.ScrollTo = ScrollTo$1;
6108__decorate([autobind], Scrollable$1.prototype, "setScrollArea", null);
6109__decorate([autobind], Scrollable$1.prototype, "handleScroll", null);
6110__decorate([autobind, debounce(50, { trailing: true })], Scrollable$1.prototype, "handleResize", null);
6111__decorate([autobind], Scrollable$1.prototype, "scrollHint", null);
6112__decorate([autobind], Scrollable$1.prototype, "scrollStep", null);
6113__decorate([autobind], Scrollable$1.prototype, "scrollToPosition", null);
6114function prevent(evt) {
6115 evt.preventDefault();
6116}
6117function prefersReducedMotion() {
6118 try {
6119 return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
6120 } catch (err) {
6121 return false;
6122 }
6123}
6124var Scrollable$2 = withSticky()(Scrollable$1);
6125
6126var styles$48 = {
6127 "Popover": "p_fr",
6128 "fullWidth": "p_ur",
6129 "Content": "p_ap",
6130 "measuring": "p_xf",
6131 "exiting": "p_lj",
6132 "positionedAbove": "p_eg",
6133 "Wrapper": "p_ia",
6134 "Content-fullHeight": "p_g8",
6135 "Pane": "p_rk",
6136 "Pane-fixed": "p_w9",
6137 "Section": "p_sk",
6138 "FocusTracker": "p_qy",
6139};
6140
6141function Section$5({ children }) {
6142 return createElement(
6143 'div',
6144 { className: styles$48.Section },
6145 children
6146 );
6147}
6148
6149function Pane$1({ fixed, sectioned, children }) {
6150 const className = classNames$1(styles$48.Pane, fixed && styles$48['Pane-fixed']);
6151 const content = sectioned ? wrapWithComponent(children, Section$5) : children;
6152 return fixed ? createElement(
6153 'div',
6154 { className: className },
6155 content
6156 ) : createElement(
6157 Scrollable$2,
6158 { hint: true, shadow: true, className: className },
6159 content
6160 );
6161}
6162
6163class KeypressListener$1 extends Component {
6164 componentDidMount() {
6165 addEventListener(document, 'keyup', this.handleKeyEvent);
6166 }
6167 componentWillUnmount() {
6168 removeEventListener(document, 'keyup', this.handleKeyEvent);
6169 }
6170 render() {
6171 return null;
6172 }
6173 handleKeyEvent(event) {
6174 const { keyCode, handler } = this.props;
6175 if (event.keyCode === keyCode) {
6176 handler(event);
6177 }
6178 }
6179}
6180__decorate([autobind], KeypressListener$1.prototype, "handleKeyEvent", null);
6181
6182function calculateVerticalPosition(activatorRect, overlayRect, overlayMargins, scrollableContainerRect, containerRect, preferredPosition, fixed) {
6183 const activatorTop = activatorRect.top;
6184 const activatorBottom = activatorTop + activatorRect.height;
6185 const spaceAbove = activatorRect.top;
6186 const spaceBelow = containerRect.height - activatorRect.top - activatorRect.height;
6187 const desiredHeight = overlayRect.height;
6188 const verticalMargins = overlayMargins.activator + overlayMargins.container;
6189 const minimumSpaceToScroll = overlayMargins.container;
6190 const distanceToTopScroll = activatorRect.top - Math.max(scrollableContainerRect.top, 0);
6191 const distanceToBottomScroll = containerRect.top + Math.min(containerRect.height, scrollableContainerRect.top + scrollableContainerRect.height) - (activatorRect.top + activatorRect.height);
6192 const enoughSpaceFromTopScroll = distanceToTopScroll >= minimumSpaceToScroll;
6193 const enoughSpaceFromBottomScroll = distanceToBottomScroll >= minimumSpaceToScroll;
6194 const heightIfBelow = Math.min(spaceBelow, desiredHeight);
6195 const heightIfAbove = Math.min(spaceAbove, desiredHeight);
6196 const containerRectTop = fixed ? 0 : containerRect.top;
6197 const positionIfAbove = {
6198 height: heightIfAbove - verticalMargins,
6199 top: activatorTop + containerRectTop - heightIfAbove,
6200 positioning: 'above'
6201 };
6202 const positionIfBelow = {
6203 height: heightIfBelow - verticalMargins,
6204 top: activatorBottom + containerRectTop,
6205 positioning: 'below'
6206 };
6207 if (preferredPosition === 'above') {
6208 return (enoughSpaceFromTopScroll || distanceToTopScroll >= distanceToBottomScroll && !enoughSpaceFromBottomScroll) && (spaceAbove > desiredHeight || spaceAbove > spaceBelow) ? positionIfAbove : positionIfBelow;
6209 }
6210 if (preferredPosition === 'below') {
6211 return (enoughSpaceFromBottomScroll || distanceToBottomScroll >= distanceToTopScroll && !enoughSpaceFromTopScroll) && (spaceBelow > desiredHeight || spaceBelow > spaceAbove) ? positionIfBelow : positionIfAbove;
6212 }
6213 if (enoughSpaceFromTopScroll && enoughSpaceFromBottomScroll) {
6214 return spaceAbove > spaceBelow ? positionIfAbove : positionIfBelow;
6215 }
6216 return distanceToTopScroll > minimumSpaceToScroll ? positionIfAbove : positionIfBelow;
6217}
6218function calculateHorizontalPosition(activatorRect, overlayRect, containerRect, overlayMargins, preferredAlignment) {
6219 const maximum = containerRect.width - overlayRect.width;
6220 if (preferredAlignment === 'left') {
6221 return Math.min(maximum, Math.max(0, activatorRect.left - overlayMargins.horizontal));
6222 } else if (preferredAlignment === 'right') {
6223 const activatorRight = activatorRect.left + activatorRect.width;
6224 return Math.min(maximum, Math.max(0, activatorRight - overlayRect.width + overlayMargins.horizontal));
6225 }
6226 return Math.min(maximum, Math.max(0, activatorRect.center.x - overlayRect.width / 2));
6227}
6228function rectIsOutsideOfRect(inner, outer) {
6229 const { center } = inner;
6230 return center.y < outer.top || center.y > outer.top + outer.height;
6231}
6232
6233var styles$49 = {
6234 "PositionedOverlay": "p_gv",
6235 "fixed": "p_gu",
6236 "calculating": "p_vm",
6237};
6238
6239class PositionedOverlay$1 extends PureComponent {
6240 constructor() {
6241 super(...arguments);
6242 this.state = {
6243 measuring: true,
6244 activatorRect: getRectForNode(this.props.activator),
6245 left: 0,
6246 top: 0,
6247 height: 0,
6248 width: null,
6249 positioning: 'below',
6250 zIndex: null,
6251 outsideScrollableContainer: false,
6252 lockPosition: false
6253 };
6254 this.overlay = null;
6255 this.scrollableContainer = null;
6256 }
6257 componentDidMount() {
6258 this.scrollableContainer = Scrollable$2.forNode(this.props.activator);
6259 if (this.scrollableContainer && !this.props.fixed) {
6260 this.scrollableContainer.addEventListener('scroll', this.handleMeasurement);
6261 }
6262 this.handleMeasurement();
6263 }
6264 componentWillUnmount() {
6265 if (this.scrollableContainer && !this.props.fixed) {
6266 this.scrollableContainer.removeEventListener('scroll', this.handleMeasurement);
6267 }
6268 }
6269 // eslint-disable-next-line react/no-deprecated
6270 componentWillReceiveProps() {
6271 this.handleMeasurement();
6272 }
6273 componentDidUpdate() {
6274 const { outsideScrollableContainer, top } = this.state;
6275 const { onScrollOut, active } = this.props;
6276 if (active && onScrollOut != null && top !== 0 && outsideScrollableContainer) {
6277 onScrollOut();
6278 }
6279 }
6280 render() {
6281 const { left, top, zIndex, width } = this.state;
6282 const { render, fixed } = this.props;
6283 const style = {
6284 top: top == null ? undefined : top,
6285 left: left == null ? undefined : left,
6286 width: width == null ? undefined : width,
6287 zIndex: zIndex == null ? undefined : zIndex
6288 };
6289 const className = classNames$1(styles$49.PositionedOverlay, fixed && styles$49.fixed);
6290 return createElement(
6291 'div',
6292 { className: className, style: style, ref: this.setOverlay },
6293 createElement(EventListener$1, { event: 'resize', handler: this.handleMeasurement }),
6294 render(this.overlayDetails())
6295 );
6296 }
6297 overlayDetails() {
6298 const { measuring, left, positioning, height, activatorRect } = this.state;
6299 return {
6300 measuring,
6301 left,
6302 desiredHeight: height,
6303 positioning,
6304 activatorRect
6305 };
6306 }
6307 setOverlay(node) {
6308 this.overlay = node;
6309 }
6310 handleMeasurement() {
6311 const { lockPosition, top } = this.state;
6312 this.setState({
6313 left: 0,
6314 top: lockPosition ? top : 0,
6315 height: 0,
6316 positioning: 'below',
6317 measuring: true
6318 }, () => {
6319 if (this.overlay == null || this.scrollableContainer == null) {
6320 return;
6321 }
6322 const { activator, preferredPosition = 'below', preferredAlignment = 'center', onScrollOut, fullWidth, fixed } = this.props;
6323 const activatorRect = getRectForNode(activator);
6324 const currentOverlayRect = getRectForNode(this.overlay);
6325 const scrollableElement = isDocument$1(this.scrollableContainer) ? document.body : this.scrollableContainer;
6326 const scrollableContainerRect = getRectForNode(scrollableElement);
6327 const overlayRect = fullWidth ? Object.assign({}, currentOverlayRect, { width: activatorRect.width }) : currentOverlayRect;
6328 // If `body` is 100% height, it still acts as though it were not constrained
6329 // to that size. This adjusts for that.
6330 if (scrollableElement === document.body) {
6331 scrollableContainerRect.height = document.body.scrollHeight;
6332 }
6333 const overlayMargins = this.overlay.firstElementChild ? getMarginsForNode(this.overlay.firstElementChild) : { activator: 0, container: 0, horizontal: 0 };
6334 const containerRect = windowRect();
6335 const zIndexForLayer = getZIndexForLayerFromNode(activator);
6336 const zIndex = zIndexForLayer == null ? zIndexForLayer : zIndexForLayer + 1;
6337 const verticalPosition = calculateVerticalPosition(activatorRect, overlayRect, overlayMargins, scrollableContainerRect, containerRect, preferredPosition, fixed);
6338 const horizontalPosition = calculateHorizontalPosition(activatorRect, overlayRect, containerRect, overlayMargins, preferredAlignment);
6339 this.setState({
6340 measuring: false,
6341 activatorRect: getRectForNode(activator),
6342 left: horizontalPosition,
6343 top: lockPosition ? top : verticalPosition.top,
6344 lockPosition: Boolean(fixed),
6345 height: verticalPosition.height || 0,
6346 width: fullWidth ? overlayRect.width : null,
6347 positioning: verticalPosition.positioning,
6348 outsideScrollableContainer: onScrollOut != null && rectIsOutsideOfRect(activatorRect, intersectionWithViewport(scrollableContainerRect)),
6349 zIndex
6350 });
6351 });
6352 }
6353}
6354__decorate([autobind], PositionedOverlay$1.prototype, "overlayDetails", null);
6355__decorate([autobind], PositionedOverlay$1.prototype, "setOverlay", null);
6356__decorate([autobind], PositionedOverlay$1.prototype, "handleMeasurement", null);
6357function intersectionWithViewport(rect) {
6358 const viewport = windowRect();
6359 return new Rect({
6360 top: Math.max(rect.top, 0),
6361 left: Math.max(rect.left, 0),
6362 height: Math.min(rect.height - rect.top + viewport.top, viewport.height, viewport.height - rect.top),
6363 width: Math.min(rect.width - rect.left + viewport.left, viewport.width, viewport.width - rect.left)
6364 });
6365}
6366function getMarginsForNode(node) {
6367 const nodeStyles = window.getComputedStyle(node);
6368 return {
6369 activator: parseFloat(nodeStyles.marginTop || ''),
6370 container: parseFloat(nodeStyles.marginBottom || ''),
6371 horizontal: parseFloat(nodeStyles.marginLeft || '')
6372 };
6373}
6374function getZIndexForLayerFromNode(node) {
6375 const layerNode = closest(node, layer.selector) || document.body;
6376 const zIndex = layerNode === document.body ? 'auto' : parseInt(window.getComputedStyle(layerNode).zIndex || '0', 10);
6377 return zIndex === 'auto' || isNaN(zIndex) ? null : zIndex;
6378}
6379function windowRect() {
6380 return new Rect({
6381 top: window.scrollY,
6382 left: window.scrollX,
6383 height: window.innerHeight,
6384 width: window.innerWidth
6385 });
6386}
6387function isDocument$1(node) {
6388 return node === document;
6389}
6390
6391var CloseSource;
6392(function (CloseSource) {
6393 CloseSource[CloseSource["Click"] = 0] = "Click";
6394 CloseSource[CloseSource["EscapeKeypress"] = 1] = "EscapeKeypress";
6395 CloseSource[CloseSource["FocusOut"] = 2] = "FocusOut";
6396 CloseSource[CloseSource["ScrollOut"] = 3] = "ScrollOut";
6397})(CloseSource || (CloseSource = {}));
6398class PopoverOverlay$1 extends PureComponent {
6399 constructor() {
6400 super(...arguments);
6401 this.contentNode = createRef();
6402 this.transitionStatus = null;
6403 }
6404 componentDidMount() {
6405 if (this.props.active) {
6406 this.focusContent();
6407 }
6408 }
6409 componentDidUpdate(oldProps) {
6410 if (this.props.active && !oldProps.active) {
6411 this.focusContent();
6412 }
6413 }
6414 render() {
6415 const { active } = this.props;
6416 return createElement(
6417 Transition,
6418 { 'in': active, timeout: Duration.Fast, mountOnEnter: true, unmountOnExit: true },
6419 this.renderOverlay
6420 );
6421 }
6422 focusContent() {
6423 if (this.props.preventAutofocus) {
6424 return;
6425 }
6426 if (this.contentNode == null) {
6427 return;
6428 }
6429 write(() => {
6430 if (this.contentNode.current == null) {
6431 return;
6432 }
6433 this.contentNode.current.focus();
6434 });
6435 }
6436 renderOverlay(transitionStatus) {
6437 const { active, activator, fullWidth, preferredPosition = 'below', preferredAlignment = 'center', fixed } = this.props;
6438 return createElement(PositionedOverlay$1, { fullWidth: fullWidth, active: active, activator: activator, preferredPosition: preferredPosition, preferredAlignment: preferredAlignment
6439 // eslint-disable-next-line react/jsx-no-bind
6440 , render: this.renderPopover.bind(this, transitionStatus), fixed: fixed, onScrollOut: this.handleScrollOut });
6441 }
6442 renderPopover(transitionStatus, overlayDetails) {
6443 const { measuring, desiredHeight, positioning } = overlayDetails;
6444 const { id, children, sectioned, fullWidth, fullHeight } = this.props;
6445 const className = classNames$1(styles$48.Popover, transitionStatus && animationVariations(transitionStatus), positioning === 'above' && styles$48.positionedAbove, fullWidth && styles$48.fullWidth, measuring && styles$48.measuring);
6446 this.transitionStatus = transitionStatus;
6447 const contentStyles = measuring ? undefined : { height: desiredHeight };
6448 const contentClassNames = classNames$1(styles$48.Content, fullHeight && styles$48['Content-fullHeight']);
6449 const content = createElement(
6450 'div',
6451 { id: id, tabIndex: -1, className: contentClassNames, style: contentStyles, ref: this.contentNode },
6452 renderPopoverContent(children, { sectioned })
6453 );
6454 return createElement(
6455 'div',
6456 Object.assign({ className: className }, overlay.props),
6457 createElement(EventListener$1, { event: 'click', handler: this.handleClick }),
6458 createElement(EventListener$1, { event: 'touchstart', handler: this.handleClick }),
6459 createElement(KeypressListener$1, { keyCode: Keys.ESCAPE, handler: this.handleEscape }),
6460 createElement('div', { className: styles$48.FocusTracker
6461 // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
6462 , tabIndex: 0, onFocus: this.handleFocusFirstItem }),
6463 createElement(
6464 'div',
6465 { className: styles$48.Wrapper },
6466 content
6467 ),
6468 createElement('div', { className: styles$48.FocusTracker
6469 // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
6470 , tabIndex: 0, onFocus: this.handleFocusLastItem })
6471 );
6472 }
6473 handleClick(event) {
6474 const target$$1 = event.target;
6475 const { contentNode, props: { activator, onClose } } = this;
6476 const isDescendant = contentNode.current != null && nodeContainsDescendant(contentNode.current, target$$1);
6477 const isActivatorDescendant = nodeContainsDescendant(activator, target$$1);
6478 if (isDescendant || isActivatorDescendant || this.transitionStatus !== 'entered') {
6479 return;
6480 }
6481 onClose(CloseSource.Click);
6482 }
6483 handleScrollOut() {
6484 this.props.onClose(CloseSource.ScrollOut);
6485 }
6486 handleEscape() {
6487 this.props.onClose(CloseSource.EscapeKeypress);
6488 }
6489 handleFocusFirstItem() {
6490 this.props.onClose(CloseSource.FocusOut);
6491 }
6492 handleFocusLastItem() {
6493 this.props.onClose(CloseSource.FocusOut);
6494 }
6495}
6496__decorate([autobind], PopoverOverlay$1.prototype, "renderOverlay", null);
6497__decorate([autobind], PopoverOverlay$1.prototype, "renderPopover", null);
6498__decorate([autobind], PopoverOverlay$1.prototype, "handleClick", null);
6499__decorate([autobind], PopoverOverlay$1.prototype, "handleScrollOut", null);
6500__decorate([autobind], PopoverOverlay$1.prototype, "handleEscape", null);
6501__decorate([autobind], PopoverOverlay$1.prototype, "handleFocusFirstItem", null);
6502__decorate([autobind], PopoverOverlay$1.prototype, "handleFocusLastItem", null);
6503function renderPopoverContent(children, props) {
6504 const childrenArray = Children.toArray(children);
6505 if (isElementOfType(childrenArray[0], Pane$1)) {
6506 return childrenArray;
6507 }
6508 return wrapWithComponent(childrenArray, Pane$1, props);
6509}
6510function animationVariations(status) {
6511 switch (status) {
6512 case 'exiting':
6513 return styles$48.exiting;
6514 default:
6515 return null;
6516 }
6517}
6518
6519const getUniqueID$6 = createUniqueIDFactory('Popover');
6520class Popover$1 extends PureComponent {
6521 constructor() {
6522 super(...arguments);
6523 this.state = {
6524 activatorNode: null
6525 };
6526 this.activatorContainer = null;
6527 this.id = getUniqueID$6();
6528 }
6529 componentDidMount() {
6530 this.setAccessibilityAttributes();
6531 }
6532 componentDidUpdate() {
6533 if (this.activatorContainer && this.state.activatorNode && !this.activatorContainer.contains(this.state.activatorNode)) {
6534 this.setActivator(this.activatorContainer);
6535 }
6536 this.setAccessibilityAttributes();
6537 }
6538 render() {
6539 const _a = this.props,
6540 { activatorWrapper: WrapperComponent = 'div', children, onClose, activator, activatorWrapper, active, fixed, preventAutofocus = true } = _a,
6541 rest = __rest(_a, ["activatorWrapper", "children", "onClose", "activator", "activatorWrapper", "active", "fixed", "preventAutofocus"]);
6542 const { activatorNode } = this.state;
6543 const portal = activatorNode ? createElement(
6544 Portal$1,
6545 { idPrefix: 'popover' },
6546 createElement(
6547 PopoverOverlay$1,
6548 Object.assign({ id: this.id, activator: activatorNode, onClose: this.handleClose, active: active, fixed: fixed, preventAutofocus: preventAutofocus }, rest),
6549 children
6550 )
6551 ) : null;
6552 return createElement(
6553 WrapperComponent,
6554 { ref: this.setActivator },
6555 Children.only(this.props.activator),
6556 portal
6557 );
6558 }
6559 setAccessibilityAttributes() {
6560 const { id, activatorContainer } = this;
6561 if (activatorContainer == null) {
6562 return;
6563 }
6564 const firstFocusable = findFirstFocusableNode(activatorContainer);
6565 const focusableActivator = firstFocusable || activatorContainer;
6566 focusableActivator.tabIndex = focusableActivator.tabIndex || 0;
6567 focusableActivator.setAttribute('aria-controls', id);
6568 focusableActivator.setAttribute('aria-owns', id);
6569 focusableActivator.setAttribute('aria-haspopup', 'true');
6570 focusableActivator.setAttribute('aria-expanded', String(this.props.active));
6571 }
6572 handleClose(source) {
6573 this.props.onClose(source);
6574 if (this.activatorContainer == null) {
6575 return;
6576 }
6577 if (source === CloseSource.FocusOut || source === CloseSource.EscapeKeypress) {
6578 focusFirstFocusableNode(this.activatorContainer, false);
6579 }
6580 }
6581 setActivator(node) {
6582 if (node == null) {
6583 this.activatorContainer = null;
6584 this.setState({ activatorNode: null });
6585 return;
6586 }
6587 this.setState({ activatorNode: node.firstElementChild });
6588 this.activatorContainer = node;
6589 }
6590}
6591Popover$1.Pane = Pane$1;
6592Popover$1.Section = Section$5;
6593__decorate([autobind], Popover$1.prototype, "handleClose", null);
6594__decorate([autobind], Popover$1.prototype, "setActivator", null);
6595
6596const SELECT_ALL_ITEMS = 'All';
6597
6598var styles$50 = {
6599 "CheckboxWrapper": "p_vq",
6600 "Item": "p_ja",
6601 "persistActions": "p_x8",
6602 "Actions": "p_lp",
6603 "selected": "p_k4",
6604 "focused": "p_l3",
6605 "focusedInner": "p_u5",
6606 "Link": "p_y8",
6607 "Button": "p_lz",
6608 "Container": "p_th",
6609 "Owned": "p_pu",
6610 "Handle": "p_ab",
6611 "selectable": "p_n1",
6612 "selectMode": "p_gw",
6613 "Media": "p_f8",
6614 "Content": "p_ba",
6615 "Disclosure": "p_di",
6616};
6617
6618const intl = new Intl(undefined);
6619const { Provider: Provider$2, Consumer: Consumer$2 } = createContext({
6620 selectMode: false,
6621 resourceName: {
6622 singular: intl.translate('Polaris.ResourceList.defaultItemSingular'),
6623 plural: intl.translate('Polaris.ResourceList.defaultItemPlural')
6624 }
6625});
6626
6627const getUniqueCheckboxID = createUniqueIDFactory('ResourceListItemCheckbox');
6628class Item$9 extends PureComponent {
6629 constructor() {
6630 super(...arguments);
6631 this.state = {
6632 actionsMenuVisible: false,
6633 focused: false,
6634 focusedInner: false
6635 };
6636 this.node = null;
6637 this.checkboxId = getUniqueCheckboxID();
6638 }
6639 render() {
6640 const { children, url, media, shortcutActions, ariaControls, ariaExpanded, persistActions = false, polaris: { intl }, accessibilityLabel, context: { selectable, selectMode, loading } } = this.props;
6641 const { actionsMenuVisible, focused, focusedInner } = this.state;
6642 const selected = this.isSelected();
6643 // let mediaMarkup: React.ReactNode = null;
6644 let ownedMarkup = null;
6645 let handleMarkup = null;
6646 const mediaMarkup = media ? createElement(
6647 'div',
6648 { className: styles$50.Media },
6649 media
6650 ) : null;
6651 const checkboxAccessibilityLabel = accessibilityLabel || intl.translate('Polaris.Common.checkbox');
6652 if (selectable) {
6653 const label = selected ? intl.translate('Polaris.ResourceList.Item.deselectItem', {
6654 accessibilityLabel: checkboxAccessibilityLabel
6655 }) : intl.translate('Polaris.ResourceList.Item.selectItem', {
6656 accessibilityLabel: checkboxAccessibilityLabel
6657 });
6658 handleMarkup = createElement(
6659 'div',
6660 { className: styles$50.Handle, onClick: this.handleLargerSelectionArea },
6661 createElement(
6662 'div',
6663 { onClick: stopPropagation, className: styles$50.CheckboxWrapper },
6664 createElement(Checkbox$2, { id: this.checkboxId, label: label, labelHidden: true, onChange: this.handleSelection, checked: selected, disabled: loading })
6665 )
6666 );
6667 }
6668 if (media || selectable) {
6669 ownedMarkup = createElement(
6670 'div',
6671 { className: styles$50.Owned },
6672 handleMarkup,
6673 mediaMarkup
6674 );
6675 }
6676 const className = classNames$1(styles$50.Item, focused && styles$50.focused, selectable && styles$50.selectable, selected && styles$50.selected, selectMode && styles$50.selectMode, persistActions && styles$50.persistActions, focusedInner && styles$50.focusedInner);
6677 let actionsMarkup = null;
6678 let disclosureMarkup = null;
6679 if (shortcutActions) {
6680 if (persistActions) {
6681 actionsMarkup = createElement(
6682 'div',
6683 { className: styles$50.Actions, onClick: stopPropagation },
6684 createElement(
6685 ButtonGroup$1,
6686 null,
6687 buttonsFrom(shortcutActions, { size: 'slim', plain: true })
6688 )
6689 );
6690 disclosureMarkup = createElement(
6691 'div',
6692 { className: styles$50.Disclosure, onClick: stopPropagation },
6693 createElement(
6694 Popover$1,
6695 { activator: createElement(Button$2, { 'aria-label': intl.translate('Polaris.ResourceList.Item.actionsDropdown'), onClick: this.handleActionsClick, plain: true, icon: 'horizontalDots' }), onClose: this.handleCloseRequest, active: actionsMenuVisible },
6696 createElement(ActionList$1, { items: shortcutActions })
6697 )
6698 );
6699 } else {
6700 actionsMarkup = createElement(
6701 'div',
6702 { className: styles$50.Actions, onClick: stopPropagation },
6703 createElement(
6704 ButtonGroup$1,
6705 { segmented: true },
6706 buttonsFrom(shortcutActions, { size: 'slim' })
6707 )
6708 );
6709 }
6710 }
6711 const content = children ? createElement(
6712 'div',
6713 { className: styles$50.Content },
6714 children
6715 ) : null;
6716 const containerMarkup = createElement(
6717 'div',
6718 { className: styles$50.Container, id: this.props.id },
6719 ownedMarkup,
6720 content,
6721 actionsMarkup,
6722 disclosureMarkup
6723 );
6724 const accessibleMarkup = url ? createElement(UnstyledLink$2, { 'aria-describedby': this.props.id, 'aria-label': accessibilityLabel, className: styles$50.Link, url: url, onFocus: this.handleAnchorFocus, onBlur: this.handleFocusedBlur }) : createElement('button', { className: styles$50.Button, 'aria-label': accessibilityLabel, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, onClick: this.handleClick, onFocus: this.handleAnchorFocus, onBlur: this.handleFocusedBlur });
6725 return createElement(
6726 'div',
6727 { ref: this.setNode, className: className, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, onKeyUp: this.handleKeypress },
6728 accessibleMarkup,
6729 containerMarkup
6730 );
6731 }
6732 setNode(node) {
6733 this.node = node;
6734 }
6735 handleAnchorFocus() {
6736 this.setState({ focused: true, focusedInner: false });
6737 }
6738 handleFocusedBlur() {
6739 this.setState({ focused: true, focusedInner: true });
6740 }
6741 handleFocus() {
6742 this.setState({ focused: true });
6743 }
6744 handleBlur(event) {
6745 const isInside = this.compareEventNode(event);
6746 if (this.node == null || !this.node.contains(event.relatedTarget)) {
6747 this.setState({ focused: false });
6748 } else if (isInside) {
6749 this.setState({ focusedInner: true });
6750 }
6751 }
6752 handleMouseDown() {
6753 this.setState({ focusedInner: true });
6754 }
6755 handleLargerSelectionArea(event) {
6756 stopPropagation(event);
6757 this.handleSelection(!this.isSelected());
6758 }
6759 handleSelection(value) {
6760 const { id, context: { onSelectionChange } } = this.props;
6761 if (id == null || onSelectionChange == null) {
6762 return;
6763 }
6764 this.setState({ focused: true, focusedInner: true });
6765 onSelectionChange(value, id);
6766 }
6767 handleClick(event) {
6768 const { id, onClick, url, context: { selectMode } } = this.props;
6769 const anchor = this.node && this.node.querySelector('a');
6770 if (selectMode) {
6771 this.handleLargerSelectionArea(event);
6772 return;
6773 }
6774 if (anchor === event.target) {
6775 return;
6776 }
6777 if (onClick) {
6778 onClick(id);
6779 }
6780 if (url && anchor) {
6781 anchor.click();
6782 }
6783 }
6784 handleKeypress(event) {
6785 const { onClick = noop, context: { selectMode } } = this.props;
6786 const { key } = event;
6787 if (key === 'Enter' && !selectMode) {
6788 onClick();
6789 }
6790 }
6791 handleActionsClick() {
6792 this.setState(({ actionsMenuVisible }) => ({
6793 actionsMenuVisible: !actionsMenuVisible
6794 }));
6795 }
6796 handleCloseRequest() {
6797 this.setState({ actionsMenuVisible: false });
6798 }
6799 isSelected() {
6800 const { id, context: { selectedItems } } = this.props;
6801 return selectedItems && (Array.isArray(selectedItems) && selectedItems.includes(id) || selectedItems === SELECT_ALL_ITEMS);
6802 }
6803 compareEventNode(event) {
6804 return this.props.onClick ? event.target === this.node : event.target.tagName.toLowerCase() === 'a';
6805 }
6806}
6807__decorate([autobind], Item$9.prototype, "setNode", null);
6808__decorate([autobind], Item$9.prototype, "handleAnchorFocus", null);
6809__decorate([autobind], Item$9.prototype, "handleFocusedBlur", null);
6810__decorate([autobind], Item$9.prototype, "handleFocus", null);
6811__decorate([autobind], Item$9.prototype, "handleBlur", null);
6812__decorate([autobind], Item$9.prototype, "handleMouseDown", null);
6813__decorate([autobind], Item$9.prototype, "handleLargerSelectionArea", null);
6814__decorate([autobind], Item$9.prototype, "handleSelection", null);
6815__decorate([autobind], Item$9.prototype, "handleClick", null);
6816__decorate([autobind], Item$9.prototype, "handleKeypress", null);
6817__decorate([autobind], Item$9.prototype, "handleActionsClick", null);
6818__decorate([autobind], Item$9.prototype, "handleCloseRequest", null);
6819function stopPropagation(event) {
6820 event.stopPropagation();
6821}
6822var Item$10 = compose(withContext$1(Consumer$2), withAppProvider())(Item$9);
6823
6824var styles$51 = {
6825 "FiltersWrapper": "p_rf",
6826 "ResourceList": "p_ij",
6827 "HeaderOuterWrapper": "p_qh",
6828 "HeaderWrapper-disabled": "p_ut",
6829 "HeaderWrapper-overlay": "p_rz",
6830 "HeaderWrapper": "p_nt",
6831 "HeaderWrapper-isSticky": "p_q2",
6832 "HeaderContentWrapper": "p_k5",
6833 "HeaderWrapper-inSelectMode": "p_vi",
6834 "SortWrapper": "p_jh",
6835 "HeaderWrapper-hasSelect": "p_vr",
6836 "HeaderWrapper-hasSort": "p_na",
6837 "SortLabel": "p_eo",
6838 "ItemCountTextWrapper": "p_gs",
6839 "BulkActionsWrapper": "p_pp",
6840 "CheckableButtonWrapper": "p_j9",
6841 "SelectButtonWrapper": "p_r1",
6842 "EmptySearchResultWrapper": "p_es",
6843 "ResourceListWrapper": "p_y5",
6844 "ItemWrapper": "p_f0",
6845 "SpinnerContainer": "p_k0",
6846 "LoadingOverlay": "p_c7",
6847 "DisabledPointerEvents": "p_kh",
6848};
6849
6850const SMALL_SCREEN_WIDTH = 458;
6851const SMALL_SPINNER_HEIGHT = 28;
6852const LARGE_SPINNER_HEIGHT = 45;
6853const getUniqueID$4 = createUniqueIDFactory('Select');
6854class ResourceList$1 extends Component {
6855 constructor(props) {
6856 super(props);
6857 this.state = {
6858 selectMode: false,
6859 loadingPosition: 0,
6860 listNode: null
6861 };
6862 this.listRef = createRef();
6863 const { polaris: { intl } } = props;
6864 this.defaultResourceName = {
6865 singular: intl.translate('Polaris.ResourceList.defaultItemSingular'),
6866 plural: intl.translate('Polaris.ResourceList.defaultItemPlural')
6867 };
6868 }
6869 get selectable() {
6870 const { promotedBulkActions, bulkActions } = this.props;
6871 return Boolean(promotedBulkActions && promotedBulkActions.length > 0 || bulkActions && bulkActions.length > 0);
6872 }
6873 get bulkSelectState() {
6874 const { selectedItems, items } = this.props;
6875 let selectState = 'indeterminate';
6876 if (!selectedItems || Array.isArray(selectedItems) && selectedItems.length === 0) {
6877 selectState = false;
6878 } else if (selectedItems === SELECT_ALL_ITEMS || Array.isArray(selectedItems) && selectedItems.length === items.length) {
6879 selectState = true;
6880 }
6881 return selectState;
6882 }
6883 get itemCountText() {
6884 const { resourceName = this.defaultResourceName, items, polaris: { intl } } = this.props;
6885 const itemsCount = items.length;
6886 const resource = itemsCount === 1 ? resourceName.singular : resourceName.plural;
6887 return intl.translate('Polaris.ResourceList.showing', {
6888 itemsCount,
6889 resource
6890 });
6891 }
6892 get bulkActionsLabel() {
6893 const { selectedItems = [], items, polaris: { intl } } = this.props;
6894 const selectedItemsCount = selectedItems === SELECT_ALL_ITEMS ? `${items.length}+` : selectedItems.length;
6895 return intl.translate('Polaris.ResourceList.selected', {
6896 selectedItemsCount
6897 });
6898 }
6899 get bulkActionsAccessibilityLabel() {
6900 const { resourceName = this.defaultResourceName, selectedItems = [], items, polaris: { intl } } = this.props;
6901 const selectedItemsCount = selectedItems.length;
6902 const totalItemsCount = items.length;
6903 const allSelected = selectedItemsCount === totalItemsCount;
6904 if (totalItemsCount === 1 && allSelected) {
6905 return intl.translate('Polaris.ResourceList.a11yCheckboxDeselectAllSingle', { resourceNameSingular: resourceName.singular });
6906 } else if (totalItemsCount === 1) {
6907 return intl.translate('Polaris.ResourceList.a11yCheckboxSelectAllSingle', {
6908 resourceNameSingular: resourceName.singular
6909 });
6910 } else if (allSelected) {
6911 return intl.translate('Polaris.ResourceList.a11yCheckboxDeselectAllMultiple', {
6912 itemsLength: items.length,
6913 resourceNamePlural: resourceName.plural
6914 });
6915 } else {
6916 return intl.translate('Polaris.ResourceList.a11yCheckboxSelectAllMultiple', {
6917 itemsLength: items.length,
6918 resourceNamePlural: resourceName.plural
6919 });
6920 }
6921 }
6922 get paginatedSelectAllText() {
6923 const { hasMoreItems, selectedItems, items, resourceName = this.defaultResourceName, polaris: { intl } } = this.props;
6924 if (!this.selectable || !hasMoreItems) {
6925 return;
6926 }
6927 if (selectedItems === SELECT_ALL_ITEMS) {
6928 return intl.translate('Polaris.ResourceList.allItemsSelected', {
6929 itemsLength: items.length,
6930 resourceNamePlural: resourceName.plural
6931 });
6932 }
6933 }
6934 get paginatedSelectAllAction() {
6935 const { hasMoreItems, selectedItems, items, resourceName = this.defaultResourceName, polaris: { intl } } = this.props;
6936 if (!this.selectable || !hasMoreItems) {
6937 return;
6938 }
6939 const actionText = selectedItems === SELECT_ALL_ITEMS ? intl.translate('Polaris.Common.undo') : intl.translate('Polaris.ResourceList.selectAllItems', {
6940 itemsLength: items.length,
6941 resourceNamePlural: resourceName.plural
6942 });
6943 return {
6944 content: actionText,
6945 onAction: this.handleSelectAllItemsInStore
6946 };
6947 }
6948 get emptySearchResultText() {
6949 const { polaris: { intl }, resourceName = this.defaultResourceName } = this.props;
6950 return {
6951 title: intl.translate('Polaris.ResourceList.emptySearchResultTitle', {
6952 resourceNamePlural: resourceName.plural
6953 }),
6954 description: intl.translate('Polaris.ResourceList.emptySearchResultDescription')
6955 };
6956 }
6957 get getContext() {
6958 const { selectedItems, resourceName = this.defaultResourceName, loading } = this.props;
6959 const { selectMode } = this.state;
6960 return {
6961 selectable: this.selectable,
6962 selectedItems,
6963 selectMode,
6964 resourceName,
6965 loading,
6966 onSelectionChange: this.handleSelectionChange
6967 };
6968 }
6969 // eslint-disable-next-line react/no-deprecated
6970 componentWillReceiveProps(nextProps) {
6971 const { selectedItems } = this.props;
6972 if (selectedItems && selectedItems.length > 0 && (!nextProps.selectedItems || nextProps.selectedItems.length === 0) && !isSmallScreen()) {
6973 this.setState({ selectMode: false });
6974 }
6975 }
6976 componentDidMount() {
6977 this.setState({
6978 listNode: this.listRef.current
6979 }, () => {
6980 if (this.props.loading) {
6981 this.setLoadingPosition();
6982 }
6983 });
6984 }
6985 componentDidUpdate(prevProps) {
6986 if (this.props.loading && !prevProps.loading) {
6987 this.setLoadingPosition();
6988 }
6989 }
6990 render() {
6991 const { items, promotedBulkActions, bulkActions, filterControl, loading, showHeader = false, sortOptions, sortValue, onSortChange, polaris: { intl } } = this.props;
6992 const { selectMode, loadingPosition, listNode } = this.state;
6993 const itemsExist = items.length > 0;
6994 const filterControlMarkup = filterControl ? createElement(
6995 'div',
6996 { className: styles$51.FiltersWrapper },
6997 filterControl
6998 ) : null;
6999 const bulkActionsMarkup = this.selectable ? createElement(
7000 'div',
7001 { className: styles$51.BulkActionsWrapper },
7002 createElement(BulkActions$2, { label: this.bulkActionsLabel, accessibilityLabel: this.bulkActionsAccessibilityLabel, selected: this.bulkSelectState, onToggleAll: this.handleToggleAll, selectMode: selectMode, onSelectModeToggle: this.handleSelectMode, promotedActions: promotedBulkActions, paginatedSelectAllAction: this.paginatedSelectAllAction, paginatedSelectAllText: this.paginatedSelectAllText, actions: bulkActions, disabled: loading }),
7003 createElement(EventListener$1, { event: 'resize', handler: this.handleResize })
7004 ) : null;
7005 const selectId = getUniqueID$4();
7006 const sortingLabelMarkup = createElement(
7007 'label',
7008 { className: styles$51.SortLabel, htmlFor: selectId },
7009 intl.translate('Polaris.ResourceList.sortingLabel')
7010 );
7011 const sortingSelectMarkup = sortOptions && sortOptions.length > 0 ? createElement(
7012 'div',
7013 { className: styles$51.SortWrapper },
7014 sortingLabelMarkup,
7015 createElement(Select$1, { label: intl.translate('Polaris.ResourceList.sortingLabel'), labelHidden: true, options: sortOptions, onChange: onSortChange, value: sortValue, disabled: selectMode })
7016 ) : null;
7017 const itemCountTextMarkup = createElement(
7018 'div',
7019 { className: styles$51.ItemCountTextWrapper },
7020 this.itemCountText
7021 );
7022 const selectButtonMarkup = this.selectable ? createElement(
7023 'div',
7024 { className: styles$51.SelectButtonWrapper },
7025 createElement(
7026 Button$2,
7027 { disabled: selectMode, icon: selectIcon
7028 // eslint-disable-next-line react/jsx-no-bind
7029 , onClick: this.handleSelectMode.bind(this, true) },
7030 intl.translate('Polaris.ResourceList.selectButtonText')
7031 )
7032 ) : null;
7033 const checkableButtonMarkup = this.selectable ? createElement(
7034 'div',
7035 { className: styles$51.CheckableButtonWrapper },
7036 createElement(CheckableButton$2, { accessibilityLabel: this.bulkActionsAccessibilityLabel, label: this.itemCountText, onToggleAll: this.handleToggleAll, plain: true, disabled: loading })
7037 ) : null;
7038 const needsHeader = this.selectable || sortOptions && sortOptions.length > 0;
7039 const headerWrapperOverlay = loading ? createElement('div', { className: styles$51['HeaderWrapper-overlay'] }) : null;
7040 const headerMarkup = (showHeader || needsHeader) && listNode && itemsExist && createElement(
7041 'div',
7042 { className: styles$51.HeaderOuterWrapper },
7043 createElement(
7044 Sticky$1,
7045 { boundingElement: listNode },
7046 isSticky => {
7047 const headerClassName = classNames$1(styles$51.HeaderWrapper, sortOptions && sortOptions.length > 0 && styles$51['HeaderWrapper-hasSort'], this.selectable && styles$51['HeaderWrapper-hasSelect'], loading && styles$51['HeaderWrapper-disabled'], this.selectable && selectMode && styles$51['HeaderWrapper-inSelectMode'], isSticky && styles$51['HeaderWrapper-isSticky']);
7048 return createElement(
7049 'div',
7050 { className: headerClassName },
7051 headerWrapperOverlay,
7052 createElement(
7053 'div',
7054 { className: styles$51.HeaderContentWrapper },
7055 itemCountTextMarkup,
7056 checkableButtonMarkup,
7057 sortingSelectMarkup,
7058 selectButtonMarkup
7059 ),
7060 bulkActionsMarkup
7061 );
7062 }
7063 )
7064 );
7065 const emptyStateMarkup = filterControl && !itemsExist ? createElement(
7066 'div',
7067 { className: styles$51.EmptySearchResultWrapper },
7068 createElement(EmptySearchResult$2, Object.assign({}, this.emptySearchResultText, { withIllustration: true }))
7069 ) : null;
7070 const defaultTopPadding = 8;
7071 const topPadding = loadingPosition > 0 ? loadingPosition : defaultTopPadding;
7072 const spinnerStyle = { paddingTop: `${topPadding}px` };
7073 const spinnerSize = items.length === 1 ? 'small' : 'large';
7074 const loadingOverlay = loading ? createElement(
7075 Fragment,
7076 null,
7077 createElement(
7078 'div',
7079 { className: styles$51.SpinnerContainer, style: spinnerStyle },
7080 createElement(Spinner$2, { size: spinnerSize, accessibilityLabel: 'Items are loading' })
7081 ),
7082 createElement('div', { className: styles$51.LoadingOverlay })
7083 ) : null;
7084 const resourceListClassName = classNames$1(styles$51.ResourceList, loading && styles$51.disabledPointerEvents);
7085 const listMarkup = itemsExist ? createElement(
7086 'ul',
7087 { className: resourceListClassName, ref: this.listRef, 'aria-live': 'polite', 'aria-busy': loading },
7088 loadingOverlay,
7089 items.map(this.renderItem)
7090 ) : emptyStateMarkup;
7091 return createElement(
7092 Provider$2,
7093 { value: this.getContext },
7094 createElement(
7095 'div',
7096 { className: styles$51.ResourceListWrapper },
7097 filterControlMarkup,
7098 headerMarkup,
7099 listMarkup
7100 )
7101 );
7102 }
7103 handleResize() {
7104 const { selectedItems } = this.props;
7105 const { selectMode } = this.state;
7106 if (selectedItems && selectedItems.length === 0 && selectMode && !isSmallScreen()) {
7107 this.handleSelectMode(false);
7108 }
7109 }
7110 setLoadingPosition() {
7111 const { listNode } = this.state;
7112 if (listNode != null) {
7113 if (typeof window === 'undefined') {
7114 return;
7115 }
7116 const overlay = listNode.getBoundingClientRect();
7117 const viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
7118 const overflow = viewportHeight - overlay.height;
7119 const spinnerHeight = this.props.items.length === 1 ? SMALL_SPINNER_HEIGHT : LARGE_SPINNER_HEIGHT;
7120 const spinnerPosition = overflow > 0 ? (overlay.height - spinnerHeight) / 2 : (viewportHeight - overlay.top - spinnerHeight) / 2;
7121 this.setState({ loadingPosition: spinnerPosition });
7122 }
7123 }
7124 handleSelectAllItemsInStore() {
7125 const { onSelectionChange, selectedItems, items, idForItem = defaultIdForItem } = this.props;
7126 const newlySelectedItems = selectedItems === SELECT_ALL_ITEMS ? getAllItemsOnPage(items, idForItem) : SELECT_ALL_ITEMS;
7127 if (onSelectionChange) {
7128 onSelectionChange(newlySelectedItems);
7129 }
7130 }
7131 renderItem(item, index) {
7132 const { renderItem, idForItem = defaultIdForItem, loading } = this.props;
7133 const id = idForItem(item, index);
7134 const tabIndex = loading ? -1 : 0;
7135 return createElement(
7136 'li',
7137 { key: id, className: styles$51.ItemWrapper, tabIndex: tabIndex },
7138 renderItem(item, id)
7139 );
7140 }
7141 handleSelectionChange(selected, id) {
7142 const { onSelectionChange, selectedItems, items, idForItem = defaultIdForItem } = this.props;
7143 if (selectedItems == null || onSelectionChange == null) {
7144 return;
7145 }
7146 const newlySelectedItems = selectedItems === SELECT_ALL_ITEMS ? getAllItemsOnPage(items, idForItem) : [...selectedItems];
7147 if (selected) {
7148 newlySelectedItems.push(id);
7149 } else {
7150 newlySelectedItems.splice(newlySelectedItems.indexOf(id), 1);
7151 }
7152 if (newlySelectedItems.length === 0 && !isSmallScreen()) {
7153 this.handleSelectMode(false);
7154 } else if (newlySelectedItems.length > 0) {
7155 this.handleSelectMode(true);
7156 }
7157 if (onSelectionChange) {
7158 onSelectionChange(newlySelectedItems);
7159 }
7160 }
7161 handleSelectMode(selectMode) {
7162 const { onSelectionChange } = this.props;
7163 this.setState({ selectMode });
7164 if (!selectMode && onSelectionChange) {
7165 onSelectionChange([]);
7166 }
7167 }
7168 handleToggleAll() {
7169 const { onSelectionChange, selectedItems, items, idForItem = defaultIdForItem } = this.props;
7170 let newlySelectedItems = [];
7171 if (Array.isArray(selectedItems) && selectedItems.length === items.length || selectedItems === SELECT_ALL_ITEMS) {
7172 newlySelectedItems = [];
7173 } else {
7174 newlySelectedItems = items.map((item, index) => {
7175 const id = idForItem(item, index);
7176 return id;
7177 });
7178 }
7179 if (newlySelectedItems.length === 0 && !isSmallScreen()) {
7180 this.handleSelectMode(false);
7181 } else if (newlySelectedItems.length > 0) {
7182 this.handleSelectMode(true);
7183 }
7184 if (onSelectionChange) {
7185 onSelectionChange(newlySelectedItems);
7186 }
7187 }
7188}
7189ResourceList$1.Item = Item$10;
7190ResourceList$1.FilterControl = FilterControl$2;
7191__decorate([autobind], ResourceList$1.prototype, "bulkSelectState", null);
7192__decorate([autobind], ResourceList$1.prototype, "itemCountText", null);
7193__decorate([autobind], ResourceList$1.prototype, "bulkActionsLabel", null);
7194__decorate([autobind], ResourceList$1.prototype, "bulkActionsAccessibilityLabel", null);
7195__decorate([autobind], ResourceList$1.prototype, "paginatedSelectAllText", null);
7196__decorate([autobind], ResourceList$1.prototype, "paginatedSelectAllAction", null);
7197__decorate([debounce(50), autobind], ResourceList$1.prototype, "handleResize", null);
7198__decorate([autobind], ResourceList$1.prototype, "setLoadingPosition", null);
7199__decorate([autobind], ResourceList$1.prototype, "handleSelectAllItemsInStore", null);
7200__decorate([autobind], ResourceList$1.prototype, "renderItem", null);
7201__decorate([autobind], ResourceList$1.prototype, "handleSelectionChange", null);
7202__decorate([autobind], ResourceList$1.prototype, "handleSelectMode", null);
7203__decorate([autobind], ResourceList$1.prototype, "handleToggleAll", null);
7204function getAllItemsOnPage(items, idForItem) {
7205 return items.map((item, index) => {
7206 return idForItem(item, index);
7207 });
7208}
7209function defaultIdForItem(item, index) {
7210 return item.hasOwnProperty('id') ? item.id : index.toString();
7211}
7212function isSmallScreen() {
7213 return typeof window === 'undefined' ? false : window.innerWidth <= SMALL_SCREEN_WIDTH;
7214}
7215var ResourceList$2 = withAppProvider()(ResourceList$1);
7216
7217var styles$52 = {
7218 "marginNone": "p_sr",
7219 "paddingNone": "p_ow",
7220 "marginExtraTight": "p_vf",
7221 "paddingExtraTight": "p_z8",
7222 "marginTight": "p_dt",
7223 "paddingTight": "p_zi",
7224 "marginBase": "p_pc",
7225 "paddingBase": "p_z6",
7226 "marginLoose": "p_rj",
7227 "paddingLoose": "p_fh",
7228 "marginExtraLoose": "p_hk",
7229 "paddingExtraLoose": "p_a7",
7230 "marginTopNone": "p_cd",
7231 "paddingTopNone": "p_mg",
7232 "marginTopExtraTight": "p_om",
7233 "paddingTopExtraTight": "p_pe",
7234 "marginTopTight": "p_or",
7235 "paddingTopTight": "p_cc",
7236 "marginTopBase": "p_xw",
7237 "paddingTopBase": "p_vs",
7238 "marginTopLoose": "p_gd",
7239 "paddingTopLoose": "p_eb",
7240 "marginTopExtraLoose": "p_x6",
7241 "paddingTopExtraLoose": "p_iy",
7242 "marginLeftNone": "p_lh",
7243 "paddingLeftNone": "p_gp",
7244 "marginLeftExtraTight": "p_jq",
7245 "paddingLeftExtraTight": "p_sb",
7246 "marginLeftTight": "p_s7",
7247 "paddingLeftTight": "p_zq",
7248 "marginLeftBase": "p_xk",
7249 "paddingLeftBase": "p_g5",
7250 "marginLeftLoose": "p_s4",
7251 "paddingLeftLoose": "p_g9",
7252 "marginLeftExtraLoose": "p_uz",
7253 "paddingLeftExtraLoose": "p_nj",
7254 "marginRightNone": "p_kc",
7255 "paddingRightNone": "p_c8",
7256 "marginRightExtraTight": "p_fj",
7257 "paddingRightExtraTight": "p_bs",
7258 "marginRightTight": "p_xj",
7259 "paddingRightTight": "p_um",
7260 "marginRightBase": "p_gf",
7261 "paddingRightBase": "p_yh",
7262 "marginRightLoose": "p_uq",
7263 "paddingRightLoose": "p_t6",
7264 "marginRightExtraLoose": "p_io",
7265 "paddingRightExtraLoose": "p_sv",
7266 "marginBottomNone": "p_s1",
7267 "paddingBottomNone": "p_a9",
7268 "marginBottomExtraTight": "p_nh",
7269 "paddingBottomExtraTight": "p_hy",
7270 "marginBottomTight": "p_ps",
7271 "paddingBottomTight": "p_ue",
7272 "marginBottomBase": "p_f4",
7273 "paddingBottomBase": "p_xm",
7274 "marginBottomLoose": "p_lo",
7275 "paddingBottomLoose": "p_xu",
7276 "marginBottomExtraLoose": "p_ac",
7277 "paddingBottomExtraLoose": "p_v7",
7278};
7279
7280function Spacing$1({ children, margin, marginTop, marginLeft, marginRight, marginBottom, padding, paddingTop, paddingLeft, paddingRight, paddingBottom }) {
7281 const className = classNames$1(styles$52.Spacing, margin && styles$52[variationName$1('margin', stringSpacing(margin))], marginTop && styles$52[variationName$1('marginTop', stringSpacing(marginTop))], marginLeft && styles$52[variationName$1('marginLeft', stringSpacing(marginLeft))], marginRight && styles$52[variationName$1('marginRight', stringSpacing(marginRight))], marginBottom && styles$52[variationName$1('marginBottom', stringSpacing(marginBottom))], padding && styles$52[variationName$1('padding', stringSpacing(padding))], paddingTop && styles$52[variationName$1('paddingTop', stringSpacing(paddingTop))], paddingLeft && styles$52[variationName$1('paddingLeft', stringSpacing(paddingLeft))], paddingRight && styles$52[variationName$1('paddingRight', stringSpacing(paddingRight))], paddingBottom && styles$52[variationName$1('paddingBottom', stringSpacing(paddingBottom))]);
7282 return createElement(
7283 'div',
7284 { className: className },
7285 children
7286 );
7287}
7288function stringSpacing(value) {
7289 if (typeof value === 'string') {
7290 return value;
7291 }
7292 if (value === true) {
7293 return 'base';
7294 }
7295 return 'none';
7296}
7297
7298class FilterControl$1 extends Component {
7299 render() {
7300 const { searchValue, appliedFilters = [], additionalAction, focused = false, filters = [], onSearchBlur, onSearchChange, names, polaris: { intl }, context: { selectMode } } = this.props;
7301 let resourceName = this.props.context.resourceName;
7302 if (names) {
7303 resourceName = {
7304 singular: names.singular,
7305 plural: names.plural
7306 };
7307 }
7308 let textFieldLabel = intl.translate('Polaris.ResourceList.FilterControl.textFieldLabel', {
7309 resourceNamePlural: resourceName.plural.toLocaleLowerCase()
7310 });
7311 textFieldLabel = `${textFieldLabel}...`;
7312 if (additionalAction) {
7313 additionalAction.disabled = selectMode;
7314 }
7315 const additionalActionButton = additionalAction && buttonsFrom(additionalAction) || null;
7316 const filterCreatorMarkup = filters.length > 0 ? createElement(
7317 Spacing$1,
7318 { marginRight: true },
7319 createElement(FilterCreator$1, { resourceName: resourceName, filters: filters, onAddFilter: this.handleAddFilter, disabled: selectMode })
7320 ) : null;
7321 const appliedFiltersMarkup = appliedFilters.map(appliedFilter => {
7322 const activeFilterLabel = this.getFilterLabel(appliedFilter);
7323 const filterId = idFromFilter(appliedFilter);
7324 return createElement(
7325 'li',
7326 { className: styles$43.AppliedFilter, key: filterId },
7327 createElement(
7328 Tag$2,
7329 { onRemove: this.getRemoveFilterCallback(filterId), disabled: selectMode },
7330 activeFilterLabel
7331 )
7332 );
7333 });
7334 const appliedFiltersWrapper = appliedFilters.length > 0 ? createElement(
7335 'ul',
7336 { className: styles$43.AppliedFilters },
7337 appliedFiltersMarkup
7338 ) : null;
7339 return createElement(
7340 FormLayout$1,
7341 null,
7342 createElement(
7343 'div',
7344 { className: styles$43.Controls },
7345 filterCreatorMarkup,
7346 createElement(
7347 'div',
7348 { className: styles$43.Search },
7349 createElement(TextField$1, { label: textFieldLabel, labelHidden: true, placeholder: textFieldLabel, prefix: createElement(Icon$2, { source: 'search', color: 'inkLightest' }), value: searchValue, onChange: onSearchChange, onBlur: onSearchBlur, focused: focused, disabled: selectMode })
7350 ),
7351 additionalActionButton
7352 ),
7353 appliedFiltersWrapper
7354 );
7355 }
7356 handleAddFilter(newFilter) {
7357 const { onFiltersChange, appliedFilters = [] } = this.props;
7358 if (!onFiltersChange) {
7359 return;
7360 }
7361 const foundFilter = appliedFilters.find(appliedFilter => idFromFilter(appliedFilter) === idFromFilter(newFilter));
7362 if (foundFilter) {
7363 return;
7364 }
7365 const newAppliedFilters = [...appliedFilters, newFilter];
7366 onFiltersChange(newAppliedFilters);
7367 }
7368 getRemoveFilterCallback(filterId) {
7369 return () => {
7370 this.handleRemoveFilter(filterId);
7371 };
7372 }
7373 handleRemoveFilter(filterId) {
7374 const { onFiltersChange, appliedFilters = [] } = this.props;
7375 if (!onFiltersChange) {
7376 return;
7377 }
7378 const foundIndex = appliedFilters.findIndex(appliedFilter => idFromFilter(appliedFilter) === filterId);
7379 const newAppliedFilters = foundIndex >= 0 ? [...appliedFilters.slice(0, foundIndex), ...appliedFilters.slice(foundIndex + 1, appliedFilters.length)] : [...appliedFilters];
7380 onFiltersChange(newAppliedFilters);
7381 }
7382 getFilterLabel(appliedFilter) {
7383 const { key, value, label } = appliedFilter;
7384 if (label) {
7385 return label;
7386 }
7387 const { filters = [] } = this.props;
7388 const filter = filters.find(filter => {
7389 const { minKey, maxKey, operatorText } = filter;
7390 if (minKey || maxKey) {
7391 return filter.key === key || minKey === key || maxKey === key;
7392 }
7393 if (operatorText && typeof operatorText !== 'string') {
7394 return filter.key === key || operatorText.filter(({ key: operatorKey }) => operatorKey === key).length === 1;
7395 }
7396 return filter.key === key;
7397 });
7398 if (!filter) {
7399 return value;
7400 }
7401 const filterOperatorLabel = findOperatorLabel(filter, appliedFilter);
7402 const filterLabelByType = this.findFilterLabelByType(filter, appliedFilter);
7403 if (!filterOperatorLabel) {
7404 return `${filter.label} ${filterLabelByType}`;
7405 }
7406 return `${filter.label} ${filterOperatorLabel} ${filterLabelByType}`;
7407 }
7408 findFilterLabelByType(filter, appliedFilter) {
7409 const { polaris: { intl } } = this.props;
7410 const { value: appliedFilterValue } = appliedFilter;
7411 if (filter.type === FilterType.Select) {
7412 const foundFilterOption = filter.options.find(option => typeof option === 'string' ? option === appliedFilterValue : option.value === appliedFilterValue);
7413 if (foundFilterOption) {
7414 return typeof foundFilterOption === 'string' ? foundFilterOption : foundFilterOption.label;
7415 }
7416 }
7417 if (filter.type === FilterType.DateSelector) {
7418 if (filter.key === appliedFilter.key) {
7419 const filterLabelKey = `Polaris.ResourceList.DateSelector.FilterLabelForValue.${appliedFilter.value}`;
7420 return intl.translationKeyExists(filterLabelKey) ? intl.translate(filterLabelKey) : appliedFilter.value;
7421 }
7422 if (appliedFilter.key === filter.maxKey) {
7423 return intl.translate('Polaris.ResourceList.DateSelector.FilterLabelForValue.on_or_before', {
7424 date: formatDateForLabelDisplay(appliedFilter.value)
7425 });
7426 }
7427 if (appliedFilter.key === filter.minKey) {
7428 return intl.translate('Polaris.ResourceList.DateSelector.FilterLabelForValue.on_or_after', {
7429 date: formatDateForLabelDisplay(appliedFilter.value)
7430 });
7431 }
7432 }
7433 return appliedFilterValue;
7434 }
7435}
7436__decorate([autobind], FilterControl$1.prototype, "handleAddFilter", null);
7437__decorate([memoize()], FilterControl$1.prototype, "getRemoveFilterCallback", null);
7438function idFromFilter(appliedFilter) {
7439 return `${appliedFilter.key}-${appliedFilter.value}`;
7440}
7441function formatDateForLabelDisplay(date) {
7442 if (isNaN(new Date(date).getTime())) {
7443 return date;
7444 }
7445 return new Date(date.replace(/-/g, '/')).toLocaleDateString();
7446}
7447function findOperatorLabel(filter, appliedFilter) {
7448 const { operatorText } = filter;
7449 if (filter.type === FilterType.DateSelector && (appliedFilter.key === filter.minKey || appliedFilter.key === filter.maxKey)) {
7450 return '';
7451 }
7452 if (!operatorText || typeof operatorText === 'string') {
7453 return operatorText;
7454 }
7455 const appliedOperator = operatorText.find(operator => {
7456 return operator.key === appliedFilter.key;
7457 });
7458 if (appliedOperator) {
7459 return appliedOperator.filterLabel || appliedOperator.optionLabel;
7460 }
7461}
7462var FilterControl$2 = compose(withAppProvider(), withContext$1(Consumer$2))(FilterControl$1);
7463
7464class Focus$1 extends PureComponent {
7465 componentDidMount() {
7466 write(() => {
7467 const root = findDOMNode(this);
7468 if (root) {
7469 if (!root.querySelector('[autofocus]')) {
7470 focusFirstFocusableNode(root, false);
7471 }
7472 }
7473 });
7474 }
7475 render() {
7476 const Fragment$$1 = Fragment;
7477 const { children } = this.props;
7478 return createElement(
7479 Fragment$$1,
7480 null,
7481 children
7482 );
7483 }
7484}
7485
7486class TrapFocus extends PureComponent {
7487 render() {
7488 const { children } = this.props;
7489 return createElement(
7490 Focus$1,
7491 null,
7492 createElement(
7493 'div',
7494 { ref: this.setFocusTrapWrapper },
7495 createElement(EventListener$1, { event: 'focusout', handler: this.handleBlur }),
7496 children
7497 )
7498 );
7499 }
7500 setFocusTrapWrapper(node) {
7501 this.focusTrapWrapper = node;
7502 }
7503 handleBlur(event) {
7504 const { relatedTarget } = event;
7505 const { focusTrapWrapper } = this;
7506 const { trapping = true } = this.props;
7507 if (relatedTarget == null || !trapping) {
7508 return;
7509 }
7510 if (focusTrapWrapper && !focusTrapWrapper.contains(relatedTarget) && !closest(relatedTarget, '[data-polaris-overlay]')) {
7511 event.preventDefault();
7512 if (event.srcElement === findFirstFocusableNode(focusTrapWrapper)) {
7513 return focusLastFocusableNode(focusTrapWrapper);
7514 }
7515 focusFirstFocusableNode(focusTrapWrapper);
7516 }
7517 }
7518}
7519__decorate([autobind], TrapFocus.prototype, "setFocusTrapWrapper", null);
7520__decorate([autobind], TrapFocus.prototype, "handleBlur", null);
7521
7522var styles$53 = {
7523 "FooterHelp": "p_i2",
7524 "Content": "p_xg",
7525 "Icon": "p_uv",
7526 "Text": "p_yc",
7527};
7528
7529function FooterHelp$1({ children }) {
7530 return createElement(
7531 'div',
7532 { className: styles$53.FooterHelp },
7533 createElement(
7534 'div',
7535 { className: styles$53.Content },
7536 createElement(
7537 'div',
7538 { className: styles$53.Icon },
7539 createElement(Icon$2, { source: 'help', color: 'teal', backdrop: true })
7540 ),
7541 createElement(
7542 'div',
7543 { className: styles$53.Text },
7544 children
7545 )
7546 )
7547 );
7548}
7549
7550var styles$54 = {
7551 "FormLayout": "p_uw",
7552 "condensed": "p_ke",
7553 "Item": "p_to",
7554 "Title": "p_ji",
7555 "Items": "p_ez",
7556 "HelpText": "p_b1",
7557 "Footer": "p_ss",
7558};
7559
7560function Group({ children }) {
7561 const itemsMarkup = Children.map(children, child => child);
7562 return createElement(
7563 'footer',
7564 { role: 'footer', className: styles$54.Footer },
7565 createElement(
7566 Stack$1,
7567 { distribution: 'trailing' },
7568 itemsMarkup
7569 )
7570 );
7571}
7572
7573function Item$12(props) {
7574 return createElement(
7575 'div',
7576 { className: styles$54.Item },
7577 props.children
7578 );
7579}
7580
7581const getUniqueID$8 = createUniqueIDFactory('FormLayoutGroup');
7582function Group$2({ children, condensed, title, helpText }) {
7583 const className = classNames$1(condensed && styles$54.condensed);
7584 const id = getUniqueID$8();
7585 let helpTextElement = null;
7586 let helpTextID;
7587 let titleElement = null;
7588 let titleID;
7589 if (helpText) {
7590 helpTextID = `${id}HelpText`;
7591 helpTextElement = createElement(
7592 'div',
7593 { id: helpTextID, className: styles$54.HelpText },
7594 helpText
7595 );
7596 }
7597 if (title) {
7598 titleID = `${id}Title`;
7599 titleElement = createElement(
7600 'div',
7601 { id: titleID, className: styles$54.Title },
7602 title
7603 );
7604 }
7605 const itemsMarkup = Children.map(children, child => wrapWithComponent(child, Item$12));
7606 return createElement(
7607 'div',
7608 { role: 'group', className: className, 'aria-labelledby': titleID, 'aria-describedby': helpTextID },
7609 titleElement,
7610 createElement(
7611 'div',
7612 { className: styles$54.Items },
7613 itemsMarkup
7614 ),
7615 helpTextElement
7616 );
7617}
7618
7619class FormLayout$1 extends PureComponent {
7620 render() {
7621 const { children } = this.props;
7622 return createElement(
7623 'div',
7624 { className: styles$54.FormLayout },
7625 Children.map(children, wrapChildren)
7626 );
7627 }
7628}
7629FormLayout$1.Group = Group$2;
7630FormLayout$1.Footer = Group;
7631function wrapChildren(child, index) {
7632 if (isElementOfType(child, Group$2)) {
7633 return child;
7634 }
7635 if (isElementOfType(child, Group)) {
7636 return child;
7637 }
7638 const props = { key: index };
7639 return wrapWithComponent(child, Item$12, props);
7640}
7641
7642var styles$55 = {
7643 "always": "p_zn",
7644 "whenTablet": "p_jt",
7645 "whenLaptop": "p_ox",
7646 "whenDesktop": "p_o1",
7647 "belowMobile": "p_pg",
7648 "belowTablet": "p_o8",
7649 "belowLaptop": "p_xi",
7650};
7651
7652function Hide$1({ children, when, below }) {
7653 const className = classNames$1(styles$55.Hide, when && styles$55[variationName$1('when', when)], below && styles$55[variationName$1('below', below)], !when && !below && styles$55.always);
7654 return createElement(
7655 'div',
7656 { className: className },
7657 children
7658 );
7659}
7660
7661var styles$56 = {
7662 "variationPositive": "p_go",
7663 "variationNegative": "p_lg",
7664 "variationWarning": "p_h5",
7665 "variationCode": "p_df",
7666 "variationStrong": "p_sx",
7667 "variationSubdued": "p_b9",
7668};
7669
7670var VariationValue;
7671(function (VariationValue) {
7672 VariationValue["Positive"] = "positive";
7673 VariationValue["Warning"] = "warning";
7674 VariationValue["Negative"] = "negative";
7675 VariationValue["Strong"] = "strong";
7676 VariationValue["Subdued"] = "subdued";
7677 VariationValue["Code"] = "code";
7678})(VariationValue || (VariationValue = {}));
7679function TextStyle$1({ variation, children }) {
7680 const className = classNames$1(variation && styles$56[variationName$1('variation', variation)], variation === VariationValue.Code && styles$56.code);
7681 const Element = variationElement(variation);
7682 return createElement(
7683 Element,
7684 { className: className },
7685 children
7686 );
7687}
7688function variationElement(variation) {
7689 switch (variation) {
7690 case VariationValue.Code:
7691 return 'code';
7692 case VariationValue.Strong:
7693 return 'b';
7694 case VariationValue.Positive:
7695 case VariationValue.Warning:
7696 case VariationValue.Negative:
7697 case VariationValue.Subdued:
7698 default:
7699 return 'span';
7700 }
7701}
7702
7703var styles$57 = {
7704 "InlineValidation": "p_gg",
7705 "Icon": "p_b2",
7706};
7707
7708function InlineValidation$1({ message, fieldID, status }) {
7709 if (!message) {
7710 return null;
7711 }
7712 let color = 'red';
7713 let icon = 'alert';
7714 let textStyle = 'negative';
7715 switch (status) {
7716 case 'success':
7717 color = 'green';
7718 icon = 'circleCheckmark';
7719 textStyle = null;
7720 break;
7721 case 'info':
7722 color = 'blue';
7723 icon = 'circleInformationFilled';
7724 textStyle = null;
7725 break;
7726 case 'attention':
7727 color = 'orange';
7728 icon = 'attentionFilled';
7729 textStyle = 'warning';
7730 break;
7731 default:
7732 color = 'red';
7733 icon = 'alert';
7734 textStyle = 'negative';
7735 }
7736 return createElement(
7737 'div',
7738 { id: `${fieldID}Error`, className: styles$57.InlineValidation },
7739 createElement(
7740 'div',
7741 { className: styles$57.Icon },
7742 createElement(Icon$2, { source: icon, color: color })
7743 ),
7744 textStyle ? createElement(
7745 TextStyle$1,
7746 { variation: textStyle },
7747 message
7748 ) : createElement(
7749 TextStyle$1,
7750 null,
7751 message
7752 )
7753 );
7754}
7755
7756var styles$58 = {
7757 "KeyboardKey": "p_ka",
7758};
7759
7760function KeyboardKey$1({ children }) {
7761 let key = children || '';
7762 key = key.length > 1 ? key.toLowerCase() : key.toUpperCase();
7763 return createElement(
7764 'kbd',
7765 { className: styles$58.KeyboardKey },
7766 key
7767 );
7768}
7769
7770var styles$59 = {
7771 "Layout": "p_sy",
7772 "Section": "p_xa",
7773 "Section-secondary": "p_tz",
7774 "Section-fullWidth": "p_wd",
7775 "AnnotatedSection": "p_ve",
7776 "AnnotationWrapper": "p_ey",
7777 "AnnotationContent": "p_ko",
7778 "Annotation": "p_mo",
7779 "AnnotationDescription": "p_y4",
7780};
7781
7782function AnnotatedSection$1(props) {
7783 const { children, title, description } = props;
7784 const descriptionMarkup = typeof description === 'string' ? createElement(
7785 'p',
7786 null,
7787 description
7788 ) : description;
7789 return createElement(
7790 'div',
7791 { className: styles$59.AnnotatedSection },
7792 createElement(
7793 'div',
7794 { className: styles$59.AnnotationWrapper },
7795 createElement(
7796 'div',
7797 { className: styles$59.Annotation },
7798 createElement(
7799 TextContainer$1,
7800 null,
7801 createElement(
7802 Heading$1,
7803 null,
7804 title
7805 ),
7806 descriptionMarkup && createElement(
7807 'div',
7808 { className: styles$59.AnnotationDescription },
7809 descriptionMarkup
7810 )
7811 )
7812 ),
7813 createElement(
7814 'div',
7815 { className: styles$59.AnnotationContent },
7816 children
7817 )
7818 )
7819 );
7820}
7821
7822function Section$7({ children, secondary, fullWidth }) {
7823 const className = classNames$1(styles$59.Section, secondary && styles$59['Section-secondary'], fullWidth && styles$59['Section-fullWidth']);
7824 return createElement(
7825 'div',
7826 { className: className },
7827 children
7828 );
7829}
7830
7831class Layout$1 extends Component {
7832 render() {
7833 const { children, sectioned } = this.props;
7834 const content = sectioned ? createElement(
7835 Section$7,
7836 null,
7837 children
7838 ) : children;
7839 return createElement(
7840 'div',
7841 { className: styles$59.Layout },
7842 content
7843 );
7844 }
7845}
7846Layout$1.AnnotatedSection = AnnotatedSection$1;
7847Layout$1.Section = Section$7;
7848
7849var styles$60 = {
7850 "Link": "p_d5",
7851};
7852
7853function Link$2({ url, children, onClick, external, id }) {
7854 return url ? createElement(
7855 UnstyledLink$2,
7856 { onClick: onClick, className: styles$60.Link, url: url, external: external, id: id },
7857 children
7858 ) : createElement(
7859 'button',
7860 { onClick: onClick, className: styles$60.Link, id: id },
7861 children
7862 );
7863}
7864
7865var styles$61 = {
7866 "List": "p_hf",
7867 "typeNumber": "p_y6",
7868 "Item": "p_tn",
7869};
7870
7871function Item$14({ children }) {
7872 return createElement(
7873 'li',
7874 { className: styles$61.Item },
7875 children
7876 );
7877}
7878
7879class ContentList extends PureComponent {
7880 render() {
7881 const { children, type = 'bullet' } = this.props;
7882 const className = classNames$1(styles$61.List, type && styles$61[variationName$1('type', type)]);
7883 const ListElement = type === 'bullet' ? 'ul' : 'ol';
7884 return createElement(
7885 ListElement,
7886 { className: className },
7887 children
7888 );
7889 }
7890}
7891ContentList.Item = Item$14;
7892
7893var styles$62 = {
7894 "Media": "p_tc",
7895 "link": "p_t5",
7896 "active": "p_e2",
7897 "Title": "p_m6",
7898 "Image": "p_zb",
7899 "Content": "p_ot",
7900 "Link": "p_wh",
7901 "Button": "p_z3",
7902 "Header": "p_rm",
7903 "Badge": "p_sq",
7904};
7905
7906var styles$63 = {
7907 "Thumbnail": "p_ks",
7908 "sizeExtraSmall": "p_q6",
7909 "sizeSmall": "p_wt",
7910 "sizeMedium": "p_ro",
7911 "sizeLarge": "p_cw",
7912 "Image": "p_r8",
7913 "File": "p_xd",
7914};
7915
7916function Thumbnail$1({ source, alt, abbr, size = 'medium' }) {
7917 const className = classNames$1(styles$63.Thumbnail, size && styles$63[variationName$1('size', size)]);
7918 const contentMarkup = source ? createElement(Image$1, { alt: alt, source: source, className: styles$63.Image }) : createElement(
7919 'div',
7920 { className: styles$63.File },
7921 abbr
7922 );
7923 return createElement(
7924 'span',
7925 { className: className },
7926 contentMarkup
7927 );
7928}
7929
7930function Media$1({
7931 // children,
7932 // data,
7933 // content,
7934 // label,
7935 header, body, bodySpacing, url, avatar, avatarSource, thumbnailSource, thumbnailAbbr, thumbnailSize, icon, iconColor, iconBackdrop, badgeText, badgeStatus, active }) {
7936 const className = classNames(styles$62.Media, url && styles$62.link, active && styles$62.active);
7937 const iconMarkup = icon ? createElement(
7938 'div',
7939 { className: styles$62.Image },
7940 createElement(Icon$2, { source: icon, color: iconColor ? iconColor : "inkLighter", backdrop: iconBackdrop ? true : false })
7941 ) : null;
7942 const badgeMarkup = badgeText ? createElement(
7943 Hide$1,
7944 { below: 'mobile' },
7945 createElement(
7946 'div',
7947 { className: styles$62.Badge },
7948 createElement(
7949 Badge$2,
7950 { status: badgeStatus },
7951 badgeText
7952 )
7953 )
7954 ) : null;
7955 const headerMarkup = header ? createElement(
7956 'header',
7957 { className: styles$62.Header },
7958 createElement(
7959 'span',
7960 { className: styles$62.Title },
7961 header
7962 ),
7963 badgeMarkup
7964 ) : null;
7965 const bodyMarkup = body ? createElement(
7966 'div',
7967 { className: styles$62.Body },
7968 body
7969 ) : null;
7970 const linkMarkup = url ? createElement(UnstyledLink$2, { className: styles$62.Link, url: url }) : null;
7971 const avatarMarkup = avatar ? createElement(
7972 'div',
7973 { className: styles$62.Image },
7974 createElement(Avatar$2, { size: 'small', customer: true, name: avatar, source: avatarSource })
7975 ) : null;
7976 const thumbnailMarkup = thumbnailSource ? createElement(
7977 'div',
7978 { className: styles$62.Image },
7979 createElement(Thumbnail$1, { alt: 'thumbnail', size: thumbnailSize ? thumbnailSize : "small", source: thumbnailSource })
7980 ) : thumbnailAbbr ? createElement(
7981 'div',
7982 { className: styles$62.Image },
7983 createElement(Thumbnail$1, { alt: 'thumbnail', size: thumbnailSize ? thumbnailSize : "small", abbr: thumbnailAbbr })
7984 ) : null;
7985 return createElement(
7986 'div',
7987 { className: className },
7988 iconMarkup,
7989 avatarMarkup,
7990 thumbnailMarkup,
7991 createElement(
7992 'div',
7993 { className: styles$62.Content },
7994 createElement(
7995 Stack$1,
7996 { vertical: true, spacing: bodySpacing ? bodySpacing : 'none' },
7997 headerMarkup,
7998 bodyMarkup
7999 )
8000 ),
8001 linkMarkup
8002 );
8003}
8004
8005function memoizedBind(callback, ...args) {
8006 return function bound() {
8007 return callback(...args);
8008 };
8009}
8010var memoizedBind$1 = memoize$1(memoizedBind);
8011
8012var styles$64 = {
8013 "Container": "p_af",
8014 "Modal": "p_dy",
8015 "limitHeight": "p_bo",
8016 "sizeLarge": "p_me",
8017 "animateFadeUp": "p_px",
8018 "entering": "p_ev",
8019 "exiting": "p_lc",
8020 "exited": "p_ul",
8021 "entered": "p_pa",
8022};
8023
8024function DialogContainer(props) {
8025 return createElement(
8026 'div',
8027 { className: styles$64.Container, 'data-polaris-layer': true, 'data-polaris-overlay': true },
8028 props.children
8029 );
8030}
8031function Dialog$1(_a) {
8032 var { instant, labelledBy, children, onClose, onExited, onEntered, large, limitHeight } = _a,
8033 props = __rest(_a, ["instant", "labelledBy", "children", "onClose", "onExited", "onEntered", "large", "limitHeight"]);
8034 const classes = classNames$1(styles$64.Modal, large && styles$64.sizeLarge, limitHeight && styles$64.limitHeight);
8035 const handleClose = memoizedBind$1(onClose);
8036 const TransitionChild = instant ? Transition : FadeUp;
8037 return createElement(
8038 TransitionChild,
8039 Object.assign({}, props, { mountOnEnter: true, unmountOnExit: true, timeout: Duration.Base, onEntered: onEntered, onExited: onExited }),
8040 createElement(
8041 DialogContainer,
8042 null,
8043 createElement(
8044 TrapFocus,
8045 null,
8046 createElement(
8047 'div',
8048 { className: classes, role: 'dialog', 'aria-labelledby': labelledBy, tabIndex: -1 },
8049 createElement(KeypressListener$1, { keyCode: Keys.ESCAPE, handler: handleClose }),
8050 children
8051 )
8052 )
8053 )
8054 );
8055}
8056const fadeUpClasses = {
8057 enter: classNames$1(styles$64.animateFadeUp, styles$64.entering),
8058 enterActive: classNames$1(styles$64.animateFadeUp, styles$64.entered),
8059 exit: classNames$1(styles$64.animateFadeUp, styles$64.exiting),
8060 exitActive: classNames$1(styles$64.animateFadeUp, styles$64.exited)
8061};
8062function FadeUp(_a) {
8063 var { children } = _a,
8064 props = __rest(_a, ["children"]);
8065 return createElement(
8066 CSSTransition,
8067 Object.assign({}, props, { classNames: fadeUpClasses }),
8068 children
8069 );
8070}
8071
8072var styles$65 = {
8073 "Footer": "p_ie",
8074 "FooterContent": "p_wu",
8075};
8076
8077function Footer$1({ primaryAction, secondaryActions, children }) {
8078 const primaryActionButton = primaryAction && buttonsFrom(primaryAction, { primary: true }) || null;
8079 const secondaryActionButtons = secondaryActions && buttonsFrom(secondaryActions) || null;
8080 const actions = primaryActionButton || secondaryActionButtons ? createElement(
8081 ButtonGroup$1,
8082 null,
8083 secondaryActionButtons,
8084 primaryActionButton
8085 ) : null;
8086 return createElement(
8087 'div',
8088 { className: styles$65.Footer },
8089 createElement(
8090 'div',
8091 { className: styles$65.FooterContent },
8092 createElement(
8093 Stack$1,
8094 { alignment: 'center' },
8095 createElement(
8096 Stack$1.Item,
8097 { fill: true },
8098 children
8099 ),
8100 actions
8101 )
8102 )
8103 );
8104}
8105
8106var styles$66 = {
8107 "CloseButton": "p_aa",
8108 "withoutTitle": "p_gl",
8109};
8110
8111function CloseButton$1({ title = true, onClick }) {
8112 const className = classNames(styles$66.CloseButton, !title && styles$66.withoutTitle);
8113 return createElement(
8114 'button',
8115 { onClick: onClick, className: className },
8116 createElement(Icon$2, { source: 'cancel', color: 'inkLighter' })
8117 );
8118}
8119
8120var styles$67 = {
8121 "Header": "p_v3",
8122 "Title": "p_n6",
8123};
8124
8125function Header$3({ id, children, onClose }) {
8126 const handleClose = memoizedBind$1(onClose);
8127 return createElement(
8128 'div',
8129 { className: styles$67.Header },
8130 createElement(
8131 'div',
8132 { id: id, className: styles$67.Title },
8133 createElement(
8134 DisplayText$1,
8135 { element: 'h2', size: 'small' },
8136 children
8137 )
8138 ),
8139 createElement(CloseButton$1, { onClick: handleClose })
8140 );
8141}
8142
8143var styles$68 = {
8144 "Section": "p_dv",
8145 "subdued": "p_q8",
8146 "flush": "p_qt",
8147};
8148
8149function Section$9({ children, flush = false, subdued = false }) {
8150 const className = classNames$1(styles$68.Section, flush && styles$68.flush, subdued && styles$68.subdued);
8151 return createElement(
8152 'section',
8153 { className: className },
8154 children
8155 );
8156}
8157
8158var styles$69 = {
8159 "BodyWrapper": "p_jl",
8160 "Body": "p_a8",
8161 "IFrame": "p_be",
8162 "Backdrop": "p_qo",
8163 "Spinner": "p_oi",
8164 "fade-in": "p_qd",
8165};
8166
8167const IFRAME_LOADING_HEIGHT = 200;
8168const getUniqueID$9 = createUniqueIDFactory('modal-header');
8169class Modal$2 extends Component {
8170 constructor() {
8171 super(...arguments);
8172 this.state = {
8173 iframeHeight: IFRAME_LOADING_HEIGHT
8174 };
8175 this.headerId = getUniqueID$9();
8176 }
8177 getChildContext() {
8178 return {
8179 withinContentContainer: true
8180 };
8181 }
8182 componentDidMount() {
8183 if (this.context.easdk == null) {
8184 return;
8185 }
8186 const { open } = this.props;
8187 if (open) {
8188 this.handleEASDKMessaging();
8189 this.focusReturnPointNode = document.activeElement;
8190 }
8191 }
8192 componentDidUpdate({ open: wasOpen }) {
8193 if (this.context.easdk == null) {
8194 return;
8195 }
8196 const { open } = this.props;
8197 if (wasOpen !== open) {
8198 this.handleEASDKMessaging();
8199 }
8200 if (!wasOpen && open) {
8201 this.focusReturnPointNode = document.activeElement;
8202 } else if (wasOpen && !open && this.focusReturnPointNode != null && document.contains(this.focusReturnPointNode)) {
8203 this.focusReturnPointNode.focus();
8204 this.focusReturnPointNode = null;
8205 }
8206 }
8207 render() {
8208 if (this.context.easdk != null) {
8209 return null;
8210 }
8211 const { children, onClose, title, src, iFrameName, open, instant = true, sectioned, loading, large, limitHeight, footer, primaryAction, secondaryActions, polaris: { intl } } = this.props;
8212 const { iframeHeight } = this.state;
8213 const iframeTitle = intl.translate('Polaris.Modal.iFrameTitle');
8214 const handleClose = memoizedBind$1(onClose);
8215 let dialog;
8216 let backdrop;
8217 if (open) {
8218 const footerMarkup = !footer && !primaryAction && !secondaryActions ? null : createElement(
8219 Footer$1,
8220 { primaryAction: primaryAction, secondaryActions: secondaryActions },
8221 footer
8222 );
8223 const content = sectioned ? wrapWithComponent(children, Section$9) : children;
8224 const body = loading ? createElement(
8225 'div',
8226 { className: styles$69.Spinner },
8227 createElement(Spinner$2, null)
8228 ) : content;
8229 const bodyMarkup = src ? createElement('iframe', { name: iFrameName, title: iframeTitle, src: src, className: styles$69.IFrame, onLoad: this.handleIFrameLoad, style: { height: `${iframeHeight}px` } }) : createElement(
8230 Scrollable$2,
8231 { shadow: true, className: styles$69.Body },
8232 body
8233 );
8234 const headerMarkup = title ? createElement(
8235 Header$3,
8236 { id: this.headerId, onClose: handleClose },
8237 title
8238 ) : createElement(CloseButton$1, { onClick: handleClose, title: false });
8239 dialog = createElement(
8240 Dialog$1,
8241 { instant: instant, labelledBy: this.headerId, onClose: handleClose, onEntered: this.handleEntered, onExited: this.handleExited, large: large, limitHeight: limitHeight },
8242 headerMarkup,
8243 createElement(
8244 'div',
8245 { className: styles$69.BodyWrapper },
8246 bodyMarkup
8247 ),
8248 footerMarkup
8249 );
8250 backdrop = createElement('div', { className: styles$69.Backdrop, onClick: handleClose });
8251 }
8252 const animated = !instant;
8253 this.handleWarning('modal');
8254 return createElement(
8255 Portal$1,
8256 { idPrefix: 'modal' },
8257 createElement(
8258 TransitionGroup,
8259 { appear: animated, enter: animated, exit: animated },
8260 dialog
8261 ),
8262 backdrop
8263 );
8264 }
8265 handleEntered() {
8266 const { onTransitionEnd } = this.props;
8267 if (onTransitionEnd) {
8268 onTransitionEnd();
8269 }
8270 }
8271 handleExited() {
8272 this.setState({
8273 iframeHeight: IFRAME_LOADING_HEIGHT
8274 });
8275 if (this.focusReturnPointNode) {
8276 write(() => focusFirstFocusableNode(this.focusReturnPointNode, false));
8277 }
8278 }
8279 handleIFrameLoad(evt) {
8280 const iframe = evt.target;
8281 if (iframe && iframe.contentWindow) {
8282 this.setState({
8283 iframeHeight: iframe.contentWindow.document.body.scrollHeight
8284 });
8285 }
8286 const { onIFrameLoad } = this.props;
8287 if (onIFrameLoad != null) {
8288 onIFrameLoad(evt);
8289 }
8290 }
8291 handleEASDKMessaging() {
8292 const { easdk } = this.context;
8293 const { open } = this.props;
8294 if (easdk == null) {
8295 return;
8296 }
8297 if (open) {
8298 this.handleWarning('easdk');
8299 easdk.Modal.open(this.props);
8300 } else {
8301 easdk.Modal.close();
8302 }
8303 }
8304 handleWarning(type) {
8305 const { polaris: { intl } } = this.props;
8306 const reqProps = {
8307 modal: {
8308 open: 'open',
8309 onClose: 'onClose'
8310 },
8311 easdk: {
8312 open: 'open',
8313 src: 'src',
8314 onClose: 'onClose'
8315 }
8316 };
8317 const missingProps = Object.keys(reqProps[type]).reduce((acc, key) => {
8318 if (!this.props.hasOwnProperty(key)) {
8319 acc.push(key);
8320 }
8321 return acc;
8322 }, []);
8323 if (missingProps.length > 0) {
8324 // eslint-disable-next-line no-console
8325 console.warn(intl.translate('Polaris.Modal.modalWarning', {
8326 missingProps: missingProps.join(', ')
8327 }));
8328 }
8329 const actionWarnings = handleActionWanrings(this.props.primaryAction, this.props.secondaryActions);
8330 if (type === 'easdk' && actionWarnings.length > 0) {
8331 // eslint-disable-next-line no-console
8332 console.warn(intl.translate('Polaris.Modal.actionWarning', {
8333 actionWarnings: actionWarnings.join(', ')
8334 }));
8335 }
8336 }
8337}
8338Modal$2.contextTypes = { easdk: object };
8339Modal$2.childContextTypes = contentContextTypes;
8340Modal$2.Dialog = Dialog$1;
8341Modal$2.Section = Section$9;
8342__decorate([autobind], Modal$2.prototype, "handleEntered", null);
8343__decorate([autobind], Modal$2.prototype, "handleExited", null);
8344__decorate([autobind], Modal$2.prototype, "handleIFrameLoad", null);
8345function handleActionWanrings(primary = {}, secondary = []) {
8346 const actions = [primary, ...secondary];
8347 const actionKeysToIgnore = ['icon', 'loading'];
8348 return actions.reduce((acc, action) => {
8349 return acc.concat(...actionKeysToIgnore.filter(val => action[val] && acc.indexOf(val) === -1 && val));
8350 }, []);
8351}
8352var Modal$3 = withAppProvider()(Modal$2);
8353
8354var styles$70 = {
8355 "Option": "p_cx",
8356 "SingleSelectOption": "p_my",
8357 "disabled": "p_n0",
8358 "Media": "p_tt",
8359 "Label": "p_ek",
8360 "Checkbox": "p_oj",
8361 "focused": "p_mk",
8362 "select": "p_s6",
8363 "active": "p_hl",
8364};
8365
8366class Option$1 extends Component {
8367 constructor() {
8368 super(...arguments);
8369 this.state = {
8370 focused: false,
8371 active: false
8372 };
8373 }
8374 static getDerivedStateFromProps(nextProps, prevState) {
8375 if (nextProps.active !== undefined && nextProps.active !== prevState.active) {
8376 return nextProps.active ? { active: true } : { active: false };
8377 }
8378 return null;
8379 }
8380 render() {
8381 const { label, value, id, select, active, allowMultiple, disabled, role, media } = this.props;
8382 const { focused } = this.state;
8383 const mediaMarkup = media ? createElement(
8384 'div',
8385 { className: styles$70.Media },
8386 media
8387 ) : null;
8388 const singleSelectClassName = classNames$1(styles$70.SingleSelectOption, focused && styles$70.focused, disabled && styles$70.disabled, select && styles$70.select, active && styles$70.active);
8389 const multiSelectClassName = classNames$1(styles$70.Label, active && styles$70.active);
8390 const checkBoxRole = role === 'option' ? 'presentation' : undefined;
8391 const optionMarkup = allowMultiple ? createElement(
8392 'label',
8393 { htmlFor: id, className: multiSelectClassName },
8394 createElement(
8395 'div',
8396 { className: styles$70.Checkbox },
8397 createElement(Checkbox$4, { id: id, value: value, checked: select, active: active, disabled: disabled, onChange: this.handleClick, role: checkBoxRole })
8398 ),
8399 mediaMarkup,
8400 label
8401 ) : createElement(
8402 'button',
8403 { type: 'button', className: singleSelectClassName, onClick: this.handleClick, disabled: disabled, onFocus: this.toggleFocus, onBlur: this.toggleFocus },
8404 mediaMarkup,
8405 label
8406 );
8407 const scrollMarkup = active ? createElement(Scrollable$2.ScrollTo, null) : null;
8408 return createElement(
8409 'li',
8410 { key: id, className: styles$70.Option, tabIndex: -1, 'aria-selected': active, role: role },
8411 scrollMarkup,
8412 optionMarkup
8413 );
8414 }
8415 handleClick() {
8416 const { onClick, section, index, disabled } = this.props;
8417 if (disabled) {
8418 return;
8419 }
8420 onClick(section, index);
8421 }
8422 toggleFocus() {
8423 this.setState(prevState => ({ focused: !prevState.focused }));
8424 }
8425}
8426__decorate([autobind], Option$1.prototype, "handleClick", null);
8427__decorate([autobind], Option$1.prototype, "toggleFocus", null);
8428
8429var styles$71 = {
8430 "Checkbox": "p_n5",
8431 "Input": "p_q4",
8432 "Backdrop": "p_je",
8433 "Input-indeterminate": "p_bx",
8434 "Icon": "p_iv",
8435 "active": "p_oo",
8436};
8437
8438const getUniqueID$10 = createUniqueIDFactory('Checkbox');
8439function Checkbox$4({ id = getUniqueID$10(), checked = false, disabled, active, onChange, name, value, role }) {
8440 const className = classNames$1(styles$71.Checkbox, active && styles$71.active);
8441 return createElement(
8442 'div',
8443 { className: className },
8444 createElement('input', { id: id, name: name, value: value, type: 'checkbox', checked: checked, disabled: disabled, className: styles$71.Input, 'aria-checked': checked, onChange: onChange, role: role }),
8445 createElement('div', { className: styles$71.Backdrop }),
8446 createElement(
8447 'div',
8448 { className: styles$71.Icon },
8449 createElement(Icon$2, { source: 'checkmark' })
8450 )
8451 );
8452}
8453
8454function arraysAreEqual(firstArray, secondArray, comparator) {
8455 if (firstArray.length !== secondArray.length) {
8456 return false;
8457 }
8458 return firstArray.every((firstItem, index) => {
8459 const secondItem = secondArray[index];
8460 if (comparator != null) {
8461 return comparator(firstItem, secondItem);
8462 }
8463 return firstItem === secondItem;
8464 });
8465}
8466
8467var styles$72 = {
8468 "OptionList": "p_z5",
8469 "Options": "p_up",
8470 "Title": "p_ea",
8471};
8472
8473const getUniqueId = createUniqueIDFactory('OptionList');
8474class OptionList$1 extends Component {
8475 constructor() {
8476 super(...arguments);
8477 this.state = {
8478 normalizedOptions: createNormalizedOptions(this.props.options, this.props.sections, this.props.title)
8479 };
8480 this.id = this.props.id || getUniqueId();
8481 }
8482 // eslint-disable-next-line react/no-deprecated
8483 componentWillReceiveProps({ options: nextOptions = [], sections: nextSections = [], id: nextID, title: nextTitle }) {
8484 const { options = [], sections = [], id, title } = this.props;
8485 if (id !== nextID) {
8486 this.id = nextID || this.id;
8487 }
8488 const optionsChanged = !arraysAreEqual(nextOptions, options);
8489 const sectionsChanged = !arraysAreEqual(nextSections, sections, testSectionsPropEquality);
8490 const titleChanged = title !== nextTitle;
8491 if (optionsChanged || sectionsChanged || titleChanged) {
8492 this.setState({
8493 normalizedOptions: createNormalizedOptions(nextOptions, nextSections, nextTitle)
8494 });
8495 }
8496 }
8497 render() {
8498 const { normalizedOptions } = this.state;
8499 const { selected, allowMultiple, role, optionRole } = this.props;
8500 const optionsExist = normalizedOptions.length > 0;
8501 const optionsMarkup = optionsExist ? normalizedOptions.map(({ title, options }, sectionIndex) => {
8502 const titleMarkup = title ? createElement(
8503 'p',
8504 { className: styles$72.Title, role: 'presentation' },
8505 title
8506 ) : null;
8507 const optionsMarkup = options && options.map((option, optionIndex) => {
8508 const isSelected = selected.includes(option.value);
8509 const id = option.id || `${this.id}-${sectionIndex}-${optionIndex}`;
8510 return createElement(Option$1, Object.assign({}, option, { key: id, id: id, section: sectionIndex, index: optionIndex, onClick: this.handleClick, select: isSelected, allowMultiple: allowMultiple, role: optionRole }));
8511 });
8512 return createElement(
8513 'li',
8514 { key: title || `noTitle-${sectionIndex}` },
8515 titleMarkup,
8516 createElement(
8517 'ul',
8518 { className: styles$72.Options, id: this.id, role: role, 'aria-multiselectable': allowMultiple },
8519 optionsMarkup
8520 )
8521 );
8522 }) : null;
8523 return createElement(
8524 'ul',
8525 { className: styles$72.OptionList },
8526 optionsMarkup
8527 );
8528 }
8529 handleClick(sectionIndex, optionIndex) {
8530 const { selected, onChange, allowMultiple } = this.props;
8531 const selectedValue = this.state.normalizedOptions[sectionIndex].options[optionIndex].value;
8532 const foundIndex = selected.indexOf(selectedValue);
8533 if (allowMultiple) {
8534 const newSelection = foundIndex === -1 ? [selectedValue, ...selected] : [...selected.slice(0, foundIndex), ...selected.slice(foundIndex + 1, selected.length)];
8535 onChange(newSelection);
8536 return;
8537 }
8538 onChange([selectedValue]);
8539 }
8540}
8541__decorate([autobind], OptionList$1.prototype, "handleClick", null);
8542function createNormalizedOptions(options, sections, title) {
8543 if (options == null) {
8544 const section = { options: [], title };
8545 return sections == null ? [] : [section, ...sections];
8546 }
8547 if (sections == null) {
8548 return [{
8549 title,
8550 options
8551 }];
8552 }
8553 return [{
8554 title,
8555 options
8556 }, ...sections];
8557}
8558function testSectionsPropEquality(previousSection, currentSection) {
8559 const { options: previousOptions } = previousSection;
8560 const { options: currentOptions } = currentSection;
8561 const optionsAreEqual = arraysAreEqual(previousOptions, currentOptions);
8562 const titlesAreEqual = previousSection.title === currentSection.title;
8563 return optionsAreEqual && titlesAreEqual;
8564}
8565var OptionList$2 = withAppProvider()(OptionList$1);
8566
8567var styles$73 = {
8568 "Page": "p_zl",
8569 "fullWidth": "p_te",
8570 "singleColumn": "p_yf",
8571 "Header": "p_rd",
8572 "Header-hasPagination": "p_mp",
8573 "Header-hasBreadcrumbs": "p_g2",
8574 "Header-hasSecondaryActions": "p_at",
8575 "Header-hasSeparator": "p_qs",
8576 "Content": "p_hb",
8577 "Header-hasRollup": "p_u7",
8578 "IndividualActions": "p_lf",
8579 "Rollup": "p_r0",
8580 "Navigation": "p_qz",
8581 "Pagination": "p_jm",
8582 "MainContent": "p_ua",
8583 "TitleAndActions": "p_tl",
8584 "Title": "p_wf",
8585 "Title-hidden": "p_c6",
8586 "Actions": "p_iu",
8587 "SecondaryActions": "p_kz",
8588 "Action": "p_w2",
8589 "ActionGroup": "p_no",
8590 "PrimaryAction": "p_ds",
8591 "ActionIcon": "p_bl",
8592 "disabled": "p_ju",
8593 "ActionContent": "p_q7",
8594 "Details": "p_uu",
8595 "withActions": "p_kj",
8596 "Action-outline": "p_aw",
8597};
8598
8599function Action$1({ icon, url, external, onAction, children, disclosure, accessibilityLabel, disabled, showIndicator, hasIndicator }) {
8600 const iconMarkup = icon ? createElement(
8601 'span',
8602 { className: styles$73.ActionIcon },
8603 createElement(Icon$2, { source: icon })
8604 ) : null;
8605 const disclosureIconMarkup = disclosure ? createElement(
8606 'span',
8607 { className: styles$73.ActionIcon },
8608 createElement(Icon$2, { source: 'caretDown' })
8609 ) : null;
8610 const contentMarkup = iconMarkup || disclosureIconMarkup ? createElement(
8611 'span',
8612 { className: styles$73.ActionContent },
8613 iconMarkup,
8614 createElement(
8615 'span',
8616 null,
8617 children
8618 ),
8619 disclosureIconMarkup
8620 ) : children;
8621 if (url) {
8622 return createElement(
8623 UnstyledLink$2,
8624 { key: children, external: external, url: url, onMouseUp: handleMouseUpByBlurring, className: styles$73.Action, 'aria-label': accessibilityLabel },
8625 contentMarkup
8626 );
8627 }
8628 const indicatorMarkup = false && showIndicator && !hasIndicator && createElement(Indicator$1, null);
8629 const className = classNames(styles$73.Action, disabled && styles$73.disabled, icon && children == null && styles$73.iconOnly, false && showIndicator && styles$73['Action-outline']);
8630 return createElement(
8631 'button',
8632 { key: children, className: className, onClick: onAction, onMouseUp: handleMouseUpByBlurring, 'aria-label': accessibilityLabel, type: 'button', disabled: disabled },
8633 indicatorMarkup,
8634 contentMarkup
8635 );
8636}
8637
8638var EditableTarget;
8639(function (EditableTarget) {
8640 EditableTarget["Input"] = "INPUT";
8641 EditableTarget["Textarea"] = "TEXTAREA";
8642 EditableTarget["Select"] = "SELECT";
8643 EditableTarget["ContentEditable"] = "contenteditable";
8644})(EditableTarget || (EditableTarget = {}));
8645function isInputFocused() {
8646 if (document == null) {
8647 return false;
8648 }
8649 const { tagName } = document.activeElement;
8650 return tagName === EditableTarget.Input || tagName === EditableTarget.Textarea || tagName === EditableTarget.Select || document.activeElement.hasAttribute(EditableTarget.ContentEditable);
8651}
8652
8653var styles$74 = {
8654 "Tooltip": "p_gz",
8655 "measuring": "p_j3",
8656 "positionedAbove": "p_v4",
8657 "Tip": "p_p4",
8658 "light": "p_se",
8659 "Wrapper": "p_yt",
8660 "Content": "p_zj",
8661 "Label": "p_dc",
8662};
8663
8664class TooltipOverlay$1 extends PureComponent {
8665 render() {
8666 const markup = this.props.active ? this.renderOverlay() : null;
8667 return markup;
8668 }
8669 renderOverlay() {
8670 const { active, activator, preferredPosition = 'below' } = this.props;
8671 return createElement(PositionedOverlay$1, { active: active, activator: activator, preferredPosition: preferredPosition, render: this.renderTooltip });
8672 }
8673 renderTooltip(overlayDetails) {
8674 const { measuring, desiredHeight, positioning } = overlayDetails;
8675 const { id, children, light } = this.props;
8676 const containerClassName = classNames$1(styles$74.Tooltip, light && styles$74.light, measuring && styles$74.measuring, positioning === 'above' && styles$74.positionedAbove);
8677 const contentStyles = measuring ? undefined : { maxHeight: desiredHeight };
8678 return createElement(
8679 'div',
8680 Object.assign({ className: containerClassName }, layer.props),
8681 createElement(
8682 'div',
8683 { className: styles$74.Wrapper },
8684 createElement(
8685 'div',
8686 { id: id, role: 'tooltip', className: styles$74.Content, style: contentStyles },
8687 children
8688 )
8689 )
8690 );
8691 }
8692}
8693__decorate([autobind], TooltipOverlay$1.prototype, "renderOverlay", null);
8694__decorate([autobind], TooltipOverlay$1.prototype, "renderTooltip", null);
8695
8696const getUniqueID$11 = createUniqueIDFactory('TooltipContent');
8697class Tooltip$1 extends PureComponent {
8698 constructor() {
8699 super(...arguments);
8700 this.state = {
8701 active: Boolean(this.props.active),
8702 activatorNode: null
8703 };
8704 this.id = getUniqueID$11();
8705 }
8706 componentDidMount() {
8707 this.setAccessibilityAttributes();
8708 }
8709 componentDidUpdate() {
8710 this.setAccessibilityAttributes();
8711 }
8712 render() {
8713 const { id } = this;
8714 const { children, content, light, preferredPosition = 'above', activatorWrapper: WrapperComponent = 'span' } = this.props;
8715 const { active, activatorNode } = this.state;
8716 const portal = activatorNode ? createElement(
8717 Portal$1,
8718 { idPrefix: 'tooltip' },
8719 createElement(
8720 TooltipOverlay$1,
8721 { id: id, preferredPosition: preferredPosition, activator: activatorNode, active: active, onClose: noop, light: light },
8722 createElement(
8723 'div',
8724 { className: styles$74.Label },
8725 content
8726 )
8727 )
8728 ) : null;
8729 return createElement(
8730 WrapperComponent,
8731 { onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, ref: this.setActivator },
8732 children,
8733 portal
8734 );
8735 }
8736 setActivator(node) {
8737 if (node == null) {
8738 this.activatorContainer = null;
8739 this.setState({ activatorNode: null });
8740 return;
8741 }
8742 this.setState({ activatorNode: node.firstElementChild });
8743 this.activatorContainer = node;
8744 }
8745 handleFocus() {
8746 this.setState({ active: true });
8747 }
8748 handleBlur() {
8749 this.setState({ active: false });
8750 }
8751 handleMouseEnter() {
8752 this.setState({ active: true });
8753 }
8754 handleMouseLeave() {
8755 this.setState({ active: false });
8756 }
8757 setAccessibilityAttributes() {
8758 const { activatorContainer, id } = this;
8759 if (activatorContainer == null) {
8760 return;
8761 }
8762 const firstFocusable = findFirstFocusableNode(activatorContainer);
8763 const accessibilityNode = firstFocusable || activatorContainer;
8764 accessibilityNode.tabIndex = 0;
8765 accessibilityNode.setAttribute('aria-describedby', id);
8766 }
8767}
8768__decorate([autobind], Tooltip$1.prototype, "setActivator", null);
8769__decorate([autobind], Tooltip$1.prototype, "handleFocus", null);
8770__decorate([autobind], Tooltip$1.prototype, "handleBlur", null);
8771__decorate([autobind], Tooltip$1.prototype, "handleMouseEnter", null);
8772__decorate([autobind], Tooltip$1.prototype, "handleMouseLeave", null);
8773
8774var styles$75 = {
8775 "Pagination": "p_kq",
8776 "plain": "p_c3",
8777 "Button": "p_hs",
8778};
8779
8780function Pagination$1({ hasNext, hasPrevious, nextURL, previousURL, onNext, onPrevious, nextTooltip, previousTooltip, nextKeys, previousKeys, plain, accessibilityLabel, polaris: { intl } }) {
8781 const node = createRef();
8782 let label;
8783 if (accessibilityLabel) {
8784 label = accessibilityLabel;
8785 } else {
8786 label = intl.translate('Polaris.Pagination.pagination');
8787 }
8788 const className = classNames(styles$75.Pagination, plain && styles$75.plain);
8789 const previousButton = previousURL ? createElement(
8790 UnstyledLink$2,
8791 { className: styles$75.Button, url: previousURL, onMouseUp: handleMouseUpByBlurring, 'aria-label': intl.translate('Polaris.Pagination.previous'), id: 'previousURL' },
8792 createElement(Icon$2, { source: 'arrowLeft' })
8793 ) : createElement(
8794 'button',
8795 { onClick: onPrevious, type: 'button', onMouseUp: handleMouseUpByBlurring, className: styles$75.Button, 'aria-label': intl.translate('Polaris.Pagination.previous'), disabled: !hasPrevious },
8796 createElement(Icon$2, { source: 'arrowLeft' })
8797 );
8798 const nextButton = nextURL ? createElement(
8799 UnstyledLink$2,
8800 { className: styles$75.Button, url: nextURL, onMouseUp: handleMouseUpByBlurring, 'aria-label': intl.translate('Polaris.Pagination.next'), id: 'nextURL' },
8801 createElement(Icon$2, { source: 'arrowRight' })
8802 ) : createElement(
8803 'button',
8804 { onClick: onNext, type: 'button', onMouseUp: handleMouseUpByBlurring, className: styles$75.Button, 'aria-label': intl.translate('Polaris.Pagination.next'), disabled: !hasNext },
8805 createElement(Icon$2, { source: 'arrowRight' })
8806 );
8807 const constructedPrevious = previousTooltip ? createElement(
8808 Tooltip$1,
8809 { content: previousTooltip },
8810 previousButton
8811 ) : previousButton;
8812 const constructedNext = nextTooltip ? createElement(
8813 Tooltip$1,
8814 { content: nextTooltip },
8815 nextButton
8816 ) : nextButton;
8817 const previousButtonEvents = previousKeys && (previousURL || onPrevious) && previousKeys.map(key => createElement(KeypressListener$1, { key: key, keyCode: key, handler: previousURL ? handleCallback(clickPaginationLink('previousURL', node)) : handleCallback(onPrevious) }));
8818 const nextButtonEvents = nextKeys && (nextURL || onNext) && nextKeys.map(key => createElement(KeypressListener$1, { key: key, keyCode: key, handler: nextURL ? handleCallback(clickPaginationLink('nextURL', node)) : handleCallback(onNext) }));
8819 return createElement(
8820 'nav',
8821 { className: className, 'aria-label': label, ref: node },
8822 previousButtonEvents,
8823 constructedPrevious,
8824 nextButtonEvents,
8825 constructedNext
8826 );
8827}
8828function clickPaginationLink(id, node) {
8829 return () => {
8830 if (node.current == null) {
8831 return;
8832 }
8833 const link = node.current.querySelector(`#${id}`);
8834 if (link) {
8835 link.click();
8836 }
8837 };
8838}
8839function handleCallback(fn) {
8840 return () => {
8841 if (isInputFocused()) {
8842 return;
8843 }
8844 fn();
8845 };
8846}
8847var Pagination$2 = withAppProvider()(Pagination$1);
8848
8849class Header$5 extends PureComponent {
8850 constructor() {
8851 super(...arguments);
8852 this.state = {
8853 rollupOpen: false
8854 };
8855 }
8856 render() {
8857 const { title, titleMetadata, breadcrumbs = [], titleHidden = false, primaryAction, pagination, separator, secondaryActions } = this.props;
8858 const className = classNames$1(styles$73.Header, titleHidden && styles$73['Title-hidden'], pagination && styles$73['Header-hasPagination'], separator && styles$73['Header-hasSeparator'], breadcrumbs && breadcrumbs.length && styles$73['Header-hasBreadcrumbs'], this.hasRollup && styles$73['Header-hasRollup'], secondaryActions && secondaryActions.length && styles$73['Header-hasSecondaryActions']);
8859 const breadcrumbMarkup = breadcrumbs.length > 0 ? createElement(Breadcrumbs$1, { breadcrumbs: breadcrumbs }) : null;
8860 const primary = primaryAction && (primaryAction.primary === undefined ? true : primaryAction.primary);
8861 const primaryActionMarkup = primaryAction ? createElement(
8862 'div',
8863 { className: styles$73.PrimaryAction },
8864 buttonsFrom(primaryAction, { primary })
8865 ) : null;
8866 const paginationMarkup = pagination ? createElement(
8867 'div',
8868 { className: styles$73.Pagination },
8869 createElement(Pagination$2, Object.assign({}, pagination, { plain: true }))
8870 ) : null;
8871 const nonPrimaryActionsMarkup = this.renderSecondaryActions();
8872 const actionsMarkup = createElement(
8873 'div',
8874 { className: styles$73.Actions },
8875 primaryActionMarkup,
8876 nonPrimaryActionsMarkup
8877 );
8878 const navigationMarkup = breadcrumbMarkup || paginationMarkup ? createElement(
8879 'div',
8880 { className: styles$73.Navigation },
8881 breadcrumbMarkup,
8882 paginationMarkup
8883 ) : null;
8884 const titleMarkup = createElement(
8885 'div',
8886 { className: styles$73.Title },
8887 createElement(
8888 'div',
8889 null,
8890 createElement(
8891 DisplayText$1,
8892 { size: 'large', element: 'h1' },
8893 title
8894 )
8895 ),
8896 createElement(
8897 'div',
8898 null,
8899 titleMetadata
8900 )
8901 );
8902 return primaryActionMarkup ? createElement(
8903 'div',
8904 { className: className },
8905 navigationMarkup,
8906 createElement(
8907 'div',
8908 { className: styles$73.MainContent },
8909 createElement(
8910 'div',
8911 { className: styles$73.TitleAndActions },
8912 titleMarkup,
8913 actionsMarkup
8914 ),
8915 primaryActionMarkup
8916 )
8917 ) : createElement(
8918 'div',
8919 { className: className },
8920 navigationMarkup,
8921 titleMarkup,
8922 actionsMarkup
8923 );
8924 }
8925 get hasRollup() {
8926 const { secondaryActions = [], actionGroups = [] } = this.props;
8927 return secondaryActions.length + actionGroups.length > 1;
8928 }
8929 renderSecondaryActions() {
8930 const { openActionGroup, rollupOpen } = this.state;
8931 const { secondaryActions = [], actionGroups = [] } = this.props;
8932 if (secondaryActions.length === 0 && actionGroups.length === 0) {
8933 return null;
8934 }
8935 const secondaryActionMarkup = secondaryActions.length > 0 ? secondaryActionsFrom(secondaryActions) : null;
8936 const actionGroupsMarkup = actionGroups.length > 0 ? actionGroups.map(({ title, icon, actions, details }) => {
8937 const detailsClassName = classNames$1(styles$73.Details, actions && Array.isArray(actions) && actions.length > 0 && styles$73.withActions);
8938 const detailsMarkup = details ? createElement(
8939 'div',
8940 { className: detailsClassName },
8941 details
8942 ) : null;
8943 const showIndicator = hasNewStatus(actions);
8944 const active = title === openActionGroup;
8945 return createElement(
8946 'div',
8947 { className: styles$73.ActionGroup, key: `ActionGroup-${title}` },
8948 createElement(
8949 Popover$1,
8950 { key: title, active: active
8951 // eslint-disable-next-line react/jsx-no-bind
8952 , onClose: this.handleActionGroupClose.bind(this, title), activator: createElement(
8953 Action$1,
8954 { showIndicator: showIndicator, hasIndicator: active, disclosure: true, icon: icon
8955 // eslint-disable-next-line react/jsx-no-bind
8956 , onAction: this.handleActionGroupOpen.bind(this, title) },
8957 title
8958 ) },
8959 createElement(ActionList$1, { items: actions
8960 // eslint-disable-next-line react/jsx-no-bind
8961 , onActionAnyItem: this.handleActionGroupClose.bind(this, title) }),
8962 detailsMarkup
8963 )
8964 );
8965 }) : null;
8966 const showIndicator = false && actionGroups.filter(group => hasNewStatus(group.actions)).length > 0;
8967 const rollupMarkup = this.hasRollup ? createElement(
8968 'div',
8969 { className: styles$73.Rollup },
8970 createElement(
8971 Popover$1,
8972 { active: rollupOpen, onClose: this.handleRollupToggle, activator: createElement(
8973 Button$2,
8974 { outline: false && showIndicator, disclosure: true, onClick: this.handleRollupToggle },
8975 'Actions'
8976 ) },
8977 createElement(ActionList$1, { items: secondaryActions, sections: actionGroups.map(convertActionGroupToActionListSection), onActionAnyItem: this.handleRollupToggle })
8978 )
8979 ) : null;
8980 return createElement(
8981 'div',
8982 { className: styles$73.SecondaryActions },
8983 rollupMarkup,
8984 createElement(
8985 'div',
8986 { className: styles$73.IndividualActions },
8987 secondaryActionMarkup,
8988 actionGroupsMarkup
8989 )
8990 );
8991 }
8992 handleRollupToggle() {
8993 this.setState(({ rollupOpen }) => ({ rollupOpen: !rollupOpen }));
8994 }
8995 handleActionGroupClose(group) {
8996 this.setState(({ openActionGroup }) => openActionGroup === group ? { openActionGroup: undefined } : {});
8997 }
8998 handleActionGroupOpen(group) {
8999 this.setState({ openActionGroup: group });
9000 }
9001}
9002__decorate([autobind], Header$5.prototype, "handleRollupToggle", null);
9003function hasNewStatus(actions) {
9004 for (let i = 0; i < actions.length; i++) {
9005 const { badge } = actions[i];
9006 if (badge && badge.status === 'new') {
9007 return true;
9008 }
9009 }
9010 return false;
9011}
9012function convertActionGroupToActionListSection({ title, actions }) {
9013 return { title, items: actions };
9014}
9015function secondaryActionsFrom(actions) {
9016 return actions.map((_a, index) => {
9017 var { content } = _a,
9018 action = __rest(_a, ["content"]);
9019 return createElement(
9020 Action$1,
9021 Object.assign({}, action, { key: `Action-${content || index}` }),
9022 content
9023 );
9024 });
9025}
9026
9027const EASDK_PROPS = ['title', 'icon', 'breadcrumbs', 'secondaryActions', 'actionGroups', 'primaryAction', 'pagination'];
9028class Page$1 extends PureComponent {
9029 componentDidMount() {
9030 if (this.props.polaris.easdk == null) {
9031 return;
9032 }
9033 this.handleEASDKMessaging();
9034 }
9035 componentDidUpdate(prevProps) {
9036 if (this.props.polaris.easdk == null) {
9037 return;
9038 }
9039 const prevEASDKProps = pick(prevProps, EASDK_PROPS);
9040 const currentEASDKProps = pick(this.props, EASDK_PROPS);
9041 if (!isEqual(prevEASDKProps, currentEASDKProps)) {
9042 this.handleEASDKMessaging();
9043 }
9044 }
9045 render() {
9046 const _a = this.props,
9047 { children, fullWidth, singleColumn } = _a,
9048 rest = __rest(_a, ["children", "fullWidth", "singleColumn"]);
9049 const className = classNames$1(styles$73.Page, fullWidth && styles$73.fullWidth, singleColumn && styles$73.singleColumn);
9050 const headerMarkup = this.props.polaris.easdk || !this.hasHeaderContent() ? null : createElement(Header$5, rest);
9051 return createElement(
9052 'div',
9053 { className: className },
9054 headerMarkup,
9055 createElement(
9056 'div',
9057 { className: styles$73.Content },
9058 children
9059 )
9060 );
9061 }
9062 handleEASDKMessaging() {
9063 const { easdk } = this.props.polaris;
9064 if (easdk) {
9065 easdk.Bar.update(this.props);
9066 }
9067 }
9068 hasHeaderContent() {
9069 const { title, primaryAction, secondaryActions, breadcrumbs } = this.props;
9070 return title && title !== '' || primaryAction || secondaryActions && secondaryActions.length > 0 || breadcrumbs && breadcrumbs.length > 0;
9071 }
9072}
9073var Page$2 = withAppProvider()(Page$1);
9074
9075var styles$76 = {
9076 "PageActions": "p_t4",
9077 "temporary": "p_rn",
9078 "translateUp": "p_vt",
9079};
9080
9081function PageActions$1({ primaryAction, secondaryActions, temporary }) {
9082 const className = classNames$1(styles$76.PageActions, temporary && styles$76.temporary);
9083 const primaryActionMarkup = primaryAction ? buttonsFrom(primaryAction, { primary: true }) : null;
9084 const secondaryActionsMarkup = secondaryActions ? createElement(
9085 ButtonGroup$1,
9086 null,
9087 buttonsFrom(secondaryActions)
9088 ) : null;
9089 const distribution = secondaryActionsMarkup ? 'equalSpacing' : 'trailing';
9090 const unsavedChangesMarkup = temporary ? createElement(
9091 TextStyle$1,
9092 { variation: 'subdued' },
9093 'You have unsaved changes.'
9094 ) : null;
9095 return createElement(
9096 'div',
9097 { className: className },
9098 createElement(
9099 Stack$1,
9100 { distribution: distribution, spacing: 'tight', alignment: 'center' },
9101 secondaryActionsMarkup,
9102 unsavedChangesMarkup,
9103 primaryActionMarkup
9104 )
9105 );
9106}
9107
9108var styles$77 = {
9109 "RangeSlider": "p_zg",
9110 "disabled": "p_cm",
9111 "InputWrapper": "p_m9",
9112 "Prefix": "p_hg",
9113 "Suffix": "p_bn",
9114 "Input": "p_jg",
9115 "error": "p_k1",
9116 "Output": "p_r9",
9117 "OutputBubble": "p_w8",
9118 "OutputText": "p_oe",
9119};
9120
9121const getUniqueID$12 = createUniqueIDFactory('RangeSlider');
9122const cssVarPrefix = '--Polaris-RangeSlider-';
9123class RangeSlider$1 extends PureComponent {
9124 constructor(props) {
9125 super(props);
9126 this.state = {
9127 id: props.id || getUniqueID$12()
9128 };
9129 }
9130 static getDerivedStateFromProps(nextProps, prevState) {
9131 return nextProps.id != null && nextProps.id !== prevState.id ? {
9132 id: nextProps.id || prevState.id
9133 } : null;
9134 }
9135 render() {
9136 const { id } = this.state;
9137 const { min = 0, max = 100 } = this.props;
9138 const { label, labelAction, labelHidden, step, value, output, helpText, error, disabled, prefix, suffix, onFocus, onBlur } = this.props;
9139 const describedBy = [];
9140 if (error) {
9141 describedBy.push(`${id}Error`);
9142 }
9143 if (helpText) {
9144 describedBy.push(helpTextID$1(id));
9145 }
9146 const ariaDescribedBy = describedBy.length ? describedBy.join(' ') : undefined;
9147 const sliderProgress = (value - min) * 100 / (max - min);
9148 const cssVars = {
9149 [`${cssVarPrefix}min`]: min,
9150 [`${cssVarPrefix}max`]: max,
9151 [`${cssVarPrefix}current`]: value,
9152 [`${cssVarPrefix}progress`]: `${sliderProgress}%`,
9153 [`${cssVarPrefix}output-factor`]: invertNumber((sliderProgress - 50) / 100)
9154 };
9155 const outputMarkup = !disabled && output && createElement(
9156 'output',
9157 { htmlFor: id, className: styles$77.Output },
9158 createElement(
9159 'div',
9160 { className: styles$77.OutputBubble },
9161 createElement(
9162 'span',
9163 { className: styles$77.OutputText },
9164 value
9165 )
9166 )
9167 );
9168 const prefixMarkup = prefix && createElement(
9169 'div',
9170 { className: styles$77.Prefix },
9171 prefix
9172 );
9173 const suffixMarkup = suffix && createElement(
9174 'div',
9175 { className: styles$77.Suffix },
9176 suffix
9177 );
9178 const className = classNames$1(styles$77.RangeSlider, error && styles$77.error, disabled && styles$77.disabled);
9179 return createElement(
9180 Labelled$1,
9181 { id: id, label: label, error: error, action: labelAction, labelHidden: labelHidden, helpText: helpText },
9182 createElement(
9183 'div',
9184 { className: className, style: cssVars },
9185 prefixMarkup,
9186 createElement(
9187 'div',
9188 { className: styles$77.InputWrapper },
9189 createElement('input', { type: 'range', className: styles$77.Input, id: id, name: id, min: min, max: max, step: step, value: value, disabled: disabled, onChange: this.handleChange, onFocus: onFocus, onBlur: onBlur, 'aria-valuemin': min, 'aria-valuemax': max, 'aria-valuenow': value, 'aria-invalid': Boolean(error), 'aria-describedby': ariaDescribedBy }),
9190 outputMarkup
9191 ),
9192 suffixMarkup
9193 )
9194 );
9195 }
9196 handleChange(event) {
9197 const { onChange } = this.props;
9198 if (onChange == null) {
9199 return;
9200 }
9201 onChange(parseFloat(event.currentTarget.value), this.state.id);
9202 }
9203}
9204__decorate([autobind], RangeSlider$1.prototype, "handleChange", null);
9205function invertNumber(number) {
9206 if (Math.sign(number) === 1) {
9207 return -Math.abs(number);
9208 } else if (Math.sign(number) === -1) {
9209 return Math.abs(number);
9210 } else {
9211 return 0;
9212 }
9213}
9214var RangeSlider$2 = withAppProvider()(RangeSlider$1);
9215
9216// eslint-disable-next-line shopify/strict-component-boundaries
9217function SettingToggle$1({ enabled, action, children }) {
9218 const actionMarkup = action ? buttonFrom(action, { primary: !enabled }) : null;
9219 return createElement(
9220 Card$1,
9221 { sectioned: true },
9222 createElement(
9223 SettingAction$1,
9224 { action: actionMarkup },
9225 children
9226 )
9227 );
9228}
9229
9230class Sticky$1 extends Component {
9231 constructor() {
9232 super(...arguments);
9233 this.state = {
9234 isSticky: false,
9235 style: {}
9236 };
9237 this.placeHolderNode = null;
9238 this.stickyNode = null;
9239 }
9240 componentDidMount() {
9241 const { stickyManager } = this.context.polaris;
9242 const { boundingElement, offset, disableWhenStacked } = this.props;
9243 stickyManager.registerStickyItem({
9244 stickyNode: this.stickyNode,
9245 placeHolderNode: this.placeHolderNode,
9246 handlePositioning: this.handlePositioning,
9247 offset,
9248 boundingElement,
9249 disableWhenStacked
9250 });
9251 }
9252 componentWillUnmount() {
9253 const { stickyManager } = this.context.polaris;
9254 stickyManager.unregisterStickyItem(this.stickyNode);
9255 }
9256 render() {
9257 const { style, isSticky } = this.state;
9258 const { children } = this.props;
9259 const childrenContent = typeof children === 'function' ? children(isSticky) : children;
9260 return createElement(
9261 'div',
9262 null,
9263 createElement('div', { ref: this.setPlaceHolderNode }),
9264 createElement(
9265 'div',
9266 { ref: this.setStickyNode, style: style },
9267 childrenContent
9268 )
9269 );
9270 }
9271 setPlaceHolderNode(node) {
9272 this.placeHolderNode = node;
9273 }
9274 setStickyNode(node) {
9275 this.stickyNode = node;
9276 }
9277 handlePositioning(stick, top = 0, left = 0, width = 0) {
9278 const { isSticky } = this.state;
9279 if (stick && !isSticky || !stick && isSticky) {
9280 this.adjustPlaceHolderNode(stick);
9281 this.setState({ isSticky: !isSticky });
9282 }
9283 const style = stick ? {
9284 position: 'fixed',
9285 top,
9286 left,
9287 width
9288 } : {};
9289 this.setState({ style });
9290 }
9291 adjustPlaceHolderNode(add) {
9292 if (this.placeHolderNode && this.stickyNode) {
9293 this.placeHolderNode.style.paddingBottom = add ? `${getRectForNode(this.stickyNode).height}px` : '0px';
9294 }
9295 }
9296}
9297Sticky$1.contextTypes = polarisAppProviderContextTypes;
9298__decorate([autobind], Sticky$1.prototype, "setPlaceHolderNode", null);
9299__decorate([autobind], Sticky$1.prototype, "setStickyNode", null);
9300__decorate([autobind], Sticky$1.prototype, "handlePositioning", null);
9301__decorate([autobind], Sticky$1.prototype, "adjustPlaceHolderNode", null);
9302
9303var styles$78 = {
9304 "Tabs": "p_j7",
9305 "fitted": "p_l7",
9306 "TabContainer": "p_l5",
9307 "Tab": "p_s5",
9308 "Title": "p_wz",
9309 "fillSpace": "p_bh",
9310 "Tab-selected": "p_ze",
9311 "Panel": "p_kw",
9312 "List": "p_x2",
9313 "Item": "p_wv",
9314 "DisclosureTab": "p_oq",
9315 "DisclosureTab-visible": "p_zr",
9316 "DisclosureActivator": "p_po",
9317 "TabMeasurer": "p_x9",
9318};
9319
9320class Item$16 extends PureComponent {
9321 constructor() {
9322 super(...arguments);
9323 this.focusedNode = null;
9324 }
9325 componentDidMount() {
9326 const { focusedNode } = this;
9327 const { focused } = this.props;
9328 if (focusedNode && focusedNode instanceof HTMLElement && focused) {
9329 focusedNode.focus();
9330 }
9331 }
9332 componentDidUpdate() {
9333 const { focusedNode } = this;
9334 const { focused } = this.props;
9335 if (focusedNode && focusedNode instanceof HTMLElement && focused) {
9336 focusedNode.focus();
9337 }
9338 }
9339 render() {
9340 const { id, panelID, children, url, accessibilityLabel, onClick = noop } = this.props;
9341 const sharedProps = {
9342 id,
9343 ref: this.setFocusedNode,
9344 onClick,
9345 className: styles$78.Item,
9346 'aria-controls': panelID,
9347 'aria-selected': false,
9348 'aria-label': accessibilityLabel
9349 };
9350 const markup = url ? createElement(UnstyledLink$2, Object.assign({ url }, sharedProps), children) : createElement(
9351 'button',
9352 Object.assign({}, sharedProps, { type: 'button' }),
9353 children
9354 );
9355 return createElement(
9356 'li',
9357 { role: 'presentation' },
9358 markup
9359 );
9360 }
9361 setFocusedNode(node) {
9362 this.focusedNode = node;
9363 }
9364}
9365__decorate([autobind], Item$16.prototype, "setFocusedNode", null);
9366
9367class List$2 extends PureComponent {
9368 render() {
9369 const { focusIndex, disclosureTabs, onClick = noop } = this.props;
9370 const tabs = disclosureTabs.map((_a, index) => {
9371 var { id, content } = _a,
9372 tabProps = __rest(_a, ["id", "content"]);
9373 return createElement(
9374 Item$16,
9375 Object.assign({}, tabProps, { key: id, id: id, focused: index === focusIndex
9376 // eslint-disable-next-line react/jsx-no-bind
9377 , onClick: onClick.bind(null, id) }),
9378 content
9379 );
9380 });
9381 return createElement(
9382 'ul',
9383 { className: styles$78.List, onKeyDown: handleKeyDown$2, onKeyUp: this.handleKeypress },
9384 tabs
9385 );
9386 }
9387 handleKeypress(event) {
9388 const { onKeyPress = noop } = this.props;
9389 onKeyPress(event);
9390 }
9391}
9392__decorate([autobind], List$2.prototype, "handleKeypress", null);
9393function handleKeyDown$2(event) {
9394 const { key } = event;
9395 if (key === 'ArrowUp' || key === 'ArrowDown' || key === 'ArrowLeft' || key === 'ArrowRight') {
9396 event.preventDefault();
9397 event.stopPropagation();
9398 }
9399}
9400
9401function Panel$1({ id, tabID, children }) {
9402 return createElement(
9403 'div',
9404 { className: styles$78.Panel, id: id, role: 'tabpanel', 'aria-labelledby': tabID, tabIndex: -1 },
9405 children
9406 );
9407}
9408
9409class Tab$1 extends PureComponent {
9410 constructor() {
9411 super(...arguments);
9412 this.node = null;
9413 }
9414 // A tab can start selected when it is moved from the disclosure dropdown
9415 // into the main list, so we need to send focus from the tab to the panel
9416 // on mount and update
9417 componentDidMount() {
9418 const { id, measuring, selected, panelID, focused } = this.props;
9419 if (measuring) {
9420 return;
9421 }
9422 // Because of timing issues with the render, we may still have the old,
9423 // in-disclosure version of the tab that has focus. Check for this
9424 // as a second indicator of focus
9425 const itemHadFocus = focused || document.activeElement && document.activeElement.id === id;
9426 // If we just check for selected, the panel for the active tab will
9427 // be focused on page load, which we don’t want
9428 if (itemHadFocus && selected && panelID != null) {
9429 focusPanelID(panelID);
9430 }
9431 }
9432 componentDidUpdate(previousProps) {
9433 const { selected: wasSelected } = previousProps;
9434 const { focused, measuring, selected, panelID } = this.props;
9435 if (measuring) {
9436 return;
9437 }
9438 if (selected && !wasSelected && panelID != null) {
9439 focusPanelID(panelID);
9440 } else if (focused && this.node != null) {
9441 focusFirstFocusableNode(this.node);
9442 }
9443 }
9444 render() {
9445 const { id, focused, siblingTabHasFocus, children, onClick, selected, url, panelID, measuring, accessibilityLabel } = this.props;
9446 const handleClick = onClick && onClick.bind(null, id);
9447 const className = classNames$1(styles$78.Tab, selected && styles$78['Tab-selected']);
9448 let tabIndex;
9449 if (selected && !siblingTabHasFocus && !measuring) {
9450 tabIndex = 0;
9451 } else if (focused && !measuring) {
9452 tabIndex = 0;
9453 } else {
9454 tabIndex = -1;
9455 }
9456 const markup = url ? createElement(
9457 UnstyledLink$2,
9458 { id: id, url: url, role: 'tab', tabIndex: tabIndex, onClick: handleClick, className: className, 'aria-selected': selected, 'aria-controls': panelID, 'aria-label': accessibilityLabel, onMouseUp: handleMouseUpByBlurring },
9459 createElement(
9460 'span',
9461 { className: styles$78.Title },
9462 children
9463 )
9464 ) : createElement(
9465 'button',
9466 { id: id, role: 'tab', type: 'button', tabIndex: tabIndex, className: className, onClick: handleClick, 'aria-selected': selected, 'aria-controls': panelID, 'aria-label': accessibilityLabel, onMouseUp: handleMouseUpByBlurring },
9467 createElement(
9468 'span',
9469 { className: styles$78.Title },
9470 children
9471 )
9472 );
9473 return createElement(
9474 'li',
9475 { role: 'presentation', className: styles$78.TabContainer, ref: this.setNode },
9476 markup
9477 );
9478 }
9479 setNode(node) {
9480 this.node = node;
9481 }
9482}
9483__decorate([autobind], Tab$1.prototype, "setNode", null);
9484function focusPanelID(panelID) {
9485 const panel = document.getElementById(panelID);
9486 if (panel) {
9487 panel.focus();
9488 }
9489}
9490var Tab$2 = withAppProvider()(Tab$1);
9491
9492class TabMeasurer$1 extends PureComponent {
9493 constructor() {
9494 super(...arguments);
9495 this.containerNode = null;
9496 }
9497 componentDidMount() {
9498 this.handleMeasurement();
9499 if (process.env.NODE_ENV === 'development') {
9500 // We need to defer the calculation in development so the
9501 // styles have time to be injected.
9502 setTimeout(this.handleMeasurement, 0);
9503 }
9504 }
9505 componentDidUpdate(prevProps) {
9506 if (prevProps.tabs !== this.props.tabs) {
9507 this.handleMeasurement();
9508 }
9509 }
9510 render() {
9511 const { selected, tabs, activator, tabToFocus, siblingTabHasFocus } = this.props;
9512 const tabsMarkup = tabs.map((tab, index) => {
9513 return createElement(
9514 Tab$2,
9515 { measuring: true, key: `${index}${tab.id}Hidden`, id: `${tab.id}Measurer`, siblingTabHasFocus: siblingTabHasFocus, focused: index === tabToFocus, selected: index === selected, onClick: noop, url: tab.url },
9516 tab.content
9517 );
9518 });
9519 const classname = classNames$1(styles$78.Tabs, styles$78.TabMeasurer);
9520 return createElement(
9521 'div',
9522 { className: classname, ref: this.setContainerNode },
9523 createElement(EventListener$1, { event: 'resize', handler: this.handleMeasurement }),
9524 tabsMarkup,
9525 activator
9526 );
9527 }
9528 setContainerNode(node) {
9529 this.containerNode = node;
9530 }
9531 handleMeasurement() {
9532 if (this.containerNode == null) {
9533 return;
9534 }
9535 const domNode = findDOMNode(this);
9536 if (domNode == null) {
9537 return;
9538 }
9539 // const hiddenTabNodes = domNode.children
9540 const { handleMeasurement } = this.props;
9541 const containerWidth = this.containerNode.offsetWidth;
9542 const tabMeasurerNode = findDOMNode(this);
9543 const hiddenTabNodes = tabMeasurerNode instanceof Element && tabMeasurerNode.children;
9544 const hiddenTabNodesArray = [].slice.call(hiddenTabNodes);
9545 const hiddenTabWidths = hiddenTabNodesArray.map(node => {
9546 return node.getBoundingClientRect().width;
9547 });
9548 const disclosureWidth = hiddenTabWidths.pop();
9549 handleMeasurement({
9550 containerWidth,
9551 disclosureWidth,
9552 hiddenTabWidths
9553 });
9554 }
9555}
9556__decorate([autobind], TabMeasurer$1.prototype, "setContainerNode", null);
9557__decorate([autobind], TabMeasurer$1.prototype, "handleMeasurement", null);
9558
9559class Tabs$1 extends PureComponent {
9560 constructor() {
9561 super(...arguments);
9562 this.state = {
9563 disclosureWidth: 0,
9564 containerWidth: Infinity,
9565 tabWidths: [],
9566 visibleTabs: [],
9567 hiddenTabs: [],
9568 showDisclosure: false,
9569 tabToFocus: -1
9570 };
9571 }
9572 // eslint-disable-next-line react/no-deprecated
9573 componentWillReceiveProps(nextProps) {
9574 const { selected } = this.props;
9575 const { disclosureWidth, tabWidths, containerWidth, tabToFocus } = this.state;
9576 const { visibleTabs, hiddenTabs } = getVisibleAndHiddenTabIndices(nextProps.tabs, nextProps.selected, disclosureWidth, tabWidths, containerWidth);
9577 this.setState({
9578 visibleTabs,
9579 hiddenTabs,
9580 tabToFocus: selected === nextProps.selected ? -1 : tabToFocus,
9581 showDisclosure: false
9582 });
9583 }
9584 render() {
9585 const { tabs, selected, fitted, children } = this.props;
9586 const { tabToFocus, visibleTabs, hiddenTabs, showDisclosure } = this.state;
9587 const disclosureTabs = hiddenTabs.map(tabIndex => tabs[tabIndex]);
9588 const panelMarkup = children ? createElement(
9589 Panel$1,
9590 { id: tabs[selected].panelID || `${tabs[selected].id}-panel`, tabID: tabs[selected].id },
9591 children
9592 ) : null;
9593 const tabsMarkup = visibleTabs.sort((tabA, tabB) => tabA - tabB).map(tabIndex => this.renderTabMarkup(tabs[tabIndex], tabIndex));
9594 const disclosureActivatorVisible = visibleTabs.length < tabs.length;
9595 const classname = classNames$1(styles$78.Tabs, fitted && styles$78.fitted, disclosureActivatorVisible && styles$78.fillSpace);
9596 const disclosureTabClassName = classNames$1(styles$78.DisclosureTab, disclosureActivatorVisible && styles$78['DisclosureTab-visible']);
9597 const activator = createElement(
9598 'button',
9599 { tabIndex: -1, className: styles$78.DisclosureActivator, onClick: this.handleDisclosureActivatorClick },
9600 createElement(Icon$2, { source: 'horizontalDots' })
9601 );
9602 return createElement(
9603 'div',
9604 null,
9605 createElement(
9606 'ul',
9607 { role: 'tablist', className: classname, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: handleKeyDown$1, onKeyUp: this.handleKeyPress },
9608 tabsMarkup,
9609 createElement(
9610 'li',
9611 { role: 'presentation', className: disclosureTabClassName },
9612 createElement(
9613 Popover$1,
9614 { preferredPosition: 'below', activator: activator, active: disclosureActivatorVisible && showDisclosure, onClose: this.handleClose },
9615 createElement(List$2, { focusIndex: hiddenTabs.indexOf(tabToFocus), disclosureTabs: disclosureTabs, onClick: this.handleTabClick, onKeyPress: this.handleKeyPress })
9616 )
9617 )
9618 ),
9619 createElement(TabMeasurer$1, { tabToFocus: tabToFocus, activator: activator, selected: selected, tabs: tabs, siblingTabHasFocus: tabToFocus > -1, handleMeasurement: this.handleMeasurement }),
9620 panelMarkup
9621 );
9622 }
9623 handleKeyPress(event) {
9624 const { tabToFocus, visibleTabs, hiddenTabs } = this.state;
9625 const tabsArrayInOrder = visibleTabs.concat(hiddenTabs);
9626 const key = event.key;
9627 let newFocus = tabsArrayInOrder.indexOf(tabToFocus);
9628 if (key === 'ArrowRight' || key === 'ArrowDown') {
9629 newFocus += 1;
9630 if (newFocus === tabsArrayInOrder.length) {
9631 newFocus = 0;
9632 }
9633 }
9634 if (key === 'ArrowLeft' || key === 'ArrowUp') {
9635 newFocus -= 1;
9636 if (newFocus === -1) {
9637 newFocus = tabsArrayInOrder.length - 1;
9638 }
9639 }
9640 this.setState({
9641 showDisclosure: hiddenTabs.indexOf(tabsArrayInOrder[newFocus]) > -1,
9642 tabToFocus: tabsArrayInOrder[newFocus]
9643 });
9644 }
9645 renderTabMarkup(tab, index) {
9646 const { selected } = this.props;
9647 const { tabToFocus } = this.state;
9648 return createElement(
9649 Tab$2,
9650 { key: `${index}-${tab.id}`, id: tab.id, siblingTabHasFocus: tabToFocus > -1, focused: index === tabToFocus, selected: index === selected, onClick: this.handleTabClick, panelID: tab.panelID || `${tab.id}-panel`, accessibilityLabel: tab.accessibilityLabel, url: tab.url },
9651 tab.content
9652 );
9653 }
9654 handleFocus(event) {
9655 const { selected, tabs } = this.props;
9656 // If we are explicitly focusing one of the non-selected tabs, use it
9657 // move the focus to it
9658 const target$$1 = event.target;
9659 if (target$$1.classList.contains(styles$78.Tab) || target$$1.classList.contains(styles$78.Item)) {
9660 let tabToFocus = -1;
9661 tabs.every((tab, index) => {
9662 if (tab.id === target$$1.id) {
9663 tabToFocus = index;
9664 return false;
9665 }
9666 return true;
9667 });
9668 this.setState({ tabToFocus });
9669 return;
9670 }
9671 if (target$$1.classList.contains(styles$78.DisclosureActivator)) {
9672 return;
9673 }
9674 // If we are coming in from somewhere other than another tab, focus the
9675 // selected tab, and the focus (click) is not on the disclosure activator,
9676 // focus the selected tab
9677 if (!event.relatedTarget) {
9678 this.setState({ tabToFocus: selected });
9679 return;
9680 }
9681 const relatedTarget = event.relatedTarget;
9682 if (!relatedTarget.classList.contains(styles$78.Tab) && !relatedTarget.classList.contains(styles$78.Item) && !relatedTarget.classList.contains(styles$78.DisclosureActivator)) {
9683 this.setState({ tabToFocus: selected });
9684 }
9685 }
9686 handleBlur(event) {
9687 // If we blur and the target is not another tab, forget the focus position
9688 if (event.relatedTarget == null) {
9689 this.setState({ tabToFocus: -1 });
9690 return;
9691 }
9692 const target$$1 = event.relatedTarget;
9693 // If we are going to anywhere other than another tab, lose the last focused tab
9694 if (!target$$1.classList.contains(styles$78.Tab) && !target$$1.classList.contains(styles$78.Item)) {
9695 this.setState({ tabToFocus: -1 });
9696 }
9697 }
9698 handleDisclosureActivatorClick() {
9699 this.setState(({ showDisclosure }) => ({ showDisclosure: !showDisclosure }));
9700 }
9701 handleClose() {
9702 this.setState({
9703 showDisclosure: false
9704 });
9705 }
9706 handleMeasurement(measurements) {
9707 const { tabs, selected } = this.props;
9708 const { tabToFocus } = this.state;
9709 const { hiddenTabWidths: tabWidths, containerWidth, disclosureWidth } = measurements;
9710 const { visibleTabs, hiddenTabs } = getVisibleAndHiddenTabIndices(tabs, selected, disclosureWidth, tabWidths, containerWidth);
9711 this.setState({
9712 tabToFocus: tabToFocus === -1 ? -1 : selected,
9713 visibleTabs,
9714 hiddenTabs,
9715 disclosureWidth,
9716 containerWidth,
9717 tabWidths
9718 });
9719 }
9720 handleTabClick(id) {
9721 const { tabs, onSelect = noop } = this.props;
9722 const tab = tabs.find(aTab => aTab.id === id);
9723 if (tab == null) {
9724 return;
9725 }
9726 const selectedIndex = tabs.indexOf(tab);
9727 onSelect(selectedIndex);
9728 }
9729}
9730Tabs$1.Panel = Panel$1;
9731__decorate([autobind], Tabs$1.prototype, "handleKeyPress", null);
9732__decorate([autobind], Tabs$1.prototype, "renderTabMarkup", null);
9733__decorate([autobind], Tabs$1.prototype, "handleFocus", null);
9734__decorate([autobind], Tabs$1.prototype, "handleBlur", null);
9735__decorate([autobind], Tabs$1.prototype, "handleDisclosureActivatorClick", null);
9736__decorate([autobind], Tabs$1.prototype, "handleClose", null);
9737__decorate([autobind], Tabs$1.prototype, "handleMeasurement", null);
9738__decorate([autobind], Tabs$1.prototype, "handleTabClick", null);
9739function handleKeyDown$1(event) {
9740 const { key } = event;
9741 if (key === 'ArrowUp' || key === 'ArrowDown' || key === 'ArrowLeft' || key === 'ArrowRight') {
9742 event.preventDefault();
9743 event.stopPropagation();
9744 }
9745}
9746function getVisibleAndHiddenTabIndices(tabs, selected, disclosureWidth, tabWidths, containerWidth) {
9747 const sumTabWidths = tabWidths.reduce((sum, width) => sum + width, 0);
9748 const arrayOfTabIndices = tabs.map((_, index) => {
9749 return index;
9750 });
9751 const visibleTabs = [];
9752 const hiddenTabs = [];
9753 if (containerWidth > sumTabWidths) {
9754 visibleTabs.push(...arrayOfTabIndices);
9755 } else {
9756 visibleTabs.push(selected);
9757 let newTabWidth = tabWidths[selected];
9758 arrayOfTabIndices.forEach(index => {
9759 if (index !== selected) {
9760 if (newTabWidth + tabWidths[index] > containerWidth - disclosureWidth) {
9761 hiddenTabs.push(index);
9762 return;
9763 }
9764 visibleTabs.push(index);
9765 newTabWidth += tabWidths[index];
9766 }
9767 });
9768 }
9769 return {
9770 visibleTabs,
9771 hiddenTabs
9772 };
9773}
9774
9775var styles$79 = {
9776 "Tag": "p_qk",
9777 "disabled": "p_ct",
9778 "TagText": "p_e9",
9779 "Button": "p_hw",
9780};
9781
9782function Tag$1({ children, disabled = false, onRemove, polaris: { intl } }) {
9783 const className = classNames(disabled && styles$79.disabled, styles$79.Tag);
9784 const ariaLabel = intl.translate('Polaris.Tag.ariaLabel', { children });
9785 return createElement(
9786 'span',
9787 { className: className },
9788 createElement(
9789 'span',
9790 { title: children, className: styles$79.TagText },
9791 children
9792 ),
9793 createElement(
9794 'button',
9795 { type: 'button', 'aria-label': ariaLabel, className: styles$79.Button, onClick: onRemove, onMouseUp: handleMouseUpByBlurring, disabled: disabled },
9796 createElement(Icon$2, { source: 'cancelSmall' })
9797 )
9798 );
9799}
9800var Tag$2 = withAppProvider()(Tag$1);
9801
9802var styles$80 = {
9803 "TextField": "p_t8",
9804 "multiline": "p_el",
9805 "Input": "p_oh",
9806 "minimal": "p_mf",
9807 "focus": "p_og",
9808 "Backdrop": "p_q0",
9809 "hasValue": "p_ml",
9810 "error": "p_tr",
9811 "readOnly": "p_ou",
9812 "disabled": "p_bg",
9813 "Prefix": "p_fe",
9814 "Input-suffixed": "p_tv",
9815 "Suffix": "p_p7",
9816 "Spinner": "p_vv",
9817 "SpinnerIcon": "p_uf",
9818 "Resizer": "p_yz",
9819 "DummyInput": "p_hm",
9820 "Segment": "p_kk",
9821};
9822
9823class Resizer$1 extends PureComponent {
9824 constructor() {
9825 super(...arguments);
9826 this.contentNode = null;
9827 this.minimumLinesNode = null;
9828 }
9829 componentDidMount() {
9830 this.handleHeightCheck();
9831 if (process.env.NODE_ENV === 'development') {
9832 // We need to defer the calculation in development so the
9833 // styles have time to be injected.
9834 setTimeout(this.handleHeightCheck, 0);
9835 }
9836 }
9837 componentDidUpdate() {
9838 this.handleHeightCheck();
9839 }
9840 render() {
9841 const { contents, minimumLines } = this.props;
9842 const minimumLinesMarkup = minimumLines ? createElement('div', { ref: this.setMinimumLinesNode, className: styles$80.DummyInput, dangerouslySetInnerHTML: {
9843 __html: getContentsForMinimumLines(minimumLines)
9844 } }) : null;
9845 return createElement(
9846 'div',
9847 { 'aria-hidden': true, className: styles$80.Resizer },
9848 createElement(EventListener$1, { event: 'resize', handler: this.handleHeightCheck }),
9849 createElement('div', { ref: this.setContentNode, className: styles$80.DummyInput, dangerouslySetInnerHTML: { __html: getFinalContents(contents) } }),
9850 minimumLinesMarkup
9851 );
9852 }
9853 handleHeightCheck() {
9854 if (this.contentNode == null || this.minimumLinesNode == null) {
9855 return;
9856 }
9857 const contentHeight = this.contentNode.offsetHeight;
9858 const minimumHeight = this.setMinimumLinesNode ? this.minimumLinesNode.offsetHeight : 0;
9859 const newHeight = Math.max(contentHeight, minimumHeight);
9860 const { currentHeight, onHeightChange } = this.props;
9861 if (newHeight !== currentHeight) {
9862 onHeightChange(newHeight);
9863 }
9864 }
9865 setContentNode(node) {
9866 this.contentNode = node;
9867 }
9868 setMinimumLinesNode(node) {
9869 this.minimumLinesNode = node;
9870 }
9871}
9872__decorate([autobind], Resizer$1.prototype, "handleHeightCheck", null);
9873__decorate([autobind], Resizer$1.prototype, "setContentNode", null);
9874__decorate([autobind], Resizer$1.prototype, "setMinimumLinesNode", null);
9875const ENTITIES_TO_REPLACE = {
9876 '&': '&amp;',
9877 '<': '&lt;',
9878 '>': '&gt;',
9879 '\n': '<br>'
9880};
9881const REPLACE_REGEX$1 = /[\n&<>]/g;
9882function replaceEntity(entity) {
9883 return ENTITIES_TO_REPLACE[entity] || entity;
9884}
9885function getContentsForMinimumLines(minimumLines) {
9886 let content = '';
9887 for (let line = 0; line < minimumLines; line++) {
9888 content += '<br>';
9889 }
9890 return content;
9891}
9892function getFinalContents(contents) {
9893 return contents ? `${contents.replace(REPLACE_REGEX$1, replaceEntity)}<br>` : '<br>';
9894}
9895
9896function Spinner$4({ onChange, onClick }) {
9897 function handleStep(step) {
9898 return () => onChange(step);
9899 }
9900 return createElement(
9901 'div',
9902 { className: styles$80.Spinner, onClick: onClick, 'aria-hidden': true },
9903 createElement(
9904 'div',
9905 { role: 'button', className: styles$80.Segment, tabIndex: -1, onClick: handleStep(1) },
9906 createElement(
9907 'div',
9908 { className: styles$80.SpinnerIcon },
9909 createElement(Icon$2, { source: 'caretUp' })
9910 )
9911 ),
9912 createElement(
9913 'div',
9914 { role: 'button', className: styles$80.Segment, tabIndex: -1, onClick: handleStep(-1) },
9915 createElement(
9916 'div',
9917 { className: styles$80.SpinnerIcon },
9918 createElement(Icon$2, { source: 'caretDown' })
9919 )
9920 )
9921 );
9922}
9923
9924const getUniqueID$13 = createUniqueIDFactory('TextField');
9925class TextField$1 extends PureComponent {
9926 constructor(props) {
9927 super(props);
9928 this.state = {
9929 height: null,
9930 focus: false,
9931 id: props.id || getUniqueID$13()
9932 };
9933 }
9934 componentDidUpdate({ focused }) {
9935 if (this.input && focused !== this.props.focused && this.props.focused === true) {
9936 this.input.focus();
9937 }
9938 }
9939 // eslint-disable-next-line react/no-deprecated
9940 componentWillReceiveProps(newProps) {
9941 this.setState(prevState => ({
9942 id: newProps.id || prevState.id
9943 }));
9944 }
9945 render() {
9946 const { id = this.state.id, value = '', placeholder, minimal, disabled, readOnly, role, autoFocus, type, name, error, multiline, connectedRight, connectedLeft, label, labelAction, labelHidden, helpText, prefix, suffix, onFocus, onBlur, autoComplete, min, max, minLength, maxLength, spellCheck, optional, pattern, ariaOwns, ariaActiveDescendant, ariaAutocomplete, ariaControls } = this.props;
9947 const { height } = this.state;
9948 const className = classNames$1(styles$80.TextField, Boolean(value) && styles$80.hasValue, minimal && styles$80.minimal, disabled && styles$80.disabled, readOnly && styles$80.readOnly, error && styles$80.error, multiline && styles$80.multiline, this.state.focus && styles$80.focus);
9949 const inputType = type === 'currency' ? 'text' : type;
9950 const prefixMarkup = prefix ? createElement(
9951 'div',
9952 { className: styles$80.Prefix, id: `${id}Prefix` },
9953 prefix
9954 ) : null;
9955 const suffixMarkup = suffix ? createElement(
9956 'div',
9957 { className: styles$80.Suffix, id: `${id}Suffix` },
9958 suffix
9959 ) : null;
9960 const spinnerMarkup = type === 'number' && !disabled ? createElement(Spinner$4, { onChange: this.handleNumberChange }) : null;
9961 const style = multiline && height ? { height } : null;
9962 const resizer = multiline ? createElement(Resizer$1, { contents: value || placeholder, currentHeight: height, minimumLines: typeof multiline === 'number' ? multiline : 1, onHeightChange: this.handleExpandingResize }) : null;
9963 const describedBy = [];
9964 if (error) {
9965 describedBy.push(`${id}Error`);
9966 }
9967 if (helpText) {
9968 describedBy.push(helpTextID$1(id));
9969 }
9970 const labelledBy = [labelID(id)];
9971 if (prefix) {
9972 labelledBy.push(`${id}Prefix`);
9973 }
9974 if (suffix) {
9975 labelledBy.push(`${id}Suffix`);
9976 }
9977 const inputClassName = classNames$1(styles$80.Input, suffix && styles$80['Input-suffixed']);
9978 const input = createElement(multiline ? 'textarea' : 'input', {
9979 name,
9980 id,
9981 disabled,
9982 readOnly,
9983 role,
9984 autoFocus,
9985 value,
9986 placeholder,
9987 onFocus,
9988 onBlur,
9989 onKeyPress: this.handleKeyPress,
9990 style,
9991 autoComplete: normalizeAutoComplete$1(autoComplete),
9992 className: inputClassName,
9993 onChange: this.handleChange,
9994 ref: this.setInput,
9995 min,
9996 max,
9997 minLength,
9998 maxLength,
9999 spellCheck,
10000 pattern,
10001 type: inputType,
10002 'aria-describedby': describedBy.length ? describedBy.join(' ') : undefined,
10003 'aria-label': label,
10004 'aria-labelledby': labelledBy.join(' '),
10005 'aria-invalid': Boolean(error),
10006 'aria-owns': ariaOwns,
10007 'aria-activedescendant': ariaActiveDescendant,
10008 'aria-autocomplete': ariaAutocomplete,
10009 'aria-controls': ariaControls,
10010 'aria-multiline': multiline
10011 });
10012 return createElement(
10013 Labelled$1,
10014 { label: label, id: id, error: error, action: labelAction, labelHidden: labelHidden, helpText: helpText, optional: optional },
10015 createElement(
10016 Connected$1,
10017 { left: connectedLeft, right: connectedRight },
10018 createElement(
10019 'div',
10020 { className: className, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick },
10021 prefixMarkup,
10022 input,
10023 suffixMarkup,
10024 spinnerMarkup,
10025 createElement('div', { className: styles$80.Backdrop }),
10026 resizer
10027 )
10028 )
10029 );
10030 }
10031 setInput(input) {
10032 this.input = input;
10033 }
10034 handleNumberChange(steps) {
10035 const { onChange, value, step = 1, min = -Infinity, max = Infinity } = this.props;
10036 if (onChange == null) {
10037 return;
10038 }
10039 // Returns the length of decimal places in a number
10040 const dpl = num => (num.toString().split('.')[1] || []).length;
10041 const numericValue = value ? parseFloat(value) : 0;
10042 if (isNaN(numericValue)) {
10043 return;
10044 }
10045 // Making sure the new value has the same length of decimal places as the
10046 // step / value has.
10047 const decimalPlaces = Math.max(dpl(numericValue), dpl(step));
10048 const newValue = Math.min(max, Math.max(numericValue + steps * step, min));
10049 onChange(String(newValue.toFixed(decimalPlaces)), this.state.id);
10050 }
10051 handleExpandingResize(height) {
10052 this.setState({ height });
10053 }
10054 handleKeyPress(event) {
10055 const { key, which } = event;
10056 const { type } = this.props;
10057 const numbersSpec = /[\d.eE+-]$/;
10058 if (type !== 'number' || which === Keys.ENTER || key.match(numbersSpec)) {
10059 return;
10060 }
10061 event.preventDefault();
10062 }
10063 handleChange(event) {
10064 const { onChange } = this.props;
10065 if (onChange == null) {
10066 return;
10067 }
10068 onChange(event.currentTarget.value, this.state.id);
10069 }
10070 handleFocus() {
10071 this.setState({ focus: true });
10072 }
10073 handleBlur() {
10074 this.setState({ focus: false });
10075 }
10076 handleClick() {
10077 this.input.focus();
10078 }
10079}
10080__decorate([autobind], TextField$1.prototype, "setInput", null);
10081__decorate([autobind], TextField$1.prototype, "handleNumberChange", null);
10082__decorate([autobind], TextField$1.prototype, "handleExpandingResize", null);
10083__decorate([autobind], TextField$1.prototype, "handleKeyPress", null);
10084__decorate([autobind], TextField$1.prototype, "handleChange", null);
10085__decorate([autobind], TextField$1.prototype, "handleFocus", null);
10086__decorate([autobind], TextField$1.prototype, "handleBlur", null);
10087__decorate([autobind], TextField$1.prototype, "handleClick", null);
10088function normalizeAutoComplete$1(autoComplete) {
10089 if (autoComplete == null) {
10090 return autoComplete;
10091 }
10092 return autoComplete ? 'on' : 'off';
10093}
10094
10095var styles$81 = {
10096 "DisplayText": "p_ub",
10097 "sizeSmall": "p_jx",
10098 "sizeMedium": "p_j1",
10099 "sizeLarge": "p_bd",
10100 "sizeExtraLarge": "p_rw",
10101};
10102
10103function SkeletonDisplayText$1({ size = 'medium' }) {
10104 const className = classNames$1(styles$81.DisplayText, size && styles$81[variationName$1('size', size)]);
10105 return createElement('div', { className: className });
10106}
10107
10108var styles$82 = {
10109 "SkeletonBodyTextContainer": "p_v9",
10110 "SkeletonBodyText": "p_nn",
10111};
10112
10113function SkeletonBodyText$1({ lines = 3 }) {
10114 const bodyTextLines = [];
10115 for (let i = 0; i < lines; i++) {
10116 bodyTextLines.push(createElement('div', { className: styles$82.SkeletonBodyText, key: i }));
10117 }
10118 return createElement(
10119 'div',
10120 { className: styles$82.SkeletonBodyTextContainer },
10121 bodyTextLines
10122 );
10123}
10124
10125var styles$83 = {
10126 "Page": "p_m3",
10127 "fullWidth": "p_et",
10128 "singleColumn": "p_vw",
10129 "Header": "p_fv",
10130 "Header-hasSecondaryActions": "p_l0",
10131 "BreadcrumbAction": "p_tf",
10132 "Actions": "p_h1",
10133 "Action": "p_fn",
10134};
10135
10136class SkeletonPage extends PureComponent {
10137 render() {
10138 const { children, fullWidth, singleColumn, secondaryActions, title = '', breadcrumbs } = this.props;
10139 const className = classNames$1(styles$83.Page, fullWidth && styles$83.fullWidth, singleColumn && styles$83.singleColumn);
10140 const headerClassName = classNames$1(styles$83.Header, breadcrumbs && styles$83['Header-hasBreadcrumbs'], secondaryActions && styles$83['Header-hasSecondaryActions']);
10141 const titleMarkup = title !== null ? renderTitle(title) : null;
10142 const secondaryActionsMarkup = secondaryActions ? renderSecondaryActions(secondaryActions) : null;
10143 const breadcrumbMarkup = breadcrumbs ? createElement(
10144 'div',
10145 { className: styles$83.BreadcrumbAction, style: { width: 60 } },
10146 createElement(SkeletonBodyText$1, { lines: 1 })
10147 ) : null;
10148 const headerMarkup = !this.props.polaris.easdk ? createElement(
10149 'div',
10150 { className: headerClassName },
10151 breadcrumbMarkup,
10152 titleMarkup,
10153 secondaryActionsMarkup
10154 ) : null;
10155 return createElement(
10156 'div',
10157 { className: className, role: 'status', 'aria-label': 'Page loading' },
10158 headerMarkup,
10159 createElement(
10160 'div',
10161 { className: styles$83.Content },
10162 children
10163 )
10164 );
10165 }
10166}
10167function renderSecondaryActions(actionCount) {
10168 const actions = [];
10169 for (let i = 0; i < actionCount; i++) {
10170 const width = Math.round(Math.random() * 40 + 60);
10171 actions.push(createElement(
10172 'div',
10173 { className: styles$83.Action, style: { width }, key: i },
10174 createElement(SkeletonBodyText$1, { lines: 1 })
10175 ));
10176 }
10177 return createElement(
10178 'div',
10179 { className: styles$83.Actions },
10180 actions
10181 );
10182}
10183function renderTitle(title) {
10184 const titleContent = title === '' ? createElement(SkeletonDisplayText$1, { size: 'large' }) : createElement(
10185 DisplayText$1,
10186 { size: 'large', element: 'h1' },
10187 title
10188 );
10189 return createElement(
10190 'div',
10191 { className: styles$83.Title },
10192 titleContent
10193 );
10194}
10195var SkeletongBodyText$1 = withAppProvider()(SkeletonPage);
10196
10197var styles$84 = {
10198 "ProgressBar": "p_tq",
10199 "sizeExtraSmall": "p_wb",
10200 "sizeSmall": "p_wc",
10201 "sizeMedium": "p_ra",
10202 "sizeLarge": "p_ql",
10203 "Indicator": "p_bi",
10204 "fillup": "p_jw",
10205 "Progress": "p_gm",
10206 "Label": "p_ns",
10207};
10208
10209function ProgressBar$1({ progress = 0, size = 'medium', polaris: { intl } }) {
10210 const className = classNames$1(styles$84.ProgressBar, size && styles$84[variationName$1('size', size)]);
10211 const warningMessage = intl.translate(progress < 0 ? 'Polaris.ProgressBar.negativeWarningMessage' : 'Polaris.ProgressBar.exceedWarningMessage', { progress });
10212 const parsedProgress = parseProgress(progress, warningMessage);
10213 return createElement(
10214 'div',
10215 { className: className },
10216 createElement('progress', { className: styles$84.Progress, value: parsedProgress, max: '100' }),
10217 createElement(
10218 'div',
10219 { className: styles$84.Indicator, style: { width: `${parsedProgress}%` } },
10220 createElement(
10221 'span',
10222 { className: styles$84.Label },
10223 parsedProgress,
10224 '%'
10225 )
10226 )
10227 );
10228}
10229function parseProgress(progress, warningMessage) {
10230 let progressWidth;
10231 if (progress < 0) {
10232 if (process.env.NODE_ENV === 'development') {
10233 // eslint-disable-next-line no-console
10234 console.warn(warningMessage);
10235 }
10236 progressWidth = 0;
10237 } else if (progress > 100) {
10238 if (process.env.NODE_ENV === 'development') {
10239 // eslint-disable-next-line no-console
10240 console.warn(warningMessage);
10241 }
10242 progressWidth = 100;
10243 } else {
10244 progressWidth = progress;
10245 }
10246 return progressWidth;
10247}
10248var ProgressBar$2 = withAppProvider()(ProgressBar$1);
10249
10250var styles$85 = {
10251 "DataTable": "p_em",
10252 "collapsed": "p_tg",
10253 "Table": "p_xo",
10254 "Navigation": "p_ce",
10255 "hasFooter": "p_lu",
10256 "ScrollContainer": "p_ws",
10257 "Pip": "p_it",
10258 "Pip-visible": "p_yb",
10259 "TableFoot": "p_a5",
10260 "Cell": "p_i1",
10261 "Cell-numeric": "p_fl",
10262 "Cell-fixed": "p_yp",
10263 "Cell-header": "p_h8",
10264 "Cell-truncated": "p_vx",
10265 "Cell-presentational": "p_ep",
10266 "Cell-sortable": "p_zh",
10267 "Heading": "p_pf",
10268 "Heading-left": "p_jr",
10269 "Heading-sortable": "p_fu",
10270 "Cell-total": "p_ej",
10271 "Cell-footer": "p_b8",
10272};
10273
10274function Cell$3({ height, content, contentType, fixed, truncate, presentational, header, total, footer, sorted, sortable, sortDirection, defaultSortDirection, polaris: { intl: { translate } }, onSort }) {
10275 const numeric = contentType === 'numeric';
10276 const className = classNames$1(styles$85.Cell, fixed && styles$85['Cell-fixed'], truncate && styles$85['Cell-truncated'], presentational && styles$85['Cell-presentational'], header && styles$85['Cell-header'], total && styles$85['Cell-total'], footer && styles$85['Cell-footer'], numeric && styles$85['Cell-numeric'], sorted && styles$85['Cell-sorted'], sortable && styles$85['Cell-sortable']);
10277 const style = height ? { height: `${height}px` } : undefined;
10278 const headerClassName = classNames$1(header && styles$85.Heading, header && contentType === 'text' && styles$85['Heading-left']);
10279 const iconClassName = classNames$1(sortable && styles$85['Heading-sortable']);
10280 // TODO work out a better way for fix this lint violation
10281 const presentationalMarkup = header ?
10282 // eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role
10283 createElement('th', { 'aria-hidden': true, role: 'presentation', className: className, style: style }) :
10284 // eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role
10285 createElement('td', { 'aria-hidden': true, role: 'presentation', className: className, style: style });
10286 let sortedIconMarkup = null;
10287 let sortableIconMarkup = null;
10288 let sortAccessibilityLabel;
10289 if (sortable) {
10290 // i18n string variable
10291 sortAccessibilityLabel = translate('Polaris.DataTable.sortAccessibilityLabel', { content: content.toLowerCase() });
10292 if (sorted) {
10293 const direction = sortDirection === 'ascending' ? 'Up' : 'Down';
10294 const source = `caret${direction}`;
10295 sortedIconMarkup = createElement(Icon$2, { source: source });
10296 } else {
10297 const direction = defaultSortDirection === 'ascending' ? 'Up' : 'Down';
10298 const source = `caret${direction}`;
10299 sortableIconMarkup = createElement(Icon$2, { source: source });
10300 }
10301 }
10302 const sortableHeadingContent = contentType === 'text' ? createElement(
10303 'span',
10304 { className: headerClassName },
10305 content,
10306 createElement(
10307 'span',
10308 { className: iconClassName },
10309 sortableIconMarkup
10310 ),
10311 createElement(
10312 'span',
10313 null,
10314 sortedIconMarkup
10315 )
10316 ) : createElement(
10317 'span',
10318 { className: headerClassName },
10319 createElement(
10320 'span',
10321 { className: iconClassName },
10322 sortableIconMarkup
10323 ),
10324 createElement(
10325 'span',
10326 null,
10327 sortedIconMarkup
10328 ),
10329 content
10330 );
10331 const columnHeadingContent = sortable ? sortableHeadingContent : content;
10332 const sortProps = sortable ? {
10333 role: 'button',
10334 onClick: onSort,
10335 onKeyDown: onKeyDownEnter(onSort),
10336 'aria-sort': sortDirection,
10337 'aria-label': sortAccessibilityLabel,
10338 tabIndex: 0
10339 } : { 'aria-disabled': true };
10340 const headingMarkup = header ? createElement(
10341 'th',
10342 Object.assign({ className: className, scope: 'col', style: style }, sortProps),
10343 columnHeadingContent
10344 ) : createElement(
10345 'th',
10346 { className: className, scope: 'row', style: style },
10347 content
10348 );
10349 const title = truncate ? content : '';
10350 const nonPresentationalMarkup = header || fixed ? headingMarkup : createElement(
10351 'td',
10352 { className: className, style: style, title: title },
10353 content
10354 );
10355 const cellMarkup = presentational ? presentationalMarkup : nonPresentationalMarkup;
10356 return cellMarkup;
10357}
10358function onKeyDownEnter(sortFunc) {
10359 return function handleKeyPress(event) {
10360 const { keyCode } = event;
10361 if (keyCode === 13 && sortFunc !== undefined) {
10362 sortFunc();
10363 }
10364 };
10365}
10366var Cell$4 = withAppProvider()(Cell$3);
10367
10368class DataTable$3 extends PureComponent {
10369 constructor(props) {
10370 super(props);
10371 this.state = {
10372 collapsed: false,
10373 columnVisibilityData: [],
10374 sorted: this.props.sortable && this.props.sortable.length > 0,
10375 heights: [],
10376 preservedScrollPosition: {}
10377 };
10378 const { polaris: { intl: { translate } } } = props;
10379 this.totalsRowHeading = translate('Polaris.DataTable.totalsRowHeading');
10380 }
10381 componentDidMount() {
10382 // We need to defer the calculation in development so the styles have time to be injected.
10383 if (process.env.NODE_ENV === 'development') {
10384 setTimeout(() => {
10385 this.handleResize();
10386 }, 10);
10387 } else {
10388 this.handleResize();
10389 }
10390 }
10391 render() {
10392 const { headings, totals, rows, truncate, footerContent, sortable, defaultSortDirection = 'ascending', initialSortColumnIndex = 0 } = this.props;
10393 const { collapsed, heights, sortedColumnIndex = initialSortColumnIndex, sortDirection = defaultSortDirection } = this.state;
10394 const className = classNames$1(styles$85.DataTable, collapsed && styles$85.collapsed, footerContent && styles$85.hasFooter);
10395 const wrapperClassName = classNames$1(styles$85.TableWrapper, collapsed && styles$85.collapsed);
10396 const footerClassName = classNames$1(footerContent && styles$85.TableFoot);
10397 const footerMarkup = footerContent ? createElement(
10398 'tfoot',
10399 { className: footerClassName },
10400 createElement(
10401 'tr',
10402 null,
10403 this.renderFooter()
10404 )
10405 ) : null;
10406 const totalsMarkup = totals ? createElement(
10407 'tr',
10408 null,
10409 insertPresentationalCell(totals).map(this.renderTotals)
10410 ) : null;
10411 const headingMarkup = createElement(
10412 'tr',
10413 null,
10414 insertPresentationalCell(headings).map((heading, headingIndex) => {
10415 let sortableHeadingProps = {};
10416 const id = `heading-cell-${headingIndex}`;
10417 // we account for the presentational heading cell’s index when
10418 // accessing elements from arrays passed as props and when comparing
10419 // a heading index with the sorted column’s index
10420 const index = headingIndex <= 1 ? headingIndex : headingIndex - 1;
10421 const contentTypes = this.getContentTypes();
10422 if (sortable) {
10423 const isSortable = sortable[index];
10424 const isSorted = isSortable && sortedColumnIndex === index;
10425 const direction = isSorted && sortedColumnIndex === index ? sortDirection : 'none';
10426 sortableHeadingProps = {
10427 defaultSortDirection,
10428 sorted: isSorted,
10429 sortable: isSortable,
10430 sortDirection: direction,
10431 onSort: this.defaultOnSort(index)
10432 };
10433 }
10434 const height = !truncate ? heights[0] : undefined;
10435 return createElement(Cell$4, Object.assign({ header: true, key: id, height: height, content: heading, contentType: contentTypes[headingIndex], fixed: headingIndex === 0, truncate: truncate, presentational: headingIndex === 1 }, sortableHeadingProps));
10436 })
10437 );
10438 const bodyMarkup = rows.map(this.defaultRenderRow);
10439 const style = footerContent ? { marginBottom: `${heights[heights.length - 1]}px` } : {};
10440 return createElement(
10441 'div',
10442 { className: wrapperClassName },
10443 createElement(
10444 'div',
10445 { className: className, ref: this.setDataTable },
10446 createElement(
10447 'div',
10448 { className: styles$85.ScrollContainer, ref: this.setScrollContainer, style: style },
10449 createElement(EventListener$1, { event: 'resize', handler: this.handleResize }),
10450 createElement(EventListener$1, { capture: true, event: 'scroll', handler: this.scrollListener }),
10451 createElement(
10452 'table',
10453 { className: styles$85.Table, ref: this.setTable },
10454 createElement(
10455 'thead',
10456 null,
10457 headingMarkup,
10458 totalsMarkup
10459 ),
10460 createElement(
10461 'tbody',
10462 null,
10463 bodyMarkup
10464 ),
10465 footerMarkup
10466 )
10467 )
10468 )
10469 );
10470 }
10471 setDataTable(dataTable) {
10472 this.dataTable = dataTable;
10473 }
10474 setScrollContainer(scrollContainer) {
10475 this.scrollContainer = scrollContainer;
10476 }
10477 setTable(table) {
10478 this.table = table;
10479 }
10480 handleResize() {
10481 const { footerContent, truncate } = this.props;
10482 const collapsed = this.table.scrollWidth > this.dataTable.offsetWidth;
10483 this.scrollContainer.scrollLeft = 0;
10484 this.setState(Object.assign({ collapsed, heights: [] }, this.calculateColumnVisibilityData(collapsed)), () => {
10485 if (footerContent || !truncate) {
10486 this.setHeightsAndScrollPosition();
10487 }
10488 });
10489 }
10490 tallestCellHeights() {
10491 const { footerContent, truncate } = this.props;
10492 const rows = Array.from(this.table.getElementsByTagName('tr'));
10493 let { heights } = this.state;
10494 if (!truncate) {
10495 return heights = rows.map(row => {
10496 const fixedCell = row.childNodes[0];
10497 return Math.max(row.clientHeight, fixedCell.clientHeight);
10498 });
10499 }
10500 if (footerContent) {
10501 const footerCellHeight = rows[rows.length - 1].childNodes[0].clientHeight;
10502 heights = [footerCellHeight];
10503 }
10504 return heights;
10505 }
10506 resetScrollPosition() {
10507 const { preservedScrollPosition: { left, top } } = this.state;
10508 if (left) {
10509 this.scrollContainer.scrollLeft = left;
10510 }
10511 if (top) {
10512 window.scrollTo(0, top);
10513 }
10514 }
10515 setHeightsAndScrollPosition() {
10516 this.setState({ heights: this.tallestCellHeights() }, this.resetScrollPosition);
10517 }
10518 calculateColumnVisibilityData(collapsed) {
10519 if (collapsed) {
10520 const headerCells = this.table.querySelectorAll('[class*=header]');
10521 const collapsedHeaderCells = Array.from(headerCells).slice(2);
10522 const fixedColumnWidth = headerCells[0].offsetWidth;
10523 const tableData = {
10524 fixedColumnWidth,
10525 firstVisibleColumnIndex: collapsedHeaderCells.length - 1,
10526 tableLeftVisibleEdge: this.scrollContainer.scrollLeft,
10527 tableRightVisibleEdge: this.scrollContainer.scrollLeft + (this.dataTable.offsetWidth - fixedColumnWidth)
10528 };
10529 const columnVisibilityData = collapsedHeaderCells.map(measureColumn$1(tableData));
10530 return Object.assign({ columnVisibilityData }, getPrevAndCurrentColumns$1(tableData, columnVisibilityData));
10531 }
10532 return {
10533 columnVisibilityData: [],
10534 previousColumn: undefined,
10535 currentColumn: undefined
10536 };
10537 }
10538 scrollListener() {
10539 this.setState(Object.assign({}, this.calculateColumnVisibilityData(this.state.collapsed)));
10540 }
10541 getContentTypes() {
10542 const { columnContentTypes } = this.props;
10543 const fixedCellType = columnContentTypes[0];
10544 return [fixedCellType, ...columnContentTypes];
10545 }
10546 renderFirstTwoTotalsCells(index) {
10547 let height;
10548 const id = `totals-cell-${index}`;
10549 const { heights } = this.state;
10550 const { truncate = false } = this.props;
10551 if (!truncate) {
10552 height = heights[1];
10553 }
10554 if (index === 0) {
10555 return createElement(Cell$4, { fixed: true, total: true, key: id, height: height, content: this.totalsRowHeading, truncate: truncate });
10556 }
10557 if (index === 1) {
10558 return createElement(Cell$4, { key: id, presentational: true, height: height });
10559 }
10560 return createElement(Cell$4, { total: true, key: id, contentType: 'numeric', height: height });
10561 }
10562 renderTotals(total, index) {
10563 let height;
10564 const id = `totals-cell-${index}`;
10565 const { heights } = this.state;
10566 const { truncate = false } = this.props;
10567 if (!truncate) {
10568 height = heights[1];
10569 }
10570 return total === '' ? this.renderFirstTwoTotalsCells(index) : createElement(Cell$4, { total: true, key: id, height: height, contentType: 'numeric', content: total });
10571 }
10572 defaultRenderRow(row, index) {
10573 const className = classNames$1(styles$85.TableRow);
10574 const contentTypes = this.getContentTypes();
10575 const { totals, footerContent, truncate = false } = this.props;
10576 const { heights } = this.state;
10577 const bodyCellHeights = totals ? heights.slice(2) : heights.slice(1);
10578 if (footerContent) {
10579 bodyCellHeights.pop();
10580 }
10581 return createElement(
10582 'tr',
10583 { key: `row-${index}`, className: className },
10584 insertPresentationalCell(row).map((content, cellIndex) => {
10585 const id = `cell-${cellIndex}-row-${index}`;
10586 return createElement(Cell$4, { key: id, height: bodyCellHeights[index], content: content, contentType: contentTypes[cellIndex], fixed: cellIndex === 0, truncate: truncate, presentational: cellIndex === 1 });
10587 })
10588 );
10589 }
10590 renderFooter() {
10591 const { heights } = this.state;
10592 const footerCellHeight = heights[heights.length - 1];
10593 return createElement(Cell$4, { footer: true, height: footerCellHeight, content: this.props.footerContent, truncate: this.props.truncate });
10594 }
10595 defaultOnSort(headingIndex) {
10596 const { onSort, truncate, defaultSortDirection = 'ascending', initialSortColumnIndex } = this.props;
10597 const { sortDirection, sortedColumnIndex = initialSortColumnIndex } = this.state;
10598 let newSortDirection = defaultSortDirection;
10599 if (sortedColumnIndex === headingIndex) {
10600 newSortDirection = sortDirection === 'ascending' ? 'descending' : 'ascending';
10601 }
10602 const handleSort = () => {
10603 this.setState({
10604 sorted: true,
10605 sortDirection: newSortDirection,
10606 sortedColumnIndex: headingIndex
10607 }, () => {
10608 if (onSort) {
10609 onSort(headingIndex, newSortDirection);
10610 if (!truncate) {
10611 const preservedScrollPosition = {
10612 left: this.scrollContainer.scrollLeft,
10613 top: window.scrollY
10614 };
10615 this.setState({ preservedScrollPosition });
10616 this.handleResize();
10617 }
10618 }
10619 });
10620 };
10621 return handleSort;
10622 }
10623}
10624__decorate([autobind], DataTable$3.prototype, "setDataTable", null);
10625__decorate([autobind], DataTable$3.prototype, "setScrollContainer", null);
10626__decorate([autobind], DataTable$3.prototype, "setTable", null);
10627__decorate([autobind, debounce()], DataTable$3.prototype, "handleResize", null);
10628__decorate([autobind], DataTable$3.prototype, "tallestCellHeights", null);
10629__decorate([autobind], DataTable$3.prototype, "resetScrollPosition", null);
10630__decorate([autobind], DataTable$3.prototype, "setHeightsAndScrollPosition", null);
10631__decorate([autobind], DataTable$3.prototype, "calculateColumnVisibilityData", null);
10632__decorate([autobind], DataTable$3.prototype, "scrollListener", null);
10633__decorate([autobind
10634// function is never called
10635// private navigateTable(direction: string) {
10636// const {scrollContainer} = this;
10637// const {currentColumn, previousColumn} = this.state;
10638//
10639// const handleScroll = () => {
10640// if (direction === 'right' && currentColumn) {
10641// scrollContainer.scrollLeft = currentColumn.rightEdge;
10642// } else if (previousColumn) {
10643// scrollContainer.scrollLeft =
10644// previousColumn.leftEdge < 10 ? 0 : previousColumn.leftEdge;
10645// }
10646//
10647// requestAnimationFrame(() => {
10648// this.setState({
10649// ...this.calculateColumnVisibilityData(this.state.collapsed),
10650// });
10651// });
10652// };
10653//
10654// return handleScroll;
10655// }
10656
10657, autobind], DataTable$3.prototype, "getContentTypes", null);
10658__decorate([autobind], DataTable$3.prototype, "renderFirstTwoTotalsCells", null);
10659__decorate([autobind], DataTable$3.prototype, "renderTotals", null);
10660__decorate([autobind], DataTable$3.prototype, "defaultRenderRow", null);
10661__decorate([autobind], DataTable$3.prototype, "renderFooter", null);
10662__decorate([autobind], DataTable$3.prototype, "defaultOnSort", null);
10663function insertPresentationalCell(arr = []) {
10664 const fixedCell = arr[0];
10665 const presentationalCell = '';
10666 return [fixedCell, presentationalCell, ...arr.slice(1)];
10667}
10668function measureColumn$1(tableData) {
10669 return function (column, index) {
10670 const { tableLeftVisibleEdge, tableRightVisibleEdge, firstVisibleColumnIndex, fixedColumnWidth } = tableData;
10671 const width = column.offsetWidth;
10672 const leftEdge = column.offsetLeft - fixedColumnWidth;
10673 const rightEdge = leftEdge + width;
10674 const leftEdgeIsVisible = isEdgeVisible$1(leftEdge, tableLeftVisibleEdge, tableRightVisibleEdge);
10675 const rightEdgeIsVisible = isEdgeVisible$1(rightEdge, tableLeftVisibleEdge, tableRightVisibleEdge);
10676 const isCompletelyVisible = leftEdge < tableLeftVisibleEdge && rightEdge > tableRightVisibleEdge;
10677 const isVisible = isCompletelyVisible || leftEdgeIsVisible || rightEdgeIsVisible;
10678 if (isVisible) {
10679 tableData.firstVisibleColumnIndex = Math.min(firstVisibleColumnIndex, index);
10680 }
10681 return { leftEdge, rightEdge, isVisible };
10682 };
10683}
10684function isEdgeVisible$1(target$$1, start, end) {
10685 const minVisiblePixels = 30;
10686 return target$$1 >= start + minVisiblePixels && target$$1 <= end - minVisiblePixels;
10687}
10688function getPrevAndCurrentColumns$1(tableData, columnData) {
10689 const { tableRightVisibleEdge, tableLeftVisibleEdge, firstVisibleColumnIndex } = tableData;
10690 const previousColumnIndex = Math.max(firstVisibleColumnIndex - 1, 0);
10691 const previousColumn = columnData[previousColumnIndex];
10692 const lastColumnIndex = columnData.length - 1;
10693 const lastColumn = columnData[lastColumnIndex];
10694 const currentColumn = Object.assign({ isScrolledFarthestLeft: firstVisibleColumnIndex === 0 && tableLeftVisibleEdge === 0, isScrolledFarthestRight: lastColumn.rightEdge <= tableRightVisibleEdge }, columnData[firstVisibleColumnIndex]);
10695 return { previousColumn, currentColumn };
10696}
10697var MobileTable$1 = withAppProvider()(DataTable$3);
10698
10699export { handleMouseUpByBlurring, Keys, contentContextTypes, AccountConnection$1 as AccountConnection, ActionList$1 as ActionList, AppProvider$1 as AppProvider, polarisAppProviderContextTypes as polarisContextTypes, createPolarisContext, withAppProvider, Avatar$2 as Avatar, Badge$2 as Badge, Banner$1 as Banner, Breadcrumbs$1 as Breadcrumbs, Button$2 as Button, buttonFrom, buttonsFrom, ButtonGroup$1 as ButtonGroup, CalloutCard$1 as CalloutCard, Caption$1 as Caption, Card$1 as Card, Checkbox$2 as Checkbox, ChoiceList$2 as ChoiceList, Collapsible$2 as Collapsible, ColorPicker$1 as ColorPicker, rgbToHex, rgbToHsb, hsbToRgb, hsbToHex, rgbString, rgbaString, Connected$1 as Connected, DataField$1 as DataField, DataTable$2 as DataTable, DatePreference$1 as DatePreference, DatePicker$2 as DatePicker, DescriptionList$1 as DescriptionList, DisplayText$1 as DisplayText, DropZone$2 as DropZone, EmptySearchResult$2 as EmptySearchResult, EmptyState$1 as EmptyState, EventListener$1 as EventListener, ExceptionList$1 as ExceptionList, FilterControl$2 as FilterControl, Focus$1 as Focus, TrapFocus, FooterHelp$1 as FooterHelp, Form$1 as Form, FormLayout$1 as FormLayout, Heading$1 as Heading, Hide$1 as Hide, Icon$2 as Icon, Image$1 as Image, InlineError$1 as InlineError, InlineValidation$1 as InlineValidation, Indicator$1 as Indicator, KeyboardKey$1 as KeyboardKey, KeypressListener$1 as KeypressListener, Label$1 as Label, Labelled$1 as Labelled, Layout$1 as Layout, Link$2 as Link, ContentList as List, Media$1 as Media, Modal$3 as Modal, OptionList$2 as OptionList, Page$2 as Page, PageActions$1 as PageActions, Pagination$2 as Pagination, Popover$1 as Popover, CloseSource as PopoverCloseSource, Portal$1 as Portal, RadioButton$1 as RadioButton, RangeSlider$2 as RangeSlider, ResourceList$2 as ResourceList, FilterType, Scrollable$2 as Scrollable, Select$1 as Select, SettingToggle$1 as SettingToggle, Spacing$1 as Spacing, Spinner$2 as Spinner, Stack$1 as Stack, Sticky$1 as Sticky, Subheading$1 as Subheading, Tabs$1 as Tabs, Tag$2 as Tag, TextContainer$1 as TextContainer, TextField$1 as TextField, TextStyle$1 as TextStyle, Thumbnail$1 as Thumbnail, Tooltip$1 as Tooltip, Truncate$1 as Truncate, UnstyledLink$2 as UnstyledLink, VisuallyHidden$1 as VisuallyHidden, SkeletongBodyText$1 as SkeletonPage, SkeletonBodyText$1 as SkeletonBodyText, SkeletonDisplayText$1 as SkeletonDisplayText, ProgressBar$2 as ProgressBar, withContext$1 as withContext, withRef$1 as withRef, MobileTable$1 as MobileTable };
10700export { Months } from '@shopify/javascript-utilities/dates';