This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Combine | |
import SwiftUI | |
/// View Model closable protocol - conform to this protocol if your view model should emit close block to close the screen that uses this view model | |
public protocol ViewModelClosableProtocol { | |
var closeCancellable: AnyCancellable? { get set } | |
// when inheriting protocol, set @Published | |
// var shouldCloseView: Bool { get set } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{#- Copyright 2025-present Anton Sokolchenko. #} | |
{#- Licensed under the Apache License, Version 2.0 (the "License") #} | |
{#- Edits made by Anton Sokolchenko to fix the chat template #} | |
{% macro render_item_list(item_list, tag_name='required') %} | |
{%- if item_list is defined and item_list is iterable and item_list | length > 0 %} | |
{%- if tag_name %}{{- '\n<' ~ tag_name ~ '>' -}}{% endif %} | |
{{- '[' }} | |
{%- for item in item_list -%} | |
{%- if loop.index > 1 %}{{- ", "}}{% endif -%} | |
{%- if item is string -%} |
OlderNewer