@cmstops/pro-compo 0.1.3 → 0.1.4

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 (132) hide show
  1. package/dist/index.css +26 -4
  2. package/dist/index.min.css +1 -1
  3. package/es/appCenter/component.js +2 -1
  4. package/es/config.d.ts +2 -0
  5. package/es/config.js +3 -0
  6. package/es/contentModal/component.d.ts +0 -0
  7. package/es/contentModal/component.js +175 -0
  8. package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
  9. package/es/contentModal/components/CompoList/CompoFilter/index.js +103 -0
  10. package/es/contentModal/components/CompoList/index.d.ts +0 -0
  11. package/es/contentModal/components/CompoList/index.js +234 -0
  12. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
  13. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +44 -0
  14. package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
  15. package/es/contentModal/components/ViewAllColumn/columnTree/index.js +101 -0
  16. package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
  17. package/es/contentModal/components/ViewAllColumn/index.js +277 -0
  18. package/es/contentModal/components/storeBox/index.d.ts +0 -0
  19. package/es/contentModal/components/storeBox/index.js +107 -0
  20. package/es/contentModal/index.d.ts +2 -0
  21. package/es/contentModal/index.js +7 -0
  22. package/es/contentModal/script/api.d.ts +10 -0
  23. package/es/contentModal/script/api.js +45 -0
  24. package/es/contentModal/style/MediaFilter.less +8 -0
  25. package/es/contentModal/style/ViewAllColumn.less +33 -0
  26. package/es/contentModal/style/columnTree.less +9 -0
  27. package/es/contentModal/style/css.js +5 -0
  28. package/es/contentModal/style/index.css +13 -0
  29. package/es/contentModal/style/index.d.ts +5 -0
  30. package/es/contentModal/style/index.js +5 -0
  31. package/es/contentModal/style/index.less +16 -0
  32. package/es/contentModal/style/storeBox.less +45 -0
  33. package/es/hooks/batch.d.ts +8 -0
  34. package/es/hooks/batch.js +26 -0
  35. package/es/hooks/user.d.ts +11 -0
  36. package/es/hooks/user.js +46 -0
  37. package/es/index.css +26 -4
  38. package/es/index.d.ts +4 -1
  39. package/es/index.js +4 -1
  40. package/es/index.less +4 -1
  41. package/es/messageBox/component.js +2 -1
  42. package/es/messageBox/list.js +4 -4
  43. package/es/resourceModal/component.d.ts +0 -0
  44. package/es/resourceModal/component.js +14 -0
  45. package/es/resourceModal/index.d.ts +2 -0
  46. package/es/resourceModal/index.js +7 -0
  47. package/es/style.css +5 -0
  48. package/es/typeIcons/component.d.ts +0 -0
  49. package/es/typeIcons/component.js +62 -0
  50. package/es/typeIcons/index.d.ts +2 -0
  51. package/es/typeIcons/index.js +7 -0
  52. package/es/typeIcons/style/css.js +1 -0
  53. package/es/typeIcons/style/index.css +5 -0
  54. package/es/typeIcons/style/index.d.ts +1 -0
  55. package/es/typeIcons/style/index.js +1 -0
  56. package/es/typeIcons/style/index.less +5 -0
  57. package/es/uploadStep/component.d.ts +0 -0
  58. package/es/uploadStep/component.js +14 -0
  59. package/es/uploadStep/index.d.ts +2 -0
  60. package/es/uploadStep/index.js +7 -0
  61. package/es/uploadStep/style/css.js +1 -0
  62. package/es/uploadStep/style/index.d.ts +1 -0
  63. package/es/uploadStep/style/index.js +1 -0
  64. package/es/userAvater/component.js +3 -3
  65. package/es/utils/index.d.ts +1 -0
  66. package/es/utils/index.js +7 -0
  67. package/es/utils/request.js +3 -4
  68. package/es/utils/typeMap.d.ts +116 -0
  69. package/es/utils/typeMap.js +22 -0
  70. package/lib/appCenter/component.js +2 -1
  71. package/lib/config.js +6 -0
  72. package/lib/contentModal/component.js +176 -0
  73. package/lib/contentModal/components/CompoList/CompoFilter/index.js +104 -0
  74. package/lib/contentModal/components/CompoList/index.js +235 -0
  75. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +45 -0
  76. package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +102 -0
  77. package/lib/contentModal/components/ViewAllColumn/index.js +278 -0
  78. package/lib/contentModal/components/storeBox/index.js +108 -0
  79. package/lib/contentModal/index.js +8 -0
  80. package/lib/contentModal/script/api.js +52 -0
  81. package/lib/contentModal/style/MediaFilter.less +8 -0
  82. package/lib/contentModal/style/ViewAllColumn.less +33 -0
  83. package/lib/contentModal/style/columnTree.less +9 -0
  84. package/lib/contentModal/style/css.js +6 -0
  85. package/lib/contentModal/style/index.css +13 -0
  86. package/lib/contentModal/style/index.js +6 -0
  87. package/lib/contentModal/style/index.less +16 -0
  88. package/lib/contentModal/style/storeBox.less +45 -0
  89. package/lib/hooks/batch.js +27 -0
  90. package/lib/hooks/user.js +49 -0
  91. package/lib/index.css +26 -4
  92. package/lib/index.js +14 -8
  93. package/lib/index.less +4 -1
  94. package/lib/messageBox/component.js +2 -1
  95. package/lib/messageBox/list.js +4 -4
  96. package/lib/resourceModal/component.js +15 -0
  97. package/lib/resourceModal/index.js +8 -0
  98. package/lib/resourceModal/style/index.css +4 -0
  99. package/lib/resourceModal/style/index.less +4 -0
  100. package/lib/typeIcons/component.js +63 -0
  101. package/lib/{button → typeIcons}/index.js +2 -2
  102. package/lib/typeIcons/style/css.js +2 -0
  103. package/lib/typeIcons/style/index.css +5 -0
  104. package/lib/typeIcons/style/index.js +2 -0
  105. package/lib/typeIcons/style/index.less +5 -0
  106. package/lib/uploadStep/component.js +15 -0
  107. package/lib/uploadStep/index.js +8 -0
  108. package/lib/uploadStep/style/css.js +2 -0
  109. package/lib/uploadStep/style/index.css +4 -0
  110. package/lib/uploadStep/style/index.js +2 -0
  111. package/lib/uploadStep/style/index.less +4 -0
  112. package/lib/userAvater/component.js +3 -3
  113. package/lib/utils/index.js +13 -0
  114. package/lib/utils/request.js +3 -4
  115. package/lib/utils/typeMap.js +25 -0
  116. package/package.json +4 -2
  117. package/es/_virtual/plugin-vue_export-helper.js +0 -7
  118. package/es/button/component.d.ts +0 -24
  119. package/es/button/component.js +0 -43
  120. package/es/button/index.d.ts +0 -103
  121. package/es/button/index.js +0 -7
  122. package/lib/_virtual/plugin-vue_export-helper.js +0 -8
  123. package/lib/button/component.js +0 -44
  124. /package/es/{button → resourceModal}/style/css.js +0 -0
  125. /package/es/{button → resourceModal}/style/index.css +0 -0
  126. /package/es/{button → resourceModal}/style/index.d.ts +0 -0
  127. /package/es/{button → resourceModal}/style/index.js +0 -0
  128. /package/es/{button → resourceModal}/style/index.less +0 -0
  129. /package/{lib/button → es/uploadStep}/style/index.css +0 -0
  130. /package/{lib/button → es/uploadStep}/style/index.less +0 -0
  131. /package/lib/{button → resourceModal}/style/css.js +0 -0
  132. /package/lib/{button → resourceModal}/style/index.js +0 -0
