@zeedhi/zd-richtext-vue 1.1.0 → 1.1.3

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
- import { Prop, Component } from 'vue-property-decorator';
2
- import { RichText } from '@zeedhi/zd-richtext-common';
3
- import { ZdComponentRender, Vuetify } from '@zeedhi/vuetify';
4
1
  import Vue from 'vue';
2
+ import { PropWatch, ZdComponentRender, Vuetify } from '@zeedhi/vuetify';
3
+ import { Component } from 'vue-property-decorator';
4
+ import { RichText } from '@zeedhi/zd-richtext-common';
5
5
  import 'tiptap-vuetify/dist/main.css';
6
6
 
7
7
  /*! *****************************************************************************
@@ -30,7 +30,7 @@ function __metadata(metadataKey, metadataValue) {
30
30
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
31
31
  }
32
32
 
33
- const { Bold, Italic, Strike, Underline, Code, ListItem, BulletList, OrderedList, HorizontalRule, Heading } = require('tiptap-vuetify');
33
+ const { Bold, Italic, Strike, Underline, Code, ListItem, BulletList, OrderedList, HorizontalRule, Heading, } = require('tiptap-vuetify');
34
34
  let ZdRichText = class ZdRichText extends ZdComponentRender {
35
35
  constructor() {
36
36
  super(...arguments);
@@ -42,15 +42,15 @@ let ZdRichText = class ZdRichText extends ZdComponentRender {
42
42
  [Heading,
43
43
  {
44
44
  options: {
45
- levels: [1, 2, 3]
46
- }
47
- }
45
+ levels: [1, 2, 3],
46
+ },
47
+ },
48
48
  ],
49
49
  Code,
50
50
  HorizontalRule,
51
51
  ListItem,
52
52
  BulletList,
53
- OrderedList
53
+ OrderedList,
54
54
  ];
55
55
  this.instanceType = RichText;
56
56
  }
@@ -59,35 +59,35 @@ let ZdRichText = class ZdRichText extends ZdComponentRender {
59
59
  }
60
60
  };
61
61
  __decorate([
62
- Prop({ type: String, default: 'json' }),
62
+ PropWatch({ type: String, default: 'json' }),
63
63
  __metadata("design:type", String)
64
64
  ], ZdRichText.prototype, "outputFormat", void 0);
65
65
  __decorate([
66
- Prop({ type: String, default: '' }),
66
+ PropWatch({ type: String, default: '' }),
67
67
  __metadata("design:type", String)
68
68
  ], ZdRichText.prototype, "placeholder", void 0);
69
69
  __decorate([
70
- Prop({ type: [Boolean, String], default: false }),
70
+ PropWatch({ type: [Boolean, String], default: false }),
71
71
  __metadata("design:type", Object)
72
72
  ], ZdRichText.prototype, "disabled", void 0);
73
73
  __decorate([
74
- Prop({ type: String, default: 'var(--v-primary-base)' }),
74
+ PropWatch({ type: String, default: 'var(--v-primary-base)' }),
75
75
  __metadata("design:type", String)
76
76
  ], ZdRichText.prototype, "toolbarColor", void 0);
77
77
  __decorate([
78
- Prop({ type: String, default: '' }),
78
+ PropWatch({ type: String, default: '' }),
79
79
  __metadata("design:type", String)
80
80
  ], ZdRichText.prototype, "cardColor", void 0);
81
81
  __decorate([
82
- Prop({ type: [Boolean, String], default: false }),
82
+ PropWatch({ type: [Boolean, String], default: false }),
83
83
  __metadata("design:type", Object)
84
84
  ], ZdRichText.prototype, "outlined", void 0);
85
85
  __decorate([
86
- Prop({ type: [Number, String], default: '' }),
86
+ PropWatch({ type: [Number, String], default: '' }),
87
87
  __metadata("design:type", Object)
88
88
  ], ZdRichText.prototype, "width", void 0);
89
89
  __decorate([
90
- Prop({ type: [Number, String], default: '' }),
90
+ PropWatch({ type: [Number, String], default: '' }),
91
91
  __metadata("design:type", Object)
92
92
  ], ZdRichText.prototype, "height", void 0);
93
93
  ZdRichText = __decorate([
@@ -227,37 +227,39 @@ function addStyle(id, css) {
227
227
  const __vue_script__ = script;
228
228
 
229
229
  /* template */
