@leav/ui 1.5.1 → 1.5.2-427ed078
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/__mocks__/common/attribute.js +1 -0
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +117 -18
- package/dist/_gqlTypes/index.js +88 -0
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +1 -0
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +1 -1
- package/dist/components/Explorer/Explorer.js +15 -3
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.js +13 -2
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.d.ts +13 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.js +20 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.d.ts +10 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.js +38 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.d.ts +8 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.js +16 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.d.ts +10 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.js +28 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.d.ts +5 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.js +12 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.d.ts +5 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.js +20 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.d.ts +11 -0
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js +106 -0
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useExportMassAction.js +9 -12
- package/dist/components/Explorer/actions-mass/useExportMassAction.js.map +1 -1
- package/dist/components/Filters/context/filtersReducer.js +0 -1
- package/dist/components/Filters/context/filtersReducer.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/TextAttributeDropDown.js +24 -7
- package/dist/components/Filters/filter-items/filter-type/TextAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js +15 -17
- package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/prepareFiltersForRequest.js +1 -1
- package/dist/components/Filters/prepareFiltersForRequest.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +12 -3
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +4 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +6 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +6 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +9 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +8 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +6 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +6 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +12 -11
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +16 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js +6 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +3 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +10 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +4 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/calculatedInheritedFlags.d.ts +24 -24
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/calculatedInheritedFlags.js +34 -35
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/calculatedInheritedFlags.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +15 -10
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +1 -1
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +4 -3
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +3 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/schema.d.ts +43 -4
- package/dist/hooks/useIFrameMessenger/schema.js +11 -5
- package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/types.d.ts +2 -1
- package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
- package/dist/locales/en/shared.json +20 -7
- package/dist/locales/fr/shared.json +20 -7
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTreeNodeContent.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNodeContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvF,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG1B,OAAO,EAAkD,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAC,yBAAyB,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,kBAAkB,EAAsC,MAAM,UAAU,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAmBpE,MAAM,CAAC,MAAM,qBAAqB,GAAmD,CAAC,EAClF,QAAQ,EAAE,IAAI,EACd,qCAAqC,EACrC,QAAQ,EACR,OAAO,EACP,aAAa,GAAG,EAAE,EAClB,aAAa,GAAG,EAAE,EAClB,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,IAAI,EACpB,aAAa,GAAG,KAAK,EACrB,mBAAmB,EACnB,eAAe,GAAG,IAAI,EACtB,YAAY,GAAG,KAAK,EACpB,wBAAwB,GAAG,KAAK,GACnC,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,QAAQ,GAAoB;QAC9B,KAAK,EAAE,IAAI,CAAC,K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,OAAO,EAAE,YAAY,GACvB,CACL,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type ComponentProps, type FunctionComponent, useEffect, useState} from 'react';\nimport {KitTree} from 'aristid-ds';\nimport {Spin} from 'antd';\nimport {type EventDataNode} from 'antd/lib/tree';\nimport {type ITreeNodeWithRecord} from '_ui/types';\nimport {type ChildrenAsRecordValuePermissionFilterInput, useTreeNodeChildrenLazyQuery} from '_ui/_gqlTypes';\nimport {defaultPaginationPageSize, ErrorDisplay} from '../../index';\nimport {TreeNodeTitle} from './TreeNodeTitle';\nimport {_isObjectSelection, type ITreeMap, type ITreeMapElement} from './_types';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\n\ninterface ISelectTreeNodeContentProps {\n treeData: {id: string; label: string};\n childrenAsRecordValuePermissionFilter?: ChildrenAsRecordValuePermissionFilterInput;\n selectedNodes?: string[];\n disabledNodes?: string[];\n onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;\n onCheck?: (selection: ITreeNodeWithRecord[]) => void;\n multiple?: boolean;\n checkable?: boolean;\n checkStrictly?: boolean;\n canSelectRoot?: boolean;\n selectableLibraries?: string[]; // all by default\n loadRecursively?: boolean;\n noPagination?: boolean;\n showSelectChildrenButton?: boolean;\n}\n\nexport const SelectTreeNodeContent: FunctionComponent<ISelectTreeNodeContentProps> = ({\n treeData: tree,\n childrenAsRecordValuePermissionFilter,\n onSelect,\n onCheck,\n selectedNodes = [],\n disabledNodes = [],\n multiple = false,\n checkable = false,\n checkStrictly = true,\n canSelectRoot = false,\n selectableLibraries,\n loadRecursively = true,\n noPagination = false,\n showSelectChildrenButton = false,\n}) => {\n const {t} = useSharedTranslation();\n\n const rootNode: ITreeMapElement = {\n title: tree.label,\n record: null,\n id: tree.id,\n key: tree.id,\n isLeaf: false,\n parents: [],\n paginationOffset: 0,\n children: [],\n };\n\n // As we'll fetch children when a node is expanded, we store the whole tree content in a hash map\n // to make update easier and more efficient\n const [treeMap, setTreeMap] = useState<ITreeMap>({\n [tree.id]: rootNode,\n });\n\n const [fetchError, setFetchError] = useState<string | undefined>();\n const [loadTreeContent, {error, called}] = useTreeNodeChildrenLazyQuery();\n\n const _fetchTreeContent = async (parentNodeKey?: string, offset = 0, currentTreeMap = {...treeMap}) => {\n try {\n const {\n data: {treeNodeChildren},\n } = await loadTreeContent({\n variables: {\n treeId: tree.id,\n node: parentNodeKey && parentNodeKey !== tree.id ? parentNodeKey : null,\n pagination: noPagination\n ? undefined\n : {\n limit: defaultPaginationPageSize,\n offset,\n },\n childrenAsRecordValuePermissionFilter,\n },\n });\n\n const parentMapKey = parentNodeKey ?? tree.id;\n const totalCount = treeNodeChildren.totalCount;\n const parentElement = currentTreeMap[parentMapKey];\n const showMoreKey = '__showMore' + parentMapKey + offset;\n\n const parentPath = parentElement?.parents ?? [];\n const currentParents = [...parentPath, parentMapKey];\n\n const formattedNodes = treeNodeChildren.list.map(e => ({\n record: e.record,\n title: e.record.whoAmI.label || e.record.whoAmI.id,\n id: e.id,\n key: e.id,\n isLeaf: !e.childrenCount,\n children: [],\n parents: currentParents,\n paginationOffset: 0,\n disabled: disabledNodes.includes(e.id),\n }));\n\n const existingKeys = new Set(parentElement.children.map(child => child.key));\n const newNodes = formattedNodes.filter(node => !existingKeys.has(node.key));\n parentElement.children = [\n ...parentElement.children.filter(child => !child.key.startsWith(`__showMore${parentMapKey}`)),\n ...newNodes,\n ];\n\n for (const node of formattedNodes) {\n currentTreeMap[node.key] = node as ITreeMapElement;\n parentElement.paginationOffset = offset;\n }\n\n if (!noPagination && totalCount > parentElement.paginationOffset + defaultPaginationPageSize) {\n const showMoreElement: ITreeMapElement = {\n isShowMore: true,\n record: null,\n title: t('tree-node-selection.show_more'),\n id: parentMapKey,\n key: showMoreKey,\n isLeaf: false,\n children: [],\n paginationOffset: 0,\n };\n parentElement.children.push(showMoreElement);\n }\n\n const newOffset = offset + defaultPaginationPageSize;\n if (treeNodeChildren.totalCount > newOffset) {\n await _fetchTreeContent(parentNodeKey, newOffset, currentTreeMap);\n }\n\n if (loadRecursively) {\n for (const node of formattedNodes) {\n if (!node.isLeaf) {\n await _fetchTreeContent(node.key, 0, currentTreeMap);\n }\n }\n }\n\n setTreeMap(currentTreeMap);\n setFetchError(undefined);\n } catch (err) {\n setFetchError((err as Error).message);\n }\n };\n\n useEffect(() => {\n _fetchTreeContent(undefined, 0);\n }, []);\n\n /**\n * In strict mode, loadData handler is called twice\n * https://github.com/ant-design/ant-design/issues/54497\n */\n const _handleLoadData: ComponentProps<typeof KitTree>['loadData'] = async nodeData => {\n const {id, isShowMore} = nodeData as EventDataNode<ITreeMapElement>;\n\n // Handle offset if we get here through the \"show more\" element\n const currentNodeOffset = treeMap[id]?.paginationOffset ?? 0;\n const paginationOffset = isShowMore\n ? (treeMap[id]?.paginationOffset ?? 0) + defaultPaginationPageSize\n : currentNodeOffset;\n\n if (id === tree.id && !isShowMore) {\n // Root has already been loaded\n return;\n }\n\n await _fetchTreeContent(id, paginationOffset);\n };\n\n const _handleSelect: ComponentProps<typeof KitTree>['onSelect'] = (_, e) => {\n // Prevent selecting when clicking on select all children button\n if (e.nativeEvent.target instanceof HTMLButtonElement) {\n return;\n }\n // If user clicked on the text \"show more\", we load more children instead of selecting the node\n if ('isShowMore' in e.node && e.node.isShowMore) {\n _handleLoadData(e.node);\n return;\n }\n\n const node = treeMap[e.node.key];\n const isRoot = node.id === tree.id;\n\n if (\n (!canSelectRoot && isRoot) ||\n (!isRoot && selectableLibraries && !selectableLibraries.includes(node.record.whoAmI.library.id))\n ) {\n return;\n }\n\n const getAllDescendants = (nodeId: string): string[] =>\n treeMap[nodeId].children.reduce<string[]>(\n (acc, child) => [...acc, child.id, ...getAllDescendants(child.id)],\n [],\n );\n\n if (node) {\n if (checkable) {\n const isDeselecting = selectedNodes.includes(node.id);\n if (isDeselecting) {\n const nodeToDeselect = [node.id, ...node.parents, ...getAllDescendants(node.id)];\n const selectionToKeep = selectedNodes.filter(\n selectedNode => !nodeToDeselect.includes(selectedNode),\n );\n _handleCheck(selectionToKeep, null);\n } else {\n _handleCheck([...selectedNodes, node.id], null);\n }\n } else {\n onSelect(node, e.selected);\n }\n }\n };\n\n const _handleCheck: ComponentProps<typeof KitTree>['onCheck'] = selection => {\n const checkedKeys = _isObjectSelection(selection) ? selection.checked : selection;\n const nodes = checkedKeys.map(key => treeMap[key]);\n onCheck(nodes);\n };\n\n if (!called) {\n return <Spin />;\n }\n\n if (error || fetchError) {\n return <ErrorDisplay message={error?.message ?? fetchError} />;\n }\n\n return (\n <KitTree\n checkStrictly={checkStrictly}\n treeData={[treeMap[rootNode.key]]}\n loadData={loadRecursively ? undefined : _handleLoadData}\n multiple={multiple}\n checkable={checkable}\n defaultExpandedKeys={selectedNodes.length > 0 ? [...selectedNodes, tree.id] : [tree.id]}\n selectedKeys={selectedNodes}\n checkedKeys={selectedNodes}\n titleRender={node => (\n <TreeNodeTitle\n checkable={checkable}\n disabledNodes={disabledNodes}\n loadRecursively={loadRecursively}\n node={node as ITreeMapElement}\n onSelect={onSelect}\n selectedNodes={selectedNodes}\n showSelectChildrenButton={showSelectChildrenButton}\n />\n )}\n onSelect={_handleSelect}\n onCheck={_handleCheck}\n />\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"SelectTreeNodeContent.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNodeContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvF,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG1B,OAAO,EAAkD,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC5G,OAA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,CAAC;QACtB,OAAO,KAAC,YAAY,IAAC,OAAO,EAAE,KAAK,EAAE,OAAO,IAAI,UAAU,GAAI,CAAC;IACnE,CAAC;IAED,OAAO,CACH,KAAC,OAAO,IACJ,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EACjC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,EACvD,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,mBAAmB,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EACvF,YAAY,EAAE,aAAa,EAC3B,WAAW,EAAE,aAAa,EAC1B,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,CACjB,KAAC,aAAa,IACV,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,IAAI,EAAE,IAAuB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,wBAAwB,EAAE,wBAAwB,GACpD,CACL,EACD,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,YAAY,GACvB,CACL,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type ComponentProps, type FunctionComponent, useEffect, useState} from 'react';\nimport {KitTree} from 'aristid-ds';\nimport {Spin} from 'antd';\nimport {type EventDataNode} from 'antd/lib/tree';\nimport {type ITreeNodeWithRecord} from '_ui/types';\nimport {type ChildrenAsRecordValuePermissionFilterInput, useTreeNodeChildrenLazyQuery} from '_ui/_gqlTypes';\nimport {defaultPaginationPageSize, ErrorDisplay} from '../../index';\nimport {TreeNodeTitle} from './TreeNodeTitle';\nimport {_isObjectSelection, type ITreeMap, type ITreeMapElement} from './_types';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\n\ninterface ISelectTreeNodeContentProps {\n treeData: {id: string; label: string};\n childrenAsRecordValuePermissionFilter?: ChildrenAsRecordValuePermissionFilterInput;\n selectedNodes?: string[];\n disabledNodes?: string[];\n onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;\n onCheck?: (selection: ITreeNodeWithRecord[]) => void;\n multiple?: boolean;\n checkable?: boolean;\n checkStrictly?: boolean;\n canSelectRoot?: boolean;\n selectableLibraries?: string[]; // all by default\n loadRecursively?: boolean;\n noPagination?: boolean;\n showSelectChildrenButton?: boolean;\n}\n\nexport const SelectTreeNodeContent: FunctionComponent<ISelectTreeNodeContentProps> = ({\n treeData: tree,\n childrenAsRecordValuePermissionFilter,\n onSelect,\n onCheck,\n selectedNodes = [],\n disabledNodes = [],\n multiple = false,\n checkable = false,\n checkStrictly = true,\n canSelectRoot = false,\n selectableLibraries,\n loadRecursively = true,\n noPagination = false,\n showSelectChildrenButton = false,\n}) => {\n const {t} = useSharedTranslation();\n\n const rootNode: ITreeMapElement = {\n title: tree.label,\n record: null,\n id: tree.id,\n key: tree.id,\n isLeaf: false,\n parents: [],\n paginationOffset: 0,\n children: [],\n };\n\n // As we'll fetch children when a node is expanded, we store the whole tree content in a hash map\n // to make update easier and more efficient\n const [treeMap, setTreeMap] = useState<ITreeMap>({\n [tree.id]: rootNode,\n });\n\n const [fetchError, setFetchError] = useState<string | undefined>();\n const [loadTreeContent, {error, called}] = useTreeNodeChildrenLazyQuery();\n\n const _fetchTreeContent = async (parentNodeKey?: string, offset = 0, currentTreeMap = {...treeMap}) => {\n try {\n const {\n data: {treeNodeChildren},\n } = await loadTreeContent({\n variables: {\n treeId: tree.id,\n node: parentNodeKey && parentNodeKey !== tree.id ? parentNodeKey : null,\n pagination: noPagination\n ? undefined\n : {\n limit: defaultPaginationPageSize,\n offset,\n },\n childrenAsRecordValuePermissionFilter,\n },\n });\n\n const parentMapKey = parentNodeKey ?? tree.id;\n const totalCount = treeNodeChildren.totalCount;\n const parentElement = currentTreeMap[parentMapKey];\n const showMoreKey = '__showMore' + parentMapKey + offset;\n\n const parentPath = parentElement?.parents ?? [];\n const currentParents = [...parentPath, parentMapKey];\n\n const formattedNodes = treeNodeChildren.list.map(e => ({\n record: e.record,\n title: e.record.whoAmI.label || e.record.whoAmI.id,\n id: e.id,\n key: e.id,\n isLeaf: !e.childrenCount,\n children: [],\n parents: currentParents,\n paginationOffset: 0,\n disabled: disabledNodes.includes(e.id),\n }));\n\n const existingKeys = new Set(parentElement.children.map(child => child.key));\n const newNodes = formattedNodes.filter(node => !existingKeys.has(node.key));\n parentElement.children = [\n ...parentElement.children.filter(child => !child.key.startsWith(`__showMore${parentMapKey}`)),\n ...newNodes,\n ];\n\n for (const node of formattedNodes) {\n currentTreeMap[node.key] = node as ITreeMapElement;\n parentElement.paginationOffset = offset;\n }\n\n if (!noPagination && totalCount > parentElement.paginationOffset + defaultPaginationPageSize) {\n const showMoreElement: ITreeMapElement = {\n isShowMore: true,\n record: null,\n title: t('tree-node-selection.show_more'),\n id: parentMapKey,\n key: showMoreKey,\n isLeaf: false,\n children: [],\n paginationOffset: 0,\n };\n parentElement.children.push(showMoreElement);\n }\n\n const newOffset = offset + defaultPaginationPageSize;\n if (treeNodeChildren.totalCount > newOffset) {\n await _fetchTreeContent(parentNodeKey, newOffset, currentTreeMap);\n }\n\n if (loadRecursively) {\n for (const node of formattedNodes) {\n if (!node.isLeaf) {\n await _fetchTreeContent(node.key, 0, currentTreeMap);\n }\n }\n }\n\n setTreeMap(currentTreeMap);\n setFetchError(undefined);\n } catch (err) {\n setFetchError((err as Error).message);\n }\n };\n\n useEffect(() => {\n _fetchTreeContent(undefined, 0);\n }, []);\n\n /**\n * In strict mode, loadData handler is called twice\n * https://github.com/ant-design/ant-design/issues/54497\n */\n const _handleLoadData: ComponentProps<typeof KitTree>['loadData'] = async nodeData => {\n const {id, isShowMore} = nodeData as EventDataNode<ITreeMapElement>;\n\n // Handle offset if we get here through the \"show more\" element\n const currentNodeOffset = treeMap[id]?.paginationOffset ?? 0;\n const paginationOffset = isShowMore\n ? (treeMap[id]?.paginationOffset ?? 0) + defaultPaginationPageSize\n : currentNodeOffset;\n\n if (id === tree.id && !isShowMore) {\n // Root has already been loaded\n return;\n }\n\n await _fetchTreeContent(id, paginationOffset);\n };\n\n const _handleSelect: ComponentProps<typeof KitTree>['onSelect'] = (_, e) => {\n // Prevent selecting when clicking on select all children button\n if (e.nativeEvent.target instanceof HTMLButtonElement) {\n return;\n }\n // If user clicked on the text \"show more\", we load more children instead of selecting the node\n if ('isShowMore' in e.node && e.node.isShowMore) {\n _handleLoadData(e.node);\n return;\n }\n\n const node = treeMap[e.node.key];\n const isRoot = node.id === tree.id;\n\n if (\n (!canSelectRoot && isRoot) ||\n (!isRoot && selectableLibraries && !selectableLibraries.includes(node.record.whoAmI.library.id))\n ) {\n return;\n }\n\n const getAllDescendants = (nodeId: string): string[] =>\n treeMap[nodeId].children.reduce<string[]>(\n (acc, child) => [...acc, child.id, ...getAllDescendants(child.id)],\n [],\n );\n\n if (node) {\n if (checkable) {\n const isDeselecting = selectedNodes.includes(node.id);\n if (isDeselecting) {\n const nodeToDeselect = [node.id, ...node.parents, ...getAllDescendants(node.id)];\n const selectionToKeep = selectedNodes.filter(\n selectedNode => !nodeToDeselect.includes(selectedNode),\n );\n _handleCheck(selectionToKeep, null);\n } else {\n _handleCheck([...selectedNodes, node.id], null);\n }\n } else {\n onSelect(node, e.selected);\n }\n }\n };\n\n const _handleCheck: ComponentProps<typeof KitTree>['onCheck'] = selection => {\n if (!canSelectRoot && Array.isArray(selection) && selection.includes(tree.id)) {\n return;\n }\n const checkedKeys = _isObjectSelection(selection) ? selection.checked : selection;\n const nodes = checkedKeys.map(key => treeMap[key]);\n onCheck(nodes);\n };\n\n if (!called) {\n return <Spin />;\n }\n\n if (error || fetchError) {\n return <ErrorDisplay message={error?.message ?? fetchError} />;\n }\n\n return (\n <KitTree\n checkStrictly={checkStrictly}\n treeData={[treeMap[rootNode.key]]}\n loadData={loadRecursively ? undefined : _handleLoadData}\n multiple={multiple}\n checkable={checkable}\n defaultExpandedKeys={selectedNodes.length > 0 ? [...selectedNodes, tree.id] : [tree.id]}\n selectedKeys={selectedNodes}\n checkedKeys={selectedNodes}\n titleRender={node => (\n <TreeNodeTitle\n checkable={checkable}\n disabledNodes={disabledNodes}\n loadRecursively={loadRecursively}\n node={node as ITreeMapElement}\n onSelect={onSelect}\n selectedNodes={selectedNodes}\n showSelectChildrenButton={showSelectChildrenButton}\n />\n )}\n onSelect={_handleSelect}\n onCheck={_handleCheck}\n />\n );\n};\n"]}
|
package/dist/constants.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const GLOBAL_BASE_URL: string;
|
|
|
30
30
|
export declare const PREFIX_USER_VIEWS_ORDER_KEY = "user_views_order_";
|
|
31
31
|
export declare const PREFIX_SHARED_VIEWS_ORDER_KEY = "shared_views_order_";
|
|
32
32
|
export declare const TOOLTIP_DEFAULT_DELAY_IN_SECONDS = 0.5;
|
|
33
|
+
export declare const INFO_NOTIFICATION_DURATION_SECONDS = 5;
|
|
33
34
|
export declare const SUCCESS_ALERT_DURATION = 3000;
|
|
34
35
|
export declare const ERROR_ALERT_DURATION = 5000;
|
|
35
36
|
export declare const EDIT_RECORD_SIDEBAR_ID = "edit_record_sidebar";
|
package/dist/constants.js
CHANGED
|
@@ -41,6 +41,7 @@ export const GLOBAL_BASE_URL = window.__global_base_url__ || '';
|
|
|
41
41
|
export const PREFIX_USER_VIEWS_ORDER_KEY = 'user_views_order_';
|
|
42
42
|
export const PREFIX_SHARED_VIEWS_ORDER_KEY = 'shared_views_order_';
|
|
43
43
|
export const TOOLTIP_DEFAULT_DELAY_IN_SECONDS = 0.5;
|
|
44
|
+
export const INFO_NOTIFICATION_DURATION_SECONDS = 5;
|
|
44
45
|
export const SUCCESS_ALERT_DURATION = 3000;
|
|
45
46
|
export const ERROR_ALERT_DURATION = 5000;
|
|
46
47
|
export const EDIT_RECORD_SIDEBAR_ID = 'edit_record_sidebar';
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,gCAAgC;AAChC,sCAAsC;AACtC,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAE3D,sEAAsE;AACtE,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,0BAAW,CAAA;AACf,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAmE;IACnG,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7C,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAChD,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC/C,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IACrD,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAqE;IACvG,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAC9C,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3C,CAAC,eAAe,CAAC,UAAU,CAAC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B,GAAG,YAAY,CAAC;AAEjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\n// Copyright LEAV Solutions 2017\n// This file is released under LGPL V3\nimport {AttributeFormat, AttributeType} from './_gqlTypes';\n\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nexport enum PreviewSize {\n TINY = 'tiny',\n SMALL = 'small',\n MEDIUM = 'medium',\n BIG = 'big',\n}\n\nexport const tagColorByAttributeType: {[key in AttributeType]: [border: string, background: string]} = {\n [AttributeType.simple]: ['purple', '#ffe5ff'],\n [AttributeType.simple_link]: ['blue', '#e5e5ff'],\n [AttributeType.advanced]: ['orange', '#fff6e5'],\n [AttributeType.advanced_link]: ['#d4380d', '#fde4dd'],\n [AttributeType.tree]: ['green', '#e5ffe5'],\n};\n\nexport const tagColorByAttributeFormat: {[key in AttributeFormat]: [border: string, background: string]} = {\n [AttributeFormat.boolean]: ['gold', '#fff099'],\n [AttributeFormat.date]: ['blue', '#e5e5ff'],\n [AttributeFormat.date_range]: ['#1d39c4', '#e9ecfc'],\n [AttributeFormat.encrypted]: ['red', '#ffe5e5'],\n [AttributeFormat.extended]: ['magenta', '#ffe5e5'],\n [AttributeFormat.numeric]: ['orange', '#fff6e5'],\n [AttributeFormat.text]: ['green', '#e5ffe5'],\n [AttributeFormat.color]: ['purple', '#ffe5ff'],\n [AttributeFormat.rich_text]: ['#d4380d', '#fde4dd'],\n};\n\nexport enum ErrorDisplayTypes {\n ERROR = 'error',\n PERMISSION_ERROR = 'permission_error',\n PAGE_NOT_FOUND = 'page_not_found_error',\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n interface Window {\n __dynamic_base__?: string;\n __global_base_url__?: string;\n __bugsnag_api_key__?: string;\n __bugsnag_app_version__?: string;\n __bugsnag_release_stage__?: string;\n }\n}\n\nexport const defaultPaginationPageSize = 20;\n\nexport const GLOBAL_BASE_URL = window.__global_base_url__ || '';\n\nexport const PREFIX_USER_VIEWS_ORDER_KEY = 'user_views_order_';\nexport const PREFIX_SHARED_VIEWS_ORDER_KEY = 'shared_views_order_';\n\nexport const TOOLTIP_DEFAULT_DELAY_IN_SECONDS = 0.5;\n\nexport const SUCCESS_ALERT_DURATION = 3_000;\nexport const ERROR_ALERT_DURATION = 5_000;\n\nexport const EDIT_RECORD_SIDEBAR_ID = 'edit_record_sidebar';\n\nexport const STANDARD_FIELD_ID_PREFIX = 'standardfield-';\n\nexport const LINK_FIELD_ID_PREFIX = 'linkfield-';\n\nexport const TREE_FIELD_ID_PREFIX = 'treefield-';\n\nexport const SUBMIT_BUTTONS_PORTAL = 'submit_buttons_portal';\nexport const NEW_RECORD_ID = 'newRecord';\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,gCAAgC;AAChC,sCAAsC;AACtC,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAE3D,sEAAsE;AACtE,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,0BAAW,CAAA;AACf,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAmE;IACnG,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7C,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAChD,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,SAA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,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAEnE,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAEpD,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAK,CAAC;AAE1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAEzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAEjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAEjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\n// Copyright LEAV Solutions 2017\n// This file is released under LGPL V3\nimport {AttributeFormat, AttributeType} from './_gqlTypes';\n\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nexport enum PreviewSize {\n TINY = 'tiny',\n SMALL = 'small',\n MEDIUM = 'medium',\n BIG = 'big',\n}\n\nexport const tagColorByAttributeType: {[key in AttributeType]: [border: string, background: string]} = {\n [AttributeType.simple]: ['purple', '#ffe5ff'],\n [AttributeType.simple_link]: ['blue', '#e5e5ff'],\n [AttributeType.advanced]: ['orange', '#fff6e5'],\n [AttributeType.advanced_link]: ['#d4380d', '#fde4dd'],\n [AttributeType.tree]: ['green', '#e5ffe5'],\n};\n\nexport const tagColorByAttributeFormat: {[key in AttributeFormat]: [border: string, background: string]} = {\n [AttributeFormat.boolean]: ['gold', '#fff099'],\n [AttributeFormat.date]: ['blue', '#e5e5ff'],\n [AttributeFormat.date_range]: ['#1d39c4', '#e9ecfc'],\n [AttributeFormat.encrypted]: ['red', '#ffe5e5'],\n [AttributeFormat.extended]: ['magenta', '#ffe5e5'],\n [AttributeFormat.numeric]: ['orange', '#fff6e5'],\n [AttributeFormat.text]: ['green', '#e5ffe5'],\n [AttributeFormat.color]: ['purple', '#ffe5ff'],\n [AttributeFormat.rich_text]: ['#d4380d', '#fde4dd'],\n};\n\nexport enum ErrorDisplayTypes {\n ERROR = 'error',\n PERMISSION_ERROR = 'permission_error',\n PAGE_NOT_FOUND = 'page_not_found_error',\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n interface Window {\n __dynamic_base__?: string;\n __global_base_url__?: string;\n __bugsnag_api_key__?: string;\n __bugsnag_app_version__?: string;\n __bugsnag_release_stage__?: string;\n }\n}\n\nexport const defaultPaginationPageSize = 20;\n\nexport const GLOBAL_BASE_URL = window.__global_base_url__ || '';\n\nexport const PREFIX_USER_VIEWS_ORDER_KEY = 'user_views_order_';\nexport const PREFIX_SHARED_VIEWS_ORDER_KEY = 'shared_views_order_';\n\nexport const TOOLTIP_DEFAULT_DELAY_IN_SECONDS = 0.5;\n\nexport const INFO_NOTIFICATION_DURATION_SECONDS = 5;\n\nexport const SUCCESS_ALERT_DURATION = 3_000;\nexport const ERROR_ALERT_DURATION = 5_000;\n\nexport const EDIT_RECORD_SIDEBAR_ID = 'edit_record_sidebar';\n\nexport const STANDARD_FIELD_ID_PREFIX = 'standardfield-';\n\nexport const LINK_FIELD_ID_PREFIX = 'linkfield-';\n\nexport const TREE_FIELD_ID_PREFIX = 'treefield-';\n\nexport const SUBMIT_BUTTONS_PORTAL = 'submit_buttons_portal';\nexport const NEW_RECORD_ID = 'newRecord';\n"]}
|
|
@@ -16,18 +16,21 @@ export declare const ExplorerPropsSchema: z.ZodObject<{
|
|
|
16
16
|
noPagination: z.ZodOptional<z.ZodLiteral<true>>;
|
|
17
17
|
showActionsLabels: z.ZodOptional<z.ZodBoolean>;
|
|
18
18
|
defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
|
|
19
|
-
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
|
|
19
|
+
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">, z.ZodLiteral<"editAttribute">]>>>;
|
|
20
20
|
defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
export declare const ItemActionsSchema: z.ZodArray<z.ZodObject<{
|
|
23
23
|
where: z.ZodUnion<readonly [z.ZodLiteral<"popup">, z.ZodLiteral<"slider">, z.ZodLiteral<"fullpage">]>;
|
|
24
24
|
what: z.ZodLiteral<"record">;
|
|
25
|
+
targetPanelId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
targetFlapPanelId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"info-history">, z.ZodLiteral<"thread">]>>;
|
|
25
27
|
icon: z.ZodOptional<z.ZodString>;
|
|
26
28
|
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
27
29
|
onRowClick: z.ZodOptional<z.ZodBoolean>;
|
|
28
30
|
}, z.core.$strip>>;
|
|
29
31
|
export declare const basePanelSchema: z.ZodObject<{
|
|
30
32
|
id: z.ZodString;
|
|
33
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
31
34
|
name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
32
35
|
isStandalone: z.ZodOptional<z.ZodBoolean>;
|
|
33
36
|
hideInSlider: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -41,9 +44,41 @@ export declare const creationPanelSchema: z.ZodObject<{
|
|
|
41
44
|
type: z.ZodLiteral<"creationForm">;
|
|
42
45
|
formId: z.ZodString;
|
|
43
46
|
attributeSource: z.ZodString;
|
|
47
|
+
isStandalone: z.ZodLiteral<true>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export declare const baseExplorerPanelSchema: z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<"explorer">;
|
|
51
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
52
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
53
|
+
where: z.ZodUnion<readonly [z.ZodLiteral<"popup">, z.ZodLiteral<"slider">, z.ZodLiteral<"fullpage">]>;
|
|
54
|
+
what: z.ZodLiteral<"record">;
|
|
55
|
+
targetPanelId: z.ZodOptional<z.ZodString>;
|
|
56
|
+
targetFlapPanelId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"info-history">, z.ZodLiteral<"thread">]>>;
|
|
57
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
58
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
59
|
+
onRowClick: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export declare const attributeExplorerPanelSchema: z.ZodObject<{
|
|
63
|
+
attributeSource: z.ZodString;
|
|
64
|
+
libraryId: z.ZodString;
|
|
65
|
+
explorerProps: z.ZodOptional<z.ZodObject<{
|
|
66
|
+
showSearch: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
showFilters: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
showSorts: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
freezeView: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
showAttributeLabels: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
creationFormId: z.ZodOptional<z.ZodString>;
|
|
72
|
+
noPagination: z.ZodOptional<z.ZodLiteral<true>>;
|
|
73
|
+
showActionsLabels: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
|
|
75
|
+
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">, z.ZodLiteral<"editAttribute">]>>>;
|
|
76
|
+
defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
44
78
|
}, z.core.$strip>;
|
|
45
79
|
export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
46
80
|
id: z.ZodString;
|
|
81
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
47
82
|
name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
48
83
|
isStandalone: z.ZodOptional<z.ZodBoolean>;
|
|
49
84
|
hideInSlider: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -53,13 +88,15 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
53
88
|
actions: z.ZodArray<z.ZodObject<{
|
|
54
89
|
where: z.ZodUnion<readonly [z.ZodLiteral<"popup">, z.ZodLiteral<"slider">, z.ZodLiteral<"fullpage">]>;
|
|
55
90
|
what: z.ZodLiteral<"record">;
|
|
91
|
+
targetPanelId: z.ZodOptional<z.ZodString>;
|
|
92
|
+
targetFlapPanelId: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"info-history">, z.ZodLiteral<"thread">]>>;
|
|
56
93
|
icon: z.ZodOptional<z.ZodString>;
|
|
57
94
|
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
58
95
|
onRowClick: z.ZodOptional<z.ZodBoolean>;
|
|
59
96
|
}, z.core.$strip>>;
|
|
60
97
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
61
98
|
attributeSource: z.ZodString;
|
|
62
|
-
libraryId: z.
|
|
99
|
+
libraryId: z.ZodString;
|
|
63
100
|
explorerProps: z.ZodOptional<z.ZodObject<{
|
|
64
101
|
showSearch: z.ZodOptional<z.ZodBoolean>;
|
|
65
102
|
showFilters: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -70,7 +107,7 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
70
107
|
noPagination: z.ZodOptional<z.ZodLiteral<true>>;
|
|
71
108
|
showActionsLabels: z.ZodOptional<z.ZodBoolean>;
|
|
72
109
|
defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
|
|
73
|
-
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
|
|
110
|
+
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">, z.ZodLiteral<"editAttribute">]>>>;
|
|
74
111
|
defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
|
|
75
112
|
}, z.core.$strip>>;
|
|
76
113
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -84,7 +121,7 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
84
121
|
noPagination: z.ZodOptional<z.ZodLiteral<true>>;
|
|
85
122
|
showActionsLabels: z.ZodOptional<z.ZodBoolean>;
|
|
86
123
|
defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
|
|
87
|
-
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
|
|
124
|
+
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">, z.ZodLiteral<"editAttribute">]>>>;
|
|
88
125
|
defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
|
|
89
126
|
}, z.core.$strip>>;
|
|
90
127
|
}, z.core.$strip>]>>, z.ZodObject<{
|
|
@@ -98,9 +135,11 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
98
135
|
type: z.ZodLiteral<"creationForm">;
|
|
99
136
|
formId: z.ZodString;
|
|
100
137
|
attributeSource: z.ZodString;
|
|
138
|
+
isStandalone: z.ZodLiteral<true>;
|
|
101
139
|
}, z.core.$strip>]>>;
|
|
102
140
|
export declare const PanelIFrameSchema: z.ZodIntersection<z.ZodObject<{
|
|
103
141
|
id: z.ZodString;
|
|
142
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
104
143
|
name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
105
144
|
isStandalone: z.ZodOptional<z.ZodBoolean>;
|
|
106
145
|
hideInSlider: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -19,7 +19,9 @@ export const ExplorerPropsSchema = z.object({
|
|
|
19
19
|
noPagination: z.literal(true).optional(),
|
|
20
20
|
showActionsLabels: z.boolean().optional(),
|
|
21
21
|
defaultPrimaryActions: z.array(z.union([z.literal('create')])).optional(),
|
|
22
|
-
defaultMassActions: z
|
|
22
|
+
defaultMassActions: z
|
|
23
|
+
.array(z.union([z.literal('deactivate'), z.literal('export'), z.literal('editAttribute')]))
|
|
24
|
+
.optional(),
|
|
23
25
|
defaultActionsForItem: z
|
|
24
26
|
.array(z.union([z.literal('replaceLink'), z.literal('remove'), z.literal('activate')]))
|
|
25
27
|
.optional(),
|
|
@@ -28,6 +30,8 @@ export const ItemActionsSchema = z
|
|
|
28
30
|
.array(z.object({
|
|
29
31
|
where: WhereSchema,
|
|
30
32
|
what: z.literal('record'),
|
|
33
|
+
targetPanelId: PanelIdSchema.optional(),
|
|
34
|
+
targetFlapPanelId: FlapPanelIdSchema.optional(),
|
|
31
35
|
icon: FontAwesomeIconSchema,
|
|
32
36
|
label: z.record(LanguageSchema, z.string()),
|
|
33
37
|
onRowClick: z.boolean().optional(),
|
|
@@ -37,6 +41,7 @@ export const ItemActionsSchema = z
|
|
|
37
41
|
});
|
|
38
42
|
export const basePanelSchema = z.object({
|
|
39
43
|
id: PanelIdSchema,
|
|
44
|
+
icon: FontAwesomeIconSchema,
|
|
40
45
|
name: z.record(LanguageSchema, z.string()).optional(),
|
|
41
46
|
isStandalone: z.boolean().optional(),
|
|
42
47
|
hideInSlider: z.boolean().optional(),
|
|
@@ -54,21 +59,22 @@ export const creationPanelSchema = z.object({
|
|
|
54
59
|
type: z.literal('creationForm'),
|
|
55
60
|
formId: z.string(),
|
|
56
61
|
attributeSource: z.string(),
|
|
62
|
+
isStandalone: z.literal(true),
|
|
57
63
|
});
|
|
58
|
-
const baseExplorerPanelSchema = z.object({
|
|
64
|
+
export const baseExplorerPanelSchema = z.object({
|
|
59
65
|
type: z.literal('explorer'),
|
|
60
66
|
viewId: z.string().optional(),
|
|
61
67
|
actions: ItemActionsSchema,
|
|
62
68
|
});
|
|
63
|
-
const
|
|
69
|
+
export const attributeExplorerPanelSchema = z.object({
|
|
64
70
|
attributeSource: z.string(),
|
|
65
|
-
libraryId: LibraryIdSchema
|
|
71
|
+
libraryId: LibraryIdSchema,
|
|
66
72
|
explorerProps: ExplorerPropsSchema.optional(),
|
|
67
73
|
});
|
|
68
74
|
const libraryExplorerPanelSchema = z.object({
|
|
69
75
|
explorerProps: ExplorerPropsSchema.optional(),
|
|
70
76
|
});
|
|
71
|
-
const explorerPanelSchema = baseExplorerPanelSchema.and(z.union([
|
|
77
|
+
const explorerPanelSchema = baseExplorerPanelSchema.and(z.union([attributeExplorerPanelSchema, libraryExplorerPanelSchema]));
|
|
72
78
|
export const PanelSchema = basePanelSchema.and(z.union([explorerPanelSchema, iframePanelSchema, editionPanelSchema, creationPanelSchema]));
|
|
73
79
|
export const PanelIFrameSchema = basePanelSchema.and(iframePanelSchema);
|
|
74
80
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/schema.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE,CAAC;AAE1F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAErG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE3F,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;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AChD,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,GAAG,CACnD,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,EAAE,0BAA0B,CAAC,CAAC,CACtE,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAC1C,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC,CAC7F,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport * as z from 'zod/v4';\n\nexport const FONT_AWESOME_ICON_REGEX = /^fa-/;\n\nexport const PanelIdSchema = z.string();\nexport const LanguageSchema = z.string();\nexport const LibraryIdSchema = z.string();\nexport const FontAwesomeIconSchema = z.string().regex(FONT_AWESOME_ICON_REGEX).optional();\n\nexport const WhereSchema = z.union([z.literal('popup'), z.literal('slider'), z.literal('fullpage')]);\n\nexport const FlapPanelIdSchema = z.union([z.literal('info-history'), z.literal('thread')]);\n\nexport const ExplorerPropsSchema = z.object({\n showSearch: z.boolean().optional(),\n showFilters: z.boolean().optional(),\n showSorts: z.boolean().optional(),\n freezeView: z.boolean().optional(),\n showAttributeLabels: z.boolean().optional(),\n creationFormId: z.string().optional(),\n noPagination: z.literal(true).optional(),\n showActionsLabels: z.boolean().optional(),\n defaultPrimaryActions: z.array(z.union([z.literal('create')])).optional(),\n defaultMassActions: z\n .array(z.union([z.literal('deactivate'), z.literal('export'), z.literal('editAttribute')]))\n .optional(),\n defaultActionsForItem: z\n .array(z.union([z.literal('replaceLink'), z.literal('remove'), z.literal('activate')]))\n .optional(),\n});\n\nexport const ItemActionsSchema = z\n .array(\n z.object({\n where: WhereSchema,\n what: z.literal('record'),\n targetPanelId: PanelIdSchema.optional(),\n targetFlapPanelId: FlapPanelIdSchema.optional(),\n icon: FontAwesomeIconSchema,\n label: z.record(LanguageSchema, z.string()),\n onRowClick: z.boolean().optional(),\n }),\n )\n .refine(actions => actions.reduce((acc, action) => (action.onRowClick ? acc + 1 : acc), 0) <= 1, {\n message: 'At most one action must have onRowClick set to true',\n });\n\nexport const basePanelSchema = z.object({\n id: PanelIdSchema,\n icon: FontAwesomeIconSchema,\n name: z.record(LanguageSchema, z.string()).optional(),\n isStandalone: z.boolean().optional(),\n hideInSlider: z.boolean().optional(),\n});\n\nexport const iframePanelSchema = z.object({\n type: z.literal('custom'),\n iframeSource: z.string(),\n isSelfContaining: z.boolean().optional(),\n});\n\nconst editionPanelSchema = z.object({\n type: z.literal('editionForm'),\n formId: z.string(),\n});\n\nexport const creationPanelSchema = z.object({\n type: z.literal('creationForm'),\n formId: z.string(),\n attributeSource: z.string(),\n isStandalone: z.literal(true),\n});\n\nexport const baseExplorerPanelSchema = z.object({\n type: z.literal('explorer'),\n viewId: z.string().optional(),\n actions: ItemActionsSchema,\n});\n\nexport const attributeExplorerPanelSchema = z.object({\n attributeSource: z.string(),\n libraryId: LibraryIdSchema,\n explorerProps: ExplorerPropsSchema.optional(),\n});\n\nconst libraryExplorerPanelSchema = z.object({\n explorerProps: ExplorerPropsSchema.optional(),\n});\n\nconst explorerPanelSchema = baseExplorerPanelSchema.and(\n z.union([attributeExplorerPanelSchema, libraryExplorerPanelSchema]),\n);\n\nexport const PanelSchema = basePanelSchema.and(\n z.union([explorerPanelSchema, iframePanelSchema, editionPanelSchema, creationPanelSchema]),\n);\n\nexport const PanelIFrameSchema = basePanelSchema.and(iframePanelSchema);\n"]}
|
|
@@ -3,7 +3,7 @@ import type * as z from 'zod/v4';
|
|
|
3
3
|
import { type KitNotification } from 'aristid-ds';
|
|
4
4
|
import { type IKitConfirmDialog } from 'aristid-ds/dist/Kit/Feedback/Modal/types';
|
|
5
5
|
import { type ToastedAlertProps } from 'aristid-ds/dist/Kit/Feedback/Alert/types';
|
|
6
|
-
import { type LibraryIdSchema, type WhereSchema, type PanelIdSchema, type PanelSchema, type PanelIFrameSchema, type FlapPanelIdSchema } from '../../hooks/useIFrameMessenger/schema';
|
|
6
|
+
import { type LibraryIdSchema, type WhereSchema, type PanelIdSchema, type PanelSchema, type PanelIFrameSchema, type FlapPanelIdSchema, type attributeExplorerPanelSchema, type baseExplorerPanelSchema } from '../../hooks/useIFrameMessenger/schema';
|
|
7
7
|
export declare const packetId = "__fromIframeMessenger";
|
|
8
8
|
export interface IEncodedMessage {
|
|
9
9
|
payload: string;
|
|
@@ -51,6 +51,7 @@ export type UnregisterMessage = IMessageBase & {
|
|
|
51
51
|
id: string;
|
|
52
52
|
};
|
|
53
53
|
export type Panel = z.infer<typeof PanelSchema>;
|
|
54
|
+
export type AttributeExplorerPanel = Panel & z.infer<typeof baseExplorerPanelSchema> & z.infer<typeof attributeExplorerPanelSchema>;
|
|
54
55
|
export type LibraryId = z.infer<typeof LibraryIdSchema>;
|
|
55
56
|
export type PanelId = z.infer<typeof PanelIdSchema>;
|
|
56
57
|
export type Where = z.infer<typeof WhereSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/types.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,QAAQ,GAAG,uBAAuB,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type RefObject, type ComponentProps, type Key, type JSXElementConstructor} from 'react';\nimport type * as z from 'zod/v4';\nimport {type KitNotification} from 'aristid-ds';\nimport {type IKitConfirmDialog} from 'aristid-ds/dist/Kit/Feedback/Modal/types';\nimport {type ToastedAlertProps} from 'aristid-ds/dist/Kit/Feedback/Alert/types';\nimport {\n type LibraryIdSchema,\n type WhereSchema,\n type PanelIdSchema,\n type PanelSchema,\n type PanelIFrameSchema,\n type FlapPanelIdSchema,\n type attributeExplorerPanelSchema,\n type baseExplorerPanelSchema,\n} from '_ui/hooks/useIFrameMessenger/schema';\n\nexport const packetId = '__fromIframeMessenger';\n\nexport interface IEncodedMessage {\n payload: string;\n [packetId]: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ComponentPropsWithKey<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> =\n ComponentProps<T> & {\n key?: Key;\n };\n\nexport interface IMessageBase {\n __frameId?: string;\n}\n\nexport type ModalConfirmMessage = IMessageBase & {\n type: 'modal-confirm';\n id: string;\n data: IKitConfirmDialog;\n overrides?: string[];\n};\n\nexport type AlertMessage = IMessageBase & {\n type: 'alert';\n id: string;\n data: ToastedAlertProps;\n overrides?: string[];\n};\n\nexport type NotificationMessage = IMessageBase & {\n type: 'notification';\n id: string;\n data: ComponentPropsWithKey<typeof KitNotification>;\n overrides?: string[];\n};\n\nexport type ChangeLanguageMessage = IMessageBase & {\n type: 'change-language';\n language: string;\n};\n\nexport type SimpleMessage = IMessageBase & {\n type: 'message';\n id: string;\n data: unknown;\n};\n\nexport type RegisterMessage = IMessageBase & {\n type: 'register';\n id: string;\n};\n\nexport type UnregisterMessage = IMessageBase & {\n type: 'unregister';\n id: string;\n};\n\nexport type Panel = z.infer<typeof PanelSchema>;\n\nexport type AttributeExplorerPanel = Panel &\n z.infer<typeof baseExplorerPanelSchema> &\n z.infer<typeof attributeExplorerPanelSchema>;\n\nexport type LibraryId = z.infer<typeof LibraryIdSchema>;\n\nexport type PanelId = z.infer<typeof PanelIdSchema>;\n\nexport type Where = z.infer<typeof WhereSchema>;\n\ntype PanelIFrame = z.infer<typeof PanelIFrameSchema>;\n\ntype FlapPanelId = z.infer<typeof FlapPanelIdSchema>;\n\nexport type NavigateToPanelMessage = IMessageBase & {\n type: 'navigate-to-panel';\n data: {\n where: Where;\n libraryId: LibraryId;\n panelId?: PanelId;\n recordId?: string;\n flapRecordId?: string;\n flapLibraryId?: LibraryId;\n flapPanelId?: FlapPanelId;\n };\n};\n\nexport type ClosePanelMessage = IMessageBase & {\n type: 'close-panel';\n data: {\n recordId: string;\n where: string;\n recordPanelId: string;\n };\n};\n\nexport type NavigateToIframeMessage = IMessageBase & {\n type: 'navigate-to-iframe';\n data: {\n panel: PanelIFrame;\n destination: {libraryId: LibraryId};\n where: Where;\n recordId: string;\n recordPanelId: string;\n };\n};\n\nexport type MessageToPanelMessage = IMessageBase & {\n type: 'message-to-panel';\n data: {\n type: string;\n target?: string;\n payload: unknown;\n };\n};\n\nexport type OpenFlapPanelMessage = IMessageBase & {\n type: 'open-flap-panel';\n data: {\n flapRecordId: string;\n flapLibraryId: LibraryId;\n flapPanelId: FlapPanelId;\n };\n};\n\nexport type CloseFlapPanelMessage = IMessageBase & {\n type: 'close-flap-panel';\n};\n\nexport type MessageToParent =\n | ModalConfirmMessage\n | AlertMessage\n | NotificationMessage\n | SimpleMessage\n | RegisterMessage\n | UnregisterMessage\n | NavigateToPanelMessage\n | ClosePanelMessage\n | NavigateToIframeMessage\n | MessageToPanelMessage\n | OpenFlapPanelMessage\n | CloseFlapPanelMessage;\n\nexport type MessageFromParent =\n | (IMessageBase & {\n type: 'on-call-callback';\n path: string;\n data: unknown;\n })\n | ChangeLanguageMessage;\n\nexport type Message = MessageToParent | MessageFromParent;\n\nexport type MessageHandler<T = Message> = (message: T, dispatch: MessageDispatcher<T>) => void;\nexport type MessageDispatcher<T = Message> = (message: T, frameId?: string) => void;\n\nexport type CallCbFunction = (path: string, data: unknown, frameId: string) => void;\n\nexport type CallbackFunction = (...args: never[]) => void;\nexport type Callbacks = Record<string, Record<string, CallbackFunction>>;\n\nexport type MessageToPanelMessageHandler = (data: MessageToPanelMessage['data']['payload']) => void;\nexport type AddMessageToPanelMessageHandler = (type: string, handler: MessageToPanelMessageHandler) => void;\n\nexport interface IUseIFrameMessengerOptions {\n ref?: RefObject<HTMLIFrameElement>;\n id?: string;\n handlers?: {\n onModalConfirm?: (\n data: ModalConfirmMessage['data'],\n id: string,\n dispatch: MessageDispatcher,\n callCb: CallCbFunction,\n ) => void;\n onAlert?: (data: AlertMessage['data'], id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;\n onNotification?: (\n data: NotificationMessage['data'],\n id: string,\n dispatch: MessageDispatcher,\n callCb: CallCbFunction,\n ) => void;\n onMessage?: (data: unknown, id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;\n onNavigateToPanel?: (data: NavigateToPanelMessage['data']) => void;\n onClosePanel?: (data: ClosePanelMessage['data']) => void;\n onNavigateToIframe?: (data: NavigateToIframeMessage['data']) => void;\n onOpenFlapPanel?: (data: OpenFlapPanelMessage['data']) => void;\n onCloseFlapPanel?: () => void;\n };\n}\n"]}
|
|
@@ -746,14 +746,27 @@
|
|
|
746
746
|
"deactivate": "Deactivate",
|
|
747
747
|
"deactivate_message": "Elements deleted",
|
|
748
748
|
"deactivate_description": "{{count, number}}/{{total, number}} element for which you have permissions have been deleted. Others remain unchanged.",
|
|
749
|
+
"editAttribute": "Edit an attribute",
|
|
750
|
+
"editAttribute_description_one": "{{count, number}} element will be updated.",
|
|
751
|
+
"editAttribute_description_other": "{{total, number}} elements will be updated.",
|
|
752
|
+
"editAttribute_attribute_select_title": "Attribute to edit",
|
|
753
|
+
"editAttribute_attribute_select_placeholder": "Select an attribute",
|
|
754
|
+
"editAttribute_value_select_placeholder": "Select a value",
|
|
755
|
+
"editAttribute_value_occurrences_to_edit_one": "{{count, number}} element to edit",
|
|
756
|
+
"editAttribute_value_occurrences_to_edit_other": "{{count, number}} elements to edit",
|
|
757
|
+
"editAttribute_value_undefined": "Undefined",
|
|
758
|
+
"editAttribute_submit_notification_title": "Bulk edit request",
|
|
759
|
+
"editAttribute_submit_notification_description": "Your request to edit {{counter, number}} items has been received. You will be notified once the operation is complete.",
|
|
760
|
+
"editAttribute_submit_error": "An error occurred while requesting a bulk edit. Please contact an administrator.",
|
|
749
761
|
"export": "Export",
|
|
750
|
-
"
|
|
751
|
-
"
|
|
752
|
-
"
|
|
753
|
-
"
|
|
754
|
-
"export_error_description_one": "An error occurred while exporting the selected record.",
|
|
755
|
-
"export_error_description_other": "An error occurred while exporting the selected records.",
|
|
756
|
-
"
|
|
762
|
+
"export_message": "Export request",
|
|
763
|
+
"export_description_one": "Your request to export {{total, number}} item has been received. You will be notified as soon as the file is ready.",
|
|
764
|
+
"export_description_other": "Your request to export {{total, number}} items has been received. You will be notified as soon as the file is ready.",
|
|
765
|
+
"export_error_message": "Export error",
|
|
766
|
+
"export_error_description_one": "An error occurred while exporting the selected record. Please contact your administrator.",
|
|
767
|
+
"export_error_description_other": "An error occurred while exporting the selected records. Please contact your administrator.",
|
|
768
|
+
"export_config_error_message": "Export profile error",
|
|
769
|
+
"export_config_error_description": "No export profile is available for this library. Please contact your administrator.",
|
|
757
770
|
"add-link": "Add",
|
|
758
771
|
"replace-link": "Replace",
|
|
759
772
|
"toggle_selection": {
|
|
@@ -746,14 +746,27 @@
|
|
|
746
746
|
"deactivate": "Supprimer",
|
|
747
747
|
"deactivate_message": "Élements supprimés",
|
|
748
748
|
"deactivate_description": "{{count, number}}/{{total, number}} éléments pour lesquels vous disposez des permissions nécessaires ont été supprimés. Les autres éléments restent inchangés.",
|
|
749
|
+
"editAttribute": "Modifier un attribut",
|
|
750
|
+
"editAttribute_description_one": "{{count, number}} élément à modifier",
|
|
751
|
+
"editAttribute_description_other": "{{count, number}} éléments à modifier",
|
|
752
|
+
"editAttribute_attribute_select_title": "Attribut à modifier",
|
|
753
|
+
"editAttribute_attribute_select_placeholder": "Sélectionnez un attribut",
|
|
754
|
+
"editAttribute_value_select_placeholder": "Sélectionnez une valeur",
|
|
755
|
+
"editAttribute_value_occurrences_to_edit_one": "{{count, number}} élément à traiter",
|
|
756
|
+
"editAttribute_value_occurrences_to_edit_other": "{{count, number}} éléments à traiter",
|
|
757
|
+
"editAttribute_value_undefined": "Non défini",
|
|
758
|
+
"editAttribute_submit_notification_title": "Demande de modification en masse",
|
|
759
|
+
"editAttribute_submit_notification_description": "Votre demande de modification de {{counter, number}} éléments a bien été prise en compte. Vous serez notifié une fois l'opération terminée.",
|
|
760
|
+
"editAttribute_submit_error": "Une erreur est survenue lors de la demande d'une modification en masse. Veuillez contacter un administrateur.",
|
|
749
761
|
"export": "Exporter",
|
|
750
|
-
"
|
|
751
|
-
"
|
|
752
|
-
"
|
|
753
|
-
"
|
|
754
|
-
"export_error_description_one": "Une erreur s'est produite lors de l'
|
|
755
|
-
"export_error_description_other": "Une erreur s'est produite lors de l'
|
|
756
|
-
"
|
|
762
|
+
"export_message": "Demande d'export",
|
|
763
|
+
"export_description_one": "Votre demande d’export de {{total, number}} élément a bien été prise en compte. Vous recevrez une notification dès que le fichier sera prêt.",
|
|
764
|
+
"export_description_other": "Votre demande d’export de {{total, number}} éléments a bien été prise en compte. Vous recevrez une notification dès que le fichier sera prêt.",
|
|
765
|
+
"export_error_message": "Erreur d’export",
|
|
766
|
+
"export_error_description_one": "Une erreur s'est produite lors de l'export de l'enregistrements sélectionné. Veuillez contacter votre administrateur.",
|
|
767
|
+
"export_error_description_other": "Une erreur s'est produite lors de l'export des enregistrements sélectionnés. Veuillez contacter votre administrateur.",
|
|
768
|
+
"export_config_error_message": "Erreur de profil d’export",
|
|
769
|
+
"export_config_error_description": "Aucun profil d’export n’est disponible pour cette bibliothèque. Veuillez contacter votre administrateur.",
|
|
757
770
|
"add-link": "Ajouter",
|
|
758
771
|
"replace-link": "Remplacer",
|
|
759
772
|
"toggle_selection": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leav/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2-427ed078",
|
|
4
4
|
"description": "Shared React components and hooks",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepublishOnly": "yarn build",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/react-table": "7.7.12",
|
|
45
45
|
"@types/uuid": "^9",
|
|
46
46
|
"antd": "5.22.2",
|
|
47
|
-
"aristid-ds": "14.0.0-
|
|
47
|
+
"aristid-ds": "14.0.0-94337b1",
|
|
48
48
|
"babel-jest": "29.3.1",
|
|
49
49
|
"commander": "9.5.0",
|
|
50
50
|
"graphql": "16.12.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@ant-design/icons": ">=5.2",
|
|
67
67
|
"@apollo/client": ">=3.8.1",
|
|
68
68
|
"antd": "5.22.2",
|
|
69
|
-
"aristid-ds": "14.0.0-
|
|
69
|
+
"aristid-ds": "14.0.0-94337b1",
|
|
70
70
|
"dayjs": "^1.11.13",
|
|
71
71
|
"i18next": "22.5",
|
|
72
72
|
"react": "18.2.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@ckeditor/ckeditor5-react": "6.1.0",
|
|
82
82
|
"@dnd-kit/core": "6.1.0",
|
|
83
83
|
"@dnd-kit/sortable": "8.0.0",
|
|
84
|
-
"@leav/utils": "1.5.
|
|
84
|
+
"@leav/utils": "1.5.2",
|
|
85
85
|
"@uidotdev/usehooks": "2.4.1",
|
|
86
86
|
"dompurify": "3.2.4",
|
|
87
87
|
"html-react-parser": "4.2.2",
|