playbook_ui 14.25.0.pre.alpha.PLAY2413togglefocusstate9860 → 14.25.0.pre.alpha.PLAY2414removedialoghelper10118

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.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.25.0"
5
- VERSION = "14.25.0.pre.alpha.PLAY2413togglefocusstate9860"
5
+ VERSION = "14.25.0.pre.alpha.PLAY2414removedialoghelper10118"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.25.0.pre.alpha.PLAY2413togglefocusstate9860
4
+ version: 14.25.0.pre.alpha.PLAY2414removedialoghelper10118
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-08-25 00:00:00.000000000 Z
12
+ date: 2025-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -1220,7 +1220,6 @@ files:
1220
1220
  - app/pb_kits/playbook/pb_dialog/dialog.html.erb
1221
1221
  - app/pb_kits/playbook/pb_dialog/dialog.rb
1222
1222
  - app/pb_kits/playbook/pb_dialog/dialog.test.jsx
1223
- - app/pb_kits/playbook/pb_dialog/dialogHelper.js
1224
1223
  - app/pb_kits/playbook/pb_dialog/dialog_body.html.erb
1225
1224
  - app/pb_kits/playbook/pb_dialog/dialog_body.rb
1226
1225
  - app/pb_kits/playbook/pb_dialog/dialog_footer.html.erb
@@ -3649,12 +3648,12 @@ files:
3649
3648
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3650
3649
  - app/pb_kits/playbook/utilities/text.ts
3651
3650
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3652
- - dist/chunks/_line_graph-CiVc-Cod.js
3653
- - dist/chunks/_typeahead-BQnvz-Ks.js
3654
- - dist/chunks/_weekday_stacked-2gKd1RZJ.js
3651
+ - dist/chunks/_line_graph-6UK5tAZN.js
3652
+ - dist/chunks/_typeahead-CgXQOdkP.js
3653
+ - dist/chunks/_weekday_stacked-CzIOGiFG.js
3655
3654
  - dist/chunks/lazysizes-B7xYodB-.js
3656
- - dist/chunks/lib-CY5ZPzic.js
3657
- - dist/chunks/pb_form_validation-D3b0JKHH.js
3655
+ - dist/chunks/lib-Bz8QRUTS.js
3656
+ - dist/chunks/pb_form_validation-CmPDa7e2.js
3658
3657
  - dist/chunks/vendor.js
3659
3658
  - dist/menu.yml
3660
3659
  - dist/playbook-doc.js
@@ -1,65 +0,0 @@
1
- // Three places in Nitro depend on this function inside the window scope.
2
- // We will keep this file until we remove this dependency from Nitro.
3
- const dialogHelper = () => {
4
- const openTrigger = document.querySelectorAll("[data-open-dialog]");
5
- const closeTrigger = document.querySelectorAll("[data-close-dialog]");
6
- const dialogs = document.querySelectorAll(".pb_dialog_rails")
7
-
8
- const loadingButton = document.querySelector('[data-disable-with="Loading"]');
9
- if (loadingButton) {
10
- loadingButton.addEventListener("click", function() {
11
- const okayLoadingButton = document.querySelector('[data-disable-with="Loading"]');
12
- const cancelButton = document.querySelector('[data-disable-cancel-with="Loading"]');
13
- let currentClass = okayLoadingButton.className;
14
- let cancelClass = cancelButton ? cancelButton.className : "";
15
-
16
- let newClass = currentClass.replace("_enabled", "_disabled_loading");
17
- let newCancelClass = cancelClass.replace("_enabled", "_disabled");
18
-
19
- // Disable the buttons
20
- okayLoadingButton.disabled = true;
21
- if (cancelButton) cancelButton.disabled = true;
22
-
23
- okayLoadingButton.className = newClass;
24
- if (cancelButton) cancelButton.className = newCancelClass;
25
- });
26
- }
27
-
28
-
29
- openTrigger.forEach((open) => {
30
- open.addEventListener("click", () => {
31
- var openTriggerData = open.dataset.openDialog;
32
- var targetDialog = document.getElementById(openTriggerData)
33
- if (targetDialog.open) return;
34
- targetDialog.showModal();
35
- });
36
- });
37
-
38
- closeTrigger.forEach((close) => {
39
- close.addEventListener("click", () => {
40
- var closeTriggerData = close.dataset.closeDialog;
41
- document.getElementById(closeTriggerData).close();
42
- });
43
- });
44
-
45
- // Close dialog box on outside click
46
- dialogs.forEach((dialogElement) => {
47
- dialogElement.addEventListener("mousedown", (event) => {
48
- const dialogParentDataset = dialogElement.parentElement.dataset
49
- if (dialogParentDataset.overlayClick === "overlay_close") return
50
-
51
- const dialogModal = event.target.getBoundingClientRect()
52
- const clickedOutsideDialogModal = event.clientX < dialogModal.left ||
53
- event.clientX > dialogModal.right ||
54
- event.clientY < dialogModal.top ||
55
- event.clientY > dialogModal.bottom
56
-
57
- if (clickedOutsideDialogModal) {
58
- dialogElement.close()
59
- event.stopPropagation()
60
- }
61
- })
62
- })
63
- };
64
-
65
- export default dialogHelper;