@cgboiler/biz-mobile 1.18.5-beta → 1.18.7

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,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
  var stdin_exports = {};
29
19
  __export(stdin_exports, {
@@ -33,12 +23,9 @@ module.exports = __toCommonJS(stdin_exports);
33
23
  var import_vue = require("vue");
34
24
  var import_atomic = require("./_atomic.css");
35
25
  var import_vue2 = require("vue");
36
- var import_starter_kit = __toESM(require("@tiptap/starter-kit"));
37
- var import_vue_3 = require("@tiptap/vue-3");
38
- var import_extension_table = require("@tiptap/extension-table");
39
- var import_extensions = require("@tiptap/extensions");
40
26
  var import_types = require("./types");
41
27
  var import_index = require("./index.css");
28
+ var import_biz_basic = require("@cgboiler/biz-basic");
42
29
  var stdin_default = (0, import_vue2.defineComponent)({
43
30
  name: "RichTextEditor",
44
31
  props: import_types.richTextEditorProps,
@@ -46,62 +33,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
46
33
  setup(props, {
47
34
  emit
48
35
  }) {
49
- const editor = (0, import_vue2.ref)();
50
- const addTableRow = () => {
51
- var _a;
52
- (_a = editor.value) == null ? void 0 : _a.chain().focus().addRowAfter().run();
53
- };
54
- const deleteTableRow = () => {
55
- var _a;
56
- (_a = editor.value) == null ? void 0 : _a.chain().focus().deleteRow().run();
57
- };
58
- const setTextFormat = (level) => {
59
- var _a, _b;
60
- if (level === 0) {
61
- (_a = editor.value) == null ? void 0 : _a.chain().focus().setParagraph().run();
62
- } else {
63
- (_b = editor.value) == null ? void 0 : _b.chain().focus().toggleHeading({
64
- level
65
- }).run();
66
- }
67
- };
68
- const showTableButtons = (0, import_vue2.ref)(false);
69
- (0, import_vue2.onMounted)(() => {
70
- editor.value = new import_vue_3.Editor({
71
- extensions: [import_starter_kit.default, import_extension_table.TableKit.configure({
72
- table: {
73
- resizable: true
74
- }
75
- }), import_extensions.Placeholder.configure({
76
- placeholder: props.placeholder
77
- })],
78
- content: props.modelValue,
79
- onUpdate: ({
80
- editor: editor2
81
- }) => {
82
- const html = editor2.getHTML();
83
- emit("update:modelValue", html);
84
- },
85
- onSelectionUpdate: ({
86
- editor: editor2
87
- }) => {
88
- showTableButtons.value = editor2.isActive("table");
89
- }
90
- });
91
- });
92
- (0, import_vue2.watch)(() => props.modelValue, (newValue) => {
93
- var _a, _b;
94
- if (((_a = editor.value) == null ? void 0 : _a.getHTML()) !== newValue) {
95
- (_b = editor.value) == null ? void 0 : _b.commands.setContent(newValue || "");
96
- }
97
- });
98
- (0, import_vue2.onBeforeUnmount)(() => {
99
- var _a;
100
- (_a = editor.value) == null ? void 0 : _a.destroy();
101
- });
102
- return () => (0, import_vue.createVNode)(import_vue_3.EditorContent, {
103
- "class": "ProseMirror",
104
- "editor": editor.value
36
+ return () => (0, import_vue.createVNode)(import_biz_basic.RichTextEditor, {
37
+ "modelValue": props.modelValue,
38
+ "onUpdate:modelValue": (val) => emit("update:modelValue", val),
39
+ "placeholder": props.placeholder
105
40
  }, null);
106
41
  }
107
42
  });
@@ -30,5 +30,3 @@
30
30
  flex-wrap: wrap;
31
31
  }
32
32
 
33
- /* layer: default */
34
- .cgx-atm .table{display:table;}
@@ -1 +0,0 @@
1
- .ProseMirror{flex:1;overflow:auto;outline:none;line-height:1.6;font-size:var(--font-base);--white: #fff;--black: #2e2b29;--black-contrast: #110f0e;--gray-1: rgba(61, 37, 20, .05);--gray-2: rgba(61, 37, 20, .08);--gray-3: rgba(61, 37, 20, .12);--gray-4: rgba(53, 38, 28, .3);--gray-5: rgba(28, 25, 23, .6);--green: #22c55e;--purple: #6a00f5;--purple-contrast: #5800cc;--purple-light: rgba(88, 5, 255, .05);--yellow-contrast: #facc15;--yellow: rgba(250, 204, 21, .4);--yellow-light: #fffae5;--red: #ff5c33;--red-light: #ffebe5;--shadow: 0px 12px 33px 0px rgba(0, 0, 0, .06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)}.ProseMirror :first-child{margin-top:0}.ProseMirror ul,.ProseMirror ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem}.ProseMirror ul li p,.ProseMirror ol li p{margin-top:.25em;margin-bottom:.25em}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}.ProseMirror h1,.ProseMirror h2{margin-top:3.5rem;margin-bottom:1.5rem}.ProseMirror h1{font-size:1.4rem}.ProseMirror h2{font-size:1.2rem}.ProseMirror h3{font-size:1.1rem}.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{font-size:1rem}.ProseMirror code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}.ProseMirror pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem}.ProseMirror pre code{background:none;color:inherit;font-size:.8rem;padding:0}.ProseMirror blockquote{border-left:3px solid var(--gray-3);margin:1.5rem 0;padding-left:1rem}.ProseMirror hr{border:none;border-top:1px solid var(--gray-2);margin:2rem 0}.ProseMirror p.is-editor-empty:first-child:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror .is-empty:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}.ProseMirror table td,.ProseMirror table th{border:1px solid var(--gray-3);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}.ProseMirror table td>*,.ProseMirror table th>*{margin-bottom:0}.ProseMirror table th{background-color:var(--gray-1);font-weight:700;text-align:left}.ProseMirror table .selectedCell:after{background:var(--gray-2);content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}.ProseMirror table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}.ProseMirror .tableWrapper{margin:1.5rem 0;overflow-x:auto}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}
@@ -1,191 +0,0 @@
1
- .ProseMirror {
2
- flex: 1;
3
- overflow: auto;
4
- outline: none;
5
-
6
- line-height: 1.6;
7
- font-size: var(--font-base);
8
- --white: #fff;
9
- --black: #2e2b29;
10
- --black-contrast: #110f0e;
11
- --gray-1: rgba(61, 37, 20, 0.05);
12
- --gray-2: rgba(61, 37, 20, 0.08);
13
- --gray-3: rgba(61, 37, 20, 0.12);
14
- --gray-4: rgba(53, 38, 28, 0.3);
15
- --gray-5: rgba(28, 25, 23, 0.6);
16
- --green: #22c55e;
17
- --purple: #6a00f5;
18
- --purple-contrast: #5800cc;
19
- --purple-light: rgba(88, 5, 255, 0.05);
20
- --yellow-contrast: #facc15;
21
- --yellow: rgba(250, 204, 21, 0.4);
22
- --yellow-light: #fffae5;
23
- --red: #ff5c33;
24
- --red-light: #ffebe5;
25
- --shadow: 0px 12px 33px 0px rgba(0, 0, 0, 0.06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, 0.04);
26
- :first-child {
27
- margin-top: 0;
28
- }
29
-
30
- /* List styles */
31
- ul,
32
- ol {
33
- padding: 0 1rem;
34
- margin: 1.25rem 1rem 1.25rem 0.4rem;
35
-
36
- li p {
37
- margin-top: 0.25em;
38
- margin-bottom: 0.25em;
39
- }
40
- }
41
-
42
- /* Heading styles */
43
- h1,
44
- h2,
45
- h3,
46
- h4,
47
- h5,
48
- h6 {
49
- line-height: 1.1;
50
- margin-top: 2.5rem;
51
- text-wrap: pretty;
52
- }
53
-
54
- h1,
55
- h2 {
56
- margin-top: 3.5rem;
57
- margin-bottom: 1.5rem;
58
- }
59
-
60
- h1 {
61
- font-size: 1.4rem;
62
- }
63
-
64
- h2 {
65
- font-size: 1.2rem;
66
- }
67
-
68
- h3 {
69
- font-size: 1.1rem;
70
- }
71
-
72
- h4,
73
- h5,
74
- h6 {
75
- font-size: 1rem;
76
- }
77
-
78
- /* Code and preformatted text styles */
79
- code {
80
- background-color: var(--purple-light);
81
- border-radius: 0.4rem;
82
- color: var(--black);
83
- font-size: 0.85rem;
84
- padding: 0.25em 0.3em;
85
- }
86
-
87
- pre {
88
- background: var(--black);
89
- border-radius: 0.5rem;
90
- color: var(--white);
91
- font-family: 'JetBrainsMono', monospace;
92
- margin: 1.5rem 0;
93
- padding: 0.75rem 1rem;
94
-
95
- code {
96
- background: none;
97
- color: inherit;
98
- font-size: 0.8rem;
99
- padding: 0;
100
- }
101
- }
102
-
103
- blockquote {
104
- border-left: 3px solid var(--gray-3);
105
- margin: 1.5rem 0;
106
- padding-left: 1rem;
107
- }
108
-
109
- hr {
110
- border: none;
111
- border-top: 1px solid var(--gray-2);
112
- margin: 2rem 0;
113
- }
114
-
115
- /* Placeholder (at the top) */
116
- p.is-editor-empty:first-child::before {
117
- color: var(--gray-4);
118
- content: attr(data-placeholder);
119
- float: left;
120
- height: 0;
121
- pointer-events: none;
122
- }
123
-
124
- .is-empty::before {
125
- color: var(--gray-4);
126
- content: attr(data-placeholder);
127
- float: left;
128
- height: 0;
129
- pointer-events: none;
130
- }
131
- /* Table-specific styling */
132
- table {
133
- border-collapse: collapse;
134
- margin: 0;
135
- overflow: hidden;
136
- table-layout: fixed;
137
- width: 100%;
138
-
139
- td,
140
- th {
141
- border: 1px solid var(--gray-3);
142
- box-sizing: border-box;
143
- min-width: 1em;
144
- padding: 6px 8px;
145
- position: relative;
146
- vertical-align: top;
147
-
148
- > * {
149
- margin-bottom: 0;
150
- }
151
- }
152
-
153
- th {
154
- background-color: var(--gray-1);
155
- font-weight: bold;
156
- text-align: left;
157
- }
158
-
159
- .selectedCell:after {
160
- background: var(--gray-2);
161
- content: '';
162
- left: 0;
163
- right: 0;
164
- top: 0;
165
- bottom: 0;
166
- pointer-events: none;
167
- position: absolute;
168
- z-index: 2;
169
- }
170
-
171
- .column-resize-handle {
172
- background-color: var(--purple);
173
- bottom: -2px;
174
- pointer-events: none;
175
- position: absolute;
176
- right: -2px;
177
- top: 0;
178
- width: 4px;
179
- }
180
- }
181
-
182
- .tableWrapper {
183
- margin: 1.5rem 0;
184
- overflow-x: auto;
185
- }
186
-
187
- &.resize-cursor {
188
- cursor: ew-resize;
189
- cursor: col-resize;
190
- }
191
- }
package/package.json CHANGED
@@ -1,69 +1,69 @@
1
- {
2
- "name": "@cgboiler/biz-mobile",
3
- "version": "1.18.5-beta",
4
- "description": "",
5
- "main": "lib/index.js",
6
- "module": "es/index.js",
7
- "style": "lib/index.css",
8
- "typings": "lib/index.d.ts",
9
- "files": [
10
- "lib",
11
- "es"
12
- ],
13
- "scripts": {
14
- "dev": "cg-cli dev",
15
- "test": "cg-cli test",
16
- "lint": "cg-cli lint",
17
- "build": "cg-cli build",
18
- "build-npm": "cg-cli build",
19
- "release": "cg-cli release",
20
- "test:coverage": "open test/coverage/index.html",
21
- "build-site": "cg-cli build-site",
22
- "changelog": "cg-cli changelog",
23
- "duero-config": "echo 'Do not need duero config'"
24
- },
25
- "author": "dongcg",
26
- "publishConfig": {
27
- "access": "public",
28
- "registry": "https://registry.npmjs.org/"
29
- },
30
- "license": "MIT",
31
- "repository": "https://gitlab.cgboiler.com/front/cg-biz",
32
- "homepage": "https://gitlab.cgboiler.com/front/cg-biz",
33
- "bugs": "https://gitlab.cgboiler.com/front/cg-biz/-/issues",
34
- "lint-staged": {
35
- "*.md": "prettier --write",
36
- "*.{ts,tsx,js,vue,less,scss}": "prettier --write",
37
- "*.{ts,tsx,js,vue}": "eslint --fix",
38
- "*.{vue,css,less,scss}": "stylelint --fix"
39
- },
40
- "peerDependencies": {
41
- "vue": "^3.2.26"
42
- },
43
- "devDependencies": {
44
- "@cgboiler/cli": "workspace:*",
45
- "@types/lodash-es": "^4.17.12",
46
- "@types/node": "^22.9.3",
47
- "@vue/test-utils": "^2.4.6",
48
- "prettier": "^2.4.1",
49
- "typescript": "^5.6.3",
50
- "vue": "^3.5.13"
51
- },
52
- "browserslist": [
53
- "Chrome >= 51",
54
- "iOS >= 10"
55
- ],
56
- "dependencies": {
57
- "@cgboiler/core": "workspace:*",
58
- "@cgboiler/shared": "workspace:*",
59
- "@cgboiler/biz-basic": "workspace:*",
60
- "@tiptap/extension-collaboration": "3.0.0-beta.16",
61
- "@tiptap/extension-table": "3.0.0-beta.5",
62
- "@tiptap/extensions": "3.0.0-beta.5",
63
- "@tiptap/pm": "3.0.0-beta.5",
64
- "@tiptap/starter-kit": "3.0.0-beta.5",
65
- "@tiptap/vue-3": "3.0.0-beta.5",
66
- "lodash-es": "^4.17.21",
67
- "vant": "^4.9.19"
68
- }
1
+ {
2
+ "name": "@cgboiler/biz-mobile",
3
+ "version": "1.18.7",
4
+ "description": "",
5
+ "main": "lib/index.js",
6
+ "module": "es/index.js",
7
+ "style": "lib/index.css",
8
+ "typings": "lib/index.d.ts",
9
+ "files": [
10
+ "lib",
11
+ "es"
12
+ ],
13
+ "author": "dongcg",
14
+ "publishConfig": {
15
+ "access": "public",
16
+ "registry": "https://registry.npmjs.org/"
17
+ },
18
+ "license": "MIT",
19
+ "repository": "https://gitlab.cgboiler.com/front/cg-biz",
20
+ "homepage": "https://gitlab.cgboiler.com/front/cg-biz",
21
+ "bugs": "https://gitlab.cgboiler.com/front/cg-biz/-/issues",
22
+ "lint-staged": {
23
+ "*.md": "prettier --write",
24
+ "*.{ts,tsx,js,vue,less,scss}": "prettier --write",
25
+ "*.{ts,tsx,js,vue}": "eslint --fix",
26
+ "*.{vue,css,less,scss}": "stylelint --fix"
27
+ },
28
+ "peerDependencies": {
29
+ "vue": "^3.2.26"
30
+ },
31
+ "devDependencies": {
32
+ "@types/lodash-es": "^4.17.12",
33
+ "@types/node": "^22.9.3",
34
+ "@vue/test-utils": "^2.4.6",
35
+ "prettier": "^2.4.1",
36
+ "typescript": "^5.6.3",
37
+ "vue": "^3.5.13",
38
+ "@cgboiler/cli": "0.0.1-beta1"
39
+ },
40
+ "browserslist": [
41
+ "Chrome >= 51",
42
+ "iOS >= 10"
43
+ ],
44
+ "dependencies": {
45
+ "@cgboiler/biz-basic": "^1.0.10",
46
+ "@tiptap/extension-collaboration": "3.0.0-beta.16",
47
+ "@tiptap/extension-table": "3.0.0-beta.5",
48
+ "@tiptap/extensions": "3.0.0-beta.5",
49
+ "@tiptap/pm": "3.0.0-beta.5",
50
+ "@tiptap/starter-kit": "3.0.0-beta.5",
51
+ "@tiptap/vue-3": "3.0.0-beta.5",
52
+ "lodash-es": "^4.17.21",
53
+ "vant": "^4.9.19",
54
+ "@cgboiler/shared": "1.1.1",
55
+ "@cgboiler/core": "1.2.6"
56
+ },
57
+ "scripts": {
58
+ "dev": "cg-cli dev",
59
+ "test": "cg-cli test",
60
+ "lint": "cg-cli lint",
61
+ "build": "cg-cli build",
62
+ "build-npm": "cg-cli build",
63
+ "release": "cg-cli release",
64
+ "test:coverage": "open test/coverage/index.html",
65
+ "build-site": "cg-cli build-site",
66
+ "changelog": "cg-cli changelog",
67
+ "duero-config": "echo 'Do not need duero config'"
68
+ }
69
69
  }