@gct-paas/core-web 0.1.4-dev.7 → 0.1.4-dev.8

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 (160) hide show
  1. package/dist/index.esm.min.mjs +24472 -7434
  2. package/dist/index.min.cjs +59 -12
  3. package/dist/index.min.css +1 -0
  4. package/dist/index.system.min.js +59 -12
  5. package/es/components/assets-svg-icon/assets-svg-icon.css +188 -0
  6. package/es/components/assets-svg-icon/assets-svg-icon.d.ts +134 -0
  7. package/es/components/assets-svg-icon/assets-svg-icon.mjs +238 -0
  8. package/es/components/assets-svg-icon/request.d.ts +2 -0
  9. package/es/components/assets-svg-icon/request.mjs +51 -0
  10. package/es/components/assets-svg-icon/utils.d.ts +9 -0
  11. package/es/components/assets-svg-icon/utils.mjs +21 -0
  12. package/es/components/assets-svg-icon/validate.d.ts +4 -0
  13. package/es/components/assets-svg-icon/validate.mjs +43 -0
  14. package/es/components/code-editor/code-editor.css +67 -0
  15. package/es/components/code-editor/code-editor.mjs +9 -10
  16. package/es/components/index.d.ts +1 -0
  17. package/es/components/layout/flex-container/flex-container.css +67 -0
  18. package/es/components/layout/view-container/view-container.css +83 -0
  19. package/es/editor/gct-form-check-switch/gct-form-check-switch.d.ts +1 -1
  20. package/es/editor/gct-form-i18n/gct-form-i18n.d.ts +1 -1
  21. package/es/editor/gct-form-info/gct-form-info.d.ts +1 -1
  22. package/es/editor/gct-form-length-unit/gct-form-length-unit.d.ts +1 -1
  23. package/es/editor/gct-form-number/gct-form-number.d.ts +1 -1
  24. package/es/editor/gct-form-radio/gct-form-radio.d.ts +1 -1
  25. package/es/editor/gct-form-select/gct-form-select.d.ts +1 -1
  26. package/es/editor/gct-form-switch/gct-form-switch.d.ts +1 -1
  27. package/es/editor/gct-form-textarea/gct-form-textarea.d.ts +1 -1
  28. package/es/hooks/index.d.ts +2 -0
  29. package/es/hooks/useLocale.d.ts +4 -0
  30. package/es/hooks/useLocale.mjs +32 -0
  31. package/es/hooks/useTheme.d.ts +8 -0
  32. package/es/hooks/useTheme.mjs +20 -0
  33. package/es/index.d.ts +5 -6
  34. package/es/index.mjs +19 -24
  35. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.css +72 -0
  36. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.d.ts +37 -0
  37. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.mjs +195 -0
  38. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.css +79 -0
  39. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.d.ts +29 -0
  40. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.mjs +98 -0
  41. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.css +70 -0
  42. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.d.ts +50 -0
  43. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.mjs +239 -0
  44. package/es/modules/gct-dnd/constants/index.d.ts +24 -0
  45. package/es/modules/gct-dnd/constants/index.mjs +9 -0
  46. package/es/modules/gct-dnd/index.d.ts +5 -0
  47. package/es/modules/gct-dnd/interface/i-gct-dnd-config.d.ts +101 -0
  48. package/es/modules/gct-dnd/interface/i-gct-dnd-data.d.ts +14 -0
  49. package/es/modules/gct-dnd/interface/i-gct-dnd-render-item-options.d.ts +28 -0
  50. package/es/modules/gct-dnd/interface/i-gct-drag-collect.d.ts +24 -0
  51. package/es/modules/gct-dnd/interface/i-gct-drag-dnd-data.d.ts +51 -0
  52. package/es/modules/gct-dnd/interface/i-gct-drop-collect.d.ts +32 -0
  53. package/es/modules/gct-dnd/interface/i-gct-drop-result.d.ts +47 -0
  54. package/es/modules/gct-dnd/interface/index.d.ts +7 -0
  55. package/es/utils/with-install.mjs +0 -1
  56. package/package.json +11 -8
  57. package/dist/index.min.css.css +0 -1
  58. package/es/components/code-editor/code-editor.scss +0 -3
  59. package/es/components/index.mjs +0 -7
  60. package/es/components/layout/flex-container/flex-container.mjs +0 -90
  61. package/es/components/layout/flex-container/flex-container.scss +0 -3
  62. package/es/components/layout/flex-item/flex-item.mjs +0 -53
  63. package/es/components/layout/flex-item/flex-item.scss +0 -17
  64. package/es/components/layout/grid-container/grid-container.mjs +0 -47
  65. package/es/components/layout/view-container/view-container.mjs +0 -39
  66. package/es/components/layout/view-container/view-container.scss +0 -19
  67. package/es/editor/gct-form-check-switch/gct-form-check-switch.mjs +0 -53
  68. package/es/editor/gct-form-check-switch/gct-form-check-switch.provider.mjs +0 -6
  69. package/es/editor/gct-form-check-switch/gct-form-check-switch.scss +0 -10
  70. package/es/editor/gct-form-check-switch/index.mjs +0 -12
  71. package/es/editor/gct-form-checkbox/gct-form-checkbox.mjs +0 -70
  72. package/es/editor/gct-form-checkbox/gct-form-checkbox.scss +0 -56
  73. package/es/editor/gct-form-checkbox/index.mjs +0 -19
  74. package/es/editor/gct-form-color/gct-form-color.mjs +0 -45
  75. package/es/editor/gct-form-color/gct-form-color.provider.mjs +0 -6
  76. package/es/editor/gct-form-color/gct-form-color.scss +0 -3
  77. package/es/editor/gct-form-color/index.mjs +0 -17
  78. package/es/editor/gct-form-field-select/gct-form-field-select.mjs +0 -48
  79. package/es/editor/gct-form-field-select/gct-form-field-select.provider.mjs +0 -6
  80. package/es/editor/gct-form-field-select/gct-form-field-select.scss +0 -7
  81. package/es/editor/gct-form-field-select/gct-model-select.vue +0 -70
  82. package/es/editor/gct-form-field-select/index.mjs +0 -12
  83. package/es/editor/gct-form-i18n/gct-form-i18n.mjs +0 -62
  84. package/es/editor/gct-form-i18n/gct-form-i18n.provider.mjs +0 -6
  85. package/es/editor/gct-form-i18n/index.mjs +0 -12
  86. package/es/editor/gct-form-icon-select/gct-form-icon-select.mjs +0 -74
  87. package/es/editor/gct-form-icon-select/gct-form-icon-select.scss +0 -14
  88. package/es/editor/gct-form-icon-select/index.mjs +0 -14
  89. package/es/editor/gct-form-info/gct-form-info.mjs +0 -40
  90. package/es/editor/gct-form-info/gct-form-info.scss +0 -8
  91. package/es/editor/gct-form-info/index.mjs +0 -14
  92. package/es/editor/gct-form-length-unit/gct-form-length-unit.mjs +0 -43
  93. package/es/editor/gct-form-length-unit/gct-form-length-unit.provider.mjs +0 -6
  94. package/es/editor/gct-form-length-unit/index.mjs +0 -12
  95. package/es/editor/gct-form-modal-select/gct-form-modal-select.mjs +0 -99
  96. package/es/editor/gct-form-modal-select/gct-form-modal-select.provider.mjs +0 -6
  97. package/es/editor/gct-form-modal-select/gct-form-modal-select.scss +0 -7
  98. package/es/editor/gct-form-modal-select/index.mjs +0 -12
  99. package/es/editor/gct-form-number/gct-form-number.mjs +0 -44
  100. package/es/editor/gct-form-number/gct-form-number.provider.mjs +0 -6
  101. package/es/editor/gct-form-number/gct-form-number.scss +0 -3
  102. package/es/editor/gct-form-number/index.mjs +0 -17
  103. package/es/editor/gct-form-picker/gct-form-picker.mjs +0 -92
  104. package/es/editor/gct-form-picker/gct-form-picker.provider.mjs +0 -6
  105. package/es/editor/gct-form-picker/index.mjs +0 -12
  106. package/es/editor/gct-form-radio/gct-form-radio.mjs +0 -70
  107. package/es/editor/gct-form-radio/gct-form-radio.scss +0 -68
  108. package/es/editor/gct-form-radio/index.mjs +0 -19
  109. package/es/editor/gct-form-select/gct-form-select.mjs +0 -50
  110. package/es/editor/gct-form-select/gct-form-select.provider.mjs +0 -6
  111. package/es/editor/gct-form-select/index.mjs +0 -12
  112. package/es/editor/gct-form-span/gct-form-span.mjs +0 -89
  113. package/es/editor/gct-form-span/gct-form-span.provider.mjs +0 -6
  114. package/es/editor/gct-form-span/gct-form-span.scss +0 -10
  115. package/es/editor/gct-form-span/index.mjs +0 -12
  116. package/es/editor/gct-form-switch/gct-form-switch.mjs +0 -35
  117. package/es/editor/gct-form-switch/gct-form-switch.provider.mjs +0 -6
  118. package/es/editor/gct-form-switch/index.mjs +0 -17
  119. package/es/editor/gct-form-text/gct-form-text.mjs +0 -45
  120. package/es/editor/gct-form-text/gct-form-text.provider.mjs +0 -6
  121. package/es/editor/gct-form-text/index.mjs +0 -17
  122. package/es/editor/gct-form-textarea/gct-form-textarea.mjs +0 -40
  123. package/es/editor/gct-form-textarea/gct-form-textarea.provider.mjs +0 -6
  124. package/es/editor/gct-form-textarea/index.mjs +0 -12
  125. package/es/editor/index.mjs +0 -51
  126. package/es/utils/index.mjs +0 -3
  127. package/es/vite-env.d.ts +0 -1
  128. package/es/widgets/gct-edit-form/gct-edit-form.mjs +0 -126
  129. package/es/widgets/gct-edit-form/index.mjs +0 -10
  130. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.mjs +0 -73
  131. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.mjs +0 -11
  132. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.scss +0 -62
  133. package/es/widgets/gct-form/gct-form-collapse/index.mjs +0 -15
  134. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.mjs +0 -71
  135. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.mjs +0 -13
  136. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.scss +0 -23
  137. package/es/widgets/gct-form/gct-form-collapse-pane/index.mjs +0 -15
  138. package/es/widgets/gct-form/gct-form-group/gct-form-group.mjs +0 -88
  139. package/es/widgets/gct-form/gct-form-group/gct-form-group.provider.mjs +0 -11
  140. package/es/widgets/gct-form/gct-form-group/gct-form-group.scss +0 -28
  141. package/es/widgets/gct-form/gct-form-group/index.mjs +0 -15
  142. package/es/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.mjs +0 -13
  143. package/es/widgets/gct-form/gct-form-item/gct-form-item.mjs +0 -141
  144. package/es/widgets/gct-form/gct-form-item/gct-form-item.provider.mjs +0 -11
  145. package/es/widgets/gct-form/gct-form-item/gct-form-item.scss +0 -115
  146. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.mjs +0 -53
  147. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.provider.mjs +0 -11
  148. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.scss +0 -63
  149. package/es/widgets/gct-form/gct-form-tab/index.mjs +0 -12
  150. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.mjs +0 -65
  151. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.mjs +0 -11
  152. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.scss +0 -16
  153. package/es/widgets/gct-form/gct-form-tab-pane/index.mjs +0 -15
  154. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.mjs +0 -71
  155. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.mjs +0 -11
  156. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.scss +0 -25
  157. package/es/widgets/gct-form/gct-form-title-group/index.mjs +0 -16
  158. package/es/widgets/gct-form/gct-form.mjs +0 -112
  159. package/es/widgets/gct-form/gct-form.scss +0 -11
  160. package/es/widgets/gct-form/index.mjs +0 -31
