@elliemae/ds-app-picker 2.3.0-alpha.6 → 2.3.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/cjs/AppPickerImpl.js +182 -0
  2. package/cjs/DSAppPicker.js +138 -0
  3. package/cjs/index.js +11 -0
  4. package/cjs/propTypes.js +25 -0
  5. package/cjs/styles.js +164 -0
  6. package/cjs/types/AppPickerTypes.js +2 -0
  7. package/cjs/utils.js +18 -0
  8. package/esm/AppPickerImpl.js +174 -0
  9. package/esm/DSAppPicker.js +126 -0
  10. package/esm/index.js +1 -0
  11. package/esm/propTypes.js +21 -0
  12. package/esm/styles.js +150 -0
  13. package/esm/types/AppPickerTypes.js +1 -0
  14. package/esm/utils.js +14 -0
  15. package/package.json +34 -38
  16. package/types/AppPickerImpl.d.ts +3 -0
  17. package/types/DSAppPicker.d.ts +11 -0
  18. package/types/index.d.ts +2 -0
  19. package/types/propTypes.d.ts +61 -0
  20. package/types/styles.d.ts +9 -0
  21. package/types/tests/AppPicker.test.d.ts +1 -0
  22. package/types/types/AppPickerTypes.d.ts +41 -0
  23. package/types/utils.d.ts +12 -0
  24. package/dist/cjs/AppPickerImpl.js +0 -152
  25. package/dist/cjs/AppPickerImpl.js.map +0 -7
  26. package/dist/cjs/DSAppPicker.js +0 -141
  27. package/dist/cjs/DSAppPicker.js.map +0 -7
  28. package/dist/cjs/index.js +0 -36
  29. package/dist/cjs/index.js.map +0 -7
  30. package/dist/cjs/propTypes.js +0 -50
  31. package/dist/cjs/propTypes.js.map +0 -7
  32. package/dist/cjs/styles.js +0 -190
  33. package/dist/cjs/styles.js.map +0 -7
  34. package/dist/cjs/types/AppPickerTypes.js +0 -27
  35. package/dist/cjs/types/AppPickerTypes.js.map +0 -7
  36. package/dist/cjs/utils.js +0 -46
  37. package/dist/cjs/utils.js.map +0 -7
  38. package/dist/esm/AppPickerImpl.js +0 -131
  39. package/dist/esm/AppPickerImpl.js.map +0 -7
  40. package/dist/esm/DSAppPicker.js +0 -112
  41. package/dist/esm/DSAppPicker.js.map +0 -7
  42. package/dist/esm/index.js +0 -7
  43. package/dist/esm/index.js.map +0 -7
  44. package/dist/esm/propTypes.js +0 -21
  45. package/dist/esm/propTypes.js.map +0 -7
  46. package/dist/esm/styles.js +0 -161
  47. package/dist/esm/styles.js.map +0 -7
  48. package/dist/esm/types/AppPickerTypes.js +0 -2
  49. package/dist/esm/types/AppPickerTypes.js.map +0 -7
  50. package/dist/esm/utils.js +0 -17
  51. package/dist/esm/utils.js.map +0 -7
