gd-bs 6.6.92 → 6.6.93

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/indexv2.html CHANGED
@@ -212,7 +212,7 @@
212
212
  <bs-form-control label="Last Name:" type="GD.Components.FormControlTypes.TextField"></bs-form-control>
213
213
  </row>
214
214
  <row>
215
- <bs-form-control label="Items:" type="GD.Components.FormControlTypes.Dropdown">
215
+ <bs-form-control label="Items:" type="GD.Components.FormControlTypes.Dropdown" value="4">
216
216
  <item value="1">Item 1</item>
217
217
  <item value="2">Item 2</item>
218
218
  <item value="3">Item 3</item>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.92",
3
+ "version": "6.6.93",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -65,23 +65,19 @@ export class CustomElement {
65
65
  switch (elChild.nodeName) {
66
66
  // Append the control
67
67
  case "BS-FORM-CONTROL":
68
- //controls.push((new RenderComponents(elChild, true, true)).Props[0]);
68
+ controls.push(this.getProps(elChild, "FORM-CONTROL"));
69
69
  break;
70
70
 
71
71
  // Append the row
72
72
  case "ROW":
73
+ // Get the controls
73
74
  let columns = [];
74
- /*
75
- let rowControls = (new RenderComponents(elChild, true)).Props;
76
- if (rowControls?.length > 0) {
75
+ this.getChildItems(elChild, "bs-form-control", "FORM-CONTROL").forEach(control => {
77
76
  // Append the control
78
- for (let i = 0; i < rowControls.length; i++) {
79
- columns.push({ control: rowControls[i] });
80
- }
81
- }
82
- */
77
+ columns.push({ control });
78
+ });
83
79
 
84
- // Append the row
80
+ // Append the columns to the row
85
81
  rows.push({ columns });
86
82
  break;
87
83
 
