@bagelink/vue 0.0.160 → 0.0.164

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/dist/components/Btn.vue.d.ts +2 -2
  2. package/dist/components/Btn.vue.d.ts.map +1 -1
  3. package/dist/components/Comments.vue.d.ts.map +1 -1
  4. package/dist/components/DropDown.vue.d.ts.map +1 -1
  5. package/dist/components/FileUploader.vue.d.ts.map +1 -1
  6. package/dist/components/LangText.vue.d.ts.map +1 -1
  7. package/dist/components/NavBar.vue.d.ts.map +1 -1
  8. package/dist/components/PersonPreview.vue.d.ts +1 -1
  9. package/dist/components/PersonPreview.vue.d.ts.map +1 -1
  10. package/dist/components/PersonPreviewFormkit.vue.d.ts +1 -1
  11. package/dist/components/PersonPreviewFormkit.vue.d.ts.map +1 -1
  12. package/dist/components/RTXEditor.vue.d.ts.map +1 -1
  13. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  14. package/dist/components/charts/BarChart.vue.d.ts.map +1 -1
  15. package/dist/components/dashboard/Lineart.vue.d.ts +1 -1
  16. package/dist/components/dashboard/Lineart.vue.d.ts.map +1 -1
  17. package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
  18. package/dist/components/form/inputs/Checkbox.vue.d.ts.map +1 -1
  19. package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
  20. package/dist/components/formkit/AddressArray.vue.d.ts.map +1 -1
  21. package/dist/components/formkit/BankDetailsArray.vue.d.ts.map +1 -1
  22. package/dist/components/formkit/ContactArrayFormKit.vue.d.ts.map +1 -1
  23. package/dist/components/formkit/FileUploader.vue.d.ts.map +1 -1
  24. package/dist/components/formkit/MiscFields.vue.d.ts.map +1 -1
  25. package/dist/index.cjs +60 -49
  26. package/dist/index.mjs +60 -49
  27. package/dist/style.css +1468 -1402
  28. package/package.json +2 -2
  29. package/src/components/Btn.vue +127 -132
  30. package/src/components/Comments.vue +155 -169
  31. package/src/components/DropDown.vue +73 -77
  32. package/src/components/FileUploader.vue +133 -141
  33. package/src/components/FormKitTable.vue +191 -205
  34. package/src/components/LangText.vue +14 -14
  35. package/src/components/NavBar.vue +264 -261
  36. package/src/components/PersonPreview.vue +123 -148
  37. package/src/components/PersonPreviewFormkit.vue +124 -148
  38. package/src/components/RTXEditor.vue +91 -91
  39. package/src/components/TableSchema.vue +150 -156
  40. package/src/components/charts/BarChart.vue +212 -227
  41. package/src/components/dashboard/Lineart.vue +117 -130
  42. package/src/components/form/inputs/CheckInput.vue +90 -90
  43. package/src/components/form/inputs/Checkbox.vue +38 -41
  44. package/src/components/form/inputs/PasswordInput.vue +56 -63
  45. package/src/components/formkit/AddressArray.vue +150 -173
  46. package/src/components/formkit/BankDetailsArray.vue +175 -198
  47. package/src/components/formkit/ContactArrayFormKit.vue +124 -142
  48. package/src/components/formkit/FileUploader.vue +256 -260
  49. package/src/components/formkit/MiscFields.vue +42 -42
  50. package/src/components/formkit/Toggle.vue +97 -97
  51. package/src/styles/bagel.css +1 -0
  52. package/src/styles/buttons.css +5 -0
  53. package/src/styles/dark.css +46 -0
  54. package/src/styles/fonts/Ploni.css +8 -8
  55. package/src/styles/inputs.css +57 -13
  56. package/src/styles/layout.css +43 -0
  57. package/src/styles/text.css +83 -10
  58. package/src/styles/theme.css +25 -155
  59. package/src/styles/fonts/Ploni/ploni-black.eot +0 -0
  60. package/src/styles/fonts/Ploni/ploni-black.woff +0 -0
  61. package/src/styles/fonts/Ploni/ploni-black.woff2 +0 -0
  62. package/src/styles/fonts/Ploni/ploni-bold.eot +0 -0
  63. package/src/styles/fonts/Ploni/ploni-bold.woff +0 -0
  64. package/src/styles/fonts/Ploni/ploni-bold.woff2 +0 -0
  65. package/src/styles/fonts/Ploni/ploni-demibold.eot +0 -0
  66. package/src/styles/fonts/Ploni/ploni-demibold.woff +0 -0
  67. package/src/styles/fonts/Ploni/ploni-demibold.woff2 +0 -0
  68. package/src/styles/fonts/Ploni/ploni-light.eot +0 -0
  69. package/src/styles/fonts/Ploni/ploni-light.woff +0 -0
  70. package/src/styles/fonts/Ploni/ploni-light.woff2 +0 -0
  71. package/src/styles/fonts/Ploni/ploni-medium.eot +0 -0
  72. package/src/styles/fonts/Ploni/ploni-medium.woff +0 -0
  73. package/src/styles/fonts/Ploni/ploni-medium.woff2 +0 -0
  74. package/src/styles/fonts/Ploni/ploni-regular.eot +0 -0
  75. package/src/styles/fonts/Ploni/ploni-regular.woff +0 -0
  76. package/src/styles/fonts/Ploni/ploni-regular.woff2 +0 -0
  77. package/src/styles/fonts/Ploni/ploni-ultrabold.eot +0 -0
  78. package/src/styles/fonts/Ploni/ploni-ultrabold.woff +0 -0
  79. package/src/styles/fonts/Ploni/ploni-ultrabold.woff2 +0 -0
  80. package/src/styles/fonts/Ploni/ploni-ultralight.eot +0 -0
  81. package/src/styles/fonts/Ploni/ploni-ultralight.woff +0 -0
  82. package/src/styles/fonts/Ploni/ploni-ultralight.woff2 +0 -0