@@ -0,0 +1,61 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
+ export declare const propTypes: {
3
+ apps: import("react-desc").PropTypesDescValue;
4
+ customApps: {
5
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
6
+ deprecated: import("react-desc").PropTypesDescValidator;
7
+ };
8
+ isRequired: import("react-desc").PropTypesDescValue;
9
+ };
10
+ sectionTitle: {
11
+ deprecated: import("react-desc").PropTypesDescValidator;
12
+ };
13
+ customSectionTitle: {
14
+ deprecated: import("react-desc").PropTypesDescValidator;
15
+ };
16
+ icon: {
17
+ deprecated: import("react-desc").PropTypesDescValidator;
18
+ };
19
+ renderTrigger: {
20
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
21
+ deprecated: import("react-desc").PropTypesDescValidator;
22
+ };
23
+ isRequired: import("react-desc").PropTypesDescValue;
24
+ };
25
+ actionRef: {
26
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
27
+ deprecated: import("react-desc").PropTypesDescValidator;
28
+ };
29
+ isRequired: import("react-desc").PropTypesDescValue;
30
+ };
31
+ isOpen: {
32
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
33
+ deprecated: import("react-desc").PropTypesDescValidator;
34
+ };
35
+ isRequired: import("react-desc").PropTypesDescValue;
36
+ };
37
+ onClose: {
38
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
39
+ deprecated: import("react-desc").PropTypesDescValidator;
40
+ };
41
+ isRequired: import("react-desc").PropTypesDescValue;
42
+ };
43
+ onKeyDown: {
44
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
45
+ deprecated: import("react-desc").PropTypesDescValidator;
46
+ };
47
+ isRequired: import("react-desc").PropTypesDescValue;
48
+ };
49
+ onClick: {
50
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
51
+ deprecated: import("react-desc").PropTypesDescValidator;
52
+ };
53
+ isRequired: import("react-desc").PropTypesDescValue;
54
+ };
55
+ onClickOutside: {
56
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
57
+ deprecated: import("react-desc").PropTypesDescValidator;
58
+ };
59
+ isRequired: import("react-desc").PropTypesDescValue;
60
+ };
61
+ };
@@ -0,0 +1,9 @@
1
+ export declare const StyledTitle: import("styled-components").StyledComponent<"h3", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
2
+ export declare const StyledWrapper: import("styled-components").StyledComponent<"ul", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
3
+ export declare const StyledGrid: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
4
+ export declare const StyledRow: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
5
+ export declare const StyledChipLabel: import("styled-components").StyledComponent<"p", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
6
+ export declare const StyledChip: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system/types/styled/types").Theme, {
7
+ selected: boolean | undefined;
8
+ }, never>;
9
+ export declare const StyledSeparator: import("styled-components").StyledComponent<"hr", import("@elliemae/ds-system/types/styled/types").Theme, {}, never>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,41 @@
1
+ /// <reference types="react" />
2
+ import type { SvgIconType } from '@elliemae/ds-icons';
3
+ export interface AppItemType {
4
+ label: string;
5
+ icon: React.ComponentType<{
6
+ className: string;
7
+ size: string;
8
+ }>;
9
+ onClick: () => void | null;
10
+ disabled?: boolean;
11
+ selected?: boolean;
12
+ }
13
+ export interface AppPickerPropsType {
14
+ apps: AppItemType[];
15
+ customApps: AppItemType[];
16
+ sectionTitle: string;
17
+ customSectionTitle: string;
18
+ icon: SvgIconType;
19
+ onKeyDown?: (e: React.KeyboardEvent) => void;
20
+ actionRef?: React.RefObject<{
21
+ focusToIndex: (index: number) => void;
22
+ }>;
23
+ onClick?: (e: MouseEvent) => void;
24
+ onClickOutside?: (e: React.MouseEvent) => void;
25
+ renderTrigger?: React.ComponentType<any>;
26
+ isOpen?: boolean;
27
+ onClose?: () => void;
28
+ triggerRef?: React.RefObject<HTMLButtonElement>;
29
+ }
30
+ export interface AppPickerImplProps {
31
+ apps: AppItemType[];
32
+ customApps: AppItemType[];
33
+ sectionTitle: string;
34
+ customSectionTitle: string;
35
+ close?: () => void;
36
+ onKeyDown: (e: KeyboardEvent) => void;
37
+ wrapperRef: React.RefObject<HTMLUListElement>;
38
+ triggerRef: React.RefObject<HTMLElement>;
39
+ }
40
+ export declare type DSAppPickerImplType = React.ComponentType<AppPickerImplProps>;
41
+ export declare type DSAppPickerType = React.ComponentType<AppPickerPropsType>;
@@ -0,0 +1,12 @@
1
+ export declare const keys: {
2
+ LEFT: string;
3
+ UP: string;
4
+ RIGHT: string;
5
+ DOWN: string;
6
+ ENTER: string;
7
+ SPACE: string;
8
+ TAB: string;
9
+ ESC: string;
10
+ HOME: string;
11
+ END: string;
12
+ };
@@ -1,152 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var AppPickerImpl_exports = {};
29
- __export(AppPickerImpl_exports, {
30
- default: () => AppPickerImpl_default
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
35
- var import_lodash = require("lodash");
36
- var import_utils = require("./utils");
37
- var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
38
- var import_styles = require("./styles");
39
- const AppPickerImpl = ({
40
- apps = [],
41
- customApps = [],
42
- sectionTitle = "APPLICATIONS",
43
- customSectionTitle = "CUSTOM APPLICATIONS",
44
- close = () => null,
45
- wrapperRef,
46
- onKeyDown,
47
- triggerRef,
48
- isOverflow
49
- }) => {
50
- const allFocusableButtons = (0, import_react.useRef)([]);
51
- const selectedButton = (0, import_react.useRef)(null);
52
- (0, import_react.useEffect)(() => {
53
- wrapperRef?.current?.querySelectorAll("button").forEach((e, index) => {
54
- if (!e.hasAttribute("disabled")) {
55
- allFocusableButtons?.current?.push(e);
56
- }
57
- if (e.getAttribute("aria-selected") === "true") {
58
- selectedButton.current = index;
59
- }
60
- });
61
- if (selectedButton.current) {
62
- wrapperRef?.current?.querySelectorAll("button")[selectedButton.current].focus();
63
- } else {
64
- allFocusableButtons?.current[0]?.focus();
65
- }
66
- }, [wrapperRef]);
67
- const handleKeyDown = (e) => {
68
- switch (e.key) {
69
- case import_utils.keys.ESC:
70
- triggerRef?.current?.focus();
71
- close();
72
- break;
73
- case import_utils.keys.TAB:
74
- if (e.shiftKey) {
75
- if (e.target === allFocusableButtons.current[0]) {
76
- e.preventDefault();
77
- allFocusableButtons?.current[allFocusableButtons.current.length - 1]?.focus();
78
- }
79
- } else if (e.target === allFocusableButtons.current[allFocusableButtons.current.length - 1]) {
80
- e.preventDefault();
81
- allFocusableButtons?.current[0]?.focus();
82
- }
83
- break;
84
- default:
85
- break;
86
- }
87
- };
88
- const handleOnClick = (0, import_react.useCallback)((e, app) => {
89
- if (app.onClick)
90
- app.onClick(e, app);
91
- }, []);
92
- const handleOnKeyDownWrapper = (0, import_react.useCallback)((e) => {
93
- if (onKeyDown)
94
- onKeyDown(e);
95
- if (!onKeyDown && e.key === import_utils.keys.ESC) {
96
- close();
97
- }
98
- }, [onKeyDown, close]);
99
- const buildRows = (appList, prevIndex = 0) => {
100
- const rows = (0, import_lodash.chunk)(appList, 3);
101
- const formattedRows = rows.map((row, index) => /* @__PURE__ */ import_react.default.createElement(import_styles.StyledRow, {
102
- key: index
103
- }, row.map((app, key) => {
104
- const { label, disabled, selected, icon: Icon, id, ...otherProps } = app;
105
- return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledChip, {
106
- key,
107
- onClick: (e) => handleOnClick(e, app),
108
- onKeyDown: handleKeyDown,
109
- "data-testid": "app-picker__chip",
110
- "aria-disabled": disabled,
111
- disabled,
112
- selected,
113
- "aria-selected": selected,
114
- "aria-setsize": apps.length + customApps.length,
115
- "aria-posinset": key + prevIndex,
116
- id,
117
- ...(0, import_ds_props_helpers.getDataProps)(otherProps)
118
- }, /* @__PURE__ */ import_react.default.createElement(Icon, {
119
- className: "app-picker__icon",
120
- size: "m"
121
- }), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledChipLabel, null, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
122
- value: label,
123
- placement: "bottom"
124
- })));
125
- })));
126
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, formattedRows);
127
- };
128
- const AppsRows = () => buildRows(apps, 1);
129
- const CustomRows = () => buildRows(customApps, apps.length);
130
- return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledWrapper, {
131
- role: "listbox",
132
- ref: wrapperRef,
133
- onKeyDown: handleOnKeyDownWrapper,
134
- "data-testid": "app-picker__wrapper",
135
- isOverflow
136
- }, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledTitle, {
137
- "data-testid": "app-picker__main-title",
138
- "aria-hidden": true
139
- }, sectionTitle), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledGrid, {
140
- "data-testid": "app-picker__main-grid"
141
- }, /* @__PURE__ */ import_react.default.createElement(AppsRows, null)), !!customApps.length && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledSeparator, {
142
- "aria-hidden": true
143
- }), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledTitle, {
144
- "data-testid": "app-picker__custom-title",
145
- "aria-hidden": true
146
- }, customSectionTitle), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledGrid, {
147
- "data-testid": "app-picker__custom-grid"
148
- }, /* @__PURE__ */ import_react.default.createElement(CustomRows, null))));
149
- };
150
- var AppPickerImpl_default = AppPickerImpl;
151
- module.exports = __toCommonJS(AppPickerImpl_exports);
152
- //# sourceMappingURL=AppPickerImpl.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/AppPickerImpl.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\nimport React, { useEffect, useCallback, useRef } from 'react';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\nimport { chunk } from 'lodash';\nimport { keys } from './utils';\nimport { AppItemType, DSAppPickerImplType } from './types/AppPickerTypes';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledWrapper,\n StyledChip,\n StyledChipLabel,\n StyledTitle,\n StyledGrid,\n StyledRow,\n StyledSeparator,\n} from './styles';\n\nconst AppPickerImpl: DSAppPickerImplType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n close = () => null,\n wrapperRef,\n onKeyDown,\n triggerRef,\n isOverflow,\n}) => {\n const allFocusableButtons = useRef<HTMLButtonElement[]>([]);\n const selectedButton = useRef<number | null>(null);\n\n useEffect(() => {\n wrapperRef?.current?.querySelectorAll('button').forEach((e, index) => {\n if (!e.hasAttribute('disabled')) {\n allFocusableButtons?.current?.push(e);\n }\n if (e.getAttribute('aria-selected') === 'true') {\n selectedButton.current = index;\n }\n });\n\n if (selectedButton.current) {\n wrapperRef?.current?.querySelectorAll('button')[selectedButton.current].focus();\n } else {\n allFocusableButtons?.current[0]?.focus();\n }\n }, [wrapperRef]);\n\n // eslint-disable-next-line max-statements\n const handleKeyDown = (e: React.KeyboardEvent) => {\n switch (e.key) {\n case keys.ESC:\n triggerRef?.current?.focus();\n close();\n break;\n case keys.TAB:\n if (e.shiftKey) {\n if (e.target === allFocusableButtons.current[0]) {\n e.preventDefault();\n allFocusableButtons?.current[allFocusableButtons.current.length - 1]?.focus();\n }\n } else if (e.target === allFocusableButtons.current[allFocusableButtons.current.length - 1]) {\n e.preventDefault();\n allFocusableButtons?.current[0]?.focus();\n }\n break;\n default:\n break;\n }\n };\n\n const handleOnClick = useCallback((e, app) => {\n if (app.onClick) app.onClick(e, app);\n }, []);\n\n const handleOnKeyDownWrapper = useCallback(\n (e) => {\n if (onKeyDown) onKeyDown(e);\n if (!onKeyDown && e.key === keys.ESC) {\n close();\n }\n },\n [onKeyDown, close],\n );\n\n const buildRows = (appList: AppItemType[], prevIndex = 0): JSX.Element => {\n const rows = chunk(appList, 3); // divides array in subarrays of 3 items\n const formattedRows = rows.map((row, index) => (\n <StyledRow key={index}>\n {row.map((app, key) => {\n const { label, disabled, selected, icon: Icon, id, ...otherProps } = app;\n return (\n <StyledChip\n key={key}\n onClick={(e) => handleOnClick(e, app)}\n onKeyDown={handleKeyDown}\n data-testid=\"app-picker__chip\"\n aria-disabled={disabled}\n disabled={disabled}\n selected={selected}\n aria-selected={selected}\n aria-setsize={apps.length + customApps.length}\n aria-posinset={key + prevIndex}\n id={id}\n {...getDataProps(otherProps)}\n >\n <Icon className=\"app-picker__icon\" size=\"m\" />\n <StyledChipLabel>\n <SimpleTruncatedTooltipText value={label} placement=\"bottom\" />\n </StyledChipLabel>\n </StyledChip>\n );\n })}\n </StyledRow>\n ));\n return <>{formattedRows}</>;\n };\n\n const AppsRows = () => buildRows(apps, 1);\n const CustomRows = () => buildRows(customApps, apps.length);\n\n return (\n <StyledWrapper\n role=\"listbox\"\n ref={wrapperRef}\n onKeyDown={handleOnKeyDownWrapper}\n data-testid=\"app-picker__wrapper\"\n isOverflow={isOverflow}\n >\n <StyledTitle data-testid=\"app-picker__main-title\" aria-hidden>\n {sectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__main-grid\">\n <AppsRows />\n </StyledGrid>\n {!!customApps.length && (\n <>\n <StyledSeparator aria-hidden />\n <StyledTitle data-testid=\"app-picker__custom-title\" aria-hidden>\n {customSectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__custom-grid\">\n <CustomRows />\n </StyledGrid>\n </>\n )}\n </StyledWrapper>\n );\n};\n\nexport default AppPickerImpl;\n", "import * as React from 'react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UAAD,QAED,CAAC,CAAC,WAAW,UACZ,wFACE,mDAAC,+BAAD;AAAA,IAAiB,eAAW;AAAA,MAC5B,mDAAC,2BAAD;AAAA,IAAa,eAAY;AAAA,IAA2B,eAAW;AAAA,KAC5D,qBAEH,mDAAC,0BAAD;AAAA,IAAY,eAAY;AAAA,KACtB,mDAAC,YAAD;AAAA;AAQZ,IAAO,wBAAQ;",
6
- "names": []
7
- }
@@ -1,141 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var DSAppPicker_exports = {};
29
- __export(DSAppPicker_exports, {
30
- AppPickerWithSchema: () => AppPickerWithSchema,
31
- DSAppPicker: () => DSAppPicker,
32
- default: () => DSAppPicker_default
33
- });
34
- var React = __toESM(require("react"));
35
- var import_react = __toESM(require("react"));
36
- var import_react_desc = require("react-desc");
37
- var import_ds_icons = require("@elliemae/ds-icons");
38
- var import_ds_button = __toESM(require("@elliemae/ds-button"));
39
- var import_ds_popover = __toESM(require("@elliemae/ds-popover"));
40
- var import_ds_utilities = require("@elliemae/ds-utilities");
41
- var import_AppPickerImpl = __toESM(require("./AppPickerImpl"));
42
- var import_propTypes = require("./propTypes");
43
- const DSAppPicker = ({
44
- apps = [],
45
- customApps = [],
46
- sectionTitle = "APPLICATIONS",
47
- customSectionTitle = "CUSTOM APPLICATIONS",
48
- icon: Icon = () => /* @__PURE__ */ import_react.default.createElement(import_ds_icons.MenuPicker, {
49
- fill: ["brand-primary", 700],
50
- size: "m"
51
- }),
52
- renderTrigger,
53
- isOpen,
54
- onClose = () => null,
55
- actionRef,
56
- onKeyDown,
57
- onClick = () => null,
58
- onClickOutside = () => null,
59
- triggerRef
60
- }) => {
61
- const [open, setOpen] = (0, import_react.useState)(false);
62
- const [isOverflow, setIsOverflow] = (0, import_react.useState)(false);
63
- const wrapperRef = (0, import_react.useRef)(null);
64
- const defaultTriggerRef = (0, import_react.useRef)(null);
65
- (0, import_react.useEffect)(() => {
66
- if (actionRef && actionRef.current) {
67
- actionRef.current.focusToIndex = (index) => {
68
- if (wrapperRef.current) {
69
- const parent = wrapperRef.current;
70
- const buttons = [...parent.querySelectorAll("button")];
71
- buttons[index].focus();
72
- }
73
- };
74
- }
75
- }, [actionRef, apps, customApps]);
76
- (0, import_react.useEffect)(() => {
77
- setTimeout(() => {
78
- if (wrapperRef.current) {
79
- const { scrollHeight, clientHeight } = wrapperRef.current;
80
- if (scrollHeight > clientHeight)
81
- return setIsOverflow(true);
82
- }
83
- return setIsOverflow(false);
84
- });
85
- }, [isOpen, open]);
86
- const handleOnClose = () => {
87
- if (typeof isOpen === "boolean") {
88
- setOpen(isOpen);
89
- } else {
90
- setOpen(false);
91
- }
92
- onClose();
93
- };
94
- const handleOnClickOutside = (e) => {
95
- setOpen(false);
96
- onClose();
97
- onClickOutside(e);
98
- };
99
- const AppPickerContent = () => /* @__PURE__ */ import_react.default.createElement(import_AppPickerImpl.default, {
100
- apps,
101
- customApps,
102
- sectionTitle,
103
- customSectionTitle,
104
- close: handleOnClose,
105
- wrapperRef,
106
- onKeyDown,
107
- triggerRef: triggerRef || defaultTriggerRef,
108
- isOverflow
109
- });
110
- const RenderTrigger = renderTrigger || (({ ref }) => /* @__PURE__ */ import_react.default.createElement(import_ds_button.default, {
111
- "data-testid": "app-picker__button",
112
- id: "app-picker__button",
113
- buttonType: "text",
114
- icon: /* @__PURE__ */ import_react.default.createElement(Icon, null),
115
- innerRef: (0, import_ds_utilities.mergeRefs)(ref, defaultTriggerRef),
116
- onClick: (e) => {
117
- onClick(e);
118
- setOpen(true);
119
- }
120
- }));
121
- return /* @__PURE__ */ import_react.default.createElement(import_ds_popover.default, {
122
- content: /* @__PURE__ */ import_react.default.createElement(AppPickerContent, null),
123
- isOpen: typeof isOpen === "boolean" ? isOpen : open,
124
- onClickOutside: handleOnClickOutside,
125
- placement: "bottom",
126
- interactionType: "click",
127
- renderTrigger: RenderTrigger,
128
- showArrow: true,
129
- style: {
130
- padding: "0",
131
- maxWidth: "1000px",
132
- width: "fit-content"
133
- }
134
- });
135
- };
136
- DSAppPicker.propTypes = import_propTypes.propTypes;
137
- const AppPickerWithSchema = (0, import_react_desc.describe)(DSAppPicker);
138
- AppPickerWithSchema.propTypes = import_propTypes.propTypes;
139
- var DSAppPicker_default = DSAppPicker;
140
- module.exports = __toCommonJS(DSAppPicker_exports);
141
- //# sourceMappingURL=DSAppPicker.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSAppPicker.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react';\nimport { describe } from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport DSPopover from '@elliemae/ds-popover';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport AppPickerImpl from './AppPickerImpl';\nimport { propTypes } from './propTypes';\nimport type { DSAppPickerType } from './types/AppPickerTypes';\n\nconst DSAppPicker: DSAppPickerType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n icon: Icon = () => <MenuPicker fill={['brand-primary', 700]} size=\"m\" />,\n renderTrigger,\n isOpen,\n onClose = () => null,\n actionRef,\n onKeyDown,\n onClick = () => null,\n onClickOutside = () => null,\n triggerRef,\n}) => {\n const [open, setOpen] = useState(false);\n const [isOverflow, setIsOverflow] = useState(false);\n const wrapperRef = useRef<HTMLUListElement>(null);\n const defaultTriggerRef = useRef(null);\n\n useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToIndex = (index) => {\n if (wrapperRef.current) {\n const parent = wrapperRef.current;\n const buttons = [...parent.querySelectorAll('button')];\n buttons[index].focus();\n }\n };\n }\n }, [actionRef, apps, customApps]);\n\n useEffect(() => {\n setTimeout(() => {\n if (wrapperRef.current) {\n const { scrollHeight, clientHeight } = wrapperRef.current;\n if (scrollHeight > clientHeight) return setIsOverflow(true);\n }\n return setIsOverflow(false);\n });\n }, [isOpen, open]);\n\n const handleOnClose = () => {\n if (typeof isOpen === 'boolean') {\n setOpen(isOpen);\n } else {\n setOpen(false);\n }\n onClose();\n };\n\n const handleOnClickOutside = (e: MouseEvent) => {\n setOpen(false);\n onClose();\n onClickOutside(e);\n };\n\n const AppPickerContent = () => (\n <AppPickerImpl\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n close={handleOnClose}\n wrapperRef={wrapperRef}\n onKeyDown={onKeyDown}\n triggerRef={triggerRef || defaultTriggerRef}\n isOverflow={isOverflow}\n />\n );\n\n const RenderTrigger =\n renderTrigger ||\n (({ ref }) => (\n <DSButton\n data-testid=\"app-picker__button\"\n id=\"app-picker__button\"\n buttonType=\"text\"\n icon={<Icon />}\n innerRef={mergeRefs(ref, defaultTriggerRef)}\n onClick={(e) => {\n onClick(e);\n setOpen(true);\n }}\n />\n ));\n\n return (\n <DSPopover\n content={<AppPickerContent />}\n isOpen={typeof isOpen === 'boolean' ? isOpen : open}\n onClickOutside={handleOnClickOutside}\n placement=\"bottom\"\n interactionType=\"click\"\n renderTrigger={RenderTrigger}\n showArrow\n style={{\n padding: '0',\n maxWidth: '1000px',\n width: 'fit-content',\n }}\n />\n );\n};\n\nDSAppPicker.propTypes = propTypes;\n\nconst AppPickerWithSchema = describe(DSAppPicker);\nAppPickerWithSchema.propTypes = propTypes;\n\nexport { DSAppPicker, AppPickerWithSchema };\nexport default DSAppPicker;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAmD;AACnD,wBAAyB;AACzB,sBAA2B;AAC3B,uBAAqB;AACrB,wBAAsB;AACtB,0BAA0B;AAC1B,2BAA0B;AAC1B,uBAA0B;AAG1B,MAAM,cAA+B,CAAC;AAAA,EACpC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,MAAM,OAAO,MAAM,mDAAC,4BAAD;AAAA,IAAY,MAAM,CAAC,iBAAiB;AAAA,IAAM,MAAK;AAAA;AAAA,EAClE;AAAA,EACA;AAAA,EACA,UAAU,MAAM;AAAA,EAChB;AAAA,EACA;AAAA,EACA,UAAU,MAAM;AAAA,EAChB,iBAAiB,MAAM;AAAA,EACvB;AAAA,MACI;AACJ,QAAM,CAAC,MAAM,WAAW,2BAAS;AACjC,QAAM,CAAC,YAAY,iBAAiB,2BAAS;AAC7C,QAAM,aAAa,yBAAyB;AAC5C,QAAM,oBAAoB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AAS;AAAA,IACT,OAAO;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA;AAAA;AAAA;AAMf,YAAY,YAAY;AAExB,MAAM,sBAAsB,gCAAS;AACrC,oBAAoB,YAAY;AAGhC,IAAO,sBAAQ;",
6
- "names": []
7
- }
package/dist/cjs/index.js DELETED
@@ -1,36 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var src_exports = {};
29
- __export(src_exports, {
30
- default: () => import_DSAppPicker.default
31
- });
32
- var React = __toESM(require("react"));
33
- __reExport(src_exports, require("./DSAppPicker"));
34
- var import_DSAppPicker = __toESM(require("./DSAppPicker"));
35
- module.exports = __toCommonJS(src_exports);
36
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSAppPicker';\n\nexport { default } from './DSAppPicker';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AAEd,yBAAwB;",
6
- "names": []
7
- }
@@ -1,50 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var propTypes_exports = {};
29
- __export(propTypes_exports, {
30
- propTypes: () => propTypes
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react_desc = require("react-desc");
34
- var import_ds_icons = require("@elliemae/ds-icons");
35
- const propTypes = {
36
- apps: import_react_desc.PropTypes.array.description("Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]").isRequired,
37
- customApps: import_react_desc.PropTypes.array.description("Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]"),
38
- sectionTitle: import_react_desc.PropTypes.string.description("main section title").defaultValue("APPLICATIONS"),
39
- customSectionTitle: import_react_desc.PropTypes.string.description("custom section title").defaultValue("CUSTOM APPLICATIONS"),
40
- icon: import_react_desc.PropTypes.func.description("trigger button s icon").defaultValue(import_ds_icons.MenuPicker),
41
- renderTrigger: import_react_desc.PropTypes.func.description("Custom trigger component."),
42
- actionRef: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.func, import_react_desc.PropTypes.shape({ current: import_react_desc.PropTypes.any })]).description("Ref containing a focusToIndex method. This method allows you to focus any App inside the AppPicker."),
43
- isOpen: import_react_desc.PropTypes.bool.description("Wether the AppPicker should be open or not."),
44
- onClose: import_react_desc.PropTypes.func.description("Callback function when the AppPicker closes"),
45
- onKeyDown: import_react_desc.PropTypes.func.description("OnKeyDown handler callback."),
46
- onClick: import_react_desc.PropTypes.func.description("Custom onClick for Trigger component."),
47
- onClickOutside: import_react_desc.PropTypes.func.description("Callback event when the user clicks outside the App Picker.")
48
- };
49
- module.exports = __toCommonJS(propTypes_exports);
50
- //# sourceMappingURL=propTypes.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { PropTypes } from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\n\nexport const propTypes = {\n apps: PropTypes.array.description(\n 'Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]',\n ).isRequired,\n customApps: PropTypes.array.description(\n 'Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]',\n ),\n sectionTitle: PropTypes.string.description('main section title').defaultValue('APPLICATIONS'),\n customSectionTitle: PropTypes.string.description('custom section title').defaultValue('CUSTOM APPLICATIONS'),\n icon: PropTypes.func.description('trigger button s icon').defaultValue(MenuPicker),\n renderTrigger: PropTypes.func.description('Custom trigger component.'),\n actionRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'Ref containing a focusToIndex method. This method allows you to focus any App inside the AppPicker.',\n ),\n isOpen: PropTypes.bool.description('Wether the AppPicker should be open or not.'),\n onClose: PropTypes.func.description('Callback function when the AppPicker closes'),\n onKeyDown: PropTypes.func.description('OnKeyDown handler callback.'),\n onClick: PropTypes.func.description('Custom onClick for Trigger component.'),\n onClickOutside: PropTypes.func.description('Callback event when the user clicks outside the App Picker.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAC1B,sBAA2B;AAEpB,MAAM,YAAY;AAAA,EACvB,MAAM,4BAAU,MAAM,YACpB,sGACA;AAAA,EACF,YAAY,4BAAU,MAAM,YAC1B;AAAA,EAEF,cAAc,4BAAU,OAAO,YAAY,sBAAsB,aAAa;AAAA,EAC9E,oBAAoB,4BAAU,OAAO,YAAY,wBAAwB,aAAa;AAAA,EACtF,MAAM,4BAAU,KAAK,YAAY,yBAAyB,aAAa;AAAA,EACvE,eAAe,4BAAU,KAAK,YAAY;AAAA,EAC1C,WAAW,4BAAU,UAAU,CAAC,4BAAU,MAAM,4BAAU,MAAM,EAAE,SAAS,4BAAU,SAAS,YAC5F;AAAA,EAEF,QAAQ,4BAAU,KAAK,YAAY;AAAA,EACnC,SAAS,4BAAU,KAAK,YAAY;AAAA,EACpC,WAAW,4BAAU,KAAK,YAAY;AAAA,EACtC,SAAS,4BAAU,KAAK,YAAY;AAAA,EACpC,gBAAgB,4BAAU,KAAK,YAAY;AAAA;",
6
- "names": []
7
- }