230
- var __vue_render__ = function() {
230
+ var __vue_render__ = function () {
231
231
  var _vm = this;
232
232
  var _h = _vm.$createElement;
233
233
  var _c = _vm._self._c || _h;
234
234
  return _c("tiptap-vuetify", {
235
+ staticClass: "zd-rich-text",
235
236
  attrs: {
237
+ id: _vm.instance.name,
236
238
  "output-format": _vm.instance.outputFormat,
237
239
  extensions: _vm.extensions,
238
240
  "toolbar-attributes": {
239
241
  color: _vm.instance.toolbarColor,
240
242
  class: "rounded-t",
241
- width: _vm.instance.width
243
+ width: _vm.instance.width,
242
244
  },
243
245
  "card-props": {
244
246
  color: _vm.instance.cardColor,
245
247
  class: "rounded-b-md",
246
248
  outlined: _vm.instance.outlined,
247
249
  width: _vm.instance.width,
248
- height: _vm.instance.height
250
+ height: _vm.instance.height,
249
251
  },
250
252
  placeholder: _vm.instance.placeholder,
251
- disabled: _vm.instance.disabled
253
+ disabled: _vm.instance.disabled,
252
254
  },
253
255
  on: { keydown: _vm.onKeyDown },
254
256
  model: {
255
257
  value: _vm.instance.content,
256
- callback: function($$v) {
258
+ callback: function ($$v) {
257
259
  _vm.$set(_vm.instance, "content", $$v);
258
260
  },
259
- expression: "instance.content"
260
- }
261
+ expression: "instance.content",
262
+ },
261
263
  })
262
264
  };
263
265
  var __vue_staticRenderFns__ = [];
@@ -266,7 +268,7 @@ __vue_render__._withStripped = true;
266
268
  /* style */
267
269
  const __vue_inject_styles__ = function (inject) {
268
270
  if (!inject) return
269
- inject("data-v-646cc640_0", { source: "button.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\n}\n\n/*# sourceMappingURL=RichText.vue.map */", map: {"version":3,"sources":["/Users/zedmartins/workfolder/zeedhi/richtext/packages/vue/src/RichText.vue","RichText.vue"],"names":[],"mappings":"AA2BA;EACA,cAAA;AC1BA;;AAEA,uCAAuC","file":"RichText.vue","sourcesContent":["<template>\n <tiptap-vuetify\n v-model=\"instance.content\"\n :output-format=\"instance.outputFormat\"\n :extensions=\"extensions\"\n :toolbar-attributes=\"{\n color: instance.toolbarColor,\n class: 'rounded-t',\n width: instance.width,\n }\"\n :card-props=\"{\n color: instance.cardColor,\n class: 'rounded-b-md',\n outlined: instance.outlined,\n width: instance.width,\n height: instance.height,\n }\"\n :placeholder=\"instance.placeholder\"\n :disabled=\"instance.disabled\"\n @keydown=\"onKeyDown\"\n >\n </tiptap-vuetify>\n</template>\n\n<script lang=\"ts\" src=\"./RichText.ts\"></script>\n\n<style lang=\"scss\">\nbutton.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\n}\n</style>","button.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\n}\n\n/*# sourceMappingURL=RichText.vue.map */"]}, media: undefined });
271
+ inject("data-v-42bd6876_0", { source: ".zd-rich-text button.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\n}\n.zd-rich-text div.v-card {\n display: flex;\n flex-direction: column;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__toolbar {\n display: flex;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content {\n flex-grow: 1;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content .ProseMirror {\n margin: var(--spacing-2) !important;\n height: 100%;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content .ProseMirror p {\n margin-top: var(--spacing-2) !important;\n margin-bottom: var(--spacing-2) !important;\n}", map: undefined, media: undefined });
270
272
 
271
273
  };
272
274
  /* scoped */
@@ -298,8 +300,8 @@ const TiptapVuetify = require('tiptap-vuetify');
298
300
  // tiptap-vuetify
299
301
  Vue.use(TiptapVuetify.TiptapVuetifyPlugin, {
300
302
  vuetify: new Vuetify(),
301
- iconsGroup: 'mdi'
303
+ iconsGroup: 'mdi',
302
304
  });
303
305
  Vue.component('tiptap-vuetify', TiptapVuetify.TiptapVuetify);
304
306
 
305
- export { __vue_component__ as RichText };
307
+ export { __vue_component__ as ZdRichText };
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue-property-decorator'), require('@zeedhi/zd-richtext-common'), require('@zeedhi/vuetify'), require('vue'), require('tiptap-vuetify/dist/main.css')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'vue-property-decorator', '@zeedhi/zd-richtext-common', '@zeedhi/vuetify', 'vue', 'tiptap-vuetify/dist/main.css'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-richtext-vue"] = {}, global["vue-property-decorator"], global["@zeedhi/zd-richtext-common"], global["@zeedhi/vuetify"], global.vue));
5
- })(this, (function (exports, vuePropertyDecorator, zdRichtextCommon, vuetify, Vue) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@zeedhi/vuetify'), require('vue-property-decorator'), require('@zeedhi/zd-richtext-common'), require('tiptap-vuetify/dist/main.css')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'vue', '@zeedhi/vuetify', 'vue-property-decorator', '@zeedhi/zd-richtext-common', 'tiptap-vuetify/dist/main.css'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@zeedhi/zd-richtext-vue"] = {}, global.vue, global["@zeedhi/vuetify"], global["vue-property-decorator"], global["@zeedhi/zd-richtext-common"]));
5
+ })(this, (function (exports, Vue, vuetify, vuePropertyDecorator, zdRichtextCommon) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -34,7 +34,7 @@
34
34
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
35
35
  }
36
36
 
37
- const { Bold, Italic, Strike, Underline, Code, ListItem, BulletList, OrderedList, HorizontalRule, Heading } = require('tiptap-vuetify');
37
+ const { Bold, Italic, Strike, Underline, Code, ListItem, BulletList, OrderedList, HorizontalRule, Heading, } = require('tiptap-vuetify');
38
38
  let ZdRichText = class ZdRichText extends vuetify.ZdComponentRender {
39
39
  constructor() {
40
40
  super(...arguments);
@@ -46,15 +46,15 @@
46
46
  [Heading,
47
47
  {
48
48
  options: {
49
- levels: [1, 2, 3]
50
- }
51
- }
49
+ levels: [1, 2, 3],
50
+ },
51
+ },
52
52
  ],
53
53
  Code,
54
54
  HorizontalRule,
55
55
  ListItem,
56
56
  BulletList,
57
- OrderedList
57
+ OrderedList,
58
58
  ];