@@ -1,298 +1,284 @@
1
1
  <template>
2
- <div class="table-list-wrap h-100">
3
- <!-- <Transition name="fade"> -->
4
- <div class="table-list">
5
- <table class="infinite-wrapper">
6
- <thead class="row first-row">
7
- <th
8
- class="col"
9
- v-for="field in columns"
10
- :key="field.id"
11
- @click="sort(field.id)"
12
- >
13
- <div class="flex">
14
- {{ field?.label || field.id }}
15
- <div
16
- class="list-arrows"
17
- :class="{ sorted: sortField === field.id }"
18
- >
19
- <MaterialIcon
20
- :class="{ desc: sortDirection === 'DESC' }"
21
- icon="keyboard_arrow_up"
22
- />
23
- </div>
24
- </div>
25
- </th>
26
- </thead>
27
- <tbody
28
- ref="infinite"
29
- class="rows infinite"
30
- :class="{ loading }"
31
- >
32
- <tr
33
- @click="selectElement(row)"
34
- class="row row-item position-relative"
35
- v-for="row in data"
36
- :key="row.id"
37
- >
38
- <td
39
- class="col"
40
- v-for="field in columns"
41
- :key="`${field.id}-${row.id}`"
42
- >
43
- <slot
44
- v-if="slots[field.id]"
45
- :name="field.id"
46
- :row="row"
47
- :field="field"
48
- />
49
- <div v-else>
50
- <div v-if="field.inputType === 'DateInput'">
51
- {{ new Date(row[field.id]).toLocaleDateString() }}
52
- </div>
53
- <div v-else-if="field.inputType === 'CheckInput'">
54
- <MaterialIcon
55
- icon="check"
56
- class="pill green"
57
- v-if="row[field.id]"
58
- />
59
- <MaterialIcon
60
- icon="close"
61
- class="pill"
62
- v-else
63
- />
64
- </div>
65
- <div v-else-if="field.inputType === 'ItemRef' && row[field.id]">
66
- <Btn
67
- v-if="field.refCollection"
68
- color="gray"
69
- class="thin"
70
- @click="
71
- $router.push(
72
- `/${field.refCollection}/${row[field.id].id}`,
73
- )"
74
- >
75
- {{
76
- field.refFields
77
- ?.map((k) => row[field.id][k])
78
- .join(' ') || row[field.id].id
79
- }}
80
- <MaterialIcon icon="arrow_forward" />
81
- </Btn>
82
- <Btn
83
- icon="receipt"
84
- is="a"
85
- thin
86
- v-else-if="field.link"
87
- :href="row[field.id][field.link]"
88
- target="_blank"
89
- >
90
- {{
91
- field.refFields
92
- ?.map((k) => row[field.id][k])
93
- .join(' ') || row[field.id].id
94
- }}
95
- </Btn>
96
- <div
97
- class="pill"
98
- v-else
99
- :class="getPillClass(row, field)"
100
- >
101
- {{
102
- field.refFields
103
- ?.map((k) => row[field.id][k])
104
- .join(' ') || row[field.id].id
105
- }}
106
- </div>
107
- </div>
108
- <div
109
- class="max-col-width"
110
- v-else
111
- >
112
- {{ row[field.id] }}
113
- </div>
114
- </div>
115
- </td>
116
- </tr>
117
- </tbody>
118
- </table>
119
- </div>
120
- <!-- </Transition> -->
121
- </div>
2
+ <div class="table-list-wrap h-100">
3
+ <!-- <Transition name="fade"> -->
4
+ <div class="table-list">
5
+ <table class="infinite-wrapper">
6
+ <thead class="row first-row">
7
+ <th
8
+ class="col"
9
+ v-for="field in columns"
10
+ :key="field.id"
11
+ @click="sort(field.id)"
12
+ >
13
+ <div class="flex">
14
+ {{ field?.label || field.id }}
15
+ <div
16
+ class="list-arrows"
17
+ :class="{ sorted: sortField === field.id }"
18
+ >
19
+ <MaterialIcon
20
+ :class="{ desc: sortDirection === 'DESC' }"
21
+ icon="keyboard_arrow_up"
22
+ />
23
+ </div>
24
+ </div>
25
+ </th>
26
+ </thead>
27
+ <tbody ref="infinite" class="rows infinite" :class="{ loading }">
28
+ <tr
29
+ @click="selectElement(row)"
30
+ class="row row-item position-relative"
31
+ v-for="row in data"
32
+ :key="row.id"
33
+ >
34
+ <td
35
+ class="col"
36
+ v-for="field in columns"
37
+ :key="`${field.id}-${row.id}`"
38
+ >
39
+ <slot
40
+ v-if="slots[field.id]"
41
+ :name="field.id"
42
+ :row="row"
43
+ :field="field"
44
+ />
45
+ <div v-else>
46
+ <div v-if="field.inputType === 'DateInput'">
47
+ {{ new Date(row[field.id]).toLocaleDateString() }}
48
+ </div>
49
+ <div v-else-if="field.inputType === 'CheckInput'">
50
+ <MaterialIcon
51
+ icon="check"
52
+ class="pill green"
53
+ v-if="row[field.id]"
54
+ />
55
+ <MaterialIcon icon="close" class="pill" v-else />
56
+ </div>
57
+ <div v-else-if="field.inputType === 'ItemRef' && row[field.id]">
58
+ <Btn
59
+ v-if="field.refCollection"
60
+ color="gray"
61
+ class="thin"
62
+ @click="
63
+ $router.push(
64
+ `/${field.refCollection}/${row[field.id].id}`
65
+ )
66
+ "
67
+ >
68
+ {{
69
+ field.refFields?.map((k) => row[field.id][k]).join(" ") ||
70
+ row[field.id].id
71
+ }}
72
+ <MaterialIcon icon="arrow_forward" />
73
+ </Btn>
74
+ <Btn
75
+ icon="receipt"
76
+ is="a"
77
+ thin
78
+ v-else-if="field.link"
79
+ :href="row[field.id][field.link]"
80
+ target="_blank"
81
+ >
82
+ {{
83
+ field.refFields?.map((k) => row[field.id][k]).join(" ") ||
84
+ row[field.id].id
85
+ }}
86
+ </Btn>
87
+ <div class="pill" v-else :class="getPillClass(row, field)">
88
+ {{
89
+ field.refFields?.map((k) => row[field.id][k]).join(" ") ||
90
+ row[field.id].id
91
+ }}
92
+ </div>
93
+ </div>
94
+ <div class="max-col-width" v-else>
95
+ {{ row[field.id] }}
96
+ </div>
97
+ </div>
98
+ </td>
99
+ </tr>
100
+ </tbody>
101
+ </table>
102
+ </div>
103
+ <!-- </Transition> -->
104
+ </div>
122
105
  </template>
