@forsakringskassan/devindex-menu 1.10.0 → 2.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.
@@ -0,0 +1,30 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+
5
+ // src/pageobjects/Devindex.pageobject.ts
6
+ var DevindexPageObject = class {
7
+ constructor() {
8
+ __publicField(this, "selector");
9
+ __publicField(this, "el");
10
+ this.selector = ".secret-menu";
11
+ this.el = () => cy.get(this.selector);
12
+ }
13
+ toggleMenu() {
14
+ cy.get(".secret-menu > button").click();
15
+ }
16
+ valj(id, value) {
17
+ cy.get(`#${id}`).select(value);
18
+ }
19
+ /**
20
+ * Inputs text into a text field.
21
+ * @param name - The name of the text field.
22
+ * @param value - The text to input.
23
+ */
24
+ textField(name, value) {
25
+ cy.get(`input[name="${name}"]`).clear().type(value);
26
+ }
27
+ };
28
+ export {
29
+ DevindexPageObject
30
+ };
@@ -0,0 +1,46 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { Mock } from '@forsakringskassan/apimock-express';
4
+
5
+ export interface SelectOption {
6
+ title: string;
7
+ value: unknown;
8
+ }
9
+ export interface SelectSettings {
10
+ type: "select";
11
+ key: string;
12
+ title: string;
13
+ reloadOnChange?: boolean;
14
+ execOnChange?: string;
15
+ description?: string;
16
+ sessionStorage?: boolean;
17
+ options: SelectOption[];
18
+ }
19
+ export interface LinkOption {
20
+ title: string;
21
+ href: string;
22
+ }
23
+ export interface LinkSettings {
24
+ type: "links";
25
+ title: string;
26
+ description?: string;
27
+ options: LinkOption[];
28
+ }
29
+ export interface TextSettings {
30
+ type: "text";
31
+ key: string;
32
+ title: string;
33
+ description?: string;
34
+ options: LinkOption[];
35
+ }
36
+ export type Settings = SelectSettings | LinkSettings | TextSettings;
37
+ /**
38
+ * @param userSettingsAndMocks - An array of user settings and/or mocks to generate the menu from.
39
+ */
40
+ declare const _default: (userSettingsAndMocks: Array<Settings | Mock>) => void;
41
+
42
+ export {
43
+ _default as default,
44
+ };
45
+
46
+ export {};
@@ -0,0 +1,17 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ export declare class DevindexPageObject {
4
+ selector: string;
5
+ el: () => Cypress.Chainable<JQuery>;
6
+ constructor();
7
+ toggleMenu(): void;
8
+ valj(id: string, value: string): void;
9
+ /**
10
+ * Inputs text into a text field.
11
+ * @param name - The name of the text field.
12
+ * @param value - The text to input.
13
+ */
14
+ textField(name: string, value: string): void;
15
+ }
16
+
17
+ export {};
package/package.json CHANGED
@@ -1,38 +1,44 @@
1
1
  {
2
2
  "name": "@forsakringskassan/devindex-menu",
3
- "version": "1.10.0",
3
+ "version": "2.0.1",
4
4
  "description": "",
5
+ "homepage": "https://github.com/Forsakringskassan/devindex-menu",
6
+ "bugs": "https://github.com/Forsakringskassan/devindex-menu/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Forsakringskassan/devindex-menu.git"
10
+ },
5
11
  "license": "ISC",
6
12
  "author": "FK",
7
13
  "exports": {
8
14
  ".": {
9
- "types": "./menu.d.ts",
15
+ "types": "./dist/types/menu.d.ts",
10
16
  "require": "./dist/cjs/menu.js",
11
17
  "import": "./dist/esm/menu.js"
12
18
  },
13
19
  "./pageobjects": {
14
- "types": "./pageobjects.d.ts",
15
- "require": "./dist/cjs/pageobjects/pageobjects.js",
16
- "import": "./dist/esm/pageobjects/pageobjects.js"
20
+ "types": "./dist/types/pageobjects.d.ts",
21
+ "require": "./dist/cjs/pageobjects.js",
22
+ "import": "./dist/esm/pageobjects.js"
17
23
  }
18
24
  },
19
25
  "main": "dist/cjs/menu.js",
20
26
  "module": "dist/esm/menu.js",
21
27
  "types": "./menu.d.ts",
22
28
  "files": [
23
- "dist",
24
- "pageobjects",
25
- "./pageobjects.d.ts",
26
- "./pageobjects.js",
27
- "./menu.d.ts"
29
+ "dist"
28
30
  ],
29
31
  "scripts": {
30
- "prebuild": "rimraf dist && tsc",
31
- "build": "node generate.mjs",
32
+ "prebuild": "tsc",
33
+ "build": "node ./scripts/generate.mjs",
34
+ "postbuild": "npm run types:main && npm run types:pageobject",
35
+ "types:main": "dts-bundle-generator -o dist/types/index.d.ts temp/types/menu.d.ts",
36
+ "types:pageobject": "dts-bundle-generator -o dist/types/pageobjects.d.ts temp/types/pageobjects.d.ts",
32
37
  "eslint": "eslint --cache .",
33
38
  "prettier:check": "prettier --check .",
34
39
  "prettier:write": "prettier --write .",
35
- "test": "npm run prettier:check && npm run eslint"
40
+ "test": "npm run prettier:check && npm run eslint",
41
+ "start": "node ./scripts/serve.mjs"
36
42
  },
