@gct-paas/core-web 0.1.4-dev.6 → 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 (183) hide show
  1. package/dist/index.esm.min.mjs +24964 -0
  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.d.ts +35 -0
  16. package/es/components/code-editor/code-editor.mjs +15 -20
  17. package/es/components/index.d.ts +1 -0
  18. package/es/components/layout/flex-container/flex-container.css +67 -0
  19. package/es/components/layout/flex-container/flex-container.d.ts +4 -4
  20. package/es/components/layout/flex-item/flex-item.d.ts +4 -4
  21. package/es/components/layout/grid-container/grid-container.d.ts +4 -4
  22. package/es/components/layout/view-container/view-container.css +83 -0
  23. package/es/components/layout/view-container/view-container.d.ts +4 -4
  24. package/es/editor/gct-form-check-switch/gct-form-check-switch.d.ts +7 -7
  25. package/es/editor/gct-form-checkbox/gct-form-checkbox.d.ts +6 -6
  26. package/es/editor/gct-form-field-select/gct-form-field-select.d.ts +17 -7
  27. package/es/editor/gct-form-field-select/gct-model-select.vue.d.ts +3 -12
  28. package/es/editor/gct-form-i18n/gct-form-i18n.d.ts +8 -8
  29. package/es/editor/gct-form-icon-select/gct-form-icon-select.d.ts +8 -8
  30. package/es/editor/gct-form-info/gct-form-info.d.ts +7 -7
  31. package/es/editor/gct-form-length-unit/gct-form-length-unit.d.ts +6 -6
  32. package/es/editor/gct-form-modal-select/gct-form-modal-select.d.ts +8 -8
  33. package/es/editor/gct-form-number/gct-form-number.d.ts +7 -7
  34. package/es/editor/gct-form-picker/gct-form-picker.d.ts +8 -8
  35. package/es/editor/gct-form-radio/gct-form-radio.d.ts +7 -7
  36. package/es/editor/gct-form-select/gct-form-select.d.ts +7 -7
  37. package/es/editor/gct-form-span/gct-form-span.d.ts +5 -5
  38. package/es/editor/gct-form-switch/gct-form-switch.d.ts +6 -6
  39. package/es/editor/gct-form-text/gct-form-text.d.ts +7 -7
  40. package/es/editor/gct-form-textarea/gct-form-textarea.d.ts +7 -7
  41. package/es/hooks/index.d.ts +2 -0
  42. package/es/hooks/useLocale.d.ts +4 -0
  43. package/es/hooks/useLocale.mjs +32 -0
  44. package/es/hooks/useTheme.d.ts +8 -0
  45. package/es/hooks/useTheme.mjs +20 -0
  46. package/es/index.d.ts +5 -6
  47. package/es/index.mjs +19 -24
  48. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.css +72 -0
  49. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.d.ts +37 -0
  50. package/es/modules/gct-dnd/components/gct-dnd-container/gct-dnd-container.mjs +195 -0
  51. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.css +79 -0
  52. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.d.ts +29 -0
  53. package/es/modules/gct-dnd/components/gct-dnd-drop-line/gct-dnd-drop-line.mjs +98 -0
  54. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.css +70 -0
  55. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.d.ts +50 -0
  56. package/es/modules/gct-dnd/components/gct-dnd-item/gct-dnd-item.mjs +239 -0
  57. package/es/modules/gct-dnd/constants/index.d.ts +24 -0
  58. package/es/modules/gct-dnd/constants/index.mjs +9 -0
  59. package/es/modules/gct-dnd/index.d.ts +5 -0
  60. package/es/modules/gct-dnd/interface/i-gct-dnd-config.d.ts +101 -0
  61. package/es/modules/gct-dnd/interface/i-gct-dnd-data.d.ts +14 -0
  62. package/es/modules/gct-dnd/interface/i-gct-dnd-render-item-options.d.ts +28 -0
  63. package/es/modules/gct-dnd/interface/i-gct-drag-collect.d.ts +24 -0
  64. package/es/modules/gct-dnd/interface/i-gct-drag-dnd-data.d.ts +51 -0
  65. package/es/modules/gct-dnd/interface/i-gct-drop-collect.d.ts +32 -0
  66. package/es/modules/gct-dnd/interface/i-gct-drop-result.d.ts +47 -0
  67. package/es/modules/gct-dnd/interface/index.d.ts +7 -0
  68. package/es/types/index.d.ts +1 -1
  69. package/es/utils/with-install.mjs +0 -1
  70. package/es/widgets/gct-edit-form/gct-edit-form.d.ts +9 -9
  71. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.d.ts +6 -6
  72. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.d.ts +4 -4
  73. package/es/widgets/gct-form/gct-form-group/gct-form-group.d.ts +5 -5
  74. package/es/widgets/gct-form/gct-form-item/gct-form-item.d.ts +4 -4
  75. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.d.ts +4 -4
  76. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.d.ts +4 -4
  77. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.d.ts +5 -5
  78. package/es/widgets/gct-form/gct-form.d.ts +5 -5
  79. package/package.json +15 -13
  80. package/dist/core-web.css +0 -1
  81. package/es/components/code-editor/code-editor.scss +0 -3
  82. package/es/components/index.mjs +0 -7
  83. package/es/components/layout/flex-container/flex-container.mjs +0 -90
  84. package/es/components/layout/flex-container/flex-container.scss +0 -3
  85. package/es/components/layout/flex-item/flex-item.mjs +0 -53
  86. package/es/components/layout/flex-item/flex-item.scss +0 -17
  87. package/es/components/layout/grid-container/grid-container.mjs +0 -47
  88. package/es/components/layout/view-container/view-container.mjs +0 -39
  89. package/es/components/layout/view-container/view-container.scss +0 -19
  90. package/es/editor/gct-form-check-switch/gct-form-check-switch.mjs +0 -53
  91. package/es/editor/gct-form-check-switch/gct-form-check-switch.provider.mjs +0 -6
  92. package/es/editor/gct-form-check-switch/gct-form-check-switch.scss +0 -10
  93. package/es/editor/gct-form-check-switch/index.mjs +0 -12
  94. package/es/editor/gct-form-checkbox/gct-form-checkbox.mjs +0 -70
  95. package/es/editor/gct-form-checkbox/gct-form-checkbox.scss +0 -56
  96. package/es/editor/gct-form-checkbox/index.mjs +0 -19
  97. package/es/editor/gct-form-color/gct-form-color.mjs +0 -45
  98. package/es/editor/gct-form-color/gct-form-color.provider.mjs +0 -6
  99. package/es/editor/gct-form-color/gct-form-color.scss +0 -3
  100. package/es/editor/gct-form-color/index.mjs +0 -17
  101. package/es/editor/gct-form-field-select/gct-form-field-select.mjs +0 -48
  102. package/es/editor/gct-form-field-select/gct-form-field-select.provider.mjs +0 -6
  103. package/es/editor/gct-form-field-select/gct-form-field-select.scss +0 -7
  104. package/es/editor/gct-form-field-select/gct-model-select.vue +0 -70
  105. package/es/editor/gct-form-field-select/index.mjs +0 -12
  106. package/es/editor/gct-form-i18n/gct-form-i18n.mjs +0 -62
  107. package/es/editor/gct-form-i18n/gct-form-i18n.provider.mjs +0 -6
  108. package/es/editor/gct-form-i18n/index.mjs +0 -12
  109. package/es/editor/gct-form-icon-select/gct-form-icon-select.mjs +0 -74
  110. package/es/editor/gct-form-icon-select/gct-form-icon-select.scss +0 -14
  111. package/es/editor/gct-form-icon-select/index.mjs +0 -14
  112. package/es/editor/gct-form-info/gct-form-info.mjs +0 -40
  113. package/es/editor/gct-form-info/gct-form-info.scss +0 -8
  114. package/es/editor/gct-form-info/index.mjs +0 -14
  115. package/es/editor/gct-form-length-unit/gct-form-length-unit.mjs +0 -43
  116. package/es/editor/gct-form-length-unit/gct-form-length-unit.provider.mjs +0 -6
  117. package/es/editor/gct-form-length-unit/index.mjs +0 -12
  118. package/es/editor/gct-form-modal-select/gct-form-modal-select.mjs +0 -99
  119. package/es/editor/gct-form-modal-select/gct-form-modal-select.provider.mjs +0 -6
  120. package/es/editor/gct-form-modal-select/gct-form-modal-select.scss +0 -7
  121. package/es/editor/gct-form-modal-select/index.mjs +0 -12
  122. package/es/editor/gct-form-number/gct-form-number.mjs +0 -44
  123. package/es/editor/gct-form-number/gct-form-number.provider.mjs +0 -6
  124. package/es/editor/gct-form-number/gct-form-number.scss +0 -3
  125. package/es/editor/gct-form-number/index.mjs +0 -17
  126. package/es/editor/gct-form-picker/gct-form-picker.mjs +0 -92
  127. package/es/editor/gct-form-picker/gct-form-picker.provider.mjs +0 -6
  128. package/es/editor/gct-form-picker/index.mjs +0 -12
  129. package/es/editor/gct-form-radio/gct-form-radio.mjs +0 -70
  130. package/es/editor/gct-form-radio/gct-form-radio.scss +0 -68
  131. package/es/editor/gct-form-radio/index.mjs +0 -19
  132. package/es/editor/gct-form-select/gct-form-select.mjs +0 -50
  133. package/es/editor/gct-form-select/gct-form-select.provider.mjs +0 -6
  134. package/es/editor/gct-form-select/index.mjs +0 -12
  135. package/es/editor/gct-form-span/gct-form-span.mjs +0 -89
  136. package/es/editor/gct-form-span/gct-form-span.provider.mjs +0 -6
  137. package/es/editor/gct-form-span/gct-form-span.scss +0 -10
  138. package/es/editor/gct-form-span/index.mjs +0 -12
  139. package/es/editor/gct-form-switch/gct-form-switch.mjs +0 -35
  140. package/es/editor/gct-form-switch/gct-form-switch.provider.mjs +0 -6
  141. package/es/editor/gct-form-switch/index.mjs +0 -17
  142. package/es/editor/gct-form-text/gct-form-text.mjs +0 -45
  143. package/es/editor/gct-form-text/gct-form-text.provider.mjs +0 -6
  144. package/es/editor/gct-form-text/index.mjs +0 -17
  145. package/es/editor/gct-form-textarea/gct-form-textarea.mjs +0 -40
  146. package/es/editor/gct-form-textarea/gct-form-textarea.provider.mjs +0 -6
  147. package/es/editor/gct-form-textarea/index.mjs +0 -12
  148. package/es/editor/index.mjs +0 -51
  149. package/es/utils/index.mjs +0 -3
  150. package/es/vite-env.d.ts +0 -1
  151. package/es/widgets/gct-edit-form/gct-edit-form.mjs +0 -126
  152. package/es/widgets/gct-edit-form/index.mjs +0 -10
  153. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.mjs +0 -73
  154. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.mjs +0 -11
  155. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.scss +0 -62
  156. package/es/widgets/gct-form/gct-form-collapse/index.mjs +0 -15
  157. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.mjs +0 -71
  158. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.mjs +0 -13
  159. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.scss +0 -23
  160. package/es/widgets/gct-form/gct-form-collapse-pane/index.mjs +0 -15
  161. package/es/widgets/gct-form/gct-form-group/gct-form-group.mjs +0 -88
  162. package/es/widgets/gct-form/gct-form-group/gct-form-group.provider.mjs +0 -11
  163. package/es/widgets/gct-form/gct-form-group/gct-form-group.scss +0 -28
  164. package/es/widgets/gct-form/gct-form-group/index.mjs +0 -15
  165. package/es/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.mjs +0 -13
  166. package/es/widgets/gct-form/gct-form-item/gct-form-item.mjs +0 -141
  167. package/es/widgets/gct-form/gct-form-item/gct-form-item.provider.mjs +0 -11
  168. package/es/widgets/gct-form/gct-form-item/gct-form-item.scss +0 -115
  169. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.mjs +0 -53
  170. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.provider.mjs +0 -11
  171. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.scss +0 -63
  172. package/es/widgets/gct-form/gct-form-tab/index.mjs +0 -12
  173. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.mjs +0 -65
  174. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.mjs +0 -11
  175. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.scss +0 -16
  176. package/es/widgets/gct-form/gct-form-tab-pane/index.mjs +0 -15
  177. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.mjs +0 -71
  178. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.mjs +0 -11
  179. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.scss +0 -25
  180. package/es/widgets/gct-form/gct-form-title-group/index.mjs +0 -16
  181. package/es/widgets/gct-form/gct-form.mjs +0 -110
  182. package/es/widgets/gct-form/gct-form.scss +0 -11
  183. package/es/widgets/gct-form/index.mjs +0 -31
