@bagelink/vue 0.0.25 → 0.0.35

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 (82) hide show
  1. package/package.json +34 -9
  2. package/src/components/Btn.vue +221 -0
  3. package/src/components/Comments.vue +284 -0
  4. package/src/components/ContactArray.vue +142 -0
  5. package/src/components/ContactSubmissions.vue +45 -0
  6. package/src/components/DataPreview.vue +85 -0
  7. package/src/components/DropDown.vue +122 -0
  8. package/src/components/FileUploader.vue +353 -0
  9. package/src/components/FormKitTable.vue +299 -0
  10. package/src/components/FormSchema.vue +79 -0
  11. package/src/components/LangText.vue +32 -0
  12. package/src/components/ListItem.vue +20 -0
  13. package/src/components/ListView.vue +54 -0
  14. package/src/components/MaterialIcon.vue +19 -0
  15. package/src/components/Modal.vue +62 -0
  16. package/src/components/ModalForm.vue +109 -0
  17. package/src/components/NavBar.vue +353 -0
  18. package/src/components/PageTitle.vue +17 -0
  19. package/src/components/PersonPreview.vue +203 -0
  20. package/src/components/PersonPreviewFormkit.vue +205 -0
  21. package/src/components/RTXEditor.vue +151 -0
  22. package/src/components/RouterWrapper.vue +17 -0
  23. package/src/components/TabbedLayout.vue +83 -0
  24. package/src/components/TableSchema.vue +248 -0
  25. package/src/components/TopBar.vue +5 -0
  26. package/src/components/charts/BarChart.vue +316 -0
  27. package/src/components/dashboard/Lineart.vue +197 -0
  28. package/src/components/form/ItemRef.vue +45 -0
  29. package/src/components/form/MaterialIcon.vue +19 -0
  30. package/src/components/form/PlainInputField.vue +79 -0
  31. package/src/components/form/inputs/CheckInput.vue +143 -0
  32. package/src/components/form/inputs/Checkbox.vue +77 -0
  33. package/src/components/form/inputs/ColorPicker.vue +47 -0
  34. package/src/components/form/inputs/CurrencyInput.vue +137 -0
  35. package/src/components/form/inputs/DateInput.vue +55 -0
  36. package/src/components/form/inputs/DatetimeInput.vue +50 -0
  37. package/src/components/form/inputs/DurationInput.vue +55 -0
  38. package/src/components/form/inputs/DynamicLinkField.vue +142 -0
  39. package/src/components/form/inputs/EmailInput.vue +57 -0
  40. package/src/components/form/inputs/FloatInput.vue +52 -0
  41. package/src/components/form/inputs/IntInput.vue +53 -0
  42. package/src/components/form/inputs/JSONInput.vue +55 -0
  43. package/src/components/form/inputs/LinkField.vue +300 -0
  44. package/src/components/form/inputs/Password.vue +91 -0
  45. package/src/components/form/inputs/PasswordInput.vue +92 -0
  46. package/src/components/form/inputs/PlainText.vue +63 -0
  47. package/src/components/form/inputs/ReadOnlyInput.vue +28 -0
  48. package/src/components/form/inputs/RichTextEditor.vue +56 -0
  49. package/src/components/form/inputs/SelectField.vue +258 -0
  50. package/src/components/form/inputs/TableField.vue +319 -0
  51. package/src/components/form/inputs/TextArea.vue +79 -0
  52. package/src/components/form/inputs/TextInput.vue +63 -0
  53. package/src/components/form/inputs/index.ts +16 -0
  54. package/src/components/formkit/AddressArray.vue +240 -0
  55. package/src/components/formkit/BankDetailsArray.vue +265 -0
  56. package/src/components/formkit/ContactArrayFormKit.vue +192 -0
  57. package/src/components/formkit/FileUploader.vue +391 -0
  58. package/src/components/formkit/MiscFields.vue +74 -0
  59. package/src/components/formkit/Toggle.vue +164 -0
  60. package/src/components/formkit/index.ts +29 -0
  61. package/src/components/index.ts +20 -0
  62. package/src/components/whatsapp/form/MsgTemplate.vue +227 -0
  63. package/src/components/whatsapp/form/TextVariableExamples.vue +79 -0
  64. package/src/components/whatsapp/interfaces.ts +58 -0
  65. package/src/index.ts +1 -26
  66. package/src/plugins/bagel.ts +26 -0
  67. package/src/styles/modal.css +90 -0
  68. package/src/types/BagelField.ts +57 -0
  69. package/src/types/BtnOptions.ts +14 -0
  70. package/src/types/Person.ts +51 -0
  71. package/src/types/file.ts +12 -0
  72. package/src/types/index.ts +4 -0
  73. package/src/types/materialIcons.d.ts +3005 -0
  74. package/src/utils/index.ts +62 -0
  75. package/src/utils/modal.ts +101 -0
  76. package/src/utils/objects.ts +81 -0
  77. package/src/utils/strings.ts +36 -0
  78. package/dist/index.cjs +0 -23
  79. package/dist/index.d.cts +0 -12
  80. package/dist/index.d.mts +0 -12
  81. package/dist/index.d.ts +0 -12
  82. package/dist/index.mjs +0 -19
