@ibiz-template/vue3-components 0.7.24-alpha.1 → 0.7.24-alpha.2

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.
Files changed (51) hide show
  1. package/dist/{index-d_MgYoar.js → index--XeT2CTZ.js} +1 -1
  2. package/dist/index-UoIBnm4j.js +4 -0
  3. package/dist/{index-3r8aPzsK.js → index-_h-elF6t.js} +1 -1
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/{xlsx-util-B5sYgU54.js → xlsx-util-mYK_A5hQ.js} +1 -1
  7. package/es/control/data-view/data-view.css +1 -1
  8. package/es/control/data-view/data-view.d.ts +1 -0
  9. package/es/control/data-view/data-view.mjs +35 -5
  10. package/es/control/data-view/index.d.ts +1 -0
  11. package/es/control/drtab/drtab-control.util.d.ts +17 -0
  12. package/es/control/drtab/drtab-control.util.mjs +115 -0
  13. package/es/control/drtab/drtab.controller.d.ts +7 -0
  14. package/es/control/drtab/drtab.controller.mjs +13 -0
  15. package/es/control/drtab/drtab.css +1 -1
  16. package/es/control/drtab/drtab.d.ts +4 -0
  17. package/es/control/drtab/drtab.mjs +94 -33
  18. package/es/control/drtab/index.d.ts +4 -0
  19. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +1 -0
  20. package/es/control/grid/grid/grid-control.util.mjs +3 -1
  21. package/es/control/grid/grid/grid.css +1 -1
  22. package/es/control/grid/grid/grid.d.ts +3 -0
  23. package/es/control/grid/grid/grid.mjs +43 -4
  24. package/es/control/grid/grid/index.d.ts +3 -0
  25. package/es/control/list/index.d.ts +1 -0
  26. package/es/control/list/list.css +1 -1
  27. package/es/control/list/list.d.ts +1 -0
  28. package/es/control/list/list.mjs +35 -7
  29. package/es/editor/switch/ibiz-switch/ibiz-switch.mjs +7 -2
  30. package/es/locale/en/index.d.ts +2 -1
  31. package/es/locale/en/index.mjs +2 -1
  32. package/es/locale/zh-CN/index.d.ts +2 -1
  33. package/es/locale/zh-CN/index.mjs +2 -1
  34. package/es/node_modules/.pnpm/@ibiz-template_core@0.7.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +218 -0
  35. package/lib/control/data-view/data-view.cjs +34 -4
  36. package/lib/control/data-view/data-view.css +1 -1
  37. package/lib/control/drtab/drtab-control.util.cjs +117 -0
  38. package/lib/control/drtab/drtab.cjs +93 -32
  39. package/lib/control/drtab/drtab.controller.cjs +13 -0
  40. package/lib/control/drtab/drtab.css +1 -1
  41. package/lib/control/grid/grid/grid-control.util.cjs +3 -1
  42. package/lib/control/grid/grid/grid.cjs +42 -3
  43. package/lib/control/grid/grid/grid.css +1 -1
  44. package/lib/control/list/list.cjs +34 -6
  45. package/lib/control/list/list.css +1 -1
  46. package/lib/editor/switch/ibiz-switch/ibiz-switch.cjs +6 -1
  47. package/lib/locale/en/index.cjs +2 -1
  48. package/lib/locale/zh-CN/index.cjs +2 -1
  49. package/lib/node_modules/.pnpm/@ibiz-template_core@0.7.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +221 -0
  50. package/package.json +6 -6
  51. package/dist/index-O0hiquCe.js +0 -4