37
43
  "commitlint": {
38
44
  "extends": "@forsakringskassan/commitlint-config/no-jira"
@@ -42,27 +48,31 @@
42
48
  "extends": "@forsakringskassan/semantic-release-config"
43
49
  },
44
50
  "devDependencies": {
45
- "@babel/core": "7.28.4",
46
- "@babel/preset-env": "7.28.3",
47
- "@forsakringskassan/apimock-express": "2.9.0",
48
- "@forsakringskassan/commitlint-config": "3.1.2",
49
- "@forsakringskassan/eslint-config": "13.1.0",
50
- "@forsakringskassan/eslint-config-cli": "13.1.0",
51
- "@forsakringskassan/eslint-config-cypress": "13.1.0",
52
- "@forsakringskassan/eslint-config-jest": "13.1.0",
53
- "@forsakringskassan/eslint-config-typescript": "13.1.0",
54
- "@forsakringskassan/eslint-config-typescript-typeinfo": "13.1.0",
55
- "@forsakringskassan/prettier-config": "3.1.7",
56
- "@tsconfig/node16": "16.1.5",
57
- "@types/node": "16.18.126",
58
- "cypress": "15.4.0",
59
- "esbuild": "0.25.10",
51
+ "@babel/core": "7.28.5",
52
+ "@babel/preset-env": "7.28.5",
53
+ "@fkui/tsconfig": "6.32.0",
54
+ "@forsakringskassan/apimock-express": "2.12.0",
55
+ "@forsakringskassan/commitlint-config": "3.3.1",
56
+ "@forsakringskassan/eslint-config": "13.2.6",
57
+ "@forsakringskassan/eslint-config-cli": "13.2.0",
58
+ "@forsakringskassan/eslint-config-cypress": "13.2.7",
59
+ "@forsakringskassan/eslint-config-jest": "13.2.7",
60
+ "@forsakringskassan/eslint-config-typescript": "13.2.6",
61
+ "@forsakringskassan/eslint-config-typescript-typeinfo": "13.2.6",
62
+ "@forsakringskassan/prettier-config": "3.3.2",
63
+ "@tsconfig/node22": "22.0.5",
64
+ "@types/node": "22.19.3",
65
+ "cypress": "15.8.1",
66
+ "dts-bundle-generator": "9.5.1",
67
+ "esbuild": "0.27.2",
60
68
  "esbuild-sass-plugin": "3.3.1",
61
- "rimraf": "6.0.1",
62
- "sass": "1.93.2",
69
+ "sass": "1.97.1",
63
70
  "typescript": "5.9.3"
64
71
  },
65
72
  "engines": {
66
- "node": ">= 16"
73
+ "node": ">= 22.0.0"
74
+ },
75
+ "dependencies": {
76
+ "@fkui/logic": "6.32.0"
67
77
  }
68
78
  }
@@ -1,7 +0,0 @@
1
- export declare class DevindexPageObject {
2
- selector: string;
3
- el: () => Cypress.Chainable<JQuery>;
4
- constructor();
5
- toggleMenu(): void;
6
- valj(id: string, value: string): void;
7
- }
@@ -1,16 +0,0 @@
1
- // src/pageobjects/Devindex.pageobject.ts
2
- var DevindexPageObject = class {
3
- constructor() {
4
- this.selector = ".secret-menu";
5
- this.el = () => cy.get(this.selector);
6
- }
7
- toggleMenu() {
8
- cy.get(".secret-menu > button").click();
9
- }
10
- valj(id, value) {
11
- cy.get(`#${id}`).select(value);
12
- }
13
- };
14
- export {
15
- DevindexPageObject
16
- };
@@ -1 +0,0 @@
1
- export * from "./Devindex.pageobject";
package/menu.d.ts DELETED
@@ -1,35 +0,0 @@
1
- import { type Mock } from "@forsakringskassan/apimock-express";
2
-
3
- export interface SelectOption {
4
- title: string;
5
- value: unknown;
6
- }
7
-
8
- export interface SelectSettings {
9
- type?: "select";
10
- key: string;
11
- title: string;
12
- reloadOnChange?: boolean;
13
- execOnChange?: string;
14
- description?: string;
15
- sessionStorage?: boolean;
16
- options: SelectOption[];
17
- }
18
-
19
- export interface LinkOption {
20
- title: string;
21
- href: string;
22
- }
23
-
24
- export interface LinkSettings {
25
- type: "links";
26
- title: string;
27
- description?: string;
28
- options: LinkOption[];
29
- }
30
-
31
- export type Settings = SelectSettings | LinkSettings;
32
-
33
- export default function devindexMenu(
34
- userSettingsAndMocks: Array<Settings | Mock>,
35
- ): void;
package/pageobjects.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./dist/pageobjects";