123
106
 
124
107
  <script setup lang="ts">
125
- import { computed, ref, useSlots } from 'vue';
126
- import { BagelField, Btn, MaterialIcon } from '@bagelink/vue';
108
+ import { computed, ref, useSlots } from "vue";
109
+ import { BagelField, Btn, MaterialIcon } from "@bagelink/vue";
127
110
 
128
111
  const slots = useSlots();
129
112
  const loading = ref(true);
130
113
 
131
114
  const props = defineProps<{
132
- data: any[];
133
- schema?: BagelField[];
115
+ data: any[];
116
+ schema?: BagelField[];
134
117
  }>();
135
118
 
136
- const emit = defineEmits(['selectElement']);
119
+ const emit = defineEmits(["selectElement"]);
137
120
 
138
121
  const selectElement = (data: Record<string, any>) => {
139
- emit('selectElement', data);
122
+ emit("selectElement", data);
140
123
  };
141
124
 
142
125
  // const sortList = () => {};
143
- const sortDirection = ref('');
144
- const sortField = ref('');
126
+ const sortDirection = ref("");
127
+ const sortField = ref("");
145
128
 
146
129
  const sort = (fieldname: string) => {
147
- if (sortField.value === fieldname) {
148
- if (sortDirection.value === 'ASC') sortDirection.value = 'DESC';
149
- else sortField.value = '';
150
- } else {
151
- sortField.value = fieldname;
152
- sortDirection.value = 'ASC';
153
- }
130
+ if (sortField.value === fieldname) {
131
+ if (sortDirection.value === "ASC") sortDirection.value = "DESC";
132
+ else sortField.value = "";
133
+ } else {
134
+ sortField.value = fieldname;
135
+ sortDirection.value = "ASC";
136
+ }
154
137
  };
