@ldmjs/ui 1.0.51 → 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.
@@ -16,4 +16,4 @@
16
16
  .ld-text-viewer[data-v-3fa037a4]{min-width:100%;display:flex;flex-direction:column;white-space:break-spaces;font-size:var(--font-size)}.ld-text-viewer .column[data-v-3fa037a4]{flex-flow:column}
17
17
  .ld-edit-masked-text[data-v-33aa4ec6]{min-width:100%;font-size:inherit !important;display:flex}.ld-edit-masked-text .column[data-v-33aa4ec6]{flex-flow:column}input[data-v-33aa4ec6]{border:1px solid var(--grey-l-5);border-radius:var(--border-radius);width:100%;padding:0 8px;font-size:var(--font-size);height:var(--input-height)}input[data-v-33aa4ec6]:focus,input[data-v-33aa4ec6]:active{outline:none;border:1px solid var(--grey-l-4)}.ld-edit-masked-text-validate[data-v-33aa4ec6]{overflow:hidden;height:20px}
18
18
  .ld-text-markup[data-v-2efb69ff]{display:flex;flex-direction:column;min-width:100%;max-width:100%;width:100%;min-height:180px;padding-bottom:18px}.ld-text-markup-validate[data-v-2efb69ff]{overflow:hidden;height:20px;flex-grow:0}.content-wrapper[data-v-2efb69ff]{display:flex;flex-direction:column;position:relative;background-color:var(--grey-l-6);border-radius:4px}.tabs-wrapper[data-v-2efb69ff]{position:relative;display:flex;width:50%;max-width:155px;margin-bottom:-1px;z-index:1;flex-shrink:0}.tabs-wrapper .v-btn[data-v-2efb69ff]{border:1px solid var(--grey-l-5);height:30px !important;opacity:.6;border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.tabs-wrapper .v-btn[data-v-2efb69ff]:before,.tabs-wrapper .v-btn[data-v-2efb69ff]:after{display:none}.tabs-wrapper .v-btn.active[data-v-2efb69ff]{background-color:var(--white);border:1px solid var(--grey-l-4);border-bottom:none;opacity:1}.content[data-v-2efb69ff]{position:relative;z-index:0;flex-basis:100%;font-size:var(--font-size);color:var(--text)}.content .md-editor[data-v-2efb69ff]{height:100%}.contentbox[data-v-2efb69ff]{border:1px solid var(--grey-l-4);background-color:var(--white);border-radius:0 4px 4px 4px;padding:10px}[data-v-2efb69ff] .contentbox ul{padding:0 12px;list-style:disc;margin-bottom:8px}[data-v-2efb69ff] .contentbox ol{list-style:decimal;padding:0 12px;margin-bottom:8px}[data-v-2efb69ff] .contentbox p{margin-bottom:8px}[data-v-2efb69ff] .contentbox pre{padding:4px}[data-v-2efb69ff] .contentbox code{background:none;color:var(--text);padding:0;font-size:100%}[data-v-2efb69ff] .md-editor{border:1px solid var(--grey-l-4)}
19
- .ld-switch[data-v-89826e86] .v-switch{display:block}.ld-switch[data-v-89826e86] .v-switch .v-selection-control{min-height:var(--input-height) !important}.ld-switch[data-v-89826e86] .v-switch .v-selection-control .v-selection-control__wrapper{width:40px}.ld-switch[data-v-89826e86] .v-switch .v-selection-control:not(.v-selection-control--dirty) .v-selection-control__input{transform:translateX(-12px)}.ld-switch[data-v-89826e86] .v-switch .v-selection-control:not(.v-selection-control--dirty) .v-switch__track{color:var(--grey-l-4) !important;background-color:var(--grey-l-4) !important}.ld-switch[data-v-89826e86] .v-switch .v-selection-control .v-switch__track{opacity:1;width:40px}.ld-switch[data-v-89826e86] .v-switch .v-selection-control--dirty .v-selection-control__input{transform:translateX(12px)}.ld-switch[data-v-89826e86] .v-switch .v-selection-control--dirty .v-switch__thumb{color:var(--primary-l-3) !important;background-color:var(--primary-l-3) !important}.ld-switch[data-v-89826e86] .v-switch .v-selection-control--dirty .v-switch__track{opacity:1;background-color:var(--primary-l-2) !important}.ld-switch[data-v-89826e86] .v-switch .v-selection-control--dirty .v-label{color:var(--primary-l-2) !important}.ld-switch[data-v-89826e86] .v-switch .v-selection-control .v-switch__thumb{color:var(--white) !important}.ld-switch[data-v-89826e86] .v-switch .v-selection-control .v-label{padding-inline-start:4px}
19
+ .ld-switch[data-v-102cfd42] .v-switch{display:block}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control{min-height:var(--input-height) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control .v-selection-control__wrapper{width:40px}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control:not(.v-selection-control--dirty) .v-selection-control__input{transform:translateX(-12px)}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control:not(.v-selection-control--dirty) .v-switch__track{color:var(--grey-l-4) !important;background-color:var(--grey-l-4) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control .v-switch__track{opacity:1;width:40px}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control--dirty .v-selection-control__input{transform:translateX(12px)}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control--dirty .v-switch__thumb{color:var(--primary-l-3) !important;background-color:var(--primary-l-3) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control--dirty .v-switch__track{opacity:1;background-color:var(--primary-l-2) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control--dirty .v-label{color:var(--primary-l-2) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control .v-switch__thumb{color:var(--white) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control .v-label{padding-inline-start:4px}
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.formattedDate;
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;
@@ -15583,26 +15595,28 @@ function ld_text_markup_reg(vue, options) {
15583
15595
  }
15584
15596
  /* harmony default export */ const src_ld_text_markup = (ld_text_markup_reg);
15585
15597
 
15586
- ;// ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-switch/ld-switch.vue?vue&type=template&id=89826e86&scoped=true
15598
+ ;// ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-switch/ld-switch.vue?vue&type=template&id=102cfd42&scoped=true
15587
15599
 
15588
15600
 
15589
- const ld_switchvue_type_template_id_89826e86_scoped_true_hoisted_1 = { class: "ld-switch" }
15601
+ const ld_switchvue_type_template_id_102cfd42_scoped_true_hoisted_1 = { class: "ld-switch" }
15590
15602
 
15591
- function ld_switchvue_type_template_id_89826e86_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
15603
+ function ld_switchvue_type_template_id_102cfd42_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
15592
15604
  const _component_v_switch = (0,external_vue_.resolveComponent)("v-switch")
15593
15605
 
15594
- return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_switchvue_type_template_id_89826e86_scoped_true_hoisted_1, [
15606
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_switchvue_type_template_id_102cfd42_scoped_true_hoisted_1, [
15595
15607
  (0,external_vue_.createVNode)(_component_v_switch, {
15596
15608
  modelValue: _ctx.value,
15597
15609
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.value) = $event)),
15598
15610
  readonly: _ctx.readonly,
15599
15611
  disabled: _ctx.disabled,
15600
15612
  label: _ctx.label,
15613
+ "true-value": _ctx.trueValue,
15614
+ "false-value": _ctx.falseValue,
15601
15615
  "hide-details": _ctx.hideDetails
15602
- }, null, 8, ["modelValue", "readonly", "disabled", "label", "hide-details"])
15616
+ }, null, 8, ["modelValue", "readonly", "disabled", "label", "true-value", "false-value", "hide-details"])
15603
15617
  ]))
15604
15618
  }
