diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index cfa53243a..a28339211 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -21,7 +21,7 @@ jobs: contents: write defaults: run: - working-directory: page/doc + working-directory: docs steps: - uses: actions/checkout@v3 @@ -29,7 +29,7 @@ jobs: with: node-version: 18 cache: yarn - cache-dependency-path: page/doc/yarn.lock + cache-dependency-path: docs/yarn.lock - name: Install dependencies run: yarn install --frozen-lockfile @@ -44,7 +44,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} # Build output to publish to the `gh-pages` branch: - publish_dir: ./page/doc/build + publish_dir: ./docs/build # The following lines assign commit authorship to the official # GH-Actions bot for deploys to `gh-pages` branch: # https://github.com/actions/checkout/issues/13#issuecomment-724415212 diff --git a/README.md b/README.md index 0897ea468..9b82dfaae 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- - + +

Make Your Data Yours.

diff --git a/app/.vscode/launch.json b/app/.vscode/launch.json deleted file mode 100644 index 219d953b7..000000000 --- a/app/.vscode/launch.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "unself", - "cwd": "unself", - "request": "launch", - "type": "dart", - "program": "lib/dev.dart", - "flutterMode": "debug", - "args": [ - "--debug", - "--flavor=dev", - ] - }, - { - "name": "unself (profile mode)", - "cwd": "unself", - "request": "launch", - "type": "dart", - "flutterMode": "profile", - "args": [ - "--flavor=dev" - ] - }, - { - "name": "unself (release mode)", - "cwd": "unself", - "request": "launch", - "type": "dart", - "flutterMode": "release", - "args": [ - "--flavor=dev" - ] - } - ] -} \ No newline at end of file diff --git a/app/unself/analysis_options.yaml b/app/unself/analysis_options.yaml deleted file mode 100644 index 79977c4c9..000000000 --- a/app/unself/analysis_options.yaml +++ /dev/null @@ -1,5 +0,0 @@ -include: package:unself_analysis/unself_analysis.yaml - -analyzer: - exclude: - - "lib/config/**" diff --git a/app/unself/lib/src/app/app.dart b/app/unself/lib/src/app/app.dart deleted file mode 100644 index df78ce2c9..000000000 --- a/app/unself/lib/src/app/app.dart +++ /dev/null @@ -1,128 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; -import 'package:provider/provider.dart'; -// ignore: depend_on_referenced_packages -import 'package:rudder_integration_firebase_flutter/rudder_integration_firebase_flutter.dart'; -import 'package:unself_app/unself_app.dart'; -import 'package:unself_license/unself_license.dart'; -import 'package:unself_local_database/unself_local_database.dart'; -import 'package:unself_monitoring/unself_monitoring.dart'; -import 'package:unself_style/unself_style.dart'; -import 'package:unself_user/unself_user.dart'; - -class App extends StatefulWidget { - const App._(); - - static Future init({ - Widget Function(BuildContext, Widget?)? builder, - required bool isDebug, - required String rudderWriteKey, - required String rudderDataPlaneUrl, - }) async { - return MultiProvider( - builder: builder, - providers: [ - // [Provider] create/update are lazy by default - Provider( - create: (_) => const UserService(), - ), - Provider( - create: (_) => const LicenseService(), - ), - // Provider( - // create: (_) => ExerciseRepository(), - // ), - Provider( - lazy: false, // Track lifecycle events - create: (_) => AnalyticService( - rudder: RudderController.instance - ..initialize( - rudderWriteKey, - config: RudderConfigBuilder() - .withDataPlaneUrl(rudderDataPlaneUrl) - .withFactory(RudderIntegrationFirebaseFlutter()) - .withDebug(isDebug) - .build(), - )), - ), - Provider( - create: (_) => InfoService(analytic: _.read()), - ), - // Provider( - // create: (_) => MessageService(), - // ), - Provider( - create: (_) => - PerformanceService(performance: FirebasePerformance.instance), - ), - - // Provider( - // create: (_) => FirebaseAppCheck.instance, - // ), - // Provider( - // create: (_) => FirebaseInAppMessaging.instance, - // ), - // ListenableProvider( - // create: (_) { - // if (remoteConfig != null) { - // FirebaseRemoteConfig.instance.setConfigSettings(remoteConfig!); - // } - - // return FirebaseRemoteConfig.instance; - // }, - // ), - // Provider>.value( - // value: AppRouter.defaultNavigator, - // ), - // if (!kIsWeb) - // Provider.value( - // value: await RisoShader.load(), - // ), - // Provider( - // create: (context) => Browser(analytics: ), - // ), - - Provider( - create: (_) => LocalDatabase(), - ), - ], - child: const App._(), - ); - } - - @override - State createState() => _AppState(); -} - -class _AppState extends State { - late final GoRouter _router = AppRouter.build( - observers: [ - AnalyticRouteObserver(analytic: context.read()), - ], - ); - - static _unfocus(BuildContext context) { - FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) { - currentFocus.focusedChild?.unfocus(); - } - } - - @override - Widget build(BuildContext context) => GestureDetector( - onTap: _unfocus(context), - child: StreamBuilder( - stream: context - .read() - .streamUser() - .map((_) => _.themeMode), - builder: (context, snapshot) => MaterialApp.router( - // debugShowCheckedModeBanner: false, - themeMode: snapshot.data, - theme: UnTheme.light, - darkTheme: UnTheme.dark, - routerConfig: _router, - ), - ), - ); -} diff --git a/app/unself/lib/unself_app.dart b/app/unself/lib/unself_app.dart deleted file mode 100644 index 536d7886f..000000000 --- a/app/unself/lib/unself_app.dart +++ /dev/null @@ -1,4 +0,0 @@ -library unself_app; - -export 'src/app/app.dart'; -export 'src/routing/routing.dart'; diff --git a/app/unself/pubspec.yaml b/app/unself/pubspec.yaml deleted file mode 100644 index 4426b373d..000000000 --- a/app/unself/pubspec.yaml +++ /dev/null @@ -1,62 +0,0 @@ -name: unself_app -description: Flutter app for Unself project. - -publish_to: none -version: 1.0.0+1 - -environment: - sdk: ">=2.18.6 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - go_router: ^6.0.1 - provider: ^6.0.5 - - # service - - unself_local_database: - unself_license: - unself_monitoring: - unself_user: - unself_unpack: - - # style - - unself_component: - unself_style: - - # feature - - unself_app_info: - unself_browser: - unself_license_detail: - unself_license_list: - unself_settings_appearance: - unself_settings_data: - unself_settings_list: - unself_unpack_assistant: - -dev_dependencies: - # Code Quality - - unself_analysis: - dart_code_metrics: ^5.4.0 - dependency_validator: ^3.2.2 - - # Code Generation - - build_runner: ^2.3.0 - go_router_builder: ^1.0.15 - - # Testing - - flutter_test: - sdk: flutter - integration_test: - sdk: flutter - # mocktail: ^0.3.0 - -flutter: - uses-material-design: true diff --git a/app/unself/pubspec_overrides.yaml b/app/unself/pubspec_overrides.yaml deleted file mode 100644 index 3de249c20..000000000 --- a/app/unself/pubspec_overrides.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# melos_managed_dependency_overrides: unself_analysis,unself_app_info,unself_browser,unself_component,unself_file,unself_license,unself_license_detail,unself_license_list,unself_local_database,unself_model,unself_monitoring,unself_settings_appearance,unself_settings_data,unself_settings_list,unself_style,unself_unpack,unself_unpack_assistant,unself_unpack_repository,unself_user -dependency_overrides: - unself_analysis: - path: ../../tool/analysis - unself_app_info: - path: ../../feature/app_info - unself_browser: - path: ../../feature/browser - unself_component: - path: ../../style/component - unself_file: - path: ../../patch/file - unself_license: - path: ../../service/license - unself_license_detail: - path: ../../feature/license_detail - unself_license_list: - path: ../../feature/license_list - unself_local_database: - path: ../../service/local_database - unself_model: - path: ../../common/model - unself_monitoring: - path: ../../service/monitoring - unself_settings_appearance: - path: ../../feature/settings_appearance - unself_settings_data: - path: ../../feature/settings_data - unself_settings_list: - path: ../../feature/settings_list - unself_style: - path: ../../style/style - unself_unpack: - path: ../../service/unpack - unself_unpack_assistant: - path: ../../feature/unpack_assistant - unself_unpack_repository: - path: ../../service/unpack_repository - unself_user: - path: ../../service/user diff --git a/common/model/analysis_options.yaml b/common/model/analysis_options.yaml deleted file mode 100644 index 351b4e923..000000000 --- a/common/model/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:unself_analysis/unself_analysis.yaml \ No newline at end of file diff --git a/common/model/lib/src/base/base.dart b/common/model/lib/src/base/base.dart deleted file mode 100644 index 696133688..000000000 --- a/common/model/lib/src/base/base.dart +++ /dev/null @@ -1,27 +0,0 @@ -export './edge.dart'; -export './node.dart'; - -/// {@template base} -/// [Base] is a base class for all unself models. -/// {@endtemplate} -abstract class Base { - /// [id] is unself unique identifier for each inheriting model. - final String id; - - /// [created] is the date and time when the inheriting model was created inside unself app. - // final DateTime created; - - /// [updated] is the date and time when the inheriting model was last updated inside unself app. - // final DateTime updated; - - /// [extra] is a map of additional properties. - final Map? extra; - - /// {@macro base} - const Base._({ - required this.id, - // required this.created, - // required this.updated, - required this.extra, - }); -} diff --git a/common/model/lib/src/base/edge.dart b/common/model/lib/src/base/edge.dart deleted file mode 100644 index f77fd021e..000000000 --- a/common/model/lib/src/base/edge.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:unself_model/unself_model.dart'; - -/// {@template base} -/// [Edge] is a base class for nodes. -/// {@endtemplate} -abstract class Edge implements Base { - /// [id] is unself unique identifier for each inheriting model. - @override - final String id; - - /// [created] is the date and time when the inheriting model was created inside unself app. - // @override - // final DateTime created; - - /// [updated] is the date and time when the inheriting model was last updated inside unself app. - // @override - // final DateTime updated; - - /// [archiveId] is unself unique identifier for the archive the model belongs to. - final String archiveId; - - /// [labels] is a list of labels assigned to the model. - final List labels; - - /// [sourceId] is unself unique identifier for the source node. - final String sourceId; - - /// [targetId] is unself unique identifier for the target node. - final String targetId; - - /// [extra] is a map of additional properties. - @override - final Map? extra; - - /// {@macro base} - const Edge._({ - required this.id, - // required this.created, - // required this.updated, - required this.archiveId, - required this.labels, - required this.sourceId, - required this.targetId, - required this.extra, - }); -} diff --git a/common/model/lib/src/base/node.dart b/common/model/lib/src/base/node.dart deleted file mode 100644 index 36e1f6683..000000000 --- a/common/model/lib/src/base/node.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:unself_model/unself_model.dart'; - -/// {@template base} -/// [Node] is a base class for nodes. -/// {@endtemplate} -abstract class Node implements Base { - /// [id] is unself unique identifier for each inheriting model. - @override - final String id; - - /// [created] is the date and time when the inheriting model was created inside unself app. - // @override - // final DateTime created; - - /// [updated] is the date and time when the inheriting model was last updated inside unself app. - // @override - // final DateTime updated; - - /// [archiveId] is unself unique identifier for the archive the model belongs to. - final String archiveId; - - /// [labels] is a list of labels assigned to the model. - final List labels; - - /// [extra] is a map of additional properties. - @override - final Map? extra; - - /// {@macro base} - const Node._({ - required this.id, - // required this.created, - // required this.updated, - required this.archiveId, - required this.labels, - required this.extra, - }); -} diff --git a/common/model/lib/src/converter/extra.dart b/common/model/lib/src/converter/extra.dart deleted file mode 100644 index 3953bbcea..000000000 --- a/common/model/lib/src/converter/extra.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; - -class JsonExtra implements JsonConverter, Map?> { - const JsonExtra(); - - @override - fromJson(_) => _?.cast() ?? {}; - - @override - toJson(_) => _.keys.isNotEmpty ? _ : null; -} diff --git a/common/model/lib/src/ungraph/account/account.dart b/common/model/lib/src/ungraph/account/account.dart deleted file mode 100644 index 75da647a7..000000000 --- a/common/model/lib/src/ungraph/account/account.dart +++ /dev/null @@ -1,49 +0,0 @@ -// ignore_for_file: invalid_annotation_target - -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:unself_model/unself_model.dart'; - -part 'account.freezed.dart'; -part 'account.g.dart'; - -/// {@template account} -/// [Account] is a user's and their acquaintances' identity on a [App]. -/// Each person can have multiple [Account]s and on multiple [App]s. -/// {@endtemplate} -@freezed -class Account with _$Account implements Node { - const Account._(); - - /// {@macro account} - const factory Account({ - @JsonString() required String id, - // @JsonDateTime() required DateTime created, - // @JsonDateTime() required DateTime updated, - required String archiveId, - - /// [name] is the name used by the [Account] on the [App]. - required String name, - - /// [app] is the [App] where the [Account] is registered. - required String appId, - - /// [isOwner] is true if the [Account] is the owner of the [Archive]. - required bool isOwner, - - /// [emails] is the email used by the [Account] on the [App]. - @Default([]) List emails, - - /// [extra] is a map of additional properties. - @JsonExtra() @Default({}) Map extra, - }) = _Account; - - /// Creates a [Account] from Json map - factory Account.fromJson(Map data) => - _$AccountFromJson(data); - - @override - final labels = const ['account']; - - // @override - // String toString() => 'Account(id: $id, name: $name, app: ${app.id})'; -} diff --git a/common/model/lib/src/ungraph/account/account.freezed.dart b/common/model/lib/src/ungraph/account/account.freezed.dart deleted file mode 100644 index 2bff5dacf..000000000 --- a/common/model/lib/src/ungraph/account/account.freezed.dart +++ /dev/null @@ -1,340 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'account.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -Account _$AccountFromJson(Map json) { - return _Account.fromJson(json); -} - -/// @nodoc -mixin _$Account { - @JsonString() - String get id => - throw _privateConstructorUsedError; // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - String get archiveId => throw _privateConstructorUsedError; - - /// [name] is the name used by the [Account] on the [App]. - String get name => throw _privateConstructorUsedError; - - /// [app] is the [App] where the [Account] is registered. - String get appId => throw _privateConstructorUsedError; - - /// [isOwner] is true if the [Account] is the owner of the [Archive]. - bool get isOwner => throw _privateConstructorUsedError; - - /// [emails] is the email used by the [Account] on the [App]. - List get emails => throw _privateConstructorUsedError; - - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $AccountCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AccountCopyWith<$Res> { - factory $AccountCopyWith(Account value, $Res Function(Account) then) = - _$AccountCopyWithImpl<$Res, Account>; - @useResult - $Res call( - {@JsonString() String id, - String archiveId, - String name, - String appId, - bool isOwner, - List emails, - @JsonExtra() Map extra}); -} - -/// @nodoc -class _$AccountCopyWithImpl<$Res, $Val extends Account> - implements $AccountCopyWith<$Res> { - _$AccountCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? archiveId = null, - Object? name = null, - Object? appId = null, - Object? isOwner = null, - Object? emails = null, - Object? extra = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - archiveId: null == archiveId - ? _value.archiveId - : archiveId // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - appId: null == appId - ? _value.appId - : appId // ignore: cast_nullable_to_non_nullable - as String, - isOwner: null == isOwner - ? _value.isOwner - : isOwner // ignore: cast_nullable_to_non_nullable - as bool, - emails: null == emails - ? _value.emails - : emails // ignore: cast_nullable_to_non_nullable - as List, - extra: null == extra - ? _value.extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$_AccountCopyWith<$Res> implements $AccountCopyWith<$Res> { - factory _$$_AccountCopyWith( - _$_Account value, $Res Function(_$_Account) then) = - __$$_AccountCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonString() String id, - String archiveId, - String name, - String appId, - bool isOwner, - List emails, - @JsonExtra() Map extra}); -} - -/// @nodoc -class __$$_AccountCopyWithImpl<$Res> - extends _$AccountCopyWithImpl<$Res, _$_Account> - implements _$$_AccountCopyWith<$Res> { - __$$_AccountCopyWithImpl(_$_Account _value, $Res Function(_$_Account) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? archiveId = null, - Object? name = null, - Object? appId = null, - Object? isOwner = null, - Object? emails = null, - Object? extra = null, - }) { - return _then(_$_Account( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - archiveId: null == archiveId - ? _value.archiveId - : archiveId // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - appId: null == appId - ? _value.appId - : appId // ignore: cast_nullable_to_non_nullable - as String, - isOwner: null == isOwner - ? _value.isOwner - : isOwner // ignore: cast_nullable_to_non_nullable - as bool, - emails: null == emails - ? _value._emails - : emails // ignore: cast_nullable_to_non_nullable - as List, - extra: null == extra - ? _value._extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_Account extends _Account { - const _$_Account( - {@JsonString() required this.id, - required this.archiveId, - required this.name, - required this.appId, - required this.isOwner, - final List emails = const [], - @JsonExtra() final Map extra = const {}}) - : _emails = emails, - _extra = extra, - super._(); - - factory _$_Account.fromJson(Map json) => - _$$_AccountFromJson(json); - - @override - @JsonString() - final String id; -// @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - @override - final String archiveId; - - /// [name] is the name used by the [Account] on the [App]. - @override - final String name; - - /// [app] is the [App] where the [Account] is registered. - @override - final String appId; - - /// [isOwner] is true if the [Account] is the owner of the [Archive]. - @override - final bool isOwner; - - /// [emails] is the email used by the [Account] on the [App]. - final List _emails; - - /// [emails] is the email used by the [Account] on the [App]. - @override - @JsonKey() - List get emails { - if (_emails is EqualUnmodifiableListView) return _emails; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_emails); - } - - /// [extra] is a map of additional properties. - final Map _extra; - - /// [extra] is a map of additional properties. - @override - @JsonKey() - @JsonExtra() - Map get extra { - if (_extra is EqualUnmodifiableMapView) return _extra; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_extra); - } - - @override - String toString() { - return 'Account(id: $id, archiveId: $archiveId, name: $name, appId: $appId, isOwner: $isOwner, emails: $emails, extra: $extra)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$_Account && - (identical(other.id, id) || other.id == id) && - (identical(other.archiveId, archiveId) || - other.archiveId == archiveId) && - (identical(other.name, name) || other.name == name) && - (identical(other.appId, appId) || other.appId == appId) && - (identical(other.isOwner, isOwner) || other.isOwner == isOwner) && - const DeepCollectionEquality().equals(other._emails, _emails) && - const DeepCollectionEquality().equals(other._extra, _extra)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, - id, - archiveId, - name, - appId, - isOwner, - const DeepCollectionEquality().hash(_emails), - const DeepCollectionEquality().hash(_extra)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$_AccountCopyWith<_$_Account> get copyWith => - __$$_AccountCopyWithImpl<_$_Account>(this, _$identity); - - @override - Map toJson() { - return _$$_AccountToJson( - this, - ); - } -} - -abstract class _Account extends Account { - const factory _Account( - {@JsonString() required final String id, - required final String archiveId, - required final String name, - required final String appId, - required final bool isOwner, - final List emails, - @JsonExtra() final Map extra}) = _$_Account; - const _Account._() : super._(); - - factory _Account.fromJson(Map json) = _$_Account.fromJson; - - @override - @JsonString() - String get id; - @override // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - String get archiveId; - @override - - /// [name] is the name used by the [Account] on the [App]. - String get name; - @override - - /// [app] is the [App] where the [Account] is registered. - String get appId; - @override - - /// [isOwner] is true if the [Account] is the owner of the [Archive]. - bool get isOwner; - @override - - /// [emails] is the email used by the [Account] on the [App]. - List get emails; - @override - - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra; - @override - @JsonKey(ignore: true) - _$$_AccountCopyWith<_$_Account> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/common/model/lib/src/ungraph/account/account.g.dart b/common/model/lib/src/ungraph/account/account.g.dart deleted file mode 100644 index 67b9946d9..000000000 --- a/common/model/lib/src/ungraph/account/account.g.dart +++ /dev/null @@ -1,41 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'account.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_Account _$$_AccountFromJson(Map json) => _$_Account( - id: const JsonString().fromJson(json['id']), - archiveId: json['archiveId'] as String, - name: json['name'] as String, - appId: json['appId'] as String, - isOwner: json['isOwner'] as bool, - emails: (json['emails'] as List?) - ?.map((e) => e as String) - .toList() ?? - const [], - extra: json['extra'] == null - ? const {} - : const JsonExtra().fromJson(json['extra'] as Map?), - ); - -Map _$$_AccountToJson(_$_Account instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('id', const JsonString().toJson(instance.id)); - val['archiveId'] = instance.archiveId; - val['name'] = instance.name; - val['appId'] = instance.appId; - val['isOwner'] = instance.isOwner; - val['emails'] = instance.emails; - writeNotNull('extra', const JsonExtra().toJson(instance.extra)); - return val; -} diff --git a/common/model/lib/src/ungraph/activity/activity.dart b/common/model/lib/src/ungraph/activity/activity.dart deleted file mode 100644 index 0f3088eaa..000000000 --- a/common/model/lib/src/ungraph/activity/activity.dart +++ /dev/null @@ -1,56 +0,0 @@ -// ignore_for_file: invalid_annotation_target - -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:unself_model/unself_model.dart'; - -part 'activity.freezed.dart'; -part 'activity.g.dart'; - -/// {@template activity} -/// {@endtemplate} -@freezed -class Activity with _$Activity implements Edge { - const Activity._(); - - /// {@macro activity} - const factory Activity({ - @JsonString() required String id, - // @JsonDateTime() required DateTime created, - // @JsonDateTime() required DateTime updated, - required String archiveId, - - /// [accountId] is the source node. - required String accountId, - - /// [appId] is the source node. - required String appId, - - /// [timestamp] is the date and time of the [Activity] by the [App]. - @JsonDateTime() required DateTime timestamp, - - /// [name] is the name used by the [Activity] on the [App]. - required String name, - - /// [type] is the type of the [Activity] on the [App]. - required String type, - - /// [email] is the email used by the [Activity] on the [App]. - required String source, - - /// [extra] is a map of additional properties. - @JsonExtra() @Default({}) Map extra, - }) = _Activity; - - /// Creates a [Activity] from Json map - factory Activity.fromJson(Map data) => - _$ActivityFromJson(data); - - @override - final labels = const ['activity']; - - @override - String get sourceId => accountId; - - @override - String get targetId => appId; -} diff --git a/common/model/lib/src/ungraph/activity/activity.freezed.dart b/common/model/lib/src/ungraph/activity/activity.freezed.dart deleted file mode 100644 index 0c28f774c..000000000 --- a/common/model/lib/src/ungraph/activity/activity.freezed.dart +++ /dev/null @@ -1,392 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'activity.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -Activity _$ActivityFromJson(Map json) { - return _Activity.fromJson(json); -} - -/// @nodoc -mixin _$Activity { - @JsonString() - String get id => - throw _privateConstructorUsedError; // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - String get archiveId => throw _privateConstructorUsedError; - - /// [accountId] is the source node. - String get accountId => throw _privateConstructorUsedError; - - /// [appId] is the source node. - String get appId => throw _privateConstructorUsedError; - - /// [timestamp] is the date and time of the [Activity] by the [App]. - @JsonDateTime() - DateTime get timestamp => throw _privateConstructorUsedError; - - /// [name] is the name used by the [Activity] on the [App]. - String get name => throw _privateConstructorUsedError; - - /// [type] is the type of the [Activity] on the [App]. - String get type => throw _privateConstructorUsedError; - - /// [email] is the email used by the [Activity] on the [App]. - String get source => throw _privateConstructorUsedError; - - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ActivityCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ActivityCopyWith<$Res> { - factory $ActivityCopyWith(Activity value, $Res Function(Activity) then) = - _$ActivityCopyWithImpl<$Res, Activity>; - @useResult - $Res call( - {@JsonString() String id, - String archiveId, - String accountId, - String appId, - @JsonDateTime() DateTime timestamp, - String name, - String type, - String source, - @JsonExtra() Map extra}); -} - -/// @nodoc -class _$ActivityCopyWithImpl<$Res, $Val extends Activity> - implements $ActivityCopyWith<$Res> { - _$ActivityCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? archiveId = null, - Object? accountId = null, - Object? appId = null, - Object? timestamp = null, - Object? name = null, - Object? type = null, - Object? source = null, - Object? extra = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - archiveId: null == archiveId - ? _value.archiveId - : archiveId // ignore: cast_nullable_to_non_nullable - as String, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as String, - appId: null == appId - ? _value.appId - : appId // ignore: cast_nullable_to_non_nullable - as String, - timestamp: null == timestamp - ? _value.timestamp - : timestamp // ignore: cast_nullable_to_non_nullable - as DateTime, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - source: null == source - ? _value.source - : source // ignore: cast_nullable_to_non_nullable - as String, - extra: null == extra - ? _value.extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$_ActivityCopyWith<$Res> implements $ActivityCopyWith<$Res> { - factory _$$_ActivityCopyWith( - _$_Activity value, $Res Function(_$_Activity) then) = - __$$_ActivityCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonString() String id, - String archiveId, - String accountId, - String appId, - @JsonDateTime() DateTime timestamp, - String name, - String type, - String source, - @JsonExtra() Map extra}); -} - -/// @nodoc -class __$$_ActivityCopyWithImpl<$Res> - extends _$ActivityCopyWithImpl<$Res, _$_Activity> - implements _$$_ActivityCopyWith<$Res> { - __$$_ActivityCopyWithImpl( - _$_Activity _value, $Res Function(_$_Activity) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? archiveId = null, - Object? accountId = null, - Object? appId = null, - Object? timestamp = null, - Object? name = null, - Object? type = null, - Object? source = null, - Object? extra = null, - }) { - return _then(_$_Activity( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - archiveId: null == archiveId - ? _value.archiveId - : archiveId // ignore: cast_nullable_to_non_nullable - as String, - accountId: null == accountId - ? _value.accountId - : accountId // ignore: cast_nullable_to_non_nullable - as String, - appId: null == appId - ? _value.appId - : appId // ignore: cast_nullable_to_non_nullable - as String, - timestamp: null == timestamp - ? _value.timestamp - : timestamp // ignore: cast_nullable_to_non_nullable - as DateTime, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - source: null == source - ? _value.source - : source // ignore: cast_nullable_to_non_nullable - as String, - extra: null == extra - ? _value._extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_Activity extends _Activity { - const _$_Activity( - {@JsonString() required this.id, - required this.archiveId, - required this.accountId, - required this.appId, - @JsonDateTime() required this.timestamp, - required this.name, - required this.type, - required this.source, - @JsonExtra() final Map extra = const {}}) - : _extra = extra, - super._(); - - factory _$_Activity.fromJson(Map json) => - _$$_ActivityFromJson(json); - - @override - @JsonString() - final String id; -// @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - @override - final String archiveId; - - /// [accountId] is the source node. - @override - final String accountId; - - /// [appId] is the source node. - @override - final String appId; - - /// [timestamp] is the date and time of the [Activity] by the [App]. - @override - @JsonDateTime() - final DateTime timestamp; - - /// [name] is the name used by the [Activity] on the [App]. - @override - final String name; - - /// [type] is the type of the [Activity] on the [App]. - @override - final String type; - - /// [email] is the email used by the [Activity] on the [App]. - @override - final String source; - - /// [extra] is a map of additional properties. - final Map _extra; - - /// [extra] is a map of additional properties. - @override - @JsonKey() - @JsonExtra() - Map get extra { - if (_extra is EqualUnmodifiableMapView) return _extra; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_extra); - } - - @override - String toString() { - return 'Activity(id: $id, archiveId: $archiveId, accountId: $accountId, appId: $appId, timestamp: $timestamp, name: $name, type: $type, source: $source, extra: $extra)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$_Activity && - (identical(other.id, id) || other.id == id) && - (identical(other.archiveId, archiveId) || - other.archiveId == archiveId) && - (identical(other.accountId, accountId) || - other.accountId == accountId) && - (identical(other.appId, appId) || other.appId == appId) && - (identical(other.timestamp, timestamp) || - other.timestamp == timestamp) && - (identical(other.name, name) || other.name == name) && - (identical(other.type, type) || other.type == type) && - (identical(other.source, source) || other.source == source) && - const DeepCollectionEquality().equals(other._extra, _extra)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, - id, - archiveId, - accountId, - appId, - timestamp, - name, - type, - source, - const DeepCollectionEquality().hash(_extra)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$_ActivityCopyWith<_$_Activity> get copyWith => - __$$_ActivityCopyWithImpl<_$_Activity>(this, _$identity); - - @override - Map toJson() { - return _$$_ActivityToJson( - this, - ); - } -} - -abstract class _Activity extends Activity { - const factory _Activity( - {@JsonString() required final String id, - required final String archiveId, - required final String accountId, - required final String appId, - @JsonDateTime() required final DateTime timestamp, - required final String name, - required final String type, - required final String source, - @JsonExtra() final Map extra}) = _$_Activity; - const _Activity._() : super._(); - - factory _Activity.fromJson(Map json) = _$_Activity.fromJson; - - @override - @JsonString() - String get id; - @override // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - String get archiveId; - @override - - /// [accountId] is the source node. - String get accountId; - @override - - /// [appId] is the source node. - String get appId; - @override - - /// [timestamp] is the date and time of the [Activity] by the [App]. - @JsonDateTime() - DateTime get timestamp; - @override - - /// [name] is the name used by the [Activity] on the [App]. - String get name; - @override - - /// [type] is the type of the [Activity] on the [App]. - String get type; - @override - - /// [email] is the email used by the [Activity] on the [App]. - String get source; - @override - - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra; - @override - @JsonKey(ignore: true) - _$$_ActivityCopyWith<_$_Activity> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/common/model/lib/src/ungraph/activity/activity.g.dart b/common/model/lib/src/ungraph/activity/activity.g.dart deleted file mode 100644 index b7e2b2bad..000000000 --- a/common/model/lib/src/ungraph/activity/activity.g.dart +++ /dev/null @@ -1,42 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'activity.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_Activity _$$_ActivityFromJson(Map json) => _$_Activity( - id: const JsonString().fromJson(json['id']), - archiveId: json['archiveId'] as String, - accountId: json['accountId'] as String, - appId: json['appId'] as String, - timestamp: const JsonDateTime().fromJson(json['timestamp']), - name: json['name'] as String, - type: json['type'] as String, - source: json['source'] as String, - extra: json['extra'] == null - ? const {} - : const JsonExtra().fromJson(json['extra'] as Map?), - ); - -Map _$$_ActivityToJson(_$_Activity instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('id', const JsonString().toJson(instance.id)); - val['archiveId'] = instance.archiveId; - val['accountId'] = instance.accountId; - val['appId'] = instance.appId; - writeNotNull('timestamp', const JsonDateTime().toJson(instance.timestamp)); - val['name'] = instance.name; - val['type'] = instance.type; - val['source'] = instance.source; - writeNotNull('extra', const JsonExtra().toJson(instance.extra)); - return val; -} diff --git a/common/model/lib/src/ungraph/advertiser/advertiser.dart b/common/model/lib/src/ungraph/advertiser/advertiser.dart deleted file mode 100644 index ef0d24091..000000000 --- a/common/model/lib/src/ungraph/advertiser/advertiser.dart +++ /dev/null @@ -1,40 +0,0 @@ -// ignore_for_file: invalid_annotation_target - -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:unself_model/unself_model.dart'; - -part 'advertiser.freezed.dart'; -part 'advertiser.g.dart'; - -/// {@template advertiser} -/// [Advertiser] is a user's and their acquaintances' identity on a [Advertiser]. -/// Each person can have multiple [Advertiser]s and on multiple [Advertiser]s. -/// {@endtemplate} -@freezed -class Advertiser with _$Advertiser implements Node { - const Advertiser._(); - - /// {@macro advertiser} - const factory Advertiser({ - @JsonString() required String id, - // @JsonDateTime() required DateTime created, - // @JsonDateTime() required DateTime updated, - required String archiveId, - - /// [name] is the name used by the [Advertiser] on the [Advertiser]. - required String name, - - /// [extra] is a map of additional properties. - @JsonExtra() @Default({}) Map extra, - }) = _Advertiser; - - /// Creates a [Advertiser] from Json map - factory Advertiser.fromJson(Map data) => - _$AdvertiserFromJson(data); - - @override - final labels = const ['advertiser']; - - // @override - // String toString() => 'Advertiser(id: $id, name: $name, app: ${app.id})'; -} diff --git a/common/model/lib/src/ungraph/advertiser/advertiser.freezed.dart b/common/model/lib/src/ungraph/advertiser/advertiser.freezed.dart deleted file mode 100644 index 71c6106d4..000000000 --- a/common/model/lib/src/ungraph/advertiser/advertiser.freezed.dart +++ /dev/null @@ -1,251 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'advertiser.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -Advertiser _$AdvertiserFromJson(Map json) { - return _Advertiser.fromJson(json); -} - -/// @nodoc -mixin _$Advertiser { - @JsonString() - String get id => - throw _privateConstructorUsedError; // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - String get archiveId => throw _privateConstructorUsedError; - - /// [name] is the name used by the [Advertiser] on the [Advertiser]. - String get name => throw _privateConstructorUsedError; - - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $AdvertiserCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AdvertiserCopyWith<$Res> { - factory $AdvertiserCopyWith( - Advertiser value, $Res Function(Advertiser) then) = - _$AdvertiserCopyWithImpl<$Res, Advertiser>; - @useResult - $Res call( - {@JsonString() String id, - String archiveId, - String name, - @JsonExtra() Map extra}); -} - -/// @nodoc -class _$AdvertiserCopyWithImpl<$Res, $Val extends Advertiser> - implements $AdvertiserCopyWith<$Res> { - _$AdvertiserCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? archiveId = null, - Object? name = null, - Object? extra = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - archiveId: null == archiveId - ? _value.archiveId - : archiveId // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - extra: null == extra - ? _value.extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$_AdvertiserCopyWith<$Res> - implements $AdvertiserCopyWith<$Res> { - factory _$$_AdvertiserCopyWith( - _$_Advertiser value, $Res Function(_$_Advertiser) then) = - __$$_AdvertiserCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonString() String id, - String archiveId, - String name, - @JsonExtra() Map extra}); -} - -/// @nodoc -class __$$_AdvertiserCopyWithImpl<$Res> - extends _$AdvertiserCopyWithImpl<$Res, _$_Advertiser> - implements _$$_AdvertiserCopyWith<$Res> { - __$$_AdvertiserCopyWithImpl( - _$_Advertiser _value, $Res Function(_$_Advertiser) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? archiveId = null, - Object? name = null, - Object? extra = null, - }) { - return _then(_$_Advertiser( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - archiveId: null == archiveId - ? _value.archiveId - : archiveId // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - extra: null == extra - ? _value._extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_Advertiser extends _Advertiser { - const _$_Advertiser( - {@JsonString() required this.id, - required this.archiveId, - required this.name, - @JsonExtra() final Map extra = const {}}) - : _extra = extra, - super._(); - - factory _$_Advertiser.fromJson(Map json) => - _$$_AdvertiserFromJson(json); - - @override - @JsonString() - final String id; -// @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - @override - final String archiveId; - - /// [name] is the name used by the [Advertiser] on the [Advertiser]. - @override - final String name; - - /// [extra] is a map of additional properties. - final Map _extra; - - /// [extra] is a map of additional properties. - @override - @JsonKey() - @JsonExtra() - Map get extra { - if (_extra is EqualUnmodifiableMapView) return _extra; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_extra); - } - - @override - String toString() { - return 'Advertiser(id: $id, archiveId: $archiveId, name: $name, extra: $extra)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$_Advertiser && - (identical(other.id, id) || other.id == id) && - (identical(other.archiveId, archiveId) || - other.archiveId == archiveId) && - (identical(other.name, name) || other.name == name) && - const DeepCollectionEquality().equals(other._extra, _extra)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash(runtimeType, id, archiveId, name, - const DeepCollectionEquality().hash(_extra)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$_AdvertiserCopyWith<_$_Advertiser> get copyWith => - __$$_AdvertiserCopyWithImpl<_$_Advertiser>(this, _$identity); - - @override - Map toJson() { - return _$$_AdvertiserToJson( - this, - ); - } -} - -abstract class _Advertiser extends Advertiser { - const factory _Advertiser( - {@JsonString() required final String id, - required final String archiveId, - required final String name, - @JsonExtra() final Map extra}) = _$_Advertiser; - const _Advertiser._() : super._(); - - factory _Advertiser.fromJson(Map json) = - _$_Advertiser.fromJson; - - @override - @JsonString() - String get id; - @override // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - String get archiveId; - @override - - /// [name] is the name used by the [Advertiser] on the [Advertiser]. - String get name; - @override - - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra; - @override - @JsonKey(ignore: true) - _$$_AdvertiserCopyWith<_$_Advertiser> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/common/model/lib/src/ungraph/advertiser/advertiser.g.dart b/common/model/lib/src/ungraph/advertiser/advertiser.g.dart deleted file mode 100644 index f015672c0..000000000 --- a/common/model/lib/src/ungraph/advertiser/advertiser.g.dart +++ /dev/null @@ -1,33 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'advertiser.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_Advertiser _$$_AdvertiserFromJson(Map json) => - _$_Advertiser( - id: const JsonString().fromJson(json['id']), - archiveId: json['archiveId'] as String, - name: json['name'] as String, - extra: json['extra'] == null - ? const {} - : const JsonExtra().fromJson(json['extra'] as Map?), - ); - -Map _$$_AdvertiserToJson(_$_Advertiser instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('id', const JsonString().toJson(instance.id)); - val['archiveId'] = instance.archiveId; - val['name'] = instance.name; - writeNotNull('extra', const JsonExtra().toJson(instance.extra)); - return val; -} diff --git a/common/model/lib/src/ungraph/app/app.dart b/common/model/lib/src/ungraph/app/app.dart deleted file mode 100644 index 1d9d8914c..000000000 --- a/common/model/lib/src/ungraph/app/app.dart +++ /dev/null @@ -1,34 +0,0 @@ -// ignore_for_file: invalid_annotation_target - -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:unself_model/unself_model.dart'; - -part 'app.freezed.dart'; -part 'app.g.dart'; - -/// {@template app} -/// [App] is a software application or services that the user uses. -/// {@endtemplate} -@freezed -class App with _$App implements Base { - const App._(); - - /// {@macro app} - const factory App({ - @JsonString() required String id, - // @JsonDateTime() required DateTime created, - // @JsonDateTime() required DateTime updated, - - /// [name] is the name of the [App]. - required String name, - - /// [extra] is a map of additional properties. - @JsonExtra() @Default({}) Map extra, - }) = _App; - - /// Creates a [App] from Json map - factory App.fromJson(Map json) => _$AppFromJson(json); - - // @override - // String toString() => 'App(id: $id, name: $name)'; -} diff --git a/common/model/lib/src/ungraph/app/app.freezed.dart b/common/model/lib/src/ungraph/app/app.freezed.dart deleted file mode 100644 index 138082a44..000000000 --- a/common/model/lib/src/ungraph/app/app.freezed.dart +++ /dev/null @@ -1,217 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'app.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -App _$AppFromJson(Map json) { - return _App.fromJson(json); -} - -/// @nodoc -mixin _$App { - @JsonString() - String get id => - throw _privateConstructorUsedError; // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - /// [name] is the name of the [App]. - String get name => throw _privateConstructorUsedError; - - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $AppCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AppCopyWith<$Res> { - factory $AppCopyWith(App value, $Res Function(App) then) = - _$AppCopyWithImpl<$Res, App>; - @useResult - $Res call( - {@JsonString() String id, - String name, - @JsonExtra() Map extra}); -} - -/// @nodoc -class _$AppCopyWithImpl<$Res, $Val extends App> implements $AppCopyWith<$Res> { - _$AppCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? extra = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - extra: null == extra - ? _value.extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$_AppCopyWith<$Res> implements $AppCopyWith<$Res> { - factory _$$_AppCopyWith(_$_App value, $Res Function(_$_App) then) = - __$$_AppCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonString() String id, - String name, - @JsonExtra() Map extra}); -} - -/// @nodoc -class __$$_AppCopyWithImpl<$Res> extends _$AppCopyWithImpl<$Res, _$_App> - implements _$$_AppCopyWith<$Res> { - __$$_AppCopyWithImpl(_$_App _value, $Res Function(_$_App) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? extra = null, - }) { - return _then(_$_App( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - extra: null == extra - ? _value._extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_App extends _App { - const _$_App( - {@JsonString() required this.id, - required this.name, - @JsonExtra() final Map extra = const {}}) - : _extra = extra, - super._(); - - factory _$_App.fromJson(Map json) => _$$_AppFromJson(json); - - @override - @JsonString() - final String id; -// @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - /// [name] is the name of the [App]. - @override - final String name; - - /// [extra] is a map of additional properties. - final Map _extra; - - /// [extra] is a map of additional properties. - @override - @JsonKey() - @JsonExtra() - Map get extra { - if (_extra is EqualUnmodifiableMapView) return _extra; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_extra); - } - - @override - String toString() { - return 'App(id: $id, name: $name, extra: $extra)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$_App && - (identical(other.id, id) || other.id == id) && - (identical(other.name, name) || other.name == name) && - const DeepCollectionEquality().equals(other._extra, _extra)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, id, name, const DeepCollectionEquality().hash(_extra)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$_AppCopyWith<_$_App> get copyWith => - __$$_AppCopyWithImpl<_$_App>(this, _$identity); - - @override - Map toJson() { - return _$$_AppToJson( - this, - ); - } -} - -abstract class _App extends App { - const factory _App( - {@JsonString() required final String id, - required final String name, - @JsonExtra() final Map extra}) = _$_App; - const _App._() : super._(); - - factory _App.fromJson(Map json) = _$_App.fromJson; - - @override - @JsonString() - String get id; - @override // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - /// [name] is the name of the [App]. - String get name; - @override - - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra; - @override - @JsonKey(ignore: true) - _$$_AppCopyWith<_$_App> get copyWith => throw _privateConstructorUsedError; -} diff --git a/common/model/lib/src/ungraph/app/app.g.dart b/common/model/lib/src/ungraph/app/app.g.dart deleted file mode 100644 index 62f58e993..000000000 --- a/common/model/lib/src/ungraph/app/app.g.dart +++ /dev/null @@ -1,30 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'app.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_App _$$_AppFromJson(Map json) => _$_App( - id: const JsonString().fromJson(json['id']), - name: json['name'] as String, - extra: json['extra'] == null - ? const {} - : const JsonExtra().fromJson(json['extra'] as Map?), - ); - -Map _$$_AppToJson(_$_App instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('id', const JsonString().toJson(instance.id)); - val['name'] = instance.name; - writeNotNull('extra', const JsonExtra().toJson(instance.extra)); - return val; -} diff --git a/common/model/lib/src/ungraph/topic/topic.dart b/common/model/lib/src/ungraph/topic/topic.dart deleted file mode 100644 index 397c602c5..000000000 --- a/common/model/lib/src/ungraph/topic/topic.dart +++ /dev/null @@ -1,40 +0,0 @@ -// ignore_for_file: invalid_annotation_target - -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:unself_model/unself_model.dart'; - -part 'topic.freezed.dart'; -part 'topic.g.dart'; - -/// {@template topic} -/// {@endtemplate} -@freezed -class Topic with _$Topic implements Node { - const Topic._(); - - /// {@macro topic} - const factory Topic({ - @JsonString() required String id, - // @JsonDateTime() required DateTime created, - // @JsonDateTime() required DateTime updated, - required String archiveId, - - /// [name] is the name used by the [Topic] on the [App]. - required String name, - - /// [email] is the email used by the [Topic] on the [App]. - // required String source, - - /// [extra] is a map of additional properties. - @JsonExtra() @Default({}) Map extra, - }) = _Topic; - - /// Creates a [Topic] from Json map - factory Topic.fromJson(Map data) => _$TopicFromJson(data); - - @override - final labels = const ['topic']; - - // @override - // String toString() => 'Topic(id: $id, name: $name, app: ${app.id})'; -} diff --git a/common/model/lib/src/ungraph/topic/topic.freezed.dart b/common/model/lib/src/ungraph/topic/topic.freezed.dart deleted file mode 100644 index 51aaf72e0..000000000 --- a/common/model/lib/src/ungraph/topic/topic.freezed.dart +++ /dev/null @@ -1,252 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'topic.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); - -Topic _$TopicFromJson(Map json) { - return _Topic.fromJson(json); -} - -/// @nodoc -mixin _$Topic { - @JsonString() - String get id => - throw _privateConstructorUsedError; // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - String get archiveId => throw _privateConstructorUsedError; - - /// [name] is the name used by the [Topic] on the [App]. - String get name => throw _privateConstructorUsedError; - - /// [email] is the email used by the [Topic] on the [App]. -// required String source, - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $TopicCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TopicCopyWith<$Res> { - factory $TopicCopyWith(Topic value, $Res Function(Topic) then) = - _$TopicCopyWithImpl<$Res, Topic>; - @useResult - $Res call( - {@JsonString() String id, - String archiveId, - String name, - @JsonExtra() Map extra}); -} - -/// @nodoc -class _$TopicCopyWithImpl<$Res, $Val extends Topic> - implements $TopicCopyWith<$Res> { - _$TopicCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? archiveId = null, - Object? name = null, - Object? extra = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - archiveId: null == archiveId - ? _value.archiveId - : archiveId // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - extra: null == extra - ? _value.extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$_TopicCopyWith<$Res> implements $TopicCopyWith<$Res> { - factory _$$_TopicCopyWith(_$_Topic value, $Res Function(_$_Topic) then) = - __$$_TopicCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonString() String id, - String archiveId, - String name, - @JsonExtra() Map extra}); -} - -/// @nodoc -class __$$_TopicCopyWithImpl<$Res> extends _$TopicCopyWithImpl<$Res, _$_Topic> - implements _$$_TopicCopyWith<$Res> { - __$$_TopicCopyWithImpl(_$_Topic _value, $Res Function(_$_Topic) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? archiveId = null, - Object? name = null, - Object? extra = null, - }) { - return _then(_$_Topic( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - archiveId: null == archiveId - ? _value.archiveId - : archiveId // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - extra: null == extra - ? _value._extra - : extra // ignore: cast_nullable_to_non_nullable - as Map, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$_Topic extends _Topic { - const _$_Topic( - {@JsonString() required this.id, - required this.archiveId, - required this.name, - @JsonExtra() final Map extra = const {}}) - : _extra = extra, - super._(); - - factory _$_Topic.fromJson(Map json) => - _$$_TopicFromJson(json); - - @override - @JsonString() - final String id; -// @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - @override - final String archiveId; - - /// [name] is the name used by the [Topic] on the [App]. - @override - final String name; - - /// [email] is the email used by the [Topic] on the [App]. -// required String source, - /// [extra] is a map of additional properties. - final Map _extra; - - /// [email] is the email used by the [Topic] on the [App]. -// required String source, - /// [extra] is a map of additional properties. - @override - @JsonKey() - @JsonExtra() - Map get extra { - if (_extra is EqualUnmodifiableMapView) return _extra; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_extra); - } - - @override - String toString() { - return 'Topic(id: $id, archiveId: $archiveId, name: $name, extra: $extra)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$_Topic && - (identical(other.id, id) || other.id == id) && - (identical(other.archiveId, archiveId) || - other.archiveId == archiveId) && - (identical(other.name, name) || other.name == name) && - const DeepCollectionEquality().equals(other._extra, _extra)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash(runtimeType, id, archiveId, name, - const DeepCollectionEquality().hash(_extra)); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$_TopicCopyWith<_$_Topic> get copyWith => - __$$_TopicCopyWithImpl<_$_Topic>(this, _$identity); - - @override - Map toJson() { - return _$$_TopicToJson( - this, - ); - } -} - -abstract class _Topic extends Topic { - const factory _Topic( - {@JsonString() required final String id, - required final String archiveId, - required final String name, - @JsonExtra() final Map extra}) = _$_Topic; - const _Topic._() : super._(); - - factory _Topic.fromJson(Map json) = _$_Topic.fromJson; - - @override - @JsonString() - String get id; - @override // @JsonDateTime() required DateTime created, -// @JsonDateTime() required DateTime updated, - String get archiveId; - @override - - /// [name] is the name used by the [Topic] on the [App]. - String get name; - @override - - /// [email] is the email used by the [Topic] on the [App]. -// required String source, - /// [extra] is a map of additional properties. - @JsonExtra() - Map get extra; - @override - @JsonKey(ignore: true) - _$$_TopicCopyWith<_$_Topic> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/common/model/lib/src/ungraph/topic/topic.g.dart b/common/model/lib/src/ungraph/topic/topic.g.dart deleted file mode 100644 index b38997e09..000000000 --- a/common/model/lib/src/ungraph/topic/topic.g.dart +++ /dev/null @@ -1,32 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'topic.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -_$_Topic _$$_TopicFromJson(Map json) => _$_Topic( - id: const JsonString().fromJson(json['id']), - archiveId: json['archiveId'] as String, - name: json['name'] as String, - extra: json['extra'] == null - ? const {} - : const JsonExtra().fromJson(json['extra'] as Map?), - ); - -Map _$$_TopicToJson(_$_Topic instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('id', const JsonString().toJson(instance.id)); - val['archiveId'] = instance.archiveId; - val['name'] = instance.name; - writeNotNull('extra', const JsonExtra().toJson(instance.extra)); - return val; -} diff --git a/common/model/lib/src/ungraph/ungraph.dart b/common/model/lib/src/ungraph/ungraph.dart deleted file mode 100644 index 52afe5181..000000000 --- a/common/model/lib/src/ungraph/ungraph.dart +++ /dev/null @@ -1,5 +0,0 @@ -export 'account/account.dart'; -export 'activity/activity.dart'; -export 'advertiser/advertiser.dart'; -export 'app/app.dart'; -export 'topic/topic.dart'; diff --git a/common/model/lib/src/unpack/unpack_spec/unpack_spec.dart b/common/model/lib/src/unpack/unpack_spec/unpack_spec.dart deleted file mode 100644 index 25345fac6..000000000 --- a/common/model/lib/src/unpack/unpack_spec/unpack_spec.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:unself_model/unself_model.dart'; - -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:slugify/slugify.dart'; - -import 'iunpack_spec.dart'; - -part 'unpack_spec.freezed.dart'; -part 'unpack_spec.g.dart'; - -@freezed -class UnpackSpec with _$UnpackSpec implements IUnpackSpec { - const UnpackSpec._(); - - const factory UnpackSpec({ - String? id, - required String name, - required FileSpec fileSpec, - required RetrieveSpec retrieveSpec, - required Iterable modules, - }) = _UnpackSpec; - - factory UnpackSpec.fromJson(Map json) => - _$UnpackSpecFromJson(json); - - UnpackState get initialState => UnpackState( - specId: id!, - step: UnpackStep.initial, - // selectedModules: modules, - ); - - @override - String get slug => slugify(name); -} diff --git a/common/model/lib/src/unpack/unpack_state/unpack_state.dart b/common/model/lib/src/unpack/unpack_state/unpack_state.dart deleted file mode 100644 index 176247ff4..000000000 --- a/common/model/lib/src/unpack/unpack_state/unpack_state.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; -import 'package:unself_model/unself_model.dart'; - -part 'unpack_state.freezed.dart'; -part 'unpack_state.g.dart'; - -@freezed -class UnpackState with _$UnpackState { - const UnpackState._(); - - const factory UnpackState({ - String? id, - required String specId, - required UnpackStep step, - Iterable? selectedModules, - String? filePath, - }) = _UnpackState; - - factory UnpackState.fromJson(Map json) => - _$UnpackStateFromJson(json); -} diff --git a/common/model/lib/unself_model.dart b/common/model/lib/unself_model.dart deleted file mode 100644 index 02d6cd89f..000000000 --- a/common/model/lib/unself_model.dart +++ /dev/null @@ -1,10 +0,0 @@ -library unself_model; - -export 'src/app/app.dart'; -export 'src/ungraph/ungraph.dart'; -export 'src/unpack/unpack.dart'; - -export 'src/base/base.dart'; -export 'src/converter/converter.dart'; - -// export 'package:pub_semver/pub_semver.dart'; diff --git a/common/model/pubspec.yaml b/common/model/pubspec.yaml deleted file mode 100644 index b5d786baf..000000000 --- a/common/model/pubspec.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: unself_model -description: Domain model for unself project. - -publish_to: "none" -version: 1.0.0+1 - -environment: - sdk: ">=2.18.6 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - freezed_annotation: ^2.2.0 - built_collection: ^5.1.1 - pub_semver: ^2.1.3 - json_annotation: - slugify: ^2.0.0 - -dev_dependencies: - # Code Quality - - unself_analysis: - dart_code_metrics: ^5.4.0 - dependency_validator: ^3.2.2 - - # Code Generation - - build_runner: ^2.3.0 - freezed: ^2.2.0 - json_serializable: ^6.5.4 - - # Testing - - flutter_test: - sdk: flutter - - # mocktail: ^0.3.0 diff --git a/common/model/pubspec_overrides.yaml b/common/model/pubspec_overrides.yaml deleted file mode 100644 index aa00ac8b7..000000000 --- a/common/model/pubspec_overrides.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# melos_managed_dependency_overrides: unself_analysis -dependency_overrides: - unself_analysis: - path: ../../tool/analysis diff --git a/common/model/test/account_test.dart b/common/model/test/account_test.dart deleted file mode 100644 index 53a03f6fb..000000000 --- a/common/model/test/account_test.dart +++ /dev/null @@ -1,162 +0,0 @@ -// ignore_for_file: unused_local_variable - -import 'dart:convert'; - -import 'package:built_collection/built_collection.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:unself_model/unself_model.dart'; -import 'util.dart'; - -void main() { - group('test Account', () { - final now = DateTime.now(); - final nowString = now.toIso8601String(); - - final later = now.add(const Duration(minutes: 1)); - final laterString = later.toIso8601String(); - - const aApp = App( - id: 'aApp', - // created: now, - // updated: now, - name: 'name', - ); - - final bApp = App( - id: 'bApp', - // created: now, - // updated: now, - name: 'name', - extra: extra, - ); - - const aAccount = Account( - id: 'aAccount', - // created: now, - // updated: now, - archiveId: '', - name: 'name', - emails: [], - appId: 'aApp', - isOwner: true, - ); - - final bAccount = Account( - id: 'bAccount', - // created: now, - // updated: now, - archiveId: '', - name: 'name', - emails: [], - appId: 'bApp', - isOwner: false, - extra: extra, - ); - - final aObject = Map.unmodifiable({ - 'id': 'aAccount', - // 'created': nowString, - // 'updated': nowString, - 'archiveId': '', - 'name': 'name', - 'appId': 'aApp', - 'isOwner': true, - 'emails': [], - }); - - final bObject = Map.unmodifiable({ - 'id': 'bAccount', - // 'created': nowString, - // 'updated': nowString, - 'archiveId': '', - 'name': 'name', - 'appId': 'bApp', - 'isOwner': false, - 'emails': [], - 'extra': { - 'string': 'string', - 'int': 1, - 'double': 1.0, - 'bool': true, - 'list': [1, 2, 3], - 'map': {'a': 1, 'b': 2, 'c': 3} - } - }); - - setUp(() {}); - - test('hashCode', () { - expect(aAccount.hashCode, Account.fromJson(aObject).hashCode); - expect(bAccount.hashCode, Account.fromJson(bObject).hashCode); - expect(bAccount.hashCode, isNot(aAccount.hashCode)); - expect(Account.fromJson(bObject).hashCode, - isNot(Account.fromJson(aObject).hashCode)); - }); - - test('equals', () { - expect(aAccount, Account.fromJson(aObject)); - expect(bAccount, Account.fromJson(bObject)); - expect(bAccount, isNot(aAccount)); - expect(Account.fromJson(bObject), isNot(Account.fromJson(aObject))); - }); - - test('copyWith', () { - expect(aAccount, aAccount.copyWith()); - expect(bAccount, bAccount.copyWith()); - - expect(aAccount.copyWith(id: 'aAccount'), aAccount); - expect(aAccount.copyWith(id: 'AAccount'), isNot(aAccount)); - }); - - test('copyWith - extra', () { - expect( - Account.fromJson(Map.from(bObject)..['extra'] = {}), - isNot(bAccount), - ); - - expect( - bAccount.copyWith( - extra: bAccount.extra.build().rebuild((_) => _['me'] = 'who').asMap(), - ), - isNot(bAccount), - ); - }); - - // test('copyWith - deep equality', () { - // expect(aAccount.copyWith(appId: App.fromJson(aObject['app'])), aAccount); - // expect(aAccount.copyWith.app(id: 'aApp'), aAccount); - // expect(aAccount.copyWith.app(id: 'AApp'), isNot(aAccount)); - // }); - - test('toJson', () { - expect(jsonEncode(aAccount), jsonEncode(aObject)); - }); - - test('toJson - extra ', () { - expect(jsonEncode(bAccount), jsonEncode(bObject)); - - expect( - bAccount.copyWith(extra: {}).toJson(), - Map.from(bObject)..remove('extra'), - ); - - expect( - jsonEncode(bAccount.copyWith(extra: {})), - jsonEncode(Map.from(bObject)..remove('extra')), - ); - }); - - test('fromJson', () { - expect(Account.fromJson(aObject), aAccount); - }); - - test('fromJson - extra', () { - expect(Account.fromJson(bObject), bAccount); - - expect( - Account.fromJson(Map.from(bObject)..['extra'] = {}), - bAccount.copyWith(extra: {}), - ); - }); - }); -} diff --git a/common/model/test/app_test.dart b/common/model/test/app_test.dart deleted file mode 100644 index 459450b60..000000000 --- a/common/model/test/app_test.dart +++ /dev/null @@ -1,117 +0,0 @@ -// ignore_for_file: unused_local_variable - -import 'dart:convert'; - -import 'package:built_collection/built_collection.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:unself_model/unself_model.dart'; -import 'util.dart'; - -void main() { - group('test App', () { - final now = DateTime.now(); - final nowString = now.toIso8601String(); - - final later = now.add(const Duration(minutes: 1)); - final laterString = later.toIso8601String(); - - const aApp = App( - id: 'aApp', - // created: now, - // updated: now, - name: 'name', - ); - - final bApp = App( - id: 'bApp', - // created: now, - // updated: now, - name: 'name', - extra: extra, - ); - - final aObject = Map.unmodifiable({ - 'id': 'aApp', - // 'created': nowString, - // 'updated': nowString, - 'name': 'name', - }); - - final bObject = Map.unmodifiable({ - 'id': 'bApp', - // 'created': nowString, - // 'updated': nowString, - 'name': 'name', - 'extra': extra, - }); - - test('hashCode', () { - expect(bApp.hashCode, App.fromJson(bObject).hashCode); - expect(bApp.hashCode, isNot(aApp.hashCode)); - expect(App.fromJson(bObject).hashCode, - isNot(App.fromJson(aObject).hashCode)); - }); - - test('equals', () { - expect(aApp, App.fromJson(aObject)); - expect(bApp, App.fromJson(bObject)); - expect(bApp, isNot(aApp)); - expect(App.fromJson(bObject), isNot(App.fromJson(aObject))); - }); - - test('copyWith', () { - expect(aApp, aApp.copyWith()); - expect(bApp, bApp.copyWith()); - - expect(aApp.copyWith(id: 'aApp'), aApp); - expect(aApp.copyWith(id: 'AApp'), isNot(aApp)); - }); - - test('copyWith - extra', () { - expect( - aApp.copyWith(extra: Map.from(aObject)..['extra'] = {}), - isNot(aApp), - ); - - expect( - bApp.copyWith( - extra: bApp.extra.build().rebuild((_) => _['me'] = 'who').asMap(), - ), - isNot(bApp), - ); - }); - - test('toJson', () { - expect(aApp.toJson(), aObject); - expect(bApp.toJson(), bObject); - }); - - test('toJson - extra', () { - expect(jsonEncode(bApp), jsonEncode(bObject)); - - expect( - bApp.copyWith(extra: {}).toJson(), - Map.from(bObject)..remove('extra'), - ); - - expect( - jsonEncode(bApp.copyWith(extra: {})), - jsonEncode(Map.from(bObject)..remove('extra')), - ); - }); - - test('fromJson', () { - expect(App.fromJson(aObject), aApp); - expect(App.fromJson(bObject), bApp); - }); - - test('fromJson - extra', () { - expect(App.fromJson(bObject), bApp); - - expect( - App.fromJson(Map.from(bObject)..['extra'] = {}), - bApp.copyWith(extra: {}), - ); - }); - }); -} diff --git a/common/model/test/user_test.dart b/common/model/test/user_test.dart deleted file mode 100644 index 2d67c9ae2..000000000 --- a/common/model/test/user_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// ignore_for_file: unused_local_variable - -import 'dart:convert'; - -import 'package:built_collection/built_collection.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:unself_model/unself_model.dart'; -import 'util.dart'; - -void main() { - group('test User', () { - final now = DateTime.now(); - final nowString = now.toIso8601String(); - - final later = now.add(const Duration(minutes: 1)); - final laterString = later.toIso8601String(); - - const aUser = Settings( - themeMode: ThemeMode.light, - ); - - final bUser = Settings( - themeMode: ThemeMode.dark, - extra: extra, - ); - - final aObject = { - 'themeMode': 'light', - }; - final bObject = { - 'themeMode': 'dark', - 'extra': extra, - }; - - test('hashCode', () { - expect(bUser.hashCode, Settings.fromJson(bObject).hashCode); - expect(bUser.hashCode, isNot(aUser.hashCode)); - expect(Settings.fromJson(bObject).hashCode, - isNot(Settings.fromJson(aObject).hashCode)); - }); - - test('equals', () { - expect(aUser, Settings.fromJson(aObject)); - expect(bUser, Settings.fromJson(bObject)); - expect(bUser, isNot(aUser)); - expect(Settings.fromJson(bObject), isNot(Settings.fromJson(aObject))); - }); - - test('copyWith', () { - expect(aUser, aUser.copyWith()); - expect(bUser, bUser.copyWith()); - - expect( - aUser.copyWith(themeMode: ThemeMode.dark), bUser.copyWith(extra: {})); - expect(aUser.copyWith(themeMode: ThemeMode.light), aUser); - }); - - test('copyWith - extra', () { - expect( - aUser.copyWith(extra: Map.from(aObject)..['extra'] = {}), - isNot(aUser), - ); - - expect( - bUser.copyWith( - extra: bUser.extra.build().rebuild((_) => _['me'] = 'who').asMap(), - ), - isNot(bUser), - ); - }); - - test('toJson', () { - expect(aUser.toJson(), aObject); - expect(bUser.toJson(), bObject); - }); - - test('toJson - extra', () { - expect(jsonEncode(bUser), jsonEncode(bObject)); - - expect( - bUser.copyWith(extra: {}).toJson(), - Map.from(bObject)..remove('extra'), - ); - - expect( - jsonEncode(bUser.copyWith(extra: {})), - jsonEncode(Map.from(bObject)..remove('extra')), - ); - }); - - test('fromJson', () { - expect(Settings.fromJson(aObject), aUser); - expect(Settings.fromJson(bObject), bUser); - }); - - test('fromJson - extra', () { - expect(Settings.fromJson(bObject), bUser); - - expect( - Settings.fromJson(Map.from(bObject)..['extra'] = {}), - bUser.copyWith(extra: {}), - ); - }); - }); -} diff --git a/page/doc/.gitignore b/docs/.gitignore similarity index 100% rename from page/doc/.gitignore rename to docs/.gitignore diff --git a/page/doc/README.md b/docs/README.md similarity index 100% rename from page/doc/README.md rename to docs/README.md diff --git a/page/doc/babel.config.js b/docs/babel.config.js similarity index 100% rename from page/doc/babel.config.js rename to docs/babel.config.js diff --git a/page/doc/developer/.gitignore b/docs/developer/.gitignore similarity index 100% rename from page/doc/developer/.gitignore rename to docs/developer/.gitignore diff --git a/page/doc/developer/api/categories.json b/docs/developer/api/categories.json similarity index 100% rename from page/doc/developer/api/categories.json rename to docs/developer/api/categories.json diff --git a/docs/developer/api/index.json b/docs/developer/api/index.json new file mode 100644 index 000000000..a21fc382e --- /dev/null +++ b/docs/developer/api/index.json @@ -0,0 +1 @@ +[{"name":"unpack_assistant","qualifiedName":"unpack_assistant","href":"unpack_assistant/unpack_assistant-library.html","type":"library","overriddenDepth":0,"packageName":"unpack_assistant","desc":""},{"name":"UnpackAssistantBloc","qualifiedName":"unpack_assistant.UnpackAssistantBloc","href":"unpack_assistant/UnpackAssistantBloc-class.html","type":"class","overriddenDepth":0,"packageName":"unpack_assistant","desc":"UnpackAssistantBloc is responsible for helping the user importing or\nunpacking their exported archive from other apps. The assistant takes\nthe user through the following steps to help them import their data:","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantBloc","qualifiedName":"unpack_assistant.UnpackAssistantBloc.UnpackAssistantBloc","href":"unpack_assistant/UnpackAssistantBloc/UnpackAssistantBloc.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantBloc","type":"class","href":"unpack_assistant/UnpackAssistantBloc-class.html"}},{"name":"onError","qualifiedName":"unpack_assistant.UnpackAssistantBloc.onError","href":"unpack_assistant/UnpackAssistantBloc/onError.html","type":"method","overriddenDepth":1,"packageName":"unpack_assistant","desc":"Called whenever an error occurs and notifies BlocObserver.onError.","enclosedBy":{"name":"UnpackAssistantBloc","type":"class","href":"unpack_assistant/UnpackAssistantBloc-class.html"}},{"name":"onEvent","qualifiedName":"unpack_assistant.UnpackAssistantBloc.onEvent","href":"unpack_assistant/UnpackAssistantBloc/onEvent.html","type":"method","overriddenDepth":1,"packageName":"unpack_assistant","desc":"Called whenever an event is added to the Bloc.\nA great spot to add logging/analytics at the individual Bloc level.","enclosedBy":{"name":"UnpackAssistantBloc","type":"class","href":"unpack_assistant/UnpackAssistantBloc-class.html"}},{"name":"UnpackAssistantBuilder","qualifiedName":"unpack_assistant.UnpackAssistantBuilder","href":"unpack_assistant/UnpackAssistantBuilder.html","type":"typedef","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantConsumer","qualifiedName":"unpack_assistant.UnpackAssistantConsumer","href":"unpack_assistant/UnpackAssistantConsumer.html","type":"typedef","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantEvent","qualifiedName":"unpack_assistant.UnpackAssistantEvent","href":"unpack_assistant/UnpackAssistantEvent-class.html","type":"class","overriddenDepth":0,"packageName":"unpack_assistant","desc":"UnpackAssistantEvent are the events that the UnpackAssistantBloc can\nrespond to.","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"map","qualifiedName":"unpack_assistant.UnpackAssistantEvent.map","href":"unpack_assistant/UnpackAssistantEvent/map.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"mapOrNull","qualifiedName":"unpack_assistant.UnpackAssistantEvent.mapOrNull","href":"unpack_assistant/UnpackAssistantEvent/mapOrNull.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"maybeMap","qualifiedName":"unpack_assistant.UnpackAssistantEvent.maybeMap","href":"unpack_assistant/UnpackAssistantEvent/maybeMap.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"maybeWhen","qualifiedName":"unpack_assistant.UnpackAssistantEvent.maybeWhen","href":"unpack_assistant/UnpackAssistantEvent/maybeWhen.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"UnpackAssistantEvent.selectApp","qualifiedName":"unpack_assistant.UnpackAssistantEvent.selectApp","href":"unpack_assistant/UnpackAssistantEvent/UnpackAssistantEvent.selectApp.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"User selected the app or service to import data from.","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"UnpackAssistantEvent.selectArchive","qualifiedName":"unpack_assistant.UnpackAssistantEvent.selectArchive","href":"unpack_assistant/UnpackAssistantEvent/UnpackAssistantEvent.selectArchive.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"User selected the archive file to be imported","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"UnpackAssistantEvent.selectData","qualifiedName":"unpack_assistant.UnpackAssistantEvent.selectData","href":"unpack_assistant/UnpackAssistantEvent/UnpackAssistantEvent.selectData.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"User selected the data to be imported from the archive.","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"UnpackAssistantEvent.start","qualifiedName":"unpack_assistant.UnpackAssistantEvent.start","href":"unpack_assistant/UnpackAssistantEvent/UnpackAssistantEvent.start.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"User starts the import process.","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"when","qualifiedName":"unpack_assistant.UnpackAssistantEvent.when","href":"unpack_assistant/UnpackAssistantEvent/when.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"whenOrNull","qualifiedName":"unpack_assistant.UnpackAssistantEvent.whenOrNull","href":"unpack_assistant/UnpackAssistantEvent/whenOrNull.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantEvent","type":"class","href":"unpack_assistant/UnpackAssistantEvent-class.html"}},{"name":"UnpackAssistantListener","qualifiedName":"unpack_assistant.UnpackAssistantListener","href":"unpack_assistant/UnpackAssistantListener.html","type":"typedef","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantPage","qualifiedName":"unpack_assistant.UnpackAssistantPage","href":"unpack_assistant/UnpackAssistantPage-class.html","type":"class","overriddenDepth":0,"packageName":"unpack_assistant","desc":"A description for UnpackAssistantPage","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantPage","qualifiedName":"unpack_assistant.UnpackAssistantPage.UnpackAssistantPage","href":"unpack_assistant/UnpackAssistantPage/UnpackAssistantPage.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"A description for UnpackAssistantPage","enclosedBy":{"name":"UnpackAssistantPage","type":"class","href":"unpack_assistant/UnpackAssistantPage-class.html"}},{"name":"build","qualifiedName":"unpack_assistant.UnpackAssistantPage.build","href":"unpack_assistant/UnpackAssistantPage/build.html","type":"method","overriddenDepth":1,"packageName":"unpack_assistant","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"UnpackAssistantPage","type":"class","href":"unpack_assistant/UnpackAssistantPage-class.html"}},{"name":"UnpackAssistantSelector","qualifiedName":"unpack_assistant.UnpackAssistantSelector","href":"unpack_assistant/UnpackAssistantSelector.html","type":"typedef","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantSliver","qualifiedName":"unpack_assistant.UnpackAssistantSliver","href":"unpack_assistant/UnpackAssistantSliver-class.html","type":"class","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Sliver of the UnpackAssistantPage.","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantSliver","qualifiedName":"unpack_assistant.UnpackAssistantSliver.UnpackAssistantSliver","href":"unpack_assistant/UnpackAssistantSliver/UnpackAssistantSliver.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Sliver of the UnpackAssistantPage.","enclosedBy":{"name":"UnpackAssistantSliver","type":"class","href":"unpack_assistant/UnpackAssistantSliver-class.html"}},{"name":"build","qualifiedName":"unpack_assistant.UnpackAssistantSliver.build","href":"unpack_assistant/UnpackAssistantSliver/build.html","type":"method","overriddenDepth":1,"packageName":"unpack_assistant","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"UnpackAssistantSliver","type":"class","href":"unpack_assistant/UnpackAssistantSliver-class.html"}},{"name":"UnpackAssistantState","qualifiedName":"unpack_assistant.UnpackAssistantState","href":"unpack_assistant/UnpackAssistantState-class.html","type":"class","overriddenDepth":0,"packageName":"unpack_assistant","desc":"UnpackAssistantState are the states that the UnpackAssistantBloc can be.","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantState.apps","qualifiedName":"unpack_assistant.UnpackAssistantState.apps","href":"unpack_assistant/UnpackAssistantState/UnpackAssistantState.apps.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Step 1: Select the app or services.","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"UnpackAssistantState.archive","qualifiedName":"unpack_assistant.UnpackAssistantState.archive","href":"unpack_assistant/UnpackAssistantState/UnpackAssistantState.archive.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Step 2: Select the archive file.","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"UnpackAssistantState.completed","qualifiedName":"unpack_assistant.UnpackAssistantState.completed","href":"unpack_assistant/UnpackAssistantState/UnpackAssistantState.completed.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Step 5: Complete the import.","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"UnpackAssistantState.data","qualifiedName":"unpack_assistant.UnpackAssistantState.data","href":"unpack_assistant/UnpackAssistantState/UnpackAssistantState.data.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Step 3: Select data from archive to import.","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"UnpackAssistantState.errored","qualifiedName":"unpack_assistant.UnpackAssistantState.errored","href":"unpack_assistant/UnpackAssistantState/UnpackAssistantState.errored.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Assistant has errored.","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"UnpackAssistantState.initial","qualifiedName":"unpack_assistant.UnpackAssistantState.initial","href":"unpack_assistant/UnpackAssistantState/UnpackAssistantState.initial.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Assistant is created.","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"map","qualifiedName":"unpack_assistant.UnpackAssistantState.map","href":"unpack_assistant/UnpackAssistantState/map.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"mapOrNull","qualifiedName":"unpack_assistant.UnpackAssistantState.mapOrNull","href":"unpack_assistant/UnpackAssistantState/mapOrNull.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"maybeMap","qualifiedName":"unpack_assistant.UnpackAssistantState.maybeMap","href":"unpack_assistant/UnpackAssistantState/maybeMap.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"maybeWhen","qualifiedName":"unpack_assistant.UnpackAssistantState.maybeWhen","href":"unpack_assistant/UnpackAssistantState/maybeWhen.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"UnpackAssistantState.processing","qualifiedName":"unpack_assistant.UnpackAssistantState.processing","href":"unpack_assistant/UnpackAssistantState/UnpackAssistantState.processing.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"Step 4: Process the archive.","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"when","qualifiedName":"unpack_assistant.UnpackAssistantState.when","href":"unpack_assistant/UnpackAssistantState/when.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"whenOrNull","qualifiedName":"unpack_assistant.UnpackAssistantState.whenOrNull","href":"unpack_assistant/UnpackAssistantState/whenOrNull.html","type":"method","overriddenDepth":0,"packageName":"unpack_assistant","desc":"","enclosedBy":{"name":"UnpackAssistantState","type":"class","href":"unpack_assistant/UnpackAssistantState-class.html"}},{"name":"UnpackAssistantView","qualifiedName":"unpack_assistant.UnpackAssistantView","href":"unpack_assistant/UnpackAssistantView-class.html","type":"class","overriddenDepth":0,"packageName":"unpack_assistant","desc":"View of the UnpackAssistantPage.","enclosedBy":{"name":"unpack_assistant","type":"library","href":"unpack_assistant/unpack_assistant-library.html"}},{"name":"UnpackAssistantView","qualifiedName":"unpack_assistant.UnpackAssistantView.UnpackAssistantView","href":"unpack_assistant/UnpackAssistantView/UnpackAssistantView.html","type":"constructor","overriddenDepth":0,"packageName":"unpack_assistant","desc":"View of the UnpackAssistantPage.","enclosedBy":{"name":"UnpackAssistantView","type":"class","href":"unpack_assistant/UnpackAssistantView-class.html"}},{"name":"build","qualifiedName":"unpack_assistant.UnpackAssistantView.build","href":"unpack_assistant/UnpackAssistantView/build.html","type":"method","overriddenDepth":1,"packageName":"unpack_assistant","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"UnpackAssistantView","type":"class","href":"unpack_assistant/UnpackAssistantView-class.html"}}] diff --git a/page/doc/developer/api/index.mdx b/docs/developer/api/index.mdx similarity index 100% rename from page/doc/developer/api/index.mdx rename to docs/developer/api/index.mdx diff --git a/page/doc/developer/api/license_detail/Flatten.js b/docs/developer/api/license_detail/Flatten.js similarity index 98% rename from page/doc/developer/api/license_detail/Flatten.js rename to docs/developer/api/license_detail/Flatten.js index 963ca916c..fddf785a5 100644 --- a/page/doc/developer/api/license_detail/Flatten.js +++ b/docs/developer/api/license_detail/Flatten.js @@ -62,7 +62,7 @@ export default function RawHtml() { diff --git a/page/doc/developer/api/license_detail/Flatten.mdx b/docs/developer/api/license_detail/Flatten.mdx similarity index 100% rename from page/doc/developer/api/license_detail/Flatten.mdx rename to docs/developer/api/license_detail/Flatten.mdx diff --git a/docs/developer/api/license_detail/Flatten/flatten.js b/docs/developer/api/license_detail/Flatten/flatten.js new file mode 100644 index 000000000..cf0cca940 --- /dev/null +++ b/docs/developer/api/license_detail/Flatten/flatten.js @@ -0,0 +1,76 @@ +import React from 'react'; + +export default function RawHtml() { + const data = `
+ +
+
+

