@ldmjs/ui 1.0.52 → 1.0.53
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/index.js +44 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7453,7 +7453,7 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7453
7453
|
},
|
|
7454
7454
|
},
|
|
7455
7455
|
format: date => {
|
|
7456
|
-
return this.
|
|
7456
|
+
return this.formatDate(date);
|
|
7457
7457
|
},
|
|
7458
7458
|
parse: str => {
|
|
7459
7459
|
return this.parseDate(str);
|
|
@@ -7644,6 +7644,18 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7644
7644
|
});
|
|
7645
7645
|
return !this.validationMessage;
|
|
7646
7646
|
}
|
|
7647
|
+
formatDate(date) {
|
|
7648
|
+
if (!date) {
|
|
7649
|
+
return '';
|
|
7650
|
+
}
|
|
7651
|
+
if (this.localeRu) {
|
|
7652
|
+
return date.toLocaleDateString(this.locale);
|
|
7653
|
+
}
|
|
7654
|
+
if (this.localeEn) {
|
|
7655
|
+
const { d, m, y } = datetime.parseDate(date.toLocaleDateString(this.locale));
|
|
7656
|
+
return `${d}/${m}/${y}`;
|
|
7657
|
+
}
|
|
7658
|
+
}
|
|
7647
7659
|
parseDate(value) {
|
|
7648
7660
|
if (!value) {
|
|
7649
7661
|
return null;
|
|
@@ -15618,26 +15630,37 @@ var ld_switchvue_type_script_lang_js_external_metadata = (undefined && undefined
|
|
|
15618
15630
|
};
|
|
15619
15631
|
|
|
15620
15632
|
|
|
15621
|
-
|
|
15633
|
+
|
|
15634
|
+
class SwitchComponent extends (0,external_vue_property_decorator_.mixins)(InputMixin) {
|
|
15622
15635
|
constructor() {
|
|
15623
15636
|
super(...arguments);
|
|
15624
15637
|
this.value = false;
|
|
15625
15638
|
}
|
|
15639
|
+
emitValue(val) {
|
|
15640
|
+
return this.getValue(val);
|
|
15641
|
+
}
|
|
15626
15642
|
onModelChanged() {
|
|
15627
15643
|
this.value = this.modelValue;
|
|
15628
15644
|
}
|
|
15629
15645
|
onValueChanged(val) {
|
|
15630
|
-
this
|
|
15646
|
+
this.emitValue(val);
|
|
15631
15647
|
}
|
|
15632
|
-
|
|
15633
|
-
if (!this.$utils.isDefined(
|
|
15634
|
-
return;
|
|
15648
|
+
getValue(value) {
|
|
15649
|
+
if (!this.$utils.isDefined(value)) {
|
|
15650
|
+
return false;
|
|
15635
15651
|
}
|
|
15636
15652
|
if (this.$utils.isDefined(this.trueValue) && this.$utils.isDefined(this.falseValue)) {
|
|
15637
|
-
|
|
15653
|
+
if (value === this.trueValue) {
|
|
15654
|
+
return this.trueValue;
|
|
15655
|
+
}
|
|
15656
|
+
if (value === this.falseValue) {
|
|
15657
|
+
return this.falseValue;
|
|
15658
|
+
}
|
|
15659
|
+
return false;
|
|
15638
15660
|
}
|
|
15661
|
+
return value;
|
|
15639
15662
|
}
|
|
15640
|
-
}
|
|
15663
|
+
}
|
|
15641
15664
|
ld_switchvue_type_script_lang_js_external_decorate([
|
|
15642
15665
|
(0,external_vue_property_decorator_.Prop)(),
|
|
15643
15666
|
ld_switchvue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
@@ -15650,6 +15673,12 @@ ld_switchvue_type_script_lang_js_external_decorate([
|
|
|
15650
15673
|
(0,external_vue_property_decorator_.Prop)(),
|
|
15651
15674
|
ld_switchvue_type_script_lang_js_external_metadata("design:type", Object)
|
|
15652
15675
|
], SwitchComponent.prototype, "falseValue", void 0);
|
|
15676
|
+
ld_switchvue_type_script_lang_js_external_decorate([
|
|
15677
|
+
Emit('update:model-value'),
|
|
15678
|
+
ld_switchvue_type_script_lang_js_external_metadata("design:type", Function),
|
|
15679
|
+
ld_switchvue_type_script_lang_js_external_metadata("design:paramtypes", [Object]),
|
|
15680
|
+
ld_switchvue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
15681
|
+
], SwitchComponent.prototype, "emitValue", null);
|
|
15653
15682
|
ld_switchvue_type_script_lang_js_external_decorate([
|
|
15654
15683
|
(0,external_vue_property_decorator_.Watch)('modelValue', { immediate: true }),
|
|
15655
15684
|
ld_switchvue_type_script_lang_js_external_metadata("design:type", Function),
|
|
@@ -15662,12 +15691,6 @@ ld_switchvue_type_script_lang_js_external_decorate([
|
|
|
15662
15691
|
ld_switchvue_type_script_lang_js_external_metadata("design:paramtypes", [Object]),
|
|
15663
15692
|
ld_switchvue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
15664
15693
|
], SwitchComponent.prototype, "onValueChanged", null);
|
|
15665
|
-
SwitchComponent = ld_switchvue_type_script_lang_js_external_decorate([
|
|
15666
|
-
(0,external_vue_property_decorator_.Options)({
|
|
15667
|
-
emits: ['update:model-value']
|
|
15668
|
-
})
|
|
15669
|
-
], SwitchComponent);
|
|
15670
|
-
/* harmony default export */ const ld_switchvue_type_script_lang_js_external = (SwitchComponent);
|
|
15671
15694
|
|
|
15672
15695
|
;// ./src/ld-switch/ld-switch.ts?vue&type=script&lang=js&external
|
|
15673
15696
|
|
|
@@ -15679,7 +15702,7 @@ SwitchComponent = ld_switchvue_type_script_lang_js_external_decorate([
|
|
|
15679
15702
|
;
|
|
15680
15703
|
|
|
15681
15704
|
|
|
15682
|
-
const ld_switch_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(
|
|
15705
|
+
const ld_switch_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(SwitchComponent, [['render',ld_switchvue_type_template_id_102cfd42_scoped_true_render],['__scopeId',"data-v-102cfd42"]])
|
|
15683
15706
|
|
|
15684
15707
|
/* harmony default export */ const ld_switch = (ld_switch_exports_);
|
|
15685
15708
|
;// ./src/ld-switch/index.ts
|
|
@@ -16612,9 +16635,9 @@ const dialog_minimized_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(d
|
|
|
16612
16635
|
/* harmony default export */ const dialog_minimized = (dialog_minimized_exports_);
|
|
16613
16636
|
;// ./src/ld-dialog/dialogs.ts
|
|
16614
16637
|
class Dialog {
|
|
16615
|
-
constructor(title, content
|
|
16638
|
+
constructor(title, content) {
|
|
16616
16639
|
this.title = title;
|
|
16617
|
-
this.content = content;
|
|
16640
|
+
this.content = content ?? '';
|
|
16618
16641
|
}
|
|
16619
16642
|
;
|
|
16620
16643
|
}
|
|
@@ -16647,7 +16670,6 @@ class ConfirmDialog extends Dialog {
|
|
|
16647
16670
|
class InfoDialog extends Dialog {
|
|
16648
16671
|
constructor(data) {
|
|
16649
16672
|
super(data.title);
|
|
16650
|
-
this.title = data.title;
|
|
16651
16673
|
this.component = data.component;
|
|
16652
16674
|
this.componentProps = data.componentProps;
|
|
16653
16675
|
this.width = data.width;
|
|
@@ -16661,9 +16683,9 @@ class InfoDialog extends Dialog {
|
|
|
16661
16683
|
this.hostObject = data.hostObject;
|
|
16662
16684
|
}
|
|
16663
16685
|
}
|
|
16664
|
-
class SelectDialog {
|
|
16686
|
+
class SelectDialog extends Dialog {
|
|
16665
16687
|
constructor(data) {
|
|
16666
|
-
|
|
16688
|
+
super(data.title);
|
|
16667
16689
|
this.component = data.component;
|
|
16668
16690
|
this.componentProps = data.componentProps;
|
|
16669
16691
|
this.loading = data.loading;
|
|
@@ -16676,10 +16698,10 @@ class SelectDialog {
|
|
|
16676
16698
|
this.hostObject = data.hostObject;
|
|
16677
16699
|
}
|
|
16678
16700
|
}
|
|
16679
|
-
class CreateEditDialog {
|
|
16701
|
+
class CreateEditDialog extends Dialog {
|
|
16680
16702
|
constructor(data) {
|
|
16703
|
+
super(data.title);
|
|
16681
16704
|
this._isChanged = null;
|
|
16682
|
-
this.title = data.title;
|
|
16683
16705
|
this.component = data.component;
|
|
16684
16706
|
this.componentProps = {
|
|
16685
16707
|
...data.componentProps,
|