15605
- ;// ./src/ld-switch/ld-switch.vue?vue&type=template&id=89826e86&scoped=true
15619
+ ;// ./src/ld-switch/ld-switch.vue?vue&type=template&id=102cfd42&scoped=true
15606
15620
 
15607
15621
  ;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-switch/ld-switch.ts?vue&type=script&lang=js&external
15608
15622
  var ld_switchvue_type_script_lang_js_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -15616,22 +15630,55 @@ var ld_switchvue_type_script_lang_js_external_metadata = (undefined && undefined
15616
15630
  };
15617
15631
 
15618
15632
 
15619
- let SwitchComponent = class SwitchComponent extends (0,external_vue_property_decorator_.mixins)(InputMixin) {
15633
+
15634
+ class SwitchComponent extends (0,external_vue_property_decorator_.mixins)(InputMixin) {
15620
15635
  constructor() {
15621
15636
  super(...arguments);
15622
15637
  this.value = false;
15623
15638
  }
15639
+ emitValue(val) {
15640
+ return this.getValue(val);
15641
+ }
15624
15642
  onModelChanged() {
15625
15643
  this.value = this.modelValue;
15626
15644
  }
15627
15645
  onValueChanged(val) {
15628
- this.$emit('update:model-value', val);
15646
+ this.emitValue(val);
15629
15647
  }
15630
- };
15648
+ getValue(value) {
15649
+ if (!this.$utils.isDefined(value)) {
15650
+ return false;
15651
+ }
15652
+ if (this.$utils.isDefined(this.trueValue) && this.$utils.isDefined(this.falseValue)) {
15653
+ if (value === this.trueValue) {
15654
+ return this.trueValue;
15655
+ }
15656
+ if (value === this.falseValue) {
15657
+ return this.falseValue;
15658
+ }
15659
+ return false;
15660
+ }
15661
+ return value;
15662
+ }
15663
+ }
15631
15664
  ld_switchvue_type_script_lang_js_external_decorate([
15632
15665
  (0,external_vue_property_decorator_.Prop)(),
15633
15666
  ld_switchvue_type_script_lang_js_external_metadata("design:type", Boolean)
15634
15667
  ], SwitchComponent.prototype, "modelValue", void 0);
