@dmlibs/dm-cmps 0.1.7 → 0.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmlibs/dm-cmps",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
@@ -598,7 +598,7 @@ declare class DmMatSelect<T = any> implements DmMatSelectConfig<T>, OnDestroy {
598
598
  value: _angular_core.ModelSignal<DmMatSelectOutput<T>>;
599
599
  formControl: _angular_core.InputSignal<FormControl<DmMatSelectOutput<T>> | null>;
600
600
  panelWidth: _angular_core.InputSignal<string | null>;
601
- panelClass: _angular_core.InputSignal<string | string[] | Set<string> | {
601
+ panelClass: _angular_core.InputSignal<string | Set<string> | string[] | {
602
602
  [key: string]: any;
603
603
  }>;
604
604
  searchSectionBackgroundColor: _angular_core.InputSignal<string | null>;
@@ -1349,5 +1349,85 @@ declare class DmIcon {
1349
1349
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DmIcon, "dm-icon", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1350
1350
  }
1351
1351
 
1352
- export { DmCmpsDataSource, DmColorPicker, DmIcon, DmMatSelect, DmSpinner, DmSpinnerService, DmTable };
1352
+ type DmCmpsDateTypes = any | Date | string | {
1353
+ _seconds: number;
1354
+ _nanoseconds: number;
1355
+ } | {
1356
+ seconds: number;
1357
+ nanoseconds: number;
1358
+ } | number | null;
1359
+ type DmCmpsDateFormats = 'dd/MM/yyyy' | 'yyyy/MM/dd' | 'dd/MM/yyyy HH:mm';
1360
+ type DmCmpsLangs = 'en' | 'he' | 'ar';
1361
+ declare global {
1362
+ interface Date {
1363
+ getWeekOfYear(): number;
1364
+ getWeekOfMonth(): number;
1365
+ getDayOfYear(): number;
1366
+ }
1367
+ }
1368
+ declare class DmDateService {
1369
+ getDate(date: DmCmpsDateTypes): Date | null;
1370
+ /**
1371
+ *
1372
+ * @param date the date to transform
1373
+ * @param format the format of the date
1374
+ * @param lang the language of the date
1375
+ * @returns the date as a string
1376
+ *
1377
+ * @example
1378
+ * The format can be any string that contains the following:
1379
+ * - 'dd' - the day of the month
1380
+ * - 'MM' - the month
1381
+ * - 'yyyy' - the year
1382
+ * - 'yy' - the year (2 digits)
1383
+ * - 'HH' - the hour
1384
+ * - 'mm' - the minute
1385
+ * - 'ss' - the second
1386
+ * - 'SSS' - the millisecond
1387
+ * - 'DM_a' - the AM/PM
1388
+ * - 'DM_E' - the day of the week
1389
+ * - 'DM_Z' - the time zone
1390
+ * - 'DM_z' - the time zone offset
1391
+ * - 'DM_yw' - the week of the year
1392
+ * - 'DM_mw' - the week of the month
1393
+ * - 'DM_yd' - the day of the year
1394
+ */
1395
+ getDateString(date: DmCmpsDateTypes, format?: DmCmpsDateFormats | string, lang?: DmCmpsLangs): string;
1396
+ /**
1397
+ *
1398
+ * @param date the date to transform
1399
+ * @param format the format of the date
1400
+ * @param lang the language of the date
1401
+ * @returns the date as a string
1402
+ *
1403
+ * @example
1404
+ * The format can be any string that contains the following:
1405
+ * - 'dd' - the day of the month
1406
+ * - 'MM' - the month
1407
+ * - 'yyyy' - the year
1408
+ * - 'yy' - the year (2 digits)
1409
+ * - 'HH' - the hour
1410
+ * - 'mm' - the minute
1411
+ * - 'ss' - the second
1412
+ * - 'SSS' - the millisecond
1413
+ * - 'DM_a' - the AM/PM
1414
+ * - 'DM_E' - the day of the week
1415
+ * - 'DM_Z' - the time zone
1416
+ * - 'DM_z' - the time zone offset
1417
+ * - 'DM_yw' - the week of the year
1418
+ * - 'DM_mw' - the week of the month
1419
+ * - 'DM_yd' - the day of the year
1420
+ */
1421
+ static getDateString(date: DmCmpsDateTypes, format?: DmCmpsDateFormats | string, lang?: DmCmpsLangs): string;
1422
+ static getDate(date: DmCmpsDateTypes): Date | null;
1423
+ static getTimeString(date: DmCmpsDateTypes): string;
1424
+ static now(): Date;
1425
+ now(): Date;
1426
+ getAge(date: DmCmpsDateTypes, fixed?: number | null, result?: 'string' | 'number'): number | string;
1427
+ static getAge(date: DmCmpsDateTypes, fixed?: number | null, result?: 'string' | 'number'): number | string;
1428
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DmDateService, never>;
1429
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DmDateService>;
1430
+ }
1431
+
1432
+ export { DmCmpsDataSource, DmColorPicker, DmDateService, DmIcon, DmMatSelect, DmSpinner, DmSpinnerService, DmTable };
1353
1433
  export type { DmCmpsDataSourceSort, DmTableActionButton, DmTableClasses, DmTableColumn, DmTableColumnHeaderMenuItem, DmTablePaginatorSettings, DmTableRowActionButton, DmTableStyle };