@zeedhi/common 1.87.2 → 1.88.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.
package/dist/zd-common.esm.js
CHANGED
|
@@ -4246,10 +4246,7 @@ class DateRange extends TextInput {
|
|
|
4246
4246
|
* Toggles visibility of the week numbers in the body of the calendar.
|
|
4247
4247
|
*/
|
|
4248
4248
|
this.showWeek = false;
|
|
4249
|
-
|
|
4250
|
-
* Character that will separate the two dates
|
|
4251
|
-
*/
|
|
4252
|
-
this.splitter = ' ~ ';
|
|
4249
|
+
this.internalSplitter = ' ~ ';
|
|
4253
4250
|
/**
|
|
4254
4251
|
* Width of the picker.
|
|
4255
4252
|
*/
|
|
@@ -4288,7 +4285,7 @@ class DateRange extends TextInput {
|
|
|
4288
4285
|
this.scrollable = this.getInitValue('scrollable', props.scrollable, this.scrollable);
|
|
4289
4286
|
this.showDatePicker = this.getInitValue('showDatePicker', props.showDatePicker, this.showDatePicker);
|
|
4290
4287
|
this.showWeek = this.getInitValue('showWeek', props.showWeek, this.showWeek);
|
|
4291
|
-
this.splitter = this.getInitValue('splitter', props.splitter, this.
|
|
4288
|
+
this.splitter = this.getInitValue('splitter', props.splitter, this.internalSplitter);
|
|
4292
4289
|
this.width = this.getInitValue('width', props.width, this.width);
|
|
4293
4290
|
this.mask = this.getInitValue('mask', props.mask, undefined);
|
|
4294
4291
|
this.helperOptions = this.getInitValue('helperOptions', props.helperOptions, this.helperOptions);
|
|
@@ -4307,6 +4304,15 @@ class DateRange extends TextInput {
|
|
|
4307
4304
|
}
|
|
4308
4305
|
};
|
|
4309
4306
|
}
|
|
4307
|
+
/**
|
|
4308
|
+
* Character that will separate the two dates
|
|
4309
|
+
*/
|
|
4310
|
+
get splitter() {
|
|
4311
|
+
return I18n.translate(this.internalSplitter);
|
|
4312
|
+
}
|
|
4313
|
+
set splitter(splitter) {
|
|
4314
|
+
this.internalSplitter = splitter;
|
|
4315
|
+
}
|
|
4310
4316
|
getInitialMask() {
|
|
4311
4317
|
if (isUndefined(this.mask)) {
|
|
4312
4318
|
this.unitMask = this.inputFormat && this.maskFormat(this.inputFormat);
|
|
@@ -4344,7 +4350,7 @@ class DateRange extends TextInput {
|
|
|
4344
4350
|
* Gets the updated masked, based on displayFormat if the initial mask is undefined
|
|
4345
4351
|
*/
|
|
4346
4352
|
getUpdatedMask() {
|
|
4347
|
-
if (isUndefined(this.
|
|
4353
|
+
if (isUndefined(this.getInitialMask())) {
|
|
4348
4354
|
return this.maskFormat(`${this.displayFormat}${this.splitter}${this.displayFormat}`);
|
|
4349
4355
|
}
|
|
4350
4356
|
return this.mask;
|
|
@@ -4475,10 +4481,10 @@ class DateRange extends TextInput {
|
|
|
4475
4481
|
* Add date mask
|
|
4476
4482
|
*/
|
|
4477
4483
|
addDateMask() {
|
|
4478
|
-
if (isUndefined(this.
|
|
4484
|
+
if (isUndefined(this.getInitialMask()) || !this.value)
|
|
4479
4485
|
return;
|
|
4480
4486
|
setTimeout(() => {
|
|
4481
|
-
this.mask = this.
|
|
4487
|
+
this.mask = this.getInitialMask();
|
|
4482
4488
|
const firstDate = this.value[0]
|
|
4483
4489
|
? dayjs(this.value[0], this.dateFormat).format(this.inputFormat || this.displayFormat)
|
|
4484
4490
|
: '';
|
|
@@ -4492,7 +4498,7 @@ class DateRange extends TextInput {
|
|
|
4492
4498
|
* Removes the component mask if value is valid
|
|
4493
4499
|
*/
|
|
4494
4500
|
removeDateMask() {
|
|
4495
|
-
if (isUndefined(this.
|
|
4501
|
+
if (isUndefined(this.getInitialMask()) || !this.value || this.dateError
|
|
4496
4502
|
|| !this.isValidDateArray(this.dateFormat, this.value)) {
|
|
4497
4503
|
return;
|
|
4498
4504
|
}
|
package/dist/zd-common.umd.js
CHANGED
|
@@ -4253,10 +4253,7 @@
|
|
|
4253
4253
|
* Toggles visibility of the week numbers in the body of the calendar.
|
|
4254
4254
|
*/
|
|
4255
4255
|
this.showWeek = false;
|
|
4256
|
-
|
|
4257
|
-
* Character that will separate the two dates
|
|
4258
|
-
*/
|
|
4259
|
-
this.splitter = ' ~ ';
|
|
4256
|
+
this.internalSplitter = ' ~ ';
|
|
4260
4257
|
/**
|
|
4261
4258
|
* Width of the picker.
|
|
4262
4259
|
*/
|
|
@@ -4295,7 +4292,7 @@
|
|
|
4295
4292
|
this.scrollable = this.getInitValue('scrollable', props.scrollable, this.scrollable);
|
|
4296
4293
|
this.showDatePicker = this.getInitValue('showDatePicker', props.showDatePicker, this.showDatePicker);
|
|
4297
4294
|
this.showWeek = this.getInitValue('showWeek', props.showWeek, this.showWeek);
|
|
4298
|
-
this.splitter = this.getInitValue('splitter', props.splitter, this.
|
|
4295
|
+
this.splitter = this.getInitValue('splitter', props.splitter, this.internalSplitter);
|
|
4299
4296
|
this.width = this.getInitValue('width', props.width, this.width);
|
|
4300
4297
|
this.mask = this.getInitValue('mask', props.mask, undefined);
|
|
4301
4298
|
this.helperOptions = this.getInitValue('helperOptions', props.helperOptions, this.helperOptions);
|
|
@@ -4314,6 +4311,15 @@
|
|
|
4314
4311
|
}
|
|
4315
4312
|
};
|
|
4316
4313
|
}
|
|
4314
|
+
/**
|
|
4315
|
+
* Character that will separate the two dates
|
|
4316
|
+
*/
|
|
4317
|
+
get splitter() {
|
|
4318
|
+
return core.I18n.translate(this.internalSplitter);
|
|
4319
|
+
}
|
|
4320
|
+
set splitter(splitter) {
|
|
4321
|
+
this.internalSplitter = splitter;
|
|
4322
|
+
}
|
|
4317
4323
|
getInitialMask() {
|
|
4318
4324
|
if (isUndefined__default["default"](this.mask)) {
|
|
4319
4325
|
this.unitMask = this.inputFormat && this.maskFormat(this.inputFormat);
|
|
@@ -4351,7 +4357,7 @@
|
|
|
4351
4357
|
* Gets the updated masked, based on displayFormat if the initial mask is undefined
|
|
4352
4358
|
*/
|
|
4353
4359
|
getUpdatedMask() {
|
|
4354
|
-
if (isUndefined__default["default"](this.
|
|
4360
|
+
if (isUndefined__default["default"](this.getInitialMask())) {
|
|
4355
4361
|
return this.maskFormat(`${this.displayFormat}${this.splitter}${this.displayFormat}`);
|
|
4356
4362
|
}
|
|
4357
4363
|
return this.mask;
|
|
@@ -4482,10 +4488,10 @@
|
|
|
4482
4488
|
* Add date mask
|
|
4483
4489
|
*/
|
|
4484
4490
|
addDateMask() {
|
|
4485
|
-
if (isUndefined__default["default"](this.
|
|
4491
|
+
if (isUndefined__default["default"](this.getInitialMask()) || !this.value)
|
|
4486
4492
|
return;
|
|
4487
4493
|
setTimeout(() => {
|
|
4488
|
-
this.mask = this.
|
|
4494
|
+
this.mask = this.getInitialMask();
|
|
4489
4495
|
const firstDate = this.value[0]
|
|
4490
4496
|
? core.dayjs(this.value[0], this.dateFormat).format(this.inputFormat || this.displayFormat)
|
|
4491
4497
|
: '';
|
|
@@ -4499,7 +4505,7 @@
|
|
|
4499
4505
|
* Removes the component mask if value is valid
|
|
4500
4506
|
*/
|
|
4501
4507
|
removeDateMask() {
|
|
4502
|
-
if (isUndefined__default["default"](this.
|
|
4508
|
+
if (isUndefined__default["default"](this.getInitialMask()) || !this.value || this.dateError
|
|
4503
4509
|
|| !this.isValidDateArray(this.dateFormat, this.value)) {
|
|
4504
4510
|
return;
|
|
4505
4511
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.88.0",
|
|
4
4
|
"description": "Zeedhi Common",
|
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"lodash.times": "4.3.*",
|
|
44
44
|
"mockdate": "3.0.*"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "b9e30e705a88fa882c1fbdf140c15cc7c47c7c87"
|
|
47
47
|
}
|
|
@@ -48,7 +48,9 @@ export declare class DateRange extends TextInput implements IDateRange {
|
|
|
48
48
|
/**
|
|
49
49
|
* Character that will separate the two dates
|
|
50
50
|
*/
|
|
51
|
-
splitter: string;
|
|
51
|
+
get splitter(): string;
|
|
52
|
+
set splitter(splitter: string);
|
|
53
|
+
private internalSplitter;
|
|
52
54
|
/**
|
|
53
55
|
* Width of the picker.
|
|
54
56
|
*/
|