@cdmx/wappler_ag_grid 1.1.8 → 1.2.0

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.
@@ -1397,16 +1397,19 @@
1397
1397
  "editActionTooltip",
1398
1398
  "editActionBtnClass",
1399
1399
  "editActionIconClass",
1400
+ "editActionBtnCondition",
1400
1401
  "viewActionBtn",
1401
1402
  "viewActionTitle",
1402
1403
  "viewActionTooltip",
1403
1404
  "viewActionBtnClass",
1404
1405
  "viewActionIconClass",
1406
+ "viewActionBtnCondition",
1405
1407
  "deleteActionBtn",
1406
1408
  "deleteActionTitle",
1407
1409
  "deleteActionTooltip",
1408
1410
  "deleteActionBtnClass",
1409
- "deleteActionIconClass"
1411
+ "deleteActionIconClass",
1412
+ "deleteActionBtnCondition"
1410
1413
  ],
1411
1414
  "noChangeOnHide": true,
1412
1415
  "groupEnabler": true,
@@ -1593,51 +1596,61 @@
1593
1596
  "button1ActionTooltip",
1594
1597
  "button1ActionBtnClass",
1595
1598
  "button1ActionIconClass",
1599
+ "button1ActionBtnCondition",
1596
1600
  "button2ActionBtn",
1597
1601
  "button2ActionTitle",
1598
1602
  "button2ActionTooltip",
1599
1603
  "button2ActionBtnClass",
1600
1604
  "button2ActionIconClass",
1605
+ "button2ActionBtnCondition",
1601
1606
  "button3ActionBtn",
1602
1607
  "button3ActionTitle",
1603
1608
  "button3ActionTooltip",
1604
1609
  "button3ActionBtnClass",
1605
1610
  "button3ActionIconClass",
1611
+ "button3ActionBtnCondition",
1606
1612
  "button4ActionBtn",
1607
1613
  "button4ActionTitle",
1608
1614
  "button4ActionTooltip",
1609
1615
  "button4ActionBtnClass",
1610
1616
  "button4ActionIconClass",
1617
+ "button4ActionBtnCondition",
1611
1618
  "button5ActionBtn",
1612
1619
  "button5ActionTitle",
1613
1620
  "button5ActionTooltip",
1614
1621
  "button5ActionBtnClass",
1615
1622
  "button5ActionIconClass",
1623
+ "button5ActionBtnCondition",
1616
1624
  "button6ActionBtn",
1617
1625
  "button6ActionTitle",
1618
1626
  "button6ActionTooltip",
1619
1627
  "button6ActionBtnClass",
1620
1628
  "button6ActionIconClass",
1629
+ "button6ActionBtnCondition",
1621
1630
  "button7ActionBtn",
1622
1631
  "button7ActionTitle",
1623
1632
  "button7ActionTooltip",
1624
1633
  "button7ActionBtnClass",
1625
1634
  "button7ActionIconClass",
1635
+ "button7ActionBtnCondition",
1626
1636
  "button8ActionBtn",
1627
1637
  "button8ActionTitle",
1628
1638
  "button8ActionTooltip",
1629
1639
  "button8ActionBtnClass",
1630
1640
  "button8ActionIconClass",
1641
+ "button8ActionBtnCondition",
1631
1642
  "button9ActionBtn",
1632
1643
  "button9ActionTitle",
1633
1644
  "button9ActionTooltip",
1634
1645
  "button9ActionBtnClass",
1635
1646
  "button9ActionIconClass",
1647
+ "button9ActionBtnCondition",
1636
1648
  "button10ActionBtn",
1637
1649
  "button10ActionTitle",
1638
1650
  "button10ActionTooltip",
1639
1651
  "button10ActionBtnClass",
1640
- "button10ActionIconClass"
1652
+ "button10ActionIconClass",
1653
+ "button10ActionBtnCondition"
1641
1654
  ],
1642
1655
  "noChangeOnHide": true,
1643
1656
  "groupEnabler": true,
@@ -1686,6 +1699,12 @@
1686
1699
  "type": "text",
1687
1700
  "defaultValue": "fas fa-wrench"
1688
1701
  },