@@ -0,0 +1,67 @@
1
+ @charset "UTF-8";
2
+ /* stylelint-disable scss/no-global-function-names */
3
+ /* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
4
+ /**
5
+ * 定义 Block 块
6
+ * @param {String} $block - Block 块名称
7
+ * @example
8
+ * @include b('button') {
9
+ * padding: 10px;
10
+ * }
11
+ */
12
+ /**
13
+ * 定义 Element 元素
14
+ * @param {String|List} $element - Element 元素名称,支持单个或多个
15
+ * @example
16
+ * @include b('button') {
17
+ * @include e('text') {
18
+ * color: #000;
19
+ * }
20
+ * }
21
+ * // 或传入多个元素
22
+ * @include b('button') {
23
+ * @include e(('text', 'icon')) {
24
+ * margin: 5px;
25
+ * }
26
+ * }
27
+ */
28
+ /**
29
+ * 定义 Modifier 修饰符
30
+ * @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
31
+ * @example
32
+ * @include b('button') {
33
+ * @include m('primary') {
34
+ * background: blue;
35
+ * }
36
+ * }
37
+ * // 或传入多个修饰符
38
+ * @include b('button') {
39
+ * @include m(('primary', 'large')) {
40
+ * background: blue;
41
+ * font-size: 16px;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * 定义状态选择器
47
+ * @param {String} $state - 状态名称
48
+ * @example
49
+ * @include b('button') {
50
+ * @include when('disabled') {
51
+ * opacity: 0.5;
52
+ * }
53
+ * }
54
+ */
55
+ /**
56
+ * 深色主题样式
57
+ * @param {String} $block - Block 块名称
58
+ * @example
59
+ * @include dark('button') {
60
+ * background: #333;
61
+ * color: #fff;
62
+ * }
63
+ */
64
+ /* stylelint-disable scss/no-global-function-names */
65
+ .gct-code-editor {
66
+ height: 100%;
67
+ }
@@ -1,15 +1,14 @@
1
1
  import { defineComponent, computed, ref, onMounted, onUnmounted, createVNode } from 'vue';