flatten method + Null safety +

+ +
+ + +List<LicenseParagraph?> +flatten() + + + +
+ + + + +
+

Implementation

+
List<LicenseParagraph?> flatten() =>
+    [for (final entry in this) ...entry, null];
+
+ + +
+ + + + + +
`; + + return ( +
+ ); +} diff --git a/page/doc/developer/api/license_detail/Flatten/flatten.mdx b/docs/developer/api/license_detail/Flatten/flatten.mdx similarity index 100% rename from page/doc/developer/api/license_detail/Flatten/flatten.mdx rename to docs/developer/api/license_detail/Flatten/flatten.mdx diff --git a/page/doc/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.constructor.js b/docs/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.constructor.js similarity index 98% rename from page/doc/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.constructor.js rename to docs/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.constructor.js index b964b5af0..b23291ccd 100644 --- a/page/doc/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.constructor.js +++ b/docs/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.constructor.js @@ -39,7 +39,7 @@ export default function RawHtml() { diff --git a/page/doc/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.mdx b/docs/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.mdx similarity index 100% rename from page/doc/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.mdx rename to docs/developer/api/license_detail/LicenseDetailPage/LicenseDetailPage.mdx diff --git a/docs/developer/api/license_detail/LicenseDetailPage/build.js b/docs/developer/api/license_detail/LicenseDetailPage/build.js new file mode 100644 index 000000000..c4cc84d1a --- /dev/null +++ b/docs/developer/api/license_detail/LicenseDetailPage/build.js @@ -0,0 +1,146 @@ +import React from 'react'; + +export default function RawHtml() { + const data = `
+ +
+
+

