@solidstarters/solid-core-ui 1.1.38 → 1.1.40
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/components/core/kanban/KanbanBoard.d.ts +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +4 -3
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.d.ts +1 -1
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +48 -25
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.d.ts +4 -1
- package/dist/components/core/kanban/KanbanColumn.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.js +6 -5
- package/dist/components/core/kanban/KanbanColumn.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts +2 -0
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +174 -125
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewFields.d.ts +11 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.js +144 -0
- package/dist/components/core/kanban/SolidKanbanViewFields.js.map +1 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js +87 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +1 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.js +74 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.js.map +1 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js +21 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.js.map +1 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +12 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js +82 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js +22 -0
- package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +32 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +24 -0
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js +12 -0
- package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +16 -0
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.js.map +1 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.d.ts +4 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.d.ts.map +1 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js +8 -0
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +1 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +28 -27
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListViewColumn.js +1 -1
- package/dist/components/core/list/SolidListViewColumn.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.d.ts +2 -0
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -0
- package/dist/components/core/list/SolidListViewConfigure.js +115 -0
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -0
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +48 -4
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.js +10 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.js.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.js +7 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.js.map +1 -0
- package/dist/components/core/model/FieldMetaDataForm.js +1 -6
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +4 -0
- package/dist/helpers/registry.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/globals.css +20 -1
- package/dist/resources/themes/solid-dark-purple/theme.css +1 -0
- package/dist/resources/themes/solid-light-purple/theme.css +5 -4
- package/package.json +2 -1
- package/src/components/core/kanban/KanbanBoard.tsx +9 -4
- package/src/components/core/kanban/KanbanCard.tsx +58 -31
- package/src/components/core/kanban/KanbanColumn.tsx +65 -59
- package/src/components/core/kanban/SolidKanbanView.tsx +195 -96
- package/src/components/core/kanban/SolidKanbanViewFields.tsx +163 -0
- package/src/components/core/kanban/SolidManyToOneFilterElement.tsx +59 -0
- package/src/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +50 -0
- package/src/components/core/kanban/SolidSelectionStaticFilterElement.tsx +32 -0
- package/src/components/core/kanban/SolidVarInputsFilterElement.tsx +184 -0
- package/src/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +9 -0
- package/src/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +13 -0
- package/src/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +23 -0
- package/src/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +14 -0
- package/src/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +13 -0
- package/src/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +9 -0
- package/src/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +12 -0
- package/src/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +9 -0
- package/src/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +14 -0
- package/src/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +13 -0
- package/src/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +9 -0
- package/src/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +68 -0
- package/src/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +60 -0
- package/src/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +13 -0
- package/src/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +9 -0
- package/src/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +13 -0
- package/src/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +14 -0
- package/src/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +29 -0
- package/src/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +12 -0
- package/src/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +13 -0
- package/src/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +16 -0
- package/src/components/core/list/SolidListView.tsx +24 -20
- package/src/components/core/list/SolidListViewColumn.tsx +1 -1
- package/src/components/core/{common/SolidConfigureLayoutElement.tsx → list/SolidListViewConfigure.tsx} +118 -70
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +45 -10
- package/src/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +19 -0
- package/src/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy.tsx +11 -0
- package/src/components/core/model/FieldMetaDataForm.tsx +6 -6
- package/src/helpers/registry.ts +4 -0
- package/src/index.ts +1 -1
- package/src/resources/globals.css +20 -1
- package/src/resources/themes/solid-dark-purple/theme.css +1 -0
- package/src/resources/themes/solid-light-purple/theme.css +5 -4
- package/src/types/solid-core.d.ts +4 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { SolidKanbanViewFieldsParams } from '../SolidKanbanViewFields';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const SolidSelectionStaticKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fieldLayout,data }: SolidKanbanViewFieldsParams) => {
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<p>{data && data[fieldMetadata.name] ? `${data[fieldMetadata.name]}`: ""}</p>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default SolidSelectionStaticKanbanField;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { SolidKanbanViewFieldsParams } from '../SolidKanbanViewFields';
|
|
3
|
+
|
|
4
|
+
const SolidShortTextKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fieldLayout, data, setLightboxUrls, setOpenLightbox }: SolidKanbanViewFieldsParams) => {
|
|
5
|
+
const renderMode = fieldLayout?.attrs?.renderMode ? fieldLayout?.attrs?.renderMode : "text";
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
{renderMode === "text" &&
|
|
10
|
+
<p>{data && data[fieldMetadata.name] ? `${data[fieldMetadata.name]}` : ""}</p>
|
|
11
|
+
}
|
|
12
|
+
{renderMode === "image" &&
|
|
13
|
+
<img
|
|
14
|
+
src={data[fieldMetadata.name]}
|
|
15
|
+
onClick={(event) => {
|
|
16
|
+
event.stopPropagation();
|
|
17
|
+
setLightboxUrls([{ src: data[fieldMetadata.name] }]);
|
|
18
|
+
setOpenLightbox(true);
|
|
19
|
+
}}
|
|
20
|
+
className='image-preview'
|
|
21
|
+
></img>
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
</>
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default SolidShortTextKanbanField;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { SolidKanbanViewFieldsParams } from '../SolidKanbanViewFields';
|
|
3
|
+
|
|
4
|
+
const SolidTimeKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fieldLayout,data }: SolidKanbanViewFieldsParams) => {
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<p>{data && data[fieldMetadata.name] ? `${data[fieldMetadata.name]}`: ""}</p>
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default SolidTimeKanbanField;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { SolidKanbanViewFieldsParams } from '../SolidKanbanViewFields';
|
|
3
|
+
|
|
4
|
+
const SolidUuidKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fieldLayout,data }: SolidKanbanViewFieldsParams) => {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<p>{data && data[fieldMetadata.name] ? `${data[fieldMetadata.name]}`: ""}</p>
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default SolidUuidKanbanField;
|
package/src/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { FilterMatchMode } from 'primereact/api';
|
|
3
|
+
import { Column, ColumnFilterElementTemplateOptions } from "primereact/column";
|
|
4
|
+
import { FormEvent } from "primereact/ts-helpers";
|
|
5
|
+
import { InputTypes, SolidVarInputsFilterElement } from "../../SolidVarInputsFilterElement";
|
|
6
|
+
import { SolidKanbanViewFieldsParams } from '../../SolidKanbanViewFields';
|
|
7
|
+
|
|
8
|
+
const SolidRelationManyToOneKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fieldLayout,data }: SolidKanbanViewFieldsParams) => {
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<></>
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default SolidRelationManyToOneKanbanField;
|
|
@@ -27,7 +27,6 @@ import { useRouter } from "next/navigation";
|
|
|
27
27
|
import { ListViewRowActionPopup } from "./ListViewRowActionPopup";
|
|
28
28
|
import FilterComponent, { FilterOperator, FilterRule, FilterRuleType } from "@/components/core/common/FilterComponent";
|
|
29
29
|
import { SolidLayoutViews } from '../common/SolidLayoutViews'
|
|
30
|
-
import { SolidConfigureLayoutElement } from '../common/SolidConfigureLayoutElement'
|
|
31
30
|
import { FilterIcon } from '../../modelsComponents/filterIcon';
|
|
32
31
|
import { OverlayPanel } from "primereact/overlaypanel";
|
|
33
32
|
import { Toast } from "primereact/toast";
|
|
@@ -37,11 +36,13 @@ import CozyImage from '../../../resources/images/layout/images/cozy.png';
|
|
|
37
36
|
import ComfortableImage from '../../../resources/images/layout/images/comfortable.png';
|
|
38
37
|
import ListImage from '../../../resources/images/layout/images/cozy.png';
|
|
39
38
|
import KanbanImage from '../../../resources/images/layout/images/kanban.png';
|
|
39
|
+
import { capitalize } from "lodash";
|
|
40
40
|
import Lightbox from "yet-another-react-lightbox";
|
|
41
41
|
import Counter from "yet-another-react-lightbox/plugins/counter";
|
|
42
42
|
import Download from "yet-another-react-lightbox/plugins/download";
|
|
43
43
|
import "yet-another-react-lightbox/styles.css";
|
|
44
44
|
import "yet-another-react-lightbox/plugins/counter.css";
|
|
45
|
+
import { SolidListViewConfigure } from "./SolidListViewConfigure";
|
|
45
46
|
|
|
46
47
|
const getRandomInt = (min: number, max: number) => {
|
|
47
48
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
@@ -212,6 +213,22 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
212
213
|
const [editButtonUrl, setEditButtonUrl] = useState<string>();
|
|
213
214
|
const [showArchived, setShowArchived] = useState(false);
|
|
214
215
|
|
|
216
|
+
const sizeOptions = [
|
|
217
|
+
{ label: 'Compact', value: 'small', image: CompactImage },
|
|
218
|
+
{ label: 'Cozy', value: 'normal', image: CozyImage },
|
|
219
|
+
{ label: 'Comfortable', value: 'large', image: ComfortableImage }
|
|
220
|
+
]
|
|
221
|
+
|
|
222
|
+
// const viewModes = [
|
|
223
|
+
// { label: 'List ', value: 'list', image: ListImage },
|
|
224
|
+
// { label: 'Kanban', value: 'kanban', image: KanbanImage },
|
|
225
|
+
// ]
|
|
226
|
+
|
|
227
|
+
const [size, setSize] = useState<string | any>(sizeOptions[1].value);
|
|
228
|
+
const [viewModes, setViewModes] = useState<any>([]);
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
215
232
|
// Custom Row Action
|
|
216
233
|
const [listViewRowActionPopupState, setListViewRowActionPopupState] = useState(false);
|
|
217
234
|
const [listViewRowActionData, setListRowActionData] = useState<any>();
|
|
@@ -240,6 +257,8 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
240
257
|
if (solidListViewMetaData) {
|
|
241
258
|
const createActionUrl = solidListViewMetaData?.data?.solidView?.layout?.attrs?.createAction && solidListViewMetaData?.data?.solidView?.layout?.attrs?.createAction?.type === "custom" ? solidListViewMetaData?.data?.solidView?.layout?.attrs?.createAction?.customComponent : "form/new";
|
|
242
259
|
const editActionUrl = solidListViewMetaData?.data?.solidView?.layout?.attrs?.editAction && solidListViewMetaData?.data?.solidView?.layout?.attrs?.editAction?.type === "custom" ? solidListViewMetaData?.data?.solidView?.layout?.attrs?.editAction?.customComponent : "form";
|
|
260
|
+
const viewModes = solidListViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews && solidListViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews.length > 0 && solidListViewMetaData?.data?.solidView?.layout?.attrs?.allowedViews.map((view: any) => { return { label: capitalize(view), value: view } });
|
|
261
|
+
setViewModes(viewModes);
|
|
243
262
|
if (createActionUrl) {
|
|
244
263
|
setCreateButtonUrl(createActionUrl)
|
|
245
264
|
}
|
|
@@ -624,19 +643,6 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
624
643
|
setListViewRowActionPopupState(false)
|
|
625
644
|
}
|
|
626
645
|
|
|
627
|
-
const sizeOptions = [
|
|
628
|
-
{ label: 'Compact', value: 'small', image: CompactImage },
|
|
629
|
-
{ label: 'Cozy', value: 'normal', image: CozyImage },
|
|
630
|
-
{ label: 'Comfortable', value: 'large', image: ComfortableImage }
|
|
631
|
-
]
|
|
632
|
-
|
|
633
|
-
const viewModes = [
|
|
634
|
-
{ label: 'List ', value: 'list', image: ListImage },
|
|
635
|
-
{ label: 'Kanban', value: 'kanban', image: KanbanImage },
|
|
636
|
-
]
|
|
637
|
-
|
|
638
|
-
const [size, setSize] = useState<string | any>(sizeOptions[1].value);
|
|
639
|
-
const [view, setView] = useState<string | any>(viewModes[0].value);
|
|
640
646
|
|
|
641
647
|
const listViewTitle = solidListViewMetaData?.data?.solidView?.displayName
|
|
642
648
|
|
|
@@ -677,7 +683,8 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
677
683
|
></Button>}
|
|
678
684
|
|
|
679
685
|
{params.embeded === false && (solidListViewMetaData?.data?.solidView?.layout?.attrs?.configureView !== false) &&
|
|
680
|
-
<
|
|
686
|
+
<SolidListViewConfigure
|
|
687
|
+
listViewMetaData={listViewMetaData}
|
|
681
688
|
setShowArchived={setShowArchived}
|
|
682
689
|
showArchived={showArchived}
|
|
683
690
|
viewData={solidListViewMetaData}
|
|
@@ -685,13 +692,11 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
685
692
|
setSize={setSize}
|
|
686
693
|
size={size}
|
|
687
694
|
viewModes={viewModes}
|
|
688
|
-
setView={setView}
|
|
689
|
-
view={view}
|
|
690
695
|
params={params}
|
|
691
696
|
actionsAllowed={actionsAllowed}
|
|
692
697
|
selectedRecords={selectedRecords}
|
|
693
698
|
setDialogVisible={setDialogVisible}
|
|
694
|
-
|
|
699
|
+
/>
|
|
695
700
|
}
|
|
696
701
|
|
|
697
702
|
</div>
|
|
@@ -885,5 +890,4 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
885
890
|
}
|
|
886
891
|
</div>
|
|
887
892
|
);
|
|
888
|
-
};
|
|
889
|
-
|
|
893
|
+
};
|
|
@@ -92,7 +92,7 @@ export const SolidListViewColumn = ({ solidListViewMetaData, fieldMetadata, colu
|
|
|
92
92
|
return SolidDecimalColumn({ solidListViewMetaData, fieldMetadata, column });
|
|
93
93
|
}
|
|
94
94
|
if (fieldMetadata.type === 'shortText') {
|
|
95
|
-
return SolidShortTextColumn({ solidListViewMetaData, fieldMetadata, column });
|
|
95
|
+
return SolidShortTextColumn({ solidListViewMetaData, fieldMetadata, column, setLightboxUrls, setOpenLightbox });
|
|
96
96
|
}
|
|
97
97
|
if (fieldMetadata.type === 'longText') {
|
|
98
98
|
return SolidLongTextColumn({ solidListViewMetaData, fieldMetadata, column });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { deleteManyPermission, deletePermission } from "@/helpers/permissions";
|
|
3
3
|
import Image from "next/image";
|
|
4
|
+
import { usePathname, useRouter } from "next/navigation";
|
|
4
5
|
import { Accordion, AccordionTab } from "primereact/accordion";
|
|
5
6
|
import { Button } from "primereact/button";
|
|
6
7
|
import { Checkbox, CheckboxChangeEvent } from "primereact/checkbox";
|
|
@@ -9,15 +10,53 @@ import { OverlayPanel } from "primereact/overlaypanel";
|
|
|
9
10
|
import { RadioButton } from "primereact/radiobutton";
|
|
10
11
|
import { useEffect, useRef, useState } from "react";
|
|
11
12
|
|
|
13
|
+
interface FieldMetadata {
|
|
14
|
+
displayName: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
interface FilterColumns {
|
|
13
18
|
name: string;
|
|
14
19
|
key: string;
|
|
20
|
+
isChecked: boolean;
|
|
15
21
|
}
|
|
16
|
-
export const
|
|
22
|
+
export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, showArchived, viewData, sizeOptions, setSize, size, viewModes, params, actionsAllowed, selectedRecords, setDialogVisible }: any) => {
|
|
23
|
+
if (!listViewMetaData) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (!listViewMetaData.data) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const solidView = listViewMetaData?.data?.solidView;
|
|
31
|
+
|
|
32
|
+
// This is a key value map of field name vs field metadata.
|
|
33
|
+
const solidFieldsMetadata = listViewMetaData?.data?.solidFieldsMetadata as Record<string, FieldMetadata>;
|
|
17
34
|
|
|
18
35
|
// const [visible, setVisible] = useState<boolean>(false);
|
|
19
36
|
const op = useRef(null);
|
|
20
37
|
const customizeLayout = useRef<OverlayPanel | null>(null);
|
|
38
|
+
const pathname = usePathname();
|
|
39
|
+
const router = useRouter();
|
|
40
|
+
const [view, setView] = useState<string>("");
|
|
41
|
+
|
|
42
|
+
const handleViewChange = (newView: string) => {
|
|
43
|
+
if (view === newView) return; // Prevent unnecessary updates
|
|
44
|
+
const pathSegments = pathname.split('/').filter(Boolean);
|
|
45
|
+
pathSegments[pathSegments.length - 1] = newView; // Replace the last part with new view
|
|
46
|
+
const newPath = '/' + pathSegments.join('/');
|
|
47
|
+
router.push(newPath);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (typeof pathname === 'string') {
|
|
52
|
+
const pathSegments = pathname.split('/').filter(Boolean);
|
|
53
|
+
if (pathSegments.length > 0) {
|
|
54
|
+
setView(pathSegments[pathSegments.length - 1]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, [])
|
|
58
|
+
|
|
59
|
+
|
|
21
60
|
const [isOverlayOpen, setIsOverlayOpen] = useState(false);
|
|
22
61
|
useEffect(() => {
|
|
23
62
|
const handleClickOutside = (event: MouseEvent) => {
|
|
@@ -38,23 +77,30 @@ export const SolidConfigureLayoutElement = ({ setShowArchived, showArchived, vie
|
|
|
38
77
|
return () => document.removeEventListener("click", handleClickOutside);
|
|
39
78
|
}, [isOverlayOpen])
|
|
40
79
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
80
|
+
if (!solidView || !solidFieldsMetadata) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const checkedFieldNames = new Set(solidView.layout.children.map((col: { attrs: { name: string } }) => col.attrs.name));
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
const solidListColumns: FilterColumns[] = Object.entries(solidFieldsMetadata).map(([key, field]) => ({
|
|
88
|
+
name: field.displayName,
|
|
89
|
+
key,
|
|
90
|
+
isChecked: checkedFieldNames.has(key),
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
const [selectedColumns, setSelectedColumns] = useState<FilterColumns[]>(solidListColumns.filter(col => col.isChecked));
|
|
48
94
|
|
|
49
95
|
const onCategoryChange = (e: CheckboxChangeEvent) => {
|
|
50
|
-
let
|
|
96
|
+
let _selectedColumns = [...selectedColumns];
|
|
51
97
|
|
|
52
98
|
if (e.checked)
|
|
53
|
-
|
|
99
|
+
_selectedColumns.push(e.value);
|
|
54
100
|
else
|
|
55
|
-
|
|
101
|
+
_selectedColumns = _selectedColumns.filter(column => column.key !== e.value.key);
|
|
56
102
|
|
|
57
|
-
|
|
103
|
+
setSelectedColumns(_selectedColumns);
|
|
58
104
|
};
|
|
59
105
|
|
|
60
106
|
return (
|
|
@@ -87,8 +133,8 @@ export const SolidConfigureLayoutElement = ({ setShowArchived, showArchived, vie
|
|
|
87
133
|
<Button text icon='pi pi-upload' label="Export" size="small" severity="secondary" className="text-left gap-2 text-base" />
|
|
88
134
|
{/* <Button text icon='pi pi-share-alt' label="Share" size="small" severity="secondary" className="text-left gap-2" /> */}
|
|
89
135
|
{/* {viewData?.data?.solidView?.model?.enableSoftDelete &&
|
|
90
|
-
|
|
91
|
-
|
|
136
|
+
<Button text severity="secondary" size="small" className="text-left w-13rem" label={showArchived ? "Hide Archived Records" : "Show Archived Records"} iconPos="left" onClick={() => { setShowArchived(!showArchived); }} />
|
|
137
|
+
} */}
|
|
92
138
|
{viewData?.data?.solidView?.model?.enableSoftDelete && (
|
|
93
139
|
<div className="flex align-items-center px-3 gap-2 mt-2 mb-1">
|
|
94
140
|
<Checkbox
|
|
@@ -131,35 +177,39 @@ export const SolidConfigureLayoutElement = ({ setShowArchived, showArchived, vie
|
|
|
131
177
|
setTimeout(() => setIsOverlayOpen(false), 50); // ✅ Ensure state updates
|
|
132
178
|
}}
|
|
133
179
|
>
|
|
180
|
+
|
|
134
181
|
<div className="solid-layout-accordion">
|
|
135
|
-
<Accordion multiple expandIcon="pi pi-chevron-down" collapseIcon="pi pi-chevron-up">
|
|
136
|
-
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
<
|
|
182
|
+
<Accordion multiple expandIcon="pi pi-chevron-down" collapseIcon="pi pi-chevron-up" activeIndex={[2]}>
|
|
183
|
+
{viewModes && viewModes.length > 0 &&
|
|
184
|
+
<AccordionTab header="Switch Type">
|
|
185
|
+
<div className="flex flex-column gap-1 p-1">
|
|
186
|
+
{viewModes.map((option: any) => (
|
|
187
|
+
<div key={option.value} className={`flex align-items-center ${option.value === view ? 'solid-active-view' : 'solid-view'}`}>
|
|
188
|
+
<RadioButton
|
|
189
|
+
inputId={option.value}
|
|
190
|
+
name="views"
|
|
191
|
+
value={option.value}
|
|
192
|
+
// onChange={(e) => router}
|
|
193
|
+
onChange={() => handleViewChange(option.value)}
|
|
194
|
+
checked={option.value === view}
|
|
195
|
+
/>
|
|
196
|
+
<label htmlFor={option.value} className="ml-2 flex align-items-center justify-content-between w-full">
|
|
197
|
+
{option.label}
|
|
198
|
+
{/* <Image
|
|
150
199
|
src={option.image}
|
|
151
200
|
alt={option.value}
|
|
152
201
|
fill
|
|
153
202
|
className='relative row-spacing-img'
|
|
154
|
-
/>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
203
|
+
/> */}
|
|
204
|
+
</label>
|
|
205
|
+
</div>
|
|
206
|
+
))}
|
|
207
|
+
</div>
|
|
208
|
+
</AccordionTab>
|
|
209
|
+
}
|
|
210
|
+
<AccordionTab header="Row Spacing">
|
|
211
|
+
<div className="flex flex-column gap-1 p-1flex flex-column gap-1 p-1">
|
|
212
|
+
{/* <p className="m-0 px-3">Row Spacing</p> */}
|
|
163
213
|
{sizeOptions.map((option: any) => (
|
|
164
214
|
<div key={option.value} className={`flex align-items-center ${option.value === size ? 'solid-active-view' : 'solid-view'}`}>
|
|
165
215
|
<RadioButton
|
|
@@ -182,39 +232,37 @@ export const SolidConfigureLayoutElement = ({ setShowArchived, showArchived, vie
|
|
|
182
232
|
))}
|
|
183
233
|
</div>
|
|
184
234
|
</AccordionTab>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
235
|
+
<AccordionTab header="Column Selector">
|
|
236
|
+
<div className="flex flex-column gap-1 p-1">
|
|
237
|
+
<div className="flex flex-column gap-3 px-3 cogwheel-column-filter">
|
|
238
|
+
{solidListColumns.map((column) => {
|
|
239
|
+
return (
|
|
240
|
+
<div key={column.key} className="flex align-items-center gap-1">
|
|
241
|
+
<Checkbox
|
|
242
|
+
inputId={column.key}
|
|
243
|
+
name="column"
|
|
244
|
+
value={column}
|
|
245
|
+
onChange={onCategoryChange}
|
|
246
|
+
checked={selectedColumns.some((item) => item.key === column.key)}
|
|
247
|
+
className="text-base"
|
|
248
|
+
/>
|
|
249
|
+
<label htmlFor={column.key} className="ml-2 text-base">
|
|
250
|
+
{column.name}
|
|
251
|
+
</label>
|
|
252
|
+
</div>
|
|
253
|
+
);
|
|
254
|
+
})}
|
|
255
|
+
</div>
|
|
256
|
+
<div className="p-3 flex gap-2">
|
|
257
|
+
<Button label="Apply" size="small" />
|
|
258
|
+
<Button outlined label="Cancel" size="small"
|
|
259
|
+
// @ts-ignore
|
|
260
|
+
onClick={(e) => op.current.hide(e)}
|
|
261
|
+
/>
|
|
262
|
+
</div>
|
|
207
263
|
</div>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
</div>
|
|
211
|
-
<Divider className="m-0" />
|
|
212
|
-
<div className="p-3 flex gap-2">
|
|
213
|
-
<Button label="Apply" size="small" />
|
|
214
|
-
<Button outlined label="Cancel" size="small"
|
|
215
|
-
// @ts-ignore
|
|
216
|
-
onClick={(e) => op.current.hide(e)}
|
|
217
|
-
/>
|
|
264
|
+
</AccordionTab>
|
|
265
|
+
</Accordion>
|
|
218
266
|
</div>
|
|
219
267
|
</OverlayPanel>
|
|
220
268
|
</div>
|
|
@@ -5,8 +5,10 @@ import { FormEvent } from "primereact/ts-helpers";
|
|
|
5
5
|
import { getNumberOfInputs, SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
7
7
|
import SolidTableRowCell from '../SolidTableRowCell';
|
|
8
|
+
import { getExtensionComponent } from '@/helpers/registry';
|
|
9
|
+
import { SolidShortTextImageRenderModeWidgetProps } from '@/types/solid-core';
|
|
8
10
|
|
|
9
|
-
const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
11
|
+
const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column, setLightboxUrls, setOpenLightbox }: SolidListViewColumnParams) => {
|
|
10
12
|
const filterable = column.attrs.filterable;
|
|
11
13
|
const showFilterOperator = false;
|
|
12
14
|
const columnDataType = 'text';
|
|
@@ -39,7 +41,7 @@ const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column }:
|
|
|
39
41
|
|
|
40
42
|
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
41
43
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
42
|
-
|
|
44
|
+
|
|
43
45
|
return (
|
|
44
46
|
<Column
|
|
45
47
|
key={fieldMetadata.name}
|
|
@@ -56,15 +58,48 @@ const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column }:
|
|
|
56
58
|
// style={{ minWidth: "12rem" }}
|
|
57
59
|
// headerClassName="table-header-fs"
|
|
58
60
|
header={() => {
|
|
59
|
-
return (<div style={{ maxWidth: truncateAfter ? `${truncateAfter}ch` : '30ch', whiteSpace:'nowrap', textOverflow:'ellipsis', overflow:'hidden'}}>{header}</div>)
|
|
61
|
+
return (<div style={{ maxWidth: truncateAfter ? `${truncateAfter}ch` : '30ch', whiteSpace: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden' }}>{header}</div>)
|
|
62
|
+
}}
|
|
63
|
+
body={(rowData) => {
|
|
64
|
+
const renderMode = column.attrs.renderMode || "text";
|
|
65
|
+
const data = rowData;
|
|
66
|
+
const widgetName = renderMode == "text" ? "SolidShortTextFieldTextRenderModeWidget" : "SolidShortTextFieldImageRenderModeWidget";
|
|
67
|
+
let DynamicWidget = getExtensionComponent(widgetName);
|
|
68
|
+
const widgetProps = {
|
|
69
|
+
value: data[fieldMetadata.name],
|
|
70
|
+
setLightboxUrls: setLightboxUrls,
|
|
71
|
+
setOpenLightbox: setOpenLightbox
|
|
72
|
+
}
|
|
73
|
+
return (
|
|
74
|
+
<>
|
|
75
|
+
{DynamicWidget && <DynamicWidget {...widgetProps} />}
|
|
76
|
+
</>
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
// if (renderMode === "text") {
|
|
80
|
+
// return <SolidTableRowCell
|
|
81
|
+
// value={rowData[fieldMetadata.name]}
|
|
82
|
+
// truncateAfter={truncateAfter}
|
|
83
|
+
// />
|
|
84
|
+
// } else {
|
|
85
|
+
// return (
|
|
86
|
+
// <img
|
|
87
|
+
// src={data[fieldMetadata.name]}
|
|
88
|
+
// alt="product-image-single"
|
|
89
|
+
// className="shadow-2 border-round"
|
|
90
|
+
// width={40}
|
|
91
|
+
// height={40}
|
|
92
|
+
// style={{ objectFit: "cover" }}
|
|
93
|
+
// onClick={(event) => {
|
|
94
|
+
// event.stopPropagation();
|
|
95
|
+
// setLightboxUrls([{ src: data[fieldMetadata.name], downloadUrl: data[fieldMetadata.name] }]);
|
|
96
|
+
// setOpenLightbox(true);
|
|
97
|
+
// }}
|
|
98
|
+
// />
|
|
99
|
+
// );
|
|
100
|
+
// }
|
|
60
101
|
}}
|
|
61
|
-
|
|
62
|
-
<SolidTableRowCell
|
|
63
|
-
value={rowData[fieldMetadata.name]}
|
|
64
|
-
truncateAfter={truncateAfter}
|
|
65
|
-
/>
|
|
66
|
-
)}
|
|
67
|
-
></Column>
|
|
102
|
+
></Column >
|
|
68
103
|
);
|
|
69
104
|
|
|
70
105
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
export const SolidShortTextFieldImageRenderModeWidget = ({ value, setLightboxUrls, setOpenLightbox }: any) => {
|
|
3
|
+
return (
|
|
4
|
+
<img
|
|
5
|
+
src={value}
|
|
6
|
+
alt="product-image-single"
|
|
7
|
+
className="shadow-2 border-round"
|
|
8
|
+
width={40}
|
|
9
|
+
height={40}
|
|
10
|
+
style={{ objectFit: "cover" }}
|
|
11
|
+
onClick={(event) => {
|
|
12
|
+
event.stopPropagation();
|
|
13
|
+
setLightboxUrls([{ src: value, downloadUrl: value }]);
|
|
14
|
+
setOpenLightbox(true);
|
|
15
|
+
}}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import SolidTableRowCell from "../SolidTableRowCell";
|
|
2
|
+
|
|
3
|
+
export const SolidShortTextFieldTextRenderModeWidget = ({ value, truncateAfter }: any) => {
|
|
4
|
+
return (
|
|
5
|
+
<SolidTableRowCell
|
|
6
|
+
value={value}
|
|
7
|
+
truncateAfter={truncateAfter}
|
|
8
|
+
></SolidTableRowCell>
|
|
9
|
+
)
|
|
10
|
+
};
|
|
11
|
+
|
|
@@ -391,12 +391,12 @@ const createValidationSchema = (currentFields: any, selectedType: any, allFields
|
|
|
391
391
|
"Relation Model Singular Name is required"
|
|
392
392
|
),
|
|
393
393
|
}),
|
|
394
|
-
...(currentFields.includes("relationCoModelFieldName") && {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}),
|
|
394
|
+
// ...(currentFields.includes("relationCoModelFieldName") && {
|
|
395
|
+
// relationCoModelFieldName: Yup.string()
|
|
396
|
+
// // .required(
|
|
397
|
+
// // "Relation Model Field Name is required"
|
|
398
|
+
// // ),
|
|
399
|
+
// }),
|
|
400
400
|
|
|
401
401
|
...(currentFields.includes("relationCreateInverse") && {
|
|
402
402
|
relationCreateInverse: Yup.boolean(),
|
package/src/helpers/registry.ts
CHANGED
|
@@ -9,6 +9,8 @@ import { SolidBooleanFieldCheckboxWidget } from "@/components/core/form/fields/w
|
|
|
9
9
|
import { SolidBooleanFieldSelectWidget } from "@/components/core/form/fields/widgets/SolidBooleanSelectFieldWidget";
|
|
10
10
|
import { SolidSelectionStaticAutocompleteWidget } from "@/components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget";
|
|
11
11
|
import { SolidSelectionStaticRadioWidget } from "@/components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget";
|
|
12
|
+
import { SolidShortTextFieldTextRenderModeWidget } from "@/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget copy";
|
|
13
|
+
import { SolidShortTextFieldImageRenderModeWidget } from "@/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget";
|
|
12
14
|
|
|
13
15
|
type ExtensionRegistry = {
|
|
14
16
|
components: Record<string, React.ComponentType<any>>;
|
|
@@ -75,6 +77,8 @@ registerExtensionComponent("SolidBooleanFieldCheckboxWidget", SolidBooleanFieldC
|
|
|
75
77
|
registerExtensionComponent("SolidBooleanFieldSelectWidget", SolidBooleanFieldSelectWidget, ["field-selectbox"]);
|
|
76
78
|
registerExtensionComponent("SolidSelectionStaticAutocompleteWidget", SolidSelectionStaticAutocompleteWidget, ["field-autocomplete"]);
|
|
77
79
|
registerExtensionComponent("SolidSelectionStaticRadioWidget", SolidSelectionStaticRadioWidget, ["field-radio"]);
|
|
80
|
+
registerExtensionComponent("SolidShortTextFieldTextRenderModeWidget", SolidShortTextFieldTextRenderModeWidget, []);
|
|
81
|
+
registerExtensionComponent("SolidShortTextFieldImageRenderModeWidget", SolidShortTextFieldImageRenderModeWidget, []);
|
|
78
82
|
|
|
79
83
|
|
|
80
84
|
// ModuleMetadata
|
package/src/index.ts
CHANGED
|
@@ -222,7 +222,7 @@ export { SolidFormStepper } from '@/components/common/SolidFormStepper'
|
|
|
222
222
|
export { SolidViewLayoutManager } from '@/components/core/common/SolidViewLayoutManager';
|
|
223
223
|
|
|
224
224
|
// export { SolidListViewOptions } from '@/components/core/common/SolidListViewOptions';
|
|
225
|
-
export {
|
|
225
|
+
export { SolidListViewConfigure } from '@/components/core/list/SolidListViewConfigure';
|
|
226
226
|
export { SolidCreateButton } from '@/components/core/common/SolidCreateButton';
|
|
227
227
|
export { SolidGlobalSearchElement } from '@/components/core/common/SolidGlobalSearchElement';
|
|
228
228
|
export { SolidSearchBox } from '@/components/core/common/SolidSearchBox';
|