@kubex/zinc 1.1.132 → 1.1.134

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.
@@ -56,6 +56,79 @@
56
56
  }
57
57
  ]
58
58
  },
59
+ {
60
+ "kind": "javascript-module",
61
+ "path": "components/action-bar/action-bar.js",
62
+ "declarations": [
63
+ {
64
+ "kind": "class",
65
+ "description": "",
66
+ "name": "ZnActionBar",
67
+ "cssProperties": [
68
+ {
69
+ "description": "An example CSS custom property.",
70
+ "name": "--example"
71
+ }
72
+ ],
73
+ "cssParts": [
74
+ {
75
+ "description": "The component's base wrapper.",
76
+ "name": "base"
77
+ }
78
+ ],
79
+ "slots": [
80
+ {
81
+ "description": "The default slot.",
82
+ "name": ""
83
+ },
84
+ {
85
+ "description": "An example slot.",
86
+ "name": "example"
87
+ }
88
+ ],
89
+ "members": [
90
+ {
91
+ "kind": "field",
92
+ "name": "localize",
93
+ "privacy": "private",
94
+ "readonly": true,
95
+ "default": "new LocalizeController(this)"
96
+ }
97
+ ],
98
+ "events": [
99
+ {
100
+ "description": "Emitted as an example.",
101
+ "name": "zn-event-name"
102
+ }
103
+ ],
104
+ "superclass": {
105
+ "name": "ZincElement",
106
+ "module": "/src/internal/zinc-element"
107
+ },
108
+ "summary": "Short summary of the component's intended use.",
109
+ "tagNameWithoutPrefix": "action-bar",
110
+ "tagName": "zn-action-bar",
111
+ "customElement": true,
112
+ "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
113
+ "documentation": "https://zinc.style/components/action-bar",
114
+ "status": "experimental",
115
+ "since": "1.0",
116
+ "dependencies": [
117
+ "zn-example"
118
+ ]
119
+ }
120
+ ],
121
+ "exports": [
122
+ {
123
+ "kind": "js",
124
+ "name": "default",
125
+ "declaration": {
126
+ "name": "ZnActionBar",
127
+ "module": "components/action-bar/action-bar.js"
128
+ }
129
+ }
130
+ ]
131
+ },
59
132
  {
60
133
  "kind": "javascript-module",
61
134
  "path": "components/alert/alert.js",
@@ -250,79 +323,6 @@
250
323
  }
251
324
  ]
252
325
  },
253
- {
254
- "kind": "javascript-module",
255
- "path": "components/action-bar/action-bar.js",
256
- "declarations": [
257
- {
258
- "kind": "class",
259
- "description": "",
260
- "name": "ZnActionBar",
261
- "cssProperties": [
262
- {
263
- "description": "An example CSS custom property.",
264
- "name": "--example"
265
- }
266
- ],
267
- "cssParts": [
268
- {
269
- "description": "The component's base wrapper.",
270
- "name": "base"
271
- }
272
- ],
273
- "slots": [
274
- {
275
- "description": "The default slot.",
276
- "name": ""
277
- },
278
- {
279
- "description": "An example slot.",
280
- "name": "example"
281
- }
282
- ],
283
- "members": [
284
- {
285
- "kind": "field",
286
- "name": "localize",
287
- "privacy": "private",
288
- "readonly": true,
289
- "default": "new LocalizeController(this)"
290
- }
291
- ],
292
- "events": [
293
- {
294
- "description": "Emitted as an example.",
295
- "name": "zn-event-name"
296
- }
297
- ],
298
- "superclass": {
299
- "name": "ZincElement",
300
- "module": "/src/internal/zinc-element"
301
- },
302
- "summary": "Short summary of the component's intended use.",
303
- "tagNameWithoutPrefix": "action-bar",
304
- "tagName": "zn-action-bar",
305
- "customElement": true,
306
- "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
307
- "documentation": "https://zinc.style/components/action-bar",
308
- "status": "experimental",
309
- "since": "1.0",
310
- "dependencies": [
311
- "zn-example"
312
- ]
313
- }
314
- ],
315
- "exports": [
316
- {
317
- "kind": "js",
318
- "name": "default",
319
- "declaration": {
320
- "name": "ZnActionBar",
321
- "module": "components/action-bar/action-bar.js"
322
- }
323
- }
324
- ]
325
- },
326
326
  {
327
327
  "kind": "javascript-module",
328
328
  "path": "components/animated-button/animated-button.js",
@@ -8856,6 +8856,16 @@
8856
8856
  "default": "false",
8857
8857
  "attribute": "no-initial-load"
8858
8858
  },