build method + Null safety +

+ +
+ +
+
    +
  1. @override
  2. +
+
+ +Widget +build(
  1. BuildContext context
  2. +
) + +
override
+ +
+ +
+

Describes the part of the user interface represented by this widget.

+

The framework calls this method when this widget is inserted into the tree +in a given BuildContext and when the dependencies of this widget change +(e.g., an InheritedWidget referenced by this widget changes). This +method can potentially be called in every frame and should not have any side +effects beyond building a widget.

+

The framework replaces the subtree below this widget with the widget +returned by this method, either by updating the existing subtree or by +removing the subtree and inflating a new subtree, depending on whether the +widget returned by this method can update the root of the existing +subtree, as determined by calling Widget.canUpdate.

+

Typically implementations return a newly created constellation of widgets +that are configured with information from this widget's constructor and +from the given BuildContext.

+

The given BuildContext contains information about the location in the +tree at which this widget is being built. For example, the context +provides the set of inherited widgets for this location in the tree. A +given widget might be built with multiple different BuildContext +arguments over time if the widget is moved around the tree or if the +widget is inserted into the tree in multiple places at once.

+

The implementation of this method must only depend on:

+ +

If a widget's build method is to depend on anything else, use a +StatefulWidget instead.

+

See also:

+
    +
  • StatelessWidget, which contains the discussion on performance considerations.
  • +