15668
+ ld_switchvue_type_script_lang_js_external_decorate([
15669
+ (0,external_vue_property_decorator_.Prop)(),
15670
+ ld_switchvue_type_script_lang_js_external_metadata("design:type", Object)
15671
+ ], SwitchComponent.prototype, "trueValue", void 0);
15672
+ ld_switchvue_type_script_lang_js_external_decorate([
15673
+ (0,external_vue_property_decorator_.Prop)(),
15674
+ ld_switchvue_type_script_lang_js_external_metadata("design:type", Object)
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);
15635
15682
  ld_switchvue_type_script_lang_js_external_decorate([
15636
15683
  (0,external_vue_property_decorator_.Watch)('modelValue', { immediate: true }),
15637
15684
  ld_switchvue_type_script_lang_js_external_metadata("design:type", Function),
@@ -15641,15 +15688,9 @@ ld_switchvue_type_script_lang_js_external_decorate([
15641
15688
  ld_switchvue_type_script_lang_js_external_decorate([
15642
15689
  (0,external_vue_property_decorator_.Watch)('value'),
15643
15690
  ld_switchvue_type_script_lang_js_external_metadata("design:type", Function),
15644
- ld_switchvue_type_script_lang_js_external_metadata("design:paramtypes", [Boolean]),
15691
+ ld_switchvue_type_script_lang_js_external_metadata("design:paramtypes", [Object]),
15645
15692
  ld_switchvue_type_script_lang_js_external_metadata("design:returntype", void 0)
15646
15693
  ], SwitchComponent.prototype, "onValueChanged", null);
15647
- SwitchComponent = ld_switchvue_type_script_lang_js_external_decorate([
15648
- (0,external_vue_property_decorator_.Options)({
15649
- emits: ['update:model-value']
15650
- })
15651
- ], SwitchComponent);
15652
- /* harmony default export */ const ld_switchvue_type_script_lang_js_external = (SwitchComponent);
15653
15694
 
15654
15695
  ;// ./src/ld-switch/ld-switch.ts?vue&type=script&lang=js&external
15655
15696
 
@@ -15661,7 +15702,7 @@ SwitchComponent = ld_switchvue_type_script_lang_js_external_decorate([
15661
15702
  ;
15662
15703
 
15663
15704
 
15664
- const ld_switch_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_switchvue_type_script_lang_js_external, [['render',ld_switchvue_type_template_id_89826e86_scoped_true_render],['__scopeId',"data-v-89826e86"]])
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"]])
15665
15706
 
15666
15707
  /* harmony default export */ const ld_switch = (ld_switch_exports_);
15667
15708
  ;// ./src/ld-switch/index.ts
@@ -16594,9 +16635,9 @@ const dialog_minimized_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(d
16594
16635
  /* harmony default export */ const dialog_minimized = (dialog_minimized_exports_);
16595
16636
  ;// ./src/ld-dialog/dialogs.ts
16596
16637
  class Dialog {
16597
- constructor(title, content = '') {
16638
+ constructor(title, content) {
16598
16639
  this.title = title;
16599
- this.content = content;
16640
+ this.content = content ?? '';
16600
16641
  }
16601
16642
  ;
16602
16643
  }
@@ -16629,7 +16670,6 @@ class ConfirmDialog extends Dialog {
16629
16670
  class InfoDialog extends Dialog {
16630
16671
  constructor(data) {
16631
16672
  super(data.title);
16632
- this.title = data.title;
16633
16673
  this.component = data.component;
16634
16674
  this.componentProps = data.componentProps;
16635
16675
  this.width = data.width;
@@ -16643,9 +16683,9 @@ class InfoDialog extends Dialog {
16643
16683
  this.hostObject = data.hostObject;
16644
16684
  }
16645
16685
  }
16646
- class SelectDialog {
16686
+ class SelectDialog extends Dialog {
16647
16687
  constructor(data) {
16648
- this.title = data.title;
16688
+ super(data.title);
16649
16689
  this.component = data.component;
16650
16690
  this.componentProps = data.componentProps;
16651
16691
  this.loading = data.loading;
@@ -16658,10 +16698,10 @@ class SelectDialog {
16658
16698
  this.hostObject = data.hostObject;
16659
16699
  }
16660
16700
  }
16661
- class CreateEditDialog {
16701
+ class CreateEditDialog extends Dialog {
16662
16702
  constructor(data) {
16703
+ super(data.title);
16663
16704
  this._isChanged = null;
16664
- this.title = data.title;
16665
16705
  this.component = data.component;
16666
16706
  this.componentProps = {
16667
16707
  ...data.componentProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldmjs/ui",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "ldm ui",
5
5
  "main": "dist/index.js",
6
6
  "engines": {