@voicenter-team/voicenter-ui-plus 3.0.0 → 3.0.2

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 (85) hide show
  1. package/library/assets/assets/sass/main.css +1 -1
  2. package/library/assets/components/VcButton/VcButton.css +1 -1
  3. package/library/assets/components/VcButton/VcButtonIcon.css +1 -1
  4. package/library/assets/components/VcDelimitedList/VcDelimitedList.css +1 -1
  5. package/library/assets/components/VcExcelUploader/VcExcelFileUploadBlock.css +1 -1
  6. package/library/assets/components/VcModal/VcModal.css +1 -1
  7. package/library/assets/components/VcSoundplayer/VcSoundPlayer.css +1 -1
  8. package/library/assets/components/VcSplitButton/VcSplitButton.css +1 -1
  9. package/library/assets/components/VcTable/VcTable.css +1 -1
  10. package/library/assets/entity/components/Form/VcBaseVerticalForm.css +1 -1
  11. package/library/assets/entity/components/Table/VcEntityListTable.css +1 -1
  12. package/library/assets/entity/components/Tabs/VcEntityEditableTabs.css +1 -1
  13. package/library/components/VcButton/VcButton.vue.mjs +3 -2
  14. package/library/components/VcButton/VcButtonIcon.vue.mjs +92 -5
  15. package/library/components/VcButton/VcButtonIcon.vue3.mjs +5 -0
  16. package/library/components/VcButton/VcToggleButton.vue.mjs +20 -7
  17. package/library/components/VcDelimitedList/VcDelimitedList.vue.mjs +194 -5
  18. package/library/components/VcDelimitedList/VcDelimitedList.vue3.mjs +5 -0
  19. package/library/components/VcExcelUploader/VcExcelFileUploadBlock.vue.mjs +140 -5
  20. package/library/components/VcExcelUploader/VcExcelFileUploadBlock.vue3.mjs +5 -0
  21. package/library/components/VcExcelUploader/VcExcelFileUploader.vue.mjs +6 -5
  22. package/library/components/VcExcelUploader/VcFileImportParseResultBlock.vue.mjs +5 -3
  23. package/library/components/VcExcelUploader/VcFileImportResultBindDataTable.vue.mjs +21 -18
  24. package/library/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePickerQuickOptionsSelection.vue.mjs +4 -3
  25. package/library/components/VcFileUploader/VcFileUploader.vue2.mjs +11 -9
  26. package/library/components/VcHtmlEditor/VcHtmlEditorToolbar.vue.mjs +10 -9
  27. package/library/components/VcIcon/VcIcon.vue.mjs +7 -3
  28. package/library/components/VcJsonSchema/Components/JsonSchemaEditor.vue.mjs +8 -7
  29. package/library/components/VcJsonSchema/PropertySetup/JsonSchemaPropertyModal.vue.mjs +10 -9
  30. package/library/components/VcMdEditor/ParameterNode.vue2.mjs +6 -5
  31. package/library/components/VcMdEditor/VcMdEditor.vue.mjs +8 -7
  32. package/library/components/VcPagination/VcPaginationButton.vue.mjs +3 -2
  33. package/library/components/VcSelect/VcSelect.vue.mjs +9 -5
  34. package/library/components/VcSoundplayer/VcSoundPlayer.vue.mjs +274 -5
  35. package/library/components/VcSoundplayer/VcSoundPlayer.vue3.mjs +5 -0
  36. package/library/components/VcSplitButton/VcSplitButton.vue.mjs +4 -3
  37. package/library/components/VcTable/VcTable.vue.mjs +1072 -6
  38. package/library/components/VcTable/VcTable.vue4.mjs +6 -0
  39. package/library/components/VcTree/VcTreeSelect.vue.mjs +8 -7
  40. package/library/entity/components/Button/VcEntityDeleteIconButton.vue.mjs +3 -2
  41. package/library/entity/components/Button/VcEntityEditIconButton.vue.mjs +3 -2
  42. package/library/entity/components/Form/VcBaseVerticalForm.vue.mjs +95 -5
  43. package/library/entity/components/Form/VcBaseVerticalForm.vue3.mjs +5 -0
  44. package/library/entity/components/Form/VcEntityVerticalCreateForm.vue.mjs +3 -2
  45. package/library/entity/components/Form/VcEntityVerticalEditForm.vue.mjs +9 -8
  46. package/library/entity/components/Table/VcEntityListTable.vue.mjs +414 -5
  47. package/library/entity/components/Table/VcEntityListTable.vue3.mjs +5 -0
  48. package/library/entity/components/Tabs/VcEntityEditableTabs.vue.mjs +287 -5
  49. package/library/entity/components/Tabs/VcEntityEditableTabs.vue3.mjs +5 -0
  50. package/library/index.mjs +8 -0
  51. package/library/index.mjs.br +0 -0
  52. package/library/index.mjs.gz +0 -0
  53. package/library/plugin.mjs +272 -264
  54. package/library/plugin.mjs.br +0 -0
  55. package/library/plugin.mjs.gz +0 -0
  56. package/library/style.css +12 -12
  57. package/library/style.css.br +0 -0
  58. package/library/style.css.gz +0 -0
  59. package/library/types/components/VcButton/VcButton.vue.d.ts +1 -1
  60. package/library/types/components/VcButton/VcToggleButton.vue.d.ts +4 -0
  61. package/library/types/components/VcDelimitedList/VcDelimitedList.vue.d.ts +1 -2
  62. package/library/types/components/VcIcon/VcIcon.vue.d.ts +1 -0
  63. package/library/types/components/VcLoading/VcLoading.vue.d.ts +1 -1
  64. package/library/types/components/VcOtpInput/VcOtpInput.vue.d.ts +1 -1
  65. package/library/types/components/VcSelect/VcInfiniteScrollSelect.vue.d.ts +2 -2
  66. package/library/types/components/VcSelect/VcSelect.vue.d.ts +3 -3
  67. package/library/types/components/VcSelect/VcSelectGrouped.vue.d.ts +4 -4
  68. package/library/types/components/VcSipFlow/VcSipFlow.vue.d.ts +1 -1
  69. package/library/types/components/VcSplitButton/VcSplitButton.vue.d.ts +1 -1
  70. package/library/types/components/VcSwitch/VcSwitch.vue.d.ts +3 -3
  71. package/library/types/components/VcTable/VcTable.vue.d.ts +17 -17
  72. package/library/types/components/VcTree/VcTree.vue.d.ts +3 -3
  73. package/library/types/components/VcTree/VcTreeSelect.vue.d.ts +3 -3
  74. package/library/types/types/OptionAndConfig.types.d.ts +1 -1
  75. package/library/types/types/VcTable.types.d.ts +2 -2
  76. package/library/types/types/VcTree.types.d.ts +2 -2
  77. package/package.json +1 -1
  78. package/library/components/VcButton/VcButtonIcon.vue2.mjs +0 -92
  79. package/library/components/VcDelimitedList/VcDelimitedList.vue2.mjs +0 -195
  80. package/library/components/VcExcelUploader/VcExcelFileUploadBlock.vue2.mjs +0 -141
  81. package/library/components/VcSoundplayer/VcSoundPlayer.vue2.mjs +0 -275
  82. package/library/components/VcTable/VcTable.vue2.mjs +0 -1069
  83. package/library/entity/components/Form/VcBaseVerticalForm.vue2.mjs +0 -96
  84. package/library/entity/components/Table/VcEntityListTable.vue2.mjs +0 -413
  85. package/library/entity/components/Tabs/VcEntityEditableTabs.vue2.mjs +0 -288
