@zeedhi/common 1.40.0 → 1.41.0

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.
@@ -1,7 +1,7 @@
1
1
  import { AccessorManager, Event, KeyMap, Metadata, FormatterParserProvider, Validation, Accessor, DatasourceFactory, I18n, MethodNotAssignedError, Loader, Mask, Config, dayjs, isEqual, Router, InstanceNotFoundError, Http, Cookie, normalize, URL as URL$1 } from '@zeedhi/core';
2
+ import merge from 'lodash.merge';
2
3
  import debounce from 'lodash.debounce';
3
4
  import isUndefined from 'lodash.isundefined';
4
- import merge from 'lodash.merge';
5
5
  import set from 'lodash.set';
6
6
 
7
7
  /**
@@ -424,8 +424,23 @@ class ApexChart extends ComponentRender {
424
424
  * Defines the load progress color
425
425
  */
426
426
  this.loadColor = 'primary';
427
+ this.defaultOptions = {
428
+ chart: {
429
+ toolbar: {
430
+ tools: {
431
+ download: 'fileDownload',
432
+ selection: 'zoomSelection',
433
+ zoom: 'zoom',
434
+ zoomin: 'zoomIn',
435
+ zoomout: 'zoomOut',
436
+ pan: 'zoomPanning',
437
+ reset: 'zoomReset',
438
+ },
439
+ },
440
+ },
441
+ };
427
442
  this.chartType = this.getInitValue('chartType', props.chartType, this.chartType);
428
- this.options = this.getInitValue('options', props.options, this.options);
443
+ this.options = merge(this.defaultOptions, this.getInitValue('options', props.options, this.options));
429
444
  this.series = this.getInitValue('series', props.series, this.series);
430
445
  this.height = this.getInitValue('height', props.height, this.height);
431
446
  this.width = this.getInitValue('width', props.width, this.width);
