@elliemae/ds-shuttle-v2 3.18.0-next.0 → 3.18.0-next.10
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/config/useAutoCalculated/index.js +1 -1
- package/dist/cjs/config/useAutoCalculated/index.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js +9 -60
- package/dist/cjs/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
- package/dist/cjs/exported-related/ShuttleItem.js +2 -2
- package/dist/cjs/exported-related/ShuttleItem.js.map +2 -2
- package/dist/cjs/parts/Dnd/DndHandle.js +27 -18
- package/dist/cjs/parts/Dnd/DndHandle.js.map +3 -3
- package/dist/cjs/parts/Header.js +6 -1
- package/dist/cjs/parts/Header.js.map +2 -2
- package/dist/cjs/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/cjs/parts/Item/Item.js +6 -0
- package/dist/cjs/parts/Item/Item.js.map +2 -2
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js +79 -36
- package/dist/cjs/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/cjs/parts/Item/ItemMiddleSection.js +38 -5
- package/dist/cjs/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Item/ItemOverlay.js +20 -18
- package/dist/cjs/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/cjs/parts/Item/ItemSelection.js +18 -3
- package/dist/cjs/parts/Item/ItemSelection.js.map +2 -2
- package/dist/cjs/parts/Item/TextSection.js +4 -1
- package/dist/cjs/parts/Item/TextSection.js.map +2 -2
- package/dist/cjs/parts/MainContent.js +56 -9
- package/dist/cjs/parts/MainContent.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js +4 -0
- package/dist/cjs/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js +15 -1
- package/dist/cjs/parts/Panel/bottom/LoadingMore.js.map +3 -3
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js +4 -0
- package/dist/cjs/parts/Panel/bottom/PanelContentBottomSection.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/EmptyItems.js +16 -1
- package/dist/cjs/parts/Panel/middle/EmptyItems.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js +33 -47
- package/dist/cjs/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/LoadingItems.js +25 -1
- package/dist/cjs/parts/Panel/middle/LoadingItems.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js +23 -1
- package/dist/cjs/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js +13 -17
- package/dist/cjs/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/PanelContentTopSection.js +14 -4
- package/dist/cjs/parts/Panel/top/PanelContentTopSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/PanelFilterSection.js +11 -1
- package/dist/cjs/parts/Panel/top/PanelFilterSection.js.map +2 -2
- package/dist/cjs/parts/Panel/top/SelectionHeader.js +35 -17
- package/dist/cjs/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/cjs/parts/PanelWrapper.js +31 -9
- package/dist/cjs/parts/PanelWrapper.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +3 -1
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/index.js +1 -1
- package/dist/esm/config/useAutoCalculated/index.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/useDataStructure.js.map +2 -2
- package/dist/esm/config/useAutoCalculated/useShuttleVirtualized.js +10 -61
- package/dist/esm/config/useAutoCalculated/useShuttleVirtualized.js.map +2 -2
- package/dist/esm/exported-related/ShuttleItem.js +2 -2
- package/dist/esm/exported-related/ShuttleItem.js.map +2 -2
- package/dist/esm/parts/Dnd/DndHandle.js +27 -18
- package/dist/esm/parts/Dnd/DndHandle.js.map +3 -3
- package/dist/esm/parts/Header.js +7 -2
- package/dist/esm/parts/Header.js.map +2 -2
- package/dist/esm/parts/HoC/withConditionalDnDRowContext.js.map +2 -2
- package/dist/esm/parts/Item/Item.js +7 -1
- package/dist/esm/parts/Item/Item.js.map +2 -2
- package/dist/esm/parts/Item/ItemActions/ItemActions.js +79 -36
- package/dist/esm/parts/Item/ItemActions/ItemActions.js.map +2 -2
- package/dist/esm/parts/Item/ItemMiddleSection.js +38 -5
- package/dist/esm/parts/Item/ItemMiddleSection.js.map +2 -2
- package/dist/esm/parts/Item/ItemOverlay.js +20 -18
- package/dist/esm/parts/Item/ItemOverlay.js.map +2 -2
- package/dist/esm/parts/Item/ItemSelection.js +18 -3
- package/dist/esm/parts/Item/ItemSelection.js.map +2 -2
- package/dist/esm/parts/Item/TextSection.js +4 -1
- package/dist/esm/parts/Item/TextSection.js.map +2 -2
- package/dist/esm/parts/MainContent.js +57 -10
- package/dist/esm/parts/MainContent.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js +4 -0
- package/dist/esm/parts/Panel/bottom/LoadMoreBtn.js.map +2 -2
- package/dist/esm/parts/Panel/bottom/LoadingMore.js +15 -1
- package/dist/esm/parts/Panel/bottom/LoadingMore.js.map +3 -3
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js +4 -0
- package/dist/esm/parts/Panel/bottom/PanelContentBottomSection.js.map +2 -2
- package/dist/esm/parts/Panel/middle/EmptyItems.js +16 -1
- package/dist/esm/parts/Panel/middle/EmptyItems.js.map +2 -2
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js +33 -47
- package/dist/esm/parts/Panel/middle/ItemListWrapper/Index.js.map +2 -2
- package/dist/esm/parts/Panel/middle/LoadingItems.js +25 -1
- package/dist/esm/parts/Panel/middle/LoadingItems.js.map +2 -2
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js +23 -1
- package/dist/esm/parts/Panel/middle/MultipleSelectionAction.js.map +2 -2
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js +14 -18
- package/dist/esm/parts/Panel/middle/PanelContentMiddleSection.js.map +2 -2
- package/dist/esm/parts/Panel/top/PanelContentTopSection.js +15 -5
- package/dist/esm/parts/Panel/top/PanelContentTopSection.js.map +2 -2
- package/dist/esm/parts/Panel/top/PanelFilterSection.js +12 -2
- package/dist/esm/parts/Panel/top/PanelFilterSection.js.map +2 -2
- package/dist/esm/parts/Panel/top/SelectionHeader.js +36 -18
- package/dist/esm/parts/Panel/top/SelectionHeader.js.map +2 -2
- package/dist/esm/parts/PanelWrapper.js +32 -10
- package/dist/esm/parts/PanelWrapper.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +9 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/config/useAutoCalculated/index.d.ts +6 -12
- package/dist/types/config/useAutoCalculated/useShuttleVirtualized.d.ts +6 -8
- package/dist/types/config/useStore/useStore.d.ts +54 -108
- package/dist/types/parts/Dnd/DndHandle.d.ts +1 -1
- package/dist/types/parts/Header.d.ts +1 -1
- package/dist/types/parts/Item/ItemMiddleSection.d.ts +1 -1
- package/dist/types/parts/Item/ItemOverlay.d.ts +3 -1
- package/dist/types/parts/Item/ItemSelection.d.ts +1 -1
- package/dist/types/parts/Panel/top/SelectionHeader.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +2 -1
- package/package.json +23 -22
|
@@ -41,6 +41,7 @@ var import_ds_icons = require("@elliemae/ds-icons");
|
|
|
41
41
|
var import_useActionsHandlers = require("./useActionsHandlers.js");
|
|
42
42
|
var import_useInnerRefHandlers = require("./useInnerRefHandlers.js");
|
|
43
43
|
var import_DSShuttleV2Definitions = require("../../../config/DSShuttleV2Definitions.js");
|
|
44
|
+
var import_useStore = require("../../../config/useStore/useStore.js");
|
|
44
45
|
const StyledItemActions = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.ITEM_ACTIONS_WRAPPER })``;
|
|
45
46
|
const StyledItemActionWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.ITEM_ACTION_WRAPPER })``;
|
|
46
47
|
const StyledButton = (0, import_ds_system.styled)(import_ds_button_v2.DSButtonV2, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.ITEM_ACTION_BTN })`
|
|
@@ -81,41 +82,83 @@ const ItemActions = import_react.default.memo((itemMeta) => {
|
|
|
81
82
|
() => `Move option ${label} into ${isDestinationPanel ? "source" : "destination"} panel`,
|
|
82
83
|
[label, isDestinationPanel]
|
|
83
84
|
);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
85
|
+
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
86
|
+
const getOwnerPropsArguments = import_react.default.useCallback(() => itemMeta, [itemMeta]);
|
|
87
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
StyledItemActions,
|
|
89
|
+
{
|
|
90
|
+
cols: actionsCols,
|
|
91
|
+
gutter: "xxs",
|
|
92
|
+
pl: "xs",
|
|
93
|
+
pr: "xxs",
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
getOwnerProps,
|
|
96
|
+
getOwnerPropsArguments,
|
|
97
|
+
children: withActions ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledItemActionWrapper, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
|
+
StyledButton,
|
|
100
|
+
{
|
|
101
|
+
buttonType: "icon",
|
|
102
|
+
"aria-label": drillDownAriaLabel,
|
|
103
|
+
onClick: handleClickDrilldown,
|
|
104
|
+
onKeyDown: handleKeyDownSelectionBubbleUp,
|
|
105
|
+
size: import_ds_button_v2.BUTTON_SIZES.S,
|
|
106
|
+
innerRef: innerRefHandlerDrilldown,
|
|
107
|
+
tabIndex: -1,
|
|
108
|
+
disabled: internallyDisabledDrilldown || preventDrilldown === true,
|
|
109
|
+
getOwnerProps,
|
|
110
|
+
getOwnerPropsArguments,
|
|
111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
|
+
StyledDrilldownIcon,
|
|
113
|
+
{
|
|
114
|
+
width: "1.538rem",
|
|
115
|
+
height: "1.538rem",
|
|
116
|
+
getOwnerProps,
|
|
117
|
+
getOwnerPropsArguments
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
) }),
|
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledItemActionWrapper, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
|
+
StyledButton,
|
|
124
|
+
{
|
|
125
|
+
buttonType: "icon",
|
|
126
|
+
"aria-label": moveAriaLabel,
|
|
127
|
+
onClick: handleClickSingleMove,
|
|
128
|
+
onKeyDown: handleKeyDownSelectionBubbleUp,
|
|
129
|
+
size: import_ds_button_v2.BUTTON_SIZES.S,
|
|
130
|
+
innerRef: innerRefHandlerMove,
|
|
131
|
+
tabIndex: -1,
|
|
132
|
+
disabled: internallyDisabledMove || hydratedPreventMove === true,
|
|
133
|
+
getOwnerProps,
|
|
134
|
+
getOwnerPropsArguments,
|
|
135
|
+
children: isDestinationPanel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
136
|
+
StyledCloseMediumIcon,
|
|
137
|
+
{
|
|
138
|
+
width: "1.538rem",
|
|
139
|
+
height: "1.538rem",
|
|
140
|
+
getOwnerProps,
|
|
141
|
+
getOwnerPropsArguments
|
|
142
|
+
}
|
|
143
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
144
|
+
StyledArrowShortRightIcon,
|
|
145
|
+
{
|
|
146
|
+
width: "1.538rem",
|
|
147
|
+
height: "1.538rem",
|
|
148
|
+
getOwnerProps,
|
|
149
|
+
getOwnerPropsArguments
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
) })
|
|
154
|
+
] }) : (
|
|
155
|
+
// this is a place-holder used for mantainting the grid spacing when item has no actions (so when item is soft-deleted)
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}),
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {})
|
|
159
|
+
] })
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
);
|
|
120
163
|
});
|
|
121
164
|
//# sourceMappingURL=ItemActions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Item/ItemActions/ItemActions.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV2, BUTTON_SIZES } from '@elliemae/ds-button-v2';\nimport { ArrowShortReturn, ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useActionsHandlers } from './useActionsHandlers.js';\nimport { useInnerRefHandlers } from './useInnerRefHandlers.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\n\nconst StyledItemActions = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTIONS_WRAPPER })``;\nconst StyledItemActionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_WRAPPER })``;\nconst StyledButton = styled(DSButtonV2, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_BTN })`\n height: 1.692rem !important;\n svg {\n fill: brand-600;\n }\n :disabled svg {\n fill: neutral-200 !important;\n }\n`;\nconst StyledDrilldownIcon = styled(ArrowShortReturn, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_DRILLDOWN_ICON,\n})``;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})``;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})``;\n\nconst actionsCols = ['1.538rem', '1.538rem'];\n\nexport const ItemActions = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const {\n datumHydratables,\n isDestinationPanel,\n datumRenderFlags,\n datumInternalMeta: { hydratedPreventMove },\n } = itemMeta;\n // withActions is calculated in /src/config/configureAutoCalculated.ts\n const { withActions, internallyDisabledDrilldown, internallyDisabledMove } = datumRenderFlags;\n const { preventDrilldown, label } = datumHydratables;\n const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefHandlers(itemMeta);\n const { handleClickDrilldown, handleClickSingleMove, handleKeyDownSelectionBubbleUp } = useActionsHandlers(itemMeta);\n const drillDownAriaLabel = useMemo(() => `Drilldown into ${label} option`, [label]);\n const moveAriaLabel = useMemo(\n () => `Move option ${label} into ${isDestinationPanel ? 'source' : 'destination'} panel`,\n [label, isDestinationPanel],\n );\n\n return (\n <StyledItemActions
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV2, BUTTON_SIZES } from '@elliemae/ds-button-v2';\nimport { ArrowShortReturn, ArrowShortRight, CloseMedium } from '@elliemae/ds-icons';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useActionsHandlers } from './useActionsHandlers.js';\nimport { useInnerRefHandlers } from './useInnerRefHandlers.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\nimport { usePropsStore } from '../../../config/useStore/useStore.js';\n\nconst StyledItemActions = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTIONS_WRAPPER })``;\nconst StyledItemActionWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_WRAPPER })``;\nconst StyledButton = styled(DSButtonV2, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ACTION_BTN })`\n height: 1.692rem !important;\n svg {\n fill: brand-600;\n }\n :disabled svg {\n fill: neutral-200 !important;\n }\n`;\nconst StyledDrilldownIcon = styled(ArrowShortReturn, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_DRILLDOWN_ICON,\n})``;\nconst StyledCloseMediumIcon = styled(CloseMedium, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_SOURCE_ICON,\n})``;\nconst StyledArrowShortRightIcon = styled(ArrowShortRight, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_ACTION_BTN_TO_DESTINATION_ICON,\n})``;\n\nconst actionsCols = ['1.538rem', '1.538rem'];\n\nexport const ItemActions = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const {\n datumHydratables,\n isDestinationPanel,\n datumRenderFlags,\n datumInternalMeta: { hydratedPreventMove },\n } = itemMeta;\n // withActions is calculated in /src/config/configureAutoCalculated.ts\n const { withActions, internallyDisabledDrilldown, internallyDisabledMove } = datumRenderFlags;\n const { preventDrilldown, label } = datumHydratables;\n const { innerRefHandlerDrilldown, innerRefHandlerMove } = useInnerRefHandlers(itemMeta);\n const { handleClickDrilldown, handleClickSingleMove, handleKeyDownSelectionBubbleUp } = useActionsHandlers(itemMeta);\n const drillDownAriaLabel = useMemo(() => `Drilldown into ${label} option`, [label]);\n const moveAriaLabel = useMemo(\n () => `Move option ${label} into ${isDestinationPanel ? 'source' : 'destination'} panel`,\n [label, isDestinationPanel],\n );\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n\n return (\n <StyledItemActions\n cols={actionsCols}\n gutter=\"xxs\"\n pl=\"xs\"\n pr=\"xxs\"\n alignItems=\"center\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {withActions ? (\n <>\n <StyledItemActionWrapper getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledButton\n buttonType=\"icon\"\n aria-label={drillDownAriaLabel}\n onClick={handleClickDrilldown}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerDrilldown}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledDrilldown || preventDrilldown === true}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledDrilldownIcon\n width=\"1.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n </StyledButton>\n </StyledItemActionWrapper>\n <StyledItemActionWrapper getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledButton\n buttonType=\"icon\"\n aria-label={moveAriaLabel}\n onClick={handleClickSingleMove}\n onKeyDown={handleKeyDownSelectionBubbleUp}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerMove}\n tabIndex={-1} // We overwrite it via vanilla js on the focus manager\n disabled={internallyDisabledMove || hydratedPreventMove === true}\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.538rem\"\n height=\"1.538rem\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n </StyledButton>\n </StyledItemActionWrapper>\n </>\n ) : (\n // this is a place-holder used for mantainting the grid spacing when item has no actions (so when item is soft-deleted)\n <>\n <div />\n <div />\n </>\n )}\n </StyledItemActions>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqEf;AArER,mBAA+B;AAC/B,uBAAuB;AACvB,qBAAqB;AACrB,0BAAyC;AACzC,sBAA+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CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -39,6 +39,7 @@ var import_ds_grid = require("@elliemae/ds-grid");
|
|
|
39
39
|
var import_DSShuttleV2Definitions = require("../../config/DSShuttleV2Definitions.js");
|
|
40
40
|
var import_TextSection = require("./TextSection.js");
|
|
41
41
|
var import_useThisItemIsFocused = require("./useThisItemIsFocused.js");
|
|
42
|
+
var import_useStore = require("../../config/useStore/useStore.js");
|
|
42
43
|
const IconWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.ITEM_ICON_WRAPPER })`
|
|
43
44
|
min-height: 1rem;
|
|
44
45
|
`;
|
|
@@ -96,12 +97,44 @@ const ItemMiddleSection = import_react.default.memo(
|
|
|
96
97
|
dynamicCols.push("1fr");
|
|
97
98
|
return dynamicCols;
|
|
98
99
|
}, [CustomRenderer, Icon]);
|
|
100
|
+
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
101
|
+
const getOwnerPropsArguments = import_react.default.useCallback(() => props, [props]);
|
|
99
102
|
if (CustomRenderer)
|
|
100
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
104
|
+
MidSection,
|
|
105
|
+
{
|
|
106
|
+
cols: customMidSectionCols,
|
|
107
|
+
rows: customMidSectionRows,
|
|
108
|
+
$softDeleted: Boolean(softDeleted),
|
|
109
|
+
getOwnerProps,
|
|
110
|
+
getOwnerPropsArguments,
|
|
111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomRenderer, { ...customComponentProps })
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
115
|
+
MidSection,
|
|
116
|
+
{
|
|
117
|
+
cols,
|
|
118
|
+
alignItems: "center",
|
|
119
|
+
ml: "xxs",
|
|
120
|
+
$softDeleted: Boolean(softDeleted),
|
|
121
|
+
getOwnerProps,
|
|
122
|
+
getOwnerPropsArguments,
|
|
123
|
+
children: [
|
|
124
|
+
Icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
|
+
IconWrapper,
|
|
126
|
+
{
|
|
127
|
+
alignItems: "center",
|
|
128
|
+
mr: "xxs",
|
|
129
|
+
getOwnerProps,
|
|
130
|
+
getOwnerPropsArguments,
|
|
131
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { ...customComponentProps })
|
|
132
|
+
}
|
|
133
|
+
) : null,
|
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TextSection.TextSection, { ...itemMeta })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
|
105
138
|
}
|
|
106
139
|
);
|
|
107
140
|
//# sourceMappingURL=ItemMiddleSection.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/Item/ItemMiddleSection.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 { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\nimport { TextSection } from './TextSection.js';\nimport { useThisItemIsFocused } from './useThisItemIsFocused.js';\n\nconst IconWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ICON_WRAPPER })`\n min-height: 1rem;\n`;\n\nconst MidSection = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_MIDSECTION_WRAPPER,\n})<{ $softDeleted: boolean }>`\n min-height: 1rem;\n ${(props) => {\n if (props.$softDeleted)\n return `\n color: ${props.theme.colors.neutral[500]};\n svg {\n fill: ${props.theme.colors.neutral[400]};\n }\n `;\n return '';\n }};\n`;\nconst customMidSectionCols = ['1fr'];\nconst customMidSectionRows = ['1fr'];\n\nexport const ItemMiddleSection = React.memo(\n (props: DSShuttleV2T.ItemMeta & { tooltipHelpers
|
|
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 { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\nimport { TextSection } from './TextSection.js';\nimport { useThisItemIsFocused } from './useThisItemIsFocused.js';\nimport { usePropsStore } from '../../config/useStore/useStore.js';\n\nconst IconWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_ICON_WRAPPER })`\n min-height: 1rem;\n`;\n\nconst MidSection = styled(Grid, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.ITEM_MIDSECTION_WRAPPER,\n})<{ $softDeleted: boolean }>`\n min-height: 1rem;\n ${(props) => {\n if (props.$softDeleted)\n return `\n color: ${props.theme.colors.neutral[500]};\n svg {\n fill: ${props.theme.colors.neutral[400]};\n }\n `;\n return '';\n }};\n`;\nconst customMidSectionCols = ['1fr'];\nconst customMidSectionRows = ['1fr'];\n\nexport const ItemMiddleSection = React.memo(\n (props: DSShuttleV2T.ItemMeta & { tooltipHelpers?: DSShuttleV2T.ComponentProps['tooltipHelpers'] }) => {\n const { tooltipHelpers, ...itemMeta } = props;\n const { datum, datumHydratables, datumInternalMeta, isDestinationPanel, hasMultipleSelection } = itemMeta;\n const { Icon, CustomRenderer, ...componentlessHydratables } = datumHydratables;\n const { softDeleted, hydratedId } = datumInternalMeta;\n const thisItemIsFocused = useThisItemIsFocused(itemMeta);\n const customComponentProps = React.useMemo<DSShuttleV2T.ComponentProps>(\n () => ({\n datum,\n tooltipHelpers,\n thisItemIsFocused,\n panelMetaInfo: { isDestinationPanel, hasMultipleSelection },\n datumInternalMeta,\n datumHydratables: { ...componentlessHydratables, id: hydratedId },\n }),\n [\n componentlessHydratables,\n datum,\n datumInternalMeta,\n hasMultipleSelection,\n hydratedId,\n isDestinationPanel,\n thisItemIsFocused,\n tooltipHelpers,\n ],\n );\n const cols = React.useMemo(() => {\n // if CustomRenderer is defined, shortcircuit\n if (CustomRenderer) return [];\n const dynamicCols = [];\n if (Icon) dynamicCols.push('auto');\n dynamicCols.push('1fr');\n return dynamicCols;\n }, [CustomRenderer, Icon]);\n\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => props, [props]);\n\n if (CustomRenderer)\n return (\n <MidSection\n cols={customMidSectionCols}\n rows={customMidSectionRows}\n $softDeleted={Boolean(softDeleted)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <CustomRenderer {...customComponentProps} />\n </MidSection>\n );\n\n // if we ever need to do something for truncation and showing a tooltip in the future,\n // check out what has been done in exported-related/ShuttleItem.tsx\n // also, be aware that we have the headless logic alread inside tooltipHelpers\n // when this comment has been written, the logic was working with keyboard and mouse as per tooltip-v3\n // integrated with all the shuttle-v2 custom focus navigation\n return (\n <MidSection\n cols={cols}\n alignItems=\"center\"\n ml=\"xxs\"\n $softDeleted={Boolean(softDeleted)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {Icon ? (\n <IconWrapper\n alignItems=\"center\"\n mr=\"xxs\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Icon {...customComponentProps} />\n </IconWrapper>\n ) : null}\n <TextSection {...itemMeta} />\n </M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AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AACA,UAAM,OAAO,aAAAA,QAAM,QAAQ,MAAM;AAE/B,UAAI;AAAgB,eAAO,CAAC;AAC5B,YAAM,cAAc,CAAC;AACrB,UAAI;AAAM,oBAAY,KAAK,MAAM;AACjC,kBAAY,KAAK,KAAK;AACtB,aAAO;AAAA,IACT,GAAG,CAAC,gBAAgB,IAAI,CAAC;AAEzB,UAAM,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,UAAM,yBAAyB,aAAAA,QAAM,YAAY,MAAM,OAAO,CAAC,KAAK,CAAC;AAErE,QAAI;AACF,aACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,MAAM;AAAA,UACN,cAAc,QAAQ,WAAW;AAAA,UACjC;AAAA,UACA;AAAA,UAEA,sDAAC,kBAAgB,GAAG,sBAAsB;AAAA;AAAA,MAC5C;AAQJ,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,YAAW;AAAA,QACX,IAAG;AAAA,QACH,cAAc,QAAQ,WAAW;AAAA,QACjC;AAAA,QACA;AAAA,QAEC;AAAA,iBACC;AAAA,YAAC;AAAA;AAAA,cACC,YAAW;AAAA,cACX,IAAG;AAAA,cACH;AAAA,cACA;AAAA,cAEA,sDAAC,QAAM,GAAG,sBAAsB;AAAA;AAAA,UAClC,IACE;AAAA,UACJ,4CAAC,kCAAa,GAAG,UAAU;AAAA;AAAA;AAAA,IAC7B;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -53,22 +53,24 @@ const ItemWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: im
|
|
|
53
53
|
}
|
|
54
54
|
border-bottom: 1px solid neutral-100;
|
|
55
55
|
`;
|
|
56
|
-
const ItemOverlay = import_react.default.memo(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
});
|
|
56
|
+
const ItemOverlay = import_react.default.memo(
|
|
57
|
+
(itemMeta) => {
|
|
58
|
+
const { datumInternalMeta } = itemMeta;
|
|
59
|
+
const { isSelected, hydratedId } = datumInternalMeta;
|
|
60
|
+
const getIsDragAndDropHappening = (0, import_useStore.useInternalStore)((state) => state.getIsDragAndDropHappening);
|
|
61
|
+
const isDragAndDropHappening = getIsDragAndDropHappening();
|
|
62
|
+
const dndDraggingItem = (0, import_useStore.useInternalStore)((state) => state.dndDraggingItem);
|
|
63
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ItemWrapper, { cols: ["auto", "auto"], alignItems: "center", role: "checkbox", "aria-checked": isSelected, children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
|
+
import_DragOverlay.DragOverlay,
|
|
66
|
+
{
|
|
67
|
+
id: `${hydratedId}-overlay`,
|
|
68
|
+
isDndActive: isDragAndDropHappening,
|
|
69
|
+
isDragging: dndDraggingItem?.hydratedId === hydratedId
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ItemMiddleSection.ItemMiddleSection, { ...itemMeta })
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
);
|
|
74
76
|
//# sourceMappingURL=ItemOverlay.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/Item/ItemOverlay.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 { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useInternalStore } from '../../config/useStore/index.js';\nimport { ItemMiddleSection } from './ItemMiddleSection.js';\nimport { DragOverlay } from '../Dnd/DragOverlay.js';\nimport { DSShuttleV2Name } from '../../config/DSShuttleV2Definitions.js';\n\n// we are using the class-name added via slot for the children `:hover` styling of icon colors\n\nconst ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: 'item-wrapper-overlay' })`\n min-height: 2.769rem;\n position: relative;\n background-color: white;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);\n padding-right: 5px;\n\n &:focus {\n outline: 2px solid brand-700;\n outline-offset: -2px;\n }\n border-bottom: 1px solid neutral-100;\n`;\n\nexport const ItemOverlay = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n
|
|
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 { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { useInternalStore } from '../../config/useStore/index.js';\nimport { ItemMiddleSection } from './ItemMiddleSection.js';\nimport { DragOverlay } from '../Dnd/DragOverlay.js';\nimport { DSShuttleV2Name } from '../../config/DSShuttleV2Definitions.js';\n\n// we are using the class-name added via slot for the children `:hover` styling of icon colors\n\nconst ItemWrapper = styled(Grid, { name: DSShuttleV2Name, slot: 'item-wrapper-overlay' })`\n min-height: 2.769rem;\n position: relative;\n background-color: white;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);\n padding-right: 5px;\n\n &:focus {\n outline: 2px solid brand-700;\n outline-offset: -2px;\n }\n border-bottom: 1px solid neutral-100;\n`;\n\nexport const ItemOverlay = React.memo(\n (itemMeta: DSShuttleV2T.ItemMeta & { tooltipHelpers?: DSShuttleV2T.ComponentProps['tooltipHelpers'] }) => {\n const { datumInternalMeta } = itemMeta;\n const { isSelected, hydratedId } = datumInternalMeta;\n\n const getIsDragAndDropHappening = useInternalStore((state) => state.getIsDragAndDropHappening);\n const isDragAndDropHappening = getIsDragAndDropHappening();\n const dndDraggingItem = useInternalStore((state) => state.dndDraggingItem);\n\n return (\n <ItemWrapper cols={['auto', 'auto']} alignItems=\"center\" role=\"checkbox\" aria-checked={isSelected}>\n <DragOverlay\n id={`${hydratedId}-overlay`}\n isDndActive={isDragAndDropHappening}\n isDragging={dndDraggingItem?.hydratedId === hydratedId}\n />\n <ItemMiddleSection {...itemMeta} />\n </ItemWrapper>\n );\n },\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmCjB;AAnCN,mBAAkB;AAClB,uBAAuB;AACvB,qBAAqB;AAErB,sBAAiC;AACjC,+BAAkC;AAClC,yBAA4B;AAC5B,oCAAgC;AAIhC,MAAM,kBAAc,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,uBAAuB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcjF,MAAM,cAAc,aAAAA,QAAM;AAAA,EAC/B,CAAC,aAAyG;AACxG,UAAM,EAAE,kBAAkB,IAAI;AAC9B,UAAM,EAAE,YAAY,WAAW,IAAI;AAEnC,UAAM,gCAA4B,kCAAiB,CAAC,UAAU,MAAM,yBAAyB;AAC7F,UAAM,yBAAyB,0BAA0B;AACzD,UAAM,sBAAkB,kCAAiB,CAAC,UAAU,MAAM,eAAe;AAEzE,WACE,6CAAC,eAAY,MAAM,CAAC,QAAQ,MAAM,GAAG,YAAW,UAAS,MAAK,YAAW,gBAAc,YACrF;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,IAAI,GAAG;AAAA,UACP,aAAa;AAAA,UACb,YAAY,iBAAiB,eAAe;AAAA;AAAA,MAC9C;AAAA,MACA,4CAAC,8CAAmB,GAAG,UAAU;AAAA,OACnC;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -37,6 +37,7 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
38
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
39
39
|
var import_DSShuttleV2Definitions = require("../../config/DSShuttleV2Definitions.js");
|
|
40
|
+
var import_useStore = require("../../config/useStore/useStore.js");
|
|
40
41
|
const StyledItemSelection = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.ITEM_SELECTION })`
|
|
41
42
|
width: 5px;
|
|
42
43
|
height: 100%;
|
|
@@ -49,7 +50,21 @@ const StyledItemSelection = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
|
49
50
|
return props.theme.colors.brand[300];
|
|
50
51
|
}};
|
|
51
52
|
`;
|
|
52
|
-
const ItemSelection = import_react.default.memo(
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
const ItemSelection = import_react.default.memo((itemMeta) => {
|
|
54
|
+
const {
|
|
55
|
+
datumInternalMeta: { isSelected },
|
|
56
|
+
datumRenderFlags: { selectionPrevented }
|
|
57
|
+
} = itemMeta;
|
|
58
|
+
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
59
|
+
const getOwnerPropsArguments = import_react.default.useCallback(() => itemMeta, [itemMeta]);
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
|
+
StyledItemSelection,
|
|
62
|
+
{
|
|
63
|
+
$isSelected: isSelected,
|
|
64
|
+
$selectionPrevented: selectionPrevented,
|
|
65
|
+
getOwnerProps,
|
|
66
|
+
getOwnerPropsArguments
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
});
|
|
55
70
|
//# sourceMappingURL=ItemSelection.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/Item/ItemSelection.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 { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\n\n// border-right: ${(props) => {\n// if (props.$selectionPrevented === true) return `1px solid ${props.theme.colors.neutral['200']}`;\n// return '';\n// }};\n// border-bottom: ${(props) => {\n// if (props.$selectionPrevented === true) return `1px solid ${props.theme.colors.neutral['200']}`;\n// return '';\n// }};\n\nconst StyledItemSelection = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_SELECTION })<{\n $isSelected: boolean;\n $selectionPrevented?: boolean;\n}>`\n width: 5px;\n height: 100%;\n box-sizing: border-box;\n background-color: ${(props) => {\n if (props.$isSelected) return props.theme.colors.brand[600];\n if (props.$selectionPrevented === true) return props.theme.colors.neutral['080'];\n return props.theme.colors.brand[300];\n }};\n`;\n\nexport const ItemSelection = React.memo(\n
|
|
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 { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\nimport { usePropsStore } from '../../config/useStore/useStore.js';\n\n// border-right: ${(props) => {\n// if (props.$selectionPrevented === true) return `1px solid ${props.theme.colors.neutral['200']}`;\n// return '';\n// }};\n// border-bottom: ${(props) => {\n// if (props.$selectionPrevented === true) return `1px solid ${props.theme.colors.neutral['200']}`;\n// return '';\n// }};\n\nconst StyledItemSelection = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_SELECTION })<{\n $isSelected: boolean;\n $selectionPrevented?: boolean;\n}>`\n width: 5px;\n height: 100%;\n box-sizing: border-box;\n background-color: ${(props) => {\n if (props.$isSelected) return props.theme.colors.brand[600];\n if (props.$selectionPrevented === true) return props.theme.colors.neutral['080'];\n return props.theme.colors.brand[300];\n }};\n`;\n\nexport const ItemSelection = React.memo((itemMeta: DSShuttleV2T.ItemMeta) => {\n const {\n datumInternalMeta: { isSelected },\n datumRenderFlags: { selectionPrevented },\n } = itemMeta;\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => itemMeta, [itemMeta]);\n\n return (\n <StyledItemSelection\n $isSelected={isSelected}\n $selectionPrevented={selectionPrevented}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuCnB;AAvCJ,mBAAkB;AAClB,uBAAuB;AACvB,qBAAqB;AAErB,oCAAkD;AAClD,sBAA8B;AAW9B,MAAM,0BAAsB,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,+CAAiB,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA,sBAOnF,CAAC,UAAU;AAC7B,MAAI,MAAM;AAAa,WAAO,MAAM,MAAM,OAAO,MAAM,GAAG;AAC1D,MAAI,MAAM,wBAAwB;AAAM,WAAO,MAAM,MAAM,OAAO,QAAQ,KAAK;AAC/E,SAAO,MAAM,MAAM,OAAO,MAAM,GAAG;AACrC;AAAA;AAGK,MAAM,gBAAgB,aAAAA,QAAM,KAAK,CAAC,aAAoC;AAC3E,QAAM;AAAA,IACJ,mBAAmB,EAAE,WAAW;AAAA,IAChC,kBAAkB,EAAE,mBAAmB;AAAA,EACzC,IAAI;AACJ,QAAM,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyB,aAAAA,QAAM,YAAY,MAAM,UAAU,CAAC,QAAQ,CAAC;AAE3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAa;AAAA,MACb,qBAAqB;AAAA,MACrB;AAAA,MACA;AAAA;AAAA,EACF;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -38,14 +38,17 @@ var import_ds_grid = require("@elliemae/ds-grid");
|
|
|
38
38
|
var import_ds_system = require("@elliemae/ds-system");
|
|
39
39
|
var import_ds_typography = require("@elliemae/ds-typography");
|
|
40
40
|
var import_DSShuttleV2Definitions = require("../../config/DSShuttleV2Definitions.js");
|
|
41
|
+
var import_useStore = require("../../config/useStore/useStore.js");
|
|
41
42
|
const withSubtitleRows = ["auto", "auto"];
|
|
42
43
|
const LabelWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.ITEM_LABEL_WRAPPER })`
|
|
43
44
|
min-height: 1rem;
|
|
44
45
|
`;
|
|
45
46
|
const TextSection = import_react.default.memo((props) => {
|
|
47
|
+
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
48
|
+
const getOwnerPropsArguments = import_react.default.useCallback(() => props, [props]);
|
|
46
49
|
const { label, subtitle, id } = props.datumHydratables;
|
|
47
50
|
const { softDeleted } = props.datum;
|
|
48
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { id: `${id}-text-section${softDeleted ? "-soft-deleted" : ""}`, children: subtitle === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LabelWrapper, { alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { variant: "b1", children: label }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { alignItems: "center", rows: withSubtitleRows, gutter: "1px", children: [
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { id: `${id}-text-section${softDeleted ? "-soft-deleted" : ""}`, children: subtitle === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LabelWrapper, { alignItems: "center", getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { variant: "b1", children: label }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { alignItems: "center", rows: withSubtitleRows, gutter: "1px", children: [
|
|
49
52
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { variant: "b1", children: label }),
|
|
50
53
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { variant: "b4", children: subtitle })
|
|
51
54
|
] }) });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/Item/TextSection.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\n\nconst withSubtitleRows = ['auto', 'auto'];\nconst LabelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_LABEL_WRAPPER })`\n min-height: 1rem;\n`;\nexport const TextSection = React.memo((props: DSShuttleV2T.ItemMeta) => {\n const { label, subtitle, id } = props.datumHydratables;\n const { softDeleted } = props.datum;\n return (\n <Grid id={`${id}-text-section${softDeleted ? '-soft-deleted' : ''}`}>\n {subtitle === undefined ? (\n <LabelWrapper alignItems=\"center\">\n <DSTypography variant=\"b1\">{label}</DSTypography>\n </LabelWrapper>\n ) : (\n <Grid alignItems=\"center\" rows={withSubtitleRows} gutter=\"1px\">\n <DSTypography variant=\"b1\">{label}</DSTypography>\n <DSTypography variant=\"b4\">{subtitle}</DSTypography>\n </Grid>\n )}\n </Grid>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../config/DSShuttleV2Definitions.js';\nimport { type DSShuttleV2T } from '../../react-desc-prop-types.js';\nimport { usePropsStore } from '../../config/useStore/useStore.js';\n\nconst withSubtitleRows = ['auto', 'auto'];\nconst LabelWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.ITEM_LABEL_WRAPPER })`\n min-height: 1rem;\n`;\nexport const TextSection = React.memo((props: DSShuttleV2T.ItemMeta) => {\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => props, [props]);\n\n const { label, subtitle, id } = props.datumHydratables;\n const { softDeleted } = props.datum;\n return (\n <Grid id={`${id}-text-section${softDeleted ? '-soft-deleted' : ''}`}>\n {subtitle === undefined ? (\n <LabelWrapper alignItems=\"center\" getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <DSTypography variant=\"b1\">{label}</DSTypography>\n </LabelWrapper>\n ) : (\n <Grid alignItems=\"center\" rows={withSubtitleRows} gutter=\"1px\">\n <DSTypography variant=\"b1\">{label}</DSTypography>\n <DSTypography variant=\"b4\">{subtitle}</DSTypography>\n </Grid>\n )}\n </Grid>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBb;AAtBV,mBAAkB;AAClB,qBAAqB;AACrB,uBAAuB;AACvB,2BAA6B;AAC7B,oCAAkD;AAElD,sBAA8B;AAE9B,MAAM,mBAAmB,CAAC,QAAQ,MAAM;AACxC,MAAM,mBAAe,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,+CAAiB,mBAAmB,CAAC;AAAA;AAAA;AAG/F,MAAM,cAAc,aAAAA,QAAM,KAAK,CAAC,UAAiC;AACtE,QAAM,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyB,aAAAA,QAAM,YAAY,MAAM,OAAO,CAAC,KAAK,CAAC;AAErE,QAAM,EAAE,OAAO,UAAU,GAAG,IAAI,MAAM;AACtC,QAAM,EAAE,YAAY,IAAI,MAAM;AAC9B,SACE,4CAAC,uBAAK,IAAI,GAAG,kBAAkB,cAAc,kBAAkB,MAC5D,uBAAa,SACZ,4CAAC,gBAAa,YAAW,UAAS,eAA8B,wBAC9D,sDAAC,qCAAa,SAAQ,MAAM,iBAAM,GACpC,IAEA,6CAAC,uBAAK,YAAW,UAAS,MAAM,kBAAkB,QAAO,OACvD;AAAA,gDAAC,qCAAa,SAAQ,MAAM,iBAAM;AAAA,IAClC,4CAAC,qCAAa,SAAQ,MAAM,oBAAS;AAAA,KACvC,GAEJ;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(MainContent_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_ds_hooks_fontsize_detector = require("@elliemae/ds-hooks-fontsize-detector");
|
|
37
38
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
39
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
39
40
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
@@ -41,11 +42,33 @@ var import_PanelWrapper = require("./PanelWrapper.js");
|
|
|
41
42
|
var import_useStore = require("../config/useStore/index.js");
|
|
42
43
|
var import_DSShuttleV2Definitions = require("../config/DSShuttleV2Definitions.js");
|
|
43
44
|
var import_useFocusTracker = require("../config/useFocusTracker/index.js");
|
|
44
|
-
const StyledWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.WRAPPER })
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const StyledWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_DSShuttleV2Definitions.DSShuttleV2Name, slot: import_DSShuttleV2Definitions.DSShuttleV2Slots.WRAPPER })``;
|
|
46
|
+
const layoutWithSmallFont = {
|
|
47
|
+
cols: { small: ["auto"], medium: ["1fr", "1fr"] },
|
|
48
|
+
rows: { small: ["1fr", "1fr"], medium: ["auto"] }
|
|
49
|
+
};
|
|
50
|
+
const layoutWithBigFont = {
|
|
51
|
+
cols: ["auto"],
|
|
52
|
+
rows: ["1fr", "1fr"]
|
|
53
|
+
};
|
|
54
|
+
const useResizeObserver = (ref) => {
|
|
55
|
+
const [dimensions, setDimensions] = import_react.default.useState(0);
|
|
56
|
+
import_react.default.useEffect(() => {
|
|
57
|
+
if (ref) {
|
|
58
|
+
const observeTarget = ref;
|
|
59
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
60
|
+
entries.forEach((entry) => {
|
|
61
|
+
setDimensions(Math.ceil(entry.contentRect.height));
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
resizeObserver.observe(observeTarget);
|
|
65
|
+
return () => {
|
|
66
|
+
resizeObserver.unobserve(observeTarget);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}, [ref]);
|
|
70
|
+
return dimensions;
|
|
71
|
+
};
|
|
49
72
|
const MainContent = import_react.default.memo(() => {
|
|
50
73
|
const { trackFocusRegionReset, trackFocusItemReset, trackFocusActionReset } = (0, import_useFocusTracker.useFocusTracker)();
|
|
51
74
|
const config = import_react.default.useMemo(
|
|
@@ -61,9 +84,33 @@ const MainContent = import_react.default.memo(() => {
|
|
|
61
84
|
const handleOnBlurOut = (0, import_ds_utilities.useOnBlurOut)(config);
|
|
62
85
|
const destinationHasMultipleSelectedItems = (0, import_useStore.usePropsStore)((store) => store.destinationHasMultipleSelectedItems);
|
|
63
86
|
const sourceHasMultipleSelectedItems = (0, import_useStore.usePropsStore)((store) => store.sourceHasMultipleSelectedItems);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
87
|
+
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
88
|
+
const metaInfo = (0, import_ds_hooks_fontsize_detector.useFontSizeDetector)();
|
|
89
|
+
const colsAndRowsLayout = (0, import_react.useMemo)(() => {
|
|
90
|
+
if (metaInfo.isSmall) {
|
|
91
|
+
return layoutWithBigFont;
|
|
92
|
+
} else {
|
|
93
|
+
return layoutWithSmallFont;
|
|
94
|
+
}
|
|
95
|
+
}, [metaInfo]);
|
|
96
|
+
const [ref, setRef] = import_react.default.useState();
|
|
97
|
+
const parentNode = ref?.parentNode;
|
|
98
|
+
const height = useResizeObserver(parentNode);
|
|
99
|
+
const finalHeight = height !== 0 ? height : 208;
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
101
|
+
StyledWrapper,
|
|
102
|
+
{
|
|
103
|
+
gutter: "xs",
|
|
104
|
+
onBlur: handleOnBlurOut,
|
|
105
|
+
...colsAndRowsLayout,
|
|
106
|
+
getOwnerProps,
|
|
107
|
+
style: { height: `${finalHeight}px` },
|
|
108
|
+
ref: setRef,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PanelWrapper.PanelWrapper, { isDestinationPanel: false, hasMultipleSelection: sourceHasMultipleSelectedItems }),
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PanelWrapper.PanelWrapper, { isDestinationPanel: true, hasMultipleSelection: destinationHasMultipleSelectedItems })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
);
|
|
68
115
|
});
|
|
69
116
|
//# sourceMappingURL=MainContent.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/MainContent.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 { useOnBlurOut } from '@elliemae/ds-utilities';\nimport { PanelWrapper } from './PanelWrapper.js';\nimport { usePropsStore } from '../config/useStore/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../config/DSShuttleV2Definitions.js';\nimport { useFocusTracker } from '../config/useFocusTracker/index.js';\n\nconst StyledWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.WRAPPER })
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { useFontSizeDetector } from '@elliemae/ds-hooks-fontsize-detector';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useOnBlurOut } from '@elliemae/ds-utilities';\nimport { PanelWrapper } from './PanelWrapper.js';\nimport { usePropsStore } from '../config/useStore/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../config/DSShuttleV2Definitions.js';\nimport { useFocusTracker } from '../config/useFocusTracker/index.js';\n\nconst StyledWrapper = styled(Grid, { name: DSShuttleV2Name, slot: DSShuttleV2Slots.WRAPPER })``;\n\nconst layoutWithSmallFont = {\n cols: { small: ['auto'], medium: ['1fr', '1fr'] },\n rows: { small: ['1fr', '1fr'], medium: ['auto'] },\n};\nconst layoutWithBigFont = {\n cols: ['auto'],\n rows: ['1fr', '1fr'],\n};\n\ntype ResizeObserverConstructorEntries = Parameters<ConstructorParameters<typeof ResizeObserver>[0]>[0];\n\nconst useResizeObserver = (ref: HTMLElement | null | undefined) => {\n const [dimensions, setDimensions] = React.useState<number>(0);\n\n React.useEffect(() => {\n if (ref) {\n const observeTarget = ref;\n const resizeObserver = new ResizeObserver((entries: ResizeObserverConstructorEntries) => {\n entries.forEach((entry) => {\n setDimensions(Math.ceil(entry.contentRect.height));\n });\n });\n resizeObserver.observe(observeTarget);\n\n return () => {\n resizeObserver.unobserve(observeTarget);\n };\n }\n }, [ref]);\n return dimensions;\n};\n\n// this custom hook will return the font size of the font detector element\n\nexport const MainContent = React.memo(() => {\n const { trackFocusRegionReset, trackFocusItemReset, trackFocusActionReset } = useFocusTracker();\n const config = React.useMemo(\n () => ({\n onBlur: () => {\n trackFocusRegionReset();\n trackFocusItemReset();\n trackFocusActionReset();\n },\n }),\n [trackFocusActionReset, trackFocusItemReset, trackFocusRegionReset],\n );\n const handleOnBlurOut = useOnBlurOut(config);\n const destinationHasMultipleSelectedItems = usePropsStore((store) => store.destinationHasMultipleSelectedItems);\n const sourceHasMultipleSelectedItems = usePropsStore((store) => store.sourceHasMultipleSelectedItems);\n const getOwnerProps = usePropsStore((store) => store.get);\n\n const metaInfo = useFontSizeDetector();\n\n const colsAndRowsLayout = useMemo(() => {\n if (metaInfo.isSmall) {\n return layoutWithBigFont;\n } else {\n return layoutWithSmallFont;\n }\n }, [metaInfo]);\n\n const [ref, setRef] = React.useState<HTMLDivElement | null>();\n const parentNode = ref?.parentNode as HTMLElement | null | undefined;\n const height = useResizeObserver(parentNode);\n const finalHeight = height !== 0 ? height : 208;\n return (\n <StyledWrapper\n gutter=\"xs\"\n onBlur={handleOnBlurOut}\n {...colsAndRowsLayout}\n getOwnerProps={getOwnerProps}\n style={{ height: `${finalHeight}px` }}\n ref={setRef}\n >\n <PanelWrapper isDestinationPanel={false} hasMultipleSelection={sourceHasMultipleSelectedItems} />\n <PanelWrapper isDestinationPanel hasMultipleSelection={destinationHasMultipleSelectedItems} />\n </StyledWrapper>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8EnB;AA9EJ,mBAA+B;AAC/B,wCAAoC;AACpC,uBAAuB;AACvB,qBAAqB;AACrB,0BAA6B;AAC7B,0BAA6B;AAC7B,sBAA8B;AAC9B,oCAAkD;AAClD,6BAAgC;AAEhC,MAAM,oBAAgB,yBAAO,qBAAM,EAAE,MAAM,+CAAiB,MAAM,+CAAiB,QAAQ,CAAC;AAE5F,MAAM,sBAAsB;AAAA,EAC1B,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,OAAO,KAAK,EAAE;AAAA,EAChD,MAAM,EAAE,OAAO,CAAC,OAAO,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE;AAClD;AACA,MAAM,oBAAoB;AAAA,EACxB,MAAM,CAAC,MAAM;AAAA,EACb,MAAM,CAAC,OAAO,KAAK;AACrB;AAIA,MAAM,oBAAoB,CAAC,QAAwC;AACjE,QAAM,CAAC,YAAY,aAAa,IAAI,aAAAA,QAAM,SAAiB,CAAC;AAE5D,eAAAA,QAAM,UAAU,MAAM;AACpB,QAAI,KAAK;AACP,YAAM,gBAAgB;AACtB,YAAM,iBAAiB,IAAI,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;AAAA,MACpC,KAAK;AAAA,MAEL;AAAA,oDAAC,oCAAa,oBAAoB,OAAO,sBAAsB,gCAAgC;AAAA,QAC/F,4CAAC,oCAAa,oBAAkB,MAAC,sBAAsB,qCAAqC;AAAA;AAAA;AAAA,EAC9F;AAEJ,CAAC;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -63,6 +63,8 @@ const LoadMoreBtn = (panelMetaInfo) => {
|
|
|
63
63
|
[onLoadMore, panelMetaInfo, trackFocusActionParent, trackFocusItemLast, trackFocusRegionPanelItem]
|
|
64
64
|
);
|
|
65
65
|
const { innerRefHandlerLoadMoreBtn } = (0, import_useInnerRefHandlers.useInnerRefHandlers)(panelMetaInfo);
|
|
66
|
+
const getOwnerProps = (0, import_useStore.usePropsStore)((store) => store.get);
|
|
67
|
+
const getOwnerPropsArguments = import_react.default.useCallback(() => panelMetaInfo, [panelMetaInfo]);
|
|
66
68
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
69
|
StyledLoadMoreBtn,
|
|
68
70
|
{
|
|
@@ -70,6 +72,8 @@ const LoadMoreBtn = (panelMetaInfo) => {
|
|
|
70
72
|
onClick: handleOnClick,
|
|
71
73
|
size: import_ds_button_v2.BUTTON_SIZES.S,
|
|
72
74
|
innerRef: innerRefHandlerLoadMoreBtn,
|
|
75
|
+
getOwnerProps,
|
|
76
|
+
getOwnerPropsArguments,
|
|
73
77
|
children: "Load More..."
|
|
74
78
|
}
|
|
75
79
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/Panel/bottom/LoadMoreBtn.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useInnerRefHandlers } from './useInnerRefHandlers.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const { trackFocusItemLast, trackFocusActionParent, trackFocusRegionPanelItem } = useFocusTracker();\n const onLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore,\n );\n const handleOnClick = React.useCallback(\n (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n onLoadMore(e);\n trackFocusItemLast(panelMetaInfo);\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusActionParent();\n },\n [onLoadMore, panelMetaInfo, trackFocusActionParent, trackFocusItemLast, trackFocusRegionPanelItem],\n );\n const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);\n return (\n <StyledLoadMoreBtn\n buttonType=\"text\"\n onClick={handleOnClick}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerLoadMoreBtn}\n >\n Load More...\n </StyledLoadMoreBtn>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButtonV2, BUTTON_SIZES, type DSButtonT } from '@elliemae/ds-button-v2';\nimport { usePropsStore } from '../../../config/useStore/index.js';\nimport { type DSShuttleV2T } from '../../../react-desc-prop-types.js';\nimport { useInnerRefHandlers } from './useInnerRefHandlers.js';\nimport { useFocusTracker } from '../../../config/useFocusTracker/index.js';\nimport { DSShuttleV2Name, DSShuttleV2Slots } from '../../../config/DSShuttleV2Definitions.js';\n\nconst StyledLoadMoreBtn = styled(DSButtonV2, {\n name: DSShuttleV2Name,\n slot: DSShuttleV2Slots.LIST_BOTTOM_LOAD_MORE_BTN,\n})`\n width: 100%;\n height: 100%;\n`;\n\nexport const LoadMoreBtn = (panelMetaInfo: DSShuttleV2T.PanelMetaInfo) => {\n const { isDestinationPanel = false } = panelMetaInfo;\n const { trackFocusItemLast, trackFocusActionParent, trackFocusRegionPanelItem } = useFocusTracker();\n const onLoadMore = usePropsStore((state) =>\n isDestinationPanel ? state.onDestinationLoadMore : state.onSourceLoadMore,\n );\n const handleOnClick = React.useCallback(\n (e: Parameters<Required<DSButtonT.Props>['onClick']>[0]) => {\n onLoadMore(e);\n trackFocusItemLast(panelMetaInfo);\n trackFocusRegionPanelItem(panelMetaInfo.isDestinationPanel);\n trackFocusActionParent();\n },\n [onLoadMore, panelMetaInfo, trackFocusActionParent, trackFocusItemLast, trackFocusRegionPanelItem],\n );\n const { innerRefHandlerLoadMoreBtn } = useInnerRefHandlers(panelMetaInfo);\n const getOwnerProps = usePropsStore((store) => store.get);\n const getOwnerPropsArguments = React.useCallback(() => panelMetaInfo, [panelMetaInfo]);\n\n return (\n <StyledLoadMoreBtn\n buttonType=\"text\"\n onClick={handleOnClick}\n size={BUTTON_SIZES.S}\n innerRef={innerRefHandlerLoadMoreBtn}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n Load More...\n </StyledLoadMoreBtn>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqCnB;AArCJ,mBAAkB;AAClB,uBAAuB;AACvB,0BAAyD;AACzD,sBAA8B;AAE9B,iCAAoC;AACpC,6BAAgC;AAChC,oCAAkD;AAElD,MAAM,wBAAoB,yBAAO,gCAAY;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,+CAAiB;AACzB,CAAC;AAAA;AAAA;AAAA;AAKM,MAAM,cAAc,CAAC,kBAA8C;AACxE,QAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,QAAM,EAAE,oBAAoB,wBAAwB,0BAA0B,QAAI,wCAAgB;AAClG,QAAM,iBAAa;AAAA,IAAc,CAAC,UAChC,qBAAqB,MAAM,wBAAwB,MAAM;AAAA,EAC3D;AACA,QAAM,gBAAgB,aAAAA,QAAM;AAAA,IAC1B,CAAC,MAA2D;AAC1D,iBAAW,CAAC;AACZ,yBAAmB,aAAa;AAChC,gCAA0B,cAAc,kBAAkB;AAC1D,6BAAuB;AAAA,IACzB;AAAA,IACA,CAAC,YAAY,eAAe,wBAAwB,oBAAoB,yBAAyB;AAAA,EACnG;AACA,QAAM,EAAE,2BAA2B,QAAI,gDAAoB,aAAa;AACxE,QAAM,oBAAgB,+BAAc,CAAC,UAAU,MAAM,GAAG;AACxD,QAAM,yBAAyB,aAAAA,QAAM,YAAY,MAAM,eAAe,CAAC,aAAa,CAAC;AAErF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM,iCAAa;AAAA,MACnB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACD;AAAA;AAAA,EAED;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|