@solidstarters/solid-core-ui 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/components/core/common/FilterComponent.d.ts +2 -2
  2. package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
  3. package/dist/components/core/common/FilterComponent.js +6 -7
  4. package/dist/components/core/common/FilterComponent.js.map +1 -1
  5. package/dist/components/core/common/SolidGlobalSearchElement.d.ts +2 -1
  6. package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
  7. package/dist/components/core/common/SolidGlobalSearchElement.js +150 -9
  8. package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
  9. package/dist/components/core/filter/fields/SolidSelectionDynamicField.js +1 -1
  10. package/dist/components/core/filter/fields/SolidSelectionDynamicField.js.map +1 -1
  11. package/dist/components/core/filter/fields/SolidSelectionStaticField.d.ts.map +1 -1
  12. package/dist/components/core/filter/fields/SolidSelectionStaticField.js +1 -2
  13. package/dist/components/core/filter/fields/SolidSelectionStaticField.js.map +1 -1
  14. package/dist/components/core/filter/fields/SolidShortTextField.d.ts.map +1 -1
  15. package/dist/components/core/filter/fields/SolidShortTextField.js +0 -1
  16. package/dist/components/core/filter/fields/SolidShortTextField.js.map +1 -1
  17. package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
  18. package/dist/components/core/kanban/KanbanBoard.js +2 -0
  19. package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
  20. package/dist/components/core/kanban/KanbanColumn.d.ts +2 -0
  21. package/dist/components/core/kanban/KanbanColumn.d.ts.map +1 -1
  22. package/dist/components/core/kanban/KanbanColumn.js +4 -3
  23. package/dist/components/core/kanban/KanbanColumn.js.map +1 -1
  24. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  25. package/dist/components/core/kanban/SolidKanbanView.js +131 -46
  26. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  27. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  28. package/dist/components/core/list/SolidListView.js +93 -302
  29. package/dist/components/core/list/SolidListView.js.map +1 -1
  30. package/dist/components/core/module/CreateModule.js +2 -2
  31. package/dist/components/core/module/CreateModule.js.map +1 -1
  32. package/dist/components/layout/AppSidebar.d.ts.map +1 -1
  33. package/dist/components/layout/AppSidebar.js +12 -6
  34. package/dist/components/layout/AppSidebar.js.map +1 -1
  35. package/dist/index.js +2 -2
  36. package/package.json +1 -1
  37. package/src/components/core/common/FilterComponent.tsx +6 -7
  38. package/src/components/core/common/SolidGlobalSearchElement.tsx +143 -10
  39. package/src/components/core/filter/fields/SolidSelectionDynamicField.tsx +1 -1
  40. package/src/components/core/filter/fields/SolidSelectionStaticField.tsx +1 -2
  41. package/src/components/core/filter/fields/SolidShortTextField.tsx +0 -1
  42. package/src/components/core/kanban/KanbanBoard.tsx +3 -1
  43. package/src/components/core/kanban/KanbanColumn.tsx +15 -9
  44. package/src/components/core/kanban/SolidKanbanView.tsx +124 -31
  45. package/src/components/core/list/SolidListView.tsx +70 -332
  46. package/src/components/core/module/CreateModule.tsx +2 -2
  47. package/src/components/layout/AppSidebar.tsx +18 -8
  48. package/dist/components/common/FilterComponent.d.ts +0 -3
  49. package/dist/components/common/FilterComponent.d.ts.map +0 -1
  50. package/dist/components/common/FilterComponent.js +0 -214
  51. package/dist/components/common/FilterComponent.js.map +0 -1
  52. package/dist/components/core/filter/columns/SolidBigintField.d.ts +0 -4
  53. package/dist/components/core/filter/columns/SolidBigintField.d.ts.map +0 -1
  54. package/dist/components/core/filter/columns/SolidBigintField.js +0 -8
  55. package/dist/components/core/filter/columns/SolidBigintField.js.map +0 -1
  56. package/dist/components/core/filter/columns/SolidBooleanField.d.ts +0 -4
  57. package/dist/components/core/filter/columns/SolidBooleanField.d.ts.map +0 -1
  58. package/dist/components/core/filter/columns/SolidBooleanField.js +0 -27
  59. package/dist/components/core/filter/columns/SolidBooleanField.js.map +0 -1
  60. package/dist/components/core/filter/columns/SolidComputedField.d.ts +0 -4
  61. package/dist/components/core/filter/columns/SolidComputedField.d.ts.map +0 -1
  62. package/dist/components/core/filter/columns/SolidComputedField.js +0 -22
  63. package/dist/components/core/filter/columns/SolidComputedField.js.map +0 -1
  64. package/dist/components/core/filter/columns/SolidDateField.d.ts +0 -9
  65. package/dist/components/core/filter/columns/SolidDateField.d.ts.map +0 -1
  66. package/dist/components/core/filter/columns/SolidDateField.js +0 -35
  67. package/dist/components/core/filter/columns/SolidDateField.js.map +0 -1
  68. package/dist/components/core/filter/columns/SolidDatetimeField.d.ts +0 -4
  69. package/dist/components/core/filter/columns/SolidDatetimeField.d.ts.map +0 -1
  70. package/dist/components/core/filter/columns/SolidDatetimeField.js +0 -24
  71. package/dist/components/core/filter/columns/SolidDatetimeField.js.map +0 -1
  72. package/dist/components/core/filter/columns/SolidDecimalField.d.ts +0 -4
  73. package/dist/components/core/filter/columns/SolidDecimalField.d.ts.map +0 -1
  74. package/dist/components/core/filter/columns/SolidDecimalField.js +0 -8
  75. package/dist/components/core/filter/columns/SolidDecimalField.js.map +0 -1
  76. package/dist/components/core/filter/columns/SolidExternalIdField.d.ts +0 -4
  77. package/dist/components/core/filter/columns/SolidExternalIdField.d.ts.map +0 -1
  78. package/dist/components/core/filter/columns/SolidExternalIdField.js +0 -25
  79. package/dist/components/core/filter/columns/SolidExternalIdField.js.map +0 -1
  80. package/dist/components/core/filter/columns/SolidFloatField.d.ts +0 -4
  81. package/dist/components/core/filter/columns/SolidFloatField.d.ts.map +0 -1
  82. package/dist/components/core/filter/columns/SolidFloatField.js +0 -8
  83. package/dist/components/core/filter/columns/SolidFloatField.js.map +0 -1
  84. package/dist/components/core/filter/columns/SolidIdField.d.ts +0 -4
  85. package/dist/components/core/filter/columns/SolidIdField.d.ts.map +0 -1
  86. package/dist/components/core/filter/columns/SolidIdField.js +0 -25
  87. package/dist/components/core/filter/columns/SolidIdField.js.map +0 -1
  88. package/dist/components/core/filter/columns/SolidIntField.d.ts +0 -4
  89. package/dist/components/core/filter/columns/SolidIntField.d.ts.map +0 -1
  90. package/dist/components/core/filter/columns/SolidIntField.js +0 -34
  91. package/dist/components/core/filter/columns/SolidIntField.js.map +0 -1
  92. package/dist/components/core/filter/columns/SolidLongTextField.d.ts +0 -4
  93. package/dist/components/core/filter/columns/SolidLongTextField.d.ts.map +0 -1
  94. package/dist/components/core/filter/columns/SolidLongTextField.js +0 -8
  95. package/dist/components/core/filter/columns/SolidLongTextField.js.map +0 -1
  96. package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts +0 -4
  97. package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts.map +0 -1
  98. package/dist/components/core/filter/columns/SolidMediaMultipleField.js +0 -35
  99. package/dist/components/core/filter/columns/SolidMediaMultipleField.js.map +0 -1
  100. package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts +0 -4
  101. package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts.map +0 -1
  102. package/dist/components/core/filter/columns/SolidMediaSingleField.js +0 -35
  103. package/dist/components/core/filter/columns/SolidMediaSingleField.js.map +0 -1
  104. package/dist/components/core/filter/columns/SolidRelationField.d.ts +0 -4
  105. package/dist/components/core/filter/columns/SolidRelationField.d.ts.map +0 -1
  106. package/dist/components/core/filter/columns/SolidRelationField.js +0 -12
  107. package/dist/components/core/filter/columns/SolidRelationField.js.map +0 -1
  108. package/dist/components/core/filter/columns/SolidRichTextField.d.ts +0 -4
  109. package/dist/components/core/filter/columns/SolidRichTextField.d.ts.map +0 -1
  110. package/dist/components/core/filter/columns/SolidRichTextField.js +0 -8
  111. package/dist/components/core/filter/columns/SolidRichTextField.js.map +0 -1
  112. package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts +0 -4
  113. package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts.map +0 -1
  114. package/dist/components/core/filter/columns/SolidSelectionDynamicField.js +0 -25
  115. package/dist/components/core/filter/columns/SolidSelectionDynamicField.js.map +0 -1
  116. package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts +0 -4
  117. package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts.map +0 -1
  118. package/dist/components/core/filter/columns/SolidSelectionStaticField.js +0 -26
  119. package/dist/components/core/filter/columns/SolidSelectionStaticField.js.map +0 -1
  120. package/dist/components/core/filter/columns/SolidShortTextField.d.ts +0 -4
  121. package/dist/components/core/filter/columns/SolidShortTextField.d.ts.map +0 -1
  122. package/dist/components/core/filter/columns/SolidShortTextField.js +0 -33
  123. package/dist/components/core/filter/columns/SolidShortTextField.js.map +0 -1
  124. package/dist/components/core/filter/columns/SolidTimeField.d.ts +0 -4
  125. package/dist/components/core/filter/columns/SolidTimeField.d.ts.map +0 -1
  126. package/dist/components/core/filter/columns/SolidTimeField.js +0 -24
  127. package/dist/components/core/filter/columns/SolidTimeField.js.map +0 -1
  128. package/dist/components/core/filter/columns/SolidUuidField.d.ts +0 -4
  129. package/dist/components/core/filter/columns/SolidUuidField.d.ts.map +0 -1
  130. package/dist/components/core/filter/columns/SolidUuidField.js +0 -25
  131. package/dist/components/core/filter/columns/SolidUuidField.js.map +0 -1
  132. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts +0 -4
  133. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts.map +0 -1
  134. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js +0 -54
  135. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js.map +0 -1
