@leav/ui 0.3.6-dd8d51c → 0.3.6-dee7a7f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/_queries/records/getRecordPropertiesQuery.js +2 -0
  2. package/dist/_queries/records/getRecordPropertiesQuery.js.map +1 -1
  3. package/dist/components/Explorer/DataView.d.ts +1 -1
  4. package/dist/components/Explorer/Explorer.d.ts +1 -1
  5. package/dist/components/Explorer/Explorer.js +5 -3
  6. package/dist/components/Explorer/Explorer.js.map +1 -1
  7. package/dist/components/Explorer/_queries/useExplorerData.d.ts +11 -0
  8. package/dist/components/Explorer/{useExplorerData.js → _queries/useExplorerData.js} +1 -1
  9. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -0
  10. package/dist/components/Explorer/_types.js +2 -0
  11. package/dist/components/Explorer/_types.js.map +1 -0
  12. package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +2 -0
  13. package/dist/components/Explorer/edit-settings/DisplayMode.js +10 -0
  14. package/dist/components/Explorer/edit-settings/DisplayMode.js.map +1 -0
  15. package/dist/components/Explorer/edit-settings/EditSettingsContext.d.ts +13 -0
  16. package/dist/components/Explorer/edit-settings/EditSettingsContext.js +14 -0
  17. package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +1 -0
  18. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +2 -0
  19. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js +16 -0
  20. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +1 -0
  21. package/dist/components/Explorer/edit-settings/SettingItem.d.ts +7 -0
  22. package/dist/components/Explorer/edit-settings/SettingItem.js +55 -0
  23. package/dist/components/Explorer/edit-settings/SettingItem.js.map +1 -0
  24. package/dist/components/Explorer/edit-settings/SettingsPanel.d.ts +3 -0
  25. package/dist/components/Explorer/edit-settings/SettingsPanel.js +53 -0
  26. package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +1 -0
  27. package/dist/components/Explorer/edit-settings/SidePanel.d.ts +2 -0
  28. package/dist/components/Explorer/edit-settings/SidePanel.js +19 -0
  29. package/dist/components/Explorer/edit-settings/SidePanel.js.map +1 -0
  30. package/dist/components/Explorer/edit-settings/useEditSettings.d.ts +1 -0
  31. package/dist/components/Explorer/edit-settings/useEditSettings.js +7 -0
  32. package/dist/components/Explorer/edit-settings/useEditSettings.js.map +1 -0
  33. package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +1 -0
  34. package/dist/components/Explorer/edit-settings/useOpenSettings.js +19 -0
  35. package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +1 -0
  36. package/dist/components/Explorer/index.d.ts +11 -1
  37. package/dist/components/Explorer/index.js +8 -1
  38. package/dist/components/Explorer/index.js.map +1 -1
  39. package/dist/components/Explorer/useCreateMainAction.d.ts +1 -1
  40. package/dist/components/Explorer/useCreateMainAction.js +1 -1
  41. package/dist/components/Explorer/useCreateMainAction.js.map +1 -1
  42. package/dist/components/Explorer/useDeactivateAction.d.ts +1 -1
  43. package/dist/components/Explorer/useDeactivateAction.js +1 -1
  44. package/dist/components/Explorer/useDeactivateAction.js.map +1 -1
  45. package/dist/components/Explorer/useEditAction.d.ts +1 -1
  46. package/dist/components/Explorer/useEditAction.js +1 -1
  47. package/dist/components/Explorer/useEditAction.js.map +1 -1
  48. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +2 -2
  49. package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js +3 -0
  50. package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js.map +1 -1
  51. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +2 -2
  52. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +3 -9
  53. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +1 -1
  54. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +3 -0
  55. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  56. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +3 -0
  57. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  58. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +3 -0
  59. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  60. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +3 -0
  61. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  62. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +3 -0
  63. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  64. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +3 -0
  65. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  66. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +3 -0
  67. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  68. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +2 -2
  69. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +37 -28
  70. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +1 -1
  71. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +5 -1
  72. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +1 -1
  73. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +3 -0
  74. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js +123 -0
  75. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +1 -0
  76. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +14 -0
  77. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.js +2 -0
  78. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.js.map +1 -0
  79. package/dist/components/index.d.ts +1 -0
  80. package/dist/components/index.js +1 -0
  81. package/dist/components/index.js.map +1 -1
  82. package/dist/locales/en/shared.json +13 -3
  83. package/dist/locales/fr/shared.json +13 -3
  84. package/package.json +2 -2
  85. package/dist/components/Explorer/types.js +0 -2
  86. package/dist/components/Explorer/types.js.map +0 -1
  87. package/dist/components/Explorer/useExplorerData.d.ts +0 -11
  88. package/dist/components/Explorer/useExplorerData.js.map +0 -1
  89. /package/dist/components/Explorer/{types.d.ts → _types.d.ts} +0 -0
