@talxis/base-controls 1.2605.2-alpha → 1.2606.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Grid/cells/cell/Cell.js +2 -6
- package/dist/components/Grid/cells/cell/Cell.js.map +1 -1
- package/dist/components/Grid/column-headers/column-header/ColumnHeader.js +1 -1
- package/dist/components/Grid/column-headers/column-header/ColumnHeader.js.map +1 -1
- package/dist/components/Grid/grid/ag-grid/AgGridModel.js +1 -1
- package/dist/components/Grid/grid/ag-grid/AgGridModel.js.map +1 -1
- package/dist/components/Lookup/components/TargetSelector.js +1 -1
- package/dist/components/Lookup/components/TargetSelector.js.map +1 -1
- package/dist/components/Lookup/hooks/useLookup.d.ts +4 -0
- package/dist/components/Lookup/translations.d.ts +4 -0
- package/dist/components/Lookup/translations.js +4 -0
- package/dist/components/Lookup/translations.js.map +1 -1
- package/dist/components/TaskGrid/TaskGrid.js +2 -2
- package/dist/components/TaskGrid/TaskGrid.js.map +1 -1
- package/dist/components/TaskGrid/TaskGridDatasetControl.d.ts +2 -0
- package/dist/components/TaskGrid/TaskGridDatasetControl.js +42 -28
- package/dist/components/TaskGrid/TaskGridDatasetControl.js.map +1 -1
- package/dist/components/TaskGrid/TaskGridDatasetControlFactory.js +3 -0
- package/dist/components/TaskGrid/TaskGridDatasetControlFactory.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/cell-renderers/lookup-many/LookupManyCellRenderer.js +6 -3
- package/dist/components/TaskGrid/components/grid/cell-renderers/lookup-many/LookupManyCellRenderer.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/PercentComplete.js +2 -4
- package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/PercentComplete.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/styles.d.ts +0 -6
- package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/styles.js +0 -6
- package/dist/components/TaskGrid/components/grid/cell-renderers/percent-complete/styles.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/grid-customizer/GridCustomizer.js +10 -5
- package/dist/components/TaskGrid/components/grid/grid-customizer/GridCustomizer.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/group-cell/styles.d.ts +3 -0
- package/dist/components/TaskGrid/components/grid/group-cell/styles.js +3 -0
- package/dist/components/TaskGrid/components/grid/group-cell/styles.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/LookupMany.d.ts +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/LookupMany.js +3 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/LookupMany.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/index.d.ts +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/index.js +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/index.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/components/components.d.ts +11 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/components.js +17 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/components.js.map +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/index.d.ts +1 -10
- package/dist/components/TaskGrid/components/grid/lookup-many/components/index.js +1 -14
- package/dist/components/TaskGrid/components/grid/lookup-many/components/index.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/components/menu/Menu.d.ts +3 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/menu/Menu.js +10 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/menu/Menu.js.map +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/menu/index.d.ts +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/menu/index.js +2 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/menu/index.js.map +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/MultiValueContainer.d.ts +5 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/MultiValueContainer.js +3 -2
- package/dist/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/MultiValueContainer.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/PeopleLookupMany.js +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/PeopleLookupMany.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/components.d.ts +2 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/components.js +15 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/components.js.map +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/index.d.ts +1 -2
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/index.js +1 -12
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/index.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/MultiValueContainer.d.ts +3 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/MultiValueContainer.js +12 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/MultiValueContainer.js.map +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/index.d.ts +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/index.js +2 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/index.js.map +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/styles.d.ts +9 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/styles.js +18 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/styles.js.map +1 -0
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/MultiValueLabel.js +1 -1
- package/dist/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/MultiValueLabel.js.map +1 -1
- package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/MultiValueLabel.d.ts +1 -1
- package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/MultiValueLabel.js +3 -2
- package/dist/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/MultiValueLabel.js.map +1 -1
- package/dist/components/TaskGrid/components/header/Header.d.ts +1 -1
- package/dist/components/TaskGrid/components/header/Header.js +58 -44
- package/dist/components/TaskGrid/components/header/Header.js.map +1 -1
- package/dist/components/TaskGrid/extensions/dataverse/DataverseCustomColumnsStrategy.d.ts +12 -6
- package/dist/components/TaskGrid/extensions/dataverse/DataverseCustomColumnsStrategy.js +23 -20
- package/dist/components/TaskGrid/extensions/dataverse/DataverseCustomColumnsStrategy.js.map +1 -1
- package/dist/components/TaskGrid/extensions/dataverse/DataverseGridCustomizerStrategy.d.ts +3 -3
- package/dist/components/TaskGrid/extensions/dataverse/DataverseGridCustomizerStrategy.js +4 -5
- package/dist/components/TaskGrid/extensions/dataverse/DataverseGridCustomizerStrategy.js.map +1 -1
- package/dist/components/TaskGrid/extensions/dataverse/DataverseSavedQueryStrategy.js +15 -15
- package/dist/components/TaskGrid/extensions/dataverse/DataverseSavedQueryStrategy.js.map +1 -1
- package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskGridDescriptor.d.ts +27 -25
- package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskGridDescriptor.js +68 -29
- package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskGridDescriptor.js.map +1 -1
- package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskStrategy.d.ts +19 -17
- package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskStrategy.js +119 -74
- package/dist/components/TaskGrid/extensions/dataverse/DataverseTaskStrategy.js.map +1 -1
- package/dist/components/TaskGrid/extensions/dataverse/index.js +1 -1
- package/dist/components/TaskGrid/extensions/dataverse/lookup-many/LookupManyHandler.d.ts +18 -2
- package/dist/components/TaskGrid/extensions/dataverse/lookup-many/LookupManyHandler.js +80 -17
- package/dist/components/TaskGrid/extensions/dataverse/lookup-many/LookupManyHandler.js.map +1 -1
- package/dist/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlLookupManyCellRenderer.js +10 -4
- package/dist/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlLookupManyCellRenderer.js.map +1 -1
- package/dist/components/TaskGrid/interfaces.d.ts +36 -22
- package/dist/components/TaskGrid/providers/custom-columns/CustomColumnsDataProvider.d.ts +7 -1
- package/dist/components/TaskGrid/providers/custom-columns/CustomColumnsDataProvider.js +3 -0
- package/dist/components/TaskGrid/providers/custom-columns/CustomColumnsDataProvider.js.map +1 -1
- package/dist/components/TaskGrid/providers/saved-query/SavedQueryDataProvider.d.ts +1 -1
- package/dist/components/TaskGrid/providers/saved-query/SavedQueryDataProvider.js +9 -26
- package/dist/components/TaskGrid/providers/saved-query/SavedQueryDataProvider.js.map +1 -1
- package/dist/components/TaskGrid/providers/task/TaskDataProvider.d.ts +13 -20
- package/dist/components/TaskGrid/providers/task/TaskDataProvider.js +30 -22
- package/dist/components/TaskGrid/providers/task/TaskDataProvider.js.map +1 -1
- package/dist/components/TaskGrid/providers/task/record-tree/RecordTree.d.ts +8 -0
- package/dist/components/TaskGrid/providers/task/record-tree/RecordTree.js.map +1 -1
- package/dist/index.d.ts +68 -42
- package/dist/utils/dataset/adapters/VirtualDatasetAdapter.js.map +1 -1
- package/package.json +4 -4
- package/dist/components/TaskGrid/extensions/LexoRank.d.ts +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordTree.js","sources":["../../../../../../src/components/TaskGrid/providers/task/record-tree/RecordTree.ts"],"sourcesContent":["import { IRecord, MemoryDataProvider } from \"@talxis/client-libraries\";\nimport { ITaskDataProvider } from \"../TaskDataProvider\";\nimport { patchDataBuilderPrepare } from \"./patchDataBuilderPrepare\";\n\ninterface ITreeNode {\n directChildren: IRecord[];\n allChildren: IRecord[];\n pathIds: string[];\n pathStrings: string[];\n index: number;\n parent?: IRecord;\n}\n\ninterface IRecordTreeParameters {\n taskDataProvider: ITaskDataProvider;\n}\n\nexport interface IRecordTree {\n build(): Map<string, ITreeNode>\n getNodeMap(): Map<string, ITreeNode>;\n getNode(recordId: string | null): ITreeNode;\n getTotalCount(): number;\n isFlat(): boolean;\n hasChildren(recordId: string): boolean;\n getMatchingRecords(): { [recordId: string]: IRecord };\n getSortedIds(): string[];\n}\n\nexport class RecordTree implements IRecordTree {\n private _nodeMap: Map<string, ITreeNode> = new Map();\n private _sortingMap: { [recordId: string]: number } = {};\n private _matchingRecordsMap: { [recordId: string]: IRecord } = {};\n private _isFlat: boolean = false;\n private _totalUniqueRecords: number = 0;\n private _sortedRecordIds: string[] = [];\n private _records: IRecord[] = [];\n private _recordsMap: { [recordId: string]: IRecord } = {};\n private _taskDataProvider: ITaskDataProvider;\n\n constructor(parameters: IRecordTreeParameters) {\n this._taskDataProvider = parameters.taskDataProvider;\n }\n\n public getNodeMap(): Map<string, ITreeNode> {\n return this._nodeMap;\n }\n public getTotalCount(): number {\n return this._totalUniqueRecords;\n }\n public isFlat(): boolean {\n return this._isFlat;\n }\n public getMatchingRecords(): { [recordId: string]: IRecord } {\n return this._matchingRecordsMap;\n }\n public getNode(recordId: string | null): ITreeNode {\n return this._nodeMap.get(recordId as any)!;\n }\n\n public hasChildren(recordId: string): boolean {\n const children = this._nodeMap.get(recordId)?.directChildren;\n if (children && children.length > 0) {\n return true;\n }\n return false;\n }\n\n public getSortedIds(): string[] {\n return this._sortedRecordIds;\n }\n\n public build(): Map<string, ITreeNode> {\n this._records = this._taskDataProvider.getAllRecords();\n this._recordsMap = this._taskDataProvider.getRecordsMap();\n // Clear existing record tree map and flat sorted array\n this._nodeMap.clear();\n this._patchRecordPaths();\n this._buildSortingMap();\n this._buildMatchingRecords();\n\n // Create reusable sort function\n const sortByIndex = (a: IRecord, b: IRecord): number => {\n const indexA = this._sortingMap[a.getRecordId()] ?? Number.MAX_SAFE_INTEGER;\n const indexB = this._sortingMap[b.getRecordId()] ?? Number.MAX_SAFE_INTEGER;\n return indexA - indexB;\n };\n\n const records = this._records;\n const recordsMap = this._recordsMap;\n\n const parentToDirectChildren = new Map<string, IRecord[]>();\n const topLevelRecords: IRecord[] = [];\n\n for (const record of records) {\n const parentRef = record.getValue(this._getNativeColumns().parentId);\n const parentId = parentRef?.[0]?.id?.guid;\n\n if (parentId && recordsMap[parentId]) {\n if (!parentToDirectChildren.has(parentId)) {\n parentToDirectChildren.set(parentId, []);\n }\n parentToDirectChildren.get(parentId)!.push(record);\n }\n else {\n topLevelRecords.push(record);\n }\n }\n\n topLevelRecords.sort(sortByIndex);\n for (const [, children] of parentToDirectChildren) {\n children.sort(sortByIndex);\n }\n\n const hasMatchingDescendantCache = new Map<string, boolean>();\n const calculateHasMatchingDescendant = (recordId: string): boolean => {\n if (hasMatchingDescendantCache.has(recordId)) {\n return hasMatchingDescendantCache.get(recordId)!;\n }\n\n if (this._matchingRecordsMap[recordId]) {\n hasMatchingDescendantCache.set(recordId, true);\n return true;\n }\n\n // Set false sentinel before recursing to break circular reference cycles\n hasMatchingDescendantCache.set(recordId, false);\n const directChildren = parentToDirectChildren.get(recordId) || [];\n const hasMatching = directChildren.some(child =>\n calculateHasMatchingDescendant(child.getRecordId())\n );\n\n hasMatchingDescendantCache.set(recordId, hasMatching);\n return hasMatching;\n };\n\n for (const record of records) {\n calculateHasMatchingDescendant(record.getRecordId());\n }\n\n const recordToAllChildren = new Map<string, IRecord[]>();\n const recordToFilteredDirectChildren = new Map<string, IRecord[]>();\n const inProgressChildren = new Set<string>();\n\n const getAllChildren = (recordId: string): IRecord[] => {\n if (recordToAllChildren.has(recordId)) {\n return recordToAllChildren.get(recordId)!;\n }\n\n // Break circular reference cycles\n if (inProgressChildren.has(recordId)) {\n console.warn(`Circular reference detected: record \"${recordsMap[recordId]?.getNamedReference().name}\" (${recordId}) was encountered twice during tree traversal. All records involved in this cycle and their descendants will be missing from the tree.`);\n return [];\n }\n inProgressChildren.add(recordId);\n\n const directChildren = parentToDirectChildren.get(recordId) || [];\n const allChildren: IRecord[] = [];\n\n const filteredDirectChildren: IRecord[] = [];\n\n for (const child of directChildren) {\n if (hasMatchingDescendantCache.get(child.getRecordId())) {\n filteredDirectChildren.push(child);\n allChildren.push(child);\n allChildren.push(...getAllChildren(child.getRecordId()));\n }\n }\n\n recordToFilteredDirectChildren.set(recordId, filteredDirectChildren);\n recordToAllChildren.set(recordId, allChildren);\n inProgressChildren.delete(recordId);\n return allChildren;\n };\n\n const filteredTopLevelRecords: IRecord[] = [];\n const allRecordsWithMatching: IRecord[] = [];\n\n for (const record of topLevelRecords) {\n if (hasMatchingDescendantCache.get(record.getRecordId())) {\n filteredTopLevelRecords.push(record);\n }\n }\n\n for (const record of records) {\n if (hasMatchingDescendantCache.get(record.getRecordId())) {\n allRecordsWithMatching.push(record);\n }\n getAllChildren(record.getRecordId());\n }\n\n allRecordsWithMatching.sort(sortByIndex);\n \n for (const record of records) {\n const recordId = record.getRecordId();\n const isTopLevel = !record.getValue(this._getNativeColumns().parentId);\n\n const allChildren = getAllChildren(recordId);\n const filteredDirectChildren = recordToFilteredDirectChildren.get(recordId) || [];\n\n let parentRecord: IRecord | undefined = undefined;\n\n let index = -1;\n\n if (!isTopLevel) {\n const parentRef = record.getValue(this._getNativeColumns().parentId);\n const parentId = parentRef?.[0]?.id?.guid;\n if (parentId) {\n parentRecord = recordsMap[parentId];\n const parentFilteredChildren = recordToFilteredDirectChildren.get(parentId) || [];\n index = parentFilteredChildren.findIndex(sibling => sibling.getRecordId() === recordId);\n }\n } else {\n index = filteredTopLevelRecords.findIndex(topRecord => topRecord.getRecordId() === recordId);\n }\n\n let pathIds: string[] = [];\n let pathStrings: string[] = [];\n const pathCache = new Map<string, { pathIds: string[], pathStrings: string[] }>();\n if (pathCache.has(recordId)) {\n const cached = pathCache.get(recordId)!;\n pathIds = cached.pathIds;\n pathStrings = cached.pathStrings;\n }\n else {\n const pathIdParts: string[] = [];\n const pathStringParts: string[] = [];\n let currentRecord: IRecord | null = record;\n const visited = new Set<string>();\n\n while (currentRecord) {\n const currentId = currentRecord.getRecordId();\n if (visited.has(currentId)) break;\n visited.add(currentId);\n\n pathIdParts.unshift(currentRecord.getRecordId());\n pathStringParts.unshift(currentRecord.getNamedReference().name);\n const parentRef: ComponentFramework.EntityReference[] = currentRecord.getValue(this._getNativeColumns().parentId);\n const parentId = parentRef?.[0]?.id?.guid;\n currentRecord = parentId ? recordsMap[parentId] : null;\n }\n\n pathIds = pathIdParts;\n pathStrings = pathStringParts;\n pathCache.set(recordId, { pathIds, pathStrings });\n }\n\n this._nodeMap.set(recordId, {\n directChildren: filteredDirectChildren,\n allChildren: allChildren,\n pathIds,\n pathStrings,\n parent: parentRecord,\n index\n });\n }\n this._isFlat = filteredTopLevelRecords.every(record => this._nodeMap.get(record.getRecordId())!.directChildren.length === 0);\n const rootTaskId = this._getTaskDataProvider().getRootTaskId();\n if (!rootTaskId) {\n if (this._getTaskDataProvider().isFlatListEnabled()) {\n const directlyMatchingRecords: IRecord[] = allRecordsWithMatching.filter(r => this._matchingRecordsMap[r.getRecordId()]);\n this._nodeMap.set(null as any, {\n directChildren: directlyMatchingRecords,\n allChildren: directlyMatchingRecords,\n pathIds: [],\n pathStrings: [],\n index: -1\n });\n this._totalUniqueRecords = directlyMatchingRecords.length;\n this._sortedRecordIds = directlyMatchingRecords.map(r => r.getRecordId());\n }\n else {\n this._nodeMap.set(null as any, {\n directChildren: filteredTopLevelRecords,\n allChildren: allRecordsWithMatching,\n pathIds: [],\n pathStrings: [],\n index: -1\n });\n this._totalUniqueRecords = allRecordsWithMatching.length;\n this._sortedRecordIds = allRecordsWithMatching.map(r => r.getRecordId());\n }\n }\n else {\n const topLevelNode = this._nodeMap.get(rootTaskId);\n if (this._getTaskDataProvider().isFlatListEnabled()) {\n const directlyMatchingRecords: IRecord[] = topLevelNode?.allChildren.filter(r => this._matchingRecordsMap[r.getRecordId()]) || [];\n topLevelNode!.directChildren = directlyMatchingRecords;\n topLevelNode!.allChildren = directlyMatchingRecords;\n }\n this._nodeMap.set(null as any, topLevelNode!);\n this._totalUniqueRecords = topLevelNode!.allChildren.length;\n this._sortedRecordIds = topLevelNode!.allChildren.map(r => r.getRecordId());\n }\n return this._nodeMap;\n }\n\n\n private _buildMatchingRecords() {\n this._matchingRecordsMap = {};\n const provider = this._createBaseProvider();\n provider.onGetQuickFindColumns = () => this._getTaskDataProvider().getQuickFindColumns();\n provider.setFiltering(this._getTaskDataProvider().getFiltering());\n provider.setSearchQuery(this._getTaskDataProvider().getSearchQuery());\n provider.refreshSync();\n this._matchingRecordsMap = provider.getRecordsMap();\n }\n\n private _buildSortingMap() {\n this._sortingMap = {};\n let index = -1;\n const provider = this._createBaseProvider();\n provider.addEventListener('onRecordLoaded', (record) => {\n this._sortingMap[record.getRecordId()] = ++index;\n });\n provider.refreshSync();\n }\n\n private _createBaseProvider(): MemoryDataProvider {\n const taskDataProvider = this._getTaskDataProvider();\n const provider = new MemoryDataProvider({\n dataSource: taskDataProvider.getDataSource(),\n metadata: taskDataProvider.getMetadata()\n });\n patchDataBuilderPrepare({ provider, records: this._records });\n provider.getPaging().setPageSize(taskDataProvider.getDataSource().length);\n provider.setSorting(taskDataProvider.getSorting());\n provider.setColumns(taskDataProvider.getColumns());\n return provider;\n }\n\n private _buildPathForRecord(recordId: string): string[] {\n const path: string[] = [];\n const recordsMap = this._recordsMap;\n const parentIdName = this._getNativeColumns().parentId;\n let record: IRecord | undefined = recordsMap[recordId];\n const visited = new Set<string>();\n while (record) {\n const currentId = record.getRecordId();\n if (visited.has(currentId)) break;\n visited.add(currentId);\n path.unshift(record.getNamedReference().name);\n const parentId: string = record?.getValue(parentIdName)?.[0]?.id?.guid;\n record = recordsMap[parentId];\n }\n return path;\n }\n\n private _patchRecordPaths() {\n if(!this._getTaskDataProvider().getColumnsMap()[this._getNativeColumns().path]) return;\n for (const record of this._records) {\n const path = this._buildPathForRecord(record.getRecordId());\n const field = record.getField(this._getNativeColumns().path);\n const pathString = path.join('/');\n //@ts-ignore\n field._originalValue = pathString;\n //@ts-ignore\n field._currentValue = pathString;\n }\n }\n\n private _getNativeColumns(): ReturnType<ITaskDataProvider['getNativeColumns']> {\n return this._getTaskDataProvider().getNativeColumns();\n }\n\n private _getTaskDataProvider(): ITaskDataProvider {\n const provider = this._taskDataProvider;\n if (!provider) {\n throw new Error('TaskDataProvider dependency not provided!');\n }\n return provider;\n }\n}"],"names":[],"mappings":";;;MA4Ba,UAAU,CAAA;AAWnB,IAAA,WAAA,CAAY,UAAiC,EAAA;AAVrC,QAAA,IAAA,CAAA,QAAQ,GAA2B,IAAI,GAAG,EAAE,CAAC;QAC7C,IAAW,CAAA,WAAA,GAAmC,EAAE,CAAC;QACjD,IAAmB,CAAA,mBAAA,GAAoC,EAAE,CAAC;QAC1D,IAAO,CAAA,OAAA,GAAY,KAAK,CAAC;QACzB,IAAmB,CAAA,mBAAA,GAAW,CAAC,CAAC;QAChC,IAAgB,CAAA,gBAAA,GAAa,EAAE,CAAC;QAChC,IAAQ,CAAA,QAAA,GAAc,EAAE,CAAC;QACzB,IAAW,CAAA,WAAA,GAAoC,EAAE,CAAC;AAItD,QAAA,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAAC;KACxD;IAEM,UAAU,GAAA;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;IACM,aAAa,GAAA;QAChB,OAAO,IAAI,CAAC,mBAAmB,CAAC;KACnC;IACM,MAAM,GAAA;QACT,OAAO,IAAI,CAAC,OAAO,CAAC;KACvB;IACM,kBAAkB,GAAA;QACrB,OAAO,IAAI,CAAC,mBAAmB,CAAC;KACnC;AACM,IAAA,OAAO,CAAC,QAAuB,EAAA;QA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;AACvE,YAAA,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;AACjC,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;KACf;IAEO,iBAAiB,GAAA;AACrB,QAAA,IAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC;YAAE,OAAO;AACvF,QAAA,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE;YAChC,MAAM,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;AAC5D,YAAA,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC;YAC7D,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;AAElC,YAAA,KAAK,CAAC,cAAc,GAAG,UAAU,CAAC;;AAElC,YAAA,KAAK,CAAC,aAAa,GAAG,UAAU,CAAC;AACpC,SAAA;KACJ;IAEO,iBAAiB,GAAA;AACrB,QAAA,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC,gBAAgB,EAAE,CAAC;KACzD;IAEO,oBAAoB,GAAA;AACxB,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACxC,IAAI,CAAC,QAAQ,EAAE;AACX,YAAA,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;AAChE,SAAA;AACD,QAAA,OAAO,QAAQ,CAAC;KACnB;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"RecordTree.js","sources":["../../../../../../src/components/TaskGrid/providers/task/record-tree/RecordTree.ts"],"sourcesContent":["import { IRecord, MemoryDataProvider } from \"@talxis/client-libraries\";\nimport { ITaskDataProvider } from \"../TaskDataProvider\";\nimport { patchDataBuilderPrepare } from \"./patchDataBuilderPrepare\";\n\ninterface ITreeNode {\n directChildren: IRecord[];\n allChildren: IRecord[];\n pathIds: string[];\n pathStrings: string[];\n index: number;\n parent?: IRecord;\n}\n\ninterface IRecordTreeParameters {\n taskDataProvider: ITaskDataProvider;\n}\n\nexport interface IRecordTree {\n /** Builds (or rebuilds) the node map from the current provider records. Returns the resulting map keyed by record id. */\n build(): Map<string, ITreeNode>\n /** Returns the current node map keyed by record id without triggering a rebuild. */\n getNodeMap(): Map<string, ITreeNode>;\n /** Returns the tree node for the given record id. Pass `null` to get the virtual root node. */\n getNode(recordId: string | null): ITreeNode;\n /** Returns the total number of unique records in the tree. */\n getTotalCount(): number;\n /** Returns `true` when the tree is in flat-list mode (no parent-child hierarchy). */\n isFlat(): boolean;\n /** Returns `true` when the record with the given id has at least one direct child. */\n hasChildren(recordId: string): boolean;\n /** Returns a map of records that match the current search/filter, keyed by record id. */\n getMatchingRecords(): { [recordId: string]: IRecord };\n /** Returns record ids in their computed display order (depth-first, stack-rank sorted). */\n getSortedIds(): string[];\n}\n\nexport class RecordTree implements IRecordTree {\n private _nodeMap: Map<string, ITreeNode> = new Map();\n private _sortingMap: { [recordId: string]: number } = {};\n private _matchingRecordsMap: { [recordId: string]: IRecord } = {};\n private _isFlat: boolean = false;\n private _totalUniqueRecords: number = 0;\n private _sortedRecordIds: string[] = [];\n private _records: IRecord[] = [];\n private _recordsMap: { [recordId: string]: IRecord } = {};\n private _taskDataProvider: ITaskDataProvider;\n\n constructor(parameters: IRecordTreeParameters) {\n this._taskDataProvider = parameters.taskDataProvider;\n }\n\n public getNodeMap(): Map<string, ITreeNode> {\n return this._nodeMap;\n }\n public getTotalCount(): number {\n return this._totalUniqueRecords;\n }\n public isFlat(): boolean {\n return this._isFlat;\n }\n public getMatchingRecords(): { [recordId: string]: IRecord } {\n return this._matchingRecordsMap;\n }\n public getNode(recordId: string | null): ITreeNode {\n return this._nodeMap.get(recordId as any)!;\n }\n\n public hasChildren(recordId: string): boolean {\n const children = this._nodeMap.get(recordId)?.directChildren;\n if (children && children.length > 0) {\n return true;\n }\n return false;\n }\n\n public getSortedIds(): string[] {\n return this._sortedRecordIds;\n }\n\n public build(): Map<string, ITreeNode> {\n this._records = this._taskDataProvider.getAllRecords();\n this._recordsMap = this._taskDataProvider.getRecordsMap();\n // Clear existing record tree map and flat sorted array\n this._nodeMap.clear();\n this._patchRecordPaths();\n this._buildSortingMap();\n this._buildMatchingRecords();\n\n // Create reusable sort function\n const sortByIndex = (a: IRecord, b: IRecord): number => {\n const indexA = this._sortingMap[a.getRecordId()] ?? Number.MAX_SAFE_INTEGER;\n const indexB = this._sortingMap[b.getRecordId()] ?? Number.MAX_SAFE_INTEGER;\n return indexA - indexB;\n };\n\n const records = this._records;\n const recordsMap = this._recordsMap;\n\n const parentToDirectChildren = new Map<string, IRecord[]>();\n const topLevelRecords: IRecord[] = [];\n\n for (const record of records) {\n const parentRef = record.getValue(this._getNativeColumns().parentId);\n const parentId = parentRef?.[0]?.id?.guid;\n\n if (parentId && recordsMap[parentId]) {\n if (!parentToDirectChildren.has(parentId)) {\n parentToDirectChildren.set(parentId, []);\n }\n parentToDirectChildren.get(parentId)!.push(record);\n }\n else {\n topLevelRecords.push(record);\n }\n }\n\n topLevelRecords.sort(sortByIndex);\n for (const [, children] of parentToDirectChildren) {\n children.sort(sortByIndex);\n }\n\n const hasMatchingDescendantCache = new Map<string, boolean>();\n const calculateHasMatchingDescendant = (recordId: string): boolean => {\n if (hasMatchingDescendantCache.has(recordId)) {\n return hasMatchingDescendantCache.get(recordId)!;\n }\n\n if (this._matchingRecordsMap[recordId]) {\n hasMatchingDescendantCache.set(recordId, true);\n return true;\n }\n\n // Set false sentinel before recursing to break circular reference cycles\n hasMatchingDescendantCache.set(recordId, false);\n const directChildren = parentToDirectChildren.get(recordId) || [];\n const hasMatching = directChildren.some(child =>\n calculateHasMatchingDescendant(child.getRecordId())\n );\n\n hasMatchingDescendantCache.set(recordId, hasMatching);\n return hasMatching;\n };\n\n for (const record of records) {\n calculateHasMatchingDescendant(record.getRecordId());\n }\n\n const recordToAllChildren = new Map<string, IRecord[]>();\n const recordToFilteredDirectChildren = new Map<string, IRecord[]>();\n const inProgressChildren = new Set<string>();\n\n const getAllChildren = (recordId: string): IRecord[] => {\n if (recordToAllChildren.has(recordId)) {\n return recordToAllChildren.get(recordId)!;\n }\n\n // Break circular reference cycles\n if (inProgressChildren.has(recordId)) {\n console.warn(`Circular reference detected: record \"${recordsMap[recordId]?.getNamedReference().name}\" (${recordId}) was encountered twice during tree traversal. All records involved in this cycle and their descendants will be missing from the tree.`);\n return [];\n }\n inProgressChildren.add(recordId);\n\n const directChildren = parentToDirectChildren.get(recordId) || [];\n const allChildren: IRecord[] = [];\n\n const filteredDirectChildren: IRecord[] = [];\n\n for (const child of directChildren) {\n if (hasMatchingDescendantCache.get(child.getRecordId())) {\n filteredDirectChildren.push(child);\n allChildren.push(child);\n allChildren.push(...getAllChildren(child.getRecordId()));\n }\n }\n\n recordToFilteredDirectChildren.set(recordId, filteredDirectChildren);\n recordToAllChildren.set(recordId, allChildren);\n inProgressChildren.delete(recordId);\n return allChildren;\n };\n\n const filteredTopLevelRecords: IRecord[] = [];\n const allRecordsWithMatching: IRecord[] = [];\n\n for (const record of topLevelRecords) {\n if (hasMatchingDescendantCache.get(record.getRecordId())) {\n filteredTopLevelRecords.push(record);\n }\n }\n\n for (const record of records) {\n if (hasMatchingDescendantCache.get(record.getRecordId())) {\n allRecordsWithMatching.push(record);\n }\n getAllChildren(record.getRecordId());\n }\n\n allRecordsWithMatching.sort(sortByIndex);\n \n for (const record of records) {\n const recordId = record.getRecordId();\n const isTopLevel = !record.getValue(this._getNativeColumns().parentId);\n\n const allChildren = getAllChildren(recordId);\n const filteredDirectChildren = recordToFilteredDirectChildren.get(recordId) || [];\n\n let parentRecord: IRecord | undefined = undefined;\n\n let index = -1;\n\n if (!isTopLevel) {\n const parentRef = record.getValue(this._getNativeColumns().parentId);\n const parentId = parentRef?.[0]?.id?.guid;\n if (parentId) {\n parentRecord = recordsMap[parentId];\n const parentFilteredChildren = recordToFilteredDirectChildren.get(parentId) || [];\n index = parentFilteredChildren.findIndex(sibling => sibling.getRecordId() === recordId);\n }\n } else {\n index = filteredTopLevelRecords.findIndex(topRecord => topRecord.getRecordId() === recordId);\n }\n\n let pathIds: string[] = [];\n let pathStrings: string[] = [];\n const pathCache = new Map<string, { pathIds: string[], pathStrings: string[] }>();\n if (pathCache.has(recordId)) {\n const cached = pathCache.get(recordId)!;\n pathIds = cached.pathIds;\n pathStrings = cached.pathStrings;\n }\n else {\n const pathIdParts: string[] = [];\n const pathStringParts: string[] = [];\n let currentRecord: IRecord | null = record;\n const visited = new Set<string>();\n\n while (currentRecord) {\n const currentId = currentRecord.getRecordId();\n if (visited.has(currentId)) break;\n visited.add(currentId);\n\n pathIdParts.unshift(currentRecord.getRecordId());\n pathStringParts.unshift(currentRecord.getNamedReference().name);\n const parentRef: ComponentFramework.EntityReference[] = currentRecord.getValue(this._getNativeColumns().parentId);\n const parentId = parentRef?.[0]?.id?.guid;\n currentRecord = parentId ? recordsMap[parentId] : null;\n }\n\n pathIds = pathIdParts;\n pathStrings = pathStringParts;\n pathCache.set(recordId, { pathIds, pathStrings });\n }\n\n this._nodeMap.set(recordId, {\n directChildren: filteredDirectChildren,\n allChildren: allChildren,\n pathIds,\n pathStrings,\n parent: parentRecord,\n index\n });\n }\n this._isFlat = filteredTopLevelRecords.every(record => this._nodeMap.get(record.getRecordId())!.directChildren.length === 0);\n const rootTaskId = this._getTaskDataProvider().getRootTaskId();\n if (!rootTaskId) {\n if (this._getTaskDataProvider().isFlatListEnabled()) {\n const directlyMatchingRecords: IRecord[] = allRecordsWithMatching.filter(r => this._matchingRecordsMap[r.getRecordId()]);\n this._nodeMap.set(null as any, {\n directChildren: directlyMatchingRecords,\n allChildren: directlyMatchingRecords,\n pathIds: [],\n pathStrings: [],\n index: -1\n });\n this._totalUniqueRecords = directlyMatchingRecords.length;\n this._sortedRecordIds = directlyMatchingRecords.map(r => r.getRecordId());\n }\n else {\n this._nodeMap.set(null as any, {\n directChildren: filteredTopLevelRecords,\n allChildren: allRecordsWithMatching,\n pathIds: [],\n pathStrings: [],\n index: -1\n });\n this._totalUniqueRecords = allRecordsWithMatching.length;\n this._sortedRecordIds = allRecordsWithMatching.map(r => r.getRecordId());\n }\n }\n else {\n const topLevelNode = this._nodeMap.get(rootTaskId);\n if (this._getTaskDataProvider().isFlatListEnabled()) {\n const directlyMatchingRecords: IRecord[] = topLevelNode?.allChildren.filter(r => this._matchingRecordsMap[r.getRecordId()]) || [];\n topLevelNode!.directChildren = directlyMatchingRecords;\n topLevelNode!.allChildren = directlyMatchingRecords;\n }\n this._nodeMap.set(null as any, topLevelNode!);\n this._totalUniqueRecords = topLevelNode!.allChildren.length;\n this._sortedRecordIds = topLevelNode!.allChildren.map(r => r.getRecordId());\n }\n return this._nodeMap;\n }\n\n\n private _buildMatchingRecords() {\n this._matchingRecordsMap = {};\n const provider = this._createBaseProvider();\n provider.onGetQuickFindColumns = () => this._getTaskDataProvider().getQuickFindColumns();\n provider.setFiltering(this._getTaskDataProvider().getFiltering());\n provider.setSearchQuery(this._getTaskDataProvider().getSearchQuery());\n provider.refreshSync();\n this._matchingRecordsMap = provider.getRecordsMap();\n }\n\n private _buildSortingMap() {\n this._sortingMap = {};\n let index = -1;\n const provider = this._createBaseProvider();\n provider.addEventListener('onRecordLoaded', (record) => {\n this._sortingMap[record.getRecordId()] = ++index;\n });\n provider.refreshSync();\n }\n\n private _createBaseProvider(): MemoryDataProvider {\n const taskDataProvider = this._getTaskDataProvider();\n const provider = new MemoryDataProvider({\n dataSource: taskDataProvider.getDataSource(),\n metadata: taskDataProvider.getMetadata()\n });\n patchDataBuilderPrepare({ provider, records: this._records });\n provider.getPaging().setPageSize(taskDataProvider.getDataSource().length);\n provider.setSorting(taskDataProvider.getSorting());\n provider.setColumns(taskDataProvider.getColumns());\n return provider;\n }\n\n private _buildPathForRecord(recordId: string): string[] {\n const path: string[] = [];\n const recordsMap = this._recordsMap;\n const parentIdName = this._getNativeColumns().parentId;\n let record: IRecord | undefined = recordsMap[recordId];\n const visited = new Set<string>();\n while (record) {\n const currentId = record.getRecordId();\n if (visited.has(currentId)) break;\n visited.add(currentId);\n path.unshift(record.getNamedReference().name);\n const parentId: string = record?.getValue(parentIdName)?.[0]?.id?.guid;\n record = recordsMap[parentId];\n }\n return path;\n }\n\n private _patchRecordPaths() {\n if(!this._getTaskDataProvider().getColumnsMap()[this._getNativeColumns().path]) return;\n for (const record of this._records) {\n const path = this._buildPathForRecord(record.getRecordId());\n const field = record.getField(this._getNativeColumns().path);\n const pathString = path.join('/');\n //@ts-ignore\n field._originalValue = pathString;\n //@ts-ignore\n field._currentValue = pathString;\n }\n }\n\n private _getNativeColumns(): ReturnType<ITaskDataProvider['getNativeColumns']> {\n return this._getTaskDataProvider().getNativeColumns();\n }\n\n private _getTaskDataProvider(): ITaskDataProvider {\n const provider = this._taskDataProvider;\n if (!provider) {\n throw new Error('TaskDataProvider dependency not provided!');\n }\n return provider;\n }\n}"],"names":[],"mappings":";;;MAoCa,UAAU,CAAA;AAWnB,IAAA,WAAA,CAAY,UAAiC,EAAA;AAVrC,QAAA,IAAA,CAAA,QAAQ,GAA2B,IAAI,GAAG,EAAE,CAAC;QAC7C,IAAW,CAAA,WAAA,GAAmC,EAAE,CAAC;QACjD,IAAmB,CAAA,mBAAA,GAAoC,EAAE,CAAC;QAC1D,IAAO,CAAA,OAAA,GAAY,KAAK,CAAC;QACzB,IAAmB,CAAA,mBAAA,GAAW,CAAC,CAAC;QAChC,IAAgB,CAAA,gBAAA,GAAa,EAAE,CAAC;QAChC,IAAQ,CAAA,QAAA,GAAc,EAAE,CAAC;QACzB,IAAW,CAAA,WAAA,GAAoC,EAAE,CAAC;AAItD,QAAA,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAAC;KACxD;IAEM,UAAU,GAAA;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;IACM,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
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="@types/powerapps-component-framework" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import { ITheme, ICommandBarProps, ITextFieldProps, ICalloutProps as ICalloutProps$1, IDatePickerProps, ITagPickerProps, IComboBoxProps } from '@talxis/react-components';
|
|
4
|
-
import { DeepPartial, DataType, IDataset, IEventEmitter, IColumn, IAvailableRelatedColumn, IInterceptor, ICommand, AggregationFunction, IRecord, IRawRecord,
|
|
4
|
+
import { DeepPartial, DataType, IDataset, IEventEmitter, IColumn, IAvailableRelatedColumn, IInterceptor, ICommand, AggregationFunction, IRecord, IRawRecord, IRecordSaveOperationResult, IAvailableColumnOptions, IDataProvider, Dataset } from '@talxis/client-libraries';
|
|
5
5
|
import { ITheme as ITheme$1, ThemeProviderProps, IShimmerProps, IButtonProps, IMessageBarProps, ITextProps, ILabelProps, IIconProps, ILinkProps, IImageProps, ISpinnerProps, IMessageBar, IToggleProps } from '@fluentui/react';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import * as React$1 from 'react';
|
|
@@ -895,6 +895,10 @@ declare const lookupTranslations: {
|
|
|
895
895
|
1033: string;
|
|
896
896
|
1029: string;
|
|
897
897
|
};
|
|
898
|
+
all: {
|
|
899
|
+
1033: string;
|
|
900
|
+
1029: string;
|
|
901
|
+
};
|
|
898
902
|
};
|
|
899
903
|
|
|
900
904
|
interface ILookup extends IControl<ILookupParameters, ILookupOutputs, Partial<ITranslations<typeof lookupTranslations>>, ITagPickerProps> {
|
|
@@ -1001,6 +1005,10 @@ declare const useLookup: (props: ILookup) => [ComponentFramework.LookupValue[],
|
|
|
1001
1005
|
1033: string;
|
|
1002
1006
|
1029: string;
|
|
1003
1007
|
};
|
|
1008
|
+
all: {
|
|
1009
|
+
1033: string;
|
|
1010
|
+
1029: string;
|
|
1011
|
+
};
|
|
1004
1012
|
}>>>, {
|
|
1005
1013
|
create: (entityName: string) => void;
|
|
1006
1014
|
select: (record: ComponentFramework.LookupValue[] | undefined) => void;
|
|
@@ -1442,15 +1450,23 @@ interface ITreeNode {
|
|
|
1442
1450
|
parent?: IRecord;
|
|
1443
1451
|
}
|
|
1444
1452
|
interface IRecordTree {
|
|
1453
|
+
/** Builds (or rebuilds) the node map from the current provider records. Returns the resulting map keyed by record id. */
|
|
1445
1454
|
build(): Map<string, ITreeNode>;
|
|
1455
|
+
/** Returns the current node map keyed by record id without triggering a rebuild. */
|
|
1446
1456
|
getNodeMap(): Map<string, ITreeNode>;
|
|
1457
|
+
/** Returns the tree node for the given record id. Pass `null` to get the virtual root node. */
|
|
1447
1458
|
getNode(recordId: string | null): ITreeNode;
|
|
1459
|
+
/** Returns the total number of unique records in the tree. */
|
|
1448
1460
|
getTotalCount(): number;
|
|
1461
|
+
/** Returns `true` when the tree is in flat-list mode (no parent-child hierarchy). */
|
|
1449
1462
|
isFlat(): boolean;
|
|
1463
|
+
/** Returns `true` when the record with the given id has at least one direct child. */
|
|
1450
1464
|
hasChildren(recordId: string): boolean;
|
|
1465
|
+
/** Returns a map of records that match the current search/filter, keyed by record id. */
|
|
1451
1466
|
getMatchingRecords(): {
|
|
1452
1467
|
[recordId: string]: IRecord;
|
|
1453
1468
|
};
|
|
1469
|
+
/** Returns record ids in their computed display order (depth-first, stack-rank sorted). */
|
|
1454
1470
|
getSortedIds(): string[];
|
|
1455
1471
|
}
|
|
1456
1472
|
|
|
@@ -1470,6 +1486,8 @@ interface ICustomColumnsStrategy {
|
|
|
1470
1486
|
onGetRawRecords: () => Promise<IRawRecord[]>;
|
|
1471
1487
|
/** Fetches a single raw record by its ID. */
|
|
1472
1488
|
onGetRawRecord: (recordId: string) => Promise<IRawRecord>;
|
|
1489
|
+
/** Persists a cell value for a custom column on the given record. */
|
|
1490
|
+
onSaveValue: (regardingRecordId: string, column: IColumn, value: any) => Promise<IRecordSaveOperationResult>;
|
|
1473
1491
|
}
|
|
1474
1492
|
/** Manages the lifecycle of dynamic (user-defined) columns and wraps the strategy with error handling. */
|
|
1475
1493
|
interface ICustomColumnsDataProvider {
|
|
@@ -1485,10 +1503,13 @@ interface ICustomColumnsDataProvider {
|
|
|
1485
1503
|
refresh: () => Promise<IColumn[]>;
|
|
1486
1504
|
/** Returns the currently cached list of custom columns. */
|
|
1487
1505
|
getColumns: () => IColumn[];
|
|
1506
|
+
/** Persists a cell value for a custom column on the given record. */
|
|
1507
|
+
saveValue: (regardingRecordId: string, column: IColumn, value: any) => Promise<IRecordSaveOperationResult>;
|
|
1488
1508
|
/** Returns the underlying strategy cast to the given type for strategy-specific operations. */
|
|
1489
1509
|
getStrategy<T extends ICustomColumnsStrategy>(): T;
|
|
1490
1510
|
/** Returns `true` when the given column name is a custom (dynamic) column. */
|
|
1491
1511
|
isCustomColumn: (columnName: string) => boolean;
|
|
1512
|
+
/** Disposes event listeners and releases all resources held by the provider. */
|
|
1492
1513
|
destroy: () => void;
|
|
1493
1514
|
}
|
|
1494
1515
|
interface ICustomColumnsDataProviderEvents {
|
|
@@ -1571,6 +1592,7 @@ interface ISavedQueryDataProvider {
|
|
|
1571
1592
|
deleteUserQueries: (queryIds: string[]) => Promise<IDeletedUserQueriesResult>;
|
|
1572
1593
|
/** Fetches system and user queries from the strategy and sets the initial active query. */
|
|
1573
1594
|
refresh: () => Promise<void>;
|
|
1595
|
+
/** Disposes event listeners and releases all resources held by the provider. */
|
|
1574
1596
|
destroy: () => void;
|
|
1575
1597
|
}
|
|
1576
1598
|
|
|
@@ -1586,7 +1608,7 @@ type IDeleteTasksResult = {
|
|
|
1586
1608
|
deletedTaskIds: string[];
|
|
1587
1609
|
errors: IFailedRecord[];
|
|
1588
1610
|
};
|
|
1589
|
-
type
|
|
1611
|
+
type IOpenDatasetItemsResult = {
|
|
1590
1612
|
success: true;
|
|
1591
1613
|
updatedRecords: IRawRecord[];
|
|
1592
1614
|
} | {
|
|
@@ -1610,8 +1632,6 @@ interface ITaskDataProviderStrategy {
|
|
|
1610
1632
|
onGetAvailableColumns: (options?: IAvailableColumnOptions) => Promise<IColumn[]>;
|
|
1611
1633
|
/** Returns linked-entity columns that can be used for filtering and sorting. */
|
|
1612
1634
|
onGetAvailableRelatedColumns: () => Promise<IAvailableRelatedColumn[]>;
|
|
1613
|
-
/** Returns the attribute names that are searched when the user types in the quick-find input. */
|
|
1614
|
-
onGetQuickFindColumns: () => string[];
|
|
1615
1635
|
/** @returns The created task raw record, or `null` if the operation was cancelled by the user. Throws on unexpected failure. */
|
|
1616
1636
|
onCreateTask(parentTaskId?: string): Promise<IRawRecord | null>;
|
|
1617
1637
|
/**
|
|
@@ -1625,21 +1645,16 @@ interface ITaskDataProviderStrategy {
|
|
|
1625
1645
|
/** @returns The created task raw records, or `null` if the operation was cancelled by the user. Throws on unexpected failure. */
|
|
1626
1646
|
onCreateTasksFromTemplate(templateId: string, parentTaskId?: string): Promise<IRawRecord[] | null>;
|
|
1627
1647
|
/**
|
|
1628
|
-
*
|
|
1629
|
-
*
|
|
1630
|
-
* Throws on unexpected failure.
|
|
1648
|
+
* Opens one or more dataset items. When `isTaskEntity` is `true` the references point to task records;
|
|
1649
|
+
* when `false` they point to a related entity (e.g. a lookup target).
|
|
1631
1650
|
*/
|
|
1632
|
-
|
|
1651
|
+
onOpenDatasetItems(entityReferences: ComponentFramework.EntityReference[], isTaskEntity: boolean): Promise<IOpenDatasetItemsResult | null>;
|
|
1633
1652
|
/** Moves a task to a new position relative to another task. Returns the updated raw records, or `null` on cancellation. */
|
|
1634
1653
|
onMoveTask(movingTaskId: string, movingToTaskId: string, position: 'above' | 'below' | 'child'): Promise<IRawRecord[] | null>;
|
|
1635
1654
|
/** Persists inline cell edits for the given record. */
|
|
1636
1655
|
onRecordSave(record: IRecord): Promise<IRecordSaveOperationResult>;
|
|
1637
1656
|
/** Returns whether the given task record is currently active (non-completed). */
|
|
1638
1657
|
onIsRecordActive(recordId: string): boolean;
|
|
1639
|
-
/** Opens the record detail view. Called when a user clicks a non-subject cell. */
|
|
1640
|
-
onOpenDatasetItem(entityReference: ComponentFramework.EntityReference, context?: {
|
|
1641
|
-
columnName?: string;
|
|
1642
|
-
}): Promise<void>;
|
|
1643
1658
|
/** When provided, the task tree is scoped to the subtree of the returned task id. */
|
|
1644
1659
|
onGetRootTaskId?: () => string | undefined;
|
|
1645
1660
|
}
|
|
@@ -1652,12 +1667,10 @@ interface ITaskDataProviderEventListener {
|
|
|
1652
1667
|
onAfterTasksCreated: (records: IRawRecord[] | null, parentId?: string) => void;
|
|
1653
1668
|
onBeforeTaskMoved: () => void;
|
|
1654
1669
|
onAfterTaskMoved: (movingFromTaskId: string, movingToTaskId: string, position: 'above' | 'below' | 'child') => void;
|
|
1655
|
-
onBeforeTasksEdited: (taskIds: string[]) => void;
|
|
1656
1670
|
onTaskDataUpdated: (data: IRawRecord[]) => void;
|
|
1657
|
-
onAfterTasksEdited: (result: IEditTasksResult | null) => void;
|
|
1658
1671
|
onRecordTreeUpdated: (updatedParentIds: (string | undefined)[]) => void;
|
|
1659
|
-
|
|
1660
|
-
|
|
1672
|
+
onBeforeDatasetItemsOpened: (entityReferences: ComponentFramework.EntityReference[], isTaskEntity: boolean) => void;
|
|
1673
|
+
onAfterDatasetItemsOpened: (entityReferences: ComponentFramework.EntityReference[], isTaskEntity: boolean, result: IOpenDatasetItemsResult | null) => void;
|
|
1661
1674
|
onError: (error: any, message: string) => void;
|
|
1662
1675
|
}
|
|
1663
1676
|
/** Extended data provider interface for task records. Adds task-specific operations on top of `IDataProvider`. */
|
|
@@ -1677,11 +1690,10 @@ interface ITaskDataProvider extends IDataProvider {
|
|
|
1677
1690
|
/** Applies updated raw record data in-place and rebuilds the tree if hierarchy changed. */
|
|
1678
1691
|
updateTaskData(newData: IRawRecord[]): void;
|
|
1679
1692
|
/**
|
|
1680
|
-
*
|
|
1681
|
-
*
|
|
1682
|
-
* Throws on unexpected failure.
|
|
1693
|
+
* Opens one or more task records by id. Builds entity references from the current records map
|
|
1694
|
+
* and delegates to `strategy.onOpenDatasetItems` with `isTaskEntity: true`.
|
|
1683
1695
|
*/
|
|
1684
|
-
|
|
1696
|
+
openTaskItems(taskIds: string[]): Promise<IOpenDatasetItemsResult | null>;
|
|
1685
1697
|
/** @returns The created task raw record, or `null` if the operation was cancelled by the user. Throws on unexpected failure. */
|
|
1686
1698
|
createTask(parentTaskId?: string): Promise<IRawRecord | null>;
|
|
1687
1699
|
/**
|
|
@@ -1763,47 +1775,56 @@ interface INativeColumns extends IFieldMapping {
|
|
|
1763
1775
|
}
|
|
1764
1776
|
/** Feature flags that control which UI elements are rendered in the grid header and ribbon. */
|
|
1765
1777
|
interface ITaskGridParameters {
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
/** Show drag handles and allow rows to be dragged for reordering. Defaults to `true`. Automatically suppressed when flat-list mode is active or sorting by a non-stack-rank column. */
|
|
1778
|
+
agGridLicenseKey?: string;
|
|
1779
|
+
/** Show drag handles and allow rows to be dragged for reordering. Defaults to `false`. Automatically suppressed when flat-list mode is active or sorting by a non-stack-rank column. */
|
|
1769
1780
|
enableRowDragging?: boolean;
|
|
1770
|
-
/** Show the *Edit Columns* button in the ribbon. Defaults to `
|
|
1781
|
+
/** Show the *Edit Columns* button in the ribbon. Defaults to `false`. */
|
|
1771
1782
|
enableEditColumns?: boolean;
|
|
1772
|
-
/** Enable editing of tasks directly in the grid. Defaults to `
|
|
1783
|
+
/** Enable editing of tasks directly in the grid. Defaults to `false`. */
|
|
1773
1784
|
enableTaskEditing?: boolean;
|
|
1774
|
-
/** Enable creation of new tasks. Defaults to `
|
|
1785
|
+
/** Enable creation of new tasks. Defaults to `false`. */
|
|
1775
1786
|
enableTaskCreation?: boolean;
|
|
1776
|
-
/** Enable deletion of tasks. Defaults to `
|
|
1787
|
+
/** Enable deletion of tasks. Defaults to `false`. */
|
|
1777
1788
|
enableTaskDeletion?: boolean;
|
|
1778
|
-
/** Show the search / quick-find input. Defaults to `
|
|
1789
|
+
/** Show the search / quick-find input. Defaults to `false`. */
|
|
1779
1790
|
enableQuickFind?: boolean;
|
|
1780
|
-
/** Show the view-switcher dropdown. Defaults to `
|
|
1791
|
+
/** Show the view-switcher dropdown. Defaults to `false`. */
|
|
1781
1792
|
enableViewSwitcher?: boolean;
|
|
1782
|
-
/** Show the *Show hierarchy* toggle. Defaults to `
|
|
1793
|
+
/** Show the *Show hierarchy* toggle. Defaults to `false`. */
|
|
1783
1794
|
enableShowHierarchyToggle?: boolean;
|
|
1784
|
-
/** Show the *Hide inactive tasks* toggle. Defaults to `
|
|
1795
|
+
/** Show the *Hide inactive tasks* toggle. Defaults to `false`. */
|
|
1785
1796
|
enableHideInactiveTasksToggle?: boolean;
|
|
1786
|
-
/** Show the personal/system scope selector inside the Edit Columns panel. Defaults to `
|
|
1797
|
+
/** Show the personal/system scope selector inside the Edit Columns panel. Defaults to `false`. */
|
|
1787
1798
|
enableEditColumnsScopeSelector?: boolean;
|
|
1788
|
-
/** Enable user queries. Defaults to `
|
|
1799
|
+
/** Enable user queries. Defaults to `false`. */
|
|
1789
1800
|
enableUserQueries?: boolean;
|
|
1790
|
-
/** Show the query manager. Defaults to `
|
|
1801
|
+
/** Show the query manager. Defaults to `false`. */
|
|
1791
1802
|
enableQueryManager?: boolean;
|
|
1792
|
-
/** Show the "Save as new" button in the query manager. Defaults to `
|
|
1803
|
+
/** Show the "Save as new" button in the query manager. Defaults to `false`. */
|
|
1793
1804
|
enableSaveAsNewQuery?: boolean;
|
|
1794
|
-
/** Show the "Save changes" button in the query manager. Defaults to `
|
|
1805
|
+
/** Show the "Save changes" button in the query manager. Defaults to `false`. */
|
|
1795
1806
|
enableSaveQueryChanges?: boolean;
|
|
1796
|
-
/** Enable creation of custom columns. Defaults to `
|
|
1807
|
+
/** Enable creation of custom columns. Defaults to `false`. */
|
|
1797
1808
|
enableCustomColumnCreation?: boolean;
|
|
1798
|
-
/** Enable editing of custom columns. Defaults to `
|
|
1809
|
+
/** Enable editing of custom columns. Defaults to `false`. */
|
|
1799
1810
|
enableCustomColumnEditing?: boolean;
|
|
1800
|
-
/** Enable deletion of custom columns. Defaults to `
|
|
1811
|
+
/** Enable deletion of custom columns. Defaults to `false`. */
|
|
1801
1812
|
enableCustomColumnDeletion?: boolean;
|
|
1802
|
-
/** Enable inline creation of tasks. Defaults to `
|
|
1813
|
+
/** Enable inline creation of tasks. Defaults to `false`. */
|
|
1803
1814
|
enableInlineCreation?: boolean;
|
|
1815
|
+
/** Enable navigation within the grid. Defaults to `false`. */
|
|
1816
|
+
enableNavigation?: boolean;
|
|
1817
|
+
/** Enable column sorting in the grid. Defaults to `false`. */
|
|
1818
|
+
enableSorting?: boolean;
|
|
1819
|
+
/** Enable column filtering in the grid. Defaults to `false`. */
|
|
1820
|
+
enableFiltering?: boolean;
|
|
1821
|
+
/** Override the default row height in pixels. Uses the AG Grid default when omitted. */
|
|
1822
|
+
rowHeight?: number;
|
|
1804
1823
|
}
|
|
1805
1824
|
/** Available data providers injected into `ITaskDataProviderStrategy` at construction time. */
|
|
1806
1825
|
interface ITaskStrategyDeps {
|
|
1826
|
+
enableInlineCreation: boolean;
|
|
1827
|
+
enableTaskEditing: boolean;
|
|
1807
1828
|
/** Present when the consumer provided `onCreateCustomColumnsStrategy`. */
|
|
1808
1829
|
customColumnsDataProvider?: ICustomColumnsDataProvider;
|
|
1809
1830
|
/** Present when the consumer provided `onCreateTemplateDataProvider`. */
|
|
@@ -1822,14 +1843,14 @@ interface ITaskGridDescriptor {
|
|
|
1822
1843
|
onCreateTaskStrategy: (deps: ITaskStrategyDeps) => ITaskDataProviderStrategy;
|
|
1823
1844
|
/** Returns an `IDataProvider` that drives the user-query creation/update dialog. */
|
|
1824
1845
|
onCreateUserQueryDataProvider: () => IDataProvider;
|
|
1846
|
+
/** (Optional) Returns the container height as a CSS string. Falls back to a default stretch when omitted. */
|
|
1847
|
+
onGetHeight?: () => string | undefined;
|
|
1825
1848
|
/** (Optional) Returns the strategy for managing dynamic (user-defined) columns. When provided, the custom-columns feature is enabled. */
|
|
1826
1849
|
onCreateCustomColumnsStrategy?: () => ICustomColumnsStrategy | undefined;
|
|
1827
1850
|
/** (Optional) Returns an `IDataProvider` for task templates. When provided, the template-based task creation feature is enabled. */
|
|
1828
1851
|
onCreateTemplateDataProvider?: () => IDataProvider | undefined;
|
|
1829
1852
|
/** (Optional) Returns a strategy for deep customization of AG Grid column definitions, renderers, editors, and row class rules. */
|
|
1830
1853
|
onCreateGridCustomizerStrategy?: () => IGridCustomizerStrategy | undefined;
|
|
1831
|
-
/** (Optional) Returns the AG Grid Enterprise license key. */
|
|
1832
|
-
onGetAgGridLicenseKey?: () => string | undefined;
|
|
1833
1854
|
/** (Optional) Returns a stable DOM/control identifier. Auto-generated as a UUID when omitted. */
|
|
1834
1855
|
onGetControlId?: () => string;
|
|
1835
1856
|
/** (Optional) Async hook called before any data provider is created. Use for lazy loading or authentication. */
|
|
@@ -1888,6 +1909,10 @@ interface ITaskGridDatasetControl extends IDatasetControl {
|
|
|
1888
1909
|
isTaskEditingEnabled: () => boolean;
|
|
1889
1910
|
/** Returns `true` when task deletion is enabled. */
|
|
1890
1911
|
isTaskDeletingEnabled: () => boolean;
|
|
1912
|
+
/** Whether the view-switcher dropdown is visible (from `ITaskGridParameters.enableViewSwitcher`). */
|
|
1913
|
+
isViewSwitcherEnabled: () => boolean;
|
|
1914
|
+
/** Whether grid navigation is enabled (from `ITaskGridParameters.enableNavigation`). */
|
|
1915
|
+
isNavigationEnabled: () => boolean;
|
|
1891
1916
|
/** Returns `true` when a custom columns strategy was supplied through the descriptor. */
|
|
1892
1917
|
isCustomColumnsEnabled: () => boolean;
|
|
1893
1918
|
/** Whether the view manager is enabled (from `ITaskGridParameters.enableQueryManager`). */
|
|
@@ -1904,6 +1929,7 @@ interface ITaskGridDatasetControl extends IDatasetControl {
|
|
|
1904
1929
|
isCustomColumnDeletionEnabled: () => boolean;
|
|
1905
1930
|
/** Whether user queries are enabled (from `ITaskGridParameters.enableUserQueries`). */
|
|
1906
1931
|
isUserQueriesFeatureEnabled: () => boolean;
|
|
1932
|
+
/** Whether inline task creation is enabled (from `ITaskGridParameters.enableInlineCreation`). */
|
|
1907
1933
|
isInlineCreateEnabled: () => boolean;
|
|
1908
1934
|
}
|
|
1909
1935
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualDatasetAdapter.js","sources":["../../../../src/utils/dataset/adapters/VirtualDatasetAdapter.ts"],"sourcesContent":["import { mergeStyles } from \"@fluentui/react\";\nimport { Dataset, FetchXmlDataProvider, IColumn, IDataProvider, IDataset, Interceptors, IRawRecord, MemoryDataProvider } from \"@talxis/client-libraries\";\nimport { IDatasetControlParameters, IDatasetControlProps } from \"../../../components\";\nimport { DatasetControl, IDatasetControl } from \"../../dataset-control\";\n\ninterface IOutputs {\n DatasetControl?: any;\n}\n\ninterface IInputs {\n Data: ComponentFramework.PropertyTypes.StringProperty | {\n raw: IRawRecord[]\n }\n EntityMetadata: ComponentFramework.PropertyTypes.StringProperty;\n DataProvider: ComponentFramework.PropertyTypes.EnumProperty<\"Memory\" | \"FetchXml\">;\n EnableQuickFind?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n Columns?: ComponentFramework.PropertyTypes.StringProperty;\n Height?: ComponentFramework.PropertyTypes.StringProperty;\n RowHeight?: ComponentFramework.PropertyTypes.WholeNumberProperty;\n EnableEditing?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnablePagination?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableFiltering?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableSorting?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableNavigation?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableOptionSetColors?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableAggregation?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableGrouping?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableEditColumns?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableAutoSave?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableCommandBar?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableZebra?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableGroupedColumnsPinning?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnablePageSizeSwitcher?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableRecordCount?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n HomePageGridClientApiRibbonButtonId?: ComponentFramework.PropertyTypes.StringProperty;\n InlineRibbonButtonIds?: ComponentFramework.PropertyTypes.StringProperty;\n DefaultExpandedGroupLevel?: ComponentFramework.PropertyTypes.WholeNumberProperty;\n SelectableRows?: ComponentFramework.PropertyTypes.EnumProperty<\"none\" | \"single\" | \"multiple\">;\n GroupingType?: ComponentFramework.PropertyTypes.EnumProperty<\"nested\" | \"flat\">;\n IsLocalHarnessDebugMode?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n ClientApiWebresourceName?: ComponentFramework.PropertyTypes.StringProperty;\n ClientApiFunctionName?: ComponentFramework.PropertyTypes.StringProperty;\n}\n\ninterface IVirtualDatasetAdapterOptions {\n /**\n * Runs a promise that is awaited when the dataset control is initialized, before loading the first data.\n */\n onInitialize?: (dataset: IDataset) => Promise<void>;\n /**\n * If provided, this function is called when the dataset is initialized and awaited before loading first data.\n */\n CustomDataProviderClass?: new (...args: any) => IDataProvider;\n}\n\n\n/**\n * Helper class that holds boilerplate code for handling a virtual dataset in PCF, like syncing data, columns, and metadata from parameters.\n *\n */\nexport class VirtualDatasetAdapter {\n private _context!: ComponentFramework.Context<IInputs, IOutputs>;\n private _dataset!: Dataset<IDataProvider>;\n private _container!: HTMLDivElement;\n private _options?: IVirtualDatasetAdapterOptions\n private _initialized: boolean = false;\n private _state: ComponentFramework.Dictionary = {};\n private _datasetControl!: IDatasetControl;\n\n constructor(options?: IVirtualDatasetAdapterOptions) {\n this._options = options;\n }\n\n public init(context: ComponentFramework.Context<IInputs, IOutputs>, container: HTMLDivElement, state: ComponentFramework.Dictionary) {\n this._container = container;\n this._context = context;\n this._state = state ?? {};\n if (!context.parameters.Data.raw) {\n this._createDummyDatasetControl();\n return this;\n }\n const dataProvider = this._getDataProviderInstance();\n this._dataset = new Dataset(dataProvider);\n //loads parameter columns\n this._dataset.setMetadata(this._getEntityMetadata());\n this._dataset.setDataSource(context.parameters.Data.raw);\n this._datasetControl = new DatasetControl({\n state: this._state,\n //@ts-ignore - typings\n controlId: this._context.utils._customControlProperties?.controlId,\n onGetPcfContext: () => this._context,\n onGetParameters: () => this._getDatasetControlParameters()\n });\n this._datasetControl.setInterceptor('onInitialize', async (parameters, defaultAction) => {\n //preloads dataset\n await defaultAction(parameters);\n //sets columns after preload\n this._dataset.setColumns(this._getColumns());\n await this._options?.onInitialize?.(this.getDataset());\n });\n if (this._context.parameters.Height?.raw === '100%') {\n this._container.classList.add(this._getFullTabStyles());\n }\n this._initialized = true;\n }\n\n /**\n * @param {?() => void} [onRenderEmptyData] - Only called when the data parameter is set to `null`. This should usually not happen since it's a required parameter, but Power Apps can pass null in certain scenarios (for example on a form with new record).\n */\n public updateView(context: ComponentFramework.Context<IInputs, IOutputs>, onRenderComponent: (datasetControlProps: Omit<IDatasetControlProps, 'onGetControlComponent'>) => void, onRenderEmptyData?: () => void) {\n this._context = context;\n if (!context.parameters.Data.raw) {\n return onRenderEmptyData?.()\n }\n //if not yet initialized, initialize, can happen if we start without data\n if (!this._initialized) {\n this.init(context, this._container, this._state);\n }\n return onRenderComponent({\n onGetDatasetControlInstance: () => this._datasetControl\n });\n }\n\n public getDataset(): Dataset<IDataProvider> {\n return this._dataset;\n }\n\n public getDatasetControl(): IDatasetControl {\n return this._datasetControl;\n }\n\n private _isEditingEnabled(): boolean {\n return this._context.parameters.EnableEditing?.raw === 'true';\n }\n\n private _isAutoSaveEnabled(): boolean {\n return this._context.parameters.EnableAutoSave?.raw === 'true';\n }\n\n private _isCommandBarEnabled(): boolean {\n return this._context.parameters.EnableCommandBar?.raw !== 'false'\n }\n\n private _createDummyDatasetControl() {\n this._datasetControl = new DatasetControl({\n state: this._state,\n //@ts-ignore - typings\n controlId: this._context.utils._customControlProperties?.controlId,\n onGetPcfContext: () => this._context,\n onGetParameters: () => {\n return {\n ...this._getDatasetControlParameters(),\n Grid: new Dataset(new MemoryDataProvider({\n dataSource: [],\n metadata: {PrimaryIdAttribute: 'id'}\n }))\n }\n }\n });\n }\n\n private _getDatasetControlParameters(): IDatasetControlParameters {\n return {\n Grid: this.getDataset(),\n EnableEditing: {\n raw: this._isEditingEnabled()\n },\n EnableCommandBar: {\n raw: this._isCommandBarEnabled()\n },\n EnableAutoSave: {\n raw: this._isAutoSaveEnabled()\n },\n EnablePagination: {\n raw: this._context.parameters.EnablePagination?.raw !== 'false'\n },\n EnableFiltering: {\n raw: this._context.parameters.EnableFiltering?.raw !== 'false'\n },\n EnableSorting: {\n raw: this._context.parameters.EnableSorting?.raw !== 'false'\n },\n EnableNavigation: {\n raw: this._context.parameters.EnableNavigation?.raw !== 'false'\n },\n EnableOptionSetColors: {\n raw: this._context.parameters.EnableOptionSetColors?.raw === 'true'\n },\n SelectableRows: {\n raw: this._context.parameters.SelectableRows?.raw ?? 'single'\n },\n RowHeight: {\n raw: this._context.parameters.RowHeight?.raw ?? 42\n },\n //quick find is always handled by platform\n EnableQuickFind: {\n raw: this._context.parameters.EnableQuickFind?.raw === 'true'\n },\n EnableEditColumns: {\n raw: this._context.parameters.EnableEditColumns?.raw === 'true'\n },\n EnableAggregation: {\n raw: this._context.parameters.EnableAggregation?.raw === 'true',\n },\n EnableGrouping: {\n raw: this._context.parameters.EnableGrouping?.raw === 'true'\n },\n Height: {\n raw: this._context.parameters.Height?.raw ?? null\n },\n InlineRibbonButtonIds: {\n raw: this._context.parameters.InlineRibbonButtonIds?.raw ?? null\n },\n EnableZebra: {\n raw: this._context.parameters.EnableZebra?.raw !== 'false'\n },\n DefaultExpandedGroupLevel: {\n raw: this._context.parameters.DefaultExpandedGroupLevel?.raw ?? null\n },\n EnableRecordCount: {\n raw: this._context.parameters.EnableRecordCount?.raw !== 'false'\n },\n EnableGroupedColumnsPinning: {\n raw: this._context.parameters.EnableGroupedColumnsPinning?.raw !== 'false'\n },\n EnablePageSizeSwitcher: {\n raw: this._context.parameters.EnablePageSizeSwitcher?.raw !== 'false'\n },\n GroupingType: {\n raw: this._context.parameters.GroupingType?.raw ?? 'nested'\n },\n IsLocalHarnessDebugMode: this._context.parameters.IsLocalHarnessDebugMode,\n ClientApiWebresourceName: {\n raw: this._context.parameters.ClientApiWebresourceName?.raw ?? null\n },\n ClientApiFunctionName: {\n raw: this._context.parameters.ClientApiFunctionName?.raw ?? null\n }\n }\n }\n\n private _getDataProviderInstance(): IDataProvider {\n if (this._options?.CustomDataProviderClass) {\n return new this._options.CustomDataProviderClass(this._context.parameters.Data.raw);\n }\n switch (this._context.parameters.DataProvider.raw) {\n case \"FetchXml\": {\n return new FetchXmlDataProvider({\n fetchXml: this._context.parameters.Data.raw as string\n })\n }\n case 'Memory': {\n return new MemoryDataProvider({\n dataSource: this._context.parameters.Data.raw!,\n metadata: this._getEntityMetadata()\n\n });\n }\n }\n }\n\n private _getColumns() {\n try {\n const parameterColumns = this._context.parameters.Columns?.raw;\n const columns: IColumn[] = Array.isArray(parameterColumns) ? parameterColumns : JSON.parse(parameterColumns ?? \"[]\");\n return this._getMergedColumns(columns);\n }\n catch (err) {\n console.error(err);\n return this._dataset.columns;\n }\n }\n\n private _getMergedColumns(parameterColumns: IColumn[]): IColumn[] {\n const columnsMap = new Map<string, IColumn>(this._dataset.columns.map((col: IColumn) => [col.name, col]));\n const stateColumnsMap = new Map<string, IColumn>(this._state?.DatasetControlState?.columns?.map((col: IColumn) => [col.name, col]) ?? []);\n //if we have state, return it\n if (stateColumnsMap.size > 0) {\n return [...stateColumnsMap.values()];\n }\n //no state, save to load from parameters\n else {\n parameterColumns.forEach(parameterCol => {\n const col = columnsMap.get(parameterCol.name);\n if (col) {\n columnsMap.set(col.name, {\n ...col,\n ...parameterCol\n });\n } else {\n columnsMap.set(parameterCol.name, parameterCol);\n }\n });\n }\n return [...columnsMap.values()];\n }\n\n private _getEntityMetadata() {\n const parameterMetadata = this._context.parameters.EntityMetadata.raw;\n if (parameterMetadata) {\n return JSON.parse(parameterMetadata);\n }\n return {};\n }\n\n private _getFullTabStyles() {\n return mergeStyles({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1\n });\n }\n}"],"names":[],"mappings":";;;;AAwDA;;;AAGG;MACU,qBAAqB,CAAA;AAS9B,IAAA,WAAA,CAAY,OAAuC,EAAA;QAJ3C,IAAY,CAAA,YAAA,GAAY,KAAK,CAAC;QAC9B,IAAM,CAAA,MAAA,GAAkC,EAAE,CAAC;AAI/C,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;KAC3B;AAEM,IAAA,IAAI,CAAC,OAAsD,EAAE,SAAyB,EAAE,KAAoC,EAAA;AAC/H,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;AAC5B,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;AACxB,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE;YAC9B,IAAI,CAAC,0BAA0B,EAAE,CAAC;AAClC,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;AACD,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,wBAAwB,EAAE,CAAC;QACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;;QAE1C,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,CAAC,OAAO,CAAC,YAAY,IAAG;gBACpC,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AAC9C,gBAAA,IAAI,GAAG,EAAE;AACL,oBAAA,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE;AACrB,wBAAA,GAAG,GAAG;AACN,wBAAA,GAAG,YAAY;AAClB,qBAAA,CAAC,CAAC;AACN,iBAAA;AAAM,qBAAA;oBACH,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AACnD,iBAAA;AACL,aAAC,CAAC,CAAC;AACN,SAAA;AACD,QAAA,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;KACnC;IAEO,kBAAkB,GAAA;QACtB,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC;AACtE,QAAA,IAAI,iBAAiB,EAAE;AACnB,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACxC,SAAA;AACD,QAAA,OAAO,EAAE,CAAC;KACb;IAEO,iBAAiB,GAAA;AACrB,QAAA,OAAO,WAAW,CAAC;AACf,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,aAAa,EAAE,QAAQ;AACvB,YAAA,QAAQ,EAAE,CAAC;AACd,SAAA,CAAC,CAAC;KACN;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"VirtualDatasetAdapter.js","sources":["../../../../src/utils/dataset/adapters/VirtualDatasetAdapter.ts"],"sourcesContent":["import { mergeStyles } from \"@fluentui/react\";\nimport { Dataset, FetchXmlDataProvider, IColumn, IDataProvider, IDataset, Interceptors, IRawRecord, MemoryDataProvider } from \"@talxis/client-libraries\";\nimport { IDatasetControlParameters, IDatasetControlProps } from \"../../../components\";\nimport { DatasetControl, IDatasetControl } from \"../../dataset-control\";\n\ninterface IOutputs {\n DatasetControl?: any;\n}\n\ninterface IInputs {\n Data: ComponentFramework.PropertyTypes.StringProperty | {\n raw: IRawRecord[]\n }\n EntityMetadata: ComponentFramework.PropertyTypes.StringProperty;\n DataProvider: ComponentFramework.PropertyTypes.EnumProperty<\"Memory\" | \"FetchXml\">;\n EnableQuickFind?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n Columns?: ComponentFramework.PropertyTypes.StringProperty;\n Height?: ComponentFramework.PropertyTypes.StringProperty;\n RowHeight?: ComponentFramework.PropertyTypes.WholeNumberProperty;\n EnableEditing?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnablePagination?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableFiltering?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableSorting?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableNavigation?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableOptionSetColors?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableAggregation?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableGrouping?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableEditColumns?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableAutoSave?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableCommandBar?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableZebra?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableGroupedColumnsPinning?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnablePageSizeSwitcher?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n EnableRecordCount?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n HomePageGridClientApiRibbonButtonId?: ComponentFramework.PropertyTypes.StringProperty;\n InlineRibbonButtonIds?: ComponentFramework.PropertyTypes.StringProperty;\n DefaultExpandedGroupLevel?: ComponentFramework.PropertyTypes.WholeNumberProperty;\n SelectableRows?: ComponentFramework.PropertyTypes.EnumProperty<\"none\" | \"single\" | \"multiple\">;\n GroupingType?: ComponentFramework.PropertyTypes.EnumProperty<\"nested\" | \"flat\">;\n IsLocalHarnessDebugMode?: ComponentFramework.PropertyTypes.EnumProperty<\"true\" | \"false\">;\n ClientApiWebresourceName?: ComponentFramework.PropertyTypes.StringProperty;\n ClientApiFunctionName?: ComponentFramework.PropertyTypes.StringProperty;\n}\n\ninterface IVirtualDatasetAdapterOptions {\n /**\n * Runs a promise that is awaited when the dataset control is initialized, before loading the first data.\n */\n onInitialize?: (dataset: IDataset) => Promise<void>;\n /**\n * If provided, this function is called when the dataset is initialized and awaited before loading first data.\n */\n CustomDataProviderClass?: new (...args: any) => IDataProvider;\n}\n\n\n/**\n * Helper class that holds boilerplate code for handling a virtual dataset in PCF, like syncing data, columns, and metadata from parameters.\n *\n */\nexport class VirtualDatasetAdapter {\n private _context!: ComponentFramework.Context<IInputs, IOutputs>;\n private _dataset!: Dataset<IDataProvider>;\n private _container!: HTMLDivElement;\n private _options?: IVirtualDatasetAdapterOptions\n private _initialized: boolean = false;\n private _state: ComponentFramework.Dictionary = {};\n private _datasetControl!: IDatasetControl;\n\n constructor(options?: IVirtualDatasetAdapterOptions) {\n this._options = options;\n }\n\n public init(context: ComponentFramework.Context<IInputs, IOutputs>, container: HTMLDivElement, state: ComponentFramework.Dictionary) {\n this._container = container;\n this._context = context;\n this._state = state ?? {};\n if (!context.parameters.Data.raw) {\n this._createDummyDatasetControl();\n return this;\n }\n const dataProvider = this._getDataProviderInstance();\n this._dataset = new Dataset(dataProvider);\n //loads parameter columns\n this._dataset.setMetadata(this._getEntityMetadata());\n this._dataset.setDataSource(context.parameters.Data.raw);\n this._datasetControl = new DatasetControl({\n state: this._state,\n //@ts-ignore - typings\n controlId: this._context.utils._customControlProperties?.controlId,\n onGetPcfContext: () => this._context,\n onGetParameters: () => this._getDatasetControlParameters()\n });\n this._datasetControl.setInterceptor('onInitialize', async (parameters, defaultAction) => {\n //preloads dataset\n await defaultAction(parameters);\n //sets columns after preload\n this._dataset.setColumns(this._getColumns());\n await this._options?.onInitialize?.(this.getDataset());\n });\n if (this._context.parameters.Height?.raw === '100%') {\n this._container.classList.add(this._getFullTabStyles());\n }\n this._initialized = true;\n }\n\n /**\n * @param {?() => void} [onRenderEmptyData] - Only called when the data parameter is set to `null`. This should usually not happen since it's a required parameter, but Power Apps can pass null in certain scenarios (for example on a form with new record).\n */\n public updateView(context: ComponentFramework.Context<IInputs, IOutputs>, onRenderComponent: (datasetControlProps: Omit<IDatasetControlProps, 'onGetControlComponent'>) => void, onRenderEmptyData?: () => void) {\n this._context = context;\n if (!context.parameters.Data.raw) {\n return onRenderEmptyData?.()\n }\n //if not yet initialized, initialize, can happen if we start without data\n if (!this._initialized) {\n this.init(context, this._container, this._state);\n }\n return onRenderComponent({\n onGetDatasetControlInstance: () => this._datasetControl\n });\n }\n\n public getDataset(): Dataset<IDataProvider> {\n return this._dataset;\n }\n\n public getDatasetControl(): IDatasetControl {\n return this._datasetControl;\n }\n\n private _isEditingEnabled(): boolean {\n return this._context.parameters.EnableEditing?.raw === 'true';\n }\n\n private _isAutoSaveEnabled(): boolean {\n return this._context.parameters.EnableAutoSave?.raw === 'true';\n }\n\n private _isCommandBarEnabled(): boolean {\n return this._context.parameters.EnableCommandBar?.raw !== 'false'\n }\n\n private _createDummyDatasetControl() {\n this._datasetControl = new DatasetControl({\n state: this._state,\n //@ts-ignore - typings\n controlId: this._context.utils._customControlProperties?.controlId,\n onGetPcfContext: () => this._context,\n onGetParameters: () => {\n return {\n ...this._getDatasetControlParameters(),\n Grid: new Dataset(new MemoryDataProvider({\n dataSource: [],\n metadata: {PrimaryIdAttribute: 'id'}\n }))\n }\n }\n });\n }\n\n private _getDatasetControlParameters(): IDatasetControlParameters {\n return {\n Grid: this.getDataset(),\n EnableEditing: {\n raw: this._isEditingEnabled()\n },\n EnableCommandBar: {\n raw: this._isCommandBarEnabled()\n },\n EnableAutoSave: {\n raw: this._isAutoSaveEnabled()\n },\n EnablePagination: {\n raw: this._context.parameters.EnablePagination?.raw !== 'false'\n },\n EnableFiltering: {\n raw: this._context.parameters.EnableFiltering?.raw !== 'false'\n },\n EnableSorting: {\n raw: this._context.parameters.EnableSorting?.raw !== 'false'\n },\n EnableNavigation: {\n raw: this._context.parameters.EnableNavigation?.raw !== 'false'\n },\n EnableOptionSetColors: {\n raw: this._context.parameters.EnableOptionSetColors?.raw === 'true'\n },\n SelectableRows: {\n raw: this._context.parameters.SelectableRows?.raw ?? 'single'\n },\n RowHeight: {\n raw: this._context.parameters.RowHeight?.raw ?? 42\n },\n //quick find is always handled by platform\n EnableQuickFind: {\n raw: this._context.parameters.EnableQuickFind?.raw === 'true'\n },\n EnableEditColumns: {\n raw: this._context.parameters.EnableEditColumns?.raw === 'true'\n },\n EnableAggregation: {\n raw: this._context.parameters.EnableAggregation?.raw === 'true',\n },\n EnableGrouping: {\n raw: this._context.parameters.EnableGrouping?.raw === 'true'\n },\n Height: {\n raw: this._context.parameters.Height?.raw ?? null\n },\n InlineRibbonButtonIds: {\n raw: this._context.parameters.InlineRibbonButtonIds?.raw ?? null\n },\n EnableZebra: {\n raw: this._context.parameters.EnableZebra?.raw !== 'false'\n },\n DefaultExpandedGroupLevel: {\n raw: this._context.parameters.DefaultExpandedGroupLevel?.raw ?? null\n },\n EnableRecordCount: {\n raw: this._context.parameters.EnableRecordCount?.raw !== 'false'\n },\n EnableGroupedColumnsPinning: {\n raw: this._context.parameters.EnableGroupedColumnsPinning?.raw !== 'false'\n },\n EnablePageSizeSwitcher: {\n raw: this._context.parameters.EnablePageSizeSwitcher?.raw !== 'false'\n },\n GroupingType: {\n raw: this._context.parameters.GroupingType?.raw ?? 'nested'\n },\n IsLocalHarnessDebugMode: this._context.parameters.IsLocalHarnessDebugMode,\n ClientApiWebresourceName: {\n raw: this._context.parameters.ClientApiWebresourceName?.raw ?? null\n },\n ClientApiFunctionName: {\n raw: this._context.parameters.ClientApiFunctionName?.raw ?? null\n }\n }\n }\n\n private _getDataProviderInstance(): IDataProvider {\n if (this._options?.CustomDataProviderClass) {\n return new this._options.CustomDataProviderClass(this._context.parameters.Data.raw);\n }\n switch (this._context.parameters.DataProvider.raw) {\n case \"FetchXml\": {\n return new FetchXmlDataProvider({\n fetchXml: this._context.parameters.Data.raw as string\n })\n }\n case 'Memory': {\n return new MemoryDataProvider({\n dataSource: this._context.parameters.Data.raw!,\n metadata: this._getEntityMetadata()\n });\n }\n }\n }\n\n private _getColumns() {\n try {\n const parameterColumns = this._context.parameters.Columns?.raw;\n const columns: IColumn[] = Array.isArray(parameterColumns) ? parameterColumns : JSON.parse(parameterColumns ?? \"[]\");\n return this._getMergedColumns(columns);\n }\n catch (err) {\n console.error(err);\n return this._dataset.columns;\n }\n }\n\n private _getMergedColumns(parameterColumns: IColumn[]): IColumn[] {\n const columnsMap = new Map<string, IColumn>(this._dataset.columns.map((col: IColumn) => [col.name, col]));\n const stateColumnsMap = new Map<string, IColumn>(this._state?.DatasetControlState?.columns?.map((col: IColumn) => [col.name, col]) ?? []);\n //if we have state, return it\n if (stateColumnsMap.size > 0) {\n return [...stateColumnsMap.values()];\n }\n //no state, save to load from parameters\n else {\n parameterColumns.forEach(parameterCol => {\n const col = columnsMap.get(parameterCol.name);\n if (col) {\n columnsMap.set(col.name, {\n ...col,\n ...parameterCol\n });\n } else {\n columnsMap.set(parameterCol.name, parameterCol);\n }\n });\n }\n return [...columnsMap.values()];\n }\n\n private _getEntityMetadata() {\n const parameterMetadata = this._context.parameters.EntityMetadata.raw;\n if (parameterMetadata) {\n return JSON.parse(parameterMetadata);\n }\n return {};\n }\n\n private _getFullTabStyles() {\n return mergeStyles({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1\n });\n }\n}"],"names":[],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IAEO,kBAAkB,GAAA;QACtB,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC;AACtE,QAAA,IAAI,iBAAiB,EAAE;AACnB,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;AACxC,SAAA;AACD,QAAA,OAAO,EAAE,CAAC;KACb;IAEO,iBAAiB,GAAA;AACrB,QAAA,OAAO,WAAW,CAAC;AACf,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,aAAa,EAAE,QAAQ;AACvB,YAAA,QAAQ,EAAE,CAAC;AACd,SAAA,CAAC,CAAC;KACN;AACJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talxis/base-controls",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2606.2",
|
|
4
4
|
"description": "Set of React components that natively work with Power Apps Component Framework APIs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"@dnd-kit/sortable": "^10.0.0",
|
|
85
85
|
"@dnd-kit/utilities": "^3.2.2",
|
|
86
86
|
"@fluentui/react-migration-v8-v9": "^9.6.20",
|
|
87
|
-
"@talxis/client-libraries": "1.
|
|
88
|
-
"@talxis/client-metadata": "^0.0.
|
|
87
|
+
"@talxis/client-libraries": "1.2606.1",
|
|
88
|
+
"@talxis/client-metadata": "^0.0.4",
|
|
89
89
|
"color": "^4.2.3",
|
|
90
90
|
"dayjs": "^1.11.10",
|
|
91
91
|
"debounce": "^2.2.0",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"@fluentui/react": "<=8.121.5",
|
|
107
|
-
"@talxis/react-components": "1.
|
|
107
|
+
"@talxis/react-components": "1.2505.2",
|
|
108
108
|
"react": "^16.8.6 || ^17.0.2",
|
|
109
109
|
"react-dom": "^16.8.6 || ^17.0.2"
|
|
110
110
|
}
|