zinkee 0.1.57 → 0.1.59

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/README.md CHANGED
@@ -663,6 +663,8 @@ For HIERARCHY, `label` is required at every level but info/number mappings are o
663
663
 
664
664
  Widget types: `TABLE_OR_SUBTABLE`, `DETAIL`, `KPI`, `CHART`, `TIMELINE`, `KANBAN`, `HIERARCHY`.
665
665
 
666
+ `displays widgets update` merges the view into what is saved instead of replacing it. On a table, `--field` lists the visible columns: columns that were already visible keep their position, width, pinning and aggregations, hidden or new ones move to the end in the order you pass them and become visible, and omitted ones are hidden. `--view-state` (and `view.viewAdditionalProperties` in `--raw`) is merged key by key into the saved `viewState`, so you can change one setting without resending the rest; arrays such as `hiddenColumns` are replaced whole. If the same update also changes `--origin-resource`, `--field` and `--view-state` rebuild the view as on `create`; changing only `--origin-resource` keeps the saved view.
667
+
666
668
  ### Set freeform layout
667
669
 
668
670
  After creating widgets, position them on a 12-column grid:
@@ -1481,8 +1481,8 @@ var specificExamples = {
1481
1481
  }`
1482
1482
  },
1483
1483
  {
1484
- description: "Create a TABLE widget with locked fields: contact-name locked permanently (no conditions) and status locked while invoice-number is empty, with before/after lock messages.",
1485
- command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type table --name Invoices --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":8}' --field contact-name --field invoice-number --field status --field amount --lock-field contact-name --lock-condition "status:invoice-number:is_empty" --lock-message-before "status:Status locks until the invoice number is set." --lock-message-after "status:Status is locked because the invoice number is missing."`,
1484
+ description: "Create a TABLE widget with locked fields: contact-name locked permanently (no conditions) and status locked while invoice-number or amount is empty (--lock-match any), with before/after lock messages.",
1485
+ command: `zinkee --json displays widgets create 0f6f062f-1478-4df2-96a1-c495d037d260 --type table --name Invoices --origin-resource 2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e --layout '{"x":0,"y":0,"w":12,"h":8}' --field contact-name --field invoice-number --field status --field amount --lock-field contact-name --lock-condition "status:invoice-number:is_empty" --lock-condition "status:amount:is_empty" --lock-match "status:any" --lock-message-before "status:Status locks while the invoice number or the amount is missing." --lock-message-after "status:Fill in the invoice number and the amount to change the status."`,
1486
1486
  raw: `{
1487
1487
  "type": "TABLE_OR_SUBTABLE",
1488
1488
  "source": {
@@ -1509,10 +1509,16 @@ var specificExamples = {
1509
1509
  "origin": { "fieldId": "invoice-number" },
1510
1510
  "comparisonOperator": "IS_EMPTY",
1511
1511
  "values": []
1512
+ },
1513
+ {
1514
+ "origin": { "fieldId": "amount" },
1515
+ "comparisonOperator": "IS_EMPTY",
1516
+ "values": []
1512
1517
  }
1513
1518
  ],
1514
- "messageBeforeLock": "Status locks until the invoice number is set.",
1515
- "messageAfterLock": "Status is locked because the invoice number is missing."
1519
+ "conditionMatch": "ANY",
1520
+ "messageBeforeLock": "Status locks while the invoice number or the amount is missing.",
1521
+ "messageAfterLock": "Fill in the invoice number and the amount to change the status."
1516
1522
  }
1517
1523
  ]
1518
1524
  }
@@ -1840,7 +1846,7 @@ var specificExamples = {
1840
1846
  ],
1841
1847
  "displays widgets update": [
1842
1848
  {
1843
- description: "Move placement, update view columns, rename the widget and lock it.",
1849
+ description: "Move placement, update view columns, rename the widget and lock it. The server merges view.fields into the saved table view: columns already visible keep their position and width, hidden or new ones move to the end and become visible, and omitted ones are hidden.",
1844
1850
  command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --layout '{"x":1,"y":2,"w":8,"h":4}' --field contact-name --field status --field amount --name "Revenue Updated" --widget-read-only`,
1845
1851
  raw: `{
1846
1852
  "placement": {
@@ -1904,8 +1910,8 @@ var specificExamples = {
1904
1910
  }`
1905
1911
  },
1906
1912
  {
1907
- description: "Configure locked fields (replaces the stored configuration): contact-name locked permanently, status locked while invoice-number is empty. Empty conditions = always locked; conditions combine with AND. Enforcement happens in display widgets only, never in the database view.",
1908
- command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --lock-field contact-name --lock-condition "status:invoice-number:is_empty" --lock-message-before "status:Status locks until the invoice number is set." --lock-message-after "status:Status is locked because the invoice number is missing."`,
1913
+ description: "Configure locked fields (replaces the stored configuration): contact-name locked permanently, status locked while invoice-number or amount is empty. Empty conditions = always locked; conditions combine with AND unless --lock-match <field>:any locks as soon as one matches. Enforcement happens in display widgets only, never in the database view.",
1914
+ command: `zinkee --json displays widgets update 0f6f062f-1478-4df2-96a1-c495d037d260 11111111-1111-4111-a111-111111111111 --lock-field contact-name --lock-condition "status:invoice-number:is_empty" --lock-condition "status:amount:is_empty" --lock-match "status:any" --lock-message-before "status:Status locks while the invoice number or the amount is missing." --lock-message-after "status:Fill in the invoice number and the amount to change the status."`,
1909
1915
  raw: `{
1910
1916
  "behavior": {
1911
1917
  "lockedFields": [
@@ -1920,10 +1926,16 @@ var specificExamples = {
1920
1926
  "origin": { "fieldId": "invoice-number" },
1921
1927
  "comparisonOperator": "IS_EMPTY",
1922
1928
  "values": []
1929
+ },
1930
+ {
1931
+ "origin": { "fieldId": "amount" },
1932
+ "comparisonOperator": "IS_EMPTY",
1933
+ "values": []
1923
1934
  }
1924
1935
  ],
1925
- "messageBeforeLock": "Status locks until the invoice number is set.",
1926
- "messageAfterLock": "Status is locked because the invoice number is missing."
1936
+ "conditionMatch": "ANY",
1937
+ "messageBeforeLock": "Status locks while the invoice number or the amount is missing.",
1938
+ "messageAfterLock": "Fill in the invoice number and the amount to change the status."
1927
1939
  }
1928
1940
  ]
1929
1941
  }
@@ -4470,4 +4482,4 @@ function withResponseEnvelope(example, commandName) {
4470
4482
  export {
4471
4483
  getCommandExamples
4472
4484
  };
4473
- //# sourceMappingURL=examples-BA4M5QSJ.js.map
4485
+ //# sourceMappingURL=examples-EAGYSHFN.js.map