eco-vue-js 0.11.11 → 0.11.13

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 (65) hide show
  1. package/dist/assets/icons/IconBold.svg.js +24 -0
  2. package/dist/assets/icons/IconCodeBlock.svg.js +32 -0
  3. package/dist/assets/icons/IconCodeInline.svg.js +25 -0
  4. package/dist/assets/icons/IconHeading.svg.js +24 -0
  5. package/dist/assets/icons/IconItalic.svg.js +24 -0
  6. package/dist/assets/icons/IconList.svg.js +24 -0
  7. package/dist/assets/icons/IconListBullet.svg.js +31 -0
  8. package/dist/assets/icons/IconListCheckbox.svg.js +24 -0
  9. package/dist/assets/icons/IconListDecrease.svg.js +24 -0
  10. package/dist/assets/icons/IconListIncrease.svg.js +24 -0
  11. package/dist/assets/icons/IconListNumbered.svg.js +24 -0
  12. package/dist/assets/icons/{IconTableSettings.svg.js → IconListSettings.svg.js} +2 -2
  13. package/dist/assets/icons/IconQuote.svg.js +24 -0
  14. package/dist/assets/icons/IconStrikethrough.svg.js +24 -0
  15. package/dist/assets/icons/IconTable.svg.js +10 -1
  16. package/dist/assets/icons/IconTableCollapsed.svg.js +37 -0
  17. package/dist/components/ClickOutside/WClickOutside.vue.d.ts +6 -0
  18. package/dist/components/ClickOutside/WClickOutside.vue.d.ts.map +1 -1
  19. package/dist/components/ClickOutside/WClickOutside.vue.js +8 -4
  20. package/dist/components/FormAsync/WFormAsyncInput.vue.js +2 -0
  21. package/dist/components/FormAsync/WFormAsyncSelect.vue.js +2 -0
  22. package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +2 -0
  23. package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +2 -0
  24. package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +2 -0
  25. package/dist/components/Input/WInput.vue.d.ts.map +1 -1
  26. package/dist/components/Input/WInput.vue.js +16 -3
  27. package/dist/components/Input/WInputAsync.vue.js +2 -0
  28. package/dist/components/Input/WInputDate.vue.js +2 -0
  29. package/dist/components/Input/WInputOptions.vue.js +2 -0
  30. package/dist/components/Input/WInputSuggest.vue.js +2 -0
  31. package/dist/components/Input/WInputToolbarButton.vue.d.ts +11 -0
  32. package/dist/components/Input/WInputToolbarButton.vue.d.ts.map +1 -0
  33. package/dist/components/Input/WInputToolbarButton.vue.js +79 -0
  34. package/dist/components/Input/WInputToolbarButton.vue2.js +5 -0
  35. package/dist/components/Input/components/ContentEditable.vue.d.ts.map +1 -1
  36. package/dist/components/Input/components/ContentEditable.vue2.js +87 -11
  37. package/dist/components/Input/components/InputToolbar.vue.d.ts +27 -0
  38. package/dist/components/Input/components/InputToolbar.vue.d.ts.map +1 -0
  39. package/dist/components/Input/components/InputToolbar.vue.js +5 -0
  40. package/dist/components/Input/components/InputToolbar.vue2.js +39 -0
  41. package/dist/components/Input/components/InputToolbarButton.vue.d.ts +15 -0
  42. package/dist/components/Input/components/InputToolbarButton.vue.d.ts.map +1 -0
  43. package/dist/components/Input/components/InputToolbarButton.vue.js +33 -0
  44. package/dist/components/Input/components/InputToolbarButton.vue2.js +5 -0
  45. package/dist/components/Input/models/toolbarActions.d.ts +6 -0
  46. package/dist/components/Input/models/toolbarActions.d.ts.map +1 -0
  47. package/dist/components/Input/models/toolbarActions.js +140 -0
  48. package/dist/components/Input/types.d.ts +35 -2
  49. package/dist/components/Input/types.d.ts.map +1 -1
  50. package/dist/components/List/components/HeaderSettings.vue.js +2 -2
  51. package/dist/components/List/use/useListConfig.js +2 -2
  52. package/dist/components/MenuItem/WMenuItem.vue.js +1 -1
  53. package/dist/components/Select/WSelect.vue.js +2 -0
  54. package/dist/components/Select/WSelectAsync.vue.js +2 -0
  55. package/dist/components/Select/WSelectAsyncSingle.vue.js +2 -0
  56. package/dist/components/Select/WSelectSingle.vue.js +2 -0
  57. package/dist/components/Select/WSelectStringified.vue.js +2 -0
  58. package/dist/components/Tooltip/components/TooltipContainer.vue.d.ts +2 -2
  59. package/dist/main.d.ts +17 -2
  60. package/dist/main.d.ts.map +1 -1
  61. package/dist/main.js +99 -83
  62. package/dist/utils/utils.d.ts +4 -0
  63. package/dist/utils/utils.d.ts.map +1 -1
  64. package/dist/utils/utils.js +6 -1
  65. package/package.json +4 -1
