@bagelink/vue 1.0.38 → 1.0.43

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.
package/dist/style.css CHANGED
@@ -1021,22 +1021,22 @@ display: block;
1021
1021
  text-align: center;
1022
1022
  }
1023
1023
 
1024
- .table-list-wrap[data-v-43f28baa] {
1024
+ .table-list-wrap[data-v-30ec790f] {
1025
1025
  min-height: 150px;
1026
1026
  }
1027
- .selected[data-v-43f28baa] {
1027
+ .selected[data-v-30ec790f] {
1028
1028
  background: var(--bgl-primary-tint);
1029
1029
  }
1030
- tbody tr.selected[data-v-43f28baa]:hover {
1030
+ tbody tr.selected[data-v-30ec790f]:hover {
1031
1031
  background: var(--bgl-primary-light);
1032
1032
  }
1033
- .loading-table[data-v-43f28baa] {
1033
+ .loading-table[data-v-30ec790f] {
1034
1034
  position: relative;
1035
1035
  }
1036
- .inset[data-v-43f28baa] {
1036
+ .inset[data-v-30ec790f] {
1037
1037
  inset: 0;
1038
1038
  }
1039
- .loading-table-animation[data-v-43f28baa] {
1039
+ .loading-table-animation[data-v-30ec790f] {
1040
1040
  --size: 60px;
1041
1041
  top: 30vh;
1042
1042
  inset-inline-start: calc(50% - var(--size));
@@ -1044,9 +1044,9 @@ tbody tr.selected[data-v-43f28baa]:hover {
1044
1044
  border-top: 4px solid var(--bgl-primary);
1045
1045
  width: var(--size);
1046
1046
  height: var(--size);
1047
- animation: loading-table-43f28baa 1s linear infinite;
1047
+ animation: loading-table-30ec790f 1s linear infinite;
1048
1048
  }
1049
- @keyframes loading-table-43f28baa {
1049
+ @keyframes loading-table-30ec790f {
1050
1050
  0% {
1051
1051
  transform: translate(-50%, -50%) rotate(0deg);
1052
1052
  }
@@ -1054,55 +1054,55 @@ tbody tr.selected[data-v-43f28baa]:hover {
1054
1054
  transform: translate(-50%, -50%) rotate(360deg);
1055
1055
  }
1056
1056
  }
1057
- .list-arrows[data-v-43f28baa] {
1057
+ .list-arrows[data-v-30ec790f] {
1058
1058
  opacity: 0;
1059
1059
  }
1060
- .list-arrows .bgl_icon-font[data-v-43f28baa] {
1060
+ .list-arrows .bgl_icon-font[data-v-30ec790f] {
1061
1061
  transition: all ease-in-out 0.2s;
1062
1062
  }
1063
- .list-arrows.sorted[data-v-43f28baa] {
1063
+ .list-arrows.sorted[data-v-30ec790f] {
1064
1064
  opacity: 1;
1065
1065
  }
1066
- .col img[data-v-43f28baa] {
1066
+ .col img[data-v-30ec790f] {
1067
1067
  height: 35px;
1068
1068
  margin-top: -14px;
1069
1069
  margin-bottom: -14px;
1070
1070
  border-radius: 5px;
1071
1071
  object-fit: cover;
1072
1072
  }
1073
- .col[data-v-43f28baa]:has(img) {
1073
+ .col[data-v-30ec790f]:has(img) {
1074
1074
  padding-inline-end: 0.5rem;
1075
1075
  }
1076
- .list-arrows.sorted .desc[data-v-43f28baa] {
1076
+ .list-arrows.sorted .desc[data-v-30ec790f] {
1077
1077
  transform: rotate(180deg);
1078
1078
  display: inline-block;
1079
1079
  }
1080
- table[data-v-43f28baa] {
1080
+ table[data-v-30ec790f] {
1081
1081
  border-spacing: 0 15px;
1082
1082
  border-collapse: collapse;
1083
1083
  width: 100%;
1084
1084
  }
1085
- th[data-v-43f28baa] {
1085
+ th[data-v-30ec790f] {
1086
1086
  font-size: 0.8rem;
1087
1087
  color: var(--bgl-black-tint);
1088
1088
  position: sticky;
1089
1089
  top: 0;
1090
1090
  z-index: 2;
1091
1091
  background: var(--bgl-box-bg);
1092
- height: var(--31aad8d2);
1092
+ height: var(--03db8ce0);
1093
1093
  vertical-align: bottom;
1094
1094
  font-weight: 400;
1095
1095
  text-align: start;
1096
1096
  }
1097
- .embedded-field[data-v-43f28baa] {
1097
+ .embedded-field[data-v-30ec790f] {
1098
1098
  margin-bottom: -0.2rem;
1099
1099
  margin-top: -0.2rem;
1100
1100
  }
1101
- .row[data-v-43f28baa] {
1101
+ .row[data-v-30ec790f] {
1102
1102
  border-bottom: 1px solid var(--border-color);
1103
1103
  cursor: pointer;
1104
1104
  }
1105
- .row.first-row[data-v-43f28baa] {
1105
+ .row.first-row[data-v-30ec790f] {
1106
1106
  font-size: 0.8rem;
1107
1107
  color: var(--bgl-black-tint);
1108
1108
  position: sticky;
@@ -1111,7 +1111,7 @@ th[data-v-43f28baa] {
1111
1111
  background: var(--bgl-box-bg);
1112
1112
  vertical-align: bottom;
1113
1113
  }
1114
- .row.first-row[data-v-43f28baa]::after {
1114
+ .row.first-row[data-v-30ec790f]::after {
1115
1115
  content: '';
1116
1116
  border-bottom: 1px solid var(--border-color);
1117
1117
  position: absolute;
@@ -1119,11 +1119,11 @@ th[data-v-43f28baa] {
1119
1119
  right: 0;
1120
1120
  bottom: -1px;
1121
1121
  }
1122
- .first-row .col[data-v-43f28baa] {
1122
+ .first-row .col[data-v-30ec790f] {
1123
1123
  cursor: pointer;
1124
1124
  background: var(--bgl-box-bg);
1125
1125
  }
1126
- .col[data-v-43f28baa] {
1126
+ .col[data-v-30ec790f] {
1127
1127
  white-space: nowrap;
1128
1128
  padding: 0.75rem 1rem;
1129
1129
  transition: var(--bgl-transition);
@@ -1133,19 +1133,19 @@ th[data-v-43f28baa] {
1133
1133
  overflow: hidden;
1134
1134
  max-width: 30vw;
1135
1135
  }
1136
- .col[data-v-43f28baa]:has(.bagel-input) {
1136
+ .col[data-v-30ec790f]:has(.bagel-input) {
1137
1137
  padding: 0rem 0.25rem;
1138
1138
  }
1139
- .col > div[data-v-43f28baa] {
1139
+ .col > div[data-v-30ec790f] {
1140
1140
  display: flex;
1141
1141
  gap: 0.5rem;
1142
1142
  }
1143
- .max-col-width[data-v-43f28baa] {
1143
+ .max-col-width[data-v-30ec790f] {
1144
1144
  max-width: 30vw;
1145
1145
  overflow: hidden;
1146
1146
  text-overflow: ellipsis;
1147
1147
  }
1148
- .col.check .bgl_icon-font[data-v-43f28baa] {
1148
+ .col.check .bgl_icon-font[data-v-30ec790f] {
1149
1149
  border-radius: 100%;
1150
1150
  background: var(--bgl-blue-20);
1151
1151
  color: var(--bgl-primary);
@@ -1156,35 +1156,35 @@ th[data-v-43f28baa] {
1156
1156
  justify-content: center;
1157
1157
  margin-top: -2px;
1158
1158
  }
1159
- .rows[data-v-43f28baa] {
1159
+ .rows[data-v-30ec790f] {
1160
1160
  font-size: 0.88em;
1161
1161
  }
1162
- .table-list[data-v-43f28baa] {
1162
+ .table-list[data-v-30ec790f] {
1163
1163
  height: 100%;
1164
1164
  position: relative;
1165
1165
  padding-left: 0 !important;
1166
1166
  padding-right: 0 !important;
1167
1167
  overflow: auto;
1168
1168
  }
1169
- .BagelTable .table-list[data-v-43f28baa] {
1169
+ .BagelTable .table-list[data-v-30ec790f] {
1170
1170
  overflow: unset;
1171
1171
  }
1172
- .row-item[data-v-43f28baa] {
1173
- height: var(--31aad8d2);
1172
+ .row-item[data-v-30ec790f] {
1173
+ height: var(--03db8ce0);
1174
1174
  transition: all 200ms ease;
1175
1175
  }
1176
- .row-item[data-v-43f28baa]:hover {
1176
+ .row-item[data-v-30ec790f]:hover {
1177
1177
  background: var(--bgl-gray-light);
1178
1178
  }
1179
- .row-item input[type='checkbox'][data-v-43f28baa] {
1179
+ .row-item input[type='checkbox'][data-v-30ec790f] {
1180
1180
  margin-top: 0.45rem !important;
1181
1181
  accent-color: var(--bgl-accent-color);
1182
1182
  }
1183
- .infinite-wrapper[data-v-43f28baa] {
1183
+ .infinite-wrapper[data-v-30ec790f] {
1184
1184
  overflow-y: auto;
1185
1185
  width: 100%;
1186
1186
  }
1187
- input[type='checkbox'][data-v-43f28baa] {
1187
+ input[type='checkbox'][data-v-30ec790f] {
1188
1188
  margin-top: 0.3rem !important;
1189
1189
  accent-color: var(--bgl-accent-color);
1190
1190
  transform: scale(1.2);
@@ -1196,7 +1196,7 @@ input[type='checkbox'][data-v-43f28baa] {
1196
1196
  height: 0.85rem;
1197
1197
  width: 0.85rem;
1198
1198
  }
1199
- input[type='checkbox'][data-v-43f28baa]::before {
1199
+ input[type='checkbox'][data-v-30ec790f]::before {
1200
1200
  content: '';
1201
1201
  height: 0.85rem;
1202
1202
  width: 0.85rem;
@@ -1209,18 +1209,18 @@ input[type='checkbox'][data-v-43f28baa]::before {
1209
1209
  transform: scale(1);
1210
1210
  position: absolute;
1211
1211
  }
1212
- input[type='checkbox'][data-v-43f28baa]:hover::before {
1212
+ input[type='checkbox'][data-v-30ec790f]:hover::before {
1213
1213
  opacity: 0.2;
1214
1214
  transform: scale(2);
1215
1215
  }
1216
- [lang='he'] [dir='ltr'][data-v-43f28baa] {
1216
+ [lang='he'] [dir='ltr'][data-v-30ec790f] {
1217
1217
  text-align: right;
1218
1218
  }
1219
- th input[type='checkbox'][data-v-43f28baa] {
1219
+ th input[type='checkbox'][data-v-30ec790f] {
1220
1220
  transform: translateY(0.2rem) scale(1.2);
1221
1221
  accent-color: var(--bgl-accent-color);
1222
1222
  }
1223
- th[data-v-43f28baa]::after {
1223
+ th[data-v-30ec790f]::after {
1224
1224
  content: '';
1225
1225
  border-bottom: 1px solid var(--border-color);
1226
1226
  position: absolute;
@@ -1228,24 +1228,24 @@ th[data-v-43f28baa]::after {
1228
1228
  right: 0;
1229
1229
  bottom: -1px;
1230
1230
  }
1231
- tr[data-v-43f28baa] {
1231
+ tr[data-v-30ec790f] {
1232
1232
  border-bottom: 1px solid var(--border-color);
1233
1233
  cursor: pointer;
1234
1234
  align-items: center;
1235
1235
  }
1236
- td[data-v-43f28baa],
1237
- th[data-v-43f28baa] {
1236
+ td[data-v-30ec790f],
1237
+ th[data-v-30ec790f] {
1238
1238
  white-space: nowrap;
1239
1239
  padding: 0.75rem 0.65rem;
1240
1240
  transition: var(--bgl-transition);
1241
1241
  line-height: 1;
1242
1242
  }
1243
- tbody tr[data-v-43f28baa] {
1243
+ tbody tr[data-v-30ec790f] {
1244
1244
  font-size: 0.88em;
1245
- height: var(--31aad8d2);
1245
+ height: var(--03db8ce0);
1246
1246
  transition: all 200ms ease;
1247
1247
  }
1248
- tbody tr[data-v-43f28baa]:hover {
1248
+ tbody tr[data-v-30ec790f]:hover {
1249
1249
  background: var(--bgl-gray-light);
1250
1250
  }
1251
1251
 
@@ -3079,16 +3079,16 @@ to {
3079
3079
  }
3080
3080
 
3081
3081
  /* Bar Theme */
3082
- .lds-bar[data-v-2e27b3c1] {
3082
+ .lds-bar[data-v-221a3053] {
3083
3083
  height: 4px;
3084
3084
  width: 100%;
3085
3085
  max-width: 130px;
3086
3086
  --c: no-repeat linear-gradient(currentColor 0 0);
3087
3087
  background: var(--c), var(--c), #ddd;
3088
3088
  background-size: 60% 100%;
3089
- animation: bar-animation-2e27b3c1 3s infinite ease-in-out;
3089
+ animation: bar-animation-221a3053 3s infinite ease-in-out;
3090
3090
  }
3091
- @keyframes bar-animation-2e27b3c1 {
3091
+ @keyframes bar-animation-221a3053 {
3092
3092
  0% { background-position: -150% 0, -150% 0
3093
3093
  }
3094
3094
  66% { background-position: 250% 0, -150% 0
@@ -3096,17 +3096,17 @@ to {
3096
3096
  100% { background-position: 250% 0, 250% 0
3097
3097
  }
3098
3098
  }
3099
- .lds-ring[data-v-2e27b3c1],
3100
- .lds-ring div[data-v-2e27b3c1] {
3099
+ .lds-ring[data-v-221a3053],
3100
+ .lds-ring div[data-v-221a3053] {
3101
3101
  box-sizing: border-box;
3102
3102
  }
3103
- .lds-ring[data-v-2e27b3c1] {
3103
+ .lds-ring[data-v-221a3053] {
3104
3104
  position: relative;
3105
3105
  width: var(--size);
3106
3106
  height: var(--size);
3107
3107
  transform: translate(calc(var(--thickness) * -1), calc(var(--thickness) * -1));
3108
3108
  }
3109
- .lds-ring div[data-v-2e27b3c1] {
3109
+ .lds-ring div[data-v-221a3053] {
3110
3110
  box-sizing: border-box;
3111
3111
  display: block;
3112
3112
  position: absolute;
@@ -3115,19 +3115,19 @@ to {
3115
3115
  margin: var(--thickness);
3116
3116
  border: var(--thickness) solid currentColor;
3117
3117
  border-radius: 50%;
3118
- animation: lds-ring-2e27b3c1 var(--animation-duration) cubic-bezier(0.5, 0, 0.5, 1) infinite;
3118
+ animation: lds-ring-221a3053 var(--animation-duration) cubic-bezier(0.5, 0, 0.5, 1) infinite;
3119
3119
  border-color: currentColor transparent transparent transparent;
3120
3120
  }
3121
- .lds-ring div[data-v-2e27b3c1]:nth-child(1) {
3121
+ .lds-ring div[data-v-221a3053]:nth-child(1) {
3122
3122
  animation-delay: calc(var(--animation-duration) * -0.38);
3123
3123
  }
3124
- .lds-ring div[data-v-2e27b3c1]:nth-child(2) {
3124
+ .lds-ring div[data-v-221a3053]:nth-child(2) {
3125
3125
  animation-delay: calc(var(--animation-duration) / -4);
3126
3126
  }
3127
- .lds-ring div[data-v-2e27b3c1]:nth-child(3) {
3127
+ .lds-ring div[data-v-221a3053]:nth-child(3) {
3128
3128
  animation-delay: calc(var(--animation-duration) / -8);
3129
3129
  }
3130
- @keyframes lds-ring-2e27b3c1 {
3130
+ @keyframes lds-ring-221a3053 {
3131
3131
  0% {
3132
3132
  transform: rotate(0deg);
3133
3133
  }
@@ -3135,17 +3135,17 @@ to {
3135
3135
  transform: rotate(360deg);
3136
3136
  }
3137
3137
  }
3138
- .lds-ellipsis[data-v-2e27b3c1],
3139
- .lds-ellipsis div[data-v-2e27b3c1] {
3138
+ .lds-ellipsis[data-v-221a3053],
3139
+ .lds-ellipsis div[data-v-221a3053] {
3140
3140
  box-sizing: border-box;
3141
3141
  }
3142
- .lds-ellipsis[data-v-2e27b3c1] {
3142
+ .lds-ellipsis[data-v-221a3053] {
3143
3143
  display: inline-block;
3144
3144
  position: relative;
3145
3145
  width: var(--size);
3146
3146
  height: var(--size);
3147
3147
  }
3148
- .lds-ellipsis div[data-v-2e27b3c1] {
3148
+ .lds-ellipsis div[data-v-221a3053] {
3149
3149
  position: absolute;
3150
3150
  top: calc(var(--size) - 40%);
3151
3151
  width: calc(var(--size) / 5);
@@ -3154,23 +3154,23 @@ to {
3154
3154
  background: currentColor;
3155
3155
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
3156
3156
  }
3157
- .lds-ellipsis div[data-v-2e27b3c1]:nth-child(1) {
3157
+ .lds-ellipsis div[data-v-221a3053]:nth-child(1) {
3158
3158
  left: calc(var(--size) / 10);
3159
- animation: lds-ellipsis1-2e27b3c1 0.6s infinite;
3159
+ animation: lds-ellipsis1-221a3053 0.6s infinite;
3160
3160
  }
3161
- .lds-ellipsis div[data-v-2e27b3c1]:nth-child(2) {
3161
+ .lds-ellipsis div[data-v-221a3053]:nth-child(2) {
3162
3162
  left: calc(var(--size) / 10);
3163
- animation: lds-ellipsis2-2e27b3c1 0.6s infinite;
3163
+ animation: lds-ellipsis2-221a3053 0.6s infinite;
3164
3164
  }
3165
- .lds-ellipsis div[data-v-2e27b3c1]:nth-child(3) {
3165
+ .lds-ellipsis div[data-v-221a3053]:nth-child(3) {
3166
3166
  left: calc(var(--size) / 2.5);
3167
- animation: lds-ellipsis2-2e27b3c1 0.6s infinite;
3167
+ animation: lds-ellipsis2-221a3053 0.6s infinite;
3168
3168
  }
3169
- .lds-ellipsis div[data-v-2e27b3c1]:nth-child(4) {
3169
+ .lds-ellipsis div[data-v-221a3053]:nth-child(4) {
3170
3170
  left: calc(var(--size) / 1.42);
3171
- animation: lds-ellipsis3-2e27b3c1 0.6s infinite;
3171
+ animation: lds-ellipsis3-221a3053 0.6s infinite;
3172
3172
  }
3173
- @keyframes lds-ellipsis1-2e27b3c1 {
3173
+ @keyframes lds-ellipsis1-221a3053 {
3174
3174
  0% {
3175
3175
  transform: scale(0);
3176
3176
  }
@@ -3178,7 +3178,7 @@ to {
3178
3178
  transform: scale(1);
3179
3179
  }
3180
3180
  }
3181
- @keyframes lds-ellipsis3-2e27b3c1 {
3181
+ @keyframes lds-ellipsis3-221a3053 {
3182
3182
  0% {
3183
3183
  transform: scale(1);
3184
3184
  }
@@ -3186,7 +3186,7 @@ to {
3186
3186
  transform: scale(0);
3187
3187
  }
3188
3188
  }
3189
- @keyframes lds-ellipsis2-2e27b3c1 {
3189
+ @keyframes lds-ellipsis2-221a3053 {
3190
3190
  0% {
3191
3191
  transform: translate(0, 0);
3192
3192
  }
@@ -64,6 +64,6 @@ export type BglFormSchemaT<T = {
64
64
  }> = Field<T>[];
65
65
  export type BglFormSchemaFnT<T = {
66
66
  [key: string]: any;
67
- }> = (() => BglFormSchemaT<T>) | BglFormSchemaT<T>;
67
+ }> = (() => BglFormSchemaT<T>) | BglFormSchemaT<T> | (() => Promise<BglFormSchemaT<T>>) | Promise<BglFormSchemaT<T>>;
68
68
  export {};
69
69
  //# sourceMappingURL=BagelForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BagelForm.d.ts","sourceRoot":"","sources":["../../src/types/BagelForm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAEhC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAA;AAEvG,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,cAAc,CAAA;AAE5F,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,GAAG;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;CAC9C;AAED,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,CAC3D,MAAM,GACJ,CACD;IACC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB,GACC,MAAM,GACN,MAAM,GACN,OAAO,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AG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAA;AAE5D,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAEnE,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,CAAC,MAAM,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.0.38",
4
+ "version": "1.0.43",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -41,7 +41,8 @@ const {
41
41
  sortField,
42
42
  sortDirection,
43
43
  toggleSort,
44
- cleanTransformedData
44
+ cleanTransformedData,
45
+ schemaState
45
46
  } = useTableData<T>({ data, schema, columns, useServerSort, onSort: (field, direction) => {
46
47
  emit('orderBy', `${field} ${direction}`.trim() as EmitOrderT)
47
48
  } })
@@ -118,14 +119,17 @@ watch(
118
119
  <div
119
120
  class="table-list-wrap h-100"
120
121
  v-bind="containerProps"
121
- :class="{ 'loading-table': loading }"
122
+ :class="{ 'loading-table': loading || schemaState === 'loading' }"
122
123
  >
123
124
  <div
124
- v-if="loading"
125
+ v-if="loading || schemaState === 'loading'"
125
126
  class="loading-table-wrapper z-99 h-100 w-100 absolute inset"
126
127
  >
127
128
  <div class="loading-table-animation absolute oval" />
128
129
  </div>
130
+ <div v-else-if="schemaState === 'error'" class="flex-center h-300px txt-red">
131
+ Error loading table schema
132
+ </div>
129
133
  <div v-else v-bind="wrapperProps">
130
134
  <table class="infinite-wrapper">
131
135
  <thead class="row first-row">
@@ -1,7 +1,7 @@
1
1
  import type { ComputedRef } from 'vue'
2
2
  import type { TableDataOptions, SortDirectionsT } from '../../types/TableSchema'
3
3
  import { useBglSchema, isDate, keyToLabel } from '@bagelink/vue'
4
- import { computed, ref } from 'vue'
4
+ import { computed, ref, onMounted, watch } from 'vue'
5
5
 
6
6
  const NON_DIGIT_REGEX = /[^\d.-]/g
7
7
 
@@ -33,6 +33,10 @@ export function useTableData<T extends Record<string, any>>(options: UseTableDat
33
33
  // Sorting state
34
34
  const sortField = ref('')
35
35
  const sortDirection = ref<SortDirectionsT>('ASC')
36
+ // Schema loading state
37
+ const schemaState = ref<'loading' | 'loaded' | 'error'>('loading')
38
+ const resolvedSchema = ref<any[]>([])
39
+
36
40
  // Helper function to get the value from a possibly computed ref
37
41
  function getValue<V>(value: ComputedRef<V> | V | undefined): V | undefined {
38
42
  if (value === undefined || value === null) {
@@ -52,47 +56,72 @@ export function useTableData<T extends Record<string, any>>(options: UseTableDat
52
56
  }
53
57
  }
54
58
 
55
- // Create a computed property for the schema that will react to changes in options.columns
56
- const computedSchema = computed(() => {
57
- // Get the data safely
58
- const dataValue = options.data.value || []
59
+ // Function to resolve schema asynchronously
60
+ async function resolveSchemaAsync() {
61
+ try {
62
+ schemaState.value = 'loading'
59
63
 
60
- // Get the schema from useBglSchema
61
- const schema = useBglSchema<T>({
62
- schema: getValue(options.schema),
63
- columns: getValue(options.columns),
64
- data: dataValue,
65
- })
64
+ // Get the data safely
65
+ const dataValue = options.data.value || []
66
66
 
67
- // If we have a valid schema with fields, filter out fields without an ID
68
- if (Array.isArray(schema) && schema.length > 0) {
69
- return schema.filter(field => field && field.id)
70
- }
67
+ // Get the schema from useBglSchema (now async)
68
+ const schema = await useBglSchema<T>({
69
+ schema: getValue(options.schema),
70
+ columns: getValue(options.columns),
71
+ data: dataValue,
72
+ })
71
73
 
72
- // If no schema is provided or it's empty, generate a default schema from the data
73
- if (Array.isArray(dataValue) && dataValue.length > 0) {
74
- const firstItem = dataValue[0]
75
-
76
- // Create a schema based on the keys of the first item
77
- return Object.keys(firstItem || {})
78
- .filter(key => key !== 'id' && !key.startsWith('_')) // Exclude id and internal fields
79
- .map(key => ({
80
- id: key,
81
- label: keyToLabel(key),
82
- $el: 'div',
83
- transform: (val?: any) => {
84
- // Handle date fields
85
- const dateFields = ['created_at', 'updated_at']
86
- if (dateFields.includes(key)) return val ? new Date(val).toLocaleString() : val
87
- return val
88
- }
89
- }))
74
+ // If we have a valid schema with fields, filter out fields without an ID
75
+ if (Array.isArray(schema) && schema.length > 0) {
76
+ resolvedSchema.value = schema.filter(field => field && field.id)
77
+ } else if (Array.isArray(dataValue) && dataValue.length > 0) {
78
+ // If no schema is provided or it's empty, generate a default schema from the data
79
+ const firstItem = dataValue[0]
80
+
81
+ // Create a schema based on the keys of the first item
82
+ resolvedSchema.value = Object.keys(firstItem || {})
83
+ .filter(key => key !== 'id' && !key.startsWith('_')) // Exclude id and internal fields
84
+ .map(key => ({
85
+ id: key,
86
+ label: keyToLabel(key),
87
+ $el: 'div',
88
+ transform: (val?: any) => {
89
+ // Handle date fields
90
+ const dateFields = ['created_at', 'updated_at']
91
+ if (dateFields.includes(key)) return val ? new Date(val).toLocaleString() : val
92
+ return val
93
+ }
94
+ }))
95
+ } else {
96
+ // Return an empty array if no data or schema
97
+ resolvedSchema.value = []
98
+ }
99
+
100
+ schemaState.value = 'loaded'
101
+ } catch (error) {
102
+ console.error('Error resolving schema:', error)
103
+ schemaState.value = 'error'
104
+ resolvedSchema.value = []
90
105
  }
106
+ }
91
107
 
92
- // Return an empty array if no data or schema
93
- return []
108
+ // Watch for changes in schema or columns and resolve schema
109
+ watch([
110
+ () => getValue(options.schema),
111
+ () => getValue(options.columns),
112
+ () => options.data.value
113
+ ], () => {
114
+ resolveSchemaAsync()
115
+ }, { immediate: true })
116
+
117
+ // Initialize schema on mount
118
+ onMounted(() => {
119
+ resolveSchemaAsync()
94
120
  })
95
121
 
122
+ // Create a computed property for the schema
123
+ const computedSchema = computed(() => resolvedSchema.value)
124
+
96
125
  function transform(rowData: T): TransformedData<T> {
97
126
  const transformed = { ...rowData } as TransformedData<T>
98
127
  const schemaFields = computedSchema.value.filter((f: any) => f.id)
@@ -205,6 +234,7 @@ export function useTableData<T extends Record<string, any>>(options: UseTableDat
205
234
  sortField: computed(() => sortField.value),
206
235
  sortDirection: computed(() => sortDirection.value),
207
236
  toggleSort,
208
- cleanTransformedData
237
+ cleanTransformedData,
238
+ schemaState: computed(() => schemaState.value)
209
239
  }
210
240
  }
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  type LoadingType = 'ring' | 'ellipsis' | 'bar'
3
3
 
4
- const { type: theme = 'ring', size = 64, thickness, duration = 1.2, color } = defineProps<{
4
+ const { type: theme = 'ring', size = 50, thickness, duration = 1.2, color } = defineProps<{
5
5
  size?: number | string
6
6
  thickness?: number | string
7
7
  duration?: number | string
@@ -21,7 +21,7 @@ const animationDuration = $computed(() => `${duration}s`)
21
21
 
22
22
  // Border size for ring theme (defaults to 1/8th of the size)
23
23
  const computedBorder = $computed(() => {
24
- const borderValue = thickness ?? Number.parseInt(computedSize) / 7
24
+ const borderValue = thickness ?? Math.max(Number.parseInt(computedSize) / 9, 2)
25
25
  return standardSize(borderValue)
26
26
  })
27
27
  </script>