1702
+ {
1703
+ "name": "button1ActionBtnCondition",
1704
+ "attribute": "button1_action_btn_condition",
1705
+ "title": "Button1 Conditon",
1706
+ "type": "text"
1707
+ },
1689
1708
  {
1690
1709
  "name": "button2ActionBtn",
1691
1710
  "attribute": "dmx-bind:button2_action_btn",
@@ -1721,6 +1740,12 @@
1721
1740
  "type": "text",
1722
1741
  "defaultValue": "fas fa-search-plus"
1723
1742
  },
1743
+ {
1744
+ "name": "button2ActionBtnCondition",
1745
+ "attribute": "button2_action_btn_condition",
1746
+ "title": "Button2 Conditon",
1747
+ "type": "text"
1748
+ },
1724
1749
  {
1725
1750
  "name": "button3ActionBtn",
1726
1751
  "attribute": "dmx-bind:button3_action_btn",
@@ -1756,6 +1781,12 @@
1756
1781
  "type": "text",
1757
1782
  "defaultValue": "fas fa-check-circle"
1758
1783
  },
1784
+ {
1785
+ "name": "button3ActionBtnCondition",
1786
+ "attribute": "button3_action_btn_condition",
1787
+ "title": "Button3 Conditon",
1788
+ "type": "text"
1789
+ },
1759
1790
  {
1760
1791
  "name": "button4ActionBtn",
1761
1792
  "attribute": "dmx-bind:button4_action_btn",
@@ -1791,6 +1822,12 @@
1791
1822
  "type": "text",
1792
1823
  "defaultValue": "fas fa-exclamation-triangle"
1793
1824
  },
1825
+ {
1826
+ "name": "button4ActionBtnCondition",
1827
+ "attribute": "button4_action_btn_condition",
1828
+ "title": "Button4 Conditon",
1829
+ "type": "text"
1830
+ },
1794
1831
  {
1795
1832
  "name": "button5ActionBtn",
1796
1833
  "attribute": "dmx-bind:button5_action_btn",
@@ -1826,6 +1863,12 @@
1826
1863
  "type": "text",
1827
1864
  "defaultValue": "fas fa-times-circle"
1828
1865
  },
1866
+ {
1867
+ "name": "button5ActionBtnCondition",
1868
+ "attribute": "button5_action_btn_condition",
1869
+ "title": "Button5 Conditon",
1870
+ "type": "text"
1871
+ },
1829
1872
  {
1830
1873
  "name": "button6ActionBtn",
1831
1874
  "attribute": "dmx-bind:button6_action_btn",
@@ -1861,6 +1904,12 @@
1861
1904
  "type": "text",
1862
1905
  "defaultValue": "fas fa-link"
1863
1906
  },
1907
+ {
1908
+ "name": "button6ActionBtnCondition",
1909
+ "attribute": "button6_action_btn_condition",
1910
+ "title": "Button6 Conditon",
1911
+ "type": "text"
1912
+ },
1864
1913
  {
1865
1914
  "name": "button7ActionBtn",
1866
1915
  "attribute": "dmx-bind:button7_action_btn",
@@ -1896,6 +1945,12 @@
1896
1945
  "type": "text",
1897
1946
  "defaultValue": "fas fa-download"
1898
1947
  },
1948
+ {
1949
+ "name": "button7ActionBtnCondition",
1950
+ "attribute": "button7_action_btn_condition",
1951
+ "title": "Button7 Conditon",
1952
+ "type": "text"
1953
+ },
1899
1954
  {
1900
1955
  "name": "button8ActionBtn",
1901
1956
  "attribute": "dmx-bind:button8_action_btn",
@@ -1931,6 +1986,12 @@
1931
1986
  "type": "text",
1932
1987
  "defaultValue": "fas fa-file-pdf"
1933
1988
  },
1989
+ {
1990
+ "name": "button8ActionBtnCondition",
1991
+ "attribute": "button8_action_btn_condition",
1992
+ "title": "Button8 Conditon",
1993
+ "type": "text"
1994
+ },
1934
1995
  {
1935
1996
  "name": "button9ActionBtn",
1936
1997
  "attribute": "dmx-bind:button9_action_btn",
@@ -1966,6 +2027,12 @@
1966
2027
  "type": "text",
1967
2028
  "defaultValue": "fas fa-star"
1968
2029
  },
