@brightspot/ui 6.3.2 → 6.3.3
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/storybook/project.json +1 -1
- package/package.json +1 -1
- package/src/legacy/tool-ui/src/Entry.ts +4 -29
- package/src/legacy/tool-ui/src/RepeatableContentSelector.css +2 -2
- package/src/legacy/tool-ui/src/Toggleable/index.ts +37 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.94bb2bfda58abfdd894e.js → RTEProseMirror.420477026fe7508c83cf.js} +2 -2
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.cb024eef14914807528c.js → v4.1b0380b0b258d4a60e3f.js} +4 -4
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.10d2a7f1cabee072b6a1.js → v5.6f530e9fe1fb94bfc857.js} +4 -4
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.e1e83f5e0cd06ad0280c.css → v5.95b7459d6c50c61b6480.css} +1 -1
- /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.94bb2bfda58abfdd894e.js.LICENSE.txt → RTEProseMirror.420477026fe7508c83cf.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.cb024eef14914807528c.js.LICENSE.txt → v4.1b0380b0b258d4a60e3f.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.10d2a7f1cabee072b6a1.js.LICENSE.txt → v5.6f530e9fe1fb94bfc857.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1789070963185,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"knownPackages":{"testPackages":{"@storybook/addon-vitest":"10.2.12","@vitest/browser-playwright":"4.0.18","playwright":"1.58.2","vitest":"4.0.18"},"stylingPackages":{"tailwindcss":"^3.4.13","autoprefixer":"10.4.21"}},"hasRouterPackage":false,"packageManager":{"type":"yarn","agent":"yarn","nodeLinker":"undefined"},"preview":{"usesGlobals":true},"framework":{"name":"@storybook/web-components-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/web-components","portableStoriesFileCount":0,"applicationFileCount":6,"storybookVersion":"10.2.12","storybookVersionSpecifier":"10.2.12","language":"typescript","storybookPackages":{"@storybook/addon-themes":{"version":"10.2.12"},"@storybook/web-components-vite":{"version":"10.2.12"},"@wc-toolkit/storybook-helpers":{"version":"10.0.0"},"eslint-plugin-storybook":{"version":"10.0.7"},"storybook":{}},"addons":{"@storybook/addon-docs":{"version":"10.2.12"},"@storybook/addon-vitest":{"version":"10.2.12"}},"packageJsonType":"module"}
|
package/package.json
CHANGED
|
@@ -834,34 +834,6 @@ onVisible('.Deferred', (deferred) => {
|
|
|
834
834
|
}
|
|
835
835
|
})
|
|
836
836
|
|
|
837
|
-
/* Frame JS removes the Widget class from frames so we need to re-add it; only target the popup's own
|
|
838
|
-
frame so nested frames (e.g. the content edit preview) keep their regular styling */
|
|
839
|
-
onFind(
|
|
840
|
-
[
|
|
841
|
-
'.Popup[name="edit-guide"] .frame',
|
|
842
|
-
'.Popup[name="PostPublishActionsPage"] .frame',
|
|
843
|
-
'.Popup[name^="create-new-object-"] > .Popup-content > .frame',
|
|
844
|
-
'.Popup[name^="objectId-create-"] > .Popup-content > .frame',
|
|
845
|
-
'.Popup[name="AddEmbeddedContent"] .frame',
|
|
846
|
-
'.Popup[name^="conversation-"] .frame',
|
|
847
|
-
'.Popup[name^="_copy"] > .Popup-content > .frame',
|
|
848
|
-
'.Popup[name="DateStringCalendarFrame"] .frame',
|
|
849
|
-
],
|
|
850
|
-
(frame: HTMLElement) => {
|
|
851
|
-
const config = { attributeFilter: ['class'] }
|
|
852
|
-
const observer = new MutationObserver((mutations) => {
|
|
853
|
-
mutations.forEach((mutation) => {
|
|
854
|
-
const target = mutation.target as HTMLElement
|
|
855
|
-
if (!target.classList.contains('Widget')) {
|
|
856
|
-
target.classList.add('Widget')
|
|
857
|
-
}
|
|
858
|
-
})
|
|
859
|
-
})
|
|
860
|
-
|
|
861
|
-
observer.observe(frame, config)
|
|
862
|
-
},
|
|
863
|
-
)
|
|
864
|
-
|
|
865
837
|
// Handle Content Edit left pane scrolling to hide and collapse the top bar.
|
|
866
838
|
// Note: Scroll event is used instead of IntersectionObserver because of dynamic content in scroll area.
|
|
867
839
|
onFind('.ContentEdit-left', (leftPane: HTMLElement) => {
|
|
@@ -935,7 +907,10 @@ onFind('.Widget-controls', (controls: HTMLElement) => {
|
|
|
935
907
|
const widget = controls.closest<HTMLElement>('.Widget')
|
|
936
908
|
if (!widget) return
|
|
937
909
|
const update = () =>
|
|
938
|
-
widget.classList.toggle(
|
|
910
|
+
widget.classList.toggle(
|
|
911
|
+
'has-widgetControls',
|
|
912
|
+
controls.childNodes.length > 0,
|
|
913
|
+
)
|
|
939
914
|
update()
|
|
940
915
|
new MutationObserver(update).observe(controls, { childList: true })
|
|
941
916
|
})
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
@apply before:ms-2 before:flex before:size-5 before:cursor-move before:justify-center before:text-sm before:text-gray-500 before:content-[counter(RCS-item)];
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
/* Hide item until
|
|
48
|
-
&.Sortable-item:not(
|
|
47
|
+
/* Hide item until Sortable.js has finished initializing it */
|
|
48
|
+
&.Sortable-item:not(.is-sortableReady, .Sortable-ghost) {
|
|
49
49
|
@apply opacity-0;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -37,6 +37,16 @@ export default class Toggleable extends EventEmitterMixin(
|
|
|
37
37
|
this._handleChange()
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/*
|
|
41
|
+
Re-applies the current selection's show/hide + enable/disable state.
|
|
42
|
+
Called by an ancestor Toggleable after its enable pass, which would
|
|
43
|
+
otherwise leave this toggleable's toggled-off branch inputs enabled
|
|
44
|
+
and submitting stale values (BSP-19758).
|
|
45
|
+
*/
|
|
46
|
+
refresh() {
|
|
47
|
+
this._handleChange()
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
constructor() {
|
|
41
51
|
super()
|
|
42
52
|
this._forms = []
|
|
@@ -177,8 +187,8 @@ export default class Toggleable extends EventEmitterMixin(
|
|
|
177
187
|
body: data,
|
|
178
188
|
})
|
|
179
189
|
|
|
180
|
-
form.element.innerHTML = await response.text()
|
|
181
190
|
if (response.ok) {
|
|
191
|
+
form.element.innerHTML = await response.text()
|
|
182
192
|
delete form.element.dataset.formFieldsUrl
|
|
183
193
|
delete form.element.dataset.formFieldsData
|
|
184
194
|
|
|
@@ -187,6 +197,11 @@ export default class Toggleable extends EventEmitterMixin(
|
|
|
187
197
|
)
|
|
188
198
|
form.element.dispatchEvent(new Event('load'))
|
|
189
199
|
form.element.dispatchEvent(new UIEvent('resize'))
|
|
200
|
+
|
|
201
|
+
// The selection may have changed while the request was in
|
|
202
|
+
// flight; re-apply it so content that arrived for a branch
|
|
203
|
+
// that is no longer selected doesn't come back enabled.
|
|
204
|
+
this._handleChange()
|
|
190
205
|
} else {
|
|
191
206
|
form.element.dispatchEvent(
|
|
192
207
|
new CustomEvent('error', {
|
|
@@ -229,6 +244,27 @@ export default class Toggleable extends EventEmitterMixin(
|
|
|
229
244
|
inputs.forEach((input) => {
|
|
230
245
|
input.toggleAttribute('disabled', disable)
|
|
231
246
|
})
|
|
247
|
+
|
|
248
|
+
if (!disable) {
|
|
249
|
+
// The enable pass above walks the whole subtree, so it also enabled
|
|
250
|
+
// inputs in nested toggleables' toggled-off branches (BSP-19758:
|
|
251
|
+
// duplicate typeId params flip a polymorphic record to the wrong
|
|
252
|
+
// type on save). Re-apply each nested toggleable's own state, after
|
|
253
|
+
// the enable pass, to disable those branches again. Document order
|
|
254
|
+
// guarantees an outer nested toggleable is refreshed before any
|
|
255
|
+
// toggleable inside its branches.
|
|
256
|
+
divsToToggle.forEach((el) => {
|
|
257
|
+
el.querySelectorAll<Toggleable>('btu-toggleable').forEach(
|
|
258
|
+
(nested) => {
|
|
259
|
+
// A not-yet-upgraded element applies its own state when it
|
|
260
|
+
// connects, so it can safely be skipped here.
|
|
261
|
+
if (nested !== this && nested instanceof Toggleable) {
|
|
262
|
+
nested.refresh()
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
)
|
|
266
|
+
})
|
|
267
|
+
}
|
|
232
268
|
}
|
|
233
269
|
}
|
|
234
270
|
|