+
+ + + +
+

Implementation

+
@override
+Widget build(BuildContext context) => UnAppPage(
+      name: Text(packageName),
+      // description: Text(""),
+      slivers: [
+        SliverPadding(
+          padding: const EdgeInsets.all(UnSpaces.M),
+          sliver: LicenseDetailSliver(packageName: packageName),
+        ),
+      ],
+    );
+
+ + +
+ + + + + +
`; + + return ( +
+ ); +} diff --git a/page/doc/developer/api/license_detail/LicenseDetailPage/build.mdx b/docs/developer/api/license_detail/LicenseDetailPage/build.mdx similarity index 100% rename from page/doc/developer/api/license_detail/LicenseDetailPage/build.mdx rename to docs/developer/api/license_detail/LicenseDetailPage/build.mdx diff --git a/docs/developer/api/license_detail/LicenseDetailPage/packageName.js b/docs/developer/api/license_detail/LicenseDetailPage/packageName.js new file mode 100644 index 000000000..8f02e4a90 --- /dev/null +++ b/docs/developer/api/license_detail/LicenseDetailPage/packageName.js @@ -0,0 +1,92 @@ +import React from 'react'; + +export default function RawHtml() { + const data = `
+ +
+
+

packageName property + Null safety +

+ +
+ + String + packageName +
final
+ +
+ + + +
+

