gd-bs 6.6.24 → 6.6.26

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/generateIcons.js CHANGED
@@ -137,7 +137,7 @@ fs.readdir(dirIcons, function (err, files) {
137
137
  '// Generates the html for an icon',
138
138
  'export const generateIcon = (svg: string, height: number = 32, width: number = 32, className?: string, placeholders?: number) => {',
139
139
  '\t// See if placeholders exist',
140
- '\tif (placeholders > 0) {',
140
+ '\tif (typeof(placeholders) === "number" && placeholders > 0) {',
141
141
  '\t\t// Parse the number of placeholders',
142
142
  '\t\tfor (let i = 0; i < placeholders; i++) {',
143
143
  '\t\t\tlet regex = new RegExp("\\\\{" + i + "\\\\}", "g");\n',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.24",
3
+ "version": "6.6.26",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -306,6 +306,9 @@ class _Offcanvas extends Base<IOffcanvasProps> implements IOffcanvas {
306
306
 
307
307
  // Set the flag
308
308
  this._tranisitioningFl = false;
309
+
310
+ // Call the event
311
+ this.props.onClose ? this.props.onClose(this.el) : null;
309
312
  }, 250);
310
313
  } else {
311
314
  // Create the backdrop if we are showing it
@@ -113,6 +113,7 @@ export interface IOffcanvasProps<T = HTMLElement> extends IBaseProps<IOffcanvas>
113
113
  body?: string | T;
114
114
  data?: any;
115
115
  id?: string;
116
+ onClose?: (el: HTMLDivElement) => void;
116
117
  onRenderBody?: (el?: HTMLDivElement, props?: IOffcanvasProps) => void;
117
118
  onRenderHeader?: (el?: HTMLDivElement, props?: IOffcanvasProps) => void;
118
119
  options?: IOffcanvasOptions;
@@ -1,7 +1,7 @@
1
1
  // Generates the html for an icon
2
2
  export const generateIcon = (svg: string, height: number = 32, width: number = 32, className?: string, placeholders?: number) => {
3
3
  // See if placeholders exist
4
- if (placeholders > 0) {
4
+ if (typeof(placeholders) === "number" && placeholders > 0) {
5
5
  // Parse the number of placeholders
6
6
  for (let i = 0; i < placeholders; i++) {
7
7
  let regex = new RegExp("\\{" + i + "\\}", "g");