aq-fe-framework 0.1.336 → 0.1.337

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.
@@ -3,12 +3,12 @@ import {
3
3
  MyFlexColumn,
4
4
  MyFlexRow
5
5
  } from "./chunk-GEYCGM75.mjs";
6
- import {
7
- const_object_colors
8
- } from "./chunk-NWBLJ3W3.mjs";
9
6
  import {
10
7
  enum_daysOfWeek
11
8
  } from "./chunk-K6S7R6LU.mjs";
9
+ import {
10
+ const_object_colors
11
+ } from "./chunk-NWBLJ3W3.mjs";
12
12
  import {
13
13
  useMyReactMutation
14
14
  } from "./chunk-YQPDRFRL.mjs";
@@ -411,26 +411,9 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
411
411
  )) }) });
412
412
  }
413
413
 
414
- // src/core/input/MySelect.tsx
415
- import { Loader, Select } from "@mantine/core";
416
- import { jsx as jsx9 } from "react/jsx-runtime";
417
- function MySelect(_a) {
418
- var _b = _a, { label, data } = _b, rest = __objRest(_b, ["label", "data"]);
419
- const isLoading = data === void 0;
420
- return /* @__PURE__ */ jsx9(
421
- Select,
422
- __spreadValues({
423
- label,
424
- placeholder: isLoading ? "\u0110ang t\u1EA3i..." : label ? `Ch\u1ECDn ${label.toLowerCase()}` : "",
425
- data: data != null ? data : [],
426
- rightSection: isLoading ? /* @__PURE__ */ jsx9(Loader, { size: "xs" }) : void 0,
427
- disabled: isLoading
428
- }, rest)
429
- );
430
- }
431
-
432
- // src/core/input/MyTextEditor.tsx
433
- import { Link, RichTextEditor as MantineRichTextEditor } from "@mantine/tiptap";
414
+ // src/core/input/MyRichTextEditor.tsx
415
+ import { Input, ScrollArea } from "@mantine/core";
416
+ import { Link, RichTextEditor as MantineRichTextEditor, RichTextEditor } from "@mantine/tiptap";
434
417
  import FileHandler from "@tiptap-pro/extension-file-handler";
435
418
  import Highlight from "@tiptap/extension-highlight";
436
419
  import Image from "@tiptap/extension-image";
@@ -440,14 +423,8 @@ import TextAlign from "@tiptap/extension-text-align";
440
423
  import Underline from "@tiptap/extension-underline";
441
424
  import { useEditor } from "@tiptap/react";
442
425
  import StarterKit from "@tiptap/starter-kit";
443
- import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
444
- function MyRichTextEditor({
445
- value,
446
- onChange,
447
- richTextEditorProps,
448
- richTextEditorToolBarProps,
449
- richTextEditorContentProps
450
- }) {
426
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
427
+ function MyRichTextEditor(props) {
451
428
  const editor = useEditor({
452
429
  extensions: [
453
430
  StarterKit,
@@ -515,49 +492,78 @@ function MyRichTextEditor({
515
492
  }
516
493
  })
517
494
  ],
518
- content: value,
495
+ content: props.value,
519
496
  onUpdate: ({ editor: editor2 }) => {
520
- onChange(editor2.getHTML());
497
+ props.onChange(editor2.getHTML());
521
498
  }
522
499
  });
523
- return /* @__PURE__ */ jsxs5(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, richTextEditorProps), { children: [
524
- /* @__PURE__ */ jsxs5(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({ sticky: true, stickyOffset: 60 }, richTextEditorToolBarProps), { children: [
500
+ return /* @__PURE__ */ jsx9(Input.Wrapper, __spreadProps(__spreadValues({}, props.inputWrapperProps), { children: /* @__PURE__ */ jsxs5(MantineRichTextEditor, __spreadProps(__spreadValues({ editor }, props.richTextEditorProps), { children: [
501
+ /* @__PURE__ */ jsxs5(MantineRichTextEditor.Toolbar, __spreadProps(__spreadValues({ sticky: true, stickyOffset: 60 }, props.richTextEditorToolBarProps), { children: [
525
502
  /* @__PURE__ */ jsxs5(MantineRichTextEditor.ControlsGroup, { children: [
526
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Bold, {}),
527
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Italic, {}),
528
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Underline, {}),
529
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Strikethrough, {}),
530
- /* @__PURE__ */ jsx10(MantineRichTextEditor.ClearFormatting, {}),
531
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Highlight, {}),
532
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Code, {})
503
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Bold, {}),
504
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Italic, {}),
505
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Underline, {}),
506
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Strikethrough, {}),
507
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.ClearFormatting, {}),
508
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Highlight, {}),
509
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Code, {})
533
510
  ] }),
534
511
  /* @__PURE__ */ jsxs5(MantineRichTextEditor.ControlsGroup, { children: [
535
- /* @__PURE__ */ jsx10(MantineRichTextEditor.H1, {}),
536
- /* @__PURE__ */ jsx10(MantineRichTextEditor.H2, {}),
537
- /* @__PURE__ */ jsx10(MantineRichTextEditor.H3, {}),
538
- /* @__PURE__ */ jsx10(MantineRichTextEditor.H4, {})
512
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.H1, {}),
513
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.H2, {}),
514
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.H3, {}),
515
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.H4, {})
539
516
  ] }),
