@dmlibs/dm-cmps 0.1.6 → 0.1.8

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.6",
3
+ "version": "0.1.8",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
@@ -1025,10 +1025,12 @@ interface DmTableInterface<T extends object> {
1025
1025
  tableId: InputSignal<string | undefined>;
1026
1026
  /**
1027
1027
  * Table data source - An array of objects that will be displayed in the table.
1028
+ * @required
1028
1029
  */
1029
1030
  dataSource: InputSignal<T[]>;
1030
1031
  /**
1031
1032
  * Table columns - An array of objects that define the columns of the table.
1033
+ * @required
1032
1034
  */
1033
1035
  columns: InputSignal<DmTableColumn<T>[]>;
1034
1036
  /**
@@ -1333,8 +1335,99 @@ declare class DmTable<T extends object> implements DmTableInterface<T> {
1333
1335
  protected getSlideToggleTooltip(row: T, column: DmTableRuntimeColumn<T>): string;
1334
1336
  protected onSlideToggleChange(row: T, column: DmTableRuntimeColumn<T>, change: MatSlideToggleChange): void;
1335
1337
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DmTable<any>, never>;
1336
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DmTable<any>, "dm-table", never, { "tableId": { "alias": "tableId"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "noDataMessage": { "alias": "noDataMessage"; "required": false; "isSignal": true; }; "enableSearch": { "alias": "enableSearch"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "clearSearchTooltip": { "alias": "clearSearchTooltip"; "required": false; "isSignal": true; }; "searchInputAppearance": { "alias": "searchInputAppearance"; "required": false; "isSignal": true; }; "filterPredicate": { "alias": "filterPredicate"; "required": false; "isSignal": true; }; "actionButtons": { "alias": "actionButtons"; "required": false; "isSignal": true; }; "enablePrint": { "alias": "enablePrint"; "required": false; "isSignal": true; }; "printButton": { "alias": "printButton"; "required": false; "isSignal": true; }; "enablePagination": { "alias": "enablePagination"; "required": false; "isSignal": true; }; "autoPaginationAboveRowsCount": { "alias": "autoPaginationAboveRowsCount"; "required": false; "isSignal": true; }; "paginatorSettings": { "alias": "paginatorSettings"; "required": false; "isSignal": true; }; "enableLoadingProgressbar": { "alias": "enableLoadingProgressbar"; "required": false; "isSignal": true; }; "enableColumnsDragAndDrop": { "alias": "enableColumnsDragAndDrop"; "required": false; "isSignal": true; }; "enableColumnsDragHandle": { "alias": "enableColumnsDragHandle"; "required": false; "isSignal": true; }; "enableTotalRow": { "alias": "enableTotalRow"; "required": false; "isSignal": true; }; "tableStyle": { "alias": "tableStyle"; "required": false; "isSignal": true; }; "tableClasses": { "alias": "tableClasses"; "required": false; "isSignal": true; }; "rowStyleFn": { "alias": "rowStyleFn"; "required": false; "isSignal": true; }; "editColumnsVisibility": { "alias": "editColumnsVisibility"; "required": false; "isSignal": true; }; "editColumnsVisibilityButton": { "alias": "editColumnsVisibilityButton"; "required": false; "isSignal": true; }; "editColumnsVisibilitySelectAllLabel": { "alias": "editColumnsVisibilitySelectAllLabel"; "required": false; "isSignal": true; }; "rowIdentifierField": { "alias": "rowIdentifierField"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1338
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DmTable<any>, "dm-table", never, { "tableId": { "alias": "tableId"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "noDataMessage": { "alias": "noDataMessage"; "required": false; "isSignal": true; }; "enableSearch": { "alias": "enableSearch"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "clearSearchTooltip": { "alias": "clearSearchTooltip"; "required": false; "isSignal": true; }; "searchInputAppearance": { "alias": "searchInputAppearance"; "required": false; "isSignal": true; }; "filterPredicate": { "alias": "filterPredicate"; "required": false; "isSignal": true; }; "actionButtons": { "alias": "actionButtons"; "required": false; "isSignal": true; }; "enablePrint": { "alias": "enablePrint"; "required": false; "isSignal": true; }; "printButton": { "alias": "printButton"; "required": false; "isSignal": true; }; "enablePagination": { "alias": "enablePagination"; "required": false; "isSignal": true; }; "autoPaginationAboveRowsCount": { "alias": "autoPaginationAboveRowsCount"; "required": false; "isSignal": true; }; "paginatorSettings": { "alias": "paginatorSettings"; "required": false; "isSignal": true; }; "enableLoadingProgressbar": { "alias": "enableLoadingProgressbar"; "required": false; "isSignal": true; }; "enableColumnsDragAndDrop": { "alias": "enableColumnsDragAndDrop"; "required": false; "isSignal": true; }; "enableColumnsDragHandle": { "alias": "enableColumnsDragHandle"; "required": false; "isSignal": true; }; "enableTotalRow": { "alias": "enableTotalRow"; "required": false; "isSignal": true; }; "tableStyle": { "alias": "tableStyle"; "required": false; "isSignal": true; }; "tableClasses": { "alias": "tableClasses"; "required": false; "isSignal": true; }; "rowStyleFn": { "alias": "rowStyleFn"; "required": false; "isSignal": true; }; "editColumnsVisibility": { "alias": "editColumnsVisibility"; "required": false; "isSignal": true; }; "editColumnsVisibilityButton": { "alias": "editColumnsVisibilityButton"; "required": false; "isSignal": true; }; "editColumnsVisibilitySelectAllLabel": { "alias": "editColumnsVisibilitySelectAllLabel"; "required": false; "isSignal": true; }; "rowIdentifierField": { "alias": "rowIdentifierField"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1337
1339
  }
1338
1340
 
1339
- export { DmCmpsDataSource, DmColorPicker, DmMatSelect, DmSpinner, DmSpinnerService, DmTable };
1341
+ declare class DmIcon {
1342
+ icon: _angular_core.InputSignal<string>;
1343
+ color: _angular_core.InputSignal<string | undefined>;
1344
+ size: _angular_core.InputSignal<string | number | undefined>;
1345
+ isBootstrapIcon: _angular_core.Signal<boolean>;
1346
+ sizeString: _angular_core.Signal<string>;
1347
+ constructor();
1348
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DmIcon, never>;
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
+ }
1351
+
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 };
1340
1433
  export type { DmCmpsDataSourceSort, DmTableActionButton, DmTableClasses, DmTableColumn, DmTableColumnHeaderMenuItem, DmTablePaginatorSettings, DmTableRowActionButton, DmTableStyle };