155
138
 
156
139
  const columns = computed<BagelField[]>(
157
- (): BagelField[] => props.schema ||
158
- Object.keys(props.data[0]).map((k: string) => ({
159
- id: k,
160
- inputType: 'PlainText',
161
- })),
140
+ (): BagelField[] =>
141
+ props.schema ||
142
+ Object.keys(props.data[0]).map((k: string) => ({
143
+ id: k,
144
+ inputType: "PlainText",
145
+ }))
162
146
  );
163
147
 
164
148
  function getPillClass(row: Record<string, any>, field: BagelField) {
165
- return field.refFields?.map((k) => row[field.id][k]).join(' ') || row[field.id].id;
149
+ return (
150
+ field.refFields?.map((k) => row[field.id][k]).join(" ") || row[field.id].id
151
+ );
166
152
  }
167
153
  </script>
168
154
 
169
155
  <style scoped>
170
156
  .Paid {
171
- background-color: var(--bgl-green);
172
- color: white;
157
+ background-color: var(--bgl-green);
158
+ color: white;
173
159
  }
174
160
 
175
161
  .Error {
176
- background-color: var(--bgl-red-tint);
177
- color: var(--bgl-red)
162
+ background-color: var(--bgl-red-tint);
163
+ color: var(--bgl-red);
178
164
  }
179
165
 
180
166
  .list-arrows {
181
- opacity: 0;
167
+ opacity: 0;
182
168
  }
183
169
 
184
170
  .list-arrows .icon-font {
185
- transition: all ease-in-out 0.2s;
171
+ transition: all ease-in-out 0.2s;
186
172
  }
187
173
 
188
174
  .list-arrows.sorted {
189
- opacity: 1;
175
+ opacity: 1;
190
176
  }
191
177
 
192
178
  .list-arrows.sorted .desc {
193
- transform: rotate(180deg);
179
+ transform: rotate(180deg);
194
180
  }
195
181
 
196
182
  table {
197
- border-collapse: separate;
198
- border-spacing: 0 15px;
199
- border-collapse: collapse;
183
+ border-collapse: separate;
184
+ border-spacing: 0 15px;
185
+ border-collapse: collapse;
200
186
  }
201
187
 
202
188
  th {
203
- font-weight: 400;
189
+ font-weight: 400;
204
190
  }
205
191
 
206
192
  .row {
207
- border-bottom: 1px solid var(--border-color);
208
- cursor: pointer;
193
+ border-bottom: 1px solid var(--border-color);
194
+ cursor: pointer;
209
195
  }
210
196
 
211
197
  .row.first-row {
212
- font-size: 0.8rem;
213
- color: var(--bgl-black-tint);
214
- position: sticky;
215
- top: 0;
216
- z-index: 2;
217
- background: var(--bgl-white);
218
- height: 50px;
219
- vertical-align: bottom;
198
+ font-size: 0.8rem;
199
+ color: var(--bgl-black-tint);
200
+ position: sticky;
201
+ top: 0;
202
+ z-index: 2;
203
+ background: var(--bgl-white);
204
+ height: 50px;
205
+ vertical-align: bottom;
220
206
  }
221
207
 
222
208
  .row.first-row::after {
223
- content: '';
224
- border-bottom: 1px solid var(--border-color);
225
- position: absolute;
226
- left: 0;
227
- right: 0;
228
- bottom: -1px;
209
+ content: "";
210
+ border-bottom: 1px solid var(--border-color);
211
+ position: absolute;
212
+ left: 0;
213
+ right: 0;
214
+ bottom: -1px;
229
215
  }