8859
+ {
8860
+ "kind": "field",
8861
+ "name": "sharable",
8862
+ "type": {
8863
+ "text": "boolean"
8864
+ },
8865
+ "default": "false",
8866
+ "description": "When set, the table's non-default state (search, filter, sort, page, per-page and field values)\nis mirrored to the URL query string and restored from it on load, so the view is shareable.",
8867
+ "attribute": "sharable"
8868
+ },
8859
8869
  {
8860
8870
  "kind": "field",
8861
8871
  "name": "groupBy",
@@ -8926,6 +8936,31 @@
8926
8936
  "privacy": "private",
8927
8937
  "default": "html``"
8928
8938
  },
8939
+ {
8940
+ "kind": "field",
8941
+ "name": "_sharableInitialised",
8942
+ "type": {
8943
+ "text": "boolean"
8944
+ },
8945
+ "privacy": "private",
8946
+ "default": "false"
8947
+ },
8948
+ {
8949
+ "kind": "field",
8950
+ "name": "_sharableDefaults",
8951
+ "type": {
8952
+ "text": "Record<string, string> | null"
8953
+ },
8954
+ "privacy": "private",
8955
+ "default": "null"
8956
+ },
8957
+ {
8958
+ "kind": "field",
8959
+ "name": "_urlManagedKeys",
8960
+ "privacy": "private",
8961
+ "readonly": true,
8962
+ "default": "new Set<string>(['search', 'filter', 'sortColumn', 'sortDirection', 'page', 'perPage'])"
8963
+ },
8929
8964
  {
8930
8965
  "kind": "field",
8931
8966
  "name": "resizeObserver",
@@ -9013,7 +9048,7 @@
9013
9048
  "kind": "field",
9014
9049
  "name": "_dataTask",
9015
9050
  "privacy": "private",
9016
- "default": "new Task(this, { task: async ([dataUri, requestParams], {signal}) => { if (dataUri === undefined || this.noInitialLoad && this._initialLoad) { return {rows: [], page: 1, perPage: this.itemsPerPage, total: 0}; } if (this.groupBy) { // we want to load all the data possible so we can group and show multiple tables this.itemsPerPage = 1000; } const requestData: DataRequest = { page: this.page, perPage: this.itemsPerPage, sortColumn: this.sortColumn, sortDirection: this.sortDirection, filter: this.filter, search: this.search, }; // get all inputs that are in the inputs slot and add them to the const inputs = this.hasSlotController.getSlots(ActionSlots.inputs.valueOf()); const params: Record<string, any> = {}; if (inputs) { inputs.forEach((input) => { const allowedInputs = ['zn-input', 'zn-select', 'zn-query-builder', 'zn-multiselect', 'zn-params-select', 'zn-datepicker', 'input', 'select', 'textarea']; if (allowedInputs.includes(input.tagName.toLowerCase())) { const value = (input as AllowedInputElement).value as string || input.getAttribute('value'); const name = (input as AllowedInputElement).name || input.getAttribute('name'); if (name) { params[name] = value; } } }); Object.assign(requestData, params); } // Add any extra request params if (requestParams && typeof requestParams === 'object') { Object.assign(requestData, requestParams); } // This is also used for Rubix, so it may not work for your application. const response = await fetch(dataUri, { method: this.method, headers: { 'x-kx-fetch-style': 'zn-data-table', }, signal, credentials: 'same-origin', body: this.method === 'POST' ? JSON.stringify(requestData) : undefined }); if (!response.ok) throw new Error(response.statusText); return response.json(); }, args: () => [this.dataUri, this.requestParams] })"
9051
+ "default": "new Task(this, { task: async ([dataUri, requestParams], {signal}) => { // Every request path funnels through the task, so this is the single place to mirror the // current (non-default) state to the URL when `sharable` is set. this._updateSharableUrl(); if (dataUri === undefined || this.noInitialLoad && this._initialLoad) { return {rows: [], page: 1, perPage: this.itemsPerPage, total: 0}; } if (this.groupBy) { // we want to load all the data possible so we can group and show multiple tables this.itemsPerPage = 1000; } const requestData: DataRequest = { page: this.page, perPage: this.itemsPerPage, sortColumn: this.sortColumn, sortDirection: this.sortDirection, filter: this.filter, search: this.search, }; // Inputs-slot values are context/system params (e.g. csrf token, package name) sent with // every request - they stay at the root of the payload. const inputs = this.hasSlotController.getSlots(ActionSlots.inputs.valueOf()); const params: Record<string, any> = {}; if (inputs) { inputs.forEach((input) => { const allowedInputs = ['zn-input', 'zn-select', 'zn-query-builder', 'zn-multiselect', 'zn-params-select', 'zn-datepicker', 'input', 'select', 'textarea']; if (allowedInputs.includes(input.tagName.toLowerCase())) { const value = (input as AllowedInputElement).value as string || input.getAttribute('value'); const name = (input as AllowedInputElement).name || input.getAttribute('name'); if (name) { params[name] = value; } } }); Object.assign(requestData, params); } // Search-related fields (from <zn-data-table-search>'s `fields` slot, delivered via // requestParams) are wrapped under `searchFields` so the backend can bind them to a single // map rather than arbitrary root-level keys. `q` mirrors the search text; the root `search` // key is still sent for back-compatibility. Empty values are dropped, and `searchFields` is // null when nothing meaningful remains so the backend can treat it as \"no search\". const searchFields: Record<string, any> = {}; if (requestParams && typeof requestParams === 'object') { for (const [key, value] of Object.entries(requestParams as Record<string, unknown>)) { if (value !== undefined && value !== null && value !== '') { searchFields[key] = value; } } } if (this.search || Object.keys(searchFields).length > 0) { searchFields.q = this.search; } requestData.searchFields = Object.keys(searchFields).length > 0 ? searchFields : null; // This is also used for Rubix, so it may not work for your application. const response = await fetch(dataUri, { method: this.method, headers: { 'x-kx-fetch-style': 'zn-data-table', }, signal, credentials: 'same-origin', body: this.method === 'POST' ? JSON.stringify(requestData) : undefined }); if (!response.ok) throw new Error(response.statusText); return response.json(); }, args: () => [this.dataUri, this.requestParams] })"
9017
9052
  },