@@ -442,6 +457,14 @@ class ApexChart extends ComponentRender {
442
457
  setViewUpdate(viewUpdate) {
443
458
  this.viewUpdate = viewUpdate;
444
459
  }
460
+ /**
461
+ * Sets view get icon HTML method.
462
+ * @param viewGetIconHTML Update method
463
+ */
464
+ setViewGetIconHTML(viewGetIconHTML) {
465
+ this.viewGetIconHTML = viewGetIconHTML;
466
+ this.updateToolbarIcons();
467
+ }
445
468
  /**
446
469
  * Update the chart
447
470
  * @param options New options
@@ -456,6 +479,32 @@ class ApexChart extends ComponentRender {
456
479
  }
457
480
  return Promise.resolve();
458
481
  }
482
+ updateToolbarIcons() {
483
+ var _a, _b, _c;
484
+ if (!this.viewGetIconHTML)
485
+ return this.options;
486
+ const getIconFn = this.viewGetIconHTML;
487
+ let changed = false;
488
+ const newOptions = Object.assign({}, this.options);
489
+ if ((_b = (_a = newOptions.chart) === null || _a === void 0 ? void 0 : _a.toolbar) === null || _b === void 0 ? void 0 : _b.tools) {
490
+ const { tools } = newOptions.chart.toolbar;
491
+ Object.keys(tools).forEach((key) => {
492
+ if (typeof tools[key] === 'string') {
493
+ tools[key] = getIconFn(tools[key]);
494
+ changed = true;
495
+ }
496
+ });
497
+ if ((_c = tools.customIcons) === null || _c === void 0 ? void 0 : _c.length) {
498
+ tools.customIcons.forEach((item) => {
499
+ item.icon = getIconFn(item.icon);
500
+ });
501
+ }
502
+ }
503
+ if (this.viewUpdate && changed) {
504
+ this.viewUpdate(newOptions);
505
+ }
506
+ return newOptions;
507
+ }
459
508
  }
460
509
 
461
510
  /**
@@ -3278,10 +3327,6 @@ class DateRange extends TextInput {
3278
3327
  * Sets the locale. Accepts a string with a BCP 47 language tag.
3279
3328
  */
3280
3329
  this.locale = I18n.instance.language;
3281
- /**
3282
- * Defines if dates should be ordered
3283
- */
3284
- this.orderedDates = false;
3285
3330
  /**
3286
3331
  * Allows changing displayed month with mouse scroll
3287
3332
  */
@@ -3305,15 +3350,12 @@ class DateRange extends TextInput {
3305
3350
  this.appendIcon = this.getInitValue('appendIcon', props.appendIcon, 'calendar');
3306
3351
  this.autocomplete = this.getInitValue('autocomplete', props.autocomplete, this.autocomplete);
3307
3352
  this.dateFormat = this.getInitValue('dateFormat', props.dateFormat, this.dateFormat);
3308
- this.orderedDates = this.getInitValue('orderedDates', props.orderedDates, this.orderedDates);
3309
3353
  this.dateValidation = this.dateValidation.bind(this);
3310
- this.dateValidateOrder = this.dateValidateOrder.bind(this);
3311
3354
  this.displayFormat = this.getInitValue('displayFormat', props.displayFormat, this.displayFormat);
3312
3355
  this.inputFormat = this.getInitValue('inputFormat', props.inputFormat, this.inputFormat);
3313
3356
  this.firstDayOfWeek = this.getInitValue('firstDayOfWeek', props.firstDayOfWeek, this.firstDayOfWeek);
3314
3357
  this.fullWidth = this.getInitValue('fullWidth', props.fullWidth, this.fullWidth);
3315
3358
  this.locale = this.getInitValue('locale', props.locale, this.locale);
3316
- this.rules.push(this.dateValidation, this.dateValidateOrder);
3317
3359
  this.scrollable = this.getInitValue('scrollable', props.scrollable, this.scrollable);
3318
3360
  this.showDatePicker = this.getInitValue('showDatePicker', props.showDatePicker, this.showDatePicker);
3319
3361
  this.showWeek = this.getInitValue('showWeek', props.showWeek, this.showWeek);
@@ -3430,13 +3472,13 @@ class DateRange extends TextInput {
3430
3472
  splitedValue = dates;
3431
3473
  else
3432
3474
  splitedValue = this.splitValues(dates);
3433
- const formatedValue = [];
3475
+ const formattedValue = [];
3434
3476
  splitedValue.forEach((value) => {
3435
3477
  if (value && this.isValidDate(value, this.dateFormat)) {
3436
- formatedValue.push(dayjs(value, this.dateFormat, true).format(this.isoFormat));
3478
+ formattedValue.push(dayjs(value, this.dateFormat, true).format(this.isoFormat));
3437
3479
  }
3438
3480
  });
3439
- return formatedValue;
3481
+ return formattedValue;
3440
3482
  }
3441
3483
  parseISODateRangeValue(values) {
3442
3484
  const parsedValue = [];
@@ -3447,19 +3489,14 @@ class DateRange extends TextInput {
3447
3489
  }
3448
3490
  });
3449
3491
  }
3450
- return parsedValue;
3492
+ return this.sortDates(parsedValue);
3493
+ }
3494
+ sortDates(parsedValue) {
3495
+ return parsedValue.sort((a, b) => (dayjs(a, this.dateFormat).isAfter(dayjs(b, this.dateFormat)) ? 1 : -1));
3451
3496
  }
3452
3497
  dateValidation() {
3453
3498
  return !this.dateError || I18n.translate('VALIDATION_INVALID_DATE');
3454
3499
  }
3455
- dateValidateOrder() {
3456
- if (this.value && (this.value.length === 2 && this.orderedDates)) {
3457
- const date1 = dayjs(this.value[0], this.dateFormat);
3458
- const date2 = dayjs(this.value[1], this.dateFormat);
3459
- return (date1.isBefore(date2) || date1.isSame(date2)) || I18n.translate('VALIDATION_INVALID_ORDER_DATE');
3460
- }
3461
- return true;
3462
- }
3463
3500
  click(event, element) {
3464
3501
  super.click(event, element);
3465
3502
  if (!event.defaultPrevented) {
@@ -3467,6 +3504,7 @@ class DateRange extends TextInput {
3467
3504
  }
3468
3505
  }
3469
3506
  blur(event, element) {
3507
+ this.value = this.sortDates(this.value);
3470
3508
  this.removeDateMask();
3471
3509
  this.setDateValue(this.displayValue);
3472
3510
  super.blur(event, element);
@@ -3995,6 +4033,12 @@ class Frame extends ComponentRender {
3995
4033
  }
3996
4034
  });