@@ -1,19 +0,0 @@
1
- @include b(view-container) {
2
- background-color: white;
3
- height: 100%;
4
- display: flex;
5
- flex-direction: column;
6
- }
7
-
8
- @include b(view-container-header) {
9
- flex-shrink: 0;
10
- }
11
-
12
- @include b(view-container-content) {
13
- flex-grow: 1;
14
- overflow: hidden auto;
15
- }
16
-
17
- @include b(view-container-footer) {
18
- flex-shrink: 0;
19
- }
@@ -1,53 +0,0 @@
1
- import { defineComponent, createVNode, resolveComponent, mergeProps } from 'vue';
2
- import { useNamespace, EditorController, useGctFormValue } from '@gct-paas/core';
3
- import './gct-form-check-switch.scss';
4
-
5
- "use strict";
6
- const GctFormCheckSwitch = /* @__PURE__ */ defineComponent({
7
- name: "GctFormCheckSwitch",
8
- props: {
9
- itemModel: {
10
- type: Object,
11
- required: true
12
- },
13
- model: {
14
- type: Object,
15
- required: true
16
- },
17
- value: {
18
- type: Boolean,
19
- default: false
20
- }
21
- },
22
- emits: ["update:value"],
23
- setup(props) {
24
- const ns = useNamespace("gct-form-check-switch");
25
- const c = new EditorController(props.model);
26
- const val = useGctFormValue();
27
- return {
28
- ns,
29
- c,
30
- val
31
- };
32
- },
33
- render() {
34
- if (this.model.isSwitch) {
35
- return createVNode("div", {
36
- "class": [this.ns.b(), this.ns.m("switch"), this.ns.is("readonly", this.model.readonly)]
37
- }, [createVNode(resolveComponent("a-switch"), mergeProps({
38
- "checked": this.val,
39
- "onUpdate:checked": ($event) => this.val = $event
40
- }, this.model.props || {}), null)]);
41
- }
42
- return createVNode(resolveComponent("a-checkbox"), mergeProps({
43
- "checked": this.val,
44
- "onUpdate:checked": ($event) => this.val = $event
45
- }, this.model.props || {}, {
46
- "class": [this.ns.b(), this.ns.m("checkbox"), this.ns.is("readonly", this.model.readonly)]
47
- }), {
48
- default: () => [this.model.label]
49
- });
50
- }
51
- });
52
-
53
- export { GctFormCheckSwitch };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- class GctFormCheckSwitchProvider {
3
- component = "gct-form-check-switch";
4
- }
5
-
6
- export { GctFormCheckSwitchProvider };
@@ -1,10 +0,0 @@
1
- @include b(gct-form-check-switch) {
2
- @include m(checkbox){
3
- height: 32px;
4
- padding-top: 5px;
5
- }
6
-
7
- @include when(readonly) {
8
- pointer-events: none;
9
- }
10
- }
@@ -1,12 +0,0 @@
1
- import { widthEditorInstall, EditorTypeOld } from '@gct-paas/core';
2
- import { GctFormCheckSwitchProvider } from './gct-form-check-switch.provider.mjs';
3
- import { GctFormCheckSwitch as GctFormCheckSwitch$1 } from './gct-form-check-switch.mjs';
4
-
5
- "use strict";
6
- var GctFormCheckSwitch = widthEditorInstall(
7
- EditorTypeOld.CHECK_SWITCH,
8
- () => new GctFormCheckSwitchProvider(),
9
- GctFormCheckSwitch$1
10
- );
11
-
12
- export { GctFormCheckSwitch as default };
@@ -1,70 +0,0 @@
1
- import { defineComponent, createVNode, mergeProps, computed } from 'vue';
2
- import { useNamespace, useGctFormValue } from '@gct-paas/core';
3
- import { CheckboxGroup } from 'ant-design-vue';
4
- import { cloneDeep } from 'lodash-es';
5
- import './gct-form-checkbox.scss';
6
-
7
- "use strict";
8
- const GctFormCheckbox = /* @__PURE__ */ defineComponent({
9
- name: "GctFormCheckbox",
10
- props: {
11
- c: {
12
- type: Object,
13
- required: true
14
- },
15
- model: {
16
- type: Object,
17
- required: true
18
- },
19
- value: {
20
- type: String,
21
- default: ""
22
- }
23
- },
24
- emits: ["update:value"],
25
- setup(props, {
26
- emit
27
- }) {
28
- const ns = useNamespace("gct-form-checkbox");
29
- const val = useGctFormValue();
30
- const checked = computed(() => {
31
- return val.value;
32
- });
33
- const options = computed(() => {
34
- return cloneDeep(props.c.state.options);
35
- });
36
- const onChange = (checkVal) => {
37
- options.value.forEach((e) => {
38
- if (props.model.minLength && checkVal.length <= props.model.minLength && checkVal.includes(e.value)) {
39
- e.disabled = true;
40
- } else {
41
- e.disabled = false;
42
- }
43
- e.checked = checkVal.includes(e.value);
44
- });
45
- emit("update:value", checkVal);
46
- };
47
- return {
48
- ns,
49
- checked,
50
- onChange,
51
- options
52
- };
53
- },
54
- render() {
55
- const attrs = {
56
- ...this.model.props || {},
57
- class: [this.ns.b(), this.ns.m("checkbox"), this.model.layout === "column" && "isColumn"],
58
- disabled: this.c.state.disabled
59
- };
60
- return createVNode(CheckboxGroup, mergeProps({
61
- "value": this.checked,
62
- "onUpdate:value": ($event) => this.checked = $event,
63
- "options": this.options
64
- }, attrs, {
65
- "onChange": this.onChange
66
- }), null);
67
- }
68
- });
69
-
70
- export { GctFormCheckbox, GctFormCheckbox as default };
@@ -1,56 +0,0 @@
1
- @include b(gct-form-checkbox) {
2
- @include m(checkbox){
3
- &.ant-checkbox-group {
4
- height: 32px;
5
- display: flex;
6
- align-items: center;
7
- }
8
- }
9
- }
10
-
11
- .#{bem(gct-form-checkbox)}.ant-checkbox-group{
12
- width: 100%;
13
- padding: 2px;
14
- border-radius: 4px;
15
- display: flex;
16
- gap: 4px 8px;
17
- flex-wrap: wrap;
18
- height: auto;
19
-
20
- .ant-checkbox+span {
21
- padding-left: 4px;
22
- }
23
-
24
- .ant-checkbox-group-item {
25
- margin-right: 0;
26
- display: flex;
27
- align-items: flex-start;
28
- }
29
-
30
- .ant-checkbox-wrapper {
31
- display: flex;
32
- }
33
-
34
- &.isColumn {
35
- flex-flow: column wrap;
36
- align-items: flex-start;
37
- }
38
-
39
- .drag-wrap {
40
- width: 100%;
41
-
42
- .drag-checkbox-item {
43
- padding: 6px 4px;
44
- border-radius: 4px;
45
- background-color: #F2F4F7;
46
-
47
- .icon-drag {
48
- line-height: 1;
49
- }
50
-
51
- & + .drag-checkbox-item {
52
- margin-top: 4px;
53
- }
54
- }
55
- }
56
- }
@@ -1,19 +0,0 @@
1
- import { widthEditorInstall, EditorType, EditorTypeOld } from '@gct-paas/core';
2
- import { GctFormCheckbox as GctFormCheckbox$1 } from './gct-form-checkbox.mjs';
3
-
4
- "use strict";
5
- class Provider {
6
- component = "gct-form-checkbox";
7
- }
8
- var GctFormCheckbox = widthEditorInstall(
9
- EditorType.CHECKBOX,
10
- () => new Provider(),
11
- GctFormCheckbox$1
12
- );
13
- const oldCheckboxCom = widthEditorInstall(
14
- EditorTypeOld.CHECKBOX,
15
- () => new Provider(),
16
- GctFormCheckbox$1
17
- );
18
-
19
- export { Provider, GctFormCheckbox as default, oldCheckboxCom };
@@ -1,45 +0,0 @@
1
- import { defineComponent, createVNode, resolveComponent, mergeProps } from 'vue';
2
- import { useNamespace, useGctFormValue } from '@gct-paas/core';
3
- import './gct-form-color.scss';
4
-
5
- "use strict";
6
- const GctFormColor = /* @__PURE__ */ defineComponent({
7
- name: "GctFormColor",
8
- inheritAttrs: false,
9
- props: {
10
- itemModel: {
11
- type: Object,
12
- required: true
13
- },
14
- model: {
15
- type: Object,
16
- required: true
17
- },
18
- value: {
19
- type: String
20
- }
21
- },
22
- emits: ["update:value"],
23
- setup() {
24
- const ns = useNamespace("form-color");
25
- const val = useGctFormValue();
26
- return {
27
- ns,
28
- val
29
- };
30
- },
31
- render() {
32
- return createVNode(resolveComponent("color-picker"), mergeProps({
33
- "pureColor": this.val,
34
- "onUpdate:pureColor": ($event) => this.val = $event,
35
- "format": "rgba",
36
- "shape": "circle",
37
- "use-type": "pure",
38
- "picker-type": "chrome",
39
- "class": [this.ns.b(), this.ns.is("readonly", this.model.readonly)]
40
- }, this.model.props || {}), null);
41
- }
42
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
- });
44
-
45
- export { GctFormColor, GctFormColor as default };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- class GctFormColorProvider {
3
- component = "gct-form-color";
4
- }
5
-
6
- export { GctFormColorProvider };
@@ -1,3 +0,0 @@
1
- @include b(form-color) {
2
- vertical-align: middle;
3
- }
@@ -1,17 +0,0 @@
1
- import { widthEditorInstall, EditorType, EditorTypeOld } from '@gct-paas/core';
2
- import { GctFormColor as GctFormColor$1 } from './gct-form-color.mjs';
3
- import { GctFormColorProvider } from './gct-form-color.provider.mjs';
4
-
5
- "use strict";
6
- var GctFormColor = widthEditorInstall(
7
- EditorType.COLOR,
8
- () => new GctFormColorProvider(),
9
- GctFormColor$1
10
- );
11
- const oldColorCom = widthEditorInstall(
12
- EditorTypeOld.COLOR,
13
- () => new GctFormColorProvider(),
14
- GctFormColor$1
15
- );
16
-
17
- export { GctFormColor as default, oldColorCom };
@@ -1,48 +0,0 @@
1
- import { defineComponent, createVNode, resolveComponent, createTextVNode, ref } from 'vue';
2
- import { useNamespace } from '@gct-paas/core';
3
- import './gct-form-field-select.scss';
4
- import modal from './gct-model-select.vue';
5
-
6
- "use strict";
7
- const GctFormFieldSelect = /* @__PURE__ */ defineComponent({
8
- name: "GctFormFieldSelect",
9
- components: {
10
- modal
11
- },
12
- props: {
13
- c: {
14
- type: Object,
15
- required: true
16
- },
17
- model: {
18
- type: Object,
19
- required: true
20
- },
21
- value: {
22
- type: String,
23
- default: ""
24
- }
25
- },
26
- emits: ["update:value"],
27
- setup() {
28
- const ns = useNamespace("gct-form-field-select");
29
- const visible = ref(false);
30
- return {
31
- ns,
32
- visible
33
- };
34
- },
35
- render() {
36
- return createVNode("div", null, [createVNode(resolveComponent("a-button"), {
37
- "onClick": () => this.visible = true,
38
- "block": true
39
- }, {
40
- default: () => [createTextVNode("\u9009\u62E9\u6A21\u578B\u5B57\u6BB5")]
41
- }), createVNode(modal, {
42
- "value": this.visible,
43
- "onUpdate:value": ($event) => this.visible = $event
44
- }, null)]);
45
- }
46
- });
47
-
48
- export { GctFormFieldSelect, GctFormFieldSelect as default };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- class GctFormFieldSelectProvider {
3
- component = "gct-form-field-select";
4
- }
5
-
6
- export { GctFormFieldSelectProvider };
@@ -1,7 +0,0 @@
1
- @include b(gct-form-field-select) {
2
- display: flex;
3
-
4
- @include e(select) {
5
- flex:1;
6
- }
7
- }
@@ -1,70 +0,0 @@
1
- <template>
2
- <a-modal
3
- v-model:visible="visible"
4
- width="600px"
5
- title="关联模型字段"
6
- ok-text="确认"
7
- cancel-text="取消"
8
- @ok="handleOk"
9
- >
10
- <div>所属模型:公司</div>
11
- <div class="gct-box">
12
- <a-transfer
13
- v-model:target-keys="targetKeys"
14
- :locale="{
15
- itemUnit: '项已选',
16
- itemsUnit: '项未选',
17
- searchPlaceholder: '请输入搜索内容',
18
- }"
19
- :data-source="mockData"
20
- show-search
21
- :filter-option="filterOption"
22
- :render="(item: IObject) => item.title"
23
- />
24
- </div>
25
- </a-modal>
26
- </template>
27
-
28
- <script setup lang="ts">
29
- import { ref, computed } from 'vue';
30
- const props = defineProps<{
31
- value: boolean;
32
- }>();
33
-
34
- const emit = defineEmits(['update:value']);
35
- const visible = computed({
36
- get() {
37
- return props.value;
38
- },
39
- set(v) {
40
- emit('update:value', v);
41
- },
42
- });
43
- const mockData = ref([
44
- { key: 0, title: '公司名称' },
45
- { key: 1, title: 'ID' },
46
- { key: 2, title: '创建人' },
47
- { key: 3, title: '创建部门' },
48
- { key: 4, title: '修改时间' },
49
- { key: 5, title: '修改人' },
50
- { key: 6, title: '修改部门' },
51
- ]);
52
- const targetKeys = ref([]);
53
- const filterOption = (_inputValue: string, _option: object[]) => {
54
- console.log();
55
- // return option.description.indexOf(inputValue) > -1;
56
- };
57
- function handleOk() {
58
- visible.value = false;
59
- }
60
- </script>
61
- <style lang="scss" scoped>
62
- .gct-box {
63
- margin-top: 16px;
64
-
65
- ::v-deep .ant-transfer-list {
66
- height: 340px;
67
- width: 240px;
68
- }
69
- }
70
- </style>
@@ -1,12 +0,0 @@
1
- import { widthEditorInstall, EditorTypeOld } from '@gct-paas/core';
2
- import { GctFormFieldSelectProvider } from './gct-form-field-select.provider.mjs';
3
- import { GctFormFieldSelect as GctFormFieldSelect$1 } from './gct-form-field-select.mjs';
4
-
5
- "use strict";
6
- var GctFormFieldSelect = widthEditorInstall(
7
- EditorTypeOld.Field_SELECT,
8
- () => new GctFormFieldSelectProvider(),
9
- GctFormFieldSelect$1
10
- );
11
-
12
- export { GctFormFieldSelect as default };
@@ -1,62 +0,0 @@
1
- import { defineComponent, createVNode, resolveComponent, mergeProps, computed } from 'vue';
2
- import { useNamespace, useForm, useGctFormValue } from '@gct-paas/core';
3
-
4
- "use strict";
5
- const GctFormI18n = /* @__PURE__ */ defineComponent({
6
- name: "GctFormI18n",
7
- props: {
8
- c: {
9
- type: Object,
10
- required: true
11
- },
12
- model: {
13
- type: Object,
14
- required: true
15
- },
16
- value: {
17
- type: String,
18
- default: ""
19
- }
20
- },
21
- emits: ["update:value"],
22
- setup() {
23
- const ns = useNamespace("gct-form-i18n");
24
- const form = useForm();
25
- const i18nConfig = form.item.i18nConfig;
26
- const val = useGctFormValue();
27
- const i18nConfigValue = computed({
28
- get: () => {
29
- if (i18nConfig) {
30
- return i18nConfig.value;
31
- }
32
- return "";
33
- },
34
- set: (val2) => {
35
- if (!i18nConfig) {
36
- return;
37
- }
38
- i18nConfig.value = val2;
39
- }
40
- });
41
- return {
42
- ns,
43
- val,
44
- i18nConfigValue
45
- };
46
- },
47
- render() {
48
- return createVNode(resolveComponent("i18n-select-input"), mergeProps(this.model.props || {}, {
49
- "i18nText": this.val,
50
- "onUpdate:i18nText": ($event) => this.val = $event,
51
- "i18nConfig": this.i18nConfigValue,
52
- "onUpdate:i18nConfig": ($event) => this.i18nConfigValue = $event,
53
- "inputExtraProps": {
54
- showCount: true,
55
- maxlength: 32,
56
- disabled: this.c.state.disabled
57
- }
58
- }), null);
59
- }
60
- });
61
-
62
- export { GctFormI18n, GctFormI18n as default };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- class GctFormI18nProvider {
3
- component = "gct-form-i18n";
4
- }
5
-
6
- export { GctFormI18nProvider };
@@ -1,12 +0,0 @@
1
- import { widthEditorInstall, EditorTypeOld } from '@gct-paas/core';
2
- import { GctFormI18nProvider } from './gct-form-i18n.provider.mjs';
3
- import { GctFormI18n as GctFormI18n$1 } from './gct-form-i18n.mjs';
4
-
5
- "use strict";
6
- var GctFormI18n = widthEditorInstall(
7
- EditorTypeOld.I18N,
8
- () => new GctFormI18nProvider(),
9
- GctFormI18n$1
10
- );
11
-
12
- export { GctFormI18n as default };
@@ -1,74 +0,0 @@
1
- import { defineComponent, createVNode, resolveComponent, ref, watch, computed } from 'vue';
2
- import { useNamespace } from '@gct-paas/core';
3
- import './gct-form-icon-select.scss';
4
-
5
- "use strict";
6
- const GctFormIconSelect = /* @__PURE__ */ defineComponent({
7
- name: "GctFormIconSelect",
8
- props: {
9
- value: {
10
- type: Object
11
- },
12
- model: {
13
- type: Object,
14
- required: true
15
- }
16
- },
17
- emits: ["update:value"],
18
- setup(props, {
19
- emit
20
- }) {
21
- const ns = useNamespace("gct-form-icon-select");
22
- const val = ref(props.value);
23
- const icon = ref(val.value?.icon || props.model.defaultIcon);
24
- const color = ref(val.value?.color || props.model.defaultColor);
25
- const background = ref(val.value?.background || props.model.defaultBackground);
26
- watch(() => props.value, (newVal) => {
27
- val.value = newVal;
28
- if (newVal) {
29
- icon.value = newVal.icon;
30
- color.value = newVal.color;
31
- }
32
- });
33
- watch([icon, color, background], () => {
34
- val.value = {
35
- icon: icon.value,
36
- color: color.value
37
- };
38
- emit("update:value", val.value);
39
- });
40
- const nextPickerStyle = computed(() => {
41
- if (!props.model.size) {
42
- return;
43
- }
44
- return {
45
- "--box-size": props.model.size + "px"
46
- };
47
- });
48
- return {
49
- ns,
50
- icon,
51
- color,
52
- background,
53
- nextPickerStyle
54
- };
55
- },
56
- render() {
57
- return createVNode("div", {
58
- "class": this.ns.b()
59
- }, [createVNode(resolveComponent("icon-next-picker"), {
60
- "value": this.icon,
61
- "onUpdate:value": ($event) => this.icon = $event,
62
- "color": this.color,
63
- "onUpdate:color": ($event) => this.color = $event,
64
- "background": "#f5f5f5",
65
- "disabled": this.model.disabled,
66
- "showColor": this.model.showColor === false ? false : true,
67
- "style": this.nextPickerStyle
68
- }, null), this.model.label ? createVNode("span", {
69
- "class": this.ns.e("title")
70
- }, [this.model.label]) : null]);
71
- }
72
- });
73
-
74
- export { GctFormIconSelect };
@@ -1,14 +0,0 @@
1
- @include b(gct-form-icon-select) {
2
- --box-size: 40px;
3
-
4
- width: 100%;
5
- height: 100%;
6
-
7
- @include e(title) {
8
- display: inline-block;
9
- font-size: 14px;
10
- color: #474747;
11
- width: 56px;
12
- text-align: center;
13
- }
14
- }
@@ -1,14 +0,0 @@
1
- import { widthEditorInstall, EditorTypeOld } from '@gct-paas/core';
2
- import { GctFormIconSelect as GctFormIconSelect$1 } from './gct-form-icon-select.mjs';
3
-
4
- "use strict";
5
- class Provider {
6
- component = "gct-form-icon-select";
7
- }
8
- var GctFormIconSelect = widthEditorInstall(
9
- EditorTypeOld.ICON_SELECT,
10
- () => new Provider(),
11
- GctFormIconSelect$1
12
- );
13
-
14
- export { Provider, GctFormIconSelect as default };