@@ -0,0 +1,90 @@
1
+ .bg-dark {
2
+ position: fixed;
3
+ top: 0;
4
+ right: 0;
5
+ left: 0;
6
+ bottom: 0;
7
+ background-color: rgba(0, 0, 0, 0.7);
8
+ z-index: 999;
9
+ display: flex;
10
+ justify-content: center;
11
+ align-items: center;
12
+ pointer-events: none;
13
+ opacity: 0;
14
+ transition: all ease-in-out 0.3s;
15
+ }
16
+
17
+ .modal {
18
+ width: 96%;
19
+ max-width: 680px;
20
+ transform: scale(0.5);
21
+ opacity: 0;
22
+ transition: all ease-in-out 0.15s;
23
+ overflow: auto;
24
+ max-height: 96vh;
25
+ }
26
+
27
+ .small-modal .modal {
28
+ max-width: 300px;
29
+ text-align: center;
30
+ }
31
+
32
+ .tool-bar {
33
+ margin: -2rem -1rem 1rem;
34
+ display: flex;
35
+ justify-content: space-between;
36
+ position: sticky;
37
+ padding-top: 1rem;
38
+ top: -2rem;
39
+ z-index: 3;
40
+ background: var(--bgl-white);
41
+ }
42
+
43
+ .modal-size {
44
+ cursor: pointer;
45
+ }
46
+
47
+ .is-side .modal {
48
+ inset-inline-end: -600px;
49
+ transform: scale(1);
50
+ opacity: 1;
51
+ position: fixed;
52
+ top: 20px;
53
+ bottom: 20px;
54
+ max-width: 600px;
55
+ width: 90%;
56
+ }
57
+
58
+ .is-active .modal {
59
+ transform: scale(1);
60
+ opacity: 1;
61
+ box-shadow: 6px 6px 20px 20px #0000001c;
62
+ }
63
+
64
+ .is-active.is-side .modal {
65
+ inset-inline-end: 20px;
66
+ }
67
+
68
+ .bg-dark.is-active {
69
+ opacity: 1;
70
+ pointer-events: all;
71
+ }
72
+
73
+ .is-side.bg-dark.is-active {
74
+ opacity: 1;
75
+ }
76
+
77
+ .is-side.is-active .modal {
78
+ pointer-events: all;
79
+ }
80
+
81
+ @media screen and (max-width: 910px) {
82
+ .tool-bar {
83
+ margin: -2rem 0 1rem;
84
+ align-items: center;
85
+ }
86
+
87
+ .is-active.is-side .modal {
88
+ inset-inline-end: 5%;
89
+ }
90
+ }
@@ -0,0 +1,57 @@
1
+ export interface BaseBagelField {
2
+ id: string;
3
+ label?: string;
4
+ placeholder?: string;
5
+ required?: boolean;
6
+ is_array?: boolean;
7
+ can_add?: boolean;
8
+ can_delete?: boolean | (() => boolean);
9
+ allow_array_add?: boolean;
10
+ editMode?: boolean;
11
+ inputType:
12
+ | 'ItemRef'
13
+ | 'SelectField'
14
+ | 'PlainText'
15
+ | 'ImageField'
16
+ | 'ReadOnlyInput'
17
+ | 'DateInput'
18
+ | 'CurrencyInput'
19
+ | 'CheckInput'
20
+ | 'NumberInput'
21
+ | 'LinkField'
22
+ | 'TextArea'
23
+ | 'Password'
24
+ | 'Contact'
25
+ | 'ColorPicker'
26
+ | 'FormRow'
27
+ | 'BagelForm';
28
+ description?: string;
29
+ helpText?: string;
30
+ currency?: string;
31
+ refCollection?: string;
32
+ refFields?: string[];
33
+ file_key?: string;
34
+ fields?: any;
35
+ pattern?: string;
36
+ fieldClass?: string;
37
+ link?: string;
38
+ }
39
+
40
+ export type NestedField = BagelField & {
41
+ // modelValuePropPath?: string;
42
+ skipIndex?: boolean;
43
+ ignoreModelPath?: boolean;
44
+ };
45
+ export type NestedBagelFormFields = NestedField[] & Record<string, NestedField>;
46
+
47
+ export interface NestedBagelForm extends BaseBagelField {
48
+ inputType: 'BagelForm';
49
+ fields: NestedBagelFormFields;
50
+ }
51
+
52
+ export interface SelectBagelField extends BaseBagelField {
53
+ inputType: 'SelectField';
54
+ options: string | { label: string; value: string | number }[];
55
+ }
56
+
57
+ export type BagelField = BaseBagelField | SelectBagelField | NestedBagelForm;
@@ -0,0 +1,14 @@
1
+ import { MaterialIcons } from './materialIcons';
2
+
3
+ export interface BtnOptions {
4
+ onClick?: () => void;
5
+ color?: 'light' | 'red' | 'gray' | 'black' | 'blue';
6
+ disabled?: boolean;
7
+ icon?: MaterialIcons;
8
+ flat?: boolean;
9
+ thin?: boolean;
10
+ type?: 'button' | 'submit' | 'reset';
11
+ loading?: boolean;
12
+ role?: string;
13
+ value?: string;
14
+ }
@@ -0,0 +1,51 @@
1
+ export interface BankDetails {
2
+ bank_name: string;
3
+ branch: string;
4
+ account_number: string;
5
+ bank_account_holder: string;
6
+ iban?: string;
7
+ swift?: string;
8
+ bank_address?: string;
9
+ label?: string;
10
+ }
11
+
12
+ export interface NewPerson {
13
+ first_name?: string;
14
+ last_name?: string;
15
+ email?: string;
16
+ phone?: string;
17
+ gender?: string;
18
+ bank_details?: BankDetails;
19
+ }
20
+
21
+ interface Email {
22
+ id?: string;
23
+ email: string;
24
+ primary: boolean;
25
+ label: string;
26
+ }
27
+
28
+ interface Phone {
29
+ id?: string;
30
+ phone: string;
31
+ primary: boolean;
32
+ label: string;
33
+ }
34
+
35
+ interface Role {
36
+ id: string;
37
+ role: string;
38
+ ref_id: string;
39
+ }
40
+
41
+ export interface Person {
42
+ id: string;
43
+ first_name: string;
44
+ last_name: string;
45
+ email: Email[];
46
+ phone: Phone[];
47
+ date_of_birth: string;
48
+ gender: string;
49
+ roles: Role[];
50
+ bank_details: BankDetails[];
51
+ }
@@ -0,0 +1,12 @@
1
+ export type StorageFile = {
2
+ organization: string[];
3
+ name: string;
4
+ url: string;
5
+ mimetype?: string;
6
+ size?: number;
7
+ extension?: string;
8
+ path?: string;
9
+ id?: string;
10
+ created_at?: Date | string;
11
+ updated_at?: Date | string;
12
+ }
@@ -0,0 +1,4 @@
1
+ export type { BankDetails, NewPerson, Person } from './Person';
2
+ export type { Tables, TableToTypeMapping } from '@bagelink/sdk';
3
+ export type { StorageFile } from './file';
4
+ export type { BagelField } from './BagelField';