Implementation

+
final String packageName;
+
+ + +
+ + + + + +
`; + + return ( +
+ ); +} diff --git a/page/doc/developer/api/license_detail/LicenseDetailPage/packageName.mdx b/docs/developer/api/license_detail/LicenseDetailPage/packageName.mdx similarity index 100% rename from page/doc/developer/api/license_detail/LicenseDetailPage/packageName.mdx rename to docs/developer/api/license_detail/LicenseDetailPage/packageName.mdx diff --git a/page/doc/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.constructor.js b/docs/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.constructor.js similarity index 98% rename from page/doc/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.constructor.js rename to docs/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.constructor.js index d48acb50b..5694121a2 100644 --- a/page/doc/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.constructor.js +++ b/docs/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.constructor.js @@ -39,7 +39,7 @@ export default function RawHtml() { diff --git a/page/doc/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.mdx b/docs/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.mdx similarity index 100% rename from page/doc/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.mdx rename to docs/developer/api/license_detail/LicenseDetailSliver/LicenseDetailSliver.mdx diff --git a/docs/developer/api/license_detail/LicenseDetailSliver/build.js b/docs/developer/api/license_detail/LicenseDetailSliver/build.js new file mode 100644 index 000000000..03d9b69ad --- /dev/null +++ b/docs/developer/api/license_detail/LicenseDetailSliver/build.js @@ -0,0 +1,152 @@ +import React from 'react'; + +export default function RawHtml() { + const data = `
+ +
+
+

