@gct-paas/core-web 0.0.1-dev.14 → 0.0.1-dev.16

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 (172) hide show
  1. package/dist/core-web.css +1 -0
  2. package/dist/index.min.cjs +3 -3
  3. package/dist/index.system.min.js +3 -3
  4. package/es/components/code-editor/code-editor.d.ts +28 -2
  5. package/es/components/code-editor/code-editor.mjs +39 -8
  6. package/es/components/code-editor/code-editor.scss +1 -1
  7. package/es/components/index.d.ts +4 -0
  8. package/es/components/index.mjs +4 -0
  9. package/es/components/layout/flex-container/flex-container.d.ts +15 -0
  10. package/es/components/layout/flex-container/flex-container.mjs +90 -0
  11. package/es/components/layout/flex-container/flex-container.scss +3 -0
  12. package/es/components/layout/flex-item/flex-item.d.ts +14 -0
  13. package/es/components/layout/flex-item/flex-item.mjs +53 -0
  14. package/es/components/layout/flex-item/flex-item.scss +17 -0
  15. package/es/components/layout/grid-container/grid-container.d.ts +13 -0
  16. package/es/components/layout/grid-container/grid-container.mjs +47 -0
  17. package/es/components/layout/view-container/view-container.d.ts +25 -0
  18. package/es/components/layout/view-container/view-container.mjs +39 -0
  19. package/es/components/layout/view-container/view-container.scss +19 -0
  20. package/es/editor/gct-form-check-switch/gct-form-check-switch.d.ts +40 -0
  21. package/es/editor/gct-form-check-switch/gct-form-check-switch.mjs +53 -0
  22. package/es/editor/gct-form-check-switch/gct-form-check-switch.provider.d.ts +13 -0
  23. package/es/editor/gct-form-check-switch/gct-form-check-switch.provider.mjs +6 -0
  24. package/es/editor/gct-form-check-switch/gct-form-check-switch.scss +10 -0
  25. package/es/editor/gct-form-check-switch/index.d.ts +4 -0
  26. package/es/editor/gct-form-check-switch/index.mjs +12 -0
  27. package/es/editor/gct-form-checkbox/gct-form-checkbox.d.ts +41 -0
  28. package/es/editor/gct-form-checkbox/gct-form-checkbox.mjs +70 -0
  29. package/es/editor/gct-form-checkbox/gct-form-checkbox.scss +56 -0
  30. package/es/editor/gct-form-checkbox/index.d.ts +11 -0
  31. package/es/editor/gct-form-checkbox/index.mjs +19 -0
  32. package/es/editor/gct-form-color/gct-form-color.d.ts +37 -0
  33. package/es/editor/gct-form-color/gct-form-color.mjs +43 -0
  34. package/es/editor/gct-form-color/gct-form-color.provider.d.ts +13 -0
  35. package/es/editor/gct-form-color/gct-form-color.provider.mjs +6 -0
  36. package/es/editor/gct-form-color/gct-form-color.scss +3 -0
  37. package/es/editor/gct-form-color/index.d.ts +4 -0
  38. package/es/editor/gct-form-color/index.mjs +12 -0
  39. package/es/editor/gct-form-i18n/gct-form-i18n.d.ts +38 -0
  40. package/es/editor/gct-form-i18n/gct-form-i18n.mjs +62 -0
  41. package/es/editor/gct-form-i18n/gct-form-i18n.provider.d.ts +13 -0
  42. package/es/editor/gct-form-i18n/gct-form-i18n.provider.mjs +6 -0
  43. package/es/editor/gct-form-i18n/index.d.ts +4 -0
  44. package/es/editor/gct-form-i18n/index.mjs +12 -0
  45. package/es/editor/gct-form-icon-select/gct-form-icon-select.d.ts +29 -0
  46. package/es/editor/gct-form-icon-select/gct-form-icon-select.mjs +74 -0
  47. package/es/editor/gct-form-icon-select/gct-form-icon-select.scss +14 -0
  48. package/es/editor/gct-form-icon-select/index.d.ts +8 -0
  49. package/es/editor/gct-form-icon-select/index.mjs +14 -0
  50. package/es/editor/gct-form-info/gct-form-info.d.ts +28 -0
  51. package/es/editor/gct-form-info/gct-form-info.mjs +40 -0
  52. package/es/editor/gct-form-info/gct-form-info.scss +8 -0
  53. package/es/editor/gct-form-info/index.d.ts +8 -0
  54. package/es/editor/gct-form-info/index.mjs +14 -0
  55. package/es/editor/gct-form-length-unit/gct-form-length-unit.d.ts +39 -0
  56. package/es/editor/gct-form-length-unit/gct-form-length-unit.mjs +43 -0
  57. package/es/editor/gct-form-length-unit/gct-form-length-unit.provider.d.ts +13 -0
  58. package/es/editor/gct-form-length-unit/gct-form-length-unit.provider.mjs +6 -0
  59. package/es/editor/gct-form-length-unit/index.d.ts +4 -0
  60. package/es/editor/gct-form-length-unit/index.mjs +12 -0
  61. package/es/editor/gct-form-number/gct-form-number.d.ts +29 -0
  62. package/es/editor/gct-form-number/gct-form-number.mjs +46 -0
  63. package/es/editor/gct-form-number/gct-form-number.provider.d.ts +4 -0
  64. package/es/editor/gct-form-number/gct-form-number.provider.mjs +6 -0
  65. package/es/editor/gct-form-number/index.d.ts +4 -0
  66. package/es/editor/gct-form-number/index.mjs +12 -0
  67. package/es/editor/gct-form-picker/gct-form-picker.d.ts +39 -0
  68. package/es/editor/gct-form-picker/gct-form-picker.mjs +92 -0
  69. package/es/editor/gct-form-picker/gct-form-picker.provider.d.ts +13 -0
  70. package/es/editor/gct-form-picker/gct-form-picker.provider.mjs +6 -0
  71. package/es/editor/gct-form-picker/index.d.ts +4 -0
  72. package/es/editor/gct-form-picker/index.mjs +12 -0
  73. package/es/editor/gct-form-radio/gct-form-radio.d.ts +37 -0
  74. package/es/editor/gct-form-radio/gct-form-radio.mjs +70 -0
  75. package/es/editor/gct-form-radio/gct-form-radio.scss +68 -0
  76. package/es/editor/gct-form-radio/index.d.ts +11 -0
  77. package/es/editor/gct-form-radio/index.mjs +19 -0
  78. package/es/editor/gct-form-select/gct-form-select.d.ts +38 -0
  79. package/es/editor/gct-form-select/gct-form-select.mjs +50 -0
  80. package/es/editor/gct-form-select/gct-form-select.provider.d.ts +13 -0
  81. package/es/editor/gct-form-select/gct-form-select.provider.mjs +6 -0
  82. package/es/editor/gct-form-select/index.d.ts +4 -0
  83. package/es/editor/gct-form-select/index.mjs +12 -0
  84. package/es/editor/gct-form-span/gct-form-span.d.ts +43 -0
  85. package/es/editor/gct-form-span/gct-form-span.mjs +89 -0
  86. package/es/editor/gct-form-span/gct-form-span.provider.d.ts +13 -0
  87. package/es/editor/gct-form-span/gct-form-span.provider.mjs +6 -0
  88. package/es/editor/gct-form-span/gct-form-span.scss +10 -0
  89. package/es/editor/gct-form-span/index.d.ts +4 -0
  90. package/es/editor/gct-form-span/index.mjs +12 -0
  91. package/es/editor/gct-form-switch/gct-form-switch.d.ts +26 -0
  92. package/es/editor/gct-form-switch/gct-form-switch.mjs +35 -0
  93. package/es/editor/gct-form-switch/gct-form-switch.provider.d.ts +13 -0
  94. package/es/editor/gct-form-switch/gct-form-switch.provider.mjs +6 -0
  95. package/es/editor/gct-form-switch/index.d.ts +7 -0
  96. package/es/editor/gct-form-switch/index.mjs +17 -0
  97. package/es/editor/gct-form-text/gct-form-text.d.ts +32 -0
  98. package/es/editor/gct-form-text/gct-form-text.mjs +45 -0
  99. package/es/editor/gct-form-text/gct-form-text.provider.d.ts +13 -0
  100. package/es/editor/gct-form-text/gct-form-text.provider.mjs +6 -0
  101. package/es/editor/gct-form-text/index.d.ts +7 -0
  102. package/es/editor/gct-form-text/index.mjs +17 -0
  103. package/es/editor/gct-form-textarea/gct-form-textarea.d.ts +28 -0
  104. package/es/editor/gct-form-textarea/gct-form-textarea.mjs +40 -0
  105. package/es/editor/gct-form-textarea/gct-form-textarea.provider.d.ts +4 -0
  106. package/es/editor/gct-form-textarea/gct-form-textarea.provider.mjs +6 -0
  107. package/es/editor/gct-form-textarea/index.d.ts +4 -0
  108. package/es/editor/gct-form-textarea/index.mjs +12 -0
  109. package/es/editor/index.d.ts +5 -0
  110. package/es/editor/index.mjs +42 -0
  111. package/es/index.d.ts +1 -0
  112. package/es/index.mjs +15 -1
  113. package/es/types/index.d.ts +1 -0
  114. package/es/widgets/gct-edit-form/gct-edit-form.d.ts +62 -0
  115. package/es/widgets/gct-edit-form/gct-edit-form.mjs +126 -0
  116. package/es/widgets/gct-edit-form/index.d.ts +5 -0
  117. package/es/widgets/gct-edit-form/index.mjs +10 -0
  118. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.d.ts +31 -0
  119. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.mjs +73 -0
  120. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.d.ts +5 -0
  121. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.mjs +11 -0
  122. package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.scss +62 -0
  123. package/es/widgets/gct-form/gct-form-collapse/index.d.ts +5 -0
  124. package/es/widgets/gct-form/gct-form-collapse/index.mjs +15 -0
  125. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.d.ts +29 -0
  126. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.mjs +71 -0
  127. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.d.ts +5 -0
  128. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.mjs +13 -0
  129. package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.scss +23 -0
  130. package/es/widgets/gct-form/gct-form-collapse-pane/index.d.ts +5 -0
  131. package/es/widgets/gct-form/gct-form-collapse-pane/index.mjs +15 -0
  132. package/es/widgets/gct-form/gct-form-group/gct-form-group.d.ts +30 -0
  133. package/es/widgets/gct-form/gct-form-group/gct-form-group.mjs +88 -0
  134. package/es/widgets/gct-form/gct-form-group/gct-form-group.provider.d.ts +5 -0
  135. package/es/widgets/gct-form/gct-form-group/gct-form-group.provider.mjs +11 -0
  136. package/es/widgets/gct-form/gct-form-group/gct-form-group.scss +28 -0
  137. package/es/widgets/gct-form/gct-form-group/index.d.ts +5 -0
  138. package/es/widgets/gct-form/gct-form-group/index.mjs +15 -0
  139. package/es/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.d.ts +5 -0
  140. package/es/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.mjs +13 -0
  141. package/es/widgets/gct-form/gct-form-item/gct-form-item.d.ts +35 -0
  142. package/es/widgets/gct-form/gct-form-item/gct-form-item.mjs +141 -0
  143. package/es/widgets/gct-form/gct-form-item/gct-form-item.provider.d.ts +5 -0
  144. package/es/widgets/gct-form/gct-form-item/gct-form-item.provider.mjs +11 -0
  145. package/es/widgets/gct-form/gct-form-item/gct-form-item.scss +115 -0
  146. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.d.ts +28 -0
  147. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.mjs +53 -0
  148. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.provider.d.ts +5 -0
  149. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.provider.mjs +11 -0
  150. package/es/widgets/gct-form/gct-form-tab/gct-form-tab.scss +63 -0
  151. package/es/widgets/gct-form/gct-form-tab/index.d.ts +5 -0
  152. package/es/widgets/gct-form/gct-form-tab/index.mjs +12 -0
  153. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.d.ts +29 -0
  154. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.mjs +65 -0
  155. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.d.ts +5 -0
  156. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.mjs +11 -0
  157. package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.scss +16 -0
  158. package/es/widgets/gct-form/gct-form-tab-pane/index.d.ts +5 -0
  159. package/es/widgets/gct-form/gct-form-tab-pane/index.mjs +15 -0
  160. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.d.ts +30 -0
  161. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.mjs +71 -0
  162. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.d.ts +5 -0
  163. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.mjs +11 -0
  164. package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.scss +25 -0
  165. package/es/widgets/gct-form/gct-form-title-group/index.d.ts +5 -0
  166. package/es/widgets/gct-form/gct-form-title-group/index.mjs +16 -0
  167. package/es/widgets/gct-form/gct-form.d.ts +31 -0
  168. package/es/widgets/gct-form/gct-form.mjs +109 -0
  169. package/es/widgets/gct-form/gct-form.scss +11 -0
  170. package/es/widgets/gct-form/index.d.ts +5 -0
  171. package/es/widgets/gct-form/index.mjs +31 -0
  172. package/package.json +7 -5
