@fkui/vue 5.46.1 → 6.0.1
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/{pageobject.js → cypress.js} +135 -311
- package/dist/cjs/cypress.js.map +7 -0
- package/dist/cjs/index.cjs.js +1746 -1667
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/index.esm.js +1749 -1670
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/{pageobject.d.ts → cypress.d.ts} +48 -139
- package/dist/types/index.d.ts +588 -2249
- package/dist/types/tsdoc-metadata.json +1 -1
- package/htmlvalidate/configs/recommended.js +1 -1
- package/htmlvalidate/elements/components.js +14 -192
- package/htmlvalidate/elements/internal-components.js +0 -6
- package/htmlvalidate/rules/deprecated-validator.js +1 -1
- package/htmlvalidate/rules/index.js +2 -2
- package/htmlvalidate/rules/no-template-modal.rule.js +44 -0
- package/package.json +9 -10
- package/dist/cjs/pageobject.js.map +0 -7
- package/pageobject.d.ts +0 -1
- package/pageobject.js +0 -1
|
@@ -9,9 +9,9 @@ module.exports = {
|
|
|
9
9
|
rules: {
|
|
10
10
|
"fkui/button-group": "error",
|
|
11
11
|
"fkui/class-deprecated": "error",
|
|
12
|
-
"fkui/deprecated-validator": "error",
|
|
13
12
|
"fkui/prefer-ficon": "error",
|
|
14
13
|
"fkui/required-max-length": "error",
|
|
15
14
|
"fkui/ftextfield-formatter-validation": "error",
|
|
15
|
+
"fkui/no-template-modal": "error",
|
|
16
16
|
},
|
|
17
17
|
};
|
|
@@ -365,77 +365,6 @@ module.exports = defineMetadata({
|
|
|
365
365
|
permittedContent: ["@flow"],
|
|
366
366
|
},
|
|
367
367
|
|
|
368
|
-
"f-form": {
|
|
369
|
-
flow: true,
|
|
370
|
-
phrasing: true,
|
|
371
|
-
form: true,
|
|
372
|
-
slots: ["default", "error-message"],
|
|
373
|
-
attributes: {
|
|
374
|
-
"display-error": ["", "false", "true"],
|
|
375
|
-
"error-scroll": ["center", "top"],
|
|
376
|
-
},
|
|
377
|
-
deprecated: {
|
|
378
|
-
message:
|
|
379
|
-
"See migration guide: https://forsakringskassan.github.io/latest/components/fform.html",
|
|
380
|
-
source: "@fkui/vue",
|
|
381
|
-
},
|
|
382
|
-
},
|
|
383
|
-
|
|
384
|
-
"f-form#default": {
|
|
385
|
-
permittedContent: ["@flow"],
|
|
386
|
-
},
|
|
387
|
-
|
|
388
|
-
"f-form#error-message": {
|
|
389
|
-
permittedContent: ["@flow"],
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
"f-form-step": {
|
|
393
|
-
flow: true,
|
|
394
|
-
phrasing: true,
|
|
395
|
-
slots: ["default", "header", "error-message"],
|
|
396
|
-
permittedDescendants: [
|
|
397
|
-
{
|
|
398
|
-
exclude: "f-progressbar",
|
|
399
|
-
},
|
|
400
|
-
],
|
|
401
|
-
deprecated: {
|
|
402
|
-
message:
|
|
403
|
-
"See migration guide: https://forsakringskassan.github.io/latest/components/fform.html",
|
|
404
|
-
source: "@fkui/vue",
|
|
405
|
-
},
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
"f-form-step#default": {
|
|
409
|
-
permittedContent: ["@flow"],
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
"f-form-step#header": {
|
|
413
|
-
permittedContent: ["@flow"],
|
|
414
|
-
},
|
|
415
|
-
|
|
416
|
-
"f-form-step#error-message": {
|
|
417
|
-
permittedContent: ["@flow"],
|
|
418
|
-
},
|
|
419
|
-
|
|
420
|
-
"f-form-step-button": {
|
|
421
|
-
inherit: "button",
|
|
422
|
-
textContent: "none",
|
|
423
|
-
attributes: {
|
|
424
|
-
id: {},
|
|
425
|
-
"is-open": {},
|
|
426
|
-
"is-any-field-touched": {},
|
|
427
|
-
"additional-screenreader-text": {},
|
|
428
|
-
type: {
|
|
429
|
-
required: false,
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
|
-
deprecated: {
|
|
433
|
-
message:
|
|
434
|
-
"See migration guide: https://forsakringskassan.github.io/latest/components/fform.html",
|
|
435
|
-
source: "@fkui/vue",
|
|
436
|
-
},
|
|
437
|
-
},
|
|
438
|
-
|
|
439
368
|
"f-interactive-table": {
|
|
440
369
|
flow: true,
|
|
441
370
|
attributes: {
|
|
@@ -563,7 +492,7 @@ module.exports = defineMetadata({
|
|
|
563
492
|
enum: ["/.+/"],
|
|
564
493
|
},
|
|
565
494
|
"header-tag": {
|
|
566
|
-
enum: ["
|
|
495
|
+
enum: ["h1", "h2", "h3", "h4", "h5", "h6"],
|
|
567
496
|
},
|
|
568
497
|
"screen-reader-text": {
|
|
569
498
|
enum: ["/.+/"],
|
|
@@ -954,35 +883,6 @@ module.exports = defineMetadata({
|
|
|
954
883
|
inherit: "f-label#error-message",
|
|
955
884
|
},
|
|
956
885
|
|
|
957
|
-
"f-checkbox-group": {
|
|
958
|
-
inherit: "f-fieldset",
|
|
959
|
-
deprecated: {
|
|
960
|
-
message:
|
|
961
|
-
"<f-checkbox-group> is deprecated: use <f-fieldset> instead. See migration guide: https://forsakringskassan.github.io/latest/guide/migration/migrating-to-fieldset.html",
|
|
962
|
-
source: "@fkui/vue",
|
|
963
|
-
},
|
|
964
|
-
},
|
|
965
|
-
|
|
966
|
-
"f-checkbox-group#default": {
|
|
967
|
-
inherit: "f-fieldset#default",
|
|
968
|
-
},
|
|
969
|
-
|
|
970
|
-
"f-checkbox-group#label": {
|
|
971
|
-
inherit: "f-fieldset#label",
|
|
972
|
-
},
|
|
973
|
-
|
|
974
|
-
"f-checkbox-group#tooltip": {
|
|
975
|
-
inherit: "f-fieldset#tooltip",
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
"f-checkbox-group#description": {
|
|
979
|
-
inherit: "f-fieldset#description",
|
|
980
|
-
},
|
|
981
|
-
|
|
982
|
-
"f-checkbox-group#error-message": {
|
|
983
|
-
inherit: "f-fieldset#error-message",
|
|
984
|
-
},
|
|
985
|
-
|
|
986
886
|
"f-checkbox-field": {
|
|
987
887
|
flow: true,
|
|
988
888
|
phrasing: true,
|
|
@@ -998,19 +898,6 @@ module.exports = defineMetadata({
|
|
|
998
898
|
inherit: "label",
|
|
999
899
|
},
|
|
1000
900
|
|
|
1001
|
-
"f-checkbox-group-field": {
|
|
1002
|
-
inherit: "f-checkbox-field",
|
|
1003
|
-
deprecated: {
|
|
1004
|
-
message:
|
|
1005
|
-
"<f-checkbox-group-field> is deprecated: rename to <f-checkbox-field>. See migration guide: https://forsakringskassan.github.io/latest/guide/migration/migrating-to-fieldset.html",
|
|
1006
|
-
source: "@fkui/vue",
|
|
1007
|
-
},
|
|
1008
|
-
},
|
|
1009
|
-
|
|
1010
|
-
"f-checkbox-group-field#default": {
|
|
1011
|
-
inherit: "label",
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
901
|
"f-crud-dataset": {
|
|
1015
902
|
flow: true,
|
|
1016
903
|
interactive: true,
|
|
@@ -1040,40 +927,6 @@ module.exports = defineMetadata({
|
|
|
1040
927
|
requiredAncestors: ["f-crud-dataset"],
|
|
1041
928
|
},
|
|
1042
929
|
|
|
1043
|
-
"f-radio-group": {
|
|
1044
|
-
inherit: "f-fieldset",
|
|
1045
|
-
attributes: {
|
|
1046
|
-
"is-horizontal": {
|
|
1047
|
-
boolean: true,
|
|
1048
|
-
},
|
|
1049
|
-
},
|
|
1050
|
-
deprecated: {
|
|
1051
|
-
message:
|
|
1052
|
-
"<f-radio-group> is deprecated: use <f-fieldset> instead. See migration guide: https://forsakringskassan.github.io/latest/guide/migration/migrating-to-fieldset.html",
|
|
1053
|
-
source: "@fkui/vue",
|
|
1054
|
-
},
|
|
1055
|
-
},
|
|
1056
|
-
|
|
1057
|
-
"f-radio-group#default": {
|
|
1058
|
-
inherit: "f-fieldset#default",
|
|
1059
|
-
},
|
|
1060
|
-
|
|
1061
|
-
"f-radio-group#label": {
|
|
1062
|
-
inherit: "f-fieldset#label",
|
|
1063
|
-
},
|
|
1064
|
-
|
|
1065
|
-
"f-radio-group#tooltip": {
|
|
1066
|
-
inherit: "f-fieldset#tooltip",
|
|
1067
|
-
},
|
|
1068
|
-
|
|
1069
|
-
"f-radio-group#description": {
|
|
1070
|
-
inherit: "f-fieldset#description",
|
|
1071
|
-
},
|
|
1072
|
-
|
|
1073
|
-
"f-radio-group#error-message": {
|
|
1074
|
-
inherit: "f-fieldset#error-message",
|
|
1075
|
-
},
|
|
1076
|
-
|
|
1077
930
|
"f-radio-field": {
|
|
1078
931
|
flow: true,
|
|
1079
932
|
phrasing: true,
|
|
@@ -1089,19 +942,6 @@ module.exports = defineMetadata({
|
|
|
1089
942
|
inherit: "label",
|
|
1090
943
|
},
|
|
1091
944
|
|
|
1092
|
-
"f-radio-group-field": {
|
|
1093
|
-
inherit: "f-radio-field",
|
|
1094
|
-
deprecated: {
|
|
1095
|
-
message:
|
|
1096
|
-
"<f-radio-group-field> is deprecated: rename to <f-radio-field>. See migration guide: https://forsakringskassan.github.io/latest/guide/migration/migrating-to-fieldset.html",
|
|
1097
|
-
source: "@fkui/vue",
|
|
1098
|
-
},
|
|
1099
|
-
},
|
|
1100
|
-
|
|
1101
|
-
"f-radio-group-field#default": {
|
|
1102
|
-
inherit: "label",
|
|
1103
|
-
},
|
|
1104
|
-
|
|
1105
945
|
"f-select-field": {
|
|
1106
946
|
flow: true,
|
|
1107
947
|
phrasing: true,
|
|
@@ -1217,14 +1057,7 @@ module.exports = defineMetadata({
|
|
|
1217
1057
|
flow: true,
|
|
1218
1058
|
interactive: true,
|
|
1219
1059
|
phrasing: false,
|
|
1220
|
-
slots: [
|
|
1221
|
-
"default",
|
|
1222
|
-
"header",
|
|
1223
|
-
"error-message",
|
|
1224
|
-
"input-text-fields",
|
|
1225
|
-
"submit-button-text",
|
|
1226
|
-
"cancel-button-text",
|
|
1227
|
-
],
|
|
1060
|
+
slots: ["default", "header", "error-message", "input-text-fields"],
|
|
1228
1061
|
permittedContent: ["@flow", "template"],
|
|
1229
1062
|
attributes: {
|
|
1230
1063
|
"aria-close-text": {},
|
|
@@ -1373,37 +1206,14 @@ module.exports = defineMetadata({
|
|
|
1373
1206
|
slots: ["default", "skip-link-text", "logo", "right"],
|
|
1374
1207
|
permittedContent: ["@flow", "template"],
|
|
1375
1208
|
attributes: {
|
|
1376
|
-
"logo-size": {
|
|
1377
|
-
enum: ["small", "large", "responsive"],
|
|
1378
|
-
},
|
|
1379
1209
|
"skip-link": {
|
|
1380
1210
|
enum: ["/.+/"],
|
|
1381
|
-
/* for backwards compatiblity allow the skiplink value to be
|
|
1382
|
-
* omitted (e.g. same as setting it to true) */
|
|
1383
|
-
omit: true,
|
|
1384
|
-
},
|
|
1385
|
-
"skip-link-href": {
|
|
1386
|
-
enum: ["/^[#].*/"],
|
|
1387
1211
|
required: false,
|
|
1388
|
-
deprecated: "use skip-link prop with string instead",
|
|
1389
|
-
allowed(node) {
|
|
1390
|
-
return node.hasAttribute("skip-link")
|
|
1391
|
-
? null
|
|
1392
|
-
: "requires skip-link prop to be set";
|
|
1393
|
-
},
|
|
1394
1212
|
},
|
|
1395
1213
|
"header-tag": {
|
|
1396
1214
|
enum: ["span", "h1"],
|
|
1397
1215
|
required: false,
|
|
1398
1216
|
},
|
|
1399
|
-
"router-link-path": {
|
|
1400
|
-
enum: ["/.*/"],
|
|
1401
|
-
required: false,
|
|
1402
|
-
},
|
|
1403
|
-
"router-link-name": {
|
|
1404
|
-
enum: ["/.*/"],
|
|
1405
|
-
required: false,
|
|
1406
|
-
},
|
|
1407
1217
|
},
|
|
1408
1218
|
},
|
|
1409
1219
|
|
|
@@ -1503,4 +1313,16 @@ module.exports = defineMetadata({
|
|
|
1503
1313
|
},
|
|
1504
1314
|
slots: ["default"],
|
|
1505
1315
|
},
|
|
1316
|
+
|
|
1317
|
+
"f-logo": {
|
|
1318
|
+
flow: true,
|
|
1319
|
+
permittedContent: ["@phrasing"],
|
|
1320
|
+
textContent: "required",
|
|
1321
|
+
attributes: {
|
|
1322
|
+
size: {
|
|
1323
|
+
enum: ["small", "large", "responsive"],
|
|
1324
|
+
},
|
|
1325
|
+
},
|
|
1326
|
+
slots: ["default"],
|
|
1327
|
+
},
|
|
1506
1328
|
});
|
|
@@ -163,12 +163,6 @@ module.exports = defineMetadata({
|
|
|
163
163
|
anchor: {
|
|
164
164
|
required: true,
|
|
165
165
|
},
|
|
166
|
-
"always-inline": {
|
|
167
|
-
boolean: true,
|
|
168
|
-
required: false,
|
|
169
|
-
deprecated:
|
|
170
|
-
'`always-inline` is deprecated: use `inline="always"` instead.',
|
|
171
|
-
},
|
|
172
166
|
inline: {
|
|
173
167
|
required: false,
|
|
174
168
|
enum: ["always", "never", "auto"],
|
|
@@ -2,7 +2,7 @@ const { Rule, sliceLocation } = require("html-validate");
|
|
|
2
2
|
const { getDocumentationUrl } = require("./common");
|
|
3
3
|
|
|
4
4
|
const replacements = {
|
|
5
|
-
|
|
5
|
+
dummy: ["dummyReplacements"],
|
|
6
6
|
};
|
|
7
7
|
const deprecated = Object.keys(replacements);
|
|
8
8
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
const buttongroup = require("./buttongroup.rule");
|
|
2
2
|
const classdeprecated = require("./classdeprecated.rule");
|
|
3
|
-
const DeprecatedValidator = require("./deprecated-validator");
|
|
4
3
|
const PreferFIcon = require("./prefer-ficon.rule");
|
|
5
4
|
const requiredmaxlength = require("./requiredmaxlength.rule");
|
|
6
5
|
const ftextfieldFormatterValidation = require("./ftextfieldFormatterValidation.rule");
|
|
6
|
+
const NoTemplateModal = require("./no-template-modal.rule");
|
|
7
7
|
|
|
8
8
|
module.exports = {
|
|
9
9
|
"fkui/button-group": buttongroup,
|
|
10
10
|
"fkui/class-deprecated": classdeprecated,
|
|
11
|
-
"fkui/deprecated-validator": DeprecatedValidator,
|
|
12
11
|
"fkui/prefer-ficon": PreferFIcon,
|
|
13
12
|
"fkui/required-max-length": requiredmaxlength,
|
|
14
13
|
"fkui/ftextfield-formatter-validation": ftextfieldFormatterValidation,
|
|
14
|
+
"fkui/no-template-modal": NoTemplateModal,
|
|
15
15
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const { Rule } = require("html-validate/node");
|
|
2
|
+
const { getDocumentationUrl } = require("./common");
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import("html-validate/node").ElementReadyEvent} ElementReadyEvent
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {ElementReadyEvent} event
|
|
11
|
+
*/
|
|
12
|
+
function isRelevant(event) {
|
|
13
|
+
const { target } = event;
|
|
14
|
+
return (
|
|
15
|
+
target.is("f-modal") ||
|
|
16
|
+
target.is("f-confirm-modal") ||
|
|
17
|
+
target.is("f-form-modal")
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class NoTemplateModal extends Rule {
|
|
22
|
+
documentation() {
|
|
23
|
+
return {
|
|
24
|
+
description:
|
|
25
|
+
"The template method of using modals is deprecated. Modals need to be the root element in a Vue component and opened using API.",
|
|
26
|
+
url: getDocumentationUrl("/components/fmodal.html"),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
setup() {
|
|
31
|
+
this.on("element:ready", isRelevant, (event) => {
|
|
32
|
+
if (event.target.parent.is("#document")) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const modalType = event.target.tagName;
|
|
37
|
+
this.report({
|
|
38
|
+
message: `${modalType} must be root element.`,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = NoTemplateModal;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fkui/vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "Vue implementation of FKUI components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fkui",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"require": "./dist/cjs/index.cjs.js",
|
|
23
23
|
"import": "./dist/esm/index.esm.js"
|
|
24
24
|
},
|
|
25
|
-
"./
|
|
26
|
-
"types": "./dist/types/
|
|
27
|
-
"default": "./dist/cjs/
|
|
25
|
+
"./cypress": {
|
|
26
|
+
"types": "./dist/types/cypress.d.ts",
|
|
27
|
+
"default": "./dist/cjs/cypress.js"
|
|
28
28
|
},
|
|
29
29
|
"./htmlvalidate": "./htmlvalidate/index.cjs",
|
|
30
30
|
"./htmlvalidate/cypress": "./htmlvalidate/cypress.js",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"dist",
|
|
39
39
|
"htmlvalidate",
|
|
40
40
|
"tsconfig-consumer.json",
|
|
41
|
-
"pageobject.{js,d.ts}",
|
|
42
41
|
"!**/*.spec.{js,ts,d.ts}",
|
|
43
42
|
"!**/.eslintrc.json",
|
|
44
43
|
"!htmlvalidate/tsconfig.json"
|
|
@@ -49,7 +48,7 @@
|
|
|
49
48
|
"build:api": "fk-api-extractor --patch-augmentations api-extractor.*.json",
|
|
50
49
|
"build:dts": "vue-tsc -b",
|
|
51
50
|
"build:lib": "fk-build-vue-lib",
|
|
52
|
-
"build:pageobjects": "esbuild --bundle --platform=node --target=node12.0 --sourcemap --outfile=dist/cjs/
|
|
51
|
+
"build:pageobjects": "esbuild --bundle --platform=node --target=node12.0 --sourcemap --outfile=dist/cjs/cypress.js ./src/cypress/index.ts",
|
|
53
52
|
"clean": "rimraf -g .jest-cache *.tsbuildinfo coverage dist public temp test-results",
|
|
54
53
|
"prepack": "release-prepack --bundle --retain-scripts",
|
|
55
54
|
"postpack": "release-postpack",
|
|
@@ -60,9 +59,9 @@
|
|
|
60
59
|
"unit:watch": "jest --watch"
|
|
61
60
|
},
|
|
62
61
|
"peerDependencies": {
|
|
63
|
-
"@fkui/date": "^
|
|
64
|
-
"@fkui/design": "^
|
|
65
|
-
"@fkui/logic": "^
|
|
62
|
+
"@fkui/date": "^6.0.1",
|
|
63
|
+
"@fkui/design": "^6.0.1",
|
|
64
|
+
"@fkui/logic": "^6.0.1",
|
|
66
65
|
"fk-icons": "^4.30.1",
|
|
67
66
|
"html-validate": ">= 7.9.0",
|
|
68
67
|
"vue": "^3.5.0"
|
|
@@ -79,5 +78,5 @@
|
|
|
79
78
|
"node": ">= 20",
|
|
80
79
|
"npm": ">= 7"
|
|
81
80
|
},
|
|
82
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "57374ff76f56c2587a9290facb0894c89bbe7ea6"
|
|
83
82
|
}
|