@economic/taco 2.44.5-create.5 → 2.44.5-create.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Provider/Localization.d.ts +0 -2
- package/dist/components/Report/Report.d.ts +1 -1
- package/dist/components/Table3/Table3.d.ts +14 -2
- package/dist/components/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +2 -1
- package/dist/components/Table3/components/Row/Editing/CreateRowButton.d.ts +11 -0
- package/dist/components/Table3/features/useTableEditing.d.ts +36 -25
- package/dist/components/Table3/types.d.ts +8 -23
- package/dist/components/Table3/useTable3.d.ts +0 -6
- package/dist/components/Table3/util/editing.d.ts +1 -2
- package/dist/esm/index.css +2 -6
- package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +2 -2
- package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +3 -5
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Switch/Switch.js +1 -1
- package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +7 -19
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +22 -21
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +37 -5
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +12 -17
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js +90 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +14 -2
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +6 -39
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +2 -7
- package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +406 -19
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +32 -37
- package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js +8 -25
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +24 -4
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +4 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +3 -9
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +3 -6
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +8 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +6 -23
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +2 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +0 -11
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/dom.js +4 -7
- package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
- package/dist/index.css +2 -6
- package/dist/primitives/Table/Core/Table.d.ts +0 -1
- package/dist/primitives/Table/Core/components/Columns/Internal/Actions.d.ts +1 -3
- package/dist/primitives/Table/Core/components/Footer/Footer.d.ts +2 -2
- package/dist/primitives/Table/Core/features/useTableRenderer.d.ts +2 -2
- package/dist/primitives/Table/Core/features/useTableStyle.d.ts +1 -1
- package/dist/primitives/Table/Core/types.d.ts +0 -3
- package/dist/primitives/Table/Core/useTable.d.ts +2 -2
- package/dist/primitives/Table/types.d.ts +2 -2
- package/dist/primitives/Table/useTableManager/useTableManager.d.ts +1 -1
- package/dist/taco.cjs.development.js +627 -904
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/dist/utils/dom.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.d.ts +0 -7
- package/dist/components/Table3/components/Row/Editing/CreateNewRow.d.ts +0 -13
- package/dist/components/Table3/components/Row/Editing/TemporaryRow.d.ts +0 -11
- package/dist/components/Table3/features/useEditingState.d.ts +0 -28
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +0 -34
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +0 -88
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +0 -95
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +0 -512
- package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +0 -1
package/dist/utils/dom.d.ts
CHANGED
@@ -2,7 +2,6 @@ export declare const hasFocusableElement: (element: HTMLElement | null) => boole
|
|
2
2
|
export declare const isOverflowing: (element: HTMLElement | null) => boolean;
|
3
3
|
export declare const getIndexOfFirstChildOverflowingParent: (element: HTMLElement, overscan?: number) => number | null;
|
4
4
|
export declare const getNextFocussableElement: (currentElement: HTMLElement | null) => HTMLElement | null;
|
5
|
-
export declare function isElementTriggeredFromContainer(element: Element | null, container: Element | null): any;
|
6
5
|
export declare function isElementInsideOrTriggeredFromContainer(element: Element | null, container: Element | null): any;
|
7
6
|
export declare function isElementInsideOverlay(element: Element | null): boolean;
|
8
7
|
export declare function isSiblingElementInsideSameParentOverlay(element: Element | null, sibling: Element | null): boolean;
|
package/package.json
CHANGED
@@ -1,7 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { DialogProps } from '../../../Dialog/Dialog';
|
3
|
-
declare type DiscardChangesConfirmationDialogProps = Partial<DialogProps> & {
|
4
|
-
onDiscard: () => void;
|
5
|
-
};
|
6
|
-
export declare function DiscardChangesConfirmationDialog(props: DiscardChangesConfirmationDialogProps): JSX.Element;
|
7
|
-
export {};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';
|
3
|
-
import { Table3EditingCreateHandler } from '../../../types';
|
4
|
-
import { TableRef } from '../../../../../primitives/Table/types';
|
5
|
-
declare type CreateNewRowProps<TType = unknown> = {
|
6
|
-
buttonRef: React.Ref<HTMLButtonElement>;
|
7
|
-
onEditingCreate?: Table3EditingCreateHandler<TType>;
|
8
|
-
table: ReactTable<TType>;
|
9
|
-
tableMeta: ReactTableMeta<TType>;
|
10
|
-
tableRef: React.RefObject<TableRef>;
|
11
|
-
};
|
12
|
-
export declare function CreateNewRow<TType = unknown>(props: CreateNewRowProps<TType>): JSX.Element;
|
13
|
-
export {};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';
|
3
|
-
import { TableRef } from '../../../../../primitives/Table/types';
|
4
|
-
declare type TemporaryRowProps<TType = unknown> = {
|
5
|
-
createRowButtonRef: React.RefObject<HTMLButtonElement>;
|
6
|
-
table: ReactTable<TType>;
|
7
|
-
tableMeta: ReactTableMeta<TType>;
|
8
|
-
tableRef: React.RefObject<TableRef>;
|
9
|
-
};
|
10
|
-
export declare function TemporaryRow<TType = unknown>(props: TemporaryRowProps<TType>): JSX.Element;
|
11
|
-
export {};
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import { Table as ReactTable, Cell as ReactTableCell } from '@tanstack/react-table';
|
2
|
-
import { Table3EditingChangeHandler, Table3EditingSaveHandler, Table3EditingValidatorFn } from '../types';
|
3
|
-
declare type EditingSaveState = 'saving' | 'saved' | 'errored';
|
4
|
-
export declare function usePendingChangesState<TType = unknown>(handleSave: Table3EditingSaveHandler<TType> | undefined, handleChange: Table3EditingChangeHandler<TType> | undefined, rowIdentityAccessor: keyof TType, validator: Table3EditingValidatorFn<TType> | undefined): {
|
5
|
-
setRowValue: <T extends TType>(rowId: string, original: T, value: Partial<T>) => Promise<void>;
|
6
|
-
getRowValue: (rowId: string) => any;
|
7
|
-
getRowMoveReason: (rowId: string) => unknown;
|
8
|
-
hasRowErrors: (rowId: string) => boolean;
|
9
|
-
hasRowErrorsShownInAlert: (rowId: string) => boolean;
|
10
|
-
getRowStatus: (rowId: string) => any;
|
11
|
-
setRowStatus: (rowId: string, status: EditingSaveState | undefined) => void;
|
12
|
-
setCellValue: <T_1 extends TType>(cell: ReactTableCell<T_1, unknown>, value: unknown) => void;
|
13
|
-
getCellValue: <T_2 extends TType>(cell: ReactTableCell<T_2, unknown>) => unknown | undefined;
|
14
|
-
getCellError: <T_3 extends TType>(cell: ReactTableCell<T_3, unknown>) => string | undefined;
|
15
|
-
onCellChanged: <T_4 extends TType>(cell: ReactTableCell<T_4, unknown>, rowIndex: number) => Promise<void>;
|
16
|
-
getErrorsShownInAlert: <T_5 extends TType>() => {
|
17
|
-
rowId: string;
|
18
|
-
changes: Partial<T_5>;
|
19
|
-
errors: any;
|
20
|
-
}[];
|
21
|
-
hasChanges: (rowId?: string | undefined) => boolean;
|
22
|
-
saveChanges: <T_6 extends TType>(table: ReactTable<T_6>, rowId?: string | undefined) => Promise<boolean>;
|
23
|
-
discardChanges: <T_7 extends TType>(rowId: string, table: ReactTable<T_7>) => void;
|
24
|
-
hasSaved: () => boolean;
|
25
|
-
createRow: <T_8 extends TType>(data: Partial<T_8>) => Promise<string>;
|
26
|
-
temporaryRows: any;
|
27
|
-
};
|
28
|
-
export {};
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
import { useLocalization } from '../../../Provider/Localization.js';
|
3
|
-
import { Button } from '../../../Button/Button.js';
|
4
|
-
import { Dialog } from '../../../Dialog/Dialog.js';
|
5
|
-
import { Group } from '../../../Group/Group.js';
|
6
|
-
|
7
|
-
function DiscardChangesConfirmationDialog(props) {
|
8
|
-
const {
|
9
|
-
onDiscard: handleDiscard,
|
10
|
-
...dialogProps
|
11
|
-
} = props;
|
12
|
-
const {
|
13
|
-
texts
|
14
|
-
} = useLocalization();
|
15
|
-
const handleClickInsideDialogContent = event => {
|
16
|
-
// Prevents the click event from propagating to the table, ensuring the row isn't saved when a click occurs
|
17
|
-
// inside the dialog
|
18
|
-
event.stopPropagation();
|
19
|
-
};
|
20
|
-
return /*#__PURE__*/React__default.createElement(Dialog, Object.assign({}, dialogProps), /*#__PURE__*/React__default.createElement(Dialog.Content, {
|
21
|
-
"aria-label": texts.table3.editing.clearChangesConfirmationDialog.title,
|
22
|
-
onClick: handleClickInsideDialogContent
|
23
|
-
}, /*#__PURE__*/React__default.createElement(Dialog.Title, null, texts.table3.editing.clearChangesConfirmationDialog.title), /*#__PURE__*/React__default.createElement("p", null, texts.table3.editing.clearChangesConfirmationDialog.description), /*#__PURE__*/React__default.createElement(Dialog.Footer, null, /*#__PURE__*/React__default.createElement(Group, null, /*#__PURE__*/React__default.createElement(Dialog.Close, null, /*#__PURE__*/React__default.createElement(Button, {
|
24
|
-
tabIndex: 0
|
25
|
-
}, texts.table3.editing.clearChangesConfirmationDialog.cancel)), /*#__PURE__*/React__default.createElement(Dialog.Close, null, /*#__PURE__*/React__default.createElement(Button, {
|
26
|
-
autoFocus: true,
|
27
|
-
tabIndex: 0,
|
28
|
-
appearance: "primary",
|
29
|
-
onClick: handleDiscard
|
30
|
-
}, texts.table3.editing.clearChangesConfirmationDialog.confirm))))));
|
31
|
-
}
|
32
|
-
|
33
|
-
export { DiscardChangesConfirmationDialog };
|
34
|
-
//# sourceMappingURL=DiscardChangesConfirmationDialog.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"DiscardChangesConfirmationDialog.js","sources":["../../../../../../../../../src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { Dialog, DialogProps } from '../../../Dialog/Dialog';\nimport { useLocalization } from '../../../Provider/Localization';\nimport { Group } from '../../../Group/Group';\nimport { Button } from '../../../Button/Button';\n\ntype DiscardChangesConfirmationDialogProps = Partial<DialogProps> & {\n onDiscard: () => void;\n};\n\nexport function DiscardChangesConfirmationDialog(props: DiscardChangesConfirmationDialogProps) {\n const { onDiscard: handleDiscard, ...dialogProps } = props;\n const { texts } = useLocalization();\n\n const handleClickInsideDialogContent = (event: React.MouseEvent) => {\n // Prevents the click event from propagating to the table, ensuring the row isn't saved when a click occurs\n // inside the dialog\n event.stopPropagation();\n };\n\n return (\n <Dialog {...dialogProps}>\n <Dialog.Content\n aria-label={texts.table3.editing.clearChangesConfirmationDialog.title}\n onClick={handleClickInsideDialogContent}>\n <Dialog.Title>{texts.table3.editing.clearChangesConfirmationDialog.title}</Dialog.Title>\n\n <p>{texts.table3.editing.clearChangesConfirmationDialog.description}</p>\n\n <Dialog.Footer>\n <Group>\n <Dialog.Close>\n <Button tabIndex={0}>{texts.table3.editing.clearChangesConfirmationDialog.cancel}</Button>\n </Dialog.Close>\n <Dialog.Close>\n <Button autoFocus tabIndex={0} appearance=\"primary\" onClick={handleDiscard}>\n {texts.table3.editing.clearChangesConfirmationDialog.confirm}\n </Button>\n </Dialog.Close>\n </Group>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog>\n );\n}\n"],"names":["DiscardChangesConfirmationDialog","props","onDiscard","handleDiscard","dialogProps","texts","useLocalization","handleClickInsideDialogContent","event","stopPropagation","React","Dialog","Content","table3","editing","clearChangesConfirmationDialog","title","onClick","Title","description","Footer","Group","Close","Button","tabIndex","cancel","autoFocus","appearance","confirm"],"mappings":";;;;;;SAUgBA,gCAAgCA,CAACC,KAA4C;EACzF,MAAM;IAAEC,SAAS,EAAEC,aAAa;IAAE,GAAGC;GAAa,GAAGH,KAAK;EAC1D,MAAM;IAAEI;GAAO,GAAGC,eAAe,EAAE;EAEnC,MAAMC,8BAA8B,GAAIC,KAAuB;;;IAG3DA,KAAK,CAACC,eAAe,EAAE;GAC1B;EAED,oBACIC,6BAACC,MAAM,oBAAKP,WAAW,gBACnBM,6BAACC,MAAM,CAACC,OAAO;kBACCP,KAAK,CAACQ,MAAM,CAACC,OAAO,CAACC,8BAA8B,CAACC,KAAK;IACrEC,OAAO,EAAEV;kBACTG,6BAACC,MAAM,CAACO,KAAK,QAAEb,KAAK,CAACQ,MAAM,CAACC,OAAO,CAACC,8BAA8B,CAACC,KAAK,CAAgB,eAExFN,wCAAIL,KAAK,CAACQ,MAAM,CAACC,OAAO,CAACC,8BAA8B,CAACI,WAAW,CAAK,eAExET,6BAACC,MAAM,CAACS,MAAM,qBACVV,6BAACW,KAAK,qBACFX,6BAACC,MAAM,CAACW,KAAK,qBACTZ,6BAACa,MAAM;IAACC,QAAQ,EAAE;KAAInB,KAAK,CAACQ,MAAM,CAACC,OAAO,CAACC,8BAA8B,CAACU,MAAM,CAAU,CAC/E,eACff,6BAACC,MAAM,CAACW,KAAK,qBACTZ,6BAACa,MAAM;IAACG,SAAS;IAACF,QAAQ,EAAE,CAAC;IAAEG,UAAU,EAAC,SAAS;IAACV,OAAO,EAAEd;KACxDE,KAAK,CAACQ,MAAM,CAACC,OAAO,CAACC,8BAA8B,CAACa,OAAO,CACvD,CACE,CACX,CACI,CACH,CACZ;AAEjB;;;;"}
|
@@ -1,88 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
import { Icon } from '../../../../Icon/Icon.js';
|
3
|
-
import { useLocalization } from '../../../../Provider/Localization.js';
|
4
|
-
import { Button } from '../../../../Button/Button.js';
|
5
|
-
|
6
|
-
function CreateNewRow(props) {
|
7
|
-
var _temporaryRows$0$tabl, _temporaryRows$, _table$getState$colum;
|
8
|
-
const {
|
9
|
-
buttonRef,
|
10
|
-
onEditingCreate: handleEditingCreate,
|
11
|
-
table,
|
12
|
-
tableMeta
|
13
|
-
} = props;
|
14
|
-
const {
|
15
|
-
texts
|
16
|
-
} = useLocalization();
|
17
|
-
const temporaryRows = tableMeta.editing.temporaryRows;
|
18
|
-
const temporaryRowId = (_temporaryRows$0$tabl = (_temporaryRows$ = temporaryRows[0]) === null || _temporaryRows$ === void 0 ? void 0 : _temporaryRows$[tableMeta.rowIdentityAccessor]) !== null && _temporaryRows$0$tabl !== void 0 ? _temporaryRows$0$tabl : '';
|
19
|
-
const isDisabled = !!table.getState().globalFilter || !!((_table$getState$colum = table.getState().columnFilters) !== null && _table$getState$colum !== void 0 && _table$getState$colum.length) || !!temporaryRowId && !!tableMeta.editing.hasRowErrors(temporaryRowId);
|
20
|
-
const isSaving = !!temporaryRowId && tableMeta.editing.getRowStatus(temporaryRowId) === 'saving';
|
21
|
-
const handleCreate = function (event) {
|
22
|
-
try {
|
23
|
-
// prevent save being triggered by click outside - TODO: investigate why the button triggers clickoutside
|
24
|
-
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
25
|
-
if (!handleEditingCreate || isDisabled) {
|
26
|
-
return Promise.resolve();
|
27
|
-
}
|
28
|
-
return Promise.resolve(tableMeta.editing.saveChanges(table)).then(function (saved) {
|
29
|
-
if (!saved) {
|
30
|
-
return;
|
31
|
-
}
|
32
|
-
try {
|
33
|
-
const changeset = handleEditingCreate();
|
34
|
-
if (changeset) {
|
35
|
-
// change the row before reating because it triggers a save
|
36
|
-
// saving would trigger the validation flow and immediately make the row red
|
37
|
-
tableMeta.rowActive.setRowActiveIndex(tableMeta.length);
|
38
|
-
requestAnimationFrame(function () {
|
39
|
-
try {
|
40
|
-
tableMeta.editing.toggleEditing(true, table);
|
41
|
-
return Promise.resolve(tableMeta.editing.createRow(changeset)).then(function (rowId) {
|
42
|
-
tableMeta.editing.setLastFocusedCellIndex(0);
|
43
|
-
try {
|
44
|
-
const row = table.getRow(rowId);
|
45
|
-
row.pin('bottom');
|
46
|
-
} catch {
|
47
|
-
//
|
48
|
-
}
|
49
|
-
});
|
50
|
-
} catch (e) {
|
51
|
-
return Promise.reject(e);
|
52
|
-
}
|
53
|
-
});
|
54
|
-
}
|
55
|
-
} catch (error) {
|
56
|
-
console.error(error);
|
57
|
-
}
|
58
|
-
});
|
59
|
-
} catch (e) {
|
60
|
-
return Promise.reject(e);
|
61
|
-
}
|
62
|
-
};
|
63
|
-
let tooltip;
|
64
|
-
if (isSaving) {
|
65
|
-
tooltip = texts.table3.editing.buttons.create.saving;
|
66
|
-
} else if (isDisabled) {
|
67
|
-
tooltip = texts.table3.editing.buttons.create.disabled;
|
68
|
-
}
|
69
|
-
return /*#__PURE__*/React__default.createElement("tr", {
|
70
|
-
"data-row-create": true,
|
71
|
-
className: "border-grey-300 group/row",
|
72
|
-
tabIndex: -1
|
73
|
-
}, /*#__PURE__*/React__default.createElement("td", {
|
74
|
-
className: "!bg-grey-50 col-span-full !border-b-0 !px-1"
|
75
|
-
}, /*#__PURE__*/React__default.createElement(Button, {
|
76
|
-
appearance: "transparent",
|
77
|
-
className: "group-hover:bg-grey-200 sticky left-[4px]",
|
78
|
-
disabled: isDisabled,
|
79
|
-
onClick: handleCreate,
|
80
|
-
ref: buttonRef,
|
81
|
-
tooltip: tooltip
|
82
|
-
}, /*#__PURE__*/React__default.createElement(Icon, {
|
83
|
-
name: "circle-plus"
|
84
|
-
}), texts.table3.editing.buttons.create.label)));
|
85
|
-
}
|
86
|
-
|
87
|
-
export { CreateNewRow };
|
88
|
-
//# sourceMappingURL=CreateNewRow.js.map
|
package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CreateNewRow.js","sources":["../../../../../../../../../../src/components/Table3/components/Row/Editing/CreateNewRow.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { Button } from '../../../../Button/Button';\nimport { useLocalization } from '../../../../Provider/Localization';\nimport { Icon } from '../../../../Icon/Icon';\nimport { Table3EditingCreateHandler } from '../../../types';\nimport { TableRef } from '../../../../../primitives/Table/types';\n\ntype CreateNewRowProps<TType = unknown> = {\n buttonRef: React.Ref<HTMLButtonElement>;\n onEditingCreate?: Table3EditingCreateHandler<TType>;\n table: ReactTable<TType>;\n tableMeta: ReactTableMeta<TType>;\n tableRef: React.RefObject<TableRef>;\n};\n\nexport function CreateNewRow<TType = unknown>(props: CreateNewRowProps<TType>) {\n const { buttonRef, onEditingCreate: handleEditingCreate, table, tableMeta } = props;\n const { texts } = useLocalization();\n\n const temporaryRows = tableMeta.editing.temporaryRows as TType[];\n const temporaryRowId: string = temporaryRows[0]?.[tableMeta.rowIdentityAccessor as string] ?? '';\n\n const isDisabled =\n !!table.getState().globalFilter ||\n !!table.getState().columnFilters?.length ||\n (!!temporaryRowId && !!tableMeta.editing.hasRowErrors(temporaryRowId));\n const isSaving = !!temporaryRowId && tableMeta.editing.getRowStatus(temporaryRowId) === 'saving';\n\n const handleCreate = async event => {\n // prevent save being triggered by click outside - TODO: investigate why the button triggers clickoutside\n event?.stopPropagation();\n\n if (!handleEditingCreate || isDisabled) {\n return;\n }\n\n const saved = await tableMeta.editing.saveChanges(table);\n\n if (!saved) {\n return;\n }\n\n try {\n const changeset = handleEditingCreate();\n\n if (changeset) {\n // change the row before reating because it triggers a save\n // saving would trigger the validation flow and immediately make the row red\n tableMeta.rowActive.setRowActiveIndex(tableMeta.length);\n\n requestAnimationFrame(async () => {\n tableMeta.editing.toggleEditing(true, table);\n const rowId = await tableMeta.editing.createRow(changeset);\n tableMeta.editing.setLastFocusedCellIndex(0);\n\n try {\n const row = table.getRow(rowId);\n row.pin('bottom');\n } catch {\n //\n }\n });\n }\n } catch (error) {\n console.error(error);\n }\n };\n\n let tooltip;\n\n if (isSaving) {\n tooltip = texts.table3.editing.buttons.create.saving;\n } else if (isDisabled) {\n tooltip = texts.table3.editing.buttons.create.disabled;\n }\n\n return (\n <tr data-row-create className=\"border-grey-300 group/row\" tabIndex={-1}>\n <td className=\"!bg-grey-50 col-span-full !border-b-0 !px-1\">\n <Button\n appearance=\"transparent\"\n className=\"group-hover:bg-grey-200 sticky left-[4px]\"\n disabled={isDisabled}\n onClick={handleCreate}\n ref={buttonRef}\n tooltip={tooltip}>\n <Icon name=\"circle-plus\" />\n {texts.table3.editing.buttons.create.label}\n </Button>\n </td>\n </tr>\n );\n}\n"],"names":["CreateNewRow","props","buttonRef","onEditingCreate","handleEditingCreate","table","tableMeta","texts","useLocalization","temporaryRows","editing","temporaryRowId","_temporaryRows$0$tabl","_temporaryRows$","rowIdentityAccessor","isDisabled","getState","globalFilter","_table$getState$colum","columnFilters","length","hasRowErrors","isSaving","getRowStatus","handleCreate","event","stopPropagation","Promise","resolve","saveChanges","then","saved","changeset","rowActive","setRowActiveIndex","requestAnimationFrame","toggleEditing","createRow","rowId","setLastFocusedCellIndex","row","getRow","pin","e","reject","error","console","tooltip","table3","buttons","create","saving","disabled","React","className","tabIndex","Button","appearance","onClick","ref","Icon","name","label"],"mappings":";;;;;SAgBgBA,YAAYA,CAAkBC,KAA+B;;EACzE,MAAM;IAAEC,SAAS;IAAEC,eAAe,EAAEC,mBAAmB;IAAEC,KAAK;IAAEC;GAAW,GAAGL,KAAK;EACnF,MAAM;IAAEM;GAAO,GAAGC,eAAe,EAAE;EAEnC,MAAMC,aAAa,GAAGH,SAAS,CAACI,OAAO,CAACD,aAAwB;EAChE,MAAME,cAAc,IAAAC,qBAAA,IAAAC,eAAA,GAAWJ,aAAa,CAAC,CAAC,CAAC,cAAAI,eAAA,uBAAhBA,eAAA,CAAmBP,SAAS,CAACQ,mBAA6B,CAAC,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,EAAE;EAEhG,MAAMG,UAAU,GACZ,CAAC,CAACV,KAAK,CAACW,QAAQ,EAAE,CAACC,YAAY,IAC/B,CAAC,GAAAC,qBAAA,GAACb,KAAK,CAACW,QAAQ,EAAE,CAACG,aAAa,cAAAD,qBAAA,eAA9BA,qBAAA,CAAgCE,MAAM,KACvC,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UACZC,OAAO,CAACD,KAAK,CAACA,KAAK,CAAC;;;KAE3B,QAAAF,CAAA;MAAA,OAAAhB,OAAA,CAAAiB,MAAA,CAAAD,CAAA;;;EAED,IAAII,OAAO;EAEX,IAAIzB,QAAQ,EAAE;IACVyB,OAAO,GAAGxC,KAAK,CAACyC,MAAM,CAACtC,OAAO,CAACuC,OAAO,CAACC,MAAM,CAACC,MAAM;GACvD,MAAM,IAAIpC,UAAU,EAAE;IACnBgC,OAAO,GAAGxC,KAAK,CAACyC,MAAM,CAACtC,OAAO,CAACuC,OAAO,CAACC,MAAM,CAACE,QAAQ;;EAG1D,oBACIC;;IAAoBC,SAAS,EAAC,2BAA2B;IAACC,QAAQ,EAAE,CAAC;kBACjEF;IAAIC,SAAS,EAAC;kBACVD,6BAACG,MAAM;IACHC,UAAU,EAAC,aAAa;IACxBH,SAAS,EAAC,2CAA2C;IACrDF,QAAQ,EAAErC,UAAU;IACpB2C,OAAO,EAAElC,YAAY;IACrBmC,GAAG,EAAEzD,SAAS;IACd6C,OAAO,EAAEA;kBACTM,6BAACO,IAAI;IAACC,IAAI,EAAC;IAAgB,EAC1BtD,KAAK,CAACyC,MAAM,CAACtC,OAAO,CAACuC,OAAO,CAACC,MAAM,CAACY,KAAK,CACrC,CACR,CACJ;AAEb;;;;"}
|
@@ -1,95 +0,0 @@
|
|
1
|
-
import React__default from 'react';
|
2
|
-
import cn from 'clsx';
|
3
|
-
import { isElementTriggeredFromContainer } from '../../../../../utils/dom.js';
|
4
|
-
import { Row } from '../../../../../primitives/Table/Core/components/Row/Row.js';
|
5
|
-
import { TEMPORARY_ROW_ID_PREFIX } from '../../../util/editing.js';
|
6
|
-
import { RENDERERS } from '../../../useTable3.js';
|
7
|
-
|
8
|
-
function TemporaryRow(props) {
|
9
|
-
var _tableRef$current, _tableRef$current2;
|
10
|
-
const {
|
11
|
-
createRowButtonRef,
|
12
|
-
table,
|
13
|
-
tableMeta,
|
14
|
-
tableRef
|
15
|
-
} = props;
|
16
|
-
const isScrolled = tableRef.current ? ((_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.scrollHeight) > ((_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : _tableRef$current2.clientHeight) : false;
|
17
|
-
const handleKeyDown = function (event) {
|
18
|
-
try {
|
19
|
-
const _temp2 = function () {
|
20
|
-
if (event.key === 'ArrowDown') {
|
21
|
-
event.preventDefault();
|
22
|
-
const _temp = function () {
|
23
|
-
if (!isElementTriggeredFromContainer(event.target, event.currentTarget)) {
|
24
|
-
return Promise.resolve(tableMeta.editing.saveChanges(table)).then(function (saved) {
|
25
|
-
if (saved) {
|
26
|
-
var _createRowButtonRef$c;
|
27
|
-
(_createRowButtonRef$c = createRowButtonRef.current) === null || _createRowButtonRef$c === void 0 ? void 0 : _createRowButtonRef$c.focus();
|
28
|
-
}
|
29
|
-
});
|
30
|
-
}
|
31
|
-
}();
|
32
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
33
|
-
} else if (event.key === 'ArrowUp') {
|
34
|
-
event.preventDefault();
|
35
|
-
event.stopPropagation();
|
36
|
-
if (tableRef.current) {
|
37
|
-
var _tableRef$current$que, _tableRef$current$que2, _tableRef$current$que3;
|
38
|
-
const availableRows = Array.from((_tableRef$current$que = tableRef.current.querySelectorAll(`tbody tr:not([data-row-id^='${TEMPORARY_ROW_ID_PREFIX}'])`)) !== null && _tableRef$current$que !== void 0 ? _tableRef$current$que : []);
|
39
|
-
const footerHeight = (_tableRef$current$que2 = (_tableRef$current$que3 = tableRef.current.querySelector('tfoot')) === null || _tableRef$current$que3 === void 0 ? void 0 : _tableRef$current$que3.getBoundingClientRect().height) !== null && _tableRef$current$que2 !== void 0 ? _tableRef$current$que2 : 0;
|
40
|
-
const newRowHeight = event.currentTarget.getBoundingClientRect().height;
|
41
|
-
const visibleHeight = tableRef.current.clientHeight - footerHeight - newRowHeight;
|
42
|
-
const tableTopOffset = tableRef.current.getBoundingClientRect().top;
|
43
|
-
let nextRowIndex;
|
44
|
-
// iterate available rows in reverse order, since we're working at the bottom
|
45
|
-
for (let index = availableRows.length - 1; index >= 0; index--) {
|
46
|
-
const rowRect = availableRows[index].getBoundingClientRect();
|
47
|
-
const topPlusHalfRow = rowRect.top + rowRect.height / 2;
|
48
|
-
if (topPlusHalfRow - tableTopOffset <= visibleHeight) {
|
49
|
-
nextRowIndex = index;
|
50
|
-
break;
|
51
|
-
}
|
52
|
-
}
|
53
|
-
if (nextRowIndex) {
|
54
|
-
tableMeta.rowActive.setRowActiveIndex(Number(availableRows[nextRowIndex < 0 ? 0 : nextRowIndex].getAttribute('data-row-index')));
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}();
|
59
|
-
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
60
|
-
} catch (e) {
|
61
|
-
return Promise.reject(e);
|
62
|
-
}
|
63
|
-
};
|
64
|
-
const handleKeyDownCapture = event => {
|
65
|
-
if (event.key === 'ArrowLeft' && tableMeta.editing.lastFocusedCellIndex === 0) {
|
66
|
-
event.preventDefault();
|
67
|
-
event.stopPropagation();
|
68
|
-
} else if (event.key === 'ArrowRight' && tableMeta.editing.lastFocusedCellIndex) {
|
69
|
-
if (tableMeta.editing.lastFocusedCellIndex === table.getVisibleFlatColumns().length - 1) {
|
70
|
-
event.preventDefault();
|
71
|
-
event.stopPropagation();
|
72
|
-
}
|
73
|
-
}
|
74
|
-
};
|
75
|
-
const className = cn('group/row border-grey-300 !sticky z-[21]', {
|
76
|
-
'bottom-20': tableMeta.footer.isEnabled,
|
77
|
-
'bottom-10': !tableMeta.footer.isEnabled,
|
78
|
-
'border-b border-t shadow-[0px_-5px_20px_0px_rgba(0,0,0,0.1)] border-t-grey-500/[0.75]': isScrolled
|
79
|
-
});
|
80
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, table.getBottomRows().map(row => (/*#__PURE__*/React__default.createElement(Row, {
|
81
|
-
key: row.id,
|
82
|
-
cellRenderer: RENDERERS.cell,
|
83
|
-
index: tableMeta.length,
|
84
|
-
measureRow: () => null,
|
85
|
-
renderer: RENDERERS.row,
|
86
|
-
row: row,
|
87
|
-
table: table,
|
88
|
-
className: className,
|
89
|
-
onKeyDown: handleKeyDown,
|
90
|
-
onKeyDownCapture: handleKeyDownCapture
|
91
|
-
}))));
|
92
|
-
}
|
93
|
-
|
94
|
-
export { TemporaryRow };
|
95
|
-
//# sourceMappingURL=TemporaryRow.js.map
|
package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"TemporaryRow.js","sources":["../../../../../../../../../../src/components/Table3/components/Row/Editing/TemporaryRow.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport clsx from 'clsx';\nimport { Row } from '../../../../../primitives/Table/Core/components/Row/Row';\nimport { RENDERERS } from '../../../useTable3';\nimport { isElementTriggeredFromContainer } from '../../../../../utils/dom';\nimport { TableRef } from '../../../../../primitives/Table/types';\nimport { TEMPORARY_ROW_ID_PREFIX } from '../../../util/editing';\n\ntype TemporaryRowProps<TType = unknown> = {\n createRowButtonRef: React.RefObject<HTMLButtonElement>;\n table: ReactTable<TType>;\n tableMeta: ReactTableMeta<TType>;\n tableRef: React.RefObject<TableRef>;\n};\n\nexport function TemporaryRow<TType = unknown>(props: TemporaryRowProps<TType>) {\n const { createRowButtonRef, table, tableMeta, tableRef } = props;\n\n const isScrolled = tableRef.current ? tableRef.current?.scrollHeight > tableRef.current?.clientHeight : false;\n\n const handleKeyDown = async (event: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n\n if (!isElementTriggeredFromContainer(event.target as Element, event.currentTarget)) {\n const saved = await tableMeta.editing.saveChanges(table);\n\n if (saved) {\n createRowButtonRef.current?.focus();\n }\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n\n if (tableRef.current) {\n const availableRows = Array.from(\n tableRef.current.querySelectorAll(`tbody tr:not([data-row-id^='${TEMPORARY_ROW_ID_PREFIX}'])`) ?? []\n );\n\n const footerHeight = tableRef.current.querySelector('tfoot')?.getBoundingClientRect().height ?? 0;\n const newRowHeight = event.currentTarget.getBoundingClientRect().height;\n const visibleHeight = tableRef.current.clientHeight - footerHeight - newRowHeight;\n const tableTopOffset = tableRef.current.getBoundingClientRect().top;\n\n let nextRowIndex;\n\n // iterate available rows in reverse order, since we're working at the bottom\n for (let index = availableRows.length - 1; index >= 0; index--) {\n const rowRect = availableRows[index].getBoundingClientRect();\n const topPlusHalfRow = rowRect.top + rowRect.height / 2;\n\n if (topPlusHalfRow - tableTopOffset <= visibleHeight) {\n nextRowIndex = index;\n break;\n }\n }\n\n if (nextRowIndex) {\n tableMeta.rowActive.setRowActiveIndex(\n Number(availableRows[nextRowIndex < 0 ? 0 : nextRowIndex].getAttribute('data-row-index'))\n );\n }\n }\n }\n };\n\n const handleKeyDownCapture = (event: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (event.key === 'ArrowLeft' && tableMeta.editing.lastFocusedCellIndex === 0) {\n event.preventDefault();\n event.stopPropagation();\n } else if (event.key === 'ArrowRight' && tableMeta.editing.lastFocusedCellIndex) {\n if (tableMeta.editing.lastFocusedCellIndex === table.getVisibleFlatColumns().length - 1) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n };\n\n const className = clsx('group/row border-grey-300 !sticky z-[21]', {\n 'bottom-20': tableMeta.footer.isEnabled,\n 'bottom-10': !tableMeta.footer.isEnabled,\n 'border-b border-t shadow-[0px_-5px_20px_0px_rgba(0,0,0,0.1)] border-t-grey-500/[0.75]': isScrolled,\n });\n\n return (\n <>\n {table.getBottomRows().map(row => (\n <Row<TType>\n key={row.id}\n cellRenderer={RENDERERS.cell}\n index={tableMeta.length}\n measureRow={() => null}\n renderer={RENDERERS.row}\n row={row}\n table={table}\n className={className}\n onKeyDown={handleKeyDown}\n onKeyDownCapture={handleKeyDownCapture}\n />\n ))}\n </>\n );\n}\n"],"names":["TemporaryRow","props","createRowButtonRef","table","tableMeta","tableRef","isScrolled","current","_tableRef$current","scrollHeight","_tableRef$current2","clientHeight","handleKeyDown","event","key","preventDefault","_temp","isElementTriggeredFromContainer","target","currentTarget","Promise","resolve","editing","saveChanges","then","saved","_createRowButtonRef$c","focus","stopPropagation","_tableRef$current$que","_tableRef$current$que2","_tableRef$current$que3","availableRows","Array","from","querySelectorAll","TEMPORARY_ROW_ID_PREFIX","footerHeight","querySelector","getBoundingClientRect","height","newRowHeight","visibleHeight","tableTopOffset","top","nextRowIndex","index","length","rowRect","topPlusHalfRow","rowActive","setRowActiveIndex","Number","getAttribute","_temp2","e","reject","handleKeyDownCapture","lastFocusedCellIndex","getVisibleFlatColumns","className","clsx","footer","isEnabled","React","getBottomRows","map","row","Row","id","cellRenderer","RENDERERS","cell","measureRow","renderer","onKeyDown","onKeyDownCapture"],"mappings":";;;;;;;SAgBgBA,YAAYA,CAAkBC,KAA+B;;EACzE,MAAM;IAAEC,kBAAkB;IAAEC,KAAK;IAAEC,SAAS;IAAEC;GAAU,GAAGJ,KAAK;EAEhE,MAAMK,UAAU,GAAGD,QAAQ,CAACE,OAAO,GAAG,EAAAC,iBAAA,GAAAH,QAAQ,CAACE,OAAO,cAAAC,iBAAA,uBAAhBA,iBAAA,CAAkBC,YAAY,MAAAC,kBAAA,GAAGL,QAAQ,CAACE,OAAO,cAAAG,kBAAA,uBAAhBA,kBAAA,CAAkBC,YAAY,IAAG,KAAK;EAE7G,MAAMC,aAAa,aAAUC,KAA+C;IAAA;;YACpEA,KAAK,CAACC,GAAG,KAAK,WAAW;UACzBD,KAAK,CAACE,cAAc,EAAE;UAAC,MAAAC,KAAA;YAAA,IAEnB,CAACC,+BAA+B,CAACJ,KAAK,CAACK,MAAiB,EAAEL,KAAK,CAACM,aAAa,CAAC;cAAA,OAAAC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