This file contains 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 { Component, Directive, Host, Input, OnChanges, SimpleChanges } from '@angular/core'; | |
import { createHostComponentFactory, SpectatorWithHost } from '@netbasal/spectator/jest'; | |
@Component({ | |
selector: 'simple-component', | |
template: '{{ name }}' | |
}) | |
class SimpleComponent implements OnChanges { | |
@Input() name!: string; |
This file contains 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
// Taken from https://quasar.dev/style/stylus-variables#Variables-list | |
// Manually transformed from Stylus to SCSS, MUST BE KEPT IN SYNC | |
// Transformation applied | |
// - Update maps: | |
// -- change '?=' assignment with ':' | |
// -- add the '!default;' at the end of assignments | |
// -- change all '{' and '}' to '(' and ')' using RegExp | |
// -- add surround all map keys with '' | |
// -- update all maps access to `map-get($map, 'key')` |
This file contains 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
export function LayoutMetaMixin(titleTemplateFn = title => title) { | |
return { | |
data() { | |
return { metaTitle: '' }; | |
}, | |
meta() { | |
return { | |
titleTemplate: title => { | |
this.metaTitle = titleTemplateFn(title); | |
return this.metaTitle; |
This file contains 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 { inject, ref, provide } from '@vue/composition-api'; | |
export function useAppBarProviders() { | |
const title = ref(''); | |
function updateTitle(newTitle: string) { | |
title.value = newTitle; | |
} | |
provide('updateAppBarTitle', updateTitle); |
This file contains 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
<script lang="ts"> | |
import { Platform, Screen } from 'quasar'; | |
import { defineComponent, ref } from 'vue'; | |
import SwipableBottomSheet from './swipable-bottom-sheet.vue'; | |
export default defineComponent({ | |
name: 'MainLayout', | |
components: { SwipableBottomSheet }, | |
setup() { | |
const openSheet = ref(false); |
This file contains 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
// src/services/books.ts | |
// $fetch is a custom fetch wrapper performing common operations, we plan to release it as open source when we'll have time | |
// Should be easy to understand what it does | |
type Book = { | |
id: number; | |
title: string; | |
isbn: string; | |
price: number; |
This file contains 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
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
declare module '@braid/vue-formulate' { | |
import { PluginObject } from 'vue'; | |
export interface Context { | |
/** The label to display inside "add more" button on group inputs. */ | |
addLabel: string; | |
/** An object of non-prop attributes passed to the input like placeholder. */ | |
attributes: any; | |
/** Function that must be called when an input blurs. */ |
This file contains 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
.sticky-table .q-table { | |
th.sticky-cell, | |
td.sticky-cell { | |
position: sticky; | |
z-index: 1; | |
} | |
th.last-sticky-cell, | |
td.last-sticky-cell { | |
border-right: 2px solid rgba($color: black, $alpha: 0.12); |
This file contains 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 { createUploaderComponent } from 'quasar'; | |
import { computed, ExtractPropTypes, PropType, ref, Ref } from 'vue'; | |
type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>); | |
type ValueOrFunction<ValueType, Param = never> = | |
| ((arg: Param) => ValueType) | |
| ValueType; | |
interface QUpoaderHeaderItem { |
This file contains 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
// Taken from https://github.com/angular/components/blob/master/src/cdk/drag-drop/drag-utils.ts | |
/** | |
* @license | |
* Copyright Google LLC All Rights Reserved. | |
* | |
* Use of this source code is governed by an MIT-style license that can be | |
* found in the LICENSE file at https://angular.io/license | |
*/ |
OlderNewer