@bagelink/vue 0.0.93 → 0.0.98

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 (100) hide show
  1. package/dist/components/Btn.vue.d.ts +31 -31
  2. package/dist/components/DataPreview.vue.d.ts +4 -4
  3. package/dist/components/DropDown.vue.d.ts +1 -1
  4. package/dist/components/FormSchema.vue.d.ts +4 -4
  5. package/dist/components/ListItem.vue.d.ts +2 -2
  6. package/dist/components/ListView.vue.d.ts +3 -3
  7. package/dist/components/MaterialIcon.vue.d.ts +3 -3
  8. package/dist/components/Modal.vue.d.ts +9 -10
  9. package/dist/components/ModalForm.vue.d.ts +17 -18
  10. package/dist/components/NavBar.vue.d.ts +11 -11
  11. package/dist/components/PersonPreviewFormkit.vue.d.ts +2 -2
  12. package/dist/components/RTXEditor.vue.d.ts +5 -5
  13. package/dist/components/TabbedLayout.vue.d.ts +5 -5
  14. package/dist/components/TableSchema.vue.d.ts +3 -3
  15. package/dist/components/charts/BarChart.vue.d.ts +6 -6
  16. package/dist/components/form/MaterialIcon.vue.d.ts +3 -3
  17. package/dist/components/form/inputs/CheckInput.vue.d.ts +6 -6
  18. package/dist/components/form/inputs/Checkbox.vue.d.ts +1 -1
  19. package/dist/components/form/inputs/CurrencyInput.vue.d.ts +8 -8
  20. package/dist/components/form/inputs/DateInput.vue.d.ts +6 -6
  21. package/dist/components/form/inputs/DatetimeInput.vue.d.ts +11 -11
  22. package/dist/components/form/inputs/DurationInput.vue.d.ts +11 -11
  23. package/dist/components/form/inputs/EmailInput.vue.d.ts +11 -11
  24. package/dist/components/form/inputs/FloatInput.vue.d.ts +11 -11
  25. package/dist/components/form/inputs/IntInput.vue.d.ts +11 -11
  26. package/dist/components/form/inputs/JSONInput.vue.d.ts +11 -11
  27. package/dist/components/form/inputs/LinkField.vue.d.ts +13 -13
  28. package/dist/components/form/inputs/Password.vue.d.ts +12 -12
  29. package/dist/components/form/inputs/PasswordInput.vue.d.ts +11 -11
  30. package/dist/components/form/inputs/ReadOnlyInput.vue.d.ts +3 -3
  31. package/dist/components/form/inputs/RichTextEditor.vue.d.ts +11 -11
  32. package/dist/components/form/inputs/SelectField.vue.d.ts +7 -7
  33. package/dist/components/form/inputs/TableField.vue.d.ts +5 -5
  34. package/dist/components/form/inputs/TextInput.vue.d.ts +22 -22
  35. package/dist/components/formkit/index.d.ts +2 -2
  36. package/dist/components/index.d.ts +1 -0
  37. package/dist/index.cjs +318 -304
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.mjs +318 -304
  40. package/dist/plugins/modal.d.ts +3 -1
  41. package/dist/style.css +246 -244
  42. package/dist/types/BtnOptions.d.ts +1 -1
  43. package/dist/types/index.d.ts +2 -1
  44. package/dist/types/materialIcons.d.ts +1 -0
  45. package/dist/utils/index.d.ts +3 -2
  46. package/dist/utils/objects.d.ts +1 -1
  47. package/package.json +45 -18
  48. package/src/components/Btn.vue +4 -3
  49. package/src/components/Comments.vue +2 -2
  50. package/src/components/ContactArray.vue +2 -2
  51. package/src/components/ContactSubmissions.vue +2 -2
  52. package/src/components/DataPreview.vue +1 -1
  53. package/src/components/DropDown.vue +3 -2
  54. package/src/components/FileUploader.vue +1 -1
  55. package/src/components/FormKitTable.vue +1 -2
  56. package/src/components/FormSchema.vue +2 -2
  57. package/src/components/ListView.vue +1 -2
  58. package/src/components/MaterialIcon.vue +1 -1
  59. package/src/components/Modal.vue +2 -2
  60. package/src/components/ModalForm.vue +2 -3
  61. package/src/components/NavBar.vue +2 -2
  62. package/src/components/PersonPreview.vue +3 -4
  63. package/src/components/PersonPreviewFormkit.vue +3 -4
  64. package/src/components/RouterWrapper.vue +0 -2
  65. package/src/components/TableSchema.vue +1 -2
  66. package/src/components/form/ItemRef.vue +5 -6
  67. package/src/components/form/MaterialIcon.vue +1 -1
  68. package/src/components/form/PlainInputField.vue +2 -2
  69. package/src/components/form/inputs/CheckInput.vue +1 -1
  70. package/src/components/form/inputs/Checkbox.vue +1 -1
  71. package/src/components/form/inputs/ColorPicker.vue +1 -1
  72. package/src/components/form/inputs/CurrencyInput.vue +1 -1
  73. package/src/components/form/inputs/DateInput.vue +1 -1
  74. package/src/components/form/inputs/DynamicLinkField.vue +2 -1
  75. package/src/components/form/inputs/LinkField.vue +1 -1
  76. package/src/components/form/inputs/Password.vue +2 -3
  77. package/src/components/form/inputs/PlainText.vue +1 -1
  78. package/src/components/form/inputs/ReadOnlyInput.vue +1 -1
  79. package/src/components/form/inputs/SelectField.vue +2 -2
  80. package/src/components/form/inputs/TableField.vue +3 -5
  81. package/src/components/form/inputs/TextArea.vue +1 -1
  82. package/src/components/form/inputs/TextInput.vue +1 -1
  83. package/src/components/formkit/AddressArray.vue +3 -3
  84. package/src/components/formkit/BankDetailsArray.vue +2 -3
  85. package/src/components/formkit/ContactArrayFormKit.vue +3 -3
  86. package/src/components/formkit/FileUploader.vue +2 -2
  87. package/src/components/formkit/MiscFields.vue +1 -1
  88. package/src/components/formkit/index.ts +3 -3
  89. package/src/components/index.ts +1 -0
  90. package/src/components/whatsapp/form/MsgTemplate.vue +1 -2
  91. package/src/components/whatsapp/form/TextVariableExamples.vue +1 -1
  92. package/src/index.ts +1 -0
  93. package/src/plugins/modal.ts +3 -3
  94. package/src/types/BtnOptions.ts +1 -1
  95. package/src/types/index.ts +2 -1
  96. package/src/utils/index.ts +3 -1
  97. package/src/utils/objects.ts +1 -1
  98. package/tsconfig.json +43 -28
  99. package/vite.config.ts +1 -1
  100. /package/src/types/{materialIcons.d.ts → materialIcons.ts} +0 -0
