@leav/ui 0.3.6-2becf21 → 0.3.6-42b642f

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 (109) hide show
  1. package/dist/__mocks__/common/form.js +2 -0
  2. package/dist/__mocks__/common/form.js.map +1 -1
  3. package/dist/_gqlTypes/index.d.ts +64 -0
  4. package/dist/_gqlTypes/index.js +44 -0
  5. package/dist/_gqlTypes/index.js.map +1 -1
  6. package/dist/_queries/records/getRecordPropertiesQuery.d.ts +21 -11
  7. package/dist/_queries/records/getRecordPropertiesQuery.js +6 -0
  8. package/dist/_queries/records/getRecordPropertiesQuery.js.map +1 -1
  9. package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
  10. package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
  11. package/dist/_queries/values/valueDetailsFragment.js +1 -0
  12. package/dist/_queries/values/valueDetailsFragment.js.map +1 -1
  13. package/dist/_utils/typeguards.d.ts +2 -0
  14. package/dist/_utils/typeguards.js +2 -0
  15. package/dist/_utils/typeguards.js.map +1 -0
  16. package/dist/components/Explorer/DataView.d.ts +9 -0
  17. package/dist/components/Explorer/DataView.js +48 -0
  18. package/dist/components/Explorer/DataView.js.map +1 -0
  19. package/dist/components/Explorer/Explorer.d.ts +8 -0
  20. package/dist/components/Explorer/Explorer.js +8 -0
  21. package/dist/components/Explorer/Explorer.js.map +1 -0
  22. package/dist/components/Explorer/index.d.ts +1 -0
  23. package/dist/components/Explorer/index.js +5 -0
  24. package/dist/components/Explorer/index.js.map +1 -0
  25. package/dist/components/Explorer/tsconfig.json +6 -0
  26. package/dist/components/Explorer/types.d.ts +12 -0
  27. package/dist/components/Explorer/types.js +2 -0
  28. package/dist/components/Explorer/types.js.map +1 -0
  29. package/dist/components/Explorer/useExplorerData.d.ts +5 -0
  30. package/dist/components/Explorer/useExplorerData.js +21 -0
  31. package/dist/components/Explorer/useExplorerData.js.map +1 -0
  32. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +5 -5
  33. package/dist/components/RecordEdition/EditRecordContent/_types.js +5 -5
  34. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  35. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +14 -11
  36. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  37. package/dist/components/RecordEdition/EditRecordContent/reducers/linkFieldReducer/linkFieldReducer.d.ts +2 -2
  38. package/dist/components/RecordEdition/EditRecordContent/reducers/linkFieldReducer/linkFieldReducer.js +8 -8
  39. package/dist/components/RecordEdition/EditRecordContent/reducers/linkFieldReducer/linkFieldReducer.js.map +1 -1
  40. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +22 -3
  41. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +70 -17
  42. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +1 -1
  43. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +7 -0
  44. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js +9 -0
  45. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +1 -0
  46. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +1 -0
  47. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +7 -0
  48. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +1 -0
  49. package/dist/components/RecordEdition/EditRecordContent/shared/AddValueBtn/AddValueBtn.d.ts +2 -2
  50. package/dist/components/RecordEdition/EditRecordContent/shared/AddValueBtn/AddValueBtn.js +2 -2
  51. package/dist/components/RecordEdition/EditRecordContent/shared/AddValueBtn/AddValueBtn.js.map +1 -1
  52. package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.d.ts +4 -4
  53. package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js +8 -8
  54. package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js.map +1 -1
  55. package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionIndicator/ValuesVersionIndicator.d.ts +2 -2
  56. package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionIndicator/ValuesVersionIndicator.js +2 -2
  57. package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionIndicator/ValuesVersionIndicator.js.map +1 -1
  58. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +9 -6
  59. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  60. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +21 -7
  61. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  62. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +1 -0
  63. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +37 -10
  64. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  65. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +15 -0
  66. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +91 -0
  67. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -0
  68. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +1 -0
  69. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +36 -12
  70. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  71. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +1 -0
  72. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +41 -14
  73. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  74. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +1 -0
  75. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +48 -9
  76. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  77. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/{DSInputPasswordWrapper.d.ts → DSRichTextWrapper.d.ts} +3 -2
  78. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +82 -0
  79. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -0
  80. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +3 -3
  81. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +18 -20
  82. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  83. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +13 -0
  84. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +79 -0
  85. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +1 -0
  86. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +9 -0
  87. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +107 -0
  88. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +1 -0
  89. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +1 -0
  90. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js +5 -0
  91. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +1 -0
  92. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +4 -4
  93. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
  94. package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.d.ts +6 -6
  95. package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.js +2 -2
  96. package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.js.map +1 -1
  97. package/dist/components/index.d.ts +1 -0
  98. package/dist/components/index.js +1 -0
  99. package/dist/components/index.js.map +1 -1
  100. package/dist/hooks/useLang/useLang.d.ts +1 -1
  101. package/dist/hooks/useLang/useLang.js +2 -2
  102. package/dist/hooks/useLang/useLang.js.map +1 -1
  103. package/dist/hooks/useRefreshFieldValues/useRefreshFieldValues.js +7 -2
  104. package/dist/hooks/useRefreshFieldValues/useRefreshFieldValues.js.map +1 -1
  105. package/dist/locales/en/shared.json +5 -0
  106. package/dist/locales/fr/shared.json +5 -0
  107. package/package.json +2 -2
  108. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputPasswordWrapper.js +0 -63
  109. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputPasswordWrapper.js.map +0 -1
