@ldmjs/ui 1.0.0-dev-21 → 1.0.0-dev-22

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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  .label[data-v-12071c41]{word-wrap:break-word;max-width:100%;padding-bottom:2px;color:var(--label) !important;font-size:var(--font-size)}.label-wrapper[data-v-12071c41]{display:flex;align-items:center;min-height:var(--input-height)}.require[data-v-12071c41]::after{content:'*';display:inline-block;color:var(--error)}
6
6
 
7
- .ld-edit-text[data-v-5dac00fe]{min-width:100%}.input-class[data-v-5dac00fe]{height:var(--input-height);font-size:var(--font-size);max-width:100%;border-radius:var(--border-radius);border:1px solid var(--grey-l-5);padding:0 6px}.input-class[data-v-5dac00fe]:not(.disabled){background-color:var(--white)}.input-class[data-v-5dac00fe]:focus{border:1px solid var(--grey-l-4);outline:none}.input-class__suffix[data-v-5dac00fe]{position:absolute;top:3px;right:6px;color:var(--label)}
7
+ .ld-edit-text[data-v-3bc142d2]{min-width:100%}.input-class[data-v-3bc142d2]{height:var(--input-height);font-size:var(--font-size);max-width:100%;border-radius:var(--border-radius);border:1px solid var(--grey-l-5);padding:0 6px}.input-class[data-v-3bc142d2]:not(.disabled){background-color:var(--white)}.input-class[data-v-3bc142d2]:focus{border:1px solid var(--grey-l-4);outline:none}.input-class__suffix[data-v-3bc142d2]{position:absolute;top:3px;right:6px;color:var(--label)}
8
8
 
9
9
  .ld-datepicker[data-v-b65d2d3a]{display:flex;min-width:100%;max-width:100%;width:100%;font-size:var(--font-size)}.ld-datepicker.column[data-v-b65d2d3a]{flex-flow:column nowrap}.ld-datepicker-validate[data-v-b65d2d3a]{overflow:hidden;height:20px}.custom-time-picker[data-v-b65d2d3a]{max-width:var(--date-time-width);border-radius:var(--border-radius);background-color:var(--white);font-size:inherit !important}.custom-time-picker-validate[data-v-b65d2d3a]{overflow:hidden;height:20px}.date-input[data-v-b65d2d3a]{padding-left:5px;width:100%;font-size:var(--font-size)}.time-input[data-v-b65d2d3a]{width:100%;padding-left:5px;font-size:var(--font-size)}.time-input-btn[data-v-b65d2d3a]{padding-right:5px}.dt-col[data-v-b65d2d3a]{max-width:110px}.time-selector[data-v-b65d2d3a]{display:flex;flex-wrap:wrap;max-width:186px;padding:3px}.time-selector>span[data-v-b65d2d3a]{display:inline-block;width:100%;text-align:center;font-family:'Roboto';font-size:var(--font-size-2);font-weight:700}.time-selector .v-btn[data-v-b65d2d3a]{width:30px !important;height:30px !important;max-width:30px !important;max-height:30px !important;min-width:30px !important;min-height:30px !important;margin:3px}[data-v-b65d2d3a] .vc-popover-content-wrapper{position:fixed !important}[data-v-b65d2d3a] .v-input--is-disabled input{color:var(--text) !important}[data-v-b65d2d3a] .vc-popover-content{border-color:var(--grey-l-5)}[data-v-b65d2d3a] .vc-title span{color:var(--text);font-size:var(--font-size-2);font-weight:600;font-family:'Roboto'}[data-v-b65d2d3a] .vc-arrow{color:var(--grey)}[data-v-b65d2d3a] .vc-weekday{color:var(--grey-l-2);font-size:var(--font-size);font-weight:600;font-family:'Roboto'}[data-v-b65d2d3a] .vc-day-content{color:var(--text);font-size:var(--font-size);font-weight:400;font-family:'Roboto'}[data-v-b65d2d3a] .vc-day-content.vc-disabled{color:var(--grey-l-2) !important}[data-v-b65d2d3a] .vc-day-content.vc-highlight-content-solid{color:var(--white) !important;font-weight:600 !important}
