@elliemae/ds-left-navigation-tree 0.0.0-stage → 3.80.0-next.38
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/DSLeftNavigationTree.js +46 -0
- package/dist/cjs/DSLeftNavigationTree.js.map +7 -0
- package/dist/cjs/config/store.js +63 -0
- package/dist/cjs/config/store.js.map +7 -0
- package/dist/cjs/config/treeModel.js +178 -0
- package/dist/cjs/config/treeModel.js.map +7 -0
- package/dist/cjs/config/useAutoCalculated.js +37 -0
- package/dist/cjs/config/useAutoCalculated.js.map +7 -0
- package/dist/cjs/config/useFocusTracker.js +63 -0
- package/dist/cjs/config/useFocusTracker.js.map +7 -0
- package/dist/cjs/config/useTreeHandlers.js +157 -0
- package/dist/cjs/config/useTreeHandlers.js.map +7 -0
- package/dist/cjs/config/useTreeModel.js +110 -0
- package/dist/cjs/config/useTreeModel.js.map +7 -0
- package/dist/cjs/config/useValidateProps.js +40 -0
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +79 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +46 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/parts/Footer.js +83 -0
- package/dist/cjs/parts/Footer.js.map +7 -0
- package/dist/cjs/parts/Header.js +114 -0
- package/dist/cjs/parts/Header.js.map +7 -0
- package/dist/cjs/parts/MainContent.js +95 -0
- package/dist/cjs/parts/MainContent.js.map +7 -0
- package/dist/cjs/parts/RailItem.js +109 -0
- package/dist/cjs/parts/RailItem.js.map +7 -0
- package/dist/cjs/parts/TreeContext.js +37 -0
- package/dist/cjs/parts/TreeContext.js.map +7 -0
- package/dist/cjs/parts/TreeItem.js +171 -0
- package/dist/cjs/parts/TreeItem.js.map +7 -0
- package/dist/cjs/parts/TreeRoot.js +76 -0
- package/dist/cjs/parts/TreeRoot.js.map +7 -0
- package/dist/cjs/parts/styled.js +221 -0
- package/dist/cjs/parts/styled.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +125 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/typescript-testing/DSLeftNavigationTreeNamespace.js +172 -0
- package/dist/cjs/typescript-testing/DSLeftNavigationTreeNamespace.js.map +7 -0
- package/dist/cjs/typescript-testing/slot-props.js +82 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/DSLeftNavigationTree.js +16 -0
- package/dist/esm/DSLeftNavigationTree.js.map +7 -0
- package/dist/esm/config/store.js +33 -0
- package/dist/esm/config/store.js.map +7 -0
- package/dist/esm/config/treeModel.js +148 -0
- package/dist/esm/config/treeModel.js.map +7 -0
- package/dist/esm/config/useAutoCalculated.js +7 -0
- package/dist/esm/config/useAutoCalculated.js.map +7 -0
- package/dist/esm/config/useFocusTracker.js +33 -0
- package/dist/esm/config/useFocusTracker.js.map +7 -0
- package/dist/esm/config/useTreeHandlers.js +133 -0
- package/dist/esm/config/useTreeHandlers.js.map +7 -0
- package/dist/esm/config/useTreeModel.js +90 -0
- package/dist/esm/config/useTreeModel.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +49 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +25 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/parts/Footer.js +53 -0
- package/dist/esm/parts/Footer.js.map +7 -0
- package/dist/esm/parts/Header.js +91 -0
- package/dist/esm/parts/Header.js.map +7 -0
- package/dist/esm/parts/MainContent.js +69 -0
- package/dist/esm/parts/MainContent.js.map +7 -0
- package/dist/esm/parts/RailItem.js +79 -0
- package/dist/esm/parts/RailItem.js.map +7 -0
- package/dist/esm/parts/TreeContext.js +7 -0
- package/dist/esm/parts/TreeContext.js.map +7 -0
- package/dist/esm/parts/TreeItem.js +149 -0
- package/dist/esm/parts/TreeItem.js.map +7 -0
- package/dist/esm/parts/TreeRoot.js +46 -0
- package/dist/esm/parts/TreeRoot.js.map +7 -0
- package/dist/esm/parts/styled.js +191 -0
- package/dist/esm/parts/styled.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +105 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/typescript-testing/DSLeftNavigationTreeNamespace.js +149 -0
- package/dist/esm/typescript-testing/DSLeftNavigationTreeNamespace.js.map +7 -0
- package/dist/esm/typescript-testing/slot-props.js +59 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/types/DSLeftNavigationTree.d.ts +4 -0
- package/dist/types/config/store.d.ts +38 -0
- package/dist/types/config/treeModel.d.ts +69 -0
- package/dist/types/config/useAutoCalculated.d.ts +1 -0
- package/dist/types/config/useFocusTracker.d.ts +11 -0
- package/dist/types/config/useTreeHandlers.d.ts +11 -0
- package/dist/types/config/useTreeModel.d.ts +22 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +54 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/parts/Footer.d.ts +2 -0
- package/dist/types/parts/Header.d.ts +2 -0
- package/dist/types/parts/MainContent.d.ts +2 -0
- package/dist/types/parts/RailItem.d.ts +8 -0
- package/dist/types/parts/TreeContext.d.ts +11 -0
- package/dist/types/parts/TreeItem.d.ts +4 -0
- package/dist/types/parts/TreeRoot.d.ts +9 -0
- package/dist/types/parts/styled.d.ts +46 -0
- package/dist/types/react-desc-prop-types.d.ts +99 -0
- package/package.json +72 -4
- package/README.md +0 -3
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';
|
|
2
|
+
import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
3
|
+
import type { ZustandT } from '@elliemae/ds-zustand-helpers';
|
|
4
|
+
import { DSLeftNavigationTreeName, LEFT_NAVIGATION_TREE_ITEM_TYPES, LEFT_NAVIGATION_TREE_SLOTS } from './constants/index.js';
|
|
5
|
+
import type { LEFT_NAVIGATION_TREE_REGION_FOCUSES } from './constants/index.js';
|
|
6
|
+
import type { useAutoCalculated } from './config/useAutoCalculated.js';
|
|
7
|
+
export declare namespace DSLeftNavigationTreeT {
|
|
8
|
+
type ItemType = (typeof LEFT_NAVIGATION_TREE_ITEM_TYPES)[keyof typeof LEFT_NAVIGATION_TREE_ITEM_TYPES];
|
|
9
|
+
type LabelOverflowT = 'wrap' | 'wrapAll';
|
|
10
|
+
type InteractionEvent = React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>;
|
|
11
|
+
interface ItemComponentProps {
|
|
12
|
+
item: Item;
|
|
13
|
+
}
|
|
14
|
+
interface ItemOpts {
|
|
15
|
+
label?: string | JSX.Element;
|
|
16
|
+
items?: readonly Item[];
|
|
17
|
+
isOpened?: boolean;
|
|
18
|
+
startOpened?: boolean;
|
|
19
|
+
selectable?: boolean;
|
|
20
|
+
labelOverflow?: LabelOverflowT;
|
|
21
|
+
RightComponent?: React.ComponentType<ItemComponentProps>;
|
|
22
|
+
}
|
|
23
|
+
interface Item {
|
|
24
|
+
dsId: string;
|
|
25
|
+
type: ItemType;
|
|
26
|
+
CollapsedComponent?: React.ComponentType<ItemComponentProps> | null;
|
|
27
|
+
itemOpts?: ItemOpts;
|
|
28
|
+
}
|
|
29
|
+
interface RequiredProps {
|
|
30
|
+
}
|
|
31
|
+
interface DefaultProps {
|
|
32
|
+
items: readonly Item[];
|
|
33
|
+
expanded: boolean;
|
|
34
|
+
expandedWidth: string;
|
|
35
|
+
labelOverflow: LabelOverflowT;
|
|
36
|
+
footerLabel: React.ReactNode;
|
|
37
|
+
disableDefaultSelection: boolean;
|
|
38
|
+
openedItem: string | null;
|
|
39
|
+
onItemClick: (item: Item, e: InteractionEvent) => void;
|
|
40
|
+
onItemOpenedChange: (item: Item, nextIsOpened: boolean, e: InteractionEvent) => void;
|
|
41
|
+
onSelectedChange: (id: string) => void;
|
|
42
|
+
onFocusChange: (id: string) => void;
|
|
43
|
+
onFooterExpand: (e: InteractionEvent) => void;
|
|
44
|
+
onFooterClose: (e: InteractionEvent) => void;
|
|
45
|
+
}
|
|
46
|
+
interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSLeftNavigationTreeName, typeof LEFT_NAVIGATION_TREE_SLOTS> {
|
|
47
|
+
selectedItem?: string | null;
|
|
48
|
+
selectedParent?: string;
|
|
49
|
+
HeaderComponent?: Item;
|
|
50
|
+
}
|
|
51
|
+
interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>, XstyledProps, RequiredProps {
|
|
52
|
+
}
|
|
53
|
+
interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>, XstyledProps, RequiredProps {
|
|
54
|
+
}
|
|
55
|
+
interface ItemSlotArguments {
|
|
56
|
+
item: Item;
|
|
57
|
+
level: number;
|
|
58
|
+
isOpen: boolean;
|
|
59
|
+
isCurrent: boolean;
|
|
60
|
+
}
|
|
61
|
+
type SlotFunctionArguments = {
|
|
62
|
+
dsLeftnavigationtreeRoot: () => object;
|
|
63
|
+
dsLeftnavigationtreeTree: () => object;
|
|
64
|
+
dsLeftnavigationtreeItem: (args: ItemSlotArguments) => object;
|
|
65
|
+
dsLeftnavigationtreeItemRow: (args: ItemSlotArguments) => object;
|
|
66
|
+
dsLeftnavigationtreeItemLabel: (args: ItemSlotArguments) => object;
|
|
67
|
+
dsLeftnavigationtreeLeftContainer: (args: ItemSlotArguments) => object;
|
|
68
|
+
dsLeftnavigationtreeCollapsedContainer: (args: ItemSlotArguments) => object;
|
|
69
|
+
dsLeftnavigationtreeRightContainer: (args: ItemSlotArguments) => object;
|
|
70
|
+
dsLeftnavigationtreeArrowContainer: (args: ItemSlotArguments) => object;
|
|
71
|
+
dsLeftnavigationtreeGroup: (args: ItemSlotArguments) => object;
|
|
72
|
+
dsLeftnavigationtreeSectionContainer: () => object;
|
|
73
|
+
dsLeftnavigationtreeSectionLabel: () => object;
|
|
74
|
+
dsLeftnavigationtreeItemSeparator: () => object;
|
|
75
|
+
dsLeftnavigationtreeHeaderDisclosure: () => object;
|
|
76
|
+
dsLeftnavigationtreeFooterMenu: () => object;
|
|
77
|
+
dsLeftnavigationtreeFooterLabel: () => object;
|
|
78
|
+
dsLeftnavigationtreeFooterSeparator: () => object;
|
|
79
|
+
dsLeftnavigationtreeFooterMenuCollapse: () => object;
|
|
80
|
+
};
|
|
81
|
+
type FocusRegion = (typeof LEFT_NAVIGATION_TREE_REGION_FOCUSES)[keyof typeof LEFT_NAVIGATION_TREE_REGION_FOCUSES];
|
|
82
|
+
type InternalAtoms = {
|
|
83
|
+
focusRegion: FocusRegion;
|
|
84
|
+
focusedItemId: string | null;
|
|
85
|
+
toggles: Record<string, boolean>;
|
|
86
|
+
internalSelectedItem: string | null;
|
|
87
|
+
};
|
|
88
|
+
type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;
|
|
89
|
+
type Selectors = Record<string, never>;
|
|
90
|
+
type Reducers = Record<string, never>;
|
|
91
|
+
type InternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;
|
|
92
|
+
}
|
|
93
|
+
export declare const defaultProps: DSLeftNavigationTreeT.DefaultProps;
|
|
94
|
+
export declare const DSLeftNavigationTreePropTypes: DSPropTypesSchema<DSLeftNavigationTreeT.Props>;
|
|
95
|
+
export declare const DSLeftNavigationTreePropTypesSchema: ValidationMap<DSLeftNavigationTreeT.Props>;
|
|
96
|
+
export declare const DSLeftNavigationTreeItemPropTypes: DSPropTypesSchema<DSLeftNavigationTreeT.Item>;
|
|
97
|
+
export declare const DSLeftNavigationTreeItemOptsPropTypes: DSPropTypesSchema<DSLeftNavigationTreeT.ItemOpts>;
|
|
98
|
+
export declare const DSLeftNavigationTreeItemSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<unknown>;
|
|
99
|
+
export declare const DSLeftNavigationTreeItemOptsSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-left-navigation-tree",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "3.80.0-next.38",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "ICE MT - Dimsum - Left Navigation Tree",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"import": "./dist/esm/index.js",
|
|
16
|
+
"require": "./dist/cjs/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"*.css",
|
|
21
|
+
"*.scss"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/intcx/PLATFORM-UI.dimsum.git"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"pnpm": ">=9",
|
|
29
|
+
"node": ">=22"
|
|
30
|
+
},
|
|
31
|
+
"author": "ICE MT",
|
|
32
|
+
"jestSonar": {
|
|
33
|
+
"sonar56x": true,
|
|
34
|
+
"reportPath": "reports",
|
|
35
|
+
"reportFile": "tests.xml",
|
|
36
|
+
"indent": 4
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@elliemae/ds-icons": "3.80.0-next.38",
|
|
40
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.38",
|
|
41
|
+
"@elliemae/ds-system": "3.80.0-next.38",
|
|
42
|
+
"@elliemae/ds-zustand-helpers": "3.80.0-next.38",
|
|
43
|
+
"@xstyled/styled-components": "~3.8.1"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@elliemae/ds-monorepo-devops": "3.80.0-next.38",
|
|
47
|
+
"@elliemae/ds-test-utils": "3.80.0-next.38",
|
|
48
|
+
"@elliemae/ds-typescript-helpers": "3.80.0-next.38",
|
|
49
|
+
"@playwright/experimental-ct-react": "1.61.1",
|
|
50
|
+
"jest": "^30.0.0",
|
|
51
|
+
"styled-components": "~5.3.11"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
55
|
+
"@testing-library/react": "^16.0.1",
|
|
56
|
+
"@testing-library/user-event": "~14.6.1",
|
|
57
|
+
"react": "^18.3.1",
|
|
58
|
+
"react-dom": "^18.3.1",
|
|
59
|
+
"styled-components": "~5.3.11"
|
|
60
|
+
},
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public",
|
|
63
|
+
"typeSafety": true
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
67
|
+
"test": "playwright test -c ./playwright.config.mjs && ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
|
|
68
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
69
|
+
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
70
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
71
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
72
|
+
"checkDeps": "npx -yes ../../util/ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
73
|
+
}
|
|
74
|
+
}
|
package/README.md
DELETED