@@ -0,0 +1,221 @@
1
+ 'use strict';
2
+
3
+ const defaultNamespace = 'ibiz';
4
+ const statePrefix = 'is-';
5
+ /**
6
+ * css bem 命名规则拼接
7
+ * _bem('ibiz', 'layout') => ibiz-layout
8
+ * _bem('ibiz', 'layout', '', 'title') => ibiz-layout__title
9
+ * _bem('ibiz', 'layout', '', '', 'right') => ibiz-layout--right
10
+ * _bem('ibiz', 'layout', '', 'title', 'right') => ibiz-layout__title--right
11
+ * _bem('ibiz', 'layout', 'header', 'title', 'right') => ibiz-layout-header__title--right
12
+ *
13
+ * @author chitanda
14
+ * @date 2022-09-06 11:09:42
15
+ * @param {string} namespace 命名空间
16
+ * @param {string} block 块
17
+ * @param {string} blockSuffix 块后缀
18
+ * @param {string} element 元素
19
+ * @param {string} modifier 修饰符
20
+ * @return {*} {string}
21
+ */
22
+ function _bem(namespace, block, blockSuffix, element, modifier) {
23
+ let cls = `${namespace}-${block}`;
24
+ if (blockSuffix) {
25
+ cls += `-${blockSuffix}`;
26
+ }
27
+ if (element) {
28
+ cls += `__${element}`;
29
+ }
30
+ if (modifier) {
31
+ cls += `--${modifier}`;
32
+ }
33
+ return cls;
34
+ }
35
+ /**
36
+ * 全局样式处理命名空间
37
+ *
38
+ * @author chitanda
39
+ * @date 2022-09-06 11:09:50
40
+ * @export
41
+ * @class Namespace
42
+ */
43
+ class Namespace {
44
+ /**
45
+ * Creates an instance of Namespace.
46
+ *
47
+ * @author chitanda
48
+ * @date 2022-09-06 12:09:12
49
+ * @param {string} block 当前命名空间的根模块,例如组件的名称
50
+ * @param {string} [namespace] 指定命名空间,未指定使用默认值 ibiz
51
+ */
52
+ constructor(block, namespace) {
53
+ this.block = block;
54
+ this.namespace = namespace || defaultNamespace;
55
+ }
56
+ /**
57
+ * namespace-block
58
+ * namespace-block-blockSuffix
59
+ *
60
+ * @author chitanda
61
+ * @date 2022-09-06 12:09:08
62
+ * @param {string} [blockSuffix='']
63
+ * @return {*} {string}
64
+ */
65
+ b(blockSuffix = '') {
66
+ return _bem(this.namespace, this.block, blockSuffix, '', '');
67
+ }
68
+ /**
69
+ * namespace-block__element
70
+ *
71
+ * @author chitanda
72
+ * @date 2022-09-06 12:09:48
73
+ * @param {string} [element]
74
+ * @return {*} {string}
75
+ */
76
+ e(element) {
77
+ return element ? _bem(this.namespace, this.block, '', element, '') : '';
78
+ }
79
+ /**
80
+ * namespace-block--modifier
81
+ *
82
+ * @author chitanda
83
+ * @date 2022-09-06 12:09:37
84
+ * @param {string} [modifier]
85
+ * @return {*} {string}
86
+ */
87
+ m(modifier) {
88
+ return modifier ? _bem(this.namespace, this.block, '', '', modifier) : '';
89
+ }
90
+ /**
91
+ * namespace-block-blockSuffix__element
92
+ *
93
+ * @author chitanda
94
+ * @date 2022-09-06 12:09:52
95
+ * @param {string} [blockSuffix]
96
+ * @param {string} [element]
97
+ * @return {*} {string}
98
+ */
99
+ be(blockSuffix, element) {
100
+ return blockSuffix && element
101
+ ? _bem(this.namespace, this.block, blockSuffix, element, '')
102
+ : '';
103
+ }
104
+ /**
105
+ * namespace-block__element--modifier
106
+ *
107
+ * @author chitanda
108
+ * @date 2022-09-06 12:09:19
109
+ * @param {string} [element]
110
+ * @param {string} [modifier]
111
+ * @return {*} {string}
112
+ */
113
+ em(element, modifier) {
114
+ return element && modifier
115
+ ? _bem(this.namespace, this.block, '', element, modifier)
116
+ : '';
117
+ }
118
+ /**
119
+ * namespace-block-blockSuffix--modifier
120
+ *
121
+ * @author chitanda
122
+ * @date 2022-09-06 12:09:59
123
+ * @param {string} [blockSuffix]
124
+ * @param {string} [modifier]
125
+ * @return {*} {string}
126
+ */
127
+ bm(blockSuffix, modifier) {
128
+ return blockSuffix && modifier
129
+ ? _bem(this.namespace, this.block, blockSuffix, '', modifier)
130
+ : '';
131
+ }
132
+ /**
133
+ * namespace-block-blockSuffix__element--modifier
134
+ *
135
+ * @author chitanda
136
+ * @date 2022-09-06 12:09:37
137
+ * @param {string} [blockSuffix]
138
+ * @param {string} [element]
139
+ * @param {string} [modifier]
140
+ * @return {*} {string}
141
+ */
142
+ bem(blockSuffix, element, modifier) {
143
+ return blockSuffix && element && modifier
144
+ ? _bem(this.namespace, this.block, blockSuffix, element, modifier)
145
+ : '';
146
+ }
147
+ /**
148
+ * 返回状态 class
149
+ *
150
+ * is('loading', false) => '';
151
+ * is('loading', true) => 'is-loading';
152
+ *
153
+ * @author chitanda
154
+ * @date 2022-09-06 12:09:57
155
+ * @param {string} name
156
+ * @param {boolean} [state]
157
+ * @return {*} {string}
158
+ */
159
+ is(name, state) {
160
+ return name && state ? `${statePrefix}${name}` : '';
161
+ }
162
+ /**
163
+ * 生成使用到的 css 变量 style 对象
164
+ *
165
+ * @author chitanda
166
+ * @date 2022-09-06 15:09:41
167
+ * @param {Record<string, string>} object
168
+ * @return {*} {Record<string, string>}
169
+ */
170
+ cssVar(object) {
171
+ const styles = {};
172
+ for (const key in object) {
173
+ if (object[key]) {
174
+ styles[this.cssVarName(key)] = object[key];
175
+ }
176
+ }
177
+ return styles;
178
+ }
179
+ /**
180
+ * 生成使用到的 css block 变量 style 对象
181
+ *
182
+ * @author chitanda
183
+ * @date 2022-09-06 15:09:03
184
+ * @param {Record<string, string>} object
185
+ * @return {*} {Record<string, string>}
186
+ */
187
+ cssVarBlock(object) {
188
+ const styles = {};
189
+ for (const key in object) {
190
+ if (object[key]) {
191
+ styles[this.cssVarBlockName(key)] = object[key];
192
+ }
193
+ }
194
+ return styles;
195
+ }
196
+ /**
197
+ * 生成 css var 变量名称
198
+ *
199
+ * @author chitanda
200
+ * @date 2022-09-06 15:09:21
201
+ * @param {string} name
202
+ * @return {*} {string}
203
+ */
204
+ cssVarName(name) {
205
+ return `--${this.namespace}-${name}`;
206
+ }
207
+ /**
208
+ * 生成块 css var 变量名称
209
+ *
210
+ * @author chitanda
211
+ * @date 2022-09-06 15:09:35
212
+ * @param {string} name
213
+ * @return {*} {string}
214
+ */
215
+ cssVarBlockName(name) {
216
+ return `--${this.namespace}-${this.block}-${name}`;
217
+ }
218
+ }
219
+
220
+ exports.Namespace = Namespace;
221
+ exports.defaultNamespace = defaultNamespace;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.24-alpha.1",
3
+ "version": "0.7.24-alpha.2",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -32,12 +32,12 @@
32
32
  "@ibiz-template-plugin/gantt": "0.1.8-alpha.3",