@@ -0,0 +1,53 @@
1
+ import { defineComponent, createVNode } from 'vue';
2
+ import { useNamespace } from '@gct-paas/core';
3
+
4
+ "use strict";
5
+ const FlexItem = /* @__PURE__ */ defineComponent({
6
+ name: "FlexItem",
7
+ props: {
8
+ layout: Object
9
+ },
10
+ setup(props) {
11
+ const ns = useNamespace("flex-item");
12
+ const getStyle = () => {
13
+ const style = {};
14
+ if (props.layout) {
15
+ const {
16
+ order,
17
+ alignSelf,
18
+ flexBasis,
19
+ flexGrow,
20
+ flexShrink
21
+ } = props.layout;
22
+ if (order != null) {
23
+ style["order"] = order;
24
+ }
25
+ if (alignSelf != null) {
26
+ style["align-self"] = alignSelf;
27
+ }
28
+ if (flexBasis != null) {
29
+ style["flex-basis"] = flexBasis;
30
+ }
31
+ if (flexGrow != null) {
32
+ style["flex-grow"] = flexGrow;
33
+ }
34
+ if (flexShrink != null) {
35
+ style["flex-shrink"] = flexShrink;
36
+ }
37
+ }
38
+ return style;
39
+ };
40
+ return {
41
+ ns,
42
+ getStyle
43
+ };
44
+ },
45
+ render() {
46
+ return createVNode("div", {
47
+ "class": this.ns.b(),
48
+ "style": this.getStyle()
49
+ }, [this.$slots.default?.()]);
50
+ }
51
+ });
52
+
53
+ export { FlexItem, FlexItem as default };
@@ -0,0 +1,17 @@
1
+ // $flex-item: (
2
+ // 'order': 0,
3
+ // 'flex-grow': 0,
4
+ // 'flex-shrink': 1,
5
+ // 'flex-basis': 'auto',
6
+ // 'align-self': 'auto'
7
+ // );
8
+
9
+ // @include b(flex-item) {
10
+ // @include set-component-css-var('flex-item', $flex-item);
11
+
12
+ // order: #{getCssVar(flex-item, order)};
13
+ // flex-grow: #{getCssVar(flex-item, flex-grow)};
14
+ // flex-shrink: #{getCssVar(flex-item, flex-shrink)};
15
+ // flex-basis: #{getCssVar(flex-item, flex-basis)};
16
+ // align-self: #{getCssVar(flex-item, align-self)};
17
+ // }
@@ -0,0 +1,13 @@
1
+ import { PropType } from 'vue';
2
+ import { IGridContainer } from '@gct-paas/core';
3
+ /**
4
+ * 栅格布局
5
+ */
6
+ export declare const GridContainer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
7
+ layout: PropType<IGridContainer>;
8
+ }>, {
9
+ ns: import('@gct-paas/core').Namespace;
10
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
+ layout: PropType<IGridContainer>;
12
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
13
+ export default GridContainer;
@@ -0,0 +1,47 @@
1
+ import { isVNode, defineComponent, createVNode, resolveComponent } from 'vue';
2
+ import { useNamespace } from '@gct-paas/core';
3
+
4
+ "use strict";
5
+ function _isSlot(s) {
6
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
7
+ }
8
+ const GridContainer = /* @__PURE__ */ defineComponent({
9
+ name: "GridContainer",
10
+ props: {
11
+ layout: Object
12
+ },
13
+ setup() {
14
+ const ns = useNamespace("grid-container");
15
+ return {
16
+ ns
17
+ };
18
+ },
19
+ render() {
20
+ let _slot;
21
+ const l = this.layout || {};
22
+ let items = this.$slots.default?.() || [];
23
+ if (items.length > 0) {
24
+ items = items[0].children || [];
25
+ }
26
+ return createVNode(resolveComponent("a-row"), {
27
+ "class": this.ns.b(),
28
+ "wrap": true,
29
+ "gutter": l.gutter
30
+ }, _isSlot(_slot = items.map((item) => {
31
+ if (!item) {
32
+ return null;
33
+ }
34
+ const model = item.props.model.gridItem;
35
+ return createVNode(resolveComponent("a-col"), {
36
+ "span": model ? model.span ?? 24 : 24,
37
+ "offset": model ? model.offset ?? 0 : 0
38
+ }, _isSlot(item) ? item : {
39
+ default: () => [item]
40
+ });
41
+ })) ? _slot : {
42
+ default: () => [_slot]
43
+ });
44
+ }
45
+ });
46
+
47
+ export { GridContainer, GridContainer as default };
@@ -0,0 +1,25 @@
1
+ export declare const ViewContainer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ context: {
3
+ type: ObjectConstructor;
4
+ };
5
+ params: {
6
+ type: ObjectConstructor;
7
+ };
8
+ modal: {
9
+ type: ObjectConstructor;
10
+ required: true;
11
+ };
12
+ }>, {
13
+ ns: import('@gct-paas/core').Namespace;
14
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ context: {
16
+ type: ObjectConstructor;
17
+ };
18
+ params: {
19
+ type: ObjectConstructor;
20
+ };
21
+ modal: {
22
+ type: ObjectConstructor;
23
+ required: true;
24
+ };
25
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,39 @@
1
+ import { defineComponent, createVNode } from 'vue';
2
+ import { useNamespace } from '@gct-paas/core';
3
+ import './view-container.scss';
4
+
5
+ "use strict";
6
+ const ViewContainer = /* @__PURE__ */ defineComponent({
7
+ name: "ViewContainer",
8
+ props: {
9
+ context: {
10
+ type: Object
11
+ },
12
+ params: {
13
+ type: Object
14
+ },
15
+ modal: {
16
+ type: Object,
17
+ required: true
18
+ }
19
+ },
20
+ setup() {
21
+ const ns = useNamespace("view-container");
22
+ return {
23
+ ns
24
+ };
25
+ },
26
+ render() {
27
+ return createVNode("div", {
28
+ "class": this.ns.b()
29
+ }, [this.$slots.header ? createVNode("div", {
30
+ "class": this.ns.b("header")
31
+ }, [this.$slots.header()]) : null, createVNode("div", {
32
+ "class": this.ns.b("content")
33
+ }, [this.$slots.default?.()]), this.$slots.footer ? createVNode("div", {
34
+ "class": this.ns.b("footer")
35
+ }, [this.$slots.footer()]) : null]);
36
+ }
37
+ });
38
+
39
+ export { ViewContainer };
@@ -0,0 +1,19 @@
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
+ }
@@ -0,0 +1,40 @@
1
+ import { PropType } from 'vue';
2
+ import { IFormItem, ICheckSwitchEditor, EditorController } from '@gct-paas/core';
3
+ /**
4
+ * 文本编辑器
5
+ */
6
+ export declare const GctFormCheckSwitch: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
7
+ itemModel: {
8
+ type: PropType<IFormItem>;
9
+ required: true;
10
+ };
11
+ model: {
12
+ type: PropType<ICheckSwitchEditor>;
13
+ required: true;
14
+ };
15
+ value: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ }>, {
20
+ ns: import('@gct-paas/core').Namespace;
21
+ c: EditorController<ICheckSwitchEditor>;
22
+ val: import('vue').WritableComputedRef<any, any>;
23
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
24
+ itemModel: {
25
+ type: PropType<IFormItem>;
26
+ required: true;
27
+ };
28
+ model: {
29
+ type: PropType<ICheckSwitchEditor>;
30
+ required: true;
31
+ };
32
+ value: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ }>> & Readonly<{
37
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
38
+ }>, {
39
+ value: boolean;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,53 @@
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 };
@@ -0,0 +1,13 @@
1
+ import { IEditorProvider } from '@gct-paas/core';
2
+ /**
3
+ * 选项框类型开关
4
+ *
5
+ * @author zhanghanrui
6
+ * @date 2024-03-27 10:03:03
7
+ * @export
8
+ * @class GctFormCheckSwitchProvider
9
+ * @implements {IEditorProvider}
10
+ */
11
+ export declare class GctFormCheckSwitchProvider implements IEditorProvider {
12
+ component: string;
13
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ class GctFormCheckSwitchProvider {
3
+ component = "gct-form-check-switch";
4
+ }
5
+
6
+ export { GctFormCheckSwitchProvider };
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ install(app: import('vue').App): void;
3
+ };
4
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { widthEditorInstall, EditorType } 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
+ EditorType.CHECK_SWITCH,
8
+ () => new GctFormCheckSwitchProvider(),
9
+ GctFormCheckSwitch$1
10
+ );
11
+
12
+ export { GctFormCheckSwitch as default };
@@ -0,0 +1,41 @@
1
+ import { PropType } from 'vue';
2
+ import { IFormItemController, ICheckboxEditor, IDictionaryItem } from '@gct-paas/core';
3
+ export declare const GctFormCheckbox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ c: {
5
+ type: PropType<IFormItemController>;
6
+ required: true;
7
+ };
8
+ model: {
9
+ type: PropType<ICheckboxEditor>;
10
+ required: true;
11
+ };
12
+ value: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ }>, {
17
+ ns: import('@gct-paas/core').Namespace;
18
+ checked: import('vue').ComputedRef<any>;
19
+ onChange: (checkVal: any) => void;
20
+ options: import('vue').ComputedRef<(IDictionaryItem & {
21
+ checked?: boolean;
22
+ })[]>;
23
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
24
+ c: {
25
+ type: PropType<IFormItemController>;
26
+ required: true;
27
+ };
28
+ model: {
29
+ type: PropType<ICheckboxEditor>;
30
+ required: true;
31
+ };
32
+ value: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ }>> & Readonly<{
37
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
38
+ }>, {
39
+ value: string;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
41
+ export default GctFormCheckbox;
@@ -0,0 +1,70 @@
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 };
@@ -0,0 +1,56 @@
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
+ }
@@ -0,0 +1,11 @@
1
+ import { IEditorProvider } from '@gct-paas/core';
2
+ export declare class Provider implements IEditorProvider {
3
+ component: string;
4
+ }
5
+ declare const _default: {
6
+ install(app: import('vue').App): void;
7
+ };
8
+ export default _default;
9
+ export declare const oldCheckboxCom: {
10
+ install(app: import('vue').App): void;
11
+ };
@@ -0,0 +1,19 @@
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 };
@@ -0,0 +1,37 @@
1
+ import { PropType } from 'vue';
2
+ import { ColorEditorController, IColorEditor, IFormItem } from '@gct-paas/core';
3
+ /**
4
+ * 颜色选择编辑器
5
+ */
6
+ export declare const GctFormColor: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
7
+ itemModel: {
8
+ type: PropType<IFormItem>;
9
+ required: true;
10
+ };
11
+ model: {
12
+ type: PropType<IColorEditor>;
13
+ required: true;
14
+ };
15
+ value: {
16
+ type: StringConstructor;
17
+ };
18
+ }>, {
19
+ ns: import('@gct-paas/core').Namespace;
20
+ c: ColorEditorController;
21
+ val: import('vue').WritableComputedRef<any, any>;
22
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
23
+ itemModel: {
24
+ type: PropType<IFormItem>;
25
+ required: true;
26
+ };
27
+ model: {
28
+ type: PropType<IColorEditor>;
29
+ required: true;
30
+ };
31
+ value: {
32
+ type: StringConstructor;
33
+ };
34
+ }>> & Readonly<{
35
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
36
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
+ export default GctFormColor;
@@ -0,0 +1,43 @@
1
+ import { defineComponent, createVNode, resolveComponent, mergeProps } from 'vue';
2
+ import { useNamespace, ColorEditorController, 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(props) {
24
+ const ns = useNamespace("form-color");
25
+ const c = new ColorEditorController(props.model);
26
+ const val = useGctFormValue();
27
+ return {
28
+ ns,
29
+ c,
30
+ val
31
+ };
32
+ },
33
+ render() {
34
+ return createVNode(resolveComponent("color-editor"), mergeProps({
35
+ "value": this.val,
36
+ "onUpdate:value": ($event) => this.val = $event
37
+ }, this.model.props || {}, {
38
+ "class": [this.ns.b(), this.ns.is("readonly", this.model.readonly)]
39
+ }), null);
40
+ }
41
+ });
42
+
43
+ export { GctFormColor, GctFormColor as default };
@@ -0,0 +1,13 @@
1
+ import { IEditorProvider } from '@gct-paas/core';
2
+ /**
3
+ * 颜色选择编辑器
4
+ *
5
+ * @author lingxiaoming
6
+ * @date 2024-07-17 04:48:33
7
+ * @export
8
+ * @class GctFormColorProvider
9
+ * @implements {IEditorProvider}
10
+ */
11
+ export declare class GctFormColorProvider implements IEditorProvider {
12
+ component: string;
13
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ class GctFormColorProvider {
3
+ component = "gct-form-color";
4
+ }
5
+
6
+ export { GctFormColorProvider };
@@ -0,0 +1,3 @@
1
+ @include b(form-color) {
2
+ vertical-align: middle;
3
+ }