lupine.components 1.1.39 → 1.1.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lupine.components",
3
- "version": "1.1.39",
3
+ "version": "1.1.40",
4
4
  "license": "MIT",
5
5
  "author": "uuware.com",
6
6
  "homepage": "https://github.com/uuware/lupine.js",
@@ -25,3 +25,6 @@ export * from './timeline';
25
25
  export * from './tooltip';
26
26
  export * from './tour';
27
27
  export * from './youtube-player';
28
+
29
+ export * from './svg-icons';
30
+ export * from './svg-props';
@@ -146,6 +146,8 @@ export class FloatWindow {
146
146
  padding: '15px',
147
147
  maxHeight: contentMaxHeight ? `min(${contentMaxHeight}, calc(100% - 100px))` : 'calc(100% - 100px)',
148
148
  overflowY: contentOverflowY,
149
+ boxSizing: 'border-box',
150
+ width: '100%',
149
151
  },
150
152
  '.fwin-bottom': {
151
153
  display: 'flex',
@@ -1,9 +1,9 @@
1
1
  import { RefProps, VNode } from 'lupine.web';
2
2
 
3
- export type HtmlVarValueProps = string | VNode<any> | (() => Promise<VNode<any>>);
3
+ export type HtmlVarValueProps = string | null | undefined | VNode<any> | (() => Promise<VNode<any>>);
4
4
  export type HtmlVarResult = { value: HtmlVarValueProps; ref: RefProps; node: VNode<any> };
5
5
  export class HtmlVar implements HtmlVarResult {
6
- private _value: HtmlVarValueProps;
6
+ private _value: string | VNode<any> | (() => Promise<VNode<any>>);
7
7
  private _dirty = false;
8
8
  private _ref: RefProps;
9
9
  private resolve!: () => void;
@@ -54,7 +54,7 @@ export class HtmlVar implements HtmlVarResult {
54
54
  }
55
55
 
56
56
  set value(value: HtmlVarValueProps) {
57
- this._value = value;
57
+ this._value = value || '';
58
58
  if (this._dirty) {
59
59
  return;
60
60
  }
@@ -6,8 +6,9 @@ const htmlEscapes: Record<string, string> = {
6
6
  '"': '&quot;',
7
7
  };
8
8
 
9
- export const encodeHtml = (str: string): string => {
10
- return str.replace(/[&<>'"]/g, (tag) => htmlEscapes[tag]);
9
+ export const encodeHtml = (str: any): string => {
10
+ if (str === null || str === undefined) return '';
11
+ return String(str).replace(/[&<>'"]/g, (tag) => htmlEscapes[tag]);
11
12
  };
12
13
 
13
14
  const htmlUnescapes: Record<string, string> = {
@@ -19,5 +20,6 @@ const htmlUnescapes: Record<string, string> = {
19
20
  };
20
21
 
21
22
  export const decodeHtml = (str: string): string => {
22
- return str.replace(/&(?:amp|lt|gt|quot|#39);/g, (tag) => htmlUnescapes[tag]);
23
+ if (str === null || str === undefined) return '';
24
+ return String(str).replace(/&(?:amp|lt|gt|quot|#39);/g, (tag) => htmlUnescapes[tag]);
23
25
  };