9018
9053
  {
9019
9054
  "kind": "field",
@@ -9154,6 +9189,78 @@
9154
9189
  }
9155
9190
  ]
9156
9191
  },
9192
+ {
9193
+ "kind": "field",
9194
+ "name": "_sharableKnownKeys",
9195
+ "type": {
9196
+ "text": "array"
9197
+ },
9198
+ "privacy": "private",
9199
+ "static": true,
9200
+ "readonly": true,
9201
+ "default": "['search', 'filter', 'sortColumn', 'sortDirection', 'page', 'perPage']"
9202
+ },
9203
+ {
9204
+ "kind": "method",
9205
+ "name": "_captureSharableDefaults",
9206
+ "privacy": "private",
9207
+ "description": "Snapshot the initial (attribute-provided) value of every managed key, so the URL writer can\nomit any key still holding its default - e.g. the table's default sort/direction, page 1 or the\ndefault page size. Captured once, before the URL is read, so URL values are treated as deltas."
9208
+ },
9209
+ {
9210
+ "kind": "method",
9211
+ "name": "_readSharableState",
9212
+ "privacy": "private",
9213
+ "description": "Seed the table state from the URL query string (raw param names) when `sharable` is set. Runs\nonce, before the first render, so the initial data request already carries the shared state."
9214
+ },
9215
+ {
9216
+ "kind": "method",
9217
+ "name": "_populateSharableFields",
9218
+ "privacy": "private",
9219
+ "description": "Push the shared state back into the actual DOM fields so the UI reflects it. The search value\nlives on the slotted <zn-data-table-search>, the filter on <zn-data-table-filter>, and extra\nfield params on the search/inputs fields (all light-DOM descendants)."
9220
+ },
9221
+ {
9222
+ "kind": "method",
9223
+ "name": "_hasFieldNamed",
9224
+ "privacy": "private",
9225
+ "return": {
9226
+ "type": {
9227
+ "text": "boolean"
9228
+ }
9229
+ },
9230
+ "parameters": [
9231
+ {
9232
+ "name": "name",
9233
+ "type": {
9234
+ "text": "string"
9235
+ }
9236
+ }
9237
+ ]
9238
+ },
9239
+ {
9240
+ "kind": "method",
9241
+ "name": "_setSharableFieldValue",
9242
+ "privacy": "private",
9243
+ "parameters": [
9244
+ {
9245
+ "name": "name",
9246
+ "type": {
9247
+ "text": "string"
9248
+ }
9249
+ },
9250
+ {
9251
+ "name": "value",
9252
+ "type": {
9253
+ "text": "string"
9254
+ }
9255
+ }
9256
+ ]
9257
+ },
9258
+ {
9259
+ "kind": "method",
9260
+ "name": "_updateSharableUrl",
9261
+ "privacy": "private",
9262
+ "description": "Mirror the current table state to the URL query string (raw param names) via replaceState.\nA key is written only when its value differs from the captured default, so the default sort,\npage 1, the default page size and empty search/filter/fields never clutter the URL. Unrelated\nparams (e.g. utm_*) are preserved."
9263
+ },
9157
9264
  {
9158
9265
  "kind": "method",
9159
9266
  "name": "publishFilterSuggestions",
@@ -9951,6 +10058,15 @@
9951
10058
  "default": "false",
9952
10059
  "fieldName": "noInitialLoad"
9953
10060
  },