@@ -0,0 +1,278 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var component = require("../../../typeIcons/component.js");
5
+ var index = require("./MediaFilter/index.js");
6
+ var batch = require("../../../hooks/batch.js");
7
+ var api = require("../../script/api.js");
8
+ const _hoisted_1 = { class: "view-all-column-container" };
9
+ const _hoisted_2 = { class: "content-table-view" };
10
+ const _hoisted_3 = { class: "title-span" };
11
+ const _hoisted_4 = ["onClick"];
12
+ const _hoisted_5 = { class: "title" };
13
+ const _hoisted_6 = { class: "bottom-view" };
14
+ const _hoisted_7 = { class: "left" };
15
+ const _sfc_main = vue.defineComponent({
16
+ ...{ name: "ViewAllColumn" },
17
+ __name: "index",
18
+ props: {
19
+ maxSelect: {},
20
+ defaultSelectedData: {},
21
+ typeData: {},
22
+ series: {},
23
+ banner: {},
24
+ userInfo: {}
25
+ },
26
+ emits: ["change"],
27
+ setup(__props, { emit }) {
28
+ const props = __props;
29
+ const _maxSelect = props.maxSelect || 100;
30
+ const selectedData = vue.ref([]);
31
+ const tempSelectedData = vue.computed(() => {
32
+ return props.defaultSelectedData || [];
33
+ });
34
+ vue.watch(
35
+ () => tempSelectedData.value,
36
+ (val) => {
37
+ selectedData.value = val;
38
+ }
39
+ );
40
+ const importantBanner = vue.computed(() => {
41
+ return props.banner !== "all";
42
+ });
43
+ const {
44
+ isItemChecked,
45
+ hoverBatchBox,
46
+ tableCellMouseEnter,
47
+ tableCellMouseLeave
48
+ } = batch();
49
+ const clickCheckbox = (e, record) => {
50
+ e.stopPropagation();
51
+ e.preventDefault();
52
+ selectData(record);
53
+ };
54
+ const selectTableCell = (record) => {
55
+ selectData(record);
56
+ };
57
+ const selectData = (record) => {
58
+ if (importantBanner.value) {
59
+ const {
60
+ cover: { banner }
61
+ } = record;
62
+ if (!banner) {
63
+ return webVue.Message.warning({ content: "\u8BE5\u5185\u5BB9\u4E0D\u5177\u5907\u72EC\u7ACB\u8F6E\u64AD\u56FE" });
64
+ }
65
+ }
66
+ addDataToSelectedList(record);
67
+ };
68
+ const addDataToSelectedList = async (record) => {
69
+ const index2 = selectedData.value.findIndex((v) => v.id === record.id);
70
+ if (selectedData.value.length < _maxSelect) {
71
+ if (index2 === -1) {
72
+ if (await api.checkCommitFulfillment(props.userInfo.BASE_API, record)) {
73
+ selectedData.value.push(record);
74
+ }
75
+ } else {
76
+ selectedData.value.splice(index2, 1);
77
+ }
78
+ emitChange();
79
+ } else {
80
+ if (index2 === -1) {
81
+ selectedData.value.splice(selectedData.value.length - 1, 1);
82
+ selectedData.value.push(record);
83
+ } else {
84
+ selectedData.value.splice(index2, 1);
85
+ }
86
+ emitChange();
87
+ }
88
+ };
89
+ const emitChange = () => {
90
+ emit("change", selectedData.value);
91
+ };
92
+ const group_id = vue.ref(0);
93
+ const categoryCascaderData = vue.ref([]);
94
+ const listMinHeight = vue.ref(0);
95
+ const scrollPercent = { y: "100%" };
96
+ const search = () => {
97
+ };
98
+ const pageChangeHandle = (index2) => {
99
+ page.value.index = index2;
100
+ loadData();
101
+ };
102
+ vue.watch(
103
+ () => group_id.value,
104
+ () => {
105
+ page.value.index = 1;
106
+ loadData();
107
+ }
108
+ );
109
+ const loadColumnTreeNode = async () => {
110
+ const { code, message } = await api.getCategoryCategoriesTree(
111
+ props.userInfo.BASE_API,
112
+ { repo_id: props.userInfo.repository_id }
113
+ );
114
+ if (code === 0) {
115
+ const arr = [
116
+ { id: "all", alias: "\u5168\u90E8\u5185\u5BB9", children: [], leaf: true }
117
+ ].concat(message || []);
118
+ if (arr[0]) {
119
+ group_id.value = arr[0].id;
120
+ }
121
+ const styleLength = arr.length > 10 ? 10 : arr.length;
122
+ listMinHeight.value = (styleLength + 1) * 32;
123
+ categoryCascaderData.value = arr;
124
+ }
125
+ };
126
+ const page = vue.ref({
127
+ index: 1,
128
+ size: 30,
129
+ total: 0
130
+ });
131
+ const columns = [
132
+ {
133
+ title: "\u6807\u9898",
134
+ dataIndex: "title",
135
+ slotName: "title"
136
+ },
137
+ {
138
+ title: "\u7C7B\u578B",
139
+ dataIndex: "series",
140
+ slotName: "series"
141
+ },
142
+ {
143
+ title: "\u7F16\u8F91",
144
+ dataIndex: "duty_editor",
145
+ slotName: "duty_editor"
146
+ },
147
+ {
148
+ title: "\u53D1\u5E03\u65F6\u95F4",
149
+ dataIndex: "pub_time",
150
+ slotName: "pub_time"
151
+ }
152
+ ];
153
+ const mediaFileData = vue.ref([]);
154
+ const filter = vue.ref(null);
155
+ const importantSeries = vue.computed(() => {
156
+ return props.series !== "all";
157
+ });
158
+ const dataLoading = vue.ref(false);
159
+ const loadData = async () => {
160
+ const dir_id = group_id.value;
161
+ if (!dir_id)
162
+ return;
163
+ const params = {
164
+ limit: page.value.size,
165
+ offset: page.value.size * (page.value.index - 1),
166
+ where: ["state:15|19"]
167
+ };
168
+ if (importantSeries.value) {
169
+ params.where.push(`series:${props.series.replace(/,/g, "|")}`);
170
+ }
171
+ if (dir_id !== "all") {
172
+ params.where.push(`category:${dir_id}`);
173
+ }
174
+ if (filter.value) {
175
+ const _filter = filter.value;
176
+ params.order = _filter.order;
177
+ params.sort = _filter.sort;
178
+ if (_filter.where) {
179
+ params.where = [...params.where, ..._filter.where];
180
+ }
181
+ }
182
+ params.where = params.where.join(",");
183
+ dataLoading.value = true;
184
+ const { code, message } = await api.getCategoryMediaNew(
185
+ props.userInfo.BASE_API,
186
+ params
187
+ );
188
+ dataLoading.value = false;
189
+ if (code === 0) {
190
+ mediaFileData.value = message.data.map((v) => {
191
+ v.catalog = "doc";
192
+ v.target_id = v.id;
193
+ v.target_type = 3;
194
+ v.pub_time = v.created_at;
195
+ v.update_time = v.updated_at;
196
+ v.pub_user_alias = v.author_alias;
197
+ return v;
198
+ }) || [];
199
+ page.value.total = message.total || message.count;
200
+ }
201
+ };
202
+ vue.onMounted(() => {
203
+ loadColumnTreeNode();
204
+ loadData();
205
+ });
206
+ return (_ctx, _cache) => {
207
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
208
+ vue.createVNode(index, {
209
+ group_id: group_id.value,
210
+ "onUpdate:group_id": _cache[0] || (_cache[0] = ($event) => group_id.value = $event),
211
+ tree: categoryCascaderData.value,
212
+ series: props.series,
213
+ banner: _ctx.banner,
214
+ height: listMinHeight.value,
215
+ "user-info": props.userInfo,
216
+ onSearch: search
217
+ }, null, 8, ["group_id", "tree", "series", "banner", "height", "user-info"]),
218
+ vue.createElementVNode("div", _hoisted_2, [
219
+ vue.createVNode(vue.unref(webVue.Table), {
220
+ columns,
221
+ scroll: scrollPercent,
222
+ pagination: false,
223
+ bordered: false,
224
+ data: mediaFileData.value,
225
+ onCellMouseEnter: vue.unref(tableCellMouseEnter),
226
+ onCellMouseLeave: vue.unref(tableCellMouseLeave),
227
+ onRowClick: selectTableCell
228
+ }, {
229
+ title: vue.withCtx(({ record }) => [
230
+ vue.createElementVNode("span", _hoisted_3, [
231
+ vue.unref(hoverBatchBox)(selectedData.value, record) ? (vue.openBlock(), vue.createElementBlock("span", {
232
+ key: 0,
233
+ onClick: vue.withModifiers(($event) => clickCheckbox($event, record), ["stop"])
234
+ }, [
235
+ vue.createVNode(vue.unref(webVue.Checkbox), {
236
+ class: "icon",
237
+ "model-value": vue.unref(isItemChecked)(selectedData.value, record)
238
+ }, null, 8, ["model-value"])
239
+ ], 8, _hoisted_4)) : (vue.openBlock(), vue.createBlock(component, {
240
+ key: 1,
241
+ class: "icon",
242
+ doc: "",
243
+ type: record.series
244
+ }, null, 8, ["type"])),
245
+ vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(record.title || record.alias || "--"), 1)
246
+ ])
247
+ ]),
248
+ series: vue.withCtx(({ record }) => [
249
+ vue.createElementVNode("span", null, vue.toDisplayString(record.series), 1)
250
+ ]),
251
+ duty_editor: vue.withCtx(({ record }) => [
252
+ vue.createElementVNode("span", null, vue.toDisplayString(record.duty_editor || "--"), 1)
253
+ ]),
254
+ pub_time: vue.withCtx(({ record }) => [
255
+ vue.createElementVNode("span", null, vue.toDisplayString(record.pub_time), 1)
256
+ ]),
257
+ _: 1
258
+ }, 8, ["data", "onCellMouseEnter", "onCellMouseLeave"])
259
+ ]),
260
+ vue.createElementVNode("div", _hoisted_6, [
261
+ vue.createElementVNode("div", _hoisted_7, [
262
+ vue.renderSlot(_ctx.$slots, "store"),
263
+ vue.withDirectives(vue.createVNode(vue.unref(webVue.Pagination), {
264
+ current: page.value.index,
265
+ "page-size": page.value.size,
266
+ total: page.value.total,
267
+ onChange: pageChangeHandle
268
+ }, null, 8, ["current", "page-size", "total"]), [
269
+ [vue.vShow, mediaFileData.value.length > 0]
270
+ ])
271
+ ]),
272
+ vue.renderSlot(_ctx.$slots, "options")
273
+ ])
274
+ ]);
275
+ };
276
+ }
277
+ });
278
+ module.exports = _sfc_main;
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var icon = require("@arco-design/web-vue/es/icon");
5
+ var component = require("../../../typeIcons/component.js");
6
+ const _hoisted_1 = { class: "add-content-selected-store-box" };
7
+ const _hoisted_2 = { class: "batch-section-popover-main" };
8
+ const _hoisted_3 = { class: "left" };
9
+ const _hoisted_4 = { class: "title" };
10
+ const _hoisted_5 = { class: "options" };
11
+ const _sfc_main = vue.defineComponent({
12
+ ...{ name: "storeBox" },
13
+ __name: "index",
14
+ props: {
15
+ selectData: {}
16
+ },
17
+ emits: ["update:selectData"],
18
+ setup(__props, { emit }) {
19
+ const props = __props;
20
+ const remove = (item, index) => {
21
+ const arr = props.selectData;
22
+ arr.splice(index, 1);
23
+ emit("update:selectData", arr);
24
+ };
25
+ const clear = () => {
26
+ emit("update:selectData", []);
27
+ };
28
+ return (_ctx, _cache) => {
29
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
30
+ vue.createVNode(vue.unref(webVue.Popover), {
31
+ position: "tl",
32
+ "content-class": "selected-store-box-popover-content",
33
+ "content-style": { width: "290px" },
34
+ "arrow-style": { display: "none" },
35
+ trigger: "click"
36
+ }, {
37
+ content: vue.withCtx(() => [
38
+ vue.createElementVNode("div", _hoisted_2, [
39
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
40
+ "outer-class": "batch-section-scrollbar",
41
+ style: { "height": "100%", "overflow": "auto" }
42
+ }, {
43
+ default: vue.withCtx(() => [
44
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.selectData, (item, index) => {
45
+ return vue.openBlock(), vue.createElementBlock("div", {
46
+ key: index,
47
+ class: "item"
48
+ }, [
49
+ vue.createElementVNode("div", _hoisted_3, [
50
+ vue.createVNode(component, {
51
+ class: "icon",
52
+ doc: "",
53
+ type: item.series
54
+ }, null, 8, ["type"]),
55
+ vue.createElementVNode("span", _hoisted_4, vue.toDisplayString(item.alias || item.title), 1)
56
+ ]),
57
+ vue.createVNode(vue.unref(webVue.Button), {
58
+ class: "close-btn",
59
+ type: "text",
60
+ shape: "circle",
61
+ size: "mini",
62
+ onClick: ($event) => remove(item, index)
63
+ }, {
64
+ icon: vue.withCtx(() => [
65
+ vue.createVNode(vue.unref(icon.IconCloseCircle), { size: "14" })
66
+ ]),
67
+ _: 2
68
+ }, 1032, ["onClick"])
69
+ ]);
70
+ }), 128))
71
+ ]),
72
+ _: 1
73
+ })
74
+ ]),
75
+ vue.createElementVNode("div", _hoisted_5, [
76
+ vue.createVNode(vue.unref(webVue.Button), {
77
+ type: "text",
78
+ onClick: clear
79
+ }, {
80
+ default: vue.withCtx(() => [
81
+ vue.createTextVNode("\u6E05\u7A7A")
82
+ ]),
83
+ _: 1
84
+ })
85
+ ])
86
+ ]),
87
+ default: vue.withCtx(() => [
88
+ vue.createVNode(vue.unref(webVue.Badge), {
89
+ count: props.selectData.length
90
+ }, {
91
+ default: vue.withCtx(() => [
92
+ vue.createVNode(vue.unref(webVue.Button), { class: "button" }, {
93
+ default: vue.withCtx(() => [
94
+ vue.createTextVNode("\u5DF2\u9009\u6570\u636E")
95
+ ]),
96
+ _: 1
97
+ })
98
+ ]),
99
+ _: 1
100
+ }, 8, ["count"])
101
+ ]),
102
+ _: 1
103
+ })
104
+ ]);
105
+ };
106
+ }
107
+ });
108
+ module.exports = _sfc_main;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var component = require("./component.js");
3
+ const contentModal = Object.assign(component, {
4
+ install: (app) => {
5
+ app.component(component.name, component);
6
+ }
7
+ });
8
+ module.exports = contentModal;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var request = require("../../utils/request.js");
4
+ function getCategoryCategoriesTree(BASE_API, params) {
5
+ return request(BASE_API, {
6
+ url: `/poplar/v3/categories`,
7
+ method: "get",
8
+ params
9
+ });
10
+ }
11
+ function getCategoryPath(BASE_API, params) {
12
+ return request(BASE_API, {
13
+ url: `/poplar/v2/repo/${params == null ? void 0 : params.repo}/category/${params == null ? void 0 : params.category}/path`,
14
+ method: "get"
15
+ });
16
+ }
17
+ function getCategoryMediaNew(BASE_API, params) {
18
+ return request(BASE_API, {
19
+ url: `/poplar/v3/s/documents`,
20
+ method: "get",
21
+ params
22
+ });
23
+ }
24
+ function checkCommitFulfillment(BASE_API, params) {
25
+ return request(BASE_API, {
26
+ url: `/poplar/v2/doc/new/${params == null ? void 0 : params.hash_id}`,
27
+ method: "get"
28
+ }).then((resp) => {
29
+ const content = resp.message;
30
+ return Promise.resolve(!content.payload.includes("image_over_limit.jpg"));
31
+ });
32
+ }
33
+ function searchMlists(BASE_API, params) {
34
+ return request(BASE_API, {
35
+ url: `/poplar/v3/mobile_list`,
36
+ method: "get",
37
+ params
38
+ });
39
+ }
40
+ async function getCategorylistsGroups(BASE_API, params) {
41
+ return request(BASE_API, {
42
+ url: `/poplar/v2/listgroups`,
43
+ method: "get",
44
+ params
45
+ });
46
+ }
47
+ exports.checkCommitFulfillment = checkCommitFulfillment;
48
+ exports.getCategoryCategoriesTree = getCategoryCategoriesTree;
49
+ exports.getCategoryMediaNew = getCategoryMediaNew;
50
+ exports.getCategoryPath = getCategoryPath;
51
+ exports.getCategorylistsGroups = getCategorylistsGroups;
52
+ exports.searchMlists = searchMlists;
@@ -0,0 +1,8 @@
1
+ .media-filter-container {
2
+ padding: 10px 15px;
3
+ display: flex;
4
+ align-items: center;
5
+ .filter-item {
6
+ width: auto;
7
+ }
8
+ }
@@ -0,0 +1,33 @@
1
+ .view-all-column-container {
2
+ height: 100%;
3
+ .content-table-view {
4
+ height: calc(100% - 110px);
5
+ .title-span {
6
+ width: 100%;
7
+ display: block;
8
+ text-overflow: ellipsis;
9
+ overflow: hidden;
10
+ white-space: nowrap;
11
+ .icon {
12
+ width: 20px;
13
+ height: 25px;
14
+ margin-right: 8px;
15
+ font-size: 18px;
16
+ vertical-align: middle;
17
+ display: inline-block;
18
+ text-align: center;
19
+ }
20
+ }
21
+ }
22
+ .bottom-view {
23
+ height: 60px;
24
+ margin: 0px 15px;
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: space-between;
28
+ .left {
29
+ display: flex;
30
+ align-items: center;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,9 @@
1
+ .column-selection-container {
2
+ padding: 0px 15px;
3
+ }
4
+ .column-selection-popover-content {
5
+ padding: 0;
6
+ .column-outer-scrollbar {
7
+ height: 100%;
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ require("./index.css");
3
+ require("./columnTree.css");
4
+ require("./ViewAllColumn.css");
5
+ require("./storeBox.css");
6
+ require("./MediaFilter.css");
@@ -0,0 +1,13 @@
1
+ .add-content-modal-wrapper .arco-modal-header {
2
+ border-bottom: none;
3
+ }
4
+ .add-content-modal-body {
5
+ padding: 0;
6
+ height: 70vh;
7
+ }
8
+ .add-content-modal-body .content-tabs {
9
+ height: 100%;
10
+ }
11
+ .add-content-modal-body .arco-tabs-content {
12
+ padding-top: 0;
13
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ require("./index.less");
3
+ require("./columnTree.less");
4
+ require("./ViewAllColumn.less");
5
+ require("./storeBox.less");
6
+ require("./MediaFilter.less");
@@ -0,0 +1,16 @@
1
+
2
+ .add-content-modal-wrapper {
3
+ .arco-modal-header {
4
+ border-bottom: none;
5
+ }
6
+ }
7
+ .add-content-modal-body {
8
+ padding: 0;
9
+ height: 70vh;
10
+ .content-tabs {
11
+ height: 100%;
12
+ }
13
+ .arco-tabs-content {
14
+ padding-top: 0;
15
+ }
16
+ }
@@ -0,0 +1,45 @@
1
+ .selected-store-box-popover-content {
2
+ padding: 0;
3
+ .batch-section-popover-main {
4
+ .item {
5
+ height: 35px;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: space-between;
9
+ padding: 5px 10px;
10
+ box-sizing: border-box;
11
+ .icon {
12
+ width: 20px;
13
+ height: 25px;
14
+ margin-right: 8px;
15
+ font-size: 18px;
16
+ vertical-align: middle;
17
+ display: inline-block;
18
+ text-align: center;
19
+ }
20
+ .left {
21
+ width: 90%;
22
+ display: inline-block;
23
+ align-items: center;
24
+ text-overflow: ellipsis;
25
+ overflow: hidden;
26
+ white-space: nowrap;
27
+ }
28
+ .close-btn {
29
+ display: none;
30
+ }
31
+ &:hover,
32
+ &:active {
33
+ background-color: #f6f6f6;
34
+ .close-btn {
35
+ display: block;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ .options {
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: flex-end;
44
+ }
45
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ const useTableBatch = () => {
4
+ const hoverTarget = vue.ref(null);
5
+ const isItemChecked = vue.computed(() => (selectedData, item) => {
6
+ return selectedData.map((row) => row.id).includes(item.id);
7
+ });
8
+ const hoverBatchBox = vue.computed(() => (selectedData, item) => {
9
+ return hoverTarget.value === item.id || isItemChecked.value(selectedData, item);
10
+ });
11
+ const tableCellMouseEnter = (record) => {
12
+ hoverTarget.value = record.id;
13
+ };
14
+ const tableCellMouseLeave = (record) => {
15
+ if (record.id === hoverTarget.value) {
16
+ hoverTarget.value = null;
17
+ }
18
+ };
19
+ return {
20
+ hoverTarget,
21
+ isItemChecked,
22
+ hoverBatchBox,
23
+ tableCellMouseEnter,
24
+ tableCellMouseLeave
25
+ };
26
+ };
27
+ module.exports = useTableBatch;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var vue = require("vue");
4
+ var request = require("../utils/request.js");
5
+ function getUserInfo(BASE_API, params) {
6
+ return request(BASE_API, {
7
+ url: "/poplar/v2/account/info",
8
+ method: "get",
9
+ params
10
+ });
11
+ }
12
+ function getChannels(BASE_API, params) {
13
+ return request(BASE_API, {
14
+ url: `/poplar/v2/channels?repository_id=${params == null ? void 0 : params.repository_id}`,
15
+ method: "get"
16
+ });
17
+ }
18
+ const useLoadUserInfo = (BASE_API) => {
19
+ const userInfo = vue.ref({ BASE_API });
20
+ const getChannelsHandle = async (_user) => {
21
+ const channels = await getChannels(BASE_API, {
22
+ repository_id: _user.repository_id
23
+ });
24
+ if (channels.code === 0) {
25
+ channels.message.map((channel) => {
26
+ _user[`${channel.platform_type}_channel_id`] = channel.id;
27
+ if (channel.logo_type === "2") {
28
+ _user.channel_clientSetting = channel.uid;
29
+ }
30
+ });
31
+ return _user;
32
+ }
33
+ };
34
+ const getUserInfoHandle = async () => {
35
+ const res = await getUserInfo(BASE_API);
36
+ if (res.code === 0 && res.message) {
37
+ if (res.message.repository_id) {
38
+ res.message = await getChannelsHandle(res.message);
39
+ }
40
+ userInfo.value = { BASE_API, ...res.message };
41
+ }
42
+ };
43
+ return {
44
+ userInfo,
45
+ getUserInfoHandle
46
+ };
47
+ };
48
+ exports["default"] = useLoadUserInfo;
49
+ exports.getChannels = getChannels;