@teselagen/ui 0.4.19-beta.4 → 0.4.19-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/DataTable/Columns.d.ts +1 -0
  2. package/DataTable/DisplayOptions.d.ts +14 -14
  3. package/DataTable/EditabelCell.d.ts +3 -5
  4. package/DataTable/PagingTool.d.ts +24 -2
  5. package/DataTable/SearchBar.d.ts +2 -2
  6. package/DataTable/SortableColumns.d.ts +6 -9
  7. package/DataTable/ThComponent.d.ts +9 -0
  8. package/DataTable/utils/handleCopyTable.d.ts +1 -0
  9. package/DataTable/utils/index.d.ts +3 -2
  10. package/DataTable/utils/primarySelectedValue.d.ts +1 -0
  11. package/DataTable/utils/rowClick.d.ts +14 -1
  12. package/DataTable/utils/useTableParams.d.ts +49 -0
  13. package/FormComponents/index.d.ts +13 -2
  14. package/README.md +6 -0
  15. package/index.cjs.js +40001 -44598
  16. package/index.es.js +43293 -47890
  17. package/package.json +1 -2
  18. package/src/DataTable/CellDragHandle.js +65 -63
  19. package/src/DataTable/Columns.js +1063 -0
  20. package/src/DataTable/DisplayOptions.js +171 -191
  21. package/src/DataTable/EditabelCell.js +6 -16
  22. package/src/DataTable/PagingTool.js +39 -55
  23. package/src/DataTable/SearchBar.js +3 -3
  24. package/src/DataTable/SortableColumns.js +44 -39
  25. package/src/DataTable/ThComponent.js +43 -0
  26. package/src/DataTable/dataTableEnhancer.js +35 -294
  27. package/src/DataTable/index.js +2465 -3069
  28. package/src/DataTable/utils/convertSchema.js +2 -2
  29. package/src/DataTable/utils/handleCopyTable.js +16 -0
  30. package/src/DataTable/utils/index.js +4 -2
  31. package/src/DataTable/utils/primarySelectedValue.js +1 -0
  32. package/src/DataTable/utils/queryParams.js +2 -2
  33. package/src/DataTable/utils/rowClick.js +27 -5
  34. package/src/DataTable/utils/useTableParams.js +370 -0
  35. package/src/DataTable/utils/withTableParams.js +3 -26
  36. package/src/FormComponents/Uploader.js +1 -4
  37. package/src/FormComponents/index.js +28 -28
  38. package/src/InfoHelper/index.js +2 -2
  39. package/src/UploadCsvWizard.js +155 -163
  40. package/src/utils/commandControls.js +4 -4
  41. package/src/utils/handlerHelpers.js +19 -25
  42. package/src/utils/hotkeyUtils.js +1 -1
  43. package/style.css +254 -254
