@aglyn/plugins-marketplace 1.0.0-beta.143
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/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +51 -0
- package/src/index.d.ts +19 -0
- package/src/index.js +20 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/artifact-update-dialog.component.d.ts +27 -0
- package/src/lib/components/artifact-update-dialog.component.js +244 -0
- package/src/lib/components/artifact-update-dialog.component.js.map +1 -0
- package/src/lib/components/host-plugins-card.component.d.ts +23 -0
- package/src/lib/components/host-plugins-card.component.js +566 -0
- package/src/lib/components/host-plugins-card.component.js.map +1 -0
- package/src/lib/components/listing-content.component.d.ts +57 -0
- package/src/lib/components/listing-content.component.js +1880 -0
- package/src/lib/components/listing-content.component.js.map +1 -0
- package/src/lib/components/listing-image.component.d.ts +46 -0
- package/src/lib/components/listing-image.component.js +38 -0
- package/src/lib/components/listing-image.component.js.map +1 -0
- package/src/lib/components/listing-reviews.component.d.ts +22 -0
- package/src/lib/components/listing-reviews.component.js +419 -0
- package/src/lib/components/listing-reviews.component.js.map +1 -0
- package/src/lib/components/marketplace-browse.component.d.ts +38 -0
- package/src/lib/components/marketplace-browse.component.js +802 -0
- package/src/lib/components/marketplace-browse.component.js.map +1 -0
- package/src/lib/components/plugin-site-set-panel.component.d.ts +24 -0
- package/src/lib/components/plugin-site-set-panel.component.js +137 -0
- package/src/lib/components/plugin-site-set-panel.component.js.map +1 -0
- package/src/lib/components/plugin-site-set.component.d.ts +43 -0
- package/src/lib/components/plugin-site-set.component.js +425 -0
- package/src/lib/components/plugin-site-set.component.js.map +1 -0
- package/src/lib/components/rating-input.component.d.ts +3 -0
- package/src/lib/components/rating-input.component.js +47 -0
- package/src/lib/components/rating-input.component.js.map +1 -0
- package/src/lib/components/report-target.component.d.ts +36 -0
- package/src/lib/components/report-target.component.js +181 -0
- package/src/lib/components/report-target.component.js.map +1 -0
- package/src/lib/components/uninstall-impact-dialog.component.d.ts +40 -0
- package/src/lib/components/uninstall-impact-dialog.component.js +244 -0
- package/src/lib/components/uninstall-impact-dialog.component.js.map +1 -0
- package/src/lib/constants/bundle-common.d.ts +8 -0
- package/src/lib/constants/bundle-common.js +9 -0
- package/src/lib/constants/bundle-common.js.map +1 -0
- package/src/lib/hooks/use-artifact-update.d.ts +41 -0
- package/src/lib/hooks/use-artifact-update.js +169 -0
- package/src/lib/hooks/use-artifact-update.js.map +1 -0
- package/src/lib/hooks/use-marketplace-actions.d.ts +37 -0
- package/src/lib/hooks/use-marketplace-actions.js +523 -0
- package/src/lib/hooks/use-marketplace-actions.js.map +1 -0
- package/src/lib/model/artifact-merge.d.ts +154 -0
- package/src/lib/model/artifact-merge.js +228 -0
- package/src/lib/model/artifact-merge.js.map +1 -0
- package/src/lib/model/index.d.ts +43 -0
- package/src/lib/model/index.js +41 -0
- package/src/lib/model/index.js.map +1 -0
- package/src/lib/model/marketplace-props.d.ts +57 -0
- package/src/lib/model/marketplace-props.js +441 -0
- package/src/lib/model/marketplace-props.js.map +1 -0
- package/src/lib/model/marketplace.d.ts +833 -0
- package/src/lib/model/marketplace.js +929 -0
- package/src/lib/model/marketplace.js.map +1 -0
- package/src/lib/model/rating-field.d.ts +24 -0
- package/src/lib/model/rating-field.js +33 -0
- package/src/lib/model/rating-field.js.map +1 -0
- package/src/lib/plugin.d.ts +33 -0
- package/src/lib/plugin.js +86 -0
- package/src/lib/plugin.js.map +1 -0
- package/src/lib/server/billing-webhook.d.ts +25 -0
- package/src/lib/server/billing-webhook.js +1062 -0
- package/src/lib/server/billing-webhook.js.map +1 -0
- package/src/lib/server/checkout.d.ts +76 -0
- package/src/lib/server/checkout.js +477 -0
- package/src/lib/server/checkout.js.map +1 -0
- package/src/lib/server/connect.d.ts +24 -0
- package/src/lib/server/connect.js +205 -0
- package/src/lib/server/connect.js.map +1 -0
- package/src/lib/server/install-dataset-schema.d.ts +32 -0
- package/src/lib/server/install-dataset-schema.js +255 -0
- package/src/lib/server/install-dataset-schema.js.map +1 -0
- package/src/lib/server/install-email-starter.d.ts +65 -0
- package/src/lib/server/install-email-starter.js +279 -0
- package/src/lib/server/install-email-starter.js.map +1 -0
- package/src/lib/server/install-email-template.d.ts +34 -0
- package/src/lib/server/install-email-template.js +252 -0
- package/src/lib/server/install-email-template.js.map +1 -0
- package/src/lib/server/install-layout.d.ts +29 -0
- package/src/lib/server/install-layout.js +323 -0
- package/src/lib/server/install-layout.js.map +1 -0
- package/src/lib/server/install-pin-counts.d.ts +173 -0
- package/src/lib/server/install-pin-counts.js +248 -0
- package/src/lib/server/install-pin-counts.js.map +1 -0
- package/src/lib/server/install-plugin.d.ts +18 -0
- package/src/lib/server/install-plugin.js +405 -0
- package/src/lib/server/install-plugin.js.map +1 -0
- package/src/lib/server/install-template.d.ts +37 -0
- package/src/lib/server/install-template.js +348 -0
- package/src/lib/server/install-template.js.map +1 -0
- package/src/lib/server/install-theme.d.ts +42 -0
- package/src/lib/server/install-theme.js +313 -0
- package/src/lib/server/install-theme.js.map +1 -0
- package/src/lib/server/install.d.ts +27 -0
- package/src/lib/server/install.js +276 -0
- package/src/lib/server/install.js.map +1 -0
- package/src/lib/server/listing-versions.d.ts +26 -0
- package/src/lib/server/listing-versions.js +378 -0
- package/src/lib/server/listing-versions.js.map +1 -0
- package/src/lib/server/preview-image.d.ts +37 -0
- package/src/lib/server/preview-image.js +216 -0
- package/src/lib/server/preview-image.js.map +1 -0
- package/src/lib/server/provenance.d.ts +100 -0
- package/src/lib/server/provenance.js +118 -0
- package/src/lib/server/provenance.js.map +1 -0
- package/src/lib/server/publish-dataset-schema.d.ts +31 -0
- package/src/lib/server/publish-dataset-schema.js +202 -0
- package/src/lib/server/publish-dataset-schema.js.map +1 -0
- package/src/lib/server/publish-email-starter.d.ts +44 -0
- package/src/lib/server/publish-email-starter.js +231 -0
- package/src/lib/server/publish-email-starter.js.map +1 -0
- package/src/lib/server/publish-email-template.d.ts +33 -0
- package/src/lib/server/publish-email-template.js +211 -0
- package/src/lib/server/publish-email-template.js.map +1 -0
- package/src/lib/server/publish-layout.d.ts +33 -0
- package/src/lib/server/publish-layout.js +243 -0
- package/src/lib/server/publish-layout.js.map +1 -0
- package/src/lib/server/publish-plugin.d.ts +18 -0
- package/src/lib/server/publish-plugin.js +485 -0
- package/src/lib/server/publish-plugin.js.map +1 -0
- package/src/lib/server/publish-preconditions.d.ts +86 -0
- package/src/lib/server/publish-preconditions.js +160 -0
- package/src/lib/server/publish-preconditions.js.map +1 -0
- package/src/lib/server/publish-template.d.ts +27 -0
- package/src/lib/server/publish-template.js +215 -0
- package/src/lib/server/publish-template.js.map +1 -0
- package/src/lib/server/publish-theme.d.ts +38 -0
- package/src/lib/server/publish-theme.js +186 -0
- package/src/lib/server/publish-theme.js.map +1 -0
- package/src/lib/server/publish.d.ts +26 -0
- package/src/lib/server/publish.js +204 -0
- package/src/lib/server/publish.js.map +1 -0
- package/src/lib/server/publisher-profile-save.d.ts +30 -0
- package/src/lib/server/publisher-profile-save.js +226 -0
- package/src/lib/server/publisher-profile-save.js.map +1 -0
- package/src/lib/server/publisher-profile.d.ts +86 -0
- package/src/lib/server/publisher-profile.js +116 -0
- package/src/lib/server/publisher-profile.js.map +1 -0
- package/src/lib/server/purchase-entitlement.d.ts +83 -0
- package/src/lib/server/purchase-entitlement.js +118 -0
- package/src/lib/server/purchase-entitlement.js.map +1 -0
- package/src/lib/server/report.d.ts +32 -0
- package/src/lib/server/report.js +101 -0
- package/src/lib/server/report.js.map +1 -0
- package/src/lib/server/reviews.d.ts +41 -0
- package/src/lib/server/reviews.js +240 -0
- package/src/lib/server/reviews.js.map +1 -0
- package/src/lib/server/update-artifact.d.ts +19 -0
- package/src/lib/server/update-artifact.js +569 -0
- package/src/lib/server/update-artifact.js.map +1 -0
- package/src/lib/server/verification-request.d.ts +31 -0
- package/src/lib/server/verification-request.js +173 -0
- package/src/lib/server/verification-request.js.map +1 -0
- package/src/lib/server/version-stats.d.ts +202 -0
- package/src/lib/server/version-stats.js +305 -0
- package/src/lib/server/version-stats.js.map +1 -0
- package/src/lib/server.d.ts +30 -0
- package/src/lib/server.js +95 -0
- package/src/lib/server.js.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @aglyn/plugins-ui-data
|
|
2
|
+
|
|
3
|
+
The Data feature plugin (AGL-313) — the reference
|
|
4
|
+
implementation of the console+UI feature-plugin pair (AGL-277). The
|
|
5
|
+
`event-list` component moved here from `plugins-ui-mui`; legacy screen
|
|
6
|
+
nodes persisted with pluginId `mui` keep rendering because resolution is
|
|
7
|
+
by componentId.
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aglyn/plugins-marketplace",
|
|
3
|
+
"version": "1.0.0-beta.143",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"homepage": "https://aglyn.com",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/aglyn/aglyn.git",
|
|
9
|
+
"directory": "libs/plugins/marketplace"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public",
|
|
13
|
+
"provenance": true
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./src/index.d.ts",
|
|
19
|
+
"default": "./src/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./*": {
|
|
22
|
+
"types": "./src/lib/*.d.ts",
|
|
23
|
+
"default": "./src/lib/*.js"
|
|
24
|
+
},
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@aglyn/aglyn": "1.0.0-beta.143",
|
|
29
|
+
"@aglyn/shared-data-mdi": "1.0.0-beta.143",
|
|
30
|
+
"@aglyn/shared-ui-jsx": "1.0.0-beta.143",
|
|
31
|
+
"@aglyn/shared-ui-next": "1.0.0-beta.143",
|
|
32
|
+
"@aglyn/shared-ui-snackstack": "1.0.0-beta.143",
|
|
33
|
+
"@aglyn/shared-util-email": "1.0.0-beta.143",
|
|
34
|
+
"@aglyn/shared-util-http": "1.0.0-beta.143",
|
|
35
|
+
"@aglyn/tenant-data-admin": "1.0.0-beta.143",
|
|
36
|
+
"@aglyn/tenant-feature-instance": "1.0.0-beta.143",
|
|
37
|
+
"@aglyn/tenant-runtime": "1.0.0-beta.143",
|
|
38
|
+
"@swc/helpers": "0.5.23"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@mui/material": "^9.3.1",
|
|
42
|
+
"firebase": "^12.18.0",
|
|
43
|
+
"firebase-admin": "^14.3.0",
|
|
44
|
+
"next": "16.3.3",
|
|
45
|
+
"react": "^19.2.8"
|
|
46
|
+
},
|
|
47
|
+
"sideEffects": false,
|
|
48
|
+
"types": "./src/index.d.ts",
|
|
49
|
+
"module": "./src/index.js",
|
|
50
|
+
"main": "./src/index.js"
|
|
51
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export * from './lib/constants/bundle-common';
|
|
18
|
+
export * from './lib/plugin';
|
|
19
|
+
export * from './lib/model';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ export * from "./lib/constants/bundle-common.js";
|
|
17
|
+
export * from "./lib/plugin.js";
|
|
18
|
+
export * from "./lib/model/index.js";
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../libs/plugins/marketplace/src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './lib/constants/bundle-common'\nexport * from './lib/plugin'\nexport * from './lib/model'\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,cAAc,mCAA+B;AAC7C,cAAc,kBAAc;AAC5B,cAAc,uBAAa"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ArtifactUpdatePreview } from '../hooks/use-artifact-update';
|
|
2
|
+
/**
|
|
3
|
+
* "What will this update do to my copy?" answered before anything is written
|
|
4
|
+
* (AGL-1018).
|
|
5
|
+
*
|
|
6
|
+
* The dialog exists because the alternative is an Update button that silently
|
|
7
|
+
* overwrites customised content. So the ordering here is the point: what the
|
|
8
|
+
* publisher changed that is safe to take, what stays because this workspace
|
|
9
|
+
* edited it, and — last, and never pre-selected — the fields both sides
|
|
10
|
+
* changed, where taking the publisher's value means losing an edit.
|
|
11
|
+
*
|
|
12
|
+
* Applying without reading anything is safe by construction: every conflict
|
|
13
|
+
* defaults to keeping the workspace's value.
|
|
14
|
+
*/
|
|
15
|
+
export interface ArtifactUpdateDialogProps {
|
|
16
|
+
open: boolean;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
/** The listing's name, for the title. Not `displayName` — that name collides
|
|
19
|
+
* with the React component static and arrives undefined. */
|
|
20
|
+
artifactName: string;
|
|
21
|
+
preview: ArtifactUpdatePreview | null;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
onApplyMerge: (takePaths: string[], confirmDestructive: boolean) => void;
|
|
24
|
+
onApplyCopy: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function ArtifactUpdateDialog({ open, onClose, artifactName, preview, loading, onApplyMerge, onApplyCopy, }: ArtifactUpdateDialogProps): import("react").JSX.Element;
|
|
27
|
+
export default ArtifactUpdateDialog;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ 'use client';
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
+
import { Alert, Box, Button, Checkbox, Chip, CircularProgress, Dialog, DialogActions, DialogContent, DialogTitle, Divider, FormControlLabel, Stack, Typography } from "@mui/material";
|
|
19
|
+
import { useEffect, useState } from "react";
|
|
20
|
+
import { describeChange, summarizeValue } from "../model/index.js";
|
|
21
|
+
/** One diff row: what it is, what you have, what they ship. */ function ChangeRow({ change, action }) {
|
|
22
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
23
|
+
direction: "row",
|
|
24
|
+
spacing: 1,
|
|
25
|
+
sx: {
|
|
26
|
+
alignItems: 'flex-start',
|
|
27
|
+
py: 0.5
|
|
28
|
+
},
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
31
|
+
sx: {
|
|
32
|
+
minWidth: 0,
|
|
33
|
+
flex: 1
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
37
|
+
variant: "body2",
|
|
38
|
+
sx: {
|
|
39
|
+
fontFamily: 'monospace',
|
|
40
|
+
wordBreak: 'break-all'
|
|
41
|
+
},
|
|
42
|
+
children: describeChange(change)
|
|
43
|
+
}),
|
|
44
|
+
!change.added && !change.removed ? /*#__PURE__*/ _jsx(Typography, {
|
|
45
|
+
variant: "caption",
|
|
46
|
+
color: "text.secondary",
|
|
47
|
+
children: `yours: ${summarizeValue(change.current)} · theirs: ${summarizeValue(change.incoming)}`
|
|
48
|
+
}) : null
|
|
49
|
+
]
|
|
50
|
+
}),
|
|
51
|
+
action
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function Section({ title, caption, changes, children }) {
|
|
56
|
+
if (!changes.length && !children) return null;
|
|
57
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
58
|
+
spacing: 0.5,
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
61
|
+
direction: "row",
|
|
62
|
+
spacing: 1,
|
|
63
|
+
sx: {
|
|
64
|
+
alignItems: 'center'
|
|
65
|
+
},
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
68
|
+
variant: "subtitle2",
|
|
69
|
+
children: title
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
72
|
+
size: "small",
|
|
73
|
+
label: changes.length
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
78
|
+
variant: "caption",
|
|
79
|
+
color: "text.secondary",
|
|
80
|
+
children: caption
|
|
81
|
+
}),
|
|
82
|
+
children != null ? children : changes.map((change)=>/*#__PURE__*/ _jsx(ChangeRow, {
|
|
83
|
+
change: change
|
|
84
|
+
}, change.path))
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export function ArtifactUpdateDialog({ open, onClose, artifactName, preview, loading, onApplyMerge, onApplyCopy }) {
|
|
89
|
+
/** Conflicting paths the user chose to hand to the publisher. */ const [take, setTake] = useState([]);
|
|
90
|
+
const [confirmDestructive, setConfirmDestructive] = useState(false);
|
|
91
|
+
// A fresh preview is a fresh decision — carrying ticks across two different
|
|
92
|
+
// updates would apply a choice to a field the user never looked at.
|
|
93
|
+
useEffect(()=>{
|
|
94
|
+
setTake([]);
|
|
95
|
+
setConfirmDestructive(false);
|
|
96
|
+
}, [
|
|
97
|
+
preview
|
|
98
|
+
]);
|
|
99
|
+
const schema = preview == null ? void 0 : preview.schema;
|
|
100
|
+
const destructive = Boolean(schema && !schema.additiveOnly);
|
|
101
|
+
return /*#__PURE__*/ _jsxs(Dialog, {
|
|
102
|
+
open: open,
|
|
103
|
+
onClose: onClose,
|
|
104
|
+
maxWidth: "sm",
|
|
105
|
+
fullWidth: true,
|
|
106
|
+
children: [
|
|
107
|
+
/*#__PURE__*/ _jsx(DialogTitle, {
|
|
108
|
+
children: `Update ${artifactName}`
|
|
109
|
+
}),
|
|
110
|
+
/*#__PURE__*/ _jsx(DialogContent, {
|
|
111
|
+
dividers: true,
|
|
112
|
+
children: loading || !preview ? /*#__PURE__*/ _jsx(Stack, {
|
|
113
|
+
sx: {
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
py: 4
|
|
116
|
+
},
|
|
117
|
+
children: /*#__PURE__*/ _jsx(CircularProgress, {
|
|
118
|
+
size: 24
|
|
119
|
+
})
|
|
120
|
+
}) : /*#__PURE__*/ _jsxs(Stack, {
|
|
121
|
+
spacing: 2,
|
|
122
|
+
children: [
|
|
123
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
124
|
+
variant: "body2",
|
|
125
|
+
color: "text.secondary",
|
|
126
|
+
children: preview.installedVersion ? `You have v${preview.installedVersion}; v${preview.availableVersion} is available.` : `v${preview.availableVersion} is available.`
|
|
127
|
+
}),
|
|
128
|
+
!preview.mergeable ? /*#__PURE__*/ _jsx(Alert, {
|
|
129
|
+
severity: "info",
|
|
130
|
+
children: preview.reason
|
|
131
|
+
}) : preview.identical ? /*#__PURE__*/ _jsx(Alert, {
|
|
132
|
+
severity: "success",
|
|
133
|
+
children: 'Your copy already matches the new version — nothing to take.'
|
|
134
|
+
}) : null,
|
|
135
|
+
schema ? /*#__PURE__*/ _jsx(Alert, {
|
|
136
|
+
severity: destructive ? 'warning' : 'info',
|
|
137
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
138
|
+
spacing: 0.5,
|
|
139
|
+
children: [
|
|
140
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
141
|
+
variant: "body2",
|
|
142
|
+
children: `${schema.added.length} field(s) added, ${schema.removed.length} removed, ${schema.retyped.length} retyped.`
|
|
143
|
+
}),
|
|
144
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
145
|
+
variant: "body2",
|
|
146
|
+
children: destructive ? `This dataset holds ${schema.recordCount} record(s). Removing or ` + 'retyping a field changes how their existing values read.' : 'Additive only — nothing already stored is reinterpreted.'
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
})
|
|
150
|
+
}) : null,
|
|
151
|
+
preview.mergeable ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
152
|
+
children: [
|
|
153
|
+
/*#__PURE__*/ _jsx(Section, {
|
|
154
|
+
title: "Safe to take",
|
|
155
|
+
caption: "Changed by the publisher, untouched here. Applied when you update.",
|
|
156
|
+
changes: preview.safe
|
|
157
|
+
}),
|
|
158
|
+
/*#__PURE__*/ _jsx(Divider, {}),
|
|
159
|
+
/*#__PURE__*/ _jsx(Section, {
|
|
160
|
+
title: "Your changes, kept",
|
|
161
|
+
caption: "Edited here and not upstream. The update leaves these alone.",
|
|
162
|
+
changes: preview.kept
|
|
163
|
+
}),
|
|
164
|
+
preview.conflicts.length ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
165
|
+
children: [
|
|
166
|
+
/*#__PURE__*/ _jsx(Divider, {}),
|
|
167
|
+
/*#__PURE__*/ _jsx(Section, {
|
|
168
|
+
title: "Changed on both sides",
|
|
169
|
+
caption: "Both you and the publisher changed these. Yours is kept unless you tick it.",
|
|
170
|
+
changes: preview.conflicts,
|
|
171
|
+
children: preview.conflicts.map((change)=>/*#__PURE__*/ _jsx(ChangeRow, {
|
|
172
|
+
change: change,
|
|
173
|
+
action: /*#__PURE__*/ _jsx(FormControlLabel, {
|
|
174
|
+
control: /*#__PURE__*/ _jsx(Checkbox, {
|
|
175
|
+
size: "small",
|
|
176
|
+
checked: take.includes(change.path),
|
|
177
|
+
onChange: (event)=>setTake((current)=>event.target.checked ? [
|
|
178
|
+
...current,
|
|
179
|
+
change.path
|
|
180
|
+
] : current.filter((path)=>path !== change.path))
|
|
181
|
+
}),
|
|
182
|
+
label: "Take theirs",
|
|
183
|
+
slotProps: {
|
|
184
|
+
typography: {
|
|
185
|
+
variant: 'caption'
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
sx: {
|
|
189
|
+
mr: 0,
|
|
190
|
+
whiteSpace: 'nowrap'
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
}, change.path))
|
|
194
|
+
})
|
|
195
|
+
]
|
|
196
|
+
}) : null,
|
|
197
|
+
preview.unchanged ? /*#__PURE__*/ _jsx(Typography, {
|
|
198
|
+
variant: "caption",
|
|
199
|
+
color: "text.secondary",
|
|
200
|
+
children: `${preview.unchanged} field(s) identical in both versions.`
|
|
201
|
+
}) : null
|
|
202
|
+
]
|
|
203
|
+
}) : null,
|
|
204
|
+
destructive ? /*#__PURE__*/ _jsx(FormControlLabel, {
|
|
205
|
+
control: /*#__PURE__*/ _jsx(Checkbox, {
|
|
206
|
+
checked: confirmDestructive,
|
|
207
|
+
onChange: (event)=>setConfirmDestructive(event.target.checked)
|
|
208
|
+
}),
|
|
209
|
+
label: `I understand this affects ${schema == null ? void 0 : schema.recordCount} existing record(s)`,
|
|
210
|
+
slotProps: {
|
|
211
|
+
typography: {
|
|
212
|
+
variant: 'body2'
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}) : null
|
|
216
|
+
]
|
|
217
|
+
})
|
|
218
|
+
}),
|
|
219
|
+
/*#__PURE__*/ _jsxs(DialogActions, {
|
|
220
|
+
children: [
|
|
221
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
222
|
+
onClick: onClose,
|
|
223
|
+
children: 'Cancel'
|
|
224
|
+
}),
|
|
225
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
226
|
+
onClick: onApplyCopy,
|
|
227
|
+
disabled: loading || !preview,
|
|
228
|
+
children: 'Install as a new copy'
|
|
229
|
+
}),
|
|
230
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
231
|
+
variant: "contained",
|
|
232
|
+
color: "primary",
|
|
233
|
+
disabled: loading || !(preview == null ? void 0 : preview.mergeable) || destructive && !confirmDestructive,
|
|
234
|
+
onClick: ()=>onApplyMerge(take, confirmDestructive),
|
|
235
|
+
children: (preview == null ? void 0 : preview.identical) ? `Take v${preview.availableVersion} (no content changes)` : take.length ? `Apply (${take.length} taken from publisher)` : 'Apply safe changes'
|
|
236
|
+
})
|
|
237
|
+
]
|
|
238
|
+
})
|
|
239
|
+
]
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
export default ArtifactUpdateDialog;
|
|
243
|
+
|
|
244
|
+
//# sourceMappingURL=artifact-update-dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/marketplace/src/lib/components/artifact-update-dialog.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport {\n Alert,\n Box,\n Button,\n Checkbox,\n Chip,\n CircularProgress,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n FormControlLabel,\n Stack,\n Typography,\n} from '@mui/material'\nimport { useEffect, useState } from 'react'\nimport {\n describeChange,\n summarizeValue,\n type ArtifactChange,\n} from '../model'\nimport type { ArtifactUpdatePreview } from '../hooks/use-artifact-update'\n\n/**\n * \"What will this update do to my copy?\" answered before anything is written\n * (AGL-1018).\n *\n * The dialog exists because the alternative is an Update button that silently\n * overwrites customised content. So the ordering here is the point: what the\n * publisher changed that is safe to take, what stays because this workspace\n * edited it, and — last, and never pre-selected — the fields both sides\n * changed, where taking the publisher's value means losing an edit.\n *\n * Applying without reading anything is safe by construction: every conflict\n * defaults to keeping the workspace's value.\n */\nexport interface ArtifactUpdateDialogProps {\n open: boolean\n onClose: () => void\n /** The listing's name, for the title. Not `displayName` — that name collides\n * with the React component static and arrives undefined. */\n artifactName: string\n preview: ArtifactUpdatePreview | null\n loading: boolean\n onApplyMerge: (takePaths: string[], confirmDestructive: boolean) => void\n onApplyCopy: () => void\n}\n\n/** One diff row: what it is, what you have, what they ship. */\nfunction ChangeRow({\n change,\n action,\n}: {\n change: ArtifactChange\n action?: React.ReactNode\n}) {\n return (\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'flex-start', py: 0.5 }}\n >\n <Box sx={{ minWidth: 0, flex: 1 }}>\n <Typography\n variant=\"body2\"\n sx={{ fontFamily: 'monospace', wordBreak: 'break-all' }}\n >\n {describeChange(change)}\n </Typography>\n {/* Values, summarised. A diff row that dumps a serialised node is\n unreadable exactly when it matters most. */}\n {!change.added && !change.removed ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`yours: ${summarizeValue(change.current)} · theirs: ${summarizeValue(\n change.incoming,\n )}`}\n </Typography>\n ) : null}\n </Box>\n {action}\n </Stack>\n )\n}\n\nfunction Section({\n title,\n caption,\n changes,\n children,\n}: {\n title: string\n caption: string\n changes: ArtifactChange[]\n children?: React.ReactNode\n}) {\n if (!changes.length && !children) return null\n return (\n <Stack spacing={0.5}>\n <Stack direction=\"row\" spacing={1} sx={{ alignItems: 'center' }}>\n <Typography variant=\"subtitle2\">{title}</Typography>\n <Chip size=\"small\" label={changes.length} />\n </Stack>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {caption}\n </Typography>\n {children ??\n changes.map((change) => (\n <ChangeRow key={change.path} change={change} />\n ))}\n </Stack>\n )\n}\n\nexport function ArtifactUpdateDialog({\n open,\n onClose,\n artifactName,\n preview,\n loading,\n onApplyMerge,\n onApplyCopy,\n}: ArtifactUpdateDialogProps) {\n /** Conflicting paths the user chose to hand to the publisher. */\n const [take, setTake] = useState<string[]>([])\n const [confirmDestructive, setConfirmDestructive] = useState(false)\n // A fresh preview is a fresh decision — carrying ticks across two different\n // updates would apply a choice to a field the user never looked at.\n useEffect(() => {\n setTake([])\n setConfirmDestructive(false)\n }, [preview])\n\n const schema = preview?.schema\n const destructive = Boolean(schema && !schema.additiveOnly)\n\n return (\n <Dialog open={open} onClose={onClose} maxWidth=\"sm\" fullWidth>\n <DialogTitle>{`Update ${artifactName}`}</DialogTitle>\n <DialogContent dividers>\n {loading || !preview ? (\n <Stack sx={{ alignItems: 'center', py: 4 }}>\n <CircularProgress size={24} />\n </Stack>\n ) : (\n <Stack spacing={2}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {preview.installedVersion\n ? `You have v${preview.installedVersion}; v${preview.availableVersion} is available.`\n : `v${preview.availableVersion} is available.`}\n </Typography>\n\n {/* No base, or a type that cannot be merged. Saying which, in the\n publisher's own terms, beats a disabled button with no reason. */}\n {!preview.mergeable ? (\n <Alert severity=\"info\">{preview.reason}</Alert>\n ) : preview.identical ? (\n <Alert severity=\"success\">\n {'Your copy already matches the new version — nothing to take.'}\n </Alert>\n ) : null}\n\n {schema ? (\n <Alert severity={destructive ? 'warning' : 'info'}>\n <Stack spacing={0.5}>\n <Typography variant=\"body2\">\n {`${schema.added.length} field(s) added, ${schema.removed.length} removed, ${schema.retyped.length} retyped.`}\n </Typography>\n <Typography variant=\"body2\">\n {destructive\n ? `This dataset holds ${schema.recordCount} record(s). Removing or ` +\n 'retyping a field changes how their existing values read.'\n : 'Additive only — nothing already stored is reinterpreted.'}\n </Typography>\n </Stack>\n </Alert>\n ) : null}\n\n {preview.mergeable ? (\n <>\n <Section\n title=\"Safe to take\"\n caption=\"Changed by the publisher, untouched here. Applied when you update.\"\n changes={preview.safe}\n />\n <Divider />\n <Section\n title=\"Your changes, kept\"\n caption=\"Edited here and not upstream. The update leaves these alone.\"\n changes={preview.kept}\n />\n {preview.conflicts.length ? (\n <>\n <Divider />\n <Section\n title=\"Changed on both sides\"\n caption=\"Both you and the publisher changed these. Yours is kept unless you tick it.\"\n changes={preview.conflicts}\n >\n {preview.conflicts.map((change) => (\n <ChangeRow\n key={change.path}\n change={change}\n action={\n <FormControlLabel\n control={\n <Checkbox\n size=\"small\"\n checked={take.includes(change.path)}\n onChange={(event) =>\n setTake((current) =>\n event.target.checked\n ? [...current, change.path]\n : current.filter(\n (path) => path !== change.path,\n ),\n )\n }\n />\n }\n label=\"Take theirs\"\n slotProps={{ typography: { variant: 'caption' } }}\n sx={{ mr: 0, whiteSpace: 'nowrap' }}\n />\n }\n />\n ))}\n </Section>\n </>\n ) : null}\n {preview.unchanged ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`${preview.unchanged} field(s) identical in both versions.`}\n </Typography>\n ) : null}\n </>\n ) : null}\n\n {destructive ? (\n <FormControlLabel\n control={\n <Checkbox\n checked={confirmDestructive}\n onChange={(event) =>\n setConfirmDestructive(event.target.checked)\n }\n />\n }\n label={`I understand this affects ${schema?.recordCount} existing record(s)`}\n slotProps={{ typography: { variant: 'body2' } }}\n />\n ) : null}\n </Stack>\n )}\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose}>{'Cancel'}</Button>\n {/* Always available, and the only option when there is no base: it\n risks nothing, because the customised copy is detached rather than\n replaced. */}\n <Button onClick={onApplyCopy} disabled={loading || !preview}>\n {'Install as a new copy'}\n </Button>\n <Button\n variant=\"contained\"\n color=\"primary\"\n disabled={\n loading || !preview?.mergeable || (destructive && !confirmDestructive)\n }\n onClick={() => onApplyMerge(take, confirmDestructive)}\n >\n {/* An identical version is still worth taking (AGL-1035): the write\n is a version re-stamp, and without it the workspace is told it is\n behind forever. Labelled for what it does, so nobody presses it\n expecting their copy to change. */}\n {preview?.identical\n ? `Take v${preview.availableVersion} (no content changes)`\n : take.length\n ? `Apply (${take.length} taken from publisher)`\n : 'Apply safe changes'}\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n\nexport default ArtifactUpdateDialog\n"],"names":["Alert","Box","Button","Checkbox","Chip","CircularProgress","Dialog","DialogActions","DialogContent","DialogTitle","Divider","FormControlLabel","Stack","Typography","useEffect","useState","describeChange","summarizeValue","ChangeRow","change","action","direction","spacing","sx","alignItems","py","minWidth","flex","variant","fontFamily","wordBreak","added","removed","color","current","incoming","Section","title","caption","changes","children","length","size","label","map","path","ArtifactUpdateDialog","open","onClose","artifactName","preview","loading","onApplyMerge","onApplyCopy","take","setTake","confirmDestructive","setConfirmDestructive","schema","destructive","Boolean","additiveOnly","maxWidth","fullWidth","dividers","installedVersion","availableVersion","mergeable","severity","reason","identical","retyped","recordCount","safe","kept","conflicts","control","checked","includes","onChange","event","target","filter","slotProps","typography","mr","whiteSpace","unchanged","onClick","disabled"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA,SACEA,KAAK,EACLC,GAAG,EACHC,MAAM,EACNC,QAAQ,EACRC,IAAI,EACJC,gBAAgB,EAChBC,MAAM,EACNC,aAAa,EACbC,aAAa,EACbC,WAAW,EACXC,OAAO,EACPC,gBAAgB,EAChBC,KAAK,EACLC,UAAU,QACL,gBAAe;AACtB,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC3C,SACEC,cAAc,EACdC,cAAc,QAET,oBAAU;AA4BjB,6DAA6D,GAC7D,SAASC,UAAU,EACjBC,MAAM,EACNC,MAAM,EAIP;I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CAAC,mBAAmB,CAAC;4BAC5EW,WAAW;gCAAEC,YAAY;oCAAExD,SAAS;gCAAQ;4BAAE;6BAE9C;;;;0BAIV,MAACrB;;kCACC,KAACL;wBAAOsF,SAASxC;kCAAU;;kCAI3B,KAAC9C;wBAAOsF,SAASnC;wBAAaoC,UAAUtC,WAAW,CAACD;kCACjD;;kCAEH,KAAChD;wBACC0B,SAAQ;wBACRK,OAAM;wBACNwD,UACEtC,WAAW,EAACD,2BAAAA,QAASiB,SAAS,KAAKR,eAAe,CAACH;wBAErDgC,SAAS,IAAMpC,aAAaE,MAAME;kCAMjCN,CAAAA,2BAAAA,QAASoB,SAAS,IACf,CAAC,MAAM,EAAEpB,QAAQgB,gBAAgB,CAAC,qBAAqB,CAAC,GACxDZ,KAAKb,MAAM,GACT,CAAC,OAAO,EAAEa,KAAKb,MAAM,CAAC,sBAAsB,CAAC,GAC7C;;;;;;AAKhB;AAEA,eAAeK,qBAAoB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface HostPluginsCardProps {
|
|
2
|
+
hostId: string;
|
|
3
|
+
/**
|
|
4
|
+
* Org slug from the URL, when this card is rendered at org scope. With it,
|
|
5
|
+
* each row links through to that installation's own page (AGL-1007);
|
|
6
|
+
* without it the rows stay plain text rather than linking to nowhere.
|
|
7
|
+
*/
|
|
8
|
+
orgSlug?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Installed marketplace plugins (AGL-45): lists the host's pinned plugin
|
|
12
|
+
* installs with their capabilities, flags available upgrades (latest
|
|
13
|
+
* listing version ≠ pinned) and platform kill switches (public
|
|
14
|
+
* `revocations` read), and offers explicit upgrade/uninstall. Upgrades go
|
|
15
|
+
* through `/api/marketplace/install-plugin` so the new pin is validated
|
|
16
|
+
* server-side; uninstall removes the host install doc. Place the installed
|
|
17
|
+
* plugin on a screen with the Plugin element (listing id).
|
|
18
|
+
*/
|
|
19
|
+
export declare function HostPluginsCard(props: HostPluginsCardProps): import("react").JSX.Element;
|
|
20
|
+
export declare namespace HostPluginsCard {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
export default HostPluginsCard;
|