10
10
 
@@ -28,3 +28,5 @@
28
28
 
29
29
  .time-selector[data-v-256abd0d]{display:flex;flex-wrap:wrap;max-width:186px;padding:3px}.time-selector>span[data-v-256abd0d]{display:inline-block;width:100%;text-align:center;font-family:'Roboto';font-size:var(--font-size-2);font-weight:700}.time-selector .v-btn[data-v-256abd0d]{width:30px !important;height:30px !important;max-width:30px !important;max-height:30px !important;min-width:30px !important;min-height:30px !important;margin:3px}.ld-timepicker-validate[data-v-256abd0d]{overflow:hidden;height:20px}
30
30
 
31
+ .ld-text-viewer[data-v-acef52d4]{min-width:100%;display:flex;flex-direction:column;white-space:break-spaces;font-size:var(--font-size)}.ld-text-viewer .column[data-v-acef52d4]{flex-flow:column}
32
+
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ declare function uidGen(len?: number, format?: string): string | number;
9
9
  declare function delay(timeout: number): Promise<void>;
10
10
  declare function deepValueGetter(obj: Record<string, unknown>, path: string): unknown;
11
11
  declare function isObjectEmpty(obj: Record<string, unknown>): boolean;
12
+ declare const urlRegexp: RegExp;
12
13
  declare const datetime: {
13
14
  dateLocalToISO: (value: string) => string;
14
15
  toServerString: (value: Date) => string;
@@ -43,6 +44,7 @@ export {
43
44
  uidGen,
44
45
  deepValueGetter,
45
46
  isObjectEmpty,
47
+ urlRegexp,
46
48
  datetime,
47
49
  ValidateMixin,
48
50
  ValidateMixinOptions
package/dist/index.js CHANGED
@@ -180,7 +180,8 @@ __webpack_require__.d(__webpack_exports__, {
180
180
  getAliases: () => (/* reexport */ getAliases),
181
181
  isDefined: () => (/* reexport */ isDefined),
182
182
  isObjectEmpty: () => (/* reexport */ isObjectEmpty),
183
- uidGen: () => (/* reexport */ uidGen)
183
+ uidGen: () => (/* reexport */ uidGen),
184
+ urlRegexp: () => (/* reexport */ urlRegexp)
184
185
  });
185
186
 
186
187
  // NAMESPACE OBJECT: ./src/utils/index.ts
@@ -192,7 +193,8 @@ __webpack_require__.d(utils_namespaceObject, {
192
193
  delay: () => (delay),
193
194
  isDefined: () => (isDefined),
194
195
  isObjectEmpty: () => (isObjectEmpty),
195
- uidGen: () => (uidGen)
196
+ uidGen: () => (uidGen),
197
+ urlRegexp: () => (urlRegexp)
196
198
  });
197
199
 
198
200
  // EXTERNAL MODULE: external "vue"
@@ -1831,12 +1833,12 @@ function ld_breadcrumbs_reg(vue, options) {
1831
1833
  }
1832
1834
  /* harmony default export */ const src_ld_breadcrumbs = (ld_breadcrumbs_reg);
1833
1835
 
1834
- ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ld-edit-text/ld-edit-text.vue?vue&type=template&id=5dac00fe&scoped=true&ts=true
1836
+ ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ld-edit-text/ld-edit-text.vue?vue&type=template&id=3bc142d2&scoped=true&ts=true
1835
1837
 
1836
- const ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_withScopeId = n => ((0,external_vue_.pushScopeId)("data-v-5dac00fe"), n = n(), (0,external_vue_.popScopeId)(), n);
1837
- const ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_hoisted_1 = { class: "ld-edit-text" };
1838
- const ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_hoisted_2 = { key: 0 };
1839
- const _hoisted_3 = /*#__PURE__*/ ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_withScopeId(() => /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Показать пароль", -1));
1838
+ const ld_edit_textvue_type_template_id_3bc142d2_scoped_true_ts_true_withScopeId = n => ((0,external_vue_.pushScopeId)("data-v-3bc142d2"), n = n(), (0,external_vue_.popScopeId)(), n);
1839
+ const ld_edit_textvue_type_template_id_3bc142d2_scoped_true_ts_true_hoisted_1 = { class: "ld-edit-text" };
1840
+ const ld_edit_textvue_type_template_id_3bc142d2_scoped_true_ts_true_hoisted_2 = { key: 0 };
1841
+ const _hoisted_3 = /*#__PURE__*/ ld_edit_textvue_type_template_id_3bc142d2_scoped_true_ts_true_withScopeId(() => /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Показать пароль", -1));
1840
1842
  const _hoisted_4 = {
1841
1843
  key: 1,
1842
1844
  class: "d-flex w-100 flex-column",
@@ -1850,7 +1852,7 @@ const _hoisted_6 = {
1850
1852
  key: 1,
1851
1853
  class: "v-input__details textbox-validate"
1852
1854
  };
1853
- function ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
1855
+ function ld_edit_textvue_type_template_id_3bc142d2_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
1854
1856
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
1855
1857
  const _component_ld_icon = (0,external_vue_.resolveComponent)("ld-icon");
1856
1858
  const _component_square_button = (0,external_vue_.resolveComponent)("square-button");
@@ -1859,7 +1861,7 @@ function ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_render(_c
1859
1861
  const _component_imask_input = (0,external_vue_.resolveComponent)("imask-input");
1860
1862
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
1861
1863
  const _component_v_row = (0,external_vue_.resolveComponent)("v-row");
1862
- return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_hoisted_1, [
1864
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3bc142d2_scoped_true_ts_true_hoisted_1, [
1863
1865
  (0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
1864
1866
  default: (0,external_vue_.withCtx)(() => [
1865
1867
  (_ctx.label)
@@ -1912,7 +1914,17 @@ function ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_render(_c
1912
1914
  onClick: _ctx.emitClick,
1913
1915
  onKeydown: _ctx.onKeydown,
1914
1916
  onCopy: _ctx.emitCopy
1915
- }, (0,external_vue_.createSlots)({ _: 2 }, [
1917
+ }, (0,external_vue_.createSlots)({
1918
+ message: (0,external_vue_.withCtx)(({ message }) => [
1919
+ (_ctx.showError || (_ctx.inputHint && _ctx.persistentHint))
1920
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", {
1921
+ key: 0,
1922
+ class: (0,external_vue_.normalizeClass)({ 'error--text': _ctx.validationMessage, 'label-color': !_ctx.validationMessage })
1923
+ }, (0,external_vue_.toDisplayString)(message), 3))
1924
+ : (0,external_vue_.createCommentVNode)("", true)
1925
+ ]),
1926
+ _: 2
1927
+ }, [
1916
1928
  (_ctx.modelValue && (_ctx.clearIcon || _ctx.type === 'password'))
1917
1929
  ? {
1918
1930
  name: "append-inner",
@@ -1965,7 +1977,7 @@ function ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_render(_c
1965
1977
  default: (0,external_vue_.withCtx)(() => [
1966
1978
  (0,external_vue_.createTextVNode)(),
1967
1979
  (_ctx.passwordVisible)
1968
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_hoisted_2, "Скрыть пароль"))
1980
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_edit_textvue_type_template_id_3bc142d2_scoped_true_ts_true_hoisted_2, "Скрыть пароль"))
1969
1981
  : (0,external_vue_.createCommentVNode)("", true),
1970
1982
  (0,external_vue_.createTextVNode)(),
1971
1983
  _hoisted_3
@@ -1976,17 +1988,6 @@ function ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_render(_c
1976
1988
  ]),
1977
1989
  key: "0"
1978
1990
  }
1979
- : undefined,
1980
- (_ctx.showError || (_ctx.inputHint && _ctx.persistentHint))
1981
- ? {
1982
- name: "message",
1983
- fn: (0,external_vue_.withCtx)(({ message }) => [
1984
- (0,external_vue_.createElementVNode)("span", {
1985
- class: (0,external_vue_.normalizeClass)({ 'error--text': _ctx.validationMessage, 'label-color': !_ctx.validationMessage })
1986
- }, (0,external_vue_.toDisplayString)(message), 3)
1987
- ]),
1988
- key: "1"
1989
- }
1990
1991
  : undefined
1991
1992
  ]), 1032, ["model-value", "type", "class", "persistent-hint", "rules", "validation-value", "placeholder", "disabled", "readonly", "hint", "mask", "tabindex", "maxlength", "autofocus", "hide-details", "prefix", "suffix", "clearable", "error", "error-messages", "prepend-inner-icon", "autocomplete", "onChange", "onUpdate:modelValue", "onBlur", "onFocus", "onClick", "onKeydown", "onCopy"]))
1992
1993
  : ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", _hoisted_4, [
@@ -2037,7 +2038,7 @@ function ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_render(_c
2037
2038
  ]));
2038
2039
  }
2039
2040
 
2040
- ;// CONCATENATED MODULE: ./src/ld-edit-text/ld-edit-text.vue?vue&type=template&id=5dac00fe&scoped=true&ts=true
2041
+ ;// CONCATENATED MODULE: ./src/ld-edit-text/ld-edit-text.vue?vue&type=template&id=3bc142d2&scoped=true&ts=true
2041
2042
 
2042
2043
  ;// CONCATENATED MODULE: ./src/decorators/emit.decorator.ts
2043
2044
 
@@ -2150,6 +2151,11 @@ var input_mixin_metadata = (undefined && undefined.__metadata) || function (k, v
2150
2151
  };
2151
2152
 
2152
2153
  class InputMixin extends external_vue_property_decorator_.Vue {
2154
+ onRequiredChanged() {
2155
+ if (!this.required && this.validate) {
2156
+ this.validate();
2157
+ }
2158
+ }
2153
2159
  get noDataPlaceholder() {
2154
2160
  return 'Нет данных';
2155
2161
  }
@@ -2206,6 +2212,12 @@ input_mixin_decorate([
2206
2212
  (0,external_vue_property_decorator_.Prop)({ type: String, default: '' }),
2207
2213
  input_mixin_metadata("design:type", String)
2208
2214
  ], InputMixin.prototype, "autocomplete", void 0);
2215
+ input_mixin_decorate([
2216
+ (0,external_vue_property_decorator_.Watch)('required'),
2217
+ input_mixin_metadata("design:type", Function),
2218
+ input_mixin_metadata("design:paramtypes", []),
2219
+ input_mixin_metadata("design:returntype", void 0)
2220
+ ], InputMixin.prototype, "onRequiredChanged", null);
2209
2221
 
2210
2222
  ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-label/ld-label.ts?vue&type=script&lang=ts&external
2211
2223
 
@@ -2929,7 +2941,7 @@ EditTextComponent = ld_edit_textvue_type_script_lang_ts_external_decorate([
2929
2941
  ;
2930
2942
 
2931
2943
 
2932
- const ld_edit_text_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_edit_textvue_type_script_lang_ts_external, [['render',ld_edit_textvue_type_template_id_5dac00fe_scoped_true_ts_true_render],['__scopeId',"data-v-5dac00fe"]])
2944
+ const ld_edit_text_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_edit_textvue_type_script_lang_ts_external, [['render',ld_edit_textvue_type_template_id_3bc142d2_scoped_true_ts_true_render],['__scopeId',"data-v-3bc142d2"]])
2933
2945
 
2934
2946
  /* harmony default export */ const ld_edit_text = (ld_edit_text_exports_);
2935
2947
  ;// CONCATENATED MODULE: ./src/ld-edit-text/index.ts
@@ -9804,6 +9816,186 @@ function ld_timepicker_reg(vue, options) {
9804
9816
  }
9805
9817
  /* harmony default export */ const src_ld_timepicker = (ld_timepicker_reg);
9806
9818
 
9819
+ ;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ld-text-viewer/ld-text-viewer.vue?vue&type=template&id=acef52d4&scoped=true
9820
+
9821
+
9822
+ const ld_text_viewervue_type_template_id_acef52d4_scoped_true_withScopeId = n => (_pushScopeId("data-v-acef52d4"),n=n(),_popScopeId(),n)
9823
+ const ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_1 = { class: "ld-text-viewer" }
9824
+ const ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_2 = ["innerHTML"]
9825
+ const ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_3 = ["innerHTML"]
9826
+ const ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_4 = {
9827
+ key: 1,
9828
+ class: "text-left"
9829
+ }
9830
+ const ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_5 = {
9831
+ key: 2,
9832
+ class: "italic",
9833
+ style: {"color":"var(--grey-l-2)"}
9834
+ }
9835
+
9836
+ function ld_text_viewervue_type_template_id_acef52d4_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
9837
+ const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label")
9838
+ const _component_v_row = (0,external_vue_.resolveComponent)("v-row")
9839
+ const _component_v_col = (0,external_vue_.resolveComponent)("v-col")
9840
+
9841
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_1, [
9842
+ (0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
9843
+ default: (0,external_vue_.withCtx)(() => [
9844
+ (_ctx.label)
9845
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_ld_label, {
9846
+ key: 0,
9847
+ class: (0,external_vue_.normalizeClass)([_ctx.labelSizeClasses]),
9848
+ label: _ctx.label,
9849
+ required: _ctx.required,
9850
+ "align-label-to-right": _ctx.alignLabelToRight
9851
+ }, null, 8, ["class", "label", "required", "align-label-to-right"]))
9852
+ : (0,external_vue_.createCommentVNode)("", true),
9853
+ (0,external_vue_.createTextVNode)(),
9854
+ (0,external_vue_.createVNode)(_component_v_col, {
9855
+ class: (0,external_vue_.normalizeClass)(["d-flex text-justify", _ctx.inputSizeClasses]),
9856
+ style: {}
9857
+ }, {
9858
+ default: (0,external_vue_.withCtx)(() => [
9859
+ (_ctx.activeLinks && _ctx.text)
9860
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_row, {
9861
+ key: 0,
9862
+ "no-gutters": "",
9863
+ class: "align-center"
9864
+ }, {
9865
+ default: (0,external_vue_.withCtx)(() => [
9866
+ (0,external_vue_.createElementVNode)("span", {
9867
+ class: "text-left",
9868
+ innerHTML: _ctx.textWithHyperlinks
9869
+ }, null, 8, ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_2)
9870
+ ]),
9871
+ _: 1
9872
+ }))
9873
+ : ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_row, {
9874
+ key: 1,
9875
+ "no-gutters": "",
9876
+ class: "align-center"
9877
+ }, {
9878
+ default: (0,external_vue_.withCtx)(() => [
9879
+ (_ctx.text)
9880
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", {
9881
+ key: 0,
9882
+ class: "text-left",
9883
+ innerHTML: _ctx.text
9884
+ }, null, 8, ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_3))
9885
+ : (_ctx.hasSlot)
9886
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_4, [
9887
+ (0,external_vue_.renderSlot)(_ctx.$slots, "default", {}, undefined, true)
9888
+ ]))
9889
+ : (0,external_vue_.createCommentVNode)("", true),
9890
+ (0,external_vue_.createTextVNode)(),
9891
+ (_ctx.showPlaceholder)
9892
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("p", ld_text_viewervue_type_template_id_acef52d4_scoped_true_hoisted_5, (0,external_vue_.toDisplayString)(_ctx.noDataPlaceholder), 1))
9893
+ : (0,external_vue_.createCommentVNode)("", true)
9894
+ ]),
9895
+ _: 3
9896
+ }))
9897
+ ]),
9898
+ _: 3
9899
+ }, 8, ["class"])
9900
+ ]),
9901
+ _: 3
9902
+ })
9903
+ ]))
9904
+ }
9905
+ ;// CONCATENATED MODULE: ./src/ld-text-viewer/ld-text-viewer.vue?vue&type=template&id=acef52d4&scoped=true
9906
+
9907
+ ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-text-viewer/ld-text-viewer.ts?vue&type=script&lang=js&external
9908
+ var ld_text_viewervue_type_script_lang_js_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9909
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9910
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9911
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9912
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
9913
+ };
9914
+ var ld_text_viewervue_type_script_lang_js_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
9915
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9916
+ };
9917
+
9918
+
9919
+
9920
+
9921
+
9922
+
9923
+
9924
+ /**
9925
+ * @displayName card-text-viewer
9926
+ */
9927
+ let CardTextViewer = class CardTextViewer extends (0,external_vue_class_component_.mixins)(ValidatableMixin, GridMixin, InputMixin) {
9928
+ hasSlotContent(slot, slotProps = {}) {
9929
+ if (!slot) {
9930
+ return false;
9931
+ }
9932
+ return slot(slotProps).some((vnode) => {
9933
+ if (vnode.type === external_vue_.Comment) {
9934
+ return false;
9935
+ }
9936
+ if (Array.isArray(vnode.children) && !vnode.children.length) {
9937
+ return false;
9938
+ }
9939
+ return vnode.type !== external_vue_.Text || (typeof vnode.children === 'string' && vnode.children.trim() !== '');
9940
+ });
9941
+ }
9942
+ get hasSlot() {
9943
+ return this.hasSlotContent(this.$slots.default);
9944
+ }
9945
+ get src() {
9946
+ if (!this.text) {
9947
+ return;
9948
+ }
9949
+ return this.text.replace(/\n/g, '<br>');
9950
+ }
9951
+ get textWithHyperlinks() {
9952
+ if (!this.src) {
9953
+ return;
9954
+ }
9955
+ const globalUrlRegExp = new RegExp(this.$utils.urlRegexp, 'ig');
9956
+ return this.src.replace(globalUrlRegExp, '<a href="$1" target="_blank">$1</a>');
9957
+ }
9958
+ get showPlaceholder() {
9959
+ return !this.text && !this.hasSlot;
9960
+ }
9961
+ };
9962
+ ld_text_viewervue_type_script_lang_js_external_decorate([
9963
+ (0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
9964
+ ld_text_viewervue_type_script_lang_js_external_metadata("design:type", Boolean)
9965
+ ], CardTextViewer.prototype, "activeLinks", void 0);
9966
+ ld_text_viewervue_type_script_lang_js_external_decorate([
9967
+ (0,external_vue_property_decorator_.Prop)(),
9968
+ ld_text_viewervue_type_script_lang_js_external_metadata("design:type", String)
9969
+ ], CardTextViewer.prototype, "text", void 0);
9970
+ CardTextViewer = ld_text_viewervue_type_script_lang_js_external_decorate([
9971
+ (0,external_vue_class_component_.Options)({
9972
+ components: {
9973
+ 'ld-label': ld_label
9974
+ },
9975
+ })
9976
+ ], CardTextViewer);
9977
+ /* harmony default export */ const ld_text_viewervue_type_script_lang_js_external = (CardTextViewer);
9978
+
9979
+ ;// CONCATENATED MODULE: ./src/ld-text-viewer/ld-text-viewer.ts?vue&type=script&lang=js&external
9980
+
9981
+ ;// CONCATENATED MODULE: ./src/ld-text-viewer/ld-text-viewer.vue
9982
+
9983
+
9984
+
9985
+
9986
+ ;
9987
+
9988
+
9989
+ const ld_text_viewer_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_text_viewervue_type_script_lang_js_external, [['render',ld_text_viewervue_type_template_id_acef52d4_scoped_true_render],['__scopeId',"data-v-acef52d4"]])
9990
+
9991
+ /* harmony default export */ const ld_text_viewer = (ld_text_viewer_exports_);
9992
+ ;// CONCATENATED MODULE: ./src/ld-text-viewer/index.ts
9993
+
9994
+ function ld_text_viewer_reg(vue, options) {
9995
+ vue.component(options.aliases['ld-text-viewer'], ld_text_viewer);
9996
+ }
9997
+ /* harmony default export */ const src_ld_text_viewer = (ld_text_viewer_reg);
9998
+
9807
9999
  ;// CONCATENATED MODULE: ./src/utils/delay.ts