@@ -0,0 +1 @@
1
+ export function renderColumns(props: any): any;
@@ -1,14 +1,14 @@
1
- import { default as React } from '../../../../node_modules/react';
2
- export default class DisplayOptions extends React.Component<any, any, any> {
3
- constructor(props: any);
4
- constructor(props: any, context: any);
5
- state: {
6
- isOpen: boolean;
7
- searchTerms: {};
8
- };
9
- openPopover: () => void;
10
- closePopover: () => void;
11
- changeTableDensity: (e: any) => void;
12
- toggleForcedHidden: (e: any) => any;
13
- render(): import("react/jsx-runtime").JSX.Element | null;
14
- }
1
+ export default DisplayOptions;
2
+ declare function DisplayOptions({ compact, extraCompact, disabled, hideDisplayOptionsIcon, resetDefaultVisibility, updateColumnVisibility, updateTableDisplayDensity, showForcedHiddenColumns, setShowForcedHidden, hasOptionForForcedHidden, schema }: {
3
+ compact: any;
4
+ extraCompact: any;
5
+ disabled: any;
6
+ hideDisplayOptionsIcon: any;
7
+ resetDefaultVisibility?: ((...args: any[]) => void) | undefined;
8
+ updateColumnVisibility?: ((...args: any[]) => void) | undefined;
9
+ updateTableDisplayDensity: any;
10
+ showForcedHiddenColumns: any;
11
+ setShowForcedHidden: any;
12
+ hasOptionForForcedHidden: any;
13
+ schema: any;
14
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,10 +1,8 @@
1
- export function EditableCell({ cancelEdit, dataTest, finishEdit, initialValue, isEditableCellInitialValue, isNumeric, shouldSelectAll, stopSelectAll }: {
1
+ export function EditableCell({ value, setValue, cancelEdit, dataTest, finishEdit, isNumeric }: {
2
+ value: any;
3
+ setValue: any;
2
4
  cancelEdit: any;
3
5
  dataTest: any;
4
6
  finishEdit: any;
5
- initialValue: any;
6
- isEditableCellInitialValue: any;
7
7
  isNumeric: any;
8
- shouldSelectAll: any;
9
- stopSelectAll: any;
10
8
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,24 @@
1
- declare const _default: any;
2
- export default _default;
1
+ export default PagingTool;
2
+ declare function PagingTool({ controlled_hasNextPage, controlled_onRefresh, controlled_page, controlled_setPage, controlled_setPageSize, controlled_total, disabled: _disabled, disableSetPageSize, entities, entityCount, hideSetPageSize, hideTotalPages, keepSelectionOnPageChange, onRefresh: _onRefresh, page: _page, pageSize, pagingDisabled, persistPageSize, setPage: _setPage, setPageSize: _setPageSize, setSelectedEntityIdMap }: {
3
+ controlled_hasNextPage: any;
4
+ controlled_onRefresh: any;
5
+ controlled_page: any;
6
+ controlled_setPage: any;
7
+ controlled_setPageSize: any;
8
+ controlled_total: any;
9
+ disabled: any;
10
+ disableSetPageSize: any;
11
+ entities: any;
12
+ entityCount: any;
13
+ hideSetPageSize: any;
14
+ hideTotalPages: any;
15
+ keepSelectionOnPageChange: any;
16
+ onRefresh: any;
17
+ page: any;
18
+ pageSize: any;
19
+ pagingDisabled: any;
20
+ persistPageSize?: ((...args: any[]) => void) | undefined;
21
+ setPage: any;
22
+ setPageSize: any;
23
+ setSelectedEntityIdMap: any;
24
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  export default SearchBar;
2
- declare function SearchBar({ reduxFormSearchInput, setSearchTerm, loading, searchMenuButton, disabled, autoFocusSearch }: {
3
- reduxFormSearchInput: any;
2
+ declare function SearchBar({ searchInput, setSearchTerm, loading, searchMenuButton, disabled, autoFocusSearch }: {
3
+ searchInput: any;
4
4
  setSearchTerm: any;
5
5
  loading: any;
6
6
  searchMenuButton: any;
@@ -1,10 +1,7 @@
1
- import { default as React } from '../../../../node_modules/react';
2
1
  export default SortableColumns;
3
- declare class SortableColumns extends React.Component<any, any, any> {
4
- constructor(props: any);
5
- constructor(props: any, context: any);
6
- shouldCancelStart: (e: any) => boolean;
7
- onSortEnd: (...args: any[]) => void;
8
- onSortStart: () => void;
9
- render(): import("react/jsx-runtime").JSX.Element;
10
- }
2
+ declare function SortableColumns({ className, style, children, moveColumn }: {
3
+ className: any;
4
+ style: any;
5
+ children: any;
6
+ moveColumn: any;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export function ThComponent({ toggleSort, immovable, className, children, style, columnindex, ...rest }: {
2
+ [x: string]: any;
3
+ toggleSort: any;
4
+ immovable: any;
5
+ className: any;
6
+ children: any;
7
+ style: any;
8
+ columnindex: any;
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export function handleCopyTable(e: any, opts: any): void;
@@ -1,4 +1,3 @@
1
- import { default as computePresets } from './computePresets';
2
1
  import { defaultParsePaste, getEntityIdToEntity, getFieldPathToIndex, getNumberStrAtEnd, stripNumberAtEnd } from './utils';
3
2
  import { formatPasteData } from './formatPasteData';
4
3
  import { getAllRows } from './getAllRows';
@@ -14,8 +13,10 @@ import { getSelectedRowsFromEntities } from './selection';
14
13
  import { handleCopyColumn } from './handleCopyColumn';
15
14
  import { handleCopyHelper } from './handleCopyHelper';
16
15
  import { handleCopyRows } from './handleCopyRows';
16
+ import { handleCopyTable } from './handleCopyTable';
17
17
  import { isBottomRightCornerOfRectangle } from './isBottomRightCornerOfRectangle';
18
18
  import { isEntityClean } from './isEntityClean';
19
+ import { PRIMARY_SELECTED_VAL } from './primarySelectedValue';
19
20
  import { removeCleanRows } from './removeCleanRows';
20
21
 
21
- export { computePresets, defaultParsePaste, formatPasteData, getAllRows, getCellCopyText, getCellInfo, getEntityIdToEntity, getFieldPathToIndex, getFieldPathToField, getIdOrCodeOrIndex, getLastSelectedEntity, getNewEntToSelect, getNumberStrAtEnd, getRecordsFromIdMap, getRowCopyText, getSelectedRowsFromEntities, handleCopyColumn, handleCopyHelper, handleCopyRows, isBottomRightCornerOfRectangle, isEntityClean, removeCleanRows, stripNumberAtEnd };
22
+ export { defaultParsePaste, formatPasteData, getAllRows, getCellCopyText, getCellInfo, getEntityIdToEntity, getFieldPathToIndex, getFieldPathToField, getIdOrCodeOrIndex, getLastSelectedEntity, getNewEntToSelect, getNumberStrAtEnd, getRecordsFromIdMap, getRowCopyText, getSelectedRowsFromEntities, handleCopyColumn, handleCopyHelper, handleCopyRows, handleCopyTable, isBottomRightCornerOfRectangle, isEntityClean, PRIMARY_SELECTED_VAL, removeCleanRows, stripNumberAtEnd };
@@ -0,0 +1 @@
1
+ export const PRIMARY_SELECTED_VAL: "main_cell";
@@ -1,4 +1,17 @@
1
- export default function rowClick(e: any, rowInfo: any, entities: any, props: any): void;
1
+ export default function rowClick(e: any, rowInfo: any, entities: any, { reduxFormSelectedEntityIdMap, isSingleSelect, noSelect, onRowClick, isEntityDisabled, withCheckboxes, onDeselect, onSingleRowSelect, onMultiRowSelect, noDeselectAll, onRowSelect, change }: {
2
+ reduxFormSelectedEntityIdMap: any;
3
+ isSingleSelect: any;
4
+ noSelect: any;
5
+ onRowClick: any;
6
+ isEntityDisabled: any;
7
+ withCheckboxes: any;
8
+ onDeselect: any;
9
+ onSingleRowSelect: any;
10
+ onMultiRowSelect: any;
11
+ noDeselectAll: any;
12
+ onRowSelect: any;
13
+ change: any;
14
+ }): void;
2
15
  export function changeSelectedEntities({ idMap, entities, change }: {
3
16
  idMap: any;
4
17
  entities?: any[] | undefined;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Note all these options can be passed at Design Time or at Runtime (like reduxForm())
3
+ *
4
+ * @export
5
+ *
6
+ * @param {compOrOpts} compOrOpts
7
+ * @typedef {object} compOrOpts
8
+ * @property {*string} formName - required unique identifier for the table
9
+ * @property {Object | Function} schema - The data table schema or a function returning it. The function wll be called with props as the argument.
10
+ * @property {boolean} urlConnected - whether the table should connect to/update the URL
11
+ * @property {boolean} withSelectedEntities - whether or not to pass the selected entities
12
+ * @property {boolean} isCodeModel - whether the model is keyed by code instead of id in the db
13
+ * @property {object} defaults - tableParam defaults such as pageSize, filter, etc
14
+ * @property {boolean} noOrderError - won't console an error if an order is not found on schema
15
+ */
16
+ export default function useTableParams(props: any): any;
17
+ /**
18
+ * Note all these options can be passed at Design Time or at Runtime (like reduxForm())
19
+ */
20
+ export type compOrOpts = {
21
+ /**
22
+ * } formName - required unique identifier for the table
23
+ */
24
+ string: any;
25
+ /**
26
+ * - The data table schema or a function returning it. The function wll be called with props as the argument.
27
+ */
28
+ schema: Object | Function;
29
+ /**
30
+ * - whether the table should connect to/update the URL
31
+ */
32
+ urlConnected: boolean;
33
+ /**
34
+ * - whether or not to pass the selected entities
35
+ */
36
+ withSelectedEntities: boolean;
37
+ /**
38
+ * - whether the model is keyed by code instead of id in the db
39
+ */
40
+ isCodeModel: boolean;
41
+ /**
42
+ * - tableParam defaults such as pageSize, filter, etc
43
+ */
44
+ defaults: object;
45
+ /**
46
+ * - won't console an error if an order is not found on schema
47
+ */
48
+ noOrderError: boolean;
49
+ };
@@ -11,9 +11,20 @@ export { fieldRequired };
11
11
  export function renderBlueprintDateInput(props: any): import("react/jsx-runtime").JSX.Element;
12
12
  export function renderBlueprintDateRangeInput(props: any): import("react/jsx-runtime").JSX.Element;
13
13
  export function RenderBlueprintInput(props: any): import("react/jsx-runtime").JSX.Element;
14
- export function renderBlueprintCheckbox(props: any): import("react/jsx-runtime").JSX.Element;
14
+ export function renderBlueprintCheckbox({ input, label, tooltipInfo, beforeOnChange, onFieldSubmit, ...rest }: {
15
+ [x: string]: any;
16
+ input: any;
17
+ label: any;
18
+ tooltipInfo: any;
19
+ beforeOnChange: any;
20
+ onFieldSubmit: any;
21
+ }): import("react/jsx-runtime").JSX.Element;
15
22
  export function renderBlueprintSwitch(props: any): import("react/jsx-runtime").JSX.Element;
16
- export function renderFileUpload(props: any): import("react/jsx-runtime").JSX.Element;
23
+ export function renderFileUpload({ input, onFieldSubmit, ...rest }: {
24
+ [x: string]: any;
25
+ input: any;
26
+ onFieldSubmit: any;
27
+ }): import("react/jsx-runtime").JSX.Element;
17
28
  export class renderBlueprintTextarea extends React.Component<any, any, any> {
18
29
  constructor(props: any);
19
30
  constructor(props: any, context: any);
package/README.md CHANGED
@@ -23,3 +23,9 @@ nx run ui:start
23
23
  ```
24
24
  nx run ui:publish
25
25
  ```
26
+
27
+ ## Publishing a beta version (for use when linking to a branch in another project)
28
+
29
+ ```
30
+ nx run ui:publish-beta
31
+ ```