@pega/lists-core 8.8.0 → 9.0.0-build.10.0
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/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/src/core/StateResolver.d.ts.map +1 -1
- package/lib/src/core/StateResolver.js +2 -1
- package/lib/src/core/StateResolver.js.map +1 -1
- package/lib/src/core/constants.d.ts +11 -101
- package/lib/src/core/constants.d.ts.map +1 -1
- package/lib/src/core/constants.js +6 -6
- package/lib/src/core/constants.js.map +1 -1
- package/lib/src/core/features/featureFactory.d.ts.map +1 -1
- package/lib/src/core/features/featureFactory.js +0 -1
- package/lib/src/core/features/featureFactory.js.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js +12 -5
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js +13 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js +3 -1
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js +3 -1
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js +2 -3
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.js +6 -7
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js +11 -3
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.js +4 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js +2 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js +19 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js.map +1 -1
- package/lib/src/core/features/uIFeatures/index.d.ts +0 -2
- package/lib/src/core/features/uIFeatures/index.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/index.js +0 -2
- package/lib/src/core/features/uIFeatures/index.js.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.d.ts +1 -1
- package/lib/src/core/generators/ColumnGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.js +2 -1
- package/lib/src/core/generators/ColumnGenerator.js.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.types.d.ts +1 -1
- package/lib/src/core/generators/ColumnGenerator.types.d.ts.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.types.js.map +1 -1
- package/lib/src/core/generators/GroupGenerator.d.ts +4 -1
- package/lib/src/core/generators/GroupGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/GroupGenerator.js +4 -1
- package/lib/src/core/generators/GroupGenerator.js.map +1 -1
- package/lib/src/core/generators/ViewGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/ViewGenerator.js +7 -2
- package/lib/src/core/generators/ViewGenerator.js.map +1 -1
- package/lib/src/core/generators/viewUtilityMethods.js +3 -3
- package/lib/src/core/generators/viewUtilityMethods.js.map +1 -1
- package/lib/src/core/reducers/error.d.ts.map +1 -1
- package/lib/src/core/reducers/index.d.ts.map +1 -1
- package/lib/src/core/utils/condition-utils.js +1 -1
- package/lib/src/core/utils/condition-utils.js.map +1 -1
- package/lib/src/core/utils/util.d.ts +1 -0
- package/lib/src/core/utils/util.d.ts.map +1 -1
- package/lib/src/core/utils/util.js +7 -1
- package/lib/src/core/utils/util.js.map +1 -1
- package/lib/types/ApiContext.types.d.ts +32 -3
- package/lib/types/ApiContext.types.d.ts.map +1 -1
- package/lib/types/ApiContext.types.js.map +1 -1
- package/lib/types/Meta.types.d.ts +36 -4
- package/lib/types/Meta.types.d.ts.map +1 -1
- package/lib/types/Meta.types.js +3 -0
- package/lib/types/Meta.types.js.map +1 -1
- package/lib/types/State.types.d.ts +21 -2
- package/lib/types/State.types.d.ts.map +1 -1
- package/lib/types/State.types.js.map +1 -1
- package/lib/types.d.ts +4 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +3 -4
- package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.d.ts +0 -7
- package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.d.ts.map +0 -1
- package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.js +0 -24
- package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"State.types.js","sourceRoot":"","sources":["../../types/State.types.ts"],"names":[],"mappings":"AAuHA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,aAAa;IAChB,8DAA8D;IAC9D,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { OmitStrict } from '@pega/cosmos-react-core';\nimport type { Condition, LeafCondition } from '@pega/cosmos-react-condition-builder';\nimport type { DateFunction } from '@pega/cosmos-react-condition-builder/lib/components/ConditionBuilder/core/types';\n\nimport type { personalizationProps } from '../src/core/reducers/personalizationReducer';\nimport type { RowData } from '../src/core/generators/RowGenerator.types';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type RsCoreBootArgs from './RsCoreBootArgs.types';\nimport type {\n ROW_DENSITY,\n HierarchicalInfo,\n /* eslint-disable @typescript-eslint/no-unused-vars */\n FieldDef,\n Meta,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ConditionalStyleFormat\n} from './Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, RsApi } from './ApiContext.types';\n/** Custom functions ungrouped type */\ntype Ungrouped =\n | {\n /**\n * Ungrouped mode\n * 'aggregate' - Aggregate remaining groups as others group\n */\n mode: 'aggregate';\n /** Others group label */\n label: string;\n }\n | {\n /** 'exclude' - Exclude remaining values */\n mode: 'exclude';\n };\n\n/** Boundaries for range grouping */\nexport type RangeBoundaries =\n | 'include-lower-only'\n | 'include-upper-only'\n | 'include-both'\n | 'exclude-both';\n\n/** Rhs type for range grouping to support boundaries */\ninterface RangeGroupingRhs<T extends number | string> {\n rhs:\n | {\n value: T;\n }\n | {\n start: T;\n end: T;\n boundaries: RangeBoundaries;\n };\n}\n\n/** Modified leaf condition for Range grouping */\ntype RangeGroupingLeafCondition<T extends number | string> = OmitStrict<LeafCondition, 'rhs'> &\n RangeGroupingRhs<T>;\n\n/** Aggregation types */\nexport type AggregationType = 'Sum' | 'Min' | 'Max' | 'Avg';\n/** Aggregation state on the Table */\nexport type Aggregation = {\n /** Column ID */\n columnId: string;\n /** Aggregation type */\n type: AggregationType;\n};\n\n/** Custom grouping types */\nexport type CustomFunctions = 'TEXT_GROUPING' | 'RANGE_GROUPING';\n\n/** Custom text grouping details applied on column */\nexport type TextGrouping = {\n /** Custom function name */\n type: 'TEXT_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** Custom groups information */\n groups: {\n /** Group label */\n label: string;\n /** Group condition */\n condition: LeafCondition;\n }[];\n /** Ungrouped information */\n ungrouped: Ungrouped;\n};\n\n/** Custom range grouping details applied on column */\nexport type RangeGrouping = {\n /** Custom function name */\n type: 'RANGE_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** Custom groups information */\n groups: {\n /** Group label */\n label: string;\n /** Group condition */\n condition: RangeGroupingLeafCondition<number>;\n }[];\n /** Ungrouped information */\n ungrouped: Ungrouped;\n};\n\n/** Custom interval grouping details applied on column */\nexport type IntervalGrouping = {\n /** Custom function name */\n type: 'INTERVAL_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** interval */\n interval: number;\n /** boundaries */\n boundaries: 'include-lower-only' | 'include-upper-only';\n};\n\nexport const SortDirection = {\n ASC: 'asc',\n DESC: 'desc'\n} as const;\n\nexport const GroupSortDirection = {\n ...SortDirection,\n /** For custom grouping, the group order can be custom too. */\n CUSTOM: 'custom'\n} as const;\n\n/** Group configuration on Table state */\nexport interface Group {\n /** Column ID */\n columnId: string;\n /** Date function if grouping by a date part */\n dateFunction?: DateFunction;\n /** Custom function if applied on Text/Number column */\n customFunction?: TextGrouping | RangeGrouping | IntervalGrouping;\n /** Sort order of the grouped column.\n * - asc - ascending\n * - desc - descending\n * - custom - user defined custom sorting. This is applicable in case of custom grouping.\n */\n order: (typeof GroupSortDirection)[keyof typeof GroupSortDirection];\n /** Current group level, starts with 0 for 1st level of grouping. */\n level: number;\n}\n\n/** Sort configuration on Table state */\nexport interface Sort {\n /** Column ID */\n columnId: string;\n /** Sort order */\n order: (typeof SortDirection)[keyof typeof SortDirection];\n /** Used to indicate the sequence in multi-sort */\n sequence: number;\n}\n\n/** Group filter from the Table state */\nexport interface GroupFilter {\n /** Start-index used for pagination */\n groupFrom: number;\n /** End-index used for pagination */\n groupTo: number;\n /**\n * List of filters in the current branch of groupFilters.\n * Each entry in the object corresponds to a single node in the given group's hierarchy\n * groupBy can be in one of two patterns - `${columnId}`, `${columnId}||${dateFunction}`.\n * Use getGroupFromKey from lists to safely split it.\n */\n filters: {\n [groupBy: string]: string | number;\n };\n}\n\nexport interface PersonalizationInfo {\n name: string;\n personalizationState: State;\n isDefaultPreset?: boolean;\n isPreset?: boolean;\n title?: string;\n template?: string;\n markAsDefault?: boolean;\n}\nexport interface Personalization {\n allPersonalizations: {\n [personalizationkey: string]: PersonalizationInfo;\n };\n defaultPersonalization: string;\n active: string;\n dirty?: boolean;\n previousDefaultPersonalization?: string;\n lastDeletedPersonalization?: PersonalizationInfo;\n}\nexport interface Child extends CustomField {\n fieldIds: string[];\n children: Child[];\n templateName: string;\n}\n/** This interface is the old implementation of custom fields which is required for state versioning reducer. */\ninterface OldCustomField {\n children?: Child[];\n templateName?: string;\n}\nexport type CustomField = {\n /**\n * An array which contains the 2 join column id details and merge template details(a tuple of length 1 and type string) for those 2 columns\n * Column Merge templates:\n * - comma\n * - space\n * - multiline\n * - forwardslash\n */\n expression: (string | [string])[];\n /** A unique id to identify the new column resulted from merging of 2 columns. */\n id: string;\n /** Label for the new column */\n label: string;\n /** Primary column id which is used to derive the {@link FieldDef FieldDefinition} of new column */\n primaryColumnId: string;\n} & OldCustomField;\n\nexport interface DataError {\n /** itemKey of the row that has error */\n [itemKeyValue: string | number]: {\n /** error message for the row */\n message: string;\n };\n}\nexport interface Errors {\n /** errors related to row data */\n dataErrors: DataError;\n}\n\nexport type ResponsiveBreakpoint = {\n [breakpoint in 'xs' | 'sm' | 'md' | 'lg' | 'xl']?: boolean;\n};\n\nexport interface EditChangeSet {\n /** Value of the itemKey {@link Meta. itemKey itemKey} of the row under which cell is edited. */\n [itemKey: string]: {\n /** {@link FieldDef.name name} of the field that is edited. */\n [fieldName: string]: {\n /** Updated cell value after edit. */\n value: string | number | boolean | Date;\n /** Current status of the edit process. 'pending' | 'inProgress' */\n status: string;\n };\n };\n}\n\nexport interface Notification {\n content: string;\n id?: string;\n}\n\n/**\n * groupBy - field id of the column on which group is toggled.\n * value(2D array) - The path of the group which is toggled.\n * @example - Consider 3 columns Priority, Severity, Status and all are grouped.\n * Expanding the first and second nested group header fully starting from Priority -> Severity -> Status will result in:\n * {\n * 'Priority': [['85 P'], ['95P']],\n * 'Severity': [['85P', 'Low severity'], ['95P', 'Low severity']],\n * 'Status': [['85P', 'Low severity', 'Pending'],['95P', 'Low severity', 'Pending']]\n * }\n */\nexport interface GroupToggle {\n [groupBy: string]: (string | number | boolean | Date)[][];\n}\n\nexport interface RowSelectionChangeSet {\n [key: string]: { data: RowData; status: string; selected: boolean };\n}\n\nexport interface EditInfo {\n rowId?: string;\n colId?: string;\n}\n\nexport interface State {\n /** Current order of the columns in the form of array of {@link FieldDef.id fieldDef id} */\n colOrder?: string[];\n /** Current widths of the columns in the form of array of fieldDef id and its current width */\n columnWidths?: { [key: string]: number };\n /** Current frozen columns represented by array of fieldDef id */\n freezeColumns?: string[];\n /** Current hidden columns represented by array of fieldDef id */\n hiddenColumns?: string[];\n /** id value from displayDensity table meta configuration property */\n selectedHeightOption?: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY];\n /** Filter configuration in the ConditionBuilder format */\n filterExpression?: Condition;\n /** Aggregation configuration */\n aggregationInfo?: Aggregation[];\n /** Grouping configuration */\n groups?: Group[];\n /** Sorting configuration */\n sortingOrder?: Sort[];\n /** Search configuration */\n search?: {\n /** Search text */\n query: string;\n /** Fields to search in */\n fields: string[];\n };\n /** Group filters applied when fetching data-rows */\n groupFilters?: GroupFilter[];\n /** Pagination applied when fetching data-rows */\n paginationOptions?: {\n [virtualizerId: string]: {\n startIndex: number;\n endIndex: number;\n };\n };\n /** An object of features that needs to be forced triggered on next dispatch cycle of Repeating structures. */\n forceUpdateFeatures?: {\n /** Force re-render the Repeating structures on next dispatch */\n forceRenderOnNextRun?: boolean;\n /** Force re-calculate width of fields of the Repeating structures on next dispatch. */\n forceCalculateAutoWidth?: boolean;\n /** Force re-fetch selectedRows by calling {@link ApiContext.getSelectedRows getSelectedRows} apiContext. */\n updateSelectedRows?: number;\n };\n /** An array of selected rows identified by value of {@link Meta.itemKey itemkey} for that rows */\n selectedRows?: string[];\n /** Repeating Structure {@link Meta.template templates} */\n template?: string;\n /**\n * Preset identifier through which the current preset/personalized view is derived.\n * For default preset or personalization dervied from default preset the value is equal to 'nonPersonalizationViewKey'\n */\n presetId?: string;\n /** Version of the state */\n version?: string;\n /** Personalization state of repeating structure */\n personalization?: Personalization;\n /** An array of custom fields generated using joining the columns */\n customFields?: CustomField[];\n /**\n * This key holds the state of the external component within RS state.\n * This state is never manipulated by Repeating structures. This key is personalizable. Currently it contains state related to {@link Meta.externalFilters}\n */\n externalState?: { [key: string]: object };\n /**\n * This holds formatter info for a given column id.\n * key - {@link FieldDef.id columnId}\n * value - Formatter name\n */\n renderFormatter?: {\n [key: string]: string;\n };\n /** It contains the alias for the column. Key is {@link FieldDef.id id} of the column, value is the alias name given to that column. */\n columnAlias?: {\n [key: string]: string;\n };\n /** Hierarchical groups info */\n hierarchicalGroup?: HierarchicalInfo;\n /** Groups are expanded or closed. */\n allGroupsExpanded?: boolean;\n\n /** Stores the errors */\n errors?: Errors;\n /** {@link FieldDef.id Id} of the field for which filter is going to be deleted. */\n clearColFilter?: string | null;\n /** A 2D array that contains the expand/collapse info of groups\n * * @example - Consider 3 columns Priority, Severity, Status and all are grouped.\n * Expanding the first and second nested group header fully starting from Priority -> Severity -> Status will result in:\n * {\n * 'Priority': [['85 P'], ['95P']],\n * 'Severity': [['85P', 'Low severity'], ['95P', 'Low severity']],\n * 'Status': [['85P', 'Low severity', 'Pending'],['95P', 'Low severity', 'Pending']]\n * }\n */\n groupToggle?: GroupToggle;\n /** Indicates if the header icon needs to be shown for header cells. */\n showHeaderIcons?: boolean;\n /** The current set of notifications on repeating structures. */\n notifications?: Notification[];\n /** Temporary change set for the selection of rows till the time the selected rows are not communicated to ApiContext via {@link ApiContext.setSelectedRows setSelectedRows}. */\n rowSelectionChangeSet?: RowSelectionChangeSet;\n /** The edit information of the cells. */\n editInfo?: EditInfo;\n /** Indicates the repeating structures is bootstraped. */\n bootstrap?: boolean;\n /** Triggers refresh on repeating structures. */\n refresh?: number;\n /** Indicates to show select all checkbox in repeating structures. */\n showSelectAllCheckbox?: boolean;\n /** Indicates to show confirmation action in repeating structures. */\n showConfirmationAction?: boolean;\n /** Stores the itemkey of the row which is being moved in drag drop operations. */\n sourceKey?: string;\n /** Stores the itemkey of the row on which the dragged row is dropped in drag drop operations. */\n destinationKey?: string;\n /** Set of features which should be skipped when running the queued action. */\n featuresToAvoid?: string[];\n /** Temporary change set information for edited row till the time data is not submitted to {@link ApiContext} */\n changeSet?: EditChangeSet;\n /** Stores the repeating structures body height. */\n tableHeight?: number | string;\n /** Stores the responsive breakpoints of DOM container */\n responsive?: ResponsiveBreakpoint;\n /**\n * Array of conditional style formats.\n *\n * When set, make sure the following conditions must be met:\n * - The available {@link RsCoreBootArgs.styleFormats styleFormats} must be passed to repeating structures as a prop.\n * - The `styleFormatId` referenced in conditional style formats within {@link State.conditionalStyleFormats state} must belong to one of the {@link RsCoreBootArgs.styleFormats styleFormats}.\n * - The {@link ApiContext.evaluateCondition evaluateCondition} API is optional. If the RS consumer wants to evaluate the condition itself, this API should be provided; otherwise, it is optional.\n *\n * **Note**: *For a given fieldName, if the data satisfies multiple conditional style formats, the first matching conditional format will be used.*\n */\n conditionalStyleFormats?: ConditionalStyleFormat[];\n}\n\nexport interface PersonalizedState extends Pick<State, (typeof personalizationProps)[number]> {}\n"]}
|
|
1
|
+
{"version":3,"file":"State.types.js","sourceRoot":"","sources":["../../types/State.types.ts"],"names":[],"mappings":"AAwHA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,aAAa;IAChB,8DAA8D;IAC9D,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ExcludeStrict, OmitStrict } from '@pega/cosmos-react-core';\nimport type { Condition, LeafCondition } from '@pega/cosmos-react-condition-builder';\nimport type { DateFunction } from '@pega/cosmos-react-condition-builder/lib/components/ConditionBuilder/core/types';\n\nimport type { personalizationProps } from '../src/core/reducers/personalizationReducer';\nimport type { RowData } from '../src/core/generators/RowGenerator.types';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type RsCoreBootArgs from './RsCoreBootArgs.types';\nimport type {\n ROW_DENSITY,\n HierarchicalInfo,\n /* eslint-disable @typescript-eslint/no-unused-vars */\n FieldDef,\n Meta,\n FieldType,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ConditionalStyleFormat\n} from './Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, RsApi } from './ApiContext.types';\n/** Custom functions ungrouped type */\ntype Ungrouped =\n | {\n /**\n * Ungrouped mode\n * 'aggregate' - Aggregate remaining groups as others group\n */\n mode: 'aggregate';\n /** Others group label */\n label: string;\n }\n | {\n /** 'exclude' - Exclude remaining values */\n mode: 'exclude';\n };\n\n/** Boundaries for range grouping */\nexport type RangeBoundaries =\n | 'include-lower-only'\n | 'include-upper-only'\n | 'include-both'\n | 'exclude-both';\n\n/** Rhs type for range grouping to support boundaries */\ninterface RangeGroupingRhs<T extends number | string> {\n rhs:\n | {\n value: T;\n }\n | {\n start: T;\n end: T;\n boundaries: RangeBoundaries;\n };\n}\n\n/** Modified leaf condition for Range grouping */\ntype RangeGroupingLeafCondition<T extends number | string> = OmitStrict<LeafCondition, 'rhs'> &\n RangeGroupingRhs<T>;\n\n/** Aggregation types */\nexport type AggregationType = 'Sum' | 'Min' | 'Max' | 'Avg';\n/** Aggregation state on the Table */\nexport type Aggregation = {\n /** Column ID */\n columnId: string;\n /** Aggregation type */\n type: AggregationType;\n};\n\n/** Custom grouping types */\nexport type CustomFunctions = 'TEXT_GROUPING' | 'RANGE_GROUPING';\n\n/** Custom text grouping details applied on column */\nexport type TextGrouping = {\n /** Custom function name */\n type: 'TEXT_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** Custom groups information */\n groups: {\n /** Group label */\n label: string;\n /** Group condition */\n condition: LeafCondition;\n }[];\n /** Ungrouped information */\n ungrouped: Ungrouped;\n};\n\n/** Custom range grouping details applied on column */\nexport type RangeGrouping = {\n /** Custom function name */\n type: 'RANGE_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** Custom groups information */\n groups: {\n /** Group label */\n label: string;\n /** Group condition */\n condition: RangeGroupingLeafCondition<number>;\n }[];\n /** Ungrouped information */\n ungrouped: Ungrouped;\n};\n\n/** Custom interval grouping details applied on column */\nexport type IntervalGrouping = {\n /** Custom function name */\n type: 'INTERVAL_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** interval */\n interval: number;\n /** boundaries */\n boundaries: 'include-lower-only' | 'include-upper-only';\n};\n\nexport const SortDirection = {\n ASC: 'asc',\n DESC: 'desc'\n} as const;\n\nexport const GroupSortDirection = {\n ...SortDirection,\n /** For custom grouping, the group order can be custom too. */\n CUSTOM: 'custom'\n} as const;\n\nexport type DateGroupAdditionalField = {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n /** Optional date function for {@link FieldType.DATE 'date'}/ {@link FieldType.DATE_TIME 'dateTime'} field. */\n dateFunction?: DateFunction;\n};\n\nexport type NumberGroupAdditionalField = {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n /** Optional aggregation for {@link FieldType.NUMBER 'number'} type field. */\n aggregation?: ExcludeStrict<AggregationType, 'Avg'>;\n};\n\n/** Additional fields data for Group info. */\nexport type GroupAdditionalField =\n | {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n }\n | DateGroupAdditionalField\n | NumberGroupAdditionalField;\n\n/** Group configuration on Table state */\nexport interface Group {\n /** Column ID */\n columnId: string;\n /** Date function if grouping by a date part */\n dateFunction?: DateFunction;\n /** Custom function if applied on Text/Number column */\n customFunction?: TextGrouping | RangeGrouping | IntervalGrouping;\n /** Sort order of the grouped column.\n * - asc - ascending\n * - desc - descending\n * - custom - user defined custom sorting. This is applicable in case of custom grouping.\n */\n order: (typeof GroupSortDirection)[keyof typeof GroupSortDirection];\n /** Current group level, starts with 0 for 1st level of grouping. */\n level: number;\n /** Additional field config for current group node */\n additionalFields?: GroupAdditionalField[];\n}\n\n/** Sort configuration on Table state */\nexport interface Sort {\n /** Column ID */\n columnId: string;\n /** Sort order */\n order: (typeof SortDirection)[keyof typeof SortDirection];\n /** Used to indicate the sequence in multi-sort */\n sequence: number;\n}\n\n/** Group filter from the Table state */\nexport interface GroupFilter {\n /** Start-index used for pagination */\n groupFrom: number;\n /** End-index used for pagination */\n groupTo: number;\n /**\n * List of filters in the current branch of groupFilters.\n * Each entry in the object corresponds to a single node in the given group's hierarchy\n * groupBy can be in one of two patterns - `${columnId}`, `${columnId}||${dateFunction}`.\n * Use getGroupFromKey from lists to safely split it.\n */\n filters: {\n [groupBy: string]: string | number;\n };\n}\n\nexport interface PersonalizationInfo {\n name: string;\n personalizationState: State;\n isDefaultPreset?: boolean;\n isPreset?: boolean;\n title?: string;\n template?: string;\n markAsDefault?: boolean;\n}\nexport interface Personalization {\n allPersonalizations: {\n [personalizationkey: string]: PersonalizationInfo;\n };\n defaultPersonalization: string;\n active: string;\n dirty?: boolean;\n previousDefaultPersonalization?: string;\n lastDeletedPersonalization?: PersonalizationInfo;\n}\nexport interface Child extends CustomField {\n fieldIds: string[];\n children: Child[];\n templateName: string;\n}\n/** This interface is the old implementation of custom fields which is required for state versioning reducer. */\ninterface OldCustomField {\n children?: Child[];\n templateName?: string;\n}\nexport type CustomField = {\n /**\n * An array which contains the 2 join column id details and merge template details(a tuple of length 1 and type string) for those 2 columns\n * Column Merge templates:\n * - comma\n * - space\n * - multiline\n * - forwardslash\n */\n expression: (string | [string])[];\n /** A unique id to identify the new column resulted from merging of 2 columns. */\n id: string;\n /** Label for the new column */\n label: string;\n /** Primary column id which is used to derive the {@link FieldDef FieldDefinition} of new column */\n primaryColumnId: string;\n} & OldCustomField;\n\nexport interface DataError {\n /** itemKey of the row that has error */\n [itemKeyValue: string | number]: {\n /** error message for the row */\n message: string;\n };\n}\nexport interface Errors {\n /** errors related to row data */\n dataErrors: DataError;\n}\n\nexport type ResponsiveBreakpoint = {\n [breakpoint in 'xs' | 'sm' | 'md' | 'lg' | 'xl']?: boolean;\n};\n\nexport interface EditChangeSet {\n /** Value of the itemKey {@link Meta. itemKey itemKey} of the row under which cell is edited. */\n [itemKey: string]: {\n /** {@link FieldDef.name name} of the field that is edited. */\n [fieldName: string]: {\n /** Updated cell value after edit. */\n value: string | number | boolean | Date;\n /** Current status of the edit process. 'pending' | 'inProgress' */\n status: string;\n };\n };\n}\n\nexport interface Notification {\n content: string;\n id?: string;\n}\n\n/**\n * groupBy - field id of the column on which group is toggled.\n * value(2D array) - The path of the group which is toggled.\n * @example - Consider 3 columns Priority, Severity, Status and all are grouped.\n * Expanding the first and second nested group header fully starting from Priority -> Severity -> Status will result in:\n * {\n * 'Priority': [['85 P'], ['95P']],\n * 'Severity': [['85P', 'Low severity'], ['95P', 'Low severity']],\n * 'Status': [['85P', 'Low severity', 'Pending'],['95P', 'Low severity', 'Pending']]\n * }\n */\nexport interface GroupToggle {\n [groupBy: string]: (string | number | boolean | Date)[][];\n}\n\nexport interface RowSelectionChangeSet {\n [key: string]: { data: RowData; status: string; selected: boolean };\n}\n\nexport interface EditInfo {\n rowId?: string;\n colId?: string;\n}\n\nexport interface State {\n /** Current order of the columns in the form of array of {@link FieldDef.id fieldDef id} */\n colOrder?: string[];\n /** Current widths of the columns in the form of array of fieldDef id and its current width */\n columnWidths?: { [key: string]: number };\n /** Current frozen columns represented by array of fieldDef id */\n freezeColumns?: string[];\n /** Current hidden columns represented by array of fieldDef id */\n hiddenColumns?: string[];\n /** id value from displayDensity table meta configuration property */\n selectedHeightOption?: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY];\n /** Filter configuration in the ConditionBuilder format */\n filterExpression?: Condition;\n /** Aggregation configuration */\n aggregationInfo?: Aggregation[];\n /** Grouping configuration */\n groups?: Group[];\n /** Sorting configuration */\n sortingOrder?: Sort[];\n /** Search configuration */\n search?: {\n /** Search text */\n query: string;\n /** Fields to search in */\n fields: string[];\n };\n /** Group filters applied when fetching data-rows */\n groupFilters?: GroupFilter[];\n /** Pagination applied when fetching data-rows */\n paginationOptions?: {\n [virtualizerId: string]: {\n startIndex: number;\n endIndex: number;\n };\n };\n /** An object of features that needs to be forced triggered on next dispatch cycle of Repeating structures. */\n forceUpdateFeatures?: {\n /** Force re-render the Repeating structures on next dispatch */\n forceRenderOnNextRun?: boolean;\n /** Force re-calculate width of fields of the Repeating structures on next dispatch. */\n forceCalculateAutoWidth?: boolean;\n /** Force re-fetch selectedRows by calling {@link ApiContext.getSelectedRows getSelectedRows} apiContext. */\n updateSelectedRows?: number;\n };\n /** An array of selected rows identified by value of {@link Meta.itemKey itemkey} for that rows */\n selectedRows?: string[];\n /** Repeating Structure {@link Meta.template templates} */\n template?: string;\n /**\n * Preset identifier through which the current preset/personalized view is derived.\n * For default preset or personalization dervied from default preset the value is equal to 'nonPersonalizationViewKey'\n */\n presetId?: string;\n /** Version of the state */\n version?: string;\n /** Personalization state of repeating structure */\n personalization?: Personalization;\n /** An array of custom fields generated using joining the columns */\n customFields?: CustomField[];\n /**\n * This key holds the state of the external component within RS state.\n * This state is never manipulated by Repeating structures. This key is personalizable. Currently it contains state related to {@link Meta.externalFilters}\n */\n externalState?: { [key: string]: object };\n /**\n * This holds formatter info for a given column id.\n * key - {@link FieldDef.id columnId}\n * value - Formatter name\n */\n renderFormatter?: {\n [key: string]: string;\n };\n /** It contains the alias for the column. Key is {@link FieldDef.id id} of the column, value is the alias name given to that column. */\n columnAlias?: {\n [key: string]: string;\n };\n /** Hierarchical groups info */\n hierarchicalGroup?: HierarchicalInfo;\n /** Groups are expanded or closed. */\n allGroupsExpanded?: boolean;\n\n /** Stores the errors */\n errors?: Errors;\n /** {@link FieldDef.id Id} of the field for which filter is going to be deleted. */\n clearColFilter?: string | null;\n /** A 2D array that contains the expand/collapse info of groups\n * * @example - Consider 3 columns Priority, Severity, Status and all are grouped.\n * Expanding the first and second nested group header fully starting from Priority -> Severity -> Status will result in:\n * {\n * 'Priority': [['85 P'], ['95P']],\n * 'Severity': [['85P', 'Low severity'], ['95P', 'Low severity']],\n * 'Status': [['85P', 'Low severity', 'Pending'],['95P', 'Low severity', 'Pending']]\n * }\n */\n groupToggle?: GroupToggle;\n /** Indicates if the header icon needs to be shown for header cells. */\n showHeaderIcons?: boolean;\n /** The current set of notifications on repeating structures. */\n notifications?: Notification[];\n /** Temporary change set for the selection of rows till the time the selected rows are not communicated to ApiContext via {@link ApiContext.setSelectedRows setSelectedRows}. */\n rowSelectionChangeSet?: RowSelectionChangeSet;\n /** The edit information of the cells. */\n editInfo?: EditInfo;\n /** Indicates the repeating structures is bootstraped. */\n bootstrap?: boolean;\n /** Triggers refresh on repeating structures. */\n refresh?: number;\n /** Indicates to show select all checkbox in repeating structures. */\n showSelectAllCheckbox?: boolean;\n /** Indicates to show confirmation action in repeating structures. */\n showConfirmationAction?: boolean;\n /** Stores the itemkey of the row which is being moved in drag drop operations. */\n sourceKey?: string;\n /** Stores the itemkey of the row on which the dragged row is dropped in drag drop operations. */\n destinationKey?: string;\n /** Set of features which should be skipped when running the queued action. */\n featuresToAvoid?: string[];\n /** Temporary change set information for edited row till the time data is not submitted to {@link ApiContext} */\n changeSet?: EditChangeSet;\n /** Stores the repeating structures body height. */\n tableHeight?: number | string;\n /** Stores the responsive breakpoints of DOM container */\n responsive?: ResponsiveBreakpoint;\n /**\n * Array of conditional style formats.\n *\n * When set, make sure the following conditions must be met:\n * - The available {@link RsCoreBootArgs.styleFormats styleFormats} must be passed to repeating structures as a prop.\n * - The `styleFormatId` referenced in conditional style formats within {@link State.conditionalStyleFormats state} must belong to one of the {@link RsCoreBootArgs.styleFormats styleFormats}.\n * - The {@link ApiContext.evaluateCondition evaluateCondition} API is optional. If the RS consumer wants to evaluate the condition itself, this API should be provided; otherwise, it is optional.\n *\n * **Note**: *For a given fieldName, if the data satisfies multiple conditional style formats, the first matching conditional format will be used.*\n */\n conditionalStyleFormats?: ConditionalStyleFormat[];\n}\n\nexport interface PersonalizedState extends Pick<State, (typeof personalizationProps)[number]> {}\n"]}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type RsCoreClass from './src/core/RsCore';
|
|
2
2
|
import type { ApiContext as ApiContextType, RsApi as RsApiType } from './types/ApiContext.types';
|
|
3
3
|
import type { Meta as MetaType, FieldDef as FieldDefType } from './types/Meta.types';
|
|
4
|
-
import type { State as StateType, Group as GroupType, PersonalizedState as PersonalizedStateType, Errors as StateErrors } from './types/State.types';
|
|
4
|
+
import type { State as StateType, Group as GroupType, PersonalizedState as PersonalizedStateType, Errors as StateErrors, GroupAdditionalField as GroupAdditionalFieldType } from './types/State.types';
|
|
5
5
|
import type { RowData as RowDataType } from './src/core/generators/RowGenerator.types';
|
|
6
6
|
import type RowType from './src/core/generators/RowGenerator';
|
|
7
7
|
import type ViewType from './src/core/generators/ViewGenerator';
|
|
@@ -9,12 +9,14 @@ import type { ColumnRenderingEngineProps as ColumnRenderingEnginePropsType } fro
|
|
|
9
9
|
import type ColumnType from './src/core/generators/ColumnGenerator';
|
|
10
10
|
import type RsCoreBootArgs from './types/RsCoreBootArgs.types';
|
|
11
11
|
import type { RenderFactoryWithProps as RenderFactoryWithPropsType } from './types/RsCoreBootArgs.types';
|
|
12
|
+
import type GroupGeneratorType from './src/core/generators/GroupGenerator';
|
|
12
13
|
export declare namespace RsCoreTypes {
|
|
13
14
|
/** Arguments to the rsCore initialization */
|
|
14
15
|
type ApiContext = ApiContextType;
|
|
15
16
|
type Meta = MetaType;
|
|
16
17
|
type State = StateType;
|
|
17
18
|
type Group = GroupType;
|
|
19
|
+
type GroupAdditionalField = GroupAdditionalFieldType;
|
|
18
20
|
type PersonalizedState = PersonalizedStateType;
|
|
19
21
|
type FieldDef = FieldDefType;
|
|
20
22
|
type RenderFactoryWithProps = RenderFactoryWithPropsType;
|
|
@@ -27,5 +29,6 @@ export declare namespace RsCoreTypes {
|
|
|
27
29
|
type View = ViewType;
|
|
28
30
|
type RowData = RowDataType;
|
|
29
31
|
type Errors = StateErrors;
|
|
32
|
+
type GroupGenerator = GroupGeneratorType;
|
|
30
33
|
}
|
|
31
34
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjG,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,KAAK,EACV,KAAK,IAAI,SAAS,EAClB,KAAK,IAAI,SAAS,EAClB,iBAAiB,IAAI,qBAAqB,EAC1C,MAAM,IAAI,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjG,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,KAAK,EACV,KAAK,IAAI,SAAS,EAClB,KAAK,IAAI,SAAS,EAClB,iBAAiB,IAAI,qBAAqB,EAC1C,MAAM,IAAI,WAAW,EACrB,oBAAoB,IAAI,wBAAwB,EACjD,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,KAAK,OAAO,MAAM,oCAAoC,CAAC;AAC9D,OAAO,KAAK,QAAQ,MAAM,qCAAqC,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,IAAI,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAChI,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACzG,OAAO,KAAK,kBAAkB,MAAM,sCAAsC,CAAC;AAE3E,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,6CAA6C;IAC7C,KAAY,UAAU,GAAG,cAAc,CAAC;IACxC,KAAY,IAAI,GAAG,QAAQ,CAAC;IAC5B,KAAY,KAAK,GAAG,SAAS,CAAC;IAC9B,KAAY,KAAK,GAAG,SAAS,CAAC;IAC9B,KAAY,oBAAoB,GAAG,wBAAwB,CAAC;IAC5D,KAAY,iBAAiB,GAAG,qBAAqB,CAAC;IACtD,KAAY,QAAQ,GAAG,YAAY,CAAC;IACpC,KAAY,sBAAsB,GAAG,0BAA0B,CAAC;IAChE,KAAY,0BAA0B,GAAG,8BAA8B,CAAC;IACxE,KAAY,cAAc,GAAG,cAAc,CAAC;IAC5C,KAAY,KAAK,GAAG,SAAS,CAAC;IAE9B,KAAY,MAAM,GAAG,WAAW,CAAC;IAEjC,KAAY,MAAM,GAAG,UAAU,CAAC;IAChC,KAAY,GAAG,GAAG,OAAO,CAAC;IAC1B,KAAY,IAAI,GAAG,QAAQ,CAAC;IAC5B,KAAY,OAAO,GAAG,WAAW,CAAC;IAClC,KAAY,MAAM,GAAG,WAAW,CAAC;IACjC,KAAY,cAAc,GAAG,kBAAkB,CAAC;CACjD"}
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"","sourcesContent":["import type RsCoreClass from './src/core/RsCore';\nimport type { ApiContext as ApiContextType, RsApi as RsApiType } from './types/ApiContext.types';\nimport type { Meta as MetaType, FieldDef as FieldDefType } from './types/Meta.types';\nimport type {\n State as StateType,\n Group as GroupType,\n PersonalizedState as PersonalizedStateType,\n Errors as StateErrors\n} from './types/State.types';\nimport type { RowData as RowDataType } from './src/core/generators/RowGenerator.types';\nimport type RowType from './src/core/generators/RowGenerator';\nimport type ViewType from './src/core/generators/ViewGenerator';\nimport type { ColumnRenderingEngineProps as ColumnRenderingEnginePropsType } from './src/core/generators/ColumnGenerator.types';\nimport type ColumnType from './src/core/generators/ColumnGenerator';\nimport type RsCoreBootArgs from './types/RsCoreBootArgs.types';\nimport type { RenderFactoryWithProps as RenderFactoryWithPropsType } from './types/RsCoreBootArgs.types';\n\nexport declare namespace RsCoreTypes {\n /** Arguments to the rsCore initialization */\n export type ApiContext = ApiContextType;\n export type Meta = MetaType;\n export type State = StateType;\n export type Group = GroupType;\n export type PersonalizedState = PersonalizedStateType;\n export type FieldDef = FieldDefType;\n export type RenderFactoryWithProps = RenderFactoryWithPropsType;\n export type ColumnRenderingEngineProps = ColumnRenderingEnginePropsType;\n export type RsCoreInitArgs = RsCoreBootArgs;\n export type RsApi = RsApiType;\n\n export type RsCore = RsCoreClass;\n\n export type Column = ColumnType;\n export type Row = RowType;\n export type View = ViewType;\n export type RowData = RowDataType;\n export type Errors = StateErrors;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"","sourcesContent":["import type RsCoreClass from './src/core/RsCore';\nimport type { ApiContext as ApiContextType, RsApi as RsApiType } from './types/ApiContext.types';\nimport type { Meta as MetaType, FieldDef as FieldDefType } from './types/Meta.types';\nimport type {\n State as StateType,\n Group as GroupType,\n PersonalizedState as PersonalizedStateType,\n Errors as StateErrors,\n GroupAdditionalField as GroupAdditionalFieldType\n} from './types/State.types';\nimport type { RowData as RowDataType } from './src/core/generators/RowGenerator.types';\nimport type RowType from './src/core/generators/RowGenerator';\nimport type ViewType from './src/core/generators/ViewGenerator';\nimport type { ColumnRenderingEngineProps as ColumnRenderingEnginePropsType } from './src/core/generators/ColumnGenerator.types';\nimport type ColumnType from './src/core/generators/ColumnGenerator';\nimport type RsCoreBootArgs from './types/RsCoreBootArgs.types';\nimport type { RenderFactoryWithProps as RenderFactoryWithPropsType } from './types/RsCoreBootArgs.types';\nimport type GroupGeneratorType from './src/core/generators/GroupGenerator';\n\nexport declare namespace RsCoreTypes {\n /** Arguments to the rsCore initialization */\n export type ApiContext = ApiContextType;\n export type Meta = MetaType;\n export type State = StateType;\n export type Group = GroupType;\n export type GroupAdditionalField = GroupAdditionalFieldType;\n export type PersonalizedState = PersonalizedStateType;\n export type FieldDef = FieldDefType;\n export type RenderFactoryWithProps = RenderFactoryWithPropsType;\n export type ColumnRenderingEngineProps = ColumnRenderingEnginePropsType;\n export type RsCoreInitArgs = RsCoreBootArgs;\n export type RsApi = RsApiType;\n\n export type RsCore = RsCoreClass;\n\n export type Column = ColumnType;\n export type Row = RowType;\n export type View = ViewType;\n export type RowData = RowDataType;\n export type Errors = StateErrors;\n export type GroupGenerator = GroupGeneratorType;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-build.10.0",
|
|
4
4
|
"description": "Core headless UI library that the users can use to write their own UI and create repeating structures like table, gallery, timeline etc.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "
|
|
18
|
-
"@pega/cosmos-react-core": "
|
|
19
|
-
"@pega/cosmos-react-work": "8.8.0",
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "9.0.0-build.10.0",
|
|
18
|
+
"@pega/cosmos-react-core": "9.0.0-build.10.0",
|
|
20
19
|
"@types/lodash.get": "^4.4.9",
|
|
21
20
|
"@types/uuid": "^9.0.0",
|
|
22
21
|
"dayjs": "^1.11.13",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { BeforeRenderFeatureProps } from '../../featureFactory';
|
|
2
|
-
/**
|
|
3
|
-
* Triggers {@link actionColumnResize columnResize} action for `drag drop` column when {@link State.showGroupingExpandCollapseAll} is changed.
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
export default function resizeGroupedDragDropColumn(): (featureProps: BeforeRenderFeatureProps) => void;
|
|
7
|
-
//# sourceMappingURL=resizeGroupedDragDropColumn.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resizeGroupedDragDropColumn.d.ts","sourceRoot":"","sources":["../../../../../../src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiBrE;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,2BAA2B,KAEzB,cAAc,wBAAwB,UAM/D"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { withMemoization } from '../../../utils/util';
|
|
2
|
-
import { actionColumnResize } from '../../../actions/actions';
|
|
3
|
-
import { expandCollapseAllMeta, rowDragDropColumnMeta } from '../../../constants';
|
|
4
|
-
async function updateDragDropColumnWidth([{ getView, dispatch }]) {
|
|
5
|
-
const dragDropColumnId = rowDragDropColumnMeta.field.id;
|
|
6
|
-
const isDragDropPresent = getView().columns.findIndex(column => column.field.id === dragDropColumnId) > -1;
|
|
7
|
-
if (!isDragDropPresent)
|
|
8
|
-
return;
|
|
9
|
-
const dragDropColumnWidth = getView().showGroupingExpandCollapseAll
|
|
10
|
-
? expandCollapseAllMeta.width
|
|
11
|
-
: rowDragDropColumnMeta.field.width;
|
|
12
|
-
dispatch(actionColumnResize({ [dragDropColumnId]: dragDropColumnWidth }));
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Triggers {@link actionColumnResize columnResize} action for `drag drop` column when {@link State.showGroupingExpandCollapseAll} is changed.
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
export default function resizeGroupedDragDropColumn() {
|
|
19
|
-
const memoizedUpdateDragDropColumnWidth = withMemoization(updateDragDropColumnWidth);
|
|
20
|
-
return function execute(featureProps) {
|
|
21
|
-
memoizedUpdateDragDropColumnWidth([featureProps], [featureProps.getView().showGroupingExpandCollapseAll]);
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=resizeGroupedDragDropColumn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resizeGroupedDragDropColumn.js","sourceRoot":"","sources":["../../../../../../src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAKlF,KAAK,UAAU,yBAAyB,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAE9D;IACC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;IACxD,MAAM,iBAAiB,GACrB,OAAO,EAAE,CAAC,OAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;IACpF,IAAI,CAAC,iBAAiB;QAAE,OAAO;IAC/B,MAAM,mBAAmB,GAAG,OAAO,EAAE,CAAC,6BAA6B;QACjE,CAAC,CAAC,qBAAqB,CAAC,KAAK;QAC7B,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC;IACtC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,2BAA2B;IACjD,MAAM,iCAAiC,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;IACrF,OAAO,SAAS,OAAO,CAAC,YAAsC;QAC5D,iCAAiC,CAC/B,CAAC,YAAY,CAAC,EACd,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,6BAA6B,CAAC,CACvD,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { withMemoization } from '../../../utils/util';\nimport { actionColumnResize } from '../../../actions/actions';\nimport { expandCollapseAllMeta, rowDragDropColumnMeta } from '../../../constants';\nimport type { BeforeRenderFeatureProps } from '../../featureFactory';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { State } from '../../../../../types/State.types';\n\nasync function updateDragDropColumnWidth([{ getView, dispatch }]: [\n featureProps: BeforeRenderFeatureProps\n]) {\n const dragDropColumnId = rowDragDropColumnMeta.field.id;\n const isDragDropPresent =\n getView().columns!.findIndex(column => column.field.id === dragDropColumnId) > -1;\n if (!isDragDropPresent) return;\n const dragDropColumnWidth = getView().showGroupingExpandCollapseAll\n ? expandCollapseAllMeta.width\n : rowDragDropColumnMeta.field.width;\n dispatch(actionColumnResize({ [dragDropColumnId]: dragDropColumnWidth }));\n}\n\n/**\n * Triggers {@link actionColumnResize columnResize} action for `drag drop` column when {@link State.showGroupingExpandCollapseAll} is changed.\n *\n */\nexport default function resizeGroupedDragDropColumn() {\n const memoizedUpdateDragDropColumnWidth = withMemoization(updateDragDropColumnWidth);\n return function execute(featureProps: BeforeRenderFeatureProps) {\n memoizedUpdateDragDropColumnWidth(\n [featureProps],\n [featureProps.getView().showGroupingExpandCollapseAll]\n );\n };\n}\n"]}
|