remove unused files
@@ -14,7 +14,8 @@
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"allowedCommonJsDependencies": ["json-pointer"],
|
||||
"preserveSymlinks": true,
|
||||
"allowedCommonJsDependencies": ["json-pointer", "ng-qrcode"],
|
||||
"outputPath": "www",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { FormsModule } from '@angular/forms'
|
||||
import { IonicModule } from '@ionic/angular'
|
||||
import { LoginPage } from './login.page'
|
||||
import { SharingModule } from 'src/app/modules/sharing.module'
|
||||
// import { MarketplaceLibModule } from 'marketplace-lib'
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
@@ -21,7 +20,6 @@ const routes: Routes = [
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
SharingModule,
|
||||
// MarketplaceLibModule,
|
||||
],
|
||||
declarations: [LoginPage],
|
||||
})
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<ion-content>
|
||||
<!-- <start9-marketplace-lib></start9-marketplace-lib> -->
|
||||
<ion-grid style="height: 100%; max-width: 540px;">
|
||||
<ion-row class="ion-align-items-center" style="height: 100%;">
|
||||
<ion-col class="ion-text-center">
|
||||
|
||||
@@ -17,7 +17,7 @@ import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
|
||||
})
|
||||
export class MarketplaceListPage {
|
||||
@ViewChild(IonContent) content: IonContent
|
||||
localPkgs: { [id: string]: PackageDataEntry }
|
||||
localPkgs: { [id: string]: PackageDataEntry } = { }
|
||||
|
||||
pageLoading = true
|
||||
pkgsLoading = true
|
||||
|
||||
@@ -27,6 +27,7 @@ type UiConfig = {
|
||||
skipStartupAlerts: boolean
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 25 KiB |
@@ -1,263 +0,0 @@
|
||||
import { displayUniqueBy } from '../src/app/app-config/config-cursor'
|
||||
|
||||
function assert (predicate: boolean, message: string) {
|
||||
if (!predicate) {
|
||||
throw new Error('Assertion Failed: ' + message)
|
||||
}
|
||||
}
|
||||
|
||||
function assertEq (a: any, b: any, message: string) {
|
||||
assert(a === b, message)
|
||||
}
|
||||
|
||||
function test () {
|
||||
assertEq(
|
||||
displayUniqueBy(
|
||||
'foo',
|
||||
{
|
||||
type: 'object',
|
||||
name: 'Object',
|
||||
spec: {
|
||||
'foo': {
|
||||
type: 'string',
|
||||
name: 'Foo',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
},
|
||||
nullByDefault: false,
|
||||
nullable: false,
|
||||
uniqueBy: 'foo',
|
||||
},
|
||||
{
|
||||
foo: 'foo-val',
|
||||
},
|
||||
),
|
||||
'Foo',
|
||||
'base string uses name mapping',
|
||||
)
|
||||
assertEq(
|
||||
displayUniqueBy(
|
||||
{
|
||||
any: [
|
||||
'foo',
|
||||
'bar',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'object',
|
||||
name: 'Object',
|
||||
spec: {
|
||||
'foo': {
|
||||
type: 'string',
|
||||
name: 'Foo',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
'bar': {
|
||||
type: 'string',
|
||||
name: 'Bar',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
},
|
||||
nullByDefault: false,
|
||||
nullable: false,
|
||||
uniqueBy: {
|
||||
any: [
|
||||
'foo',
|
||||
'bar',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
foo: 'foo-val',
|
||||
bar: 'bar-val',
|
||||
},
|
||||
),
|
||||
'Foo and Bar',
|
||||
'`any` must be joined with `and`',
|
||||
)
|
||||
assertEq(
|
||||
displayUniqueBy(
|
||||
{
|
||||
all: [
|
||||
'foo',
|
||||
'bar',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'object',
|
||||
name: 'Object',
|
||||
spec: {
|
||||
'foo': {
|
||||
type: 'string',
|
||||
name: 'Foo',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
'bar': {
|
||||
type: 'string',
|
||||
name: 'Bar',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
},
|
||||
nullByDefault: false,
|
||||
nullable: false,
|
||||
uniqueBy: {
|
||||
all: [
|
||||
'foo',
|
||||
'bar',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
foo: 'foo-val',
|
||||
bar: 'bar-val',
|
||||
},
|
||||
),
|
||||
'Foo or Bar',
|
||||
'`all` must be joined with `or`',
|
||||
)
|
||||
assertEq(
|
||||
displayUniqueBy(
|
||||
{
|
||||
any: [
|
||||
'foo',
|
||||
{
|
||||
all: [
|
||||
'bar',
|
||||
'baz',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'object',
|
||||
name: 'Object',
|
||||
spec: {
|
||||
'foo': {
|
||||
type: 'string',
|
||||
name: 'Foo',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
'bar': {
|
||||
type: 'string',
|
||||
name: 'Bar',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
'baz': {
|
||||
type: 'string',
|
||||
name: 'Baz',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
},
|
||||
nullByDefault: false,
|
||||
nullable: false,
|
||||
uniqueBy: {
|
||||
any: [
|
||||
'foo',
|
||||
{
|
||||
all: [
|
||||
'bar',
|
||||
'baz',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
foo: 'foo-val',
|
||||
bar: 'bar-val',
|
||||
baz: 'baz-val',
|
||||
},
|
||||
),
|
||||
'Foo and (Bar or Baz)',
|
||||
'`any` of `all` is correct',
|
||||
)
|
||||
assertEq(
|
||||
displayUniqueBy(
|
||||
{
|
||||
any: [
|
||||
'foo',
|
||||
{
|
||||
all: [
|
||||
'bar',
|
||||
'baz',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'union',
|
||||
name: 'Union',
|
||||
tag: {
|
||||
id: 'variant',
|
||||
name: 'Variant',
|
||||
'variant-names': {
|
||||
'variant-a': 'Variant A',
|
||||
'variant-b': 'Variant B',
|
||||
},
|
||||
},
|
||||
variants: {
|
||||
'variant-a': {
|
||||
'foo': {
|
||||
type: 'string',
|
||||
name: 'Foo',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
'bar': {
|
||||
type: 'string',
|
||||
name: 'Bar',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
'baz': {
|
||||
type: 'string',
|
||||
name: 'Baz',
|
||||
nullable: true,
|
||||
copyable: false,
|
||||
masked: false,
|
||||
},
|
||||
},
|
||||
'variant-b': { },
|
||||
},
|
||||
uniqueBy: {
|
||||
any: [
|
||||
'foo',
|
||||
{
|
||||
all: [
|
||||
'bar',
|
||||
'baz',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
default: 'variant-a',
|
||||
},
|
||||
{
|
||||
variant: 'variant-a',
|
||||
foo: 'foo-val',
|
||||
bar: 'bar-val',
|
||||
baz: 'baz-val',
|
||||
},
|
||||
),
|
||||
'Foo and (Bar or Baz)',
|
||||
'union is correct',
|
||||
)
|
||||
}
|
||||