@platforma-sdk/ui-vue 1.42.24 → 1.42.26
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/.turbo/turbo-build.log +13 -13
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/plugins/Monetization/LimitCard.vue2.js +59 -46
- package/dist/plugins/Monetization/LimitCard.vue2.js.map +1 -1
- package/dist/plugins/Monetization/LimitCard.vue3.js +21 -17
- package/dist/plugins/Monetization/LimitCard.vue3.js.map +1 -1
- package/dist/plugins/Monetization/MonetizationSidebar.vue.js +39 -39
- package/dist/plugins/Monetization/MonetizationSidebar.vue.js.map +1 -1
- package/dist/plugins/Monetization/RunStatus.vue.d.ts +1 -0
- package/dist/plugins/Monetization/RunStatus.vue2.js +17 -20
- package/dist/plugins/Monetization/RunStatus.vue2.js.map +1 -1
- package/dist/plugins/Monetization/RunStatus.vue3.js +15 -13
- package/dist/plugins/Monetization/RunStatus.vue3.js.map +1 -1
- package/dist/plugins/Monetization/UserCabinetCard.vue.d.ts +1 -0
- package/dist/plugins/Monetization/UserCabinetCard.vue2.js +42 -34
- package/dist/plugins/Monetization/UserCabinetCard.vue2.js.map +1 -1
- package/dist/plugins/Monetization/UserCabinetCard.vue3.js +17 -15
- package/dist/plugins/Monetization/UserCabinetCard.vue3.js.map +1 -1
- package/dist/plugins/Monetization/useInfo.js +5 -5
- package/dist/plugins/Monetization/useInfo.js.map +1 -1
- package/package.json +6 -6
- package/src/plugins/Monetization/LimitCard.vue +94 -40
- package/src/plugins/Monetization/MonetizationSidebar.vue +3 -5
- package/src/plugins/Monetization/RunStatus.vue +11 -15
- package/src/plugins/Monetization/UserCabinetCard.vue +23 -1
- package/src/plugins/Monetization/useInfo.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-sdk/ui-vue@1.42.
|
|
3
|
+
> @platforma-sdk/ui-vue@1.42.26 build /home/runner/_work/platforma/platforma/sdk/ui-vue
|
|
4
4
|
> ts-builder build --target browser-lib
|
|
5
5
|
|
|
6
6
|
Building browser-lib project...
|
|
7
|
-
↳ vite.js build --config configs/vite.browser-lib.config.js --mode production
|
|
7
|
+
↳ vite.js build --config /configs/vite.browser-lib.config.js --mode production
|
|
8
8
|
[36mvite v6.3.5 [32mbuilding for production...[36m[39m
|
|
9
9
|
transforming...
|
|
10
10
|
[32m✓[39m 238 modules transformed.
|
|
@@ -79,8 +79,8 @@ computing gzip size...
|
|
|
79
79
|
[2mdist/[22m[36mcomponents/PlTableFilters/PlTableFiltersV2.vue.js [39m[1m[2m 0.30 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m[2m │ map: 0.11 kB[22m
|
|
80
80
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js [39m[1m[2m 0.30 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m[2m │ map: 0.78 kB[22m
|
|
81
81
|
[2mdist/[22m[36mcomponents/PlAnnotations/components/PlAnnotationsModal.vue.js [39m[1m[2m 0.31 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m[2m │ map: 0.11 kB[22m
|
|
82
|
-
[2mdist/[22m[36mcomponents/PlAgDataTable/PlAgDataTableSheets.vue.js [39m[1m[2m 0.31 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m[2m │ map: 0.11 kB[22m
|
|
83
82
|
[2mdist/[22m[36mcomponents/PlAnnotations/components/AnnotationsSidebar.vue.js [39m[1m[2m 0.31 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m[2m │ map: 0.11 kB[22m
|
|
83
|
+
[2mdist/[22m[36mcomponents/PlAgDataTable/PlAgDataTableSheets.vue.js [39m[1m[2m 0.31 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m[2m │ map: 0.11 kB[22m
|
|
84
84
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js [39m[1m[2m 0.31 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m[2m │ map: 0.76 kB[22m
|
|
85
85
|
[2mdist/[22m[36mcomponents/PlAgGridColumnManager/PlAgGridColumnManager.vue.js [39m[1m[2m 0.32 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m[2m │ map: 0.12 kB[22m
|
|
86
86
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js [39m[1m[2m 0.32 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m[2m │ map: 0.74 kB[22m
|
|
@@ -144,35 +144,34 @@ computing gzip size...
|
|
|
144
144
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js [39m[1m[2m 1.18 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m[2m │ map: 3.54 kB[22m
|
|
145
145
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js [39m[1m[2m 1.20 kB[22m[1m[22m[2m │ gzip: 0.57 kB[22m[2m │ map: 2.88 kB[22m
|
|
146
146
|
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/multi-sequence-alignment.js [39m[1m[2m 1.23 kB[22m[1m[22m[2m │ gzip: 0.70 kB[22m[2m │ map: 4.70 kB[22m
|
|
147
|
-
[2mdist/[22m[36mplugins/Monetization/
|
|
147
|
+
[2mdist/[22m[36mplugins/Monetization/RunStatus.vue2.js [39m[1m[2m 1.27 kB[22m[1m[22m[2m │ gzip: 0.59 kB[22m[2m │ map: 2.46 kB[22m
|
|
148
148
|
[2mdist/[22m[36mcomponents/PlAgDataTable/PlAgOverlayLoading.vue.js [39m[1m[2m 1.30 kB[22m[1m[22m[2m │ gzip: 0.66 kB[22m[2m │ map: 1.40 kB[22m
|
|
149
|
-
[2mdist/[22m[36mplugins/Monetization/RunStatus.vue2.js [39m[1m[2m 1.32 kB[22m[1m[22m[2m │ gzip: 0.61 kB[22m[2m │ map: 2.66 kB[22m
|
|
150
149
|
[2mdist/[22m[36mcreateModel.js [39m[1m[2m 1.39 kB[22m[1m[22m[2m │ gzip: 0.65 kB[22m[2m │ map: 3.91 kB[22m
|
|
151
150
|
[2mdist/[22m[36mcomponents/PlAgDataTable/types.js [39m[1m[2m 1.40 kB[22m[1m[22m[2m │ gzip: 0.56 kB[22m[2m │ map: 9.46 kB[22m
|
|
152
151
|
[2mdist/[22m[36mutils.js [39m[1m[2m 1.51 kB[22m[1m[22m[2m │ gzip: 0.69 kB[22m[2m │ map: 3.53 kB[22m
|
|
153
152
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js [39m[1m[2m 1.55 kB[22m[1m[22m[2m │ gzip: 0.65 kB[22m[2m │ map: 3.99 kB[22m
|
|
153
|
+
[2mdist/[22m[36mplugins/Monetization/UserCabinetCard.vue3.js [39m[1m[2m 1.55 kB[22m[1m[22m[2m │ gzip: 0.77 kB[22m[2m │ map: 0.11 kB[22m
|
|
154
154
|
[2mdist/[22m[36mcomponents/PlAgDataTable/sources/focus-row.js [39m[1m[2m 1.57 kB[22m[1m[22m[2m │ gzip: 0.75 kB[22m[2m │ map: 2.65 kB[22m
|
|
155
155
|
[2mdist/[22m[36mcomponents/PlAgCsvExporter/export-csv.js [39m[1m[2m 1.60 kB[22m[1m[22m[2m │ gzip: 0.73 kB[22m[2m │ map: 3.72 kB[22m
|
|
156
156
|
[2mdist/[22m[36mAgGridVue/createAgGridColDef.js [39m[1m[2m 1.61 kB[22m[1m[22m[2m │ gzip: 0.72 kB[22m[2m │ map: 9.40 kB[22m
|
|
157
|
-
[2mdist/[22m[36mplugins/Monetization/RunStatus.vue3.js [39m[1m[2m 1.63 kB[22m[1m[22m[2m │ gzip: 0.77 kB[22m[2m │ map: 0.11 kB[22m
|
|
158
157
|
[2mdist/[22m[36maggrid.js [39m[1m[2m 1.65 kB[22m[1m[22m[2m │ gzip: 0.79 kB[22m[2m │ map: 3.09 kB[22m
|
|
159
158
|
[2mdist/[22m[36minternal/createAppModel.js [39m[1m[2m 1.73 kB[22m[1m[22m[2m │ gzip: 0.77 kB[22m[2m │ map: 4.81 kB[22m
|
|
159
|
+
[2mdist/[22m[36mplugins/Monetization/RunStatus.vue3.js [39m[1m[2m 1.79 kB[22m[1m[22m[2m │ gzip: 0.82 kB[22m[2m │ map: 0.11 kB[22m
|
|
160
160
|
[2mdist/[22m[36minternal/UpdateSerializer.js [39m[1m[2m 1.86 kB[22m[1m[22m[2m │ gzip: 0.80 kB[22m[2m │ map: 4.63 kB[22m
|
|
161
161
|
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/markup.js [39m[1m[2m 1.99 kB[22m[1m[22m[2m │ gzip: 1.02 kB[22m[2m │ map: 6.53 kB[22m
|
|
162
|
-
[2mdist/[22m[36mplugins/Monetization/UserCabinetCard.vue2.js [39m[1m[2m 2.11 kB[22m[1m[22m[2m │ gzip: 0.88 kB[22m[2m │ map: 3.01 kB[22m
|
|
163
162
|
[2mdist/[22m[36mdefineApp.js [39m[1m[2m 2.15 kB[22m[1m[22m[2m │ gzip: 0.96 kB[22m[2m │ map: 9.58 kB[22m
|
|
164
|
-
[2mdist/[22m[36mplugins/Monetization/useInfo.js [39m[1m[2m 2.
|
|
163
|
+
[2mdist/[22m[36mplugins/Monetization/useInfo.js [39m[1m[2m 2.18 kB[22m[1m[22m[2m │ gzip: 0.80 kB[22m[2m │ map: 4.32 kB[22m
|
|
165
164
|
[2mdist/[22m[36mcomponents/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue.js [39m[1m[2m 2.20 kB[22m[1m[22m[2m │ gzip: 1.05 kB[22m[2m │ map: 2.83 kB[22m
|
|
166
165
|
[2mdist/[22m[36mcomponents/PlAnnotations/components/PlAnnotationCreateDialog.vue.js [39m[1m[2m 2.35 kB[22m[1m[22m[2m │ gzip: 0.96 kB[22m[2m │ map: 2.64 kB[22m
|
|
167
|
-
[2mdist/[22m[36mplugins/Monetization/
|
|
166
|
+
[2mdist/[22m[36mplugins/Monetization/UserCabinetCard.vue2.js [39m[1m[2m 2.36 kB[22m[1m[22m[2m │ gzip: 0.95 kB[22m[2m │ map: 3.49 kB[22m
|
|
168
167
|
[2mdist/[22m[36mcomponents/PlAgDataTable/PlAgDataTableSheets.vue2.js [39m[1m[2m 2.57 kB[22m[1m[22m[2m │ gzip: 1.16 kB[22m[2m │ map: 5.30 kB[22m
|
|
169
168
|
[2mdist/[22m[36mcomponents/PlTableFilters/PlTableFiltersV2.vue3.js [39m[1m[2m 2.58 kB[22m[1m[22m[2m │ gzip: 0.94 kB[22m[2m │ map: 0.12 kB[22m
|
|
170
169
|
[2mdist/[22m[36mcomponents/PlTableFilters/filters-state.js [39m[1m[2m 2.60 kB[22m[1m[22m[2m │ gzip: 1.08 kB[22m[2m │ map: 7.95 kB[22m
|
|
171
|
-
[2mdist/[22m[36mplugins/Monetization/LimitCard.vue2.js [39m[1m[2m 2.61 kB[22m[1m[22m[2m │ gzip: 0.88 kB[22m[2m │ map: 4.83 kB[22m
|
|
172
170
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js [39m[1m[2m 2.65 kB[22m[1m[22m[2m │ gzip: 0.94 kB[22m[2m │ map: 6.36 kB[22m
|
|
173
171
|
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue3.js [39m[1m[2m 2.71 kB[22m[1m[22m[2m │ gzip: 1.14 kB[22m[2m │ map: 0.13 kB[22m
|
|
174
172
|
[2mdist/[22m[36mnode_modules/.pnpm/fast-json-patch@3.1.1/node_modules/fast-json-patch/module/helpers.js [39m[1m[2m 2.79 kB[22m[1m[22m[2m │ gzip: 1.21 kB[22m[2m │ map: 8.92 kB[22m
|
|
175
173
|
[2mdist/[22m[36mcomponents/PlAgDataTable/sources/row-number.js [39m[1m[2m 3.10 kB[22m[1m[22m[2m │ gzip: 1.34 kB[22m[2m │ map: 8.36 kB[22m
|
|
174
|
+
[2mdist/[22m[36mplugins/Monetization/LimitCard.vue3.js [39m[1m[2m 3.10 kB[22m[1m[22m[2m │ gzip: 1.09 kB[22m[2m │ map: 0.11 kB[22m
|
|
176
175
|
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/SeqLogo.vue.js [39m[1m[2m 3.11 kB[22m[1m[22m[2m │ gzip: 1.26 kB[22m[2m │ map: 6.04 kB[22m
|
|
177
176
|
[2mdist/[22m[36mcomposition/fileContent.js [39m[1m[2m 3.15 kB[22m[1m[22m[2m │ gzip: 1.17 kB[22m[2m │ map: 9.49 kB[22m
|
|
178
177
|
[2mdist/[22m[36mcomponents/PlTableFilters/PlTableAddFilterV2.vue.js [39m[1m[2m 3.16 kB[22m[1m[22m[2m │ gzip: 1.27 kB[22m[2m │ map: 3.95 kB[22m
|
|
@@ -186,11 +185,12 @@ computing gzip size...
|
|
|
186
185
|
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue2.js [39m[1m[2m 3.56 kB[22m[1m[22m[2m │ gzip: 1.19 kB[22m[2m │ map: 5.67 kB[22m
|
|
187
186
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js [39m[1m[2m 3.67 kB[22m[1m[22m[2m │ gzip: 1.01 kB[22m[2m │ map: 5.45 kB[22m
|
|
188
187
|
[2mdist/[22m[36mcomponents/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js [39m[1m[2m 3.84 kB[22m[1m[22m[2m │ gzip: 1.52 kB[22m[2m │ map: 4.99 kB[22m
|
|
188
|
+
[2mdist/[22m[36mplugins/Monetization/LimitCard.vue2.js [39m[1m[2m 3.84 kB[22m[1m[22m[2m │ gzip: 1.15 kB[22m[2m │ map: 7.17 kB[22m
|
|
189
189
|
[2mdist/[22m[36mcomponents/PlAnnotations/components/PlAnnotationsModal.vue2.js [39m[1m[2m 3.89 kB[22m[1m[22m[2m │ gzip: 1.38 kB[22m[2m │ map: 5.48 kB[22m
|
|
190
190
|
[2mdist/[22m[36mnode_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js [39m[1m[2m 4.03 kB[22m[1m[22m[2m │ gzip: 1.23 kB[22m[2m │ map: 12.92 kB[22m
|
|
191
191
|
[2mdist/[22m[36mcomponents/PlAnnotations/components/FilterSidebar.vue2.js [39m[1m[2m 4.50 kB[22m[1m[22m[2m │ gzip: 1.67 kB[22m[2m │ map: 5.97 kB[22m
|
|
192
192
|
[2mdist/[22m[36mcomponents/PlAnnotations/components/DynamicForm.vue2.js [39m[1m[2m 4.52 kB[22m[1m[22m[2m │ gzip: 1.41 kB[22m[2m │ map: 6.96 kB[22m
|
|
193
|
-
[2mdist/[22m[36mplugins/Monetization/MonetizationSidebar.vue.js [39m[1m[2m 4.
|
|
193
|
+
[2mdist/[22m[36mplugins/Monetization/MonetizationSidebar.vue.js [39m[1m[2m 4.70 kB[22m[1m[22m[2m │ gzip: 1.74 kB[22m[2m │ map: 4.91 kB[22m
|
|
194
194
|
[2mdist/[22m[36mcomponents/PlMultiSequenceAlignment/chemical-properties.js [39m[1m[2m 4.75 kB[22m[1m[22m[2m │ gzip: 1.67 kB[22m[2m │ map: 11.78 kB[22m
|
|
195
195
|
[2mdist/[22m[36mcomponents/BlockLayout.vue2.js [39m[1m[2m 4.96 kB[22m[1m[22m[2m │ gzip: 1.83 kB[22m[2m │ map: 2.96 kB[22m
|
|
196
196
|
[2mdist/[22m[36mcomponents/PlAnnotations/components/FilterSidebar.vue3.js [39m[1m[2m 5.48 kB[22m[1m[22m[2m │ gzip: 1.59 kB[22m[2m │ map: 0.11 kB[22m
|
|
@@ -215,7 +215,7 @@ computing gzip size...
|
|
|
215
215
|
[2mdist/[22m[36mcomponents/PlAgRowNumHeader.vue.js [39m[1m[2m44.65 kB[22m[1m[22m[2m │ gzip: 29.29 kB[22m[2m │ map: 3.70 kB[22m
|
|
216
216
|
[2mdist/[22m[36mAgGridVue/useAgGridOptions.js [39m[1m[2m49.29 kB[22m[1m[22m[2m │ gzip: 30.15 kB[22m[2m │ map: 16.35 kB[22m
|
|
217
217
|
[2mdist/[22m[36mcomponents/PlAgDataTable/PlAgDataTableV2.vue2.js [39m[1m[2m50.33 kB[22m[1m[22m[2m │ gzip: 31.04 kB[22m[2m │ map: 33.70 kB[22m
|
|
218
|
-
[vite:dts] Declaration files built in
|
|
218
|
+
[vite:dts] Declaration files built in 9046ms.
|
|
219
219
|
|
|
220
|
-
[32m✓ built in 10.
|
|
220
|
+
[32m✓ built in 10.84s[39m
|
|
221
221
|
Build completed successfully
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-sdk/ui-vue@1.42.
|
|
3
|
+
> @platforma-sdk/ui-vue@1.42.26 type-check /home/runner/_work/platforma/platforma/sdk/ui-vue
|
|
4
4
|
> ts-builder types --target browser-lib
|
|
5
5
|
|
|
6
6
|
↳ vue-tsc.js --noEmit --project ./tsconfig.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as w, computed as i, createElementBlock as u, openBlock as r, normalizeClass as t, createElementVNode as n, toDisplayString as o, createTextVNode as y, createCommentVNode as p, normalizeStyle as b } from "vue";
|
|
2
|
+
const F = { key: 0 }, N = { key: 1 }, A = { key: 0 }, C = { key: 1 }, T = /* @__PURE__ */ w({
|
|
3
3
|
__name: "LimitCard",
|
|
4
4
|
props: {
|
|
5
5
|
type: {},
|
|
@@ -9,57 +9,70 @@ const S = { key: 0 }, B = { key: 1 }, c = /* @__PURE__ */ g({
|
|
|
9
9
|
available: {},
|
|
10
10
|
unit: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const s =
|
|
14
|
-
return (e, a) => (
|
|
15
|
-
class:
|
|
12
|
+
setup(B) {
|
|
13
|
+
const l = B, s = i(() => l.available === null ? null : l.available + l.toSpend + l.used), v = i(() => l.available === null ? !1 : l.available < 0), $ = i(() => l.available === null ? null : l.available + l.toSpend), m = (e) => Math.max(0, Math.min(100, e)), g = i(() => s.value === null || s.value === 0 || v.value ? 0 : m(l.toSpend / s.value * 100)), S = i(() => s.value === null || s.value === 0 ? 0 : m(l.used / s.value * 100)), k = i(() => l.available === null || s.value === null || s.value === 0 ? 100 : v.value ? 0 : m(l.available / s.value * 100)), c = i(() => l.type === "unique_launches" ? "Runs Limits" : l.type === "volume_limit" ? "Volume Limits" : l.label), L = (e) => (e / 1024 / 1024 / 1024).toFixed(2) + " GB", d = (e) => l.type === "volume_limit" ? L(e) : e, f = (e) => Number(e.toFixed(2)) > 0;
|
|
14
|
+
return (e, a) => (r(), u("div", {
|
|
15
|
+
class: t(e.$style.container)
|
|
16
16
|
}, [
|
|
17
|
-
|
|
18
|
-
class:
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
class:
|
|
17
|
+
n("span", {
|
|
18
|
+
class: t(e.$style.label)
|
|
19
|
+
}, o(c.value), 3),
|
|
20
|
+
n("div", {
|
|
21
|
+
class: t(e.$style.content)
|
|
22
22
|
}, [
|
|
23
|
-
|
|
24
|
-
class:
|
|
23
|
+
n("div", {
|
|
24
|
+
class: t(e.$style.contentAvailable)
|
|
25
25
|
}, [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
style:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
26
|
+
n("div", null, [
|
|
27
|
+
a[0] || (a[0] = y(" Available: ")),
|
|
28
|
+
a[1] || (a[1] = n("div", { style: { flex: "1" } }, null, -1)),
|
|
29
|
+
$.value !== null ? (r(), u("span", F, [
|
|
30
|
+
n("strong", null, o(d($.value)), 1),
|
|
31
|
+
y(" / " + o(d(e.available + e.toSpend + e.used)), 1)
|
|
32
|
+
])) : (r(), u("span", N, "Unlimited"))
|
|
33
|
+
]),
|
|
34
|
+
n("div", {
|
|
35
|
+
class: t([e.$style.afterRun, { [e.$style.exceeded]: v.value }])
|
|
36
|
+
}, [
|
|
37
|
+
v.value ? (r(), u("span", A, "Too many files selected")) : p("", !0),
|
|
38
|
+
a[2] || (a[2] = n("span", { style: { flex: "1" } }, null, -1)),
|
|
39
|
+
a[3] || (a[3] = n("span", null, "After run:", -1)),
|
|
40
|
+
e.available !== null ? (r(), u("span", C, o(d(e.available)) + " / " + o(d(e.available + e.toSpend + e.used)), 1)) : p("", !0)
|
|
41
|
+
], 2),
|
|
42
|
+
n("div", {
|
|
43
|
+
class: t([e.$style.progressBar, { [e.$style.exceeded]: v.value }])
|
|
44
|
+
}, [
|
|
45
|
+
f(k.value) ? (r(), u("span", {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: t(e.$style.progressBarAvailable),
|
|
48
|
+
style: b({ width: `${k.value.toFixed(2)}%` })
|
|
49
|
+
}, null, 6)) : p("", !0),
|
|
50
|
+
f(g.value) ? (r(), u("span", {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: t(e.$style.progressBarToSpend),
|
|
53
|
+
style: b({ width: `${g.value.toFixed(2)}%` })
|
|
54
|
+
}, null, 6)) : p("", !0),
|
|
55
|
+
f(S.value) ? (r(), u("span", {
|
|
56
|
+
key: 2,
|
|
57
|
+
class: t(e.$style.progressBarUsed),
|
|
58
|
+
style: b({ width: `${S.value.toFixed(2)}%` })
|
|
59
|
+
}, null, 6)) : p("", !0)
|
|
60
|
+
], 2)
|
|
48
61
|
], 2),
|
|
49
|
-
|
|
50
|
-
class:
|
|
62
|
+
n("div", {
|
|
63
|
+
class: t(e.$style.legends)
|
|
51
64
|
}, [
|
|
52
|
-
|
|
53
|
-
class:
|
|
65
|
+
n("div", {
|
|
66
|
+
class: t(e.$style.toSpendLegend)
|
|
54
67
|
}, [
|
|
55
|
-
a[
|
|
56
|
-
|
|
68
|
+
a[4] || (a[4] = n("span", null, null, -1)),
|
|
69
|
+
y(" To spend: " + o(d(e.toSpend)), 1)
|
|
57
70
|
], 2),
|
|
58
|
-
|
|
59
|
-
class:
|
|
71
|
+
n("div", {
|
|
72
|
+
class: t(e.$style.usedLegend)
|
|
60
73
|
}, [
|
|
61
|
-
a[
|
|
62
|
-
|
|
74
|
+
a[5] || (a[5] = n("span", null, null, -1)),
|
|
75
|
+
y(" Used: " + o(d(e.used)), 1)
|
|
63
76
|
], 2)
|
|
64
77
|
], 2)
|
|
65
78
|
], 2)
|
|
@@ -67,6 +80,6 @@ const S = { key: 0 }, B = { key: 1 }, c = /* @__PURE__ */ g({
|
|
|
67
80
|
}
|
|
68
81
|
});
|
|
69
82
|
export {
|
|
70
|
-
|
|
83
|
+
T as default
|
|
71
84
|
};
|
|
72
85
|
//# sourceMappingURL=LimitCard.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimitCard.vue2.js","sources":["../../../src/plugins/Monetization/LimitCard.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n type: 'unique_launches' | 'volume_limit';\n label: string;\n used: number;\n toSpend: number;\n available: number | null; // If available is null it means Unlimited\n unit?: string;\n}>();\n\nconst
|
|
1
|
+
{"version":3,"file":"LimitCard.vue2.js","sources":["../../../src/plugins/Monetization/LimitCard.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n type: 'unique_launches' | 'volume_limit';\n label: string;\n used: number;\n toSpend: number;\n available: number | null; // If available is null it means Unlimited\n unit?: string;\n}>();\n\nconst total = computed(() => {\n if (props.available === null) return null;\n return props.available + props.toSpend + props.used;\n});\n\nconst exceeded = computed(() => {\n if (props.available === null) return false;\n return props.available < 0;\n});\n\nconst availableNow = computed(() => {\n if (props.available === null) return null;\n return props.available + props.toSpend;\n});\n\nconst clampPercentage = (n: number) => Math.max(0, Math.min(100, n));\n\nconst toSpendPercentage = computed(() => {\n if (total.value === null) return 0;\n if (total.value === 0) return 0;\n if (exceeded.value) return 0;\n return clampPercentage((props.toSpend / total.value) * 100);\n});\n\nconst usedPercentage = computed(() => {\n if (total.value === null) return 0;\n if (total.value === 0) return 0;\n return clampPercentage((props.used / total.value) * 100);\n});\n\nconst availablePercentage = computed(() => {\n if (props.available === null) return 100;\n if (total.value === null) return 100;\n if (total.value === 0) return 100;\n if (exceeded.value) return 0;\n return clampPercentage(props.available / total.value * 100);\n});\n\nconst computedLabel = computed(() => {\n if (props.type === 'unique_launches') return 'Runs Limits';\n if (props.type === 'volume_limit') return 'Volume Limits';\n return props.label;\n});\n\nconst toGB = (v: number) => {\n return (v / 1024 / 1024 / 1024).toFixed(2) + ' GB';\n};\n\nconst formatUnit = (v: number) => {\n if (props.type === 'volume_limit') return toGB(v);\n return v;\n};\n\nconst showBar = (n: number) => {\n return Number(n.toFixed(2)) > 0;\n};\n</script>\n\n<template>\n <div :class=\"$style.container\">\n <span :class=\"$style.label\">{{ computedLabel }}</span>\n <div :class=\"$style.content\">\n <div :class=\"$style.contentAvailable\">\n <div>\n Available:\n <div style=\"flex: 1\" />\n <span v-if=\"availableNow !== null\"><strong>{{ formatUnit(availableNow) }}</strong> / {{ formatUnit(available! + toSpend + used) }}</span>\n <span v-else>Unlimited</span>\n </div>\n <div :class=\"[$style.afterRun, { [$style.exceeded]: exceeded }]\">\n <span v-if=\"exceeded\">Too many files selected</span>\n <span style=\"flex: 1\" />\n <span>After run:</span>\n <span v-if=\"available !== null\">{{ formatUnit(available) }} / {{ formatUnit(available + toSpend + used) }}</span>\n </div>\n <div :class=\"[$style.progressBar, { [$style.exceeded]: exceeded }]\">\n <span v-if=\"showBar(availablePercentage)\" :class=\"$style.progressBarAvailable\" :style=\"{ width: `${availablePercentage.toFixed(2)}%` }\" />\n <span v-if=\"showBar(toSpendPercentage)\" :class=\"$style.progressBarToSpend\" :style=\"{ width: `${toSpendPercentage.toFixed(2)}%` }\" />\n <span v-if=\"showBar(usedPercentage)\" :class=\"$style.progressBarUsed\" :style=\"{ width: `${usedPercentage.toFixed(2)}%` }\" />\n </div>\n </div>\n <div :class=\"$style.legends\">\n <div :class=\"$style.toSpendLegend\">\n <span/>\n To spend: {{ formatUnit(toSpend) }}\n </div>\n <div :class=\"$style.usedLegend\">\n <span/>\n Used: {{ formatUnit(used) }}\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style module>\n.container {\n display: flex;\n flex-direction: column;\n background-color: var(--bg-base-light);\n border-radius: 6px;\n padding: 10px 12px 16px 12px;\n color: var(--txt-01);\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n border: 1px solid var(--border-color-div-grey);\n}\n\n.label {\n display: block;\n min-height: 36px;\n margin-bottom: 8px;\n color: var(--txt-01);\n font-size: 14px;\n font-weight: 600;\n line-height: 20px; /* 142.857% */\n}\n\n.content {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.contentAvailable {\n display: flex;\n flex-direction: column;\n gap: 6px;\n > div {\n display: flex;\n align-items: flex-start;\n }\n >div:first-child {\n gap: 8px;\n strong {\n font-size: 28px;\n font-weight: 500;\n line-height: 36px; /* 128.571% */\n letter-spacing: -0.56px;\n }\n }\n}\n\n.afterRun {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 4px;\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: 16px;\n color: var(--txt-03);\n &.exceeded {\n color: var(--txt-error);\n }\n}\n\n.progressBar {\n width: 100%;\n height: 12px;\n background-color: #E0E0E0;\n display: flex;\n align-items: center;\n border: 1px solid var(--border-color-default);\n > span {\n display: block;\n height: 100%;\n outline: 1px solid var(--border-color-default);\n }\n &.exceeded {\n opacity: 0.2;\n }\n}\n\n.progressBarAvailable {\n background: linear-gradient(270deg, #A1E59C 0%, #D0F5B0 98.81%);\n}\n\n.progressBarUsed {\n background-color: #FFCECC;\n}\n\n.progressBarToSpend {\n background-color: #FAF5AA;\n}\n\n.legends {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n\n span {\n display: block;\n border-radius: 1px;\n border: 1px solid var(--border-color-default);\n width: 12px;\n height: 12px;\n }\n}\n\n.usedLegend {\n display: flex;\n align-items: center;\n gap: 8px;\n span {\n background: #FFCECC;\n }\n}\n\n.toSpendLegend {\n display: flex;\n align-items: center;\n gap: 8px;\n span {\n background: #FAF5AA;\n }\n}\n</style>\n"],"names":["props","__props","total","computed","exceeded","availableNow","clampPercentage","n","toSpendPercentage","usedPercentage","availablePercentage","computedLabel","toGB","v","formatUnit","showBar"],"mappings":";;;;;;;;;;;;AAGA,UAAMA,IAAQC,GASRC,IAAQC,EAAS,MACjBH,EAAM,cAAc,OAAa,OAC9BA,EAAM,YAAYA,EAAM,UAAUA,EAAM,IAChD,GAEKI,IAAWD,EAAS,MACpBH,EAAM,cAAc,OAAa,KAC9BA,EAAM,YAAY,CAC1B,GAEKK,IAAeF,EAAS,MACxBH,EAAM,cAAc,OAAa,OAC9BA,EAAM,YAAYA,EAAM,OAChC,GAEKM,IAAkB,CAACC,MAAc,KAAK,IAAI,GAAG,KAAK,IAAI,KAAKA,CAAC,CAAC,GAE7DC,IAAoBL,EAAS,MAC7BD,EAAM,UAAU,QAChBA,EAAM,UAAU,KAChBE,EAAS,QAAc,IACpBE,EAAiBN,EAAM,UAAUE,EAAM,QAAS,GAAG,CAC3D,GAEKO,IAAiBN,EAAS,MAC1BD,EAAM,UAAU,QAChBA,EAAM,UAAU,IAAU,IACvBI,EAAiBN,EAAM,OAAOE,EAAM,QAAS,GAAG,CACxD,GAEKQ,IAAsBP,EAAS,MAC/BH,EAAM,cAAc,QACpBE,EAAM,UAAU,QAChBA,EAAM,UAAU,IAAU,MAC1BE,EAAS,QAAc,IACpBE,EAAgBN,EAAM,YAAYE,EAAM,QAAQ,GAAG,CAC3D,GAEKS,IAAgBR,EAAS,MACzBH,EAAM,SAAS,oBAA0B,gBACzCA,EAAM,SAAS,iBAAuB,kBACnCA,EAAM,KACd,GAEKY,IAAO,CAACC,OACJA,IAAI,OAAO,OAAO,MAAM,QAAQ,CAAC,IAAI,OAGzCC,IAAa,CAACD,MACdb,EAAM,SAAS,iBAAuBY,EAAKC,CAAC,IACzCA,GAGHE,IAAU,CAACR,MACR,OAAOA,EAAE,QAAQ,CAAC,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".
|
|
2
|
-
const e = "
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._container_17ssa_2{display:flex;flex-direction:column;background-color:var(--bg-base-light);border-radius:6px;padding:10px 12px 16px;color:var(--txt-01);font-size:14px;font-weight:500;line-height:20px;border:1px solid var(--border-color-div-grey)}._label_17ssa_15{display:block;min-height:36px;margin-bottom:8px;color:var(--txt-01);font-size:14px;font-weight:600;line-height:20px}._content_17ssa_25{display:flex;flex-direction:column;gap:16px}._contentAvailable_17ssa_31{display:flex;flex-direction:column;gap:6px}._contentAvailable_17ssa_31>div{display:flex;align-items:flex-start}._contentAvailable_17ssa_31>div:first-child{gap:8px}._contentAvailable_17ssa_31>div:first-child strong{font-size:28px;font-weight:500;line-height:36px;letter-spacing:-.56px}._afterRun_17ssa_50{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:12px;font-style:normal;font-weight:500;line-height:16px;color:var(--txt-03)}._afterRun_17ssa_50._exceeded_17ssa_60{color:var(--txt-error)}._progressBar_17ssa_65{width:100%;height:12px;background-color:#e0e0e0;display:flex;align-items:center;border:1px solid var(--border-color-default)}._progressBar_17ssa_65>span{display:block;height:100%;outline:1px solid var(--border-color-default)}._progressBar_17ssa_65._exceeded_17ssa_60{opacity:.2}._progressBarAvailable_17ssa_82{background:linear-gradient(270deg,#a1e59c,#d0f5b0 98.81%)}._progressBarUsed_17ssa_86{background-color:#ffcecc}._progressBarToSpend_17ssa_90{background-color:#faf5aa}._legends_17ssa_94{display:flex;justify-content:space-between;gap:8px}._legends_17ssa_94 span{display:block;border-radius:1px;border:1px solid var(--border-color-default);width:12px;height:12px}._usedLegend_17ssa_108{display:flex;align-items:center;gap:8px}._usedLegend_17ssa_108 span{background:#ffcecc}._toSpendLegend_17ssa_117{display:flex;align-items:center;gap:8px}._toSpendLegend_17ssa_117 span{background:#faf5aa}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
const e = "_container_17ssa_2", s = "_label_17ssa_15", n = "_content_17ssa_25", a = "_contentAvailable_17ssa_31", r = "_afterRun_17ssa_50", o = "_exceeded_17ssa_60", _ = "_progressBar_17ssa_65", t = "_progressBarAvailable_17ssa_82", d = "_progressBarUsed_17ssa_86", c = "_progressBarToSpend_17ssa_90", l = "_legends_17ssa_94", g = "_usedLegend_17ssa_108", p = "_toSpendLegend_17ssa_117", B = {
|
|
3
3
|
container: e,
|
|
4
4
|
label: s,
|
|
5
5
|
content: n,
|
|
6
|
-
contentAvailable:
|
|
7
|
-
|
|
6
|
+
contentAvailable: a,
|
|
7
|
+
afterRun: r,
|
|
8
|
+
exceeded: o,
|
|
9
|
+
progressBar: _,
|
|
8
10
|
progressBarAvailable: t,
|
|
9
|
-
progressBarUsed:
|
|
10
|
-
progressBarToSpend:
|
|
11
|
-
legends:
|
|
12
|
-
usedLegend:
|
|
13
|
-
toSpendLegend:
|
|
11
|
+
progressBarUsed: d,
|
|
12
|
+
progressBarToSpend: c,
|
|
13
|
+
legends: l,
|
|
14
|
+
usedLegend: g,
|
|
15
|
+
toSpendLegend: p
|
|
14
16
|
};
|
|
15
17
|
export {
|
|
18
|
+
r as afterRun,
|
|
16
19
|
e as container,
|
|
17
20
|
n as content,
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
a as contentAvailable,
|
|
22
|
+
B as default,
|
|
23
|
+
o as exceeded,
|
|
20
24
|
s as label,
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
l as legends,
|
|
26
|
+
_ as progressBar,
|
|
23
27
|
t as progressBarAvailable,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
c as progressBarToSpend,
|
|
29
|
+
d as progressBarUsed,
|
|
30
|
+
p as toSpendLegend,
|
|
31
|
+
g as usedLegend
|
|
28
32
|
};
|
|
29
33
|
//# sourceMappingURL=LimitCard.vue3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimitCard.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LimitCard.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, ref as U, computed as s, createElementBlock as P, openBlock as n, Fragment as S, createBlock as l, createCommentVNode as u, unref as e, withCtx as i, createVNode as d, createTextVNode as x, toDisplayString as E, renderList as L, createElementVNode as N, Teleport as M, withModifiers as R } from "vue";
|
|
2
2
|
import { PlSlideModal as I, PlDropdown as O, PlBtnSecondary as q, PlAlert as D, PlBtnGhost as $, PlIcon24 as A } from "@milaboratories/uikit";
|
|
3
3
|
import { useButtonTarget as F } from "./useButtonTarget.js";
|
|
4
4
|
import { useInfo as G } from "./useInfo.js";
|
|
5
5
|
import K from "./UserCabinetCard.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const oe = /* @__PURE__ */
|
|
6
|
+
import j from "./RunStatus.vue.js";
|
|
7
|
+
import H from "./LimitCard.vue.js";
|
|
8
|
+
import J from "./EndOfPeriod.vue.js";
|
|
9
|
+
const oe = /* @__PURE__ */ T({
|
|
10
10
|
__name: "MonetizationSidebar",
|
|
11
|
-
setup(
|
|
12
|
-
const p =
|
|
11
|
+
setup(Q) {
|
|
12
|
+
const p = U(!1), {
|
|
13
13
|
result: o,
|
|
14
|
-
error:
|
|
14
|
+
error: f,
|
|
15
15
|
hasMonetization: c,
|
|
16
|
-
canRun:
|
|
17
|
-
status:
|
|
18
|
-
customerEmail:
|
|
19
|
-
endOfBillingPeriod:
|
|
20
|
-
limits:
|
|
21
|
-
refresh:
|
|
22
|
-
isLoading:
|
|
23
|
-
} = G(), k = F(c),
|
|
16
|
+
canRun: v,
|
|
17
|
+
status: B,
|
|
18
|
+
customerEmail: m,
|
|
19
|
+
endOfBillingPeriod: b,
|
|
20
|
+
limits: y,
|
|
21
|
+
refresh: V,
|
|
22
|
+
isLoading: g
|
|
23
|
+
} = G(), k = F(c), _ = s(() => {
|
|
24
24
|
var a;
|
|
25
25
|
return (a = o.value) == null ? void 0 : a.productName;
|
|
26
26
|
}), C = s(() => {
|
|
27
27
|
if (!o.value) return;
|
|
28
28
|
const a = new URL(`https://scientist.platforma.bio/product/${o.value.productKey}`);
|
|
29
|
-
return
|
|
30
|
-
}),
|
|
29
|
+
return m.value && a.searchParams.set("email", m.value), a.toString();
|
|
30
|
+
}), h = s(() => o.value ? [
|
|
31
31
|
{
|
|
32
32
|
label: o.value.productName,
|
|
33
33
|
value: o.value.productName
|
|
34
34
|
}
|
|
35
|
-
] : []),
|
|
36
|
-
switch (
|
|
35
|
+
] : []), w = s(() => {
|
|
36
|
+
switch (B.value) {
|
|
37
37
|
case "active":
|
|
38
38
|
return "";
|
|
39
39
|
case "limits_exceeded":
|
|
@@ -44,12 +44,10 @@ const oe = /* @__PURE__ */ h({
|
|
|
44
44
|
return "Select a subscription plan in the Scientist Cabinet.";
|
|
45
45
|
case "inactive":
|
|
46
46
|
return "Not found billing period.";
|
|
47
|
-
case "awaiting":
|
|
48
|
-
return "Waiting for monetization information";
|
|
49
47
|
default:
|
|
50
|
-
return "
|
|
48
|
+
return "";
|
|
51
49
|
}
|
|
52
|
-
}),
|
|
50
|
+
}), z = s(() => v.value ? "monetization-on" : "monetization-off");
|
|
53
51
|
return (a, r) => (n(), P(S, null, [
|
|
54
52
|
e(c) ? (n(), l(e(I), {
|
|
55
53
|
key: 0,
|
|
@@ -65,12 +63,13 @@ const oe = /* @__PURE__ */ h({
|
|
|
65
63
|
d(e(O), {
|
|
66
64
|
label: "Product",
|
|
67
65
|
readonly: "",
|
|
68
|
-
"model-value":
|
|
69
|
-
options:
|
|
66
|
+
"model-value": _.value,
|
|
67
|
+
options: h.value
|
|
70
68
|
}, null, 8, ["model-value", "options"]),
|
|
71
|
-
d(
|
|
72
|
-
"can-run": e(
|
|
73
|
-
"
|
|
69
|
+
d(j, {
|
|
70
|
+
"can-run": e(v),
|
|
71
|
+
"is-loading": e(g),
|
|
72
|
+
"status-text": w.value
|
|
74
73
|
}, {
|
|
75
74
|
default: i(() => [
|
|
76
75
|
d(e(q), {
|
|
@@ -79,30 +78,31 @@ const oe = /* @__PURE__ */ h({
|
|
|
79
78
|
size: "small",
|
|
80
79
|
style: { "margin-left": "auto" },
|
|
81
80
|
icon: "loading",
|
|
82
|
-
loading: e(
|
|
83
|
-
onClick: e(
|
|
81
|
+
loading: e(g),
|
|
82
|
+
onClick: e(V)
|
|
84
83
|
}, null, 8, ["loading", "onClick"])
|
|
85
84
|
]),
|
|
86
85
|
_: 1
|
|
87
|
-
}, 8, ["can-run", "status-text"]),
|
|
88
|
-
e(
|
|
86
|
+
}, 8, ["can-run", "is-loading", "status-text"]),
|
|
87
|
+
e(f) ? (n(), l(e(D), {
|
|
89
88
|
key: 0,
|
|
90
89
|
type: "error"
|
|
91
90
|
}, {
|
|
92
91
|
default: i(() => [
|
|
93
|
-
x(E(e(
|
|
92
|
+
x(E(e(f)), 1)
|
|
94
93
|
]),
|
|
95
94
|
_: 1
|
|
96
95
|
})) : u("", !0),
|
|
97
96
|
C.value ? (n(), l(K, {
|
|
98
97
|
key: 1,
|
|
98
|
+
email: e(m),
|
|
99
99
|
"user-cabinet-url": C.value
|
|
100
|
-
}, null, 8, ["user-cabinet-url"])) : u("", !0),
|
|
101
|
-
e(
|
|
100
|
+
}, null, 8, ["email", "user-cabinet-url"])) : u("", !0),
|
|
101
|
+
e(b) ? (n(), l(J, {
|
|
102
102
|
key: 2,
|
|
103
|
-
"end-of-period": e(
|
|
103
|
+
"end-of-period": e(b)
|
|
104
104
|
}, null, 8, ["end-of-period"])) : u("", !0),
|
|
105
|
-
e(
|
|
105
|
+
e(y) ? (n(!0), P(S, { key: 3 }, L(e(y), (t) => (n(), l(H, {
|
|
106
106
|
key: t.type,
|
|
107
107
|
type: t.type,
|
|
108
108
|
label: t.type,
|
|
@@ -121,7 +121,7 @@ const oe = /* @__PURE__ */ h({
|
|
|
121
121
|
onClick: r[1] || (r[1] = R((t) => p.value = !0, ["stop"]))
|
|
122
122
|
}, {
|
|
123
123
|
append: i(() => [
|
|
124
|
-
d(e(A), { name:
|
|
124
|
+
d(e(A), { name: z.value }, null, 8, ["name"])
|
|
125
125
|
]),
|
|
126
126
|
default: i(() => [
|
|
127
127
|
r[3] || (r[3] = x(" Subscription "))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonetizationSidebar.vue.js","sources":["../../../src/plugins/Monetization/MonetizationSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, computed } from 'vue';\nimport { PlSlideModal, PlBtnGhost, PlDropdown, PlAlert, PlIcon24, PlBtnSecondary } from '@milaboratories/uikit';\nimport { useButtonTarget } from './useButtonTarget';\nimport { useInfo } from './useInfo';\nimport UserCabinetCard from './UserCabinetCard.vue';\nimport RunStatus from './RunStatus.vue';\nimport LimitCard from './LimitCard.vue';\nimport EndOfPeriod from './EndOfPeriod.vue';\n\nconst isOpen = ref(false);\n\nconst {\n result,\n error,\n hasMonetization,\n canRun,\n status,\n customerEmail,\n endOfBillingPeriod,\n limits,\n refresh,\n isLoading,\n} = useInfo();\n\nconst teleportTarget = useButtonTarget(hasMonetization);\n\nconst productName = computed(() => result.value?.productName);\n\nconst userCabinetUrl = computed(() => {\n if (!result.value) return undefined;\n\n const u = new URL(`https://scientist.platforma.bio/product/${result.value.productKey}`);\n\n if (customerEmail.value) {\n u.searchParams.set('email', customerEmail.value);\n }\n\n return u.toString();\n});\n\nconst options = computed(() => {\n if (!result.value) return [];\n\n return [\n {\n label: result.value.productName,\n value: result.value.productName,\n },\n ];\n});\n\nconst statusText = computed(() => {\n switch (status.value) {\n case 'active':\n return '';\n case 'limits_exceeded':\n return 'Usage limits exceeded for the current billing period.';\n case 'payment_required':\n return 'Payment required to continue using the service.';\n case 'select-tariff':\n return 'Select a subscription plan in the Scientist Cabinet.';\n case 'inactive':\n return 'Not found billing period.';\n
|
|
1
|
+
{"version":3,"file":"MonetizationSidebar.vue.js","sources":["../../../src/plugins/Monetization/MonetizationSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, computed } from 'vue';\nimport { PlSlideModal, PlBtnGhost, PlDropdown, PlAlert, PlIcon24, PlBtnSecondary } from '@milaboratories/uikit';\nimport { useButtonTarget } from './useButtonTarget';\nimport { useInfo } from './useInfo';\nimport UserCabinetCard from './UserCabinetCard.vue';\nimport RunStatus from './RunStatus.vue';\nimport LimitCard from './LimitCard.vue';\nimport EndOfPeriod from './EndOfPeriod.vue';\n\nconst isOpen = ref(false);\n\nconst {\n result,\n error,\n hasMonetization,\n canRun,\n status,\n customerEmail,\n endOfBillingPeriod,\n limits,\n refresh,\n isLoading,\n} = useInfo();\n\nconst teleportTarget = useButtonTarget(hasMonetization);\n\nconst productName = computed(() => result.value?.productName);\n\nconst userCabinetUrl = computed(() => {\n if (!result.value) return undefined;\n\n const u = new URL(`https://scientist.platforma.bio/product/${result.value.productKey}`);\n\n if (customerEmail.value) {\n u.searchParams.set('email', customerEmail.value);\n }\n\n return u.toString();\n});\n\nconst options = computed(() => {\n if (!result.value) return [];\n\n return [\n {\n label: result.value.productName,\n value: result.value.productName,\n },\n ];\n});\n\nconst statusText = computed(() => {\n switch (status.value) {\n case 'active':\n return '';\n case 'limits_exceeded':\n return 'Usage limits exceeded for the current billing period.';\n case 'payment_required':\n return 'Payment required to continue using the service.';\n case 'select-tariff':\n return 'Select a subscription plan in the Scientist Cabinet.';\n case 'inactive':\n return 'Not found billing period.';\n default:\n return '';\n }\n});\n\nconst btnIcon = computed(() => {\n if (canRun.value) return 'monetization-on';\n return 'monetization-off';\n});\n</script>\n\n<template>\n <PlSlideModal v-if=\"hasMonetization\" v-model=\"isOpen\">\n <template #title>\n <div class=\"flex items-center gap-2\">\n <span>Subscription</span>\n </div>\n </template>\n <PlDropdown label=\"Product\" readonly :model-value=\"productName\" :options=\"options\" />\n <RunStatus :can-run=\"canRun\" :is-loading=\"isLoading\" :status-text=\"statusText\">\n <PlBtnSecondary\n title=\"Refresh status\"\n round\n size=\"small\"\n style=\"margin-left: auto;\"\n icon=\"loading\"\n :loading=\"isLoading\"\n @click=\"refresh\"\n />\n </RunStatus>\n <PlAlert v-if=\"error\" type=\"error\">\n {{ error }}\n </PlAlert>\n <UserCabinetCard v-if=\"userCabinetUrl\" :email=\"customerEmail\" :user-cabinet-url=\"userCabinetUrl\" />\n <EndOfPeriod v-if=\"endOfBillingPeriod\" :end-of-period=\"endOfBillingPeriod\" />\n <template v-if=\"limits\">\n <LimitCard\n v-for=\"limit in limits\"\n :key=\"limit.type\"\n :type=\"limit.type\"\n :label=\"limit.type\"\n :used=\"limit.used\"\n :to-spend=\"limit.toSpend\"\n :available=\"limit.available\"\n />\n </template>\n </PlSlideModal>\n <!-- Teleport to the title slot -->\n <Teleport v-if=\"hasMonetization && teleportTarget\" :to=\"teleportTarget\">\n <PlBtnGhost @click.stop=\"isOpen = true\">\n Subscription\n <template #append>\n <PlIcon24 :name=\"btnIcon\" />\n </template>\n </PlBtnGhost>\n </Teleport>\n</template>\n"],"names":["isOpen","ref","result","error","hasMonetization","canRun","status","customerEmail","endOfBillingPeriod","limits","refresh","isLoading","useInfo","teleportTarget","useButtonTarget","productName","computed","_a","userCabinetUrl","u","options","statusText","btnIcon"],"mappings":";;;;;;;;;;;AAUA,UAAMA,IAASC,EAAI,EAAK,GAElB;AAAA,MACJ,QAAAC;AAAA,MACA,OAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,QAAAC;AAAA,MACA,QAAAC;AAAA,MACA,eAAAC;AAAA,MACA,oBAAAC;AAAA,MACA,QAAAC;AAAA,MACA,SAAAC;AAAA,MACA,WAAAC;AAAA,IAAA,IACEC,EAAA,GAEEC,IAAiBC,EAAgBV,CAAe,GAEhDW,IAAcC,EAAS,MAAA;;AAAM,cAAAC,IAAAf,EAAO,UAAP,gBAAAe,EAAc;AAAA,KAAW,GAEtDC,IAAiBF,EAAS,MAAM;AACpC,UAAI,CAACd,EAAO,MAAO;AAEnB,YAAMiB,IAAI,IAAI,IAAI,2CAA2CjB,EAAO,MAAM,UAAU,EAAE;AAEtF,aAAIK,EAAc,SAChBY,EAAE,aAAa,IAAI,SAASZ,EAAc,KAAK,GAG1CY,EAAE,SAAA;AAAA,IACX,CAAC,GAEKC,IAAUJ,EAAS,MAClBd,EAAO,QAEL;AAAA,MACL;AAAA,QACE,OAAOA,EAAO,MAAM;AAAA,QACpB,OAAOA,EAAO,MAAM;AAAA,MAAA;AAAA,IACtB,IANwB,CAAA,CAQ3B,GAEKmB,IAAaL,EAAS,MAAM;AAChC,cAAQV,EAAO,OAAA;AAAA,QACb,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT;AACE,iBAAO;AAAA,MAAA;AAAA,IAEb,CAAC,GAEKgB,IAAUN,EAAS,MACnBX,EAAO,QAAc,oBAClB,kBACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,44 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
const $ = /* @__PURE__ */ p({
|
|
1
|
+
import { defineComponent as i, computed as d, createElementBlock as a, openBlock as l, createElementVNode as n, createCommentVNode as p, normalizeClass as s, renderSlot as y, toDisplayString as o } from "vue";
|
|
2
|
+
const g = /* @__PURE__ */ i({
|
|
4
3
|
__name: "RunStatus",
|
|
5
4
|
props: {
|
|
6
5
|
canRun: { type: Boolean },
|
|
7
|
-
statusText: {}
|
|
6
|
+
statusText: {},
|
|
7
|
+
isLoading: { type: Boolean }
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const c = a(() => s.canRun ? "Ready to run" : "Cannot run");
|
|
13
|
-
return (e, m) => (l(), r("div", null, [
|
|
9
|
+
setup(r) {
|
|
10
|
+
const t = r, u = d(() => t.isLoading ? "Updating..." : t.canRun ? "Ready to run" : "Cannot run");
|
|
11
|
+
return (e, c) => (l(), a("div", null, [
|
|
14
12
|
n("div", {
|
|
15
|
-
class:
|
|
13
|
+
class: s([{ [e.$style["can-run"]]: e.canRun, [e.$style.loading]: e.isLoading }, e.$style.container])
|
|
16
14
|
}, [
|
|
17
15
|
n("div", {
|
|
18
|
-
class:
|
|
16
|
+
class: s(e.$style.badge)
|
|
19
17
|
}, [
|
|
20
18
|
n("i", {
|
|
21
|
-
class:
|
|
19
|
+
class: s(e.$style.blob)
|
|
22
20
|
}, [
|
|
23
21
|
n("span", null, [
|
|
24
22
|
n("span", {
|
|
25
|
-
class:
|
|
23
|
+
class: s(e.$style.dot)
|
|
26
24
|
}, null, 2)
|
|
27
25
|
])
|
|
28
26
|
], 2),
|
|
29
|
-
n("span", null, u
|
|
27
|
+
n("span", null, o(u.value), 1)
|
|
30
28
|
], 2),
|
|
31
|
-
|
|
32
|
-
d(e.$slots, "default")
|
|
29
|
+
y(e.$slots, "default")
|
|
33
30
|
], 2),
|
|
34
|
-
e.statusText ? (l(),
|
|
31
|
+
e.statusText ? (l(), a("div", {
|
|
35
32
|
key: 0,
|
|
36
|
-
class:
|
|
37
|
-
},
|
|
33
|
+
class: s(e.$style.statusText)
|
|
34
|
+
}, o(e.statusText), 3)) : p("", !0)
|
|
38
35
|
]));
|
|
39
36
|
}
|
|
40
37
|
});
|
|
41
38
|
export {
|
|
42
|
-
|
|
39
|
+
g as default
|
|
43
40
|
};
|
|
44
41
|
//# sourceMappingURL=RunStatus.vue2.js.map
|