3997
4035
  }
4036
+ reload() {
4037
+ return __awaiter(this, void 0, void 0, function* () {
4038
+ this.loading = true;
4039
+ this.getMetadata();
4040
+ });
4041
+ }
3998
4042
  notFoundError() { }
3999
4043
  requestPage() {
4000
4044
  return __awaiter(this, void 0, void 0, function* () {
@@ -4877,6 +4921,7 @@ class Grid extends Iterable {
4877
4921
  var _a, _b, _c;
4878
4922
  const rowKey = row[this.datasource.uniqueKey];
4879
4923
  const compName = actionComponent.name;
4924
+ const instanceName = `${compName}_${rowKey}`;
4880
4925
  const path = parentPath ? `${parentPath}.${compName}` : compName;
4881
4926
  const newComponent = merge({}, actionComponent, (_b = (_a = this.actionsApplied[rowKey]) === null || _a === void 0 ? void 0 : _a[column.name]) === null || _b === void 0 ? void 0 : _b[path]);
4882
4927
  let compEvents = {};
@@ -4891,7 +4936,16 @@ class Grid extends Iterable {
4891
4936
  }
4892
4937
  } });
4893
4938
  const newChildren = (_c = newComponent.children) === null || _c === void 0 ? void 0 : _c.map((child) => this.getActionComponent(child, column, row, path));
4894
- return Object.assign(Object.assign({}, newComponent), { events: newEvents, name: `${compName}_${rowKey}`, children: newChildren });
4939
+ newComponent.name = instanceName;
4940
+ newComponent.children = newChildren;
4941
+ newComponent.events = newEvents;
4942
+ try {
4943
+ Metadata.updateInstance(instanceName, newComponent);
4944
+ }
4945
+ catch (e) {
4946
+ // do nothing
4947
+ }
4948
+ return newComponent;
4895
4949
  }
