Михаил Капелько 10 months ago
parent
commit
8bf84d9449
18 changed files with 22 additions and 82 deletions
  1. +0
    -3
      Modules/BusX/Bus/src/Bus.Aux.swift
  2. +0
    -0
      Modules/BusX/Bus/src/Bus.Processor.swift
  3. +0
    -1
      Modules/BusX/Bus/src/Bus.swift
  4. +1
    -1
      Modules/BusX/BusUI/src/BusUI.Aux.swift
  5. +1
    -2
      Modules/BusX/BusUI/src/BusUI.Button.swift
  6. +1
    -2
      Modules/BusX/BusUI/src/BusUI.TextField.swift
  7. +5
    -2
      Modules/BusX/BusUI/src/BusUI.TextFieldSource.swift
  8. +2
    -3
      Modules/BusX/BusUI/src/BusUI.Value.swift
  9. +1
    -0
      Modules/BusX/BusUI/src/BusUI.swift
  10. +2
    -2
      Modules/BusX/BusX.podspec
  11. +0
    -30
      Modules/BusX/src/unused
  12. +0
    -15
      Modules/CordX/CordX.podspec
  13. +0
    -1
      Modules/CordX/src/Cord.swift
  14. +0
    -1
      Modules/MeetupIdX/MeetupIdX.podspec
  15. +0
    -1
      Modules/MeetupIdX/src/MeetupId.Generated.swift
  16. +5
    -6
      Modules/MeetupIdX/src/MeetupId.V.swift
  17. +0
    -1
      app/Podfile
  18. +4
    -11
      app/Podfile.lock

Modules/BusX/src/Bus.Aux.swift → Modules/BusX/Bus/src/Bus.Aux.swift View File

