card-mod-list 0.18.1 → 0.19.1

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: 65989034e21afc9e3769f389cfc2f3ba3f81209637629121523eab9da32b073f
4
- data.tar.gz: 2357bda45c2aa1d05dc0aca4470d4b6b0044c25ab5dfb4e373ac50ad9c034bd7
3
+ metadata.gz: 5e02ff0ead7ab725dfd5782806605210dc1833cbcb92e9118ebbbd511c4aa461
4
+ data.tar.gz: e36a3199ba1ef57befff8a0429f96d4669d2fa3859d6fcef374f347a2003c58a
5
5
  SHA512:
6
- metadata.gz: 6437a78a681212055884a92629becc1c8169599738f4a620ec89b5e203d594ce45e95629767db25eade3de0b5f8f65783ed8ffbfa25077170c7665abffb6d719
7
- data.tar.gz: 4f183a50fb4e9bb9fd75afa0fac50d5e13f619ae80925e2b9efb6db728bbb62555a595b9a98a35212fb3cbf26730bdf1a72b9f96c2bec0bb6695248467a2cc81
6
+ metadata.gz: e46dbab3741a9516d9326781529e0da22f9974bc0be2591df7f71120ff4b47189eb1d14bc4f0e33e326233f9f3df81be4547395631ed3c287fe56d807c07c581
7
+ data.tar.gz: d36187e383b5fe4615a0d6c679947c14013be41421e4faa8459ca19f78d1e5eb68c1cc70a06147c5346015672dec11aa0ad407460d3a1117e26649969c107d07
@@ -11,7 +11,7 @@ format do
11
11
 
12
12
  def pointer_items args={}
13
13
  page_args = args.extract! :limit, :offset
14
- listing card.item_cards(page_args), args
14
+ listing_list card.item_cards(page_args), args
15
15
  end
16
16
  end
17
17
 
@@ -18,7 +18,7 @@ end
18
18
 
19
19
  def standardize_content value
20
20
  value = item_strings(content: value) unless value.is_a? Array
21
- super value
21
+ super
22
22
  end
23
23
 
24
24
  def each_item_name_with_options _content=nil
@@ -4,10 +4,10 @@ def self.included host_class
4
4
  basket[host_class.basket_name] = []
5
5
  end
6
6
 
7
- def item_codenames
7
+ def item_codes
8
8
  basket[basket_name]
9
9
  end
10
10
 
11
11
  def content
12
- item_codenames.map(&:cardname).compact.to_pointer_content
12
+ item_codes.map(&:cardname).compact.to_pointer_content
13
13
  end
@@ -1,7 +1,8 @@
1
1
  # remove set members from all lists that reference them upon deletion
2
2
  event :delist, :prepare_to_store, on: :delete do
3
3
  referers.each do |referer|
4
- next unless referer.is_a? Abstract::List
4
+ next unless referer.delistable? && referer.is_a?(Abstract::List) && referer.real?
5
+
5
6
  referer.drop_item name
6
7
  subcard referer
7
8
  end
@@ -10,16 +10,14 @@ def standardize_item cardish
10
10
  end
11
11
 
12
12
  def item_ids args={}
13
- seeding_ids do
14
- item_strings(args).map do |item|
15
- item = standardize_item item unless item.match?(/^~/)
16
- item&.to_s&.tr("~", "")&.to_i
17
- end.compact
18
- end
13
+ item_strings(args).map do |item|
14
+ item = standardize_item item unless item.match?(/^~/)
15
+ item&.to_s&.tr("~", "")&.to_i
16
+ end.compact
19
17
  end
20
18
 
21
19
  def item_names args={}
22
- item_ids(args).map(&:cardname).compact
20
+ seeding_ids { item_ids(args) }.map(&:cardname).compact
23
21
  end
24
22
 
25
23
  def pod_content
@@ -1,5 +1,10 @@
1
1
  basket[:list_input_options] = %w[radio checkbox select multiselect list autocomplete]
2
2
 
3
+ # for override
4
+ def delistable?
5
+ true
6
+ end
7
+
3
8
  def supports_content_options?
4
9
  false
5
10
  end
@@ -1,7 +1,7 @@
1
1
  setting_opts group: :editing, position: 6,
2
2
  restricted_to_type: %i[list pointer session],
3
3
  rule_type_editable: false,
4
- help_text: "Label view for radio button and checkbox items. "\
4
+ help_text: "Label view for radio button and checkbox items. " \
5
5
  "[[http://decko.org/Pointer|more]]",