@@ -1,7 +1,276 @@
1
- import _sfc_main from "./VcSoundPlayer.vue2.mjs";
2
- import '../../assets/components/VcSoundplayer/VcSoundPlayer.css';/* empty css */
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const VcSoundPlayer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2f635e81"]]);
1
+ import '../../assets/components/VcSoundplayer/VcSoundPlayer.css';
2
+ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createBlock, withCtx, createVNode, createCommentVNode, withDirectives, normalizeClass, vShow, createElementVNode, Fragment, renderList, withModifiers } from "vue";
3
+ import _sfc_main$2 from "./VcSoundPlayerError.vue.mjs";
4
+ import _sfc_main$3 from "./VcPlayerPlayStopButton.vue.mjs";
5
+ import _sfc_main$4 from "./VcPlayerSkipButtons.vue.mjs";
6
+ import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/components/VcPopover/VcPopover.css';import '../../assets/components/VcSoundplayer/VcSoundPlayerWrapper.css';import '../../assets/components/VcSoundplayer/VcSoundPlayerProgress.css';import '../../assets/components/VcSoundplayer/VcSoundVolume.css';import '../../assets/components/VcSoundplayer/VcPlayerSkipButtons.css';/* empty css */
7
+ import _sfc_main$6 from "./VcSoundCurrentTime.vue.mjs";
8
+ import _sfc_main$8 from "./VcSoundDuration.vue.mjs";
9
+ import _sfc_main$9 from "./VcSoundVolume.vue.mjs";
10
+ /* empty css */
11
+ import _sfc_main$7 from "./VcSoundPlayerProgress.vue.mjs";
12
+ /* empty css */
13
+ import _sfc_main$1 from "./VcSoundPlayerWrapper.vue.mjs";
14
+ /* empty css */
15
+ import { DEFAULT_OPTIONS } from "./player.options.mjs";
16
+ import _sfc_main$a from "../VcPopover/VcPopover.vue.mjs";
17
+ /* empty css */
18
+ import _sfc_main$5 from "../VcIcon/VcIcon.vue.mjs";
19
+ /* empty css */
20
+ const _hoisted_1 = { class: "vc-sound-player" };
21
+ const _hoisted_2 = {
22
+ key: 1,
23
+ class: "w-full flex items-center gap-x-2 relative"
24
+ };
25
+ const _hoisted_3 = {
26
+ key: 1,
27
+ class: "flex items-center px-1"
28
+ };
29
+ const _hoisted_4 = { key: 5 };
30
+ const _hoisted_5 = { class: "cursor-pointer text-inactive-elements hover:text-primary-actions duration-200" };
31
+ const _hoisted_6 = { class: "p-2" };
32
+ const _hoisted_7 = ["onClick"];
33
+ const _sfc_main = /* @__PURE__ */ defineComponent({
34
+ __name: "VcSoundPlayer",
35
+ props: {
36
+ soundId: { default: void 0 },
37
+ src: {},
38
+ currentPlay: { default: void 0 },
39
+ preIcon: { default: "" },
40
+ simple: { type: Boolean, default: false },
41
+ disabled: { type: Boolean, default: false },
42
+ showSkipButtons: { type: Boolean, default: false },
43
+ skipLength: { default: void 0 },
44
+ size: { default: "md" },
45
+ downloadLinks: { default: () => [] }
46
+ },
47
+ emits: ["ready", "start", "stop", "onPlay", "pause"],
48
+ setup(__props, { expose: __expose, emit: __emit }) {
49
+ const props = __props;
50
+ const emit = __emit;
51
+ const SoundPlayerWrapper = ref();
52
+ const isError = ref(false);
53
+ const audioErrorMessage = ref("");
54
+ const height = computed(() => {
55
+ return props.size === "sm" ? "h-4" : "h-8";
56
+ });
57
+ const playerOptions = computed(() => {
58
+ const configColors = getComputedStyle(document.body);
59
+ const activeColor = configColors.getPropertyValue("--primary-actions");
60
+ const inActiveColor = configColors.getPropertyValue("--ui-lines");
61
+ return {
62
+ ...DEFAULT_OPTIONS,
63
+ height: props.size === "sm" ? 16 : 32,
64
+ waveColor: inActiveColor || DEFAULT_OPTIONS.waveColor,
65
+ progressColor: activeColor || DEFAULT_OPTIONS.progressColor
66
+ };
67
+ });
68
+ const showDownloadButton = computed(() => {
69
+ return props.downloadLinks.length > 0 && props.size === "md";
70
+ });
71
+ const iconClass = computed(() => {
72
+ const classes = {
73
+ md: "icon-2xl",
74
+ sm: "icon-lg"
75
+ };
76
+ return classes[props.size] || "icon-2md";
77
+ });
78
+ function onError(error) {
79
+ isError.value = true;
80
+ audioErrorMessage.value = error.message;
81
+ }
82
+ function initSound() {
83
+ var _a;
84
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.initSound();
85
+ }
86
+ function onStart(soundId, src) {
87
+ emit("start", soundId || "", src || "");
88
+ }
89
+ function onStop(soundId, src) {
90
+ emit("stop", soundId || "", src || "");
91
+ }
92
+ function onPlay(soundId, src) {
93
+ emit("onPlay", soundId || "", src || "");
94
+ }
95
+ function onPause(soundId, src) {
96
+ emit("pause", soundId || "", src || "");
97
+ }
98
+ function onReady(soundId) {
99
+ emit("ready", soundId);
100
+ }
101
+ function stop() {
102
+ var _a;
103
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.stop();
104
+ }
105
+ function pause() {
106
+ var _a;
107
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.pause();
108
+ }
109
+ function play() {
110
+ var _a;
111
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.play();
112
+ }
113
+ function setVolume() {
114
+ var _a;
115
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.setVolume();
116
+ }
117
+ function resetInitSound() {
118
+ var _a;
119
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.resetInitSound();
120
+ }
121
+ function skipBackward() {
122
+ var _a;
123
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.skipBackward();
124
+ }
125
+ function skipForward() {
126
+ var _a;
127
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.skipForward();
128
+ }
129
+ function toTime(time) {
130
+ var _a;
131
+ (_a = SoundPlayerWrapper.value) == null ? void 0 : _a.setTime(time);
132
+ }
133
+ async function download(sound) {
134
+ const response = await fetch(sound);
135
+ const dataBlob = await response.blob();
136
+ const url = window.URL.createObjectURL(dataBlob);
137
+ const link = document.createElement("a");
138
+ const splitedUrl = sound.split("/");
139
+ link.href = url;
140
+ link.setAttribute("download", splitedUrl[splitedUrl.length - 1]);
141
+ document.body.appendChild(link);
142
+ link.click();
143
+ link.remove();
144
+ return dataBlob;
145
+ }
146
+ function downloadIconType(item) {
147
+ const splitUrl = item.split(".");
148
+ const type = splitUrl[splitUrl.length - 1];
149
+ if (type === "mp3") {
150
+ return "vc-icon-mp3";
151
+ }
152
+ return "vc-icon-wav";
153
+ }
154
+ watch(
155
+ () => props.src,
156
+ (newValue) => {
157
+ isError.value = false;
158
+ audioErrorMessage.value = "";
159
+ if (newValue) {
160
+ initSound();
161
+ }
162
+ }
163
+ );
164
+ __expose({
165
+ download,
166
+ skipForward,
167
+ skipBackward,
168
+ resetInitSound,
169
+ setVolume,
170
+ play,
171
+ pause,
172
+ stop,
173
+ initSound,
174
+ toTime
175
+ });
176
+ return (_ctx, _cache) => {
177
+ return openBlock(), createElementBlock("div", _hoisted_1, [
178
+ __props.src ? (openBlock(), createBlock(_sfc_main$1, {
179
+ key: 0,
180
+ ref_key: "SoundPlayerWrapper",
181
+ ref: SoundPlayerWrapper,
182
+ disabled: __props.disabled,
183
+ src: __props.src,
184
+ "current-play": __props.currentPlay,
185
+ size: __props.size,
186
+ "sound-id": __props.soundId,
187
+ options: playerOptions.value,
188
+ "skip-seconds": __props.skipLength,
189
+ class: "w-full",
190
+ onReady,
191
+ onPause,
192
+ onOnPlay: onPlay,
193
+ onStart,
194
+ onStop,
195
+ onOnError: onError
196
+ }, {
197
+ default: withCtx(() => [
198
+ isError.value ? (openBlock(), createBlock(_sfc_main$2, {
199
+ key: 0,
200
+ "is-simple": __props.simple,
201
+ "audio-error-message": audioErrorMessage.value
202
+ }, null, 8, ["is-simple", "audio-error-message"])) : (openBlock(), createElementBlock("div", _hoisted_2, [
203
+ createVNode(_sfc_main$3, {
204
+ disabled: __props.disabled,
205
+ "icon-class": iconClass.value,
206
+ class: "gap-x-3"
207
+ }, null, 8, ["disabled", "icon-class"]),
208
+ __props.showSkipButtons ? (openBlock(), createBlock(_sfc_main$4, {
209
+ key: 0,
210
+ "icon-class": iconClass.value
211
+ }, null, 8, ["icon-class"])) : createCommentVNode("", true),
212
+ __props.preIcon && !__props.simple ? (openBlock(), createElementBlock("div", _hoisted_3, [
213
+ createVNode(_sfc_main$5, {
214
+ icon: __props.preIcon,
215
+ class: "text-primary-actions icon-base"
216
+ }, null, 8, ["icon"])
217
+ ])) : createCommentVNode("", true),
218
+ !__props.simple ? (openBlock(), createBlock(_sfc_main$6, {
219
+ key: 2,
220
+ class: "sound-time-current"
221
+ })) : createCommentVNode("", true),
222
+ withDirectives(createVNode(_sfc_main$7, {
223
+ class: normalizeClass(height.value)
224
+ }, null, 8, ["class"]), [
225
+ [vShow, !__props.simple]
226
+ ]),
227
+ !__props.simple ? (openBlock(), createBlock(_sfc_main$8, {
228
+ key: 3,
229
+ class: "sound-duration"
230
+ })) : createCommentVNode("", true),
231
+ !__props.simple ? (openBlock(), createBlock(_sfc_main$9, {
232
+ key: 4,
233
+ disabled: __props.disabled
234
+ }, null, 8, ["disabled"])) : createCommentVNode("", true),
235
+ showDownloadButton.value && !__props.simple ? (openBlock(), createElementBlock("div", _hoisted_4, [
236
+ createVNode(_sfc_main$a, {
237
+ disabled: __props.disabled,
238
+ "popover-class": "!min-w-max",
239
+ "popover-width": "auto"
240
+ }, {
241
+ reference: withCtx(() => [
242
+ createElementVNode("span", _hoisted_5, [
243
+ createVNode(_sfc_main$5, { icon: "vc-icon-menu" })
244
+ ])
245
+ ]),
246
+ default: withCtx(() => [
247
+ createElementVNode("div", _hoisted_6, [
248
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "font-medium text-xs mb-1" }, " Download: ", -1)),
249
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.downloadLinks, (item, index) => {
250
+ return openBlock(), createElementBlock("div", {
251
+ key: index,
252
+ class: "cursor-pointer right-offset p-1 flex items-center hover:bg-primary-actions-bg--focus duration-200 rounded-sm",
253
+ onClick: withModifiers(($event) => download(item), ["stop"])
254
+ }, [
255
+ createVNode(_sfc_main$5, {
256
+ class: "text-primary-actions icon-xl",
257
+ icon: downloadIconType(item)
258
+ }, null, 8, ["icon"])
259
+ ], 8, _hoisted_7);
260
+ }), 128))
261
+ ])
262
+ ]),
263
+ _: 1
264
+ }, 8, ["disabled"])
265
+ ])) : createCommentVNode("", true)
266
+ ]))
267
+ ]),
268
+ _: 1
269
+ }, 8, ["disabled", "src", "current-play", "size", "sound-id", "options", "skip-seconds"])) : createCommentVNode("", true)
270
+ ]);
271
+ };
272
+ }
273
+ });
5
274
  export {
6
- VcSoundPlayer as default
275
+ _sfc_main as default
7
276
  };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./VcSoundPlayer.vue.mjs";
2
+ import '../../assets/components/VcSoundplayer/VcSoundPlayer.css';/* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };
@@ -19,7 +19,7 @@ const _hoisted_7 = {
19
19
  key: 0,
20
20
  class: "vc-split-button--loader"
21
21
  };
22
- const DEFAULT_LOAD_ICON = "vc-icon-load";
22
+ const DEFAULT_LOAD_ICON = "loader";
23
23
  const CLASS_FOR_COLOR = "vc-split-button--";
24
24
  const DEFAULT_COLOR = "primary";
25
25
  const DEFAULT_SIZE = "default";
@@ -166,8 +166,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
166
166
  renderSlot(_ctx.$slots, "loader", {}, () => [
167
167
  createVNode(_sfc_main$1, {
168
168
  icon: __props.loaderIcon,
169
- class: "text-current"
170
- }, null, 8, ["icon"])
169
+ loading: __props.loading,
170
+ class: "loading-icon"
171
+ }, null, 8, ["icon", "loading"])
171
172
  ])
172
173
  ])) : createCommentVNode("", true)
173
174
  ], 2);