@@ -43,214 +43,16 @@ type SolidListViewParams = {
43
43
  customFilter?: any
44
44
  };
45
45
 
46
- // const transformRulesToFilters = (filterRules: any) => {
47
- // if (!filterRules || !filterRules.children) return {};
48
-
49
- // let operatorKey = filterRules.matchOperator === "and" ? "$and" : "$or";
50
-
51
- // let filters = filterRules.children.map((child: any) => {
52
- // if (child.type === "rule") {
53
- // let filterValue ;
54
- // if(child.value){
55
-
56
- // if(child.value.length === 1){
57
- // if (typeof child.value[0] === "object" && child.value[0] !== null) {
58
- // filterValue = [child.value[0].value];
59
- // }else{
60
- // filterValue = child.value[0];
61
- // }
62
- // }else{
63
- // if (typeof child.value[0] === "object" && child.value[0] !== null) {
64
- // filterValue = child.value.map((i:any) => i.value);
65
- // }else{
66
- // filterValue = child.value;
67
- // }
68
- // }
69
- // }
70
-
71
- // let ruleFilter = { [child.fieldName]: { [child.matchMode]: filterValue} };
72
- // // If the rule has children, process them recursively
73
- // if (child.children && child.children.length > 0) {
74
- // let childFilters = transformRulesToFilters({ matchOperator: "and", children: child.children }).filters;
75
- // return { [operatorKey]: [ruleFilter, childFilters] };
76
- // }
77
-
78
- // return ruleFilter;
79
- // } else if (child.type === "rule_group") {
80
- // return transformRulesToFilters(child).filters; // Recursively process rule groups
81
- // }
82
- // }).filter(Boolean);
83
-
84
- // return { filters: { [operatorKey]: filters } };
85
-
86
-
87
- // }
88
- const transformRulesToFilters = (input: any) => {
89
-
90
- // Helper function to process individual rules
91
- const processRule = (rule) => {
92
- if (rule.value.length > 0) {
93
-
94
- // Ensure rule.value is always an array
95
- let values = typeof rule.value[0] === "object" ? rule.value.map((i: any) => i.value) : rule.value;
96
- if (rule.matchMode !== '$in' && rule.matchMode !== '$notIn' && rule.matchMode !== '$between') {
97
- values = values[0];
98
- }
99
- // Rule transformation
100
- let transformedRule = {
101
- [rule.fieldName]: {
102
- [rule.matchMode]: values // Assuming `value` is always an array with `value` and `label`
103
- }
104
- };
105
-
106
- // If the rule has children (which means it's a rule group), process them
107
- let processedFields;
108
- if (rule.children && rule.children.length > 0) {
109
- processedFields = rule.children.map(child => processRuleGroup(child));
110
- }
111
- if (processedFields) {
112
- return { ...transformedRule, processedFields }
113
- }
114
- return { ...transformedRule }
115
- }
116
-
117
- };
118
-
119
- // Helper function to process rule groups
120
- const processRuleGroup = (ruleGroup) => {
121
- const operator = ruleGroup.matchOperator === 'or' ? '$or' : '$and';
122
- const children = ruleGroup.children.map(child => {
123
- if (child.type === 'rule') {
124
- // Process the rule
125
- return processRule(child);
126
- } else if (child.type === 'rule_group') {
127
- // Process the rule group recursively
128
- return processRuleGroup(child);
129
- }
130
- });
131
-
132
- return {
133
- [operator]: children
134
- };
135
- };
136
-
137
- // Start processing the root rule group
138
- const filterObject = processRuleGroup(input);
139
-
140
- function liftProcessedFields(filters) {
141
- if (!filters || typeof filters !== 'object') return filters;
142
-
143
- function processArray(arr) {
144
- let newArr = [];
145
- for (let obj of arr) {
146
- if (obj.processedFields) {
147
- let processed = processArray(obj.processedFields); // Recursively process nested processedFields
148
- delete obj.processedFields;
149
- newArr.push(obj, ...processed);
150
- } else {
151
- newArr.push(obj);
152
- }
153
-
154
- for (let key in obj) {
155
- if (Array.isArray(obj[key])) {
156
- obj[key] = processArray(obj[key]);
157
- }
158
- }
159
- }
160
- return newArr;
161
- }
162
-
163
- for (let key in filters) {
164
- if (Array.isArray(filters[key])) {
165
- filters[key] = processArray(filters[key]);
166
- }
167
- }
168
-
169
- return filters;
170
- } return {
171
- filters: liftProcessedFields(filterObject)
172
- };
173
- }
174
-
175
-
176
46
  export const SolidListView = (params: SolidListViewParams) => {
177
47
 
178
- const initialState: FilterRule[] = [
179
- {
180
- "id": 1,
181
- "type": "rule_group",
182
- "matchOperator": "or",
183
- "parentRule": null,
184
- "children": [
185
- {
186
- "id": 1738397527814,
187
- "type": "rule",
188
- "fieldName": "module",
189
- "matchMode": "$in",
190
- "value": [
191
- {
192
- "label": "solid-core",
193
- "value": 1
194
- }
195
- ],
196
- "parentRule": 1,
197
- "children": [
198
- {
199
- "id": 1738397555900,
200
- "type": "rule_group",
201
- "matchOperator": "and",
202
- "parentRule": 1738397527814,
203
- "children": [
204
- {
205
- "id": 1738397556184,
206
- "type": "rule",
207
- "fieldName": "name",
208
- "matchMode": "$startsWithi",
209
- "value": [
210
- "social"
211
- ],
212
- "parentRule": 1738397555900,
213
- "children": []
214
- },
215
- {
216
- "id": 1738397556147,
217
- "type": "rule",
218
- "fieldName": "displayName",
219
- "matchMode": "$startsWithi",
220
- "value": [
221
- "social"
222
- ],
223
- "parentRule": 1738397555900,
224
- "children": []
225
- }
226
- ]
227
- }
228
- ]
229
- },
230
- {
231
- "id": 1738397547577,
232
- "type": "rule",
233
- "fieldName": "module",
234
- "matchMode": "$in",
235
- "value": [
236
- {
237
- "label": "srmd-tracker",
238
- "value": 4
239
- }
240
- ],
241
- "parentRule": 1,
242
- "children": []
243
- }
244
- ]
245
- }
246
- ];
48
+ const solidGlobalSearchElementRef = useRef();
247
49
 
248
50
 
249
51
  const router = useRouter()
250
52
  // TODO: The initial filter state will be created based on the fields which are present on this list view.
251
- const [filters, setFilters] = useState<DataTableFilterMeta>({});
252
- const [customFilter, setCustomFilter] = useState<FilterRule[]>(initialState);
253
- const [showGlobalSearchElement, setShowGlobalSearchElement] = useState<boolean>(false);
53
+ const [filters, setFilters] = useState<any>();
54
+ // const [customFilter, setCustomFilter] = useState<FilterRule[]>(initialState);
55
+ // const [showGlobalSearchElement, setShowGlobalSearchElement] = useState<boolean>(false);
254
56
 
255
57
  const [toPopulate, setToPopulate] = useState<string[]>([]);
256
58
  const [actionsAllowed, setActionsAllowed] = useState<string[]>([]);
@@ -278,9 +80,7 @@ export const SolidListView = (params: SolidListViewParams) => {
278
80
  fetchPermissions();
279
81
  }, [params.modelName]);