@@ -110,7 +106,7 @@ export class CustomElement {
110
106
  props.rows = rows.length > 0 ? rows : undefined;
111
107
 
112
108
  // Set the controls
113
- //props.controls = this.getChildItems(el, "bs-form-control", componentName);
109
+ props.controls = this.getChildItems(el, "bs-form-control", componentName);
114
110
  props.controls = controls.length > 0 ? controls : undefined;
115
111
 
116
112
  // Render the form
@@ -296,9 +292,15 @@ export class CustomElement {
296
292
  case "BS-COL":
297
293
  item.title = (item.title || elItem.innerHTML)?.trim();
298
294
  break;
295
+ case "BS-FORM-CONTROL":
296
+ item.items = this.getChildItems(elItem, "item", elItem.nodeName);
297
+ break;
299
298
  case "CARD-BODY":
300
299
  item.actions = this.getChildItems(elItem, "card-action", elItem.nodeName);
301
300
  break;
301
+ case "ITEM":
302
+ item.text = (item.text || elItem.innerHTML)?.trim();
303
+ break;
302
304
  case "NAVBAR-ITEM":
303
305
  item.items = this.getChildItems(elItem, "navbar-item", componentName);
304
306
  item.text = (item.text || elItem.innerHTML)?.trim();
@@ -171,12 +171,12 @@ class _FloatingUI {
171
171
 
172
172
  // See if we are adding the offset option
173
173
  if (this._props.options?.offset) {
174
- middleware.push(offset(this._props.options.offset));
174
+ middleware.push(typeof (this._props.options.offset) === "boolean" ? offset() : offset(this._props.options.offset));
175
175
  }
176
176
 
177
177
  // See if we are adding the auto placement option
178
178
  if (this._props.options?.autoPlacement || placement.autoPlacement) {
179
- middleware.push(autoPlacement(this._props.options.autoPlacement));
179
+ middleware.push(typeof (this._props.options.autoPlacement) === "boolean" ? autoPlacement() : autoPlacement(this._props.options.autoPlacement));
180
180
  }
181
181
  // Else, see if we are adding the flip option
182
182
  else if (this._props.options?.flip) {
@@ -185,22 +185,22 @@ class _FloatingUI {
185
185
 
186
186
  // See if we are adding the hide option
187
187
  if (this._props.options?.hide) {
188
- middleware.push(hide(this._props.options.hide));
188
+ middleware.push(typeof (this._props.options.hide) === "boolean" ? hide() : hide(this._props.options.hide));
189
189
  }
190
190
 
191
191
  // See if we are adding the inline option
192
192
  if (this._props.options?.inline) {
193
- middleware.push(inline(this._props.options.inline));
193
+ middleware.push(typeof (this._props.options.inline) === "boolean" ? inline() : inline(this._props.options.inline));
194
194
  }
195
195
 
196
196
  // See if we are adding the shift option
197
197
  if (this._props.options?.shift) {
198
- middleware.push(shift(this._props.options?.shift));
198
+ middleware.push(typeof (this._props.options.shift) === "boolean" ? shift() : shift(this._props.options?.shift));
199
199
  }
200
200
 
201
201
  // See if we are adding the size option
202
202
  if (this._props.options?.size) {
203
- middleware.push(size(this._props.options?.size));
203
+ middleware.push(typeof (this._props.options.size) === "boolean" ? size() : size(this._props.options?.size));
204
204
  }
205
205
 
206
206
  // Return the middle ware
@@ -349,7 +349,7 @@ class _FloatingUI {
349
349
  right: 'left',
350
350
  bottom: 'top',
351
351
  left: 'right'
352
- }[middlewareData.offset?.placement || this._options.placement.split('-')[0]]
352
+ }[(middlewareData.offset?.placement || this._options.placement).split('-')[0]]
353
353
 
354
354
  // Update the location
355
355
  Object.assign(this._elArrow.style, {
@@ -161,11 +161,11 @@ export interface IFormProps extends IBaseProps<IForm> {
161
161
  controls?: Array<IFormControlProps>;
162
162
  groupClassName?: string;
163
163
  isFloating?: boolean;
164
- rowClassName?: string;
165
- rows?: Array<IFormRow>;
166
164
  onControlRendering?: (control: IFormControlProps) => void | PromiseLike<IFormControlProps>;
167
165
  onControlRendered?: (control: IFormControl) => void | PromiseLike<IFormControl>;
168
166
  onRendered?: (controls: Array<IFormControl>) => void;
167
+ rowClassName?: string;
168
+ rows?: Array<IFormRow>;
169
169
  validationType?: number;
170
170
  value?: any;
171
171
  }
@@ -8,14 +8,13 @@ import "./ie";
8
8
  import * as Components from "./components";
9
9
  export { Components }
10
10
 
11
- // Render method
12
- import { render } from "./render";
13
- export { render };
14
-
15
11
  // Icons
16
12
  import { Icons, IconTypes } from "./icons";
17
13
  export { Icons, IconTypes }
18
14
 
19
15
  // Bootstrap Global library
20
- const BS = { Components, Icons, IconTypes, render }
21
- window["GD"] = window["GD"] || BS;
16
+ const BS = { Components, Icons, IconTypes }
17
+ window["GD"] = window["GD"] || BS;
18
+
19
+ // Custom Elements
20
+ import "./custom-elements.js";
package/src/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as Components from "./components/components";
2
- declare var render: (el: HTMLElement) => void;
3
2
 
4
3
  export {
5
- Components, render
4
+ Components
6
5
  }
package/src/index.ts CHANGED
@@ -8,10 +8,9 @@ import "./ie";
8
8
  import * as Components from "./components";
9
9
  export { Components }
10
10
 
11
- // Render method
12
- import { render } from "./render";
13
- export { render };
14
-
15
11
  // Bootstrap Global library
16
- const BS = { Components, render }
17
- window["GD"] = window["GD"] || BS;
12
+ const BS = { Components }
13
+ window["GD"] = window["GD"] || BS;
14
+
15
+ // Custom Elements
16
+ import "./custom-elements.js";