@deskpro/deskpro-ui 3.0.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Drilldown/Drilldown.js +91 -38
- package/dist/cjs/components/Drilldown/Drilldown.js.map +1 -1
- package/dist/cjs/components/Drilldown/DrilldownResetButton.js +1 -1
- package/dist/cjs/components/Drilldown/DrilldownResetButton.js.map +1 -1
- package/dist/cjs/components/Drilldown/index.js +3 -3
- package/dist/cjs/components/Drilldown/index.js.map +1 -1
- package/dist/cjs/components/Drilldown/storyDataFlat.js +1108 -0
- package/dist/cjs/components/Drilldown/storyDataFlat.js.map +1 -0
- package/dist/cjs/components/Drilldown/{storyData.js → storyDataTree.js} +3 -3
- package/dist/cjs/components/Drilldown/storyDataTree.js.map +1 -0
- package/dist/cjs/components/Drilldown/styles.js +3 -2
- package/dist/cjs/components/Drilldown/styles.js.map +1 -1
- package/dist/cjs/components/Drilldown/types.js +33 -3
- package/dist/cjs/components/Drilldown/types.js.map +1 -1
- package/dist/cjs/components/Drilldown/useUpdateItems.js +42 -13
- package/dist/cjs/components/Drilldown/useUpdateItems.js.map +1 -1
- package/dist/cjs/components/Drilldown/utility.js +46 -15
- package/dist/cjs/components/Drilldown/utility.js.map +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.js +9 -9
- package/dist/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/LabelTag/TagCircle.js +1 -3
- package/dist/cjs/components/LabelTag/TagCircle.js.map +1 -1
- package/dist/cjs/components/Popover/Popover.js +6 -0
- package/dist/cjs/components/Popover/Popover.js.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/deskpro-ui.d.ts +463 -0
- package/dist/esm/components/Drilldown/Drilldown.js +93 -40
- package/dist/esm/components/Drilldown/Drilldown.js.map +1 -1
- package/dist/esm/components/Drilldown/DrilldownResetButton.js +1 -1
- package/dist/esm/components/Drilldown/DrilldownResetButton.js.map +1 -1
- package/dist/esm/components/Drilldown/index.js +2 -2
- package/dist/esm/components/Drilldown/index.js.map +1 -1
- package/dist/esm/components/Drilldown/storyDataFlat.js +1105 -0
- package/dist/esm/components/Drilldown/storyDataFlat.js.map +1 -0
- package/dist/esm/components/Drilldown/{storyData.js → storyDataTree.js} +3 -3
- package/dist/esm/components/Drilldown/storyDataTree.js.map +1 -0
- package/dist/esm/components/Drilldown/styles.js +3 -2
- package/dist/esm/components/Drilldown/styles.js.map +1 -1
- package/dist/esm/components/Drilldown/types.js +23 -1
- package/dist/esm/components/Drilldown/types.js.map +1 -1
- package/dist/esm/components/Drilldown/useUpdateItems.js +42 -14
- package/dist/esm/components/Drilldown/useUpdateItems.js.map +1 -1
- package/dist/esm/components/Drilldown/utility.js +40 -11
- package/dist/esm/components/Drilldown/utility.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js +9 -9
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/LabelTag/TagCircle.js +2 -4
- package/dist/esm/components/LabelTag/TagCircle.js.map +1 -1
- package/dist/esm/components/Popover/Popover.js +6 -0
- package/dist/esm/components/Popover/Popover.js.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/Drilldown/storyData.js.map +0 -1
- package/dist/esm/components/Drilldown/storyData.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagCircle.js","sourceRoot":"","sources":["../../../../src/components/LabelTag/TagCircle.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,yDAAqD;AACrD,kCAAwC;AAGxC,
|
|
1
|
+
{"version":3,"file":"TagCircle.js","sourceRoot":"","sources":["../../../../src/components/LabelTag/TagCircle.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,yDAAqD;AACrD,kCAAwC;AAGxC,8CAAsC;AACtC,+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AC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACtF,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE1D,IAAI,aAAa,GAAG,SAAS,CAAC;IAC9B,IAAI,IAAI,IAAI,EAAE;QAAE,aAAa,GAAG,UAAU,CAAC;IAE3C,IAAI,KAAK,EAAE;QACT,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;QAC1E,kBAAkB,GAAG,WAAW,CAAC;QACjC,sBAAsB,GAAG,eAAe,CAAC;KAC1C;SAAM;QACL,MAAM,YAAY,GAAG,IAAA,oCAAmB,EAAC,SAAS,CAAC,CAAC;QACpD,kBAAkB,GAAG,YAAY,CAAC,WAAW,CAAC;QAC9C,sBAAsB,GAAG,YAAY,CAAC,eAAe,CAAC;KACvD;IAED,OAAO,CACL,oBAAC,qBAAqB,IACpB,KAAK,EAAE,IAAI,EACX,eAAe,EAAE,sBAAsB,EACvC,WAAW,EAAE,kBAAkB,EAC/B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,IAEnB,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,CACX,oBAAC,kBAAK,IAAC,QAAQ,EAAC,UAAU,EAAC,IAAI,EAAC,KAAK,IAClC,aAAa,CACR,CACT,CAAC,CAAC,CAAC,CACF,oBAAC,kBAAK,IAAC,IAAI,EAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,IACjC,aAAa,CACR,CACT,CACqB,CACzB,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,eAAe,mBAyC1B"}
|
|
@@ -157,6 +157,12 @@ function useCloseOnClickOutside({ popperElement, referenceElement, onRequestClos
|
|
|
157
157
|
function handler(e) {
|
|
158
158
|
if (!(e.target instanceof HTMLElement || e.target instanceof SVGElement))
|
|
159
159
|
return;
|
|
160
|
+
if (e.target !== document.body &&
|
|
161
|
+
e.target !== document.querySelector("html") &&
|
|
162
|
+
!document.body.contains(e.target) &&
|
|
163
|
+
clickable) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
160
166
|
if (popperElement === e.target || (popperElement && popperElement.contains(e.target))) {
|
|
161
167
|
if (clickable) {
|
|
162
168
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,iCAAoG;AAUpG,+CAAyC;AACzC,iDAAqE;AACrE,yDAAuC;AAEvC,sCAAmC;AA6DnC,MAAM,sBAAsB,GAAG,2BAAM,CAAC,IAAI,CAAA;;CAEzC,CAAC;AAEF,MAAM,uBAAuB,GAAG,IAAA,2BAAM,EAAC,sBAAM,CAAC,GAAG,CAAC,CAAuB;aAC5D,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;CACpE,CAAC;AAEF;;;GAGG;AACH,SAAgB,OAAO,CAAC,KAAmB;IACzC,MAAM,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,GAAG,MAAM,EAClB,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,QAAQ,EACR,eAAe,GAAG,OAAO,EACzB,cAAc,EACd,SAAS,GAAG,IAAI,EAChB,SAAS,EACT,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,GACN,GAAG,KAAK,CAAC;IAEV,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,WAAW,CAAC;IAE7C,IAAA,iBAAS,EAAC,GA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C9E,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CACpB,cAAwC,EACxC,SAA4C;IAE5C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,SAAS,OAAO,CAAC,KAAoB;YACnC,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;gBAC1B,cAAc,aAAd,cAAc,uBAAd,cAAc,EAAI,CAAC;gBACnB,SAAS,CAAC,KAAK,CAAC,CAAC;aAClB;QACH,CAAC;QAED,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -24,6 +24,7 @@ __exportStar(require("./CCUserTag"), exports);
|
|
|
24
24
|
__exportStar(require("./Checkbox"), exports);
|
|
25
25
|
__exportStar(require("./Dialog"), exports);
|
|
26
26
|
__exportStar(require("./Divider"), exports);
|
|
27
|
+
__exportStar(require("./Drilldown"), exports);
|
|
27
28
|
__exportStar(require("./Dropdown"), exports);
|
|
28
29
|
__exportStar(require("./Formik"), exports);
|
|
29
30
|
__exportStar(require("./Icon"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B;AAC9B,yCAAuB;AACvB,8CAA4B;AAC5B,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,iDAA+B;AAC/B,yCAAuB;AACvB,0CAAwB;AACxB,kDAAgC;AAChC,8CAA4B;AAC5B,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B;AAC9B,yCAAuB;AACvB,8CAA4B;AAC5B,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,8CAA4B;AAC5B,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,iDAA+B;AAC/B,yCAAuB;AACvB,0CAAwB;AACxB,kDAAgC;AAChC,8CAA4B;AAC5B,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B"}
|
package/dist/deskpro-ui.d.ts
CHANGED
|
@@ -1697,6 +1697,449 @@ export declare interface DividerProps {
|
|
|
1697
1697
|
|
|
1698
1698
|
declare type DpCustomIconsId = "active-call" | "admin" | "advanced-filter" | "agent" | "api" | "apps-zapier" | "arrow" | "column-width" | "community" | "crown" | "deskpro" | "dot" | "drag" | "dual-view" | "email-primary" | "enter" | "export-alt" | "export" | "follow-up" | "glossary" | "google-analytics" | "grip" | "hang-up" | "helping-hand" | "im-outline" | "im-send" | "im" | "inbound-call" | "kanban-view" | "level-down" | "linked-ticket" | "location-arrow" | "merge" | "merge2" | "missed-call" | "mobile-rotate" | "organization-circle" | "outbound-call" | "read" | "record" | "sent" | "sip-address" | "sort" | "transfer-queue" | "triangle" | "warm-add" | "warm-transfer" | "webhook";
|
|
1699
1699
|
|
|
1700
|
+
/**
|
|
1701
|
+
* Wraps around any child to upgrade it to a drilldown component. If used in the
|
|
1702
|
+
* render props style you get access to some of the internal state of the drilldown
|
|
1703
|
+
* including the input props used for search
|
|
1704
|
+
* @public
|
|
1705
|
+
* @example
|
|
1706
|
+
* ```
|
|
1707
|
+
* const options = [
|
|
1708
|
+
* {type: "header", label: "Header"},
|
|
1709
|
+
* {type: "value", key: "1", label: "Value"}
|
|
1710
|
+
* ];
|
|
1711
|
+
*
|
|
1712
|
+
* function handleOnSelect(value: DrilldownValueType) {}
|
|
1713
|
+
*
|
|
1714
|
+
* // as children
|
|
1715
|
+
* <Drilldown options={options} onSelectOption={handleOnSelect}>
|
|
1716
|
+
* <button>click here</button>
|
|
1717
|
+
* </Drilldown>
|
|
1718
|
+
*
|
|
1719
|
+
* // as render props with controlled input
|
|
1720
|
+
* <Drilldown options={options} onSelectOption={handleOnSelect}>
|
|
1721
|
+
* {({searchInputProps}) =>
|
|
1722
|
+
* <input {...searchInputProps}/>
|
|
1723
|
+
* }
|
|
1724
|
+
* </Drilldown>
|
|
1725
|
+
* ```
|
|
1726
|
+
*/
|
|
1727
|
+
export declare function Drilldown<T, TargetRef extends HTMLElement = any>({ type, children, options, inputValue, searchPlaceholder, placement, showInternalSearch, isLoading, usePortal, closeOnSelect, isOpen: isOpenProp, renderCreateNewOption, hideIcons, iconColumnWidth, containerWidth, containerHeight, onSelectOption, onInputChange, filterItemsCb, onFetchMore, onClear, onClose, onOpen, onInputReturn, tabProps, disabled, fetchMoreText, autoscrollText, externalLinkIcon, selectedIcon, layer, animationDuration, onDrilldown, onDrilldownAnimationEnd, onDrillupAnimationEnd, backText, }: DrilldownProps<T, TargetRef>): JSX.Element;
|
|
1728
|
+
|
|
1729
|
+
declare interface DrilldownBaseProps<T, TargetRef extends HTMLElement> {
|
|
1730
|
+
/** Event handler for when an option is selected */
|
|
1731
|
+
onSelectOption?: (item: DrilldownValueType<T>, keyPathToSelectedItem: string[]) => void;
|
|
1732
|
+
/** Event handler that it called when triggering a drilldown, before animation is run */
|
|
1733
|
+
onDrilldown?: (item: DrilldownValueType<T>, pathToSelectedItem: PathToSelectedItem) => Promise<void>;
|
|
1734
|
+
/** Control over whether the drilldown is open - default uncontrolled */
|
|
1735
|
+
isOpen?: boolean;
|
|
1736
|
+
/** PopperJS placement option. Defaults to "bottom-start" */
|
|
1737
|
+
placement?: Placement;
|
|
1738
|
+
/** Wether to render the drilldown in a portal. Default true */
|
|
1739
|
+
usePortal?: boolean;
|
|
1740
|
+
/** The input value to render in the search box */
|
|
1741
|
+
inputValue?: string;
|
|
1742
|
+
/** Show a loading indicator */
|
|
1743
|
+
isLoading?: boolean;
|
|
1744
|
+
/** Show an internal search input for filtering options. The Drilldown does not
|
|
1745
|
+
* do any filtering itself
|
|
1746
|
+
*/
|
|
1747
|
+
showInternalSearch?: boolean;
|
|
1748
|
+
/** Whether to disable the drilldown */
|
|
1749
|
+
disabled?: boolean;
|
|
1750
|
+
/** Whether subitems are rendered in an expanding or non-expanding style */
|
|
1751
|
+
expandingDrillDown?: boolean;
|
|
1752
|
+
/** Placeholder for search input box */
|
|
1753
|
+
searchPlaceholder?: string;
|
|
1754
|
+
/** Whether the drilldown should close on selections. default true */
|
|
1755
|
+
closeOnSelect?: boolean;
|
|
1756
|
+
/** Whether to hide item's icon for the whole list */
|
|
1757
|
+
hideIcons?: boolean;
|
|
1758
|
+
/** The width of the column in which icons are rendered */
|
|
1759
|
+
iconColumnWidth?: number;
|
|
1760
|
+
/** Add in custom width to the drilldown options container */
|
|
1761
|
+
containerWidth?: number;
|
|
1762
|
+
/** Add in custom height to the drilldown options container */
|
|
1763
|
+
containerHeight?: number;
|
|
1764
|
+
/** Event handler for when the user requests more options.
|
|
1765
|
+
* For use with paginated options */
|
|
1766
|
+
onFetchMore?: () => void;
|
|
1767
|
+
/** Event handler for when the drilldown closes */
|
|
1768
|
+
onClose?: () => void;
|
|
1769
|
+
/** Event handler for when the drilldown opens */
|
|
1770
|
+
onOpen?: () => void;
|
|
1771
|
+
/** The target for the drilldown. Either a normal ReactNode or a render
|
|
1772
|
+
* prop with additional state from the drilldown */
|
|
1773
|
+
children: ((props: DrilldownTargetProps<TargetRef>) => JSX.Element) | JSX.Element;
|
|
1774
|
+
/** Render the create new option - no default implementation and renders as a
|
|
1775
|
+
* sticky footer above the normal sticky footer
|
|
1776
|
+
*/
|
|
1777
|
+
onCreateNewOption?: () => void;
|
|
1778
|
+
renderCreateNewOption?: (active: boolean, onSelect: () => void) => ReactNode;
|
|
1779
|
+
/** Props for rendering tabs within the drilldown */
|
|
1780
|
+
tabProps?: DrilldownTabProps;
|
|
1781
|
+
/** The text to show for the fetch more button */
|
|
1782
|
+
fetchMoreText: ReactNode;
|
|
1783
|
+
/** The text to show for the autoscroll button */
|
|
1784
|
+
autoscrollText: ReactNode;
|
|
1785
|
+
externalLinkIcon: AnyIcon;
|
|
1786
|
+
selectedIcon: AnyIcon;
|
|
1787
|
+
/** Event handler that returns input value after enter has been pressed */
|
|
1788
|
+
onInputReturn?: (inputValue: string) => void;
|
|
1789
|
+
/** The zIndex Layer that the drilldown will be rendered at. Defaults to: popover */
|
|
1790
|
+
layer?: keyof Layers;
|
|
1791
|
+
/** the time it takes to animate sliding between lists. Defaults to 0.3s */
|
|
1792
|
+
animationDuration?: number;
|
|
1793
|
+
/** Event handler that it called when triggering a drillup, after animation was run */
|
|
1794
|
+
onDrillupAnimationEnd?: (pathToSelectedItem: PathToSelectedItem) => Promise<void>;
|
|
1795
|
+
/** The text to show for the back button */
|
|
1796
|
+
backText: ReactNode;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* @public
|
|
1801
|
+
*/
|
|
1802
|
+
export declare const DrilldownContainer: StyledComponent<ForwardRefComponent<HTMLDivElement, HTMLMotionProps<"div">>, DefaultTheme, {
|
|
1803
|
+
"data-dp-name": string;
|
|
1804
|
+
"data-dp-ident"?: string | undefined;
|
|
1805
|
+
} & {
|
|
1806
|
+
containerWidth?: number | undefined;
|
|
1807
|
+
containerHeight?: number | undefined;
|
|
1808
|
+
layer: keyof Layers;
|
|
1809
|
+
}, keyof {
|
|
1810
|
+
"data-dp-name": string;
|
|
1811
|
+
"data-dp-ident"?: string | undefined;
|
|
1812
|
+
}>;
|
|
1813
|
+
|
|
1814
|
+
/**
|
|
1815
|
+
* @public
|
|
1816
|
+
*/
|
|
1817
|
+
export declare const DrilldownCreateNewOption: ({ text, icon, onClick, resetButton, iconColor, active, }: DrilldownCreateNewOptionProps) => JSX.Element;
|
|
1818
|
+
|
|
1819
|
+
/**
|
|
1820
|
+
* @public
|
|
1821
|
+
*/
|
|
1822
|
+
export declare interface DrilldownCreateNewOptionProps {
|
|
1823
|
+
text?: ReactNode;
|
|
1824
|
+
icon: AnyIcon;
|
|
1825
|
+
onClick: () => void;
|
|
1826
|
+
resetButton?: boolean;
|
|
1827
|
+
iconColor?: ThemeColorKey;
|
|
1828
|
+
active: boolean;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* @public
|
|
1833
|
+
*/
|
|
1834
|
+
export declare interface DrilldownDivider {
|
|
1835
|
+
type: "divider";
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* @public
|
|
1840
|
+
*/
|
|
1841
|
+
declare interface DrilldownDividerFlat extends DrilldownDivider {
|
|
1842
|
+
/** Unique identifier for the parent option */
|
|
1843
|
+
parentKey: string | undefined;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
/**
|
|
1847
|
+
* @public
|
|
1848
|
+
*/
|
|
1849
|
+
export declare const DrilldownDividerItem: StyledComponent<"div", DefaultTheme, {}, never>;
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* @public
|
|
1853
|
+
* Pass in a component to render if the list is empty.
|
|
1854
|
+
* This will usually be a NonIdeal state, see storybook examples
|
|
1855
|
+
*/
|
|
1856
|
+
declare interface DrilldownEmptyList {
|
|
1857
|
+
type: "emptyList";
|
|
1858
|
+
component: ReactNode;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* @public
|
|
1863
|
+
*/
|
|
1864
|
+
declare interface DrilldownEmptyListFlat extends DrilldownEmptyList {
|
|
1865
|
+
/** Unique identifier for the parent option */
|
|
1866
|
+
parentKey: string | undefined;
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
/**
|
|
1870
|
+
* @public
|
|
1871
|
+
*/
|
|
1872
|
+
declare interface DrilldownFlatProps<T, TargetRef extends HTMLElement> extends DrilldownBaseProps<T, TargetRef> {
|
|
1873
|
+
/** Expects options to be a flat array of type DrilldownItemFlatType<T>[]. This is easier to work with if your response data is also returned as a flat array */
|
|
1874
|
+
type: "flat";
|
|
1875
|
+
/** List of options to render */
|
|
1876
|
+
options: DrilldownItemFlatType<T>[];
|
|
1877
|
+
/** Event handler for when the "active" item changes via keyboard events */
|
|
1878
|
+
onActiveOptionChange?: (item: DrilldownValueFlatType<T> | null) => void;
|
|
1879
|
+
/** Event handler for when the "clear" event is triggered for the search input */
|
|
1880
|
+
onClear?: () => void;
|
|
1881
|
+
/** Event handler for when an option is selected */
|
|
1882
|
+
/** Event handler for when the search input value changes */
|
|
1883
|
+
onInputChange?: (input: string, pathToSelectedItem: PathToSelectedItem) => void;
|
|
1884
|
+
/** Callback for filtering items. This is used on drillup to re-filter the parent list based on the input string */
|
|
1885
|
+
filterItemsCb?: (items: DrilldownItemFlatType<T>[], input: string, prevItemsKey: string | undefined) => DrilldownItemFlatType<T>[];
|
|
1886
|
+
/** Event handler that it called when triggering a drilldown, after animation was run */
|
|
1887
|
+
onDrilldownAnimationEnd?: (item: DrilldownValueFlatType<T> | undefined, pathToSelectedItem: PathToSelectedItem) => Promise<void>;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* @public
|
|
1892
|
+
*/
|
|
1893
|
+
declare interface DrilldownHeaderFlatType extends DrilldownHeaderType {
|
|
1894
|
+
/** Unique identifier for the parent option */
|
|
1895
|
+
parentKey: string | undefined;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* @public
|
|
1900
|
+
*/
|
|
1901
|
+
export declare const DrilldownHeaderItem: StyledComponent<"div", DefaultTheme, {}, never>;
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* @public
|
|
1905
|
+
*/
|
|
1906
|
+
export declare interface DrilldownHeaderType {
|
|
1907
|
+
type: "header";
|
|
1908
|
+
label: ReactNode;
|
|
1909
|
+
childLabels?: string[];
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* @public
|
|
1914
|
+
*/
|
|
1915
|
+
export declare const DrilldownInternalSearchInputContainer: StyledComponent<"div", DefaultTheme, {}, never>;
|
|
1916
|
+
|
|
1917
|
+
/**
|
|
1918
|
+
* @public
|
|
1919
|
+
*/
|
|
1920
|
+
export declare function DrilldownItem<T = unknown>({ value, active, onSelect, onSelectIcon, onClickSubItem, hideIcons, iconColumnWidth, selectedIcon, externalLinkIcon, handleDrilldown, dataKey, subItems, }: DrilldownItemProps<T>): JSX.Element;
|
|
1921
|
+
|
|
1922
|
+
/**
|
|
1923
|
+
* @public
|
|
1924
|
+
*/
|
|
1925
|
+
declare type DrilldownItemFlatType<T = unknown> = DrilldownValueFlatType<T> | DrilldownHeaderFlatType | DrilldownDividerFlat | DrilldownStickyHeaderFlat<T> | DrilldownStickyFooterFlat<T> | DrilldownEmptyListFlat | DrilldownLoadingFlat;
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* @public
|
|
1929
|
+
*/
|
|
1930
|
+
export declare interface DrilldownItemMeta {
|
|
1931
|
+
/** Whether to render as an "active" element */
|
|
1932
|
+
active: boolean;
|
|
1933
|
+
/** The current search input */
|
|
1934
|
+
input: string;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
/**
|
|
1938
|
+
* @public
|
|
1939
|
+
*/
|
|
1940
|
+
export declare interface DrilldownItemProps<T = unknown> {
|
|
1941
|
+
onSelect?: (value: DrilldownValueType<T>) => void;
|
|
1942
|
+
onSelectIcon?: (value: T) => void;
|
|
1943
|
+
onClickSubItem?: (value: DrilldownValueType<T>) => void;
|
|
1944
|
+
value: DrilldownValueType<T>;
|
|
1945
|
+
meta: DrilldownItemMeta;
|
|
1946
|
+
customLabelRender?: ReactNode;
|
|
1947
|
+
active?: boolean;
|
|
1948
|
+
hideIcons?: boolean;
|
|
1949
|
+
iconColumnWidth?: number;
|
|
1950
|
+
externalLinkIcon: AnyIcon;
|
|
1951
|
+
selectedIcon: AnyIcon;
|
|
1952
|
+
handleDrilldown: (item: DrilldownValueType<T>) => Promise<void>;
|
|
1953
|
+
dataKey: string;
|
|
1954
|
+
subItems: DrilldownItemType<T>[] | undefined;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
/**
|
|
1958
|
+
* @public
|
|
1959
|
+
*/
|
|
1960
|
+
declare type DrilldownItemTreeType<T = unknown> = DrilldownValueTreeType<T> | DrilldownHeaderType | DrilldownDivider | DrilldownStickyHeader<T> | DrilldownStickyFooter<T> | DrilldownEmptyList | DrilldownLoading;
|
|
1961
|
+
|
|
1962
|
+
/**
|
|
1963
|
+
* @public
|
|
1964
|
+
*/
|
|
1965
|
+
export declare type DrilldownItemType<T = unknown> = DrilldownItemTreeType<T> | DrilldownItemFlatType<T>;
|
|
1966
|
+
|
|
1967
|
+
/**
|
|
1968
|
+
* @public
|
|
1969
|
+
* Pass in a component to render if the list is loading.
|
|
1970
|
+
* This will usually be a <Spinner />, see storybook examples
|
|
1971
|
+
*/
|
|
1972
|
+
declare interface DrilldownLoading {
|
|
1973
|
+
type: "loading";
|
|
1974
|
+
component?: ReactNode;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* @public
|
|
1979
|
+
*/
|
|
1980
|
+
declare interface DrilldownLoadingFlat extends DrilldownLoading {
|
|
1981
|
+
/** Unique identifier for the parent option */
|
|
1982
|
+
parentKey: string | undefined;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
export declare type DrilldownProps<T, TargetRef extends HTMLElement> = DrilldownTreeProps<T, TargetRef> | DrilldownFlatProps<T, TargetRef>;
|
|
1986
|
+
|
|
1987
|
+
/**
|
|
1988
|
+
* @public
|
|
1989
|
+
*/
|
|
1990
|
+
export declare function drilldownRenderOptions<T = string>(options: DrilldownItemType<T>[], handleSelectOption: (value: DrilldownValueType<T>) => void, handleDrilldown: (item: DrilldownValueType<T>) => Promise<void>, handleBack: () => Promise<void>, activeItem: DrilldownValueType<T> | null, fetchMoreText: ReactNode, autoscrollText: ReactNode, selectedIcon: AnyIcon, externalLinkIcon: AnyIcon, hideIcons?: boolean, iconColumnWidth?: number): (value: DrilldownItemType<T>, index: number, array: DrilldownItemType<T>[]) => ReactNode;
|
|
1991
|
+
|
|
1992
|
+
/**
|
|
1993
|
+
* @public
|
|
1994
|
+
*/
|
|
1995
|
+
export declare const DrilldownResetButton: ({ onClick, buttonText, undoIcon, }: DrilldownResetButtonProps) => JSX.Element;
|
|
1996
|
+
|
|
1997
|
+
declare interface DrilldownResetButtonProps {
|
|
1998
|
+
onClick: () => void;
|
|
1999
|
+
buttonText: string;
|
|
2000
|
+
undoIcon: AnyIcon;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
/**
|
|
2004
|
+
* @public
|
|
2005
|
+
* List of options to render as sticky options at the foot of any of the normal options
|
|
2006
|
+
*/
|
|
2007
|
+
declare interface DrilldownStickyFooter<T> {
|
|
2008
|
+
type: "stickyFooter";
|
|
2009
|
+
options: DrilldownItemType<T>[];
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
/**
|
|
2013
|
+
* @public
|
|
2014
|
+
* List of options to render as sticky options at the foot of any of the normal options
|
|
2015
|
+
*/
|
|
2016
|
+
declare interface DrilldownStickyFooterFlat<T> {
|
|
2017
|
+
type: "stickyFooter";
|
|
2018
|
+
options: DrilldownItemFlatType<T>[];
|
|
2019
|
+
/** Unique identifier for the parent option */
|
|
2020
|
+
parentKey: string | undefined;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* @public
|
|
2025
|
+
* List of options to render as sticky options at the head of any of the normal options
|
|
2026
|
+
*/
|
|
2027
|
+
declare interface DrilldownStickyHeader<T> {
|
|
2028
|
+
type: "stickyHeader";
|
|
2029
|
+
options: DrilldownItemType<T>[];
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* @public
|
|
2034
|
+
* List of options to render as sticky options at the head of any of the normal options
|
|
2035
|
+
*/
|
|
2036
|
+
declare interface DrilldownStickyHeaderFlat<T> {
|
|
2037
|
+
type: "stickyHeader";
|
|
2038
|
+
options: DrilldownItemFlatType<T>[];
|
|
2039
|
+
/** Unique identifier for the parent option */
|
|
2040
|
+
parentKey: string | undefined;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* @public
|
|
2045
|
+
*/
|
|
2046
|
+
export declare interface DrilldownTabProps {
|
|
2047
|
+
tabs: TabBarItemType[];
|
|
2048
|
+
activeTabIndex: number;
|
|
2049
|
+
onTabChange: (index: number) => void;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* @public
|
|
2054
|
+
*/
|
|
2055
|
+
export declare interface DrilldownTargetProps<TargetRef extends HTMLElement> {
|
|
2056
|
+
targetProps: HTMLAttributes<HTMLElement>;
|
|
2057
|
+
targetRef: Ref<TargetRef>;
|
|
2058
|
+
inputProps: InputHTMLAttributes<HTMLInputElement>;
|
|
2059
|
+
inputRef: Ref<HTMLInputElement>;
|
|
2060
|
+
handleOnClear?: () => void;
|
|
2061
|
+
active: boolean;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
/**
|
|
2065
|
+
* @public
|
|
2066
|
+
*/
|
|
2067
|
+
declare interface DrilldownTreeProps<T, TargetRef extends HTMLElement> extends DrilldownBaseProps<T, TargetRef> {
|
|
2068
|
+
/** Expects options to be a flat array of type DrilldownItemTreeType<T>[] */
|
|
2069
|
+
type: "tree";
|
|
2070
|
+
/** List of options to render */
|
|
2071
|
+
options: DrilldownItemTreeType<T>[];
|
|
2072
|
+
/** Event handler for when the "active" item changes via keyboard events */
|
|
2073
|
+
onActiveOptionChange?: (item: DrilldownValueTreeType<T> | null) => void;
|
|
2074
|
+
/** Event handler for when the "clear" event is triggered for the search input */
|
|
2075
|
+
onClear?: () => void;
|
|
2076
|
+
/** Event handler for when an option is selected */
|
|
2077
|
+
/** Event handler for when the search input value changes */
|
|
2078
|
+
onInputChange?: (input: string, pathToSelectedItem: PathToSelectedItem) => void;
|
|
2079
|
+
/** Callback for filtering items. This is used on drillup to re-filter the parent list based on the input string */
|
|
2080
|
+
filterItemsCb?: (items: DrilldownItemTreeType<T>[], input: string) => DrilldownItemTreeType<T>[];
|
|
2081
|
+
/** Event handler that it called when triggering a drilldown, after animation was run */
|
|
2082
|
+
onDrilldownAnimationEnd?: (item: DrilldownValueTreeType<T> | undefined, pathToSelectedItem: PathToSelectedItem) => Promise<void>;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
/**
|
|
2086
|
+
* @public
|
|
2087
|
+
*/
|
|
2088
|
+
export declare const DrilldownTrigger: StyledComponent<"div", DefaultTheme, {}, never>;
|
|
2089
|
+
|
|
2090
|
+
declare interface DrilldownValueBaseType<OriginalValue> {
|
|
2091
|
+
/** Unique identifier for the option */
|
|
2092
|
+
key: string;
|
|
2093
|
+
/** Text label for the option*/
|
|
2094
|
+
label: React_2.ReactNode;
|
|
2095
|
+
/** Discriminated union literal */
|
|
2096
|
+
type: "value";
|
|
2097
|
+
/** Show option as disabled*/
|
|
2098
|
+
disabled?: boolean;
|
|
2099
|
+
/** Description to render */
|
|
2100
|
+
description?: string;
|
|
2101
|
+
/** Icon to render */
|
|
2102
|
+
icon?: AnyIcon | IconProps | JSX.Element | null;
|
|
2103
|
+
/** Show option as selected */
|
|
2104
|
+
selected?: boolean;
|
|
2105
|
+
/** Link to render - changes behavior to open link in new browser tab */
|
|
2106
|
+
href?: string;
|
|
2107
|
+
onClickIcon?: (value: unknown) => void;
|
|
2108
|
+
/** Callback fired on clicking the sub menu arrow icon **/
|
|
2109
|
+
onClickSubItem?: (value: unknown) => void;
|
|
2110
|
+
/** The underlying data related to the option, for the convenience of the user */
|
|
2111
|
+
value: OriginalValue;
|
|
2112
|
+
/** The default behaviour will only open submenu on clicking th right arrow icon, this will make the whole item
|
|
2113
|
+
* clickable, overriding the onSelect behaviour
|
|
2114
|
+
*/
|
|
2115
|
+
openSubmenuOnSelect?: boolean;
|
|
2116
|
+
/** Callback fired to handle fetch more scrolling for sub items */
|
|
2117
|
+
onFetchMoreSubItems?: () => void;
|
|
2118
|
+
/** Whether to show icon when a href is provided default is true */
|
|
2119
|
+
showHrefIcon?: boolean;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* @public
|
|
2124
|
+
*/
|
|
2125
|
+
declare interface DrilldownValueFlatType<OriginalValue> extends DrilldownValueBaseType<OriginalValue> {
|
|
2126
|
+
/** Unique identifier for the parent option */
|
|
2127
|
+
parentKey: string | undefined;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* @public
|
|
2132
|
+
*/
|
|
2133
|
+
declare interface DrilldownValueTreeType<OriginalValue> extends DrilldownValueBaseType<OriginalValue> {
|
|
2134
|
+
/** Sub options to render */
|
|
2135
|
+
subItems?: DrilldownItemTreeType<OriginalValue>[];
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
/**
|
|
2139
|
+
* @public
|
|
2140
|
+
*/
|
|
2141
|
+
export declare type DrilldownValueType<OriginalValue> = DrilldownValueTreeType<OriginalValue> | DrilldownValueFlatType<OriginalValue>;
|
|
2142
|
+
|
|
1700
2143
|
/**
|
|
1701
2144
|
* Wraps around any child to upgrade it to a dropdown component. If used in the
|
|
1702
2145
|
* render props style you get access to some of the internal state of the dropdown
|
|
@@ -2015,6 +2458,21 @@ export declare interface FaIconAvatarProps {
|
|
|
2015
2458
|
iconStyles?: CSSProperties;
|
|
2016
2459
|
}
|
|
2017
2460
|
|
|
2461
|
+
/**
|
|
2462
|
+
* A helper function to make it easier to filter the items at the current depth
|
|
2463
|
+
* e.g. on search input change (@see WithSearch story)
|
|
2464
|
+
*
|
|
2465
|
+
* Returns the full items array with only the deepest sub items of the path updated */
|
|
2466
|
+
export declare function filterCurrentTreeItems<T>(items: DrilldownItemTreeType<T>[], pathToSelectedItem: {
|
|
2467
|
+
key: string;
|
|
2468
|
+
searchTerm?: string;
|
|
2469
|
+
}[], input: string, filterItemsCb: FilterItemsTreeCb<T>, depth?: number): DrilldownItemTreeType<T>[];
|
|
2470
|
+
|
|
2471
|
+
/**
|
|
2472
|
+
* @public
|
|
2473
|
+
*/
|
|
2474
|
+
export declare type FilterItemsTreeCb<T> = (items: DrilldownItemTreeType<T>[], input: string) => DrilldownItemTreeType<T>[];
|
|
2475
|
+
|
|
2018
2476
|
/**
|
|
2019
2477
|
* Wrapper around Formik's useField hook and ErrorMessage component
|
|
2020
2478
|
* @public
|
|
@@ -3670,6 +4128,11 @@ export declare const paragraphStyled: {
|
|
|
3670
4128
|
p16: FlattenInterpolation<ThemeProps<DefaultTheme>>;
|
|
3671
4129
|
};
|
|
3672
4130
|
|
|
4131
|
+
declare type PathToSelectedItem = {
|
|
4132
|
+
key: string;
|
|
4133
|
+
searchTerm?: string;
|
|
4134
|
+
}[];
|
|
4135
|
+
|
|
3673
4136
|
/**
|
|
3674
4137
|
* @public
|
|
3675
4138
|
*/
|