@nettyapps/ntybase 0.0.4 → 0.0.6

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.
@@ -433,6 +433,10 @@ class AlertService {
433
433
  const actionText = action ? action : '@btnOK';
434
434
  this.snackBar.open(this.translate.instant(message), this.translate.instant(actionText), { duration });
435
435
  }
436
+ showWarning(message, action, duration = 3000) {
437
+ const actionText = action ? action : '@btnOK';
438
+ this.snackBar.open(this.translate.instant(message), this.translate.instant(actionText), { duration });
439
+ }
436
440
  // For confirmation dialogs
437
441
  showConfirm(message) {
438
442
  return new Promise((resolve) => {
@@ -654,6 +658,30 @@ class CommonService {
654
658
  dateFormatter(dateValue) {
655
659
  return this.datePipe.transform(dateValue, 'dd-MM-yyyy') ?? '';
656
660
  }
661
+ /**
662
+ * Format date into 'dd-MM-yyyy HH:mm:ss' format for grids
663
+ * @param dateValue
664
+ * @param seconds if true, format includes seconds
665
+ * @returns
666
+ */
667
+ dateTimeFormatter(dateValue, seconds = true) {
668
+ if (seconds) {
669
+ return this.datePipe.transform(dateValue, 'dd/MM/yyyy HH:mm:ss') ?? '';
670
+ }
671
+ return this.datePipe.transform(dateValue, 'dd/MM/yyyy HH:mm') ?? '';
672
+ }
673
+ /**
674
+ * Format time into 'HH:mm' or 'HH:mm:ss' format for grids
675
+ * @param dateValue
676
+ * @param seconds if true, format includes seconds
677
+ * @returns
678
+ */
679
+ timeFormatter(dateValue, seconds = false) {
680
+ if (seconds) {
681
+ return this.datePipe.transform(dateValue, 'HH:mm:ss') ?? '';
682
+ }
683
+ return this.datePipe.transform(dateValue, 'HH:mm') ?? '';
684
+ }
657
685
  /** Reactive Signal state for tracking grid updates */
658
686
  _updates = signal(null, ...(ngDevMode ? [{ debugName: "_updates" }] : []));
659
687
  /** Read-only Signal for external components to observe updates */
@@ -1152,7 +1180,7 @@ class AgGridBase {
1152
1180
  popupValid = input(false, ...(ngDevMode ? [{ debugName: "popupValid" }] : []));
1153
1181
  params = input('', ...(ngDevMode ? [{ debugName: "params" }] : []));
1154
1182
  parameters = input('', ...(ngDevMode ? [{ debugName: "parameters" }] : []));
1155
- isEmbedded = signal(false, ...(ngDevMode ? [{ debugName: "isEmbedded" }] : []));
1183
+ isEmbedded = input(false, ...(ngDevMode ? [{ debugName: "isEmbedded" }] : []));
1156
1184
  // Authentication
1157
1185
  authenticationList = [];
1158
1186
  // User access writes
@@ -1678,7 +1706,7 @@ class AgGridBase {
1678
1706
  return true;
1679
1707
  }
1680
1708
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AgGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
1681
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: AgGridBase, isStandalone: true, selector: "ntybase-ag-grid-base", inputs: { readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, popupFilterValid: { classPropertyName: "popupFilterValid", publicName: "popupFilterValid", isSignal: true, isRequired: false, transformFunction: null }, popupValid: { classPropertyName: "popupValid", publicName: "popupValid", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, parameters: { classPropertyName: "parameters", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedElement: "selectedElement" }, usesOnChanges: true, ngImport: i0, template: "<p>ag-grid-base works!</p>\n", styles: [""] });
1709
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: AgGridBase, isStandalone: true, selector: "ntybase-ag-grid-base", inputs: { readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, popupFilterValid: { classPropertyName: "popupFilterValid", publicName: "popupFilterValid", isSignal: true, isRequired: false, transformFunction: null }, popupValid: { classPropertyName: "popupValid", publicName: "popupValid", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, parameters: { classPropertyName: "parameters", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, isEmbedded: { classPropertyName: "isEmbedded", publicName: "isEmbedded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedElement: "selectedElement" }, usesOnChanges: true, ngImport: i0, template: "<p>ag-grid-base works!</p>\n", styles: [""] });
1682
1710
  }
1683
1711
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AgGridBase, decorators: [{
1684
1712
  type: Component,