@elliemae/ds-shuttle-v2 3.57.0-next.2 → 3.57.0-next.22
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/DSShuttleV2.js +3 -1
- package/dist/cjs/DSShuttleV2.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/index.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/cjs/config/useStore/useStore.js +3 -1
- package/dist/cjs/config/useStore/useStore.js.map +2 -2
- package/dist/cjs/config/useValidateProps.js.map +2 -2
- package/dist/cjs/constants/index.js +44 -1
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/parts/Dnd/DndHandle.js +2 -3
- package/dist/cjs/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/cjs/parts/Header.js +6 -2
- package/dist/cjs/parts/Header.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js +1 -1
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js +1 -1
- package/dist/cjs/parts/HoC/withConditionalUseSortable.js.map +2 -2
- package/dist/cjs/parts/Item/Item.js +2 -3
- package/dist/cjs/parts/Item/Item.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js +10 -10
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/cjs/parts/Item/ItemMiddleSection.js +4 -4
- package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Item/ItemOverlay.js +2 -2
- package/dist/cjs/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/cjs/parts/Item/ItemSelection.js +2 -2
- package/dist/cjs/parts/Item/ItemSelection.js.map +2 -2
- package/dist/cjs/parts/Item/TextSection.js +2 -2
- package/dist/cjs/parts/Item/TextSection.js.map +2 -2
- package/dist/cjs/parts/MainContent.js +2 -2
- package/dist/cjs/parts/MainContent.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +3 -3
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js +3 -3
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js +2 -2
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/EmptyItems.js +2 -2
- package/dist/cjs/parts/Panel/middle/EmptyItems.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js +2 -2
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/LoadingItems.js +2 -2
- package/dist/cjs/parts/Panel/middle/LoadingItems.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +8 -9
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +11 -13
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/ShuttleLoadingAnnouncement.js +38 -0
- package/dist/cjs/parts/Panel/middle/ShuttleLoadingAnnouncement.js.map +7 -0
- package/dist/cjs/parts/Panel/top/PanelContentTopSection.js +2 -2
- package/dist/cjs/parts/Panel/top/PanelContentTopSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/PanelFilterSection.js +6 -4
- package/dist/cjs/parts/Panel/top/PanelFilterSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/SelectionHeader.js +5 -5
- package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/cjs/parts/PanelWrapper.js +3 -3
- package/dist/cjs/parts/PanelWrapper.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +3 -3
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid.js +142 -0
- package/dist/cjs/typescript-testing/typescript-shuttle-v2-valid.js.map +7 -0
- package/dist/esm/DSShuttleV2.js +3 -1
- package/dist/esm/DSShuttleV2.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/index.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/esm/config/useStore/useStore.js +3 -1
- package/dist/esm/config/useStore/useStore.js.map +2 -2
- package/dist/esm/config/useValidateProps.js.map +2 -2
- package/dist/esm/constants/index.js +44 -1
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/parts/Dnd/DndHandle.js +1 -2
- package/dist/esm/parts/Dnd/DndHandle.js.map +2 -2
- package/dist/esm/parts/Header.js +6 -2
- package/dist/esm/parts/Header.js.map +2 -2
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js +2 -2
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/esm/parts/HoC/withConditionalUseSortable.js +1 -1
- package/dist/esm/parts/HoC/withConditionalUseSortable.js.map +2 -2
- package/dist/esm/parts/Item/Item.js +1 -2
- package/dist/esm/parts/Item/Item.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/ItemActions.js +1 -1
- package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +1 -1
- package/dist/esm/parts/Item/ItemMiddleSection.js +1 -1
- package/dist/esm/parts/Item/ItemMiddleSection.js.map +1 -1
- package/dist/esm/parts/Item/ItemOverlay.js +1 -1
- package/dist/esm/parts/Item/ItemOverlay.js.map +1 -1
- package/dist/esm/parts/Item/ItemSelection.js +1 -1
- package/dist/esm/parts/Item/ItemSelection.js.map +1 -1
- package/dist/esm/parts/Item/TextSection.js +1 -1
- package/dist/esm/parts/Item/TextSection.js.map +1 -1
- package/dist/esm/parts/MainContent.js +1 -1
- package/dist/esm/parts/MainContent.js.map +1 -1
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +1 -1
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +1 -1
- package/dist/esm/parts/Panel/bottom/LoadingMore.js +1 -1
- package/dist/esm/parts/Panel/bottom/LoadingMore.js.map +1 -1
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js +1 -1
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js.map +1 -1
- package/dist/esm/parts/Panel/middle/EmptyItems.js +1 -1
- package/dist/esm/parts/Panel/middle/EmptyItems.js.map +1 -1
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js +1 -1
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js.map +1 -1
- package/dist/esm/parts/Panel/middle/LoadingItems.js +1 -1
- package/dist/esm/parts/Panel/middle/LoadingItems.js.map +1 -1
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +1 -2
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +11 -13
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/esm/parts/Panel/middle/ShuttleLoadingAnnouncement.js +8 -0
- package/dist/esm/parts/Panel/middle/ShuttleLoadingAnnouncement.js.map +7 -0
- package/dist/esm/parts/Panel/top/PanelContentTopSection.js +1 -1
- package/dist/esm/parts/Panel/top/PanelContentTopSection.js.map +1 -1
- package/dist/esm/parts/Panel/top/PanelFilterSection.js +5 -3
- package/dist/esm/parts/Panel/top/PanelFilterSection.js.map +2 -2
- package/dist/esm/parts/Panel/top/SelectionHeader.js +1 -1
- package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/esm/parts/PanelWrapper.js +1 -1
- package/dist/esm/parts/PanelWrapper.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js +1 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-shuttle-v2-valid.js +119 -0
- package/dist/esm/typescript-testing/typescript-shuttle-v2-valid.js.map +7 -0
- package/dist/types/DSShuttleV2.d.ts +5 -3
- package/dist/types/config/useAutoCalculated/index.d.ts +1 -1
- package/dist/types/config/useAutoCalculated/useDataStructure.d.ts +1 -1
- package/dist/types/config/useStore/useStore.d.ts +10 -10
- package/dist/types/config/useValidateProps.d.ts +1 -1
- package/dist/types/constants/index.d.ts +72 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/parts/Panel/middle/ItemListWrapper/useGetDatumHydratables.d.ts +1 -1
- package/dist/types/parts/Panel/middle/ShuttleLoadingAnnouncement.d.ts +3 -0
- package/dist/types/react-desc-prop-types.d.ts +20 -19
- package/dist/types/tests/configs/ControlledTestRender.d.ts +1 -0
- package/dist/types/tests/configs/basic.d.ts +4 -5
- package/dist/types/tests/configs/filter.d.ts +9 -8
- package/dist/types/tests/configs/loadMore.d.ts +4 -5
- package/dist/types/tests/shuttle-v2.events.test.d.ts +1 -0
- package/dist/types/tests/shuttle-v2.exports.test.d.ts +1 -0
- package/dist/types/tests/shuttle-v2.get-owner-props.test.d.ts +1 -0
- package/dist/types/tests/shuttle-v2.keyboard.test.d.ts +1 -0
- package/dist/types/typescript-testing/typescript-shuttle-v2-valid.d.ts +1 -0
- package/package.json +26 -25
- package/dist/cjs/config/DSShuttleV2Definitions.js +0 -74
- package/dist/cjs/config/DSShuttleV2Definitions.js.map +0 -7
- package/dist/esm/config/DSShuttleV2Definitions.js +0 -44
- package/dist/esm/config/DSShuttleV2Definitions.js.map +0 -7
- package/dist/types/config/DSShuttleV2Definitions.d.ts +0 -69
- /package/dist/types/tests/{shuttle-v2.load-more.test.d.ts → loadMore/shuttle-v2.load-more.test.d.ts} +0 -0
- /package/dist/types/tests/{shuttle-v2.basic.test.d.ts → shuttle-v2.a11y.test.d.ts} +0 -0
- /package/dist/types/tests/{shuttle-v2.filter.test.d.ts → shuttle-v2.data-testid.test.d.ts} +0 -0
|
@@ -39,12 +39,11 @@ var import_ds_grid = require("@elliemae/ds-grid");
|
|
|
39
39
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
40
|
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
41
41
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
42
|
-
var import_constants = require("../../../constants/index.js");
|
|
43
42
|
var import_itemMovementHelpers = require("../../../config/itemMovementHelpers.js");
|
|
44
43
|
var import_useStore = require("../../../config/useStore/index.js");
|
|
45
44
|
var import_useFocusTracker = require("../../../config/useFocusTracker/index.js");
|
|
46
|
-
var
|
|
47
|
-
const StyledMoveMultipleWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
45
|
+
var import_constants = require("../../../constants/index.js");
|
|
46
|
+
const StyledMoveMultipleWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.MOVE_MULTIPLE_WRAPPER })`
|
|
48
47
|
position: absolute;
|
|
49
48
|
background-color: neutral-000;
|
|
50
49
|
top: 0px;
|
|
@@ -63,23 +62,23 @@ const StyledMoveMultipleWrapper = (0, import_ds_system.styled)(import_ds_grid.Gr
|
|
|
63
62
|
}
|
|
64
63
|
`;
|
|
65
64
|
const StyledButton = (0, import_ds_system.styled)(import_ds_button_v2.DSButtonV2, {
|
|
66
|
-
name:
|
|
67
|
-
slot:
|
|
65
|
+
name: import_constants.DSShuttleV2Name,
|
|
66
|
+
slot: import_constants.DSShuttleV2Slots.MOVE_MULTIPLE_BTN
|
|
68
67
|
})`
|
|
69
68
|
width: 100%;
|
|
70
69
|
height: 100%;
|
|
71
70
|
`;
|
|
72
71
|
const StyledCloseMediumIcon = (0, import_ds_system.styled)(import_ds_icons.CloseMedium, {
|
|
73
|
-
name:
|
|
74
|
-
slot:
|
|
72
|
+
name: import_constants.DSShuttleV2Name,
|
|
73
|
+
slot: import_constants.DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON
|
|
75
74
|
})`
|
|
76
75
|
> svg {
|
|
77
76
|
fill: brand-600;
|
|
78
77
|
}
|
|
79
78
|
`;
|
|
80
79
|
const StyledArrowShortRightIcon = (0, import_ds_system.styled)(import_ds_icons.ArrowShortRight, {
|
|
81
|
-
name:
|
|
82
|
-
slot:
|
|
80
|
+
name: import_constants.DSShuttleV2Name,
|
|
81
|
+
slot: import_constants.DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON
|
|
83
82
|
})`
|
|
84
83
|
> svg {
|
|
85
84
|
fill: brand-600;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Panel/middle/MultipleSelectionAction.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { DSButtonV2, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { DSButtonV2, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useHandleMoveSelection } from '../../../config/itemMovementHelpers.js';\nimport { useInternalStore, usePropsStore } from '../../../config/useStore/index.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots, REGIONS_FOCUSES } from '../../../constants/index.js';\n\nconst StyledMoveMultipleWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.MOVE_MULTIPLE_WRAPPER })`\n position: absolute;\n background-color: neutral-000;\n top: 0px;\n right: 0px;\n transform: translateX(0);\n height: 100%;\n width: 5rem;\n :hover {\n background-color: brand-200;\n > svg {\n fill: brand-700;\n }\n }\n > svg {\n fill: brand-600;\n }\n`;\nconst StyledButton = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.MOVE_MULTIPLE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})`\n > svg {\n fill: brand-600;\n }\n`;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})`\n > svg {\n fill: brand-600;\n }\n`;\nconst gridFullFraction = ['1fr'];\n\nexport const MultipleSelectionAction = React.memo((panelMeta: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel } = panelMeta;\n const { moveSelection } = useHandleMoveSelection(panelMeta);\n const { trackFocusRegionPanel, trackFocusRegionPanelFocusMoveAll, trackFocusItemReset, trackFocusActionReset } =\n useFocusTracker();\n const handleMoveAllAction = React.useCallback<Required<DSButtonT.Props>['onClick']>(\n (event) => {\n moveSelection(event);\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanel(isDestinationPanel);\n },\n [isDestinationPanel, moveSelection, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanel],\n );\n const handleMoveAllBtnFocus: React.FocusEventHandler<HTMLButtonElement> = React.useCallback(() => {\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanelFocusMoveAll(isDestinationPanel);\n }, [isDestinationPanel, trackFocusActionReset, trackFocusItemReset, trackFocusRegionPanelFocusMoveAll]);\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n\n const currRegion = isDestinationPanel\n ? REGIONS_FOCUSES.DESTINATION_PANEL_ITEM_MOVE_ALL\n : REGIONS_FOCUSES.SOURCE_PANEL_ITEM_MOVE_ALL;\n const innerRefHandlerMoveAll = React.useCallback(\n (node: HTMLButtonElement | null) => {\n setZustandRef([currRegion, '', ''], node);\n },\n [currRegion, setZustandRef],\n );\n\n const handleMoveAllKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLButtonElement>>(\n (e) => {\n const { key } = e;\n if (['ArrowLeft', 'ArrowRight'].includes(key)) {\n trackFocusItemReset();\n trackFocusActionReset();\n trackFocusRegionPanel(isDestinationPanel);\n }\n },\n [trackFocusItemReset, trackFocusActionReset, trackFocusRegionPanel, isDestinationPanel],\n );\n\n const getBatchActionableButtonProps = usePropsStore((state) => state.getBatchActionableButtonProps);\n const batchActionableButtonProps = React.useMemo(\n () => (getBatchActionableButtonProps !== undefined ? getBatchActionableButtonProps(panelMeta) : {}),\n [getBatchActionableButtonProps, panelMeta],\n );\n const buttonActions = React.useMemo(\n () => ({\n onClick: handleMoveAllAction,\n onFocus: handleMoveAllBtnFocus,\n onKeyDown: handleMoveAllKeyDown,\n }),\n [handleMoveAllAction, handleMoveAllBtnFocus, handleMoveAllKeyDown],\n );\n\n // this \"as DSButtonT.Props\" is a workaround for the fact that useGetGlobalAttributes is not able to understand overloaded types\n // intellisense will mostly lie because of this but we are using this for the spread operator and it will work for aria-* and data-* props\n const spreadableButtonProps = useGetGlobalAttributes(batchActionableButtonProps, buttonActions) as DSButtonT.Props;\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => panelMeta, [panelMeta]);\n\n return (\n <StyledMoveMultipleWrapper\n boxShadow=\"xs\"\n alignItems=\"center\"\n justifyContent=\"center\"\n cols={gridFullFraction}\n rows={gridFullFraction}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledButton\n aria-label=\"massive action button\"\n buttonType=\"icon\"\n onClick={handleMoveAllAction}\n onFocus={handleMoveAllBtnFocus}\n onKeyDown={handleMoveAllKeyDown}\n innerRef={innerRefHandlerMoveAll}\n {...spreadableButtonProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {isDestinationPanel ? (\n <StyledCloseMediumIcon\n width=\"1.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n ) : (\n <StyledArrowShortRightIcon\n width=\"1.538\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n </StyledButton>\n </StyledMoveMultipleWrapper>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6Ib;AA7IV,mBAAkB;AAClB,uBAAuB;AACvB,qBAAqB;AACrB,8BAAuC;AACvC,0BAA2C;AAC3C,sBAA6C;AAE7C,iCAAuC;AACvC,sBAAgD;AAChD,6BAAgC;AAChC,uBAAmE;AAEnE,MAAM,gCAA4B,yBAAO,qBAAM,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,sBAAsB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBtH,MAAM,mBAAe,yBAAO,gCAAY;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,kCAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAID,MAAM,4BAAwB,yBAAO,6BAA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
7
|
}
|
|
@@ -34,7 +34,6 @@ module.exports = __toCommonJS(PanelContentMiddleSection_exports);
|
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
-
var import_uid = require("uid");
|
|
38
37
|
var import_ds_system = require("@elliemae/ds-system");
|
|
39
38
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
40
39
|
var import_useOnSpecificFocus = require("./useOnSpecificFocus.js");
|
|
@@ -45,8 +44,8 @@ var import_useFocusTracker = require("../../../config/useFocusTracker/index.js")
|
|
|
45
44
|
var import_LoadingItems = require("./LoadingItems.js");
|
|
46
45
|
var import_MultipleSelectionAction = require("./MultipleSelectionAction.js");
|
|
47
46
|
var import_constants = require("../../../constants/index.js");
|
|
48
|
-
var import_DSShuttleV2Definitions = require("../../../config/DSShuttleV2Definitions.js");
|
|
49
47
|
var import_styles = require("../../../styles.js");
|
|
48
|
+
var import_ShuttleLoadingAnnouncement = require("./ShuttleLoadingAnnouncement.js");
|
|
50
49
|
const useInnerRefHandlers = (isDestinationPanel) => {
|
|
51
50
|
const setZustandRef = (0, import_useStore.useInternalStore)((state) => state.setZustandRef);
|
|
52
51
|
const currRegion = isDestinationPanel ? import_constants.REGIONS_FOCUSES.DESTINATION_PANEL : import_constants.REGIONS_FOCUSES.SOURCE_PANEL;
|
|
@@ -59,7 +58,7 @@ const useInnerRefHandlers = (isDestinationPanel) => {
|
|
|
59
58
|
return import_react.default.useMemo(() => ({ innerRefHandlerParentItem }), [innerRefHandlerParentItem]);
|
|
60
59
|
};
|
|
61
60
|
const rows = [1];
|
|
62
|
-
const StyledListWrapperMid = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
61
|
+
const StyledListWrapperMid = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.LIST_WRAPPER_MID })`
|
|
63
62
|
overflow: hidden;
|
|
64
63
|
position: relative;
|
|
65
64
|
:focus,
|
|
@@ -155,12 +154,12 @@ const PanelContentMiddleSection = import_react.default.memo((panelMetaInfo) => {
|
|
|
155
154
|
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
156
155
|
const getOwnerPropsArguments = (0, import_react.useCallback)(() => panelMetaInfo, [panelMetaInfo]);
|
|
157
156
|
const defaultAriaDescribedBy = itemList.length > 0 ? "Press Up and Down arrow to navigate the options list and Press Right and Left arrow to access items actions" : "No items available in the panel";
|
|
158
|
-
const uidDescribedBy =
|
|
157
|
+
const uidDescribedBy = (0, import_useStore.useInternalStore)((state) => state.shuttleInternalId);
|
|
159
158
|
const defaultAriaLabel = import_react.default.useMemo(
|
|
160
159
|
() => `Entering ${isDestinationPanel ? "destination" : "source"} panel. `,
|
|
161
160
|
[isDestinationPanel]
|
|
162
161
|
);
|
|
163
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
164
163
|
StyledListWrapperMid,
|
|
165
164
|
{
|
|
166
165
|
onFocus: onPanelFocus,
|
|
@@ -174,15 +173,14 @@ const PanelContentMiddleSection = import_react.default.memo((panelMetaInfo) => {
|
|
|
174
173
|
getOwnerProps,
|
|
175
174
|
getOwnerPropsArguments,
|
|
176
175
|
innerRef: innerRefHandlerParentItem,
|
|
177
|
-
children: [
|
|
176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols, rows, children: [
|
|
178
177
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledA11yNoVisible, { id: uidDescribedBy, children: defaultAriaDescribedBy }),
|
|
179
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
]
|
|
178
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ShuttleLoadingAnnouncement.ShuttleLoadingAnnouncement, { isLoading }),
|
|
179
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LoadingItems.LoadingItems, { ...panelMetaInfo }) : null,
|
|
180
|
+
showEmptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_EmptyItems.EmptyItems, { ...panelMetaInfo }) : null,
|
|
181
|
+
showItems ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Index.ItemListWrapperWithContext, { ...panelMetaInfo }) : null,
|
|
182
|
+
hasMultipleSelection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_MultipleSelectionAction.MultipleSelectionAction, { ...panelMetaInfo }) : null
|
|
183
|
+
] })
|
|
186
184
|
}
|
|
187
185
|
);
|
|
188
186
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Panel/middle/PanelContentMiddleSection.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useOnSpecificFocus } from './useOnSpecificFocus.js';\nimport { usePropsStore, useInternalStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { ItemListWrapperWithContext } from './ItemListWrapper/Index.js';\nimport { EmptyItems } from './EmptyItems.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { LoadingItems } from './LoadingItems.js';\nimport { MultipleSelectionAction } from './MultipleSelectionAction.js';\nimport { DSShuttleV2Name, REGIONS_FOCUSES, DSShuttleV2Slots } from '../../../constants/index.js';\nimport { StyledA11yNoVisible } from '../../../styles.js';\nimport { ShuttleLoadingAnnouncement } from './ShuttleLoadingAnnouncement.js';\n\nconst useInnerRefHandlers = (isDestinationPanel: boolean) => {\n const setZustandRef = useInternalStore((state) => state.setZustandRef);\n const currRegion = isDestinationPanel ? REGIONS_FOCUSES.DESTINATION_PANEL : REGIONS_FOCUSES.SOURCE_PANEL;\n\n const innerRefHandlerParentItem = React.useCallback(\n (node: HTMLDivElement | null) => {\n setZustandRef([currRegion, '', ''], node);\n },\n [currRegion, setZustandRef],\n );\n return React.useMemo(() => ({ innerRefHandlerParentItem }), [innerRefHandlerParentItem]);\n};\n\nconst rows = [1];\n\nconst StyledListWrapperMid = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_MID })`\n overflow: hidden;\n position: relative;\n :focus,\n :focus-visible {\n outline: 2px solid brand-700;\n }\n`;\n\nexport const PanelContentMiddleSection = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false, hasMultipleSelection } = panelMetaInfo;\n const itemsLength = usePropsStore((state) =>\n isDestinationPanel ? state.destinationData.length : state.sourceData.length,\n );\n\n const itemList = usePropsStore((state) =>\n isDestinationPanel ? state.destinationConfiguredData : state.sourceConfiguredData,\n );\n const isLoading = usePropsStore((state) => (isDestinationPanel ? state.destinationIsLoading : state.sourceIsLoading));\n const showEmptyMessage = !isLoading && itemsLength === 0;\n const showItems = !isLoading && !showEmptyMessage;\n\n const actionRef = usePropsStore((state) =>\n isDestinationPanel ? state.destinationVirtualRef : state.sourceVirtualRef,\n );\n\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const withLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.destinationWithLoadMore : state.sourceWithLoadMore,\n );\n const { innerRefHandlerParentItem } = useInnerRefHandlers(isDestinationPanel);\n const {\n trackFocusRegionPanel,\n trackFocusItemFirst,\n trackFocusItemLast,\n trackFocusActionParent,\n trackFocusRegionPanelItem,\n trackFocusLoadMoreBtnDestination,\n trackFocusLoadMoreBtn,\n } = useFocusTracker();\n const config = React.useMemo(\n () => ({\n onFocus: () => {\n trackFocusRegionPanel(isDestinationPanel);\n },\n }),\n [trackFocusRegionPanel, isDestinationPanel],\n );\n const onPanelFocus = useOnSpecificFocus(config);\n\n const onPanelKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLDivElement>>(\n (e) => {\n const { key } = e;\n // we need to invoke \"getIsDragAndDropHappening\" here to ensure we have the latest info at the moment of the event\n const isDragAndDropHappening = getIsDragAndDropHappening();\n if (isDragAndDropHappening) {\n e.preventDefault();\n return;\n }\n if (['Home', 'End', 'ArrowUp', 'ArrowDown'].includes(key)) {\n e.preventDefault();\n e.stopPropagation();\n trackFocusRegionPanelItem(isDestinationPanel);\n trackFocusActionParent();\n // we won't receive ArrowUp/ArrowDown if this happens in a child because children are stopping propagation\n if ((key === 'ArrowDown' || key === 'Home') && itemList.length > 0) {\n actionRef.current.scrollTo(0);\n trackFocusItemFirst(panelMetaInfo);\n }\n if ((key === 'ArrowUp' || key === 'End') && itemList.length > 0) {\n if (withLoadMore) {\n if (isDestinationPanel) trackFocusLoadMoreBtnDestination();\n else trackFocusLoadMoreBtn();\n } else {\n trackFocusItemLast(panelMetaInfo);\n actionRef.current.scrollTo(itemsLength - 1);\n }\n }\n }\n },\n [\n getIsDragAndDropHappening,\n trackFocusRegionPanelItem,\n isDestinationPanel,\n trackFocusActionParent,\n itemList.length,\n actionRef,\n trackFocusItemFirst,\n panelMetaInfo,\n withLoadMore,\n trackFocusLoadMoreBtnDestination,\n trackFocusLoadMoreBtn,\n trackFocusItemLast,\n itemsLength,\n ],\n );\n\n const cols = React.useMemo(() => {\n if (hasMultipleSelection) return ['1fr', '5rem'];\n return ['auto'];\n }, [hasMultipleSelection]);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n const defaultAriaDescribedBy =\n itemList.length > 0\n ? 'Press Up and Down arrow to navigate the options list and Press Right and Left arrow to access items actions'\n : 'No items available in the panel';\n\n const uidDescribedBy = useInternalStore((state) => state.shuttleInternalId);\n\n const defaultAriaLabel = React.useMemo(\n () => `Entering ${isDestinationPanel ? 'destination' : 'source'} panel. `,\n [isDestinationPanel],\n );\n\n return (\n <StyledListWrapperMid\n onFocus={onPanelFocus}\n onKeyDown={onPanelKeyDown}\n role=\"group\"\n tabIndex={0}\n rows={rows}\n aria-label={defaultAriaLabel}\n aria-describedby={uidDescribedBy}\n aria-roledescription={isDestinationPanel ? 'shuttle right panel' : 'shuttle left panel'}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n innerRef={innerRefHandlerParentItem}\n >\n <Grid cols={cols} rows={rows}>\n <StyledA11yNoVisible id={uidDescribedBy}>{defaultAriaDescribedBy}</StyledA11yNoVisible>\n <ShuttleLoadingAnnouncement isLoading={isLoading} />\n {isLoading ? <LoadingItems {...panelMetaInfo} /> : null}\n {showEmptyMessage ? <EmptyItems {...panelMetaInfo} /> : null}\n {showItems ? <ItemListWrapperWithContext {...panelMetaInfo} /> : null}\n {hasMultipleSelection ? <MultipleSelectionAction {...panelMetaInfo} /> : null}\n </Grid>\n </StyledListWrapperMid>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmKjB;AAjKN,mBAAmC;AACnC,uBAAuB;AACvB,qBAAqB;AACrB,gCAAmC;AACnC,sBAAgD;AAEhD,mBAA2C;AAC3C,wBAA2B;AAC3B,6BAAgC;AAChC,0BAA6B;AAC7B,qCAAwC;AACxC,uBAAmE;AACnE,oBAAoC;AACpC,wCAA2C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getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var ShuttleLoadingAnnouncement_exports = {};
|
|
30
|
+
__export(ShuttleLoadingAnnouncement_exports, {
|
|
31
|
+
ShuttleLoadingAnnouncement: () => ShuttleLoadingAnnouncement
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(ShuttleLoadingAnnouncement_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_styles = require("../../../styles.js");
|
|
37
|
+
const ShuttleLoadingAnnouncement = ({ isLoading }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledA11yNoVisible, { role: "status", "aria-atomic": "true", children: isLoading ? "Loading items\u2026" : "Content loaded" });
|
|
38
|
+
//# sourceMappingURL=ShuttleLoadingAnnouncement.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/Panel/middle/ShuttleLoadingAnnouncement.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { StyledA11yNoVisible } from '../../../styles.js';\n\nexport const ShuttleLoadingAnnouncement = ({ isLoading }: { isLoading: boolean }) => (\n <StyledA11yNoVisible role=\"status\" aria-atomic=\"true\">\n {isLoading ? 'Loading items\u2026' : 'Content loaded'}\n </StyledA11yNoVisible>\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIrB;AAHF,oBAAoC;AAE7B,MAAM,6BAA6B,CAAC,EAAE,UAAU,MACrD,4CAAC,qCAAoB,MAAK,UAAS,eAAY,QAC5C,sBAAY,wBAAmB,kBAClC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -39,8 +39,8 @@ var import_ds_grid = require("@elliemae/ds-grid");
|
|
|
39
39
|
var import_useStore = require("../../../config/useStore/index.js");
|
|
40
40
|
var import_SelectionHeader = require("./SelectionHeader.js");
|
|
41
41
|
var import_PanelFilterSection = require("./PanelFilterSection.js");
|
|
42
|
-
var
|
|
43
|
-
const StyledListWrapperTop = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
42
|
+
var import_constants = require("../../../constants/index.js");
|
|
43
|
+
const StyledListWrapperTop = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.LIST_WRAPPER_TOP })``;
|
|
44
44
|
const PanelContentTopSection = (panelMetaInfo) => {
|
|
45
45
|
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
46
46
|
const getOwnerPropsArguments = (0, import_react.useCallback)(() => panelMetaInfo, [panelMetaInfo]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Panel/top/PanelContentTopSection.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { SelectionHeader } from './SelectionHeader.js';\nimport { PanelFilterSection } from './PanelFilterSection.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AA1BJ,mBAAmC;AACnC,uBAAuB;AACvB,qBAAqB;AACrB,sBAA8B;AAE9B,6BAAgC;AAChC,gCAAmC;AACnC,
|
|
4
|
+
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { SelectionHeader } from './SelectionHeader.js';\nimport { PanelFilterSection } from './PanelFilterSection.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\n\nconst StyledListWrapperTop = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER_TOP })``;\n\nexport const PanelContentTopSection = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n const { isDestinationPanel = false } = panelMetaInfo;\n const isSearchBarOpen = usePropsStore((state) =>\n isDestinationPanel ? state.destinationShowSearchbar : state.sourceShowSearchbar,\n );\n const topSectionRows = React.useMemo(() => {\n const cols = [];\n if (isSearchBarOpen) cols.push('auto');\n cols.push('auto');\n return cols;\n }, [isSearchBarOpen]);\n return (\n <StyledListWrapperTop\n rows={topSectionRows}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {isSearchBarOpen ? <PanelFilterSection {...panelMetaInfo} /> : null}\n <SelectionHeader {...panelMetaInfo} />\n </StyledListWrapperTop>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AA1BJ,mBAAmC;AACnC,uBAAuB;AACvB,qBAAqB;AACrB,sBAA8B;AAE9B,6BAAgC;AAChC,gCAAmC;AACnC,uBAAkD;AAElD,MAAM,2BAAuB,yBAAO,qBAAM,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,iBAAiB,CAAC;AAErG,MAAM,yBAAyB,CAAC,kBAA8C;AACnF,QAAM,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,6BAAyB,0BAAY,MAAM,eAAe,CAAC,aAAa,CAAC;AAE/E,QAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,QAAM,sBAAkB;AAAA,IAAc,CAAC,UACrC,qBAAqB,MAAM,2BAA2B,MAAM;AAAA,EAC9D;AACA,QAAM,iBAAiB,aAAAA,QAAM,QAAQ,MAAM;AACzC,UAAM,OAAO,CAAC;AACd,QAAI,gBAAiB,MAAK,KAAK,MAAM;AACrC,SAAK,KAAK,MAAM;AAChB,WAAO;AAAA,EACT,GAAG,CAAC,eAAe,CAAC;AACpB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MAEC;AAAA,0BAAkB,4CAAC,gDAAoB,GAAG,eAAe,IAAK;AAAA,QAC/D,4CAAC,0CAAiB,GAAG,eAAe;AAAA;AAAA;AAAA,EACtC;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -38,12 +38,12 @@ var import_ds_grid = require("@elliemae/ds-grid");
|
|
|
38
38
|
var import_ds_system = require("@elliemae/ds-system");
|
|
39
39
|
var import_ds_form_input_text = require("@elliemae/ds-form-input-text");
|
|
40
40
|
var import_useStore = require("../../../config/useStore/index.js");
|
|
41
|
-
var
|
|
42
|
-
const StyledSearchWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
41
|
+
var import_constants = require("../../../constants/index.js");
|
|
42
|
+
const StyledSearchWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.AREA_SEARCH_WRAPPER })`
|
|
43
43
|
border-bottom: 1px solid neutral-400;
|
|
44
44
|
border-radius: 0;
|
|
45
45
|
`;
|
|
46
|
-
const StyledInputText = (0, import_ds_system.styled)(import_ds_form_input_text.DSInputText, { name:
|
|
46
|
+
const StyledInputText = (0, import_ds_system.styled)(import_ds_form_input_text.DSInputText, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.AREA_SEARCH_BAR })`
|
|
47
47
|
border: none;
|
|
48
48
|
:focus {
|
|
49
49
|
border-radius: 0;
|
|
@@ -52,6 +52,7 @@ const StyledInputText = (0, import_ds_system.styled)(import_ds_form_input_text.D
|
|
|
52
52
|
const PanelFilterSection = (panelMetaInfo) => {
|
|
53
53
|
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
54
54
|
const getOwnerPropsArguments = (0, import_react.useCallback)(() => panelMetaInfo, [panelMetaInfo]);
|
|
55
|
+
const shuttleId = (0, import_useStore.useInternalStore)((state) => state.shuttleInternalId);
|
|
55
56
|
const areaSearchBarProps = (0, import_useStore.usePropsStore)((store) => store.areaSearchBarProps);
|
|
56
57
|
const { isDestinationPanel = false } = panelMetaInfo;
|
|
57
58
|
const onFilterCb = (0, import_useStore.usePropsStore)(
|
|
@@ -66,15 +67,16 @@ const PanelFilterSection = (panelMetaInfo) => {
|
|
|
66
67
|
},
|
|
67
68
|
[onFilterCb]
|
|
68
69
|
);
|
|
70
|
+
const inputTextId = isDestinationPanel ? `${import_constants.SHUTTLE_IDS.DESTINATION_PANEL_SEARCH}-${shuttleId}` : `${import_constants.SHUTTLE_IDS.SOURCE_PANEL_SEARCH}-${shuttleId}`;
|
|
69
71
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledSearchWrapper, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
72
|
StyledInputText,
|
|
71
73
|
{
|
|
74
|
+
id: inputTextId,
|
|
72
75
|
value: filterValue,
|
|
73
76
|
onValueChange: handleFilterChange,
|
|
74
77
|
"aria-label": isDestinationPanel ? "Destination input search" : "Source input search",
|
|
75
78
|
getOwnerProps,
|
|
76
79
|
getOwnerPropsArguments,
|
|
77
|
-
autoFocus: true,
|
|
78
80
|
...areaSearchBarProps && areaSearchBarProps({ isDestinationPanel })
|
|
79
81
|
}
|
|
80
82
|
) });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Panel/top/PanelFilterSection.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { DSInputText } from '@elliemae/ds-form-input-text';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { DSInputText } from '@elliemae/ds-form-input-text';\nimport { usePropsStore, useInternalStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots, SHUTTLE_IDS } from '../../../constants/index.js';\n\nconst StyledSearchWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.AREA_SEARCH_WRAPPER })`\n border-bottom: 1px solid neutral-400;\n border-radius: 0;\n`;\nconst StyledInputText = styled(DSInputText, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.AREA_SEARCH_BAR })`\n border: none;\n :focus {\n border-radius: 0;\n }\n`;\n\nexport const PanelFilterSection = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(() => panelMetaInfo, [panelMetaInfo]);\n const shuttleId = useInternalStore((state) => state.shuttleInternalId);\n const areaSearchBarProps = usePropsStore((store) => store.areaSearchBarProps);\n const { isDestinationPanel = false } = panelMetaInfo;\n const onFilterCb = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationFilterChange : state.onSourceFilterChange,\n );\n const filterValue = usePropsStore((state) =>\n isDestinationPanel ? state.destinationFilterValue : state.sourceFilterValue,\n );\n const handleFilterChange = React.useCallback(\n (value: string | number, event: React.ChangeEvent<HTMLInputElement>) => {\n onFilterCb?.(`${value}`, { event });\n },\n [onFilterCb],\n );\n\n const inputTextId = isDestinationPanel\n ? `${SHUTTLE_IDS.DESTINATION_PANEL_SEARCH}-${shuttleId}`\n : `${SHUTTLE_IDS.SOURCE_PANEL_SEARCH}-${shuttleId}`;\n return (\n <StyledSearchWrapper getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledInputText\n id={inputTextId}\n value={filterValue}\n onValueChange={handleFilterChange}\n aria-label={isDestinationPanel ? 'Destination input search' : 'Source input search'}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...(areaSearchBarProps && areaSearchBarProps({ isDestinationPanel }))}\n />\n </StyledSearchWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2CjB;AA3CN,mBAAmC;AACnC,qBAAqB;AACrB,uBAAuB;AACvB,gCAA4B;AAC5B,sBAAgD;AAEhD,uBAA+D;AAE/D,MAAM,0BAAsB,yBAAO,qBAAM,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,oBAAoB,CAAC;AAAA;AAAA;AAAA;AAI9G,MAAM,sBAAkB,yBAAO,uCAAa,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,gBAAgB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOtG,MAAM,qBAAqB,CAAC,kBAA8C;AAC/E,QAAM,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,6BAAyB,0BAAY,MAAM,eAAe,CAAC,aAAa,CAAC;AAC/E,QAAM,gBAAY,kCAAiB,CAAC,UAAU,MAAM,iBAAiB;AACrE,QAAM,yBAAqB,+BAAc,CAAC,UAAU,MAAM,kBAAkB;AAC5E,QAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,QAAM,iBAAa;AAAA,IAAc,CAAC,UAChC,qBAAqB,MAAM,4BAA4B,MAAM;AAAA,EAC/D;AACA,QAAM,kBAAc;AAAA,IAAc,CAAC,UACjC,qBAAqB,MAAM,yBAAyB,MAAM;AAAA,EAC5D;AACA,QAAM,qBAAqB,aAAAA,QAAM;AAAA,IAC/B,CAAC,OAAwB,UAA+C;AACtE,mBAAa,GAAG,KAAK,IAAI,EAAE,MAAM,CAAC;AAAA,IACpC;AAAA,IACA,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,cAAc,qBAChB,GAAG,6BAAY,wBAAwB,IAAI,SAAS,KACpD,GAAG,6BAAY,mBAAmB,IAAI,SAAS;AACnD,SACE,4CAAC,uBAAoB,eAA8B,wBACjD;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,eAAe;AAAA,MACf,cAAY,qBAAqB,6BAA6B;AAAA,MAC9D;AAAA,MACA;AAAA,MACC,GAAI,sBAAsB,mBAAmB,EAAE,mBAAmB,CAAC;AAAA;AAAA,EACtE,GACF;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -38,10 +38,10 @@ var import_ds_system = require("@elliemae/ds-system");
|
|
|
38
38
|
var import_ds_form_checkbox = require("@elliemae/ds-form-checkbox");
|
|
39
39
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
40
40
|
var import_useStore = require("../../../config/useStore/index.js");
|
|
41
|
-
var
|
|
41
|
+
var import_constants = require("../../../constants/index.js");
|
|
42
42
|
const StyledSelectionHeaderWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
43
|
-
name:
|
|
44
|
-
slot:
|
|
43
|
+
name: import_constants.DSShuttleV2Name,
|
|
44
|
+
slot: import_constants.DSShuttleV2Slots.AREA_SELECTION_HEADER
|
|
45
45
|
})`
|
|
46
46
|
line-height: 1;
|
|
47
47
|
font-size: 1rem;
|
|
@@ -49,8 +49,8 @@ const StyledSelectionHeaderWrapper = (0, import_ds_system.styled)(import_ds_grid
|
|
|
49
49
|
border-bottom: 1px solid neutral-400;
|
|
50
50
|
`;
|
|
51
51
|
const StyledSelectionHeaderCountLabel = (0, import_ds_system.styled)("div", {
|
|
52
|
-
name:
|
|
53
|
-
slot:
|
|
52
|
+
name: import_constants.DSShuttleV2Name,
|
|
53
|
+
slot: import_constants.DSShuttleV2Slots.AREA_SELECTION_HEADER_COUNT_LABEL
|
|
54
54
|
})`
|
|
55
55
|
text-align: end;
|
|
56
56
|
color: neutral-500;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Panel/top/SelectionHeader.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSControlledCheckbox, type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { Grid } from '@elliemae/ds-grid';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8Ff;AA9FR,mBAA4C;AAC5C,uBAAuB;AACvB,8BAAiE;AACjE,qBAAqB;AACrB,sBAA8B;AAE9B,
|
|
4
|
+
"sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSControlledCheckbox, type DSControlledCheckboxT } from '@elliemae/ds-form-checkbox';\nimport { Grid } from '@elliemae/ds-grid';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../constants/index.js';\n\nconst StyledSelectionHeaderWrapper = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER,\n})`\n line-height: 1;\n font-size: 1rem;\n background-color: neutral-000;\n border-bottom: 1px solid neutral-400;\n`;\nconst StyledSelectionHeaderCountLabel = styled('div', {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.AREA_SELECTION_HEADER_COUNT_LABEL,\n})`\n text-align: end;\n color: neutral-500;\n font-weight: 600;\n`;\n\nconst StyledCheckbox = styled(DSControlledCheckbox)``;\n\nconst wrapperCols = ['auto', '1fr'];\nexport const SelectionHeader = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const selectionableItems = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionableData : state.sourceSelectionableData,\n );\n const ids = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionableIds : state.sourceSelectionableIds,\n );\n\n const checkboxSelectAllProps = usePropsStore((state) => state.checkboxSelectAllProps);\n\n const ariaControls = useMemo(\n () =>\n ids.length === 0\n ? ''\n : ids\n .split(' ')\n .map((d) => `${d}-wrapper`)\n .join(' '),\n [ids],\n );\n\n const onSelectionChange = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationSelectionChange : state.onSourceSelectionChange,\n );\n const selectionLength = usePropsStore((state) =>\n isDestinationPanel ? state.destinationSelectionItemArray.length : state.sourceSelectionItemArray.length,\n );\n const checkboxValue = React.useMemo(() => {\n let newVal: boolean | 'mixed' = false;\n if (selectionLength > 0)\n if (selectionLength === selectionableItems.length) newVal = true;\n else newVal = 'mixed';\n return newVal;\n }, [selectionableItems.length, selectionLength]);\n\n const handleSelectAll = React.useCallback<DSControlledCheckboxT.InternalProps['onChange']>(\n (_, event) => {\n if (checkboxValue === true) {\n onSelectionChange({}, { event });\n } else {\n const newSelection: DSShuttleV2T.InternalProps<object, object, object, object>['sourceSelectedItems'] = {};\n selectionableItems.forEach((selectableItem) => {\n newSelection[selectableItem.hydratedId] = true;\n });\n onSelectionChange(newSelection, { event });\n }\n },\n [checkboxValue, onSelectionChange, selectionableItems],\n );\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n return (\n <StyledSelectionHeaderWrapper\n cols={wrapperCols}\n justifyContent=\"center\"\n alignItems=\"center\"\n py=\"7px\"\n px=\"xxs2\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid justifyContent=\"center\" alignItems=\"center\">\n <StyledCheckbox\n checked={checkboxValue}\n aria-label={`${checkboxValue === true ? 'Deselect' : 'Select'} all ${\n isDestinationPanel ? 'destination' : 'source'\n } items`}\n onChange={handleSelectAll}\n aria-controls={ariaControls}\n // need to overwrite this becasue the default aria-labelledby is not working for axe-core\n aria-labelledby=\"\"\n disabled={selectionableItems.length === 0}\n aria-disabled={selectionableItems.length === 0}\n {...(checkboxSelectAllProps &&\n checkboxSelectAllProps({ isDestinationPanel, hasMultipleSelection: selectionLength > 1 }))}\n />\n </Grid>\n <StyledSelectionHeaderCountLabel getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {selectionLength} selected\n </StyledSelectionHeaderCountLabel>\n </StyledSelectionHeaderWrapper>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8Ff;AA9FR,mBAA4C;AAC5C,uBAAuB;AACvB,8BAAiE;AACjE,qBAAqB;AACrB,sBAA8B;AAE9B,uBAAkD;AAElD,MAAM,mCAA+B,yBAAO,qBAAM;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,kCAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAMD,MAAM,sCAAkC,yBAAO,OAAO;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,kCAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAAA;AAMD,MAAM,qBAAiB,yBAAO,4CAAoB;AAElD,MAAM,cAAc,C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ACA,CAAC,eAAe,mBAAmB,kBAAkB;AAAA,EACvD;AAEA,QAAM,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,6BAAyB,0BAAY,MAAM,eAAe,CAAC,aAAa,CAAC;AAE/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,gBAAe;AAAA,MACf,YAAW;AAAA,MACX,IAAG;AAAA,MACH,IAAG;AAAA,MACH;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,uBAAK,gBAAe,UAAS,YAAW,UACvC;AAAA,UAAC;AAAA;AAAA,YACC,SAAS;AAAA,YACT,cAAY,GAAG,kBAAkB,OAAO,aAAa,QAAQ,QAC3D,qBAAqB,gBAAgB,QACvC;AAAA,YACA,UAAU;AAAA,YACV,iBAAe;AAAA,YAEf,mBAAgB;AAAA,YAChB,UAAU,mBAAmB,WAAW;AAAA,YACxC,iBAAe,mBAAmB,WAAW;AAAA,YAC5C,GAAI,0BACH,uBAAuB,EAAE,oBAAoB,sBAAsB,kBAAkB,EAAE,CAAC;AAAA;AAAA,QAC5F,GACF;AAAA,QACA,6CAAC,mCAAgC,eAA8B,wBAC5D;AAAA;AAAA,UAAgB;AAAA,WACnB;AAAA;AAAA;AAAA,EACF;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -40,12 +40,12 @@ var import_Header = require("./Header.js");
|
|
|
40
40
|
var import_PanelContentTopSection = require("./Panel/top/PanelContentTopSection.js");
|
|
41
41
|
var import_PanelContentMiddleSection = require("./Panel/middle/PanelContentMiddleSection.js");
|
|
42
42
|
var import_PanelContentBottomSection = require("./Panel/bottom/PanelContentBottomSection.js");
|
|
43
|
-
var
|
|
43
|
+
var import_constants = require("../constants/index.js");
|
|
44
44
|
var import_useStore = require("../config/useStore/useStore.js");
|
|
45
|
-
const StyledPanelWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
45
|
+
const StyledPanelWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.PANEL_WRAPPER })`
|
|
46
46
|
min-width: 300px;
|
|
47
47
|
`;
|
|
48
|
-
const StyledListWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
48
|
+
const StyledListWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSShuttleV2Name, slot: import_constants.DSShuttleV2Slots.LIST_WRAPPER })`
|
|
49
49
|
border: 1px solid neutral-400;
|
|
50
50
|
height: 100%;
|
|
51
51
|
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/PanelWrapper.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { Header } from './Header.js';\nimport { PanelContentTopSection } from './Panel/top/PanelContentTopSection.js';\nimport { PanelContentMiddleSection } from './Panel/middle/PanelContentMiddleSection.js';\nimport { PanelContentBottomSection } from './Panel/bottom/PanelContentBottomSection.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BjB;AA/BN,mBAAmC;AACnC,uBAAuB;AACvB,qBAAqB;AAErB,oBAAuB;AACvB,oCAAuC;AACvC,uCAA0C;AAC1C,uCAA0C;AAC1C,
|
|
4
|
+
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSShuttleV2T } from '../react-desc-prop-types.js';\nimport { Header } from './Header.js';\nimport { PanelContentTopSection } from './Panel/top/PanelContentTopSection.js';\nimport { PanelContentMiddleSection } from './Panel/middle/PanelContentMiddleSection.js';\nimport { PanelContentBottomSection } from './Panel/bottom/PanelContentBottomSection.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../constants/index.js';\nimport { usePropsStore } from '../config/useStore/useStore.js';\n\nconst StyledPanelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.PANEL_WRAPPER })`\n min-width: 300px;\n`;\nconst StyledListWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.LIST_WRAPPER })`\n border: 1px solid neutral-400;\n height: 100%;\n`;\nconst panelWrapperRows = ['auto', '1fr'];\nconst listWrapperRows = ['auto', '1fr', 'auto'];\n\nexport const PanelWrapper = React.memo((panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = useCallback(() => panelMetaInfo, [panelMetaInfo]);\n return (\n <StyledPanelWrapper\n rows={panelWrapperRows}\n gutter=\"xxxs\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Header {...panelMetaInfo} />\n <StyledListWrapper\n rows={listWrapperRows}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <PanelContentTopSection {...panelMetaInfo} />\n <PanelContentMiddleSection {...panelMetaInfo} />\n <PanelContentBottomSection {...panelMetaInfo} />\n </StyledListWrapper>\n </StyledPanelWrapper>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BjB;AA/BN,mBAAmC;AACnC,uBAAuB;AACvB,qBAAqB;AAErB,oBAAuB;AACvB,oCAAuC;AACvC,uCAA0C;AAC1C,uCAA0C;AAC1C,uBAAkD;AAClD,sBAA8B;AAE9B,MAAM,yBAAqB,yBAAO,qBAAM,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,cAAc,CAAC;AAAA;AAAA;AAGvG,MAAM,wBAAoB,yBAAO,qBAAM,EAAE,MAAM,kCAAiB,MAAM,kCAAiB,aAAa,CAAC;AAAA;AAAA;AAAA;AAIrG,MAAM,mBAAmB,CAAC,QAAQ,KAAK;AACvC,MAAM,kBAAkB,CAAC,QAAQ,OAAO,MAAM;AAEvC,MAAM,eAAe,aAAAA,QAAM,KAAK,CAAC,kBAA8C;AACpF,QAAM,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,6BAAyB,0BAAY,MAAM,eAAe,CAAC,aAAa,CAAC;AAC/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,QAAO;AAAA,MACP;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,wBAAQ,GAAG,eAAe;AAAA,QAC3B;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN;AAAA,YACA;AAAA,YAEA;AAAA,0DAAC,wDAAwB,GAAG,eAAe;AAAA,cAC3C,4CAAC,8DAA2B,GAAG,eAAe;AAAA,cAC9C,4CAAC,8DAA2B,GAAG,eAAe;AAAA;AAAA;AAAA,QAChD;AAAA;AAAA;AAAA,EACF;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -34,7 +34,7 @@ __export(react_desc_prop_types_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
|
-
var
|
|
37
|
+
var import_constants = require("./constants/index.js");
|
|
38
38
|
const defaultProps = {
|
|
39
39
|
addDragAndDropFromSource: false,
|
|
40
40
|
removeDragAndDropFromDestination: false,
|
|
@@ -71,7 +71,7 @@ const defaultProps = {
|
|
|
71
71
|
getPreventMove: () => false
|
|
72
72
|
};
|
|
73
73
|
const DSShuttleV2PropTypes = {
|
|
74
|
-
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(
|
|
74
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSShuttleV2Name, import_constants.DSShuttleV2Slots),
|
|
75
75
|
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
76
76
|
...import_ds_props_helpers.xstyledPropTypes,
|
|
77
77
|
sourceData: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description(
|
|
@@ -156,7 +156,7 @@ const DSShuttleV2PropTypes = {
|
|
|
156
156
|
getPreventDrilldown: import_ds_props_helpers.PropTypes.func.description("Callback function that determines whether drilldown should be prevented for a particular item.").defaultValue(() => false),
|
|
157
157
|
getCustomRenderer: import_ds_props_helpers.PropTypes.func.description("Callback function that returns a custom renderer for each item in the list.").defaultValue(() => void 0),
|
|
158
158
|
getBatchActionableButtonProps: import_ds_props_helpers.PropTypes.func.description("Callback function that returns the props for the batch actionable button in the destination list.").defaultValue(() => ({})).signature(`(({ isDestionationPanel: boolean }) => ({ "aria-label": string }))`),
|
|
159
|
-
...(0, import_ds_props_helpers.getPropsPerDatatestIdPropTypes)(
|
|
159
|
+
...(0, import_ds_props_helpers.getPropsPerDatatestIdPropTypes)(import_constants.DSShuttleV2DataTestIds),
|
|
160
160
|
destinationNoOptionsMessage: import_ds_props_helpers.PropTypes.string.description("Custome message to be display when no matches found after filtering in destination panel").defaultValue("There are no items to display"),
|
|
161
161
|
sourceNoOptionsMessage: import_ds_props_helpers.PropTypes.string.description("Custome message to be display when no matches found after filtering in source panel").defaultValue("There are no items to display"),
|
|
162
162
|
checkboxSelectAllProps: import_ds_props_helpers.PropTypes.func.description("Function that returns props for the select all checkbox in the source panel.").defaultValue({}),
|