forest_admin_datasource_toolkit 1.28.2 → 1.29.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 +4 -4
- data/lib/forest_admin_datasource_toolkit/components/query/aggregation.rb +1 -0
- data/lib/forest_admin_datasource_toolkit/components/query/condition_tree/transforms/pattern.rb +1 -1
- data/lib/forest_admin_datasource_toolkit/components/query/projection.rb +1 -0
- data/lib/forest_admin_datasource_toolkit/components/query/projection_factory.rb +1 -0
- data/lib/forest_admin_datasource_toolkit/validations/type_getter.rb +2 -0
- data/lib/forest_admin_datasource_toolkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2644b1684c43bbd562e9a1f7782cac97bc209ac088dc1345c615009e4e626575
|
|
4
|
+
data.tar.gz: 76c86abe1867c4a8f2aaab6d63ab5f9adb945bf2457c74d30231f34a9cae8f17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b4a35bc5b6f4c8aa2e6c913b9022d3cfa126ba7a233850d498448f987b95af494d39a899f37fe80f0a09eaa017ee1e8c42c8b5a15910fd6069b8ac1696cb86f
|
|
7
|
+
data.tar.gz: 2d19566672798653a1e9becd7ee5e3e9738ffa6d5980e92049480af0eb0dd916b5bff470177bd39d4c15cc4a1722ad3c97e67a1bd7bd0e2b7adf7c0d365338e5
|
data/lib/forest_admin_datasource_toolkit/components/query/condition_tree/transforms/pattern.rb
CHANGED
|
@@ -19,7 +19,7 @@ module ForestAdminDatasourceToolkit
|
|
|
19
19
|
depends_on: [Operators::MATCH],
|
|
20
20
|
for_types: ['String'],
|
|
21
21
|
replacer: proc { |leaf|
|
|
22
|
-
regex = leaf.value.gsub(/([
|
|
22
|
+
regex = leaf.value.gsub(/([.\\+*?\[\^\]$(){}=!<>|:-])/, '\\\\\1')
|
|
23
23
|
regex.gsub!('%', '.*')
|
|
24
24
|
regex.tr!('_', '.')
|
|
25
25
|
|
|
@@ -3,6 +3,7 @@ module ForestAdminDatasourceToolkit
|
|
|
3
3
|
module Query
|
|
4
4
|
class Projection < Array
|
|
5
5
|
include ForestAdminDatasourceToolkit::Utils
|
|
6
|
+
|
|
6
7
|
def with_pks(collection)
|
|
7
8
|
ForestAdminDatasourceToolkit::Utils::Schema.primary_keys(collection).each do |key|
|
|
8
9
|
push(key) unless include?(key)
|
|
@@ -6,6 +6,7 @@ module ForestAdminDatasourceToolkit
|
|
|
6
6
|
module Validations
|
|
7
7
|
class TypeGetter
|
|
8
8
|
include ForestAdminDatasourceToolkit::Schema::Concerns
|
|
9
|
+
|
|
9
10
|
def self.get(value, type_context)
|
|
10
11
|
return PrimitiveTypes::JSON if type_context == PrimitiveTypes::JSON
|
|
11
12
|
|
|
@@ -30,6 +31,7 @@ module ForestAdminDatasourceToolkit
|
|
|
30
31
|
|
|
31
32
|
class << self
|
|
32
33
|
include ForestAdminDatasourceToolkit::Schema::Concerns
|
|
34
|
+
|
|
33
35
|
def get_date_type(value)
|
|
34
36
|
return PrimitiveTypes::DATE_ONLY if date?(value) && Date.parse(value).iso8601 == value
|
|
35
37
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: forest_admin_datasource_toolkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.29.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthieu
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-05-
|
|
12
|
+
date: 2026-05-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|