@@ -26,7 +26,7 @@
26
26
  </template>
27
27
 
28
28
  <script setup lang="ts">
29
- import { BagelField } from '#/types';
29
+ import { BagelField } from '@bagelink/vue';
30
30
 
31
31
  const emits = defineEmits(['update:modelValue']);
32
32
  withDefaults(
@@ -22,7 +22,7 @@
22
22
 
23
23
  <script setup lang="ts">
24
24
  import { ref } from 'vue';
25
- import type { BagelField } from '#/types/BagelField';
25
+ import type { BagelField } from '@bagelink/vue';
26
26
 
27
27
  const props = withDefaults(
28
28
  defineProps<{
@@ -41,7 +41,8 @@
41
41
 
42
42
  <script lang="ts" setup>
43
43
  import { onMounted, ref } from 'vue';
44
- import { formatString } from '#/utils/strings';
44
+ import { formatString } from '@bagelink/vue';
45
+
45
46
  // TODO: remove this Nati ?
46
47
 
47
48
  const props = withDefaults(
@@ -60,7 +60,7 @@
60
60
 
61
61
  <script lang="ts" setup>
62
62
  import { onMounted, ref } from 'vue';
63
- import { formatString } from '#/utils/strings';
63
+ import { formatString } from '@bagelink/vue';
64
64
 
65
65
  const props = withDefaults(
66
66
  defineProps<{
@@ -19,7 +19,7 @@
19
19
  >
20
20
  </label>
21
21
  <MaterialIcon
22
- @click="showPassword()"
22
+ @click="showPassword"
23
23
  :icon="seePassword ? 'visibility' : 'visibility_off'"
24
24
  />
25
25
  </div>
@@ -27,8 +27,7 @@
27
27
 
28
28
  <script setup lang="ts">
29
29
  import { ref, watch, computed } from 'vue';
30
- import { BagelField } from '#/types/BagelField';
31
- import { MaterialIcon } from '#/components';
30
+ import { MaterialIcon, BagelField } from '@bagelink/vue';
32
31
 
33
32
  const emits = defineEmits(['update:modelValue']);
34
33
  let seePassword = $ref<boolean>(false);
@@ -23,7 +23,7 @@
23
23
 
24
24
  <script setup lang="ts">
25
25
  import { watch } from 'vue';
26
- import { BagelField } from '#/types/BagelField';
26
+ import { BagelField } from '@bagelink/vue';
27
27
 
28
28
  const emit = defineEmits(['update:modelValue']);
29
29
  const props = withDefaults(
@@ -12,7 +12,7 @@
12
12
  </template>
13
13
 
14
14
  <script setup lang="ts">
15
- import { BagelField } from '#/types/BagelField';
15
+ import { BagelField } from '@bagelink/vue';
16
16
 
17
17
  defineProps<{
18
18
  field: BagelField;
@@ -49,8 +49,8 @@ import {
49
49
  onMounted, onUnmounted, ref, computed,
50
50
  watch,
51
51
  } from 'vue';
52
- import { type SelectBagelField } from '#/types/BagelField';
53
- import LangText from '#/components/LangText.vue';
52
+ import { LangText } from '@bagelink/vue';
53
+ import { type SelectBagelField } from '@bagelink/vue';
54
54
 
55
55
  const selectEl = ref<HTMLElement>();
56
56
  const dropdown = ref<HTMLElement>();
@@ -78,12 +78,10 @@
78
78
  import { VueDraggableNext } from 'vue-draggable-next';
79
79
  // import { EntityMeta } from 'bagel-sdk/types';
80
80
  import { onMounted, ref } from 'vue';
81
- import { Btn } from '#/components';
82
- // import { bagelApp as api } from '../../../index';
81
+ import { Btn, formatString } from '@bagelink/vue';
82
+
83
83
  import MaterialIcon from '../MaterialIcon.vue';
84
- import { formatString } from '#/utils/strings';
85
- // import TransitionGroupPop from '../../transitions/TransitionGroupPop.vue';
86
- // import { formatString } from '../../../composables';
84
+
87
85
  // import { ButtonIcon } from 'src/components/buttons'
88
86
  let bagel: any;
89
87
  let api: any;
@@ -24,7 +24,7 @@
24
24
  </template>
25
25
 
26
26
  <script setup lang="ts">
27
- import LangText from '#/components/LangText.vue';
27
+ import { LangText } from '@bagelink/vue';
28
28
 
29
29
  const emits = defineEmits(['update:modelValue']);
30
30
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  <script setup lang="ts">
24
24
  import { watch } from 'vue';
25
- import { debounce } from '#/utils';
25
+ import { debounce } from '@bagelink/vue';
26
26
 
27
27
  const emit = defineEmits(['update:modelValue', 'debounce']);
28
28
  const props = withDefaults(
@@ -86,9 +86,9 @@
86
86
 
87
87
  <script setup lang="ts">
88
88
  import { watch } from 'vue';
89
- // import type { BagelField } from '#/types/BagelField';
90
- import { useBagel } from '#';
91
- import { Btn } from '#/components';
89
+ // import type { BagelField } from '@bagelink/vue';
90
+
91
+ import { Btn, useBagel } from '@bagelink/vue';
92
92
  import Checkbox from '../form/inputs/Checkbox.vue';
93
93
 
94
94
  const bagel = useBagel();
@@ -111,10 +111,9 @@
111
111
 
112
112
  <script setup lang="ts">
113
113
  import { watch } from 'vue';
114
- // import type { BagelField } from '#/types/BagelField';
114
+ // import type { BagelField } from '@bagelink/vue';
115
115
 
116
- import { useBagel } from '#';
117
- import { Btn } from '#/components';
116
+ import { Btn, useBagel } from '@bagelink/vue';
118
117
  import Checkbox from '../form/inputs/Checkbox.vue';
119
118
 
120
119
  const bagel = useBagel();
@@ -76,9 +76,9 @@
76
76
 
77
77
  <script setup lang="ts">
78
78
  import { watch } from 'vue';
79
- // import type { BagelField } from '#/types/BagelField';
80
- import { useBagel } from '#';
81
- import { Btn } from '#/components';
79
+ // import type { BagelField } from '@bagelink/vue';
80
+
81
+ import { Btn, useBagel } from '@bagelink/vue';
82
82
  import Checkbox from '../form/inputs/Checkbox.vue';
83
83
 
84
84
  const bagel = useBagel();
@@ -92,8 +92,8 @@ interface UploadFile {
92
92
  }
93
93
 
94
94
  import { onMounted, onUnmounted } from 'vue';
95
- import { useBagel } from '#';
96
- import { MaterialIcon, Btn } from '#/components';
95
+
96
+ import { MaterialIcon, Btn, useBagel } from '@bagelink/vue';
97
97
 
98
98
  const bagel = useBagel();
99
99
 
@@ -17,7 +17,7 @@
17
17
  </template>
18
18
 
19
19
  <script lang="ts" setup>
20
- import { Btn } from '#/components';
20
+ import { Btn } from '@bagelink/vue';
21
21
 
22
22
  const props = defineProps<{
23
23
  context: Record<string, any>;
@@ -1,7 +1,7 @@
1
1
  import { createInput } from '@formkit/vue';
2
2
  import ContactArrayFormKit from './ContactArrayFormKit.vue';
3
3
  import AddressArray from './AddressArray.vue';
4
- import BankDetailsArray from './BankDetailsArray.vue';
4
+ import * as B from './BankDetailsArray.vue';
5
5
  import MiscFieldsBtns from './MiscFields.vue';
6
6
  import Toggle from './Toggle.vue';
7
7
  import FileUploader from './FileUploader.vue';
@@ -10,7 +10,7 @@ import TextVariableExamples from '../whatsapp/form/TextVariableExamples.vue';
10
10
 
11
11
  const ContactArray = createInput(ContactArrayFormKit);
12
12
  const Address = createInput(AddressArray);
13
- const BankDetails = createInput(BankDetailsArray);
13
+ const BankDetailsArray = createInput(B);
14
14
  const MiscFields = createInput(MiscFieldsBtns);
15
15
  const ToggleSwitch = createInput(Toggle);
16
16
  const FileUpload = createInput(FileUploader);
@@ -22,7 +22,7 @@ export {
22
22
  ContactArray,
23
23
  PersonPreview,
24
24
  Address,
25
- BankDetails,
25
+ BankDetailsArray,
26
26
  MiscFields,
27
27
  ToggleSwitch,
28
28
  FileUpload,
@@ -1,3 +1,4 @@
1
+ export * as LangText from './LangText.vue';
1
2
  export * as RTXEditor from './RTXEditor.vue';
2
3
  export * as MaterialIcon from './MaterialIcon.vue';
3
4
  export * as NavBar from './NavBar.vue';
@@ -37,7 +37,7 @@ import { onMounted } from 'vue';
37
37
 
38
38
  import type { FormKitSchemaDefinition } from '@formkit/core';
39
39
  import type { RouteLocationNormalizedLoaded, Router } from 'vue-router';
40
- import { useBagel } from '#';
40
+ import { useBagel, PageTitle, FormSchema } from '@bagelink/vue';
41
41
  import {
42
42
  BodyComponent,
43
43
  HeaderComponent,
@@ -45,7 +45,6 @@ import {
45
45
  ServerTemplateData,
46
46
  FooterComponent,
47
47
  } from '../interfaces';
48
- import { PageTitle, FormSchema } from '#/components';
49
48
 
50
49
  const props = defineProps<{
51
50
  whatsappTemplateSchema: () => FormKitSchemaDefinition;
@@ -13,7 +13,7 @@
13
13
  <script setup lang="ts">
14
14
  import { onMounted, watch } from 'vue';
15
15
  import { FormKitNode } from '@formkit/core';
16
- import { TextInput } from '#/components';
16
+ import { TextInput } from '@bagelink/vue';
17
17
 
18
18
  const props = defineProps({
19
19
  context: Object,
package/src/index.ts CHANGED
@@ -6,3 +6,4 @@ export * from './utils';
6
6
  export * from './components';
7
7
  export * from './components/formkit';
8
8
  export * from './components/form/inputs';
9
+ export * from './types';
@@ -2,8 +2,8 @@ import {
2
2
  h, InjectionKey, ref, inject, defineComponent,
3
3
  } from 'vue';
4
4
  import type { Plugin } from 'vue';
5
- import { Modal, ModalForm } from '../components';
6
- import type { BtnOptions } from '#/types/BtnOptions';
5
+ import type { BtnOptions } from '@bagelink/vue';
6
+ import { Modal, ModalForm } from '@bagelink/vue';
7
7
 
8
8
  interface ModalOptions {
9
9
  title?: string;
@@ -34,7 +34,7 @@ interface ModalApi {
34
34
  // modalOptions: Ref<ModalOptions | ModalFormOptions>;
35
35
  }
36
36
 
37
- const ModalSymbol: InjectionKey<ModalApi> = Symbol('modal');
37
+ export const ModalSymbol: InjectionKey<ModalApi> = Symbol('modal');
38
38
 
39
39
  export const useModal = (): ModalApi => {
40
40
  const modalApi = inject(ModalSymbol);
@@ -1,4 +1,4 @@
1
- import { MaterialIcons } from './materialIcons';
1
+ import type { MaterialIcons } from './materialIcons';
2
2
 
3
3
  export interface BtnOptions {
4
4
  onClick?: () => void;
@@ -1,4 +1,5 @@
1
+ export type { MaterialIcons } from './materialIcons';
1
2
  export type { BankDetails, NewPerson, Person } from './Person';
2
3
  export type { Tables, TableToTypeMapping } from '@bagelink/sdk';
3
4
  export type { StorageFile } from './file';
4
- export type { BagelField } from './BagelField';
5
+ export * from './BagelField';
@@ -1,6 +1,6 @@
1
1
  import { inject } from 'vue';
2
2
 
3
- import type { BagelField } from '#/types/BagelField';
3
+ import type { BagelField } from '@bagelink/vue';
4
4
 
5
5
  let timeout: any;
6
6
  export const debounce = (fn: () => void, delay = 500) => {
@@ -56,3 +56,5 @@ export const parseLocale = (str: string, $t = (_str: string) => _str) => {
56
56
  if (!w) return str;
57
57
  return $t(w);
58
58
  };
59
+
60
+ export { formatString } from './strings';
@@ -1,4 +1,4 @@
1
- import { BagelField } from '#/types';
1
+ import { BagelField } from '@bagelink/vue';
2
2
 
3
3
  function returnTypes(bagelField?: BagelField) {
4
4
  if (bagelField?.is_array) return [];
package/tsconfig.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "baseUrl": "./",
3
+ "target": "ESNext",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "Node",
7
+ "strict": true,
8
+ "jsx": "preserve",
9
+ "resolveJsonModule": true,
10
+ "isolatedModules": true,
11
+ "esModuleInterop": true,
12
+ "skipLibCheck": true,
4
13
  "lib": [
5
14
  "ESNext",
6
15
  "DOM"
@@ -9,36 +18,42 @@
9
18
  "@vue-macros/reactivity-transform/macros-global"
10
19
  ],
11
20
  "paths": {
12
- "#": [
21
+ "@bagelink/vue": [
13
22
  "./src/index.ts"
14
23
  ],
15
- "#/*": [
16
- "./src/*"
17
- ],
18
- "#/components": [
19
- "./src/components/index.ts"
20
- ],
21
- "#/components/*": [
22
- "./src/components/*"
23
- ],
24
- "#/types": [
25
- "./src/types/index.ts"
26
- ],
27
- "#/types/*": [
28
- "./src/types/*"
29
- ],
30
- "#/utils": [
31
- "./src/utils/index.ts"
32
- ],
33
- "#/utils/*": [
34
- "./src/utils/*"
35
- ],
36
- "#/plugins": [
37
- "./src/plugins/index.ts"
38
- ],
39
- "#/plugins/*": [
40
- "./src/plugins/*"
24
+ "@bagelink/vue/*": [
25
+ "./vue/src/*"
41
26
  ],
27
+ // "#": [
28
+ // "./src/index.ts"
29
+ // ],
30
+ // "#/*": [
31
+ // "./src/*"
32
+ // ],
33
+ // "#/components": [
34
+ // "./src/components/index.ts"
35
+ // ],
36
+ // "#/components/*": [
37
+ // "./src/components/*"
38
+ // ],
39
+ // "#/types": [
40
+ // "./src/types/index.ts"
41
+ // ],
42
+ // "#/types/*": [
43
+ // "./src/types/*"
44
+ // ],
45
+ // "#/utils": [
46
+ // "./src/utils/index.ts"
47
+ // ],
48
+ // "#/utils/*": [
49
+ // "./src/utils/*"
50
+ // ],
51
+ // "#/plugins": [
52
+ // "./src/plugins/index.ts"
53
+ // ],
54
+ // "#/plugins/*": [
55
+ // "./src/plugins/*"
56
+ // ],
42
57
  },
43
58
  },
44
59
  "include": [
package/vite.config.ts CHANGED
@@ -13,7 +13,7 @@ export default defineConfig(() => ({
13
13
  })],
14
14
  resolve: {
15
15
  alias: {
16
- '#': fileURLToPath(new URL('./src/', import.meta.url)),
16
+ '@bagelink/vue': fileURLToPath(new URL('./src/', import.meta.url)),
17
17
  },
18
18
  },
19
19
  build: {