33
33
  "@ibiz-template/core": "0.7.18",
34
34
  "@ibiz-template/devtool": "0.0.1-dev.6",
35
- "@ibiz-template/model-helper": "0.7.24-alpha.0",
36
- "@ibiz-template/runtime": "0.7.24-alpha.0",
35
+ "@ibiz-template/model-helper": "0.7.24-alpha.1",
36
+ "@ibiz-template/runtime": "0.7.24-alpha.1",
37
37
  "@ibiz-template/theme": "^0.7.0",
38
- "@ibiz-template/vue3-util": "0.7.24-alpha.0",
38
+ "@ibiz-template/vue3-util": "0.7.24-alpha.1",
39
39
  "@ibiz-template/web-theme": "^1.1.18",
40
- "@ibiz/model-core": "^0.1.30",
40
+ "@ibiz/model-core": "^0.1.32",
41
41
  "@imengyu/vue3-context-menu": "^1.3.5",
42
42
  "@monaco-editor/loader": "^1.4.0",
43
43
  "@wangeditor/editor": "^5.1.23",
@@ -101,7 +101,7 @@
101
101
  "@ibiz-template/runtime": "^0.7.0",
102
102
  "@ibiz-template/theme": "^0.7.0",
103
103
  "@ibiz-template/vue3-util": "^0.7.0",
104
- "@ibiz/model-core": "^0.1.30",
104
+ "@ibiz/model-core": "^0.1.32",
105
105
  "@imengyu/vue3-context-menu": "^1.3.3",
106
106
  "@monaco-editor/loader": "^1.3.3",
107
107
  "@wangeditor/editor": "^5.1.23",