4896
4950
  changeDefaultSlotNames(slot) {
4897
4951
  slot.forEach((item) => {
@@ -10525,6 +10579,12 @@ Icons.mdiIcons = {
10525
10579
  tableColumns: 'mdi-table-headers-eye',
10526
10580
  unfold: 'mdi-unfold-more-horizontal',
10527
10581
  warning: 'mdi-exclamation',
10582
+ zoom: 'mdi-magnify-scan',
10583
+ zoomIn: 'mdi-plus-circle-outline',
10584
+ zoomPanning: 'mdi-hand-back-right-outline',
10585
+ zoomOut: 'mdi-minus-circle-outline',
10586
+ zoomReset: 'mdi-magnify-close',
10587
+ zoomSelection: 'mdi-magnify-scan',
10528
10588
  };
10529
10589
  Icons.faIcons = {
10530
10590
  alertOctagon: 'fa fa-exclamation-circle',
@@ -10575,6 +10635,12 @@ Icons.faIcons = {
10575
10635
  tableColumns: 'fa fa-columns',
10576
10636
  unfold: 'fa fa-sort',
10577
10637
  warning: 'fa fa-exclamation',
10638
+ zoom: 'fa fa-search',
10639
+ zoomIn: 'fa fa-search-plus',
10640
+ zoomPanning: 'fa fa-hand-paper',
10641
+ zoomOut: 'fa fa-search-minus',
10642
+ zoomReset: 'fa fa-undo',
10643
+ zoomSelection: 'fa fa-expand',
10578
10644
  };
10579
10645
  Icons.icons = (() => Icons.mdiIcons)();
10580
10646
 
@@ -1,14 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@zeedhi/core'), require('lodash.debounce'), require('lodash.isundefined'), require('lodash.merge'), require('lodash.set')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@zeedhi/core', 'lodash.debounce', 'lodash.isundefined', 'lodash.merge', 'lodash.set'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/common"] = {}, global.core, global.debounce, global.isUndefined, global.merge, global.set));
5
- })(this, (function (exports, core, debounce, isUndefined, merge, set) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@zeedhi/core'), require('lodash.merge'), require('lodash.debounce'), require('lodash.isundefined'), require('lodash.set')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@zeedhi/core', 'lodash.merge', 'lodash.debounce', 'lodash.isundefined', 'lodash.set'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/common"] = {}, global.core, global.merge, global.debounce, global.isUndefined, global.set));
5
+ })(this, (function (exports, core, merge, debounce, isUndefined, set) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
+ var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge);
9
10
  var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
10
11
  var isUndefined__default = /*#__PURE__*/_interopDefaultLegacy(isUndefined);
11
- var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge);
12
12
  var set__default = /*#__PURE__*/_interopDefaultLegacy(set);
13
13
 
14
14
  /**
@@ -431,8 +431,23 @@
431
431
  * Defines the load progress color
432
432
  */
433
433
  this.loadColor = 'primary';
434
+ this.defaultOptions = {
435
+ chart: {
436
+ toolbar: {
437
+ tools: {
438
+ download: 'fileDownload',
439
+ selection: 'zoomSelection',
440
+ zoom: 'zoom',
441
+ zoomin: 'zoomIn',
442
+ zoomout: 'zoomOut',
443
+ pan: 'zoomPanning',
444
+ reset: 'zoomReset',
445
+ },
446
+ },
447
+ },
448
+ };
434
449
  this.chartType = this.getInitValue('chartType', props.chartType, this.chartType);
435
- this.options = this.getInitValue('options', props.options, this.options);
450
+ this.options = merge__default["default"](this.defaultOptions, this.getInitValue('options', props.options, this.options));
436
451
  this.series = this.getInitValue('series', props.series, this.series);
437
452
  this.height = this.getInitValue('height', props.height, this.height);
438
453
  this.width = this.getInitValue('width', props.width, this.width);
@@ -449,6 +464,14 @@
449
464
  setViewUpdate(viewUpdate) {
450
465
  this.viewUpdate = viewUpdate;
451
466
  }
467
+ /**
468
+ * Sets view get icon HTML method.
469
+ * @param viewGetIconHTML Update method
470
+ */
471
+ setViewGetIconHTML(viewGetIconHTML) {
472
+ this.viewGetIconHTML = viewGetIconHTML;
473
+ this.updateToolbarIcons();
474
+ }
452
475
  /**
453
476
  * Update the chart
454
477
  * @param options New options
@@ -463,6 +486,32 @@
463
486
  }
464
487
  return Promise.resolve();
465
488
  }
489
+ updateToolbarIcons() {
490
+ var _a, _b, _c;
491
+ if (!this.viewGetIconHTML)
492
+ return this.options;
493
+ const getIconFn = this.viewGetIconHTML;
494
+ let changed = false;
495
+ const newOptions = Object.assign({}, this.options);
496
+ if ((_b = (_a = newOptions.chart) === null || _a === void 0 ? void 0 : _a.toolbar) === null || _b === void 0 ? void 0 : _b.tools) {
497
+ const { tools } = newOptions.chart.toolbar;
498
+ Object.keys(tools).forEach((key) => {
499
+ if (typeof tools[key] === 'string') {
500
+ tools[key] = getIconFn(tools[key]);
501
+ changed = true;
502
+ }
503
+ });
504
+ if ((_c = tools.customIcons) === null || _c === void 0 ? void 0 : _c.length) {
505
+ tools.customIcons.forEach((item) => {
506
+ item.icon = getIconFn(item.icon);
507
+ });
508
+ }
509
+ }
510
+ if (this.viewUpdate && changed) {
511
+ this.viewUpdate(newOptions);
512
+ }
513
+ return newOptions;
514
+ }
466
515
  }
467
516
 
468
517
  /**
@@ -3285,10 +3334,6 @@
3285
3334
  * Sets the locale. Accepts a string with a BCP 47 language tag.
3286
3335
  */
3287
3336
  this.locale = core.I18n.instance.language;
3288
- /**
3289
- * Defines if dates should be ordered
3290
- */
3291
- this.orderedDates = false;
3292
3337
  /**
3293
3338
  * Allows changing displayed month with mouse scroll
3294
3339
  */
@@ -3312,15 +3357,12 @@
3312
3357
  this.appendIcon = this.getInitValue('appendIcon', props.appendIcon, 'calendar');
3313
3358
  this.autocomplete = this.getInitValue('autocomplete', props.autocomplete, this.autocomplete);
3314
3359
  this.dateFormat = this.getInitValue('dateFormat', props.dateFormat, this.dateFormat);
3315
- this.orderedDates = this.getInitValue('orderedDates', props.orderedDates, this.orderedDates);
3316
3360
  this.dateValidation = this.dateValidation.bind(this);
3317
- this.dateValidateOrder = this.dateValidateOrder.bind(this);
3318
3361
  this.displayFormat = this.getInitValue('displayFormat', props.displayFormat, this.displayFormat);
3319
3362
  this.inputFormat = this.getInitValue('inputFormat', props.inputFormat, this.inputFormat);
3320
3363
  this.firstDayOfWeek = this.getInitValue('firstDayOfWeek', props.firstDayOfWeek, this.firstDayOfWeek);
3321
3364
  this.fullWidth = this.getInitValue('fullWidth', props.fullWidth, this.fullWidth);
3322
3365
  this.locale = this.getInitValue('locale', props.locale, this.locale);
3323
- this.rules.push(this.dateValidation, this.dateValidateOrder);
3324
3366
  this.scrollable = this.getInitValue('scrollable', props.scrollable, this.scrollable);
3325
3367
  this.showDatePicker = this.getInitValue('showDatePicker', props.showDatePicker, this.showDatePicker);
3326
3368
  this.showWeek = this.getInitValue('showWeek', props.showWeek, this.showWeek);
@@ -3437,13 +3479,13 @@
3437
3479
  splitedValue = dates;
3438
3480
  else
3439
3481
  splitedValue = this.splitValues(dates);
3440
- const formatedValue = [];
3482
+ const formattedValue = [];
3441
3483
  splitedValue.forEach((value) => {
3442
3484
  if (value && this.isValidDate(value, this.dateFormat)) {
3443
- formatedValue.push(core.dayjs(value, this.dateFormat, true).format(this.isoFormat));
3485
+ formattedValue.push(core.dayjs(value, this.dateFormat, true).format(this.isoFormat));
3444
3486
  }
3445
3487
  });
3446
- return formatedValue;
3488
+ return formattedValue;
3447
3489
  }
3448
3490
  parseISODateRangeValue(values) {
3449
3491
  const parsedValue = [];
@@ -3454,19 +3496,14 @@
3454
3496
  }
3455
3497
  });
