@leav/ui 1.5.0 → 1.5.1-10050692
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__mocks__/common/attribute.js +1 -0
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/library.d.ts +9 -0
- package/dist/_gqlTypes/index.d.ts +222 -27
- package/dist/_gqlTypes/index.js +150 -12
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +1 -0
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/_queries/libraries/libraryDetailsFragment.js +7 -0
- package/dist/_queries/libraries/libraryDetailsFragment.js.map +1 -1
- package/dist/components/Explorer/DataView.js +4 -3
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +1 -1
- package/dist/components/Explorer/Explorer.js +17 -4
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerFiltersAndSorts.d.ts +1 -0
- package/dist/components/Explorer/ExplorerFiltersAndSorts.js +2 -2
- package/dist/components/Explorer/ExplorerFiltersAndSorts.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.d.ts +1 -0
- package/dist/components/Explorer/ExplorerToolbar.js +2 -2
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
- package/dist/components/Explorer/IdCard.js +2 -2
- package/dist/components/Explorer/IdCard.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.js +13 -2
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.d.ts +13 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.js +20 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.d.ts +10 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.js +38 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.d.ts +8 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.js +16 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.d.ts +10 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.js +28 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.d.ts +5 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.js +12 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.js.map +1 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.d.ts +5 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.js +20 -0
- package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.d.ts +11 -0
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js +106 -0
- package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useExportMassAction.js +5 -6
- package/dist/components/Explorer/actions-mass/useExportMassAction.js.map +1 -1
- package/dist/components/Explorer/useLoadView.js +0 -2
- package/dist/components/Explorer/useLoadView.js.map +1 -1
- package/dist/components/Filters/_types.d.ts +4 -0
- package/dist/components/Filters/_types.js.map +1 -1
- package/dist/components/Filters/context/filtersReducer.js +20 -11
- package/dist/components/Filters/context/filtersReducer.js.map +1 -1
- package/dist/components/Filters/context/useFiltersReducer.d.ts +2 -1
- package/dist/components/Filters/context/useFiltersReducer.js +9 -5
- package/dist/components/Filters/context/useFiltersReducer.js.map +1 -1
- package/dist/components/Filters/context/useGetTreeFilters.d.ts +15 -0
- package/dist/components/Filters/context/useGetTreeFilters.js +63 -0
- package/dist/components/Filters/context/useGetTreeFilters.js.map +1 -0
- package/dist/components/Filters/filter-items/filter-type/TextAttributeDropDown.js +24 -7
- package/dist/components/Filters/filter-items/filter-type/TextAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js +15 -17
- package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -1
- package/dist/components/Filters/index.js.map +1 -1
- package/dist/components/Filters/prepareFiltersForRequest.js +14 -5
- package/dist/components/Filters/prepareFiltersForRequest.js.map +1 -1
- package/dist/components/Filters/useFilters.d.ts +4 -0
- package/dist/components/Filters/useTransformFilters.d.ts +5 -1
- package/dist/components/Filters/useTransformFilters.js +26 -3
- package/dist/components/Filters/useTransformFilters.js.map +1 -1
- package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js +1 -1
- package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +10 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js.map +1 -1
- package/dist/components/RecordHistory/RecordHistory.js +11 -6
- package/dist/components/RecordHistory/RecordHistory.js.map +1 -1
- package/dist/components/RecordHistory/RecordHistoryLogEntry.js +13 -7
- package/dist/components/RecordHistory/RecordHistoryLogEntry.js.map +1 -1
- package/dist/components/SearchModal/SearchModal.js +1 -1
- package/dist/components/SearchModal/SearchModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +4 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/components/TreePicker/TreesList/TreesList.js +1 -1
- package/dist/components/TreePicker/TreesList/TreesList.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +3 -1
- package/dist/hooks/useIFrameMessenger/messageHandlers.js +12 -0
- package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/schema.d.ts +38 -4
- package/dist/hooks/useIFrameMessenger/schema.js +10 -5
- package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/types.d.ts +20 -2
- package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +2 -0
- package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.d.ts +2 -0
- package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.d.ts +2 -0
- package/dist/locales/en/shared.json +14 -2
- package/dist/locales/fr/shared.json +14 -2
- package/package.json +6 -7
|
@@ -5,6 +5,7 @@ export declare const LanguageSchema: z.ZodString;
|
|
|
5
5
|
export declare const LibraryIdSchema: z.ZodString;
|
|
6
6
|
export declare const FontAwesomeIconSchema: z.ZodOptional<z.ZodString>;
|
|
7
7
|
export declare const WhereSchema: z.ZodUnion<readonly [z.ZodLiteral<"popup">, z.ZodLiteral<"slider">, z.ZodLiteral<"fullpage">]>;
|
|
8
|
+
export declare const FlapPanelIdSchema: z.ZodUnion<readonly [z.ZodLiteral<"info-history">, z.ZodLiteral<"thread">]>;
|
|
8
9
|
export declare const ExplorerPropsSchema: z.ZodObject<{
|
|
9
10
|
showSearch: z.ZodOptional<z.ZodBoolean>;
|
|
10
11
|
showFilters: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -15,7 +16,7 @@ export declare const ExplorerPropsSchema: z.ZodObject<{
|
|
|
15
16
|
noPagination: z.ZodOptional<z.ZodLiteral<true>>;
|
|
16
17
|
showActionsLabels: z.ZodOptional<z.ZodBoolean>;
|
|
17
18
|
defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
|
|
18
|
-
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
|
|
19
|
+
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">, z.ZodLiteral<"editAttribute">]>>>;
|
|
19
20
|
defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
|
|
20
21
|
}, z.core.$strip>;
|
|
21
22
|
export declare const ItemActionsSchema: z.ZodArray<z.ZodObject<{
|
|
@@ -27,6 +28,7 @@ export declare const ItemActionsSchema: z.ZodArray<z.ZodObject<{
|
|
|
27
28
|
}, z.core.$strip>>;
|
|
28
29
|
export declare const basePanelSchema: z.ZodObject<{
|
|
29
30
|
id: z.ZodString;
|
|
31
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
30
32
|
name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
31
33
|
isStandalone: z.ZodOptional<z.ZodBoolean>;
|
|
32
34
|
hideInSlider: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -40,9 +42,39 @@ export declare const creationPanelSchema: z.ZodObject<{
|
|
|
40
42
|
type: z.ZodLiteral<"creationForm">;
|
|
41
43
|
formId: z.ZodString;
|
|
42
44
|
attributeSource: z.ZodString;
|
|
45
|
+
isStandalone: z.ZodLiteral<true>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export declare const baseExplorerPanelSchema: z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<"explorer">;
|
|
49
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
50
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
51
|
+
where: z.ZodUnion<readonly [z.ZodLiteral<"popup">, z.ZodLiteral<"slider">, z.ZodLiteral<"fullpage">]>;
|
|
52
|
+
what: z.ZodLiteral<"record">;
|
|
53
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
54
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
55
|
+
onRowClick: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export declare const attributeExplorerPanelSchema: z.ZodObject<{
|
|
59
|
+
attributeSource: z.ZodString;
|
|
60
|
+
libraryId: z.ZodString;
|
|
61
|
+
explorerProps: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
showSearch: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
showFilters: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
+
showSorts: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
freezeView: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
showAttributeLabels: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
creationFormId: z.ZodOptional<z.ZodString>;
|
|
68
|
+
noPagination: z.ZodOptional<z.ZodLiteral<true>>;
|
|
69
|
+
showActionsLabels: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
|
|
71
|
+
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">, z.ZodLiteral<"editAttribute">]>>>;
|
|
72
|
+
defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
43
74
|
}, z.core.$strip>;
|
|
44
75
|
export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
45
76
|
id: z.ZodString;
|
|
77
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
46
78
|
name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
47
79
|
isStandalone: z.ZodOptional<z.ZodBoolean>;
|
|
48
80
|
hideInSlider: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -58,7 +90,7 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
58
90
|
}, z.core.$strip>>;
|
|
59
91
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
60
92
|
attributeSource: z.ZodString;
|
|
61
|
-
libraryId: z.
|
|
93
|
+
libraryId: z.ZodString;
|
|
62
94
|
explorerProps: z.ZodOptional<z.ZodObject<{
|
|
63
95
|
showSearch: z.ZodOptional<z.ZodBoolean>;
|
|
64
96
|
showFilters: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -69,7 +101,7 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
69
101
|
noPagination: z.ZodOptional<z.ZodLiteral<true>>;
|
|
70
102
|
showActionsLabels: z.ZodOptional<z.ZodBoolean>;
|
|
71
103
|
defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
|
|
72
|
-
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
|
|
104
|
+
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">, z.ZodLiteral<"editAttribute">]>>>;
|
|
73
105
|
defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
|
|
74
106
|
}, z.core.$strip>>;
|
|
75
107
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -83,7 +115,7 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
83
115
|
noPagination: z.ZodOptional<z.ZodLiteral<true>>;
|
|
84
116
|
showActionsLabels: z.ZodOptional<z.ZodBoolean>;
|
|
85
117
|
defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
|
|
86
|
-
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
|
|
118
|
+
defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">, z.ZodLiteral<"editAttribute">]>>>;
|
|
87
119
|
defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
|
|
88
120
|
}, z.core.$strip>>;
|
|
89
121
|
}, z.core.$strip>]>>, z.ZodObject<{
|
|
@@ -97,9 +129,11 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
97
129
|
type: z.ZodLiteral<"creationForm">;
|
|
98
130
|
formId: z.ZodString;
|
|
99
131
|
attributeSource: z.ZodString;
|
|
132
|
+
isStandalone: z.ZodLiteral<true>;
|
|
100
133
|
}, z.core.$strip>]>>;
|
|
101
134
|
export declare const PanelIFrameSchema: z.ZodIntersection<z.ZodObject<{
|
|
102
135
|
id: z.ZodString;
|
|
136
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
103
137
|
name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
104
138
|
isStandalone: z.ZodOptional<z.ZodBoolean>;
|
|
105
139
|
hideInSlider: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -8,6 +8,7 @@ export const LanguageSchema = z.string();
|
|
|
8
8
|
export const LibraryIdSchema = z.string();
|
|
9
9
|
export const FontAwesomeIconSchema = z.string().regex(FONT_AWESOME_ICON_REGEX).optional();
|
|
10
10
|
export const WhereSchema = z.union([z.literal('popup'), z.literal('slider'), z.literal('fullpage')]);
|
|
11
|
+
export const FlapPanelIdSchema = z.union([z.literal('info-history'), z.literal('thread')]);
|
|
11
12
|
export const ExplorerPropsSchema = z.object({
|
|
12
13
|
showSearch: z.boolean().optional(),
|
|
13
14
|
showFilters: z.boolean().optional(),
|
|
@@ -18,7 +19,9 @@ export const ExplorerPropsSchema = z.object({
|
|
|
18
19
|
noPagination: z.literal(true).optional(),
|
|
19
20
|
showActionsLabels: z.boolean().optional(),
|
|
20
21
|
defaultPrimaryActions: z.array(z.union([z.literal('create')])).optional(),
|
|
21
|
-
defaultMassActions: z
|
|
22
|
+
defaultMassActions: z
|
|
23
|
+
.array(z.union([z.literal('deactivate'), z.literal('export'), z.literal('editAttribute')]))
|
|
24
|
+
.optional(),
|
|
22
25
|
defaultActionsForItem: z
|
|
23
26
|
.array(z.union([z.literal('replaceLink'), z.literal('remove'), z.literal('activate')]))
|
|
24
27
|
.optional(),
|
|
@@ -36,6 +39,7 @@ export const ItemActionsSchema = z
|
|
|
36
39
|
});
|
|
37
40
|
export const basePanelSchema = z.object({
|
|
38
41
|
id: PanelIdSchema,
|
|
42
|
+
icon: FontAwesomeIconSchema,
|
|
39
43
|
name: z.record(LanguageSchema, z.string()).optional(),
|
|
40
44
|
isStandalone: z.boolean().optional(),
|
|
41
45
|
hideInSlider: z.boolean().optional(),
|
|
@@ -53,21 +57,22 @@ export const creationPanelSchema = z.object({
|
|
|
53
57
|
type: z.literal('creationForm'),
|
|
54
58
|
formId: z.string(),
|
|
55
59
|
attributeSource: z.string(),
|
|
60
|
+
isStandalone: z.literal(true),
|
|
56
61
|
});
|
|
57
|
-
const baseExplorerPanelSchema = z.object({
|
|
62
|
+
export const baseExplorerPanelSchema = z.object({
|
|
58
63
|
type: z.literal('explorer'),
|
|
59
64
|
viewId: z.string().optional(),
|
|
60
65
|
actions: ItemActionsSchema,
|
|
61
66
|
});
|
|
62
|
-
const
|
|
67
|
+
export const attributeExplorerPanelSchema = z.object({
|
|
63
68
|
attributeSource: z.string(),
|
|
64
|
-
libraryId: LibraryIdSchema
|
|
69
|
+
libraryId: LibraryIdSchema,
|
|
65
70
|
explorerProps: ExplorerPropsSchema.optional(),
|
|
66
71
|
});
|
|
67
72
|
const libraryExplorerPanelSchema = z.object({
|
|
68
73
|
explorerProps: ExplorerPropsSchema.optional(),
|
|
69
74
|
});
|
|
70
|
-
const explorerPanelSchema = baseExplorerPanelSchema.and(z.union([
|
|
75
|
+
const explorerPanelSchema = baseExplorerPanelSchema.and(z.union([attributeExplorerPanelSchema, libraryExplorerPanelSchema]));
|
|
71
76
|
export const PanelSchema = basePanelSchema.and(z.union([explorerPanelSchema, iframePanelSchema, editionPanelSchema, creationPanelSchema]));
|
|
72
77
|
export const PanelIFrameSchema = basePanelSchema.and(iframePanelSchema);
|
|
73
78
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/schema.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACzC,MAAM,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C,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,OAAO,EAAE,iBAAiB;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,SAAS,EAAE,eAAe;IAC1B,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,GAAG,CACnD,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,EAAE,0BAA0B,CAAC,CAAC,CACtE,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAC1C,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC,CAC7F,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport * as z from 'zod/v4';\n\nexport const FONT_AWESOME_ICON_REGEX = /^fa-/;\n\nexport const PanelIdSchema = z.string();\nexport const LanguageSchema = z.string();\nexport const LibraryIdSchema = z.string();\nexport const FontAwesomeIconSchema = z.string().regex(FONT_AWESOME_ICON_REGEX).optional();\n\nexport const WhereSchema = z.union([z.literal('popup'), z.literal('slider'), z.literal('fullpage')]);\n\nexport const FlapPanelIdSchema = z.union([z.literal('info-history'), z.literal('thread')]);\n\nexport const ExplorerPropsSchema = z.object({\n showSearch: z.boolean().optional(),\n showFilters: z.boolean().optional(),\n showSorts: z.boolean().optional(),\n freezeView: z.boolean().optional(),\n showAttributeLabels: z.boolean().optional(),\n creationFormId: z.string().optional(),\n noPagination: z.literal(true).optional(),\n showActionsLabels: z.boolean().optional(),\n defaultPrimaryActions: z.array(z.union([z.literal('create')])).optional(),\n defaultMassActions: z\n .array(z.union([z.literal('deactivate'), z.literal('export'), z.literal('editAttribute')]))\n .optional(),\n defaultActionsForItem: z\n .array(z.union([z.literal('replaceLink'), z.literal('remove'), z.literal('activate')]))\n .optional(),\n});\n\nexport const ItemActionsSchema = z\n .array(\n z.object({\n where: WhereSchema,\n what: z.literal('record'),\n icon: FontAwesomeIconSchema,\n label: z.record(LanguageSchema, z.string()),\n onRowClick: z.boolean().optional(),\n }),\n )\n .refine(actions => actions.reduce((acc, action) => (action.onRowClick ? acc + 1 : acc), 0) <= 1, {\n message: 'At most one action must have onRowClick set to true',\n });\n\nexport const basePanelSchema = z.object({\n id: PanelIdSchema,\n icon: FontAwesomeIconSchema,\n name: z.record(LanguageSchema, z.string()).optional(),\n isStandalone: z.boolean().optional(),\n hideInSlider: z.boolean().optional(),\n});\n\nexport const iframePanelSchema = z.object({\n type: z.literal('custom'),\n iframeSource: z.string(),\n isSelfContaining: z.boolean().optional(),\n});\n\nconst editionPanelSchema = z.object({\n type: z.literal('editionForm'),\n formId: z.string(),\n});\n\nexport const creationPanelSchema = z.object({\n type: z.literal('creationForm'),\n formId: z.string(),\n attributeSource: z.string(),\n isStandalone: z.literal(true),\n});\n\nexport const baseExplorerPanelSchema = z.object({\n type: z.literal('explorer'),\n viewId: z.string().optional(),\n actions: ItemActionsSchema,\n});\n\nexport const attributeExplorerPanelSchema = z.object({\n attributeSource: z.string(),\n libraryId: LibraryIdSchema,\n explorerProps: ExplorerPropsSchema.optional(),\n});\n\nconst libraryExplorerPanelSchema = z.object({\n explorerProps: ExplorerPropsSchema.optional(),\n});\n\nconst explorerPanelSchema = baseExplorerPanelSchema.and(\n z.union([attributeExplorerPanelSchema, libraryExplorerPanelSchema]),\n);\n\nexport const PanelSchema = basePanelSchema.and(\n z.union([explorerPanelSchema, iframePanelSchema, editionPanelSchema, creationPanelSchema]),\n);\n\nexport const PanelIFrameSchema = basePanelSchema.and(iframePanelSchema);\n"]}
|
|
@@ -3,7 +3,7 @@ import type * as z from 'zod/v4';
|
|
|
3
3
|
import { type KitNotification } from 'aristid-ds';
|
|
4
4
|
import { type IKitConfirmDialog } from 'aristid-ds/dist/Kit/Feedback/Modal/types';
|
|
5
5
|
import { type ToastedAlertProps } from 'aristid-ds/dist/Kit/Feedback/Alert/types';
|
|
6
|
-
import { type LibraryIdSchema, type WhereSchema, type PanelIdSchema, type PanelSchema, type PanelIFrameSchema } from '../../hooks/useIFrameMessenger/schema';
|
|
6
|
+
import { type LibraryIdSchema, type WhereSchema, type PanelIdSchema, type PanelSchema, type PanelIFrameSchema, type FlapPanelIdSchema, type attributeExplorerPanelSchema, type baseExplorerPanelSchema } from '../../hooks/useIFrameMessenger/schema';
|
|
7
7
|
export declare const packetId = "__fromIframeMessenger";
|
|
8
8
|
export interface IEncodedMessage {
|
|
9
9
|
payload: string;
|
|
@@ -51,10 +51,12 @@ export type UnregisterMessage = IMessageBase & {
|
|
|
51
51
|
id: string;
|
|
52
52
|
};
|
|
53
53
|
export type Panel = z.infer<typeof PanelSchema>;
|
|
54
|
+
export type AttributeExplorerPanel = Panel & z.infer<typeof baseExplorerPanelSchema> & z.infer<typeof attributeExplorerPanelSchema>;
|
|
54
55
|
export type LibraryId = z.infer<typeof LibraryIdSchema>;
|
|
55
56
|
export type PanelId = z.infer<typeof PanelIdSchema>;
|
|
56
57
|
export type Where = z.infer<typeof WhereSchema>;
|
|
57
58
|
type PanelIFrame = z.infer<typeof PanelIFrameSchema>;
|
|
59
|
+
type FlapPanelId = z.infer<typeof FlapPanelIdSchema>;
|
|
58
60
|
export type NavigateToPanelMessage = IMessageBase & {
|
|
59
61
|
type: 'navigate-to-panel';
|
|
60
62
|
data: {
|
|
@@ -62,6 +64,9 @@ export type NavigateToPanelMessage = IMessageBase & {
|
|
|
62
64
|
libraryId: LibraryId;
|
|
63
65
|
panelId?: PanelId;
|
|
64
66
|
recordId?: string;
|
|
67
|
+
flapRecordId?: string;
|
|
68
|
+
flapLibraryId?: LibraryId;
|
|
69
|
+
flapPanelId?: FlapPanelId;
|
|
65
70
|
};
|
|
66
71
|
};
|
|
67
72
|
export type ClosePanelMessage = IMessageBase & {
|
|
@@ -92,7 +97,18 @@ export type MessageToPanelMessage = IMessageBase & {
|
|
|
92
97
|
payload: unknown;
|
|
93
98
|
};
|
|
94
99
|
};
|
|
95
|
-
export type
|
|
100
|
+
export type OpenFlapPanelMessage = IMessageBase & {
|
|
101
|
+
type: 'open-flap-panel';
|
|
102
|
+
data: {
|
|
103
|
+
flapRecordId: string;
|
|
104
|
+
flapLibraryId: LibraryId;
|
|
105
|
+
flapPanelId: FlapPanelId;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export type CloseFlapPanelMessage = IMessageBase & {
|
|
109
|
+
type: 'close-flap-panel';
|
|
110
|
+
};
|
|
111
|
+
export type MessageToParent = ModalConfirmMessage | AlertMessage | NotificationMessage | SimpleMessage | RegisterMessage | UnregisterMessage | NavigateToPanelMessage | ClosePanelMessage | NavigateToIframeMessage | MessageToPanelMessage | OpenFlapPanelMessage | CloseFlapPanelMessage;
|
|
96
112
|
export type MessageFromParent = (IMessageBase & {
|
|
97
113
|
type: 'on-call-callback';
|
|
98
114
|
path: string;
|
|
@@ -117,6 +133,8 @@ export interface IUseIFrameMessengerOptions {
|
|
|
117
133
|
onNavigateToPanel?: (data: NavigateToPanelMessage['data']) => void;
|
|
118
134
|
onClosePanel?: (data: ClosePanelMessage['data']) => void;
|
|
119
135
|
onNavigateToIframe?: (data: NavigateToIframeMessage['data']) => void;
|
|
136
|
+
onOpenFlapPanel?: (data: OpenFlapPanelMessage['data']) => void;
|
|
137
|
+
onCloseFlapPanel?: () => void;
|
|
120
138
|
};
|
|
121
139
|
}
|
|
122
140
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/types.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,QAAQ,GAAG,uBAAuB,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type RefObject, type ComponentProps, type Key, type JSXElementConstructor} from 'react';\nimport type * as z from 'zod/v4';\nimport {type KitNotification} from 'aristid-ds';\nimport {type IKitConfirmDialog} from 'aristid-ds/dist/Kit/Feedback/Modal/types';\nimport {type ToastedAlertProps} from 'aristid-ds/dist/Kit/Feedback/Alert/types';\nimport {\n type LibraryIdSchema,\n type WhereSchema,\n type PanelIdSchema,\n type PanelSchema,\n type PanelIFrameSchema,\n type FlapPanelIdSchema,\n type attributeExplorerPanelSchema,\n type baseExplorerPanelSchema,\n} from '_ui/hooks/useIFrameMessenger/schema';\n\nexport const packetId = '__fromIframeMessenger';\n\nexport interface IEncodedMessage {\n payload: string;\n [packetId]: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ComponentPropsWithKey<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> =\n ComponentProps<T> & {\n key?: Key;\n };\n\nexport interface IMessageBase {\n __frameId?: string;\n}\n\nexport type ModalConfirmMessage = IMessageBase & {\n type: 'modal-confirm';\n id: string;\n data: IKitConfirmDialog;\n overrides?: string[];\n};\n\nexport type AlertMessage = IMessageBase & {\n type: 'alert';\n id: string;\n data: ToastedAlertProps;\n overrides?: string[];\n};\n\nexport type NotificationMessage = IMessageBase & {\n type: 'notification';\n id: string;\n data: ComponentPropsWithKey<typeof KitNotification>;\n overrides?: string[];\n};\n\nexport type ChangeLanguageMessage = IMessageBase & {\n type: 'change-language';\n language: string;\n};\n\nexport type SimpleMessage = IMessageBase & {\n type: 'message';\n id: string;\n data: unknown;\n};\n\nexport type RegisterMessage = IMessageBase & {\n type: 'register';\n id: string;\n};\n\nexport type UnregisterMessage = IMessageBase & {\n type: 'unregister';\n id: string;\n};\n\nexport type Panel = z.infer<typeof PanelSchema>;\n\nexport type AttributeExplorerPanel = Panel &\n z.infer<typeof baseExplorerPanelSchema> &\n z.infer<typeof attributeExplorerPanelSchema>;\n\nexport type LibraryId = z.infer<typeof LibraryIdSchema>;\n\nexport type PanelId = z.infer<typeof PanelIdSchema>;\n\nexport type Where = z.infer<typeof WhereSchema>;\n\ntype PanelIFrame = z.infer<typeof PanelIFrameSchema>;\n\ntype FlapPanelId = z.infer<typeof FlapPanelIdSchema>;\n\nexport type NavigateToPanelMessage = IMessageBase & {\n type: 'navigate-to-panel';\n data: {\n where: Where;\n libraryId: LibraryId;\n panelId?: PanelId;\n recordId?: string;\n flapRecordId?: string;\n flapLibraryId?: LibraryId;\n flapPanelId?: FlapPanelId;\n };\n};\n\nexport type ClosePanelMessage = IMessageBase & {\n type: 'close-panel';\n data: {\n recordId: string;\n where: string;\n recordPanelId: string;\n };\n};\n\nexport type NavigateToIframeMessage = IMessageBase & {\n type: 'navigate-to-iframe';\n data: {\n panel: PanelIFrame;\n destination: {libraryId: LibraryId};\n where: Where;\n recordId: string;\n recordPanelId: string;\n };\n};\n\nexport type MessageToPanelMessage = IMessageBase & {\n type: 'message-to-panel';\n data: {\n type: string;\n target?: string;\n payload: unknown;\n };\n};\n\nexport type OpenFlapPanelMessage = IMessageBase & {\n type: 'open-flap-panel';\n data: {\n flapRecordId: string;\n flapLibraryId: LibraryId;\n flapPanelId: FlapPanelId;\n };\n};\n\nexport type CloseFlapPanelMessage = IMessageBase & {\n type: 'close-flap-panel';\n};\n\nexport type MessageToParent =\n | ModalConfirmMessage\n | AlertMessage\n | NotificationMessage\n | SimpleMessage\n | RegisterMessage\n | UnregisterMessage\n | NavigateToPanelMessage\n | ClosePanelMessage\n | NavigateToIframeMessage\n | MessageToPanelMessage\n | OpenFlapPanelMessage\n | CloseFlapPanelMessage;\n\nexport type MessageFromParent =\n | (IMessageBase & {\n type: 'on-call-callback';\n path: string;\n data: unknown;\n })\n | ChangeLanguageMessage;\n\nexport type Message = MessageToParent | MessageFromParent;\n\nexport type MessageHandler<T = Message> = (message: T, dispatch: MessageDispatcher<T>) => void;\nexport type MessageDispatcher<T = Message> = (message: T, frameId?: string) => void;\n\nexport type CallCbFunction = (path: string, data: unknown, frameId: string) => void;\n\nexport type CallbackFunction = (...args: never[]) => void;\nexport type Callbacks = Record<string, Record<string, CallbackFunction>>;\n\nexport type MessageToPanelMessageHandler = (data: MessageToPanelMessage['data']['payload']) => void;\nexport type AddMessageToPanelMessageHandler = (type: string, handler: MessageToPanelMessageHandler) => void;\n\nexport interface IUseIFrameMessengerOptions {\n ref?: RefObject<HTMLIFrameElement>;\n id?: string;\n handlers?: {\n onModalConfirm?: (\n data: ModalConfirmMessage['data'],\n id: string,\n dispatch: MessageDispatcher,\n callCb: CallCbFunction,\n ) => void;\n onAlert?: (data: AlertMessage['data'], id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;\n onNotification?: (\n data: NotificationMessage['data'],\n id: string,\n dispatch: MessageDispatcher,\n callCb: CallCbFunction,\n ) => void;\n onMessage?: (data: unknown, id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;\n onNavigateToPanel?: (data: NavigateToPanelMessage['data']) => void;\n onClosePanel?: (data: ClosePanelMessage['data']) => void;\n onNavigateToIframe?: (data: NavigateToIframeMessage['data']) => void;\n onOpenFlapPanel?: (data: OpenFlapPanelMessage['data']) => void;\n onCloseFlapPanel?: () => void;\n };\n}\n"]}
|
|
@@ -16,4 +16,6 @@ export declare const useIFrameMessenger: (options?: IUseIFrameMessengerOptions)
|
|
|
16
16
|
closePanel: (data: import("./types").ClosePanelMessage["data"]) => void;
|
|
17
17
|
navigateToIframe: (data: import("./types").NavigateToIframeMessage["data"]) => void;
|
|
18
18
|
messageToPanel: (data: import("./types").MessageToPanelMessage["data"]) => void;
|
|
19
|
+
openFlapPanel: (data: import("./types").OpenFlapPanelMessage["data"]) => void;
|
|
20
|
+
closeFlapPanel: () => void;
|
|
19
21
|
};
|
|
@@ -10,4 +10,6 @@ export declare const IframeMessengerClientContext: import("react").Context<{
|
|
|
10
10
|
closePanel: (data: import("../useIFrameMessenger/types").ClosePanelMessage["data"]) => void;
|
|
11
11
|
navigateToIframe: (data: import("../useIFrameMessenger/types").NavigateToIframeMessage["data"]) => void;
|
|
12
12
|
messageToPanel: (data: import("../useIFrameMessenger/types").MessageToPanelMessage["data"]) => void;
|
|
13
|
+
openFlapPanel: (data: import("../useIFrameMessenger/types").OpenFlapPanelMessage["data"]) => void;
|
|
14
|
+
closeFlapPanel: () => void;
|
|
13
15
|
}>;
|
|
@@ -10,4 +10,6 @@ export declare const useIFrameMessengerClient: () => {
|
|
|
10
10
|
closePanel: (data: import("../useIFrameMessenger/types").ClosePanelMessage["data"]) => void;
|
|
11
11
|
navigateToIframe: (data: import("../useIFrameMessenger/types").NavigateToIframeMessage["data"]) => void;
|
|
12
12
|
messageToPanel: (data: import("../useIFrameMessenger/types").MessageToPanelMessage["data"]) => void;
|
|
13
|
+
openFlapPanel: (data: import("../useIFrameMessenger/types").OpenFlapPanelMessage["data"]) => void;
|
|
14
|
+
closeFlapPanel: () => void;
|
|
13
15
|
};
|
|
@@ -746,9 +746,21 @@
|
|
|
746
746
|
"deactivate": "Deactivate",
|
|
747
747
|
"deactivate_message": "Elements deleted",
|
|
748
748
|
"deactivate_description": "{{count, number}}/{{total, number}} element for which you have permissions have been deleted. Others remain unchanged.",
|
|
749
|
+
"editAttribute": "Edit an attribute",
|
|
750
|
+
"editAttribute_description_one": "{{count, number}} element will be updated.",
|
|
751
|
+
"editAttribute_description_other": "{{total, number}} elements will be updated.",
|
|
752
|
+
"editAttribute_attribute_select_title": "Attribute to edit",
|
|
753
|
+
"editAttribute_attribute_select_placeholder": "Select an attribute",
|
|
754
|
+
"editAttribute_value_select_placeholder": "Select a value",
|
|
755
|
+
"editAttribute_value_occurrences_to_edit_one": "{{count, number}} element to edit",
|
|
756
|
+
"editAttribute_value_occurrences_to_edit_other": "{{count, number}} elements to edit",
|
|
757
|
+
"editAttribute_value_undefined": "Undefined",
|
|
758
|
+
"editAttribute_submit_notification_title": "Bulk edit request",
|
|
759
|
+
"editAttribute_submit_notification_description": "Your request to edit {{counter, number}} items has been received. You will be notified once the operation is complete.",
|
|
760
|
+
"editAttribute_submit_error": "An error occurred while requesting a bulk edit. Please contact an administrator.",
|
|
749
761
|
"export": "Export",
|
|
750
|
-
"export_message_one": "
|
|
751
|
-
"export_message_other": "
|
|
762
|
+
"export_message_one": "Export element stated",
|
|
763
|
+
"export_message_other": "Export elements stated",
|
|
752
764
|
"export_description_one": "{{total, number}} element will be exported.",
|
|
753
765
|
"export_description_other": "{{total, number}} elements will be exported.",
|
|
754
766
|
"export_error_description_one": "An error occurred while exporting the selected record.",
|
|
@@ -746,9 +746,21 @@
|
|
|
746
746
|
"deactivate": "Supprimer",
|
|
747
747
|
"deactivate_message": "Élements supprimés",
|
|
748
748
|
"deactivate_description": "{{count, number}}/{{total, number}} éléments pour lesquels vous disposez des permissions nécessaires ont été supprimés. Les autres éléments restent inchangés.",
|
|
749
|
+
"editAttribute": "Modifier un attribut",
|
|
750
|
+
"editAttribute_description_one": "{{count, number}} élément à modifier",
|
|
751
|
+
"editAttribute_description_other": "{{count, number}} éléments à modifier",
|
|
752
|
+
"editAttribute_attribute_select_title": "Attribut à modifier",
|
|
753
|
+
"editAttribute_attribute_select_placeholder": "Sélectionnez un attribut",
|
|
754
|
+
"editAttribute_value_select_placeholder": "Sélectionnez une valeur",
|
|
755
|
+
"editAttribute_value_occurrences_to_edit_one": "{{count, number}} élément à traiter",
|
|
756
|
+
"editAttribute_value_occurrences_to_edit_other": "{{count, number}} éléments à traiter",
|
|
757
|
+
"editAttribute_value_undefined": "Non défini",
|
|
758
|
+
"editAttribute_submit_notification_title": "Demande de modification en masse",
|
|
759
|
+
"editAttribute_submit_notification_description": "Votre demande de modification de {{counter, number}} éléments a bien été prise en compte. Vous serez notifié une fois l'opération terminée.",
|
|
760
|
+
"editAttribute_submit_error": "Une erreur est survenue lors de la demande d'une modification en masse. Veuillez contacter un administrateur.",
|
|
749
761
|
"export": "Exporter",
|
|
750
|
-
"export_message_one": "
|
|
751
|
-
"export_message_other": "
|
|
762
|
+
"export_message_one": "Export de l'élément en cours",
|
|
763
|
+
"export_message_other": "Export des éléments en cours",
|
|
752
764
|
"export_description_one": "{{total, number}} éléments va être exporté.",
|
|
753
765
|
"export_description_other": "{{total, number}} éléments vont être exportés.",
|
|
754
766
|
"export_error_description_one": "Une erreur s'est produite lors de l'exportation de l'enregistrements sélectionné.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leav/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1-10050692",
|
|
4
4
|
"description": "Shared React components and hooks",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepublishOnly": "yarn build",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"test": "jest",
|
|
13
13
|
"test:ci": "jest --maxWorkers=2",
|
|
14
14
|
"test:commit": "jest --maxWorkers=50% --onlyChanged",
|
|
15
|
-
"create_comp": "scripts/createComponent.js",
|
|
16
15
|
"publish-ui": "yarn npm publish --access public",
|
|
17
16
|
"get-version": "jq -r '.version' package.json",
|
|
18
17
|
"set-version": "jq --arg v $1 '.version = $v' package.json > package.tmp.json && mv package.tmp.json package.json"
|
|
@@ -45,10 +44,10 @@
|
|
|
45
44
|
"@types/react-table": "7.7.12",
|
|
46
45
|
"@types/uuid": "^9",
|
|
47
46
|
"antd": "5.22.2",
|
|
48
|
-
"aristid-ds": "14.0.0-
|
|
47
|
+
"aristid-ds": "14.0.0-5ef4643",
|
|
49
48
|
"babel-jest": "29.3.1",
|
|
50
49
|
"commander": "9.5.0",
|
|
51
|
-
"graphql": "16.
|
|
50
|
+
"graphql": "16.12.0",
|
|
52
51
|
"i18next": "22.5.0",
|
|
53
52
|
"jest": "29.0.3",
|
|
54
53
|
"jest-environment-jsdom": "29.3.1",
|
|
@@ -61,13 +60,13 @@
|
|
|
61
60
|
"ts-jest": "29.0.1",
|
|
62
61
|
"tsc-alias": "1.8.8",
|
|
63
62
|
"typescript": "5.5.3",
|
|
64
|
-
"vite": "
|
|
63
|
+
"vite": "7.2.2"
|
|
65
64
|
},
|
|
66
65
|
"peerDependencies": {
|
|
67
66
|
"@ant-design/icons": ">=5.2",
|
|
68
67
|
"@apollo/client": ">=3.8.1",
|
|
69
68
|
"antd": "5.22.2",
|
|
70
|
-
"aristid-ds": "14.0.0-
|
|
69
|
+
"aristid-ds": "14.0.0-5ef4643",
|
|
71
70
|
"dayjs": "^1.11.13",
|
|
72
71
|
"i18next": "22.5",
|
|
73
72
|
"react": "18.2.0",
|
|
@@ -82,7 +81,7 @@
|
|
|
82
81
|
"@ckeditor/ckeditor5-react": "6.1.0",
|
|
83
82
|
"@dnd-kit/core": "6.1.0",
|
|
84
83
|
"@dnd-kit/sortable": "8.0.0",
|
|
85
|
-
"@leav/utils": "1.5.
|
|
84
|
+
"@leav/utils": "1.5.1",
|
|
86
85
|
"@uidotdev/usehooks": "2.4.1",
|
|
87
86
|
"dompurify": "3.2.4",
|
|
88
87
|
"html-react-parser": "4.2.2",
|