10061
+ {
10062
+ "name": "sharable",
10063
+ "type": {
10064
+ "text": "boolean"
10065
+ },
10066
+ "default": "false",
10067
+ "description": "When set, the table's non-default state (search, filter, sort, page, per-page and field values)\nis mirrored to the URL query string and restored from it on load, so the view is shareable.",
10068
+ "fieldName": "sharable"
10069
+ },
9954
10070
  {
9955
10071
  "name": "group-by",
9956
10072
  "type": {
@@ -10448,6 +10564,12 @@
10448
10564
  "name": "emitChange",
10449
10565
  "privacy": "private"
10450
10566
  },
10567
+ {
10568
+ "kind": "method",
10569
+ "name": "hydrateFromValue",
10570
+ "privacy": "private",
10571
+ "description": "Rebuild the active filters from an encoded `value` (the inverse of emitChange), so a filter\nrestored from a shareable URL shows its pills. Runs only while there are no active filters and\nneeds the filters schema present to resolve each key. Sets `_active` directly so it neither\nre-emits nor overwrites the value it just read."
10572
+ },
10451
10573
  {
10452
10574
  "kind": "method",
10453
10575
  "name": "handleDateInput",
@@ -10919,7 +11041,7 @@
10919
11041
  "text": "number"
10920
11042
  },
10921
11043
  "default": "350",
10922
- "description": "The delay in milliseconds before triggering a search (default: 500).",
11044
+ "description": "The delay in milliseconds before triggering a search (default: 350).",
10923
11045
  "attribute": "debounce-delay"
10924
11046
  },
10925
11047
  {
@@ -11056,7 +11178,7 @@
11056
11178
  "text": "number"
11057
11179
  },
11058
11180
  "default": "350",
11059
- "description": "The delay in milliseconds before triggering a search (default: 500).",
11181
+ "description": "The delay in milliseconds before triggering a search (default: 350).",
11060
11182
  "fieldName": "debounceDelay"
11061
11183
  }
11062
11184
  ],
@@ -11068,7 +11190,7 @@
11068
11190
  "tagNameWithoutPrefix": "data-table-search",
11069
11191
  "tagName": "zn-data-table-search",
11070
11192
  "customElement": true,
