@solidstarters/solid-core-ui 1.1.55 → 1.1.56
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/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +0 -4
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/core/form/SolidFormUserViewLayout.d.ts +2 -0
- package/dist/components/core/form/SolidFormUserViewLayout.d.ts.map +1 -0
- package/dist/components/core/form/SolidFormUserViewLayout.js +112 -0
- package/dist/components/core/form/SolidFormUserViewLayout.js.map +1 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +29 -22
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +12 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +4 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +9 -7
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/kanban/KanbanUserViewLayout.d.ts +2 -0
- package/dist/components/core/kanban/KanbanUserViewLayout.d.ts.map +1 -0
- package/dist/components/core/kanban/KanbanUserViewLayout.js +112 -0
- package/dist/components/core/kanban/KanbanUserViewLayout.js.map +1 -0
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +41 -35
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js +2 -2
- package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListColumnSelector.d.ts +2 -0
- package/dist/components/core/list/SolidListColumnSelector.d.ts.map +1 -0
- package/dist/components/core/list/SolidListColumnSelector.js +182 -0
- package/dist/components/core/list/SolidListColumnSelector.js.map +1 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +48 -45
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.d.ts +1 -1
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js +7 -49
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/redux/api/solidEntityApi.d.ts +1 -0
- package/dist/redux/api/solidEntityApi.d.ts.map +1 -1
- package/dist/redux/api/solidEntityApi.js +7 -0
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/resources/globals.css +1 -0
- package/package.json +1 -1
- package/src/components/common/SolidFormStepper.tsx +0 -4
- package/src/components/core/form/SolidFormUserViewLayout.tsx +87 -0
- package/src/components/core/form/SolidFormView.tsx +30 -5
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +16 -14
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +16 -14
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +12 -4
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +5 -2
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +4 -2
- package/src/components/core/kanban/KanbanUserViewLayout.tsx +87 -0
- package/src/components/core/kanban/SolidKanbanView.tsx +18 -3
- package/src/components/core/kanban/SolidKanbanViewConfigure.tsx +3 -3
- package/src/components/core/list/SolidListColumnSelector.tsx +170 -0
- package/src/components/core/list/SolidListView.tsx +16 -12
- package/src/components/core/list/SolidListViewConfigure.tsx +2 -77
- package/src/redux/api/solidEntityApi.tsx +7 -0
- package/src/resources/globals.css +1 -0
|
@@ -9,29 +9,9 @@ import { Divider } from "primereact/divider";
|
|
|
9
9
|
import { OverlayPanel } from "primereact/overlaypanel";
|
|
10
10
|
import { RadioButton } from "primereact/radiobutton";
|
|
11
11
|
import { useEffect, useRef, useState } from "react";
|
|
12
|
+
import { SolidListColumnSelector } from "./SolidListColumnSelector";
|
|
12
13
|
|
|
13
|
-
interface FieldMetadata {
|
|
14
|
-
displayName: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface FilterColumns {
|
|
18
|
-
name: string;
|
|
19
|
-
key: string;
|
|
20
|
-
isChecked: boolean;
|
|
21
|
-
}
|
|
22
14
|
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>;
|
|
34
|
-
|
|
35
15
|
// const [visible, setVisible] = useState<boolean>(false);
|
|
36
16
|
const op = useRef(null);
|
|
37
17
|
const customizeLayout = useRef<OverlayPanel | null>(null);
|
|
@@ -77,32 +57,6 @@ export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, show
|
|
|
77
57
|
return () => document.removeEventListener("click", handleClickOutside);
|
|
78
58
|
}, [isOverlayOpen])
|
|
79
59
|
|
|
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));
|
|
94
|
-
|
|
95
|
-
const onCategoryChange = (e: CheckboxChangeEvent) => {
|
|
96
|
-
let _selectedColumns = [...selectedColumns];
|
|
97
|
-
|
|
98
|
-
if (e.checked)
|
|
99
|
-
_selectedColumns.push(e.value);
|
|
100
|
-
else
|
|
101
|
-
_selectedColumns = _selectedColumns.filter(column => column.key !== e.value.key);
|
|
102
|
-
|
|
103
|
-
setSelectedColumns(_selectedColumns);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
60
|
return (
|
|
107
61
|
<div className="position-relative">
|
|
108
62
|
<Button
|
|
@@ -147,8 +101,6 @@ export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, show
|
|
|
147
101
|
</label>
|
|
148
102
|
</div>
|
|
149
103
|
)}
|
|
150
|
-
|
|
151
|
-
|
|
152
104
|
</div>
|
|
153
105
|
</div>
|
|
154
106
|
<Divider className="m-0" />
|
|
@@ -233,34 +185,7 @@ export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, show
|
|
|
233
185
|
</div>
|
|
234
186
|
</AccordionTab>
|
|
235
187
|
<AccordionTab header="Column Selector">
|
|
236
|
-
<
|
|
237
|
-
<div className="flex flex-column gap-3 px-3 cogwheel-column-filter" style={{maxHeight: 400, overflowY:'auto'}}>
|
|
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>
|
|
263
|
-
</div>
|
|
188
|
+
<SolidListColumnSelector listViewMetaData={listViewMetaData} />
|
|
264
189
|
</AccordionTab>
|
|
265
190
|
</Accordion>
|
|
266
191
|
</div>
|
|
@@ -49,6 +49,13 @@ export const createSolidEntityApi = (entityName: string) => {
|
|
|
49
49
|
body: entity
|
|
50
50
|
}),
|
|
51
51
|
}),
|
|
52
|
+
upsertSolidEntity: builder.mutation({
|
|
53
|
+
query: (entity) => ({
|
|
54
|
+
url: `/${kebabEntityName}/upsert`,
|
|
55
|
+
method: 'POST',
|
|
56
|
+
body: entity
|
|
57
|
+
}),
|
|
58
|
+
}),
|
|
52
59
|
updateSolidEntity: builder.mutation({
|
|
53
60
|
query: ({ id, data }) => ({
|
|
54
61
|
url: `/${kebabEntityName}/${id}`,
|