@xh/hoist 71.0.0-SNAPSHOT.1734118787755 → 71.0.0-SNAPSHOT.1734552619121
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/CHANGELOG.md +1 -0
- package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +15 -6
- package/build/types/cmp/viewmanager/ViewToBlobApi.d.ts +1 -2
- package/build/types/desktop/cmp/viewmanager/ViewManagerLocalModel.d.ts +1 -0
- package/build/types/desktop/cmp/viewmanager/dialog/ManageDialog.d.ts +2 -1
- package/build/types/desktop/cmp/viewmanager/dialog/ManageDialogModel.d.ts +0 -4
- package/build/types/desktop/cmp/viewmanager/dialog/ViewMultiPanel.d.ts +2 -1
- package/cmp/viewmanager/ViewManagerModel.ts +44 -15
- package/cmp/viewmanager/ViewToBlobApi.ts +27 -11
- package/desktop/cmp/viewmanager/ViewManager.ts +4 -1
- package/desktop/cmp/viewmanager/ViewManagerLocalModel.ts +5 -0
- package/desktop/cmp/viewmanager/dialog/ManageDialog.ts +4 -4
- package/desktop/cmp/viewmanager/dialog/ManageDialogModel.ts +83 -77
- package/desktop/cmp/viewmanager/dialog/ViewMultiPanel.ts +2 -2
- package/desktop/cmp/viewmanager/dialog/ViewPanel.ts +60 -55
- package/desktop/cmp/viewmanager/dialog/ViewPanelModel.ts +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -27,7 +27,8 @@ export const viewPanel = hoistCmp.factory({
|
|
|
27
27
|
const {view} = model;
|
|
28
28
|
if (!view) return null;
|
|
29
29
|
|
|
30
|
-
const {isGlobal, lastUpdated, lastUpdatedBy, isEditable} = view
|
|
30
|
+
const {isGlobal, lastUpdated, lastUpdatedBy, isEditable} = view,
|
|
31
|
+
{enableSharing} = model.parent.viewManagerModel;
|
|
31
32
|
|
|
32
33
|
return panel({
|
|
33
34
|
item: form({
|
|
@@ -74,7 +75,7 @@ export const viewPanel = hoistCmp.factory({
|
|
|
74
75
|
inline: true,
|
|
75
76
|
item: switchInput(),
|
|
76
77
|
readonlyRenderer: v => (v ? 'Yes' : 'No'),
|
|
77
|
-
omit: isGlobal || !isEditable
|
|
78
|
+
omit: !enableSharing || isGlobal || !isEditable
|
|
78
79
|
}),
|
|
79
80
|
formField({
|
|
80
81
|
field: 'isDefaultPinned',
|
|
@@ -104,58 +105,62 @@ const formButtons = hoistCmp.factory<ViewPanelModel>({
|
|
|
104
105
|
{readonly} = formModel,
|
|
105
106
|
{isPinned} = view;
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
108
|
+
if (formModel.isDirty) {
|
|
109
|
+
return hbox({
|
|
110
|
+
justifyContent: 'center',
|
|
111
|
+
items: [
|
|
112
|
+
button({
|
|
113
|
+
text: 'Save Changes',
|
|
114
|
+
icon: Icon.check(),
|
|
115
|
+
intent: 'success',
|
|
116
|
+
minimal: false,
|
|
117
|
+
disabled: !formModel.isValid,
|
|
118
|
+
onClick: () => model.saveAsync()
|
|
119
|
+
}),
|
|
120
|
+
hspacer(),
|
|
121
|
+
button({
|
|
122
|
+
icon: Icon.reset(),
|
|
123
|
+
tooltip: 'Revert changes',
|
|
124
|
+
minimal: false,
|
|
125
|
+
onClick: () => formModel.reset()
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const {enableGlobal, globalDisplayName, manageGlobal, typeDisplayName} =
|
|
132
|
+
parent.viewManagerModel;
|
|
133
|
+
return vbox({
|
|
134
|
+
style: {gap: 10, alignItems: 'center'},
|
|
135
|
+
items: [
|
|
136
|
+
button({
|
|
137
|
+
text: isPinned ? 'Unpin from your Menu' : 'Pin to your Menu',
|
|
138
|
+
icon: Icon.pin({
|
|
139
|
+
prefix: isPinned ? 'fas' : 'far',
|
|
140
|
+
className: isPinned ? 'xh-yellow' : null
|
|
141
|
+
}),
|
|
142
|
+
width: 200,
|
|
143
|
+
outlined: true,
|
|
144
|
+
onClick: () => parent.togglePinned([view])
|
|
145
|
+
}),
|
|
146
|
+
button({
|
|
147
|
+
text: `Promote to ${capitalize(globalDisplayName)} ${typeDisplayName}`,
|
|
148
|
+
icon: Icon.globe(),
|
|
149
|
+
width: 200,
|
|
150
|
+
outlined: true,
|
|
151
|
+
omit: readonly || view.isGlobal || !enableGlobal || !manageGlobal,
|
|
152
|
+
onClick: () => parent.makeGlobalAsync(view)
|
|
153
|
+
}),
|
|
154
|
+
button({
|
|
155
|
+
text: 'Delete',
|
|
156
|
+
icon: Icon.delete(),
|
|
157
|
+
width: 200,
|
|
158
|
+
outlined: true,
|
|
159
|
+
intent: 'danger',
|
|
160
|
+
omit: readonly,
|
|
161
|
+
onClick: () => parent.deleteAsync([view])
|
|
162
|
+
})
|
|
163
|
+
]
|
|
164
|
+
});
|
|
160
165
|
}
|
|
161
166
|
});
|
|
@@ -44,7 +44,7 @@ export class ViewPanelModel extends HoistModel {
|
|
|
44
44
|
const {formModel} = this;
|
|
45
45
|
formModel.init({
|
|
46
46
|
...view,
|
|
47
|
-
owner: view.owner ?? capitalize(parent.globalDisplayName)
|
|
47
|
+
owner: view.owner ?? capitalize(parent.viewManagerModel.globalDisplayName)
|
|
48
48
|
});
|
|
49
49
|
formModel.readonly = !view.isEditable;
|
|
50
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "71.0.0-SNAPSHOT.
|
|
3
|
+
"version": "71.0.0-SNAPSHOT.1734552619121",
|
|
4
4
|
"description": "Hoist add-on for building and deploying React Applications.",
|
|
5
5
|
"repository": "github:xh/hoist-react",
|
|
6
6
|
"homepage": "https://xh.io",
|