6
6
  applies: lambda { |prototype|
7
7
  prototype.supports_content_options? &&
@@ -1,8 +1,8 @@
1
1
  setting_opts group: :editing, position: 5,
2
2
  restricted_to_type: %i[list pointer session],
3
3
  rule_type_editable: true,
4
- help_text: "Value options for [[List]] and [[Pointer]] and cards. "\
5
- "Can itself be a List or a [[Search]]. "\
4
+ help_text: "Value options for [[List]] and [[Pointer]] and cards. " \
5
+ "Can itself be a List or a [[Search]]. " \
6
6
  "[[http://decko.org/Pointer|more]]",
7
7
  applies: lambda { |prototype|
8
8
  prototype.rule_card(:input_type).supports_content_options?
@@ -3,3 +3,7 @@ include_set Abstract::List
3
3
  def content
4
4
  basket[:list_input_options].to_pointer_content
5
5
  end
6
+
7
+ # def self.num_set_parts
8
+ # 2
9
+ # end
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
8
8
  - Philipp Kühl
9
9
  - Gerry Gleason
10
- autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2024-11-22 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: card
@@ -18,42 +17,42 @@ dependencies:
18
17
  requirements:
19
18
  - - '='
20
19
  - !ruby/object:Gem::Version
21
- version: 1.108.1
20
+ version: 1.109.1
22
21
  type: :runtime
23
22
  prerelease: false
24
23
  version_requirements: !ruby/object:Gem::Requirement
25
24
  requirements:
26
25
  - - '='
27
26
  - !ruby/object:Gem::Version
28
- version: 1.108.1
27
+ version: 1.109.1
29
28
  - !ruby/object:Gem::Dependency
30
29
  name: card-mod-format
31
30
  requirement: !ruby/object:Gem::Requirement
32
31
  requirements:
33
32
  - - '='
34
33
  - !ruby/object:Gem::Version
35
- version: 0.18.1
34
+ version: 0.19.1
36
35
  type: :runtime
37
36
  prerelease: false
38
37
  version_requirements: !ruby/object:Gem::Requirement
39
38
  requirements:
40
39
  - - '='
41
40
  - !ruby/object:Gem::Version
42
- version: 0.18.1
41
+ version: 0.19.1
43
42
  - !ruby/object:Gem::Dependency
44
43
  name: card-mod-collection
45
44
  requirement: !ruby/object:Gem::Requirement
46
45
  requirements:
47
46
  - - '='
48
47
  - !ruby/object:Gem::Version
49
- version: 0.18.1
48
+ version: 0.19.1
50
49
  type: :runtime
51
50
  prerelease: false
52
51
  version_requirements: !ruby/object:Gem::Requirement
53
52
  requirements:
54
53
  - - '='
55
54
  - !ruby/object:Gem::Version
56
- version: 0.18.1
55
+ version: 0.19.1
57
56
  description: ''
58
57
  email:
59
58
  - info@decko.org
@@ -69,7 +68,6 @@ files:
69
68
  - config/admin.yml
70
69
  - config/locales/de.yml
71
70
  - config/locales/en.yml
72
- - data/files/mod_list_script_asset_output/file.js
73
71
  - data/real.yml
74
72
  - data/test.yml
75
73
  - data/transform/20160804112340_add_pointer_cards.rb
@@ -92,7 +90,7 @@ files:
92
90
  - set/right/content_options.rb
93
91
  - set/self/content_option_view.rb
94
92
  - set/self/content_options.rb
95
- - set/self/input_options.rb
93
+ - set/self/input_type/right/content_options.rb
96
94
  - set/type/_reference_list_input_row.haml
97
95
  - set/type/link_list.rb
98
96
  - set/type/link_list_input.haml
@@ -111,7 +109,6 @@ metadata:
111
109
  documentation_url: http://docs.decko.org/
112
110
  card-mod: list
113
111
  card-mod-group: gem-defaults
114
- post_install_message:
115
112
  rdoc_options: []
116
113
  require_paths:
117
114
  - lib
@@ -119,15 +116,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
116
  requirements:
120
117
  - - ">="
121
118
  - !ruby/object:Gem::Version
122
- version: '3.0'
119
+ version: '3.2'
123
120
  required_rubygems_version: !ruby/object:Gem::Requirement
124
121
  requirements:
125
122
  - - ">="
126
123
  - !ruby/object:Gem::Version
127
124
  version: '0'
128
125
  requirements: []
129
- rubygems_version: 3.5.10
130
- signing_key:
126
+ rubygems_version: 3.6.8
131
127
  specification_version: 4
132
128
  summary: list of cards
133
129
  test_files: []
@@ -1,4 +0,0 @@
1
- // pointer_config.js.coffee
2
- (function(){var t,n;$.extend(decko.editors.content,{"select.pointer-select":function(){return n(this.val())},"select.pointer-multiselect":function(){return n(this.val())},".pointer-radio-list":function(){return n(this.find("input:checked").val())},".pointer-list-ul":function(){return n(this.find("input").map(function(){return $(this).val()}))},".pointer-link-list-ul":function(){return decko.linkListContent(this.find(".input-group"))},"._nest-list-ul":function(){return decko.nestListContent(this.find(".input-group"))},".pointer-checkbox-list":function(){return n(this.find("input:checked").map(function(){return $(this).val()}))},".pointer-select-list":function(){return n(this.find(".pointer-select select").map(function(){return $(this).val()}))},"._filtered-list":function(){return n(this.find("._filtered-list-item").map(function(){return $(this).data("cardName")}))},"._pointer-list":function(){return n(this.find("._pointer-item").map(function(){return $(this).val()}))},"._click-select-editor":function(){return n(this.find("._select-item.selected").map(function(){return $($(this).find("[data-card-name]")[0]).data("cardName")}))},"._click-multiselect-editor":function(){return n(this.find("._select-item.selected").map(function(){return $($(this).find("[data-card-name]")[0]).data("cardName")}))},".perm-editor":function(){return t(this)}}),$.extend(decko.editors.init,{".pointer-list-editor":function(){return this.sortable({handle:".handle",cancel:""}),decko.initPointerList(this.find("input"))},"._filtered-list":function(){return this.sortable({handle:"._handle",cancel:""})}}),$.extend(decko,{initPointerList:function(t){return decko.initAutoCardPlete(t)},pointerContent:function(t){return $.makeArray(t).join("\n")},linkListContent:function(t){var n,i;return i=t.map(function(){var t,n;return n=$(this).find("input._reference").val(),(t=$(this).find("input._title").val()).length>0&&(n+="|"+t),n}),n=$.map($.makeArray(i),function(t){if(t)return"[["+t+"]]"}),$.makeArray(n).join("\n")},nestListContent:function(t){var n,i;return i=t.map(function(){var t,n;return n=$(this).find("input._reference").val(),(t=$(this).find("input._nest-options").val()).length>0&&(n+="|"+t),n}),n=$.map($.makeArray(i),function(t){if(t)return"{{"+t+"}}"}),$.makeArray(n).join("\n")}}),n=function(t){return decko.pointerContent(t)},t=function(t){var i,e;return t.find("#inherit").is(":checked")?"_left":(i=t.find(".perm-group input:checked").map(function(){return $(this).val()}),e=t.find(".perm-indiv input").map(function(){return $(this).val()}),n($.makeArray(i).concat($.makeArray(e))))}}).call(this);
3
- // pointer_list_editor.js.coffee
4
- (function(){$(window).ready(function(){return $("body").on("click","._pointer-item-add",function(t){return decko.addPointerItem(this),t.preventDefault()}),$("body").on("keydown",".pointer-item-text",function(t){if("Enter"===t.key)return decko.addPointerItem(this),t.preventDefault()}),$("body").on("keyup",".pointer-item-text",function(){return decko.updateAddItemButton(this)}),$("body").on("click",".pointer-item-delete",function(){var t,e;return(e=(t=$(this).closest("li")).closest("ul")).find(".pointer-li").length>1?t.remove():t.find("input").val(""),decko.updateAddItemButton(e)})}),decko.slot.ready(function(t){return t.find(".pointer-list-editor").each(function(){return decko.updateAddItemButton(this)})}),$.extend(decko,{addPointerItem:function(t){var e,n;return(n=$(t).slot()).trigger("decko.slot.destroy"),(e=decko.nextPointerInput(decko.lastPointerItem(t))).val(""),n.trigger("decko.slot.ready"),decko.initializeEditors(n),e.first().focus(),decko.updateAddItemButton(t),decko.initPointerList(e)},nextPointerInput:function(t){var e,n,o,i,d,r;for(e=!0,n=0,d=(i=t.find("input")).length;n<d;n++)o=i[n],e=e&&""===$(o).val();return e?i:(r=t.clone(),t.after(r),r.attr("data-index",parseInt(t.attr("data-index")+1)),r.trigger("decko.item.added"),r.find("input"))},lastPointerItem:function(t){return $(t).closest(".content-editor").find(".pointer-li:last")},updateAddItemButton:function(t){var e,n;return e=$(t).closest(".content-editor").find("._pointer-item-add"),n=""===decko.lastPointerItem(t).find("input").val(),e.prop("disabled",n)}})}).call(this);