build method + Null safety +

+ +
+ +
+
    +
  1. @override
  2. +
+
+ +Widget +build(
  1. BuildContext context
  2. +
) + +
override
+ +
+ +
+

Describes the part of the user interface represented by this widget.

+

The framework calls this method when this widget is inserted into the tree +in a given BuildContext and when the dependencies of this widget change +(e.g., an InheritedWidget referenced by this widget changes). This +method can potentially be called in every frame and should not have any side +effects beyond building a widget.

+

The framework replaces the subtree below this widget with the widget +returned by this method, either by updating the existing subtree or by +removing the subtree and inflating a new subtree, depending on whether the +widget returned by this method can update the root of the existing +subtree, as determined by calling Widget.canUpdate.

+

Typically implementations return a newly created constellation of widgets +that are configured with information from this widget's constructor and +from the given BuildContext.

+

The given BuildContext contains information about the location in the +tree at which this widget is being built. For example, the context +provides the set of inherited widgets for this location in the tree. A +given widget might be built with multiple different BuildContext +arguments over time if the widget is moved around the tree or if the +widget is inserted into the tree in multiple places at once.

+

The implementation of this method must only depend on:

+ +

If a widget's build method is to depend on anything else, use a +StatefulWidget instead.

+

See also:

+
    +
  • StatelessWidget, which contains the discussion on performance considerations.
  • +