2030
+ {
2031
+ "name": "button9ActionBtnCondition",
2032
+ "attribute": "button9_action_btn_condition",
2033
+ "title": "Button9 Conditon",
2034
+ "type": "text"
2035
+ },
1969
2036
  {
1970
2037
  "name": "button10ActionBtn",
1971
2038
  "attribute": "dmx-bind:button10_action_btn",
@@ -2000,6 +2067,12 @@
2000
2067
  "title": "Button10 Icon Class",
2001
2068
  "type": "text",
2002
2069
  "defaultValue": "fas fa-trash-alt"
2070
+ },
2071
+ {
2072
+ "name": "button10ActionBtnCondition",
2073
+ "attribute": "button10_action_btn_condition",
2074
+ "title": "Button10 Conditon",
2075
+ "type": "text"
2003
2076
  }
2004
2077
 
2005
2078
  ]
@@ -2431,6 +2504,40 @@
2431
2504
  "allowedOn": {
2432
2505
  "dmx-ag-grid": true
2433
2506
  }
2507
+ },
2508
+ {
2509
+ "name": "dmx-ag-grid-export-filename",
2510
+ "attributeStartsWith": "dmx-bind",
2511
+ "attribute": "export_csv_filename",
2512
+ "title": "Export CSV Filename",
2513
+ "type": "boolean",
2514
+ "display": "fieldset",
2515
+ "icon": "fa fa-lg fa-chevron-right",
2516
+ "groupTitle": "Grid Config",
2517
+ "groupIcon": "fa fa-lg fa-cubes",
2518
+ "defaultValue": false,
2519
+ "show": [
2520
+ "exportCsvFilename"
2521
+ ],
2522
+ "noChangeOnHide": true,
2523
+ "groupEnabler": true,
2524
+ "children": [
2525
+ {
2526
+ "name": "exportCsvFilename",
2527
+ "attributeStartsWith": "dmx-bind",
2528
+ "attribute": "export_csv_filename",
2529
+ "isValue": true,
2530
+ "dataBindings": true,
2531
+ "title": "CSV Filename",
2532
+ "type": "text",
2533
+ "help": "Export CSV filename.",
2534
+ "defaultValue": "export.csv",
2535
+ "initDisplay": "none"
2536
+ }
2537
+ ],
2538
+ "allowedOn": {
2539
+ "dmx-ag-grid": true
2540
+ }
2434
2541
  }
2435
2542
  ],