59
59
  this.instanceType = zdRichtextCommon.RichText;
60
60
  }
@@ -63,35 +63,35 @@
63
63
  }
64
64
  };
65
65
  __decorate([
66
- vuePropertyDecorator.Prop({ type: String, default: 'json' }),
66
+ vuetify.PropWatch({ type: String, default: 'json' }),
67
67
  __metadata("design:type", String)
68
68
  ], ZdRichText.prototype, "outputFormat", void 0);
69
69
  __decorate([
70
- vuePropertyDecorator.Prop({ type: String, default: '' }),
70
+ vuetify.PropWatch({ type: String, default: '' }),
71
71
  __metadata("design:type", String)
72
72
  ], ZdRichText.prototype, "placeholder", void 0);
73
73
  __decorate([
74
- vuePropertyDecorator.Prop({ type: [Boolean, String], default: false }),
74
+ vuetify.PropWatch({ type: [Boolean, String], default: false }),
75
75
  __metadata("design:type", Object)
76
76
  ], ZdRichText.prototype, "disabled", void 0);
77
77
  __decorate([
78
- vuePropertyDecorator.Prop({ type: String, default: 'var(--v-primary-base)' }),
78
+ vuetify.PropWatch({ type: String, default: 'var(--v-primary-base)' }),
79
79
  __metadata("design:type", String)
80
80
  ], ZdRichText.prototype, "toolbarColor", void 0);