+
+ + + +
+

Implementation

+
@override
+Widget build(BuildContext context) {
+  final flattenedDetail =
+      context.read<LicenseService>().getLicenseDetail(packageName).flatten();
+
+  return SliverList(
+    delegate: SliverChildBuilderDelegate(
+      childCount: flattenedDetail.length,
+      (context, index) => flattenedDetail[index] != null
+          ? _LicenseBody(flattenedDetail[index]!)
+          : const Padding(
+              padding: EdgeInsets.all(UnSpaces.M),
+              child: Divider(),
+            ),
+    ),
+  );
+}
+
+ + +
+ + + + + +
`; + + return ( +
+ ); +} diff --git a/page/doc/developer/api/license_detail/LicenseDetailSliver/build.mdx b/docs/developer/api/license_detail/LicenseDetailSliver/build.mdx similarity index 100% rename from page/doc/developer/api/license_detail/LicenseDetailSliver/build.mdx rename to docs/developer/api/license_detail/LicenseDetailSliver/build.mdx diff --git a/docs/developer/api/license_detail/LicenseDetailSliver/packageName.js b/docs/developer/api/license_detail/LicenseDetailSliver/packageName.js new file mode 100644 index 000000000..7852206f4 --- /dev/null +++ b/docs/developer/api/license_detail/LicenseDetailSliver/packageName.js @@ -0,0 +1,92 @@ +import React from 'react'; + +export default function RawHtml() { + const data = `
+ +
+
+

