glib-web 4.15.2 → 4.17.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6f547d313a7f227c25bc8963fe4d3973e5c6f7325d182831235c60fc3a8047a
4
- data.tar.gz: 7eed8148a19acdd58ad0f4a54e53ca5f874f05ca7ee0fee70285a9796eb028f7
3
+ metadata.gz: ef11a5ce52461fa118abf8e4fbc32331d993b5377b0848d581d90839a8b593f9
4
+ data.tar.gz: 31526b9747c9db566b289279638d861c4a75c4ae918ad41d6cce14cf4ee49350
5
5
  SHA512:
6
- metadata.gz: da89b88c3587011bf3c231f350d04a0620dc20de179bf4dae476f072c2e370cf2e13a22cc1bf5a3f4a60f9af740255fbb9d193b984b9b089d1939d74d0a209cb
7
- data.tar.gz: 78d834f7ecc771d9d953b0fcafb4ec586fb3954853ece64ef7804afaef292dc887aff4dd6dd505be50452b91f641a7047cd190768ee0b604c133c2bd24432992
6
+ metadata.gz: db769bbb2e4b7beabd4bc5f753e92eb962c4608eca2cd0646796b0e243e4fd2c15078af6d53e30f95a4179251a6b4f2a8cc58e4164584037863a448310d27833
7
+ data.tar.gz: 8e70533b7e2e64677284ccc85d635c147d01e796c502b89fb4dbf944258c53d07b9431a2597c07acb38f468eef8cd2b478c6fd8eb5e2ccc536cb8838fc81661d
@@ -15,6 +15,8 @@ module Glib
15
15
  @path_prefix = 'json_ui/garage'
16
16
 
17
17
  @__glib_head_code =<<-eos
18
+ <script type="text/javascript" src="https://js.stripe.com/v3/"></script>
19
+
18
20
  <style>