540
517
  /* @__PURE__ */ jsxs5(MantineRichTextEditor.ControlsGroup, { children: [
541
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Blockquote, {}),
542
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Hr, {}),
543
- /* @__PURE__ */ jsx10(MantineRichTextEditor.BulletList, {}),
544
- /* @__PURE__ */ jsx10(MantineRichTextEditor.OrderedList, {}),
545
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Subscript, {}),
546
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Superscript, {})
518
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Blockquote, {}),
519
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Hr, {}),
520
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.BulletList, {}),
521
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.OrderedList, {}),
522
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Subscript, {}),
523
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Superscript, {})
547
524
  ] }),
548
525
  /* @__PURE__ */ jsxs5(MantineRichTextEditor.ControlsGroup, { children: [
549
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Link, {}),
550
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Unlink, {})
526
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Link, {}),
527
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.Unlink, {})
551
528
  ] }),
552
529
  /* @__PURE__ */ jsxs5(MantineRichTextEditor.ControlsGroup, { children: [
553
- /* @__PURE__ */ jsx10(MantineRichTextEditor.AlignLeft, {}),
554
- /* @__PURE__ */ jsx10(MantineRichTextEditor.AlignCenter, {}),
555
- /* @__PURE__ */ jsx10(MantineRichTextEditor.AlignJustify, {}),
556
- /* @__PURE__ */ jsx10(MantineRichTextEditor.AlignRight, {})
530
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.AlignLeft, {}),
531
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.AlignCenter, {}),
532
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.AlignJustify, {}),
533
+ /* @__PURE__ */ jsx9(MantineRichTextEditor.AlignRight, {})
557
534
  ] })
558
535
  ] })),
559
- /* @__PURE__ */ jsx10(MantineRichTextEditor.Content, __spreadValues({}, richTextEditorContentProps))
560
- ] }));
536
+ /* @__PURE__ */ jsx9(
537
+ ScrollArea.Autosize,
538
+ __spreadProps(__spreadValues({
539
+ onMouseDown: () => {
540
+ editor == null ? void 0 : editor.commands.focus();
541
+ },
542
+ mah: "300",
543
+ style: { cursor: "text" }
544
+ }, props.scrollAreaAutosizeProps), {
545
+ children: /* @__PURE__ */ jsx9(RichTextEditor.Content, __spreadValues({ mih: "300" }, props.richTextEditorContentProps))
546
+ })
547
+ )
548
+ ] })) }));
549
+ }
550
+
551
+ // src/core/input/MySelect.tsx
552
+ import { Loader, Select } from "@mantine/core";
553
+ import { jsx as jsx10 } from "react/jsx-runtime";
554
+ function MySelect(_a) {
555
+ var _b = _a, { label, data } = _b, rest = __objRest(_b, ["label", "data"]);
556
+ const isLoading = data === void 0;
557
+ return /* @__PURE__ */ jsx10(
558
+ Select,
559
+ __spreadValues({
560
+ label,
561
+ placeholder: isLoading ? "\u0110ang t\u1EA3i..." : label ? `Ch\u1ECDn ${label.toLowerCase()}` : "",
562
+ data: data != null ? data : [],
563
+ rightSection: isLoading ? /* @__PURE__ */ jsx10(Loader, { size: "xs" }) : void 0,
564
+ disabled: isLoading
565
+ }, rest)
566
+ );
561
567
  }
562
568
 
563
569
  // src/core/input/MyTextInput.tsx
@@ -601,7 +607,7 @@ import {
601
607
  Group as Group3,
602
608
  NumberInput,
603
609
  Paper,
604
- ScrollArea,
610
+ ScrollArea as ScrollArea2,
605
611
  Text as Text3
606
612
  } from "@mantine/core";
607
613
  import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
@@ -649,7 +655,7 @@ function MyWeeklySessionSchedulerPicker({
649
655
  }
650
656
  ) }),
651
657
  /* @__PURE__ */ jsx12(Divider, { my: "xs" }),
