@everymatrix/nuts-inbox-widget 1.76.8 → 1.76.10

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.
@@ -14,6 +14,7 @@ export const config = {
14
14
  {
15
15
  type: 'dist',
16
16
  esmLoaderPath: '../loader'
17
- }
17
+ },
18
+ { type: 'dist-hydrate-script', dir: './hydrate' }
18
19
  ]
19
20
  };
@@ -65,7 +65,6 @@ export declare class NutsInboxWidget {
65
65
  private isLoading;
66
66
  private popoverVisible;
67
67
  private unseenCount;
68
- private limitStylingAppends;
69
68
  private socketRef;
70
69
  private bellIconRef;
71
70
  private token;
@@ -89,6 +88,7 @@ export declare class NutsInboxWidget {
89
88
  handleNewTranslations(): void;
90
89
  componentWillLoad(): Promise<void>;
91
90
  componentDidRender(): void;
91
+ componentDidLoad(): void;
92
92
  assignRefToStylingContainer: (ref: HTMLElement) => void;
93
93
  assignRefToBell: (ref: HTMLElement) => void;
94
94
  renderBellIcon(): HTMLElement;
@@ -0,0 +1,236 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { Readable } from 'node:stream';
4
+
5
+ export declare function createWindowFromHtml(templateHtml: string, uniqueId: string): any;
6
+ export interface HydrateDocumentOptions {
7
+ /**
8
+ * Build ID that will be added to `<html data-stencil-build="BUILD_ID">`. By default
9
+ * a random ID will be generated
10
+ */
11
+ buildId?: string;
12
+ /**
13
+ * Sets the `href` attribute on the `<link rel="canonical">`
14
+ * tag within the `<head>`. If the value is not defined it will
15
+ * ensure a canonical link tag is no included in the `<head>`.
16
+ */
17
+ canonicalUrl?: string;
18
+ /**
19
+ * Include the HTML comments and attributes used by the client-side
20
+ * JavaScript to read the structure of the HTML and rebuild each
21
+ * component. Defaults to `true`.
22
+ */
23
+ clientHydrateAnnotations?: boolean;
24
+ /**
25
+ * Constrain `setTimeout()` to 1ms, but still async. Also
26
+ * only allows `setInterval()` to fire once, also constrained to 1ms.
27
+ * Defaults to `true`.
28
+ */
29
+ constrainTimeouts?: boolean;
30
+ /**
31
+ * Sets `document.cookie`
32
+ */
33
+ cookie?: string;
34
+ /**
35
+ * Sets the `dir` attribute on the top level `<html>`.
36
+ */
37
+ direction?: string;
38
+ /**
39
+ * Component tag names listed here will not be prerendered, nor will
40
+ * hydrated on the client-side. Components listed here will be ignored
41
+ * as custom elements and treated no differently than a `<div>`.
42
+ */
43
+ excludeComponents?: string[];
44
+ /**
45
+ * Sets the `lang` attribute on the top level `<html>`.
46
+ */
47
+ language?: string;
48
+ /**
49
+ * Maximum number of components to hydrate on one page. Defaults to `300`.
50
+ */
51
+ maxHydrateCount?: number;
52
+ /**
53
+ * Sets `document.referrer`
54
+ */
55
+ referrer?: string;
56
+ /**
57
+ * Removes every `<script>` element found in the `document`. Defaults to `false`.
58
+ */
59
+ removeScripts?: boolean;
60
+ /**
61
+ * Removes CSS not used by elements within the `document`. Defaults to `true`.
62
+ */
63
+ removeUnusedStyles?: boolean;
64
+ /**
65
+ * The url the runtime uses for the resources, such as the assets directory.
66
+ */
67
+ resourcesUrl?: string;
68
+ /**
69
+ * Prints out runtime console logs to the NodeJS process. Defaults to `false`.
70
+ */
71
+ runtimeLogging?: boolean;
72
+ /**
73
+ * Component tags listed here will only be prerendered or server-side-rendered
74
+ * and will not be client-side hydrated. This is useful for components that
75
+ * are not dynamic and do not need to be defined as a custom element within the
76
+ * browser. For example, a header or footer component would be a good example that
77
+ * may not require any client-side JavaScript.
78
+ */
79
+ staticComponents?: string[];
80
+ /**
81
+ * The amount of milliseconds to wait for a page to finish rendering until
82
+ * a timeout error is thrown. Defaults to `15000`.
83
+ */
84
+ timeout?: number;
85
+ /**
86
+ * Sets `document.title`.
87
+ */
88
+ title?: string;
89
+ /**
90
+ * Sets `location.href`
91
+ */
92
+ url?: string;
93
+ /**
94
+ * Sets `navigator.userAgent`
95
+ */
96
+ userAgent?: string;
97
+ }
98
+ export interface SerializeDocumentOptions extends HydrateDocumentOptions {
99
+ /**
100
+ * Runs after the `document` has been hydrated.
101
+ */
102
+ afterHydrate?(document: any): any | Promise<any>;
103
+ /**
104
+ * Sets an approximate line width the HTML should attempt to stay within.
105
+ * Note that this is "approximate", in that HTML may often not be able
106
+ * to be split at an exact line width. Additionally, new lines created
107
+ * is where HTML naturally already has whitespace, such as before an
108
+ * attribute or spaces between words. Defaults to `100`.
109
+ */
110
+ approximateLineWidth?: number;
111
+ /**
112
+ * Runs before the `document` has been hydrated.
113
+ */
114
+ beforeHydrate?(document: any): any | Promise<any>;
115
+ /**
116
+ * Format the HTML in a nicely indented format.
117
+ * Defaults to `false`.
118
+ */
119
+ prettyHtml?: boolean;
120
+ /**
121
+ * Remove quotes from attribute values when possible.
122
+ * Defaults to `true`.
123
+ */
124
+ removeAttributeQuotes?: boolean;
125
+ /**
126
+ * Remove the `=""` from standardized `boolean` attributes,
127
+ * such as `hidden` or `checked`. Defaults to `true`.
128
+ */
129
+ removeBooleanAttributeQuotes?: boolean;
130
+ /**
131
+ * Remove these standardized attributes when their value is empty:
132
+ * `class`, `dir`, `id`, `lang`, and `name`, `title`. Defaults to `true`.
133
+ */
134
+ removeEmptyAttributes?: boolean;
135
+ /**
136
+ * Remove HTML comments. Defaults to `true`.
137
+ */
138
+ removeHtmlComments?: boolean;
139
+ /**
140
+ * If set to `false` Stencil will ignore the fact that a component has a `shadow: true`
141
+ * flag and serializes it as a scoped component. If set to `true` the component will
142
+ * be rendered within a Declarative Shadow DOM.
143
+ * @default false
144
+ */
145
+ serializeShadowRoot?: boolean;
146
+ /**
147
+ * The `fullDocument` flag determines the format of the rendered output. Set it to true to
148
+ * generate a complete HTML document, or false to render only the component.
149
+ * @default true
150
+ */
151
+ fullDocument?: boolean;
152
+ }
153
+ export interface HydrateFactoryOptions extends SerializeDocumentOptions {
154
+ serializeToHtml: boolean;
155
+ destroyWindow: boolean;
156
+ destroyDocument: boolean;
157
+ }
158
+ export interface Diagnostic {
159
+ absFilePath?: string | undefined;
160
+ code?: string;
161
+ columnNumber?: number | undefined;
162
+ debugText?: string;
163
+ header?: string;
164
+ language?: string;
165
+ level: "error" | "warn" | "info" | "log" | "debug";
166
+ lineNumber?: number | undefined;
167
+ lines: PrintLine[];
168
+ messageText: string;
169
+ relFilePath?: string | undefined;
170
+ type: string;
171
+ }
172
+ export interface PrintLine {
173
+ lineIndex: number;
174
+ lineNumber: number;
175
+ text: string;
176
+ errorCharStart: number;
177
+ errorLength?: number;
178
+ }
179
+ export interface HydrateResults {
180
+ buildId: string;
181
+ diagnostics: Diagnostic[];
182
+ url: string;
183
+ host: string | null;
184
+ hostname: string | null;
185
+ href: string | null;
186
+ port: string | null;
187
+ pathname: string | null;
188
+ search: string | null;
189
+ hash: string | null;
190
+ html: string | null;
191
+ components: HydrateComponent[];
192
+ anchors: HydrateAnchorElement[];
193
+ imgs: HydrateImgElement[];
194
+ scripts: HydrateScriptElement[];
195
+ styles: HydrateStyleElement[];
196
+ staticData: HydrateStaticData[];
197
+ title: string | null;
198
+ hydratedCount: number;
199
+ httpStatus: number | null;
200
+ }
201
+ export interface HydrateComponent {
202
+ tag: string;
203
+ mode: string;
204
+ count: number;
205
+ depth: number;
206
+ }
207
+ export interface HydrateElement {
208
+ [attrName: string]: string | undefined;
209
+ }
210
+ export interface HydrateAnchorElement extends HydrateElement {
211
+ href?: string;
212
+ target?: string;
213
+ }
214
+ export interface HydrateImgElement extends HydrateElement {
215
+ src?: string;
216
+ }
217
+ export interface HydrateScriptElement extends HydrateElement {
218
+ src?: string;
219
+ type?: string;
220
+ }
221
+ export interface HydrateStyleElement extends HydrateElement {
222
+ href?: string;
223
+ }
224
+ export interface HydrateStaticData {
225
+ id: string;
226
+ type: string;
227
+ content: string;
228
+ }
229
+ export declare function streamToString(html: string | any, option?: SerializeDocumentOptions): Readable;
230
+ export declare function renderToString(html: string | any, options?: SerializeDocumentOptions): Promise<HydrateResults>;
231
+ export declare function renderToString(html: string | any, options: SerializeDocumentOptions | undefined, asStream: true): Readable;
232
+ export declare function hydrateDocument(doc: any | string, options?: HydrateDocumentOptions): Promise<HydrateResults>;
233
+ export declare function hydrateDocument(doc: any | string, options: HydrateDocumentOptions | undefined, asStream?: boolean): Readable;
234
+ export declare function serializeDocumentToString(doc: Document, opts: HydrateFactoryOptions): string;
235
+
236
+ export {};