@leav/ui 1.6.0-720c24f0 → 1.6.0-a54099d3
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/_gqlTypes/index.d.ts +624 -701
- package/dist/_gqlTypes/index.js +46 -166
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/components/Explorer/Explorer.js +2 -2
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/TableCell.js +5 -7
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/TableNameCell.js +3 -2
- package/dist/components/Explorer/TableNameCell.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +7 -7
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js +3 -2
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js +3 -2
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.d.ts +10 -0
- package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.js +46 -0
- package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.js.map +1 -0
- package/dist/components/Explorer/actions-mass/export/content/NoProfiles.d.ts +1 -0
- package/dist/components/Explorer/actions-mass/export/content/NoProfiles.js +17 -0
- package/dist/components/Explorer/actions-mass/export/content/NoProfiles.js.map +1 -0
- package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.d.ts +8 -0
- package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.js +49 -0
- package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.js.map +1 -0
- package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.d.ts +27 -0
- package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.js +48 -0
- package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +3 -2
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +3 -2
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js +3 -2
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useExportMassAction.d.ts +7 -4
- package/dist/components/Explorer/actions-mass/useExportMassAction.js +80 -73
- package/dist/components/Explorer/actions-mass/useExportMassAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useMassActions.js +3 -2
- package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +3 -2
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +3 -2
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
- package/dist/components/Explorer/list-saved-views/SavedViews.js +4 -3
- package/dist/components/Explorer/list-saved-views/SavedViews.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +5 -8
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +3 -2
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +7 -6
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +3 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +4 -3
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js +3 -2
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +3 -2
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js +4 -3
- package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +3 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +7 -6
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +3 -2
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useSearchInput.js +6 -2
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Filters/context/filtersReducer.js +2 -3
- package/dist/components/Filters/context/filtersReducer.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/BooleanAttributeDropdown.js +23 -9
- package/dist/components/Filters/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/FilterDropDown.js +3 -2
- package/dist/components/Filters/filter-items/filter-type/FilterDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js +4 -3
- package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -4
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -2
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
- package/dist/components/Notifications/hooks/useNotificationSubscription.js +3 -2
- package/dist/components/Notifications/hooks/useNotificationSubscription.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js +5 -20
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +4 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +4 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +2 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +3 -2
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +4 -3
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js +3 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js.map +1 -1
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +3 -5
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
- package/dist/components/SelectTreeNode/TreeNodeTitle.js +3 -2
- package/dist/components/SelectTreeNode/TreeNodeTitle.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +1 -2
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -1
- package/dist/locales/en/shared.json +13 -2
- package/dist/locales/fr/shared.json +13 -2
- package/package.json +6 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTreeNodeModal.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"SelectTreeNodeModal.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE,MAAM,6BAA6B,GAAG,OAAO,CAAC;AAC9C,MAAM,4BAA4B,GAAG,OAAO,CAAC;AA8B7C,MAAM,CAAC,MAAM,mBAAmB,GAAiD,CAAC,EAC9E,KAAK,EACL,IAAI,EACJ,SAAS,EACT,aAAa,EACb,SAAS,EACT,OAAO,EACP,qCAAqC,EACrC,SAAS,GACZ,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAwB,EAAE,CAAC,CAAC;IAE9E,MAAM,eAAe,GAAsD,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC1F,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;YAC7B,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAClC,OAAO,EAAE,CAAC;YACV,OAAO;QACX,CAAC;QAED,IAAI,QAAQ,EAAE,CAAC;YACX,gBAAgB,CAAC,IA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AE,CAAC;gBACrC,GAAG,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;aACpD,EACD,qCAAqC,EAAE,qCAAqC,EAC5E,aAAa,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,EAC9F,QAAQ,EAAE,eAAe,GAC3B,GACK,CACd,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, useState} from 'react';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faCheck, faXmark} from '@fortawesome/free-solid-svg-icons';\nimport {KitButton, KitModal} from 'aristid-ds';\nimport {\n type ChildrenAsRecordValuePermissionFilterInput,\n type RecordFormAttributeTreeAttributeFragment,\n} from '_ui/_gqlTypes';\nimport {SelectTreeNode} from '_ui/components/SelectTreeNode';\nimport {type RecordFormElementsValueTreeValue} from '_ui/hooks/useGetRecordForm';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {type ITreeNodeWithRecord} from '_ui/types';\n\nconst SELECT_TREE_NODE_MODAL_HEIGHT = '563px';\nconst SELECT_TREE_NODE_MODAL_WIDTH = '656px';\n\ntype SelectTreeNodeModalBackendValue =\n | RecordFormElementsValueTreeValue\n | {\n treeValue: {\n id: string;\n };\n };\n\ntype SelectTreeNodeModalAttribute =\n | RecordFormAttributeTreeAttributeFragment\n | {\n multiple_values: boolean;\n linked_tree: {\n id: string;\n };\n };\n\ninterface ISelectTreeNodeModalProps {\n title: string;\n open: boolean;\n attribute: SelectTreeNodeModalAttribute;\n backendValues: SelectTreeNodeModalBackendValue[];\n onConfirm: (selectedNodes: ITreeNodeWithRecord[]) => void;\n onClose: () => void;\n childrenAsRecordValuePermissionFilter?: ChildrenAsRecordValuePermissionFilterInput;\n className?: string;\n}\n\nexport const SelectTreeNodeModal: FunctionComponent<ISelectTreeNodeModalProps> = ({\n title,\n open,\n attribute,\n backendValues,\n onConfirm,\n onClose,\n childrenAsRecordValuePermissionFilter,\n className,\n}) => {\n const {t} = useSharedTranslation();\n\n const [selectedNodes, setSelectedNodes] = useState<ITreeNodeWithRecord[]>([]);\n\n const _handleOnSelect: ComponentProps<typeof SelectTreeNode>['onSelect'] = (node, selected) => {\n if (!attribute.multiple_values) {\n onConfirm(selected ? [node] : []);\n onClose();\n return;\n }\n\n if (selected) {\n setSelectedNodes(prev => [...prev, node]);\n } else {\n setSelectedNodes(prev => prev.filter(selectedValue => selectedValue.id !== node.id));\n }\n };\n\n const _handleOnConfirm: ComponentProps<typeof KitButton>['onClick'] = () => {\n onConfirm(selectedNodes);\n onClose();\n };\n\n return (\n <KitModal\n appElement={document.getElementById('root')}\n className={className}\n showCloseIcon\n width={SELECT_TREE_NODE_MODAL_WIDTH}\n height={SELECT_TREE_NODE_MODAL_HEIGHT}\n title={title}\n isOpen={open}\n close={onClose}\n footer={\n <>\n <KitButton icon={<FontAwesomeIcon icon={faXmark} />} onClick={onClose}>\n {t('global.close')}\n </KitButton>\n {attribute.multiple_values && (\n <KitButton\n type=\"primary\"\n icon={<FontAwesomeIcon icon={faCheck} />}\n disabled={selectedNodes.length === 0}\n onClick={_handleOnConfirm}\n >\n {t('global.confirm')}\n </KitButton>\n )}\n </>\n }\n >\n <SelectTreeNode\n treeId={attribute.linked_tree.id}\n multiple // We want to be able to set as selected in the tree components, the nodes that are already selected and the disabled nodes\n selectedNodes={[\n ...selectedNodes.map(node => node.id),\n ...backendValues.map(value => value.treeValue.id),\n ]}\n childrenAsRecordValuePermissionFilter={childrenAsRecordValuePermissionFilter}\n disabledNodes={backendValues.map(value => value.treeValue.id).concat(attribute.linked_tree.id)}\n onSelect={_handleOnSelect}\n />\n </KitModal>\n );\n};\n"]}
|
package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { KitTooltip } from 'aristid-ds';
|
|
3
|
-
import {
|
|
3
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
4
|
+
import { faLayerGroup, faSquareRootAlt } from '@fortawesome/free-solid-svg-icons';
|
|
4
5
|
import styled from 'styled-components';
|
|
5
6
|
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
6
7
|
import { TOOLTIP_DEFAULT_DELAY_IN_SECONDS } from '../../../../../constants';
|
|
@@ -11,6 +12,6 @@ export const ComputeIndicator = ({ calculatedFlags, inheritedFlags }) => {
|
|
|
11
12
|
const { t } = useSharedTranslation();
|
|
12
13
|
const shouldDisplayComputedIcon = calculatedFlags.isCalculatedNotOverrideValues || inheritedFlags.isInheritedNotOverrideValues;
|
|
13
14
|
const shouldDisplayOverridedIcon = calculatedFlags.isCalculatedOverrideValues || inheritedFlags.isInheritedOverrideValues;
|
|
14
|
-
return (_jsxs(ComputeIndicatorWrapper, { children: [shouldDisplayComputedIcon && (_jsx(KitTooltip, { title: t('record_edition.calculated_value'), mouseEnterDelay: TOOLTIP_DEFAULT_DELAY_IN_SECONDS, children: _jsx(
|
|
15
|
+
return (_jsxs(ComputeIndicatorWrapper, { children: [shouldDisplayComputedIcon && (_jsx(KitTooltip, { title: t('record_edition.calculated_value'), mouseEnterDelay: TOOLTIP_DEFAULT_DELAY_IN_SECONDS, children: _jsx(FontAwesomeIcon, { icon: faSquareRootAlt }) })), shouldDisplayOverridedIcon && (_jsx(KitTooltip, { title: t('record_edition.overrided_value'), mouseEnterDelay: TOOLTIP_DEFAULT_DELAY_IN_SECONDS, children: _jsx(FontAwesomeIcon, { icon: faLayerGroup }) }))] }));
|
|
15
16
|
};
|
|
16
17
|
//# sourceMappingURL=ComputeIndicator.js.map
|
package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComputeIndicator.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AACtC,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ComputeIndicator.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AACtC,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAChF,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,gCAAgC,EAAC,MAAM,eAAe,CAAC;AAE/D,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEzC,CAAC;AAOF,MAAM,CAAC,MAAM,gBAAgB,GAA8C,CAAC,EAAC,eAAe,EAAE,cAAc,EAAC,EAAE,EAAE;IAC7G,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,yBAAyB,GAC3B,eAAe,CAAC,6BAA6B,IAAI,cAAc,CAAC,4BAA4B,CAAC;IACjG,MAAM,0BAA0B,GAC5B,eAAe,CAAC,0BAA0B,IAAI,cAAc,CAAC,yBAAyB,CAAC;IAE3F,OAAO,CACH,MAAC,uBAAuB,eACnB,yBAAyB,IAAI,CAC1B,KAAC,UAAU,IACP,KAAK,EAAE,CAAC,CAAC,iCAAiC,CAAC,EAC3C,eAAe,EAAE,gCAAgC,YAEjD,KAAC,eAAe,IAAC,IAAI,EAAE,eAAe,GAAI,GACjC,CAChB,EACA,0BAA0B,IAAI,CAC3B,KAAC,UAAU,IACP,KAAK,EAAE,CAAC,CAAC,gCAAgC,CAAC,EAC1C,eAAe,EAAE,gCAAgC,YAEjD,KAAC,eAAe,IAAC,IAAI,EAAE,YAAY,GAAI,GAC9B,CAChB,IACqB,CAC7B,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 FunctionComponent} from 'react';\nimport {type CalculatedFlags, type InheritedFlags} from './calculatedInheritedFlags';\nimport {KitTooltip} from 'aristid-ds';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faLayerGroup, faSquareRootAlt} from '@fortawesome/free-solid-svg-icons';\nimport styled from 'styled-components';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {TOOLTIP_DEFAULT_DELAY_IN_SECONDS} from '_ui/constants';\n\nconst ComputeIndicatorWrapper = styled.div`\n font-size: calc(var(--general-typography-fontSize7) * 1px);\n`;\n\ninterface IComputeIndicatorProps {\n calculatedFlags: CalculatedFlags;\n inheritedFlags: InheritedFlags;\n}\n\nexport const ComputeIndicator: FunctionComponent<IComputeIndicatorProps> = ({calculatedFlags, inheritedFlags}) => {\n const {t} = useSharedTranslation();\n\n const shouldDisplayComputedIcon =\n calculatedFlags.isCalculatedNotOverrideValues || inheritedFlags.isInheritedNotOverrideValues;\n const shouldDisplayOverridedIcon =\n calculatedFlags.isCalculatedOverrideValues || inheritedFlags.isInheritedOverrideValues;\n\n return (\n <ComputeIndicatorWrapper>\n {shouldDisplayComputedIcon && (\n <KitTooltip\n title={t('record_edition.calculated_value')}\n mouseEnterDelay={TOOLTIP_DEFAULT_DELAY_IN_SECONDS}\n >\n <FontAwesomeIcon icon={faSquareRootAlt} />\n </KitTooltip>\n )}\n {shouldDisplayOverridedIcon && (\n <KitTooltip\n title={t('record_edition.overrided_value')}\n mouseEnterDelay={TOOLTIP_DEFAULT_DELAY_IN_SECONDS}\n >\n <FontAwesomeIcon icon={faLayerGroup} />\n </KitTooltip>\n )}\n </ComputeIndicatorWrapper>\n );\n};\n"]}
|
|
@@ -5,7 +5,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
import { KitButton, KitTooltip } from 'aristid-ds';
|
|
8
|
-
import {
|
|
8
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
9
|
+
import { faExpand } from '@fortawesome/free-solid-svg-icons';
|
|
9
10
|
import PropertiesList from '../../PropertiesList';
|
|
10
11
|
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
11
12
|
import { useRecordInformations } from './useRecordInformations';
|
|
@@ -37,6 +38,6 @@ export const RecordInformations = ({ record, recordData }) => {
|
|
|
37
38
|
const [isFilePreviewModalOpen, setFilePreviewModalOpen] = useState(false);
|
|
38
39
|
const previewFile = record?.preview?.file;
|
|
39
40
|
const preview = record?.preview?.medium ? String(record?.preview?.medium) : null;
|
|
40
|
-
return (_jsxs(InformationsWrapper, { children: [_jsxs(PreviewWrapper, { children: [_jsx(EntityPreview, { label: record?.label ?? record?.id, color: record?.color, image: preview, imageStyle: { border: 'none' }, placeholderStyle: { height: '100%', width: 'fit-content', margin: 'auto', borderRadius: '0' }, style: { height: '100%', background: 'initial' }, tile: true }), previewFile !== undefined && (_jsx(KitTooltip, { title: t('record_summary.open_preview_modal'), mouseEnterDelay: TOOLTIP_DEFAULT_DELAY_IN_SECONDS, children: _jsx(ExpandImageButton, { "aria-label": t('record_summary.open_preview_modal'), type: "tertiary", icon: _jsx(
|
|
41
|
+
return (_jsxs(InformationsWrapper, { children: [_jsxs(PreviewWrapper, { children: [_jsx(EntityPreview, { label: record?.label ?? record?.id, color: record?.color, image: preview, imageStyle: { border: 'none' }, placeholderStyle: { height: '100%', width: 'fit-content', margin: 'auto', borderRadius: '0' }, style: { height: '100%', background: 'initial' }, tile: true }), previewFile !== undefined && (_jsx(KitTooltip, { title: t('record_summary.open_preview_modal'), mouseEnterDelay: TOOLTIP_DEFAULT_DELAY_IN_SECONDS, children: _jsx(ExpandImageButton, { "aria-label": t('record_summary.open_preview_modal'), type: "tertiary", icon: _jsx(FontAwesomeIcon, { icon: faExpand }), onClick: () => setFilePreviewModalOpen(true) }) }))] }), isFilePreviewModalOpen && (_jsx(FileModal, { open: isFilePreviewModalOpen, fileId: previewFile?.id, libraryId: previewFile?.library, onClose: () => setFilePreviewModalOpen(false) })), _jsx(ContentWrapper, { children: _jsx(PropertiesList, { items: recordInformations }) })] }));
|
|
41
42
|
};
|
|
42
43
|
//# sourceMappingURL=RecordInformations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordInformations.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAyB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEvD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,YAAY,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"RecordInformations.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAyB,QAAQ,EAAC,MAAM,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is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type FunctionComponent, useState} from 'react';\nimport {type IRecordIdentityWhoAmI} from '_ui/types';\nimport styled from 'styled-components';\nimport {KitButton, KitTooltip} from 'aristid-ds';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faExpand} from '@fortawesome/free-solid-svg-icons';\nimport PropertiesList from '../../PropertiesList';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {type GetRecordColumnsValuesRecord} from '_ui/_queries/records/getRecordColumnsValues';\nimport {useRecordInformations} from './useRecordInformations';\nimport FileModal from '_ui/components/RecordPreviewWithModal/FileModal';\nimport {EntityPreview} from '_ui/components/EntityPreview';\nimport {TOOLTIP_DEFAULT_DELAY_IN_SECONDS} from '_ui/constants';\n\ninterface IInformationsProps {\n record: IRecordIdentityWhoAmI;\n recordData: GetRecordColumnsValuesRecord;\n}\n\nconst InformationsWrapper = styled.div`\n margin-top: calc(var(--general-spacing-s) * 1px);\n`;\n\nconst PreviewWrapper = styled.div`\n position: relative;\n width: 100%;\n height: 162px;\n background-color: var(--general-colors-primary-50);\n border-radius: calc(var(--general-border-radius-s) * 1px);\n padding: calc(var(--general-spacing-xs) * 1px);\n`;\n\nconst ExpandImageButton = styled(KitButton)`\n position: absolute;\n right: 0;\n top: 0;\n`;\n\nconst ContentWrapper = styled.div`\n margin-top: calc(var(--general-spacing-s) * 1px);\n`;\n\nexport const RecordInformations: FunctionComponent<IInformationsProps> = ({record, recordData}) => {\n const {t} = useSharedTranslation();\n const recordInformations = useRecordInformations(record, recordData);\n const [isFilePreviewModalOpen, setFilePreviewModalOpen] = useState(false);\n\n const previewFile = record?.preview?.file;\n const preview = record?.preview?.medium ? String(record?.preview?.medium) : null;\n\n return (\n <InformationsWrapper>\n <PreviewWrapper>\n <EntityPreview\n label={record?.label ?? record?.id}\n color={record?.color}\n image={preview}\n imageStyle={{border: 'none'}}\n placeholderStyle={{height: '100%', width: 'fit-content', margin: 'auto', borderRadius: '0'}}\n style={{height: '100%', background: 'initial'}}\n tile\n />\n {previewFile !== undefined && (\n <KitTooltip\n title={t('record_summary.open_preview_modal')}\n mouseEnterDelay={TOOLTIP_DEFAULT_DELAY_IN_SECONDS}\n >\n <ExpandImageButton\n aria-label={t('record_summary.open_preview_modal')}\n type=\"tertiary\"\n icon={<FontAwesomeIcon icon={faExpand} />}\n onClick={() => setFilePreviewModalOpen(true)}\n />\n </KitTooltip>\n )}\n </PreviewWrapper>\n {isFilePreviewModalOpen && (\n <FileModal\n open={isFilePreviewModalOpen}\n fileId={previewFile?.id}\n libraryId={previewFile?.library}\n onClose={() => setFilePreviewModalOpen(false)}\n />\n )}\n <ContentWrapper>\n <PropertiesList items={recordInformations} />\n </ContentWrapper>\n </InformationsWrapper>\n );\n};\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { KitBadge, KitTabs, KitTree } from 'aristid-ds';
|
|
3
3
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
4
|
-
import {
|
|
4
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
5
|
+
import { faLayerGroup, faSquareRootAlt } from '@fortawesome/free-solid-svg-icons';
|
|
5
6
|
import styled from 'styled-components';
|
|
6
7
|
import { RecordHistory } from '../../../RecordHistory/RecordHistory';
|
|
7
8
|
const InformationsWrapper = styled.div `
|
|
@@ -55,7 +56,7 @@ export const ValuesSummary = ({ record, attributeId, globalValues = [], calculat
|
|
|
55
56
|
display: 'flex',
|
|
56
57
|
alignItems: 'center',
|
|
57
58
|
justifyContent: 'space-between',
|
|
58
|
-
}, children: [_jsxs("span", { children: [_jsx(
|
|
59
|
+
}, children: [_jsxs("span", { children: [_jsx(FontAwesomeIcon, { icon: faSquareRootAlt }), ' ', t('record_summary.calculated_value')] }), _jsx(KitBadge, { count: stripedCalculatedValues.length, color: "primary" })] })),
|
|
59
60
|
children: stripedCalculatedValues.length > 0
|
|
60
61
|
? stripedCalculatedValues.map((calculatedValue, index) => ({
|
|
61
62
|
key: `${calculatedValueKey}-${index}`,
|
|
@@ -74,7 +75,7 @@ export const ValuesSummary = ({ record, attributeId, globalValues = [], calculat
|
|
|
74
75
|
display: 'flex',
|
|
75
76
|
alignItems: 'center',
|
|
76
77
|
justifyContent: 'space-between',
|
|
77
|
-
}, children: [_jsxs("span", { children: [_jsx(
|
|
78
|
+
}, children: [_jsxs("span", { children: [_jsx(FontAwesomeIcon, { icon: faLayerGroup }), ' ', t('record_summary.global')] }), _jsx(KitBadge, { count: stripedGlobalValues.length, color: "primary" })] })),
|
|
78
79
|
children: stripedGlobalValues.length > 0
|
|
79
80
|
? stripedGlobalValues.map((value, index) => ({
|
|
80
81
|
key: `${globalValueKey}-${index}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValuesSummary.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,aAAa,EAAC,MAAM,sCAAsC,CAAC;AAEnE,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAErC,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIzC,CAAC;AASF,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,8FAA8F;AAC9F,MAAM,SAAS,GAAG,CAAC,IAAY,EAAU,EAAE;IAC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OAAO,EAAE,MAAM;4CACf,UAAU,EAAE,QAAQ;4CACpB,cAAc,EAAE,eAAe;yCAClC,aAED,2BACI,KAAC,YAAY,KAAG,OAAE,CAAC,CAAC,uBAAuB,CAAC,IACzC,EACP,KAAC,QAAQ,IAAC,KAAK,EAAE,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAC,SAAS,GAAG,IAC7D,CACT;oCACD,QAAQ,EACJ,mBAAmB,CAAC,MAAM,GAAG,CAAC;wCAC1B,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;4CACvC,GAAG,EAAE,GAAG,cAAc,IAAI,KAAK,EAAE;4CACjC,KAAK,EAAE,KAAK;yCACf,CAAC,CAAC;wCACL,CAAC,CAAC;4CACI;gDACI,GAAG,EAAE,GAAG,cAAc,IAAI,CAAC,EAAE;gDAC7B,KAAK,EAAE,sBAAI,CAAC,CAAC,yBAAyB,CAAC,GAAK;6CAC/C;yCACJ;iCACd;6BACJ,GACH,GACgB,CACzB;iBACJ;gBACD;oBACI,GAAG,EAAE,SAAS;oBACd,KAAK,EAAE,CAAC,CAAC,wBAAwB,CAAC;oBAClC,UAAU,EAAE,KAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAI;iBAC1E;aACJ,GACH,GACoB,CAC7B,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,aAAa,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 FunctionComponent} from 'react';\nimport {type RecordFormElementsValueStandardValue} from '_ui/hooks/useGetRecordForm';\nimport {KitBadge, KitTabs, KitTree} from 'aristid-ds';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {FaLayerGroup, FaSquareRootAlt} from 'react-icons/fa';\nimport styled from 'styled-components';\nimport {type IRecordIdentityWhoAmI} from '_ui/types';\nimport {RecordHistory} from '../../../RecordHistory/RecordHistory';\n\nconst InformationsWrapper = styled.div`\n margin-top: calc(var(--general-spacing-s) * 1px);\n`;\n\nconst StyledDivContentWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n`;\n\ninterface IValuesSummaryProps {\n record: IRecordIdentityWhoAmI | null;\n attributeId: string;\n globalValues?: Array<RecordFormElementsValueStandardValue['payload']>;\n calculatedValues?: Array<RecordFormElementsValueStandardValue['payload']>;\n}\n\nconst calculatedValueKey = '0';\nconst globalValueKey = '1';\n\n// https://stackoverflow.com/questions/822452/strip-html-tags-from-text-using-plain-javascript\nconst stripHtml = (html: string): string => {\n const doc = new DOMParser().parseFromString(html, 'text/html');\n return doc.body.textContent || '';\n};\n\nconst _isDateRangeValue = (value: any): value is {from: string; to: string} =>\n !!value && typeof value === 'object' && 'from' in value && 'to' in value;\n\nexport const ValuesSummary: FunctionComponent<IValuesSummaryProps> = ({\n record,\n attributeId,\n globalValues = [],\n calculatedValues = [],\n}) => {\n const {t} = useSharedTranslation();\n\n const stringifyValue = (value: RecordFormElementsValueStandardValue['payload']): string => {\n if (typeof value === 'string') {\n return stripHtml(value);\n }\n\n if (typeof value === 'boolean') {\n return value ? t('global.yes') : t('global.no');\n }\n\n if (_isDateRangeValue(value)) {\n return t('record_edition.date_range_value', {\n from: value.from,\n to: value.to,\n interpolation: {\n escapeValue: false,\n },\n });\n }\n\n return value;\n };\n\n const stripedGlobalValues = globalValues.map(stringifyValue);\n const stripedCalculatedValues = calculatedValues.map(stringifyValue);\n\n return (\n <StyledDivContentWrapper>\n <KitTabs\n items={[\n {\n key: 'version_values',\n label: t('record_summary.values_version'),\n tabContent: (\n <InformationsWrapper>\n <KitTree\n defaultExpandAll\n selectedKeys={\n calculatedValues.length > 0 && globalValues.length === 0\n ? [calculatedValueKey]\n : [globalValueKey]\n }\n treeData={[\n {\n key: calculatedValueKey,\n title: (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <span>\n <FaSquareRootAlt /> {t('record_summary.calculated_value')}\n </span>\n <KitBadge count={stripedCalculatedValues.length} color=\"primary\" />\n </div>\n ),\n children:\n stripedCalculatedValues.length > 0\n ? stripedCalculatedValues.map((calculatedValue, index) => ({\n key: `${calculatedValueKey}-${index}`,\n title: calculatedValue,\n }))\n : [\n {\n key: `${calculatedValueKey}-${0}`,\n title: <i>{t('record_summary.no_value')}</i>,\n },\n ],\n },\n {\n key: globalValueKey,\n title: (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <span>\n <FaLayerGroup /> {t('record_summary.global')}\n </span>\n <KitBadge count={stripedGlobalValues.length} color=\"primary\" />\n </div>\n ),\n children:\n stripedGlobalValues.length > 0\n ? stripedGlobalValues.map((value, index) => ({\n key: `${globalValueKey}-${index}`,\n title: value,\n }))\n : [\n {\n key: `${globalValueKey}-${0}`,\n title: <i>{t('record_summary.no_value')}</i>,\n },\n ],\n },\n ]}\n />\n </InformationsWrapper>\n ),\n },\n {\n key: 'history',\n label: t('record_summary.history'),\n tabContent: <RecordHistory record={record} attributeId={attributeId} />,\n },\n ]}\n />\n </StyledDivContentWrapper>\n );\n};\n\nexport default ValuesSummary;\n"]}
|
|
1
|
+
{"version":3,"file":"ValuesSummary.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAChF,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,E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GACoB,CAC7B,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,aAAa,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 FunctionComponent} from 'react';\nimport {type RecordFormElementsValueStandardValue} from '_ui/hooks/useGetRecordForm';\nimport {KitBadge, KitTabs, KitTree} from 'aristid-ds';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faLayerGroup, faSquareRootAlt} from '@fortawesome/free-solid-svg-icons';\nimport styled from 'styled-components';\nimport {type IRecordIdentityWhoAmI} from '_ui/types';\nimport {RecordHistory} from '../../../RecordHistory/RecordHistory';\n\nconst InformationsWrapper = styled.div`\n margin-top: calc(var(--general-spacing-s) * 1px);\n`;\n\nconst StyledDivContentWrapper = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n`;\n\ninterface IValuesSummaryProps {\n record: IRecordIdentityWhoAmI | null;\n attributeId: string;\n globalValues?: Array<RecordFormElementsValueStandardValue['payload']>;\n calculatedValues?: Array<RecordFormElementsValueStandardValue['payload']>;\n}\n\nconst calculatedValueKey = '0';\nconst globalValueKey = '1';\n\n// https://stackoverflow.com/questions/822452/strip-html-tags-from-text-using-plain-javascript\nconst stripHtml = (html: string): string => {\n const doc = new DOMParser().parseFromString(html, 'text/html');\n return doc.body.textContent || '';\n};\n\nconst _isDateRangeValue = (value: any): value is {from: string; to: string} =>\n !!value && typeof value === 'object' && 'from' in value && 'to' in value;\n\nexport const ValuesSummary: FunctionComponent<IValuesSummaryProps> = ({\n record,\n attributeId,\n globalValues = [],\n calculatedValues = [],\n}) => {\n const {t} = useSharedTranslation();\n\n const stringifyValue = (value: RecordFormElementsValueStandardValue['payload']): string => {\n if (typeof value === 'string') {\n return stripHtml(value);\n }\n\n if (typeof value === 'boolean') {\n return value ? t('global.yes') : t('global.no');\n }\n\n if (_isDateRangeValue(value)) {\n return t('record_edition.date_range_value', {\n from: value.from,\n to: value.to,\n interpolation: {\n escapeValue: false,\n },\n });\n }\n\n return value;\n };\n\n const stripedGlobalValues = globalValues.map(stringifyValue);\n const stripedCalculatedValues = calculatedValues.map(stringifyValue);\n\n return (\n <StyledDivContentWrapper>\n <KitTabs\n items={[\n {\n key: 'version_values',\n label: t('record_summary.values_version'),\n tabContent: (\n <InformationsWrapper>\n <KitTree\n defaultExpandAll\n selectedKeys={\n calculatedValues.length > 0 && globalValues.length === 0\n ? [calculatedValueKey]\n : [globalValueKey]\n }\n treeData={[\n {\n key: calculatedValueKey,\n title: (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <span>\n <FontAwesomeIcon icon={faSquareRootAlt} />{' '}\n {t('record_summary.calculated_value')}\n </span>\n <KitBadge count={stripedCalculatedValues.length} color=\"primary\" />\n </div>\n ),\n children:\n stripedCalculatedValues.length > 0\n ? stripedCalculatedValues.map((calculatedValue, index) => ({\n key: `${calculatedValueKey}-${index}`,\n title: calculatedValue,\n }))\n : [\n {\n key: `${calculatedValueKey}-${0}`,\n title: <i>{t('record_summary.no_value')}</i>,\n },\n ],\n },\n {\n key: globalValueKey,\n title: (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <span>\n <FontAwesomeIcon icon={faLayerGroup} />{' '}\n {t('record_summary.global')}\n </span>\n <KitBadge count={stripedGlobalValues.length} color=\"primary\" />\n </div>\n ),\n children:\n stripedGlobalValues.length > 0\n ? stripedGlobalValues.map((value, index) => ({\n key: `${globalValueKey}-${index}`,\n title: value,\n }))\n : [\n {\n key: `${globalValueKey}-${0}`,\n title: <i>{t('record_summary.no_value')}</i>,\n },\n ],\n },\n ]}\n />\n </InformationsWrapper>\n ),\n },\n {\n key: 'history',\n label: t('record_summary.history'),\n tabContent: <RecordHistory record={record} attributeId={attributeId} />,\n },\n ]}\n />\n </StyledDivContentWrapper>\n );\n};\n\nexport default ValuesSummary;\n"]}
|
|
@@ -3,7 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { CloseOutlined } from '@ant-design/icons';
|
|
6
|
-
import {
|
|
6
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
|
+
import { faUndo } from '@fortawesome/free-solid-svg-icons';
|
|
7
8
|
import styled from 'styled-components';
|
|
8
9
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
9
10
|
import { themeVars } from '../../../../antdTheme';
|
|
@@ -53,7 +54,7 @@ function ValuesVersions() {
|
|
|
53
54
|
valuesVersion: state.originValuesVersion,
|
|
54
55
|
});
|
|
55
56
|
};
|
|
56
|
-
return (_jsxs(Wrapper, { children: [_jsxs(Header, { children: [_jsx("span", { children: t('values_version.title') }), _jsxs("span", { children: [!isInCreation && (_jsx(BasicButton, { title: t('values_version.reset'), shape: "circle", centered: true, icon: _jsx(
|
|
57
|
+
return (_jsxs(Wrapper, { children: [_jsxs(Header, { children: [_jsx("span", { children: t('values_version.title') }), _jsxs("span", { children: [!isInCreation && (_jsx(BasicButton, { title: t('values_version.reset'), shape: "circle", centered: true, icon: _jsx(FontAwesomeIcon, { icon: faUndo }), onClick: _handleClickReset })), _jsx(CloseButton, { onClick: _handleClosePanel })] })] }), _jsx(ValuesVersionConfigurator, { libraryId: state.libraryId, selectedVersion: state.valuesVersion, onVersionChange: _handleVersionChange, readOnly: isInCreation })] }));
|
|
57
58
|
}
|
|
58
59
|
export default ValuesVersions;
|
|
59
60
|
//# sourceMappingURL=ValuesVersions.js.map
|
package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValuesVersions.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,MAAM,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ValuesVersions.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,MAAM,EAAC,MAAM,mCAAmC,CAAC;AACzD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,yBAAyB,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAC,6BAA6B,EAAC,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAC,oBAAoB,EAAC,MAAM,8CAA8C,CAAC;AAElF,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIzB,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;wBACD,SAAS,CAAC,QAAQ;;;;;;+BAMX,SAAS,CAAC,gBAAgB;CACxD,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;;;;;CAKxC,CAAC;AAEF,SAAS,cAAc;IACnB,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAA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 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 {CloseOutlined} from '@ant-design/icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faUndo} from '@fortawesome/free-solid-svg-icons';\nimport styled from 'styled-components';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {themeVars} from '../../../../antdTheme';\nimport {type IValueVersion} from '../../../../types/values';\nimport {BasicButton} from '../../../BasicButton';\nimport ValuesVersionConfigurator from '../../../ValuesVersionConfigurator';\nimport {EditRecordReducerActionsTypes} from '../../editRecordReducer/editRecordReducer';\nimport {useEditRecordReducer} from '../../editRecordReducer/useEditRecordReducer';\n\nconst Wrapper = styled.div`\n display: grid;\n grid-template-rows: 3em 1fr 3em;\n height: 100%;\n`;\n\nconst Header = styled.div`\n background-color: ${themeVars.headerBg};\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.3rem 0.3rem 0.3rem 1rem;\n font-weight: 700;\n border-bottom: 1px solid ${themeVars.borderLightColor};\n`;\n\nconst CloseButton = styled(CloseOutlined)`\n cursor: pointer;\n background: none;\n box-shadow: none;\n margin: 0.5rem;\n`;\n\nfunction ValuesVersions(): JSX.Element {\n const {t} = useSharedTranslation();\n const {state, dispatch} = useEditRecordReducer();\n const isInCreation = !state?.record;\n\n const _handleVersionChange = (version: IValueVersion) => {\n dispatch({\n type: EditRecordReducerActionsTypes.SET_VALUES_VERSION,\n valuesVersion: version,\n });\n };\n\n const _handleClosePanel = () => {\n dispatch({\n type: EditRecordReducerActionsTypes.SET_SIDEBAR_IS_OPEN,\n isOpen: !state.isOpenSidebar,\n });\n };\n\n const _handleClickReset = () => {\n dispatch({\n type: EditRecordReducerActionsTypes.SET_VALUES_VERSION,\n valuesVersion: state.originValuesVersion,\n });\n };\n\n return (\n <Wrapper>\n <Header>\n <span>{t('values_version.title')}</span>\n <span>\n {!isInCreation && (\n <BasicButton\n title={t('values_version.reset')}\n shape=\"circle\"\n centered\n icon={<FontAwesomeIcon icon={faUndo} />}\n onClick={_handleClickReset}\n />\n )}\n <CloseButton onClick={_handleClosePanel} />\n </span>\n </Header>\n <ValuesVersionConfigurator\n libraryId={state.libraryId}\n selectedVersion={state.valuesVersion}\n onVersionChange={_handleVersionChange}\n readOnly={isInCreation}\n />\n </Wrapper>\n );\n}\n\nexport default ValuesVersions;\n"]}
|
|
@@ -5,10 +5,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { useRef } from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
7
|
import { closeKitSnackBar, KitButton, KitSpace, AntModal } from 'aristid-ds';
|
|
8
|
-
// TODO: harmonize icon sources
|
|
9
8
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
10
|
-
import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
11
|
-
import { FaExchangeAlt, FaEye, FaPlus } from 'react-icons/fa';
|
|
9
|
+
import { faExchangeAlt, faEye, faPlus, faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
12
10
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
13
11
|
import { RecordFilterCondition, useExplorerSelectionIdsLazyQuery, } from '../../_gqlTypes';
|
|
14
12
|
import { Explorer } from '../../components/Explorer';
|
|
@@ -74,7 +72,7 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
|
|
|
74
72
|
? t('explorer.massAction.replace-link')
|
|
75
73
|
: t('explorer.massAction.add-link'),
|
|
76
74
|
deselectAll: true,
|
|
77
|
-
icon: replacementMode ? _jsx(
|
|
75
|
+
icon: replacementMode ? (_jsx(FontAwesomeIcon, { icon: faExchangeAlt })) : (_jsx(FontAwesomeIcon, { icon: faPlus })),
|
|
78
76
|
callback: async (massSelectionFilter) => {
|
|
79
77
|
await getRecordIdsFromFilters({
|
|
80
78
|
variables: {
|
|
@@ -107,7 +105,7 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
|
|
|
107
105
|
: {}, primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], itemActions: [
|
|
108
106
|
{
|
|
109
107
|
label: t('explorer.edit-item'),
|
|
110
|
-
icon: _jsx(
|
|
108
|
+
icon: _jsx(FontAwesomeIcon, { icon: faEye }),
|
|
111
109
|
useItemActionOnRowClick: true,
|
|
112
110
|
callback: item => {
|
|
113
111
|
openEditRecordModal({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,MAAM,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE3E,+BAA+B;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAGH,qBAAqB,EACrB,gCAAgC,GACnC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAC,MAAM,qDAAqD,CAAC;AAEvF,MAAM,aAAa,GAAG,IAAK,CAAC;AAE5B,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;;qBAGf,aAAa;;;;;;;;;;;;;;;;;;;CAmBjC,CAAC;AAEF,MAAM,oBAA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wDACtC,KAAK,EAAE,KAAK,CAAC,MAAM;qDACtB;iDACJ;6CACJ;yCACJ,CAAC,CAAC;oCACP,CAAC;iCACJ;6BACJ;4BACH,CAAC,CAAC,EAAE,EAEZ,cAAc,EAAE,EAAE,EAClB,qBAAqB,EAAE,EAAE,EACzB,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE;4BACT;gCACI,KAAK,EAAE,CAAC,CAAC,oBAAoB,CAAC;gCAC9B,IAAI,EAAE,KAAC,KAAK,KAAG;gCACf,uBAAuB,EAAE,IAAI;gCAC7B,QAAQ,EAAE,IAAI,CAAC,EAAE;oCACb,mBAAmB,CAAC;wCAChB,OAAO,EAAE,IAAI,CAAC,SAAS;wCACvB,MAAM,EAAE;4CACJ,EAAE,EAAE,IAAI,CAAC,MAAM;4CACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK;4CACzB,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ;4CAC/B,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK;4CACzB,OAAO,EAAE,EAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAC;yCAChC;wCACD,aAAa,EAAE,SAAS;qCAC3B,CAAC,CAAC;gCACP,CAAC;6BACJ;yBACJ,EACD,qBAAqB,EAAE,CAAC,QAAQ,CAAC,EACjC,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,QACV,mBAAmB,SACrB,EACD,eAAe,IAEmB,GACtB,GACX,CACjB,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, useRef} from 'react';\nimport styled from 'styled-components';\nimport {closeKitSnackBar, KitButton, KitSpace, AntModal} from 'aristid-ds';\n\n// TODO: harmonize icon sources\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faXmark} from '@fortawesome/free-solid-svg-icons';\nimport {FaExchangeAlt, FaEye, FaPlus} from 'react-icons/fa';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {\n type ExplorerSelectionIdsQuery,\n type JoinLibraryContextFragment,\n RecordFilterCondition,\n useExplorerSelectionIdsLazyQuery,\n} from '_ui/_gqlTypes';\nimport {Explorer} from '_ui/components/Explorer';\nimport {useEditRecordModal} from '../RecordEdition/EditRecordModal/useEditRecordModal';\n\nconst modalMaxWidth = 1_200;\n\nconst StyledModal = styled(AntModal)`\n && {\n width: 90vw;\n max-width: ${modalMaxWidth}px;\n\n .ant-modal-body {\n height: 80vh;\n overflow-y: auto;\n }\n\n .ant-modal-content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n }\n\n .ant-modal-footer {\n flex: 0 0 auto;\n margin-top: 0;\n }\n }\n`;\n\nconst ModalFooterStyledDiv = styled.div`\n display: flex;\n justify-content: flex-end;\n padding: calc(var(--general-spacing-xs) * 1px) calc(var(--general-spacing-s) * 1px);\n border-top: 1px solid var(--general-utilities-border);\n`;\n\nconst ModalMainStyledDiv = styled.div`\n padding: calc(var(--general-spacing-m) * 1px);\n height: 100%;\n position: relative;\n`;\n\ninterface ISelectRecordForLinkModalProps {\n className?: string;\n open: boolean;\n childLibraryId: string;\n replacementMode: boolean;\n valuesList?: string[];\n allowFreeEntry: boolean;\n joinLibraryContext?: JoinLibraryContextFragment;\n selectionMode: ComponentProps<typeof Explorer>['selectionMode'];\n hideSelectAllAction: ComponentProps<typeof Explorer>['hideSelectAllAction'];\n isMultivalue: boolean;\n onSelectionCompleted: (data: ExplorerSelectionIdsQuery) => void;\n onClose: () => void;\n}\n\nexport const SelectRecordForLinkModal: FunctionComponent<ISelectRecordForLinkModalProps> = ({\n className,\n open,\n childLibraryId,\n replacementMode,\n valuesList,\n allowFreeEntry,\n selectionMode,\n joinLibraryContext,\n hideSelectAllAction,\n isMultivalue,\n onSelectionCompleted,\n onClose,\n}) => {\n const {t} = useSharedTranslation();\n const explorerContainerRef = useRef<HTMLDivElement>(null);\n\n const _handleClose: ComponentProps<typeof KitButton>['onClick'] = () => {\n closeKitSnackBar();\n onClose();\n };\n\n const _closeButtonLabel: ComponentProps<typeof KitButton>['aria-label'] = String(t('global.close'));\n\n const _footer: ComponentProps<typeof AntModal>['footer'] = (\n <ModalFooterStyledDiv>\n <KitSpace>\n <KitButton\n aria-label={_closeButtonLabel}\n key=\"close\"\n icon={<FontAwesomeIcon icon={faXmark} />}\n onClick={_handleClose}\n >\n {_closeButtonLabel}\n </KitButton>\n </KitSpace>\n </ModalFooterStyledDiv>\n );\n\n const [getRecordIdsFromFilters] = useExplorerSelectionIdsLazyQuery({\n fetchPolicy: 'no-cache',\n onCompleted: onSelectionCompleted,\n });\n\n const {EditRecordModal, openEditRecordModal} = useEditRecordModal();\n\n return (\n <StyledModal\n className={className}\n open={open}\n onCancel={_handleClose}\n destroyOnClose\n closable={false}\n cancelText={t('global.cancel')}\n width=\"90vw\"\n centered\n footer={_footer}\n >\n <ModalMainStyledDiv ref={explorerContainerRef}>\n <Explorer.EditSettingsContextProvider\n panelElement={() => explorerContainerRef.current ?? document.body}\n >\n <Explorer\n title=\"SelectRecordForLinkModal\"\n entrypoint={{\n type: 'library',\n libraryId: childLibraryId,\n valuesList,\n allowFreeEntry,\n }}\n showCreateOnNoResultOnly\n selectionMode={selectionMode}\n hideSelectAllAction={hideSelectAllAction}\n massActions={\n isMultivalue\n ? [\n {\n label: replacementMode\n ? t('explorer.massAction.replace-link')\n : t('explorer.massAction.add-link'),\n deselectAll: true,\n icon: replacementMode ? <FaExchangeAlt /> : <FaPlus />,\n callback: async massSelectionFilter => {\n await getRecordIdsFromFilters({\n variables: {\n libraryId: childLibraryId,\n filters: massSelectionFilter,\n },\n });\n },\n },\n ]\n : []\n }\n defaultCallbacks={\n !isMultivalue\n ? {\n item: {\n select: async items => {\n await getRecordIdsFromFilters({\n variables: {\n libraryId: childLibraryId,\n filters: [\n {\n field: 'id',\n condition: RecordFilterCondition.EQUAL,\n value: items.itemId,\n },\n ],\n },\n });\n },\n },\n }\n : {}\n }\n primaryActions={[]}\n defaultActionsForItem={[]}\n defaultMassActions={[]}\n itemActions={[\n {\n label: t('explorer.edit-item'),\n icon: <FaEye />,\n useItemActionOnRowClick: true,\n callback: item => {\n openEditRecordModal({\n library: item.libraryId,\n record: {\n id: item.itemId,\n label: item.whoAmI?.label,\n subLabel: item.whoAmI?.subLabel,\n color: item.whoAmI?.color,\n library: {id: item.libraryId},\n },\n editionFormId: 'edition',\n });\n },\n },\n ]}\n defaultPrimaryActions={['create']}\n joinLibraryContext={joinLibraryContext}\n showSearch\n ignoreViewByDefault\n />\n {EditRecordModal}\n {/* TODO: avoid getting last view for user */}\n </Explorer.EditSettingsContextProvider>\n </ModalMainStyledDiv>\n </StyledModal>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,MAAM,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAC,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAGH,qBAAqB,EACrB,gCAAgC,GACnC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAC,MAAM,qDAA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utions 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, useRef} from 'react';\nimport styled from 'styled-components';\nimport {closeKitSnackBar, KitButton, KitSpace, AntModal} from 'aristid-ds';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faExchangeAlt, faEye, faPlus, faXmark} from '@fortawesome/free-solid-svg-icons';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {\n type ExplorerSelectionIdsQuery,\n type JoinLibraryContextFragment,\n RecordFilterCondition,\n useExplorerSelectionIdsLazyQuery,\n} from '_ui/_gqlTypes';\nimport {Explorer} from '_ui/components/Explorer';\nimport {useEditRecordModal} from '../RecordEdition/EditRecordModal/useEditRecordModal';\n\nconst modalMaxWidth = 1_200;\n\nconst StyledModal = styled(AntModal)`\n && {\n width: 90vw;\n max-width: ${modalMaxWidth}px;\n\n .ant-modal-body {\n height: 80vh;\n overflow-y: auto;\n }\n\n .ant-modal-content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n }\n\n .ant-modal-footer {\n flex: 0 0 auto;\n margin-top: 0;\n }\n }\n`;\n\nconst ModalFooterStyledDiv = styled.div`\n display: flex;\n justify-content: flex-end;\n padding: calc(var(--general-spacing-xs) * 1px) calc(var(--general-spacing-s) * 1px);\n border-top: 1px solid var(--general-utilities-border);\n`;\n\nconst ModalMainStyledDiv = styled.div`\n padding: calc(var(--general-spacing-m) * 1px);\n height: 100%;\n position: relative;\n`;\n\ninterface ISelectRecordForLinkModalProps {\n className?: string;\n open: boolean;\n childLibraryId: string;\n replacementMode: boolean;\n valuesList?: string[];\n allowFreeEntry: boolean;\n joinLibraryContext?: JoinLibraryContextFragment;\n selectionMode: ComponentProps<typeof Explorer>['selectionMode'];\n hideSelectAllAction: ComponentProps<typeof Explorer>['hideSelectAllAction'];\n isMultivalue: boolean;\n onSelectionCompleted: (data: ExplorerSelectionIdsQuery) => void;\n onClose: () => void;\n}\n\nexport const SelectRecordForLinkModal: FunctionComponent<ISelectRecordForLinkModalProps> = ({\n className,\n open,\n childLibraryId,\n replacementMode,\n valuesList,\n allowFreeEntry,\n selectionMode,\n joinLibraryContext,\n hideSelectAllAction,\n isMultivalue,\n onSelectionCompleted,\n onClose,\n}) => {\n const {t} = useSharedTranslation();\n const explorerContainerRef = useRef<HTMLDivElement>(null);\n\n const _handleClose: ComponentProps<typeof KitButton>['onClick'] = () => {\n closeKitSnackBar();\n onClose();\n };\n\n const _closeButtonLabel: ComponentProps<typeof KitButton>['aria-label'] = String(t('global.close'));\n\n const _footer: ComponentProps<typeof AntModal>['footer'] = (\n <ModalFooterStyledDiv>\n <KitSpace>\n <KitButton\n aria-label={_closeButtonLabel}\n key=\"close\"\n icon={<FontAwesomeIcon icon={faXmark} />}\n onClick={_handleClose}\n >\n {_closeButtonLabel}\n </KitButton>\n </KitSpace>\n </ModalFooterStyledDiv>\n );\n\n const [getRecordIdsFromFilters] = useExplorerSelectionIdsLazyQuery({\n fetchPolicy: 'no-cache',\n onCompleted: onSelectionCompleted,\n });\n\n const {EditRecordModal, openEditRecordModal} = useEditRecordModal();\n\n return (\n <StyledModal\n className={className}\n open={open}\n onCancel={_handleClose}\n destroyOnClose\n closable={false}\n cancelText={t('global.cancel')}\n width=\"90vw\"\n centered\n footer={_footer}\n >\n <ModalMainStyledDiv ref={explorerContainerRef}>\n <Explorer.EditSettingsContextProvider\n panelElement={() => explorerContainerRef.current ?? document.body}\n >\n <Explorer\n title=\"SelectRecordForLinkModal\"\n entrypoint={{\n type: 'library',\n libraryId: childLibraryId,\n valuesList,\n allowFreeEntry,\n }}\n showCreateOnNoResultOnly\n selectionMode={selectionMode}\n hideSelectAllAction={hideSelectAllAction}\n massActions={\n isMultivalue\n ? [\n {\n label: replacementMode\n ? t('explorer.massAction.replace-link')\n : t('explorer.massAction.add-link'),\n deselectAll: true,\n icon: replacementMode ? (\n <FontAwesomeIcon icon={faExchangeAlt} />\n ) : (\n <FontAwesomeIcon icon={faPlus} />\n ),\n callback: async massSelectionFilter => {\n await getRecordIdsFromFilters({\n variables: {\n libraryId: childLibraryId,\n filters: massSelectionFilter,\n },\n });\n },\n },\n ]\n : []\n }\n defaultCallbacks={\n !isMultivalue\n ? {\n item: {\n select: async items => {\n await getRecordIdsFromFilters({\n variables: {\n libraryId: childLibraryId,\n filters: [\n {\n field: 'id',\n condition: RecordFilterCondition.EQUAL,\n value: items.itemId,\n },\n ],\n },\n });\n },\n },\n }\n : {}\n }\n primaryActions={[]}\n defaultActionsForItem={[]}\n defaultMassActions={[]}\n itemActions={[\n {\n label: t('explorer.edit-item'),\n icon: <FontAwesomeIcon icon={faEye} />,\n useItemActionOnRowClick: true,\n callback: item => {\n openEditRecordModal({\n library: item.libraryId,\n record: {\n id: item.itemId,\n label: item.whoAmI?.label,\n subLabel: item.whoAmI?.subLabel,\n color: item.whoAmI?.color,\n library: {id: item.libraryId},\n },\n editionFormId: 'edition',\n });\n },\n },\n ]}\n defaultPrimaryActions={['create']}\n joinLibraryContext={joinLibraryContext}\n showSearch\n ignoreViewByDefault\n />\n {EditRecordModal}\n {/* TODO: avoid getting last view for user */}\n </Explorer.EditSettingsContextProvider>\n </ModalMainStyledDiv>\n </StyledModal>\n );\n};\n"]}
|
|
@@ -4,7 +4,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { KitButton, KitTag, KitTypography } from 'aristid-ds';
|
|
7
|
-
import {
|
|
7
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
8
|
+
import { faCheck } from '@fortawesome/free-solid-svg-icons';
|
|
8
9
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
9
10
|
import styled from 'styled-components';
|
|
10
11
|
const TreeNodeLine = styled.div `
|
|
@@ -34,7 +35,7 @@ export const TreeNodeTitle = ({ checkable, disabledNodes, loadRecursively, node,
|
|
|
34
35
|
onSelect(child, buttonInSelectMode);
|
|
35
36
|
});
|
|
36
37
|
};
|
|
37
|
-
return (_jsxs(TreeNodeLine, { onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), children: [_jsxs(TreeNodeLineSection, { children: [_jsx(KitTypography.Text, { size: "fontSize5", disabled: isDisabled, children: node.title }), _jsx(SelectedChildrenCount, { node: node, selectedNodes: selectedNodes, loadRecursively: loadRecursively })] }), _jsxs(TreeNodeLineSection, { children: [showSelectChildrenButton && node.children.length > 0 && hover && (_jsx(KitButton, { size: "s", onClick: e => handleChildrenSelection(e), children: t(`tree-node-selection.${buttonInSelectMode ? 'select_children' : 'unselect_children'}`) })), !checkable && isSelected && (_jsx(
|
|
38
|
+
return (_jsxs(TreeNodeLine, { onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), children: [_jsxs(TreeNodeLineSection, { children: [_jsx(KitTypography.Text, { size: "fontSize5", disabled: isDisabled, children: node.title }), _jsx(SelectedChildrenCount, { node: node, selectedNodes: selectedNodes, loadRecursively: loadRecursively })] }), _jsxs(TreeNodeLineSection, { children: [showSelectChildrenButton && node.children.length > 0 && hover && (_jsx(KitButton, { size: "s", onClick: e => handleChildrenSelection(e), children: t(`tree-node-selection.${buttonInSelectMode ? 'select_children' : 'unselect_children'}`) })), !checkable && isSelected && (_jsx(FontAwesomeIcon, { icon: faCheck, color: isDisabled ? 'var(--general-utilities-text-disabled)' : 'var(--general-utilities-text-blue)' }))] })] }));
|
|
38
39
|
};
|
|
39
40
|
const SelectedChildrenCount = ({ node, selectedNodes, loadRecursively }) => {
|
|
40
41
|
// it can work only if all children are loaded
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeTitle.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/TreeNodeTitle.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,s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released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useState, type FunctionComponent} from 'react';\nimport {type ITreeMapElement} from './_types';\nimport {KitButton, KitTag, KitTypography} from 'aristid-ds';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faCheck} from '@fortawesome/free-solid-svg-icons';\nimport {type ITreeNodeWithRecord} from '_ui/types';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport styled from 'styled-components';\n\nconst TreeNodeLine = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n`;\nconst TreeNodeLineSection = styled.div`\n display: flex;\n align-items: center;\n gap: calc(var(--general-spacing-xs) * 1px);\n`;\ninterface ITreeNodeTitleProps {\n checkable: boolean;\n disabledNodes: string[];\n loadRecursively: boolean;\n node: ITreeMapElement;\n onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;\n selectedNodes: string[];\n showSelectChildrenButton: boolean;\n}\n\nexport const TreeNodeTitle: FunctionComponent<ITreeNodeTitleProps> = ({\n checkable,\n disabledNodes,\n loadRecursively,\n node,\n onSelect,\n selectedNodes,\n showSelectChildrenButton,\n}) => {\n const {t} = useSharedTranslation();\n\n const [hover, setHover] = useState(false);\n\n const isSelected = selectedNodes.includes(node.id) && !node.isShowMore;\n const isDisabled = disabledNodes.includes(node.id);\n\n const buttonInSelectMode = node.children\n .filter(child => !child.isShowMore && !disabledNodes.includes(child.id))\n .every(child => !selectedNodes.includes(child.id));\n\n const handleChildrenSelection = (event: React.MouseEvent) => {\n event.stopPropagation();\n node.children.forEach(child => {\n if (node.disabled || child.isShowMore) {\n return;\n }\n onSelect(child, buttonInSelectMode);\n });\n };\n\n return (\n <TreeNodeLine onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}>\n <TreeNodeLineSection>\n <KitTypography.Text size=\"fontSize5\" disabled={isDisabled}>\n {node.title}\n </KitTypography.Text>\n <SelectedChildrenCount node={node} selectedNodes={selectedNodes} loadRecursively={loadRecursively} />\n </TreeNodeLineSection>\n <TreeNodeLineSection>\n {showSelectChildrenButton && node.children.length > 0 && hover && (\n <KitButton size=\"s\" onClick={e => handleChildrenSelection(e)}>\n {t(`tree-node-selection.${buttonInSelectMode ? 'select_children' : 'unselect_children'}`)}\n </KitButton>\n )}\n {!checkable && isSelected && (\n <FontAwesomeIcon\n icon={faCheck}\n color={\n isDisabled ? 'var(--general-utilities-text-disabled)' : 'var(--general-utilities-text-blue)'\n }\n />\n )}\n </TreeNodeLineSection>\n </TreeNodeLine>\n );\n};\n\nconst SelectedChildrenCount: FunctionComponent<{\n node: ITreeMapElement;\n selectedNodes: string[];\n loadRecursively: boolean;\n}> = ({node, selectedNodes, loadRecursively}) => {\n // it can work only if all children are loaded\n if (!loadRecursively) {\n return null;\n }\n\n const selectedChildrenCount = countSelectedNodes(node, selectedNodes);\n\n return selectedChildrenCount > 0 ? <KitTag idCardProps={{description: selectedChildrenCount}} /> : null;\n};\n\nconst countSelectedNodes = (node: ITreeMapElement, selectedNodes: string[]): number =>\n node.children?.reduce((count, child) => {\n if (selectedNodes.includes(child.id) && !child.isShowMore) {\n count += 1;\n }\n count += countSelectedNodes(child, selectedNodes);\n return count;\n }, 0) ?? 0;\n"]}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
4
|
import { useCallback, useContext, useEffect, useRef } from 'react';
|
|
5
|
-
import { v4 as uuid } from 'uuid';
|
|
6
5
|
import { LangContext } from '../../contexts';
|
|
7
6
|
import { encodeMessage, decodeMessage, getExposedMethods, initClientHandlers } from './messageHandlers';
|
|
8
7
|
/**
|
|
@@ -11,7 +10,7 @@ import { encodeMessage, decodeMessage, getExposedMethods, initClientHandlers } f
|
|
|
11
10
|
*/
|
|
12
11
|
export const useIFrameMessenger = (options) => {
|
|
13
12
|
const registry = useRef({});
|
|
14
|
-
const selfId = useRef(options?.id ??
|
|
13
|
+
const selfId = useRef(options?.id ?? window.crypto.randomUUID());
|
|
15
14
|
const { setLang } = useContext(LangContext);
|
|
16
15
|
const changeLangInAllFrames = (newLanguage) => {
|
|
17
16
|
dispatch({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIFrameMessenger.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/useIFrameMessenger.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACjE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"useIFrameMessenger.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/useIFrameMessenger.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AASzC,OAAO,EAAC,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAItG;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAoC,EAAE,EAAE;IACvE,MAAM,QAAQ,GAAG,MAAM,CAAyB,EAAE,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;IAEjE,MAAM,EAAC,OAAO,EAAC,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAE1C,MAAM,qBAAqB,GAAG,CAAC,WAAmB,EAAE,EAAE;QAClD,QAAQ,CACJ;YACI,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,WAAW;SACxB,EACD,KAAK,C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AC,CAAC;QACrD,CAAC;QAED,OAAO,GAAG,EAAE;YACR,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QACrD,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,OAAO,CAAC,OAAO,CAAC;AAC3B,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 {useCallback, useContext, useEffect, useRef} from 'react';\nimport {LangContext} from '_ui/contexts';\nimport {\n type AddMessageToPanelMessageHandler,\n type MessageToPanelMessageHandler,\n type Callbacks,\n type CallCbFunction,\n type IUseIFrameMessengerOptions,\n type MessageDispatcher,\n} from './types';\nimport {encodeMessage, decodeMessage, getExposedMethods, initClientHandlers} from './messageHandlers';\n\nexport {IUseIFrameMessengerOptions};\n\n/**\n * This is the core of `useIFrameMessenger`. Should be used for top-level apps, such as **app-studio**.\n * For client apps (apps that need to consume the messenger), please use the `useIFrameMessengerClient`\n */\nexport const useIFrameMessenger = (options?: IUseIFrameMessengerOptions) => {\n const registry = useRef<Record<string, Window>>({});\n const selfId = useRef(options?.id ?? window.crypto.randomUUID());\n\n const {setLang} = useContext(LangContext);\n\n const changeLangInAllFrames = (newLanguage: string) => {\n dispatch(\n {\n type: 'change-language',\n language: newLanguage,\n },\n 'all',\n );\n };\n\n const panelMessageHandlerRegistry = useRef<Record<string, MessageToPanelMessageHandler>>({});\n const addPanelMessageHandler: AddMessageToPanelMessageHandler = (\n type: string,\n handler: MessageToPanelMessageHandler,\n ) => {\n panelMessageHandlerRegistry.current[type] = handler;\n };\n\n const dispatch = useCallback<MessageDispatcher>(\n (message, frameId) => {\n if (window !== window.top) {\n window.parent.postMessage(encodeMessage({...message, __frameId: selfId.current}), '*');\n } else if (frameId && registry.current[frameId]) {\n (registry.current[frameId] as Window).postMessage(\n encodeMessage({...message, __frameId: selfId.current}),\n '*',\n );\n } else if (frameId === 'all') {\n Object.entries(registry.current).forEach(([id, frame]) => {\n if (id !== message.__frameId) {\n // DO not send the message to the sender\n frame.postMessage(encodeMessage({...message, __frameId: selfId.current}), '*');\n }\n });\n }\n },\n [registry.current],\n );\n\n const callCb = useCallback<CallCbFunction>(\n (path, data, frameId) => {\n dispatch({type: 'on-call-callback', path, data}, frameId);\n },\n [dispatch],\n );\n\n const unregister = () => {\n if (window !== window.top) {\n dispatch({type: 'unregister', id: selfId.current});\n }\n };\n\n const callbacksStore = useRef<Callbacks>({});\n const methods = useRef({\n ...getExposedMethods(callbacksStore, dispatch),\n unregister,\n changeLangInAllFrames,\n addPanelMessageHandler,\n });\n\n useEffect(() => {\n const clientHandlers = initClientHandlers(callCb, {...options, id: selfId.current}, callbacksStore);\n const onMessage = (event: MessageEvent) => {\n const message = decodeMessage(event.data);\n if (message === undefined) {\n return;\n }\n switch (message.type) {\n case 'register':\n const frames = window.frames;\n // Due to weak typing on Window, we cannot iterate directly on window.frames\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < frames.length; i++) {\n if (event.source === frames[i]) {\n registry.current[message.id] = frames[i];\n }\n }\n break;\n case 'unregister':\n if (registry.current[message.id]) {\n delete registry.current[message.id];\n }\n break;\n case 'message-to-panel':\n panelMessageHandlerRegistry.current[message.data.type]?.(message.data.payload);\n if (window === window.top) {\n const target = message.data.target ?? 'all';\n dispatch(message, target);\n }\n break;\n default:\n if (message.type === 'change-language') {\n setLang(message.language);\n } else {\n clientHandlers(message, dispatch);\n }\n break;\n }\n };\n\n window.addEventListener('message', onMessage);\n\n if (window !== window.top) {\n // Register the message handler for the parent window\n dispatch({type: 'register', id: selfId.current});\n }\n\n return () => {\n window.removeEventListener('message', onMessage);\n };\n }, []);\n\n return methods.current;\n};\n"]}
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"max_length": "Max length",
|
|
38
38
|
"confirm": "Confirm",
|
|
39
39
|
"loading": "Loading",
|
|
40
|
-
"are_you_sure": "Are you sure?"
|
|
40
|
+
"are_you_sure": "Are you sure?",
|
|
41
|
+
"reset": "Reset"
|
|
41
42
|
},
|
|
42
43
|
"errors": {
|
|
43
44
|
"default_language_required": "The default language is required",
|
|
@@ -699,7 +700,6 @@
|
|
|
699
700
|
"inactive": "Inactive sorts"
|
|
700
701
|
},
|
|
701
702
|
"toolbar": "Toolbar",
|
|
702
|
-
"reset-filter": "Reset filter",
|
|
703
703
|
"reset-view": "Reset view",
|
|
704
704
|
"empty-data": "No items found.",
|
|
705
705
|
"available-attributes": "Other available attributes",
|
|
@@ -776,6 +776,17 @@
|
|
|
776
776
|
"deselect_all": "Deselect all items"
|
|
777
777
|
}
|
|
778
778
|
},
|
|
779
|
+
"export_profile_modal": {
|
|
780
|
+
"title": "Export",
|
|
781
|
+
"profile_label": "Choose an export profile",
|
|
782
|
+
"preview_label": "Preview of exported attributes",
|
|
783
|
+
"search_placeholder": "Search...",
|
|
784
|
+
"no_profiles": "No export profiles configured for this library",
|
|
785
|
+
"contact_admin": "Please contact an administrator to configure export profiles.",
|
|
786
|
+
"empty_columns": "(empty column)",
|
|
787
|
+
"export_button": "Export",
|
|
788
|
+
"error_title": "Export profile error"
|
|
789
|
+
},
|
|
779
790
|
"add-existing-item": "Add existing item",
|
|
780
791
|
"activate_item_one": "Activate this item?",
|
|
781
792
|
"activate_item_other": "Activate these items?",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"max_length": "Longueur maximale",
|
|
38
38
|
"confirm": "Confirmer",
|
|
39
39
|
"loading": "Chargement",
|
|
40
|
-
"are_you_sure": "Êtes-vous sûr ?"
|
|
40
|
+
"are_you_sure": "Êtes-vous sûr ?",
|
|
41
|
+
"reset": "Réinitialiser"
|
|
41
42
|
},
|
|
42
43
|
"errors": {
|
|
43
44
|
"default_language_required": "La langue par défaut est requise",
|
|
@@ -697,7 +698,6 @@
|
|
|
697
698
|
"inactive": "Tris inactifs"
|
|
698
699
|
},
|
|
699
700
|
"toolbar": "Barre d’outils",
|
|
700
|
-
"reset-filter": "Réinitialiser le filtre",
|
|
701
701
|
"reset-view": "Réinitialiser la vue",
|
|
702
702
|
"empty-data": "Aucun élément trouvé.",
|
|
703
703
|
"sort-ascending": "Ascendant",
|
|
@@ -776,6 +776,17 @@
|
|
|
776
776
|
"deselect_all": "Tout désélectionner"
|
|
777
777
|
}
|
|
778
778
|
},
|
|
779
|
+
"export_profile_modal": {
|
|
780
|
+
"title": "Export",
|
|
781
|
+
"profile_label": "Choisir un profil d'export",
|
|
782
|
+
"preview_label": "Aperçu des attributs exportés",
|
|
783
|
+
"search_placeholder": "Rechercher...",
|
|
784
|
+
"no_profiles": "Aucun profil d'export configuré pour cette librairie",
|
|
785
|
+
"contact_admin": "Veuillez contacter un administrateur pour configurer les profils d'export.",
|
|
786
|
+
"empty_columns": "(colonne vide)",
|
|
787
|
+
"export_button": "Exporter",
|
|
788
|
+
"error_title": "Erreur de profil d'export"
|
|
789
|
+
},
|
|
779
790
|
"add-existing-item": "Ajouter un élément existant",
|
|
780
791
|
"activate_item_one": "Activer cet élément ?",
|
|
781
792
|
"activate_item_other": "Activer ces éléments ?",
|