11071
- "jsDoc": "/**\n * @summary A search component for data tables.\n * @documentation https://zinc.style/components/data-table-search\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-input\n * @dependency zn-tooltip\n *\n * @event zn-search-change - Emitted when the search value changes (debounced).\n *\n * @slot - The default slot for additional form inputs.\n *\n * @csspart base - The component's base wrapper.\n *\n * @property {string} name - The name of the search input field (default: \"search\").\n * @property {string} value - The current search value.\n * @property {string} placeholder - The placeholder text for the search input (default: \"Search...\").\n * @property {string} helpText - Help text, shown from an information icon inside the search input.\n * @property {string} searchUri - Optional URI to use for search operations.\n * @property {number} debounceDelay - The delay in milliseconds before triggering a search (default: 500).\n */",
11193
+ "jsDoc": "/**\n * @summary A search component for data tables.\n * @documentation https://zinc.style/components/data-table-search\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-input\n * @dependency zn-tooltip\n *\n * @event zn-search-change - Emitted when the search value changes (debounced).\n *\n * @slot - The default slot for additional form inputs.\n *\n * @csspart base - The component's base wrapper.\n *\n * @property {string} name - The name of the search input field (default: \"search\").\n * @property {string} value - The current search value.\n * @property {string} placeholder - The placeholder text for the search input (default: \"Search...\").\n * @property {string} helpText - Help text, shown from an information icon inside the search input.\n * @property {string} searchUri - Optional URI to use for search operations.\n * @property {number} debounceDelay - The delay in milliseconds before triggering a search (default: 350).\n */",
11072
11194
  "documentation": "https://zinc.style/components/data-table-search",
11073
11195
  "status": "experimental",
11074
11196
  "since": "1.0",
@@ -52826,7 +52948,7 @@
52826
52948
  "package": {
52827
52949
  "name": "@kubex/zinc",
52828
52950
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
52829
- "version": "1.1.132",
52951
+ "version": "1.1.134",
52830
52952
  "author": "",
52831
52953
  "license": "MIT"
52832
52954
  }
@@ -13,6 +13,17 @@
13
13
  }
14
14
  ]
15
15
  },
16
+ {
17
+ "name": "zn-action-bar",
18
+ "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
19
+ "attributes": [],
20
+ "references": [
21
+ {
22
+ "name": "Documentation",
23
+ "url": "https://zinc.style/components/action-bar"
24
+ }
25
+ ]
26
+ },
16
27
  {
17
28
  "name": "zn-alert",
18
29
  "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
@@ -53,17 +64,6 @@
53
64
  }
54
65
  ]
55
66
  },
56
- {
57
- "name": "zn-action-bar",
58
- "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
59
- "attributes": [],
60
- "references": [
61
- {
62
- "name": "Documentation",
63
- "url": "https://zinc.style/components/action-bar"
64
- }
65
- ]
66
- },
67
67
  {
68
68
  "name": "zn-animated-button",
69
69
  "description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
@@ -1223,6 +1223,11 @@
1223
1223
  { "name": "filters", "values": [{ "name": "[]" }] },
1224
1224
  { "name": "method", "values": [{ "name": "GET" }, { "name": "POST" }] },
1225
1225
  { "name": "no-initial-load", "values": [] },
1226
+ {
1227
+ "name": "sharable",
1228
+ "description": "When set, the table's non-default state (search, filter, sort, page, per-page and field values)\nis mirrored to the URL query string and restored from it on load, so the view is shareable.",
1229
+ "values": []
1230
+ },
1226
1231
  { "name": "group-by", "values": [] },
1227
1232
  { "name": "groups", "values": [] },
1228
1233
  { "name": "per-page-size", "values": [] }
@@ -1285,7 +1290,7 @@
1285
1290
  },
1286
1291
  {
1287
1292
  "name": "debounce-delay",
1288
- "description": "The delay in milliseconds before triggering a search (default: 500).",
1293
+ "description": "The delay in milliseconds before triggering a search (default: 350).",
1289
1294
  "values": []
1290
1295
  }
1291
1296
  ],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@kubex/zinc",
4
- "version": "1.1.132",
4
+ "version": "1.1.134",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -15,6 +15,28 @@
15
15
  "events": [],