@@ -8,9 +8,6 @@ public extension Bus {
key == v.key,
let value = v.value as? T
else {
if key == "MeetupId.finishLoading" {
/**/print("ИГР Bus.convertKV failed k/v/T: '\(key)'/'\(v)'/'\(type(of: T.self))'")
}
return nil
}
return (key, value)

Modules/BusX/src/Bus.Processor.swift → Modules/BusX/Bus/src/Bus.Processor.swift View File


Modules/BusX/src/Bus.swift → Modules/BusX/Bus/src/Bus.swift View File

@@ -20,7 +20,6 @@ extension Bus {
var subscriptions = [AnyCancellable]()
func send(_ key: String, _ value: Any) {
/**/print("ИГР BusS.send key/value: '\(key)'/'\(value)'")
events.send((key, value))
}
}

Modules/CordX/src/Cord.Onlys.swift → Modules/BusX/BusUI/src/BusUI.Aux.swift View File

@@ -1,4 +1,4 @@
extension Cord {
extension BusUI {
/// Пропускаем лишь значения от UI
///
/// - Returns: Значение без префиксов "a:"/"u:"

Modules/CordX/src/Cord.Button.swift → Modules/BusX/BusUI/src/BusUI.Button.swift View File

@@ -1,7 +1,6 @@
import BusX
import Combine

extension Cord {
extension BusUI {
public final class Button: ObservableObject {
public let v = PassthroughSubject<Void, Never>()
var subscriptions = [AnyCancellable]()

Modules/CordX/src/Cord.TextField.swift → Modules/BusX/BusUI/src/BusUI.TextField.swift View File

@@ -1,8 +1,7 @@
import BusX
import Combine
import SwiftUI

extension Cord {
extension BusUI {
public final class TextField: ObservableObject {
@Published public var v = "a:"
var subscriptions = [AnyCancellable]()

Modules/CordX/src/Cord.TextFieldValueOwner.swift → Modules/BusX/BusUI/src/BusUI.TextFieldSource.swift View File

@@ -1,12 +1,15 @@
import Foundation

extension Cord {
public final class TextFieldValueOwner: Formatter {
extension BusUI {
public final class TextFieldSource: Formatter {
/// Выдаём для отображения очищенную от источника строку.
public override func string(for obj: Any?) -> String? {
guard let str = obj as? String else { return nil }
return String(str.dropFirst(2))
}

/// Выдаём для использования кодом строку с указанием источника
/// в виде пользователя `u:`
public override func getObjectValue(
_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?,
for string: String,

Modules/CordX/src/Cord.Receive.swift → Modules/BusX/BusUI/src/BusUI.Value.swift View File

@@ -1,8 +1,7 @@
import BusX
import Combine

extension Cord {
public final class Receive<T>: ObservableObject {
extension BusUI {
public final class Value<T>: ObservableObject {
@Published public var v: T
var subscriptions = [AnyCancellable]()

+ 1
- 0
Modules/BusX/BusUI/src/BusUI.swift View File

@@ -0,0 +1 @@
public enum BusUI { }

+ 2
- 2
Modules/BusX/BusX.podspec View File

@@ -1,13 +1,13 @@
Pod::Spec.new do |s|

s.name = 'BusX'
s.version = '2023.12.28'
s.version = '2023.12.30'
s.license = 'IVCS'
s.summary = 'Шина общения элементов приложения'
s.homepage = 'IVCS'
s.author = 'IVCS'
s.source = { :git => 'https://fake.com/FAKE.git', :tag => s.version }
s.source_files = 'src/**/*.swift'
s.source_files = '**/**/*.swift'
s.swift_version = '5.2'
s.ios.deployment_target = '14.0'



+ 0
- 30
Modules/BusX/src/unused View File

@@ -1,30 +0,0 @@
import Combine

public extension Bus {
final class Receiver<T> {
var subscriptions = [AnyCancellable]()

public init(
_ keys: Set<String>,
_ handler: @escaping ((String, T) -> Void),
opt: [Option] = []
) {
Bus.receive(keys, handler, opt: opt, sub: &subscriptions)
}
}
}
import Combine

public extension Bus {
final class Sender<T> {
var subscriptions = [AnyCancellable]()

public init(
_ key: String,
_ node: AnyPublisher<T, Never>,
opt: [Option] = []
) {
Bus.send(key, node, opt: opt, sub: &subscriptions)
}
}
}

+ 0
- 15
Modules/CordX/CordX.podspec View File

@@ -1,15 +0,0 @@
Pod::Spec.new do |s|

s.name = 'CordX'
s.version = '2023.12.29'
s.license = 'IVCS'
s.summary = 'Упрощённое общение с шиной из SwiftUI'
s.homepage = 'IVCS'
s.author = 'IVCS'
s.source = { :git => 'https://fake.com/FAKE.git', :tag => s.version }
s.source_files = 'src/**/*.swift'
s.swift_version = '5.2'
s.ios.deployment_target = '14.0'
s.dependency 'BusX'

end

+ 0
- 1
Modules/CordX/src/Cord.swift View File

@@ -1 +0,0 @@
public enum Cord { }

+ 0
- 1
Modules/MeetupIdX/MeetupIdX.podspec View File

@@ -12,7 +12,6 @@ s.swift_version = '5.2'
s.ios.deployment_target = '14.0'
s.dependency 'AELog'
s.dependency 'BusX'
s.dependency 'CordX'
s.dependency 'MPAKX'

end

+ 0
- 1
Modules/MeetupIdX/src/MeetupId.Generated.swift View File

@@ -4,7 +4,6 @@
import AELog
import BusX
import Combine
import CordX
import Foundation
import MPAKX
import UIKit


+ 5
- 6
Modules/MeetupIdX/src/MeetupId.V.swift View File

@@ -1,13 +1,12 @@
import BusX
import CordX
import SwiftUI

extension MeetupId {
public struct V: View {
@StateObject var isJoinAvailable = Cord.Receive(K.isJoinAvailable, false)
@StateObject var isLoading = Cord.Receive(K.isLoading, false)
@StateObject var join = Cord.Button(K.join)
@StateObject var textField = Cord.TextField(K.textApp, K.textUI)
@StateObject var isJoinAvailable = BusUI.Value(K.isJoinAvailable, false)
@StateObject var isLoading = BusUI.Value(K.isLoading, false)
@StateObject var join = BusUI.Button(K.join)
@StateObject var textField = BusUI.TextField(K.textApp, K.textUI)
let processors: [Any] = [
Bus.Processor(shouldEnableJoin, K.M, K.isJoinAvailable),
MeetupId.Debounce(0.2, formatId, K.textUI, K.textApp),
@@ -19,7 +18,7 @@ extension MeetupId {
public var body: some View {
VStack(spacing: 8) {
HStack {
TextField("Binding-3", value: $textField.v, formatter: Cord.TextFieldValueOwner())
TextField("Binding-3", value: $textField.v, formatter: BusUI.TextFieldSource())
.disabled(isLoading.v)
.padding(8)
.border(


+ 0
- 1
app/Podfile View File

@@ -5,7 +5,6 @@ platform :ios, '14.0'
pod 'AELog'

pod 'BusX', :path => '../Modules/BusX'
pod 'CordX', :path => '../Modules/CordX'
pod 'MeetupIdX', :path => '../Modules/MeetupIdX'
pod 'MPAKX', :path => '../Modules/MPAKX'



+ 4
- 11
app/Podfile.lock View File

@@ -1,19 +1,15 @@
PODS:
- AELog (0.6.3)
- BusX (2023.12.28)
- CordX (2023.12.29):
- BusX
- BusX (2023.12.30)
- MeetupIdX (2023.12.28):
- AELog
- BusX
- CordX
- MPAKX
- MPAKX (2023.12.15)

DEPENDENCIES:
- AELog
- BusX (from `../Modules/BusX`)
- CordX (from `../Modules/CordX`)
- MeetupIdX (from `../Modules/MeetupIdX`)
- MPAKX (from `../Modules/MPAKX`)

@@ -24,8 +20,6 @@ SPEC REPOS:
EXTERNAL SOURCES:
BusX:
:path: "../Modules/BusX"
CordX:
:path: "../Modules/CordX"
MeetupIdX:
:path: "../Modules/MeetupIdX"
MPAKX:
@@ -33,11 +27,10 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
AELog: f732b70f7a9d1b4c6a3676304192b3908f362133
BusX: fd22c04ad544d131e66315c1a33d87d85b19712e
CordX: f8ba6a8db42f9f27142948b536b9b8272f9b977c
MeetupIdX: b214163e32acffd0a5283062e9d69aaf5a5b66e6
BusX: d11e857e9cb762f649ee9f88fd5a4f8fbf5bf96b
MeetupIdX: 80e2257016a043b10dd77e1e9a59d083bef21323
MPAKX: dc592434f55edf34709f6e4f37c9ec90dcd95185

PODFILE CHECKSUM: 35ca81ffde7ba64c51870ff39b799f407bf0fbde
PODFILE CHECKSUM: ff31073a9b868750f1cfabf6c1c740dbf32d4cb1

COCOAPODS: 1.13.0

Loading…
Cancel
Save