packageName property + Null safety +

+ +
+ + String + packageName +
final
+ +
+ + + +
+

Implementation

+
final String packageName;
+
+ + +
+ + + + + +
`; + + return ( +
+ ); +} diff --git a/page/doc/developer/api/license_detail/LicenseDetailSliver/packageName.mdx b/docs/developer/api/license_detail/LicenseDetailSliver/packageName.mdx similarity index 100% rename from page/doc/developer/api/license_detail/LicenseDetailSliver/packageName.mdx rename to docs/developer/api/license_detail/LicenseDetailSliver/packageName.mdx diff --git a/page/doc/developer/api/license_detail/license_detail.js b/docs/developer/api/license_detail/license_detail.js similarity index 93% rename from page/doc/developer/api/license_detail/license_detail.js rename to docs/developer/api/license_detail/license_detail.js index 78185fca9..62c717e74 100644 --- a/page/doc/developer/api/license_detail/license_detail.js +++ b/docs/developer/api/license_detail/license_detail.js @@ -70,12 +70,12 @@ export default function RawHtml() { -
unself_license_detail package
+
un_license_detail package
  1. Libraries
  2. license_detail
  3. diff --git a/page/doc/developer/api/license_detail/license_detail.mdx b/docs/developer/api/license_detail/license_detail.mdx similarity index 100% rename from page/doc/developer/api/license_detail/license_detail.mdx rename to docs/developer/api/license_detail/license_detail.mdx diff --git a/page/doc/developer/api/license_list/LicenseListPage/LicenseListPage.constructor.js b/docs/developer/api/license_list/LicenseListPage/LicenseListPage.constructor.js similarity index 98% rename from page/doc/developer/api/license_list/LicenseListPage/LicenseListPage.constructor.js rename to docs/developer/api/license_list/LicenseListPage/LicenseListPage.constructor.js index df09b71dd..c4d976b7c 100644 --- a/page/doc/developer/api/license_list/LicenseListPage/LicenseListPage.constructor.js +++ b/docs/developer/api/license_list/LicenseListPage/LicenseListPage.constructor.js @@ -38,7 +38,7 @@ export default function RawHtml() { diff --git a/page/doc/developer/api/license_list/LicenseListPage/LicenseListPage.mdx b/docs/developer/api/license_list/LicenseListPage/LicenseListPage.mdx similarity index 100% rename from page/doc/developer/api/license_list/LicenseListPage/LicenseListPage.mdx rename to docs/developer/api/license_list/LicenseListPage/LicenseListPage.mdx diff --git a/docs/developer/api/license_list/LicenseListPage/build.js b/docs/developer/api/license_list/LicenseListPage/build.js new file mode 100644 index 000000000..4c5862c5c --- /dev/null +++ b/docs/developer/api/license_list/LicenseListPage/build.js @@ -0,0 +1,143 @@ +import React from 'react'; + +export default function RawHtml() { + const data = `
    + +
    +
    +

    build method + Null safety +

    + +
    + +
    +
      +
    1. @override
    2. +
    +
    + +Widget +build(
    1. BuildContext context
    2. +
    ) + +
    override
    + +
    + +
    +

    Describes the part of the user interface represented by this widget.

    +

    The framework calls this method when this widget is inserted into the tree +in a given BuildContext and when the dependencies of this widget change +(e.g., an InheritedWidget referenced by this widget changes). This +method can potentially be called in every frame and should not have any side +effects beyond building a widget.

    +

    The framework replaces the subtree below this widget with the widget +returned by this method, either by updating the existing subtree or by +removing the subtree and inflating a new subtree, depending on whether the +widget returned by this method can update the root of the existing +subtree, as determined by calling Widget.canUpdate.

    +

    Typically implementations return a newly created constellation of widgets +that are configured with information from this widget's constructor and +from the given BuildContext.

    +

    The given BuildContext contains information about the location in the +tree at which this widget is being built. For example, the context +provides the set of inherited widgets for this location in the tree. A +given widget might be built with multiple different BuildContext +arguments over time if the widget is moved around the tree or if the +widget is inserted into the tree in multiple places at once.

    +

    The implementation of this method must only depend on:

    + +

    If a widget's build method is to depend on anything else, use a +StatefulWidget instead.

    +

    See also:

    +
      +
    • StatelessWidget, which contains the discussion on performance considerations.
    • +
    +
    + + + +
    +

    Implementation

    +
    @override
    +Widget build(BuildContext context) => UnAppPage(
    +      name: const Text("Acknowledgments"),
    +      // description: Text(""),
    +      slivers: [
    +        LicenseListSliver(onSelectPackage: onSelectPackage),
    +      ],
    +    );
    +
    + + +
    + + + + + +
    `; + + return ( +
    + ); +} diff --git a/page/doc/developer/api/license_list/LicenseListPage/build.mdx b/docs/developer/api/license_list/LicenseListPage/build.mdx similarity index 100% rename from page/doc/developer/api/license_list/LicenseListPage/build.mdx rename to docs/developer/api/license_list/LicenseListPage/build.mdx diff --git a/docs/developer/api/license_list/LicenseListPage/onSelectPackage.js b/docs/developer/api/license_list/LicenseListPage/onSelectPackage.js new file mode 100644 index 000000000..51bdc518a --- /dev/null +++ b/docs/developer/api/license_list/LicenseListPage/onSelectPackage.js @@ -0,0 +1,92 @@ +import React from 'react'; + +export default function RawHtml() { + const data = `
    + +
    +
    +

    onSelectPackage property + Null safety +

    + +
    + + dynamic Function(String packageName) + onSelectPackage +
    final
    + +
    + + + +
    +

    Implementation

    +
    final Function(String packageName) onSelectPackage;
    +
    + + +
    + + + + + +
    `; + + return ( +
    + ); +} diff --git a/page/doc/developer/api/license_list/LicenseListPage/onSelectPackage.mdx b/docs/developer/api/license_list/LicenseListPage/onSelectPackage.mdx similarity index 100% rename from page/doc/developer/api/license_list/LicenseListPage/onSelectPackage.mdx rename to docs/developer/api/license_list/LicenseListPage/onSelectPackage.mdx diff --git a/page/doc/developer/api/license_list/LicenseListSliver/LicenseListSliver.constructor.js b/docs/developer/api/license_list/LicenseListSliver/LicenseListSliver.constructor.js similarity index 98% rename from page/doc/developer/api/license_list/LicenseListSliver/LicenseListSliver.constructor.js rename to docs/developer/api/license_list/LicenseListSliver/LicenseListSliver.constructor.js index 53a893dcc..e70b4de7b 100644 --- a/page/doc/developer/api/license_list/LicenseListSliver/LicenseListSliver.constructor.js +++ b/docs/developer/api/license_list/LicenseListSliver/LicenseListSliver.constructor.js @@ -38,7 +38,7 @@ export default function RawHtml() { diff --git a/page/doc/developer/api/license_list/LicenseListSliver/LicenseListSliver.mdx b/docs/developer/api/license_list/LicenseListSliver/LicenseListSliver.mdx similarity index 100% rename from page/doc/developer/api/license_list/LicenseListSliver/LicenseListSliver.mdx rename to docs/developer/api/license_list/LicenseListSliver/LicenseListSliver.mdx diff --git a/docs/developer/api/license_list/LicenseListSliver/build.js b/docs/developer/api/license_list/LicenseListSliver/build.js new file mode 100644 index 000000000..c843fdab2 --- /dev/null +++ b/docs/developer/api/license_list/LicenseListSliver/build.js @@ -0,0 +1,161 @@ +import React from 'react'; + +export default function RawHtml() { + const data = `
    + +
    +
    +

    build method + Null safety +

    + +
    + +
    +
      +
    1. @override
    2. +
    +
    + +Widget +build(
    1. BuildContext context
    2. +
    ) + +
    override
    + +
    + +
    +

    Describes the part of the user interface represented by this widget.

    +

    The framework calls this method when this widget is inserted into the tree +in a given BuildContext and when the dependencies of this widget change +(e.g., an InheritedWidget referenced by this widget changes). This +method can potentially be called in every frame and should not have any side +effects beyond building a widget.

    +

    The framework replaces the subtree below this widget with the widget +returned by this method, either by updating the existing subtree or by +removing the subtree and inflating a new subtree, depending on whether the +widget returned by this method can update the root of the existing +subtree, as determined by calling Widget.canUpdate.

    +

    Typically implementations return a newly created constellation of widgets +that are configured with information from this widget's constructor and +from the given BuildContext.

    +

    The given BuildContext contains information about the location in the +tree at which this widget is being built. For example, the context +provides the set of inherited widgets for this location in the tree. A +given widget might be built with multiple different BuildContext +arguments over time if the widget is moved around the tree or if the +widget is inserted into the tree in multiple places at once.

    +

    The implementation of this method must only depend on:

    + +

    If a widget's build method is to depend on anything else, use a +StatefulWidget instead.

    +

    See also:

    +
      +
    • StatelessWidget, which contains the discussion on performance considerations.
    • +
    +
    + + + +
    +

    Implementation

    +
    @override
    +Widget build(BuildContext context) => SliverPadding(
    +      padding: const EdgeInsets.symmetric(vertical: UnSpaces.M),
    +      sliver: FutureBuilder<LicenseData>(
    +        future: context.read<LicenseService>().licenses,
    +        builder: (context, snapshot) => snapshot.hasData
    +            ? SliverList(
    +                delegate: SliverChildBuilderDelegate(
    +                  childCount: snapshot.data!.packages.length,
    +                  (context, index) {
    +                    final data = snapshot.data!;
    +                    final package = snapshot.data!.packages[index];
    +
    +                    return item(
    +                      packageName: package,
    +                      licenseCount: data.licensesCount(packageName: package),
    +                      onSelectPackage: onSelectPackage,
    +                    );
    +                  },
    +                ),
    +              )
    +            : const SliverFillRemaining(child: CupertinoActivityIndicator()),
    +      ),
    +    );
    +
    + + +
    + + + + + +
    `; + + return ( +
    + ); +} diff --git a/page/doc/developer/api/license_list/LicenseListSliver/build.mdx b/docs/developer/api/license_list/LicenseListSliver/build.mdx similarity index 100% rename from page/doc/developer/api/license_list/LicenseListSliver/build.mdx rename to docs/developer/api/license_list/LicenseListSliver/build.mdx diff --git a/page/doc/developer/api/license_list/LicenseListSliver/item.js b/docs/developer/api/license_list/LicenseListSliver/item.js similarity index 99% rename from page/doc/developer/api/license_list/LicenseListSliver/item.js rename to docs/developer/api/license_list/LicenseListSliver/item.js index 57194d057..e67a00dcd 100644 --- a/page/doc/developer/api/license_list/LicenseListSliver/item.js +++ b/docs/developer/api/license_list/LicenseListSliver/item.js @@ -54,7 +54,7 @@ export default function RawHtml() {