3456
3498
  }
3457
- return parsedValue;
3499
+ return this.sortDates(parsedValue);
3500
+ }
3501
+ sortDates(parsedValue) {
3502
+ return parsedValue.sort((a, b) => (core.dayjs(a, this.dateFormat).isAfter(core.dayjs(b, this.dateFormat)) ? 1 : -1));
3458
3503
  }
3459
3504
  dateValidation() {
3460
3505
  return !this.dateError || core.I18n.translate('VALIDATION_INVALID_DATE');
3461
3506
  }
3462
- dateValidateOrder() {
3463
- if (this.value && (this.value.length === 2 && this.orderedDates)) {
3464
- const date1 = core.dayjs(this.value[0], this.dateFormat);
3465
- const date2 = core.dayjs(this.value[1], this.dateFormat);
3466
- return (date1.isBefore(date2) || date1.isSame(date2)) || core.I18n.translate('VALIDATION_INVALID_ORDER_DATE');
3467
- }
3468
- return true;
3469
- }
3470
3507
  click(event, element) {
3471
3508
  super.click(event, element);
3472
3509
  if (!event.defaultPrevented) {
@@ -3474,6 +3511,7 @@
3474
3511
  }
3475
3512
  }
3476
3513
  blur(event, element) {
3514
+ this.value = this.sortDates(this.value);
3477
3515
  this.removeDateMask();
3478
3516
  this.setDateValue(this.displayValue);
3479
3517
  super.blur(event, element);
@@ -4002,6 +4040,12 @@
4002
4040
  }
