@platforma-sdk/ui-vue 1.54.1 → 1.54.7
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 +142 -195
- package/.turbo/turbo-formatter$colon$check.log +2 -2
- package/.turbo/turbo-linter$colon$check.log +2 -2
- package/.turbo/turbo-types$colon$check.log +1 -1
- package/CHANGELOG.md +9 -0
- package/dist/AgGridVue/useAgGridOptions.js +2 -3
- package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
- package/dist/components/PlAdvancedFilter/constants.d.ts +1 -1
- package/dist/components/PlAdvancedFilter/index.d.ts +2 -2
- package/dist/components/PlAdvancedFilter/index.d.ts.map +1 -1
- package/dist/components/PlAdvancedFilter/index.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js +135 -146
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgRowCount.vue.js +7 -8
- package/dist/components/PlAgDataTable/PlAgRowCount.vue.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-state-v2.d.ts +3 -2
- package/dist/components/PlAgDataTable/sources/table-state-v2.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-state-v2.js +93 -96
- package/dist/components/PlAgDataTable/sources/table-state-v2.js.map +1 -1
- package/dist/components/PlAgDataTable/types.d.ts +3 -44
- package/dist/components/PlAgDataTable/types.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/types.js +26 -42
- package/dist/components/PlAgDataTable/types.js.map +1 -1
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js +9 -10
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js.map +1 -1
- package/dist/components/PlAgRowNumHeader.vue.js +8 -9
- package/dist/components/PlAgRowNumHeader.vue.js.map +1 -1
- package/dist/components/PlAnnotations/components/FilterSidebar.vue.d.ts.map +1 -1
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +76 -74
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js.map +1 -1
- package/dist/components/PlTableFilters/PlTableFiltersV2.vue.d.ts +7 -9
- package/dist/components/PlTableFilters/PlTableFiltersV2.vue.d.ts.map +1 -1
- package/dist/components/PlTableFilters/PlTableFiltersV2.vue2.js +82 -132
- package/dist/components/PlTableFilters/PlTableFiltersV2.vue2.js.map +1 -1
- package/dist/components/PlTableFilters/PlTableFiltersV2.vue3.js +4 -17
- package/dist/components/PlTableFilters/PlTableFiltersV2.vue3.js.map +1 -1
- package/dist/components/PlTableFilters/index.d.ts +0 -1
- package/dist/components/PlTableFilters/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/src/components/PlAdvancedFilter/index.ts +1 -1
- package/src/components/PlAgDataTable/PlAgDataTableV2.vue +3 -22
- package/src/components/PlAgDataTable/sources/table-state-v2.ts +66 -59
- package/src/components/PlAgDataTable/types.ts +15 -78
- package/src/components/PlAnnotations/components/FilterSidebar.vue +3 -6
- package/src/components/PlTableFilters/PlTableFiltersV2.vue +100 -232
- package/src/components/PlTableFilters/index.ts +0 -1
- package/dist/_virtual/index.js +0 -6
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/re.js +0 -5
- package/dist/_virtual/re.js.map +0 -1
- package/dist/components/PlTableFilters/PlTableAddFilterV2.vue.d.ts +0 -15
- package/dist/components/PlTableFilters/PlTableAddFilterV2.vue.d.ts.map +0 -1
- package/dist/components/PlTableFilters/PlTableAddFilterV2.vue.js +0 -97
- package/dist/components/PlTableFilters/PlTableAddFilterV2.vue.js.map +0 -1
- package/dist/components/PlTableFilters/PlTableAddFilterV2.vue2.js +0 -5
- package/dist/components/PlTableFilters/PlTableAddFilterV2.vue2.js.map +0 -1
- package/dist/components/PlTableFilters/PlTableFilterEntryV2.vue.d.ts +0 -11
- package/dist/components/PlTableFilters/PlTableFilterEntryV2.vue.d.ts.map +0 -1
- package/dist/components/PlTableFilters/PlTableFilterEntryV2.vue.js +0 -142
- package/dist/components/PlTableFilters/PlTableFilterEntryV2.vue.js.map +0 -1
- package/dist/components/PlTableFilters/PlTableFilterEntryV2.vue2.js +0 -5
- package/dist/components/PlTableFilters/PlTableFilterEntryV2.vue2.js.map +0 -1
- package/dist/components/PlTableFilters/filters-state.d.ts +0 -7
- package/dist/components/PlTableFilters/filters-state.d.ts.map +0 -1
- package/dist/components/PlTableFilters/filters-state.js +0 -79
- package/dist/components/PlTableFilters/filters-state.js.map +0 -1
- package/dist/components/PlTableFilters/filters_logic.d.ts +0 -24
- package/dist/components/PlTableFilters/filters_logic.d.ts.map +0 -1
- package/dist/components/PlTableFilters/filters_logic.js +0 -348
- package/dist/components/PlTableFilters/filters_logic.js.map +0 -1
- package/dist/components/PlTableFilters/types.d.ts +0 -26
- package/dist/components/PlTableFilters/types.d.ts.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js +0 -57
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js +0 -149
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js +0 -170
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js +0 -40
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js +0 -34
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js +0 -25
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js +0 -22
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js +0 -22
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js +0 -98
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js +0 -29
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js +0 -9
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js +0 -17
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js +0 -33
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js +0 -33
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js +0 -23
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js +0 -23
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js +0 -43
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js +0 -45
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js +0 -25
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js +0 -95
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js.map +0 -1
- package/src/components/PlTableFilters/PlTableAddFilterV2.vue +0 -84
- package/src/components/PlTableFilters/PlTableFilterEntryV2.vue +0 -157
- package/src/components/PlTableFilters/filters-state.ts +0 -152
- package/src/components/PlTableFilters/filters_logic.ts +0 -444
- package/src/components/PlTableFilters/types.ts +0 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PlAgDataTable/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PlAgDataTable/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,60 +1,44 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import
|
|
3
|
-
import { deepClone as
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
sourceId: JSON.parse(e.sourceId),
|
|
9
|
-
column: e.column
|
|
10
|
-
});
|
|
11
|
-
} catch (l) {
|
|
12
|
-
return console.error(
|
|
13
|
-
`filtersConfig failed for sourceId: ${e.sourceId}, column: ${JSON.stringify(e.column)} - using default config`,
|
|
14
|
-
l
|
|
15
|
-
), {};
|
|
16
|
-
}
|
|
17
|
-
} : () => ({});
|
|
18
|
-
return a(() => {
|
|
19
|
-
const e = n(t(s.model));
|
|
20
|
-
let l;
|
|
1
|
+
import { computed as d, toValue as t } from "vue";
|
|
2
|
+
import u from "canonicalize";
|
|
3
|
+
import { deepClone as o } from "../../lib/util/helpers/dist/objects.js";
|
|
4
|
+
function m(l) {
|
|
5
|
+
return d(() => {
|
|
6
|
+
const e = o(t(l.model));
|
|
7
|
+
let r;
|
|
21
8
|
if (!e.ok)
|
|
22
|
-
|
|
23
|
-
else if ("sourceId" in
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
sourceId:
|
|
29
|
-
sheets:
|
|
9
|
+
e.errors.forEach((s) => console.error("Error in PlDataTableModel:", s)), r = { sourceId: null, pending: !1 };
|
|
10
|
+
else if ("sourceId" in l) {
|
|
11
|
+
const s = o(t(l.sourceId));
|
|
12
|
+
if (l.sheets) {
|
|
13
|
+
const a = o(t(l.sheets));
|
|
14
|
+
r = s && a ? {
|
|
15
|
+
sourceId: u(s),
|
|
16
|
+
sheets: a,
|
|
30
17
|
model: e.value
|
|
31
18
|
} : { sourceId: null, pending: !e.stable };
|
|
32
19
|
} else
|
|
33
|
-
|
|
34
|
-
sourceId:
|
|
20
|
+
r = s ? {
|
|
21
|
+
sourceId: u(s),
|
|
35
22
|
sheets: [],
|
|
36
23
|
model: e.value
|
|
37
24
|
} : { sourceId: null, pending: !e.stable };
|
|
38
|
-
} else if (
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
sourceId:
|
|
42
|
-
sheets:
|
|
25
|
+
} else if (l.sheets) {
|
|
26
|
+
const s = o(t(l.sheets));
|
|
27
|
+
r = s ? {
|
|
28
|
+
sourceId: u("static"),
|
|
29
|
+
sheets: s,
|
|
43
30
|
model: e.value
|
|
44
31
|
} : { sourceId: null, pending: !e.stable };
|
|
45
32
|
} else
|
|
46
|
-
|
|
47
|
-
sourceId:
|
|
33
|
+
r = e.value ? {
|
|
34
|
+
sourceId: u("static"),
|
|
48
35
|
sheets: [],
|
|
49
36
|
model: e.value
|
|
50
37
|
} : { sourceId: null, pending: !e.stable };
|
|
51
|
-
return
|
|
52
|
-
...l,
|
|
53
|
-
filtersConfig: d
|
|
54
|
-
};
|
|
38
|
+
return r;
|
|
55
39
|
});
|
|
56
40
|
}
|
|
57
41
|
export {
|
|
58
|
-
|
|
42
|
+
m as usePlDataTableSettingsV2
|
|
59
43
|
};
|
|
60
44
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/components/PlAgDataTable/types.ts"],"sourcesContent":["import type {\n JsonCompatible,\n AxisId,\n CanonicalizedJson,\n ListOptionBase,\n PlDataTableModel,\n PlDataTableSheet,\n PlDataTableSheetState,\n PlTableFilter,\n PlTableFilterType,\n PTableColumnId,\n PTableColumnSpec,\n PTableKey,\n PTableValue,\n OutputWithStatus,\n} from \"@platforma-sdk/model\";\nimport type { PTableHidden } from \"./sources/common\";\nimport type { ComputedRef, MaybeRefOrGetter } from \"vue\";\nimport { computed, toValue } from \"vue\";\nimport canonicalize from \"canonicalize\";\nimport { deepClone } from \"@milaboratories/helpers\";\n\nexport type PlDataTableFilterConfig = {\n options?: PlTableFilterType[];\n default?: PlTableFilter;\n};\n\nexport type PlDataTableSettingsV2Base =\n | { sourceId: null; pending: boolean }\n | {\n /** Unique source id for state caching */\n sourceId: string;\n /** Sheets that we want to show in our table */\n sheets: PlDataTableSheet[];\n /** Result of `createPlDataTableV2` */\n model: PlDataTableModel | undefined;\n };\n\n/** Data table V2 settings */\nexport type PlDataTableSettingsV2 = PlDataTableSettingsV2Base & {\n /** Callback configuring filters for the table */\n filtersConfig: (info: { sourceId: string; column: PTableColumnSpec }) => PlDataTableFilterConfig;\n};\n\ntype OptionsBasic = {\n /** Block output created by `createPlDataTableV2` */\n model: MaybeRefOrGetter<OutputWithStatus<PlDataTableModel | undefined>>;\n /**\n * Sheets for partitioned data sources.\n * Do not set if data source is never partitioned.\n */\n sheets?: MaybeRefOrGetter<PlDataTableSheet[] | undefined>;\n};\n\ntype OptionsSimple = OptionsBasic & {\n /**\n * Callback configuring filters for the table.\n * If not provided, filtering will be disabled.\n */\n filtersConfig?: (info: { column: PTableColumnSpec }) => PlDataTableFilterConfig;\n};\n\ntype OptionsAdvanced<T> = OptionsBasic & {\n /**\n * Block property (such as inputAnchor) used to produce the data source.\n * Mandatory for cases when the table can change without block run.\n * Skip when the table is changed only after block run.\n * Ask developers for help if you don't know what to set here.\n */\n sourceId: MaybeRefOrGetter<T | undefined>;\n /**\n * Callback configuring filters for the table.\n * If not provided, filtering will be disabled.\n * Parameter `sourceId` should be compared using `isJsonEqual` from `@milaboratories/helpers`.\n */\n filtersConfig?: (info: {\n sourceId: JsonCompatible<T>;\n column: PTableColumnSpec;\n }) => PlDataTableFilterConfig;\n};\n\nexport function usePlDataTableSettingsV2<T>(\n options: OptionsAdvanced<T>,\n): ComputedRef<PlDataTableSettingsV2>;\nexport function usePlDataTableSettingsV2(\n options: OptionsSimple,\n): ComputedRef<PlDataTableSettingsV2>;\nexport function usePlDataTableSettingsV2<T>(\n options: OptionsAdvanced<T> | OptionsSimple,\n): ComputedRef<PlDataTableSettingsV2> {\n const fc = options.filtersConfig;\n const filtersConfigValue =\n typeof fc === \"function\"\n ? (ops: { sourceId: string; column: PTableColumnSpec }) => {\n try {\n return fc({\n sourceId: JSON.parse(ops.sourceId) as JsonCompatible<T>,\n column: ops.column,\n });\n } catch (e) {\n console.error(\n `filtersConfig failed for sourceId: ${ops.sourceId}, column: ${JSON.stringify(ops.column)} - using default config`,\n e,\n );\n return {};\n }\n }\n : () => ({});\n return computed(() => {\n const model = deepClone(toValue(options.model));\n let settingsBase: PlDataTableSettingsV2Base;\n if (!model.ok) {\n settingsBase = { sourceId: null, pending: false };\n } else if (\"sourceId\" in options) {\n const sourceIdValue = deepClone(toValue(options.sourceId));\n if (options.sheets) {\n const sheetsValue = deepClone(toValue(options.sheets));\n settingsBase =\n sourceIdValue && sheetsValue\n ? {\n sourceId: canonicalize(sourceIdValue)!,\n sheets: sheetsValue,\n model: model.value,\n }\n : { sourceId: null, pending: !model.stable };\n } else {\n settingsBase = sourceIdValue\n ? {\n sourceId: canonicalize(sourceIdValue)!,\n sheets: [],\n model: model.value,\n }\n : { sourceId: null, pending: !model.stable };\n }\n } else {\n if (options.sheets) {\n const sheetsValue = deepClone(toValue(options.sheets));\n settingsBase = sheetsValue\n ? {\n sourceId: canonicalize(\"static\")!,\n sheets: sheetsValue,\n model: model.value,\n }\n : { sourceId: null, pending: !model.stable };\n } else {\n settingsBase = model.value\n ? {\n sourceId: canonicalize(\"static\")!,\n sheets: [],\n model: model.value,\n }\n : { sourceId: null, pending: !model.stable };\n }\n }\n return {\n ...settingsBase,\n filtersConfig: filtersConfigValue,\n };\n });\n}\n\n/** PlTableFilters restriction entry */\nexport type PlTableFiltersRestriction = {\n /** Spec of the column for which filter types should be restricted */\n column: PTableColumnId;\n /** List of filter types applicable to the column */\n allowedFilterTypes: PlTableFilterType[];\n};\n\n/** PlTableFilters default settings entry */\nexport type PlTableFiltersDefault = {\n /** Spec of the column the default should be applied */\n column: PTableColumnId;\n /** Filter entry */\n default: PlTableFilter;\n};\n\n/** PlAgDataTable controller contains all exported methods */\nexport type PlAgDataTableV2Controller = {\n /**\n * Scroll table to make row with provided key visible\n * Warning: works reliably only in client side mode.\n * @returns `true` if row was found and focused, `false` otherwise\n */\n focusRow: (rowKey: PTableKey) => Promise<boolean>;\n /**\n * Update selection in the table.\n * @param axesIds - axes ids identifying axes key values in `selectedKeys`\n * @param selectedKeys - axes keys of the rows to select\n * Warning: update will be ignored if axes ids cannot be correctly resolved\n * @returns `true` if selection was updated, `false` otherwise\n */\n updateSelection: ({\n axesSpec,\n selectedKeys,\n }: {\n axesSpec: AxisId[];\n selectedKeys: PTableKey[];\n }) => Promise<boolean>;\n};\n\nexport type PlTableRowId = PTableKey;\n\nexport type PlTableRowIdJson = CanonicalizedJson<PTableKey>;\n\n/** PlAgDataTableV2 row */\nexport type PlAgDataTableV2Row = {\n /** Axes key */\n axesKey: PTableKey;\n /** Unique row identifier */\n id: PlTableRowIdJson;\n /** Row values by column; sheet axes and labeled axes are excluded */\n [field: `${number}`]: PTableValue | PTableHidden;\n};\n\nexport type PlAgOverlayLoadingParams = {\n /**\n * Required flag, that shows catInBag icon with message if `true`, shows PlSplash component if `false`.\n */\n variant: \"not-ready\" | \"running\" | \"loading\";\n /**\n * Prop to override default \"Loading data...\" text and the subtitles\n */\n loadingText?:\n | string\n | {\n title: string;\n subtitle: string | string[];\n };\n /**\n * Prop to override default \"Running analysis...\" text and the subtitles\n */\n runningText?:\n | string\n | {\n title: string;\n subtitle: string | string[];\n };\n /**\n * Prop to override default \"Data is not computed\" text (So why props name is notReady? Good question)\n */\n notReadyText?: string;\n};\n\nexport type PlAgOverlayNoRowsParams = {\n /**\n * Prop to override default \"Empty\" text\n */\n text?: string;\n};\n\nexport type PlDataTableSheetsSettings = {\n /** User-provided sheets for the sourceId */\n sheets: PlDataTableSheet[];\n /** Persisted selection for the sourceId */\n cachedState: PlDataTableSheetState[];\n};\n\nexport type PlDataTableSheetNormalized = {\n /** id of the axis */\n axisId: AxisId;\n /** sheet prefix */\n prefix: string;\n /** options to show in the filter dropdown */\n options: ListOptionBase<string | number>[];\n /** default (selected) value */\n defaultValue: string | number;\n};\n"],"names":["usePlDataTableSettingsV2","options","fc","filtersConfigValue","ops","e","computed","model","deepClone","toValue","settingsBase","sourceIdValue","sheetsValue","canonicalize"],"mappings":";;;AAuFO,SAASA,EACdC,GACoC;AACpC,QAAMC,IAAKD,EAAQ,eACbE,IACJ,OAAOD,KAAO,aACV,CAACE,MAAwD;AACvD,QAAI;AACF,aAAOF,EAAG;AAAA,QACR,UAAU,KAAK,MAAME,EAAI,QAAQ;AAAA,QACjC,QAAQA,EAAI;AAAA,MAAA,CACb;AAAA,IACH,SAASC,GAAG;AACV,qBAAQ;AAAA,QACN,sCAAsCD,EAAI,QAAQ,aAAa,KAAK,UAAUA,EAAI,MAAM,CAAC;AAAA,QACzFC;AAAA,MAAA,GAEK,CAAA;AAAA,IACT;AAAA,EACF,IACA,OAAO,CAAA;AACb,SAAOC,EAAS,MAAM;AACpB,UAAMC,IAAQC,EAAUC,EAAQR,EAAQ,KAAK,CAAC;AAC9C,QAAIS;AACJ,QAAI,CAACH,EAAM;AACT,MAAAG,IAAe,EAAE,UAAU,MAAM,SAAS,GAAA;AAAA,aACjC,cAAcT,GAAS;AAChC,YAAMU,IAAgBH,EAAUC,EAAQR,EAAQ,QAAQ,CAAC;AACzD,UAAIA,EAAQ,QAAQ;AAClB,cAAMW,IAAcJ,EAAUC,EAAQR,EAAQ,MAAM,CAAC;AACrD,QAAAS,IACEC,KAAiBC,IACb;AAAA,UACE,UAAUC,EAAaF,CAAa;AAAA,UACpC,QAAQC;AAAA,UACR,OAAOL,EAAM;AAAA,QAAA,IAEf,EAAE,UAAU,MAAM,SAAS,CAACA,EAAM,OAAA;AAAA,MAC1C;AACE,QAAAG,IAAeC,IACX;AAAA,UACE,UAAUE,EAAaF,CAAa;AAAA,UACpC,QAAQ,CAAA;AAAA,UACR,OAAOJ,EAAM;AAAA,QAAA,IAEf,EAAE,UAAU,MAAM,SAAS,CAACA,EAAM,OAAA;AAAA,IAE1C,WACMN,EAAQ,QAAQ;AAClB,YAAMW,IAAcJ,EAAUC,EAAQR,EAAQ,MAAM,CAAC;AACrD,MAAAS,IAAeE,IACX;AAAA,QACE,UAAUC,EAAa,QAAQ;AAAA,QAC/B,QAAQD;AAAA,QACR,OAAOL,EAAM;AAAA,MAAA,IAEf,EAAE,UAAU,MAAM,SAAS,CAACA,EAAM,OAAA;AAAA,IACxC;AACE,MAAAG,IAAeH,EAAM,QACjB;AAAA,QACE,UAAUM,EAAa,QAAQ;AAAA,QAC/B,QAAQ,CAAA;AAAA,QACR,OAAON,EAAM;AAAA,MAAA,IAEf,EAAE,UAAU,MAAM,SAAS,CAACA,EAAM,OAAA;AAG1C,WAAO;AAAA,MACL,GAAGG;AAAA,MACH,eAAeP;AAAA,IAAA;AAAA,EAEnB,CAAC;AACH;"}
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/PlAgDataTable/types.ts"],"sourcesContent":["import {\n type AxisId,\n type CanonicalizedJson,\n type ListOptionBase,\n type PlDataTableModel,\n type PlDataTableSheet,\n type PlDataTableSheetState,\n type PTableKey,\n type PTableValue,\n type OutputWithStatus,\n} from \"@platforma-sdk/model\";\nimport type { PTableHidden } from \"./sources/common\";\nimport type { ComputedRef, MaybeRefOrGetter } from \"vue\";\nimport { computed, toValue } from \"vue\";\nimport canonicalize from \"canonicalize\";\nimport { deepClone } from \"@milaboratories/helpers\";\n\nexport type PlDataTableSettingsV2Base =\n | { sourceId: null; pending: boolean }\n | {\n /** Unique source id for state caching */\n sourceId: string;\n /** Sheets that we want to show in our table */\n sheets: PlDataTableSheet[];\n /** Result of `createPlDataTableV2` */\n model: PlDataTableModel | undefined;\n };\n\n/** Data table V2 settings */\nexport type PlDataTableSettingsV2 = PlDataTableSettingsV2Base;\n\ntype OptionsBasic = {\n /** Block output created by `createPlDataTableV2` */\n model: MaybeRefOrGetter<OutputWithStatus<PlDataTableModel | undefined>>;\n /**\n * Sheets for partitioned data sources.\n * Do not set if data source is never partitioned.\n */\n sheets?: MaybeRefOrGetter<PlDataTableSheet[] | undefined>;\n};\n\ntype OptionsSimple = OptionsBasic;\n\ntype OptionsAdvanced<T> = OptionsBasic & {\n /**\n * Block property (such as inputAnchor) used to produce the data source.\n * Mandatory for cases when the table can change without block run.\n * Skip when the table is changed only after block run.\n * Ask developers for help if you don't know what to set here.\n */\n sourceId: MaybeRefOrGetter<T | undefined>;\n};\n\nexport function usePlDataTableSettingsV2<T>(\n options: OptionsAdvanced<T>,\n): ComputedRef<PlDataTableSettingsV2>;\nexport function usePlDataTableSettingsV2(\n options: OptionsSimple,\n): ComputedRef<PlDataTableSettingsV2>;\nexport function usePlDataTableSettingsV2<T>(\n options: OptionsAdvanced<T> | OptionsSimple,\n): ComputedRef<PlDataTableSettingsV2> {\n return computed(() => {\n const model = deepClone(toValue(options.model));\n let settingsBase: PlDataTableSettingsV2Base;\n\n if (!model.ok) {\n model.errors.forEach((e) => console.error(\"Error in PlDataTableModel:\", e));\n settingsBase = { sourceId: null, pending: false };\n } else if (\"sourceId\" in options) {\n const sourceIdValue = deepClone(toValue(options.sourceId));\n if (options.sheets) {\n const sheetsValue = deepClone(toValue(options.sheets));\n settingsBase =\n sourceIdValue && sheetsValue\n ? {\n sourceId: canonicalize(sourceIdValue)!,\n sheets: sheetsValue,\n model: model.value,\n }\n : { sourceId: null, pending: !model.stable };\n } else {\n settingsBase = sourceIdValue\n ? {\n sourceId: canonicalize(sourceIdValue)!,\n sheets: [],\n model: model.value,\n }\n : { sourceId: null, pending: !model.stable };\n }\n } else {\n if (options.sheets) {\n const sheetsValue = deepClone(toValue(options.sheets));\n settingsBase = sheetsValue\n ? {\n sourceId: canonicalize(\"static\")!,\n sheets: sheetsValue,\n model: model.value,\n }\n : { sourceId: null, pending: !model.stable };\n } else {\n settingsBase = model.value\n ? {\n sourceId: canonicalize(\"static\")!,\n sheets: [],\n model: model.value,\n }\n : { sourceId: null, pending: !model.stable };\n }\n }\n return settingsBase;\n });\n}\n\n/** PlAgDataTable controller contains all exported methods */\nexport type PlAgDataTableV2Controller = {\n /**\n * Scroll table to make row with provided key visible\n * Warning: works reliably only in client side mode.\n * @returns `true` if row was found and focused, `false` otherwise\n */\n focusRow: (rowKey: PTableKey) => Promise<boolean>;\n /**\n * Update selection in the table.\n * @param axesIds - axes ids identifying axes key values in `selectedKeys`\n * @param selectedKeys - axes keys of the rows to select\n * Warning: update will be ignored if axes ids cannot be correctly resolved\n * @returns `true` if selection was updated, `false` otherwise\n */\n updateSelection: ({\n axesSpec,\n selectedKeys,\n }: {\n axesSpec: AxisId[];\n selectedKeys: PTableKey[];\n }) => Promise<boolean>;\n};\n\nexport type PlTableRowId = PTableKey;\n\nexport type PlTableRowIdJson = CanonicalizedJson<PTableKey>;\n\n/** PlAgDataTableV2 row */\nexport type PlAgDataTableV2Row = {\n /** Axes key */\n axesKey: PTableKey;\n /** Unique row identifier */\n id: PlTableRowIdJson;\n /** Row values by column; sheet axes and labeled axes are excluded */\n [field: `${number}`]: PTableValue | PTableHidden;\n};\n\nexport type PlAgOverlayLoadingParams = {\n /**\n * Required flag, that shows catInBag icon with message if `true`, shows PlSplash component if `false`.\n */\n variant: \"not-ready\" | \"running\" | \"loading\";\n /**\n * Prop to override default \"Loading data...\" text and the subtitles\n */\n loadingText?:\n | string\n | {\n title: string;\n subtitle: string | string[];\n };\n /**\n * Prop to override default \"Running analysis...\" text and the subtitles\n */\n runningText?:\n | string\n | {\n title: string;\n subtitle: string | string[];\n };\n /**\n * Prop to override default \"Data is not computed\" text (So why props name is notReady? Good question)\n */\n notReadyText?: string;\n};\n\nexport type PlAgOverlayNoRowsParams = {\n /**\n * Prop to override default \"Empty\" text\n */\n text?: string;\n};\n\nexport type PlDataTableSheetsSettings = {\n /** User-provided sheets for the sourceId */\n sheets: PlDataTableSheet[];\n /** Persisted selection for the sourceId */\n cachedState: PlDataTableSheetState[];\n};\n\nexport type PlDataTableSheetNormalized = {\n /** id of the axis */\n axisId: AxisId;\n /** sheet prefix */\n prefix: string;\n /** options to show in the filter dropdown */\n options: ListOptionBase<string | number>[];\n /** default (selected) value */\n defaultValue: string | number;\n};\n"],"names":["usePlDataTableSettingsV2","options","computed","model","deepClone","toValue","settingsBase","e","sourceIdValue","sheetsValue","canonicalize"],"mappings":";;;AA2DO,SAASA,EACdC,GACoC;AACpC,SAAOC,EAAS,MAAM;AACpB,UAAMC,IAAQC,EAAUC,EAAQJ,EAAQ,KAAK,CAAC;AAC9C,QAAIK;AAEJ,QAAI,CAACH,EAAM;AACT,MAAAA,EAAM,OAAO,QAAQ,CAACI,MAAM,QAAQ,MAAM,8BAA8BA,CAAC,CAAC,GAC1ED,IAAe,EAAE,UAAU,MAAM,SAAS,GAAA;AAAA,aACjC,cAAcL,GAAS;AAChC,YAAMO,IAAgBJ,EAAUC,EAAQJ,EAAQ,QAAQ,CAAC;AACzD,UAAIA,EAAQ,QAAQ;AAClB,cAAMQ,IAAcL,EAAUC,EAAQJ,EAAQ,MAAM,CAAC;AACrD,QAAAK,IACEE,KAAiBC,IACb;AAAA,UACE,UAAUC,EAAaF,CAAa;AAAA,UACpC,QAAQC;AAAA,UACR,OAAON,EAAM;AAAA,QAAA,IAEf,EAAE,UAAU,MAAM,SAAS,CAACA,EAAM,OAAA;AAAA,MAC1C;AACE,QAAAG,IAAeE,IACX;AAAA,UACE,UAAUE,EAAaF,CAAa;AAAA,UACpC,QAAQ,CAAA;AAAA,UACR,OAAOL,EAAM;AAAA,QAAA,IAEf,EAAE,UAAU,MAAM,SAAS,CAACA,EAAM,OAAA;AAAA,IAE1C,WACMF,EAAQ,QAAQ;AAClB,YAAMQ,IAAcL,EAAUC,EAAQJ,EAAQ,MAAM,CAAC;AACrD,MAAAK,IAAeG,IACX;AAAA,QACE,UAAUC,EAAa,QAAQ;AAAA,QAC/B,QAAQD;AAAA,QACR,OAAON,EAAM;AAAA,MAAA,IAEf,EAAE,UAAU,MAAM,SAAS,CAACA,EAAM,OAAA;AAAA,IACxC;AACE,MAAAG,IAAeH,EAAM,QACjB;AAAA,QACE,UAAUO,EAAa,QAAQ;AAAA,QAC/B,QAAQ,CAAA;AAAA,QACR,OAAOP,EAAM;AAAA,MAAA,IAEf,EAAE,UAAU,MAAM,SAAS,CAACA,EAAM,OAAA;AAG1C,WAAOG;AAAA,EACT,CAAC;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as C, ref as d, computed as h, onBeforeMount as w, onBeforeUnmount as b, createElementBlock as u, openBlock as
|
|
1
|
+
import { defineComponent as C, ref as d, computed as h, onBeforeMount as w, onBeforeUnmount as b, createElementBlock as u, openBlock as l, normalizeClass as i, unref as t, createCommentVNode as f, createBlock as y, toDisplayString as B } from "vue";
|
|
2
2
|
import { PlCheckbox as E } from "@milaboratories/uikit";
|
|
3
3
|
import r from "./pl-ag-row-num-checkbox.module.scss.js";
|
|
4
4
|
/* empty css */
|
|
@@ -11,7 +11,6 @@ import "../../aggrid.js";
|
|
|
11
11
|
import "../../plugins/Monetization/validation.js";
|
|
12
12
|
import "ag-grid-vue3";
|
|
13
13
|
import "ag-grid-enterprise";
|
|
14
|
-
import "../../_virtual/index.js";
|
|
15
14
|
/* empty css */
|
|
16
15
|
/* empty css */
|
|
17
16
|
/* empty css */
|
|
@@ -24,7 +23,7 @@ import { isSelectionEnabled as n } from "../../AgGridVue/selection.js";
|
|
|
24
23
|
import "es-toolkit/compat";
|
|
25
24
|
import "@zip.js/zip.js";
|
|
26
25
|
import "../../composition/fileContent.js";
|
|
27
|
-
const
|
|
26
|
+
const X = /* @__PURE__ */ C({
|
|
28
27
|
__name: "PlAgRowNumCheckbox",
|
|
29
28
|
props: {
|
|
30
29
|
params: {}
|
|
@@ -39,8 +38,8 @@ const Y = /* @__PURE__ */ C({
|
|
|
39
38
|
e.params.node.addEventListener("rowSelected", m);
|
|
40
39
|
}), b(() => {
|
|
41
40
|
e.params.node.removeEventListener("rowSelected", m);
|
|
42
|
-
}), (s, c) => (
|
|
43
|
-
class:
|
|
41
|
+
}), (s, c) => (l(), u("div", {
|
|
42
|
+
class: i([
|
|
44
43
|
t(r).container,
|
|
45
44
|
{ [t(r)["allowed-selection"]]: k.value },
|
|
46
45
|
"d-flex",
|
|
@@ -48,23 +47,23 @@ const Y = /* @__PURE__ */ C({
|
|
|
48
47
|
"align-center"
|
|
49
48
|
])
|
|
50
49
|
}, [
|
|
51
|
-
o.value ? f("", !0) : (
|
|
50
|
+
o.value ? f("", !0) : (l(), u("div", {
|
|
52
51
|
key: 0,
|
|
53
|
-
class:
|
|
52
|
+
class: i([t(r).text])
|
|
54
53
|
}, B(p.params.value), 3)),
|
|
55
|
-
v.value ? (
|
|
54
|
+
v.value ? (l(), y(t(E), {
|
|
56
55
|
key: 1,
|
|
57
56
|
modelValue: o.value,
|
|
58
57
|
"onUpdate:modelValue": [
|
|
59
58
|
c[0] || (c[0] = (x) => o.value = x),
|
|
60
59
|
S
|
|
61
60
|
],
|
|
62
|
-
class:
|
|
61
|
+
class: i([t(r).checkbox, o.value && t(r).checked])
|
|
63
62
|
}, null, 8, ["modelValue", "class"])) : f("", !0)
|
|
64
63
|
], 2));
|
|
65
64
|
}
|
|
66
65
|
});
|
|
67
66
|
export {
|
|
68
|
-
|
|
67
|
+
X as default
|
|
69
68
|
};
|
|
70
69
|
//# sourceMappingURL=PlAgRowNumCheckbox.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAgRowNumCheckbox.vue.js","sources":["../../../src/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ICellRendererParams } from \"ag-grid-enterprise\";\nimport { PlCheckbox } from \"@milaboratories/uikit\";\nimport { ref, computed, onBeforeMount, onBeforeUnmount } from \"vue\";\nimport $styles from \"./pl-ag-row-num-checkbox.module.scss\";\nimport { isSelectionEnabled } from \"../../lib\";\n\nconst props = defineProps<{ params: ICellRendererParams }>();\n\nconst api = props.params.api;\nconst isChecked = ref(!!props.params.node.isSelected());\nconst forceShowCheckbox = computed(() => isChecked.value || isSelectionEnabled(api));\nconst allowedSelection = ref(isSelectionEnabled(api));\n\nconst updateSelection = () => {\n isChecked.value = props.params.node.isSelected() !== false;\n};\n\nconst setSelection = (val: boolean) => {\n if (isSelectionEnabled(api)) {\n props.params.node.setSelected(val);\n updateSelection();\n }\n};\n\nonBeforeMount(() => {\n props.params.node.addEventListener(\"rowSelected\", updateSelection);\n});\n\nonBeforeUnmount(() => {\n props.params.node.removeEventListener(\"rowSelected\", updateSelection);\n});\n</script>\n\n<template>\n <div\n :class=\"[\n $styles.container,\n { [$styles['allowed-selection']]: allowedSelection },\n 'd-flex',\n 'justify-center',\n 'align-center',\n ]\"\n >\n <div v-if=\"!isChecked\" :class=\"[$styles.text]\">{{ params.value }}</div>\n <PlCheckbox\n v-if=\"forceShowCheckbox\"\n v-model=\"isChecked\"\n :class=\"[$styles.checkbox, isChecked && $styles.checked]\"\n @update:modelValue=\"setSelection\"\n />\n </div>\n</template>\n"],"names":["props","__props","api","isChecked","ref","forceShowCheckbox","computed","isSelectionEnabled","allowedSelection","updateSelection","setSelection","val","onBeforeMount","onBeforeUnmount","_createElementBlock","_normalizeClass","_unref","$styles","_toDisplayString","_createBlock","PlCheckbox","$event"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlAgRowNumCheckbox.vue.js","sources":["../../../src/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ICellRendererParams } from \"ag-grid-enterprise\";\nimport { PlCheckbox } from \"@milaboratories/uikit\";\nimport { ref, computed, onBeforeMount, onBeforeUnmount } from \"vue\";\nimport $styles from \"./pl-ag-row-num-checkbox.module.scss\";\nimport { isSelectionEnabled } from \"../../lib\";\n\nconst props = defineProps<{ params: ICellRendererParams }>();\n\nconst api = props.params.api;\nconst isChecked = ref(!!props.params.node.isSelected());\nconst forceShowCheckbox = computed(() => isChecked.value || isSelectionEnabled(api));\nconst allowedSelection = ref(isSelectionEnabled(api));\n\nconst updateSelection = () => {\n isChecked.value = props.params.node.isSelected() !== false;\n};\n\nconst setSelection = (val: boolean) => {\n if (isSelectionEnabled(api)) {\n props.params.node.setSelected(val);\n updateSelection();\n }\n};\n\nonBeforeMount(() => {\n props.params.node.addEventListener(\"rowSelected\", updateSelection);\n});\n\nonBeforeUnmount(() => {\n props.params.node.removeEventListener(\"rowSelected\", updateSelection);\n});\n</script>\n\n<template>\n <div\n :class=\"[\n $styles.container,\n { [$styles['allowed-selection']]: allowedSelection },\n 'd-flex',\n 'justify-center',\n 'align-center',\n ]\"\n >\n <div v-if=\"!isChecked\" :class=\"[$styles.text]\">{{ params.value }}</div>\n <PlCheckbox\n v-if=\"forceShowCheckbox\"\n v-model=\"isChecked\"\n :class=\"[$styles.checkbox, isChecked && $styles.checked]\"\n @update:modelValue=\"setSelection\"\n />\n </div>\n</template>\n"],"names":["props","__props","api","isChecked","ref","forceShowCheckbox","computed","isSelectionEnabled","allowedSelection","updateSelection","setSelection","val","onBeforeMount","onBeforeUnmount","_createElementBlock","_normalizeClass","_unref","$styles","_toDisplayString","_createBlock","PlCheckbox","$event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,UAAMA,IAAQC,GAERC,IAAMF,EAAM,OAAO,KACnBG,IAAYC,EAAI,CAAC,CAACJ,EAAM,OAAO,KAAK,YAAY,GAChDK,IAAoBC,EAAS,MAAMH,EAAU,SAASI,EAAmBL,CAAG,CAAC,GAC7EM,IAAmBJ,EAAIG,EAAmBL,CAAG,CAAC,GAE9CO,IAAkB,MAAM;AAC5B,MAAAN,EAAU,QAAQH,EAAM,OAAO,KAAK,iBAAiB;AAAA,IACvD,GAEMU,IAAe,CAACC,MAAiB;AACrC,MAAIJ,EAAmBL,CAAG,MACxBF,EAAM,OAAO,KAAK,YAAYW,CAAG,GACjCF,EAAA;AAAA,IAEJ;AAEA,WAAAG,EAAc,MAAM;AAClB,MAAAZ,EAAM,OAAO,KAAK,iBAAiB,eAAeS,CAAe;AAAA,IACnE,CAAC,GAEDI,EAAgB,MAAM;AACpB,MAAAb,EAAM,OAAO,KAAK,oBAAoB,eAAeS,CAAe;AAAA,IACtE,CAAC,mBAICK,EAgBM,OAAA;AAAA,MAfH,OAAKC,EAAA;AAAA,QAAUC,EAAAC,CAAA,EAAQ;AAAA,QAAoB,EAAA,CAAAD,EAAAC,CAAA,yBAA+BT,EAAA,MAAA;AAAA;;;;;MAQ/DL,EAAA,0BAAZW,EAAuE,OAAA;AAAA;QAA/C,OAAKC,EAAA,CAAGC,EAAAC,CAAA,EAAQ,IAAI,CAAA;AAAA,MAAA,GAAMC,EAAAjB,EAAA,OAAO,KAAK,GAAA,CAAA;AAAA,MAEtDI,EAAA,cADRc,EAKEH,EAAAI,CAAA,GAAA;AAAA;oBAHSjB,EAAA;AAAA;iCAAAA,EAAS,QAAAkB;AAAA,UAEEX;AAAA,QAAA;AAAA,QADnB,OAAKK,EAAA,CAAGC,KAAQ,UAAUb,EAAA,SAAaa,EAAAC,CAAA,EAAQ,OAAO,CAAA;AAAA,MAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as w, ref as i, computed as s, onBeforeMount as E, onBeforeUnmount as g, createElementBlock as
|
|
1
|
+
import { defineComponent as w, ref as i, computed as s, onBeforeMount as E, onBeforeUnmount as g, createElementBlock as d, openBlock as n, createBlock as C, unref as L, toDisplayString as R } from "vue";
|
|
2
2
|
import { PlCheckbox as S } from "@milaboratories/uikit";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
@@ -10,7 +10,6 @@ import "../aggrid.js";
|
|
|
10
10
|
import "../plugins/Monetization/validation.js";
|
|
11
11
|
import "ag-grid-vue3";
|
|
12
12
|
import "ag-grid-enterprise";
|
|
13
|
-
import "../_virtual/index.js";
|
|
14
13
|
/* empty css */
|
|
15
14
|
/* empty css */
|
|
16
15
|
/* empty css */
|
|
@@ -19,24 +18,24 @@ import "canonicalize";
|
|
|
19
18
|
/* empty css */
|
|
20
19
|
/* empty css */
|
|
21
20
|
/* empty css */
|
|
22
|
-
import { getSelectedRowsCount as
|
|
21
|
+
import { getSelectedRowsCount as p, getTotalRowsCount as c, isSelectionEnabled as u, deselectAll as U, selectAll as y } from "../AgGridVue/selection.js";
|
|
23
22
|
import "es-toolkit/compat";
|
|
24
23
|
import "@zip.js/zip.js";
|
|
25
24
|
import "../composition/fileContent.js";
|
|
26
|
-
const h = { style: { position: "absolute", inset: "0", display: "flex", "justify-content": "center", "align-items": "center" } }, k = { key: 1 },
|
|
25
|
+
const h = { style: { position: "absolute", inset: "0", display: "flex", "justify-content": "center", "align-items": "center" } }, k = { key: 1 }, _ = /* @__PURE__ */ w({
|
|
27
26
|
__name: "PlAgRowNumHeader",
|
|
28
27
|
props: {
|
|
29
28
|
params: {}
|
|
30
29
|
},
|
|
31
30
|
setup(e) {
|
|
32
|
-
const o = i(
|
|
31
|
+
const o = i(p(e.params.api)), m = i(c(e.params.api)), l = i(u(e.params.api)), a = s(() => o.value > 0), v = s(
|
|
33
32
|
() => a.value && o.value === m.value
|
|
34
33
|
);
|
|
35
34
|
function f() {
|
|
36
35
|
a.value ? U(e.params.api) : y(e.params.api);
|
|
37
36
|
}
|
|
38
37
|
function t() {
|
|
39
|
-
o.value =
|
|
38
|
+
o.value = p(e.params.api), m.value = c(e.params.api);
|
|
40
39
|
}
|
|
41
40
|
function r() {
|
|
42
41
|
l.value = u(e.params.api);
|
|
@@ -45,17 +44,17 @@ const h = { style: { position: "absolute", inset: "0", display: "flex", "justify
|
|
|
45
44
|
e.params.api.addEventListener("selectionChanged", t), e.params.api.addEventListener("rowDataUpdated", t), e.params.api.addEventListener("modelUpdated", t), e.params.api.addEventListener("stateUpdated", r);
|
|
46
45
|
}), g(() => {
|
|
47
46
|
e.params.api.removeEventListener("selectionChanged", t), e.params.api.removeEventListener("rowDataUpdated", t), e.params.api.removeEventListener("modelUpdated", t), e.params.api.removeEventListener("stateUpdated", r);
|
|
48
|
-
}), (b, B) => (n(),
|
|
47
|
+
}), (b, B) => (n(), d("div", h, [
|
|
49
48
|
l.value ? (n(), C(L(S), {
|
|
50
49
|
key: 0,
|
|
51
50
|
"model-value": a.value,
|
|
52
51
|
indeterminate: a.value && !v.value,
|
|
53
52
|
"onUpdate:modelValue": f
|
|
54
|
-
}, null, 8, ["model-value", "indeterminate"])) : (n(),
|
|
53
|
+
}, null, 8, ["model-value", "indeterminate"])) : (n(), d("span", k, R(e.params.displayName), 1))
|
|
55
54
|
]));
|
|
56
55
|
}
|
|
57
56
|
});
|
|
58
57
|
export {
|
|
59
|
-
|
|
58
|
+
_ as default
|
|
60
59
|
};
|
|
61
60
|
//# sourceMappingURL=PlAgRowNumHeader.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAgRowNumHeader.vue.js","sources":["../../src/components/PlAgRowNumHeader.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { PlCheckbox } from \"@milaboratories/uikit\";\nimport type { IHeaderParams } from \"ag-grid-enterprise\";\nimport { computed, onBeforeMount, onBeforeUnmount, ref } from \"vue\";\nimport {\n deselectAll,\n getSelectedRowsCount,\n getTotalRowsCount,\n isSelectionEnabled,\n selectAll,\n} from \"../lib\";\n\nconst { params } = defineProps<{\n params: IHeaderParams;\n}>();\n\nconst selectedRowCount = ref(getSelectedRowsCount(params.api));\nconst totalRowCount = ref(getTotalRowsCount(params.api));\nconst isSelectable = ref(isSelectionEnabled(params.api));\n\nconst someRowsSelected = computed(() => selectedRowCount.value > 0);\n\nconst allRowsSelected = computed(\n () => someRowsSelected.value && selectedRowCount.value === totalRowCount.value,\n);\n\nfunction toggleSelectAll() {\n if (someRowsSelected.value) {\n deselectAll(params.api);\n } else {\n selectAll(params.api);\n }\n}\n\nfunction updateRowCounts() {\n selectedRowCount.value = getSelectedRowsCount(params.api);\n totalRowCount.value = getTotalRowsCount(params.api);\n}\n\nfunction updateIsSelectable() {\n isSelectable.value = isSelectionEnabled(params.api);\n}\n\nonBeforeMount(() => {\n params.api.addEventListener(\"selectionChanged\", updateRowCounts);\n params.api.addEventListener(\"rowDataUpdated\", updateRowCounts);\n params.api.addEventListener(\"modelUpdated\", updateRowCounts);\n params.api.addEventListener(\"stateUpdated\", updateIsSelectable);\n});\n\nonBeforeUnmount(() => {\n params.api.removeEventListener(\"selectionChanged\", updateRowCounts);\n params.api.removeEventListener(\"rowDataUpdated\", updateRowCounts);\n params.api.removeEventListener(\"modelUpdated\", updateRowCounts);\n params.api.removeEventListener(\"stateUpdated\", updateIsSelectable);\n});\n</script>\n\n<template>\n <div\n style=\"\n position: absolute;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n \"\n >\n <PlCheckbox\n v-if=\"isSelectable\"\n :model-value=\"someRowsSelected\"\n :indeterminate=\"someRowsSelected && !allRowsSelected\"\n @update:model-value=\"toggleSelectAll\"\n />\n <span v-else>\n {{ params.displayName }}\n </span>\n </div>\n</template>\n"],"names":["selectedRowCount","ref","getSelectedRowsCount","__props","totalRowCount","getTotalRowsCount","isSelectable","isSelectionEnabled","someRowsSelected","computed","allRowsSelected","toggleSelectAll","deselectAll","selectAll","updateRowCounts","updateIsSelectable","onBeforeMount","onBeforeUnmount","_openBlock","_createElementBlock","_hoisted_1","_createBlock","_unref","PlCheckbox","_hoisted_2","_toDisplayString"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlAgRowNumHeader.vue.js","sources":["../../src/components/PlAgRowNumHeader.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { PlCheckbox } from \"@milaboratories/uikit\";\nimport type { IHeaderParams } from \"ag-grid-enterprise\";\nimport { computed, onBeforeMount, onBeforeUnmount, ref } from \"vue\";\nimport {\n deselectAll,\n getSelectedRowsCount,\n getTotalRowsCount,\n isSelectionEnabled,\n selectAll,\n} from \"../lib\";\n\nconst { params } = defineProps<{\n params: IHeaderParams;\n}>();\n\nconst selectedRowCount = ref(getSelectedRowsCount(params.api));\nconst totalRowCount = ref(getTotalRowsCount(params.api));\nconst isSelectable = ref(isSelectionEnabled(params.api));\n\nconst someRowsSelected = computed(() => selectedRowCount.value > 0);\n\nconst allRowsSelected = computed(\n () => someRowsSelected.value && selectedRowCount.value === totalRowCount.value,\n);\n\nfunction toggleSelectAll() {\n if (someRowsSelected.value) {\n deselectAll(params.api);\n } else {\n selectAll(params.api);\n }\n}\n\nfunction updateRowCounts() {\n selectedRowCount.value = getSelectedRowsCount(params.api);\n totalRowCount.value = getTotalRowsCount(params.api);\n}\n\nfunction updateIsSelectable() {\n isSelectable.value = isSelectionEnabled(params.api);\n}\n\nonBeforeMount(() => {\n params.api.addEventListener(\"selectionChanged\", updateRowCounts);\n params.api.addEventListener(\"rowDataUpdated\", updateRowCounts);\n params.api.addEventListener(\"modelUpdated\", updateRowCounts);\n params.api.addEventListener(\"stateUpdated\", updateIsSelectable);\n});\n\nonBeforeUnmount(() => {\n params.api.removeEventListener(\"selectionChanged\", updateRowCounts);\n params.api.removeEventListener(\"rowDataUpdated\", updateRowCounts);\n params.api.removeEventListener(\"modelUpdated\", updateRowCounts);\n params.api.removeEventListener(\"stateUpdated\", updateIsSelectable);\n});\n</script>\n\n<template>\n <div\n style=\"\n position: absolute;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n \"\n >\n <PlCheckbox\n v-if=\"isSelectable\"\n :model-value=\"someRowsSelected\"\n :indeterminate=\"someRowsSelected && !allRowsSelected\"\n @update:model-value=\"toggleSelectAll\"\n />\n <span v-else>\n {{ params.displayName }}\n </span>\n </div>\n</template>\n"],"names":["selectedRowCount","ref","getSelectedRowsCount","__props","totalRowCount","getTotalRowsCount","isSelectable","isSelectionEnabled","someRowsSelected","computed","allRowsSelected","toggleSelectAll","deselectAll","selectAll","updateRowCounts","updateIsSelectable","onBeforeMount","onBeforeUnmount","_openBlock","_createElementBlock","_hoisted_1","_createBlock","_unref","PlCheckbox","_hoisted_2","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,UAAMA,IAAmBC,EAAIC,EAAqBC,EAAA,OAAO,GAAG,CAAC,GACvDC,IAAgBH,EAAII,EAAkBF,EAAA,OAAO,GAAG,CAAC,GACjDG,IAAeL,EAAIM,EAAmBJ,EAAA,OAAO,GAAG,CAAC,GAEjDK,IAAmBC,EAAS,MAAMT,EAAiB,QAAQ,CAAC,GAE5DU,IAAkBD;AAAA,MACtB,MAAMD,EAAiB,SAASR,EAAiB,UAAUI,EAAc;AAAA,IAAA;AAG3E,aAASO,IAAkB;AACzB,MAAIH,EAAiB,QACnBI,EAAYT,EAAA,OAAO,GAAG,IAEtBU,EAAUV,EAAA,OAAO,GAAG;AAAA,IAExB;AAEA,aAASW,IAAkB;AACzB,MAAAd,EAAiB,QAAQE,EAAqBC,SAAO,GAAG,GACxDC,EAAc,QAAQC,EAAkBF,SAAO,GAAG;AAAA,IACpD;AAEA,aAASY,IAAqB;AAC5B,MAAAT,EAAa,QAAQC,EAAmBJ,SAAO,GAAG;AAAA,IACpD;AAEA,WAAAa,EAAc,MAAM;AAClB,MAAAb,EAAA,OAAO,IAAI,iBAAiB,oBAAoBW,CAAe,GAC/DX,EAAA,OAAO,IAAI,iBAAiB,kBAAkBW,CAAe,GAC7DX,EAAA,OAAO,IAAI,iBAAiB,gBAAgBW,CAAe,GAC3DX,EAAA,OAAO,IAAI,iBAAiB,gBAAgBY,CAAkB;AAAA,IAChE,CAAC,GAEDE,EAAgB,MAAM;AACpB,MAAAd,EAAA,OAAO,IAAI,oBAAoB,oBAAoBW,CAAe,GAClEX,EAAA,OAAO,IAAI,oBAAoB,kBAAkBW,CAAe,GAChEX,EAAA,OAAO,IAAI,oBAAoB,gBAAgBW,CAAe,GAC9DX,EAAA,OAAO,IAAI,oBAAoB,gBAAgBY,CAAkB;AAAA,IACnE,CAAC,cAICG,EAAA,GAAAC,EAkBM,OAlBNC,GAkBM;AAAA,MARId,EAAA,cADRe,EAKEC,EAAAC,CAAA,GAAA;AAAA;QAHC,eAAaf,EAAA;AAAA,QACb,eAAeA,EAAA,SAAgB,CAAKE,EAAA;AAAA,QACpC,uBAAoBC;AAAA,MAAA,uDAEvBQ,EAEO,QAAAK,GAAAC,EADFtB,EAAA,OAAO,WAAW,GAAA,CAAA;AAAA,IAAA;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterSidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAnnotations/components/FilterSidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterSidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAnnotations/components/FilterSidebar.vue"],"names":[],"mappings":"AA4JA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAuB,MAAM,sBAAsB,CAAC;AAG3F,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMvC,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAEhC,iBAAiB,EAAE,CAAC,MAAM,EAAE;QAC1B,QAAQ,EAAE,wBAAwB,CAAC;QACnC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC;KAC/B,KAAK,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IAErF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,2BAA2B,CAAC,EAAE,MAAM,OAAO,CACzC,SAAS,GAAG;QAAE,QAAQ,EAAE,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CACtD,CAAC;CACH,CAAC;;UA0EM,MAAM;;;;UAAN,MAAM;;;;AAxEd,wBAsPK"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { defineComponent as V, mergeModels as q, useModel as E, computed as k, createBlock as
|
|
2
|
-
import { randomInt as
|
|
3
|
-
import { PlSidebarItem as
|
|
4
|
-
import
|
|
5
|
-
import v from "./style.module.css.js";
|
|
1
|
+
import { defineComponent as V, mergeModels as q, useModel as E, computed as k, resolveComponent as x, createBlock as d, createCommentVNode as c, openBlock as i, unref as o, withCtx as r, createVNode as f, normalizeClass as u, createElementVNode as T, createTextVNode as g } from "vue";
|
|
2
|
+
import { randomInt as m } from "../../../lib/util/helpers/dist/random.js";
|
|
3
|
+
import { PlSidebarItem as A, PlBtnSecondary as v, PlEditableTitle as P } from "@milaboratories/uikit";
|
|
4
|
+
import b from "./style.module.css.js";
|
|
6
5
|
import { validateTitle as $ } from "../utils.js";
|
|
7
|
-
const
|
|
6
|
+
const U = /* @__PURE__ */ V({
|
|
8
7
|
__name: "FilterSidebar",
|
|
9
8
|
props: /* @__PURE__ */ q({
|
|
10
9
|
columns: {},
|
|
@@ -16,33 +15,33 @@ const j = /* @__PURE__ */ V({
|
|
|
16
15
|
stepModifiers: {}
|
|
17
16
|
}),
|
|
18
17
|
emits: ["update:step"],
|
|
19
|
-
setup(
|
|
20
|
-
const e = E(
|
|
18
|
+
setup(p) {
|
|
19
|
+
const e = E(p, "step"), l = p, S = k(() => l.hasSelectedColumns !== void 0 && l.getValuesForSelectedColumns !== void 0), h = () => {
|
|
21
20
|
e.value.filter.filters.push({
|
|
22
|
-
id:
|
|
21
|
+
id: m(),
|
|
23
22
|
isExpanded: !0,
|
|
24
23
|
type: "or",
|
|
25
24
|
filters: [
|
|
26
25
|
{
|
|
27
|
-
id:
|
|
26
|
+
id: m(),
|
|
28
27
|
type: "isNA",
|
|
29
28
|
column: l.columns[0].id
|
|
30
29
|
}
|
|
31
30
|
]
|
|
32
31
|
});
|
|
33
32
|
};
|
|
34
|
-
async function
|
|
33
|
+
async function C() {
|
|
35
34
|
if (l.hasSelectedColumns === void 0 || l.getValuesForSelectedColumns === void 0)
|
|
36
35
|
return;
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const { columnId: t, values:
|
|
36
|
+
const s = await l.getValuesForSelectedColumns();
|
|
37
|
+
if (!s || s.values.length === 0) return;
|
|
38
|
+
const { columnId: t, values: a } = s, n = a.slice(0, 3).join(", ") + (a.length > 3 ? ` and ${a.length - 3} more` : "");
|
|
40
39
|
e.value.filter.filters.push({
|
|
41
|
-
id:
|
|
42
|
-
name: `Selected list (${
|
|
40
|
+
id: m(),
|
|
41
|
+
name: `Selected list (${n})`,
|
|
43
42
|
isExpanded: !1,
|
|
44
43
|
type: "or",
|
|
45
|
-
filters:
|
|
44
|
+
filters: a.map((F, N) => ({
|
|
46
45
|
id: N,
|
|
47
46
|
type: "patternEquals",
|
|
48
47
|
column: t,
|
|
@@ -66,65 +65,68 @@ const j = /* @__PURE__ */ V({
|
|
|
66
65
|
"topN",
|
|
67
66
|
"bottomN"
|
|
68
67
|
];
|
|
69
|
-
return (
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
68
|
+
return (s, t) => {
|
|
69
|
+
const a = x("PlAdvancedFilter");
|
|
70
|
+
return e.value ? (i(), d(o(A), { key: 0 }, {
|
|
71
|
+
"header-content": r(() => [
|
|
72
|
+
(i(), d(o(P), {
|
|
73
|
+
key: e.value.id,
|
|
74
|
+
modelValue: e.value.label,
|
|
75
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.label = n),
|
|
76
|
+
class: u({ [o(b).flashing]: e.value.label.length === 0 }),
|
|
77
|
+
"max-length": 40,
|
|
78
|
+
"max-width": "600px",
|
|
79
|
+
placeholder: "Label",
|
|
80
|
+
autofocus: e.value.label.length === 0,
|
|
81
|
+
validate: o($)
|
|
82
|
+
}, null, 8, ["modelValue", "class", "autofocus", "validate"]))
|
|
83
|
+
]),
|
|
84
|
+
"body-content": r(() => [
|
|
85
|
+
f(a, {
|
|
86
|
+
filters: e.value.filter,
|
|
87
|
+
"onUpdate:filters": t[1] || (t[1] = (n) => e.value.filter = n),
|
|
88
|
+
class: u([s.$style.root, { [o(b).disabled]: e.value.label.length === 0 }]),
|
|
89
|
+
items: l.columns,
|
|
90
|
+
"supported-filters": y,
|
|
91
|
+
"get-suggest-options": l.getSuggestOptions,
|
|
92
|
+
"enable-dnd": !1,
|
|
93
|
+
"enable-add-group-button": !0
|
|
94
|
+
}, {
|
|
95
|
+
"add-group-buttons": r(() => [
|
|
96
|
+
T("div", {
|
|
97
|
+
class: u(s.$style.actions)
|
|
98
|
+
}, [
|
|
99
|
+
f(o(v), {
|
|
100
|
+
icon: "add",
|
|
101
|
+
onClick: h
|
|
102
|
+
}, {
|
|
103
|
+
default: r(() => [...t[2] || (t[2] = [
|
|
104
|
+
g(" Add Filter ", -1)
|
|
105
|
+
])]),
|
|
106
|
+
_: 1
|
|
107
|
+
}),
|
|
108
|
+
S.value ? (i(), d(o(v), {
|
|
109
|
+
key: 0,
|
|
110
|
+
icon: "add",
|
|
111
|
+
disabled: !l.hasSelectedColumns,
|
|
112
|
+
onClick: C
|
|
113
|
+
}, {
|
|
114
|
+
default: r(() => [...t[3] || (t[3] = [
|
|
115
|
+
g(" From selection ", -1)
|
|
116
|
+
])]),
|
|
117
|
+
_: 1
|
|
118
|
+
}, 8, ["disabled"])) : c("", !0)
|
|
119
|
+
], 2)
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 8, ["filters", "class", "items", "get-suggest-options"])
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
})) : c("", !0);
|
|
126
|
+
};
|
|
125
127
|
}
|
|
126
128
|
});
|
|
127
129
|
export {
|
|
128
|
-
|
|
130
|
+
U as default
|
|
129
131
|
};
|
|
130
132
|
//# sourceMappingURL=FilterSidebar.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterSidebar.vue2.js","sources":["../../../../src/components/PlAnnotations/components/FilterSidebar.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type Props = {\n columns: PlAdvancedFilterItem[];\n\n getSuggestOptions: (params: {\n columnId: PlAdvancedFilterColumnId;\n axisIdx?: number;\n searchStr: string;\n searchType: \"value\" | \"label\";\n }) => ListOptionBase<string | number>[] | Promise<ListOptionBase<string | number>[]>;\n\n hasSelectedColumns?: boolean;\n getValuesForSelectedColumns?: () => Promise<\n undefined | { columnId: PObjectId; values: string[] }\n >;\n};\n</script>\n<script setup lang=\"ts\">\nimport { randomInt } from \"@milaboratories/helpers\";\nimport { PlBtnSecondary, PlEditableTitle, PlSidebarItem } from \"@milaboratories/uikit\";\nimport type { ListOptionBase, PObjectId, SUniversalPColumnId } from \"@platforma-sdk/model\";\nimport { computed } from \"vue\";\nimport type {
|
|
1
|
+
{"version":3,"file":"FilterSidebar.vue2.js","sources":["../../../../src/components/PlAnnotations/components/FilterSidebar.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type Props = {\n columns: PlAdvancedFilterItem[];\n\n getSuggestOptions: (params: {\n columnId: PlAdvancedFilterColumnId;\n axisIdx?: number;\n searchStr: string;\n searchType: \"value\" | \"label\";\n }) => ListOptionBase<string | number>[] | Promise<ListOptionBase<string | number>[]>;\n\n hasSelectedColumns?: boolean;\n getValuesForSelectedColumns?: () => Promise<\n undefined | { columnId: PObjectId; values: string[] }\n >;\n};\n</script>\n<script setup lang=\"ts\">\nimport { randomInt } from \"@milaboratories/helpers\";\nimport { PlBtnSecondary, PlEditableTitle, PlSidebarItem } from \"@milaboratories/uikit\";\nimport type { ListOptionBase, PObjectId, SUniversalPColumnId } from \"@platforma-sdk/model\";\nimport { computed } from \"vue\";\nimport type { PlAdvancedFilter, PlAdvancedFilterSupportedFilters } from \"../../PlAdvancedFilter\";\nimport { type PlAdvancedFilterItem } from \"../../PlAdvancedFilter\";\nimport type { PlAdvancedFilterColumnId } from \"../../PlAdvancedFilter/types\";\nimport type { Filter } from \"../types\";\n\nimport $commonStyle from \"./style.module.css\";\nimport { validateTitle } from \"../utils\";\n\n// Models\nconst step = defineModel<Filter>(\"step\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst withSelection = computed(() => {\n return props.hasSelectedColumns !== undefined && props.getValuesForSelectedColumns !== undefined;\n});\n// Actions\nconst addFilterPlaceholder = () => {\n step.value.filter.filters.push({\n id: randomInt(),\n isExpanded: true,\n type: \"or\",\n filters: [\n {\n id: randomInt(),\n type: \"isNA\",\n column: props.columns[0].id as SUniversalPColumnId,\n },\n ],\n });\n};\n\nasync function addFilterFromSelected() {\n if (props.hasSelectedColumns === undefined || props.getValuesForSelectedColumns === undefined)\n return;\n\n const data = await props.getValuesForSelectedColumns();\n if (!data || data.values.length === 0) return;\n\n const { columnId, values } = data;\n const shortReminder =\n values.slice(0, 3).join(\", \") + (values.length > 3 ? ` and ${values.length - 3} more` : \"\");\n\n step.value.filter.filters.push({\n id: randomInt(),\n name: `Selected list (${shortReminder})`,\n isExpanded: false,\n type: \"or\",\n filters: values.map((value, i) => ({\n id: i,\n type: \"patternEquals\",\n column: columnId as SUniversalPColumnId,\n value,\n })),\n });\n}\n\nconst supportedFilters = [\n \"isNA\",\n \"isNotNA\",\n \"greaterThan\",\n \"greaterThanOrEqual\",\n \"lessThan\",\n \"lessThanOrEqual\",\n \"patternEquals\",\n \"patternNotEquals\",\n \"patternContainSubsequence\",\n \"patternNotContainSubsequence\",\n \"equal\",\n \"notEqual\",\n \"topN\",\n \"bottomN\",\n] as (typeof PlAdvancedFilterSupportedFilters)[number][];\n</script>\n\n<template>\n <PlSidebarItem v-if=\"step\">\n <template #header-content>\n <PlEditableTitle\n :key=\"step.id\"\n v-model=\"step.label\"\n :class=\"{ [$commonStyle.flashing]: step.label.length === 0 }\"\n :max-length=\"40\"\n max-width=\"600px\"\n placeholder=\"Label\"\n :autofocus=\"step.label.length === 0\"\n :validate=\"validateTitle\"\n />\n </template>\n <template #body-content>\n <PlAdvancedFilter\n v-model:filters=\"step.filter as PlAdvancedFilter\"\n :class=\"[$style.root, { [$commonStyle.disabled]: step.label.length === 0 }]\"\n :items=\"props.columns\"\n :supported-filters=\"supportedFilters\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :enable-dnd=\"false\"\n :enable-add-group-button=\"true\"\n >\n <template #add-group-buttons>\n <div :class=\"$style.actions\">\n <PlBtnSecondary icon=\"add\" @click=\"addFilterPlaceholder\"> Add Filter </PlBtnSecondary>\n <PlBtnSecondary\n v-if=\"withSelection\"\n icon=\"add\"\n :disabled=\"!props.hasSelectedColumns\"\n @click=\"addFilterFromSelected\"\n >\n From selection\n </PlBtnSecondary>\n </div>\n </template>\n </PlAdvancedFilter>\n </template>\n </PlSidebarItem>\n</template>\n\n<style module>\n.root {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.actions {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n</style>\n"],"names":["step","_useModel","__props","props","withSelection","computed","addFilterPlaceholder","randomInt","addFilterFromSelected","data","columnId","values","shortReminder","value","i","supportedFilters","_createBlock","_unref","PlSidebarItem","PlEditableTitle","_cache","$event","_normalizeClass","validateTitle","_createVNode","_component_PlAdvancedFilter","$style","$commonStyle","_createElementVNode","PlBtnSecondary"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAnnotations.vue2.js","sources":["../../../../src/components/PlAnnotations/components/PlAnnotations.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Props as BaseProps } from \"./FilterSidebar.vue\";\nexport type Props = BaseProps & {\n onDeleteSchema?: () => void;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, effect, shallowRef } from \"vue\";\n\nimport { isNil } from \"@milaboratories/helpers\";\nimport { PlSidebarGroup, useConfirm } from \"@milaboratories/uikit\";\n\nimport type { Annotation } from \"../types\";\nimport AnnotationsSidebar from \"./AnnotationsSidebar.vue\";\nimport FilterSidebar from \"./FilterSidebar.vue\";\n\n// Models\nconst annotation = defineModel<Annotation>(\"annotation\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst selectedStepId = shallowRef<number | undefined>(undefined);\nconst selectedStep = computed(() => {\n return isNil(selectedStepId.value) || isNil(annotation.value)\n ? undefined\n : annotation.value.steps.find((step) => step.id === selectedStepId.value);\n});\n\n// Watchers\neffect(function setDefaultStepId() {\n if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {\n selectedStepId.value = annotation.value.steps[0].id;\n }\n});\n// Hooks\nconst confirmResetSchema = useConfirm({\n title: \"Reset Schema\",\n message: \"Are you sure you want to reset the schema? This action cannot be undone.\",\n confirmLabel: \"Yes, reset\",\n cancelLabel: \"No, cancel\",\n});\n// Actions\nasync function handleDeleteSchema() {\n if (await confirmResetSchema()) {\n selectedStepId.value = undefined;\n props.onDeleteSchema?.();\n }\n}\n</script>\n\n<template>\n <PlSidebarGroup>\n <template #item-0>\n <AnnotationsSidebar\n v-model:annotation=\"annotation\"\n v-model:selectedStepId=\"selectedStepId\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n @delete-schema=\"handleDeleteSchema\"\n />\n </template>\n <template #item-1>\n <FilterSidebar\n v-if=\"selectedStep\"\n v-model:step=\"selectedStep\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :selectedStepId=\"selectedStepId\"\n :hasSelectedColumns=\"props.hasSelectedColumns\"\n :getValuesForSelectedColumns=\"props.getValuesForSelectedColumns\"\n />\n </template>\n </PlSidebarGroup>\n</template>\n\n<style module>\n.sidebarItem {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"names":["annotation","_useModel","props","__props","selectedStepId","shallowRef","selectedStep","computed","isNil","step","effect","confirmResetSchema","useConfirm","handleDeleteSchema","_a","_createBlock","_unref","PlSidebarGroup","_createVNode","AnnotationsSidebar","$event","_normalizeClass","$style","FilterSidebar"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,UAAMA,IAAaC,KAAwB,YAAgC,GAErEC,IAAQC,GAERC,IAAiBC,EAA+B,MAAS,GACzDC,IAAeC,EAAS,MACrBC,EAAMJ,EAAe,KAAK,KAAKI,EAAMR,EAAW,KAAK,IACxD,SACAA,EAAW,MAAM,MAAM,KAAK,CAACS,MAASA,EAAK,OAAOL,EAAe,KAAK,CAC3E;AAGD,IAAAM,EAAO,WAA4B;AACjC,MAAIN,EAAe,UAAU,UAAaJ,EAAW,MAAM,MAAM,SAAS,MACxEI,EAAe,QAAQJ,EAAW,MAAM,MAAM,CAAC,EAAE;AAAA,IAErD,CAAC;AAED,UAAMW,IAAqBC,EAAW;AAAA,MACpC,OAAO;AAAA,MACP,SAAS;AAAA,MACT,cAAc;AAAA,MACd,aAAa;AAAA,IAAA,CACd;AAED,mBAAeC,IAAqB;;AAClC,MAAI,MAAMF,QACRP,EAAe,QAAQ,SACvBU,IAAAZ,EAAM,mBAAN,QAAAY,EAAA,KAAAZ;AAAA,IAEJ;2BAIEa,EAsBiBC,EAAAC,CAAA,GAAA,MAAA;AAAA,MArBJ,YACT,MAME;AAAA,QANFC,EAMEC,GAAA;AAAA,UALQ,YAAYnB,EAAA;AAAA,wDAAAA,EAAU,QAAAoB;AAAA,UACtB,gBAAgBhB,EAAA;AAAA,4DAAAA,EAAc,QAAAgB;AAAA,UACrC,OAAKC,EAAEC,EAAAA,OAAO,WAAW;AAAA,UACzB,SAASpB,EAAM;AAAA,UACf,gBAAeW;AAAA,QAAA;;MAGT,
|
|
1
|
+
{"version":3,"file":"PlAnnotations.vue2.js","sources":["../../../../src/components/PlAnnotations/components/PlAnnotations.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Props as BaseProps } from \"./FilterSidebar.vue\";\nexport type Props = BaseProps & {\n onDeleteSchema?: () => void;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, effect, shallowRef } from \"vue\";\n\nimport { isNil } from \"@milaboratories/helpers\";\nimport { PlSidebarGroup, useConfirm } from \"@milaboratories/uikit\";\n\nimport type { Annotation } from \"../types\";\nimport AnnotationsSidebar from \"./AnnotationsSidebar.vue\";\nimport FilterSidebar from \"./FilterSidebar.vue\";\n\n// Models\nconst annotation = defineModel<Annotation>(\"annotation\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst selectedStepId = shallowRef<number | undefined>(undefined);\nconst selectedStep = computed(() => {\n return isNil(selectedStepId.value) || isNil(annotation.value)\n ? undefined\n : annotation.value.steps.find((step) => step.id === selectedStepId.value);\n});\n\n// Watchers\neffect(function setDefaultStepId() {\n if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {\n selectedStepId.value = annotation.value.steps[0].id;\n }\n});\n// Hooks\nconst confirmResetSchema = useConfirm({\n title: \"Reset Schema\",\n message: \"Are you sure you want to reset the schema? This action cannot be undone.\",\n confirmLabel: \"Yes, reset\",\n cancelLabel: \"No, cancel\",\n});\n// Actions\nasync function handleDeleteSchema() {\n if (await confirmResetSchema()) {\n selectedStepId.value = undefined;\n props.onDeleteSchema?.();\n }\n}\n</script>\n\n<template>\n <PlSidebarGroup>\n <template #item-0>\n <AnnotationsSidebar\n v-model:annotation=\"annotation\"\n v-model:selectedStepId=\"selectedStepId\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n @delete-schema=\"handleDeleteSchema\"\n />\n </template>\n <template #item-1>\n <FilterSidebar\n v-if=\"selectedStep\"\n v-model:step=\"selectedStep\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :selectedStepId=\"selectedStepId\"\n :hasSelectedColumns=\"props.hasSelectedColumns\"\n :getValuesForSelectedColumns=\"props.getValuesForSelectedColumns\"\n />\n </template>\n </PlSidebarGroup>\n</template>\n\n<style module>\n.sidebarItem {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"names":["annotation","_useModel","props","__props","selectedStepId","shallowRef","selectedStep","computed","isNil","step","effect","confirmResetSchema","useConfirm","handleDeleteSchema","_a","_createBlock","_unref","PlSidebarGroup","_createVNode","AnnotationsSidebar","$event","_normalizeClass","$style","FilterSidebar"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,UAAMA,IAAaC,KAAwB,YAAgC,GAErEC,IAAQC,GAERC,IAAiBC,EAA+B,MAAS,GACzDC,IAAeC,EAAS,MACrBC,EAAMJ,EAAe,KAAK,KAAKI,EAAMR,EAAW,KAAK,IACxD,SACAA,EAAW,MAAM,MAAM,KAAK,CAACS,MAASA,EAAK,OAAOL,EAAe,KAAK,CAC3E;AAGD,IAAAM,EAAO,WAA4B;AACjC,MAAIN,EAAe,UAAU,UAAaJ,EAAW,MAAM,MAAM,SAAS,MACxEI,EAAe,QAAQJ,EAAW,MAAM,MAAM,CAAC,EAAE;AAAA,IAErD,CAAC;AAED,UAAMW,IAAqBC,EAAW;AAAA,MACpC,OAAO;AAAA,MACP,SAAS;AAAA,MACT,cAAc;AAAA,MACd,aAAa;AAAA,IAAA,CACd;AAED,mBAAeC,IAAqB;;AAClC,MAAI,MAAMF,QACRP,EAAe,QAAQ,SACvBU,IAAAZ,EAAM,mBAAN,QAAAY,EAAA,KAAAZ;AAAA,IAEJ;2BAIEa,EAsBiBC,EAAAC,CAAA,GAAA,MAAA;AAAA,MArBJ,YACT,MAME;AAAA,QANFC,EAMEC,GAAA;AAAA,UALQ,YAAYnB,EAAA;AAAA,wDAAAA,EAAU,QAAAoB;AAAA,UACtB,gBAAgBhB,EAAA;AAAA,4DAAAA,EAAc,QAAAgB;AAAA,UACrC,OAAKC,EAAEC,EAAAA,OAAO,WAAW;AAAA,UACzB,SAASpB,EAAM;AAAA,UACf,gBAAeW;AAAA,QAAA;;MAGT,YANf,MAW4C;AAAA,QAH9BP,EAAA,cADRS,EASEQ,GAAA;AAAA;UAPQ,MAAMjB,EAAA;AAAA,kDAAAA,EAAY,QAAAc;AAAA,UACzB,OAAKC,EAAEC,EAAAA,OAAO,WAAW;AAAA,UACzB,SAASpB,EAAM;AAAA,UACf,uBAAqBA,EAAM;AAAA,UAC3B,gBAAgBE,EAAA;AAAA,UAChB,oBAAoBF,EAAM;AAAA,UAC1B,6BAA6BA,EAAM;AAAA,QAAA;;;;;;"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PTableColumnSpec } from '@platforma-sdk/model';
|
|
2
|
+
import { PlAdvancedFilter } from '../PlAdvancedFilter';
|
|
3
3
|
type __VLS_Props = {
|
|
4
|
-
|
|
4
|
+
columns: PTableColumnSpec[];
|
|
5
5
|
};
|
|
6
6
|
type __VLS_PublicProps = {
|
|
7
|
-
modelValue
|
|
7
|
+
modelValue: PlAdvancedFilter;
|
|
8
8
|
} & __VLS_Props;
|
|
9
9
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
-
"update:modelValue": (value:
|
|
10
|
+
"update:modelValue": (value: import('../PlAdvancedFilter/types').RootFilter) => any;
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((value:
|
|
13
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
14
|
-
filterManager: HTMLDivElement;
|
|
15
|
-
}, any>;
|
|
12
|
+
"onUpdate:modelValue"?: ((value: import('../PlAdvancedFilter/types').RootFilter) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
14
|
export default _default;
|
|
17
15
|
//# sourceMappingURL=PlTableFiltersV2.vue.d.ts.map
|