@@ -0,0 +1,79 @@
1
+ import { defineComponent, ref, createBlock, openBlock, unref, withCtx, createElementVNode, withModifiers, createElementBlock, Fragment, renderList, createTextVNode, resolveDynamicComponent, toDisplayString, createVNode } from 'vue';
2
+ import _sfc_main$1 from '../DropdownMenu/WDropdownMenu.vue.js';
3
+ import _sfc_main$2 from '../MenuItem/WMenuItem.vue.js';
4
+ import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
5
+ import _sfc_main$3 from './components/InputToolbarButton.vue.js';
6
+
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "WInputToolbarButton",
9
+ props: {
10
+ action: {}
11
+ },
12
+ emits: ["wrap-selection"],
13
+ setup(__props) {
14
+ const isOpen = ref(false);
15
+ let timeout = null;
16
+ const enter = () => {
17
+ if (timeout) {
18
+ clearTimeout(timeout);
19
+ timeout = null;
20
+ }
21
+ isOpen.value = true;
22
+ };
23
+ const leave = () => {
24
+ if (timeout) {
25
+ clearTimeout(timeout);
26
+ timeout = null;
27
+ }
28
+ timeout = setTimeout(() => {
29
+ isOpen.value = false;
30
+ timeout = null;
31
+ });
32
+ };
33
+ return (_ctx, _cache) => {
34
+ return Array.isArray(_ctx.action.value) ? (openBlock(), createBlock(_sfc_main$1, {
35
+ key: 0,
36
+ "is-open": isOpen.value,
37
+ "horizontal-align": unref(HorizontalAlign).CENTER,
38
+ top: ""
39
+ }, {
40
+ toggle: withCtx(() => [
41
+ createVNode(_sfc_main$3, {
42
+ action: _ctx.action,
43
+ onMouseenter: enter,
44
+ onMouseleave: leave
45
+ }, null, 8, ["action"])
46
+ ]),
47
+ content: withCtx(() => [
48
+ createElementVNode("div", {
49
+ class: "bg-default dark:bg-default-dark max-h-80 overflow-y-auto overscroll-y-contain rounded-xl text-start text-xs font-semibold shadow-md dark:border dark:border-solid dark:border-gray-800",
50
+ onMouseenter: enter,
51
+ onMouseleave: leave,
52
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
53
+ }, ["prevent"]))
54
+ }, [
55
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.action.value, (item, index) => {
56
+ return openBlock(), createBlock(_sfc_main$2, {
57
+ key: index,
58
+ onClick: ($event) => _ctx.$emit("wrap-selection", item.value)
59
+ }, {
60
+ default: withCtx(() => [
61
+ (openBlock(), createBlock(resolveDynamicComponent(item.icon))),
62
+ createTextVNode(" " + toDisplayString(item.title), 1)
63
+ ]),
64
+ _: 2
65
+ }, 1032, ["onClick"]);
66
+ }), 128))
67
+ ], 32)
68
+ ]),
69
+ _: 1
70
+ }, 8, ["is-open", "horizontal-align"])) : (openBlock(), createBlock(_sfc_main$3, {
71
+ key: 1,
72
+ action: _ctx.action,
73
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("wrap-selection", _ctx.action.value))
74
+ }, null, 8, ["action"]));
75
+ };
76
+ }
77
+ });
78
+
79
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './WInputToolbarButton.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAiBA;AA+RA,OAAO,KAAK,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,UAAU,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAA;CAClC,CAAC;;;;2BAsN4B,aAAa,KAAG,IAAI;2BAnBpB,MAAM,aAAa,MAAM;;;;;;;;;;;;;;;;;;;AA2IvD,wBAUG"}
1
+ {"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAiBA;AAyXA,OAAO,KAAK,EAAC,QAAQ,EAAG,aAAa,EAAC,MAAM,UAAU,CAAA;AAQtD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAA;CAClC,CAAC;;;;2BAwN4B,aAAa,KAAG,IAAI;2BArBpB,MAAM,aAAa,MAAM;;;;;;;;;;;;;;;;;;;AAiOvD,wBAUG"}
@@ -1,4 +1,6 @@
1
1
  import { defineComponent, useTemplateRef, ref, watch, onMounted, createElementBlock, openBlock, nextTick } from 'vue';