4003
4041
  });
4004
4042
  }
4043
+ reload() {
4044
+ return __awaiter(this, void 0, void 0, function* () {
4045
+ this.loading = true;
4046
+ this.getMetadata();
4047
+ });
4048
+ }
4005
4049
  notFoundError() { }
4006
4050
  requestPage() {
4007
4051
  return __awaiter(this, void 0, void 0, function* () {
@@ -4884,6 +4928,7 @@
4884
4928
  var _a, _b, _c;
4885
4929
  const rowKey = row[this.datasource.uniqueKey];
4886
4930
  const compName = actionComponent.name;
4931
+ const instanceName = `${compName}_${rowKey}`;
4887
4932
  const path = parentPath ? `${parentPath}.${compName}` : compName;
4888
4933
  const newComponent = merge__default["default"]({}, actionComponent, (_b = (_a = this.actionsApplied[rowKey]) === null || _a === void 0 ? void 0 : _a[column.name]) === null || _b === void 0 ? void 0 : _b[path]);
4889
4934
  let compEvents = {};
@@ -4898,7 +4943,16 @@
4898
4943
  }
4899
4944
  } });
4900
4945
  const newChildren = (_c = newComponent.children) === null || _c === void 0 ? void 0 : _c.map((child) => this.getActionComponent(child, column, row, path));
4901
- return Object.assign(Object.assign({}, newComponent), { events: newEvents, name: `${compName}_${rowKey}`, children: newChildren });
4946
+ newComponent.name = instanceName;
4947
+ newComponent.children = newChildren;
4948
+ newComponent.events = newEvents;
4949
+ try {
4950
+ core.Metadata.updateInstance(instanceName, newComponent);
4951
+ }
4952
+ catch (e) {
4953
+ // do nothing
4954
+ }
4955
+ return newComponent;
4902
4956
  }
4903
4957
  changeDefaultSlotNames(slot) {
4904
4958
  slot.forEach((item) => {
@@ -10532,6 +10586,12 @@
10532
10586
  tableColumns: 'mdi-table-headers-eye',
10533
10587
  unfold: 'mdi-unfold-more-horizontal',
10534
10588
  warning: 'mdi-exclamation',
10589
+ zoom: 'mdi-magnify-scan',
10590
+ zoomIn: 'mdi-plus-circle-outline',
10591
+ zoomPanning: 'mdi-hand-back-right-outline',
10592
+ zoomOut: 'mdi-minus-circle-outline',
10593
+ zoomReset: 'mdi-magnify-close',
10594
+ zoomSelection: 'mdi-magnify-scan',
10535
10595
  };
10536
10596
  Icons.faIcons = {
10537
10597
  alertOctagon: 'fa fa-exclamation-circle',
@@ -10582,6 +10642,12 @@
10582
10642
  tableColumns: 'fa fa-columns',
10583
10643
  unfold: 'fa fa-sort',
10584
10644
  warning: 'fa fa-exclamation',
10645
+ zoom: 'fa fa-search',
10646
+ zoomIn: 'fa fa-search-plus',
10647
+ zoomPanning: 'fa fa-hand-paper',
10648
+ zoomOut: 'fa fa-search-minus',
10649
+ zoomReset: 'fa fa-undo',
10650
+ zoomSelection: 'fa fa-expand',
10585
10651
  };
10586
10652
  Icons.icons = (() => Icons.mdiIcons)();
10587
10653
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.40.0",
3
+ "version": "1.41.0",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -37,5 +37,5 @@
37
37
  "lodash.times": "^4.3.2",
38
38
  "mockdate": "^3.0.2"
39
39
  },
40
- "gitHead": "3dd3bf4a5646a8b7f6b7813b16ca0fbed39c98a8"
40
+ "gitHead": "8ca8a393eef096d9012bb2730f60588db71db828"
41
41
  }