81
81
  __decorate([
82
- vuePropertyDecorator.Prop({ type: String, default: '' }),
82
+ vuetify.PropWatch({ type: String, default: '' }),
83
83
  __metadata("design:type", String)
84
84
  ], ZdRichText.prototype, "cardColor", void 0);
85
85
  __decorate([
86
- vuePropertyDecorator.Prop({ type: [Boolean, String], default: false }),
86
+ vuetify.PropWatch({ type: [Boolean, String], default: false }),
87
87
  __metadata("design:type", Object)
88
88
  ], ZdRichText.prototype, "outlined", void 0);
89
89
  __decorate([
90
- vuePropertyDecorator.Prop({ type: [Number, String], default: '' }),
90
+ vuetify.PropWatch({ type: [Number, String], default: '' }),
91
91
  __metadata("design:type", Object)
92
92
  ], ZdRichText.prototype, "width", void 0);
93
93
  __decorate([
94
- vuePropertyDecorator.Prop({ type: [Number, String], default: '' }),
94
+ vuetify.PropWatch({ type: [Number, String], default: '' }),
95
95
  __metadata("design:type", Object)
96
96
  ], ZdRichText.prototype, "height", void 0);
97
97
  ZdRichText = __decorate([
@@ -231,37 +231,39 @@
231
231
  const __vue_script__ = script;
232
232
 
233
233
  /* template */
234
- var __vue_render__ = function() {
234
+ var __vue_render__ = function () {
235
235
  var _vm = this;
236
236
  var _h = _vm.$createElement;
237
237
  var _c = _vm._self._c || _h;
238
238
  return _c("tiptap-vuetify", {
239
+ staticClass: "zd-rich-text",
239
240
  attrs: {
241
+ id: _vm.instance.name,
240
242
  "output-format": _vm.instance.outputFormat,
241
243
  extensions: _vm.extensions,
242
244
  "toolbar-attributes": {
243
245
  color: _vm.instance.toolbarColor,
244
246
  class: "rounded-t",
245
- width: _vm.instance.width
247
+ width: _vm.instance.width,
246
248
  },
247
249
  "card-props": {
248
250
  color: _vm.instance.cardColor,
249
251
  class: "rounded-b-md",
250
252
  outlined: _vm.instance.outlined,
251
253
  width: _vm.instance.width,
252
- height: _vm.instance.height
254
+ height: _vm.instance.height,
253
255
  },
254
256
  placeholder: _vm.instance.placeholder,
255
- disabled: _vm.instance.disabled
257
+ disabled: _vm.instance.disabled,
256
258
  },
257
259
  on: { keydown: _vm.onKeyDown },
258
260
  model: {
259
261
  value: _vm.instance.content,
260
- callback: function($$v) {
262
+ callback: function ($$v) {
261
263
  _vm.$set(_vm.instance, "content", $$v);
262
264
  },
263
- expression: "instance.content"
264
- }
265
+ expression: "instance.content",
266
+ },
265
267
  })
266
268
  };
267
269
  var __vue_staticRenderFns__ = [];
@@ -270,7 +272,7 @@
270
272
  /* style */
271
273
  const __vue_inject_styles__ = function (inject) {
272
274
  if (!inject) return
273
- inject("data-v-646cc640_0", { source: "button.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\n}\n\n/*# sourceMappingURL=RichText.vue.map */", map: {"version":3,"sources":["/Users/zedmartins/workfolder/zeedhi/richtext/packages/vue/src/RichText.vue","RichText.vue"],"names":[],"mappings":"AA2BA;EACA,cAAA;AC1BA;;AAEA,uCAAuC","file":"RichText.vue","sourcesContent":["<template>\n <tiptap-vuetify\n v-model=\"instance.content\"\n :output-format=\"instance.outputFormat\"\n :extensions=\"extensions\"\n :toolbar-attributes=\"{\n color: instance.toolbarColor,\n class: 'rounded-t',\n width: instance.width,\n }\"\n :card-props=\"{\n color: instance.cardColor,\n class: 'rounded-b-md',\n outlined: instance.outlined,\n width: instance.width,\n height: instance.height,\n }\"\n :placeholder=\"instance.placeholder\"\n :disabled=\"instance.disabled\"\n @keydown=\"onKeyDown\"\n >\n </tiptap-vuetify>\n</template>\n\n<script lang=\"ts\" src=\"./RichText.ts\"></script>\n\n<style lang=\"scss\">\nbutton.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\n}\n</style>","button.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\n}\n\n/*# sourceMappingURL=RichText.vue.map */"]}, media: undefined });
275
+ inject("data-v-42bd6876_0", { source: ".zd-rich-text button.v-btn.v-btn--icon.v-btn--round.theme--light.v-size--small.tiptap-vuetify-editor__action-render-btn {\n color: #ffffff;\n}\n.zd-rich-text div.v-card {\n display: flex;\n flex-direction: column;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__toolbar {\n display: flex;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content {\n flex-grow: 1;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content .ProseMirror {\n margin: var(--spacing-2) !important;\n height: 100%;\n}\n.zd-rich-text div.v-card div.tiptap-vuetify-editor__content .ProseMirror p {\n margin-top: var(--spacing-2) !important;\n margin-bottom: var(--spacing-2) !important;\n}", map: undefined, media: undefined });
274
276
 
275
277
  };
276
278
  /* scoped */
@@ -302,11 +304,11 @@
302
304
  // tiptap-vuetify
303
305
  Vue__default["default"].use(TiptapVuetify.TiptapVuetifyPlugin, {
304
306
  vuetify: new vuetify.Vuetify(),
305
- iconsGroup: 'mdi'
307
+ iconsGroup: 'mdi',
306
308
  });
307
309
  Vue__default["default"].component('tiptap-vuetify', TiptapVuetify.TiptapVuetify);
308
310
 
309
- exports.RichText = __vue_component__;
311
+ exports.ZdRichText = __vue_component__;
310
312
 
311
313
  Object.defineProperty(exports, '__esModule', { value: true });
312
314
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@zeedhi/zd-richtext-vue",
3
- "version": "1.1.0",
3
+ "version": "1.1.3",
4
4
  "description": "RichTextVue by BVR",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
5
  "main": "dist/rich-text-vue.umd.js",
9
6
  "module": "dist/rich-text-vue.esm.js",
10
7
  "typings": "types/index.d.ts",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
11
  "scripts": {
12
12
  "build": "rollup -c",
13
13
  "lint": "eslint . --ext .ts --fix",
@@ -23,5 +23,5 @@
23
23
  "vue-class-component": "^7.2.6",
24
24
  "vue-property-decorator": "^9.1.2"
25
25
  },
26
- "gitHead": "7f88f3d7f9bc750789f2ecea3b363472c61ee6c4"
26
+ "gitHead": "c98c8914c914ea773b0881c890ae0601361fabcf"
27
27
  }
package/types/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import RichText from './RichText.vue';
1
+ import ZdRichText from './RichText.vue';
2
2
  import 'tiptap-vuetify/dist/main.css';
3
- export { RichText };
3
+ export { ZdRichText };
package/types/public.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import RichText from './RichText';
2
- export { RichText };
1
+ import ZdRichText from './RichText';
2
+ export { ZdRichText };