230
216
 
231
217
  .first-row .col {
232
- cursor: pointer;
233
- background: var(--bgl-white);
218
+ cursor: pointer;
219
+ background: var(--bgl-white);
234
220
  }
235
221
 
236
222
  .col {
237
- white-space: nowrap;
238
- padding: 14px;
239
- transition: var(--bgl-transition);
240
- line-height: 1;
241
- padding-left: 1rem;
242
- padding-right: 1rem;
243
- align-items: center;
223
+ white-space: nowrap;
224
+ padding: 14px;
225
+ transition: var(--bgl-transition);
226
+ line-height: 1;
227
+ padding-left: 1rem;
228
+ padding-right: 1rem;
229
+ align-items: center;
244
230
  }
245
231
 
246
- .col>div {
247
- display: flex;
248
- gap: 0.5rem;
232
+ .col > div {
233
+ display: flex;
234
+ gap: 0.5rem;
249
235
  }
250
236
 
251
237
  .max-col-width {
252
- max-width: 30vw;
253
- overflow: hidden;
254
- text-overflow: ellipsis;
238
+ max-width: 30vw;
239
+ overflow: hidden;
240
+ text-overflow: ellipsis;
255
241
  }
256
242
 
257
243
  .col.check .icon-font {
258
- border-radius: 100%;
259
- background: var(--bgl-blue-20);
260
- color: var(--bgl-blue);
261
- width: 20px;
262
- height: 20px;
263
- display: flex;
264
- align-items: center;
265
- justify-content: center;
266
- margin-top: -2px;
244
+ border-radius: 100%;
245
+ background: var(--bgl-blue-20);
246
+ color: var(--bgl-primary);
247
+ width: 20px;
248
+ height: 20px;
249
+ display: flex;
250
+ align-items: center;
251
+ justify-content: center;
252
+ margin-top: -2px;
267
253
  }
268
254
 
269
255
  .rows {
270
- font-size: 0.8125em;
256
+ font-size: 0.8125em;
271
257
  }
272
258
 
273
259
  .table-list {
274
- height: 100%;
275
- position: relative;
276
- padding-left: 0 !important;
277
- padding-right: 0 !important;
278
- overflow: auto;
260
+ height: 100%;
261
+ position: relative;
262
+ padding-left: 0 !important;
263
+ padding-right: 0 !important;
264
+ overflow: auto;
279
265
  }
280
266
 
281
267
  .BagelTable .table-list {
282
- overflow: unset;
268
+ overflow: unset;
283
269
  }
284
270
 
285
271
  .row-item {
286
- height: 50px;
287
- transition: all 200ms ease;
272
+ height: 50px;
273
+ transition: all 200ms ease;
288
274
  }
289
275
 
290
276
  .row-item:hover {
291
- background: var(--bgl-gray-light);
277
+ background: var(--bgl-gray-light);
292
278
  }
293
279
 
294
280
  .infinite-wrapper {
295
- overflow-y: auto;
296
- width: 100%;
281
+ overflow-y: auto;
282
+ width: 100%;
297
283
  }
298
284
  </style>
@@ -1,32 +1,32 @@
1
1
  <template>
2
- <span ref="el" />
3
- {{ input }}
4
- <!-- v-html="i18nT(input)" -->
2
+ <span ref="el" />
3
+ {{ input }}
4
+ <!-- v-html="i18nT(input)" -->
5
5
  </template>
6
6
  <script setup lang="ts">
7
7
  defineProps<{
8
- input: any;
8
+ input: any;
9
9
  }>();
10
10
  </script>
11
11
  <style>
12
12
  .translate {
13
- cursor: pointer;
14
- position: relative;
13
+ cursor: pointer;
14
+ position: relative;
15
15
  }
16
16
 
17
17
  /*
18
18
  .translate:hover {
19
- color: var(--bgl-blue);
19
+ color: var(--bgl-primary);
20
20
  }
21
21
  */
22
22
 
23
23
  .translate-globe {
24
- position: absolute;
25
- top: -5px;
26
- right: -5px;
27
- width: 10px;
28
- height: 10px;
29
- background-size: contain;
30
- /* background-image: url('@/assets/globe.svg'); */
24
+ position: absolute;
25
+ top: -5px;
26
+ right: -5px;
27
+ width: 10px;
28
+ height: 10px;
29
+ background-size: contain;
30
+ /* background-image: url('@/assets/globe.svg'); */
31
31
  }
32
32
  </style>