@gandalan/weblibs 1.5.22 → 1.5.24
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/api/neherApp3Types.d.ts +85 -0
- package/api/neherApp3Types.js +107 -0
- package/index.d.ts +2857 -256
- package/index.js +13 -97
- package/package.json +1 -1
- package/scripts/generate-root-dto-typedefs.mjs +585 -53
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Auto-generated NeherApp3 root type definitions.
|
|
2
|
+
// Do not modify manually - changes will be overwritten by scripts/generate-root-dto-typedefs.mjs
|
|
3
|
+
|
|
4
|
+
export type NeherApp3NotifyType = 0 | 1 | 2;
|
|
5
|
+
|
|
6
|
+
export type ArtikelstammEintrag = {
|
|
7
|
+
KatalogArtikelGuid?: string;
|
|
8
|
+
KatalogNummer?: string;
|
|
9
|
+
Katalognummer?: string;
|
|
10
|
+
Nummer?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type Variante = {
|
|
14
|
+
VarianteGuid?: string;
|
|
15
|
+
Name?: string;
|
|
16
|
+
Kuerzel?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type Werteliste = {
|
|
20
|
+
WerteListeGuid?: string;
|
|
21
|
+
Name?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type NeherApp3ArtikelstammCache = {
|
|
25
|
+
getArtikelStamm: () => Promise<ArtikelstammEintrag[]>;
|
|
26
|
+
getWarenGruppen: () => Promise<object[]>;
|
|
27
|
+
getArtikelByGuid: (guid: string) => Promise<ArtikelstammEintrag | undefined>;
|
|
28
|
+
getArtikelByKatalognummer: (nummer: string) => Promise<ArtikelstammEintrag | undefined>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type NeherApp3ErfassungCache = {
|
|
32
|
+
getVarianten: () => Promise<Variante[]>;
|
|
33
|
+
getVariante: (variantenNameOderKuerzel: string) => Promise<Variante | undefined>;
|
|
34
|
+
getWertelisten: () => Promise<Werteliste[]>;
|
|
35
|
+
getWerteliste: (name: string) => Promise<Werteliste | undefined>;
|
|
36
|
+
getScripts: () => Promise<object[]>;
|
|
37
|
+
createUIMachine: (v: Variante) => void;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type NeherApp3Props = {
|
|
41
|
+
api: import("./fluentApi.js").FluentApi;
|
|
42
|
+
authManager?: import("./fluentAuthManager.js").FluentAuthManager;
|
|
43
|
+
idas: import("./idasFluentApi.js").IDASFluentApi;
|
|
44
|
+
mainCssPath?: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type NeherApp3MenuItem = {
|
|
48
|
+
id?: string;
|
|
49
|
+
selected?: boolean;
|
|
50
|
+
icon?: string;
|
|
51
|
+
url?: string | null;
|
|
52
|
+
text: string;
|
|
53
|
+
parent?: string | null;
|
|
54
|
+
hidden?: boolean;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type NeherApp3SetupContext = NeherApp3Props & { neherapp3: NeherApp3 };
|
|
58
|
+
|
|
59
|
+
export type NeherApp3Module = {
|
|
60
|
+
moduleName: string;
|
|
61
|
+
setup?: (context: NeherApp3SetupContext) => void | Promise<void>;
|
|
62
|
+
mount?: (node: HTMLElement, props: NeherApp3SetupContext) => void | Function;
|
|
63
|
+
embedUrl?: string;
|
|
64
|
+
extraCSS?: string[];
|
|
65
|
+
useShadowDom?: boolean;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type NeherApp3ApiCollection = {
|
|
69
|
+
idas?: import("./idasFluentApi.js").IDASFluentApi;
|
|
70
|
+
hostingEnvironment?: import("./fluentApi.js").FluentApi;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type NeherApp3CacheCollection = {
|
|
74
|
+
artikelstamm: NeherApp3ArtikelstammCache;
|
|
75
|
+
erfassung: NeherApp3ErfassungCache;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type NeherApp3 = {
|
|
79
|
+
addMenuItem: (menuItem: NeherApp3MenuItem) => void;
|
|
80
|
+
addApp: (appModule: NeherApp3Module | string) => Promise<void>;
|
|
81
|
+
notify: (message: string, type?: NeherApp3NotifyType, cb?: Function) => void;
|
|
82
|
+
api: NeherApp3ApiCollection;
|
|
83
|
+
cache: NeherApp3CacheCollection;
|
|
84
|
+
};
|
|
85
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated NeherApp3 root type definitions.
|
|
3
|
+
* Do not modify manually - changes will be overwritten by scripts/generate-root-dto-typedefs.mjs
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** @typedef {import("./fluentApi.js").FluentApi} FluentApi */
|
|
7
|
+
/** @typedef {import("./idasFluentApi.js").IDASFluentApi} IDASFluentApi */
|
|
8
|
+
/** @typedef {import("./fluentAuthManager.js").FluentAuthManager} FluentAuthManager */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {0 | 1 | 2} NeherApp3NotifyType
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {Object} ArtikelstammEintrag
|
|
16
|
+
* @property {string} [KatalogArtikelGuid]
|
|
17
|
+
* @property {string} [KatalogNummer]
|
|
18
|
+
* @property {string} [Katalognummer]
|
|
19
|
+
* @property {string} [Nummer]
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {Object} Variante
|
|
24
|
+
* @property {string} [VarianteGuid]
|
|
25
|
+
* @property {string} [Name]
|
|
26
|
+
* @property {string} [Kuerzel]
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {Object} Werteliste
|
|
31
|
+
* @property {string} [WerteListeGuid]
|
|
32
|
+
* @property {string} [Name]
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef {Object} NeherApp3ArtikelstammCache
|
|
37
|
+
* @property {() => Promise<ArtikelstammEintrag[]>} getArtikelStamm
|
|
38
|
+
* @property {() => Promise<Object[]>} getWarenGruppen
|
|
39
|
+
* @property {(guid: string) => Promise<ArtikelstammEintrag | undefined>} getArtikelByGuid
|
|
40
|
+
* @property {(nummer: string) => Promise<ArtikelstammEintrag | undefined>} getArtikelByKatalognummer
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @typedef {Object} NeherApp3ErfassungCache
|
|
45
|
+
* @property {() => Promise<Variante[]>} getVarianten
|
|
46
|
+
* @property {(variantenNameOderKuerzel: string) => Promise<Variante | undefined>} getVariante
|
|
47
|
+
* @property {() => Promise<Werteliste[]>} getWertelisten
|
|
48
|
+
* @property {(name: string) => Promise<Werteliste | undefined>} getWerteliste
|
|
49
|
+
* @property {() => Promise<Object[]>} getScripts
|
|
50
|
+
* @property {(v: Variante) => void} createUIMachine
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @typedef {Object} NeherApp3Props
|
|
55
|
+
* @property {import("./fluentApi.js").FluentApi} api
|
|
56
|
+
* @property {import("./fluentAuthManager.js").FluentAuthManager} [authManager]
|
|
57
|
+
* @property {import("./idasFluentApi.js").IDASFluentApi} idas
|
|
58
|
+
* @property {string} [mainCssPath]
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @typedef {Object} NeherApp3MenuItem
|
|
63
|
+
* @property {string} [id] - Unique identifier for the menu item (auto-generated if not provided)
|
|
64
|
+
* @property {boolean} [selected] - Indicates if the menu item is currently selected (managed by the menu system)
|
|
65
|
+
* @property {string} [icon] - URL to an icon
|
|
66
|
+
* @property {string | null} [url] - Relative URL to use for routes
|
|
67
|
+
* @property {string} text - Display text
|
|
68
|
+
* @property {string | null} [parent] - Parent menu item (optional). If not set, the item will be added to the top level menu.
|
|
69
|
+
* @property {boolean} [hidden] - If true, the menu item will not be displayed
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @typedef {NeherApp3Props & { neherapp3: NeherApp3 }} NeherApp3SetupContext
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @typedef {Object} NeherApp3Module
|
|
78
|
+
* @property {string} moduleName
|
|
79
|
+
* @property {(context: NeherApp3SetupContext) => void | Promise<void>} [setup]
|
|
80
|
+
* @property {(node: HTMLElement, props: NeherApp3SetupContext) => void | function} [mount] - Must return an optional unmount function
|
|
81
|
+
* @property {string} [embedUrl]
|
|
82
|
+
* @property {string[]} [extraCSS]
|
|
83
|
+
* @property {boolean} [useShadowDom] - If true, the app will be embedded in a shadow DOM. This is required for CSS isolation.
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @typedef {Object} NeherApp3ApiCollection
|
|
88
|
+
* @property {import("./idasFluentApi.js").IDASFluentApi} [idas]
|
|
89
|
+
* @property {import("./fluentApi.js").FluentApi} [hostingEnvironment]
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @typedef {Object} NeherApp3CacheCollection
|
|
94
|
+
* @property {NeherApp3ArtikelstammCache} artikelstamm
|
|
95
|
+
* @property {NeherApp3ErfassungCache} erfassung
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @typedef {Object} NeherApp3
|
|
100
|
+
* @property {(menuItem: NeherApp3MenuItem) => void} addMenuItem
|
|
101
|
+
* @property {(appModule: NeherApp3Module | string) => Promise<void>} addApp
|
|
102
|
+
* @property {(message: string, type?: NeherApp3NotifyType, cb?: function) => void} notify - Shows a notification. Type defaults to 0 (info). Callback is optional.
|
|
103
|
+
* @property {NeherApp3ApiCollection} api
|
|
104
|
+
* @property {NeherApp3CacheCollection} cache
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
export {};
|