16
16
  "js": { "properties": [], "events": [] }
17
17
  },
18
+ {
19
+ "name": "zn-action-bar",
20
+ "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
21
+ "doc-url": "",
22
+ "attributes": [],
23
+ "slots": [
24
+ { "name": "", "description": "The default slot." },
25
+ { "name": "example", "description": "An example slot." }
26
+ ],
27
+ "events": [
28
+ { "name": "zn-event-name", "description": "Emitted as an example." }
29
+ ],
30
+ "js": {
31
+ "properties": [],
32
+ "events": [
33
+ {
34
+ "name": "zn-event-name",
35
+ "description": "Emitted as an example."
36
+ }
37
+ ]
38
+ }
39
+ },
18
40
  {
19
41
  "name": "zn-alert",
20
42
  "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
@@ -83,28 +105,6 @@
83
105
  ]
84
106
  }
85
107
  },
86
- {
87
- "name": "zn-action-bar",
88
- "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
89
- "doc-url": "",
90
- "attributes": [],
91
- "slots": [
92
- { "name": "", "description": "The default slot." },
93
- { "name": "example", "description": "An example slot." }
94
- ],
95
- "events": [
96
- { "name": "zn-event-name", "description": "Emitted as an example." }
97
- ],
98
- "js": {
99
- "properties": [],
100
- "events": [
101
- {
102
- "name": "zn-event-name",
103
- "description": "Emitted as an example."
104
- }
105
- ]
106
- }
107
- },
108
108
  {
109
109
  "name": "zn-animated-button",
110
110
  "description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
@@ -2746,6 +2746,11 @@
2746
2746
  "name": "no-initial-load",
2747
2747
  "value": { "type": "boolean", "default": "false" }
2748
2748
  },
2749
+ {
2750
+ "name": "sharable",
2751
+ "description": "When set, the table's non-default state (search, filter, sort, page, per-page and field values)\nis mirrored to the URL query string and restored from it on load, so the view is shareable.",
2752
+ "value": { "type": "boolean", "default": "false" }
2753
+ },
2749
2754
  {
2750
2755
  "name": "group-by",
2751
2756
  "value": { "type": "string", "default": "''" }
@@ -2834,6 +2839,11 @@
2834
2839
  { "name": "filters", "type": "[]" },
2835
2840
  { "name": "method", "type": "'GET' | 'POST'" },
2836
2841
  { "name": "noInitialLoad", "type": "boolean" },
2842
+ {
2843
+ "name": "sharable",
2844
+ "description": "When set, the table's non-default state (search, filter, sort, page, per-page and field values)\nis mirrored to the URL query string and restored from it on load, so the view is shareable.",
2845
+ "type": "boolean"
2846
+ },
2837
2847
  { "name": "groupBy", "type": "string" },
2838
2848
  { "name": "groups", "type": "string" },
2839
2849
  { "name": "itemsPerPage", "type": "number" },
@@ -2935,7 +2945,7 @@
2935
2945
  },
2936
2946
  {
2937
2947
  "name": "debounce-delay",
2938
- "description": "The delay in milliseconds before triggering a search (default: 500).",
2948
+ "description": "The delay in milliseconds before triggering a search (default: 350).",
2939
2949
  "value": { "type": "number", "default": "350" }
2940
2950
  }
2941
2951
  ],
@@ -2980,7 +2990,7 @@
2980
2990
  },
2981
2991
  {
2982
2992
  "name": "debounceDelay",
2983
- "description": "The delay in milliseconds before triggering a search (default: 500).",
2993
+ "description": "The delay in milliseconds before triggering a search (default: 350).",
2984
2994
  "type": "number"
2985
2995
  },
2986
2996
  { "name": "validationMessage", "type": "string" },