@@ -47,6 +47,11 @@ export declare class ApexChart extends ComponentRender implements IApexChart {
47
47
  * Optional update method assigned by view layer.
48
48
  */
49
49
  private viewUpdate?;
50
+ /**
51
+ * Method to return icon HTML on the view layer.
52
+ */
53
+ private viewGetIconHTML?;
54
+ private defaultOptions;
50
55
  /**
51
56
  * Creates a new ApexChart.
52
57
  * @param props ApexChart properties
@@ -57,9 +62,15 @@ export declare class ApexChart extends ComponentRender implements IApexChart {
57
62
  * @param viewUpdate Update method
58
63
  */
59
64
  setViewUpdate(viewUpdate: (options: any) => Promise<any>): void;
65
+ /**
66
+ * Sets view get icon HTML method.
67
+ * @param viewGetIconHTML Update method
68
+ */
69
+ setViewGetIconHTML(viewGetIconHTML: (icon: string) => string): void;
60
70
  /**
61
71
  * Update the chart
62
72
  * @param options New options
63
73
  */
64
74
  updateChart(options: any): Promise<any>;
75
+ updateToolbarIcons(): any;
65
76
  }
@@ -37,10 +37,6 @@ export declare class DateRange extends TextInput implements IDateRange {
37
37
  * Sets the locale. Accepts a string with a BCP 47 language tag.
38
38
  */
39
39
  locale?: string;
40
- /**
41
- * Defines if dates should be ordered
42
- */
43
- orderedDates: boolean;
44
40
  /**
45
41
  * Allows changing displayed month with mouse scroll
46
42
  */
@@ -91,8 +87,8 @@ export declare class DateRange extends TextInput implements IDateRange {
91
87
  set isoRangeValue(newValue: string[]);
92
88
  formatISODateRangeValue(dates: string[] | string): string[];
93
89
  parseISODateRangeValue(values: string[]): any;
90
+ private sortDates;
94
91
  dateValidation(): boolean | string;
95
- dateValidateOrder(): boolean | string;
96
92
  click(event: Event, element: HTMLElement): void;
97
93
  blur(event: Event, element: HTMLElement): void;
98
94
  focus(event: Event, element: HTMLElement): void;
@@ -20,6 +20,7 @@ export declare class Frame extends ComponentRender implements IFrame {
20
20
  */
21
21
  constructor(props: IFrame);
22
22
  private getMetadata;
23
+ reload(): Promise<void>;
23
24
  protected notFoundError(): void;
24
25
  private requestPage;
25
26
  /**
@@ -0,0 +1,7 @@
1
+ import { IList } from '../zd-list/interfaces';
2
+ export interface ISelectableList extends IList {
3
+ activeClass?: string;
4
+ mandatory?: boolean;
5
+ max?: number;
6
+ multiple?: boolean;
7
+ }
@@ -0,0 +1,29 @@
1
+ import { ISelectableList } from './interfaces';
2
+ import { List } from '../zd-list/list';
3
+ /**
4
+ * Base class for SelectableList component.
5
+ */
6
+ export declare class SelectableList extends List implements ISelectableList {
7
+ /**
8
+ * Applies specified css class to the selected item
9
+ */
10
+ activeClass?: string;
11
+ /**
12
+ * Specifies whether at least one element must be selected
13
+ */
14
+ mandatory: boolean;
15
+ /**
16
+ * Defines the maximum number of elements the list has
17
+ */
18
+ max?: number;
19
+ /**
20
+ * Defines the maximum number of elements the list has
21
+ */
22
+ value?: string;
23
+ /**
24
+ * Defines how many elements of the list can be selected at the same time
25
+ */
26
+ multiple?: boolean;
27
+ constructor(props: ISelectableList);
28
+ change(event?: Event, element?: HTMLElement): void;
29
+ }