@fkui/vue 6.4.0 → 6.5.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.
- package/dist/cjs/index.cjs.js +107 -78
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/index.esm.js +107 -78
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +24 -13
- package/dist/types/tsdoc-metadata.json +1 -1
- package/htmlvalidate/configs/recommended.js +1 -0
- package/htmlvalidate/elements/components.js +1 -1
- package/htmlvalidate/rules/ftablecolumn-name.rule.js +58 -0
- package/htmlvalidate/rules/index.js +2 -0
- package/package.json +5 -5
package/dist/types/index.d.ts
CHANGED
|
@@ -143,14 +143,14 @@ initial: string;
|
|
|
143
143
|
|
|
144
144
|
declare const __VLS_component_5: DefineComponent<ExtractPropTypes< {
|
|
145
145
|
/**
|
|
146
|
-
* Unique (per-table) identifier.
|
|
146
|
+
* Unique (per-table) identifier. Typically set to the row
|
|
147
|
+
* property displayed but any unique string can be used.
|
|
147
148
|
*
|
|
148
|
-
*
|
|
149
|
-
* be used.
|
|
149
|
+
* Only required when used with `FSortFilterDataset`.
|
|
150
150
|
*/
|
|
151
151
|
name: {
|
|
152
152
|
type: StringConstructor;
|
|
153
|
-
|
|
153
|
+
default: undefined;
|
|
154
154
|
};
|
|
155
155
|
/**
|
|
156
156
|
* If set to true, display the column, set to false to hide it.
|
|
@@ -226,14 +226,14 @@ validator(value: string): value is FTableColumnType;
|
|
|
226
226
|
};
|
|
227
227
|
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
228
228
|
/**
|
|
229
|
-
* Unique (per-table) identifier.
|
|
229
|
+
* Unique (per-table) identifier. Typically set to the row
|
|
230
|
+
* property displayed but any unique string can be used.
|
|
230
231
|
*
|
|
231
|
-
*
|
|
232
|
-
* be used.
|
|
232
|
+
* Only required when used with `FSortFilterDataset`.
|
|
233
233
|
*/
|
|
234
234
|
name: {
|
|
235
235
|
type: StringConstructor;
|
|
236
|
-
|
|
236
|
+
default: undefined;
|
|
237
237
|
};
|
|
238
238
|
/**
|
|
239
239
|
* If set to true, display the column, set to false to hide it.
|
|
@@ -309,12 +309,15 @@ validator(value: string): value is FTableColumnType;
|
|
|
309
309
|
};
|
|
310
310
|
}>> & Readonly<{}>, {
|
|
311
311
|
type: "text" | "date" | "action" | "numeric";
|
|
312
|
+
name: string;
|
|
312
313
|
description: string;
|
|
313
314
|
shrink: boolean;
|
|
314
315
|
expand: boolean;
|
|
315
316
|
visible: boolean;
|
|
316
317
|
rowHeader: boolean;
|
|
317
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
318
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
319
|
+
element: unknown;
|
|
320
|
+
}, any>;
|
|
318
321
|
|
|
319
322
|
declare const __VLS_component_6: DefineComponent<IPopupListboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
320
323
|
close: () => any;
|
|
@@ -433,7 +436,9 @@ declare function __VLS_template_5(): {
|
|
|
433
436
|
slots: {
|
|
434
437
|
default?(_: {}): any;
|
|
435
438
|
};
|
|
436
|
-
refs: {
|
|
439
|
+
refs: {
|
|
440
|
+
element: unknown;
|
|
441
|
+
};
|
|
437
442
|
rootEl: any;
|
|
438
443
|
};
|
|
439
444
|
|
|
@@ -4152,6 +4157,9 @@ export declare const FDataTable: <T extends object>(__VLS_props: NonNullable<Awa
|
|
|
4152
4157
|
attrs: any;
|
|
4153
4158
|
slots: {
|
|
4154
4159
|
caption?(_: {}): any;
|
|
4160
|
+
default?(_: {
|
|
4161
|
+
row: {};
|
|
4162
|
+
}): any;
|
|
4155
4163
|
default?(_: {
|
|
4156
4164
|
row: T;
|
|
4157
4165
|
}): any;
|
|
@@ -7914,8 +7922,8 @@ export declare const FInteractiveTable: <T extends object, K extends keyof T>(__
|
|
|
7914
7922
|
slots: {
|
|
7915
7923
|
'row-description'?(_: {}): any;
|
|
7916
7924
|
caption?(_: {}): any;
|
|
7917
|
-
|
|
7918
|
-
row:
|
|
7925
|
+
default?(_: {
|
|
7926
|
+
row: {};
|
|
7919
7927
|
}): any;
|
|
7920
7928
|
default?(_: {
|
|
7921
7929
|
row: T;
|
|
@@ -7929,6 +7937,9 @@ export declare const FInteractiveTable: <T extends object, K extends keyof T>(__
|
|
|
7929
7937
|
default?(_: {
|
|
7930
7938
|
row: T;
|
|
7931
7939
|
}): any;
|
|
7940
|
+
'checkbox-description'?(_: {
|
|
7941
|
+
row: T;
|
|
7942
|
+
}): any;
|
|
7932
7943
|
expandable?(_: {
|
|
7933
7944
|
expandableRow: T;
|
|
7934
7945
|
parentRow: T;
|
|
@@ -14310,7 +14321,7 @@ export declare const FTableColumn: __VLS_WithTemplateSlots_5<typeof __VLS_compon
|
|
|
14310
14321
|
*/
|
|
14311
14322
|
export declare interface FTableColumnData {
|
|
14312
14323
|
id: string;
|
|
14313
|
-
name
|
|
14324
|
+
name?: string;
|
|
14314
14325
|
title: string;
|
|
14315
14326
|
description?: string;
|
|
14316
14327
|
size: FTableColumnSize;
|
|
@@ -507,7 +507,7 @@ module.exports = defineMetadata({
|
|
|
507
507
|
description: ["/.+/"],
|
|
508
508
|
type: ["text", "date", "numeric", "action"],
|
|
509
509
|
},
|
|
510
|
-
requiredAttributes: ["
|
|
510
|
+
requiredAttributes: ["title"],
|
|
511
511
|
permittedContent: ["@phrasing", "button", "f-badge"],
|
|
512
512
|
},
|
|
513
513
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const { Rule } = require("html-validate/node");
|
|
2
|
+
const { getDocumentationUrl } = require("./common");
|
|
3
|
+
|
|
4
|
+
class FTableColumnName extends Rule {
|
|
5
|
+
documentation() {
|
|
6
|
+
return {
|
|
7
|
+
description:
|
|
8
|
+
"`<f-sort-filter-dataset>` requires `name` attribute to be set for each `<f-table-column>` with a unique value.",
|
|
9
|
+
url: getDocumentationUrl(
|
|
10
|
+
"/components/table-and-list/fsortfilterdataset.html",
|
|
11
|
+
),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
setup() {
|
|
16
|
+
this.on("dom:ready", (event) => {
|
|
17
|
+
const sorters = event.document.querySelectorAll(
|
|
18
|
+
"f-sort-filter-dataset",
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
for (const sorter of sorters) {
|
|
22
|
+
this.validateSorterColumns(sorter);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
validateSorterColumns(sorter) {
|
|
28
|
+
const columns = sorter.querySelectorAll("f-table-column");
|
|
29
|
+
const seenNames = new Set();
|
|
30
|
+
|
|
31
|
+
for (const column of columns) {
|
|
32
|
+
const hasName = column.hasAttribute("name");
|
|
33
|
+
if (!hasName) {
|
|
34
|
+
this.report(
|
|
35
|
+
column,
|
|
36
|
+
'<f-table-column> is missing required "name" attribute.',
|
|
37
|
+
);
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const { value: name, valueLocation } = column.getAttribute("name");
|
|
42
|
+
if (name.length === 0) {
|
|
43
|
+
// Empty name attribute already handled by component rules.
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (seenNames.has(name)) {
|
|
47
|
+
this.report({
|
|
48
|
+
location: valueLocation,
|
|
49
|
+
message: `"${name}" is not unique.`,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
seenNames.add(name);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
module.exports = FTableColumnName;
|
|
@@ -4,6 +4,7 @@ const PreferFIcon = require("./prefer-ficon.rule");
|
|
|
4
4
|
const requiredmaxlength = require("./requiredmaxlength.rule");
|
|
5
5
|
const ftextfieldFormatterValidation = require("./ftextfieldFormatterValidation.rule");
|
|
6
6
|
const NoTemplateModal = require("./no-template-modal.rule");
|
|
7
|
+
const FTableColumnName = require("./ftablecolumn-name.rule");
|
|
7
8
|
|
|
8
9
|
module.exports = {
|
|
9
10
|
"fkui/button-group": buttongroup,
|
|
@@ -12,4 +13,5 @@ module.exports = {
|
|
|
12
13
|
"fkui/required-max-length": requiredmaxlength,
|
|
13
14
|
"fkui/ftextfield-formatter-validation": ftextfieldFormatterValidation,
|
|
14
15
|
"fkui/no-template-modal": NoTemplateModal,
|
|
16
|
+
"fkui/ftablecolumn-name": FTableColumnName,
|
|
15
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fkui/vue",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "Vue implementation of FKUI components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fkui",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"unit:watch": "jest --watch"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@fkui/date": "^6.
|
|
64
|
-
"@fkui/design": "^6.
|
|
65
|
-
"@fkui/logic": "^6.
|
|
63
|
+
"@fkui/date": "^6.5.0",
|
|
64
|
+
"@fkui/design": "^6.5.0",
|
|
65
|
+
"@fkui/logic": "^6.5.0",
|
|
66
66
|
"fk-icons": "^4.30.1",
|
|
67
67
|
"html-validate": ">= 7.9.0",
|
|
68
68
|
"vue": "^3.5.0"
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"node": ">= 20",
|
|
80
80
|
"npm": ">= 7"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "9ee7787552c9291983645d9fc4a6a19d9afff267"
|
|
83
83
|
}
|