@solidstarters/solid-core-ui 1.1.24 → 1.1.26
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/SolidBreadcrumb.d.ts +1 -2
- package/dist/components/common/SolidBreadcrumb.d.ts.map +1 -1
- package/dist/components/common/SolidBreadcrumb.js +14 -9
- package/dist/components/common/SolidBreadcrumb.js.map +1 -1
- package/dist/components/core/form/SolidFormLayouts.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormLayouts.js +15 -7
- package/dist/components/core/form/SolidFormLayouts.js.map +1 -1
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +75 -44
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.js +2 -2
- package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +2 -2
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.js +2 -2
- package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.js +2 -2
- package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.js +2 -2
- package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.js +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +27 -96
- 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 +29 -29
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +2 -2
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.js +2 -2
- package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.js +3 -3
- package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js +2 -2
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +5 -5
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.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 -4
- 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 +3 -3
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/list/SolidTableRowCell.d.ts +6 -0
- package/dist/components/core/list/SolidTableRowCell.d.ts.map +1 -0
- package/dist/components/core/list/SolidTableRowCell.js +7 -0
- package/dist/components/core/list/SolidTableRowCell.js.map +1 -0
- package/dist/components/core/list/columns/SolidDateColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.js +7 -3
- package/dist/components/core/list/columns/SolidDateColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.js +7 -3
- package/dist/components/core/list/columns/SolidDatetimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidExternalIdColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidExternalIdColumn.js +7 -3
- package/dist/components/core/list/columns/SolidExternalIdColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIdColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidIdColumn.js +7 -3
- package/dist/components/core/list/columns/SolidIdColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.js +7 -3
- package/dist/components/core/list/columns/SolidIntColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js +7 -3
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +7 -3
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +7 -5
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js +7 -3
- package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js +10 -4
- package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
- package/dist/components/core/model/ModelMetaData.js +5 -5
- package/dist/components/core/model/ModelMetaData.js.map +1 -1
- package/dist/resources/globals.css +2 -1
- package/package.json +1 -1
- package/src/components/common/SolidBreadcrumb.tsx +18 -15
- package/src/components/core/form/SolidFormLayouts.tsx +15 -7
- package/src/components/core/form/SolidFormView.tsx +30 -9
- package/src/components/core/form/fields/SolidBooleanField.tsx +4 -1
- package/src/components/core/form/fields/SolidDateField.tsx +4 -1
- package/src/components/core/form/fields/SolidDateTimeField.tsx +4 -1
- package/src/components/core/form/fields/SolidDecimalField.tsx +6 -3
- package/src/components/core/form/fields/SolidIntegerField.tsx +4 -1
- package/src/components/core/form/fields/SolidJsonField.tsx +5 -3
- package/src/components/core/form/fields/SolidLongTextField.tsx +4 -1
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +33 -118
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +39 -33
- package/src/components/core/form/fields/SolidRichTextField.tsx +4 -1
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +4 -1
- package/src/components/core/form/fields/SolidSelectionStaticField.tsx +4 -1
- package/src/components/core/form/fields/SolidShortTextField.tsx +5 -4
- package/src/components/core/form/fields/SolidTimeField.tsx +5 -3
- package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +32 -24
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +31 -26
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +6 -5
- package/src/components/core/list/SolidTableRowCell.tsx +12 -0
- package/src/components/core/list/columns/SolidDateColumn.tsx +9 -1
- package/src/components/core/list/columns/SolidDatetimeColumn.tsx +9 -1
- package/src/components/core/list/columns/SolidExternalIdColumn.tsx +10 -1
- package/src/components/core/list/columns/SolidIdColumn.tsx +10 -2
- package/src/components/core/list/columns/SolidIntColumn.tsx +9 -1
- package/src/components/core/list/columns/SolidSelectionDynamicColumn.tsx +10 -1
- package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +10 -1
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +9 -4
- package/src/components/core/list/columns/SolidTimeColumn.tsx +9 -1
- package/src/components/core/list/columns/SolidUuidColumn.tsx +11 -2
- package/src/components/core/model/ModelMetaData.tsx +5 -5
- package/src/resources/globals.css +2 -1
|
@@ -125,7 +125,11 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
125
125
|
{(!fieldLayoutInfo.attrs.renderMode || fieldLayoutInfo.attrs.renderMode === "autocomplete") &&
|
|
126
126
|
this.renderAutoCompleteMode(formik, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
|
|
127
127
|
}
|
|
128
|
-
{isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
|
|
128
|
+
{isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
|
|
129
|
+
<div className="absolute mt-1">
|
|
130
|
+
<Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
|
|
131
|
+
</div>
|
|
132
|
+
)}
|
|
129
133
|
{/* </div> */}
|
|
130
134
|
</>
|
|
131
135
|
);
|
|
@@ -137,7 +141,7 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
137
141
|
const className = fieldLayoutInfo.attrs?.className || 'field col-12';
|
|
138
142
|
const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
|
|
139
143
|
const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
|
|
140
|
-
|
|
144
|
+
|
|
141
145
|
const readOnlyPermission = this.fieldContext.readOnly;
|
|
142
146
|
|
|
143
147
|
|
|
@@ -242,6 +246,7 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
242
246
|
{showFieldLabel != false &&
|
|
243
247
|
<label className="form-field-label">
|
|
244
248
|
{capitalize(fieldLayoutInfo.attrs.name)}
|
|
249
|
+
{fieldMetadata.required && <span className="text-red-500"> *</span>}
|
|
245
250
|
</label>
|
|
246
251
|
}
|
|
247
252
|
{fieldLayoutInfo.attrs.inlineCreate === "true" &&
|
|
@@ -367,29 +372,32 @@ export class SolidRelationManyToManyField implements ISolidField {
|
|
|
367
372
|
|
|
368
373
|
return (
|
|
369
374
|
<div className={className}>
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
{
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
<AutoComplete
|
|
377
|
-
readOnly={readOnly || readOnlyPermission}
|
|
378
|
-
disabled={disabled || readOnlyPermission}
|
|
379
|
-
multiple
|
|
380
|
-
{...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
|
|
381
|
-
id={fieldLayoutInfo.attrs.name}
|
|
382
|
-
field="label"
|
|
383
|
-
value={formik.values[fieldLayoutInfo.attrs.name] || ''}
|
|
384
|
-
dropdown={!readOnlyPermission}
|
|
385
|
-
suggestions={autoCompleteItems}
|
|
386
|
-
completeMethod={autoCompleteSearch}
|
|
387
|
-
onChange={formik.handleChange}
|
|
388
|
-
className="solid-standard-autocomplete w-full"
|
|
389
|
-
/>
|
|
390
|
-
{fieldLayoutInfo.attrs.inlineCreate === "true" && readOnlyPermission === false &&
|
|
391
|
-
this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
|
|
375
|
+
<div className="mt-4">
|
|
376
|
+
{showFieldLabel != false &&
|
|
377
|
+
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">
|
|
378
|
+
{fieldLabel}
|
|
379
|
+
{fieldMetadata.required && <span className="text-red-500"> *</span>}
|
|
380
|
+
</label>
|
|
392
381
|
}
|
|
382
|
+
<div className="flex align-items-center gap-3 mt-2">
|
|
383
|
+
<AutoComplete
|
|
384
|
+
readOnly={readOnly || readOnlyPermission}
|
|
385
|
+
disabled={disabled || readOnlyPermission}
|
|
386
|
+
multiple
|
|
387
|
+
{...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
|
|
388
|
+
id={fieldLayoutInfo.attrs.name}
|
|
389
|
+
field="label"
|
|
390
|
+
value={formik.values[fieldLayoutInfo.attrs.name] || ''}
|
|
391
|
+
dropdown={!readOnlyPermission}
|
|
392
|
+
suggestions={autoCompleteItems}
|
|
393
|
+
completeMethod={autoCompleteSearch}
|
|
394
|
+
onChange={formik.handleChange}
|
|
395
|
+
className="solid-standard-autocomplete w-full"
|
|
396
|
+
/>
|
|
397
|
+
{fieldLayoutInfo.attrs.inlineCreate === "true" && readOnlyPermission === false &&
|
|
398
|
+
this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
|
|
399
|
+
}
|
|
400
|
+
</div>
|
|
393
401
|
</div>
|
|
394
402
|
</div>
|
|
395
403
|
);
|
|
@@ -137,33 +137,38 @@ export class SolidRelationManyToOneField implements ISolidField {
|
|
|
137
137
|
}
|
|
138
138
|
return (
|
|
139
139
|
<div className={className}>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<AutoComplete
|
|
147
|
-
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
148
|
-
disabled={formDisabled || fieldDisabled || readOnlyPermission}
|
|
149
|
-
{...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
|
|
150
|
-
id={fieldLayoutInfo.attrs.name}
|
|
151
|
-
field="label"
|
|
152
|
-
value={formik.values[fieldLayoutInfo.attrs.name] || ''}
|
|
153
|
-
dropdown={!readOnlyPermission}
|
|
154
|
-
suggestions={autoCompleteItems}
|
|
155
|
-
completeMethod={autoCompleteSearch}
|
|
156
|
-
onChange={formik.handleChange}
|
|
157
|
-
onFocus={(e) => e.target.select()}
|
|
158
|
-
className="w-full solid-standard-autocomplete"
|
|
159
|
-
/>
|
|
160
|
-
{fieldLayoutInfo.attrs.inlineCreate === "true" && readOnlyPermission === false &&
|
|
161
|
-
this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
|
|
140
|
+
<div className="mt-4">
|
|
141
|
+
{showFieldLabel != false &&
|
|
142
|
+
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">
|
|
143
|
+
{fieldLabel}
|
|
144
|
+
{fieldMetadata.required && <span className="text-red-500"> *</span>}
|
|
145
|
+
</label>
|
|
162
146
|
}
|
|
147
|
+
<div className="flex align-items-center gap-3 mt-2">
|
|
148
|
+
<AutoComplete
|
|
149
|
+
readOnly={formReadonly || fieldReadonly || readOnlyPermission}
|
|
150
|
+
disabled={formDisabled || fieldDisabled || readOnlyPermission}
|
|
151
|
+
{...formik.getFieldProps(fieldLayoutInfo.attrs.name)}
|
|
152
|
+
id={fieldLayoutInfo.attrs.name}
|
|
153
|
+
field="label"
|
|
154
|
+
value={formik.values[fieldLayoutInfo.attrs.name] || ''}
|
|
155
|
+
dropdown={!readOnlyPermission}
|
|
156
|
+
suggestions={autoCompleteItems}
|
|
157
|
+
completeMethod={autoCompleteSearch}
|
|
158
|
+
onChange={formik.handleChange}
|
|
159
|
+
onFocus={(e) => e.target.select()}
|
|
160
|
+
className="w-full solid-standard-autocomplete"
|
|
161
|
+
/>
|
|
162
|
+
{fieldLayoutInfo.attrs.inlineCreate === "true" && readOnlyPermission === false &&
|
|
163
|
+
this.renderSolidFormEmbededView(formik, customCreateHandler, visibleCreateRelationEntity, setvisibleCreateRelationEntity)
|
|
164
|
+
}
|
|
165
|
+
</div>
|
|
166
|
+
{isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
|
|
167
|
+
<div className="absolute mt-1">
|
|
168
|
+
<Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
|
|
169
|
+
</div>
|
|
170
|
+
)}
|
|
163
171
|
</div>
|
|
164
|
-
{isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
|
|
165
|
-
<Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
|
|
166
|
-
)}
|
|
167
172
|
</div>
|
|
168
173
|
);
|
|
169
174
|
}
|
|
@@ -189,7 +194,7 @@ export class SolidRelationManyToOneField implements ISolidField {
|
|
|
189
194
|
handlePopupClose: (() => {
|
|
190
195
|
setvisibleCreateRelationEntity(false);
|
|
191
196
|
}),
|
|
192
|
-
modelName: camelCase(this.fieldContext.fieldMetadata.
|
|
197
|
+
modelName: camelCase(this.fieldContext.fieldMetadata.relationCoModelSingularName)
|
|
193
198
|
}
|
|
194
199
|
|
|
195
200
|
return (
|
|
@@ -85,8 +85,8 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
85
85
|
setRefreshList((prev) => !prev);
|
|
86
86
|
const lisviewparams = {
|
|
87
87
|
moduleName: this.fieldContext.fieldMetadata.relationModelModuleName,
|
|
88
|
-
modelName: camelCase(this.fieldContext.fieldMetadata.
|
|
89
|
-
inlineCreate: readOnlyPermission === false ?
|
|
88
|
+
modelName: camelCase(this.fieldContext.fieldMetadata.relationCoModelSingularName),
|
|
89
|
+
inlineCreate: readOnlyPermission === false ? true : false,
|
|
90
90
|
customLayout: fieldLayoutInfo?.attrs?.inlineListLayout,
|
|
91
91
|
embeded: true
|
|
92
92
|
}
|
|
@@ -98,8 +98,8 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
98
98
|
const customFilter = this.fieldContext.fieldMetadata.relationCoModelFieldName ? this.fieldContext.fieldMetadata.relationCoModelFieldName : `${this.fieldContext.modelName}`
|
|
99
99
|
const listviewparams = {
|
|
100
100
|
moduleName: this.fieldContext.fieldMetadata.relationModelModuleName,
|
|
101
|
-
modelName: camelCase(this.fieldContext.fieldMetadata.
|
|
102
|
-
inlineCreate: readOnlyPermission === false ?
|
|
101
|
+
modelName: camelCase(this.fieldContext.fieldMetadata.relationCoModelSingularName),
|
|
102
|
+
inlineCreate: readOnlyPermission === false ? true : false,
|
|
103
103
|
customLayout: fieldLayoutInfo?.attrs?.inlineListLayout,
|
|
104
104
|
embeded: true,
|
|
105
105
|
customFilter: {
|
|
@@ -137,7 +137,8 @@ export class SolidRelationOneToManyField implements ISolidField {
|
|
|
137
137
|
{/* <div className="justify-content-center align-items-center"> */}
|
|
138
138
|
{showFieldLabel != false &&
|
|
139
139
|
<label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
|
|
140
|
-
|
|
140
|
+
{fieldMetadata.required && <span className="text-red-500"> *</span>}
|
|
141
|
+
{/* {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
|
|
141
142
|
</label>
|
|
142
143
|
}
|
|
143
144
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const SolidTableRowCell = ({ value, truncateAfter }: { value: string; truncateAfter?: number }) => {
|
|
2
|
+
return (
|
|
3
|
+
<div
|
|
4
|
+
className="solid-table-row"
|
|
5
|
+
style={{ maxWidth: truncateAfter ? `${truncateAfter}ch` : '30ch' }}
|
|
6
|
+
>
|
|
7
|
+
{value}
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default SolidTableRowCell;
|
|
@@ -4,6 +4,7 @@ import { Column, ColumnFilterElementTemplateOptions } from "primereact/column";
|
|
|
4
4
|
import { FormEvent } from "primereact/ts-helpers";
|
|
5
5
|
import { getNumberOfInputs, SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
7
|
+
import SolidTableRowCell from '../SolidTableRowCell';
|
|
7
8
|
|
|
8
9
|
export const dateFilterMatchModeOptions = [
|
|
9
10
|
{ label: 'Equals', value: FilterMatchMode.EQUALS },
|
|
@@ -39,6 +40,7 @@ const SolidDateColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
|
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
// TODO: the body template to be controlled based on the format that one is expecting the date to be displayed in.
|
|
43
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
42
44
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
43
45
|
|
|
44
46
|
return (
|
|
@@ -54,8 +56,14 @@ const SolidDateColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
|
|
|
54
56
|
filterMatchModeOptions={dateFilterMatchModeOptions}
|
|
55
57
|
filterElement={filterTemplate}
|
|
56
58
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
57
|
-
style={{ minWidth: "12rem" }}
|
|
59
|
+
// style={{ minWidth: "12rem" }}
|
|
58
60
|
headerClassName="table-header-fs"
|
|
61
|
+
body={(rowData) => (
|
|
62
|
+
<SolidTableRowCell
|
|
63
|
+
value={rowData[fieldMetadata.name]}
|
|
64
|
+
truncateAfter={truncateAfter}
|
|
65
|
+
/>
|
|
66
|
+
)}
|
|
59
67
|
></Column>
|
|
60
68
|
);
|
|
61
69
|
|
|
@@ -4,6 +4,7 @@ import { FormEvent } from "primereact/ts-helpers";
|
|
|
4
4
|
import { getNumberOfInputs, SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
5
5
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
6
6
|
import { dateFilterMatchModeOptions } from './SolidDateColumn';
|
|
7
|
+
import SolidTableRowCell from "../SolidTableRowCell";
|
|
7
8
|
|
|
8
9
|
const SolidDatetimeColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
9
10
|
const filterable = column.attrs.filterable;
|
|
@@ -27,6 +28,7 @@ const SolidDatetimeColumn = ({ solidListViewMetaData, fieldMetadata, column }: S
|
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
// TODO: the body template to be controlled based on the format that one is expecting the date to be displayed in.
|
|
31
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
30
32
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
31
33
|
|
|
32
34
|
return (
|
|
@@ -42,8 +44,14 @@ const SolidDatetimeColumn = ({ solidListViewMetaData, fieldMetadata, column }: S
|
|
|
42
44
|
filterMatchModeOptions={dateFilterMatchModeOptions}
|
|
43
45
|
filterElement={filterTemplate}
|
|
44
46
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
45
|
-
style={{ minWidth: "12rem" }}
|
|
47
|
+
// style={{ minWidth: "12rem" }}
|
|
46
48
|
headerClassName="table-header-fs"
|
|
49
|
+
body={(rowData) => (
|
|
50
|
+
<SolidTableRowCell
|
|
51
|
+
value={rowData[fieldMetadata.name]}
|
|
52
|
+
truncateAfter={truncateAfter}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
47
55
|
></Column>
|
|
48
56
|
);
|
|
49
57
|
|
|
@@ -5,6 +5,7 @@ import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilter
|
|
|
5
5
|
import { SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { FormEvent } from "primereact/ts-helpers";
|
|
7
7
|
import { FilterMatchMode } from 'primereact/api';
|
|
8
|
+
import SolidTableRowCell from '../SolidTableRowCell';
|
|
8
9
|
|
|
9
10
|
const SolidExternalIdColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
10
11
|
const filterable = column.attrs.filterable;
|
|
@@ -28,6 +29,8 @@ const SolidExternalIdColumn = ({ solidListViewMetaData, fieldMetadata, column }:
|
|
|
28
29
|
</SolidVarInputsFilterElement>
|
|
29
30
|
)
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
31
34
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
32
35
|
|
|
33
36
|
return (
|
|
@@ -43,8 +46,14 @@ const SolidExternalIdColumn = ({ solidListViewMetaData, fieldMetadata, column }:
|
|
|
43
46
|
filterMatchModeOptions={filterMatchModeOptions}
|
|
44
47
|
filterElement={filterTemplate}
|
|
45
48
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
46
|
-
style={{ minWidth: "12rem" }}
|
|
49
|
+
// style={{ minWidth: "12rem" }}
|
|
47
50
|
headerClassName="table-header-fs"
|
|
51
|
+
body={(rowData) => (
|
|
52
|
+
<SolidTableRowCell
|
|
53
|
+
value={rowData[fieldMetadata.name]}
|
|
54
|
+
truncateAfter={truncateAfter}
|
|
55
|
+
/>
|
|
56
|
+
)}
|
|
48
57
|
></Column>
|
|
49
58
|
);
|
|
50
59
|
|
|
@@ -4,6 +4,7 @@ import { Column, ColumnFilterElementTemplateOptions } from "primereact/column";
|
|
|
4
4
|
import { FormEvent } from "primereact/ts-helpers";
|
|
5
5
|
import { SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
7
|
+
import SolidTableRowCell from '../SolidTableRowCell';
|
|
7
8
|
|
|
8
9
|
const SolidIdColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
9
10
|
const filterable = column.filterable;
|
|
@@ -27,8 +28,9 @@ const SolidIdColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidLi
|
|
|
27
28
|
</SolidVarInputsFilterElement>
|
|
28
29
|
)
|
|
29
30
|
}
|
|
30
|
-
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
31
31
|
|
|
32
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
33
|
+
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<Column
|
|
@@ -43,8 +45,14 @@ const SolidIdColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidLi
|
|
|
43
45
|
filterMatchModeOptions={filterMatchModeOptions}
|
|
44
46
|
filterElement={filterTemplate}
|
|
45
47
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
46
|
-
style={{ minWidth: "12rem" }}
|
|
48
|
+
// style={{ minWidth: "12rem" }}
|
|
47
49
|
headerClassName="table-header-fs"
|
|
50
|
+
body={(rowData) => (
|
|
51
|
+
<SolidTableRowCell
|
|
52
|
+
value={rowData[fieldMetadata.name]}
|
|
53
|
+
truncateAfter={truncateAfter}
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
48
56
|
></Column>
|
|
49
57
|
);
|
|
50
58
|
|
|
@@ -4,6 +4,7 @@ import { Column, ColumnFilterElementTemplateOptions } from "primereact/column";
|
|
|
4
4
|
import { FormEvent } from "primereact/ts-helpers";
|
|
5
5
|
import { getNumberOfInputs, SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
7
|
+
import SolidTableRowCell from '../SolidTableRowCell';
|
|
7
8
|
|
|
8
9
|
const SolidIntColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
9
10
|
const filterable = column.attrs.filterable;
|
|
@@ -36,6 +37,7 @@ const SolidIntColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidL
|
|
|
36
37
|
{ label: 'Between', value: FilterMatchMode.BETWEEN }
|
|
37
38
|
];
|
|
38
39
|
|
|
40
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
39
41
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
40
42
|
|
|
41
43
|
return (
|
|
@@ -51,8 +53,14 @@ const SolidIntColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidL
|
|
|
51
53
|
filterMatchModeOptions={filterMatchModeOptions}
|
|
52
54
|
filterElement={filterTemplate}
|
|
53
55
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
54
|
-
style={{ minWidth: "12rem" }}
|
|
56
|
+
// style={{ minWidth: "12rem" }}
|
|
55
57
|
headerClassName="table-header-fs"
|
|
58
|
+
body={(rowData) => (
|
|
59
|
+
<SolidTableRowCell
|
|
60
|
+
value={rowData[fieldMetadata.name]}
|
|
61
|
+
truncateAfter={truncateAfter}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
56
64
|
></Column>
|
|
57
65
|
);
|
|
58
66
|
|
|
@@ -4,6 +4,7 @@ import { Column, ColumnFilterElementTemplateOptions } from "primereact/column";
|
|
|
4
4
|
import { FormEvent } from "primereact/ts-helpers";
|
|
5
5
|
import { SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
7
|
+
import SolidTableRowCell from '../SolidTableRowCell';
|
|
7
8
|
|
|
8
9
|
const SolidSelectionDynamicColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
9
10
|
const filterable = column.attrs.filterable;
|
|
@@ -28,6 +29,8 @@ const SolidSelectionDynamicColumn = ({ solidListViewMetaData, fieldMetadata, col
|
|
|
28
29
|
</SolidVarInputsFilterElement>
|
|
29
30
|
)
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
31
34
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
32
35
|
|
|
33
36
|
return (
|
|
@@ -43,8 +46,14 @@ const SolidSelectionDynamicColumn = ({ solidListViewMetaData, fieldMetadata, col
|
|
|
43
46
|
filterMatchModeOptions={filterMatchModeOptions}
|
|
44
47
|
filterElement={filterTemplate}
|
|
45
48
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
46
|
-
style={{ minWidth: "12rem" }}
|
|
49
|
+
// style={{ minWidth: "12rem" }}
|
|
47
50
|
headerClassName="table-header-fs"
|
|
51
|
+
body={(rowData) => (
|
|
52
|
+
<SolidTableRowCell
|
|
53
|
+
value={rowData[fieldMetadata.name]}
|
|
54
|
+
truncateAfter={truncateAfter}
|
|
55
|
+
/>
|
|
56
|
+
)}
|
|
48
57
|
></Column>
|
|
49
58
|
);
|
|
50
59
|
|
|
@@ -4,6 +4,7 @@ import { Column, ColumnFilterElementTemplateOptions } from "primereact/column";
|
|
|
4
4
|
import { FormEvent } from "primereact/ts-helpers";
|
|
5
5
|
import { SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
7
|
+
import SolidTableRowCell from '../SolidTableRowCell';
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
const SolidSelectionStaticColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
@@ -30,6 +31,8 @@ const SolidSelectionStaticColumn = ({ solidListViewMetaData, fieldMetadata, colu
|
|
|
30
31
|
</SolidVarInputsFilterElement>
|
|
31
32
|
)
|
|
32
33
|
}
|
|
34
|
+
|
|
35
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
33
36
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
34
37
|
|
|
35
38
|
return (
|
|
@@ -45,8 +48,14 @@ const SolidSelectionStaticColumn = ({ solidListViewMetaData, fieldMetadata, colu
|
|
|
45
48
|
filterMatchModeOptions={filterMatchModeOptions}
|
|
46
49
|
filterElement={filterTemplate}
|
|
47
50
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
48
|
-
style={{ minWidth: "12rem" }}
|
|
51
|
+
// style={{ minWidth: "12rem" }}
|
|
49
52
|
headerClassName="table-header-fs"
|
|
53
|
+
body={(rowData) => (
|
|
54
|
+
<SolidTableRowCell
|
|
55
|
+
value={rowData[fieldMetadata.name]}
|
|
56
|
+
truncateAfter={truncateAfter}
|
|
57
|
+
/>
|
|
58
|
+
)}
|
|
50
59
|
></Column>
|
|
51
60
|
);
|
|
52
61
|
};
|
|
@@ -4,6 +4,7 @@ import { Column, ColumnFilterElementTemplateOptions } from "primereact/column";
|
|
|
4
4
|
import { FormEvent } from "primereact/ts-helpers";
|
|
5
5
|
import { getNumberOfInputs, SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
7
|
+
import SolidTableRowCell from '../SolidTableRowCell';
|
|
7
8
|
|
|
8
9
|
const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
9
10
|
const filterable = column.attrs.filterable;
|
|
@@ -36,6 +37,7 @@ const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column }:
|
|
|
36
37
|
)
|
|
37
38
|
};
|
|
38
39
|
|
|
40
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
39
41
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
40
42
|
|
|
41
43
|
return (
|
|
@@ -51,11 +53,14 @@ const SolidShortTextColumn = ({ solidListViewMetaData, fieldMetadata, column }:
|
|
|
51
53
|
filterMatchModeOptions={filterMatchModeOptions}
|
|
52
54
|
filterElement={filterTemplate}
|
|
53
55
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
54
|
-
style={{ minWidth: "12rem" }}
|
|
56
|
+
// style={{ minWidth: "12rem" }}
|
|
55
57
|
headerClassName="table-header-fs"
|
|
56
|
-
body={(rowData) =>
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
body={(rowData) => (
|
|
59
|
+
<SolidTableRowCell
|
|
60
|
+
value={rowData[fieldMetadata.name]}
|
|
61
|
+
truncateAfter={truncateAfter}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
59
64
|
></Column>
|
|
60
65
|
);
|
|
61
66
|
|
|
@@ -4,6 +4,7 @@ import { FormEvent } from "primereact/ts-helpers";
|
|
|
4
4
|
import { getNumberOfInputs, SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
5
5
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
6
6
|
import { dateFilterMatchModeOptions } from './SolidDateColumn';
|
|
7
|
+
import SolidTableRowCell from "../SolidTableRowCell";
|
|
7
8
|
|
|
8
9
|
const SolidTimeColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
9
10
|
const filterable = column.attrs.filterable;
|
|
@@ -27,6 +28,7 @@ const SolidTimeColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
|
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
// TODO: the body template to be controlled based on the format that one is expecting the date to be displayed in.
|
|
31
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
30
32
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
31
33
|
|
|
32
34
|
return (
|
|
@@ -42,8 +44,14 @@ const SolidTimeColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
|
|
|
42
44
|
filterMatchModeOptions={dateFilterMatchModeOptions}
|
|
43
45
|
filterElement={filterTemplate}
|
|
44
46
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
45
|
-
style={{ minWidth: "12rem" }}
|
|
47
|
+
// style={{ minWidth: "12rem" }}
|
|
46
48
|
headerClassName="table-header-fs"
|
|
49
|
+
body={(rowData) => (
|
|
50
|
+
<SolidTableRowCell
|
|
51
|
+
value={rowData[fieldMetadata.name]}
|
|
52
|
+
truncateAfter={truncateAfter}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
47
55
|
></Column>
|
|
48
56
|
);
|
|
49
57
|
|
|
@@ -4,6 +4,7 @@ import { Column, ColumnFilterElementTemplateOptions } from "primereact/column";
|
|
|
4
4
|
import { FormEvent } from "primereact/ts-helpers";
|
|
5
5
|
import { SolidListViewColumnParams } from '../SolidListViewColumn';
|
|
6
6
|
import { InputTypes, SolidVarInputsFilterElement } from "../SolidVarInputsFilterElement";
|
|
7
|
+
import SolidTableRowCell from '../SolidTableRowCell';
|
|
7
8
|
|
|
8
9
|
const SolidUuidColumn = ({ solidListViewMetaData, fieldMetadata, column }: SolidListViewColumnParams) => {
|
|
9
10
|
const filterable = column.attrs.filterable;
|
|
@@ -27,6 +28,8 @@ const SolidUuidColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
|
|
|
27
28
|
</SolidVarInputsFilterElement>
|
|
28
29
|
)
|
|
29
30
|
}
|
|
31
|
+
|
|
32
|
+
const truncateAfter = solidListViewMetaData?.data?.solidView?.layout?.attrs?.truncateAfter
|
|
30
33
|
const header = column.attrs.label ?? fieldMetadata.displayName;
|
|
31
34
|
|
|
32
35
|
return (
|
|
@@ -34,7 +37,7 @@ const SolidUuidColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
|
|
|
34
37
|
key={fieldMetadata.name}
|
|
35
38
|
field={fieldMetadata.name}
|
|
36
39
|
header={header}
|
|
37
|
-
className="text-sm"
|
|
40
|
+
// className="text-sm"
|
|
38
41
|
sortable={column.attrs.sortable}
|
|
39
42
|
// filter={filterable}
|
|
40
43
|
dataType={columnDataType}
|
|
@@ -42,8 +45,14 @@ const SolidUuidColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
|
|
|
42
45
|
filterMatchModeOptions={filterMatchModeOptions}
|
|
43
46
|
filterElement={filterTemplate}
|
|
44
47
|
filterPlaceholder={`Search by ${fieldMetadata.displayName}`}
|
|
45
|
-
style={{ minWidth: "12rem" }}
|
|
48
|
+
// style={{ minWidth: "12rem" }}
|
|
46
49
|
headerClassName="table-header-fs"
|
|
50
|
+
body={(rowData) => (
|
|
51
|
+
<SolidTableRowCell
|
|
52
|
+
value={rowData[fieldMetadata.name]}
|
|
53
|
+
truncateAfter={truncateAfter}
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
47
56
|
></Column>
|
|
48
57
|
);
|
|
49
58
|
|
|
@@ -256,11 +256,11 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
256
256
|
|
|
257
257
|
}, [formik.values])
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
259
|
+
useEffect(() => {
|
|
260
|
+
if (formik.dirty) {
|
|
261
|
+
setIsDirty(true);
|
|
262
|
+
}
|
|
263
|
+
}, [formik.dirty]);
|
|
264
264
|
|
|
265
265
|
return (
|
|
266
266
|
|
|
@@ -431,7 +431,7 @@ a {
|
|
|
431
431
|
white-space: nowrap !important;
|
|
432
432
|
overflow: hidden !important;
|
|
433
433
|
text-overflow: ellipsis !important;
|
|
434
|
-
max-width: 30ch !important;
|
|
434
|
+
/* max-width: 30ch !important; */
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
.form-field-label {
|
|
@@ -1700,6 +1700,7 @@ li.header-li-px {
|
|
|
1700
1700
|
padding: 0.8rem 1rem;
|
|
1701
1701
|
font-size: 14px;
|
|
1702
1702
|
font-weight: 500;
|
|
1703
|
+
text-transform: capitalize;
|
|
1703
1704
|
}
|
|
1704
1705
|
|
|
1705
1706
|
.solid-breadcrumb.p-breadcrumb .p-menuitem a {
|