2
+ import { WrapSelectionType } from '../../../utils/utils.js';
3
+ import { preserveIndentation } from '../models/toolbarActions.js';
2
4
 
3
5
  const _hoisted_1 = ["placeholder"];
4
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -55,9 +57,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
57
  }
56
58
  nodeIndex++;
57
59
  }
58
- while (nodeIndex < existingNodes.length) {
59
- elementRef.value.removeChild(existingNodes[nodeIndex]);
60
- nodeIndex++;
60
+ while (elementRef.value.childNodes.length > props.textParts.length) {
61
+ const nodeToRemove = elementRef.value.childNodes[props.textParts.length];
62
+ elementRef.value.removeChild(nodeToRemove);
61
63
  }
62
64
  if (focused.value) setCaret(offsets.start, offsets.end !== offsets.start ? void 0 : offsets.end);
63
65
  };
@@ -160,21 +162,95 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
160
162
  selection?.removeAllRanges();
161
163
  selection?.addRange(range);
162
164
  };
165
+ const collapseList = [" ", "\n"];
163
166
  let offsetsOld = null;
164
167
  const wrapSelection = (value) => {
165
- const root = elementRef.value;
166
- if (!root) return;
167
168
  let offsets = getSelectionOffsets();
168
169
  if (focused.value || !offsetsOld) offsetsOld = offsets;
169
170
  else offsets = offsetsOld;
170
171
  const currentText = getCurrentText() ?? "";
171
- const selectedText = currentText.slice(offsets.start, offsets.end);
172
- const beforeSelection = currentText.slice(0, offsets.start);
173
- const afterSelection = currentText.slice(offsets.end);
174
- const newText = beforeSelection + (value.start || "") + selectedText + (value.end || "") + afterSelection;
175
- const cursorPosition = offsets.start + (value.end ? (value.start?.length ?? 0) + selectedText.length : 0);
172
+ let newText = "";
173
+ let newCursorStart = offsets.start;
174
+ let newCursorEnd = void 0;
175
+ switch (value.type) {
176
+ case WrapSelectionType.TOGGLE:
177
+ let startLen = value.start.length;
178
+ const endLen = value.end.length;
179
+ const textWithContext = currentText.slice(
180
+ Math.max(0, offsets.start - startLen),
181
+ Math.min(currentText.length, offsets.end + endLen)
182
+ );
183
+ if ((!value.start || textWithContext.startsWith(value.start)) && (!value.end || textWithContext.endsWith(value.end))) {
184
+ let expandedStart = Math.max(0, offsets.start - startLen);
185
+ let start = currentText.slice(0, expandedStart);
186
+ const middle = currentText.slice(offsets.start, offsets.end);
187
+ let end = currentText.slice(Math.min(currentText.length, offsets.end + endLen));
188
+ for (const item of collapseList) {
189
+ if (value.start.startsWith(item) && !start.endsWith(item) && !middle.startsWith(item)) {
190
+ start += item;
191
+ expandedStart += item.length;
192
+ }
193
+ if (value.end.endsWith(item) && !end.startsWith(item) && !middle.endsWith(item)) end = item + end;
194
+ }
195
+ newText = start + middle + end;
196
+ if (value.prepare) newText = value.prepare(newText, 0);
197
+ newCursorStart = expandedStart;
198
+ newCursorEnd = expandedStart + offsets.end - offsets.start;
199
+ } else {
200
+ if (!value.start || !value.end) {
201
+ const offset = value.start ? offsets.start : offsets.end;
202
+ let start = currentText.slice(0, offset);
203
+ let end = currentText.slice(offset);
204
+ for (const item of collapseList) {
205
+ if (value.start.startsWith(item) && start.endsWith(item)) {
206
+ start = start.slice(0, offsets.start - item.length);
207
+ startLen -= item.length;
208
+ }
209
+ if (value.end.endsWith(item) && end.startsWith(item)) end = end.slice(item.length);
210
+ }
211
+ newText = (value.prepare?.(start, 0) ?? start) + (value.start || value.end) + (value.prepare?.(end, offset) ?? end);
212
+ } else {
213
+ let start = currentText.slice(0, offsets.start);
214
+ const middle = currentText.slice(offsets.start, offsets.end);
215
+ let end = currentText.slice(offsets.end);
216
+ for (const item of collapseList) {
217
+ if (value.start.startsWith(item) && start.endsWith(item)) {
218
+ start = start.slice(0, offsets.start - item.length);
219
+ startLen -= item.length;
220
+ }
221
+ if (value.end.endsWith(item) && end.startsWith(item)) end = end.slice(item.length);
222
+ }
223
+ newText = (value.prepare?.(start, 0) ?? start) + value.start + (value.prepare?.(middle, offsets.start) ?? middle) + value.end + (value.prepare?.(end, offsets.end) ?? end);
224
+ }
225
+ newCursorStart = offsets.start + startLen;
226
+ if (offsets.start !== offsets.end) newCursorEnd = newCursorStart + offsets.end - offsets.start;
227
+ }
228
+ break;
229
+ case WrapSelectionType.LINE_PREFIX:
230
+ const lineStart = currentText.lastIndexOf("\n", offsets.start - 1) + 1;
231
+ const lineEnd = currentText.indexOf("\n", offsets.end);
232
+ const actualLineEnd = lineEnd === -1 ? currentText.length : lineEnd;
233
+ const linesText = currentText.slice(lineStart, actualLineEnd);
234
+ const beforeLines = currentText.slice(0, lineStart);
235
+ const afterLines = currentText.slice(actualLineEnd);
236
+ const lines = linesText.split("\n");
237
+ if (lines.length === 0) lines.push("");
238
+ const allLinesHavePrefix = value.detectPattern ? lines.every((line) => !line.trim() || value.detectPattern.test(line)) : value.linePrefix ? lines.every((line) => !line.trim() || line.startsWith(value.linePrefix)) : false;
239
+ if (allLinesHavePrefix) {
240
+ const cleanText = lines.map((line) => preserveIndentation(line, "")).join("\n");
241
+ newText = beforeLines + cleanText + afterLines;
242
+ newCursorStart = lineStart;
243
+ newCursorEnd = lineStart + cleanText.length;
244
+ } else {
245
+ const processedText = value.lineTransformAll ? value.lineTransformAll(lines) : value.lineTransform ? lines.map(value.lineTransform).join("\n") : lines.map((line) => line.trim() ? preserveIndentation(line, value.linePrefix) : line).join("\n");
246
+ newText = beforeLines + processedText + afterLines;
247
+ newCursorStart = lineStart;
248
+ newCursorEnd = lineStart + processedText.length;
249
+ }
250
+ break;
251
+ }
176
252
  emit("update:model-value", newText);
177
- nextTick(() => setCaret(cursorPosition));
253
+ nextTick(() => setCaret(newCursorStart, newCursorEnd));
178
254
  };