9808
10000
  async function delay(timeout) {
9809
10001
  return new Promise(resolve => setTimeout(() => resolve(), timeout));
@@ -9894,6 +10086,11 @@ function isObjectEmpty(obj) {
9894
10086
  return true;
9895
10087
  }
9896
10088
 
10089
+ ;// CONCATENATED MODULE: ./src/utils/urlRegexp.ts
10090
+ const urlRegexp =
10091
+ // eslint-disable-next-line optimize-regex/optimize-regex
10092
+ /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\\[\]{};:'".,<>?«»“”‘’]))/i;
10093
+
9897
10094
  ;// CONCATENATED MODULE: ./src/utils/index.ts
9898
10095
 
9899
10096
 
@@ -9902,6 +10099,7 @@ function isObjectEmpty(obj) {
9902
10099
 
9903
10100
 
9904
10101
 
10102
+
9905
10103
 
9906
10104
  ;// CONCATENATED MODULE: ./src/mixins/validate.mixin.ts
9907
10105
  var validate_mixin_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -10221,6 +10419,7 @@ const ActiveDirectiveOptions = {
10221
10419
 
10222
10420
 
10223
10421
 
10422
+
10224
10423
 
10225
10424
 
10226
10425
  const ldmuiPlugin = {
@@ -10249,6 +10448,7 @@ const ldmuiPlugin = {
10249
10448
  'ld-select': options.aliases?.['ld-select'] ?? 'ld-select',
10250
10449
  'ld-combobox': options.aliases?.['ld-combobox'] ?? 'ld-combobox',
10251
10450
  'ld-timepicker': options.aliases?.['ld-timepicker'] ?? 'ld-timepicker',
10451
+ 'ld-text-viewer': options.aliases?.['ld-text-viewer'] ?? 'ld-text-viewer',
10252
10452
  };
10253
10453
  vue.config.globalProperties.$utils = {
10254
10454
  ...utils_namespaceObject,
@@ -10283,6 +10483,7 @@ const ldmuiPlugin = {
10283
10483
  src_ld_select(vue, options);
10284
10484
  src_ld_combobox(vue, options);
10285
10485
  src_ld_timepicker(vue, options);
10486
+ src_ld_text_viewer(vue, options);
10286
10487
  },
10287
10488
  };
10288
10489
  /* harmony default export */ const src = (ldmuiPlugin);
@@ -19,6 +19,7 @@ export interface ldmuiOptions {
19
19
  'ld-select'?: string;
20
20
  'ld-combobox'?: string;
21
21
  'ld-timepicker'?: string;
22
+ 'ld-text-viewer'?: string;
22
23
  },
23
24
  viewport?: {
24
25
  isMobile: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldmjs/ui",
3
- "version": "1.0.0-dev-21",
3
+ "version": "1.0.0-dev-22",
4
4
  "description": "ldm ui",
5
5
  "main": "dist/index.js",
6
6
  "engines": {