@conduction/nextcloud-vue 2.106.0 → 2.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +9 -0
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js.map +1 -0
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +338 -0
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -0
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +249 -0
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -0
- package/dist/esm/components/CnAdvancedFormDialog/CnPropertiesTab.vue2.js +2 -2
- package/dist/esm/components/CnAdvancedFormDialog/CnPropertiesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
- package/dist/esm/components/CnAppNav/CnAppNav.vue3.js +145 -138
- package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +102 -2
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +83 -6
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +4 -2
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIcon/semanticIcons.js +2 -2
- package/dist/esm/components/CnIcon/semanticIcons.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +389 -20
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +68 -35
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js +22 -2
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +69 -5
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js +38 -5
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue.js +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js +7 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js +8 -0
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js.map +1 -0
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js +297 -0
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js.map +1 -0
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js +24 -0
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js.map +1 -0
- package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue.js +9 -0
- package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue.js.map +1 -0
- package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue2.js +95 -0
- package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue2.js.map +1 -0
- package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue3.js +123 -0
- package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue3.js.map +1 -0
- package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue.js +1 -1
- package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue2.js +13 -5
- package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue3.js +3 -1
- package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue.js +1 -1
- package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue2.js +49 -23
- package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue2.js.map +1 -1
- package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue3.js +74 -27
- package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue3.js.map +1 -1
- package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue.js +0 -1
- package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue.js.map +1 -1
- package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue2.js +18 -413
- package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue2.js.map +1 -1
- package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue3.js +27 -214
- package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue3.js.map +1 -1
- package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue.js +9 -0
- package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue.js.map +1 -0
- package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue2.js +190 -0
- package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue2.js.map +1 -0
- package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue3.js +270 -0
- package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue3.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +56 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +56 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/mixins/savedViewsList.js +235 -0
- package/dist/esm/mixins/savedViewsList.js.map +1 -0
- package/dist/esm/nextcloud-vue.css +348 -108
- package/dist/esm/utils/actionsDispatcher.js +2 -2
- package/dist/esm/utils/actionsDispatcher.js.map +1 -1
- package/dist/esm/utils/builtInModals.js +39 -0
- package/dist/esm/utils/builtInModals.js.map +1 -0
- package/dist/esm/utils/mapMarkerColor.js +121 -0
- package/dist/esm/utils/mapMarkerColor.js.map +1 -0
- package/dist/esm/utils/mergeManifestDelta.js +4 -0
- package/dist/esm/utils/mergeManifestDelta.js.map +1 -1
- package/dist/esm/utils/savedViewHelpers.js +59 -7
- package/dist/esm/utils/savedViewHelpers.js.map +1 -1
- package/dist/esm/utils/savedViewMenu.js +154 -0
- package/dist/esm/utils/savedViewMenu.js.map +1 -0
- package/dist/esm/utils/searchGroupSharees.js +50 -15
- package/dist/esm/utils/searchGroupSharees.js.map +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +13351 -10855
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +348 -108
- package/l10n/en.json +56 -1
- package/l10n/nl.json +56 -1
- package/package.json +1 -1
- package/src/components/CnActionDialog/CnActionDialog.vue +545 -0
- package/src/components/CnActionDialog/index.js +12 -0
- package/src/components/CnAppNav/CnAppNav.vue +17 -0
- package/src/components/CnAppRoot/CnAppRoot.vue +102 -2
- package/src/components/CnDashboardPage/CnDashboardPage.vue +86 -7
- package/src/components/CnIndexPage/CnIndexPage.vue +409 -23
- package/src/components/CnIndexPage/useSelfFetchList.js +21 -1
- package/src/components/CnIndexSidebar/CnIndexSidebar.md +2 -0
- package/src/components/CnIndexSidebar/CnIndexSidebar.vue +91 -1
- package/src/components/CnMapWidget/CnMapWidget.vue +16 -1
- package/src/components/CnPartyPicker/CnPartyPicker.vue +317 -0
- package/src/components/CnPartyPicker/index.js +11 -0
- package/src/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue +192 -0
- package/src/components/CnSavedViewEditDialog/index.js +11 -0
- package/src/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue +21 -6
- package/src/components/CnSavedViewShareFields/CnSavedViewShareFields.vue +130 -37
- package/src/components/CnSavedViewsControl/CnSavedViewsControl.vue +36 -599
- package/src/components/CnSavedViewsPanel/CnSavedViewsPanel.vue +459 -0
- package/src/components/CnSavedViewsPanel/index.js +11 -0
- package/src/components/index.js +4 -0
- package/src/css/index-page.css +16 -0
- package/src/css/look-board-index.css +5 -3
- package/src/css/look-board.css +18 -3
- package/src/index.js +4 -0
- package/src/mixins/savedViewsList.js +231 -0
- package/src/schemas/app-manifest-v2.schema.json +98 -3
- package/src/utils/actionsDispatcher.js +2 -2
- package/src/utils/builtInModals.js +35 -0
- package/src/utils/mapMarkerColor.js +117 -0
- package/src/utils/mergeManifestDelta.js +4 -0
- package/src/utils/savedViewHelpers.js +58 -6
- package/src/utils/savedViewMenu.js +150 -0
- package/src/utils/searchGroupSharees.js +49 -14
- package/src/utils/validateManifestV2.compiled.js +3 -3
|
@@ -2,7 +2,7 @@ import script from './CnDashboardPage.vue2.js';
|
|
|
2
2
|
import { render } from './CnDashboardPage.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-6991cea0";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -25,6 +25,7 @@ import __sfc_main$i from '../CnWidgetGrid/CnWidgetIcon.vue.js';
|
|
|
25
25
|
import __sfc_main$8 from '../CnWidgetRefItem/CnWidgetRefItem.vue.js';
|
|
26
26
|
import __sfc_main$4 from '../CnWidgetRenderer/CnWidgetRenderer.vue.js';
|
|
27
27
|
import __sfc_main$3 from '../CnWidgetWrapper/CnWidgetWrapper.vue.js';
|
|
28
|
+
import { fetchEndpointSource } from '../../composables/useEndpointSource.js';
|
|
28
29
|
import { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js';
|
|
29
30
|
import { normalizeLook } from '../../composables/useLook.js';
|
|
30
31
|
import { pageViews } from '../../mixins/pageViews.js';
|
|
@@ -32,6 +33,7 @@ import { mergeUserLayout, resolveUserLayoutApi } from '../../store/plugins/dashb
|
|
|
32
33
|
import { isAppInstalled } from '../../utils/appInstalled.js';
|
|
33
34
|
import { contentHeaderLink } from '../../utils/contentHeaderLink.js';
|
|
34
35
|
import { pickDeclaredProps } from '../../utils/declaredProps.js';
|
|
36
|
+
import { readPath } from '../../utils/readPath.js';
|
|
35
37
|
import { userLocale } from '../../utils/userLocale.js';
|
|
36
38
|
import { isWorkspaceCondition, evaluateWorkspaceCondition, readVisibleWhenValue, compareVisibleWhen } from '../../utils/visibleWhen.js';
|
|
37
39
|
import { canonicalWidgetType } from '../../utils/widgetTypeAliases.js';
|
|
@@ -164,6 +166,32 @@ const CHART_PROP_KEYS = [
|
|
|
164
166
|
* }]
|
|
165
167
|
* ```
|
|
166
168
|
*/
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* One row of a page filter's `optionsFrom` as a `{ value, label }` option:
|
|
172
|
+
* `valueField` (default `id`, else the OpenRegister uuid) and `labelField`
|
|
173
|
+
* (default `title`, else `name`, else the value). Null for a row without a
|
|
174
|
+
* value.
|
|
175
|
+
*
|
|
176
|
+
* @param {unknown} row The row.
|
|
177
|
+
* @param {{valueField?: string, labelField?: string}} from The `optionsFrom` block.
|
|
178
|
+
* @return {{value: (string|number), label: string}|null}
|
|
179
|
+
*/
|
|
180
|
+
function pageFilterOptionOf(row, from) {
|
|
181
|
+
if (row === null || row === undefined) {
|
|
182
|
+
return null
|
|
183
|
+
}
|
|
184
|
+
if (typeof row !== 'object') {
|
|
185
|
+
return { value: row, label: String(row) }
|
|
186
|
+
}
|
|
187
|
+
const value = from.valueField ? readPath(row, from.valueField) : (row.id ?? row['@self']?.id ?? row.uuid);
|
|
188
|
+
if (value === null || value === undefined || value === '') {
|
|
189
|
+
return null
|
|
190
|
+
}
|
|
191
|
+
const label = from.labelField ? readPath(row, from.labelField) : (row.title || row.name);
|
|
192
|
+
return { value, label: label === null || label === undefined || label === '' ? String(value) : String(label) }
|
|
193
|
+
}
|
|
194
|
+
|
|
167
195
|
var script = {
|
|
168
196
|
name: 'CnDashboardPage',
|
|
169
197
|
|
|
@@ -702,10 +730,16 @@ var script = {
|
|
|
702
730
|
* group on the header's description line, after the period group
|
|
703
731
|
* (DqProcesanalyse "Gemiddeld | Mediaan"). An endpoint widget can read
|
|
704
732
|
* the value in its `responsePath` too (`phaseDays.@workspace.measure`).
|
|
705
|
-
*
|
|
706
|
-
*
|
|
733
|
+
* `optionsFrom` reads the options instead of listing them: `{ url,
|
|
734
|
+
* params?, responsePath?, valueField?, labelField? }` from an app
|
|
735
|
+
* endpoint, or `{ register, schema, filter?, valueField?, labelField? }`
|
|
736
|
+
* from OpenRegister objects (value `id`, label `title` or `name` by
|
|
737
|
+
* default; tokens resolve). `clearable: true` lets the reader clear the
|
|
738
|
+
* select back to "all" (`placeholder`, e.g. "All case types"), which
|
|
739
|
+
* writes null and seeds nothing. Empty (the default) renders no
|
|
740
|
+
* controls and leaves the context untouched.
|
|
707
741
|
*
|
|
708
|
-
* @type {Array<{key: string, label?: string, type?: string, control?: ('select'|'segmented'), placement?: ('row'|'description'), options
|
|
742
|
+
* @type {Array<{key: string, label?: string, type?: string, control?: ('select'|'segmented'), placement?: ('row'|'description'), options?: Array<{value: (string|number), label: string}>, optionsFrom?: object, clearable?: boolean, placeholder?: string, default?: (string|number)}>}
|
|
709
743
|
*/
|
|
710
744
|
pageFilters: {
|
|
711
745
|
type: Array,
|
|
@@ -968,6 +1002,10 @@ var script = {
|
|
|
968
1002
|
|
|
969
1003
|
data() {
|
|
970
1004
|
return {
|
|
1005
|
+
/** Options read through a page filter's `optionsFrom`, by filter key. */
|
|
1006
|
+
pageFilterFetched: {},
|
|
1007
|
+
/** Whether a page filter's `optionsFrom` read is in flight, by filter key. */
|
|
1008
|
+
pageFilterLoading: {},
|
|
971
1009
|
isEditing: false,
|
|
972
1010
|
/**
|
|
973
1011
|
* This user's arranged layout, when `userLayout` is on.
|
|
@@ -1827,6 +1865,7 @@ var script = {
|
|
|
1827
1865
|
this.pushAiContext();
|
|
1828
1866
|
this.initDateRange();
|
|
1829
1867
|
this.initPageFilters();
|
|
1868
|
+
this.loadPageFilterOptions();
|
|
1830
1869
|
this.evaluateWidgetConditions();
|
|
1831
1870
|
this.loadUserLayout();
|
|
1832
1871
|
},
|
|
@@ -1856,7 +1895,7 @@ var script = {
|
|
|
1856
1895
|
if (this.workspaceContext[pf.key] !== undefined) {
|
|
1857
1896
|
continue
|
|
1858
1897
|
}
|
|
1859
|
-
const fallback = (pf.options && pf.options.length) ? pf.options[0].value : undefined;
|
|
1898
|
+
const fallback = (pf.options && pf.options.length && pf.clearable !== true) ? pf.options[0].value : undefined;
|
|
1860
1899
|
const value = pf.default !== undefined ? pf.default : fallback;
|
|
1861
1900
|
if (value !== undefined) {
|
|
1862
1901
|
this.workspaceContext[pf.key] = value;
|
|
@@ -1888,7 +1927,45 @@ var script = {
|
|
|
1888
1927
|
* @return {Array<{value: (string|number), label: string}>}
|
|
1889
1928
|
*/
|
|
1890
1929
|
pageFilterSegments(pf) {
|
|
1891
|
-
|
|
1930
|
+
const options = Array.isArray(pf.options) ? pf.options : (this.pageFilterFetched[pf.key] || []);
|
|
1931
|
+
return options.map((o) => ({ value: o.value, label: o.label ? this.effectiveTranslate(o.label) : String(o.value) }))
|
|
1932
|
+
},
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* Read the options of every page filter with `optionsFrom`, then seed
|
|
1936
|
+
* a filter that is not clearable with its first option when it has no
|
|
1937
|
+
* value yet.
|
|
1938
|
+
*
|
|
1939
|
+
* @spec openspec/changes/page-filter-options-from/specs/dashboard-page/spec.md#requirement-a-page-filter-can-read-its-options
|
|
1940
|
+
* @return {Promise<void>}
|
|
1941
|
+
*/
|
|
1942
|
+
async loadPageFilterOptions() {
|
|
1943
|
+
const ctx = { workspace: this.workspaceContext || {} };
|
|
1944
|
+
await Promise.all((this.pageFilters || [])
|
|
1945
|
+
.filter((pf) => pf && pf.key && !Array.isArray(pf.options) && pf.optionsFrom && typeof pf.optionsFrom === 'object')
|
|
1946
|
+
.map(async (pf) => {
|
|
1947
|
+
const from = pf.optionsFrom;
|
|
1948
|
+
const source = from.register && from.schema
|
|
1949
|
+
? { url: `/apps/openregister/api/objects/${from.register}/${from.schema}`, params: { _limit: 200, ...(from.filter || {}) }, responsePath: 'results' }
|
|
1950
|
+
: { url: from.url, params: from.params, responsePath: from.responsePath };
|
|
1951
|
+
if (!source.url) {
|
|
1952
|
+
return
|
|
1953
|
+
}
|
|
1954
|
+
this.pageFilterLoading = { ...this.pageFilterLoading, [pf.key]: true };
|
|
1955
|
+
let rows;
|
|
1956
|
+
try {
|
|
1957
|
+
const data = await fetchEndpointSource(source, ctx, { fresh: true });
|
|
1958
|
+
rows = Array.isArray(data) ? data : [];
|
|
1959
|
+
} catch {
|
|
1960
|
+
rows = [];
|
|
1961
|
+
}
|
|
1962
|
+
const options = rows.map((row) => pageFilterOptionOf(row, from)).filter(Boolean);
|
|
1963
|
+
this.pageFilterFetched = { ...this.pageFilterFetched, [pf.key]: options };
|
|
1964
|
+
this.pageFilterLoading = { ...this.pageFilterLoading, [pf.key]: false };
|
|
1965
|
+
if (pf.clearable !== true && pf.default === undefined && this.workspaceContext[pf.key] === undefined && options.length > 0) {
|
|
1966
|
+
this.workspaceContext[pf.key] = options[0].value;
|
|
1967
|
+
}
|
|
1968
|
+
}));
|
|
1892
1969
|
},
|
|
1893
1970
|
|
|
1894
1971
|
/**
|
|
@@ -1903,7 +1980,7 @@ var script = {
|
|
|
1903
1980
|
if (!pf || !pf.key) {
|
|
1904
1981
|
return
|
|
1905
1982
|
}
|
|
1906
|
-
const value = option && typeof option === 'object' ? option.value : option;
|
|
1983
|
+
const value = option && typeof option === 'object' ? option.value : (option ?? null);
|
|
1907
1984
|
this.workspaceContext[pf.key] = value;
|
|
1908
1985
|
/**
|
|
1909
1986
|
* @event page-filter-change Emitted when a page-level filter selection changes.
|