@@ -14,6 +14,8 @@ const _getFieldLinkedLibraryPart = (field) => field.linkedLibrary
14
14
  const _getFieldQueryPart = (field) => `
15
15
  ${field.attributeId}: property(attribute: "${field.attributeId}") {
16
16
  id_value
17
+ isInherited
18
+ isCalculated
17
19
  created_at
18
20
  modified_at
19
21
  version {
@@ -1 +1 @@
1
- {"version":3,"file":"getRecordPropertiesQuery.js","sourceRoot":"","sources":["../../../src/_queries/records/getRecordPropertiesQuery.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,6BAA6B,EAAC,MAAM,aAAa,CAAC;AAC1D,OAAO,EAGH,qBAAqB,EAIxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAC,4BAA4B,EAAC,MAAM,iCAAiC,CAAC;AAkG7E,MAAM,0BAA0B,GAAG,CAAC,KAA6B,EAAU,EAAE,CACzE,KAAK,CAAC,aAAa;IACf,CAAC,CAAC,UAAU,6BAA6B,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;cAC3D,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;UAC3E;IACF,CAAC,CAAC,EAAE,CAAC;AAEb,MAAM,kBAAkB,GAAG,CAAC,KAA6B,EAAU,EAAE,CAAC;MAChE,KAAK,CAAC,WAAW,0BAA0B,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;kBAuBhD,0BAA0B,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;CAmBlD,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAAgC,EAAE,EAAE,CAAC,YAAY,CAAA;UAChF,sBAAsB;UACtB,4BAA4B;;;;;qDAKe,qBAAqB,CAAC,KAAK;;;;;;;;;;;sBAW1D,MAAM,CAAC,MAAM,CA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AC,KAAK;;;;;;;;;;;sBAW1D,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;;;;KAI/F,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { IItemAction, IItemData } from './types';
2
+ import { IItemAction, IItemData } from './_types';
3
3
  interface IDataViewProps {
4
4
  dataGroupedFilteredSorted: IItemData[];
5
5
  itemActions: IItemAction[];
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { IItemAction } from './types';
2
+ import { IItemAction } from './_types';
3
3
  interface IExplorerProps {
4
4
  library: string;
5
5
  itemActions: IItemAction[];
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { KitTypography } from 'aristid-ds';
2
+ import { KitSpace, KitTypography } from 'aristid-ds';
3
3
  import styled from 'styled-components';
4
4
  import { DataView } from './DataView';
5
- import { useExplorerData } from './useExplorerData';
5
+ import { useOpenSettings } from './edit-settings/useOpenSettings';
6
+ import { useExplorerData } from './_queries/useExplorerData';
6
7
  import { useDeactivateAction } from './useDeactivateAction';
7
8
  import { useEditAction } from './useEditAction';
8
9
  import { useCreateMainAction } from './useCreateMainAction';
@@ -27,6 +28,7 @@ export const Explorer = ({ library, itemActions, defaultActionsForItem = ['edit'
27
28
  library,
28
29
  refetch
29
30
  });
30
- return (_jsxs(_Fragment, { children: [loading ? ('Loading...') : (_jsxs(_Fragment, { children: [_jsxs(ExplorerHeaderDivStyled, { children: [_jsx(KitTypography.Title, { level: "h1", children: library /* TODO: get correct name from backend */ }), createButton] }), _jsx(DataView, { dataGroupedFilteredSorted: data ?? [], attributesToDisplay: [currentAttribute, 'whoAmI'], itemActions: [editAction, deactivateAction, ...itemActions].filter(Boolean) })] })), editModal, createModal] }));
31
+ const settingsButton = useOpenSettings();
32
+ return (_jsxs(_Fragment, { children: [loading ? ('Loading...') : (_jsxs(_Fragment, { children: [_jsxs(ExplorerHeaderDivStyled, { children: [_jsx(KitTypography.Title, { level: "h1", children: library /* TODO: get correct name from backend */ }), _jsxs(KitSpace, { size: "xs", children: [settingsButton, createButton] })] }), _jsx(DataView, { dataGroupedFilteredSorted: data ?? [], attributesToDisplay: [currentAttribute, 'whoAmI'], itemActions: [editAction, deactivateAction, ...itemActions].filter(Boolean) })] })), editModal, createModal] }));
31
33
  };
32
34
  //# sourceMappingURL=Explorer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Explorer.js","sourceRoot":"","sources":["../../../src/components/Explorer/Explorer.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAe1D,MAAM,UAAU,GAAG,CAAsB,KAAQ,EAA2B,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAEhG,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKzC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAsC,CAAC,EACxD,OAAO,EACP,WAAW,EACX,qBAAqB,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAC9C,kBAAkB,GAAG,CAAC,QAAQ,CAAC,EAClC,EAAE,EAAE;IACD,MAAM,gBAAgB,GAAG,IAAI,CAAC;IAE9B,MAAM,E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,CAAC,CAAC;IAEH,MAAM,EAAC,YAAY,EAAE,WAAW,EAAC,GAAG,mBAAmB,CAAC;QACpD,SAAS,EAAE,UAAU,CAAC,kBAAkB,CAAC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAClF,OAAO;QACP,OAAO;KACV,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,eAAe,EAAE,CAAC;IAEzC,OAAO,CACH,8BACK,OAAO,CAAC,CAAC,CAAC,CACP,YAAY,CACf,CAAC,CAAC,CAAC,CACA,8BACI,MAAC,uBAAuB,eACpB,KAAC,aAAa,CAAC,KAAK,IAAC,KAAK,EAAC,IAAI,YAC1B,OAAO,CAAC,yCAAyC,GAChC,EACtB,MAAC,QAAQ,IAAC,IAAI,EAAC,IAAI,aACd,cAAc,EACd,YAAY,IACN,IACW,EAC1B,KAAC,QAAQ,IACL,yBAAyB,EAAE,IAAI,IAAI,EAAE,EACrC,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,QAAQ,CAAC,EACjD,WAAW,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,GAAG,WAAW,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAC7E,IACH,CACN,EACA,SAAS,EACT,WAAW,IACb,CACN,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { IItemData } from '../_types';
2
+ import { ExplorerQuery } from '../../../_gqlTypes';
3
+ export declare const useExplorerData: (libraryId: string, attributeIds: string[]) => {
4
+ data: IItemData[];
5
+ loading: boolean;
6
+ refetch: (variables?: Partial<import("../../../_gqlTypes").Exact<{
7
+ libraryId: import("../../../_gqlTypes").Scalars["ID"];
8
+ attributeIds: Array<import("../../../_gqlTypes").Scalars["ID"]> | import("../../../_gqlTypes").Scalars["ID"];
9
+ filters?: import("../../../_gqlTypes").InputMaybe<Array<import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordFilterInput>> | import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordFilterInput>>;
10
+ }>>) => Promise<import("@apollo/client").ApolloQueryResult<ExplorerQuery>>;
11
+ };
@@ -1,4 +1,4 @@
1
- import { useExplorerQuery } from '../../_gqlTypes';
1
+ import { useExplorerQuery } from '../../../_gqlTypes';
2
2
  const _mapping = (data, libraryId) => data.records.list.map(({ whoAmI, properties }) => ({
3
3
  libraryId,
4
4
  key: whoAmI.id, // For <KitTable /> only
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAE9D,MAAM,QAAQ,GAAG,CAAC,IAAmB,EAAE,SAAiB,EAAe,EAAE,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,MAAM,EAAE,UAAU,EAAC,EAAE,EAAE,CAAC,CAAC;IAC7C,SAAS;IACT,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,wBAAwB;IACxC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,wBAAwB;IAC3C,MAAM,EAAE;QACJ,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI;QACb,GAAG,MAAM;KACZ;IACD,cAAc,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAC,WAAW,EAAE,MAAM,EAAC,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,EAAC,CAAC,EAAE,EAAE,CAAC;CAC3G,CAAC,CAAC,CAAC;AAER,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAiB,EAAE,YAAsB,EAAE,EAAE;IACzE,MAAM,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,gBAAgB,CAAC,EAAC,SAAS,EAAE,EAAC,SAAS,EAAE,YAAY,EAAC,EAAC,CAAC,CAAC;IAE1F,OAAO;QACH,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;QAC3D,OAAO;QACP,OAAO;KACV,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=_types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/Explorer/_types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { FunctionComponent } from 'react';
2
+ export declare const DisplayMode: FunctionComponent;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
6
+ export const DisplayMode = () => {
7
+ const { t } = useSharedTranslation();
8
+ return _jsx("div", { children: "TODO" });
9
+ };
10
+ //# sourceMappingURL=DisplayMode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisplayMode.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/DisplayMode.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE,MAAM,CAAC,MAAM,WAAW,GAAsB,GAAG,EAAE;IAC/C,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,OAAO,iCAAe,CAAC;AAC3B,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ interface IActiveSettings {
3
+ content: ReactNode;
4
+ title: string;
5
+ onClickLeftButton?: () => void;
6
+ }
7
+ export interface IEditSettingsContext {
8
+ setActiveSettings: (params: IActiveSettings) => void;
9
+ activeSettings: null | IActiveSettings;
10
+ onClose: () => void;
11
+ }
12
+ export declare const EditSettingsContext: import("react").Context<IEditSettingsContext>;
13
+ export {};
@@ -0,0 +1,14 @@
1
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
2
+ // This file is released under LGPL V3
3
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
+ import { createContext } from 'react';
5
+ export const EditSettingsContext = createContext({
6
+ setActiveSettings: () => {
7
+ throw new Error('Not implemented');
8
+ },
9
+ activeSettings: null,
10
+ onClose: () => {
11
+ throw new Error('Not implemented');
12
+ }
13
+ });
14
+ //# sourceMappingURL=EditSettingsContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditSettingsContext.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/EditSettingsContext.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAY,MAAM,OAAO,CAAC;AAc/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAuB;IACnE,iBAAiB,EAAE,GAAG,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IACD,cAAc,EAAE,IAAI;IACpB,OAAO,EAAE,GAAG,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { FunctionComponent } from 'react';
2
+ export declare const EditSettingsContextProvider: FunctionComponent;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { useState } from 'react';
6
+ import { EditSettingsContext } from './EditSettingsContext';
7
+ export const EditSettingsContextProvider = ({ children }) => {
8
+ const [activeSettings, setActiveSettings] = useState(null);
9
+ const onClose = () => setActiveSettings(null);
10
+ return (_jsx(EditSettingsContext.Provider, { value: {
11
+ activeSettings,
12
+ setActiveSettings,
13
+ onClose
14
+ }, children: children }));
15
+ };
16
+ //# sourceMappingURL=EditSettingsContextProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditSettingsContextProvider.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/EditSettingsContextProvider.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAuB,MAAM,uBAAuB,CAAC;AAEhF,MAAM,CAAC,MAAM,2BAA2B,GAAsB,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;IACzE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAyC,IAAI,CAAC,CAAC;IACnG,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE9C,OAAO,CACH,KAAC,mBAAmB,CAAC,QAAQ,IACzB,KAAK,EAAE;YACH,cAAc;YACd,iBAAiB;YACjB,OAAO;SACV,YAEA,QAAQ,GACkB,CAClC,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ export declare const SettingItem: FunctionComponent<{
3
+ icon: ReactNode;
4
+ title: string;
5
+ onClick: () => void;
6
+ value?: string;
7
+ }>;
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { KitTypography } from 'aristid-ds';
6
+ import { FaChevronRight } from 'react-icons/fa';
7
+ import styled from 'styled-components';
8
+ const StyledValue = styled(KitTypography.Text) `
9
+ color: var(--general-utilities-disabled);
10
+ `;
11
+ const StyledConfigurationItem = styled.li `
12
+ list-style: none;
13
+
14
+ &:first-child {
15
+ margin-top: calc(var(--general-spacing-xs) * 1px);
16
+ }
17
+
18
+ > button {
19
+ color: var(--general-utilities-text-primary);
20
+ border: none;
21
+ background: transparent;
22
+ display: flex;
23
+ width: 100%;
24
+ height: 40px;
25
+ align-items: center;
26
+ padding: 0 calc(var(--general-spacing-xs) * 1px);
27
+ gap: calc(var(--general-spacing-xs) * 1px);
28
+ border-radius: calc(var(--general-spacing-xs) * 1px);
29
+ text-align: left;
30
+ cursor: pointer;
31
+
32
+ &:hover {
33
+ background: var(--general-utilities-main-light);
34
+
35
+ ${StyledValue} {
36
+ color: var(--general-utilities-text-primary);
37
+ }
38
+ }
39
+
40
+ .title {
41
+ flex: 1 1 auto;
42
+ }
43
+
44
+ .value {
45
+ flex: 0 1 auto;
46
+ text-align: right;
47
+ }
48
+
49
+ > svg {
50
+ flex: 0 0 calc(var(--general-spacing-s) * 1px);
51
+ }
52
+ }
53
+ `;
54
+ export const SettingItem = ({ icon, title, value = '', onClick }) => (_jsx(StyledConfigurationItem, { children: _jsxs("button", { onClick: onClick, children: [icon, _jsx(KitTypography.Text, { size: "fontSize5", ellipsis: true, className: "title", children: title }), _jsx(StyledValue, { size: "fontSize5", ellipsis: true, className: "value", children: value }), _jsx(FaChevronRight, {})] }) }));
55
+ //# sourceMappingURL=SettingItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingItem.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/SettingItem.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;;CAE7C,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;cAwB3B,WAAW;;;;;;;;;;;;;;;;;;CAkBxB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAKnB,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,EAAE,EAAE,OAAO,EAAC,EAAE,EAAE,CAAC,CACzC,KAAC,uBAAuB,cACpB,kBAAQ,OAAO,EAAE,OAAO,aACnB,IAAI,EACL,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,QAAC,SAAS,EAAC,OAAO,YAC1D,KAAK,GACW,EACrB,KAAC,WAAW,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,QAAC,SAAS,EAAC,OAAO,YACnD,KAAK,GACI,EACd,KAAC,cAAc,KAAG,IACb,GACa,CAC7B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FunctionComponent } from 'react';
2
+ export type SettingsPanelPages = 'view-configuration' | 'display-mode';
3
+ export declare const SettingsPanel: FunctionComponent;
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import styled from 'styled-components';
6
+ import { useState } from 'react';
7
+ import { KitTypography } from 'aristid-ds';
8
+ import { FaFilter, FaList, FaSortAlphaDown } from 'react-icons/fa';
9
+ import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
10
+ import { DisplayMode } from './DisplayMode';
11
+ import { SettingItem } from './SettingItem';
12
+ import { useEditSettings } from './useEditSettings';
13
+ const ContentWrapperStyledDiv = styled.div `
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: calc(var(--general-spacing-s) * 1px);
17
+ `;
18
+ const ConfigurationStyledMenu = styled.menu `
19
+ padding: 0;
20
+ `;
21
+ export const SettingsPanel = () => {
22
+ const { t } = useSharedTranslation();
23
+ const { setActiveSettings, activeSettings } = useEditSettings();
24
+ const [currentPage, setCurrentPage] = useState('view-configuration');
25
+ const _goToAdvancedSettingsPage = (page) => {
26
+ if (!activeSettings) {
27
+ throw Error('Should not be able to change side pane page if there is no side panel!');
28
+ }
29
+ const _changePanelPage = ({ pageName, title, onClickLeftButton }) => {
30
+ setCurrentPage(pageName);
31
+ setActiveSettings({
32
+ ...activeSettings,
33
+ title,
34
+ onClickLeftButton
35
+ });
36
+ };
37
+ _changePanelPage({
38
+ pageName: page,
39
+ title: t(`explorer.${page}`),
40
+ onClickLeftButton: () => {
41
+ const rootPanel = { pageName: 'view-configuration', title: t('explorer.settings') };
42
+ _changePanelPage(rootPanel);
43
+ }
44
+ });
45
+ };
46
+ // TODO: look for MemoryRouter
47
+ return (_jsxs(ContentWrapperStyledDiv, { children: [currentPage === 'view-configuration' && (_jsxs("nav", { children: [_jsx(KitTypography.Title, { level: "h4", children: t('explorer.view-configuration') }), _jsxs(ConfigurationStyledMenu, { children: [_jsx(SettingItem, { icon: _jsx(FaList, {}), title: t('explorer.display-mode'), onClick: () => _goToAdvancedSettingsPage('display-mode') }), _jsx(SettingItem, { icon: _jsx(FaFilter, {}), title: t('explorer.filters'), onClick: () => {
48
+ /* TODO: not implemented yet */
49
+ } }), _jsx(SettingItem, { icon: _jsx(FaSortAlphaDown, {}), title: t('explorer.sort'), onClick: () => {
50
+ /* TODO: not implemented yet */
51
+ } })] })] })), currentPage === 'display-mode' && _jsx(DisplayMode, {})] }));
52
+ };
53
+ //# sourceMappingURL=SettingsPanel.js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,0 +1,2 @@
1
+ import { FunctionComponent } from 'react';
2
+ export declare const SidePanel: FunctionComponent;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { KitSidePanel } from 'aristid-ds';
3
+ import { useEditSettings } from './useEditSettings';
4
+ import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
5
+ export const SidePanel = () => {
6
+ const { t } = useSharedTranslation();
7
+ const { activeSettings, onClose } = useEditSettings();
8
+ if (!activeSettings) {
9
+ return null;
10
+ }
11
+ // TODO: handle transition opening/closing on floating prop true
12
+ const makeA11yBackButton = {
13
+ title: String(t('explorer.back')) /* TODO: avoid transform null to 'null' */
14
+ };
15
+ return (_jsx(KitSidePanel, { style: { zIndex: '10000' }, initialOpen: true, floating: true, closable: true, idCardProps: { title: activeSettings.title }, leftActionProps: activeSettings.onClickLeftButton
16
+ ? { onClick: activeSettings.onClickLeftButton, ...makeA11yBackButton }
17
+ : undefined, onClose: onClose, children: activeSettings.content }));
18
+ };
19
+ //# sourceMappingURL=SidePanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidePanel.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/SidePanel.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,MAAM,SAAS,GAAsB,GAAG,EAAE;IAC7C,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,cAAc,EAAE,OAAO,EAAC,GAAG,eAAe,EAAE,CAAC;IAEpD,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gEAAgE;IAEhE,MAAM,kBAAkB,GAA4C;QAChE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,0CAA0C;KAC/E,CAAC;IAEF,OAAO,CACH,KAAC,YAAY,IACT,KAAK,EAAE,EAAC,MAAM,EAAE,OAAO,EAAC,EACxB,WAAW,QACX,QAAQ,QACR,QAAQ,QACR,WAAW,EAAE,EAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAC,EAC1C,eAAe,EACX,cAAc,CAAC,iBAAiB;YAC5B,CAAC,CAAC,EAAC,OAAO,EAAE,cAAc,CAAC,iBAAiB,EAAE,GAAG,kBAAkB,EAAC;YACpE,CAAC,CAAC,SAAS,EAEnB,OAAO,EAAE,OAAO,YAEf,cAAc,CAAC,OAAO,GACZ,CAClB,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const useEditSettings: () => import("./EditSettingsContext").IEditSettingsContext;
@@ -0,0 +1,7 @@
1
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
2
+ // This file is released under LGPL V3
3
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
+ import { useContext } from 'react';
5
+ import { EditSettingsContext } from './EditSettingsContext';
6
+ export const useEditSettings = () => useContext(EditSettingsContext);
7
+ //# sourceMappingURL=useEditSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEditSettings.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/useEditSettings.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const useOpenSettings: () => JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { KitButton } from 'aristid-ds';
6
+ import { FaSlidersH } from 'react-icons/fa';
7
+ import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
8
+ import { SettingsPanel } from './SettingsPanel';
9
+ import { useEditSettings } from './useEditSettings';
10
+ export const useOpenSettings = () => {
11
+ const { setActiveSettings } = useEditSettings();
12
+ const { t } = useSharedTranslation();
13
+ const _openSettingsPanel = () => setActiveSettings({
14
+ content: _jsx(SettingsPanel, {}),
15
+ title: t('explorer.settings')
16
+ });
17
+ return (_jsx(KitButton, { type: "tertiary", color: "neutral", icon: _jsx(FaSlidersH, {}), onClick: _openSettingsPanel, title: String(t('explorer.settings')) /* TODO: avoid transform null to 'null' */ }));
18
+ };
19
+ //# sourceMappingURL=useOpenSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOpenSettings.js","sourceRoot":"","sources":["../../../../src/components/Explorer/edit-settings/useOpenSettings.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAChC,MAAM,EAAC,iBAAiB,EAAC,GAAG,eAAe,EAAE,CAAC;IAC9C,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAC5B,iBAAiB,CAAC;QACd,OAAO,EAAE,KAAC,aAAa,KAAG;QAC1B,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC;KAChC,CAAC,CAAC;IAEP,OAAO,CACH,KAAC,SAAS,IACN,IAAI,EAAC,UAAU,EACf,KAAK,EAAC,SAAS,EACf,IAAI,EAAE,KAAC,UAAU,KAAG,EACpB,OAAO,EAAE,kBAAkB,EAC3B,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,0CAA0C,GAClF,CACL,CAAC;AACN,CAAC,CAAC"}
@@ -1 +1,11 @@
1
- export { Explorer } from './Explorer';
1
+ import { Explorer as InternalExplorer } from './Explorer';
2
+ import { useEditSettings } from './edit-settings/useEditSettings';
3
+ import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
4
+ import { SidePanel } from './edit-settings/SidePanel';
5
+ type CompoundedComponent = typeof InternalExplorer & {
6
+ useEditSettings: typeof useEditSettings;
7
+ EditSettingsContextProvider: typeof EditSettingsContextProvider;
8
+ SettingsSidePanel: typeof SidePanel;
9
+ };
10
+ export declare const Explorer: CompoundedComponent;
11
+ export {};
@@ -1,5 +1,12 @@
1
1
  // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
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
- export { Explorer } from './Explorer';
4
+ import { Explorer as InternalExplorer } from './Explorer';
5
+ import { useEditSettings } from './edit-settings/useEditSettings';
6
+ import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
7
+ import { SidePanel } from './edit-settings/SidePanel';
8
+ export const Explorer = InternalExplorer;
9
+ Explorer.EditSettingsContextProvider = EditSettingsContextProvider;
10
+ Explorer.useEditSettings = useEditSettings;
11
+ Explorer.SettingsSidePanel = SidePanel;
5
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,IAAI,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACxD,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAC,2BAA2B,EAAC,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAQpD,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAkD,CAAC;AAC3E,QAAQ,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AACnE,QAAQ,CAAC,eAAe,GAAG,eAAe,CAAC;AAC3C,QAAQ,CAAC,iBAAiB,GAAG,SAAS,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ActionHook } from './types';
1
+ import { ActionHook } from './_types';
2
2
  /**
3
3
  * Hook used to get the action for `<DataView />` component.
4
4
  *
@@ -22,7 +22,7 @@ export const useCreateMainAction = ({ isEnabled, library, refetch }) => {
22
22
  const { t } = useSharedTranslation();
23
23
  const [isRecordCreationVisible, setRecordCreationVisible] = useState(false);
24
24
  return {
25
- createButton: isEnabled ? (_jsx(KitButton, { type: "primary", icon: _jsx(FaPlus, {}) /* TODO: move to font-awesome icons*/, onClick: () => {
25
+ createButton: isEnabled ? (_jsx(KitButton, { type: "primary", icon: _jsx(FaPlus, {}) /* TODO: move to font-awesome 6 icons */, onClick: () => {
26
26
  setRecordCreationVisible(true);
27
27
  }, children: t('explorer.create-one') })) : null,
28
28
  createModal: isRecordCreationVisible ? (_jsx(EditRecordModal, { open: true, record: null, library: library, onClose: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"useCreateMainAction.js","s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,EAAE,CAAC,QAAQ,CAAC,GAC3B,CACL,CAAC,CAAC,CAAC,IAAI;KACX,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"useCreateMainAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useCreateMainAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAChC,SAAS,EACT,OAAO,EACP,OAAO,EAIT,EAAE,EAAE;IACF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5E,OAAO;QACH,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,CACtB,KAAC,SAAS,IACN,IAAI,EAAC,SAAS,EACd,IAAI,EAAE,KAAC,MAAM,KAAG,CAAC,wCAAwC,EACzD,OAAO,EAAE,GAAG,EAAE;gBACV,wBAAwB,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC,YAEA,CAAC,CAAC,qBAAqB,CAAC,GACjB,CACf,CAAC,CAAC,CAAC,IAAI;QACR,WAAW,EAAE,uBAAuB,CAAC,CAAC,CAAC,CACnC,KAAC,eAAe,IACZ,IAAI,QACJ,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,EAAE;gBACV,wBAAwB,CAAC,KAAK,CAAC,CAAC;YACpC,CAAC,EACD,QAAQ,EAAE,aAAa,CAAC,EAAE;gBACtB,OAAO,EAAE,CAAC;gBACV,wBAAwB,CAAC,KAAK,CAAC,CAAC;YACpC,CAAC,EACD,aAAa,EAAE,CAAC,QAAQ,CAAC,GAC3B,CACL,CAAC,CAAC,CAAC,IAAI;KACX,CAAC;AACN,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ActionHook, IItemAction } from './types';
1
+ import { ActionHook, IItemAction } from './_types';
2
2
  /**
3
3
  * Hook used to get the action for `<DataView />` component.
4
4
  *
@@ -27,7 +27,7 @@ export const useDeactivateAction = ({ isEnabled }) => {
27
27
  }
28
28
  });
29
29
  const _deactivateAction = {
30
- label: t('explorer.deactivateItem'),
30
+ label: t('explorer.deactivate-item'),
31
31
  icon: _jsx(FaTrash, {}),
32
32
  isDanger: true,
33
33
  callback: ({ itemId, libraryId }) => KitModal.confirm({
@@ -1 +1 @@
1
- {"version":3,"file":"useDeactivateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useDeactivateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAC,SAAS,EAAa,EAAE,EAAE;IAC3D,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,yBAAyB,CAAC,GAAG,4BAA4B,CAAC;QAC7D,MAAM,CAAC,KAAK,EAAE,kBAAkB;YAC5B,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACxD,KAAK,CAAC,KAAK,CAAC;oBACR,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAC7B,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;YACH,KAAK,CAAC,EAAE,EAAE,CAAC;QACf,CAAC;KACJ,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAgB;QACnC,KAAK,EAAE,CAAC,CAAC,yBAAyB,CAAC;QACnC,IAAI,EAAE,KAAC,OAAO,KAAG;QACjB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,CAAC,EAAC,MAAM,EAAE,SAAS,EAAC,EAAE,EAAE,CAC9B,QAAQ,CAAC,OAAO,CAAC;YACb,IAAI,EAAE,SAAS;YACf,aAAa,EAAE,IAAI;YACnB,OAAO,EAAE,CAAC,CAAC,kCAAkC,CAAC,IAAI,SAAS;YAC3D,MAAM,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,SAAS;YACvC,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,SAAS;YAC3C,IAAI,EAAE,GAAG,EAAE,CACP,yBAAyB,CAAC;gBACtB,SAAS,EAAE;oBACP,SAAS;oBACT,UAAU,EAAE,CAAC,MAAM,CAAC;iBACvB;aACJ,CAAC;SACT,CAAC;KACT,CAAC;IAEF,OAAO;QACH,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI;KACzD,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"useDeactivateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useDeactivateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,M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,CAAC;AACN,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ActionHook, IItemAction } from './types';
1
+ import { ActionHook, IItemAction } from './_types';
2
2
  /**
3
3
  * Hook used to get the action for `<DataView />` component.
4
4
  *
@@ -22,7 +22,7 @@ export const useEditAction = ({ isEnabled }) => {
22
22
  const [refreshItem] = useExplorerLazyQuery({ fetchPolicy: 'network-only' });
23
23
  const [editingItem, setEditingItem] = useState(null);
24
24
  const _editAction = {
25
- label: t('explorer.editItem'),
25
+ label: t('explorer.edit-item'),
26
26
  icon: _jsx(FaPen, {}),
27
27
  callback: item => {
28
28
  setEditingItem(item);
@@ -1 +1 @@
1
- {"version":3,"file":"useEditAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useEditAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAG1E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAC,SAAS,EAAa,EAAE,EAAE;IACrD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,WAAW,CAAC,GAAG,oBAAoB,CAAC,EAAC,WAAW,EAAE,cAAc,EAAC,CAAC,CAAC;IAE1E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAmB,IAAI,CAAC,CAAC;IAEvE,MAAM,WAAW,GAAgB;QAC7B,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC;QAC7B,IAAI,EAAE,KAAC,KAAK,KAAG;QACf,QAAQ,EAAE,IAAI,CAAC,EAAE;YACb,cAAc,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;KACJ,CAAC;IAEF,MAAM,qBAAqB,GAAG,CAAC,IAAe,EAAE,EAAE;QAC9C,WAAW,CAAC;YACR,SAAS,EAAE;gBACP,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,YAAY,EAAE,CAAC,IAAI,CAAC;gBACpB,OAAO,EAAE;oBACL;wBACI,SAAS,EAAE,qBAAqB,CAAC,KAAK;wBACtC,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,IAAI,CAAC,MAAM;qBACrB;iBACJ;aACJ;SACJ,CAAC,CAAC;QACH,cAAc,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC;IAEF,OAAO;QACH,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;QAC1C,SAAS,EACL,SAAS,IAAI,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,CAChC,KAAC,eAAe,IACZ,IAAI,QACJ,MAAM,EAAE,WAAW,CAAC,MAAM,EAC1B,OAAO,EAAE,WAAW,CAAC,SAAS,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,WAAW,CAAC,GACnD,CACL,CAAC,CAAC,CAAC,IAAI;KACf,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"useEditAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useEditAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,qBAAqB,EAAE,oBAAoB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AC,WAAW,CAAC,GACnD,CACL,CAAC,CAAC,CAAC,IAAI;KACf,CAAC;AACN,CAAC,CAAC"}
@@ -97,10 +97,10 @@ export declare enum VersionFieldScope {
97
97
  INHERITED = "INHERITED",// inherited values
98
98
  CURRENT = "CURRENT"
99
99
  }
100
- export interface ICommonFieldsReducerState<ValuesType> {
100
+ export interface ICommonFieldsReducerState<ValuesType, RecordFormAttributeFragmentType = RecordFormAttributeFragment> {
101
101
  record: IRecordIdentityWhoAmI;
102
102
  formElement: FormElement<IRequiredFieldsSettings>;
103
- attribute: RecordFormAttributeFragment;
103
+ attribute: RecordFormAttributeFragmentType;
104
104
  isReadOnly: boolean;
105
105
  activeScope: VersionFieldScope;
106
106
  values: {
@@ -1,3 +1,6 @@
1
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
2
+ // This file is released under LGPL V3
3
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
1
4
  import { useRunActionsListAndFormatOnValueLazyQuery } from '../../../../_gqlTypes';
2
5
  import { objectToNameValueArray } from '@leav/utils';
3
6
  export const useRunActionsListAndFormatOnValue = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"useRunActionsListAndFormatOnValue.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0CAA0C,EAAC,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAC,sBAAsB,EAAC,MAAM,aAAa,CAAC;AAGnD,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,EAAE;IAClD,MAAM,CAAC,uCAAuC,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC,CAAC,GAAG,0CAA0C,EAAE,CAAC;IAEjH,MAAM,8BAA8B,GAAG,KAAK,EACxC,OAAe,EACf,cAA8B,EAC9B,OAAsB,EACxB,EAAE;QACA,MAAM,MAAM,GAAG,MAAM,uCAAuC,CAAC;YACzD,SAAS,EAAE;gBACP,OAAO;gBACP,KAAK,EAAE;oBACH,SAAS,EAAE,cAAc,CAAC,SAAS;oBACnC,OAAO,EAAE,cAAc,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC5E,QAAQ,EAAE,cAAc,CAAC,QAAQ;wBAC7B,CAAC,CAAC,sBAAsB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;4BACpE,IAAI;4BACJ,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC;yBACvB,CAAC,CAAC;wBACL,CAAC,CAAC,IAAI;iBACb;gBACD,OAAO,EAAE,OAAO;oBACZ,CAAC,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,EAAC,CAAC,CAAC;oBACtF,CAAC,CAAC,IAAI;aACb;SACJ,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,IAAI,CAAC,8BAA8B,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;IACnE,CAAC,CAAC;IAEF,OAAO,EAAC,8BAA8B,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC;AAC5D,CAAC,CAAC"}
1
+ {"version":3,"file":"useRunActionsListAndFormatOnValue.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,0CAA0C,EAAC,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAC,sBAAsB,EAAC,MAAM,aAAa,CAAC;AAGnD,MAA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 @@ import { VersionFieldScope, FormElement, ICommonFieldsReducerState, StandardValu
3
3
  import { RecordFormElementsValueStandardValue } from '../../../../../hooks/useGetRecordForm/useGetRecordForm';
4
4
  import { IRecordIdentityWhoAmI } from '../../../../../types/records';
5
5
  import { IValueVersion } from '../../../../../types/values';
6
- import { ValueDetailsValueFragment } from '../../../../../_gqlTypes';
6
+ import { RecordFormAttributeStandardAttributeFragment, ValueDetailsValueFragment } from '../../../../../_gqlTypes';
7
7
  import { IRecordPropertyStandard } from '../../../../../_queries/records/getRecordPropertiesQuery';
8
8
  export type IdValue = string | null;
9
9
  export declare const newValueId = "__new__";
@@ -62,7 +62,7 @@ interface INotCalculated {
62
62
  calculatedValue: null;
63
63
  }
64
64
  export type CalculatedFlags = INotCalculated | ICalculatedOverride | ICalculatedNotOverride;
65
- export type IStandardFieldReducerState = ICommonFieldsReducerState<StandardFieldReducerValues> & {
65
+ export type IStandardFieldReducerState = ICommonFieldsReducerState<StandardFieldReducerValues, RecordFormAttributeStandardAttributeFragment> & {
66
66
  metadataEdit: boolean;
67
67
  } & InheritedFlags & CalculatedFlags;
68
68
  export declare enum StandardFieldReducerActionsTypes {
@@ -68,13 +68,7 @@ const getUserInputValue = (values) => values.filter(value => !value.isInherited
68
68
  const _computeScopeAndValues = (params) => {
69
69
  const { attribute, values, formVersion } = params;
70
70
  // Get override or inhertied values
71
- let valuesToHandle = getUserInputValue(values);
72
- if (!valuesToHandle.length) {
73
- valuesToHandle = getCalculatedValue(values);
74
- if (!valuesToHandle.length) {
75
- valuesToHandle = getInheritedValue(values);
76
- }
77
- }
71
+ const valuesToHandle = getUserInputValue(values);
78
72
  const preparedValues = valuesToHandle.length
79
73
  ? valuesToHandle.reduce((allValues, fieldValue, index) => ({
80
74
  ...allValues,
@@ -133,7 +127,7 @@ const _computeInheritedFlags = (fieldValues) => {
133
127
  };
134
128
  }
135
129
  const isInheritedValue = true;
136
- if (overrideValue.value === null) {
130
+ if (!overrideValue || overrideValue.value === null) {
137
131
  return {
138
132
  inheritedValue,
139
133
  isInheritedValue,
@@ -160,7 +154,7 @@ const _computeCalculatedFlags = (fieldValues) => {
160
154
  };
161
155
  }
162
156
  const isCalculatedValue = true;
163
- if (overrideValue.value === null) {
157
+ if (!overrideValue || overrideValue.value === null) {
164
158
  return {
165
159
  calculatedValue,
166
160
  isCalculatedValue,