179
255
  const focus = () => {
180
256
  elementRef.value?.focus();
@@ -0,0 +1,27 @@
1
+ import { ToolbarAction, WrapSelection } from '../types';
2
+ type __VLS_Props = {
3
+ list: ToolbarAction[] | undefined;
4
+ rich: boolean;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
+ "wrap-selection": (value: WrapSelection) => any;
17
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ "onWrap-selection"?: ((value: WrapSelection) => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
27
+ //# sourceMappingURL=InputToolbar.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputToolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/InputToolbar.vue"],"names":[],"mappings":"AA2BA;AA4CA,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAA;AAK1E,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,aAAa,EAAE,GAAG,SAAS,CAAA;IACjC,IAAI,EAAE,OAAO,CAAA;CACd,CAAC;AAUF,iBAAS,cAAc;WA0ET,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './InputToolbar.vue2.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,39 @@
1
+ import { defineComponent, createElementBlock, openBlock, withModifiers, renderSlot, createCommentVNode, Fragment, renderList, createBlock, unref } from 'vue';
2
+ import _sfc_main$1 from '../WInputToolbarButton.vue.js';
3
+ import { toolbarActionList } from '../models/toolbarActions.js';
4
+
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "InputToolbar",
7
+ props: {
8
+ list: {},
9
+ rich: { type: Boolean }
10
+ },
11
+ emits: ["wrap-selection"],
12
+ setup(__props) {
13
+ return (_ctx, _cache) => {
14
+ return openBlock(), createElementBlock("div", {
15
+ class: "bg-default dark:bg-default-dark no-scrollbar sticky top-0 z-[2] col-span-full -mb-2 flex overflow-x-auto overscroll-x-contain border-b border-solid border-gray-50 text-xs dark:border-gray-800/50",
16
+ onMousedown: _cache[2] || (_cache[2] = withModifiers(() => {
17
+ }, ["prevent"]))
18
+ }, [
19
+ renderSlot(_ctx.$slots, "default"),
20
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (action, index) => {
21
+ return openBlock(), createBlock(_sfc_main$1, {
22
+ key: index,
23
+ action,
24
+ onWrapSelection: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("wrap-selection", $event))
25
+ }, null, 8, ["action"]);
26
+ }), 128)),
27
+ _ctx.rich ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(toolbarActionList), (action, index) => {
28
+ return openBlock(), createBlock(_sfc_main$1, {
29
+ key: index,
30
+ action,
31
+ onWrapSelection: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("wrap-selection", $event))
32
+ }, null, 8, ["action"]);
33
+ }), 128)) : createCommentVNode("", true)
34
+ ], 32);
35
+ };
36
+ }
37
+ });
38
+
39
+ export { _sfc_main as default };
@@ -0,0 +1,15 @@
1
+ import { ToolbarAction } from '../types';
2
+ type __VLS_Props = {
3
+ action: ToolbarAction;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
6
+ click: (value: MouseEvent) => any;
7
+ mouseenter: (value: MouseEvent) => any;
8
+ mouseleave: (value: MouseEvent) => any;
9
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onClick?: ((value: MouseEvent) => any) | undefined;
11
+ onMouseenter?: ((value: MouseEvent) => any) | undefined;
12
+ onMouseleave?: ((value: MouseEvent) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
14
+ export default _default;
15
+ //# sourceMappingURL=InputToolbarButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputToolbarButton.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/InputToolbarButton.vue"],"names":[],"mappings":"AAqBA;AAAA,OAsCO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAA;AAI3D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,aAAa,CAAA;CACtB,CAAC;;;;;;;;;;AAmFF,wBAQG"}
@@ -0,0 +1,33 @@
1
+ import { defineComponent, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, createTextVNode, resolveDynamicComponent, toDisplayString } from 'vue';
2
+ import _sfc_main$1 from '../../Tooltip/WTooltip.vue.js';
3
+
4
+ const _hoisted_1 = { class: "border-r border-solid border-gray-300 px-2 group-last/toolbar:border-r-0 dark:border-gray-600" };
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "InputToolbarButton",
7
+ props: {
8
+ action: {}
9
+ },
10
+ emits: ["click", "mouseenter", "mouseleave"],
11
+ setup(__props) {
12
+ return (_ctx, _cache) => {
13
+ return openBlock(), createElementBlock("button", {
14
+ class: "text-accent w-ripple w-ripple-hover group/toolbar first-not:-ml-px relative pb-1 pt-2",
15
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event)),
16
+ onMouseenter: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("mouseenter", $event)),
17
+ onMouseleave: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("mouseleave", $event))
18
+ }, [
19
+ createElementVNode("div", _hoisted_1, [
20
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.action.icon), { class: "square-[1.25em] -mt-[0.25em] inline" })),
21
+ createTextVNode(" " + toDisplayString(_ctx.action.title ?? ""), 1)
22
+ ]),
23
+ _ctx.action.tooltip ? (openBlock(), createBlock(_sfc_main$1, {
24
+ key: 0,
25
+ text: _ctx.action.tooltip,
26
+ top: ""
27
+ }, null, 8, ["text"])) : createCommentVNode("", true)
28
+ ], 32);
29
+ };
30
+ }
31
+ });
32
+
33
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './InputToolbarButton.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,6 @@
1
+ import { ToolbarAction } from '../types';
2
+ export declare const linePrefixRegex: RegExp;
3
+ export declare const indentRegex: RegExp;
4
+ export declare const preserveIndentation: (line: string, newPrefix: string) => string;
5
+ export declare const toolbarActionList: ToolbarAction[];
6
+ //# sourceMappingURL=toolbarActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolbarActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/models/toolbarActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,UAAU,CAAA;AAsB3C,eAAO,MAAM,eAAe,QAA0C,CAAA;AACtE,eAAO,MAAM,WAAW,QAAW,CAAA;AAGnC,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,WAAW,MAAM,KAAG,MAGrE,CAAA;AAgDD,eAAO,MAAM,iBAAiB,EAAE,aAAa,EAkF5C,CAAA"}
@@ -0,0 +1,140 @@
1
+ import { markRaw } from 'vue';
2
+ import IconBold from '../../../assets/icons/IconBold.svg.js';
3
+ import IconCodeBlock from '../../../assets/icons/IconCodeBlock.svg.js';
4
+ import IconCodeInline from '../../../assets/icons/IconCodeInline.svg.js';
5
+ import IconHeading from '../../../assets/icons/IconHeading.svg.js';
6
+ import IconItalic from '../../../assets/icons/IconItalic.svg.js';
7
+ import IconLink from '../../../assets/icons/IconLink.svg.js';
8
+ import IconListBullet from '../../../assets/icons/IconListBullet.svg.js';
9
+ import IconListDecrease from '../../../assets/icons/IconListDecrease.svg.js';
10
+ import IconListIncrease from '../../../assets/icons/IconListIncrease.svg.js';
11
+ import IconListNumbered from '../../../assets/icons/IconListNumbered.svg.js';
12
+ import IconQuote from '../../../assets/icons/IconQuote.svg.js';
13
+ import IconStrikethrough from '../../../assets/icons/IconStrikethrough.svg.js';
14
+ import IconTable from '../../../assets/icons/IconTable.svg.js';
15
+ import IconTableCollapsed from '../../../assets/icons/IconTableCollapsed.svg.js';
16
+ import { WrapSelectionType } from '../../../utils/utils.js';
17
+
18
+ const linePrefixRegex = /^-\s|^>\s|^\d+\.\s|^\[ \]\s|^#{1,6}\s/;
19
+ const indentRegex = /^(\s*)/;
20
+ const tableDividerRowRegex = /^\s*\|(\s*-+\s*\|)+\s*$/;
21
+ const preserveIndentation = (line, newPrefix) => {
22
+ const indent2 = line.match(indentRegex)?.[1] ?? "";
23
+ return indent2 + newPrefix + (indent2 ? line.slice(indent2.length) : line).replace(linePrefixRegex, "");
24
+ };
25
+ const indent = " ";
26
+ const insertTable = (lines, collapsed) => {
27
+ let indent2 = "";
28
+ const columns = [];
29
+ const items = [];
30
+ if (lines.length === 1 && !lines[0].trim()) lines.push("header|header");
31
+ else if (lines[1] && tableDividerRowRegex.test(lines[1])) lines.splice(1, 1);
32
+ for (const item of lines) {
33
+ const match = item.match(indentRegex)?.[1] ?? "";
34
+ if (match.length > indent2.length) indent2 = match;
35
+ const currentItems = [];
36
+ items.push(currentItems);
37
+ const splitted = item.trim().split("|");
38
+ if (splitted[0] === "") splitted.shift();
39
+ if (splitted[splitted.length - 1] === "") splitted.pop();
40
+ for (let col = 0; col < splitted.length; col++) {
41
+ const prepared = splitted[col].trim();
42
+ currentItems.push(prepared);
43
+ const length = collapsed ? 0 : prepared.length;
44
+ if (columns[col] === void 0) {
45
+ columns.push(length);
46
+ } else if (!collapsed && columns[col] < length) {
47
+ columns.splice(col, 1, length);
48
+ }
49
+ }
50
+ }
51
+ const s = collapsed ? "" : " ";
52
+ return items.map((splitted, index) => `${indent2}${columns.reduce((result, length, col) => `${result}${s}${(splitted[col] ?? "").padEnd(length, " ")}${s}|`, "|")}${index === 0 ? `
53
+ ${indent2}${columns.reduce((result, length) => `${result}${s}${"-".repeat(length || 1)}${s}|`, "|")}` : ""}${lines.length === 1 ? `
54
+ ${indent2}| ${columns.reduce((result, length) => `${result}${s}${length === 0 ? "" : " ".repeat(length)}${s}|`, "|")} |` : ""}`).join("\n");
55
+ };
56
+ const toolbarActionList = [
57
+ {
58
+ icon: markRaw(IconBold),
59
+ value: { type: WrapSelectionType.TOGGLE, start: "**", end: "**" },
60
+ tooltip: "Bold"
61
+ },
62
+ {
63
+ icon: markRaw(IconItalic),
64
+ value: { type: WrapSelectionType.TOGGLE, start: " _", end: "_ " },
65
+ tooltip: "Italic"
66
+ },
67
+ {
68
+ icon: markRaw(IconStrikethrough),
69
+ value: { type: WrapSelectionType.TOGGLE, start: "~~", end: "~~" },
70
+ tooltip: "Strikethrough"
71
+ },
72
+ {
73
+ icon: markRaw(IconCodeInline),
74
+ value: { type: WrapSelectionType.TOGGLE, start: "`", end: "`" },
75
+ tooltip: "Inline code"
76
+ },
77
+ {
78
+ icon: markRaw(IconCodeBlock),
79
+ value: { type: WrapSelectionType.TOGGLE, start: "\n```\n", end: "\n```\n" },
80
+ tooltip: "Code block"
81
+ },
82
+ {
83
+ icon: markRaw(IconLink),
84
+ value: { type: WrapSelectionType.TOGGLE, start: "[", end: "](url)" },
85
+ tooltip: "Insert link"
86
+ },
87
+ {
88
+ icon: markRaw(IconListBullet),
89
+ value: { type: WrapSelectionType.LINE_PREFIX, linePrefix: "- " },
90
+ tooltip: "Bullet list"
91
+ },
92
+ {
93
+ icon: markRaw(IconListNumbered),
94
+ value: {
95
+ type: WrapSelectionType.LINE_PREFIX,
96
+ detectPattern: /^\d+\.\s/,
97
+ lineTransform: (line, index) => preserveIndentation(line, `${index + 1}. `)
98
+ },
99
+ tooltip: "Numbered list"
100
+ },
101
+ // {
102
+ // icon: markRaw(IconListCheckbox),
103
+ // value: {type: WrapSelectionType.LINE_PREFIX, linePrefix: '[ ] '},
104
+ // tooltip: 'Checkbox list',
105
+ // },
106
+ {
107
+ icon: markRaw(IconListIncrease),
108
+ value: { type: WrapSelectionType.LINE_PREFIX, lineTransform: (line) => indent + line },
109
+ tooltip: "Increase indent"
110
+ },
111
+ {
112
+ icon: markRaw(IconListDecrease),
113
+ value: { type: WrapSelectionType.LINE_PREFIX, lineTransform: (line) => line.startsWith(indent) ? line.slice(indent.length) : line },
114
+ tooltip: "Decrease indent"
115
+ },
116
+ {
117
+ icon: markRaw(IconQuote),
118
+ value: { type: WrapSelectionType.LINE_PREFIX, linePrefix: "> " },
119
+ tooltip: "Quote"
120
+ },
121
+ {
122
+ icon: markRaw(IconTable),
123
+ value: { type: WrapSelectionType.LINE_PREFIX, lineTransformAll: insertTable },
124
+ tooltip: "Insert table / Align table"
125
+ },
126
+ {
127
+ icon: markRaw(IconTableCollapsed),
128
+ value: { type: WrapSelectionType.LINE_PREFIX, lineTransformAll: (lines) => insertTable(lines, true) },
129
+ tooltip: "Collapse table"
130
+ },
131
+ {
132
+ icon: markRaw(IconHeading),
133
+ value: Array(6).fill(null).map((_, index) => ({
134
+ title: `H${index + 1}`,
135
+ value: { type: WrapSelectionType.LINE_PREFIX, linePrefix: `${"#".repeat(index + 1)} ` }
136
+ }))
137
+ }
138
+ ];
139
+
140
+ export { indentRegex, linePrefixRegex, preserveIndentation, toolbarActionList };
@@ -1,5 +1,6 @@
1
1
  import { DropdownMenuProps } from '../DropdownMenu/types';