2
2
  import { useNamespace, deepMerge } from '@gct-paas/core';
3
3
  import loader from '@monaco-editor/loader';
4
- import './code-editor.scss';
4
+ import './code-editor.css';/* empty css */
5
5
 
6
- "use strict";
7
6
  const CodeEditor = /* @__PURE__ */ defineComponent({
8
- name: "CodeEditor",
7
+ name: 'CodeEditor',
9
8
  props: {
10
9
  value: {
11
10
  type: String,
12
- default: ""
11
+ default: ''
13
12
  },
14
13
  config: {
15
14
  type: Object,
@@ -17,26 +16,26 @@ const CodeEditor = /* @__PURE__ */ defineComponent({
17
16
  },
18
17
  language: {
19
18
  type: String,
20
- default: "typescript"
19
+ default: 'typescript'
21
20
  }
22
21
  },
23
- emits: ["update:value"],
22
+ emits: ['update:value'],
24
23
  setup(props, {
25
24
  emit
26
25
  }) {
27
- const ns = useNamespace("code-editor");
26
+ const ns = useNamespace('code-editor');
28
27
  const val = computed({
29
28
  get() {
30
- return props.value || "";
29
+ return props.value || '';
31
30
  },
32
31
  set(v) {
33
- emit("update:value", v);
32
+ emit('update:value', v);
34
33
  }
35
34
  });
36
35
  const el = ref(null);
37
36
  let monacoEditor = null;
38
37
  onMounted(() => {
39
- loader.init().then((m) => {
38
+ loader.init().then(m => {
40
39
  if (el.value) {
41
40
  monacoEditor = m.editor.create(el.value, deepMerge({
42
41
  value: val.value,
@@ -1,3 +1,4 @@
1
+ export { AssetsSvgIcon } from './assets-svg-icon/assets-svg-icon';
1
2
  export { CodeEditor } from './code-editor/code-editor';
2
3
  export { FlexContainer } from './layout/flex-container/flex-container';
3
4
  export { FlexItem } from './layout/flex-item/flex-item';
@@ -0,0 +1,67 @@
1
+ @charset "UTF-8";
2
+ /* stylelint-disable scss/no-global-function-names */
3
+ /* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
4
+ /**
5
+ * 定义 Block 块
6
+ * @param {String} $block - Block 块名称
7
+ * @example
8
+ * @include b('button') {
9
+ * padding: 10px;
10
+ * }
11
+ */
12
+ /**
13
+ * 定义 Element 元素
14
+ * @param {String|List} $element - Element 元素名称,支持单个或多个
15
+ * @example
16
+ * @include b('button') {
17
+ * @include e('text') {
18
+ * color: #000;
19
+ * }
20
+ * }
21
+ * // 或传入多个元素
22
+ * @include b('button') {
23
+ * @include e(('text', 'icon')) {
24
+ * margin: 5px;
25
+ * }
26
+ * }
27
+ */
28
+ /**
29
+ * 定义 Modifier 修饰符
30
+ * @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
31
+ * @example
32
+ * @include b('button') {
33
+ * @include m('primary') {
34
+ * background: blue;
35
+ * }
36
+ * }
37
+ * // 或传入多个修饰符
38
+ * @include b('button') {
39
+ * @include m(('primary', 'large')) {
40
+ * background: blue;
41
+ * font-size: 16px;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * 定义状态选择器
47
+ * @param {String} $state - 状态名称
48
+ * @example
49
+ * @include b('button') {
50
+ * @include when('disabled') {
51
+ * opacity: 0.5;
52
+ * }
53
+ * }
54
+ */
55
+ /**
56
+ * 深色主题样式
57
+ * @param {String} $block - Block 块名称
58
+ * @example
59
+ * @include dark('button') {
60
+ * background: #333;
61
+ * color: #fff;
62
+ * }
63
+ */
64
+ /* stylelint-disable scss/no-global-function-names */
65
+ .gct-flex-container {
66
+ display: flex;
67
+ }
@@ -0,0 +1,83 @@
1
+ @charset "UTF-8";
2
+ /* stylelint-disable scss/no-global-function-names */
3
+ /* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
4
+ /**
5
+ * 定义 Block 块
6
+ * @param {String} $block - Block 块名称
7
+ * @example
8
+ * @include b('button') {
9
+ * padding: 10px;
10
+ * }
11
+ */
12
+ /**
13
+ * 定义 Element 元素
14
+ * @param {String|List} $element - Element 元素名称,支持单个或多个
15
+ * @example
16
+ * @include b('button') {
17
+ * @include e('text') {
18
+ * color: #000;
19
+ * }
20
+ * }
21
+ * // 或传入多个元素
22
+ * @include b('button') {
23
+ * @include e(('text', 'icon')) {
24
+ * margin: 5px;
25
+ * }
26
+ * }
27
+ */
28
+ /**
29
+ * 定义 Modifier 修饰符
30
+ * @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
31
+ * @example
32
+ * @include b('button') {
33
+ * @include m('primary') {
34
+ * background: blue;
35
+ * }
36
+ * }
37
+ * // 或传入多个修饰符
38
+ * @include b('button') {
39
+ * @include m(('primary', 'large')) {
40
+ * background: blue;
41
+ * font-size: 16px;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * 定义状态选择器
47
+ * @param {String} $state - 状态名称
48
+ * @example
49
+ * @include b('button') {
50
+ * @include when('disabled') {
51
+ * opacity: 0.5;
52
+ * }
53
+ * }
54
+ */
55
+ /**
56
+ * 深色主题样式
57
+ * @param {String} $block - Block 块名称
58
+ * @example
59
+ * @include dark('button') {
60
+ * background: #333;
61
+ * color: #fff;
62
+ * }
63
+ */
64
+ /* stylelint-disable scss/no-global-function-names */
65
+ .gct-view-container {
66
+ background-color: white;
67
+ height: 100%;
68
+ display: flex;
69
+ flex-direction: column;
70
+ }
71
+
72
+ .gct-view-container-header {
73
+ flex-shrink: 0;
74
+ }
75
+
76
+ .gct-view-container-content {
77
+ flex-grow: 1;
78
+ overflow: hidden auto;
79
+ }
80
+
81
+ .gct-view-container-footer {
82
+ flex-shrink: 0;
83
+ }
@@ -19,7 +19,7 @@ export declare const GctFormCheckSwitch: import('vue').DefineComponent<import('v
19
19
  }>, {
20
20
  ns: import('@gct-paas/core').Namespace;
21
21
  c: EditorController<ICheckSwitchEditor>;
22
- val: import('vue').WritableComputedRef<any, any> | null;
22
+ val: import('vue').WritableComputedRef<any, any>;
23
23
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
24
24
  itemModel: {
25
25
  type: PropType<IFormItem>;
@@ -15,7 +15,7 @@ export declare const GctFormI18n: import('vue').DefineComponent<import('vue').Ex
15
15
  };
16
16
  }>, {
17
17
  ns: import('@gct-paas/core').Namespace;
18
- val: import('vue').WritableComputedRef<any, any> | null;
18
+ val: import('vue').WritableComputedRef<any, any>;
19
19
  i18nConfigValue: import('vue').WritableComputedRef<any, any>;
20
20
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
21
21
  c: {
@@ -11,7 +11,7 @@ export declare const GctFormInfo: import('vue').DefineComponent<import('vue').Ex
11
11
  };
12
12
  }>, {
13
13
  ns: import('@gct-paas/core').Namespace;
14
- val: import('vue').WritableComputedRef<any, any> | null;
14
+ val: import('vue').WritableComputedRef<any, any>;
15
15
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
16
  value: {
17
17
  type: StringConstructor;
@@ -19,7 +19,7 @@ export declare const GctFormLengthUnit: import('vue').DefineComponent<import('vu
19
19
  }>, {
20
20
  ns: import('@gct-paas/core').Namespace;
21
21
  c: LengthUnitEditorController;
22
- val: import('vue').WritableComputedRef<any, any> | null;
22
+ val: import('vue').WritableComputedRef<any, any>;
23
23
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
24
24
  itemModel: {
25
25
  type: PropType<IFormItem>;
@@ -11,7 +11,7 @@ export declare const GctFormNumber: import('vue').DefineComponent<import('vue').
11
11
  };
12
12
  }>, {
13
13
  ns: import('@gct-paas/core').Namespace;
14
- val: import('vue').WritableComputedRef<any, any> | null;
14
+ val: import('vue').WritableComputedRef<any, any>;
15
15
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
16
  model: {
17
17
  type: PropType<INumberEditor>;
@@ -15,7 +15,7 @@ export declare const GctFormRadio: import('vue').DefineComponent<import('vue').E
15
15
  };
16
16
  }>, {
17
17
  ns: import('@gct-paas/core').Namespace;
18
- val: import('vue').WritableComputedRef<any, any> | null;
18
+ val: import('vue').WritableComputedRef<any, any>;
19
19
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
20
20
  c: {
21
21
  type: PropType<IFormItemController>;
@@ -15,7 +15,7 @@ export declare const GctFormSelect: import('vue').DefineComponent<import('vue').
15
15
  };
16
16
  }>, {
17
17
  ns: import('@gct-paas/core').Namespace;
18
- val: import('vue').WritableComputedRef<any, any> | null;
18
+ val: import('vue').WritableComputedRef<any, any>;
19
19
  options: import('vue').ComputedRef<import('@gct-paas/core').IDictionaryItem[]>;
20
20
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
21
21
  c: {
@@ -11,7 +11,7 @@ export declare const GctFormSwitch: import('vue').DefineComponent<import('vue').
11
11
  };
12
12
  }>, {
13
13
  ns: import('@gct-paas/core').Namespace;
14
- val: import('vue').WritableComputedRef<any, any> | null;
14
+ val: import('vue').WritableComputedRef<any, any>;
15
15
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
16
  model: {
17
17
  type: PropType<ISwitchEditor>;
@@ -11,7 +11,7 @@ export declare const GctFormTextarea: import('vue').DefineComponent<import('vue'
11
11
  };
12
12
  }>, {
13
13
  ns: import('@gct-paas/core').Namespace;
14
- val: import('vue').WritableComputedRef<any, any> | null;
14
+ val: import('vue').WritableComputedRef<any, any>;
15
15
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
16
  model: {
17
17
  type: PropType<ITextareaEditor>;
@@ -0,0 +1,2 @@
1
+ export { useLocale } from './useLocale';
2
+ export { useTheme } from './useTheme';
@@ -0,0 +1,4 @@
1
+ import { Locale } from 'ant-design-vue/lib/locale-provider';
2
+ export declare function useLocale(): {
3
+ getAntdLocale: import('vue').ComputedRef<Locale | undefined>;
4
+ };
@@ -0,0 +1,32 @@
1
+ import { computed } from 'vue';
2
+ import antdLocaleCn from 'ant-design-vue/es/locale/zh_CN';
3
+ import antdLocaleUs from 'ant-design-vue/es/locale/en_US';
4
+ import antdLocalePt from 'ant-design-vue/es/locale/pt_PT';
5
+ import antdLocaleTr from 'ant-design-vue/es/locale/tr_TR';
6
+ import antdLocaleTw from 'ant-design-vue/es/locale/zh_TW';
7
+ import antdLocaleJp from 'ant-design-vue/es/locale/ja_JP';
8
+ import antdLocaleVn from 'ant-design-vue/es/locale/vi_VN';
9
+ import antdLocaleDe from 'ant-design-vue/es/locale/de_DE';
10
+ import antdLocaleFr from 'ant-design-vue/es/locale/fr_FR';
11
+ import antdLocaleEs from 'ant-design-vue/es/locale/es_ES';
12
+ import antdLocaleRu from 'ant-design-vue/es/locale/ru_RU';
13
+
14
+ const antdMap = {
15
+ "zh-CN": antdLocaleCn,
16
+ "en-US": antdLocaleUs,
17
+ "pt-PT": antdLocalePt,
18
+ "tr-TR": antdLocaleTr,
19
+ "zh-TW": antdLocaleTw,
20
+ "ja-JP": antdLocaleJp,
21
+ "vi-VN": antdLocaleVn,
22
+ "de-GE": antdLocaleDe,
23
+ "fr-FR": antdLocaleFr,
24
+ "es-ES": antdLocaleEs,
25
+ "ru-RU": antdLocaleRu
26
+ };
27
+ function useLocale() {
28
+ const getAntdLocale = computed(() => antdMap[_gct.store.getLang]);
29
+ return { getAntdLocale };
30
+ }
31
+
32
+ export { useLocale };
@@ -0,0 +1,8 @@
1
+ interface IThemeVars {
2
+ primaryColor?: string;
3
+ }
4
+ export declare function useTheme(): {
5
+ themeVars: IThemeVars;
6
+ setPrimaryColor: (color: string) => void;
7
+ };
8
+ export {};
@@ -0,0 +1,20 @@
1
+ import { reactive } from 'vue';
2
+ import { ConfigProvider } from 'ant-design-vue';
3
+
4
+ const themeVars = reactive({});
5
+ function useTheme() {
6
+ function setPrimaryColor(color) {
7
+ themeVars.primaryColor = color;
8
+ ConfigProvider.config({
9
+ theme: {
10
+ primaryColor: color
11
+ }
12
+ });
13
+ }
14
+ return {
15
+ themeVars,
16
+ setPrimaryColor
17
+ };
18
+ }
19
+
20
+ export { useTheme };
package/es/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import { App } from 'vue';
2
- import { CodeEditor } from './components';
3
- declare const _default: {
4
- install(app: App): void;
5
- };
6
- export default _default;
2
+ import { AssetsSvgIcon, CodeEditor } from './components';
3
+ export declare function install(app: App): void;
4
+ export * from './hooks';
7
5
  export * from './utils';
8
- export { CodeEditor };
6
+ export { CodeEditor, AssetsSvgIcon };
7
+ export * from './modules/gct-dnd';
package/es/index.mjs CHANGED
@@ -1,27 +1,22 @@
1
- import './components/index.mjs';
2
- import Editor from './editor/index.mjs';
3
- import GctEditForm from './widgets/gct-edit-form/index.mjs';
4
- import GctForm from './widgets/gct-form/index.mjs';
5
- import './utils/index.mjs';
6
- import { CodeEditor } from './components/code-editor/code-editor.mjs';
7
- import { FlexContainer } from './components/layout/flex-container/flex-container.mjs';
8
- import { FlexItem } from './components/layout/flex-item/flex-item.mjs';
9
- import { GridContainer } from './components/layout/grid-container/grid-container.mjs';
10
- import { ViewContainer } from './components/layout/view-container/view-container.mjs';
1
+ import './components/layout/view-container/view-container.css';import './components/layout/flex-container/flex-container.css';export { AssetsSvgIcon } from './components/assets-svg-icon/assets-svg-icon.mjs';
2
+ export { CodeEditor } from './components/code-editor/code-editor.mjs';
3
+ import 'vue';
4
+ import '@gct-paas/core';
5
+ /* empty css */
6
+ /* empty css */
7
+ import * as Icons from '@ant-design/icons-vue';
8
+ export { useLocale } from './hooks/useLocale.mjs';
9
+ export { useTheme } from './hooks/useTheme.mjs';
11
10
  export { withInstall } from './utils/with-install.mjs';
11
+ export { GctDndContainer } from './modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.mjs';
12
+ export { GctDndDropLine } from './modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.mjs';
13
+ export { GctDndItem } from './modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.mjs';
14
+ export { GCT_DND_INSERT_POS } from './modules/gct-dnd/constants/index.mjs';
12
15
 
13
- "use strict";
14
- var index = {
15
- install(app) {
16
- app.use(Editor);
17
- app.use(GctEditForm);
18
- app.use(GctForm);
19
- app.component(CodeEditor.name, CodeEditor);
20
- app.component(FlexContainer.name, FlexContainer);
21
- app.component(FlexItem.name, FlexItem);
22
- app.component(GridContainer.name, GridContainer);
23
- app.component(ViewContainer.name, ViewContainer);
24
- }
25
- };
16
+ function install(app) {
17
+ Object.entries(Icons).forEach(([key, component]) => {
18
+ app.component(key, component);
19
+ });
20
+ }
26
21
 
27
- export { CodeEditor, index as default };
22
+ export { install };
@@ -0,0 +1,72 @@
1
+ @charset "UTF-8";
2
+ /* stylelint-disable scss/no-global-function-names */
3
+ /* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
4
+ /**
5
+ * 定义 Block 块
6
+ * @param {String} $block - Block 块名称
7
+ * @example
8
+ * @include b('button') {
9
+ * padding: 10px;
10
+ * }
11
+ */
12
+ /**
13
+ * 定义 Element 元素
14
+ * @param {String|List} $element - Element 元素名称,支持单个或多个
15
+ * @example
16
+ * @include b('button') {
17
+ * @include e('text') {
18
+ * color: #000;
19
+ * }
20
+ * }
21
+ * // 或传入多个元素
22
+ * @include b('button') {
23
+ * @include e(('text', 'icon')) {
24
+ * margin: 5px;
25
+ * }
26
+ * }
27
+ */
28
+ /**
29
+ * 定义 Modifier 修饰符
30
+ * @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
31
+ * @example
32
+ * @include b('button') {
33
+ * @include m('primary') {
34
+ * background: blue;
35
+ * }
36
+ * }
37
+ * // 或传入多个修饰符
38
+ * @include b('button') {
39
+ * @include m(('primary', 'large')) {
40
+ * background: blue;
41
+ * font-size: 16px;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * 定义状态选择器
47
+ * @param {String} $state - 状态名称
48
+ * @example
49
+ * @include b('button') {
50
+ * @include when('disabled') {
51
+ * opacity: 0.5;
52
+ * }
53
+ * }
54
+ */
55
+ /**
56
+ * 深色主题样式
57
+ * @param {String} $block - Block 块名称
58
+ * @example
59
+ * @include dark('button') {
60
+ * background: #333;
61
+ * color: #fff;
62
+ * }
63
+ */
64
+ /* stylelint-disable scss/no-global-function-names */
65
+ .gct-dnd-container {
66
+ border: 1px dashed transparent;
67
+ border-radius: var(--gct-border-radius-s);
68
+ }
69
+ .gct-dnd-container.is-over {
70
+ border-color: var(--gct-color-border-hover);
71
+ background-color: var(--gct-color-primary-light);
72
+ }
@@ -0,0 +1,37 @@
1
+ import { PropType } from 'vue';
2
+ import { IGctDndConfig, IGctDndData, IGctDropCollect } from '../../interface';
3
+ import { GCT_DND_INSERT_POS } from '../../constants';
4
+ export declare const GctDndContainer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ config: {
6
+ type: PropType<IGctDndConfig>;
7
+ default: () => IGctDndConfig;
8
+ };
9
+ items: {
10
+ type: PropType<IGctDndData[]>;
11
+ default: () => never[];
12
+ };
13
+ }>, {
14
+ ns: import('@gct-paas/core').Namespace;
15
+ rootRef: import('vue').Ref<HTMLDivElement | null, HTMLDivElement | null>;
16
+ dropLineState: {
17
+ activeKey: string;
18
+ isBeforeHover: boolean;
19
+ };
20
+ collect: import('vue').Ref<IGctDropCollect, IGctDropCollect>;
21
+ onDrop: (insertPos: GCT_DND_INSERT_POS, data: IGctDndData, insertIndex?: number) => void;
22
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:items"[], "update:items", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
23
+ config: {
24
+ type: PropType<IGctDndConfig>;
25
+ default: () => IGctDndConfig;
26
+ };
27
+ items: {
28
+ type: PropType<IGctDndData[]>;
29
+ default: () => never[];
30
+ };
31
+ }>> & Readonly<{
32
+ "onUpdate:items"?: ((...args: any[]) => any) | undefined;
33
+ }>, {
34
+ config: IGctDndConfig;
35
+ items: IGctDndData[];
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
+ export default GctDndContainer;