@kubex/zinc 1.1.178 → 1.1.180
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/dist/custom-elements.json +7 -2
- package/dist/web-types.json +1 -1
- package/dist/zn.d.ts +16 -0
- package/dist/zn.min.js +260 -260
- package/docs/pages/components/chart.md +13 -0
- package/package.json +1 -1
- package/src/components/chart/builders.test.ts +32 -0
- package/src/components/chart/builders.ts +24 -1
- package/src/components/data-table/data-table.component.ts +3 -2
- package/src/components/data-table-filter/data-table-filter.component.ts +2 -2
- package/src/components/data-table-search/data-table-search.component.ts +2 -2
- package/src/components/defined-label/defined-label.component.ts +1 -1
- package/src/components/filter-container/filter-container.component.ts +1 -1
- package/src/components/filter-wrapper/filter-wrapper.component.ts +2 -0
- package/src/components/filter-wrapper/filter-wrapper.test.ts +46 -0
- package/src/components/icon-picker/icon-picker.component.ts +1 -1
- package/src/components/input/input.component.ts +10 -0
- package/src/components/input/input.test.ts +22 -0
- package/src/components/remarkd-editor/remarkd-editor.component.ts +1 -1
- package/src/components/select/select.component.ts +1 -1
- package/src/internal/form.ts +23 -1
|
@@ -9162,7 +9162,7 @@
|
|
|
9162
9162
|
"kind": "field",
|
|
9163
9163
|
"name": "_dataTask",
|
|
9164
9164
|
"privacy": "private",
|
|
9165
|
-
"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. 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
|
|
9165
|
+
"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. 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 raw = (input as AllowedInputElement).value as string || input.getAttribute('value'); const value = typeof raw === 'string' ? raw.trim() : raw; const name = (input as AllowedInputElement).name || input.getAttribute('name'); if (name) { params[name] = value; } } }); Object.assign(requestData, params); } // Add any extra request params const extraParams = requestParams && typeof requestParams === 'object' ? requestParams as Record<string, unknown> : {}; if (this.wrapSearchFields) { // Opt-in shape: field values nested under `searchFields`, with `q` mirroring the search // text, so a backend can bind them to one map. Empty values are dropped, and the key is // null when nothing is set. The root `search` key is sent either way. const searchFields: Record<string, any> = {}; for (const [key, value] of Object.entries(extraParams)) { 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; } else { Object.assign(requestData, extraParams); } // 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] })"
|
|
9166
9166
|
},
|
|
9167
9167
|
{
|
|
9168
9168
|
"kind": "field",
|
|
@@ -21812,6 +21812,11 @@
|
|
|
21812
21812
|
}
|
|
21813
21813
|
]
|
|
21814
21814
|
},
|
|
21815
|
+
{
|
|
21816
|
+
"kind": "method",
|
|
21817
|
+
"name": "syncEmailDisplay",
|
|
21818
|
+
"privacy": "private"
|
|
21819
|
+
},
|
|
21815
21820
|
{
|
|
21816
21821
|
"kind": "method",
|
|
21817
21822
|
"name": "handleKeyDown",
|
|
@@ -53936,7 +53941,7 @@
|
|
|
53936
53941
|
"package": {
|
|
53937
53942
|
"name": "@kubex/zinc",
|
|
53938
53943
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
53939
|
-
"version": "1.1.
|
|
53944
|
+
"version": "1.1.180",
|
|
53940
53945
|
"author": "",
|
|
53941
53946
|
"license": "MIT"
|
|
53942
53947
|
}
|
package/dist/web-types.json
CHANGED
package/dist/zn.d.ts
CHANGED
|
@@ -155,6 +155,12 @@ declare module "internal/form" {
|
|
|
155
155
|
import type { ZincFormControl } from "internal/zinc-element";
|
|
156
156
|
import type Button from "components/button/index";
|
|
157
157
|
export const formCollections: WeakMap<HTMLFormElement, Set<ZincFormControl>>;
|
|
158
|
+
/** Trims a control's string value in place, so what's shown matches what's submitted. */
|
|
159
|
+
export function trimControlValue(control: Element & {
|
|
160
|
+
value?: unknown;
|
|
161
|
+
type?: string;
|
|
162
|
+
input?: unknown;
|
|
163
|
+
}): void;
|
|
158
164
|
export function clearFormStoreValues(formOrStoreKey: HTMLFormElement | string): void;
|
|
159
165
|
export interface FormControlControllerOptions {
|
|
160
166
|
/** A function that returns the form containing the form control. */
|
|
@@ -2446,6 +2452,7 @@ declare module "components/input/input.component" {
|
|
|
2446
2452
|
private handleFocus;
|
|
2447
2453
|
private handleInput;
|
|
2448
2454
|
private handleInvalid;
|
|
2455
|
+
private syncEmailDisplay;
|
|
2449
2456
|
private handleKeyDown;
|
|
2450
2457
|
private handlePasswordToggle;
|
|
2451
2458
|
private handleColorSwatchClick;
|
|
@@ -4802,6 +4809,15 @@ declare module "components/chart/builders" {
|
|
|
4802
4809
|
name: string;
|
|
4803
4810
|
data: any[];
|
|
4804
4811
|
color?: string;
|
|
4812
|
+
/** Series sharing a stack ID are stacked, overriding the chart-wide `stacked` setting. */
|
|
4813
|
+
stack?: string;
|
|
4814
|
+
/** Fill below a line, for example `{ opacity: 0.15 }`; `{ opacity: 0 }` keeps a stacked base invisible. */
|
|
4815
|
+
areaStyle?: Record<string, unknown>;
|
|
4816
|
+
lineStyle?: Record<string, unknown>;
|
|
4817
|
+
symbol?: string;
|
|
4818
|
+
/** Excludes the series from mouse interaction and tooltips. */
|
|
4819
|
+
silent?: boolean;
|
|
4820
|
+
z?: number;
|
|
4805
4821
|
}
|
|
4806
4822
|
export interface SankeyEdge {
|
|
4807
4823
|
source: string;
|