@@ -1,63 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- // Copyright LEAV Solutions 2017
3
- // This file is released under LGPL V3
4
- // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
- import { KitInput } from 'aristid-ds';
6
- import { useState } from 'react';
7
- import { Form } from 'antd';
8
- import styled from 'styled-components';
9
- import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
10
- import { useValueDetailsButton } from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton';
11
- import { useLang } from '../../../../../../hooks';
12
- import { localizedTranslation } from '@leav/utils';
13
- const KitInputPasswordStyled = styled(KitInput.Password) `
14
- color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
15
-
16
- .kit-input-wrapper-helper {
17
- white-space: nowrap;
18
- text-overflow: ellipsis;
19
- overflow: hidden;
20
- }
21
- `;
22
- export const DSInputPasswordWrapper = ({ value, onChange, state, attribute, fieldValue, handleSubmit, shouldShowValueDetailsButton = false }) => {
23
- const { t } = useSharedTranslation();
24
- const { errors } = Form.Item.useStatus();
25
- const { onValueDetailsButtonClick } = useValueDetailsButton({
26
- value: fieldValue?.value,
27
- attribute
28
- });
29
- const [hasChanged, setHasChanged] = useState(false);
30
- const { lang: availableLang } = useLang();
31
- const _resetToInheritedValue = () => {
32
- setHasChanged(false);
33
- onChange(state.inheritedValue.raw_value);
34
- handleSubmit('', state.attribute.id);
35
- };
36
- const _handleOnBlur = (event) => {
37
- const valueToSubmit = event.target.value;
38
- if (valueToSubmit === '' && state.isInheritedValue) {
39
- _resetToInheritedValue();
40
- return;
41
- }
42
- if (hasChanged || !state.isInheritedValue) {
43
- handleSubmit(valueToSubmit, state.attribute.id);
44
- }
45
- onChange(event);
46
- };
47
- const _handleOnChange = (event) => {
48
- setHasChanged(true);
49
- const inputValue = event.target.value;
50
- if (state.isInheritedValue && inputValue === '' && event.type === 'click') {
51
- _resetToInheritedValue();
52
- return;
53
- }
54
- onChange(event);
55
- };
56
- const label = localizedTranslation(state.formElement.settings.label, availableLang);
57
- return (_jsx(KitInputPasswordStyled, { "data-testid": "kit-input-password", label: label, required: state.formElement.settings.required, status: errors.length > 0 ? 'error' : undefined, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, helper: state.isInheritedOverrideValue
58
- ? t('record_edition.inherited_input_helper', {
59
- inheritedValue: state.inheritedValue.raw_value
60
- })
61
- : undefined, value: value, disabled: state.isReadOnly, allowClear: !state.isInheritedNotOverrideValue, onBlur: _handleOnBlur, onChange: _handleOnChange, "$shouldHighlightColor": !hasChanged && state.isInheritedNotOverrideValue }));
62
- };
63
- //# sourceMappingURL=DSInputPasswordWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSInputPasswordWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputPasswordWrapper.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAwD,QAAQ,EAAC,MAAM,OAAO,CAAC;AAKtF,OAAO,EAAC,IAAI,EAAa,MAAM,MAAM,CAAC;AAEtC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,qBAAqB,EAAC,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