aq-fe-framework 0.1.327 → 0.1.329

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.
@@ -343,9 +343,28 @@ function MyDataTableSelectOne({
343
343
  );
344
344
  }
345
345
 
346
+ // src/core/dataDisplay/MyLabelValueRow.tsx
347
+ import { Group, Text } from "@mantine/core";
348
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
349
+ function MyLabelValueRow({
350
+ label,
351
+ value,
352
+ labelProps,
353
+ valueProps,
354
+ groupProps
355
+ }) {
356
+ return /* @__PURE__ */ jsxs3(Group, __spreadProps(__spreadValues({ gap: 5, wrap: "nowrap" }, groupProps), { children: [
357
+ /* @__PURE__ */ jsxs3(Text, __spreadProps(__spreadValues({ fw: 600 }, labelProps), { children: [
358
+ label,
359
+ ":"
360
+ ] })),
361
+ /* @__PURE__ */ jsx6(Text, __spreadProps(__spreadValues({}, valueProps), { children: value }))
362
+ ] }));
363
+ }
364
+
346
365
  // src/core/input/MyDayOfWeekPicker.tsx
347
- import { Badge, Group } from "@mantine/core";
348
- import { jsx as jsx6 } from "react/jsx-runtime";
366
+ import { Badge, Group as Group2 } from "@mantine/core";
367
+ import { jsx as jsx7 } from "react/jsx-runtime";
349
368
  var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