2436
2543
  "events": [
package/dmx-ag-grid.js CHANGED
@@ -60,6 +60,7 @@ dmx.Component('ag-grid', {
60
60
  floating_filter: { type: Boolean, default: true },
61
61
  column_hover_highlight: { type: Boolean, default: true },
62
62
  export_to_csv: { type: Boolean, default: true },
63
+ export_csv_filename: { type: String, default: 'export.csv' },
63
64
  fixed_header: { type: Boolean, default: false },
64
65
  topbar_class: { type: String, default: 'topbar' },
65
66
  fixed_header_offset: { type: Number, default: 100 },
@@ -102,51 +103,61 @@ dmx.Component('ag-grid', {
102
103
  button1_action_tooltip: { type: "String", default: "" },
103
104
  button1_action_icon_class: { type: "String", default: "fas fa-wrench" },
104
105
  button1_action_btn_class: { type: "String", default: "btn-primary btn-xs m-1" },
106
+ button1_action_btn_condition: {type: String, default: null },
105
107
  button2_action_btn: { type: "Boolean", default: false },
106
108
  button2_action_title: { type: "String", default: "" },
107
109
  button2_action_tooltip: { type: "String", default: "" },
108
110
  button2_action_icon_class: { type: "String", default: "fas fa-search-plus" },
109
111
  button2_action_btn_class: { type: "String", default: "btn-info btn-xs m-1" },
112
+ button2_action_btn_condition: {type: String, default: null },
110
113
  button3_action_btn: { type: "Boolean", default: false },
111
114
  button3_action_title: { type: "String", default: "" },
112
115
  button3_action_tooltip: { type: "String", default: "" },
113
116
  button3_action_icon_class: { type: "String", default: "fas fa-check-circle" },
114
117
  button3_action_btn_class: { type: "String", default: "btn-success btn-xs m-1" },
118
+ button3_action_btn_condition: {type: String, default: null },
115
119
  button4_action_btn: { type: "Boolean", default: false },
116
120
  button4_action_title: { type: "String", default: "" },
117
121
  button4_action_tooltip: { type: "String", default: "" },
118
122
  button4_action_icon_class: { type: "String", default: "fas fa-exclamation-triangle" },
119
123
  button4_action_btn_class: { type: "String", default: "btn-warning btn-xs m-1" },
124
+ button4_action_btn_condition: {type: String, default: null },
120
125
  button5_action_btn: { type: "Boolean", default: false },
121
126
  button5_action_title: { type: "String", default: "" },
122
127
  button5_action_tooltip: { type: "String", default: "Edit" },
123
128
  button5_action_icon_class: { type: "String", default: "fas fa-times-circle" },
124
129
  button5_action_btn_class: { type: "String", default: "btn-danger btn-xs m-1" },
130
+ button5_action_btn_condition: {type: String, default: null },
125
131
  button6_action_btn: { type: "Boolean", default: false },
126
132
  button6_action_title: { type: "String", default: "" },
127
133
  button6_action_tooltip: { type: "String", default: "" },
128
134
  button6_action_icon_class: { type: "String", default: "fas fa-link" },
129
135
  button6_action_btn_class: { type: "String", default: "btn-secondary btn-xs m-1" },
136
+ button6_action_btn_condition: {type: String, default: null },
130
137
  button7_action_btn: { type: "Boolean", default: false },
131
138
  button7_action_title: { type: "String", default: "" },
132
139
  button7_action_tooltip: { type: "String", default: "" },
133
140
  button7_action_icon_class: { type: "String", default: "fas fa-download" },
134
141
  button7_action_btn_class: { type: "String", default: "btn-primary btn-xm" },
142
+ button7_action_btn_condition: {type: String, default: null },
135
143
  button8_action_btn: { type: "Boolean", default: false },
136
144
  button8_action_title: { type: "String", default: "" },
137
145
  button8_action_tooltip: { type: "String", default: "" },
138
146
  button8_action_icon_class: { type: "String", default: "fas fa-file-pdf" },
139
147
  button8_action_btn_class: { type: "String", default: "btn-info btn-xs m-1" },
148
+ button8_action_btn_condition: {type: String, default: null },
140
149
  button9_action_btn: { type: "Boolean", default: false },
141
150
  button9_action_title: { type: "String", default: "" },
142
151
  button9_action_tooltip: { type: "String", default: "" },
143
152
  button9_action_icon_class: { type: "String", default: "fas fa-star" },
144
153
  button9_action_btn_class: { type: "String", default: "btn-success btn-xs m-1" },
154
+ button9_action_btn_condition: {type: String, default: null },
145
155
  button10_action_btn: { type: "Boolean", default: false },
146
156
  button10_action_title: { type: "String", default: "" },
147
157
  button10_action_tooltip: { type: "String", default: "" },
148
158
  button10_action_icon_class: { type: "String", default: "fas fa-trash-alt" },
149
159
  button10_action_btn_class: { type: "String", default: "btn-danger btn-xs m-1" },
160
+ button10_action_btn_condition: {type: String, default: null },
150
161
  data_binded_changes: {type: Array, default: [] },
151
162
  hide_fields: {type: String, default: null },
152
163
  hide_filters: {type: String, default: null },
@@ -1115,6 +1126,7 @@ dmx.Component('ag-grid', {
1115
1126
  const buttonClassKey = `button${i}_action_btn_class`;
1116
1127
  const buttonTooltipKey = `button${i}_action_tooltip`;
1117
1128
  const buttonIconClassKey = `button${i}_action_icon_class`;
1129
+ const buttonConditionKey = `button${i}_action_btn_condition`;
1118
1130
 
1119
1131
  if (options[buttonActionKey]) {
1120
1132
  actionsColumn.cellRendererParams.buttons.push({
@@ -1127,6 +1139,7 @@ dmx.Component('ag-grid', {
1127
1139
  this.set('id', rowData.id);
1128
1140
  this.dispatchEvent(`row_action_button${i}`);
1129
1141
  },
1142
+ condition: options[buttonConditionKey]
1130
1143
  });
1131
1144
  }
1132
1145
  }
@@ -1476,7 +1489,7 @@ dmx.Component('ag-grid', {
1476
1489
  (column) => !excludedColumnIds.includes(column.colId)
1477
1490
  ).map((column) => column.field);
1478
1491
  const params = {
1479
- fileName: 'export.csv', // Set the desired file name here
1492
+ fileName: options.export_csv_filename,
1480
1493
  allColumns: true,
1481
1494
  columnKeys: fieldsToExport,
1482
1495
  processCellCallback: function (params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",