gd-bs 6.8.7 → 6.8.8

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.
@@ -64,14 +64,18 @@ var _Tooltip = /** @class */ (function (_super) {
64
64
  _this._floatingUI = null;
65
65
  // Configure the collapse
66
66
  _this.configure();
67
- // Configure the parent
68
- _this.configureParent();
69
67
  return _this;
70
68
  }
71
69
  // Configure the tooltip
72
70
  _Tooltip.prototype.configure = function () {
73
- // See if the target element was not defined
74
- if (this.props.target == null) {
71
+ // See if the target element was defined
72
+ if (this.props.target) {
73
+ // Update the element
74
+ this.el = this.props.target;
75
+ // Configure the options
76
+ this.configureOptions();
77
+ }
78
+ else {
75
79
  // See if the dropdown property exists
76
80
  if (this.props.ddlProps) {
77
81
  // Set the default properties
@@ -96,9 +100,11 @@ var _Tooltip = /** @class */ (function (_super) {
96
100
  // Update the element
97
101
  this.el = this._btn.el;
98
102
  }
103
+ // Configure the options
104
+ this.configureOptions();
105
+ // Configure the parent
106
+ this.configureParent();
99
107
  }
100
- // Configure the options
101
- this.configureOptions();
102
108
  };
103
109
  // Configure the options
104
110
  _Tooltip.prototype.configureOptions = function () {
@@ -152,61 +158,61 @@ var _Tooltip = /** @class */ (function (_super) {
152
158
  default:
153
159
  // Set the default theme
154
160
  theme = "secondary";
155
- // See if a button/dropdown exists
156
- var objType = this.props.btnProps && this.props.btnProps.type > 0 ? this.props.btnProps.type : null;
157
- objType = this.props.ddlProps && this.props.ddlProps.type > 0 ? this.props.ddlProps.type : objType;
158
- if (objType > 0) {
159
- // Match the theme to the button/dropdown type
160
- switch (objType) {
161
- // Danger
162
- case button_1.ButtonTypes.Danger:
163
- case button_1.ButtonTypes.OutlineDanger:
164
- theme = "danger";
165
- break;
166
- // Dark
167
- case button_1.ButtonTypes.Dark:
168
- case button_1.ButtonTypes.OutlineDark:
169
- theme = "dark";
170
- break;
171
- // Info
172
- case button_1.ButtonTypes.Info:
173
- case button_1.ButtonTypes.OutlineInfo:
174
- theme = "info";
175
- break;
176
- // Light
177
- case button_1.ButtonTypes.Light:
178
- case button_1.ButtonTypes.OutlineLight:
179
- theme = "light";
180
- break;
181
- // Link
182
- case button_1.ButtonTypes.Link:
183
- case button_1.ButtonTypes.OutlineLink:
184
- theme = "light-border";
185
- break;
186
- // Primary
187
- case button_1.ButtonTypes.Primary:
188
- case button_1.ButtonTypes.OutlinePrimary:
189
- theme = "primary";
190
- break;
191
- // Secondary
192
- case button_1.ButtonTypes.Secondary:
193
- case button_1.ButtonTypes.OutlineSecondary:
194
- theme = "secondary";
195
- break;
196
- // Success
197
- case button_1.ButtonTypes.Success:
198
- case button_1.ButtonTypes.OutlineSuccess:
199
- theme = "success";
200
- break;
201
- // Warning
202
- case button_1.ButtonTypes.Warning:
203
- case button_1.ButtonTypes.OutlineWarning:
204
- theme = "warning";
205
- break;
206
- }
207
- }
208
161
  break;
209
162
  }
163
+ // See if a button/dropdown exists
164
+ var objType = this.props.btnProps && this.props.btnProps.type > 0 ? this.props.btnProps.type : null;
165
+ objType = this.props.ddlProps && this.props.ddlProps.type > 0 ? this.props.ddlProps.type : objType;
166
+ if (objType > 0) {
167
+ // Match the theme to the button/dropdown type
168
+ switch (objType) {
169
+ // Danger
170
+ case button_1.ButtonTypes.Danger:
171
+ case button_1.ButtonTypes.OutlineDanger:
172
+ theme = "danger";
173
+ break;
174
+ // Dark
175
+ case button_1.ButtonTypes.Dark:
176
+ case button_1.ButtonTypes.OutlineDark:
177
+ theme = "dark";
178
+ break;
179
+ // Info
180
+ case button_1.ButtonTypes.Info:
181
+ case button_1.ButtonTypes.OutlineInfo:
182
+ theme = "info";
183
+ break;
184
+ // Light
185
+ case button_1.ButtonTypes.Light:
186
+ case button_1.ButtonTypes.OutlineLight:
187
+ theme = "light";
188
+ break;
189
+ // Link
190
+ case button_1.ButtonTypes.Link:
191
+ case button_1.ButtonTypes.OutlineLink:
192
+ theme = "light-border";
193
+ break;
194
+ // Primary
195
+ case button_1.ButtonTypes.Primary:
196
+ case button_1.ButtonTypes.OutlinePrimary:
197
+ theme = "primary";
198
+ break;
199
+ // Secondary
200
+ case button_1.ButtonTypes.Secondary:
201
+ case button_1.ButtonTypes.OutlineSecondary:
202
+ theme = "secondary";
203
+ break;
204
+ // Success
205
+ case button_1.ButtonTypes.Success:
206
+ case button_1.ButtonTypes.OutlineSuccess:
207
+ theme = "success";
208
+ break;
209
+ // Warning
210
+ case button_1.ButtonTypes.Warning:
211
+ case button_1.ButtonTypes.OutlineWarning:
212
+ theme = "warning";
213
+ break;
214
+ }
215
+ }
210
216
  // Set the tooltip content element
211
217
  if (typeof (this.props.content) === "string") {
212
218
  this._elContent = document.createElement("div");
@@ -220,29 +226,6 @@ var _Tooltip = /** @class */ (function (_super) {
220
226
  }
221
227
  // Set the padding
222
228
  this._elContent.classList.add("p-2");
223
- // Set the on create event
224
- /*
225
- options["onCreate"] = (tippyObj) => {
226
- // Get the content element
227
- let elContent = tippyObj.popper.querySelector(".tippy-content") as HTMLElement;
228
- if (elContent) {
229
- // Set the class
230
- elContent.classList.add("bs");
231
-
232
- // Get the custom class name(s)
233
- let custom = (this.props.className || "").trim().split(" ");
234
- for (let i = 0; i < custom.length; i++) {
235
- let className = custom[i];
236
-
237
- // Add the custom class name
238
- className ? elContent.classList.add(custom[i]) : null;
239
- }
240
- }
241
-
242
- // Call the custom event if it's defined
243
- this.props.options && this.props.options.onCreate ? this.props.options.onCreate(tippyObj) : null;
244
- }
245
- */
246
229
  // Create the floating ui
247
230
  this._floatingUI = (0, floating_ui_1.FloatingUI)({
248
231
  className: "floating-tooltip",