2
2
  import { FieldWrapperProps } from '../FieldWrapper/types';
3
+ import { WrapSelectionType } from '../../utils/utils';
3
4
  import { Component } from 'vue';
4
5
  export interface InputProps<Type extends InputType> extends Omit<FieldWrapperProps, 'modelValue'> {
5
6
  modelValue?: (Type extends 'number' ? number : string) | undefined;
@@ -30,6 +31,8 @@ export interface InputProps<Type extends InputType> extends Omit<FieldWrapperPro
30
31
  noWrap?: boolean;
31
32
  textTransparent?: boolean;
32
33
  textParts?: TextPart[];
34
+ rich?: boolean;
35
+ toolbarActions?: ToolbarAction[];
33
36
  }
34
37
  export interface InputAsyncProps<Type extends InputType> extends InputProps<Type> {
35
38
  validate?: ValidateFn | ValidateFn[];
@@ -58,8 +61,38 @@ export interface InputDateProps extends Omit<InputSuggestProps<'text'>, 'modelVa
58
61
  maxDate?: Date;
59
62
  }
60
63
  export type WrapSelection = {
61
- start?: string;
62
- end?: string;
64
+ type: WrapSelectionType.TOGGLE;
65
+ start: string;
66
+ end: string;
67
+ prepare?: (previousValue: string, offset: number) => string;
68
+ } | {
69
+ type: WrapSelectionType.LINE_PREFIX;
70
+ linePrefix: string;
71
+ lineTransform?: never;
72
+ lineTransformAll?: never;
73
+ detectPattern?: never;
74
+ } | {
75
+ type: WrapSelectionType.LINE_PREFIX;
76
+ linePrefix?: never;
77
+ lineTransform: (line: string, index: number, lines: string[]) => string;
78
+ lineTransformAll?: never;
79
+ detectPattern?: RegExp;
80
+ } | {
81
+ type: WrapSelectionType.LINE_PREFIX;
82
+ linePrefix?: never;
83
+ lineTransform?: never;
84
+ lineTransformAll: (lines: string[]) => string;
85
+ detectPattern?: RegExp;
86
+ };
87
+ export type ToolbarAction = {
88
+ title?: string;
89
+ icon?: SVGComponent;
90
+ value: WrapSelection | {
91
+ title?: string;
92
+ icon?: SVGComponent;
93
+ value: WrapSelection;
94
+ }[];
95
+ tooltip?: string;
63
96
  };
