@solidstarters/solid-core-ui 1.1.67 → 1.1.69
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/auth/SolidRegister.d.ts.map +1 -1
- package/dist/components/auth/SolidRegister.js +7 -1
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +53 -43
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +10 -3
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +6 -5
- 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/ListViewRowActionPopup.d.ts.map +1 -1
- package/dist/components/core/list/ListViewRowActionPopup.js +21 -5
- package/dist/components/core/list/ListViewRowActionPopup.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +16 -15
- 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 +2 -2
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +12 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.js +7 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.js.map +1 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.js +36 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.js.map +1 -0
- package/dist/components/core/model/CreateModel.js +1 -1
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js +73 -50
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
- package/dist/components/core/model/ModelMetaData.js +35 -17
- package/dist/components/core/model/ModelMetaData.js.map +1 -1
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +8 -1
- package/dist/helpers/registry.js.map +1 -1
- package/dist/redux/api/modelApi.js +1 -1
- package/dist/redux/api/modelApi.js.map +1 -1
- package/dist/resources/globals.css +5 -0
- package/dist/resources/themes/solid-light-purple/theme.css +4 -0
- package/package.json +1 -1
- package/src/components/auth/SolidRegister.tsx +7 -1
- package/src/components/core/common/SolidGlobalSearchElement.tsx +29 -22
- package/src/components/core/kanban/KanbanCard.tsx +51 -5
- package/src/components/core/kanban/SolidKanbanView.tsx +3 -2
- package/src/components/core/kanban/SolidKanbanViewConfigure.tsx +2 -1
- package/src/components/core/list/ListViewRowActionPopup.tsx +9 -2
- package/src/components/core/list/SolidListView.tsx +4 -1
- package/src/components/core/list/SolidListViewConfigure.tsx +2 -1
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +11 -2
- package/src/components/core/list/widgets/SolidUserNameAvatarWidget.tsx +52 -0
- package/src/components/core/model/CreateModel.tsx +1 -1
- package/src/components/core/model/FieldMetaDataForm.tsx +86 -12
- package/src/components/core/model/ModelMetaData.tsx +38 -11
- package/src/helpers/registry.ts +11 -1
- package/src/redux/api/modelApi.ts +1 -1
- package/src/resources/globals.css +5 -0
- package/src/resources/themes/solid-light-purple/theme.css +4 -0
- /package/src/components/core/list/widgets/{SolidShortTextFieldTextRenderModeWidget copy.tsx → SolidShortTextFieldTextRenderModeWidget.tsx} +0 -0
package/dist/helpers/registry.js
CHANGED
|
@@ -8,7 +8,7 @@ import { SolidBooleanFieldCheckboxWidget } from "../components/core/form/fields/
|
|
|
8
8
|
import { SolidBooleanFieldSelectWidget } from "../components/core/form/fields/widgets/SolidBooleanSelectFieldWidget";
|
|
9
9
|
import { SolidSelectionStaticAutocompleteWidget } from "../components/core/form/fields/widgets/SolidSelectionStaticAutocompleteFieldWidget";
|
|
10
10
|
import { SolidSelectionStaticRadioWidget } from "../components/core/form/fields/widgets/SolidSelectionStaticRadioFieldWidget";
|
|
11
|
-
import { SolidShortTextFieldTextRenderModeWidget } from "../components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget
|
|
11
|
+
import { SolidShortTextFieldTextRenderModeWidget } from "../components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget";
|
|
12
12
|
import { SolidShortTextFieldImageRenderModeWidget } from "../components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget";
|
|
13
13
|
import { SolidFormFieldViewModeWidget } from "../components/core/form/fields/widgets/SolidFormFieldViewModeWidget";
|
|
14
14
|
import { SolidFormFieldJsonViewModeWidget } from "../components/core/form/fields/widgets/SolidFormFieldJsonViewModeWidget";
|
|
@@ -18,6 +18,9 @@ import { SolidFormFieldMediaViewModeWidget } from "../components/core/form/field
|
|
|
18
18
|
import { SolidFormFieldRelationViewModeWidget } from "../components/core/form/fields/widgets/SolidFormFieldRelationViewModeWidget";
|
|
19
19
|
import { SolidFormFieldViewMediaSingleWidget } from "../components/core/form/fields/widgets/SolidFormFieldViewMediaSingleWidget";
|
|
20
20
|
import { SolidFormFieldViewMediaMultipleWidget } from "../components/core/form/fields/widgets/SolidFormFieldViewMediaMultipleWidget";
|
|
21
|
+
import { SolidUserNameAvatarWidget } from "../components/core/list/widgets/SolidUserNameAvatarWidget";
|
|
22
|
+
import GenerateModelCodeRowAction from "../components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction";
|
|
23
|
+
import GenerateModuleCodeRowAction from "../components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction";
|
|
21
24
|
var extensionRegistry = {
|
|
22
25
|
components: {},
|
|
23
26
|
functions: {},
|
|
@@ -62,6 +65,8 @@ export var getExtensionFunction = function (name) {
|
|
|
62
65
|
// Register all the dynamic widget & functions from inside solid-core-ui
|
|
63
66
|
// Common
|
|
64
67
|
registerExtensionComponent("CustomHtml", CustomHtml, []);
|
|
68
|
+
registerExtensionComponent("GenerateModelCodeRowAction", GenerateModelCodeRowAction, []);
|
|
69
|
+
registerExtensionComponent("GenerateModuleCodeRowAction", GenerateModuleCodeRowAction, []);
|
|
65
70
|
registerExtensionComponent("SolidRelationManyToManyCheckboxWidget", SolidRelationManyToManyCheckboxWidget, ["checkbox"]);
|
|
66
71
|
registerExtensionComponent("SolidRelationManyToManyAutocompleteWidget", SolidRelationManyToManyAutocompleteWidget, ["autocomplete"]);
|
|
67
72
|
registerExtensionComponent("SolidBooleanFieldCheckboxWidget", SolidBooleanFieldCheckboxWidget, ["field-checkbox"]);
|
|
@@ -78,6 +83,8 @@ registerExtensionComponent("SolidFormFieldMediaViewModeWidget", SolidFormFieldMe
|
|
|
78
83
|
registerExtensionComponent("SolidFormFieldRelationViewModeWidget", SolidFormFieldRelationViewModeWidget, []);
|
|
79
84
|
registerExtensionComponent("SolidFormFieldViewMediaSingleWidget", SolidFormFieldViewMediaSingleWidget, []);
|
|
80
85
|
registerExtensionComponent("SolidFormFieldViewMediaMultipleWidget", SolidFormFieldViewMediaMultipleWidget, []);
|
|
86
|
+
registerExtensionComponent("SolidFormFieldViewMediaMultipleWidget", SolidFormFieldViewMediaMultipleWidget, []);
|
|
87
|
+
registerExtensionComponent("SolidUserNameAvatarWidget", SolidUserNameAvatarWidget, []);
|
|
81
88
|
// ModuleMetadata
|
|
82
89
|
// ModelMetadata
|
|
83
90
|
// Email Template
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/helpers/registry.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,iFAAiF,CAAC;AACxH,OAAO,uBAAuB,MAAM,wEAAwE,CAAC;AAC7G,OAAO,EAAE,oCAAoC,EAAE,MAAM,0FAA0F,CAAC;AAChJ,OAAO,EAAE,yCAAyC,EAAE,MAAM,2FAA2F,CAAC;AACtJ,OAAO,EAAE,qCAAqC,EAAE,MAAM,uFAAuF,CAAC;AAC9I,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAEvE,OAAO,EAAE,+BAA+B,EAAE,MAAM,uEAAuE,CAAC;AACxH,OAAO,EAAE,6BAA6B,EAAE,MAAM,qEAAqE,CAAC;AACpH,OAAO,EAAE,sCAAsC,EAAE,MAAM,mFAAmF,CAAC;AAC3I,OAAO,EAAE,+BAA+B,EAAE,MAAM,4EAA4E,CAAC;AAC7H,OAAO,EAAE,uCAAuC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/helpers/registry.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,iFAAiF,CAAC;AACxH,OAAO,uBAAuB,MAAM,wEAAwE,CAAC;AAC7G,OAAO,EAAE,oCAAoC,EAAE,MAAM,0FAA0F,CAAC;AAChJ,OAAO,EAAE,yCAAyC,EAAE,MAAM,2FAA2F,CAAC;AACtJ,OAAO,EAAE,qCAAq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EAAE,EAAE,CAAC,CAAC;AAGvF,iBAAiB;AAGjB,gBAAgB;AAGhB,iBAAiB;AACjB,yBAAyB,CAAC,4BAA4B,EAAE,yBAAyB,CAAC,CAAC;AACnF,yBAAyB,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;AAExE,eAAe;AACf,0BAA0B,CAAC,sCAAsC,EAAE,oCAAoC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ export var modelsApi = createApi({
|
|
|
19
19
|
}
|
|
20
20
|
}),
|
|
21
21
|
getmodelById: builder.query({
|
|
22
|
-
query: function (id) { return "/model-metadata/".concat(id, "?populate[0]=fields&populate[1]=module
|
|
22
|
+
query: function (id) { return "/model-metadata/".concat(id, "?populate[0]=fields&populate[1]=module&&populate[2]=fields.mediaStorageProvider&populate[3]=parentModel"); },
|
|
23
23
|
}),
|
|
24
24
|
createmodel: builder.mutation({
|
|
25
25
|
query: function (model) { return ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelApi.js","sourceRoot":"","sources":["../../../src/redux/api/modelApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,CAAC,IAAM,SAAS,GAAG,SAAS,CAAC;IAC/B,WAAW,EAAE,UAAU;IACvB,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE,UAAC,OAAO,IAAK,OAAA,CAAC;QACrB,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC;YACrB,KAAK,EAAE,UAAC,EAAE;gBACN,OAAO,oDAA6C,EAAE,CAAE,CAAA;YAC5D,CAAC;YACD,iBAAiB,EAAE,UAAC,QAAa;gBAC7B,IAAI,QAAQ,CAAC,KAAK,EAAE;oBAChB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;iBACnC;gBAC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M;gBACd,IAAI,EAAE,IAAI;aACb,CAAC,EAJe,CAIf;SACL,CAAC;KACL,CAAC,EAnEsB,CAmEtB;CACL,CAAC,CAAA;AAEF,MAAM,CAAS,IAAA,iBAAiB,GAA6O,SAAS,kBAAtP,EAAC,qBAAqB,GAAuN,SAAS,sBAAhO,EAAE,wBAAwB,GAA6L,SAAS,yBAAtM,EAAE,oBAAoB,GAAuK,SAAS,qBAAhL,EAAE,sBAAsB,GAA+I,SAAS,uBAAxJ,EAAC,+BAA+B,GAA+G,SAAS,gCAAxH,EAAC,sBAAsB,GAAwF,SAAS,uBAAjG,EAAE,+BAA+B,GAAuD,SAAS,gCAAhE,EAAE,sBAAsB,GAA+B,SAAS,uBAAxC,EAAE,wBAAwB,GAAK,SAAS,yBAAd,CAAc"}
|
|
@@ -6205,6 +6205,10 @@
|
|
|
6205
6205
|
background-color: #EFF1F4;
|
|
6206
6206
|
}
|
|
6207
6207
|
|
|
6208
|
+
.solid-kanban-board-wrapper {
|
|
6209
|
+
border-top: 1px solid var(--primary-light-color);
|
|
6210
|
+
}
|
|
6211
|
+
|
|
6208
6212
|
.solid-kanban-card,
|
|
6209
6213
|
.solid-media-card {
|
|
6210
6214
|
border: 1px solid var(--solid-kanban-wrapper);
|
package/package.json
CHANGED
|
@@ -101,7 +101,13 @@ const SolidRegister = () => {
|
|
|
101
101
|
email: Yup.string()
|
|
102
102
|
.email("Invalid email address")
|
|
103
103
|
.required("Email is required"),
|
|
104
|
-
password: Yup.string()
|
|
104
|
+
password: Yup.string()
|
|
105
|
+
.required("Password is required")
|
|
106
|
+
.min(8, "Password must be at least 8 characters")
|
|
107
|
+
.matches(/[a-z]/, "Password must contain at least one lowercase letter")
|
|
108
|
+
.matches(/[A-Z]/, "Password must contain at least one uppercase letter")
|
|
109
|
+
.matches(/\d/, "Password must contain at least one number")
|
|
110
|
+
.matches(/[@$!%*?&#^(){}[\]|\\/~`+=<>:;'"_,.-]/, "Password must contain at least one special character"),
|
|
105
111
|
})}
|
|
106
112
|
onSubmit={async (values, { setSubmitting, setErrors }) => {
|
|
107
113
|
try {
|
|
@@ -157,22 +157,30 @@ const transformRulesToFilters = (input: any) => {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
const tranformSearchToFilters = (input: any) => {
|
|
160
|
+
if (!input || !input.$and) return input;
|
|
160
161
|
|
|
161
|
-
|
|
162
|
+
const grouped: Record<string, string[]> = {};
|
|
162
163
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const { fieldName, matchMode, value } = condition;
|
|
164
|
+
input.$and.forEach(({ fieldName, value }: any) => {
|
|
165
|
+
const val = Array.isArray(value) && value.length === 1 ? value[0] : value;
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
if (!grouped[fieldName]) {
|
|
168
|
+
grouped[fieldName] = [];
|
|
169
|
+
}
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
if (Array.isArray(val)) {
|
|
172
|
+
grouped[fieldName].push(...val);
|
|
173
|
+
} else {
|
|
174
|
+
grouped[fieldName].push(val);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
$and: Object.entries(grouped).map(([fieldName, values]) => ({
|
|
180
|
+
[fieldName]: {
|
|
181
|
+
$containsi: values.length === 1 ? values[0] : values
|
|
182
|
+
}
|
|
183
|
+
}))
|
|
176
184
|
};
|
|
177
185
|
}
|
|
178
186
|
|
|
@@ -195,7 +203,7 @@ export const mergeSearchAndCustomFilters = (transformedFilter: any, newFilter: a
|
|
|
195
203
|
const SavedFilterList = ({ savedfilter, activeSavedFilter, applySavedFilter, openSavedCustomFilter, setSavedFilterTobeDeleted, setIsDeleteSQDialogVisible }: any) => {
|
|
196
204
|
return (
|
|
197
205
|
<div className="flex align-items-center justify-content-between gap-2">
|
|
198
|
-
<Button text size="small" className="text-base py-1 w-full" severity={Number(activeSavedFilter) == savedfilter.id ? "secondary" : "contrast"
|
|
206
|
+
<Button text size="small" className="text-base py-1 w-full" severity={Number(activeSavedFilter) == savedfilter.id ? "secondary" : "contrast"} onClick={() => applySavedFilter(savedfilter)}>{savedfilter.name}</Button>
|
|
199
207
|
<div className="flex align-items-center gap-2">
|
|
200
208
|
<Button
|
|
201
209
|
icon="pi pi-pencil"
|
|
@@ -220,7 +228,7 @@ const SavedFilterList = ({ savedfilter, activeSavedFilter, applySavedFilter, ope
|
|
|
220
228
|
)
|
|
221
229
|
}
|
|
222
230
|
|
|
223
|
-
export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCustomFilter, filters, clearFilter }: any, ref) => {
|
|
231
|
+
export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCustomFilter, filters, clearFilter, showSaveFilterPopup, setShowSaveFilterPopup }: any, ref) => {
|
|
224
232
|
const defaultState: FilterRule[] = [
|
|
225
233
|
{
|
|
226
234
|
id: 1,
|
|
@@ -268,7 +276,6 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
268
276
|
const [searchFilter, setSearchFilter] = useState<any | null>(null);
|
|
269
277
|
const [customFilter, setCustomFilter] = useState<any | null>(null);
|
|
270
278
|
const [hasSearched, setHasSearched] = useState<boolean>(false);
|
|
271
|
-
const [showSaveFilterPopup, setShowSaveFilterPopup] = useState<boolean>(false);
|
|
272
279
|
const [currentSavedFilterData, setCurrentSavedFilterData] = useState<any>();
|
|
273
280
|
const [savedFilterTobeDeleted, setSavedFilterTobeDeleted] = useState<any>();
|
|
274
281
|
const [isDeleteSQDialogVisible, setIsDeleteSQDialogVisible] = useState<boolean>(false);
|
|
@@ -308,7 +315,7 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
308
315
|
useEffect(() => {
|
|
309
316
|
|
|
310
317
|
const filters = {
|
|
311
|
-
$or:[
|
|
318
|
+
$or: [
|
|
312
319
|
{
|
|
313
320
|
$and: [
|
|
314
321
|
{ model: { $in: [viewData?.data?.solidView?.model?.id] } },
|
|
@@ -325,7 +332,7 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
325
332
|
}
|
|
326
333
|
|
|
327
334
|
]
|
|
328
|
-
|
|
335
|
+
|
|
329
336
|
}
|
|
330
337
|
|
|
331
338
|
const queryData: any = {
|
|
@@ -682,8 +689,8 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
682
689
|
<React.Fragment>
|
|
683
690
|
<span key={index} className="custom-chip-value">{value}
|
|
684
691
|
</span>
|
|
685
|
-
{values.length
|
|
686
|
-
<span className="custom-chip-or">
|
|
692
|
+
{index < values.length - 1 &&
|
|
693
|
+
<span className="custom-chip-or">or</span>
|
|
687
694
|
}
|
|
688
695
|
</React.Fragment>
|
|
689
696
|
))}
|
|
@@ -801,7 +808,7 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
801
808
|
}
|
|
802
809
|
</div>
|
|
803
810
|
</Dialog>
|
|
804
|
-
<Dialog header="
|
|
811
|
+
<Dialog header="Save Custom Filter" visible={showSaveFilterPopup} style={{ width: 500 }} onHide={() => { if (!showSaveFilterPopup) return; setShowSaveFilterPopup(false); }}>
|
|
805
812
|
<SolidSaveCustomFilterForm currentSavedFilterData={currentSavedFilterData} handleSaveFilter={handleSaveFilter} closeDialog={setShowSaveFilterPopup}></SolidSaveCustomFilterForm>
|
|
806
813
|
</Dialog>
|
|
807
814
|
|
|
@@ -820,7 +827,7 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
820
827
|
<p>Are you sure you want to delete the {currentSavedFilterData?.name} saved query?</p>
|
|
821
828
|
</Dialog>
|
|
822
829
|
</div>
|
|
823
|
-
<div>
|
|
830
|
+
{/* <div>
|
|
824
831
|
<Button
|
|
825
832
|
icon="pi pi-save"
|
|
826
833
|
style={{ fontSize: 10 }}
|
|
@@ -830,7 +837,7 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
830
837
|
setShowSaveFilterPopup(true)
|
|
831
838
|
}}
|
|
832
839
|
/>
|
|
833
|
-
</div>
|
|
840
|
+
</div> */}
|
|
834
841
|
</>
|
|
835
842
|
)
|
|
836
843
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
'use client';
|
|
3
|
-
|
|
4
|
-
import { Draggable, DraggableProvided } from "@hello-pangea/dnd";
|
|
5
|
-
import { Card } from "primereact/card";
|
|
6
|
-
import React from "react";
|
|
3
|
+
import React, { useRef } from "react";
|
|
7
4
|
import { SolidKanbanViewFields } from "./SolidKanbanViewFields";
|
|
8
5
|
import { useRouter } from "next/navigation";
|
|
6
|
+
import { Button } from "primereact/button";
|
|
7
|
+
import { OverlayPanel } from "primereact/overlaypanel";
|
|
9
8
|
|
|
10
9
|
// Define the types for the data and props
|
|
11
10
|
interface Data {
|
|
@@ -162,6 +161,53 @@ const KanbanCard: React.FC<KanbanCardProps> = ({ data, solidKanbanViewMetaData,
|
|
|
162
161
|
return dynamicForm;
|
|
163
162
|
};
|
|
164
163
|
|
|
164
|
+
const kanbanActionRef = useRef(null);
|
|
165
|
+
|
|
166
|
+
const renderKanbanAction = (data, groupedView) => {
|
|
167
|
+
return (
|
|
168
|
+
<div className="solid-kanban-action" onClick={(e) => e.stopPropagation()}>
|
|
169
|
+
<Button
|
|
170
|
+
size="small"
|
|
171
|
+
text
|
|
172
|
+
className="text-sm p-0"
|
|
173
|
+
icon="pi pi-ellipsis-v"
|
|
174
|
+
onClick={(e) => kanbanActionRef.current.toggle(e)}
|
|
175
|
+
style={{ width: 25, height: 25 }}
|
|
176
|
+
/>
|
|
177
|
+
<OverlayPanel ref={kanbanActionRef} className="solid-custom-overlay">
|
|
178
|
+
<div className="flex flex-column">
|
|
179
|
+
<Button
|
|
180
|
+
type="button"
|
|
181
|
+
className="w-8rem text-left gap-1"
|
|
182
|
+
label="Edit"
|
|
183
|
+
size="small"
|
|
184
|
+
iconPos="left"
|
|
185
|
+
text
|
|
186
|
+
icon={"pi pi-pencil"}
|
|
187
|
+
onClick={() => router.push(`${editButtonUrl}/${data?.id}`)}
|
|
188
|
+
/>
|
|
189
|
+
{!groupedView &&
|
|
190
|
+
<a
|
|
191
|
+
href={data?.relativeUri}
|
|
192
|
+
download={data?.originalFileName}
|
|
193
|
+
target="_blank"
|
|
194
|
+
rel="noopener noreferrer"
|
|
195
|
+
>
|
|
196
|
+
<Button
|
|
197
|
+
type="button"
|
|
198
|
+
className="w-8rem text-left gap-1"
|
|
199
|
+
label="Download"
|
|
200
|
+
size="small"
|
|
201
|
+
iconPos="left"
|
|
202
|
+
icon={"pi pi-download"}
|
|
203
|
+
/>
|
|
204
|
+
</a>
|
|
205
|
+
}
|
|
206
|
+
</div>
|
|
207
|
+
</OverlayPanel>
|
|
208
|
+
</div>
|
|
209
|
+
)
|
|
210
|
+
}
|
|
165
211
|
|
|
166
212
|
return (
|
|
167
213
|
<Draggable draggableId={String(data.id)} index={index} isDragDisabled={!groupedView}>
|
|
@@ -191,8 +237,8 @@ const KanbanCard: React.FC<KanbanCardProps> = ({ data, solidKanbanViewMetaData,
|
|
|
191
237
|
router.push(`${editButtonUrl}/${data?.id}`)
|
|
192
238
|
}}
|
|
193
239
|
>
|
|
240
|
+
{renderKanbanAction(data, groupedView)}
|
|
194
241
|
{renderFormDynamically(solidKanbanViewMetaData)}
|
|
195
|
-
|
|
196
242
|
{/* {solidKanbanViewMetaData?.solidView?.layout?.layoutData &&
|
|
197
243
|
Object.entries(solidKanbanViewMetaData?.solidView?.layout?.layoutData).map(([key, value]) => (
|
|
198
244
|
<p className="kanban-card-heading" key={key}>{data[value]}</p>
|
|
@@ -236,7 +236,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
236
236
|
const [columnsCount, setColumnsCount] = useState(5);
|
|
237
237
|
const [swimLaneCurrentPageNumber, setSwimLaneCurrentPageNumber] = useState(1);
|
|
238
238
|
const [queryDataLoaded, setQueryDataLoaded] = useState(false);
|
|
239
|
-
|
|
239
|
+
const [showSaveFilterPopup, setShowSaveFilterPopup] = useState<boolean>(false);
|
|
240
240
|
|
|
241
241
|
|
|
242
242
|
const showToast = (severity: "success" | "error", summary: string, detail: string) => {
|
|
@@ -722,7 +722,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
722
722
|
<p className="m-0 view-title">{kanbanViewTitle}</p>
|
|
723
723
|
{solidKanbanViewMetaData?.data?.solidView?.layout?.attrs.enableGlobalSearch === true &&
|
|
724
724
|
// <SolidGlobalSearchElement viewData={solidKanbanViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} ></SolidGlobalSearchElement>
|
|
725
|
-
<SolidGlobalSearchElement ref={solidGlobalSearchElementRef} viewData={solidKanbanViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} ></SolidGlobalSearchElement>
|
|
725
|
+
<SolidGlobalSearchElement showSaveFilterPopup={showSaveFilterPopup} setShowSaveFilterPopup={setShowSaveFilterPopup} ref={solidGlobalSearchElementRef} viewData={solidKanbanViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} ></SolidGlobalSearchElement>
|
|
726
726
|
|
|
727
727
|
}
|
|
728
728
|
</div>
|
|
@@ -754,6 +754,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
754
754
|
actionsAllowed={actionsAllowed}
|
|
755
755
|
viewModes={viewModes}
|
|
756
756
|
setLayoutDialogVisible={setLayoutDialogVisible}
|
|
757
|
+
setShowSaveFilterPopup={setShowSaveFilterPopup}
|
|
757
758
|
/>
|
|
758
759
|
{/* <SolidConfigureLayoutElement></SolidConfigureLayoutElement> */}
|
|
759
760
|
</div>
|
|
@@ -7,7 +7,7 @@ import { OverlayPanel } from 'primereact/overlaypanel';
|
|
|
7
7
|
import { RadioButton } from 'primereact/radiobutton';
|
|
8
8
|
import React, { useEffect, useRef, useState } from 'react'
|
|
9
9
|
|
|
10
|
-
export const SolidKanbanViewConfigure = ({ solidKanbanViewMetaData, actionsAllowed, setLayoutDialogVisible, viewModes }: any) => {
|
|
10
|
+
export const SolidKanbanViewConfigure = ({ solidKanbanViewMetaData, actionsAllowed, setLayoutDialogVisible, viewModes, setShowSaveFilterPopup }: any) => {
|
|
11
11
|
const op = useRef(null);
|
|
12
12
|
const customizeLayout = useRef<OverlayPanel | null>(null);
|
|
13
13
|
const pathname = usePathname();
|
|
@@ -98,6 +98,7 @@ export const SolidKanbanViewConfigure = ({ solidKanbanViewMetaData, actionsAllow
|
|
|
98
98
|
>
|
|
99
99
|
<i className="pi pi-chevron-right text-sm"></i>
|
|
100
100
|
</Button>
|
|
101
|
+
<Button text icon='pi pi-save' label="Save Custom Filter" size="small" severity="secondary" className="text-left gap-2 text-base" onClick={() => setShowSaveFilterPopup(true)} />
|
|
101
102
|
<OverlayPanel ref={customizeLayout} className="customize-layout-panel" style={{ minWidth: 250 }}
|
|
102
103
|
onShow={() => setIsOverlayOpen(true)}
|
|
103
104
|
onHide={() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Button } from "primereact/button"
|
|
3
|
-
import {
|
|
3
|
+
import { getExtensionComponent } from "@/helpers/registry";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export const ListViewRowActionPopup = ({ context }: any) => {
|
|
@@ -13,11 +13,18 @@ export const ListViewRowActionPopup = ({ context }: any) => {
|
|
|
13
13
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
let DynamicWidget = getExtensionComponent(context?.rowAction?.action?.customComponent);
|
|
17
|
+
const widgetProps = {
|
|
18
|
+
context: context
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
return (
|
|
17
22
|
<div>
|
|
18
23
|
{
|
|
19
24
|
context?.rowAction?.action?.customComponent ?
|
|
20
|
-
<
|
|
25
|
+
DynamicWidget && <DynamicWidget {...widgetProps} />
|
|
26
|
+
|
|
27
|
+
// <LoadDynamicJsxComponent context={context}></LoadDynamicJsxComponent>
|
|
21
28
|
:
|
|
22
29
|
<>
|
|
23
30
|
<h1>{context?.modelName}</h1>
|
|
@@ -267,6 +267,8 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
267
267
|
const [showArchived, setShowArchived] = useState(false);
|
|
268
268
|
const [queryDataLoaded, setQueryDataLoaded] = useState(false);
|
|
269
269
|
const [customFilter, setCustomFilter] = useState(null);
|
|
270
|
+
const [showSaveFilterPopup, setShowSaveFilterPopup] = useState<boolean>(false);
|
|
271
|
+
|
|
270
272
|
const sizeOptions = [
|
|
271
273
|
{ label: 'Compact', value: 'small', image: CompactImage },
|
|
272
274
|
{ label: 'Cozy', value: 'normal', image: CozyImage },
|
|
@@ -713,7 +715,7 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
713
715
|
<div className="flex gap-3 align-items-center">
|
|
714
716
|
<p className="m-0 view-title">{solidListViewMetaData?.data?.solidView?.displayName}</p>
|
|
715
717
|
{solidListViewMetaData?.data?.solidView?.layout?.attrs?.enableGlobalSearch === true && params.embeded === false &&
|
|
716
|
-
<SolidGlobalSearchElement filters={filters} clearFilter={clearFilter} ref={solidGlobalSearchElementRef} viewData={solidListViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter}></SolidGlobalSearchElement>
|
|
718
|
+
<SolidGlobalSearchElement showSaveFilterPopup={showSaveFilterPopup} setShowSaveFilterPopup={setShowSaveFilterPopup} filters={filters} clearFilter={clearFilter} ref={solidGlobalSearchElementRef} viewData={solidListViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter}></SolidGlobalSearchElement>
|
|
717
719
|
}
|
|
718
720
|
</div>
|
|
719
721
|
<div className="flex align-items-center gap-3">
|
|
@@ -758,6 +760,7 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
758
760
|
actionsAllowed={actionsAllowed}
|
|
759
761
|
selectedRecords={selectedRecords}
|
|
760
762
|
setDialogVisible={setDialogVisible}
|
|
763
|
+
setShowSaveFilterPopup={setShowSaveFilterPopup}
|
|
761
764
|
/>
|
|
762
765
|
}
|
|
763
766
|
|
|
@@ -11,7 +11,7 @@ import { RadioButton } from "primereact/radiobutton";
|
|
|
11
11
|
import { useEffect, useRef, useState } from "react";
|
|
12
12
|
import { SolidListColumnSelector } from "./SolidListColumnSelector";
|
|
13
13
|
|
|
14
|
-
export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, showArchived, viewData, sizeOptions, setSize, size, viewModes, params, actionsAllowed, selectedRecords, setDialogVisible }: any) => {
|
|
14
|
+
export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, showArchived, viewData, sizeOptions, setSize, size, viewModes, params, actionsAllowed, selectedRecords, setDialogVisible, setShowSaveFilterPopup }: any) => {
|
|
15
15
|
// const [visible, setVisible] = useState<boolean>(false);
|
|
16
16
|
const op = useRef(null);
|
|
17
17
|
const customizeLayout = useRef<OverlayPanel | null>(null);
|
|
@@ -120,6 +120,7 @@ export const SolidListViewConfigure = ({ listViewMetaData, setShowArchived, show
|
|
|
120
120
|
>
|
|
121
121
|
<i className="pi pi-chevron-right text-sm"></i>
|
|
122
122
|
</Button>
|
|
123
|
+
<Button text icon='pi pi-save' label="Save Custom Filter" size="small" severity="secondary" className="text-left gap-2 text-base" onClick={() => setShowSaveFilterPopup(true)} />
|
|
123
124
|
{/* <p className="mt-3 mb-1 font-medium" style={{ color: 'var(--gray-400)' }}>Saved Layouts</p> */}
|
|
124
125
|
{/* <Button text severity="secondary" label="Diet Tracking" icon="pi pi-plus" size="small" /> */}
|
|
125
126
|
<OverlayPanel ref={customizeLayout} className="customize-layout-panel" style={{ minWidth: 250 }}
|
|
@@ -39,7 +39,7 @@ const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column, se
|
|
|
39
39
|
)
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
42
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter;
|
|
43
43
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
44
44
|
|
|
45
45
|
return (
|
|
@@ -63,7 +63,16 @@ const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column, se
|
|
|
63
63
|
body={(rowData) => {
|
|
64
64
|
const renderMode = column.attrs.renderMode || "text";
|
|
65
65
|
const data = rowData;
|
|
66
|
-
|
|
66
|
+
let widgetName = column?.attrs?.widget;
|
|
67
|
+
if (renderMode === "image") {
|
|
68
|
+
widgetName = "SolidShortTextFieldImageRenderModeWidget"
|
|
69
|
+
}
|
|
70
|
+
if (renderMode === "text") {
|
|
71
|
+
widgetName = "SolidShortTextFieldTextRenderModeWidget"
|
|
72
|
+
};
|
|
73
|
+
if (column?.attrs?.widget) {
|
|
74
|
+
widgetName = column?.attrs?.widget;
|
|
75
|
+
}
|
|
67
76
|
let DynamicWidget = getExtensionComponent(widgetName);
|
|
68
77
|
const widgetProps = {
|
|
69
78
|
value: data[fieldMetadata.name],
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
export const SolidUserNameAvatarWidget = ({ value }: any) => {
|
|
3
|
+
|
|
4
|
+
// use "widget": "SolidUserNameAvatarWidget" in the list view field
|
|
5
|
+
|
|
6
|
+
const getInitials = (fullName: string) => {
|
|
7
|
+
const names = fullName.trim().split(' ');
|
|
8
|
+
const initials =
|
|
9
|
+
names.length === 1
|
|
10
|
+
? names[0][0]
|
|
11
|
+
: names[0][0] + names[names.length - 1][0];
|
|
12
|
+
return initials.toUpperCase();
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const getColorFromInitials = (initials: string) => {
|
|
16
|
+
let hash = 0;
|
|
17
|
+
for (let i = 0; i < initials.length; i++) {
|
|
18
|
+
hash = initials.charCodeAt(i) + ((hash << 5) - hash);
|
|
19
|
+
}
|
|
20
|
+
const hue = Math.abs(hash) % 360;
|
|
21
|
+
return `hsl(${hue}, 60%, 60%)`; // nice pastel color
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const initials = getInitials(value);
|
|
25
|
+
const bgColor = getColorFromInitials(initials);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div className="solid-table-row">
|
|
29
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
|
|
30
|
+
<div
|
|
31
|
+
style={{
|
|
32
|
+
width: 25,
|
|
33
|
+
height: 25,
|
|
34
|
+
borderRadius: '50%',
|
|
35
|
+
backgroundColor: bgColor,
|
|
36
|
+
color: 'white',
|
|
37
|
+
display: 'flex',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
fontWeight: 600,
|
|
41
|
+
fontSize: 25 * 0.4,
|
|
42
|
+
boxShadow: '0 0 0 2px rgba(0,0,0,0.1)',
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
{initials}
|
|
46
|
+
</div>
|
|
47
|
+
<span>{value}</span>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|