package/dist/zn.d.ts CHANGED
@@ -3460,6 +3460,13 @@ declare module "components/data-table-filter/data-table-filter.component" {
3460
3460
  private toggleOption;
3461
3461
  private selectedValues;
3462
3462
  private emitChange;
3463
+ /**
3464
+ * Rebuild the active filters from an encoded `value` (the inverse of emitChange), so a filter
3465
+ * restored from a shareable URL shows its pills. Runs only while there are no active filters and
3466
+ * needs the filters schema present to resolve each key. Sets `_active` directly so it neither
3467
+ * re-emits nor overwrites the value it just read.
3468
+ */
3469
+ private hydrateFromValue;
3463
3470
  private handleDateInput;
3464
3471
  private serializeDate;
3465
3472
  private handleTextInput;
@@ -3679,7 +3686,7 @@ declare module "components/data-table-search/data-table-search.component" {
3679
3686
  * @property {string} placeholder - The placeholder text for the search input (default: "Search...").
3680
3687
  * @property {string} helpText - Help text, shown from an information icon inside the search input.
3681
3688
  * @property {string} searchUri - Optional URI to use for search operations.
3682
- * @property {number} debounceDelay - The delay in milliseconds before triggering a search (default: 500).
3689
+ * @property {number} debounceDelay - The delay in milliseconds before triggering a search (default: 350).
3683
3690
  */
3684
3691
  export default class ZnDataTableSearch extends ZincElement implements ZincFormControl {
3685
3692
  static styles: CSSResultGroup;
@@ -4139,6 +4146,11 @@ declare module "components/data-table/data-table.component" {
4139
4146
  filters: [];
4140
4147
  method: 'GET' | 'POST';
4141
4148
  noInitialLoad: boolean;
4149
+ /**
4150
+ * When set, the table's non-default state (search, filter, sort, page, per-page and field values)
4151
+ *is mirrored to the URL query string and restored from it on load, so the view is shareable.
4152
+ */
4153
+ sharable: boolean;
4142
4154
  groupBy: string;
4143
4155
  groups: string;
4144
4156
  itemsPerPage: number;
@@ -4147,6 +4159,9 @@ declare module "components/data-table/data-table.component" {
4147
4159
  private _hasLoadedData;
4148
4160
  private _lastLoadHadRows;
4149
4161
  private _lastTableContent;
4162
+ private _sharableInitialised;
4163
+ private _sharableDefaults;
4164
+ private readonly _urlManagedKeys;
4150
4165
  private readonly resizeObserver;
4151
4166
  private page;
4152
4167
  private totalPages;
@@ -4173,8 +4188,36 @@ declare module "components/data-table/data-table.component" {
4173
4188
  private isColumnVisible;
4174
4189
  private applyColumnDefaults;
4175
4190
  private toggleColumn;
4191
+ private static readonly _sharableKnownKeys;
4192
+ /**
4193
+ * Snapshot the initial (attribute-provided) value of every managed key, so the URL writer can
4194
+ * omit any key still holding its default - e.g. the table's default sort/direction, page 1 or the
4195
+ * default page size. Captured once, before the URL is read, so URL values are treated as deltas.
4196
+ */
4197
+ private _captureSharableDefaults;
4198
+ /**
4199
+ * Seed the table state from the URL query string (raw param names) when `sharable` is set. Runs
4200
+ * once, before the first render, so the initial data request already carries the shared state.
4201
+ */
4202
+ private _readSharableState;
4203
+ /**
4204
+ * Push the shared state back into the actual DOM fields so the UI reflects it. The search value
4205
+ * lives on the slotted <zn-data-table-search>, the filter on <zn-data-table-filter>, and extra
4206
+ * field params on the search/inputs fields (all light-DOM descendants).
4207
+ */
4208
+ private _populateSharableFields;
4209
+ private _hasFieldNamed;
4210
+ private _setSharableFieldValue;
4211
+ /**
4212
+ * Mirror the current table state to the URL query string (raw param names) via replaceState.
4213
+ * A key is written only when its value differs from the captured default, so the default sort,
4214
+ * page 1, the default page size and empty search/filter/fields never clutter the URL. Unrelated
4215
+ * params (e.g. utm_*) are preserved.
4216
+ */
4217
+ private _updateSharableUrl;
4176
4218
  render(): TemplateResult<1>;
4177
4219
  connectedCallback(): void;
4220
+ protected firstUpdated(): void;
4178
4221
  protected updated(changed: PropertyValues): void;
4179
4222
  private publishFilterSuggestions;
4180
4223
  private getTemplate;