64
97
  export type TextPart = {
65
98
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,KAAK,CAAA;AAElC,MAAM,WAAW,UAAU,CAAC,IAAI,SAAS,SAAS,CAAE,SAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC;IAC/F,UAAU,CAAC,EAAE,CAAC,IAAI,SAAS,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAA;IAClE,IAAI,CAAC,EAAE,IAAI,CAAA;IAEX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAA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AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,aAAa,GAAG;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,YAAY,CAAC;QAAC,KAAK,EAAE,aAAa,CAAA;KAAC,EAAE,CAAA;IACpF,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,qBAAqB,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,MAAM,CAAA"}
@@ -2,7 +2,7 @@ import { defineComponent, ref, createBlock, openBlock, unref, withCtx, createVNo
2
2
  import _sfc_main$5 from '../../Button/WButtonSelectionAction.vue.js';
3
3
  import _sfc_main$2 from '../../ClickOutside/WClickOutside.vue.js';
4
4
  import _sfc_main$1 from '../../DropdownMenu/WDropdownMenu.vue.js';
5
- import IconTableSettings from '../../../assets/icons/IconTableSettings.svg.js';
5
+ import IconListSettings from '../../../assets/icons/IconListSettings.svg.js';
6
6
  import { HorizontalAlign } from '../../../utils/HorizontalAlign.js';
7
7
  import { isField } from '../models/utils.js';
8
8
  import _sfc_main$4 from './HeaderSettingsList.vue.js';
@@ -70,7 +70,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
70
70
  }, {
71
71
  toggle: withCtx(() => [
72
72
  createVNode(_sfc_main$5, {
73
- icon: markRaw(unref(IconTableSettings)),
73
+ icon: markRaw(unref(IconListSettings)),
74
74
  disabled: _ctx.disabled,
75
75
  active: isOpen.value,
76
76
  onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
@@ -1,6 +1,6 @@
1
1
  import { markRaw, ref, unref, computed, isRef, watch } from 'vue';
2
2
  import IconGrid from '../../../assets/icons/IconGrid.svg.js';
3
- import IconTable from '../../../assets/icons/IconTable.svg.js';
3
+ import IconList from '../../../assets/icons/IconList.svg.js';
4
4
  import { useIsMobile } from '../../../utils/mobile.js';
5
5
  import { ListMode } from '../../../utils/utils.js';
6
6
 
@@ -15,7 +15,7 @@ const parseListMode = (value) => {
15
15
  return isListMode(value) ? value : void 0;
16
16
  };
17
17
  const listModeIconMap = {
18
- [ListMode.TABLE]: markRaw(IconTable),
18
+ [ListMode.TABLE]: markRaw(IconList),
19
19
  [ListMode.GRID]: markRaw(IconGrid)
20
20
  };
21
21
  const fieldConfigKeyLength = 4;
@@ -13,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  setup(__props) {
14
14
  return (_ctx, _cache) => {
15
15
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.disabled ? "div" : _ctx.to ? unref(RouterLink) : _ctx.href ? "a" : "button"), mergeProps(_ctx.disabled ? void 0 : _ctx.to ? { to: _ctx.to } : _ctx.href ? { href: _ctx.href, download: _ctx.download } : void 0, {
16
- class: ["text-description w-ripple-trigger block w-full min-w-36 select-none items-center justify-start px-2 text-start outline-none first:pt-2 last:pb-2", {
16
+ class: ["text-description w-ripple-trigger block w-full select-none items-center justify-start px-2 text-start outline-none first:pt-2 last:pb-2", {
17
17
  "hover:text-primary dark:hover:text-primary-dark cursor-pointer": !_ctx.disabled,
18
18
  "cursor-not-allowed opacity-50": _ctx.disabled
19
19
  }],
@@ -62,6 +62,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
62
  noWrap: { type: Boolean },
63
63
  textTransparent: { type: Boolean },
64
64
  textParts: {},
65
+ rich: { type: Boolean },
66
+ toolbarActions: {},
65
67
  title: {},
66
68
  titleIcon: {},
67
69
  description: {},
@@ -54,6 +54,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
54
  noWrap: { type: Boolean },
55
55
  textTransparent: { type: Boolean },
56
56
  textParts: {},
57
+ rich: { type: Boolean },
58
+ toolbarActions: {},
57
59
  title: {},
58
60
  titleIcon: {},
59
61
  description: {},