@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
@@ -1,51 +0,0 @@
1
- import GctFormLengthUnit from './gct-form-length-unit/index.mjs';
2
- import GctFormColor, { oldColorCom } from './gct-form-color/index.mjs';
3
- import GctFormCheckSwitch from './gct-form-check-switch/index.mjs';
4
- import GctFormI18n from './gct-form-i18n/index.mjs';
5
- import GctFormIconSelect from './gct-form-icon-select/index.mjs';
6
- import GctFormNumber, { oldNumberCom } from './gct-form-number/index.mjs';
7
- import GctFormPicker from './gct-form-picker/index.mjs';
8
- import GctFormSelect from './gct-form-select/index.mjs';
9
- import GctFormModalSelect from './gct-form-modal-select/index.mjs';
10
- import GctFormFieldSelect from './gct-form-field-select/index.mjs';
11
- import GctFormSpan from './gct-form-span/index.mjs';
12
- import GctFormSwitch, { oldSwitchCom } from './gct-form-switch/index.mjs';
13
- import GctFormText, { oldTextCom } from './gct-form-text/index.mjs';
14
- import GctFormTextarea from './gct-form-textarea/index.mjs';
15
- import GctFormRadio, { oldRadioCom } from './gct-form-radio/index.mjs';
16
- import GctFormInfo from './gct-form-info/index.mjs';
17
- import GctFormCheckbox, { oldCheckboxCom } from './gct-form-checkbox/index.mjs';
18
- import { ColorPicker } from 'vue3-colorpicker';
19
- import 'vue3-colorpicker/style.css';
20
-
21
- "use strict";
22
- var Editor = {
23
- install(app) {
24
- app.use(GctFormLengthUnit);
25
- app.use(GctFormColor);
26
- app.use(GctFormCheckSwitch);
27
- app.use(GctFormI18n);
28
- app.use(GctFormIconSelect);
29
- app.use(GctFormNumber);
30
- app.use(GctFormPicker);
31
- app.use(GctFormSelect);
32
- app.use(GctFormModalSelect);
33
- app.use(GctFormFieldSelect);
34
- app.use(GctFormSpan);
35
- app.use(GctFormSwitch);
36
- app.use(GctFormText);
37
- app.use(GctFormTextarea);
38
- app.use(GctFormRadio);
39
- app.use(GctFormInfo);
40
- app.use(GctFormCheckbox);
41
- app.use(oldCheckboxCom);
42
- app.use(oldColorCom);
43
- app.use(oldRadioCom);
44
- app.use(oldSwitchCom);
45
- app.use(oldTextCom);
46
- app.use(oldNumberCom);
47
- app.component("ColorPicker", ColorPicker);
48
- }
49
- };
50
-
51
- export { Editor as default };
@@ -1,3 +0,0 @@
1
- export { withInstall } from './with-install.mjs';
2
-
3
- "use strict";
package/es/vite-env.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
@@ -1,126 +0,0 @@
1
- import { defineComponent, createVNode, resolveComponent, ref, watch } from 'vue';
2
- import { cloneDeep } from 'lodash-es';
3
- import { useNamespace, useEditFormController, EditFormController, useModal } from '@gct-paas/core';
4
-
5
- "use strict";
6
- const GctEditForm = /* @__PURE__ */ defineComponent({
7
- name: "GctEditForm",
8
- props: {
9
- // 是否为嵌入表单组件
10
- embed: {
11
- type: Boolean,
12
- default: false
13
- },
14
- context: {
15
- type: Object,
16
- default: () => ({})
17
- },
18
- params: {
19
- type: Object,
20
- default: () => ({})
21
- },
22
- controller: {
23
- type: Object
24
- },
25
- model: {
26
- type: Object,
27
- required: true
28
- },
29
- data: {
30
- type: Object
31
- }
32
- },
33
- emits: ["update:data"],
34
- setup(props, {
35
- emit
36
- }) {
37
- const ns = useNamespace("gct-edit-form");
38
- if (!props.model) {
39
- throw new Error("\u672A\u4F20\u9012\u8868\u5355\u6A21\u578B\u914D\u7F6E");
40
- }
41
- const c = props.controller || useEditFormController(() => new EditFormController(props.model));
42
- const formRef = ref(null);
43
- const validate = async () => {
44
- try {
45
- await formRef.value.formRef.validate();
46
- } catch (error) {
47
- console.error(error);
48
- return false;
49
- }
50
- return true;
51
- };
52
- const validateField = async (field) => {
53
- try {
54
- await formRef.value.formRef.validateFields(field);
55
- } catch (error) {
56
- console.error(error);
57
- return false;
58
- }
59
- return true;
60
- };
61
- c.validate = validate;
62
- c.validateItem = validateField;
63
- watch(props.context, () => {
64
- Object.assign(c.context, props.context);
65
- c.state.isNew = !c.context.id;
66
- }, {
67
- immediate: true
68
- });
69
- watch(props.params, () => {
70
- Object.assign(c.params, props.params);
71
- });
72
- useModal(async () => {
73
- try {
74
- await formRef.value.formRef.validate();
75
- const data = await c.save();
76
- if (data) {
77
- return {
78
- ok: true,
79
- data: [cloneDeep(data)]
80
- };
81
- }
82
- } catch (error) {
83
- console.error(error);
84
- }
85
- return {
86
- ok: false
87
- };
88
- });
89
- if (props.data) {
90
- Object.assign(c.state.data, props.data);
91
- c.loaded();
92
- } else if (c.state.isNew !== true) {
93
- c.load().then(() => {
94
- c.loaded();
95
- });
96
- } else {
97
- c.loaded();
98
- }
99
- if (props.embed) {
100
- c.evt.on("change", () => {
101
- emit("update:data", c.getData());
102
- });
103
- }
104
- return {
105
- ns,
106
- c,
107
- formRef
108
- };
109
- },
110
- render() {
111
- let content = null;
112
- if (this.c.state.isNew || this.c.state.isNew == false && this.c.state.loaded) {
113
- content = createVNode(resolveComponent("gct-form"), {
114
- "class": "h-full",
115
- "ref": "formRef",
116
- "model": this.model,
117
- "c": this.c
118
- }, null);
119
- }
120
- return createVNode("div", {
121
- "class": this.ns.b()
122
- }, [content]);
123
- }
124
- });
125
-
126
- export { GctEditForm };
@@ -1,10 +0,0 @@
1
- import { GctEditForm as GctEditForm$1 } from './gct-edit-form.mjs';
2
-
3
- "use strict";
4
- var GctEditForm = {
5
- install(app) {
6
- app.component(GctEditForm$1.name, GctEditForm$1);
7
- }
8
- };
9
-
10
- export { GctEditForm as default };
@@ -1,73 +0,0 @@
1
- import { defineComponent, createVNode, ref, computed } from 'vue';
2
- import { useNamespace } from '@gct-paas/core';
3
- import { Collapse } from 'ant-design-vue';
4
- import './gct-form-collapse.scss';
5
-
6
- "use strict";
7
- const GctFormCollapse = /* @__PURE__ */ defineComponent({
8
- name: "GctFormCollapse",
9
- props: {
10
- c: {
11
- type: Object,
12
- required: true
13
- },
14
- model: {
15
- type: Object,
16
- required: true
17
- }
18
- },
19
- setup(props) {
20
- const ns = useNamespace("form-collapse");
21
- const keys = ref([0]);
22
- const style = {};
23
- if (props.model.width) {
24
- style[ns.cssVarName("form-collapse-width")] = props.model.width;
25
- }
26
- if (props.model.height) {
27
- style[ns.cssVarName("form-collapse-height")] = props.model.height;
28
- }
29
- const activeKeys = ref([]);
30
- activeKeys.value = props.model.children?.map((item) => item.name) || [];
31
- const expandIconPosition = computed(() => {
32
- return props.model.expandIconPosition === "left" ? "left" : "right";
33
- });
34
- return {
35
- ns,
36
- keys,
37
- style,
38
- activeKeys,
39
- expandIconPosition
40
- };
41
- },
42
- render() {
43
- if (this.c.state.keepalive !== true && this.c.state.visible === false) {
44
- return null;
45
- }
46
- const items = this.$slots.default?.() || [];
47
- return createVNode(Collapse, {
48
- "class": [this.ns.b(), this.ns.is("hidden", this.c.state.visible === false), this.ns.m("icon-" + (this.model.expandIconStyle || "up-down"))],
49
- "style": this.style,
50
- "accordion": this.model.accordion,
51
- "expandIconPosition": this.expandIconPosition,
52
- "activeKey": this.activeKeys,
53
- "onUpdate:activeKey": ($event) => this.activeKeys = $event
54
- }, {
55
- default: () => [this.model.children?.map((item, index) => {
56
- const _item = items[index];
57
- if (_item.props.c.state.visible === false) {
58
- return;
59
- }
60
- const collapsible = item.collapsible !== false ? void 0 : "disabled";
61
- return createVNode(Collapse.Panel, {
62
- "key": item.name,
63
- "header": item.title,
64
- "collapsible": collapsible
65
- }, {
66
- default: () => [items[index]]
67
- });
68
- })]
69
- });
70
- }
71
- });
72
-
73
- export { GctFormCollapse, GctFormCollapse as default };
@@ -1,11 +0,0 @@
1
- import { useFormItemController, FormCollapseController } from '@gct-paas/core';
2
-
3
- "use strict";
4
- class GctFormCollapseProvider {
5
- component = "gct-form-collapse";
6
- createController(form, item) {
7
- return useFormItemController(() => new FormCollapseController(form, item));
8
- }
9
- }
10
-
11
- export { GctFormCollapseProvider };
@@ -1,62 +0,0 @@
1
- $gct-form-collapse: (
2
- width: auto,
3
- height: auto,
4
- );
5
-
6
- @include b(form-collapse) {
7
- @include set-component-css-var('form-collapse', $gct-form-collapse);
8
-
9
- width: getCssVar(form-collapse, width);
10
- height: getCssVar(form-collapse, height);
11
- border: none;
12
-
13
- @include when(hidden) {
14
- display: none;
15
- }
16
-
17
- // 默认样式调整
18
- &.ant-collapse{
19
- > .ant-collapse-item > .ant-collapse-header {
20
- background: #f2f4f7;
21
- font-size: 12px;
22
- font-weight: 500;
23
- color: #212528;
24
- padding: 8px 12px;
25
- }
26
- }
27
-
28
- // 取消面板内容区的边框
29
- > .ant-collapse-item {
30
- border-bottom: none;
31
-
32
- >.ant-collapse-content{
33
- border-top: none;
34
-
35
- >.ant-collapse-content-box{
36
- padding: 0;
37
- }
38
- }
39
- }
40
-
41
-
42
- // 上下模式箭头方向
43
- @include m(icon-up-down){
44
- > .ant-collapse-item {
45
- &.ant-collapse-item-active{
46
- > .ant-collapse-header .ant-collapse-arrow{
47
- svg{
48
- transform: rotate(-90deg) !important;
49
- }
50
- }
51
- }
52
-
53
- > .ant-collapse-header .ant-collapse-arrow{
54
- /* stylelint-disable-next-line no-descending-specificity */
55
- svg{
56
- transform: rotate(90deg);
57
- }
58
- }
59
- }
60
-
61
- }
62
- }
@@ -1,15 +0,0 @@
1
- import { GctFormCollapseProvider } from './gct-form-collapse.provider.mjs';
2
- import { GctFormCollapse as GctFormCollapse$1 } from './gct-form-collapse.mjs';
3
-
4
- "use strict";
5
- var GctFormCollapse = {
6
- install(app) {
7
- _gct.register.formItem.register(
8
- "collapse",
9
- () => new GctFormCollapseProvider()
10
- );
11
- app.component(GctFormCollapse$1.name, GctFormCollapse$1);
12
- }
13
- };
14
-
15
- export { GctFormCollapse as default };
@@ -1,71 +0,0 @@
1
- import { isVNode, defineComponent, mergeProps, createVNode, resolveComponent } from 'vue';
2
- import { useNamespace } from '@gct-paas/core';
3
- import './gct-form-collapse-pane.scss';
4
-
5
- "use strict";
6
- function _isSlot(s) {
7
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
8
- }
9
- const GctFormCollapsePane = /* @__PURE__ */ defineComponent({
10
- name: "GctFormCollapsePane",
11
- props: {
12
- c: {
13
- type: Object,
14
- required: true
15
- },
16
- model: {
17
- type: Object,
18
- required: true
19
- }
20
- },
21
- setup(props) {
22
- const ns = useNamespace("form-collapse-pane");
23
- const style = {};
24
- function renderContainer(items) {
25
- if (props.model.layout === "flex") {
26
- return createVNode(resolveComponent("flex-container"), {
27
- "layout": props.model.flex
28
- }, _isSlot(items) ? items : {
29
- default: () => [items]
30
- });
31
- }
32
- if (props.model.layout === "grid") {
33
- return createVNode(resolveComponent("grid-container"), {
34
- "layout": props.model.grid
35
- }, _isSlot(items) ? items : {
36
- default: () => [items]
37
- });
38
- }
39
- console.error("\u4E0D\u652F\u6301\u7684layout\u7C7B\u578B" + props.model.layout);
40
- }
41
- if (props.model.width) {
42
- style[ns.cssVarName("form-collapse-pane-width")] = props.model.width;
43
- }
44
- if (props.model.height) {
45
- style[ns.cssVarName("form-collapse-pane-height")] = props.model.height;
46
- }
47
- return {
48
- ns,
49
- style,
50
- renderContainer
51
- };
52
- },
53
- render() {
54
- if (this.c.state.keepalive !== true && this.c.state.visible === false) {
55
- return null;
56
- }
57
- const items = this.$slots.default?.() || [];
58
- const lastVNode = items[items.length - 1];
59
- if (lastVNode) {
60
- lastVNode.props = mergeProps(lastVNode.props || {}, {
61
- class: this.ns.e("last-child")
62
- });
63
- }
64
- return createVNode("div", {
65
- "class": [this.ns.b(), this.ns.is("hidden", this.c.state.visible === false)],
66
- "style": this.style
67
- }, [this.renderContainer(items)]);
68
- }
69
- });
70
-
71
- export { GctFormCollapsePane, GctFormCollapsePane as default };
@@ -1,13 +0,0 @@
1
- import { useFormItemController, FormCollapsePaneController } from '@gct-paas/core';
2
-
3
- "use strict";
4
- class GctFormCollapsePaneProvider {
5
- component = "gct-form-collapse-pane";
6
- createController(form, item) {
7
- return useFormItemController(
8
- () => new FormCollapsePaneController(form, item)
9
- );
10
- }
11
- }
12
-
13
- export { GctFormCollapsePaneProvider };
@@ -1,23 +0,0 @@
1
- $gct-form-collapse-pane: (
2
- width: auto,
3
- height: auto,
4
- padding: 12px,
5
- );
6
-
7
- @include b(form-collapse-pane) {
8
- @include set-component-css-var('form-collapse-pane', $gct-form-collapse-pane);
9
-
10
- width: getCssVar(form-collapse-pane, width);
11
- height: getCssVar(form-collapse-pane, height);
12
- padding: getCssVar(form-collapse-pane, padding);
13
-
14
- @include when(hidden) {
15
- display: none;
16
- }
17
-
18
- }
19
-
20
- // 把最后一个的直接子组件的margin-bottom设置为0
21
- .#{bem(form-collapse)} .#{bem(form-collapse-pane)} .#{bem(form-collapse-pane,last-child)}{
22
- margin-bottom: 0 !important;
23
- }
@@ -1,15 +0,0 @@
1
- import { GctFormCollapsePaneProvider } from './gct-form-collapse-pane.provider.mjs';
2
- import { GctFormCollapsePane as GctFormCollapsePane$1 } from './gct-form-collapse-pane.mjs';
3
-
4
- "use strict";
5
- var GctFormCollapsePane = {
6
- install(app) {
7
- _gct.register.formItem.register(
8
- "collapse-pane",
9
- () => new GctFormCollapsePaneProvider()
10
- );
11
- app.component(GctFormCollapsePane$1.name, GctFormCollapsePane$1);
12
- }
13
- };
14
-
15
- export { GctFormCollapsePane as default };
@@ -1,88 +0,0 @@
1
- import { isVNode, defineComponent, createVNode, resolveComponent, ref } from 'vue';
2
- import { useNamespace } from '@gct-paas/core';
3
- import './gct-form-group.scss';
4
-
5
- "use strict";
6
- function _isSlot(s) {
7
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
8
- }
9
- const GctFormGroup = /* @__PURE__ */ defineComponent({
10
- name: "GctFormGroup",
11
- props: {
12
- c: {
13
- type: Object,
14
- required: true
15
- },
16
- model: {
17
- type: Object,
18
- required: true
19
- }
20
- },
21
- setup(props) {
22
- const ns = useNamespace("gct-form-group");
23
- const keys = ref([0]);
24
- function renderContainer(items) {
25
- if (props.model.layout === "flex") {
26
- return createVNode(resolveComponent("flex-container"), {
27
- "layout": props.model.flex
28
- }, _isSlot(items) ? items : {
29
- default: () => [items]
30
- });
31
- }
32
- if (props.model.layout === "grid") {
33
- return createVNode(resolveComponent("grid-container"), {
34
- "layout": props.model.grid
35
- }, _isSlot(items) ? items : {
36
- default: () => [items]
37
- });
38
- }
39
- console.error("\u4E0D\u652F\u6301\u7684layout\u7C7B\u578B" + props.model.layout);
40
- }
41
- const style = {};
42
- if (props.model.width) {
43
- style[ns.cssVarName("form-group-width")] = props.model.width;
44
- }
45
- if (props.model.height) {
46
- style[ns.cssVarName("form-group-height")] = props.model.height;
47
- }
48
- return {
49
- ns,
50
- keys,
51
- style,
52
- renderContainer
53
- };
54
- },
55
- render() {
56
- if (this.c.state.keepalive !== true && this.c.state.visible === false) {
57
- return null;
58
- }
59
- const items = this.$slots.default?.() || [];
60
- if (this.model.isCollapse) {
61
- let _slot;
62
- return createVNode(resolveComponent("a-collapse"), {
63
- "activeKey": this.keys,
64
- "onUpdate:activeKey": ($event) => this.keys = $event,
65
- "class": [this.ns.b(), this.ns.is("hidden-header", this.model.showHeader === false), this.ns.is("hidden", this.c.state.visible === false)],
66
- "style": this.style,
67
- "ghost": true
68
- }, {
69
- default: () => [createVNode(resolveComponent("a-collapse-panel"), {
70
- "key": "0",
71
- "header": this.model.title
72
- }, _isSlot(_slot = this.renderContainer(items)) ? _slot : {
73
- default: () => [_slot]
74
- })]
75
- });
76
- }
77
- return createVNode("div", {
78
- "class": [this.ns.b(), this.ns.is("hidden-header", this.model.showHeader === false), this.ns.is("hidden", this.c.state.visible === false)],
79
- "style": this.style
80
- }, [this.model.showHeader === false ? createVNode("div", {
81
- "class": this.ns.e("title")
82
- }, [this.model.title]) : null, createVNode("div", {
83
- "class": this.ns.e("content")
84
- }, [this.renderContainer(items)])]);
85
- }
86
- });
87
-
88
- export { GctFormGroup, GctFormGroup as default };
@@ -1,11 +0,0 @@
1
- import { useFormItemController, FormGroupController } from '@gct-paas/core';
2
-
3
- "use strict";
4
- class GctFormGroupProvider {
5
- component = "gct-form-group";
6
- createController(form, item) {
7
- return useFormItemController(() => new FormGroupController(form, item));
8
- }
9
- }
10
-
11
- export { GctFormGroupProvider };
@@ -1,28 +0,0 @@
1
- $gct-form-group: (
2
- min-height: 32px,
3
- width: auto,
4
- height: auto,
5
- );
6
-
7
- @include b(gct-form-group) {
8
- @include set-component-css-var('form-group', $gct-form-group);
9
-
10
- width: getCssVar(form-group, width);
11
- height: getCssVar(form-group, height);
12
- min-height: getCssVar(form-group, min-height);
13
-
14
- @include when(hidden-header) {
15
- @include e(title) {
16
- display: none;
17
- }
18
-
19
- @include e(content) {
20
- overflow: auto;
21
- height: 100%;
22
- }
23
- }
24
-
25
- @include when(hidden) {
26
- display: none;
27
- }
28
- }
@@ -1,15 +0,0 @@
1
- import { GctFormGroupProvider } from './gct-form-group.provider.mjs';
2
- import { GctFormGroup as GctFormGroup$1 } from './gct-form-group.mjs';
3
-
4
- "use strict";
5
- var GctFormGroup = {
6
- install(app) {
7
- _gct.register.formItem.register(
8
- "container",
9
- () => new GctFormGroupProvider()
10
- );
11
- app.component(GctFormGroup$1.name, GctFormGroup$1);
12
- }
13
- };
14
-
15
- export { GctFormGroup as default };
@@ -1,13 +0,0 @@
1
- import { useFormItemController, FormHiddenItemController } from '@gct-paas/core';
2
-
3
- "use strict";
4
- class GctFormHiddenItemProvider {
5
- component = "gct-form-hidden-item";
6
- createController(form, item) {
7
- return useFormItemController(
8
- () => new FormHiddenItemController(form, item)
9
- );
10
- }
11
- }
12
-
13
- export { GctFormHiddenItemProvider };