280
82
 
281
- const isFilterApplied = Object.values(filters).some(
282
- (filter: any) => filter?.value && filter.value.length > 0
283
- );
83
+ const isFilterApplied = filters ? true : false;
284
84
 
285
85
  // Create the RTK slices for this entity
286
86
  const entityApi = createSolidEntityApi(params.modelName);
@@ -347,7 +147,7 @@ export const SolidListView = (params: SolidListViewParams) => {
347
147
  toPopulate.push(fieldMetadata.name);
348
148
  }
349
149
  }
350
- setFilters(initialFilters);
150
+ // setFilters(initialFilters);
351
151
  setRows(solidListViewMetaData?.data?.solidView?.layout?.attrs?.defaultPageSize ? solidListViewMetaData?.data?.solidView?.layout?.attrs.defaultPageSize : 25)
352
152
  setToPopulate(toPopulate);
353
153
  }
@@ -370,11 +170,6 @@ export const SolidListView = (params: SolidListViewParams) => {
370
170
  }, [solidListViewMetaData]);
371
171
 
372
172
 
373
-
374
-
375
-
376
-
377
-
378
173
  // All list view state.
379
174
  const [listViewData, setListViewData] = useState<any[]>([]);
380
175
  const [first, setFirst] = useState(0);
@@ -554,48 +349,16 @@ export const SolidListView = (params: SolidListViewParams) => {
554
349
  limit?: number,
555
350
  sortField?: string,
556
351
  sortOrder?: number,
557
- filterQuery?: any
352
+ filters?: any
558
353
  ) => {
559
354
 
560
- const formattedFilters: any = {};
561
355
  const solidFieldsMetadata = solidListViewMetaData.data.solidFieldsMetadata;
562
356
 
563
- Object.keys(filterQuery).forEach((field) => {
564
-
565
- const filterField = filterQuery[field];
566
- const filterFieldMeta = solidFieldsMetadata[field];
567
-
568
- // Some filters will not have constraints
569
- if (!filterField.constraints) {
570
- if (filterField.value != null) {
571
- const { operator, value } = identifySolidOperatorAndValue(filterField.matchMode, filterField.value);
572
-
573
- // Massage the filter value for relation many-to-one before sending to the server.
574
- if (filterFieldMeta.type === 'relation' && filterFieldMeta.relationType === 'many-to-one') {
575
- // @ts-ignore
576
- const manyToOneIds = value.map(i => i.value);
577
- formattedFilters[field] = { [operator]: manyToOneIds };
578
- }
579
- // Massage the filter value for selectionStatic before sending to the server.
580
- else if (['selectionStatic', 'selectionDynamic'].includes(filterFieldMeta.type)) {
581
- // @ts-ignore
582
- const values = value.map(i => i.value);
583
- formattedFilters[field] = { [operator]: values };
584
- }
585
- else {
586
- formattedFilters[field] = { [operator]: value };
587
- }
588
- }
589
- }
590
- // TODO: Incase we start supporting multiple constraints in the future then we need to implement an else block here.
591
- else { }
592
-
593
- });
594
357
 
595
358
  const queryData: any = {
596
359
  offset: offset ?? first,
597
360
  limit: limit ?? rows,
598
- filters: formattedFilters,
361
+ filters: filters ?? filters,
599
362
  populate: toPopulate,
600
363
  };
601
364
 
@@ -619,40 +382,15 @@ export const SolidListView = (params: SolidListViewParams) => {
619
382
  triggerGetSolidEntities(queryString);
620
383
  };
621
384
 
622
- //apply custom filter code
623
- const handleApplyCustomFilter = () => {
624
- const transformedFilter = transformRulesToFilters(customFilter[0]);
625
- console.log("transformedFilter", transformedFilter);
626
-
627
- if (toPopulate) {
628
- const queryData = {
629
- offset: 0,
630
- limit: 25,
631
- populate: toPopulate,
632
- sort: [`id:desc`],
633
- filters: { ...transformedFilter.filters }
634
- };
635
- if (params.embeded) {
636
-
637
- }
638
- const queryString = qs.stringify(queryData, {
639
- encodeValuesOnly: true
640
- });
641
-
642
- triggerGetSolidEntities(queryString);
643
- // setShowGlobalSearchElement(false)
644
- setSelectedRecords([]);
645
- }
646
- }
647
385
  // handle filter...
648
- const onFilter = (e: any) => {
649
- setFilters(e.filters);
386
+ const handleApplyCustomFilter = (filters) => {
387
+ setFilters(filters);
650
388
  setQueryString(
651
389
  0,
652
390
  rows,
653
391
  sortField,
654
392
  sortOrder === 1 || sortOrder === -1 ? sortOrder : 0,
655
- e.filters
393
+ filters
656
394
  );
657
395
  };
658
396
 
@@ -661,6 +399,8 @@ export const SolidListView = (params: SolidListViewParams) => {
661
399
  if (solidListViewMetaData) {
662
400
  initialFilterMethod()
663
401
  }
402
+ setFilters(null)
403
+ solidGlobalSearchElementRef.current.clearFilter()
664
404
  };
665
405
 
666
406
  const op = useRef(null)
@@ -668,62 +408,62 @@ export const SolidListView = (params: SolidListViewParams) => {
668
408
  // clickable link allowing one to open the detail / form view.
669
409
  const detailsBodyTemplate = (solidViewData: any) => {
670
410
  return (
671
- <div>
672
-
673
- <Button
674
- text
675
- size="small"
676
- className="p-0"
677
- onClick={(e) =>
678
- // @ts-ignore
679
- op.current.toggle(e)}
680
- >
681
- <svg xmlns="http://www.w3.org/2000/svg" width="3" height="10" viewBox="0 0 4 16" fill="none">
682
- <path d="M4 14C4 14.55 3.80417 15.0208 3.4125 15.4125C3.02083 15.8042 2.55 16 2 16C1.45 16 0.979167 15.8042 0.5875 15.4125C0.195833 15.0208 0 14.55 0 14C0 13.45 0.195833 12.9792 0.5875 12.5875C0.979167 12.1958 1.45 12 2 12C2.55 12 3.02083 12.1958 3.4125 12.5875C3.80417 12.9792 4 13.45 4 14ZM4 8C4 8.55 3.80417 9.02083 3.4125 9.4125C3.02083 9.80417 2.55 10 2 10C1.45 10 0.979167 9.80417 0.5875 9.4125C0.195833 9.02083 0 8.55 0 8C0 7.45 0.195833 6.97917 0.5875 6.5875C0.979167 6.19583 1.45 6 2 6C2.55 6 3.02083 6.19583 3.4125 6.5875C3.80417 6.97917 4 7.45 4 8ZM4 2C4 2.55 3.80417 3.02083 3.4125 3.4125C3.02083 3.80417 2.55 4 2 4C1.45 4 0.979167 3.80417 0.5875 3.4125C0.195833 3.02083 0 2.55 0 2C0 1.45 0.195833 0.979166 0.5875 0.5875C0.979167 0.195833 1.45 0 2 0C2.55 0 3.02083 0.195833 3.4125 0.5875C3.80417 0.979166 4 1.45 4 2Z" fill="#666666" />
683
- </svg>
684
- </Button>
685
- <OverlayPanel ref={op} className="solid-custom-overlay" style={{ top: 10 }}>
686
- <div className="flex flex-column gap-1 p-1">
687
- <Button
688
- className="w-8rem"
689
- label="Edit"
690
- size="small"
691
- iconPos="left"
692
- icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
693
- <path d="M3.33333 12.6667H4.28333L10.8 6.15L9.85 5.2L3.33333 11.7167V12.6667ZM2 14V11.1667L10.8 2.38333C10.9333 2.26111 11.0806 2.16667 11.2417 2.1C11.4028 2.03333 11.5722 2 11.75 2C11.9278 2 12.1 2.03333 12.2667 2.1C12.4333 2.16667 12.5778 2.26667 12.7 2.4L13.6167 3.33333C13.75 3.45556 13.8472 3.6 13.9083 3.76667C13.9694 3.93333 14 4.1 14 4.26667C14 4.44444 13.9694 4.61389 13.9083 4.775C13.8472 4.93611 13.75 5.08333 13.6167 5.21667L4.83333 14H2ZM10.3167 5.68333L9.85 5.2L10.8 6.15L10.3167 5.68333Z" fill="#F9F0FF" />
694
- </svg>}
695
- onClick={() => {
696
- if (params.embeded == true) {
697
- params.handlePopUpOpen(solidViewData.id);
698
- } else {
699
- router.push(`${editButtonUrl}/${solidViewData.id}`)
700
- }
701
- }}
702
- />
703
- <Button
704
- text
705
- className="w-8rem"
706
- label="Delete"
707
- size="small"
708
- iconPos="left"
709
- severity="secondary"
710
- icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
711
- <path d="M4.66666 14C4.29999 14 3.9861 13.8694 3.72499 13.6083C3.46388 13.3472 3.33332 13.0333 3.33332 12.6667V4H2.66666V2.66667H5.99999V2H9.99999V2.66667H13.3333V4H12.6667V12.6667C12.6667 13.0333 12.5361 13.3472 12.275 13.6083C12.0139 13.8694 11.7 14 11.3333 14H4.66666ZM11.3333 4H4.66666V12.6667H11.3333V4ZM5.99999 11.3333H7.33332V5.33333H5.99999V11.3333ZM8.66666 11.3333H9.99999V5.33333H8.66666V11.3333Z" fill="#4B4D52" />
712
- </svg>}
713
- onClick={() => deleteSolidSingleEntiry(solidViewData.id)}
714
- />
715
- </div>
716
- </OverlayPanel>
717
- </div>
718
- // <a onClick={() => {
719
- // if (params.embeded == true) {
720
- // params.handlePopUpOpen(solidViewData.id);
721
- // } else {
722
- // router.push(`${editButtonUrl}/${solidViewData.id}`)
723
- // }
724
- // }} rel="noopener noreferrer" className="text-sm font-bold p-0" style={{ color: "#12415D" }}>
725
- // <i className="pi pi-pencil" style={{ fontSize: "1rem" }}></i>
726
- // </a>
411
+ // <div>
412
+
413
+ // <Button
414
+ // text
415
+ // size="small"
416
+ // className="p-0"
417
+ // onClick={(e) =>
418
+ // // @ts-ignore
419
+ // op.current.toggle(e)}
420
+ // >
421
+ // <svg xmlns="http://www.w3.org/2000/svg" width="3" height="10" viewBox="0 0 4 16" fill="none">
422
+ // <path d="M4 14C4 14.55 3.80417 15.0208 3.4125 15.4125C3.02083 15.8042 2.55 16 2 16C1.45 16 0.979167 15.8042 0.5875 15.4125C0.195833 15.0208 0 14.55 0 14C0 13.45 0.195833 12.9792 0.5875 12.5875C0.979167 12.1958 1.45 12 2 12C2.55 12 3.02083 12.1958 3.4125 12.5875C3.80417 12.9792 4 13.45 4 14ZM4 8C4 8.55 3.80417 9.02083 3.4125 9.4125C3.02083 9.80417 2.55 10 2 10C1.45 10 0.979167 9.80417 0.5875 9.4125C0.195833 9.02083 0 8.55 0 8C0 7.45 0.195833 6.97917 0.5875 6.5875C0.979167 6.19583 1.45 6 2 6C2.55 6 3.02083 6.19583 3.4125 6.5875C3.80417 6.97917 4 7.45 4 8ZM4 2C4 2.55 3.80417 3.02083 3.4125 3.4125C3.02083 3.80417 2.55 4 2 4C1.45 4 0.979167 3.80417 0.5875 3.4125C0.195833 3.02083 0 2.55 0 2C0 1.45 0.195833 0.979166 0.5875 0.5875C0.979167 0.195833 1.45 0 2 0C2.55 0 3.02083 0.195833 3.4125 0.5875C3.80417 0.979166 4 1.45 4 2Z" fill="#666666" />
423
+ // </svg>
424
+ // </Button>
425
+ // <OverlayPanel ref={op} className="solid-custom-overlay" style={{ top: 10 }}>
426
+ // <div className="flex flex-column gap-1 p-1">
427
+ // <Button
428
+ // className="w-8rem"
429
+ // label="Edit"
430
+ // size="small"
431
+ // iconPos="left"
432
+ // icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
433
+ // <path d="M3.33333 12.6667H4.28333L10.8 6.15L9.85 5.2L3.33333 11.7167V12.6667ZM2 14V11.1667L10.8 2.38333C10.9333 2.26111 11.0806 2.16667 11.2417 2.1C11.4028 2.03333 11.5722 2 11.75 2C11.9278 2 12.1 2.03333 12.2667 2.1C12.4333 2.16667 12.5778 2.26667 12.7 2.4L13.6167 3.33333C13.75 3.45556 13.8472 3.6 13.9083 3.76667C13.9694 3.93333 14 4.1 14 4.26667C14 4.44444 13.9694 4.61389 13.9083 4.775C13.8472 4.93611 13.75 5.08333 13.6167 5.21667L4.83333 14H2ZM10.3167 5.68333L9.85 5.2L10.8 6.15L10.3167 5.68333Z" fill="#F9F0FF" />
434
+ // </svg>}
435
+ // onClick={() => {
436
+ // if (params.embeded == true) {
437
+ // params.handlePopUpOpen(solidViewData.id);
438
+ // } else {
439
+ // router.push(`${editButtonUrl}/${solidViewData.id}`)
440
+ // }
441
+ // }}
442
+ // />
443
+ // <Button
444
+ // text
445
+ // className="w-8rem"
446
+ // label="Delete"
447
+ // size="small"
448
+ // iconPos="left"
449
+ // severity="secondary"
450
+ // icon={<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
451
+ // <path d="M4.66666 14C4.29999 14 3.9861 13.8694 3.72499 13.6083C3.46388 13.3472 3.33332 13.0333 3.33332 12.6667V4H2.66666V2.66667H5.99999V2H9.99999V2.66667H13.3333V4H12.6667V12.6667C12.6667 13.0333 12.5361 13.3472 12.275 13.6083C12.0139 13.8694 11.7 14 11.3333 14H4.66666ZM11.3333 4H4.66666V12.6667H11.3333V4ZM5.99999 11.3333H7.33332V5.33333H5.99999V11.3333ZM8.66666 11.3333H9.99999V5.33333H8.66666V11.3333Z" fill="#4B4D52" />
452
+ // </svg>}
453
+ // onClick={() => deleteSolidSingleEntiry(solidViewData.id)}
454
+ // />
455
+ // </div>
456
+ // </OverlayPanel>
457
+ // </div>
458
+ <a onClick={() => {
459
+ if (params.embeded == true) {
460
+ params.handlePopUpOpen(solidViewData.id);
461
+ } else {
462
+ router.push(`${editButtonUrl}/${solidViewData.id}`)
463
+ }
464
+ }} rel="noopener noreferrer" className="text-sm font-bold p-0" style={{ color: "#12415D" }}>
465
+ <i className="pi pi-pencil" style={{ fontSize: "1rem" }}></i>
466
+ </a>
727
467
  );
728
468
  };
729
469
 
@@ -818,7 +558,7 @@ export const SolidListView = (params: SolidListViewParams) => {
818
558
  }
819
559
 
820
560
  {solidListViewMetaData?.data?.solidView?.layout?.attrs?.enableGlobalSearch === true && params.embeded === false &&
821
- <SolidGlobalSearchElement viewData={solidListViewMetaData} showGlobalSearchElement={showGlobalSearchElement} setShowGlobalSearchElement={setShowGlobalSearchElement} customFilter={customFilter} setCustomFilter={setCustomFilter} handleApplyCustomFilter={handleApplyCustomFilter} ></SolidGlobalSearchElement>
561
+ <SolidGlobalSearchElement ref={solidGlobalSearchElementRef} viewData={solidListViewMetaData} handleApplyCustomFilter={handleApplyCustomFilter} ></SolidGlobalSearchElement>
822
562
  }
823
563
  </div>
824
564
  <div className="flex align-items-center gap-3">
@@ -860,9 +600,7 @@ export const SolidListView = (params: SolidListViewParams) => {
860
600
  rows={rows}
861
601
  rowsPerPageOptions={solidListViewMetaData?.data?.solidView?.layout?.attrs?.pageSizeOptions}
862
602
  dataKey="id"
863
- filters={filters}
864
603
  emptyMessage="No Entities found."
865
- onFilter={onFilter}
866
604
  filterDisplay="menu"
867
605
  totalRecords={totalRecords}
868
606
  first={first}
@@ -239,7 +239,7 @@ const CreateModule = ({ data }: any) => {
239
239
 
240
240
  useEffect(() => {
241
241
  if (isSuccess == true || isDeleteModuleSuceess == true || isModuleUpdateSuccess == true) {
242
- router.push(`/admin/app-builder/module/all`);
242
+ router.push(`/admin/core/solid-core/module-metadata/list`);
243
243
  }
244
244
  }, [isSuccess, isDeleteModuleSuceess, isModuleUpdateSuccess])
245
245
 
@@ -334,7 +334,7 @@ const CreateModule = ({ data }: any) => {
334
334
 
335
335
  formik.handleChange(e);
336
336
  const { toKebabCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(e.target.value);
337
- if (pathname.includes('create')) {
337
+ if (pathname.includes('new')) {
338
338
  formik.setFieldValue("name", toKebabCase);
339
339
  }
340
340
 
@@ -114,14 +114,24 @@ const AppSidebar = () => {
114
114
  className={`menu-item ${currentMainMenu === m.title ? "active-menu-image" : ""}`}
115
115
  >
116
116
  <a onClick={() => handleMenu(m)}>
117
- <img
118
- style={{ cursor: "pointer", width: '30px' }}
119
- // src={currentMainMenu === m.title ? `/images/${m.title.toLocaleLowerCase()}-active.svg` : `/images/${m.title.toLocaleLowerCase()}.svg`}
120
- // src={`/images/menu/${m.title}.svg`}
121
- src={m.icon.startsWith("/") ? m.icon : `${process.env.API_URL}/${m.icon}`}
122
- // src={`/images/menu/app-builder.svg`}
123
- alt="Solid"
124
- />
117
+ {m.icon ?
118
+ <img
119
+ style={{ cursor: "pointer", width: '30px' }}
120
+ // src={currentMainMenu === m.title ? `/images/${m.title.toLocaleLowerCase()}-active.svg` : `/images/${m.title.toLocaleLowerCase()}.svg`}
121
+ // src={`/images/menu/${m.title}.svg`}
122
+ src={(m.icon && m.icon.startsWith("/")) ? m.icon : `${process.env.API_URL}/${m.icon}`}
123
+ // src={`/images/menu/app-builder.svg`}
124
+ alt="Solid"
125
+ />
126
+ :
127
+ <img
128
+ style={{ cursor: "pointer", width: '30px' }}
129
+ // src={currentMainMenu === m.title ? `/images/${m.title.toLocaleLowerCase()}-active.svg` : `/images/${m.title.toLocaleLowerCase()}.svg`}
130
+ // src={`/images/menu/${m.title}.svg`}
131
+ src={`/images/menu/app-builder.svg`}
132
+ alt="Solid"
133
+ />
134
+ }
125
135
  </a>
126
136
  </div>
127
137
  ))}
@@ -1,3 +0,0 @@
1
- declare const FilterComponent: () => import("react/jsx-runtime").JSX.Element;
2
- export default FilterComponent;
3
- //# sourceMappingURL=FilterComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterComponent.d.ts","sourceRoot":"","sources":["../../../src/components/common/FilterComponent.tsx"],"names":[],"mappings":"AAuRA,QAAA,MAAM,eAAe,+CAkJpB,CAAC;AAEF,eAAe,eAAe,CAAC"}