@masterteam/components 0.0.182 → 0.0.184
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/assets/common.css +1 -1
- package/assets/i18n/ar.json +3 -0
- package/assets/i18n/en.json +3 -0
- package/fesm2022/masterteam-components-drawer.mjs +2 -2
- package/fesm2022/masterteam-components-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-editor-field.mjs +2 -2
- package/fesm2022/masterteam-components-editor-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +73 -18
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-location-field.mjs +4 -4
- package/fesm2022/masterteam-components-location-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-number-field.mjs +2 -2
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-radio-cards-field.mjs +2 -2
- package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-runtime-action.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +2 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +4 -4
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-tabs.mjs +2 -2
- package/fesm2022/masterteam-components-tabs.mjs.map +1 -1
- package/fesm2022/masterteam-components-text-field.mjs +2 -2
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +2 -2
- package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-toggle-field.mjs +2 -2
- package/fesm2022/masterteam-components-toggle-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +14 -3
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +19 -5
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +4 -4
- package/types/masterteam-components-entities.d.ts +34 -5
- package/types/masterteam-components-user-search-field.d.ts +11 -0
- package/types/masterteam-components.d.ts +10 -1
|
@@ -314,9 +314,9 @@ const MTPreset = (themeOptions) => {
|
|
|
314
314
|
borderRadius: '{border.radius.md}',
|
|
315
315
|
gap: '0.25rem',
|
|
316
316
|
},
|
|
317
|
-
css: () => `
|
|
318
|
-
.p-button.p-button-icon-only {
|
|
319
|
-
padding-inline: 0;
|
|
317
|
+
css: () => `
|
|
318
|
+
.p-button.p-button-icon-only {
|
|
319
|
+
padding-inline: 0;
|
|
320
320
|
}
|
|
321
321
|
`,
|
|
322
322
|
},
|
|
@@ -550,6 +550,20 @@ const DEFAULT_MT_DATE_FORMATS = {
|
|
|
550
550
|
const MT_DATE_FORMATS = new InjectionToken('MT_DATE_FORMATS', {
|
|
551
551
|
factory: () => ({ ...DEFAULT_MT_DATE_FORMATS }),
|
|
552
552
|
});
|
|
553
|
+
/**
|
|
554
|
+
* Converts .NET custom date/time format tokens to Angular `formatDate` (CLDR)
|
|
555
|
+
* tokens. System-setting formats are authored in .NET convention (e.g. `hh:mm tt`),
|
|
556
|
+
* but `formatDate` uses CLDR tokens where the AM/PM designator is `a`, not `tt`.
|
|
557
|
+
* Every other token in the supported set (d, M, y, H, h, m, s) is identical between
|
|
558
|
+
* the two, so only `tt`/`t` → `a` needs translating. Single-quoted literal sections
|
|
559
|
+
* (e.g. `'at'`) are left untouched.
|
|
560
|
+
*/
|
|
561
|
+
function toAngularDateFormat(format) {
|
|
562
|
+
return format
|
|
563
|
+
.split(/('[^']*')/g)
|
|
564
|
+
.map((part) => (part.startsWith("'") ? part : part.replace(/t+/g, 'a')))
|
|
565
|
+
.join('');
|
|
566
|
+
}
|
|
553
567
|
function provideMTDateFormats(formats) {
|
|
554
568
|
return makeEnvironmentProviders([
|
|
555
569
|
{
|
|
@@ -1496,7 +1510,7 @@ class MTDateFormatPipe {
|
|
|
1496
1510
|
return '';
|
|
1497
1511
|
}
|
|
1498
1512
|
try {
|
|
1499
|
-
return formatDate(value, type === 'dateTime' ? this.formats.dateTime : this.formats.date, this.locale, this.formats.timezone);
|
|
1513
|
+
return formatDate(value, toAngularDateFormat(type === 'dateTime' ? this.formats.dateTime : this.formats.date), this.locale, this.formats.timezone);
|
|
1500
1514
|
}
|
|
1501
1515
|
catch {
|
|
1502
1516
|
return String(value);
|
|
@@ -1522,5 +1536,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1522
1536
|
* Generated bundle index. Do not edit.
|
|
1523
1537
|
*/
|
|
1524
1538
|
|
|
1525
|
-
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, endLoading, generateTailwindPalette, getContrastColor, getLightColor, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, startLoading, wrapValidatorWithMessage };
|
|
1539
|
+
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, endLoading, generateTailwindPalette, getContrastColor, getLightColor, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, startLoading, toAngularDateFormat, wrapValidatorWithMessage };
|
|
1526
1540
|
//# sourceMappingURL=masterteam-components.mjs.map
|