652
- /* @__PURE__ */ jsx12(Center, { children: /* @__PURE__ */ jsx12(ScrollArea.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx12(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
658
+ /* @__PURE__ */ jsx12(Center, { children: /* @__PURE__ */ jsx12(ScrollArea2.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx12(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
653
659
  var _a;
654
660
  return /* @__PURE__ */ jsxs6(
655
661
  Paper,
@@ -755,8 +761,8 @@ export {
755
761
  MyLabelValueRow,
756
762
  MyStatsCard,
757
763
  MyDayOfWeekPicker,
758
- MySelect,
759
764
  MyRichTextEditor,
765
+ MySelect,
760
766
  MyTextInput,
761
767
  MyWeeklySessionSchedulerPicker,
762
768
  MyFlexColumn2 as MyFlexColumn
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { t as type_action } from '../types-B5rmBuXz.mjs';
3
- import { ActionIconProps, ButtonProps, ModalProps, TextProps, GroupProps, ThemeIconProps, SelectProps, TextInputProps, FlexProps } from '@mantine/core';
3
+ import { ActionIconProps, ButtonProps, ModalProps, TextProps, GroupProps, ThemeIconProps, InputWrapperProps, ScrollAreaAutosizeProps, SelectProps, TextInputProps, FlexProps } from '@mantine/core';
4
4
  import { ReactNode } from 'react';
5
5
  import { M as MyApiResponse } from '../createBaseApi-D9OK2lA_.mjs';
6
6
  import { AxiosResponse } from 'axios';
@@ -78,6 +78,17 @@ interface CoreDayOfWeekPickerProps {
78
78
  }
79
79
  declare function MyDayOfWeekPicker({ value, onChange }: CoreDayOfWeekPickerProps): react_jsx_runtime.JSX.Element;
80
80
 
81
+ interface MyRichTextEditorProps {
82
+ value: string;
83
+ onChange: (value: string) => void;
84
+ richTextEditorProps?: RichTextEditorProps;
85
+ richTextEditorToolBarProps?: RichTextEditorToolbarProps;
86
+ richTextEditorContentProps?: RichTextEditorContentProps;
87
+ inputWrapperProps?: InputWrapperProps;
88
+ scrollAreaAutosizeProps?: ScrollAreaAutosizeProps;
89
+ }
90
+ declare function MyRichTextEditor(props: MyRichTextEditorProps): react_jsx_runtime.JSX.Element;
91
+
81
92
  interface MySelectProps extends SelectProps {
82
93
  label?: string;
83
94
  data?: Array<string | {
@@ -87,15 +98,6 @@ interface MySelectProps extends SelectProps {
87
98
  }
88
99
  declare function MySelect({ label, data, ...rest }: MySelectProps): react_jsx_runtime.JSX.Element;
89
100
 
90
- interface MyRichTextEditorProps {
91
- value: string;
92
- onChange: (value: string) => void;
93
- richTextEditorProps?: RichTextEditorProps;
94
- richTextEditorToolBarProps?: RichTextEditorToolbarProps;
95
- richTextEditorContentProps?: RichTextEditorContentProps;
96
- }
97
- declare function MyRichTextEditor({ value, onChange, richTextEditorProps, richTextEditorToolBarProps, richTextEditorContentProps }: MyRichTextEditorProps): react_jsx_runtime.JSX.Element;
98
-
99
101
  interface CoreTextInputProps extends TextInputProps {
100
102
  label?: string;
101
103
  defaultValue?: string;
@@ -12,10 +12,10 @@ import {
12
12
  MyStatsCard,
13
13
  MyTextInput,
14
14
  MyWeeklySessionSchedulerPicker
15
- } from "../chunk-6WE24SWN.mjs";
15
+ } from "../chunk-INS6N4RV.mjs";
16
16
  import "../chunk-GEYCGM75.mjs";
17
- import "../chunk-NWBLJ3W3.mjs";
18
17
  import "../chunk-K6S7R6LU.mjs";
18
+ import "../chunk-NWBLJ3W3.mjs";
19
19
  import "../chunk-YQPDRFRL.mjs";
20
20
  import "../chunk-7ZCOFATU.mjs";
21
21
  import "../chunk-FWCSY2DS.mjs";
@@ -11,9 +11,6 @@ import {
11
11
  import {
12
12
  U0DateToDDMMYYYString
13
13
  } from "../chunk-I2XIN2R3.mjs";
14
- import {
15
- const_object_documentTypes
16
- } from "../chunk-BZMQOGL6.mjs";
17
14
  import {
18
15
  F_authenticate_Logout,
19
16
  MyActionIconDelete,
@@ -45,19 +42,22 @@ import {
45
42
  MyButton as MyButton2,
46
43
  MyDataTableSelectOne,
47
44
  MyTextInput as MyTextInput2
48
- } from "../chunk-6WE24SWN.mjs";
45
+ } from "../chunk-INS6N4RV.mjs";
49
46
  import {
50
47
  MyDataTable,
51
48
  MyFlexColumn,
52
49
  MyFlexRow
53
50
  } from "../chunk-GEYCGM75.mjs";
54
- import {
55
- const_object_colors
56
- } from "../chunk-NWBLJ3W3.mjs";
57
51
  import {
58
52
  enum_emailConfigModule
59
53
  } from "../chunk-VH4ZAD6M.mjs";
60
54
  import "../chunk-K6S7R6LU.mjs";
55
+ import {
56
+ const_object_documentTypes
57
+ } from "../chunk-BZMQOGL6.mjs";
58
+ import {
59
+ const_object_colors
60
+ } from "../chunk-NWBLJ3W3.mjs";
61
61
  import {
62
62
  baseAxios_default,
63
63
  createBaseApi,
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.336",
45
+ "version": "0.1.337",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"