350
369
  function MyDayOfWeekPicker({ value = [], onChange }) {
351
370
  const toggle = (val) => {
@@ -353,7 +372,7 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
353
372
  const newValue = value.includes(val) ? value.filter((v) => v !== val) : [...value, val].sort((a, b) => a - b);
354
373
  onChange(newValue);
355
374
  };
356
- return /* @__PURE__ */ jsx6(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx6(Group, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx6(
375
+ return /* @__PURE__ */ jsx7(MyFlexRow, { align: "center", children: /* @__PURE__ */ jsx7(Group2, { gap: "xs", children: days.map((d) => /* @__PURE__ */ jsx7(
357
376
  Badge,
358
377
  {
359
378
  variant: value.includes(d.value) ? "filled" : "outline",
@@ -370,10 +389,10 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
370
389
 
371
390
  // src/core/input/MyTextInput.tsx
372
391
  import { TextInput } from "@mantine/core";
373
- import { jsx as jsx7 } from "react/jsx-runtime";
392
+ import { jsx as jsx8 } from "react/jsx-runtime";
374
393
  function MyTextInput(_a) {
375
394
  var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
376
- return /* @__PURE__ */ jsx7(
395
+ return /* @__PURE__ */ jsx8(
377
396
  TextInput,
378
397
  __spreadValues({
379
398
  onKeyDown: (e) => {
@@ -406,15 +425,15 @@ import {
406
425
  Button as Button5,
407
426
  Center,
408
427
  Divider,
409
- Group as Group2,
428
+ Group as Group3,
410
429
  NumberInput,
411
430
  Paper,
412
431
  ScrollArea,
413
- Text as Text2
432
+ Text as Text3
414
433
  } from "@mantine/core";
415
434
  import { IconPlus as IconPlus4, IconTrash as IconTrash3 } from "@tabler/icons-react";
416
435
  import { useState as useState2 } from "react";
417
- import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
436
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
418
437
  function MyWeeklySessionSchedulerPicker({
419
438
  value = [],
420
439
  onChange
@@ -445,8 +464,8 @@ function MyWeeklySessionSchedulerPicker({
445
464
  return acc;
446
465
  }, {});
447
466
  const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
448
- return /* @__PURE__ */ jsx8(Paper, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs3(MyFlexColumn, { children: [
449
- /* @__PURE__ */ jsx8(Center, { children: /* @__PURE__ */ jsx8(
467
+ return /* @__PURE__ */ jsx9(Paper, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs4(MyFlexColumn, { children: [
468
+ /* @__PURE__ */ jsx9(Center, { children: /* @__PURE__ */ jsx9(
450
469
  MyDayOfWeekPicker,
451
470
  {
452
471
  value: selectedDays,
@@ -456,41 +475,41 @@ function MyWeeklySessionSchedulerPicker({
456
475
  }
457
476
  }
458
477
  ) }),
459
- /* @__PURE__ */ jsx8(Divider, { my: "xs" }),
460
- /* @__PURE__ */ jsx8(Center, { children: /* @__PURE__ */ jsx8(ScrollArea.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx8(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
478
+ /* @__PURE__ */ jsx9(Divider, { my: "xs" }),
479
+ /* @__PURE__ */ jsx9(Center, { children: /* @__PURE__ */ jsx9(ScrollArea.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx9(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
461
480
  var _a;
462
- return /* @__PURE__ */ jsxs3(
481
+ return /* @__PURE__ */ jsxs4(
463
482
  Paper,
464
483
  {
465
484
  w: "100%",
466
485
  p: "md",
467
486
  bg: const_object_colors.mantineBackgroundBlueLight,
468
487
  children: [
469
- /* @__PURE__ */ jsxs3(Group2, { gap: "apart", children: [
470
- /* @__PURE__ */ jsx8(Text2, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
471
- /* @__PURE__ */ jsx8(
488
+ /* @__PURE__ */ jsxs4(Group3, { gap: "apart", children: [
489
+ /* @__PURE__ */ jsx9(Text3, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
490
+ /* @__PURE__ */ jsx9(
472
491
  Button5,
473
492
  {
474
493
  color: "teal.5",
475
- leftSection: /* @__PURE__ */ jsx8(IconPlus4, { size: 14 }),
494
+ leftSection: /* @__PURE__ */ jsx9(IconPlus4, { size: 14 }),
476
495
  onClick: () => handleAddSession(dayOfWeek),
477
496
  children: "Th\xEAm bu\u1ED5i"
478
497
  }
479
498
  )
480
499
  ] }),
481
- /* @__PURE__ */ jsx8(Divider, { my: "sm" }),
500
+ /* @__PURE__ */ jsx9(Divider, { my: "sm" }),
482
501
  (_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
483
502
  const globalIndex = value.findIndex(
484
503
  (v) => v === item
485
504
  );
486
- return /* @__PURE__ */ jsxs3(
487
- Group2,
505
+ return /* @__PURE__ */ jsxs4(
506
+ Group3,
488
507
  {
489
508
  mt: "xs",
490
509
  gap: "xs",
491
510
  align: "flex-end",
492
511
  children: [
493
- /* @__PURE__ */ jsx8(
512
+ /* @__PURE__ */ jsx9(
494
513
  NumberInput,
495
514
  {
496
515
  label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
@@ -502,7 +521,7 @@ function MyWeeklySessionSchedulerPicker({
502
521
  )
503
522
  }
504
523
  ),
505
- /* @__PURE__ */ jsx8(
524
+ /* @__PURE__ */ jsx9(
506
525
  NumberInput,
507
526
  {
508
527
  label: "S\u1ED1 ti\u1EBFt",
@@ -514,7 +533,7 @@ function MyWeeklySessionSchedulerPicker({
514
533
  )
515
534
  }
516
535
  ),
517
- /* @__PURE__ */ jsx8(
536
+ /* @__PURE__ */ jsx9(
518
537
  NumberInput,
519
538
  {
520
539
  label: "S\u1ED1 ph\xFAt ",
@@ -523,13 +542,13 @@ function MyWeeklySessionSchedulerPicker({
523
542
  value: item.durationMinutes
524
543
  }
525
544
  ),
526
- /* @__PURE__ */ jsx8(
545
+ /* @__PURE__ */ jsx9(
527
546
  Button5,
528
547
  {
529
548
  variant: "light",
530
549
  color: "red",
531
550
  onClick: () => handleRemove(globalIndex),
532
- leftSection: /* @__PURE__ */ jsx8(IconTrash3, { size: 14 }),
551
+ leftSection: /* @__PURE__ */ jsx9(IconTrash3, { size: 14 }),
533
552
  children: "X\xF3a bu\u1ED5i"
534
553
  }
535
554
  )
@@ -552,6 +571,7 @@ export {
552
571
  MyButtonCreateUpdate,
553
572
  MyButtonModal,
554
573
  MyDataTableSelectOne,
574
+ MyLabelValueRow,
555
575
  MyDayOfWeekPicker,
556
576
  MyTextInput,
557
577
  MyWeeklySessionSchedulerPicker
@@ -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, TextInputProps } from '@mantine/core';
3
+ import { ActionIconProps, ButtonProps, ModalProps, TextProps, GroupProps, TextInputProps } from '@mantine/core';
4
4
  import { ReactNode } from 'react';
5
5
  import { M as MyApiResponse } from '../createBaseApi-2GYRG_xt.mjs';
6
6
  import { AxiosResponse } from 'axios';
@@ -52,6 +52,16 @@ declare function MyDataTableSelectOne<TData extends MRT_RowData>({ columns, quer
52
52
  setIdSelection: (id: string | number | undefined) => void;
53
53
  }): react_jsx_runtime.JSX.Element;
54
54
 
55
+ interface LabelValueRowProps {
56
+ label?: ReactNode;
57
+ value?: ReactNode;
58
+ spacing?: number;
59
+ labelProps?: TextProps;
60
+ valueProps?: TextProps;
61
+ groupProps?: GroupProps;
62
+ }
63
+ declare function MyLabelValueRow({ label, value, labelProps, valueProps, groupProps }: LabelValueRowProps): react_jsx_runtime.JSX.Element;
64
+
55
65
  interface CoreDayOfWeekPickerProps {
56
66
  value?: number[];
57
67
  onChange?: (val: number[]) => void;
@@ -77,4 +87,4 @@ interface WeeklySessionSchedulerProps {
77
87
  }
78
88
  declare function MyWeeklySessionSchedulerPicker({ value, onChange, }: WeeklySessionSchedulerProps): react_jsx_runtime.JSX.Element;
79
89
 
80
- export { type IWeeklySession, MyActionIcon, MyButton, MyButtonCreateUpdate, MyButtonModal, MyDataTableSelectOne, MyDayOfWeekPicker, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
90
+ export { type IWeeklySession, MyActionIcon, MyButton, MyButtonCreateUpdate, MyButtonModal, MyDataTableSelectOne, MyDayOfWeekPicker, MyLabelValueRow, MyTextInput, MyWeeklySessionSchedulerPicker, type WeeklySessionSchedulerProps };
@@ -5,9 +5,10 @@ import {
5
5
  MyButtonModal,
6
6
  MyDataTableSelectOne,
7
7
  MyDayOfWeekPicker,
8
+ MyLabelValueRow,
8
9
  MyTextInput,
9
10
  MyWeeklySessionSchedulerPicker
10
- } from "../chunk-HEW5D3R4.mjs";
11
+ } from "../chunk-WEZ3M7EQ.mjs";
11
12
  import "../chunk-GEYCGM75.mjs";
12
13
  import "../chunk-NWBLJ3W3.mjs";
13
14
  import "../chunk-K6S7R6LU.mjs";
@@ -21,6 +22,7 @@ export {
21
22
  MyButtonModal,
22
23
  MyDataTableSelectOne,
23
24
  MyDayOfWeekPicker,
25
+ MyLabelValueRow,
24
26
  MyTextInput,
25
27
  MyWeeklySessionSchedulerPicker
26
28
  };
@@ -2,10 +2,6 @@ import { I as IBaseEntity } from '../base-BprRafT5.mjs';
2
2
  export { I as IEmailConfig } from '../EmailConfig-DvTXTBt3.mjs';
3
3
  export { I as IAQModule } from '../IAQModule-CCtwv-e0.mjs';
4
4
 
5
- interface IPageContent extends IBaseEntity {
6
- description?: string;
7
- }
8
-
9
5
  interface IFile {
10
6
  fileName?: string | undefined;
11
7
  fileExtension?: string | undefined;
@@ -55,4 +51,8 @@ interface IUser extends IBaseEntity {
55
51
  email?: string;
56
52
  }
57
53
 
54
+ interface IPageContent extends IBaseEntity {
55
+ description?: string;
56
+ }
57
+
58
58
  export { IBaseEntity, type IDocument, type IFile, type IPageContent, type IPagePermission, type IRole, type IUser };
@@ -45,7 +45,7 @@ import {
45
45
  MyButton as MyButton2,
46
46
  MyDataTableSelectOne,
47
47
  MyTextInput as MyTextInput2
48
- } from "../chunk-HEW5D3R4.mjs";
48
+ } from "../chunk-WEZ3M7EQ.mjs";
49
49
  import {
50
50
  MyDataTable,
51
51
  MyFlexColumn,
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.327",
45
+ "version": "0.1.329",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"