gd-bs 6.6.86 → 6.6.88

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.
@@ -124,6 +124,7 @@ var FormControl = /** @class */ (function () {
124
124
  case _1.FormControlTypes.ColorPicker:
125
125
  // Add the input
126
126
  this._tb = (0, inputGroup_1.InputGroup)({
127
+ appendedDropdown: this.props.appendedDropdown,
127
128
  appendedLabel: this.props.appendedLabel,
128
129
  className: className,
129
130
  id: this._props.id,
@@ -131,6 +132,7 @@ var FormControl = /** @class */ (function () {
131
132
  isReadonly: this._props.isReadonly,
132
133
  onChange: this._props.onChange,
133
134
  placeholder: this._props.placeholder,
135
+ prependedDropdown: this.props.prependedDropdown,
134
136
  prependedLabel: this.props.prependedLabel,
135
137
  required: this._props.required,
136
138
  title: this._props.title,
@@ -211,6 +213,7 @@ var FormControl = /** @class */ (function () {
211
213
  case _1.FormControlTypes.Email:
212
214
  // Add the input
213
215
  this._tb = (0, inputGroup_1.InputGroup)({
216
+ appendedDropdown: this.props.appendedDropdown,
214
217
  appendedLabel: this.props.appendedLabel,
215
218
  className: className,
216
219
  id: this._props.id,
@@ -218,6 +221,7 @@ var FormControl = /** @class */ (function () {
218
221
  isReadonly: this._props.isReadonly,
219
222
  onChange: this._props.onChange,
220
223
  placeholder: this._props.placeholder,
224
+ prependedDropdown: this.props.prependedDropdown,
221
225
  prependedLabel: this.props.prependedLabel,
222
226
  required: this._props.required,
223
227
  title: this._props.title,
@@ -229,6 +233,7 @@ var FormControl = /** @class */ (function () {
229
233
  case _1.FormControlTypes.File:
230
234
  // Add the input
231
235
  this._tb = (0, inputGroup_1.InputGroup)({
236
+ appendedDropdown: this.props.appendedDropdown,
232
237
  appendedLabel: this.props.appendedLabel,
233
238
  className: className,
234
239
  id: this._props.id,
@@ -236,6 +241,7 @@ var FormControl = /** @class */ (function () {
236
241
  isReadonly: this._props.isReadonly,
237
242
  onChange: this._props.onChange,
238
243
  placeholder: this._props.placeholder,
244
+ prependedDropdown: this.props.prependedDropdown,
239
245
  prependedLabel: this.props.prependedLabel,
240
246
  required: this._props.required,
241
247
  title: this._props.title,
@@ -387,6 +393,7 @@ var FormControl = /** @class */ (function () {
387
393
  case _1.FormControlTypes.Password:
388
394
  // Add the input
389
395
  this._tb = (0, inputGroup_1.InputGroup)({
396
+ appendedDropdown: this.props.appendedDropdown,
390
397
  appendedLabel: this.props.appendedLabel,
391
398
  className: className,
392
399
  id: this._props.id,
@@ -394,6 +401,7 @@ var FormControl = /** @class */ (function () {
394
401
  isReadonly: this._props.isReadonly,
395
402
  onChange: this._props.onChange,
396
403
  placeholder: this._props.placeholder,
404
+ prependedDropdown: this.props.prependedDropdown,
397
405
  prependedLabel: this.props.prependedLabel,
398
406
  required: this._props.required,
399
407
  title: this._props.title,
@@ -442,6 +450,7 @@ var FormControl = /** @class */ (function () {
442
450
  case _1.FormControlTypes.Readonly:
443
451
  // Add the input
444
452
  this._tb = (0, inputGroup_1.InputGroup)({
453
+ appendedDropdown: this.props.appendedDropdown,
445
454
  appendedLabel: this.props.appendedLabel,
446
455
  className: className,
447
456
  id: this._props.id,
@@ -449,6 +458,7 @@ var FormControl = /** @class */ (function () {
449
458
  isReadonly: true,
450
459
  onChange: this._props.onChange,
451
460
  placeholder: this._props.placeholder,
461
+ prependedDropdown: this.props.prependedDropdown,
452
462
  prependedLabel: this.props.prependedLabel,
453
463
  required: this._props.required,
454
464
  title: this._props.title,
@@ -478,6 +488,7 @@ var FormControl = /** @class */ (function () {
478
488
  case _1.FormControlTypes.TextArea:
479
489
  // Add the input
480
490
  this._tb = (0, inputGroup_1.InputGroup)({
491
+ appendedDropdown: this.props.appendedDropdown,
481
492
  appendedLabel: this.props.appendedLabel,
482
493
  className: className,
483
494
  id: this._props.id,
@@ -485,6 +496,7 @@ var FormControl = /** @class */ (function () {
485
496
  isReadonly: this._props.isReadonly,
486
497
  onChange: this._props.onChange,
487
498
  placeholder: this._props.placeholder,
499
+ prependedDropdown: this.props.prependedDropdown,
488
500
  prependedLabel: this.props.prependedLabel,
489
501
  required: this._props.required,
490
502
  rows: this._props.rows,
@@ -497,6 +509,7 @@ var FormControl = /** @class */ (function () {
497
509
  case _1.FormControlTypes.TextField:
498
510
  // Add the input
499
511
  this._tb = (0, inputGroup_1.InputGroup)({
512
+ appendedDropdown: this.props.appendedDropdown,
500
513
  appendedLabel: this.props.appendedLabel,
501
514
  className: className,
502
515
  id: this._props.id,
@@ -504,6 +517,7 @@ var FormControl = /** @class */ (function () {
504
517
  isReadonly: this._props.isReadonly,
505
518
  onChange: this._props.onChange,
506
519
  placeholder: this._props.placeholder,
520
+ prependedDropdown: this.props.prependedDropdown,
507
521
  prependedLabel: this.props.prependedLabel,
508
522
  required: this._props.required,
509
523
  title: this._props.title,
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.InputGroup = exports.InputGroupTypes = void 0;
19
19
  var base_1 = require("../base");
20
20
  var button_1 = require("../button");
21
+ var dropdown_1 = require("../dropdown");
21
22
  var templates_1 = require("./templates");
22
23
  /**
23
24
  * Input Group Types
@@ -43,6 +44,8 @@ var _InputGroup = /** @class */ (function (_super) {
43
44
  function _InputGroup(props, template) {
44
45
  if (template === void 0) { template = templates_1.HTML; }
45
46
  var _this = _super.call(this, template, props) || this;
47
+ _this._ddlAppended = null;
48
+ _this._ddlPrepended = null;
46
49
  _this._fileValue = null;
47
50
  _this._initFl = false;
48
51
  // Configure the collapse
@@ -91,6 +94,12 @@ var _InputGroup = /** @class */ (function (_super) {
91
94
  // Add the button
92
95
  this.el.insertBefore((0, button_1.Button)(buttons[i]).el, elInput);
93
96
  }
97
+ // See if there is a dropdown
98
+ if (this.props.prependedDropdown) {
99
+ // Add the dropdown
100
+ this._ddlPrepended = (0, dropdown_1.Dropdown)(this.props.prependedDropdown);
101
+ this.el.insertBefore(this._ddlPrepended.el, elInput);
102
+ }
94
103
  // Default the appended buttons
95
104
  var appendedButtons = this.props.appendedButtons || [];
96
105
  if (this.props.type == InputGroupTypes.Range) {
@@ -113,6 +122,12 @@ var _InputGroup = /** @class */ (function (_super) {
113
122
  // Add the button
114
123
  this.el.appendChild((0, button_1.Button)(appendedButtons[i]).el);
115
124
  }
125
+ // See if there is a dropdown
126
+ if (this.props.appendedDropdown) {
127
+ // Add the dropdown
128
+ this._ddlAppended = (0, dropdown_1.Dropdown)(this.props.appendedDropdown);
129
+ this.el.appendChild(this._ddlAppended.el);
130
+ }
116
131
  }
117
132
  };
118
133
  // Configure the events
@@ -273,11 +288,60 @@ var _InputGroup = /** @class */ (function (_super) {
273
288
  // Set the default value
274
289
  this.setValue(this.props.value);
275
290
  };
276
- /**
277
- * Public Interface
278
- */
291
+ Object.defineProperty(_InputGroup.prototype, "appendedDropdown", {
292
+ /**
293
+ * Public Interface
294
+ */
295
+ get: function () { return this._ddlAppended; },
296
+ enumerable: false,
297
+ configurable: true
298
+ });
279
299
  _InputGroup.prototype.getFileInfo = function () { return this._fileValue; };
280
- _InputGroup.prototype.getValue = function () { return this.elTextbox.value; };
300
+ _InputGroup.prototype.getValue = function () {
301
+ var _a, _b;
302
+ var value = "";
303
+ // See if a prepended dropdown exist
304
+ if (this._ddlPrepended) {
305
+ // See if this is a multi item
306
+ if (this.props.prependedDropdown.multi) {
307
+ // Set the value
308
+ var items = this._ddlPrepended.getValue();
309
+ for (var i = 0; i < items.length; i++) {
310
+ // Add the value
311
+ value += items[i].value;
312
+ }
313
+ }
314
+ else {
315
+ // Set the value
316
+ value += (_a = this._ddlPrepended.getValue()) === null || _a === void 0 ? void 0 : _a.value;
317
+ }
318
+ }
319
+ // Append the input value
320
+ value += this.elTextbox.value;
321
+ // See if a appended dropdown exist
322
+ if (this._ddlAppended) {
323
+ // See if this is a multi item
324
+ if (this.props.appendedDropdown.multi) {
325
+ // Set the value
326
+ var items = this._ddlAppended.getValue();
327
+ for (var i = 0; i < items.length; i++) {
328
+ // Add the value
329
+ value += items[i].value;
330
+ }
331
+ }
332
+ else {
333
+ // Set the value
334
+ value += (_b = this._ddlAppended.getValue()) === null || _b === void 0 ? void 0 : _b.value;
335
+ }
336
+ }
337
+ // Return the value
338
+ return value;
339
+ };
340
+ Object.defineProperty(_InputGroup.prototype, "prependedDropdown", {
341
+ get: function () { return this._ddlPrepended; },
342
+ enumerable: false,
343
+ configurable: true
344
+ });
281
345
  // Sets the textbox value
282
346
  _InputGroup.prototype.setValue = function (value) {
283
347
  if (value === void 0) { value = ""; }