19
21
  .custom-container .pages-body > div > .panels-responsive {
20
22
  max-width: 800px;
@@ -205,6 +205,14 @@ module Glib
205
205
  end
206
206
 
207
207
  json.set!(propName) do
208
+ if (color = data[:color])
209
+ json.color color
210
+ end
211
+
212
+ if (style_classes = data[:styleClasses])
213
+ json.styleClasses style_classes
214
+ end
215
+
208
216
  if name
209
217
  data[:material] ||= {}
210
218
  data[:material][:name] = name
@@ -201,6 +201,7 @@ class Glib::JsonUi::ViewBuilder
201
201
  # bool :readOnly
202
202
  bool :multiple, cache: true
203
203
  # bool :manualEntry
204
+ icon :leftIcon
204
205
  hash :append, optional: [:icon]
205
206
 
206
207
  panels_builder :accessory, :header, :footer
@@ -312,6 +312,16 @@ module Glib
312
312
  color :color
313
313
  color :backgroundColor
314
314
  bool :reversed
315
+
316
+ def rounded(value)
317
+ @rounded = value
318
+ end
319
+
320
+ def create
321
+ @rounded = true if @rounded.nil?
322
+
323
+ json.rounded @rounded
324
+ end
315
325
  end
316
326
 
317
327
  class ProgressCircle < View
@@ -34,6 +34,18 @@ page.scroll childViews: ->(scroll) do
34
34
  end
35
35
  end
36
36
 
37
+ form.fields_richText \
38
+ name: 'user[description]',
39
+ value: %(
40
+ This note serves as a reminder regarding the checklist assigned to you. This checklist is crucial for ensuring the safety and well-being of all staff.
41
+
42
+ Please review the checklist carefully and ensure that all necessary steps are taken to implement the required safety measures.
43
+
44
+ Your attention to detail and proactive approach to safety are greatly appreciated. If you have any questions or require assistance, please don't hesitate to reach out.
45
+
46
+ Thank you for your cooperation.
47
+ )
48
+
37
49
  form.spacer height: 20
38
50
  form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
39
51
  end
@@ -11,9 +11,6 @@ page.form \
11
11
  method: 'post',
12
12
  padding: glib_json_padding_body,
13
13
  childViews: ->(form) do
14
- form.spacer height: 14
15
- form.label text: 'This page will not show a dirty prompt even when the form field content has changed'
16
- form.spacer height: 14
17
14
  form.h3 text: "Hello #{ data[:name] }"
18
15
  form.spacer height: 4
19
16
  form.fields_text name: 'user[dirty_check_enabled]', width: 'matchParent', label: 'Dirty check enabled'
@@ -28,6 +28,8 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
28
28
  placeholder: 'This is a placeholder',
29
29
  options: options,
30
30
  value: 'canberra',
31
+ disabled: true,
32
+ leftIcon: { name: 'info', styleClasses: ['success'] },
31
33
  onChange: ->(action) do
32
34
  action.components_findClosest view: 'panels/responsive', onFind: ->(find) do
33
35
  # This is to demonstrate that `components_set` can be a more flexible version
@@ -1,4 +1,4 @@
1
- navs = ['form', 'dialog', 'form_dynamic', 'auto_validate', 'multiupload']
1
+ navs = ['form', 'dialog', 'form_dynamic', 'auto_validate', 'multiupload', 'dirty_state']
2
2
 
3
3
  view.panels_flow innerPadding: { bottom: 0 }, styleClass: 'align-right', width: 'matchParent', childViews: ->(res) do
4
4
  navs.each_with_index do |nav, index|
@@ -0,0 +1,46 @@
1
+
2
+
3
+ json.title 'Test Page (Dirty state)'
4
+
5
+ page = json_ui_page json
6
+
7
+ page.body childViews: ->(body) do
8
+ render 'json_ui/garage/test_page/header', view: body
9
+
10
+ body.panels_form padding: glib_json_padding_body, childViews: ->(form) do
11
+ form.h2 text: 'Dirty state'
12
+ form.spacer height: 8
13
+
14
+ form.fields_text name: 'user[dirty_check_disabled]', width: 'matchParent', label: 'Dirty check disabled', disableDirtyCheck: true
15
+ form.spacer height: 14
16
+
17
+ form.h3 text: 'Radio'
18
+ form.spacer height: 14
19
+ form.fields_radioGroup name: 'user[gender]', value: 'F', childViews: ->(group) do
20
+ group.fields_radio value: '', label: 'Unknown'
21
+ group.fields_radio value: 'M', label: 'Male'
22
+ group.fields_radio value: 'F', label: 'Female'
23
+ end
24
+
25
+ form.h3 text: 'Check group'
26
+ form.spacer height: 14
27
+ form.fields_check name: 'user[check][]', checkValue: 'choice1', label: 'choice1', value: 'choice2'
28
+ form.fields_check name: 'user[check][]', checkValue: 'choice2', label: 'choice2'
29
+ form.fields_check name: 'user[check][]', checkValue: 'choice2', label: 'choice3', value: 'choice2'
30
+
31
+ form.spacer height: 24
32
+ form.panels_split width: 'matchParent', content: ->(split) do
33
+ split.left childViews: ->(left) do
34
+ left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
35
+ horizontal.label text: 'Dialog Form', onClick: ->(action) do
36
+ action.dialogs_open url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog')
37
+ end
38
+ end
39
+ end
40
+
41
+ split.right childViews: ->(right) do
42
+ right.fields_submit text: 'Submit'
43
+ end
44
+ end
45
+ end
46
+ end
@@ -42,11 +42,11 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
42
42
  content: ->(dialog) do
43
43
  dialog.body childViews: ->(view) do
44
44
  view.panels_responsive styleClass: 'popover-menu', width: 200, childViews: ->(res) do
45
- res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
45
+ res.label text: 'GOTO pages/index', styleClass: 'popover-menu-item', onClick: ->(saction) do
46
46
  saction.windows_open url: json_ui_garage_url(path: 'pages/index')
47
47
  end
48
- res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
49
- saction.windows_open url: json_ui_garage_url(path: 'home/blank')
48
+ res.label text: 'closeAllWithOpen', styleClass: 'popover-menu-item', onClick: ->(saction) do
49
+ saction.windows_closeAllWithOpen url: json_ui_garage_url(path: 'home/blank')
50
50
  end
51
51
  res.label text: 'close', styleClass: 'popover-menu-item', onClick: ->(saction) do
52
52
  saction.popovers_close key: 'menu'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.15.2
4
+ version: 4.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -318,6 +318,7 @@ files:
318
318
  - app/views/json_ui/garage/test_page/auto_validate.json.jbuilder
319
319
  - app/views/json_ui/garage/test_page/dialog.json.jbuilder
320
320
  - app/views/json_ui/garage/test_page/dialog_open.json.jbuilder
321
+ - app/views/json_ui/garage/test_page/dirty_state.json.jbuilder
321
322
  - app/views/json_ui/garage/test_page/form.json.jbuilder
322
323
  - app/views/json_ui/garage/test_page/form_dynamic.json.jbuilder
323
324
  - app/views/json_ui/garage/test_page/multiupload.json.jbuilder